0800c760 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 800c760: 37 9c ff e4 addi sp,sp,-28 800c764: 5b 8b 00 14 sw (sp+20),r11 800c768: 5b 8c 00 10 sw (sp+16),r12 800c76c: 5b 8d 00 0c sw (sp+12),r13 800c770: 5b 8e 00 08 sw (sp+8),r14 800c774: 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; 800c778: 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 */ ) { 800c77c: 20 4e ff ff andi r14,r2,0xffff 800c780: 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(); 800c784: f8 00 05 a4 calli 800de14 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 800c788: 2d 64 00 3c lhu r4,(r11+60) 800c78c: 7c 2c 00 00 cmpnei r12,r1,0 800c790: fc 81 08 00 cmpne r1,r4,r1 800c794: a1 81 60 00 and r12,r12,r1 800c798: 5d 80 00 10 bne r12,r0,800c7d8 rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 800c79c: 0d 6e 00 3c sh (r11+60),r14 jnode->st_gid = group; 800c7a0: 0d 6d 00 3e sh (r11+62),r13 IMFS_update_ctime( jnode ); 800c7a4: 37 81 00 18 addi r1,sp,24 800c7a8: b9 80 10 00 mv r2,r12 800c7ac: fb ff d9 31 calli 8002c70 800c7b0: 2b 81 00 18 lw r1,(sp+24) 800c7b4: 59 61 00 48 sw (r11+72),r1 800c7b8: b9 80 08 00 mv r1,r12 return 0; } 800c7bc: 2b 9d 00 04 lw ra,(sp+4) 800c7c0: 2b 8b 00 14 lw r11,(sp+20) 800c7c4: 2b 8c 00 10 lw r12,(sp+16) 800c7c8: 2b 8d 00 0c lw r13,(sp+12) 800c7cc: 2b 8e 00 08 lw r14,(sp+8) 800c7d0: 37 9c 00 1c addi sp,sp,28 800c7d4: c3 a0 00 00 ret #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 800c7d8: f8 00 1e 25 calli 801406c <__errno> <== NOT EXECUTED 800c7dc: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800c7e0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800c7e4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800c7e8: e3 ff ff f5 bi 800c7bc <== NOT EXECUTED 0800b4bc : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 800b4bc: 37 9c ff ec addi sp,sp,-20 800b4c0: 5b 8b 00 10 sw (sp+16),r11 800b4c4: 5b 8c 00 0c sw (sp+12),r12 800b4c8: 5b 8d 00 08 sw (sp+8),r13 800b4cc: 5b 9d 00 04 sw (sp+4),ra 800b4d0: b8 20 60 00 mv r12,r1 800b4d4: b8 40 68 00 mv r13,r2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 800b4d8: b8 20 58 00 mv r11,r1 800b4dc: 5c 20 00 08 bne r1,r0,800b4fc node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 800b4e0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800b4e4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800b4e8: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 800b4ec: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 800b4f0: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 800b4f4: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 800b4f8: c3 a0 00 00 ret <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 800b4fc: 78 01 08 01 mvhi r1,0x801 800b500: 38 21 e1 10 ori r1,r1,0xe110 800b504: 28 26 00 00 lw r6,(r1+0) 800b508: b8 60 10 00 mv r2,r3 800b50c: b9 a0 08 00 mv r1,r13 800b510: 28 c3 00 2c lw r3,(r6+44) 800b514: 5b 85 00 14 sw (sp+20),r5 800b518: a4 60 18 00 not r3,r3 800b51c: a0 83 18 00 and r3,r4,r3 800b520: fb ff ff ad calli 800b3d4 800b524: b8 20 58 00 mv r11,r1 if ( !node ) 800b528: 44 20 ff ee be r1,r0,800b4e0 return NULL; /* * Set the type specific information */ switch (type) { 800b52c: 34 01 00 07 mvi r1,7 800b530: 55 a1 00 35 bgu r13,r1,800b604 800b534: b9 a0 08 00 mv r1,r13 800b538: 34 02 00 02 mvi r2,2 800b53c: 78 0d 08 01 mvhi r13,0x801 800b540: fb ff d3 2c calli 80001f0 <__ashlsi3> 800b544: 39 ad d1 08 ori r13,r13,0xd108 800b548: b5 a1 08 00 add r1,r13,r1 800b54c: 28 21 00 00 lw r1,(r1+0) 800b550: 2b 85 00 14 lw r5,(sp+20) 800b554: c0 20 00 00 b r1 node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; 800b558: 28 a1 00 04 lw r1,(r5+4) 800b55c: 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; 800b560: 28 a5 00 00 lw r5,(r5+0) 800b564: 59 65 00 50 sw (r11+80),r5 /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 800b568: 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; 800b56c: 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 ); 800b570: b9 60 10 00 mv r2,r11 fs_info = parent_loc->mt_entry->fs_info; 800b574: 28 63 00 34 lw r3,(r3+52) node->Parent = parent; 800b578: 59 61 00 08 sw (r11+8),r1 800b57c: 34 21 00 50 addi r1,r1,80 node->st_ino = ++fs_info->ino_count; 800b580: 28 64 00 00 lw r4,(r3+0) 800b584: 34 84 00 01 addi r4,r4,1 800b588: 58 64 00 00 sw (r3+0),r4 800b58c: 59 64 00 38 sw (r11+56),r4 800b590: fb ff de 06 calli 8002da8 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 800b594: b9 60 08 00 mv r1,r11 800b598: 2b 9d 00 04 lw ra,(sp+4) 800b59c: 2b 8b 00 10 lw r11,(sp+16) 800b5a0: 2b 8c 00 0c lw r12,(sp+12) 800b5a4: 2b 8d 00 08 lw r13,(sp+8) 800b5a8: 37 9c 00 14 addi sp,sp,20 800b5ac: c3 a0 00 00 ret node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 800b5b0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED node->info.linearfile.direct = 0; 800b5b4: 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; 800b5b8: 59 61 00 50 sw (r11+80),r1 <== NOT EXECUTED 800b5bc: 59 61 00 54 sw (r11+84),r1 <== NOT EXECUTED node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 800b5c0: 34 01 00 00 mvi r1,0 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 800b5c4: 59 61 00 60 sw (r11+96),r1 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 800b5c8: 59 61 00 50 sw (r11+80),r1 800b5cc: 59 61 00 54 sw (r11+84),r1 node->info.file.indirect = 0; 800b5d0: 59 61 00 58 sw (r11+88),r1 node->info.file.doubly_indirect = 0; 800b5d4: 59 61 00 5c sw (r11+92),r1 node->info.file.triply_indirect = 0; break; 800b5d8: e3 ff ff e4 bi 800b568 case IMFS_FIFO: node->info.fifo.pipe = NULL; 800b5dc: 34 01 00 00 mvi r1,0 800b5e0: 59 61 00 50 sw (r11+80),r1 break; 800b5e4: e3 ff ff e1 bi 800b568 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 800b5e8: 35 62 00 54 addi r2,r11,84 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 800b5ec: 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); 800b5f0: 59 62 00 50 sw (r11+80),r2 the_chain->permanent_null = NULL; 800b5f4: 34 02 00 00 mvi r2,0 800b5f8: 59 62 00 54 sw (r11+84),r2 the_chain->last = _Chain_Head(the_chain); 800b5fc: 59 61 00 58 sw (r11+88),r1 800b600: e3 ff ff da bi 800b568 default: assert(0); 800b604: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800b608: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED 800b60c: 78 04 08 01 mvhi r4,0x801 <== NOT EXECUTED 800b610: 38 21 d0 b8 ori r1,r1,0xd0b8 <== NOT EXECUTED 800b614: 38 63 d1 28 ori r3,r3,0xd128 <== NOT EXECUTED 800b618: 38 84 d1 04 ori r4,r4,0xd104 <== NOT EXECUTED 800b61c: 34 02 00 5c mvi r2,92 <== NOT EXECUTED 800b620: fb ff f0 40 calli 8007720 <__assert_func> <== NOT EXECUTED 08002e6c : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 8002e6c: 37 9c ff dc addi sp,sp,-36 8002e70: 5b 8b 00 24 sw (sp+36),r11 8002e74: 5b 8c 00 20 sw (sp+32),r12 8002e78: 5b 8d 00 1c sw (sp+28),r13 8002e7c: 5b 8e 00 18 sw (sp+24),r14 8002e80: 5b 8f 00 14 sw (sp+20),r15 8002e84: 5b 90 00 10 sw (sp+16),r16 8002e88: 5b 91 00 0c sw (sp+12),r17 8002e8c: 5b 92 00 08 sw (sp+8),r18 8002e90: 5b 9d 00 04 sw (sp+4),ra 8002e94: b8 40 68 00 mv r13,r2 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 8002e98: 44 20 00 33 be r1,r0,8002f64 assert( level >= 0 ); 8002e9c: 4c 40 00 09 bge r2,r0,8002ec0 8002ea0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002ea4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002ea8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002eac: 38 21 67 48 ori r1,r1,0x6748 <== NOT EXECUTED 8002eb0: 38 63 69 10 ori r3,r3,0x6910 <== NOT EXECUTED 8002eb4: 38 84 68 1c ori r4,r4,0x681c <== NOT EXECUTED 8002eb8: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8002ebc: f8 00 02 66 calli 8003854 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 8002ec0: 28 31 00 4c lw r17,(r1+76) 8002ec4: 34 02 00 01 mvi r2,1 8002ec8: 5e 22 00 2f bne r17,r2,8002f84 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 8002ecc: 28 2e 00 50 lw r14,(r1+80) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8002ed0: 34 30 00 54 addi r16,r1,84 8002ed4: 45 d0 00 15 be r14,r16,8002f28 8002ed8: 78 0c 08 02 mvhi r12,0x802 8002edc: 39 8c 91 d8 ori r12,r12,0x91d8 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 8002ee0: 78 0f 08 02 mvhi r15,0x802 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 8002ee4: 35 b2 00 01 addi r18,r13,1 for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 8002ee8: 34 0b 00 00 mvi r11,0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 8002eec: 29 83 00 00 lw r3,(r12+0) 8002ef0: b9 e0 08 00 mv r1,r15 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 8002ef4: 35 6b 00 01 addi r11,r11,1 fprintf(stdout, "...." ); 8002ef8: 28 64 00 08 lw r4,(r3+8) 8002efc: 38 21 68 50 ori r1,r1,0x6850 8002f00: 34 02 00 01 mvi r2,1 8002f04: 34 03 00 04 mvi r3,4 8002f08: f8 00 44 3b calli 8013ff4 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 8002f0c: 4d ab ff f8 bge r13,r11,8002eec fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 8002f10: b9 c0 08 00 mv r1,r14 8002f14: fb ff ff 55 calli 8002c68 if ( the_jnode->type == IMFS_DIRECTORY ) 8002f18: 29 c1 00 4c lw r1,(r14+76) 8002f1c: 44 31 00 0e be r1,r17,8002f54 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 8002f20: 29 ce 00 00 lw r14,(r14+0) assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 8002f24: 5d d0 ff f1 bne r14,r16,8002ee8 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 8002f28: 2b 9d 00 04 lw ra,(sp+4) 8002f2c: 2b 8b 00 24 lw r11,(sp+36) 8002f30: 2b 8c 00 20 lw r12,(sp+32) 8002f34: 2b 8d 00 1c lw r13,(sp+28) 8002f38: 2b 8e 00 18 lw r14,(sp+24) 8002f3c: 2b 8f 00 14 lw r15,(sp+20) 8002f40: 2b 90 00 10 lw r16,(sp+16) 8002f44: 2b 91 00 0c lw r17,(sp+12) 8002f48: 2b 92 00 08 lw r18,(sp+8) 8002f4c: 37 9c 00 24 addi sp,sp,36 8002f50: c3 a0 00 00 ret for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 8002f54: b9 c0 08 00 mv r1,r14 8002f58: ba 40 10 00 mv r2,r18 8002f5c: fb ff ff c4 calli 8002e6c 8002f60: e3 ff ff f0 bi 8002f20 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 8002f64: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002f68: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002f6c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002f70: 38 21 67 48 ori r1,r1,0x6748 <== NOT EXECUTED 8002f74: 38 63 69 10 ori r3,r3,0x6910 <== NOT EXECUTED 8002f78: 38 84 68 0c ori r4,r4,0x680c <== NOT EXECUTED 8002f7c: 34 02 00 84 mvi r2,132 <== NOT EXECUTED 8002f80: f8 00 02 35 calli 8003854 <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 8002f84: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002f88: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002f8c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002f90: 38 21 67 48 ori r1,r1,0x6748 <== NOT EXECUTED 8002f94: 38 63 69 10 ori r3,r3,0x6910 <== NOT EXECUTED 8002f98: 38 84 68 28 ori r4,r4,0x6828 <== NOT EXECUTED 8002f9c: 34 02 00 88 mvi r2,136 <== NOT EXECUTED 8002fa0: f8 00 02 2d calli 8003854 <__assert_func> <== NOT EXECUTED 0800676c : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 800676c: 37 9c ff 9c addi sp,sp,-100 8006770: 5b 8b 00 3c sw (sp+60),r11 8006774: 5b 8c 00 38 sw (sp+56),r12 8006778: 5b 8d 00 34 sw (sp+52),r13 800677c: 5b 8e 00 30 sw (sp+48),r14 8006780: 5b 8f 00 2c sw (sp+44),r15 8006784: 5b 90 00 28 sw (sp+40),r16 8006788: 5b 91 00 24 sw (sp+36),r17 800678c: 5b 92 00 20 sw (sp+32),r18 8006790: 5b 93 00 1c sw (sp+28),r19 8006794: 5b 94 00 18 sw (sp+24),r20 8006798: 5b 95 00 14 sw (sp+20),r21 800679c: 5b 96 00 10 sw (sp+16),r22 80067a0: 5b 97 00 0c sw (sp+12),r23 80067a4: 5b 98 00 08 sw (sp+8),r24 80067a8: 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; 80067ac: 28 8b 00 00 lw r11,(r4+0) case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 80067b0: 78 10 08 01 mvhi r16,0x801 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 80067b4: b8 80 60 00 mv r12,r4 80067b8: b8 20 88 00 mv r17,r1 80067bc: b8 40 70 00 mv r14,r2 80067c0: b8 60 b8 00 mv r23,r3 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 80067c4: 3a 10 e1 10 ori r16,r16,0xe110 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 80067c8: 34 0f 00 00 mvi r15,0 80067cc: 37 93 00 40 addi r19,sp,64 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 80067d0: 34 12 00 01 mvi r18,1 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 80067d4: 34 14 00 03 mvi r20,3 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 80067d8: 34 15 00 04 mvi r21,4 result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; if ( result == -1 ) 80067dc: 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 ) { 80067e0: 34 16 00 02 mvi r22,2 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 80067e4: 37 84 00 64 addi r4,sp,100 80067e8: b6 2f 08 00 add r1,r17,r15 80067ec: b9 c0 10 00 mv r2,r14 80067f0: ba 60 18 00 mv r3,r19 80067f4: f8 00 02 78 calli 80071d4 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 80067f8: 29 84 00 00 lw r4,(r12+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 ); 80067fc: b8 20 68 00 mv r13,r1 pathnamelen -= len; 8006800: 2b 85 00 64 lw r5,(sp+100) i += len; if ( !pathloc->node_access ) 8006804: 44 80 00 51 be r4,r0,8006948 while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; 8006808: b5 e5 78 00 add r15,r15,r5 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 800680c: c9 c5 70 00 sub r14,r14,r5 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8006810: 5c 20 00 10 bne r1,r0,8006850 * 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 ) { 8006814: 28 82 00 4c lw r2,(r4+76) 8006818: 34 01 00 01 mvi r1,1 800681c: 44 41 00 57 be r2,r1,8006978 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 8006820: b9 80 08 00 mv r1,r12 8006824: fb ff ff 08 calli 8006444 8006828: b8 20 68 00 mv r13,r1 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 800682c: ba e0 10 00 mv r2,r23 8006830: b9 80 08 00 mv r1,r12 8006834: fb ff ff 47 calli 8006550 8006838: 5c 20 00 2c bne r1,r0,80068e8 rtems_set_errno_and_return_minus_one( EACCES ); 800683c: f8 00 1b 5b calli 800d5a8 <__errno> 8006840: 34 02 00 0d mvi r2,13 8006844: 58 22 00 00 sw (r1+0),r2 8006848: 34 0d ff ff mvi r13,-1 800684c: e0 00 00 27 bi 80068e8 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 8006850: 29 61 00 4c lw r1,(r11+76) 8006854: 44 32 00 37 be r1,r18,8006930 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 8006858: b8 80 58 00 mv r11,r4 switch( type ) { 800685c: 45 b4 00 06 be r13,r20,8006874 8006860: 45 b5 00 1e be r13,r21,80068d8 8006864: 45 b6 00 11 be r13,r22,80068a8 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 8006868: 7d ad 00 04 cmpnei r13,r13,4 800686c: 5d a0 ff de bne r13,r0,80067e4 8006870: e3 ff ff e9 bi 8006814 <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 8006874: 28 81 00 4c lw r1,(r4+76) 8006878: 44 34 00 39 be r1,r20,800695c node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 800687c: 44 35 00 55 be r1,r21,80069d0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 8006880: 5c 32 00 5c bne r1,r18,80069f0 /* * 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 ) { 8006884: 29 6d 00 5c lw r13,(r11+92) 8006888: 5d a0 00 5f bne r13,r0,8006a04 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 800688c: b9 60 08 00 mv r1,r11 8006890: ba 60 10 00 mv r2,r19 8006894: f8 00 02 19 calli 80070f8 8006898: b8 20 58 00 mv r11,r1 if ( !node ) 800689c: 44 2d 00 2b be r1,r13,8006948 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 80068a0: 59 8b 00 00 sw (r12+0),r11 break; 80068a4: e3 ff ff d0 bi 80067e4 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 80068a8: 2a 01 00 00 lw r1,(r16+0) 80068ac: 28 21 00 18 lw r1,(r1+24) 80068b0: 44 24 ff cd be r1,r4,80067e4 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 80068b4: 29 81 00 10 lw r1,(r12+16) /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 80068b8: 28 22 00 1c lw r2,(r1+28) 80068bc: 44 44 00 5a be r2,r4,8006a24 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 80068c0: 28 8b 00 08 lw r11,(r4+8) 80068c4: 5d 60 ff f7 bne r11,r0,80068a0 rtems_set_errno_and_return_minus_one( ENOENT ); 80068c8: f8 00 1b 38 calli 800d5a8 <__errno> 80068cc: 58 2d 00 00 sw (r1+0),r13 80068d0: 34 0d ff ff mvi r13,-1 80068d4: e0 00 00 05 bi 80068e8 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 80068d8: f8 00 1b 34 calli 800d5a8 <__errno> 80068dc: 34 02 00 5b mvi r2,91 80068e0: 58 22 00 00 sw (r1+0),r2 80068e4: 34 0d ff ff mvi r13,-1 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 80068e8: b9 a0 08 00 mv r1,r13 80068ec: 2b 9d 00 04 lw ra,(sp+4) 80068f0: 2b 8b 00 3c lw r11,(sp+60) 80068f4: 2b 8c 00 38 lw r12,(sp+56) 80068f8: 2b 8d 00 34 lw r13,(sp+52) 80068fc: 2b 8e 00 30 lw r14,(sp+48) 8006900: 2b 8f 00 2c lw r15,(sp+44) 8006904: 2b 90 00 28 lw r16,(sp+40) 8006908: 2b 91 00 24 lw r17,(sp+36) 800690c: 2b 92 00 20 lw r18,(sp+32) 8006910: 2b 93 00 1c lw r19,(sp+28) 8006914: 2b 94 00 18 lw r20,(sp+24) 8006918: 2b 95 00 14 lw r21,(sp+20) 800691c: 2b 96 00 10 lw r22,(sp+16) 8006920: 2b 97 00 0c lw r23,(sp+12) 8006924: 2b 98 00 08 lw r24,(sp+8) 8006928: 37 9c 00 64 addi sp,sp,100 800692c: c3 a0 00 00 ret /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 8006930: b9 80 08 00 mv r1,r12 8006934: ba 40 10 00 mv r2,r18 8006938: fb ff ff 06 calli 8006550 800693c: 44 20 ff c0 be r1,r0,800683c 8006940: 29 84 00 00 lw r4,(r12+0) 8006944: e3 ff ff c5 bi 8006858 * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 8006948: f8 00 1b 18 calli 800d5a8 <__errno> 800694c: 34 02 00 02 mvi r2,2 8006950: 58 22 00 00 sw (r1+0),r2 8006954: 34 0d ff ff mvi r13,-1 8006958: e3 ff ff e4 bi 80068e8 * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 800695c: b9 80 08 00 mv r1,r12 8006960: 34 02 00 00 mvi r2,0 8006964: fb ff ff 1d calli 80065d8 node = pathloc->node_access; 8006968: 29 8b 00 00 lw r11,(r12+0) if ( !node ) 800696c: 45 60 00 21 be r11,r0,80069f0 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 8006970: 29 61 00 4c lw r1,(r11+76) 8006974: e3 ff ff c3 bi 8006880 * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { 8006978: 28 81 00 5c lw r1,(r4+92) 800697c: 44 20 ff a9 be r1,r0,8006820 newloc = node->info.directory.mt_fs->mt_fs_root; 8006980: 28 23 00 28 lw r3,(r1+40) 8006984: 28 27 00 24 lw r7,(r1+36) 8006988: 28 26 00 20 lw r6,(r1+32) 800698c: 28 24 00 1c lw r4,(r1+28) *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8006990: 2b 82 00 64 lw r2,(sp+100) */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 8006994: 28 21 00 2c lw r1,(r1+44) 8006998: 59 81 00 10 sw (r12+16),r1 return (*pathloc->ops->evalpath_h)( &pathname[i-len], 800699c: 28 65 00 00 lw r5,(r3+0) 80069a0: c9 e2 08 00 sub r1,r15,r2 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 80069a4: 59 84 00 00 sw (r12+0),r4 80069a8: 59 83 00 0c sw (r12+12),r3 80069ac: 59 87 00 08 sw (r12+8),r7 80069b0: 59 86 00 04 sw (r12+4),r6 return (*pathloc->ops->evalpath_h)( &pathname[i-len], 80069b4: b6 21 08 00 add r1,r17,r1 80069b8: b5 c2 10 00 add r2,r14,r2 80069bc: ba e0 18 00 mv r3,r23 80069c0: b9 80 20 00 mv r4,r12 80069c4: d8 a0 00 00 call r5 80069c8: b8 20 68 00 mv r13,r1 80069cc: e3 ff ff c7 bi 80068e8 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 80069d0: b9 80 08 00 mv r1,r12 80069d4: 34 02 00 00 mvi r2,0 80069d8: fb ff ff 1e calli 8006650 80069dc: b8 20 68 00 mv r13,r1 node = pathloc->node_access; 80069e0: 29 8b 00 00 lw r11,(r12+0) if ( result == -1 ) 80069e4: 44 38 ff c1 be r1,r24,80068e8 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 80069e8: 29 61 00 4c lw r1,(r11+76) 80069ec: e3 ff ff a5 bi 8006880 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 80069f0: f8 00 1a ee calli 800d5a8 <__errno> 80069f4: 34 02 00 14 mvi r2,20 80069f8: 58 22 00 00 sw (r1+0),r2 80069fc: 34 0d ff ff mvi r13,-1 8006a00: e3 ff ff ba bi 80068e8 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 8006a04: 29 a3 00 28 lw r3,(r13+40) 8006a08: 29 a7 00 24 lw r7,(r13+36) 8006a0c: 29 a6 00 20 lw r6,(r13+32) 8006a10: 29 a4 00 1c lw r4,(r13+28) *pathloc = newloc; 8006a14: 29 ad 00 2c lw r13,(r13+44) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8006a18: 2b 82 00 64 lw r2,(sp+100) * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 8006a1c: 59 8d 00 10 sw (r12+16),r13 8006a20: e3 ff ff df bi 800699c */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 8006a24: 28 23 00 14 lw r3,(r1+20) 8006a28: 28 27 00 10 lw r7,(r1+16) 8006a2c: 28 26 00 0c lw r6,(r1+12) 8006a30: 28 24 00 08 lw r4,(r1+8) *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 8006a34: 2b 82 00 64 lw r2,(sp+100) if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 8006a38: 28 21 00 18 lw r1,(r1+24) 8006a3c: e3 ff ff d7 bi 8006998 08006b40 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 8006b40: 37 9c ff 98 addi sp,sp,-104 8006b44: 5b 8b 00 40 sw (sp+64),r11 8006b48: 5b 8c 00 3c sw (sp+60),r12 8006b4c: 5b 8d 00 38 sw (sp+56),r13 8006b50: 5b 8e 00 34 sw (sp+52),r14 8006b54: 5b 8f 00 30 sw (sp+48),r15 8006b58: 5b 90 00 2c sw (sp+44),r16 8006b5c: 5b 91 00 28 sw (sp+40),r17 8006b60: 5b 92 00 24 sw (sp+36),r18 8006b64: 5b 93 00 20 sw (sp+32),r19 8006b68: 5b 94 00 1c sw (sp+28),r20 8006b6c: 5b 95 00 18 sw (sp+24),r21 8006b70: 5b 96 00 14 sw (sp+20),r22 8006b74: 5b 97 00 10 sw (sp+16),r23 8006b78: 5b 98 00 0c sw (sp+12),r24 8006b7c: 5b 99 00 08 sw (sp+8),r25 8006b80: 5b 9d 00 04 sw (sp+4),ra case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8006b84: 78 10 08 01 mvhi r16,0x801 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 8006b88: b8 40 68 00 mv r13,r2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8006b8c: 28 4b 00 00 lw r11,(r2+0) int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 8006b90: b8 60 c0 00 mv r24,r3 8006b94: b8 20 90 00 mv r18,r1 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 8006b98: f8 00 1f 54 calli 800e8e8 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8006b9c: 3a 10 e1 10 ori r16,r16,0xe110 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 8006ba0: 34 0f 00 00 mvi r15,0 8006ba4: 37 94 00 44 addi r20,sp,68 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 8006ba8: 34 13 00 01 mvi r19,1 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 8006bac: 34 15 00 02 mvi r21,2 8006bb0: 34 16 00 03 mvi r22,3 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 8006bb4: 34 17 00 04 mvi r23,4 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) 8006bb8: 34 19 ff ff mvi r25,-1 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 8006bbc: b8 20 70 00 mv r14,r1 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 8006bc0: b9 c0 10 00 mv r2,r14 8006bc4: 37 84 00 68 addi r4,sp,104 8006bc8: b6 4f 08 00 add r1,r18,r15 8006bcc: ba 80 18 00 mv r3,r20 8006bd0: f8 00 01 81 calli 80071d4 pathlen -= len; i += len; if ( !pathloc->node_access ) 8006bd4: 29 a4 00 00 lw r4,(r13+0) */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 8006bd8: 2b 91 00 68 lw r17,(sp+104) * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 8006bdc: b8 20 60 00 mv r12,r1 pathlen -= len; 8006be0: c9 d1 70 00 sub r14,r14,r17 i += len; if ( !pathloc->node_access ) 8006be4: 44 80 00 55 be r4,r0,8006d38 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8006be8: 5c 20 00 18 bne r1,r0,8006c48 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 8006bec: f8 00 1a 6f calli 800d5a8 <__errno> 8006bf0: 34 02 00 11 mvi r2,17 8006bf4: 58 22 00 00 sw (r1+0),r2 8006bf8: 34 0b ff ff mvi r11,-1 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 8006bfc: b9 60 08 00 mv r1,r11 8006c00: 2b 9d 00 04 lw ra,(sp+4) 8006c04: 2b 8b 00 40 lw r11,(sp+64) 8006c08: 2b 8c 00 3c lw r12,(sp+60) 8006c0c: 2b 8d 00 38 lw r13,(sp+56) 8006c10: 2b 8e 00 34 lw r14,(sp+52) 8006c14: 2b 8f 00 30 lw r15,(sp+48) 8006c18: 2b 90 00 2c lw r16,(sp+44) 8006c1c: 2b 91 00 28 lw r17,(sp+40) 8006c20: 2b 92 00 24 lw r18,(sp+36) 8006c24: 2b 93 00 20 lw r19,(sp+32) 8006c28: 2b 94 00 1c lw r20,(sp+28) 8006c2c: 2b 95 00 18 lw r21,(sp+24) 8006c30: 2b 96 00 14 lw r22,(sp+20) 8006c34: 2b 97 00 10 lw r23,(sp+16) 8006c38: 2b 98 00 0c lw r24,(sp+12) 8006c3c: 2b 99 00 08 lw r25,(sp+8) 8006c40: 37 9c 00 68 addi sp,sp,104 8006c44: c3 a0 00 00 ret /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 8006c48: 29 61 00 4c lw r1,(r11+76) 8006c4c: 44 33 00 40 be r1,r19,8006d4c while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 8006c50: b5 f1 78 00 add r15,r15,r17 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; 8006c54: b8 80 58 00 mv r11,r4 switch( type ) { 8006c58: 45 95 00 1a be r12,r21,8006cc0 8006c5c: 55 95 00 03 bgu r12,r21,8006c68 8006c60: 5d 80 ff d8 bne r12,r0,8006bc0 8006c64: e3 ff ff e2 bi 8006bec <== NOT EXECUTED 8006c68: 45 96 00 07 be r12,r22,8006c84 8006c6c: 5d 97 ff d5 bne r12,r23,8006bc0 case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 8006c70: f8 00 1a 4e calli 800d5a8 <__errno> 8006c74: 34 02 00 5b mvi r2,91 8006c78: 58 22 00 00 sw (r1+0),r2 8006c7c: 34 0b ff ff mvi r11,-1 8006c80: e3 ff ff df bi 8006bfc pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 8006c84: 28 81 00 4c lw r1,(r4+76) 8006c88: 44 36 00 37 be r1,r22,8006d64 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 8006c8c: 44 37 00 36 be r1,r23,8006d64 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 8006c90: 45 60 00 4c be r11,r0,8006dc0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 8006c94: 29 61 00 4c lw r1,(r11+76) 8006c98: 5c 33 00 4a bne r1,r19,8006dc0 /* * 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 ) { 8006c9c: 29 6c 00 5c lw r12,(r11+92) 8006ca0: 5d 80 00 4d bne r12,r0,8006dd4 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 8006ca4: b9 60 08 00 mv r1,r11 8006ca8: ba 80 10 00 mv r2,r20 8006cac: f8 00 01 13 calli 80070f8 8006cb0: b8 20 58 00 mv r11,r1 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 8006cb4: 44 2c 00 0f be r1,r12,8006cf0 done = true; else pathloc->node_access = node; 8006cb8: 59 ab 00 00 sw (r13+0),r11 8006cbc: e3 ff ff c1 bi 8006bc0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8006cc0: 2a 01 00 00 lw r1,(r16+0) 8006cc4: 28 21 00 18 lw r1,(r1+24) 8006cc8: 44 24 ff be be r1,r4,8006bc0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 8006ccc: 29 a1 00 10 lw r1,(r13+16) 8006cd0: 28 22 00 1c lw r2,(r1+28) 8006cd4: 44 44 00 53 be r2,r4,8006e20 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 8006cd8: 28 8b 00 08 lw r11,(r4+8) 8006cdc: 5d 60 ff f7 bne r11,r0,8006cb8 rtems_set_errno_and_return_minus_one( ENOENT ); 8006ce0: f8 00 1a 32 calli 800d5a8 <__errno> 8006ce4: 58 2c 00 00 sw (r1+0),r12 8006ce8: 34 0b ff ff mvi r11,-1 8006cec: e3 ff ff c4 bi 8006bfc case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 8006cf0: 2b 81 00 68 lw r1,(sp+104) /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 8006cf4: b6 4f 10 00 add r2,r18,r15 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 8006cf8: c9 e1 78 00 sub r15,r15,r1 8006cfc: b6 4f 90 00 add r18,r18,r15 8006d00: 5b 12 00 00 sw (r24+0),r18 /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 8006d04: 40 41 00 00 lbu r1,(r2+0) 8006d08: 44 2b 00 1e be r1,r11,8006d80 if ( !IMFS_is_separator( path[ i ] ) ) 8006d0c: 7c 23 00 5c cmpnei r3,r1,92 8006d10: 7c 21 00 2f cmpnei r1,r1,47 8006d14: a0 23 08 00 and r1,r1,r3 8006d18: 5c 2b 00 08 bne r1,r11,8006d38 /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 8006d1c: 40 41 00 01 lbu r1,(r2+1) if ( !IMFS_is_separator( path[ i ] ) ) 8006d20: 34 42 00 01 addi r2,r2,1 8006d24: 7c 24 00 2f cmpnei r4,r1,47 8006d28: 7c 23 00 5c cmpnei r3,r1,92 /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 8006d2c: 44 20 00 15 be r1,r0,8006d80 if ( !IMFS_is_separator( path[ i ] ) ) 8006d30: a0 64 18 00 and r3,r3,r4 8006d34: 44 60 ff fa be r3,r0,8006d1c rtems_set_errno_and_return_minus_one( ENOENT ); 8006d38: f8 00 1a 1c calli 800d5a8 <__errno> 8006d3c: 34 02 00 02 mvi r2,2 8006d40: 58 22 00 00 sw (r1+0),r2 8006d44: 34 0b ff ff mvi r11,-1 8006d48: e3 ff ff ad bi 8006bfc * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 8006d4c: b9 a0 08 00 mv r1,r13 8006d50: ba 60 10 00 mv r2,r19 8006d54: fb ff fd ff calli 8006550 8006d58: 44 20 00 15 be r1,r0,8006dac 8006d5c: 29 a4 00 00 lw r4,(r13+0) 8006d60: e3 ff ff bc bi 8006c50 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 8006d64: b9 a0 08 00 mv r1,r13 8006d68: 34 02 00 00 mvi r2,0 8006d6c: fb ff ff 35 calli 8006a40 8006d70: b8 20 58 00 mv r11,r1 if ( result == -1 ) 8006d74: 44 39 ff a2 be r1,r25,8006bfc 8006d78: 29 ab 00 00 lw r11,(r13+0) 8006d7c: e3 ff ff c5 bi 8006c90 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 8006d80: b9 a0 08 00 mv r1,r13 8006d84: fb ff fd b0 calli 8006444 8006d88: b8 20 58 00 mv r11,r1 /* * The returned node must be a directory */ node = pathloc->node_access; 8006d8c: 29 a1 00 00 lw r1,(r13+0) 8006d90: 28 22 00 4c lw r2,(r1+76) 8006d94: 34 01 00 01 mvi r1,1 8006d98: 5c 41 00 0a bne r2,r1,8006dc0 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 8006d9c: b9 a0 08 00 mv r1,r13 8006da0: 34 02 00 03 mvi r2,3 8006da4: fb ff fd eb calli 8006550 8006da8: 5c 20 ff 95 bne r1,r0,8006bfc rtems_set_errno_and_return_minus_one( EACCES ); 8006dac: f8 00 19 ff calli 800d5a8 <__errno> 8006db0: 34 02 00 0d mvi r2,13 8006db4: 58 22 00 00 sw (r1+0),r2 8006db8: 34 0b ff ff mvi r11,-1 8006dbc: e3 ff ff 90 bi 8006bfc /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 8006dc0: f8 00 19 fa calli 800d5a8 <__errno> 8006dc4: 34 02 00 14 mvi r2,20 8006dc8: 58 22 00 00 sw (r1+0),r2 8006dcc: 34 0b ff ff mvi r11,-1 8006dd0: e3 ff ff 8b bi 8006bfc * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 8006dd4: 29 82 00 28 lw r2,(r12+40) 8006dd8: 29 86 00 24 lw r6,(r12+36) 8006ddc: 29 85 00 20 lw r5,(r12+32) 8006de0: 29 83 00 1c lw r3,(r12+28) *pathloc = newloc; 8006de4: 29 8c 00 2c lw r12,(r12+44) 8006de8: 59 ac 00 10 sw (r13+16),r12 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8006dec: 2b 81 00 68 lw r1,(sp+104) 8006df0: 28 44 00 04 lw r4,(r2+4) * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 8006df4: 59 a3 00 00 sw (r13+0),r3 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8006df8: c9 e1 08 00 sub r1,r15,r1 * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 8006dfc: 59 a2 00 0c sw (r13+12),r2 8006e00: 59 a6 00 08 sw (r13+8),r6 8006e04: 59 a5 00 04 sw (r13+4),r5 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8006e08: b6 41 08 00 add r1,r18,r1 8006e0c: b9 a0 10 00 mv r2,r13 8006e10: bb 00 18 00 mv r3,r24 8006e14: d8 80 00 00 call r4 8006e18: b8 20 58 00 mv r11,r1 8006e1c: e3 ff ff 78 bi 8006bfc if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 8006e20: 28 22 00 14 lw r2,(r1+20) 8006e24: 28 26 00 10 lw r6,(r1+16) 8006e28: 28 25 00 0c lw r5,(r1+12) 8006e2c: 28 23 00 08 lw r3,(r1+8) *pathloc = newloc; 8006e30: 28 21 00 18 lw r1,(r1+24) 8006e34: 59 a1 00 10 sw (r13+16),r1 8006e38: e3 ff ff ed bi 8006dec 080065d8 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 80065d8: 37 9c ff f4 addi sp,sp,-12 80065dc: 5b 8b 00 08 sw (sp+8),r11 80065e0: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *jnode = node->node_access; 80065e4: 28 23 00 00 lw r3,(r1+0) /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 80065e8: 34 04 00 03 mvi r4,3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 80065ec: b8 20 58 00 mv r11,r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 80065f0: 28 65 00 4c lw r5,(r3+76) 80065f4: 5c a4 00 14 bne r5,r4,8006644 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 80065f8: 28 63 00 50 lw r3,(r3+80) IMFS_Set_handlers( node ); 80065fc: 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; 8006600: 58 23 00 00 sw (r1+0),r3 IMFS_Set_handlers( node ); 8006604: fb ff ff 90 calli 8006444 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 8006608: 2b 82 00 0c lw r2,(sp+12) 800660c: b9 60 08 00 mv r1,r11 8006610: fb ff ff d0 calli 8006550 8006614: 34 02 00 00 mvi r2,0 8006618: 44 22 00 06 be r1,r2,8006630 rtems_set_errno_and_return_minus_one( EACCES ); return result; } 800661c: b8 40 08 00 mv r1,r2 8006620: 2b 9d 00 04 lw ra,(sp+4) 8006624: 2b 8b 00 08 lw r11,(sp+8) 8006628: 37 9c 00 0c addi sp,sp,12 800662c: c3 a0 00 00 ret /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 8006630: f8 00 1b de calli 800d5a8 <__errno> <== NOT EXECUTED 8006634: 34 02 00 0d mvi r2,13 <== NOT EXECUTED 8006638: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800663c: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8006640: e3 ff ff f7 bi 800661c <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 8006644: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8006648: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED 800664c: fb ff f0 bc calli 800293c <== NOT EXECUTED 08006650 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8006650: 37 9c ff f0 addi sp,sp,-16 8006654: 5b 8b 00 10 sw (sp+16),r11 8006658: 5b 8c 00 0c sw (sp+12),r12 800665c: 5b 8d 00 08 sw (sp+8),r13 8006660: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *jnode = node->node_access; 8006664: 28 24 00 00 lw r4,(r1+0) int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8006668: b8 40 60 00 mv r12,r2 800666c: b8 20 58 00 mv r11,r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 8006670: 28 82 00 4c lw r2,(r4+76) 8006674: 34 01 00 04 mvi r1,4 8006678: 5c 41 00 3a bne r2,r1,8006760 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 800667c: 28 81 00 08 lw r1,(r4+8) 8006680: 44 20 00 35 be r1,r0,8006754 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 8006684: 59 61 00 00 sw (r11+0),r1 rtems_filesystem_get_sym_start_loc( 8006688: 28 81 00 50 lw r1,(r4+80) 800668c: 40 25 00 00 lbu r5,(r1+0) 8006690: 64 a6 00 5c cmpei r6,r5,92 8006694: 64 a2 00 2f cmpei r2,r5,47 8006698: b8 c2 30 00 or r6,r6,r2 800669c: 44 c0 00 26 be r6,r0,8006734 80066a0: 78 01 08 01 mvhi r1,0x801 80066a4: 38 21 e1 10 ori r1,r1,0xe110 80066a8: 28 25 00 00 lw r5,(r1+0) 80066ac: 34 0d 00 01 mvi r13,1 80066b0: 28 a1 00 18 lw r1,(r5+24) 80066b4: 59 61 00 00 sw (r11+0),r1 80066b8: 28 a1 00 1c lw r1,(r5+28) 80066bc: 59 61 00 04 sw (r11+4),r1 80066c0: 28 a1 00 20 lw r1,(r5+32) 80066c4: 59 61 00 08 sw (r11+8),r1 80066c8: 28 a1 00 24 lw r1,(r5+36) 80066cc: 59 61 00 0c sw (r11+12),r1 80066d0: 28 a5 00 28 lw r5,(r5+40) 80066d4: 59 65 00 10 sw (r11+16),r5 80066d8: 28 81 00 50 lw r1,(r4+80) * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 80066dc: b4 2d 68 00 add r13,r1,r13 80066e0: b9 a0 08 00 mv r1,r13 80066e4: f8 00 20 81 calli 800e8e8 80066e8: b8 20 10 00 mv r2,r1 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 80066ec: b9 80 18 00 mv r3,r12 80066f0: b9 a0 08 00 mv r1,r13 80066f4: b9 60 20 00 mv r4,r11 80066f8: f8 00 00 1d calli 800676c 80066fc: b8 20 68 00 mv r13,r1 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 8006700: b9 60 08 00 mv r1,r11 8006704: fb ff ff 50 calli 8006444 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 8006708: b9 60 08 00 mv r1,r11 800670c: b9 80 10 00 mv r2,r12 8006710: fb ff ff 90 calli 8006550 8006714: 44 20 00 0b be r1,r0,8006740 rtems_set_errno_and_return_minus_one( EACCES ); return result; } 8006718: b9 a0 08 00 mv r1,r13 800671c: 2b 9d 00 04 lw ra,(sp+4) 8006720: 2b 8b 00 10 lw r11,(sp+16) 8006724: 2b 8c 00 0c lw r12,(sp+12) 8006728: 2b 8d 00 08 lw r13,(sp+8) 800672c: 37 9c 00 10 addi sp,sp,16 8006730: c3 a0 00 00 ret * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 8006734: b8 c0 68 00 mv r13,r6 8006738: 5c a6 ff e9 bne r5,r6,80066dc 800673c: e3 ff ff d9 bi 80066a0 <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 8006740: f8 00 1b 9a calli 800d5a8 <__errno> <== NOT EXECUTED 8006744: 34 02 00 0d mvi r2,13 <== NOT EXECUTED 8006748: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800674c: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED 8006750: e3 ff ff f2 bi 8006718 <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 8006754: 78 01 ba d0 mvhi r1,0xbad0 <== NOT EXECUTED 8006758: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED 800675c: fb ff f0 78 calli 800293c <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 8006760: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8006764: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED 8006768: fb ff f0 75 calli 800293c <== NOT EXECUTED 0800b624 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 800b624: 37 9c ff e8 addi sp,sp,-24 800b628: 5b 8b 00 10 sw (sp+16),r11 800b62c: 5b 8c 00 0c sw (sp+12),r12 800b630: 5b 8d 00 08 sw (sp+8),r13 800b634: 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; 800b638: 28 2b 00 00 lw r11,(r1+0) int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 800b63c: 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(); 800b640: fb ff f1 25 calli 8007ad4 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 800b644: 2d 63 00 3c lhu r3,(r11+60) 800b648: 7c 2c 00 00 cmpnei r12,r1,0 800b64c: fc 61 08 00 cmpne r1,r3,r1 800b650: a1 81 60 00 and r12,r12,r1 800b654: 5d 80 00 13 bne r12,r0,800b6a0 /* * 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); 800b658: 29 62 00 30 lw r2,(r11+48) 800b65c: 34 01 f0 00 mvi r1,-4096 800b660: 21 ad 0f ff andi r13,r13,0xfff 800b664: a0 41 08 00 and r1,r2,r1 800b668: b9 a1 68 00 or r13,r13,r1 800b66c: 59 6d 00 30 sw (r11+48),r13 IMFS_update_ctime( jnode ); 800b670: 37 81 00 14 addi r1,sp,20 800b674: b9 80 10 00 mv r2,r12 800b678: fb ff f1 1c calli 8007ae8 800b67c: 2b 81 00 14 lw r1,(sp+20) 800b680: 59 61 00 48 sw (r11+72),r1 800b684: b9 80 08 00 mv r1,r12 return 0; } 800b688: 2b 9d 00 04 lw ra,(sp+4) 800b68c: 2b 8b 00 10 lw r11,(sp+16) 800b690: 2b 8c 00 0c lw r12,(sp+12) 800b694: 2b 8d 00 08 lw r13,(sp+8) 800b698: 37 9c 00 18 addi sp,sp,24 800b69c: c3 a0 00 00 ret */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 800b6a0: f8 00 07 c2 calli 800d5a8 <__errno> <== NOT EXECUTED 800b6a4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800b6a8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800b6ac: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800b6b0: e3 ff ff f6 bi 800b688 <== NOT EXECUTED 08007020 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 8007020: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8007024: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8007028: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 800702c: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8007030: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 8007034: 28 2d 00 3c lw r13,(r1+60) <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 8007038: b8 20 10 00 mv r2,r1 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 800703c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 8007040: 35 a1 00 50 addi r1,r13,80 <== NOT EXECUTED 8007044: f8 00 0f 88 calli 800ae64 <== NOT EXECUTED 8007048: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if (! err) { 800704c: 44 20 00 0d be r1,r0,8007080 <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) free(jnode); } IMFS_FIFO_RETURN(err); 8007050: 4c 20 00 05 bge r1,r0,8007064 <== NOT EXECUTED 8007054: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 8007058: f8 00 19 54 calli 800d5a8 <__errno> <== NOT EXECUTED 800705c: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8007060: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED } 8007064: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8007068: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800706c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8007070: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8007074: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8007078: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 800707c: c3 a0 00 00 ret <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 8007080: 29 83 00 18 lw r3,(r12+24) <== NOT EXECUTED 8007084: 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) 8007088: 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; 800708c: a0 62 10 00 and r2,r3,r2 <== NOT EXECUTED 8007090: 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) 8007094: f8 00 02 de calli 8007c0c <== NOT EXECUTED 8007098: 5c 2b ff f3 bne r1,r11,8007064 <== NOT EXECUTED 800709c: 2d a1 00 34 lhu r1,(r13+52) <== NOT EXECUTED 80070a0: 5c 20 ff f1 bne r1,r0,8007064 <== NOT EXECUTED free(jnode); 80070a4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80070a8: f8 00 02 08 calli 80078c8 <== NOT EXECUTED 80070ac: e3 ff ff ee bi 8007064 <== NOT EXECUTED 08006ea8 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 8006ea8: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8006eac: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8006eb0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED int err; if (command == FIONBIO) { 8006eb4: 78 05 80 04 mvhi r5,0x8004 <== NOT EXECUTED 8006eb8: 38 a5 66 7e ori r5,r5,0x667e <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 8006ebc: b8 20 20 00 mv r4,r1 <== NOT EXECUTED int err; if (command == FIONBIO) { 8006ec0: 44 45 00 0d be r2,r5,8006ef4 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 8006ec4: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED 8006ec8: 28 21 00 50 lw r1,(r1+80) <== NOT EXECUTED 8006ecc: f8 00 0e c0 calli 800a9cc <== NOT EXECUTED IMFS_FIFO_RETURN(err); 8006ed0: 4c 20 00 05 bge r1,r0,8006ee4 <== NOT EXECUTED 8006ed4: c8 01 58 00 sub r11,r0,r1 <== NOT EXECUTED 8006ed8: f8 00 19 b4 calli 800d5a8 <__errno> <== NOT EXECUTED 8006edc: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8006ee0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED } 8006ee4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006ee8: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8006eec: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8006ef0: c3 a0 00 00 ret <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 8006ef4: 34 0b 00 0e mvi r11,14 <== NOT EXECUTED 8006ef8: 44 60 ff f8 be r3,r0,8006ed8 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 8006efc: 28 61 00 00 lw r1,(r3+0) <== NOT EXECUTED 8006f00: 44 20 00 09 be r1,r0,8006f24 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 8006f04: 28 82 00 18 lw r2,(r4+24) <== NOT EXECUTED 8006f08: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8006f0c: 38 42 00 01 ori r2,r2,0x1 <== NOT EXECUTED 8006f10: 58 82 00 18 sw (r4+24),r2 <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 8006f14: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006f18: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8006f1c: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8006f20: c3 a0 00 00 ret <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 8006f24: 28 83 00 18 lw r3,(r4+24) <== NOT EXECUTED 8006f28: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 8006f2c: a0 62 10 00 and r2,r3,r2 <== NOT EXECUTED 8006f30: 58 82 00 18 sw (r4+24),r2 <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 8006f34: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006f38: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8006f3c: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8006f40: c3 a0 00 00 ret <== NOT EXECUTED 08006e3c : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 8006e3c: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8006e40: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8006e44: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8006e48: b8 20 28 00 mv r5,r1 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 8006e4c: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED 8006e50: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8006e54: b8 80 18 00 mv r3,r4 <== NOT EXECUTED 8006e58: 28 21 00 50 lw r1,(r1+80) <== NOT EXECUTED 8006e5c: b8 a0 20 00 mv r4,r5 <== NOT EXECUTED 8006e60: f8 00 0e ba calli 800a948 <== NOT EXECUTED 8006e64: b8 20 58 00 mv r11,r1 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 8006e68: 4c 20 00 07 bge r1,r0,8006e84 <== NOT EXECUTED 8006e6c: f8 00 19 cf calli 800d5a8 <__errno> <== NOT EXECUTED 8006e70: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 8006e74: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 8006e78: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8006e7c: b8 60 58 00 mv r11,r3 <== NOT EXECUTED 8006e80: e0 00 00 04 bi 8006e90 <== NOT EXECUTED 8006e84: 34 02 00 1f mvi r2,31 <== NOT EXECUTED 8006e88: fb ff e5 2a calli 8000330 <__ashrsi3> <== NOT EXECUTED 8006e8c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED } 8006e90: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 8006e94: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8006e98: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006e9c: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8006ea0: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8006ea4: c3 a0 00 00 ret <== NOT EXECUTED 08006fb4 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 8006fb4: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 8006fb8: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8006fbc: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8006fc0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 8006fc4: 28 2c 00 3c lw r12,(r1+60) <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 8006fc8: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 8006fcc: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED 8006fd0: f8 00 0e a0 calli 800aa50 <== NOT EXECUTED 8006fd4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if (err > 0) 8006fd8: 4c 01 00 0c bge r0,r1,8007008 <== NOT EXECUTED IMFS_update_atime(jnode); 8006fdc: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED 8006fe0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8006fe4: f8 00 02 c1 calli 8007ae8 <== NOT EXECUTED 8006fe8: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED 8006fec: 59 81 00 40 sw (r12+64),r1 <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 8006ff0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8006ff4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006ff8: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8006ffc: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8007000: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 8007004: c3 a0 00 00 ret <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 8007008: 44 20 ff fa be r1,r0,8006ff0 <== NOT EXECUTED 800700c: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 8007010: f8 00 19 66 calli 800d5a8 <__errno> <== NOT EXECUTED 8007014: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8007018: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 800701c: e3 ff ff f5 bi 8006ff0 <== NOT EXECUTED 08006f44 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 8006f44: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 8006f48: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8006f4c: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8006f50: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 8006f54: 28 2c 00 3c lw r12,(r1+60) <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 8006f58: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 8006f5c: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED 8006f60: f8 00 0f 32 calli 800ac28 <== NOT EXECUTED 8006f64: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if (err > 0) { 8006f68: 4c 01 00 0d bge r0,r1,8006f9c <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 8006f6c: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED 8006f70: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8006f74: f8 00 02 dd calli 8007ae8 <== NOT EXECUTED 8006f78: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED 8006f7c: 59 81 00 48 sw (r12+72),r1 <== NOT EXECUTED 8006f80: 59 81 00 44 sw (r12+68),r1 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 8006f84: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8006f88: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006f8c: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8006f90: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8006f94: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 8006f98: c3 a0 00 00 ret <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 8006f9c: 44 20 ff fa be r1,r0,8006f84 <== NOT EXECUTED 8006fa0: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 8006fa4: f8 00 19 81 calli 800d5a8 <__errno> <== NOT EXECUTED 8006fa8: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8006fac: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8006fb0: e3 ff ff f5 bi 8006f84 <== NOT EXECUTED 080070f8 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 80070f8: 37 9c ff f0 addi sp,sp,-16 80070fc: 5b 8b 00 10 sw (sp+16),r11 8007100: 5b 8c 00 0c sw (sp+12),r12 8007104: 5b 8d 00 08 sw (sp+8),r13 8007108: 5b 9d 00 04 sw (sp+4),ra 800710c: b8 20 58 00 mv r11,r1 8007110: b8 40 60 00 mv r12,r2 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 8007114: 44 20 00 28 be r1,r0,80071b4 if ( !name ) 8007118: 44 40 00 13 be r2,r0,8007164 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 800711c: 78 02 08 01 mvhi r2,0x801 8007120: 38 42 cc 8c ori r2,r2,0xcc8c 8007124: b9 80 08 00 mv r1,r12 8007128: f8 00 1d a0 calli 800e7a8 800712c: 44 20 00 07 be r1,r0,8007148 return directory; if ( !strcmp( name, dotdotname ) ) 8007130: 78 02 08 01 mvhi r2,0x801 8007134: 38 42 cc 90 ori r2,r2,0xcc90 8007138: b9 80 08 00 mv r1,r12 800713c: f8 00 1d 9b calli 800e7a8 8007140: 5c 20 00 11 bne r1,r0,8007184 return directory->Parent; 8007144: 29 6b 00 08 lw r11,(r11+8) <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 8007148: b9 60 08 00 mv r1,r11 800714c: 2b 9d 00 04 lw ra,(sp+4) 8007150: 2b 8b 00 10 lw r11,(sp+16) 8007154: 2b 8c 00 0c lw r12,(sp+12) 8007158: 2b 8d 00 08 lw r13,(sp+8) 800715c: 37 9c 00 10 addi sp,sp,16 8007160: c3 a0 00 00 ret if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 8007164: 34 0b 00 00 mvi r11,0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 8007168: b9 60 08 00 mv r1,r11 800716c: 2b 9d 00 04 lw ra,(sp+4) 8007170: 2b 8b 00 10 lw r11,(sp+16) 8007174: 2b 8c 00 0c lw r12,(sp+12) 8007178: 2b 8d 00 08 lw r13,(sp+8) 800717c: 37 9c 00 10 addi sp,sp,16 8007180: c3 a0 00 00 ret if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 8007184: 29 6d 00 50 lw r13,(r11+80) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8007188: 35 6b 00 54 addi r11,r11,84 800718c: 5d ab 00 04 bne r13,r11,800719c 8007190: e3 ff ff f5 bi 8007164 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 8007194: 29 ad 00 00 lw r13,(r13+0) if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 8007198: 45 ab ff f3 be r13,r11,8007164 !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 ) ) 800719c: b9 80 08 00 mv r1,r12 80071a0: 35 a2 00 0c addi r2,r13,12 80071a4: f8 00 1d 81 calli 800e7a8 80071a8: 5c 20 ff fb bne r1,r0,8007194 80071ac: b9 a0 58 00 mv r11,r13 80071b0: e3 ff ff e6 bi 8007148 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 80071b4: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 80071b8: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED 80071bc: 78 04 08 01 mvhi r4,0x801 <== NOT EXECUTED 80071c0: 38 21 cc 34 ori r1,r1,0xcc34 <== NOT EXECUTED 80071c4: 38 63 cc 94 ori r3,r3,0xcc94 <== NOT EXECUTED 80071c8: 38 84 cc 80 ori r4,r4,0xcc80 <== NOT EXECUTED 80071cc: 34 02 00 2a mvi r2,42 <== NOT EXECUTED 80071d0: f8 00 01 54 calli 8007720 <__assert_func> <== NOT EXECUTED 0800d6f8 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 800d6f8: 37 9c ff d8 addi sp,sp,-40 800d6fc: 5b 8b 00 14 sw (sp+20),r11 800d700: 5b 8c 00 10 sw (sp+16),r12 800d704: 5b 8d 00 0c sw (sp+12),r13 800d708: 5b 8e 00 08 sw (sp+8),r14 800d70c: 5b 9d 00 04 sw (sp+4),ra * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 800d710: 28 22 00 20 lw r2,(r1+32) /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; 800d714: 28 2b 00 1c lw r11,(r1+28) 800d718: 37 8d 00 18 addi r13,sp,24 loc = temp_mt_entry->mt_fs_root; 800d71c: 5b 82 00 1c sw (sp+28),r2 800d720: 28 22 00 24 lw r2,(r1+36) do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { 800d724: 34 0c 00 01 mvi r12,1 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 800d728: 5b 82 00 20 sw (sp+32),r2 800d72c: 28 22 00 28 lw r2,(r1+40) 800d730: 5b 82 00 24 sw (sp+36),r2 800d734: 28 22 00 2c lw r2,(r1+44) 800d738: 5b 82 00 28 sw (sp+40),r2 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 800d73c: 34 02 00 00 mvi r2,0 800d740: 58 22 00 1c sw (r1+28),r2 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 800d744: 5b 8b 00 18 sw (sp+24),r11 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 800d748: b9 a0 08 00 mv r1,r13 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; 800d74c: 5b 8b 00 18 sw (sp+24),r11 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 800d750: 29 6e 00 08 lw r14,(r11+8) loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 800d754: fb ff fc ba calli 800ca3c if ( jnode->type != IMFS_DIRECTORY ) { 800d758: 29 61 00 4c lw r1,(r11+76) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 800d75c: 35 63 00 54 addi r3,r11,84 800d760: 5c 2c 00 13 bne r1,r12,800d7ac 800d764: 29 61 00 50 lw r1,(r11+80) 800d768: 44 23 00 11 be r1,r3,800d7ac result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 800d76c: 45 60 00 08 be r11,r0,800d78c if ( jnode->type == IMFS_DIRECTORY ) { 800d770: 29 61 00 4c lw r1,(r11+76) 800d774: 5c 2c ff f5 bne r1,r12,800d748 800d778: 29 61 00 50 lw r1,(r11+80) 800d77c: 35 62 00 54 addi r2,r11,84 800d780: 44 22 ff f2 be r1,r2,800d748 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 800d784: b8 20 58 00 mv r11,r1 } } } while (jnode != NULL); 800d788: 5c 20 ff f0 bne r1,r0,800d748 800d78c: 34 01 00 00 mvi r1,0 return 0; } 800d790: 2b 9d 00 04 lw ra,(sp+4) 800d794: 2b 8b 00 14 lw r11,(sp+20) 800d798: 2b 8c 00 10 lw r12,(sp+16) 800d79c: 2b 8d 00 0c lw r13,(sp+12) 800d7a0: 2b 8e 00 08 lw r14,(sp+8) 800d7a4: 37 9c 00 28 addi sp,sp,40 800d7a8: c3 a0 00 00 ret result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 800d7ac: 34 01 00 00 mvi r1,0 800d7b0: b9 a0 10 00 mv r2,r13 800d7b4: fb ff d3 1b calli 8002420 if (result != 0) 800d7b8: 5c 20 00 03 bne r1,r0,800d7c4 800d7bc: b9 c0 58 00 mv r11,r14 800d7c0: e3 ff ff eb bi 800d76c if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 800d7c4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800d7c8: e3 ff ff f2 bi 800d790 <== NOT EXECUTED 08007310 : 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 ) { 8007310: 37 9c ff ec addi sp,sp,-20 8007314: 5b 8b 00 14 sw (sp+20),r11 8007318: 5b 8c 00 10 sw (sp+16),r12 800731c: 5b 8d 00 0c sw (sp+12),r13 8007320: 5b 8e 00 08 sw (sp+8),r14 8007324: 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, 8007328: 78 05 08 01 mvhi r5,0x801 800732c: 38 a5 e0 14 ori r5,r5,0xe014 8007330: 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 ) { 8007334: b8 20 58 00 mv r11,r1 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 8007338: 34 01 00 10 mvi r1,16 rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 800733c: b8 40 68 00 mv r13,r2 8007340: b8 60 70 00 mv r14,r3 8007344: b8 80 60 00 mv r12,r4 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 8007348: 44 c1 00 09 be r6,r1,800736c 800734c: 34 05 00 00 mvi r5,0 8007350: 34 01 00 20 mvi r1,32 8007354: 34 07 00 05 mvi r7,5 8007358: 34 a5 00 01 addi r5,r5,1 800735c: 44 c1 00 04 be r6,r1,800736c 8007360: b4 21 08 00 add r1,r1,r1 8007364: 5c a7 ff fd bne r5,r7,8007358 8007368: 34 06 00 80 mvi r6,128 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 800736c: 78 01 08 01 mvhi r1,0x801 8007370: 38 21 e6 a0 ori r1,r1,0xe6a0 8007374: 58 26 00 00 sw (r1+0),r6 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 8007378: f8 00 10 40 calli 800b478 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; 800737c: 78 05 08 01 mvhi r5,0x801 8007380: 38 a5 d0 88 ori r5,r5,0xd088 8007384: 28 a2 00 2c lw r2,(r5+44) /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 8007388: 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; 800738c: 59 6d 00 28 sw (r11+40),r13 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 8007390: 59 62 00 64 sw (r11+100),r2 8007394: 28 a2 00 00 lw r2,(r5+0) * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 8007398: 59 6c 00 24 sw (r11+36),r12 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 800739c: 34 01 00 01 mvi r1,1 * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 80073a0: 59 62 00 38 sw (r11+56),r2 80073a4: 28 a2 00 04 lw r2,(r5+4) 80073a8: 59 62 00 3c sw (r11+60),r2 80073ac: 28 a2 00 08 lw r2,(r5+8) 80073b0: 59 62 00 40 sw (r11+64),r2 80073b4: 28 a2 00 0c lw r2,(r5+12) 80073b8: 59 62 00 44 sw (r11+68),r2 80073bc: 28 a2 00 10 lw r2,(r5+16) 80073c0: 59 62 00 48 sw (r11+72),r2 80073c4: 28 a2 00 14 lw r2,(r5+20) 80073c8: 59 62 00 4c sw (r11+76),r2 80073cc: 28 a2 00 18 lw r2,(r5+24) 80073d0: 59 62 00 50 sw (r11+80),r2 80073d4: 28 a2 00 1c lw r2,(r5+28) 80073d8: 59 62 00 54 sw (r11+84),r2 80073dc: 28 a2 00 20 lw r2,(r5+32) 80073e0: 59 62 00 58 sw (r11+88),r2 80073e4: 28 a2 00 24 lw r2,(r5+36) 80073e8: 28 a5 00 28 lw r5,(r5+40) 80073ec: 59 62 00 5c sw (r11+92),r2 80073f0: 59 65 00 60 sw (r11+96),r5 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 80073f4: 34 02 00 0c mvi r2,12 80073f8: f8 00 00 dd calli 800776c if ( !fs_info ) { 80073fc: 44 20 00 11 be r1,r0,8007440 fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 8007400: 29 63 00 1c lw r3,(r11+28) /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 8007404: 34 02 00 01 mvi r2,1 8007408: 58 22 00 00 sw (r1+0),r2 fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 800740c: 59 61 00 34 sw (r11+52),r1 * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 8007410: 58 2c 00 08 sw (r1+8),r12 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 8007414: 58 2e 00 04 sw (r1+4),r14 fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 8007418: 58 62 00 38 sw (r3+56),r2 /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 800741c: f8 00 0d 4d calli 800a950 8007420: 34 01 00 00 mvi r1,0 return 0; } 8007424: 2b 9d 00 04 lw ra,(sp+4) 8007428: 2b 8b 00 14 lw r11,(sp+20) 800742c: 2b 8c 00 10 lw r12,(sp+16) 8007430: 2b 8d 00 0c lw r13,(sp+12) 8007434: 2b 8e 00 08 lw r14,(sp+8) 8007438: 37 9c 00 14 addi sp,sp,20 800743c: c3 a0 00 00 ret /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); 8007440: 29 61 00 1c lw r1,(r11+28) <== NOT EXECUTED 8007444: f8 00 01 21 calli 80078c8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 8007448: f8 00 18 58 calli 800d5a8 <__errno> <== NOT EXECUTED 800744c: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8007450: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8007454: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8007458: e3 ff ff f3 bi 8007424 <== NOT EXECUTED 08002050 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 8002050: 37 9c ff a8 addi sp,sp,-88 8002054: 5b 8b 00 10 sw (sp+16),r11 8002058: 5b 8c 00 0c sw (sp+12),r12 800205c: 5b 8d 00 08 sw (sp+8),r13 8002060: 5b 9d 00 04 sw (sp+4),ra int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 8002064: 28 24 00 00 lw r4,(r1+0) int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 8002068: b8 60 58 00 mv r11,r3 /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 800206c: 34 03 00 07 mvi r3,7 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 8002070: 5b 84 00 38 sw (sp+56),r4 if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 8002074: 2c 84 00 34 lhu r4,(r4+52) int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 8002078: b8 40 68 00 mv r13,r2 /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 800207c: 50 64 00 06 bgeu r3,r4,8002094 rtems_set_errno_and_return_minus_one( EMLINK ); 8002080: f8 00 47 fb calli 801406c <__errno> 8002084: 34 02 00 1f mvi r2,31 8002088: 58 22 00 00 sw (r1+0),r2 800208c: 34 01 ff ff mvi r1,-1 8002090: e0 00 00 1b bi 80020fc /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 8002094: b9 60 08 00 mv r1,r11 8002098: f8 00 4c a6 calli 8015330 800209c: 37 8c 00 14 addi r12,sp,20 80020a0: b8 20 10 00 mv r2,r1 80020a4: b9 80 18 00 mv r3,r12 80020a8: 37 84 00 58 addi r4,sp,88 80020ac: b9 60 08 00 mv r1,r11 80020b0: f8 00 2d fe calli 800d8a8 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 80020b4: b9 a0 08 00 mv r1,r13 80020b8: b9 80 18 00 mv r3,r12 80020bc: 34 02 00 03 mvi r2,3 80020c0: 38 04 a1 ff mvu r4,0xa1ff 80020c4: 37 85 00 38 addi r5,sp,56 80020c8: f8 00 2a 03 calli 800c8d4 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 80020cc: 44 20 00 12 be r1,r0,8002114 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 80020d0: 2b 83 00 38 lw r3,(sp+56) IMFS_update_ctime( info.hard_link.link_node ); 80020d4: 34 02 00 00 mvi r2,0 80020d8: 37 81 00 50 addi r1,sp,80 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 80020dc: 2c 64 00 34 lhu r4,(r3+52) 80020e0: 34 84 00 01 addi r4,r4,1 80020e4: 0c 64 00 34 sh (r3+52),r4 IMFS_update_ctime( info.hard_link.link_node ); 80020e8: f8 00 02 e2 calli 8002c70 80020ec: 2b 82 00 38 lw r2,(sp+56) 80020f0: 2b 83 00 50 lw r3,(sp+80) 80020f4: 34 01 00 00 mvi r1,0 80020f8: 58 43 00 48 sw (r2+72),r3 return 0; } 80020fc: 2b 9d 00 04 lw ra,(sp+4) 8002100: 2b 8b 00 10 lw r11,(sp+16) 8002104: 2b 8c 00 0c lw r12,(sp+12) 8002108: 2b 8d 00 08 lw r13,(sp+8) 800210c: 37 9c 00 58 addi sp,sp,88 8002110: c3 a0 00 00 ret ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 8002114: f8 00 47 d6 calli 801406c <__errno> <== NOT EXECUTED 8002118: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 800211c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8002120: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8002124: e3 ff ff f6 bi 80020fc <== NOT EXECUTED 08011984 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 8011984: 37 9c ff f4 addi sp,sp,-12 8011988: 5b 8b 00 0c sw (sp+12),r11 801198c: 5b 8c 00 08 sw (sp+8),r12 8011990: 5b 9d 00 04 sw (sp+4),ra block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 8011994: 44 20 00 16 be r1,r0,80119ec if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 8011998: 28 24 00 4c lw r4,(r1+76) 801199c: 34 03 00 05 mvi r3,5 80119a0: 5c 83 00 1b bne r4,r3,8011a0c 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 ); 80119a4: 34 03 00 01 mvi r3,1 80119a8: fb ff fe 3f calli 80112a4 if ( *block_entry_ptr ) 80119ac: 28 2b 00 00 lw r11,(r1+0) assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 80119b0: b8 20 60 00 mv r12,r1 if ( *block_entry_ptr ) 80119b4: 34 01 00 00 mvi r1,0 80119b8: 45 61 00 06 be r11,r1,80119d0 if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } 80119bc: 2b 9d 00 04 lw ra,(sp+4) 80119c0: 2b 8b 00 0c lw r11,(sp+12) 80119c4: 2b 8c 00 08 lw r12,(sp+8) 80119c8: 37 9c 00 0c addi sp,sp,12 80119cc: c3 a0 00 00 ret #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 80119d0: fb ff fe 25 calli 8011264 80119d4: b8 20 10 00 mv r2,r1 if ( !memory ) 80119d8: 34 01 00 01 mvi r1,1 80119dc: 44 4b ff f8 be r2,r11,80119bc return 1; *block_entry_ptr = memory; 80119e0: 59 82 00 00 sw (r12+0),r2 80119e4: b9 60 08 00 mv r1,r11 return 0; 80119e8: e3 ff ff f5 bi 80119bc ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 80119ec: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80119f0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80119f4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80119f8: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 80119fc: 38 63 4a 64 ori r3,r3,0x4a64 <== NOT EXECUTED 8011a00: 38 84 49 28 ori r4,r4,0x4928 <== NOT EXECUTED 8011a04: 34 02 01 69 mvi r2,361 <== NOT EXECUTED 8011a08: fb ff f0 63 calli 800db94 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 8011a0c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011a10: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011a14: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011a18: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 8011a1c: 38 63 4a 64 ori r3,r3,0x4a64 <== NOT EXECUTED 8011a20: 38 84 49 34 ori r4,r4,0x4934 <== NOT EXECUTED 8011a24: 34 02 01 6d mvi r2,365 <== NOT EXECUTED 8011a28: fb ff f0 5b calli 800db94 <__assert_func> <== NOT EXECUTED 08011a2c : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 8011a2c: 37 9c ff e0 addi sp,sp,-32 8011a30: 5b 8b 00 20 sw (sp+32),r11 8011a34: 5b 8c 00 1c sw (sp+28),r12 8011a38: 5b 8d 00 18 sw (sp+24),r13 8011a3c: 5b 8e 00 14 sw (sp+20),r14 8011a40: 5b 8f 00 10 sw (sp+16),r15 8011a44: 5b 90 00 0c sw (sp+12),r16 8011a48: 5b 91 00 08 sw (sp+8),r17 8011a4c: 5b 9d 00 04 sw (sp+4),ra 8011a50: b8 20 60 00 mv r12,r1 8011a54: b8 40 78 00 mv r15,r2 /* * Perform internal consistency checks */ assert( the_jnode ); 8011a58: 44 20 00 59 be r1,r0,8011bbc if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 8011a5c: 28 22 00 4c lw r2,(r1+76) 8011a60: 34 01 00 05 mvi r1,5 8011a64: 5c 41 00 4e bne r2,r1,8011b9c if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 8011a68: 78 01 08 02 mvhi r1,0x802 8011a6c: 38 21 66 d8 ori r1,r1,0x66d8 8011a70: 28 2b 00 00 lw r11,(r1+0) 8011a74: 34 02 00 02 mvi r2,2 8011a78: b9 60 08 00 mv r1,r11 8011a7c: fb ff bc 82 calli 8000c84 <__lshrsi3> 8011a80: b8 20 10 00 mv r2,r1 8011a84: b8 20 68 00 mv r13,r1 8011a88: 34 21 00 01 addi r1,r1,1 8011a8c: f8 00 45 39 calli 8022f70 <__mulsi3> 8011a90: b9 a0 10 00 mv r2,r13 8011a94: 34 21 00 01 addi r1,r1,1 8011a98: f8 00 45 36 calli 8022f70 <__mulsi3> 8011a9c: 34 21 ff ff addi r1,r1,-1 8011aa0: b9 60 10 00 mv r2,r11 8011aa4: f8 00 45 33 calli 8022f70 <__mulsi3> 8011aa8: 54 2f 00 06 bgu r1,r15,8011ac0 rtems_set_errno_and_return_minus_one( EINVAL ); 8011aac: f8 00 09 70 calli 801406c <__errno> <== NOT EXECUTED 8011ab0: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8011ab4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8011ab8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8011abc: e0 00 00 0a bi 8011ae4 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 8011ac0: b9 e0 08 00 mv r1,r15 8011ac4: 34 02 00 1f mvi r2,31 8011ac8: fb ff bc 97 calli 8000d24 <__ashrsi3> 8011acc: 29 8d 00 50 lw r13,(r12+80) 8011ad0: b8 20 80 00 mv r16,r1 8011ad4: 29 91 00 54 lw r17,(r12+84) 8011ad8: 48 2d 00 0d bg r1,r13,8011b0c 8011adc: 44 2d 00 2e be r1,r13,8011b94 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 8011ae0: 34 01 00 00 mvi r1,0 return 0; } 8011ae4: 2b 9d 00 04 lw ra,(sp+4) 8011ae8: 2b 8b 00 20 lw r11,(sp+32) 8011aec: 2b 8c 00 1c lw r12,(sp+28) 8011af0: 2b 8d 00 18 lw r13,(sp+24) 8011af4: 2b 8e 00 14 lw r14,(sp+20) 8011af8: 2b 8f 00 10 lw r15,(sp+16) 8011afc: 2b 90 00 0c lw r16,(sp+12) 8011b00: 2b 91 00 08 lw r17,(sp+8) 8011b04: 37 9c 00 20 addi sp,sp,32 8011b08: c3 a0 00 00 ret /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 8011b0c: b9 60 10 00 mv r2,r11 8011b10: b9 e0 08 00 mv r1,r15 8011b14: f8 00 45 37 calli 8022ff0 <__divsi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 8011b18: 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; 8011b1c: b8 20 70 00 mv r14,r1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 8011b20: b9 60 08 00 mv r1,r11 8011b24: fb ff bc 80 calli 8000d24 <__ashrsi3> 8011b28: b8 20 18 00 mv r3,r1 8011b2c: ba 20 10 00 mv r2,r17 8011b30: b9 a0 08 00 mv r1,r13 8011b34: b9 60 20 00 mv r4,r11 8011b38: f8 00 2f dd calli 801daac <__divdi3> 8011b3c: b8 40 68 00 mv r13,r2 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 8011b40: 54 4e 00 08 bgu r2,r14,8011b60 8011b44: b8 40 58 00 mv r11,r2 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 8011b48: b9 80 08 00 mv r1,r12 8011b4c: b9 60 10 00 mv r2,r11 8011b50: fb ff ff 8d calli 8011984 8011b54: 5c 20 00 0a bne r1,r0,8011b7c /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 8011b58: 35 6b 00 01 addi r11,r11,1 8011b5c: 51 cb ff fb bgeu r14,r11,8011b48 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 8011b60: 59 8f 00 54 sw (r12+84),r15 8011b64: 59 90 00 50 sw (r12+80),r16 8011b68: e3 ff ff de bi 8011ae0 */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 8011b6c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8011b70: b9 80 08 00 mv r1,r12 <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 8011b74: 35 6b ff ff addi r11,r11,-1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 8011b78: fb ff fe a2 calli 8011600 <== 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-- ) { 8011b7c: 51 6d ff fc bgeu r11,r13,8011b6c <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 8011b80: f8 00 09 3b calli 801406c <__errno> <== NOT EXECUTED 8011b84: 34 02 00 1c mvi r2,28 <== NOT EXECUTED 8011b88: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8011b8c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8011b90: e3 ff ff d5 bi 8011ae4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 8011b94: 55 f1 ff de bgu r15,r17,8011b0c 8011b98: e3 ff ff d2 bi 8011ae0 assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 8011b9c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011ba0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011ba4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011ba8: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 8011bac: 38 63 4a 7c ori r3,r3,0x4a7c <== NOT EXECUTED 8011bb0: 38 84 49 34 ori r4,r4,0x4934 <== NOT EXECUTED 8011bb4: 34 02 01 35 mvi r2,309 <== NOT EXECUTED 8011bb8: fb ff ef f7 calli 800db94 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 8011bbc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011bc0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011bc4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011bc8: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 8011bcc: 38 63 4a 7c ori r3,r3,0x4a7c <== NOT EXECUTED 8011bd0: 38 84 49 28 ori r4,r4,0x4928 <== NOT EXECUTED 8011bd4: 34 02 01 31 mvi r2,305 <== NOT EXECUTED 8011bd8: fb ff ef ef calli 800db94 <__assert_func> <== NOT EXECUTED 080112a4 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 80112a4: 37 9c ff e4 addi sp,sp,-28 80112a8: 5b 8b 00 1c sw (sp+28),r11 80112ac: 5b 8c 00 18 sw (sp+24),r12 80112b0: 5b 8d 00 14 sw (sp+20),r13 80112b4: 5b 8e 00 10 sw (sp+16),r14 80112b8: 5b 8f 00 0c sw (sp+12),r15 80112bc: 5b 90 00 08 sw (sp+8),r16 80112c0: 5b 9d 00 04 sw (sp+4),ra 80112c4: b8 20 58 00 mv r11,r1 80112c8: b8 40 60 00 mv r12,r2 80112cc: b8 60 70 00 mv r14,r3 /* * Perform internal consistency checks */ assert( the_jnode ); 80112d0: 44 20 00 88 be r1,r0,80114f0 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 80112d4: 28 22 00 4c lw r2,(r1+76) 80112d8: 34 01 00 05 mvi r1,5 80112dc: 5c 41 00 8d bne r2,r1,8011510 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 80112e0: 78 01 08 02 mvhi r1,0x802 80112e4: 38 21 66 d8 ori r1,r1,0x66d8 80112e8: 28 21 00 00 lw r1,(r1+0) 80112ec: 34 02 00 02 mvi r2,2 80112f0: fb ff be 65 calli 8000c84 <__lshrsi3> 80112f4: b8 20 68 00 mv r13,r1 80112f8: 34 21 ff ff addi r1,r1,-1 80112fc: 55 81 00 09 bgu r12,r1,8011320 #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 8011300: 29 6d 00 58 lw r13,(r11+88) if ( malloc_it ) { 8011304: 45 c0 00 5d be r14,r0,8011478 if ( !p ) { 8011308: 45 a0 00 5f be r13,r0,8011484 } if ( !p ) return 0; return &info->indirect[ my_block ]; 801130c: b9 80 08 00 mv r1,r12 8011310: 34 02 00 02 mvi r2,2 8011314: fb ff be 34 calli 8000be4 <__ashlsi3> 8011318: b5 a1 08 00 add r1,r13,r1 801131c: e0 00 00 1d bi 8011390 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 8011320: 35 a1 00 01 addi r1,r13,1 <== NOT EXECUTED 8011324: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8011328: f8 00 47 12 calli 8022f70 <__mulsi3> <== NOT EXECUTED 801132c: b8 20 78 00 mv r15,r1 <== NOT EXECUTED 8011330: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 8011334: 55 81 00 20 bgu r12,r1,80113b4 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 8011338: c9 8d 60 00 sub r12,r12,r13 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 801133c: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8011340: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8011344: f8 00 47 9a calli 80231ac <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 8011348: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 801134c: b8 20 78 00 mv r15,r1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 8011350: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8011354: f8 00 47 86 calli 802316c <__udivsi3> <== NOT EXECUTED 8011358: b8 20 68 00 mv r13,r1 <== NOT EXECUTED p = info->doubly_indirect; 801135c: 29 6c 00 5c lw r12,(r11+92) <== NOT EXECUTED if ( malloc_it ) { 8011360: 45 c0 00 3e be r14,r0,8011458 <== NOT EXECUTED if ( !p ) { 8011364: 45 80 00 4d be r12,r0,8011498 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 8011368: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 801136c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8011370: fb ff be 1d calli 8000be4 <__ashlsi3> <== NOT EXECUTED 8011374: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED 8011378: 29 8b 00 00 lw r11,(r12+0) <== NOT EXECUTED if ( !p1 ) { 801137c: 45 60 00 32 be r11,r0,8011444 <== NOT EXECUTED p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 8011380: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8011384: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8011388: fb ff be 17 calli 8000be4 <__ashlsi3> <== NOT EXECUTED 801138c: b5 61 08 00 add r1,r11,r1 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 8011390: 2b 9d 00 04 lw ra,(sp+4) 8011394: 2b 8b 00 1c lw r11,(sp+28) 8011398: 2b 8c 00 18 lw r12,(sp+24) 801139c: 2b 8d 00 14 lw r13,(sp+20) 80113a0: 2b 8e 00 10 lw r14,(sp+16) 80113a4: 2b 8f 00 0c lw r15,(sp+12) 80113a8: 2b 90 00 08 lw r16,(sp+8) 80113ac: 37 9c 00 1c addi sp,sp,28 80113b0: c3 a0 00 00 ret #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 80113b4: 35 e1 00 01 addi r1,r15,1 <== NOT EXECUTED 80113b8: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 80113bc: f8 00 46 ed calli 8022f70 <__mulsi3> <== NOT EXECUTED 80113c0: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 80113c4: 55 81 00 2b bgu r12,r1,8011470 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 80113c8: c9 8f 60 00 sub r12,r12,r15 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 80113cc: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 80113d0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80113d4: f8 00 47 76 calli 80231ac <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 80113d8: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 80113dc: b8 20 78 00 mv r15,r1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 80113e0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80113e4: f8 00 47 62 calli 802316c <__udivsi3> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 80113e8: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 80113ec: b8 20 60 00 mv r12,r1 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 80113f0: f8 00 47 5f calli 802316c <__udivsi3> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 80113f4: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 80113f8: b8 20 80 00 mv r16,r1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 80113fc: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8011400: f8 00 47 6b calli 80231ac <__umodsi3> <== NOT EXECUTED 8011404: b8 20 68 00 mv r13,r1 <== NOT EXECUTED p = info->triply_indirect; 8011408: 29 6c 00 60 lw r12,(r11+96) <== NOT EXECUTED if ( malloc_it ) { 801140c: 45 c0 00 28 be r14,r0,80114ac <== NOT EXECUTED if ( !p ) { 8011410: 45 80 00 48 be r12,r0,8011530 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 8011414: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 8011418: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 801141c: fb ff bd f2 calli 8000be4 <__ashlsi3> <== NOT EXECUTED 8011420: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED 8011424: 29 8b 00 00 lw r11,(r12+0) <== NOT EXECUTED if ( !p1 ) { 8011428: 45 60 00 47 be r11,r0,8011544 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 801142c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8011430: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8011434: fb ff bd ec calli 8000be4 <__ashlsi3> <== NOT EXECUTED 8011438: b5 61 60 00 add r12,r11,r1 <== NOT EXECUTED 801143c: 29 8b 00 00 lw r11,(r12+0) <== NOT EXECUTED if ( !p2 ) { 8011440: 5d 60 ff d0 bne r11,r0,8011380 <== NOT EXECUTED p2 = memfile_alloc_block(); 8011444: fb ff ff 88 calli 8011264 <== NOT EXECUTED 8011448: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if ( !p2 ) 801144c: 44 20 00 09 be r1,r0,8011470 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 8011450: 59 81 00 00 sw (r12+0),r1 <== NOT EXECUTED 8011454: e3 ff ff cb bi 8011380 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 8011458: 45 8e 00 06 be r12,r14,8011470 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 801145c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8011460: fb ff bd e1 calli 8000be4 <__ashlsi3> <== NOT EXECUTED 8011464: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 8011468: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED if ( !p ) 801146c: 5d 60 ff c5 bne r11,r0,8011380 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 8011470: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8011474: e3 ff ff c7 bi 8011390 <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 8011478: 5d ae ff a5 bne r13,r14,801130c p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 801147c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8011480: e3 ff ff c4 bi 8011390 <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 8011484: fb ff ff 78 calli 8011264 8011488: b8 20 68 00 mv r13,r1 if ( !p ) 801148c: 44 20 ff f9 be r1,r0,8011470 return 0; info->indirect = p; 8011490: 59 61 00 58 sw (r11+88),r1 8011494: e3 ff ff 9e bi 801130c p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 8011498: fb ff ff 73 calli 8011264 <== NOT EXECUTED 801149c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED if ( !p ) 80114a0: 44 20 ff f4 be r1,r0,8011470 <== NOT EXECUTED return 0; info->doubly_indirect = p; 80114a4: 59 61 00 5c sw (r11+92),r1 <== NOT EXECUTED 80114a8: e3 ff ff b0 bi 8011368 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 80114ac: 45 8e ff f1 be r12,r14,8011470 <== 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 ]; 80114b0: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 80114b4: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80114b8: fb ff bd cb calli 8000be4 <__ashlsi3> <== NOT EXECUTED 80114bc: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 80114c0: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED if ( !p1 ) 80114c4: 45 60 ff eb be r11,r0,8011470 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 80114c8: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80114cc: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80114d0: fb ff bd c5 calli 8000be4 <__ashlsi3> <== NOT EXECUTED 80114d4: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED 80114d8: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80114dc: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 80114e0: fb ff bd c1 calli 8000be4 <__ashlsi3> <== NOT EXECUTED 80114e4: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 80114e8: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 80114ec: e3 ff ff a9 bi 8011390 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 80114f0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80114f4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80114f8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80114fc: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 8011500: 38 63 49 cc ori r3,r3,0x49cc <== NOT EXECUTED 8011504: 38 84 49 28 ori r4,r4,0x4928 <== NOT EXECUTED 8011508: 34 02 03 88 mvi r2,904 <== NOT EXECUTED 801150c: fb ff f1 a2 calli 800db94 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 8011510: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011514: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011518: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 801151c: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 8011520: 38 63 49 cc ori r3,r3,0x49cc <== NOT EXECUTED 8011524: 38 84 49 34 ori r4,r4,0x4934 <== NOT EXECUTED 8011528: 34 02 03 8c mvi r2,908 <== NOT EXECUTED 801152c: fb ff f1 9a calli 800db94 <__assert_func> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 8011530: fb ff ff 4d calli 8011264 <== NOT EXECUTED 8011534: b8 20 60 00 mv r12,r1 <== NOT EXECUTED if ( !p ) 8011538: 44 20 ff ce be r1,r0,8011470 <== NOT EXECUTED return 0; info->triply_indirect = p; 801153c: 59 61 00 60 sw (r11+96),r1 <== NOT EXECUTED 8011540: e3 ff ff b5 bi 8011414 <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 8011544: fb ff ff 48 calli 8011264 <== NOT EXECUTED 8011548: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if ( !p1 ) 801154c: 44 20 ff c9 be r1,r0,8011470 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 8011550: 59 81 00 00 sw (r12+0),r1 <== NOT EXECUTED 8011554: e3 ff ff b6 bi 801142c <== NOT EXECUTED 080120f8 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 80120f8: 37 9c ff cc addi sp,sp,-52 80120fc: 5b 8b 00 28 sw (sp+40),r11 8012100: 5b 8c 00 24 sw (sp+36),r12 8012104: 5b 8d 00 20 sw (sp+32),r13 8012108: 5b 8e 00 1c sw (sp+28),r14 801210c: 5b 8f 00 18 sw (sp+24),r15 8012110: 5b 90 00 14 sw (sp+20),r16 8012114: 5b 91 00 10 sw (sp+16),r17 8012118: 5b 92 00 0c sw (sp+12),r18 801211c: 5b 93 00 08 sw (sp+8),r19 8012120: 5b 9d 00 04 sw (sp+4),ra 8012124: b8 20 80 00 mv r16,r1 8012128: b8 40 68 00 mv r13,r2 801212c: b8 60 90 00 mv r18,r3 /* * Perform internal consistency checks */ assert( the_jnode ); 8012130: 44 20 00 a5 be r1,r0,80123c4 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 8012134: 28 21 00 4c lw r1,(r1+76) 8012138: 34 03 00 01 mvi r3,1 801213c: 34 22 ff fb addi r2,r1,-5 8012140: 50 62 00 09 bgeu r3,r2,8012164 8012144: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8012148: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 801214c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8012150: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 8012154: 38 63 4a 00 ori r3,r3,0x4a00 <== NOT EXECUTED 8012158: 38 84 49 78 ori r4,r4,0x4978 <== NOT EXECUTED 801215c: 34 02 02 51 mvi r2,593 <== NOT EXECUTED 8012160: fb ff ee 8d calli 800db94 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 8012164: 46 40 00 88 be r18,r0,8012384 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 8012168: 44 80 00 72 be r4,r0,8012330 /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 801216c: 34 02 00 06 mvi r2,6 8012170: 44 22 00 56 be r1,r2,80122c8 * 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 ) 8012174: 2a 01 00 50 lw r1,(r16+80) 8012178: 2a 0c 00 54 lw r12,(r16+84) 801217c: b4 8d 10 00 add r2,r4,r13 8012180: 48 01 00 04 bg r0,r1,8012190 8012184: 44 01 00 65 be r0,r1,8012318 8012188: b8 80 60 00 mv r12,r4 <== NOT EXECUTED 801218c: e0 00 00 02 bi 8012194 <== NOT EXECUTED my_length = the_jnode->info.file.size - start; 8012190: c9 8d 60 00 sub r12,r12,r13 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 8012194: 78 0f 08 02 mvhi r15,0x802 8012198: 39 ef 66 d8 ori r15,r15,0x66d8 801219c: 29 eb 00 00 lw r11,(r15+0) 80121a0: b9 a0 08 00 mv r1,r13 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 80121a4: ba 40 70 00 mv r14,r18 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 80121a8: b9 60 10 00 mv r2,r11 80121ac: f8 00 43 c4 calli 80230bc <__modsi3> 80121b0: b8 20 98 00 mv r19,r1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 80121b4: b9 60 10 00 mv r2,r11 80121b8: b9 a0 08 00 mv r1,r13 80121bc: f8 00 43 8d calli 8022ff0 <__divsi3> 80121c0: b8 20 68 00 mv r13,r1 if ( start_offset ) { 80121c4: ba 60 88 00 mv r17,r19 80121c8: 46 60 00 13 be r19,r0,8012214 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 ); 80121cc: ba 00 08 00 mv r1,r16 80121d0: b9 a0 10 00 mv r2,r13 80121d4: 34 03 00 00 mvi r3,0 80121d8: fb ff fc 33 calli 80112a4 assert( block_ptr ); 80121dc: 44 20 00 72 be r1,r0,80123a4 */ 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; 80121e0: c9 73 58 00 sub r11,r11,r19 80121e4: b9 80 88 00 mv r17,r12 80121e8: 51 6c 00 02 bgeu r11,r12,80121f0 80121ec: b9 60 88 00 mv r17,r11 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 80121f0: 28 22 00 00 lw r2,(r1+0) 80121f4: ba 20 18 00 mv r3,r17 80121f8: ba 40 08 00 mv r1,r18 80121fc: b4 53 10 00 add r2,r2,r19 8012200: f8 00 0a 41 calli 8014b04 dest += to_copy; block++; my_length -= to_copy; 8012204: 29 eb 00 00 lw r11,(r15+0) block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); dest += to_copy; 8012208: b6 51 70 00 add r14,r18,r17 block++; 801220c: 35 ad 00 01 addi r13,r13,1 my_length -= to_copy; 8012210: c9 91 60 00 sub r12,r12,r17 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 8012214: 55 6c 00 10 bgu r11,r12,8012254 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 8012218: ba 00 08 00 mv r1,r16 801221c: b9 a0 10 00 mv r2,r13 8012220: 34 03 00 00 mvi r3,0 8012224: fb ff fc 20 calli 80112a4 assert( block_ptr ); 8012228: 44 20 00 47 be r1,r0,8012344 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 801222c: 28 22 00 00 lw r2,(r1+0) 8012230: b9 60 18 00 mv r3,r11 8012234: b9 c0 08 00 mv r1,r14 8012238: f8 00 0a 33 calli 8014b04 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 801223c: 29 e1 00 00 lw r1,(r15+0) if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; 8012240: c9 8b 60 00 sub r12,r12,r11 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; 8012244: b5 cb 70 00 add r14,r14,r11 block++; 8012248: 35 ad 00 01 addi r13,r13,1 my_length -= to_copy; copied += to_copy; 801224c: b6 2b 88 00 add r17,r17,r11 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 8012250: 51 81 ff f2 bgeu r12,r1,8012218 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 8012254: 45 80 00 0b be r12,r0,8012280 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 8012258: b9 a0 10 00 mv r2,r13 801225c: ba 00 08 00 mv r1,r16 8012260: 34 03 00 00 mvi r3,0 8012264: fb ff fc 10 calli 80112a4 assert( block_ptr ); 8012268: 44 20 00 3f be r1,r0,8012364 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 801226c: 28 22 00 00 lw r2,(r1+0) 8012270: b9 80 18 00 mv r3,r12 8012274: b9 c0 08 00 mv r1,r14 8012278: f8 00 0a 23 calli 8014b04 copied += my_length; 801227c: b6 2c 88 00 add r17,r17,r12 } IMFS_update_atime( the_jnode ); 8012280: 37 81 00 30 addi r1,sp,48 8012284: 34 02 00 00 mvi r2,0 8012288: fb ff c2 7a calli 8002c70 801228c: 2b 81 00 30 lw r1,(sp+48) 8012290: 5a 01 00 40 sw (r16+64),r1 return copied; 8012294: ba 20 08 00 mv r1,r17 } 8012298: 2b 9d 00 04 lw ra,(sp+4) 801229c: 2b 8b 00 28 lw r11,(sp+40) 80122a0: 2b 8c 00 24 lw r12,(sp+36) 80122a4: 2b 8d 00 20 lw r13,(sp+32) 80122a8: 2b 8e 00 1c lw r14,(sp+28) 80122ac: 2b 8f 00 18 lw r15,(sp+24) 80122b0: 2b 90 00 14 lw r16,(sp+20) 80122b4: 2b 91 00 10 lw r17,(sp+16) 80122b8: 2b 92 00 0c lw r18,(sp+12) 80122bc: 2b 93 00 08 lw r19,(sp+8) 80122c0: 37 9c 00 34 addi sp,sp,52 80122c4: c3 a0 00 00 ret if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 80122c8: 2a 0b 00 54 lw r11,(r16+84) <== NOT EXECUTED 80122cc: 2a 0c 00 50 lw r12,(r16+80) <== NOT EXECUTED 80122d0: 34 02 00 1f mvi r2,31 <== NOT EXECUTED 80122d4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80122d8: 5b 84 00 2c sw (sp+44),r4 <== NOT EXECUTED 80122dc: c9 6d 88 00 sub r17,r11,r13 <== NOT EXECUTED 80122e0: fb ff ba 91 calli 8000d24 <__ashrsi3> <== NOT EXECUTED 80122e4: f6 2b 10 00 cmpgu r2,r17,r11 <== NOT EXECUTED 80122e8: c9 81 08 00 sub r1,r12,r1 <== NOT EXECUTED 80122ec: c8 22 08 00 sub r1,r1,r2 <== NOT EXECUTED 80122f0: 2b 84 00 2c lw r4,(sp+44) <== NOT EXECUTED * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 80122f4: 2a 02 00 58 lw r2,(r16+88) <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 80122f8: 48 01 00 03 bg r0,r1,8012304 <== NOT EXECUTED 80122fc: 44 01 00 0a be r0,r1,8012324 <== NOT EXECUTED 8012300: b8 80 88 00 mv r17,r4 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 8012304: b4 4d 10 00 add r2,r2,r13 <== NOT EXECUTED 8012308: ba 40 08 00 mv r1,r18 <== NOT EXECUTED 801230c: ba 20 18 00 mv r3,r17 <== NOT EXECUTED 8012310: f8 00 09 fd calli 8014b04 <== NOT EXECUTED 8012314: e3 ff ff db bi 8012280 <== 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 ) 8012318: 54 4c ff 9e bgu r2,r12,8012190 801231c: b8 80 60 00 mv r12,r4 <== NOT EXECUTED 8012320: e3 ff ff 9d bi 8012194 <== NOT EXECUTED if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 8012324: 54 91 ff f8 bgu r4,r17,8012304 <== NOT EXECUTED 8012328: b8 80 88 00 mv r17,r4 <== NOT EXECUTED 801232c: e3 ff ff f6 bi 8012304 <== NOT EXECUTED * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 8012330: f8 00 07 4f calli 801406c <__errno> <== NOT EXECUTED 8012334: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8012338: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801233c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8012340: e3 ff ff d6 bi 8012298 <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 8012344: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8012348: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 801234c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8012350: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 8012354: 38 63 4a 00 ori r3,r3,0x4a00 <== NOT EXECUTED 8012358: 38 84 49 64 ori r4,r4,0x4964 <== NOT EXECUTED 801235c: 34 02 02 a7 mvi r2,679 <== NOT EXECUTED 8012360: fb ff ee 0d calli 800db94 <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 8012364: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8012368: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 801236c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8012370: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 8012374: 38 63 4a 00 ori r3,r3,0x4a00 <== NOT EXECUTED 8012378: 38 84 49 64 ori r4,r4,0x4964 <== NOT EXECUTED 801237c: 34 02 02 b9 mvi r2,697 <== NOT EXECUTED 8012380: fb ff ee 05 calli 800db94 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 8012384: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8012388: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 801238c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8012390: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 8012394: 38 63 4a 00 ori r3,r3,0x4a00 <== NOT EXECUTED 8012398: 38 84 49 c4 ori r4,r4,0x49c4 <== NOT EXECUTED 801239c: 34 02 02 5a mvi r2,602 <== NOT EXECUTED 80123a0: fb ff ed fd calli 800db94 <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 80123a4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80123a8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80123ac: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80123b0: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 80123b4: 38 63 4a 00 ori r3,r3,0x4a00 <== NOT EXECUTED 80123b8: 38 84 49 64 ori r4,r4,0x4964 <== NOT EXECUTED 80123bc: 34 02 02 96 mvi r2,662 <== NOT EXECUTED 80123c0: fb ff ed f5 calli 800db94 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 80123c4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80123c8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80123cc: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80123d0: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 80123d4: 38 63 4a 00 ori r3,r3,0x4a00 <== NOT EXECUTED 80123d8: 38 84 49 28 ori r4,r4,0x4928 <== NOT EXECUTED 80123dc: 34 02 02 4c mvi r2,588 <== NOT EXECUTED 80123e0: fb ff ed ed calli 800db94 <__assert_func> <== NOT EXECUTED 08011658 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 8011658: 37 9c ff d8 addi sp,sp,-40 801165c: 5b 8b 00 28 sw (sp+40),r11 8011660: 5b 8c 00 24 sw (sp+36),r12 8011664: 5b 8d 00 20 sw (sp+32),r13 8011668: 5b 8e 00 1c sw (sp+28),r14 801166c: 5b 8f 00 18 sw (sp+24),r15 8011670: 5b 90 00 14 sw (sp+20),r16 8011674: 5b 91 00 10 sw (sp+16),r17 8011678: 5b 92 00 0c sw (sp+12),r18 801167c: 5b 93 00 08 sw (sp+8),r19 8011680: 5b 9d 00 04 sw (sp+4),ra 8011684: b8 20 80 00 mv r16,r1 /* * Perform internal consistency checks */ assert( the_jnode ); 8011688: 44 20 00 6c be r1,r0,8011838 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 801168c: 28 22 00 4c lw r2,(r1+76) 8011690: 34 01 00 05 mvi r1,5 8011694: 5c 41 00 71 bne r2,r1,8011858 /* * 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; 8011698: 78 0d 08 02 mvhi r13,0x802 801169c: 39 ad 66 d8 ori r13,r13,0x66d8 80116a0: 29 a1 00 00 lw r1,(r13+0) 80116a4: 34 02 00 02 mvi r2,2 80116a8: fb ff bd 77 calli 8000c84 <__lshrsi3> 80116ac: b8 20 78 00 mv r15,r1 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 80116b0: 2a 01 00 58 lw r1,(r16+88) 80116b4: 44 20 00 04 be r1,r0,80116c4 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 80116b8: 36 01 00 58 addi r1,r16,88 80116bc: b9 e0 10 00 mv r2,r15 80116c0: fb ff ff a6 calli 8011558 } if ( info->doubly_indirect ) { 80116c4: 2a 0e 00 5c lw r14,(r16+92) 80116c8: 45 c0 00 1a be r14,r0,8011730 for ( i=0 ; i <== NOT EXECUTED 80116dc: b9 80 58 00 mv r11,r12 <== NOT EXECUTED 80116e0: 44 2c 00 11 be r1,r12,8011724 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 80116e4: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80116e8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80116ec: fb ff bd 3e calli 8000be4 <__ashlsi3> <== NOT EXECUTED 80116f0: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 80116f4: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 80116f8: 44 40 00 03 be r2,r0,8011704 <== NOT EXECUTED memfile_free_blocks_in_table( 80116fc: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8011700: fb ff ff 96 calli 8011558 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 8011718: 51 61 00 03 bgeu r11,r1,8011724 <== NOT EXECUTED 801171c: 2a 0e 00 5c lw r14,(r16+92) <== NOT EXECUTED 8011720: e3 ff ff f1 bi 80116e4 <== 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 ); 8011724: 36 01 00 5c addi r1,r16,92 <== NOT EXECUTED 8011728: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 801172c: fb ff ff 8b calli 8011558 <== NOT EXECUTED } if ( info->triply_indirect ) { 8011730: 2a 0b 00 60 lw r11,(r16+96) 8011734: 45 60 00 2c be r11,r0,80117e4 for ( i=0 ; i <== NOT EXECUTED 8011748: 44 20 00 24 be r1,r0,80117d8 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 801174c: 29 6e 00 00 lw r14,(r11+0) <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 8011750: 34 13 00 00 mvi r19,0 <== NOT EXECUTED 8011754: 34 11 00 04 mvi r17,4 <== NOT EXECUTED 8011758: ba 60 90 00 mv r18,r19 <== NOT EXECUTED 801175c: 45 d3 00 1f be r14,r19,80117d8 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 801176c: 44 20 00 12 be r1,r0,80117b4 <== NOT EXECUTED 8011770: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 8011774: b9 80 58 00 mv r11,r12 <== NOT EXECUTED if ( p[j] ) { 8011778: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 801177c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8011780: fb ff bd 19 calli 8000be4 <__ashlsi3> <== NOT EXECUTED 8011784: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8011788: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 801178c: 44 40 00 03 be r2,r0,8011798 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 8011790: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8011794: fb ff ff 71 calli 8011558 <== 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 80117ac: 54 2b ff f3 bgu r1,r11,8011778 <== NOT EXECUTED 80117b0: 2a 0b 00 60 lw r11,(r16+96) <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 80117b4: b5 73 08 00 add r1,r11,r19 <== NOT EXECUTED 80117b8: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 80117bc: fb ff ff 67 calli 8011558 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED 80117d4: 54 32 00 11 bgu r1,r18,8011818 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 80117d8: 36 01 00 60 addi r1,r16,96 <== NOT EXECUTED 80117dc: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 80117e0: fb ff ff 5e calli 8011558 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 80117e4: 34 01 00 00 mvi r1,0 80117e8: 2b 9d 00 04 lw ra,(sp+4) 80117ec: 2b 8b 00 28 lw r11,(sp+40) 80117f0: 2b 8c 00 24 lw r12,(sp+36) 80117f4: 2b 8d 00 20 lw r13,(sp+32) 80117f8: 2b 8e 00 1c lw r14,(sp+28) 80117fc: 2b 8f 00 18 lw r15,(sp+24) 8011800: 2b 90 00 14 lw r16,(sp+20) 8011804: 2b 91 00 10 lw r17,(sp+16) 8011808: 2b 92 00 0c lw r18,(sp+12) 801180c: 2b 93 00 08 lw r19,(sp+8) 8011810: 37 9c 00 28 addi sp,sp,40 8011814: c3 a0 00 00 ret } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 8011818: 2a 0b 00 60 lw r11,(r16+96) <== NOT EXECUTED 801181c: 36 22 00 04 addi r2,r17,4 <== NOT EXECUTED 8011820: b5 71 08 00 add r1,r11,r17 <== NOT EXECUTED 8011824: 28 2e 00 00 lw r14,(r1+0) <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 8011828: 45 c0 ff ec be r14,r0,80117d8 <== NOT EXECUTED 801182c: ba 20 98 00 mv r19,r17 <== NOT EXECUTED 8011830: b8 40 88 00 mv r17,r2 <== NOT EXECUTED 8011834: e3 ff ff cb bi 8011760 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 8011838: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 801183c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011840: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011844: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 8011848: 38 63 4a 14 ori r3,r3,0x4a14 <== NOT EXECUTED 801184c: 38 84 49 28 ori r4,r4,0x4928 <== NOT EXECUTED 8011850: 34 02 01 ee mvi r2,494 <== NOT EXECUTED 8011854: fb ff f0 d0 calli 800db94 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 8011858: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 801185c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011860: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011864: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 8011868: 38 63 4a 14 ori r3,r3,0x4a14 <== NOT EXECUTED 801186c: 38 84 49 34 ori r4,r4,0x4934 <== NOT EXECUTED 8011870: 34 02 01 f2 mvi r2,498 <== NOT EXECUTED 8011874: fb ff f0 c8 calli 800db94 <__assert_func> <== NOT EXECUTED 08011600 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 8011600: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8011604: 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 ); 8011608: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 801160c: fb ff ff 26 calli 80112a4 <== NOT EXECUTED assert( block_ptr ); 8011610: 44 20 00 0a be r1,r0,8011638 <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 8011614: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED *block_ptr = 0; 8011618: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 801161c: 58 23 00 00 sw (r1+0),r3 <== NOT EXECUTED memfile_free_block( ptr ); 8011620: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8011624: fb ff ff 05 calli 8011238 <== NOT EXECUTED } return 1; } 8011628: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 801162c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8011630: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8011634: c3 a0 00 00 ret <== NOT EXECUTED { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 8011638: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 801163c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011640: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011644: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 8011648: 38 63 4a 48 ori r3,r3,0x4a48 <== NOT EXECUTED 801164c: 38 84 49 64 ori r4,r4,0x4964 <== NOT EXECUTED 8011650: 34 02 01 96 mvi r2,406 <== NOT EXECUTED 8011654: fb ff f1 50 calli 800db94 <__assert_func> <== NOT EXECUTED 08011d34 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 8011d34: 37 9c ff cc addi sp,sp,-52 8011d38: 5b 8b 00 2c sw (sp+44),r11 8011d3c: 5b 8c 00 28 sw (sp+40),r12 8011d40: 5b 8d 00 24 sw (sp+36),r13 8011d44: 5b 8e 00 20 sw (sp+32),r14 8011d48: 5b 8f 00 1c sw (sp+28),r15 8011d4c: 5b 90 00 18 sw (sp+24),r16 8011d50: 5b 91 00 14 sw (sp+20),r17 8011d54: 5b 92 00 10 sw (sp+16),r18 8011d58: 5b 93 00 0c sw (sp+12),r19 8011d5c: 5b 94 00 08 sw (sp+8),r20 8011d60: 5b 9d 00 04 sw (sp+4),ra 8011d64: b8 20 88 00 mv r17,r1 8011d68: b8 40 60 00 mv r12,r2 8011d6c: b8 60 98 00 mv r19,r3 8011d70: b8 80 90 00 mv r18,r4 /* * Perform internal consistency checks */ assert( the_jnode ); 8011d74: 44 20 00 79 be r1,r0,8011f58 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 8011d78: 28 22 00 4c lw r2,(r1+76) 8011d7c: 34 01 00 05 mvi r1,5 8011d80: 5c 41 00 86 bne r2,r1,8011f98 /* * Error check arguments */ assert( source ); 8011d84: 44 60 00 7d be r3,r0,8011f78 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 8011d88: 44 80 00 5f be r4,r0,8011f04 * 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 ) { 8011d8c: 2a 21 00 50 lw r1,(r17+80) /* * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; 8011d90: b4 8c 10 00 add r2,r4,r12 if ( last_byte > the_jnode->info.file.size ) { 8011d94: 48 01 00 51 bg r0,r1,8011ed8 8011d98: 44 20 00 58 be r1,r0,8011ef8 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 8011d9c: 78 10 08 02 mvhi r16,0x802 8011da0: 3a 10 66 d8 ori r16,r16,0x66d8 8011da4: 2a 0b 00 00 lw r11,(r16+0) 8011da8: b9 80 08 00 mv r1,r12 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 8011dac: ba 60 70 00 mv r14,r19 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 8011db0: b9 60 10 00 mv r2,r11 8011db4: f8 00 44 c2 calli 80230bc <__modsi3> 8011db8: b8 20 a0 00 mv r20,r1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 8011dbc: b9 60 10 00 mv r2,r11 8011dc0: b9 80 08 00 mv r1,r12 8011dc4: f8 00 44 8b calli 8022ff0 <__divsi3> 8011dc8: b8 20 68 00 mv r13,r1 if ( start_offset ) { 8011dcc: ba 40 60 00 mv r12,r18 8011dd0: ba 80 78 00 mv r15,r20 8011dd4: 46 80 00 12 be r20,r0,8011e1c 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 ); 8011dd8: ba 20 08 00 mv r1,r17 8011ddc: b9 a0 10 00 mv r2,r13 8011de0: 34 03 00 00 mvi r3,0 8011de4: fb ff fd 30 calli 80112a4 assert( block_ptr ); 8011de8: 44 20 00 74 be r1,r0,8011fb8 */ 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; 8011dec: c9 74 78 00 sub r15,r11,r20 8011df0: 52 4f 00 02 bgeu r18,r15,8011df8 8011df4: ba 40 78 00 mv r15,r18 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 8011df8: 28 21 00 00 lw r1,(r1+0) 8011dfc: ba 60 10 00 mv r2,r19 8011e00: b9 e0 18 00 mv r3,r15 8011e04: b4 34 08 00 add r1,r1,r20 8011e08: f8 00 0b 3f calli 8014b04 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 8011e0c: 2a 0b 00 00 lw r11,(r16+0) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; 8011e10: b6 6f 70 00 add r14,r19,r15 block++; 8011e14: 35 ad 00 01 addi r13,r13,1 my_length -= to_copy; 8011e18: ca 4f 60 00 sub r12,r18,r15 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 8011e1c: 55 6c 00 10 bgu r11,r12,8011e5c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 8011e20: ba 20 08 00 mv r1,r17 8011e24: b9 a0 10 00 mv r2,r13 8011e28: 34 03 00 00 mvi r3,0 8011e2c: fb ff fd 1e calli 80112a4 assert( block_ptr ); 8011e30: 44 20 00 3a be r1,r0,8011f18 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 ); 8011e34: 28 21 00 00 lw r1,(r1+0) 8011e38: b9 c0 10 00 mv r2,r14 8011e3c: b9 60 18 00 mv r3,r11 8011e40: f8 00 0b 31 calli 8014b04 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 8011e44: 2a 01 00 00 lw r1,(r16+0) fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; 8011e48: c9 8b 60 00 sub r12,r12,r11 return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; 8011e4c: b5 cb 70 00 add r14,r14,r11 block++; 8011e50: 35 ad 00 01 addi r13,r13,1 * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 8011e54: b5 eb 78 00 add r15,r15,r11 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 8011e58: 51 81 ff f2 bgeu r12,r1,8011e20 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 8011e5c: 45 80 00 0b be r12,r0,8011e88 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 8011e60: b9 a0 10 00 mv r2,r13 8011e64: ba 20 08 00 mv r1,r17 8011e68: 34 03 00 00 mvi r3,0 8011e6c: fb ff fd 0e calli 80112a4 assert( block_ptr ); 8011e70: 44 20 00 32 be r1,r0,8011f38 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 ); 8011e74: 28 21 00 00 lw r1,(r1+0) 8011e78: b9 c0 10 00 mv r2,r14 8011e7c: b9 80 18 00 mv r3,r12 8011e80: f8 00 0b 21 calli 8014b04 my_length = 0; copied += to_copy; 8011e84: b5 ec 78 00 add r15,r15,r12 } IMFS_mtime_ctime_update( the_jnode ); 8011e88: 37 81 00 30 addi r1,sp,48 8011e8c: 34 02 00 00 mvi r2,0 8011e90: fb ff c3 78 calli 8002c70 8011e94: 2b 81 00 30 lw r1,(sp+48) 8011e98: 5a 21 00 48 sw (r17+72),r1 8011e9c: 5a 21 00 44 sw (r17+68),r1 return copied; } 8011ea0: b9 e0 08 00 mv r1,r15 8011ea4: 2b 9d 00 04 lw ra,(sp+4) 8011ea8: 2b 8b 00 2c lw r11,(sp+44) 8011eac: 2b 8c 00 28 lw r12,(sp+40) 8011eb0: 2b 8d 00 24 lw r13,(sp+36) 8011eb4: 2b 8e 00 20 lw r14,(sp+32) 8011eb8: 2b 8f 00 1c lw r15,(sp+28) 8011ebc: 2b 90 00 18 lw r16,(sp+24) 8011ec0: 2b 91 00 14 lw r17,(sp+20) 8011ec4: 2b 92 00 10 lw r18,(sp+16) 8011ec8: 2b 93 00 0c lw r19,(sp+12) 8011ecc: 2b 94 00 08 lw r20,(sp+8) 8011ed0: 37 9c 00 34 addi sp,sp,52 8011ed4: c3 a0 00 00 ret * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); 8011ed8: ba 20 08 00 mv r1,r17 8011edc: fb ff fe d4 calli 8011a2c if ( status ) 8011ee0: 44 20 ff af be r1,r0,8011d9c rtems_set_errno_and_return_minus_one( ENOSPC ); 8011ee4: f8 00 08 62 calli 801406c <__errno> <== NOT EXECUTED 8011ee8: 34 02 00 1c mvi r2,28 <== NOT EXECUTED 8011eec: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8011ef0: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED 8011ef4: e3 ff ff eb bi 8011ea0 <== 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 ) { 8011ef8: 2a 21 00 54 lw r1,(r17+84) 8011efc: 54 41 ff f7 bgu r2,r1,8011ed8 8011f00: e3 ff ff a7 bi 8011d9c <== NOT EXECUTED * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 8011f04: f8 00 08 5a calli 801406c <__errno> <== NOT EXECUTED 8011f08: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8011f0c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8011f10: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED 8011f14: e3 ff ff e3 bi 8011ea0 <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 8011f18: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011f1c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011f20: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011f24: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 8011f28: 38 63 49 ec ori r3,r3,0x49ec <== NOT EXECUTED 8011f2c: 38 84 49 64 ori r4,r4,0x4964 <== NOT EXECUTED 8011f30: 34 02 03 30 mvi r2,816 <== NOT EXECUTED 8011f34: fb ff ef 18 calli 800db94 <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 8011f38: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011f3c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011f40: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011f44: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 8011f48: 38 63 49 ec ori r3,r3,0x49ec <== NOT EXECUTED 8011f4c: 38 84 49 64 ori r4,r4,0x4964 <== NOT EXECUTED 8011f50: 34 02 03 46 mvi r2,838 <== NOT EXECUTED 8011f54: fb ff ef 10 calli 800db94 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 8011f58: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011f5c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011f60: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011f64: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 8011f68: 38 63 49 ec ori r3,r3,0x49ec <== NOT EXECUTED 8011f6c: 38 84 49 28 ori r4,r4,0x4928 <== NOT EXECUTED 8011f70: 34 02 02 e3 mvi r2,739 <== NOT EXECUTED 8011f74: fb ff ef 08 calli 800db94 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 8011f78: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011f7c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011f80: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011f84: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 8011f88: 38 63 49 ec ori r3,r3,0x49ec <== NOT EXECUTED 8011f8c: 38 84 49 70 ori r4,r4,0x4970 <== NOT EXECUTED 8011f90: 34 02 02 ef mvi r2,751 <== NOT EXECUTED 8011f94: fb ff ef 00 calli 800db94 <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 8011f98: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011f9c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011fa0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011fa4: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 8011fa8: 38 63 49 ec ori r3,r3,0x49ec <== NOT EXECUTED 8011fac: 38 84 49 34 ori r4,r4,0x4934 <== NOT EXECUTED 8011fb0: 34 02 02 e7 mvi r2,743 <== NOT EXECUTED 8011fb4: fb ff ee f8 calli 800db94 <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 8011fb8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011fbc: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011fc0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011fc4: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 8011fc8: 38 63 49 ec ori r3,r3,0x49ec <== NOT EXECUTED 8011fcc: 38 84 49 64 ori r4,r4,0x4964 <== NOT EXECUTED 8011fd0: 34 02 03 1c mvi r2,796 <== NOT EXECUTED 8011fd4: fb ff ee f0 calli 800db94 <__assert_func> <== NOT EXECUTED 0800745c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 800745c: 37 9c ff a4 addi sp,sp,-92 8007460: 5b 8b 00 1c sw (sp+28),r11 8007464: 5b 8c 00 18 sw (sp+24),r12 8007468: 5b 8d 00 14 sw (sp+20),r13 800746c: 5b 8e 00 10 sw (sp+16),r14 8007470: 5b 8f 00 0c sw (sp+12),r15 8007474: 5b 90 00 08 sw (sp+8),r16 8007478: 5b 9d 00 04 sw (sp+4),ra 800747c: b8 40 58 00 mv r11,r2 8007480: b8 60 80 00 mv r16,r3 8007484: b8 80 78 00 mv r15,r4 8007488: b8 a0 70 00 mv r14,r5 800748c: b8 20 68 00 mv r13,r1 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 8007490: 37 8c 00 20 addi r12,sp,32 8007494: f8 00 1d 15 calli 800e8e8 8007498: b8 20 10 00 mv r2,r1 800749c: b9 80 18 00 mv r3,r12 80074a0: b9 a0 08 00 mv r1,r13 80074a4: 37 84 00 5c addi r4,sp,92 80074a8: fb ff ff 4b calli 80071d4 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 80074ac: 21 66 f0 00 andi r6,r11,0xf000 80074b0: 34 02 40 00 mvi r2,16384 80074b4: 44 c2 00 25 be r6,r2,8007548 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 80074b8: 38 01 80 00 mvu r1,0x8000 80074bc: 34 07 00 05 mvi r7,5 80074c0: 44 c1 00 08 be r6,r1,80074e0 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 80074c4: 64 c2 20 00 cmpei r2,r6,8192 80074c8: 64 c1 60 00 cmpei r1,r6,24576 80074cc: b8 41 08 00 or r1,r2,r1 80074d0: 44 20 00 16 be r1,r0,8007528 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 80074d4: 5b 90 00 44 sw (sp+68),r16 80074d8: 5b 8f 00 48 sw (sp+72),r15 80074dc: 34 07 00 02 mvi r7,2 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 80074e0: b8 e0 10 00 mv r2,r7 80074e4: b9 c0 08 00 mv r1,r14 80074e8: b9 80 18 00 mv r3,r12 80074ec: b9 60 20 00 mv r4,r11 80074f0: 37 85 00 44 addi r5,sp,68 80074f4: f8 00 0f f2 calli 800b4bc new_name, mode, &info ); if ( !new_node ) 80074f8: 34 02 00 00 mvi r2,0 80074fc: 44 22 00 15 be r1,r2,8007550 rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 8007500: b8 40 08 00 mv r1,r2 8007504: 2b 9d 00 04 lw ra,(sp+4) 8007508: 2b 8b 00 1c lw r11,(sp+28) 800750c: 2b 8c 00 18 lw r12,(sp+24) 8007510: 2b 8d 00 14 lw r13,(sp+20) 8007514: 2b 8e 00 10 lw r14,(sp+16) 8007518: 2b 8f 00 0c lw r15,(sp+12) 800751c: 2b 90 00 08 lw r16,(sp+8) 8007520: 37 9c 00 5c addi sp,sp,92 8007524: c3 a0 00 00 ret type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 8007528: 34 01 10 00 mvi r1,4096 800752c: 34 07 00 07 mvi r7,7 8007530: 44 c1 ff ec be r6,r1,80074e0 type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 8007534: f8 00 18 1d calli 800d5a8 <__errno> <== NOT EXECUTED 8007538: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 800753c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8007540: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8007544: e3 ff ff ef bi 8007500 <== NOT EXECUTED 8007548: 34 07 00 01 mvi r7,1 800754c: e3 ff ff e5 bi 80074e0 mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 8007550: f8 00 18 16 calli 800d5a8 <__errno> <== NOT EXECUTED 8007554: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8007558: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800755c: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8007560: e3 ff ff e8 bi 8007500 <== NOT EXECUTED 08002230 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 8002230: 37 9c ff fc addi sp,sp,-4 8002234: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 8002238: 28 22 00 08 lw r2,(r1+8) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 800223c: 34 03 00 01 mvi r3,1 8002240: 28 44 00 4c lw r4,(r2+76) 8002244: 5c 83 00 06 bne r4,r3,800225c /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 8002248: 58 41 00 5c sw (r2+92),r1 800224c: 34 01 00 00 mvi r1,0 return 0; } 8002250: 2b 9d 00 04 lw ra,(sp+4) 8002254: 37 9c 00 04 addi sp,sp,4 8002258: c3 a0 00 00 ret /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 800225c: f8 00 47 84 calli 801406c <__errno> <== NOT EXECUTED 8002260: 34 02 00 14 mvi r2,20 <== NOT EXECUTED 8002264: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8002268: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800226c: e3 ff ff f9 bi 8002250 <== NOT EXECUTED 08002c68 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 8002c68: 37 9c ff ec addi sp,sp,-20 8002c6c: 5b 8b 00 14 sw (sp+20),r11 8002c70: 5b 8c 00 10 sw (sp+16),r12 8002c74: 5b 8d 00 0c sw (sp+12),r13 8002c78: 5b 8e 00 08 sw (sp+8),r14 8002c7c: 5b 9d 00 04 sw (sp+4),ra 8002c80: b8 20 60 00 mv r12,r1 assert( the_jnode ); 8002c84: 44 20 00 72 be r1,r0,8002e4c fprintf(stdout, "%s", the_jnode->name ); 8002c88: 78 0b 08 02 mvhi r11,0x802 8002c8c: 39 6b 91 d8 ori r11,r11,0x91d8 8002c90: 29 62 00 00 lw r2,(r11+0) 8002c94: 34 21 00 0c addi r1,r1,12 8002c98: 28 42 00 08 lw r2,(r2+8) 8002c9c: f8 00 41 a5 calli 8013330 switch( the_jnode->type ) { 8002ca0: 29 8d 00 4c lw r13,(r12+76) 8002ca4: 34 01 00 07 mvi r1,7 8002ca8: 55 a1 00 09 bgu r13,r1,8002ccc 8002cac: 78 0e 08 02 mvhi r14,0x802 8002cb0: b9 a0 08 00 mv r1,r13 8002cb4: 34 02 00 02 mvi r2,2 8002cb8: fb ff fd cd calli 80023ec <__ashlsi3> 8002cbc: 39 ce 68 f0 ori r14,r14,0x68f0 8002cc0: b5 c1 08 00 add r1,r14,r1 8002cc4: 28 21 00 00 lw r1,(r1+0) 8002cc8: c0 20 00 00 b r1 fprintf(stdout, " FIFO not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 8002ccc: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 8002cd0: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8002cd4: 38 42 67 fc ori r2,r2,0x67fc <== NOT EXECUTED 8002cd8: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8002cdc: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 8002ce0: f8 00 41 1d calli 8013154 <== NOT EXECUTED assert(0); 8002ce4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002ce8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002cec: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002cf0: 38 21 67 48 ori r1,r1,0x6748 <== NOT EXECUTED 8002cf4: 38 63 69 24 ori r3,r3,0x6924 <== NOT EXECUTED 8002cf8: 38 84 67 e4 ori r4,r4,0x67e4 <== NOT EXECUTED 8002cfc: 34 02 00 6c mvi r2,108 <== NOT EXECUTED 8002d00: f8 00 02 d5 calli 8003854 <__assert_func> <== NOT EXECUTED fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 8002d04: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8002d08: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002d0c: 34 03 00 12 mvi r3,18 <== NOT EXECUTED 8002d10: 28 44 00 08 lw r4,(r2+8) <== NOT EXECUTED 8002d14: 38 21 67 e8 ori r1,r1,0x67e8 <== NOT EXECUTED 8002d18: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8002d1c: f8 00 44 b6 calli 8013ff4 <== NOT EXECUTED assert(0); 8002d20: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002d24: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002d28: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002d2c: 38 21 67 48 ori r1,r1,0x6748 <== NOT EXECUTED 8002d30: 38 63 69 24 ori r3,r3,0x6924 <== NOT EXECUTED 8002d34: 38 84 67 e4 ori r4,r4,0x67e4 <== NOT EXECUTED 8002d38: 34 02 00 67 mvi r2,103 <== NOT EXECUTED 8002d3c: f8 00 02 c6 calli 8003854 <__assert_func> <== NOT EXECUTED fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 8002d40: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 8002d44: 29 84 00 58 lw r4,(r12+88) <== NOT EXECUTED 8002d48: 29 83 00 54 lw r3,(r12+84) <== NOT EXECUTED 8002d4c: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8002d50: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8002d54: 38 42 67 b4 ori r2,r2,0x67b4 <== NOT EXECUTED 8002d58: f8 00 40 ff calli 8013154 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 8002d5c: 78 01 08 02 mvhi r1,0x802 8002d60: 38 21 61 b4 ori r1,r1,0x61b4 8002d64: f8 00 49 6e calli 801531c } 8002d68: 2b 9d 00 04 lw ra,(sp+4) 8002d6c: 2b 8b 00 14 lw r11,(sp+20) 8002d70: 2b 8c 00 10 lw r12,(sp+16) 8002d74: 2b 8d 00 0c lw r13,(sp+12) 8002d78: 2b 8e 00 08 lw r14,(sp+8) 8002d7c: 37 9c 00 14 addi sp,sp,20 8002d80: c3 a0 00 00 ret the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 8002d84: 29 61 00 00 lw r1,(r11+0) 8002d88: 29 83 00 54 lw r3,(r12+84) 8002d8c: 78 02 08 02 mvhi r2,0x802 8002d90: 28 21 00 08 lw r1,(r1+8) 8002d94: 38 42 67 c4 ori r2,r2,0x67c4 8002d98: f8 00 40 ef calli 8013154 (uint32_t)the_jnode->info.file.size ); #endif break; 8002d9c: e3 ff ff f0 bi 8002d5c fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 8002da0: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8002da4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002da8: 34 03 00 13 mvi r3,19 <== NOT EXECUTED 8002dac: 28 44 00 08 lw r4,(r2+8) <== NOT EXECUTED 8002db0: 38 21 67 d0 ori r1,r1,0x67d0 <== NOT EXECUTED 8002db4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8002db8: f8 00 44 8f calli 8013ff4 <== NOT EXECUTED assert(0); 8002dbc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002dc0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002dc4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002dc8: 38 21 67 48 ori r1,r1,0x6748 <== NOT EXECUTED 8002dcc: 38 63 69 24 ori r3,r3,0x6924 <== NOT EXECUTED 8002dd0: 38 84 67 e4 ori r4,r4,0x67e4 <== NOT EXECUTED 8002dd4: 34 02 00 62 mvi r2,98 <== NOT EXECUTED 8002dd8: f8 00 02 9f calli 8003854 <__assert_func> <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 8002ddc: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8002de0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002de4: 34 03 00 13 mvi r3,19 <== NOT EXECUTED 8002de8: 28 44 00 08 lw r4,(r2+8) <== NOT EXECUTED 8002dec: 38 21 67 d0 ori r1,r1,0x67d0 <== NOT EXECUTED 8002df0: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8002df4: f8 00 44 80 calli 8013ff4 <== NOT EXECUTED assert(0); 8002df8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002dfc: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002e00: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002e04: 38 21 67 48 ori r1,r1,0x6748 <== NOT EXECUTED 8002e08: 38 63 69 24 ori r3,r3,0x6924 <== NOT EXECUTED 8002e0c: 38 84 67 e4 ori r4,r4,0x67e4 <== NOT EXECUTED 8002e10: 34 02 00 5d mvi r2,93 <== NOT EXECUTED 8002e14: f8 00 02 90 calli 8003854 <__assert_func> <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 8002e18: 29 61 00 00 lw r1,(r11+0) 8002e1c: 29 84 00 54 lw r4,(r12+84) 8002e20: 29 83 00 50 lw r3,(r12+80) 8002e24: 28 21 00 08 lw r1,(r1+8) 8002e28: 78 02 08 02 mvhi r2,0x802 8002e2c: 38 42 67 a0 ori r2,r2,0x67a0 8002e30: f8 00 40 c9 calli 8013154 the_jnode->info.device.major, the_jnode->info.device.minor ); break; 8002e34: e3 ff ff ca bi 8002d5c assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 8002e38: 29 62 00 00 lw r2,(r11+0) 8002e3c: 34 01 00 2f mvi r1,47 8002e40: 28 42 00 08 lw r2,(r2+8) 8002e44: f8 00 40 e5 calli 80131d8 break; 8002e48: e3 ff ff c5 bi 8002d5c void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 8002e4c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002e50: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002e54: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002e58: 38 21 67 48 ori r1,r1,0x6748 <== NOT EXECUTED 8002e5c: 38 63 69 24 ori r3,r3,0x6924 <== NOT EXECUTED 8002e60: 38 84 67 94 ori r4,r4,0x6794 <== NOT EXECUTED 8002e64: 34 02 00 38 mvi r2,56 <== NOT EXECUTED 8002e68: f8 00 02 7b calli 8003854 <__assert_func> <== NOT EXECUTED 0800227c : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 800227c: 37 9c ff fc addi sp,sp,-4 8002280: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *node; int i; node = loc->node_access; 8002284: 28 25 00 00 lw r5,(r1+0) if ( node->type != IMFS_SYM_LINK ) 8002288: 34 01 00 04 mvi r1,4 800228c: 28 a4 00 4c lw r4,(r5+76) 8002290: 5c 81 00 15 bne r4,r1,80022e4 rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 8002294: 44 60 00 12 be r3,r0,80022dc 8002298: 28 a4 00 50 lw r4,(r5+80) int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 800229c: 34 06 00 00 mvi r6,0 80022a0: b8 c0 08 00 mv r1,r6 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 80022a4: 40 84 00 00 lbu r4,(r4+0) 80022a8: 44 86 00 0d be r4,r6,80022dc buf[i] = node->info.sym_link.name[i]; 80022ac: b4 46 30 00 add r6,r2,r6 80022b0: 30 c4 00 00 sb (r6+0),r4 node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 80022b4: 34 21 00 01 addi r1,r1,1 80022b8: b8 20 30 00 mv r6,r1 80022bc: 50 23 00 05 bgeu r1,r3,80022d0 80022c0: 28 a4 00 50 lw r4,(r5+80) 80022c4: b4 81 20 00 add r4,r4,r1 80022c8: 40 84 00 00 lbu r4,(r4+0) 80022cc: 5c 80 ff f8 bne r4,r0,80022ac buf[i] = node->info.sym_link.name[i]; return i; } 80022d0: 2b 9d 00 04 lw ra,(sp+4) 80022d4: 37 9c 00 04 addi sp,sp,4 80022d8: c3 a0 00 00 ret node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 80022dc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80022e0: e3 ff ff fc bi 80022d0 <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 80022e4: f8 00 47 62 calli 801406c <__errno> <== NOT EXECUTED 80022e8: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 80022ec: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80022f0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80022f4: e3 ff ff f7 bi 80022d0 <== NOT EXECUTED 080022f8 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 80022f8: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 80022fc: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8002300: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8002304: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 8002308: 28 4b 00 00 lw r11,(r2+0) <== NOT EXECUTED rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 800230c: b8 60 60 00 mv r12,r3 <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 8002310: b8 80 10 00 mv r2,r4 <== NOT EXECUTED 8002314: 35 61 00 0c addi r1,r11,12 <== NOT EXECUTED 8002318: 34 03 00 20 mvi r3,32 <== NOT EXECUTED 800231c: f8 00 4c 30 calli 80153dc <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 8002320: 29 61 00 08 lw r1,(r11+8) <== NOT EXECUTED 8002324: 44 20 00 03 be r1,r0,8002330 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 8002328: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800232c: f8 00 0b fe calli 8005324 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 8002330: 29 83 00 00 lw r3,(r12+0) <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 8002334: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8002338: 34 61 00 50 addi r1,r3,80 <== NOT EXECUTED the_jnode->Parent = new_parent; 800233c: 59 63 00 08 sw (r11+8),r3 <== NOT EXECUTED 8002340: f8 00 0b ed calli 80052f4 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 8002344: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED 8002348: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800234c: f8 00 02 49 calli 8002c70 <== NOT EXECUTED 8002350: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED 8002354: 59 61 00 48 sw (r11+72),r1 <== NOT EXECUTED return 0; } 8002358: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 800235c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8002360: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8002364: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8002368: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 800236c: c3 a0 00 00 ret <== NOT EXECUTED 08007570 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 8007570: 37 9c ff ec addi sp,sp,-20 8007574: 5b 8b 00 0c sw (sp+12),r11 8007578: 5b 8c 00 08 sw (sp+8),r12 800757c: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 8007580: 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 */ ) { 8007584: 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 ) { 8007588: 29 61 00 08 lw r1,(r11+8) 800758c: 44 20 00 05 be r1,r0,80075a0 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 8007590: b9 60 08 00 mv r1,r11 8007594: f8 00 07 ba calli 800947c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 8007598: 34 01 00 00 mvi r1,0 800759c: 59 61 00 08 sw (r11+8),r1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 80075a0: 2d 63 00 34 lhu r3,(r11+52) IMFS_update_ctime( the_jnode ); 80075a4: 34 02 00 00 mvi r2,0 80075a8: 37 81 00 10 addi r1,sp,16 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 80075ac: 34 63 ff ff addi r3,r3,-1 80075b0: 0d 63 00 34 sh (r11+52),r3 IMFS_update_ctime( the_jnode ); 80075b4: f8 00 01 4d calli 8007ae8 80075b8: 2b 81 00 10 lw r1,(sp+16) 80075bc: 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) ) { 80075c0: b9 60 08 00 mv r1,r11 80075c4: f8 00 01 92 calli 8007c0c 80075c8: 5c 20 00 0e bne r1,r0,8007600 80075cc: 2d 62 00 34 lhu r2,(r11+52) 80075d0: 5c 41 00 0c bne r2,r1,8007600 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 80075d4: 78 01 08 01 mvhi r1,0x801 80075d8: 38 21 e1 10 ori r1,r1,0xe110 80075dc: 28 21 00 00 lw r1,(r1+0) 80075e0: 29 83 00 00 lw r3,(r12+0) 80075e4: 28 24 00 04 lw r4,(r1+4) 80075e8: 44 83 00 10 be r4,r3,8007628 /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 80075ec: 29 62 00 4c lw r2,(r11+76) 80075f0: 34 01 00 04 mvi r1,4 80075f4: 44 41 00 09 be r2,r1,8007618 if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); 80075f8: b9 60 08 00 mv r1,r11 80075fc: f8 00 00 b3 calli 80078c8 } return 0; } 8007600: 34 01 00 00 mvi r1,0 8007604: 2b 9d 00 04 lw ra,(sp+4) 8007608: 2b 8b 00 0c lw r11,(sp+12) 800760c: 2b 8c 00 08 lw r12,(sp+8) 8007610: 37 9c 00 14 addi sp,sp,20 8007614: c3 a0 00 00 ret /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 8007618: 29 61 00 50 lw r1,(r11+80) 800761c: 44 20 ff f7 be r1,r0,80075f8 free( (void*) the_jnode->info.sym_link.name ); 8007620: f8 00 00 aa calli 80078c8 8007624: e3 ff ff f5 bi 80075f8 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 8007628: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED 800762c: e3 ff ff f0 bi 80075ec <== NOT EXECUTED 08007630 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8007630: 37 9c ff f0 addi sp,sp,-16 8007634: 5b 8b 00 10 sw (sp+16),r11 8007638: 5b 8c 00 0c sw (sp+12),r12 800763c: 5b 8d 00 08 sw (sp+8),r13 8007640: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 8007644: 28 2b 00 00 lw r11,(r1+0) int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8007648: b8 40 60 00 mv r12,r2 IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 800764c: 34 02 00 07 mvi r2,7 8007650: 29 61 00 4c lw r1,(r11+76) 8007654: 54 22 00 26 bgu r1,r2,80076ec 8007658: 78 0d 08 01 mvhi r13,0x801 800765c: 34 02 00 02 mvi r2,2 8007660: fb ff e2 e4 calli 80001f0 <__ashlsi3> 8007664: 39 ad cd 24 ori r13,r13,0xcd24 8007668: b5 a1 08 00 add r1,r13,r1 800766c: 28 21 00 00 lw r1,(r1+0) 8007670: c0 20 00 00 b r1 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 8007674: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8007678: 59 81 00 20 sw (r12+32),r1 <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 800767c: 29 62 00 38 lw r2,(r11+56) rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 8007680: 2d 61 00 34 lhu r1,(r11+52) buf->st_ino = the_jnode->st_ino; 8007684: 59 82 00 08 sw (r12+8),r2 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 8007688: 29 62 00 30 lw r2,(r11+48) buf->st_nlink = the_jnode->st_nlink; 800768c: 0d 81 00 10 sh (r12+16),r1 buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 8007690: 29 61 00 40 lw r1,(r11+64) default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 8007694: 59 82 00 0c sw (r12+12),r2 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 8007698: 2d 62 00 3c lhu r2,(r11+60) buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 800769c: 59 81 00 24 sw (r12+36),r1 buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 80076a0: 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; 80076a4: 0d 82 00 12 sh (r12+18),r2 buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 80076a8: 29 62 00 44 lw r2,(r11+68) 80076ac: 59 82 00 2c sw (r12+44),r2 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 80076b0: 2d 62 00 3e lhu r2,(r11+62) buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 80076b4: 29 6b 00 48 lw r11,(r11+72) buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 80076b8: 0d 82 00 14 sh (r12+20),r2 buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 80076bc: 59 8b 00 34 sw (r12+52),r11 return 0; } 80076c0: 2b 9d 00 04 lw ra,(sp+4) 80076c4: 2b 8b 00 10 lw r11,(sp+16) 80076c8: 2b 8c 00 0c lw r12,(sp+12) 80076cc: 2b 8d 00 08 lw r13,(sp+8) 80076d0: 37 9c 00 10 addi sp,sp,16 80076d4: c3 a0 00 00 ret switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 80076d8: 29 61 00 54 lw r1,(r11+84) 80076dc: 29 62 00 50 lw r2,(r11+80) 80076e0: 59 81 00 1c sw (r12+28),r1 80076e4: 59 82 00 18 sw (r12+24),r2 break; 80076e8: e3 ff ff e5 bi 800767c case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 80076ec: f8 00 17 af calli 800d5a8 <__errno> <== NOT EXECUTED 80076f0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80076f4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80076f8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 80076fc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8007700: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8007704: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8007708: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 800770c: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8007710: c3 a0 00 00 ret <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 8007714: 29 61 00 54 lw r1,(r11+84) 8007718: 59 81 00 20 sw (r12+32),r1 break; 800771c: e3 ff ff d8 bi 800767c 08002370 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 8002370: 37 9c ff ac addi sp,sp,-84 8002374: 5b 8b 00 14 sw (sp+20),r11 8002378: 5b 8c 00 10 sw (sp+16),r12 800237c: 5b 8d 00 0c sw (sp+12),r13 8002380: 5b 8e 00 08 sw (sp+8),r14 8002384: 5b 9d 00 04 sw (sp+4),ra 8002388: b8 20 70 00 mv r14,r1 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 800238c: b8 60 08 00 mv r1,r3 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 8002390: b8 60 58 00 mv r11,r3 8002394: b8 40 68 00 mv r13,r2 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 8002398: 37 8c 00 18 addi r12,sp,24 800239c: f8 00 4b e5 calli 8015330 80023a0: b8 20 10 00 mv r2,r1 80023a4: b9 80 18 00 mv r3,r12 80023a8: 37 84 00 54 addi r4,sp,84 80023ac: b9 60 08 00 mv r1,r11 80023b0: f8 00 2d 3e calli 800d8a8 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 80023b4: b9 a0 08 00 mv r1,r13 80023b8: f8 00 4b bb calli 80152a4 80023bc: 5b 81 00 3c sw (sp+60),r1 if (info.sym_link.name == NULL) { 80023c0: 44 20 00 13 be r1,r0,800240c * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 80023c4: 34 02 00 04 mvi r2,4 80023c8: b9 c0 08 00 mv r1,r14 80023cc: b9 80 18 00 mv r3,r12 80023d0: 38 04 a1 ff mvu r4,0xa1ff 80023d4: 37 85 00 3c addi r5,sp,60 80023d8: f8 00 29 3f calli 800c8d4 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 80023dc: 34 02 00 00 mvi r2,0 80023e0: 44 22 00 09 be r1,r2,8002404 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 80023e4: b8 40 08 00 mv r1,r2 80023e8: 2b 9d 00 04 lw ra,(sp+4) 80023ec: 2b 8b 00 14 lw r11,(sp+20) 80023f0: 2b 8c 00 10 lw r12,(sp+16) 80023f4: 2b 8d 00 0c lw r13,(sp+12) 80023f8: 2b 8e 00 08 lw r14,(sp+8) 80023fc: 37 9c 00 54 addi sp,sp,84 8002400: c3 a0 00 00 ret ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); 8002404: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 8002408: f8 00 01 ec calli 8002bb8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 800240c: f8 00 47 18 calli 801406c <__errno> <== NOT EXECUTED 8002410: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8002414: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8002418: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 800241c: e3 ff ff f2 bi 80023e4 <== NOT EXECUTED 08002420 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 8002420: 37 9c ff d0 addi sp,sp,-48 8002424: 5b 8b 00 14 sw (sp+20),r11 8002428: 5b 8c 00 10 sw (sp+16),r12 800242c: 5b 8d 00 0c sw (sp+12),r13 8002430: 5b 8e 00 08 sw (sp+8),r14 8002434: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 8002438: 28 4c 00 00 lw r12,(r2+0) int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 800243c: b8 40 58 00 mv r11,r2 8002440: b8 20 68 00 mv r13,r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 8002444: 29 82 00 4c lw r2,(r12+76) 8002448: 34 01 00 03 mvi r1,3 800244c: 44 41 00 0f be r2,r1,8002488 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 8002450: 29 63 00 08 lw r3,(r11+8) 8002454: b9 60 10 00 mv r2,r11 8002458: b9 a0 08 00 mv r1,r13 800245c: 28 63 00 34 lw r3,(r3+52) 8002460: d8 60 00 00 call r3 8002464: b8 20 10 00 mv r2,r1 return result; } 8002468: b8 40 08 00 mv r1,r2 800246c: 2b 9d 00 04 lw ra,(sp+4) 8002470: 2b 8b 00 14 lw r11,(sp+20) 8002474: 2b 8c 00 10 lw r12,(sp+16) 8002478: 2b 8d 00 0c lw r13,(sp+12) 800247c: 2b 8e 00 08 lw r14,(sp+8) 8002480: 37 9c 00 30 addi sp,sp,48 8002484: c3 a0 00 00 ret * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 8002488: 29 83 00 50 lw r3,(r12+80) 800248c: 44 60 00 22 be r3,r0,8002514 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; the_link.node_access = node->info.hard_link.link_node; 8002490: 5b 83 00 18 sw (sp+24),r3 if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 8002494: 29 62 00 04 lw r2,(r11+4) the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 8002498: 37 8e 00 18 addi r14,sp,24 800249c: b9 c0 08 00 mv r1,r14 if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 80024a0: 5b 82 00 1c sw (sp+28),r2 80024a4: 29 62 00 08 lw r2,(r11+8) 80024a8: 5b 82 00 20 sw (sp+32),r2 80024ac: 29 62 00 0c lw r2,(r11+12) 80024b0: 5b 82 00 24 sw (sp+36),r2 80024b4: 29 62 00 10 lw r2,(r11+16) 80024b8: 5b 82 00 28 sw (sp+40),r2 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 80024bc: f8 00 29 60 calli 800ca3c /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 80024c0: 29 83 00 50 lw r3,(r12+80) 80024c4: 34 01 00 01 mvi r1,1 80024c8: 2c 64 00 34 lhu r4,(r3+52) 80024cc: 44 81 00 0a be r4,r1,80024f4 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 80024d0: 34 84 ff ff addi r4,r4,-1 IMFS_update_ctime( node->info.hard_link.link_node ); 80024d4: 34 02 00 00 mvi r2,0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 80024d8: 0c 64 00 34 sh (r3+52),r4 IMFS_update_ctime( node->info.hard_link.link_node ); 80024dc: 37 81 00 2c addi r1,sp,44 80024e0: f8 00 01 e4 calli 8002c70 80024e4: 29 81 00 50 lw r1,(r12+80) 80024e8: 2b 82 00 2c lw r2,(sp+44) 80024ec: 58 22 00 48 sw (r1+72),r2 80024f0: e3 ff ff d8 bi 8002450 * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 80024f4: 2b 83 00 20 lw r3,(sp+32) 80024f8: b9 c0 10 00 mv r2,r14 80024fc: b9 a0 08 00 mv r1,r13 8002500: 28 63 00 34 lw r3,(r3+52) 8002504: d8 60 00 00 call r3 if ( result != 0 ) 8002508: 34 02 ff ff mvi r2,-1 800250c: 44 20 ff d1 be r1,r0,8002450 8002510: e3 ff ff d6 bi 8002468 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 8002514: f8 00 46 d6 calli 801406c <__errno> <== NOT EXECUTED 8002518: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 800251c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8002520: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8002524: e3 ff ff d1 bi 8002468 <== NOT EXECUTED 08002528 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 8002528: 37 9c ff fc addi sp,sp,-4 800252c: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 8002530: 28 22 00 08 lw r2,(r1+8) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 8002534: 34 01 00 01 mvi r1,1 8002538: 28 43 00 4c lw r3,(r2+76) 800253c: 5c 61 00 08 bne r3,r1,800255c /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 8002540: 28 43 00 5c lw r3,(r2+92) 8002544: 34 01 00 00 mvi r1,0 8002548: 44 61 00 0a be r3,r1,8002570 /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 800254c: 58 41 00 5c sw (r2+92),r1 return 0; } 8002550: 2b 9d 00 04 lw ra,(sp+4) 8002554: 37 9c 00 04 addi sp,sp,4 8002558: c3 a0 00 00 ret /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 800255c: f8 00 46 c4 calli 801406c <__errno> <== NOT EXECUTED 8002560: 34 02 00 14 mvi r2,20 <== NOT EXECUTED 8002564: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8002568: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800256c: e3 ff ff f9 bi 8002550 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 8002570: f8 00 46 bf calli 801406c <__errno> <== NOT EXECUTED 8002574: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8002578: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800257c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8002580: e3 ff ff f4 bi 8002550 <== NOT EXECUTED 0800109c : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 800109c: 37 9c ff f0 addi sp,sp,-16 80010a0: 5b 8b 00 10 sw (sp+16),r11 80010a4: 5b 8c 00 0c sw (sp+12),r12 80010a8: 5b 8d 00 08 sw (sp+8),r13 80010ac: 5b 9d 00 04 sw (sp+4),ra #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 80010b0: 78 04 08 01 mvhi r4,0x801 80010b4: 38 84 e6 50 ori r4,r4,0xe650 80010b8: 28 84 00 00 lw r4,(r4+0) void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 80010bc: b8 20 60 00 mv r12,r1 80010c0: b8 40 68 00 mv r13,r2 80010c4: b8 60 58 00 mv r11,r3 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 80010c8: 44 80 00 03 be r4,r0,80010d4 (*rtems_malloc_statistics_helpers->initialize)(); 80010cc: 28 81 00 00 lw r1,(r4+0) <== NOT EXECUTED 80010d0: d8 20 00 00 call r1 <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 80010d4: f8 00 1b a0 calli 8007f54 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 80010d8: 78 04 08 01 mvhi r4,0x801 80010dc: 38 84 e6 54 ori r4,r4,0xe654 80010e0: 28 81 00 00 lw r1,(r4+0) 80010e4: 44 20 00 08 be r1,r0,8001104 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 80010e8: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 80010ec: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80010f0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80010f4: d8 60 00 00 call r3 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 80010f8: b5 8d 68 00 add r13,r12,r13 <== NOT EXECUTED 80010fc: c9 a1 68 00 sub r13,r13,r1 <== NOT EXECUTED 8001100: b8 20 60 00 mv r12,r1 <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 8001104: 78 0b 08 01 mvhi r11,0x801 8001108: 39 6b e6 4d ori r11,r11,0xe64d 800110c: 41 62 00 00 lbu r2,(r11+0) 8001110: 5c 40 00 1f bne r2,r0,800118c !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 8001114: 78 01 08 01 mvhi r1,0x801 8001118: 38 21 e0 c4 ori r1,r1,0xe0c4 800111c: 40 21 00 28 lbu r1,(r1+40) 8001120: 5c 22 00 16 bne r1,r2,8001178 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 8001124: 78 0b 08 01 mvhi r11,0x801 8001128: 39 6b e0 1c ori r11,r11,0xe01c 800112c: 29 61 00 00 lw r1,(r11+0) 8001130: b9 80 10 00 mv r2,r12 8001134: b9 a0 18 00 mv r3,r13 8001138: 34 04 00 08 mvi r4,8 800113c: f8 00 08 57 calli 8003298 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 8001140: 44 20 00 16 be r1,r0,8001198 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 8001144: 78 0c 08 01 mvhi r12,0x801 8001148: 39 8c e7 28 ori r12,r12,0xe728 800114c: 29 61 00 00 lw r1,(r11+0) 8001150: 29 8b 00 00 lw r11,(r12+0) 8001154: f8 00 0b d7 calli 80040b0 <_Protected_heap_Get_size> 8001158: b4 2b 08 00 add r1,r1,r11 800115c: 59 81 00 00 sw (r12+0),r1 printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 8001160: 2b 9d 00 04 lw ra,(sp+4) 8001164: 2b 8b 00 10 lw r11,(sp+16) 8001168: 2b 8c 00 0c lw r12,(sp+12) 800116c: 2b 8d 00 08 lw r13,(sp+8) 8001170: 37 9c 00 10 addi sp,sp,16 8001174: c3 a0 00 00 ret if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 8001178: b9 80 08 00 mv r1,r12 800117c: b9 a0 18 00 mv r3,r13 8001180: f8 00 34 0e calli 800e1b8 * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 8001184: 41 61 00 00 lbu r1,(r11+0) 8001188: 44 20 ff e7 be r1,r0,8001124 800118c: 78 0b 08 01 mvhi r11,0x801 8001190: 39 6b e0 1c ori r11,r11,0xe01c 8001194: e3 ff ff ec bi 8001144 heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 8001198: 34 01 00 1a mvi r1,26 <== NOT EXECUTED 800119c: f8 00 05 e8 calli 800293c <== NOT EXECUTED 080055e8 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 80055e8: 37 9c ff d0 addi sp,sp,-48 <== NOT EXECUTED 80055ec: 5b 8b 00 28 sw (sp+40),r11 <== NOT EXECUTED 80055f0: 5b 8c 00 24 sw (sp+36),r12 <== NOT EXECUTED 80055f4: 5b 8d 00 20 sw (sp+32),r13 <== NOT EXECUTED 80055f8: 5b 8e 00 1c sw (sp+28),r14 <== NOT EXECUTED 80055fc: 5b 8f 00 18 sw (sp+24),r15 <== NOT EXECUTED 8005600: 5b 90 00 14 sw (sp+20),r16 <== NOT EXECUTED 8005604: 5b 91 00 10 sw (sp+16),r17 <== NOT EXECUTED 8005608: 5b 92 00 0c sw (sp+12),r18 <== NOT EXECUTED 800560c: 5b 93 00 08 sw (sp+8),r19 <== NOT EXECUTED 8005610: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8005614: b8 20 58 00 mv r11,r1 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 8005618: 44 20 00 37 be r1,r0,80056f4 <== NOT EXECUTED return; if ( !print_handler ) 800561c: 78 0d 08 07 mvhi r13,0x807 <== NOT EXECUTED 8005620: 39 ad 45 2c ori r13,r13,0x452c <== NOT EXECUTED 8005624: 29 b0 00 00 lw r16,(r13+0) <== NOT EXECUTED 8005628: 46 00 00 33 be r16,r0,80056f4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 800562c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8005630: 45 61 00 4d be r11,r1,8005764 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 8005634: 29 71 01 14 lw r17,(r11+276) <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 8005638: 35 6e 00 c4 addi r14,r11,196 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 800563c: 29 cc 00 04 lw r12,(r14+4) <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 8005640: 29 cf 00 00 lw r15,(r14+0) <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 8005644: 35 8c 00 10 addi r12,r12,16 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 8005648: 35 ef ff f0 addi r15,r15,-16 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 800564c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8005650: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8005654: fb ff ff c3 calli 8005560 <== NOT EXECUTED if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); 8005658: b5 8f 60 00 add r12,r12,r15 <== NOT EXECUTED 800565c: c9 81 90 00 sub r18,r12,r1 <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 8005660: 44 20 00 37 be r1,r0,800573c <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 8005664: 45 60 00 38 be r11,r0,8005744 <== NOT EXECUTED (*print_handler)( 8005668: 29 6b 00 08 lw r11,(r11+8) <== NOT EXECUTED 800566c: 78 0c 08 07 mvhi r12,0x807 <== NOT EXECUTED 8005670: 39 8c 45 28 ori r12,r12,0x4528 <== NOT EXECUTED 8005674: 29 93 00 00 lw r19,(r12+0) <== NOT EXECUTED 8005678: 37 83 00 2c addi r3,sp,44 <== NOT EXECUTED 800567c: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8005680: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005684: f8 00 13 49 calli 800a3a8 <== NOT EXECUTED 8005688: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 800568c: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 8005690: 38 42 6b 68 ori r2,r2,0x6b68 <== NOT EXECUTED 8005694: ba 60 08 00 mv r1,r19 <== NOT EXECUTED 8005698: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 800569c: da 00 00 00 call r16 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 80056a0: 29 c4 00 00 lw r4,(r14+0) <== NOT EXECUTED 80056a4: 29 c3 00 04 lw r3,(r14+4) <== NOT EXECUTED 80056a8: 29 a7 00 00 lw r7,(r13+0) <== NOT EXECUTED 80056ac: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 80056b0: 34 84 ff ff addi r4,r4,-1 <== NOT EXECUTED 80056b4: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80056b8: 38 42 6b 88 ori r2,r2,0x6b88 <== NOT EXECUTED 80056bc: b4 64 20 00 add r4,r3,r4 <== NOT EXECUTED 80056c0: ba 20 28 00 mv r5,r17 <== NOT EXECUTED 80056c4: b9 e0 30 00 mv r6,r15 <== NOT EXECUTED 80056c8: d8 e0 00 00 call r7 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 80056cc: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 80056d0: 38 42 45 24 ori r2,r2,0x4524 <== NOT EXECUTED 80056d4: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 80056d8: 44 20 00 13 be r1,r0,8005724 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 80056dc: 29 a4 00 00 lw r4,(r13+0) <== NOT EXECUTED 80056e0: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 80056e4: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80056e8: 38 42 6b b8 ori r2,r2,0x6bb8 <== NOT EXECUTED 80056ec: ba 40 18 00 mv r3,r18 <== NOT EXECUTED 80056f0: d8 80 00 00 call r4 <== NOT EXECUTED } } 80056f4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80056f8: 2b 8b 00 28 lw r11,(sp+40) <== NOT EXECUTED 80056fc: 2b 8c 00 24 lw r12,(sp+36) <== NOT EXECUTED 8005700: 2b 8d 00 20 lw r13,(sp+32) <== NOT EXECUTED 8005704: 2b 8e 00 1c lw r14,(sp+28) <== NOT EXECUTED 8005708: 2b 8f 00 18 lw r15,(sp+24) <== NOT EXECUTED 800570c: 2b 90 00 14 lw r16,(sp+20) <== NOT EXECUTED 8005710: 2b 91 00 10 lw r17,(sp+16) <== NOT EXECUTED 8005714: 2b 92 00 0c lw r18,(sp+12) <== NOT EXECUTED 8005718: 2b 93 00 08 lw r19,(sp+8) <== NOT EXECUTED 800571c: 37 9c 00 30 addi sp,sp,48 <== NOT EXECUTED 8005720: c3 a0 00 00 ret <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 8005724: 29 a3 00 00 lw r3,(r13+0) <== NOT EXECUTED 8005728: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 800572c: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8005730: 38 42 6b a8 ori r2,r2,0x6ba8 <== NOT EXECUTED 8005734: d8 60 00 00 call r3 <== NOT EXECUTED 8005738: e3 ff ff ef bi 80056f4 <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 800573c: b8 20 90 00 mv r18,r1 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 8005740: 5d 60 ff ca bne r11,r0,8005668 <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 8005744: 78 0c 08 07 mvhi r12,0x807 <== NOT EXECUTED 8005748: 39 8c 45 28 ori r12,r12,0x4528 <== NOT EXECUTED 800574c: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8005750: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8005754: 38 42 6b 78 ori r2,r2,0x6b78 <== NOT EXECUTED 8005758: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 800575c: da 00 00 00 call r16 <== NOT EXECUTED 8005760: e3 ff ff d0 bi 80056a0 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 8005764: 78 0e 08 07 mvhi r14,0x807 <== NOT EXECUTED 8005768: 39 ce 6f 00 ori r14,r14,0x6f00 <== NOT EXECUTED 800576c: 29 c1 00 04 lw r1,(r14+4) <== NOT EXECUTED 8005770: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 8005774: b9 60 88 00 mv r17,r11 <== NOT EXECUTED 8005778: 5c 2b ff b1 bne r1,r11,800563c <== NOT EXECUTED 800577c: e3 ff ff de bi 80056f4 <== NOT EXECUTED 08005560 : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 8005560: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED 8005564: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8005568: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 800556c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8005570: b8 20 60 00 mv r12,r1 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 8005574: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8005578: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 800557c: fb ff ef 21 calli 8001200 <__lshrsi3> <== NOT EXECUTED 8005580: 34 02 00 02 mvi r2,2 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 8005584: 35 8b 00 10 addi r11,r12,16 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 8005588: fb ff ee f6 calli 8001160 <__ashlsi3> <== NOT EXECUTED 800558c: b5 61 10 00 add r2,r11,r1 <== NOT EXECUTED 8005590: 51 62 00 08 bgeu r11,r2,80055b0 <== NOT EXECUTED if (*base != U32_PATTERN) 8005594: 29 84 00 10 lw r4,(r12+16) <== NOT EXECUTED 8005598: 78 03 a5 a5 mvhi r3,0xa5a5 <== NOT EXECUTED 800559c: 38 63 a5 a5 ori r3,r3,0xa5a5 <== NOT EXECUTED 80055a0: b8 80 08 00 mv r1,r4 <== NOT EXECUTED 80055a4: 5c 83 00 0b bne r4,r3,80055d0 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 80055a8: 35 6b 00 04 addi r11,r11,4 <== NOT EXECUTED 80055ac: 54 4b 00 07 bgu r2,r11,80055c8 <== NOT EXECUTED 80055b0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 80055b4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80055b8: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 80055bc: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 80055c0: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 80055c4: c3 a0 00 00 ret <== NOT EXECUTED * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) 80055c8: 29 63 00 00 lw r3,(r11+0) <== NOT EXECUTED 80055cc: 44 61 ff f7 be r3,r1,80055a8 <== NOT EXECUTED return (void *) base; 80055d0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED #endif return (void *)0; } 80055d4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80055d8: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 80055dc: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 80055e0: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 80055e4: c3 a0 00 00 ret <== NOT EXECUTED 08005834 : * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 8005834: 37 9c ff d0 addi sp,sp,-48 <== NOT EXECUTED 8005838: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 800583c: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8005840: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8005844: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8005848: b8 20 58 00 mv r11,r1 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); char name [32]; printk("BLOWN STACK!!!\n"); 800584c: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8005850: 38 21 6c 24 ori r1,r1,0x6c24 <== NOT EXECUTED * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 8005854: 20 4c 00 ff andi r12,r2,0xff <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 8005858: 29 6d 00 c8 lw r13,(r11+200) <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 800585c: f8 00 0d d1 calli 8008fa0 <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 8005860: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8005864: 38 21 6c 34 ori r1,r1,0x6c34 <== NOT EXECUTED 8005868: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800586c: f8 00 0d cd calli 8008fa0 <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 8005870: 29 62 00 08 lw r2,(r11+8) <== NOT EXECUTED 8005874: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8005878: 38 21 6c 54 ori r1,r1,0x6c54 <== NOT EXECUTED 800587c: f8 00 0d c9 calli 8008fa0 <== NOT EXECUTED printk( 8005880: 29 62 00 0c lw r2,(r11+12) <== NOT EXECUTED 8005884: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8005888: 38 21 6c 68 ori r1,r1,0x6c68 <== NOT EXECUTED 800588c: f8 00 0d c5 calli 8008fa0 <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 8005890: 29 61 00 08 lw r1,(r11+8) <== NOT EXECUTED 8005894: 37 83 00 14 addi r3,sp,20 <== NOT EXECUTED 8005898: 34 02 00 20 mvi r2,32 <== NOT EXECUTED 800589c: f8 00 12 c3 calli 800a3a8 <== NOT EXECUTED 80058a0: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 80058a4: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 80058a8: 38 21 6c 7c ori r1,r1,0x6c7c <== NOT EXECUTED 80058ac: f8 00 0d bd calli 8008fa0 <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 80058b0: 29 62 00 c4 lw r2,(r11+196) <== NOT EXECUTED 80058b4: 29 63 00 c8 lw r3,(r11+200) <== NOT EXECUTED 80058b8: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 80058bc: 38 21 6c 94 ori r1,r1,0x6c94 <== NOT EXECUTED 80058c0: b4 62 20 00 add r4,r3,r2 <== NOT EXECUTED 80058c4: f8 00 0d b7 calli 8008fa0 <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 80058c8: 45 80 00 03 be r12,r0,80058d4 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 80058cc: 34 01 00 81 mvi r1,129 <== NOT EXECUTED 80058d0: f8 00 15 68 calli 800ae70 <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 80058d4: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 80058d8: 38 21 6c c8 ori r1,r1,0x6cc8 <== NOT EXECUTED 80058dc: 35 a4 00 18 addi r4,r13,24 <== NOT EXECUTED 80058e0: 34 02 00 10 mvi r2,16 <== NOT EXECUTED 80058e4: 35 a3 00 08 addi r3,r13,8 <== NOT EXECUTED 80058e8: f8 00 0d ae calli 8008fa0 <== NOT EXECUTED 80058ec: e3 ff ff f8 bi 80058cc <== NOT EXECUTED 08015214 <_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 ) { 8015214: 37 9c ff e4 addi sp,sp,-28 8015218: 5b 8b 00 1c sw (sp+28),r11 801521c: 5b 8c 00 18 sw (sp+24),r12 8015220: 5b 8d 00 14 sw (sp+20),r13 8015224: 5b 8e 00 10 sw (sp+16),r14 8015228: 5b 8f 00 0c sw (sp+12),r15 801522c: 5b 90 00 08 sw (sp+8),r16 8015230: 5b 9d 00 04 sw (sp+4),ra 8015234: b8 20 70 00 mv r14,r1 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 8015238: 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 ) { 801523c: b8 60 60 00 mv r12,r3 8015240: b8 40 78 00 mv r15,r2 8015244: b8 c0 80 00 mv r16,r6 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 8015248: 50 23 00 0b bgeu r1,r3,8015274 <_CORE_message_queue_Broadcast+0x60> 801524c: 34 01 00 01 mvi r1,1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 8015250: 2b 9d 00 04 lw ra,(sp+4) 8015254: 2b 8b 00 1c lw r11,(sp+28) 8015258: 2b 8c 00 18 lw r12,(sp+24) 801525c: 2b 8d 00 14 lw r13,(sp+20) 8015260: 2b 8e 00 10 lw r14,(sp+16) 8015264: 2b 8f 00 0c lw r15,(sp+12) 8015268: 2b 90 00 08 lw r16,(sp+8) 801526c: 37 9c 00 1c addi sp,sp,28 8015270: c3 a0 00 00 ret * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 8015274: 29 c2 00 48 lw r2,(r14+72) 8015278: 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))) { 801527c: b8 40 68 00 mv r13,r2 * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 8015280: 44 41 00 08 be r2,r1,80152a0 <_CORE_message_queue_Broadcast+0x8c> *count = 0; 8015284: 58 c1 00 00 sw (r6+0),r1 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 8015288: e3 ff ff f2 bi 8015250 <_CORE_message_queue_Broadcast+0x3c> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 801528c: 29 61 00 2c lw r1,(r11+44) */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 8015290: 35 ad 00 01 addi r13,r13,1 8015294: f8 00 2f d8 calli 80211f4 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 8015298: 29 61 00 28 lw r1,(r11+40) 801529c: 58 2c 00 00 sw (r1+0),r12 * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 80152a0: b9 c0 08 00 mv r1,r14 80152a4: f8 00 0c d1 calli 80185e8 <_Thread_queue_Dequeue> 80152a8: b8 20 58 00 mv r11,r1 80152ac: b9 e0 10 00 mv r2,r15 80152b0: b9 80 18 00 mv r3,r12 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 80152b4: 5c 20 ff f6 bne r1,r0,801528c <_CORE_message_queue_Broadcast+0x78> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 80152b8: 5a 0d 00 00 sw (r16+0),r13 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 80152bc: e3 ff ff e5 bi 8015250 <_CORE_message_queue_Broadcast+0x3c> 080096b4 <_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 ) { 80096b4: 37 9c ff f8 addi sp,sp,-8 80096b8: 5b 8b 00 08 sw (sp+8),r11 80096bc: 5b 9d 00 04 sw (sp+4),ra 80096c0: 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)) ) { 80096c4: fb ff ed 41 calli 8004bc8 <_Thread_queue_Dequeue> 80096c8: 34 02 00 00 mvi r2,0 80096cc: 44 22 00 06 be r1,r2,80096e4 <_CORE_semaphore_Surrender+0x30> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 80096d0: b8 40 08 00 mv r1,r2 80096d4: 2b 9d 00 04 lw ra,(sp+4) 80096d8: 2b 8b 00 08 lw r11,(sp+8) 80096dc: 37 9c 00 08 addi sp,sp,8 80096e0: c3 a0 00 00 ret if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 80096e4: 90 00 08 00 rcsr r1,IE 80096e8: 34 02 ff fe mvi r2,-2 80096ec: a0 22 10 00 and r2,r1,r2 80096f0: d0 02 00 00 wcsr IE,r2 if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 80096f4: 29 62 00 48 lw r2,(r11+72) 80096f8: 29 63 00 40 lw r3,(r11+64) 80096fc: 54 62 00 08 bgu r3,r2,800971c <_CORE_semaphore_Surrender+0x68> 8009700: 34 02 00 04 mvi r2,4 <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 8009704: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED } return status; } 8009708: b8 40 08 00 mv r1,r2 800970c: 2b 9d 00 04 lw ra,(sp+4) 8009710: 2b 8b 00 08 lw r11,(sp+8) 8009714: 37 9c 00 08 addi sp,sp,8 8009718: c3 a0 00 00 ret #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 800971c: 34 42 00 01 addi r2,r2,1 8009720: 59 62 00 48 sw (r11+72),r2 8009724: 34 02 00 00 mvi r2,0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 8009728: d0 01 00 00 wcsr IE,r1 800972c: e3 ff ff f7 bi 8009708 <_CORE_semaphore_Surrender+0x54> 0800f3bc <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 800f3bc: 37 9c ff f8 addi sp,sp,-8 800f3c0: 5b 9d 00 04 sw (sp+4),ra Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 800f3c4: 37 82 00 08 addi r2,sp,8 800f3c8: fb ff de c8 calli 8006ee8 <_Thread_Get> switch ( location ) { 800f3cc: 2b 82 00 08 lw r2,(sp+8) 800f3d0: 44 40 00 04 be r2,r0,800f3e0 <_Event_Timeout+0x24> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 800f3d4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800f3d8: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 800f3dc: c3 a0 00 00 ret <== NOT EXECUTED * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 800f3e0: 90 00 18 00 rcsr r3,IE 800f3e4: 34 02 ff fe mvi r2,-2 800f3e8: a0 62 10 00 and r2,r3,r2 800f3ec: d0 02 00 00 wcsr IE,r2 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 800f3f0: 78 02 08 02 mvhi r2,0x802 800f3f4: 38 42 6a 00 ori r2,r2,0x6a00 800f3f8: 28 42 00 00 lw r2,(r2+0) _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 800f3fc: 34 04 00 00 mvi r4,0 800f400: 58 24 00 24 sw (r1+36),r4 if ( _Thread_Is_executing( the_thread ) ) { 800f404: 44 22 00 0f be r1,r2,800f440 <_Event_Timeout+0x84> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 800f408: 34 02 00 06 mvi r2,6 800f40c: 58 22 00 34 sw (r1+52),r2 _ISR_Enable( level ); 800f410: d0 03 00 00 wcsr IE,r3 800f414: 78 02 10 03 mvhi r2,0x1003 800f418: 38 42 ff f8 ori r2,r2,0xfff8 800f41c: f8 00 05 72 calli 80109e4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 800f420: 78 01 08 02 mvhi r1,0x802 800f424: 38 21 69 44 ori r1,r1,0x6944 800f428: 28 22 00 00 lw r2,(r1+0) 800f42c: 34 42 ff ff addi r2,r2,-1 800f430: 58 22 00 00 sw (r1+0),r2 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 800f434: 2b 9d 00 04 lw ra,(sp+4) 800f438: 37 9c 00 08 addi sp,sp,8 800f43c: c3 a0 00 00 ret } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 800f440: 78 02 08 02 mvhi r2,0x802 800f444: 38 42 72 ec ori r2,r2,0x72ec 800f448: 28 45 00 00 lw r5,(r2+0) 800f44c: 34 04 00 01 mvi r4,1 800f450: 5c a4 ff ee bne r5,r4,800f408 <_Event_Timeout+0x4c> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 800f454: 34 04 00 02 mvi r4,2 800f458: 58 44 00 00 sw (r2+0),r4 800f45c: e3 ff ff eb bi 800f408 <_Event_Timeout+0x4c> 0800fb50 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 800fb50: 37 9c ff e8 addi sp,sp,-24 800fb54: 5b 8b 00 14 sw (sp+20),r11 800fb58: 5b 8c 00 10 sw (sp+16),r12 800fb5c: 5b 8d 00 0c sw (sp+12),r13 800fb60: 5b 8e 00 08 sw (sp+8),r14 800fb64: 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; 800fb68: 28 2c 00 18 lw r12,(r1+24) uintptr_t const heap_area_end = heap->area_end; 800fb6c: 28 25 00 1c lw r5,(r1+28) Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 800fb70: 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; 800fb74: f0 4c 60 00 cmpgeu r12,r2,r12 * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 800fb78: f4 a2 08 00 cmpgu r1,r5,r2 uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 800fb7c: 29 6d 00 24 lw r13,(r11+36) uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 800fb80: a0 2c 60 00 and r12,r1,r12 800fb84: 34 01 00 01 mvi r1,1 800fb88: 5d 80 00 03 bne r12,r0,800fb94 <_Heap_Extend+0x44> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 800fb8c: 34 01 00 02 mvi r1,2 800fb90: 44 45 00 08 be r2,r5,800fbb0 <_Heap_Extend+0x60> _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 800fb94: 2b 9d 00 04 lw ra,(sp+4) 800fb98: 2b 8b 00 14 lw r11,(sp+20) 800fb9c: 2b 8c 00 10 lw r12,(sp+16) 800fba0: 2b 8d 00 0c lw r13,(sp+12) 800fba4: 2b 8e 00 08 lw r14,(sp+8) 800fba8: 37 9c 00 18 addi sp,sp,24 800fbac: c3 a0 00 00 ret { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 800fbb0: b4 43 18 00 add r3,r2,r3 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 800fbb4: c8 6d 70 00 sub r14,r3,r13 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 800fbb8: 29 62 00 10 lw r2,(r11+16) 800fbbc: 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; 800fbc0: 59 63 00 1c sw (r11+28),r3 800fbc4: b9 c0 08 00 mv r1,r14 800fbc8: 5b 84 00 18 sw (sp+24),r4 800fbcc: fb ff d2 53 calli 8004518 <__umodsi3> extend_size = new_heap_area_end - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 800fbd0: 2b 84 00 18 lw r4,(sp+24) 800fbd4: c9 c1 08 00 sub r1,r14,r1 800fbd8: 58 81 00 00 sw (r4+0),r1 if( extend_size >= heap->min_block_size ) { 800fbdc: 29 62 00 14 lw r2,(r11+20) 800fbe0: 50 22 00 09 bgeu r1,r2,800fc04 <_Heap_Extend+0xb4> /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 800fbe4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED } return HEAP_EXTEND_SUCCESSFUL; } 800fbe8: 2b 9d 00 04 lw ra,(sp+4) 800fbec: 2b 8b 00 14 lw r11,(sp+20) 800fbf0: 2b 8c 00 10 lw r12,(sp+16) 800fbf4: 2b 8d 00 0c lw r13,(sp+12) 800fbf8: 2b 8e 00 08 lw r14,(sp+8) 800fbfc: 37 9c 00 18 addi sp,sp,24 800fc00: c3 a0 00 00 ret uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 800fc04: 29 a4 00 04 lw r4,(r13+4) if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 800fc08: 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); 800fc0c: b4 2d 10 00 add r2,r1,r13 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 800fc10: 20 84 00 01 andi r4,r4,0x1 800fc14: b8 24 20 00 or r4,r1,r4 800fc18: c8 62 18 00 sub r3,r3,r2 800fc1c: 59 a4 00 04 sw (r13+4),r4 800fc20: 38 63 00 01 ori r3,r3,0x1 800fc24: 58 43 00 04 sw (r2+4),r3 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 800fc28: 29 65 00 2c lw r5,(r11+44) ++stats->used_blocks; 800fc2c: 29 64 00 40 lw r4,(r11+64) --stats->frees; /* Do not count subsequent call as actual free() */ 800fc30: 29 63 00 50 lw r3,(r11+80) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 800fc34: b4 a1 08 00 add r1,r5,r1 ++stats->used_blocks; 800fc38: 34 84 00 01 addi r4,r4,1 --stats->frees; /* Do not count subsequent call as actual free() */ 800fc3c: 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; 800fc40: 59 62 00 24 sw (r11+36),r2 /* Statistics */ stats->size += extend_size; 800fc44: 59 61 00 2c sw (r11+44),r1 ++stats->used_blocks; 800fc48: 59 64 00 40 sw (r11+64),r4 --stats->frees; /* Do not count subsequent call as actual free() */ 800fc4c: 59 63 00 50 sw (r11+80),r3 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 800fc50: b9 60 08 00 mv r1,r11 800fc54: 35 a2 00 08 addi r2,r13,8 800fc58: fb ff e3 18 calli 80088b8 <_Heap_Free> 800fc5c: b9 80 08 00 mv r1,r12 800fc60: e3 ff ff e2 bi 800fbe8 <_Heap_Extend+0x98> 08003ed8 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 8003ed8: 37 9c ff a8 addi sp,sp,-88 8003edc: 5b 8b 00 50 sw (sp+80),r11 8003ee0: 5b 8c 00 4c sw (sp+76),r12 8003ee4: 5b 8d 00 48 sw (sp+72),r13 8003ee8: 5b 8e 00 44 sw (sp+68),r14 8003eec: 5b 8f 00 40 sw (sp+64),r15 8003ef0: 5b 90 00 3c sw (sp+60),r16 8003ef4: 5b 91 00 38 sw (sp+56),r17 8003ef8: 5b 92 00 34 sw (sp+52),r18 8003efc: 5b 93 00 30 sw (sp+48),r19 8003f00: 5b 94 00 2c sw (sp+44),r20 8003f04: 5b 95 00 28 sw (sp+40),r21 8003f08: 5b 96 00 24 sw (sp+36),r22 8003f0c: 5b 97 00 20 sw (sp+32),r23 8003f10: 5b 98 00 1c sw (sp+28),r24 8003f14: 5b 99 00 18 sw (sp+24),r25 8003f18: 5b 9b 00 14 sw (sp+20),fp 8003f1c: 5b 9d 00 10 sw (sp+16),ra 8003f20: 20 63 00 ff andi r3,r3,0xff 8003f24: b8 20 58 00 mv r11,r1 8003f28: b8 40 80 00 mv r16,r2 uintptr_t const page_size = heap->page_size; 8003f2c: 28 32 00 10 lw r18,(r1+16) uintptr_t const min_block_size = heap->min_block_size; 8003f30: 28 33 00 14 lw r19,(r1+20) Heap_Block *const last_block = heap->last_block; 8003f34: 28 34 00 24 lw r20,(r1+36) Heap_Block *block = heap->first_block; 8003f38: 28 2c 00 20 lw r12,(r1+32) Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 8003f3c: 5c 60 00 1c bne r3,r0,8003fac <_Heap_Walk+0xd4> if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003f40: 78 03 08 02 mvhi r3,0x802 8003f44: 38 63 1a 88 ori r3,r3,0x1a88 8003f48: 28 63 00 00 lw r3,(r3+0) uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 8003f4c: 78 0f 08 00 mvhi r15,0x800 if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003f50: 34 02 00 03 mvi r2,3 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 8003f54: 39 ef 3e b4 ori r15,r15,0x3eb4 if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003f58: 44 62 00 1c be r3,r2,8003fc8 <_Heap_Walk+0xf0> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 8003f5c: 34 01 00 01 mvi r1,1 block = next_block; } return true; } 8003f60: 2b 9d 00 10 lw ra,(sp+16) 8003f64: 2b 8b 00 50 lw r11,(sp+80) 8003f68: 2b 8c 00 4c lw r12,(sp+76) 8003f6c: 2b 8d 00 48 lw r13,(sp+72) 8003f70: 2b 8e 00 44 lw r14,(sp+68) 8003f74: 2b 8f 00 40 lw r15,(sp+64) 8003f78: 2b 90 00 3c lw r16,(sp+60) 8003f7c: 2b 91 00 38 lw r17,(sp+56) 8003f80: 2b 92 00 34 lw r18,(sp+52) 8003f84: 2b 93 00 30 lw r19,(sp+48) 8003f88: 2b 94 00 2c lw r20,(sp+44) 8003f8c: 2b 95 00 28 lw r21,(sp+40) 8003f90: 2b 96 00 24 lw r22,(sp+36) 8003f94: 2b 97 00 20 lw r23,(sp+32) 8003f98: 2b 98 00 1c lw r24,(sp+28) 8003f9c: 2b 99 00 18 lw r25,(sp+24) 8003fa0: 2b 9b 00 14 lw fp,(sp+20) 8003fa4: 37 9c 00 58 addi sp,sp,88 8003fa8: c3 a0 00 00 ret Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003fac: 78 03 08 02 mvhi r3,0x802 8003fb0: 38 63 1a 88 ori r3,r3,0x1a88 8003fb4: 28 63 00 00 lw r3,(r3+0) uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 8003fb8: 78 0f 08 00 mvhi r15,0x800 if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003fbc: 34 02 00 03 mvi r2,3 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 8003fc0: 39 ef 44 c4 ori r15,r15,0x44c4 if ( !_System_state_Is_up( _System_state_Get() ) ) { 8003fc4: 5c 62 ff e6 bne r3,r2,8003f5c <_Heap_Walk+0x84> Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 8003fc8: 29 61 00 08 lw r1,(r11+8) 8003fcc: 29 66 00 18 lw r6,(r11+24) 8003fd0: 29 67 00 1c lw r7,(r11+28) 8003fd4: 5b 81 00 08 sw (sp+8),r1 8003fd8: 29 61 00 0c lw r1,(r11+12) 8003fdc: 78 03 08 01 mvhi r3,0x801 8003fe0: 5b 94 00 04 sw (sp+4),r20 8003fe4: 5b 81 00 0c sw (sp+12),r1 8003fe8: 38 63 de 24 ori r3,r3,0xde24 8003fec: ba 00 08 00 mv r1,r16 8003ff0: 34 02 00 00 mvi r2,0 8003ff4: ba 40 20 00 mv r4,r18 8003ff8: ba 60 28 00 mv r5,r19 8003ffc: b9 80 40 00 mv r8,r12 8004000: d9 e0 00 00 call r15 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 8004004: 46 40 00 d1 be r18,r0,8004348 <_Heap_Walk+0x470> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 8004008: 22 4d 00 07 andi r13,r18,0x7 800400c: 5d a0 00 d6 bne r13,r0,8004364 <_Heap_Walk+0x48c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 8004010: ba 60 08 00 mv r1,r19 8004014: ba 40 10 00 mv r2,r18 8004018: fb ff f3 22 calli 8000ca0 <__umodsi3> 800401c: b8 20 88 00 mv r17,r1 8004020: 5c 2d 00 d9 bne r1,r13,8004384 <_Heap_Walk+0x4ac> ); return false; } if ( 8004024: 35 81 00 08 addi r1,r12,8 8004028: ba 40 10 00 mv r2,r18 800402c: fb ff f3 1d calli 8000ca0 <__umodsi3> 8004030: b8 20 70 00 mv r14,r1 8004034: 5c 31 00 ee bne r1,r17,80043ec <_Heap_Walk+0x514> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 8004038: 29 8d 00 04 lw r13,(r12+4) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 800403c: 21 b1 00 01 andi r17,r13,0x1 8004040: 46 21 00 f3 be r17,r1,800440c <_Heap_Walk+0x534> ); return false; } if ( first_block->prev_size != page_size ) { 8004044: 29 84 00 00 lw r4,(r12+0) 8004048: 5e 44 00 60 bne r18,r4,80041c8 <_Heap_Walk+0x2f0> ); return false; } if ( _Heap_Is_free( last_block ) ) { 800404c: 2a 82 00 04 lw r2,(r20+4) 8004050: 34 01 ff fe mvi r1,-2 8004054: a0 41 08 00 and r1,r2,r1 8004058: b6 81 08 00 add r1,r20,r1 800405c: 28 35 00 04 lw r21,(r1+4) 8004060: 22 b5 00 01 andi r21,r21,0x1 8004064: 46 ae 00 f1 be r21,r14,8004428 <_Heap_Walk+0x550> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 8004068: 29 6e 00 08 lw r14,(r11+8) int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 800406c: 29 78 00 10 lw r24,(r11+16) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 8004070: 45 6e 00 24 be r11,r14,8004100 <_Heap_Walk+0x228> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 8004074: 29 76 00 20 lw r22,(r11+32) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 8004078: 56 ce 00 fb bgu r22,r14,8004464 <_Heap_Walk+0x58c> && (uintptr_t) block <= (uintptr_t) heap->last_block; 800407c: 29 79 00 24 lw r25,(r11+36) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 8004080: 55 d9 00 f9 bgu r14,r25,8004464 <_Heap_Walk+0x58c> ); return false; } if ( 8004084: 35 c1 00 08 addi r1,r14,8 8004088: bb 00 10 00 mv r2,r24 800408c: fb ff f3 05 calli 8000ca0 <__umodsi3> 8004090: 5c 20 00 ed bne r1,r0,8004444 <_Heap_Walk+0x56c> ); return false; } if ( _Heap_Is_used( free_block ) ) { 8004094: 29 c2 00 04 lw r2,(r14+4) 8004098: 34 17 ff fe mvi r23,-2 800409c: a0 57 10 00 and r2,r2,r23 80040a0: b5 c2 10 00 add r2,r14,r2 80040a4: 28 42 00 04 lw r2,(r2+4) 80040a8: 20 42 00 01 andi r2,r2,0x1 80040ac: 5c 41 00 fe bne r2,r1,80044a4 <_Heap_Walk+0x5cc> ); return false; } if ( free_block->prev != prev_block ) { 80040b0: 29 c5 00 0c lw r5,(r14+12) 80040b4: 45 65 00 10 be r11,r5,80040f4 <_Heap_Walk+0x21c> 80040b8: e0 00 00 f3 bi 8004484 <_Heap_Walk+0x5ac> <== NOT EXECUTED 80040bc: 56 ce 00 ea bgu r22,r14,8004464 <_Heap_Walk+0x58c> ); return false; } if ( 80040c0: 35 c1 00 08 addi r1,r14,8 80040c4: bb 00 10 00 mv r2,r24 80040c8: 55 d9 00 e7 bgu r14,r25,8004464 <_Heap_Walk+0x58c> 80040cc: fb ff f2 f5 calli 8000ca0 <__umodsi3> 80040d0: 5c 20 00 dd bne r1,r0,8004444 <_Heap_Walk+0x56c> ); return false; } if ( _Heap_Is_used( free_block ) ) { 80040d4: 29 c3 00 04 lw r3,(r14+4) 80040d8: a0 77 18 00 and r3,r3,r23 80040dc: b4 6e 18 00 add r3,r3,r14 80040e0: 28 63 00 04 lw r3,(r3+4) 80040e4: 20 63 00 01 andi r3,r3,0x1 80040e8: 5c 61 00 ef bne r3,r1,80044a4 <_Heap_Walk+0x5cc> ); return false; } if ( free_block->prev != prev_block ) { 80040ec: 29 c5 00 0c lw r5,(r14+12) 80040f0: 5c b5 00 e5 bne r5,r21,8004484 <_Heap_Walk+0x5ac> (*printer)( 80040f4: b9 c0 a8 00 mv r21,r14 return false; } prev_block = free_block; free_block = free_block->next; 80040f8: 29 ce 00 08 lw r14,(r14+8) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 80040fc: 5d 6e ff f0 bne r11,r14,80040bc <_Heap_Walk+0x1e4> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 8004100: 46 8c ff 97 be r20,r12,8003f5c <_Heap_Walk+0x84> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 8004104: 78 01 08 01 mvhi r1,0x801 8004108: 5b 81 00 54 sw (sp+84),r1 "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 800410c: 78 01 08 01 mvhi r1,0x801 8004110: 5b 81 00 58 sw (sp+88),r1 block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 8004114: 2b 81 00 54 lw r1,(sp+84) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 8004118: 34 16 ff fe mvi r22,-2 800411c: 78 15 08 01 mvhi r21,0x801 8004120: 38 21 e1 7c ori r1,r1,0xe17c 8004124: 5b 81 00 54 sw (sp+84),r1 "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 8004128: 2b 81 00 58 lw r1,(sp+88) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 800412c: 78 18 08 01 mvhi r24,0x801 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 8004130: 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)" : ""), 8004134: 38 21 e1 64 ori r1,r1,0xe164 - 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; 8004138: a1 b6 68 00 and r13,r13,r22 800413c: 5b 81 00 58 sw (sp+88),r1 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 8004140: ba 20 10 00 mv r2,r17 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 8004144: 3a b5 e1 ec ori r21,r21,0xe1ec 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)( 8004148: 3b 18 e1 70 ori r24,r24,0xe170 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 800414c: 3a f7 e1 58 ori r23,r23,0xe158 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 8004150: 78 1b 08 01 mvhi fp,0x801 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 8004154: b5 ac 70 00 add r14,r13,r12 uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 8004158: 44 40 00 59 be r2,r0,80042bc <_Heap_Walk+0x3e4> (*printer)( 800415c: 78 03 08 01 mvhi r3,0x801 8004160: ba 00 08 00 mv r1,r16 8004164: 34 02 00 00 mvi r2,0 8004168: 38 63 e0 58 ori r3,r3,0xe058 800416c: b9 80 20 00 mv r4,r12 8004170: b9 a0 28 00 mv r5,r13 8004174: d9 e0 00 00 call r15 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 8004178: 29 63 00 20 lw r3,(r11+32) 800417c: 54 6e 00 8a bgu r3,r14,80043a4 <_Heap_Walk+0x4cc> 8004180: 29 61 00 24 lw r1,(r11+36) 8004184: 55 c1 00 88 bgu r14,r1,80043a4 <_Heap_Walk+0x4cc> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 8004188: b9 a0 08 00 mv r1,r13 800418c: ba 40 10 00 mv r2,r18 8004190: fb ff f2 c4 calli 8000ca0 <__umodsi3> 8004194: b8 20 88 00 mv r17,r1 8004198: 5c 20 00 8c bne r1,r0,80043c8 <_Heap_Walk+0x4f0> ); return false; } if ( block_size < min_block_size ) { 800419c: 51 b3 00 13 bgeu r13,r19,80041e8 <_Heap_Walk+0x310> (*printer)( 80041a0: 78 03 08 01 mvhi r3,0x801 80041a4: ba 00 08 00 mv r1,r16 80041a8: 38 63 e0 f8 ori r3,r3,0xe0f8 80041ac: b9 80 20 00 mv r4,r12 80041b0: b9 a0 28 00 mv r5,r13 80041b4: ba 60 30 00 mv r6,r19 80041b8: 34 02 00 01 mvi r2,1 80041bc: d9 e0 00 00 call r15 80041c0: ba 20 08 00 mv r1,r17 block, block_size, min_block_size ); return false; 80041c4: e3 ff ff 67 bi 8003f60 <_Heap_Walk+0x88> return false; } if ( first_block->prev_size != page_size ) { (*printer)( 80041c8: 78 03 08 01 mvhi r3,0x801 80041cc: ba 00 08 00 mv r1,r16 80041d0: 38 63 df 74 ori r3,r3,0xdf74 80041d4: ba 40 28 00 mv r5,r18 80041d8: 34 02 00 01 mvi r2,1 80041dc: d9 e0 00 00 call r15 80041e0: b9 c0 08 00 mv r1,r14 80041e4: e3 ff ff 5f bi 8003f60 <_Heap_Walk+0x88> ); return false; } if ( next_block_begin <= block_begin ) { 80041e8: 55 cc 00 0a bgu r14,r12,8004210 <_Heap_Walk+0x338> (*printer)( 80041ec: 78 03 08 01 mvhi r3,0x801 80041f0: ba 00 08 00 mv r1,r16 80041f4: 38 63 e1 24 ori r3,r3,0xe124 80041f8: b9 80 20 00 mv r4,r12 80041fc: b9 c0 28 00 mv r5,r14 8004200: 34 02 00 01 mvi r2,1 8004204: d9 e0 00 00 call r15 8004208: ba 20 08 00 mv r1,r17 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 800420c: e3 ff ff 55 bi 8003f60 <_Heap_Walk+0x88> } if ( !_Heap_Is_prev_used( next_block ) ) { 8004210: 29 c3 00 04 lw r3,(r14+4) 8004214: 20 63 00 01 andi r3,r3,0x1 8004218: 5c 60 00 22 bne r3,r0,80042a0 <_Heap_Walk+0x3c8> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 800421c: 29 91 00 04 lw r17,(r12+4) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 8004220: 29 85 00 0c lw r5,(r12+12) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 8004224: 29 61 00 08 lw r1,(r11+8) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 8004228: a2 36 68 00 and r13,r17,r22 return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 800422c: 29 63 00 0c lw r3,(r11+12) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 8004230: b5 8d c8 00 add r25,r12,r13 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 8004234: ba e0 30 00 mv r6,r23 8004238: 44 25 00 03 be r1,r5,8004244 <_Heap_Walk+0x36c> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 800423c: ba a0 30 00 mv r6,r21 8004240: 44 ab 00 40 be r5,r11,8004340 <_Heap_Walk+0x468> Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 8004244: 29 87 00 08 lw r7,(r12+8) 8004248: bb 00 40 00 mv r8,r24 800424c: 44 67 00 03 be r3,r7,8004258 <_Heap_Walk+0x380> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 8004250: ba a0 40 00 mv r8,r21 8004254: 44 eb 00 39 be r7,r11,8004338 <_Heap_Walk+0x460> Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 8004258: 78 03 08 01 mvhi r3,0x801 800425c: ba 00 08 00 mv r1,r16 8004260: 34 02 00 00 mvi r2,0 8004264: 38 63 e1 88 ori r3,r3,0xe188 8004268: b9 80 20 00 mv r4,r12 800426c: d9 e0 00 00 call r15 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 8004270: 2b 26 00 00 lw r6,(r25+0) 8004274: 45 a6 00 1a be r13,r6,80042dc <_Heap_Walk+0x404> (*printer)( 8004278: 78 03 08 01 mvhi r3,0x801 800427c: ba 00 08 00 mv r1,r16 8004280: 38 63 e1 b4 ori r3,r3,0xe1b4 8004284: b9 80 20 00 mv r4,r12 8004288: b9 a0 28 00 mv r5,r13 800428c: bb 20 38 00 mv r7,r25 8004290: 34 02 00 01 mvi r2,1 8004294: d9 e0 00 00 call r15 8004298: 34 01 00 00 mvi r1,0 800429c: e3 ff ff 31 bi 8003f60 <_Heap_Walk+0x88> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 80042a0: 46 8e ff 2f be r20,r14,8003f5c <_Heap_Walk+0x84> const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 80042a4: 29 cd 00 04 lw r13,(r14+4) 80042a8: b9 c0 60 00 mv r12,r14 80042ac: 21 a2 00 01 andi r2,r13,0x1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 80042b0: a1 b6 68 00 and r13,r13,r22 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 80042b4: b5 ac 70 00 add r14,r13,r12 uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 80042b8: 5c 40 ff a9 bne r2,r0,800415c <_Heap_Walk+0x284> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 80042bc: 29 86 00 00 lw r6,(r12+0) 80042c0: bb 60 18 00 mv r3,fp 80042c4: ba 00 08 00 mv r1,r16 80042c8: 38 63 e0 70 ori r3,r3,0xe070 80042cc: b9 80 20 00 mv r4,r12 80042d0: b9 a0 28 00 mv r5,r13 80042d4: d9 e0 00 00 call r15 80042d8: e3 ff ff a8 bi 8004178 <_Heap_Walk+0x2a0> ); return false; } if ( !prev_used ) { 80042dc: 22 31 00 01 andi r17,r17,0x1 80042e0: 46 20 00 0e be r17,r0,8004318 <_Heap_Walk+0x440> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 80042e4: 29 63 00 08 lw r3,(r11+8) ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 80042e8: 44 6b 00 04 be r3,r11,80042f8 <_Heap_Walk+0x420> if ( free_block == block ) { 80042ec: 44 6c ff ed be r3,r12,80042a0 <_Heap_Walk+0x3c8> return true; } free_block = free_block->next; 80042f0: 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 ) { 80042f4: 5c 6b ff fe bne r3,r11,80042ec <_Heap_Walk+0x414> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 80042f8: 78 03 08 01 mvhi r3,0x801 80042fc: ba 00 08 00 mv r1,r16 8004300: 38 63 e2 20 ori r3,r3,0xe220 8004304: b9 80 20 00 mv r4,r12 8004308: 34 02 00 01 mvi r2,1 800430c: d9 e0 00 00 call r15 8004310: 34 01 00 00 mvi r1,0 8004314: e3 ff ff 13 bi 8003f60 <_Heap_Walk+0x88> return false; } if ( !prev_used ) { (*printer)( 8004318: 78 03 08 01 mvhi r3,0x801 800431c: ba 00 08 00 mv r1,r16 8004320: 38 63 e1 f0 ori r3,r3,0xe1f0 8004324: b9 80 20 00 mv r4,r12 8004328: 34 02 00 01 mvi r2,1 800432c: d9 e0 00 00 call r15 8004330: ba 20 08 00 mv r1,r17 8004334: e3 ff ff 0b bi 8003f60 <_Heap_Walk+0x88> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 8004338: 2b 88 00 54 lw r8,(sp+84) 800433c: e3 ff ff c7 bi 8004258 <_Heap_Walk+0x380> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 8004340: 2b 86 00 58 lw r6,(sp+88) 8004344: e3 ff ff c0 bi 8004244 <_Heap_Walk+0x36c> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 8004348: 78 03 08 01 mvhi r3,0x801 800434c: ba 00 08 00 mv r1,r16 8004350: 38 63 de b8 ori r3,r3,0xdeb8 8004354: 34 02 00 01 mvi r2,1 8004358: d9 e0 00 00 call r15 800435c: ba 40 08 00 mv r1,r18 8004360: e3 ff ff 00 bi 8003f60 <_Heap_Walk+0x88> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 8004364: 78 03 08 01 mvhi r3,0x801 8004368: ba 00 08 00 mv r1,r16 800436c: 38 63 de cc ori r3,r3,0xdecc 8004370: ba 40 20 00 mv r4,r18 8004374: 34 02 00 01 mvi r2,1 8004378: d9 e0 00 00 call r15 800437c: 34 01 00 00 mvi r1,0 8004380: e3 ff fe f8 bi 8003f60 <_Heap_Walk+0x88> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 8004384: 78 03 08 01 mvhi r3,0x801 8004388: ba 00 08 00 mv r1,r16 800438c: 38 63 de ec ori r3,r3,0xdeec 8004390: ba 60 20 00 mv r4,r19 8004394: 34 02 00 01 mvi r2,1 8004398: d9 e0 00 00 call r15 800439c: b9 a0 08 00 mv r1,r13 80043a0: e3 ff fe f0 bi 8003f60 <_Heap_Walk+0x88> block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 80043a4: 78 03 08 01 mvhi r3,0x801 80043a8: ba 00 08 00 mv r1,r16 80043ac: 38 63 e0 98 ori r3,r3,0xe098 80043b0: b9 80 20 00 mv r4,r12 80043b4: b9 c0 28 00 mv r5,r14 80043b8: 34 02 00 01 mvi r2,1 80043bc: d9 e0 00 00 call r15 80043c0: 34 01 00 00 mvi r1,0 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 80043c4: e3 ff fe e7 bi 8003f60 <_Heap_Walk+0x88> } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 80043c8: 78 03 08 01 mvhi r3,0x801 80043cc: ba 00 08 00 mv r1,r16 80043d0: 38 63 e0 c8 ori r3,r3,0xe0c8 80043d4: b9 80 20 00 mv r4,r12 80043d8: b9 a0 28 00 mv r5,r13 80043dc: 34 02 00 01 mvi r2,1 80043e0: d9 e0 00 00 call r15 80043e4: 34 01 00 00 mvi r1,0 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 80043e8: e3 ff fe de bi 8003f60 <_Heap_Walk+0x88> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 80043ec: 78 03 08 01 mvhi r3,0x801 80043f0: ba 00 08 00 mv r1,r16 80043f4: 38 63 df 10 ori r3,r3,0xdf10 80043f8: b9 80 20 00 mv r4,r12 80043fc: 34 02 00 01 mvi r2,1 8004400: d9 e0 00 00 call r15 8004404: ba 20 08 00 mv r1,r17 8004408: e3 ff fe d6 bi 8003f60 <_Heap_Walk+0x88> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 800440c: 78 03 08 01 mvhi r3,0x801 8004410: ba 00 08 00 mv r1,r16 8004414: 38 63 df 44 ori r3,r3,0xdf44 8004418: 34 02 00 01 mvi r2,1 800441c: d9 e0 00 00 call r15 8004420: ba 20 08 00 mv r1,r17 8004424: e3 ff fe cf bi 8003f60 <_Heap_Walk+0x88> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 8004428: 78 03 08 01 mvhi r3,0x801 800442c: ba 00 08 00 mv r1,r16 8004430: 38 63 df a0 ori r3,r3,0xdfa0 8004434: 34 02 00 01 mvi r2,1 8004438: d9 e0 00 00 call r15 800443c: ba a0 08 00 mv r1,r21 8004440: e3 ff fe c8 bi 8003f60 <_Heap_Walk+0x88> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 8004444: 78 03 08 01 mvhi r3,0x801 8004448: ba 00 08 00 mv r1,r16 800444c: 38 63 df d8 ori r3,r3,0xdfd8 8004450: b9 c0 20 00 mv r4,r14 8004454: 34 02 00 01 mvi r2,1 8004458: d9 e0 00 00 call r15 800445c: 34 01 00 00 mvi r1,0 8004460: e3 ff fe c0 bi 8003f60 <_Heap_Walk+0x88> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 8004464: 78 03 08 01 mvhi r3,0x801 8004468: ba 00 08 00 mv r1,r16 800446c: 38 63 df b8 ori r3,r3,0xdfb8 8004470: b9 c0 20 00 mv r4,r14 8004474: 34 02 00 01 mvi r2,1 8004478: d9 e0 00 00 call r15 800447c: 34 01 00 00 mvi r1,0 8004480: e3 ff fe b8 bi 8003f60 <_Heap_Walk+0x88> return false; } if ( free_block->prev != prev_block ) { (*printer)( 8004484: 78 03 08 01 mvhi r3,0x801 8004488: ba 00 08 00 mv r1,r16 800448c: 38 63 e0 24 ori r3,r3,0xe024 8004490: b9 c0 20 00 mv r4,r14 8004494: 34 02 00 01 mvi r2,1 8004498: d9 e0 00 00 call r15 800449c: 34 01 00 00 mvi r1,0 80044a0: e3 ff fe b0 bi 8003f60 <_Heap_Walk+0x88> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 80044a4: 78 03 08 01 mvhi r3,0x801 80044a8: ba 00 08 00 mv r1,r16 80044ac: 38 63 e0 08 ori r3,r3,0xe008 80044b0: b9 c0 20 00 mv r4,r14 80044b4: 34 02 00 01 mvi r2,1 80044b8: d9 e0 00 00 call r15 80044bc: 34 01 00 00 mvi r1,0 80044c0: e3 ff fe a8 bi 8003f60 <_Heap_Walk+0x88> 0800374c <_ISR_Handler_initialization>: * * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { 800374c: 37 9c ff f4 addi sp,sp,-12 8003750: 5b 8b 00 0c sw (sp+12),r11 8003754: 5b 8c 00 08 sw (sp+8),r12 8003758: 5b 9d 00 04 sw (sp+4),ra _ISR_Signals_to_thread_executing = false; 800375c: 78 03 08 01 mvhi r3,0x801 _ISR_Nest_level = 0; 8003760: 78 02 08 01 mvhi r2,0x801 * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false; 8003764: 34 04 00 00 mvi r4,0 8003768: 38 63 e9 f8 ori r3,r3,0xe9f8 _ISR_Nest_level = 0; 800376c: 38 42 e9 3c ori r2,r2,0xe93c * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false; 8003770: 30 64 00 00 sb (r3+0),r4 _ISR_Nest_level = 0; 8003774: 58 44 00 00 sw (r2+0),r4 #if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE) _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 8003778: 34 01 00 80 mvi r1,128 void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false; _ISR_Nest_level = 0; 800377c: b8 80 60 00 mv r12,r4 #if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE) _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 8003780: f8 00 09 fe calli 8005f78 <_Workspace_Allocate_or_fatal_error> _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) 8003784: 78 0b 08 01 mvhi r11,0x801 8003788: 78 02 08 01 mvhi r2,0x801 800378c: 38 42 e0 bc ori r2,r2,0xe0bc 8003790: 39 6b e0 c4 ori r11,r11,0xe0c4 8003794: 28 44 00 00 lw r4,(r2+0) 8003798: 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( 800379c: 78 02 08 01 mvhi r2,0x801 80037a0: 38 42 e9 20 ori r2,r2,0xe920 80037a4: 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) ) 80037a8: 50 64 00 05 bgeu r3,r4,80037bc <_ISR_Handler_initialization+0x70> _Internal_error_Occurred( 80037ac: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80037b0: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80037b4: 34 03 00 05 mvi r3,5 <== NOT EXECUTED 80037b8: fb ff ff d6 calli 8003710 <_Internal_error_Occurred> <== NOT EXECUTED INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error( 80037bc: b8 60 08 00 mv r1,r3 80037c0: f8 00 09 ee calli 8005f78 <_Workspace_Allocate_or_fatal_error> Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 80037c4: 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( 80037c8: 78 02 08 01 mvhi r2,0x801 Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 80037cc: 78 03 08 01 mvhi r3,0x801 80037d0: 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( 80037d4: 38 42 e8 b4 ori r2,r2,0xe8b4 Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 80037d8: 38 63 e8 38 ori r3,r3,0xe838 80037dc: 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( 80037e0: 58 41 00 00 sw (r2+0),r1 #if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE ) _CPU_Install_interrupt_stack(); #endif } 80037e4: 2b 9d 00 04 lw ra,(sp+4) 80037e8: 2b 8b 00 0c lw r11,(sp+12) 80037ec: 2b 8c 00 08 lw r12,(sp+8) 80037f0: 37 9c 00 0c addi sp,sp,12 80037f4: c3 a0 00 00 ret 08003f98 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 8003f98: 37 9c ff ec addi sp,sp,-20 8003f9c: 5b 8b 00 14 sw (sp+20),r11 8003fa0: 5b 8c 00 10 sw (sp+16),r12 8003fa4: 5b 8d 00 0c sw (sp+12),r13 8003fa8: 5b 8e 00 08 sw (sp+8),r14 8003fac: 5b 9d 00 04 sw (sp+4),ra /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 8003fb0: 28 2c 00 08 lw r12,(r1+8) block_count = (information->maximum - index_base) / 8003fb4: 2c 2d 00 14 lhu r13,(r1+20) */ void _Objects_Shrink_information( Objects_Information *information ) { 8003fb8: b8 20 70 00 mv r14,r1 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / 8003fbc: 2c 21 00 10 lhu r1,(r1+16) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 8003fc0: 21 8c ff ff andi r12,r12,0xffff block_count = (information->maximum - index_base) / 8003fc4: b9 a0 10 00 mv r2,r13 8003fc8: c8 2c 08 00 sub r1,r1,r12 8003fcc: f8 00 5d db calli 801b738 <__udivsi3> information->allocation_size; for ( block = 0; block < block_count; block++ ) { 8003fd0: 44 20 00 09 be r1,r0,8003ff4 <_Objects_Shrink_information+0x5c> if ( information->inactive_per_block[ block ] == 8003fd4: 29 c5 00 30 lw r5,(r14+48) information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 8003fd8: 34 0b 00 04 mvi r11,4 8003fdc: 34 03 00 00 mvi r3,0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 8003fe0: 28 a2 00 00 lw r2,(r5+0) 8003fe4: 45 a2 00 11 be r13,r2,8004028 <_Objects_Shrink_information+0x90> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 8003fe8: 34 63 00 01 addi r3,r3,1 if ( information->inactive_per_block[ block ] == 8003fec: b4 ab 10 00 add r2,r5,r11 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 8003ff0: 54 23 00 08 bgu r1,r3,8004010 <_Objects_Shrink_information+0x78> return; } index_base += information->allocation_size; } } 8003ff4: 2b 9d 00 04 lw ra,(sp+4) 8003ff8: 2b 8b 00 14 lw r11,(sp+20) 8003ffc: 2b 8c 00 10 lw r12,(sp+16) 8004000: 2b 8d 00 0c lw r13,(sp+12) 8004004: 2b 8e 00 08 lw r14,(sp+8) 8004008: 37 9c 00 14 addi sp,sp,20 800400c: c3 a0 00 00 ret index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 8004010: 28 42 00 00 lw r2,(r2+0) information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 8004014: b5 8d 60 00 add r12,r12,r13 8004018: 35 64 00 04 addi r4,r11,4 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 800401c: 45 a2 00 04 be r13,r2,800402c <_Objects_Shrink_information+0x94> 8004020: b8 80 58 00 mv r11,r4 8004024: e3 ff ff f1 bi 8003fe8 <_Objects_Shrink_information+0x50> 8004028: b8 60 58 00 mv r11,r3 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 800402c: 29 c1 00 20 lw r1,(r14+32) do { index = _Objects_Get_index( the_object->id ); 8004030: 28 22 00 08 lw r2,(r1+8) /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 8004034: 28 2d 00 00 lw r13,(r1+0) * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 8004038: 20 42 ff ff andi r2,r2,0xffff /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 800403c: 55 82 00 05 bgu r12,r2,8004050 <_Objects_Shrink_information+0xb8> (index < (index_base + information->allocation_size))) { 8004040: 2d c3 00 14 lhu r3,(r14+20) 8004044: b5 83 18 00 add r3,r12,r3 8004048: 50 43 00 02 bgeu r2,r3,8004050 <_Objects_Shrink_information+0xb8> _Chain_Extract( &extract_me->Node ); 800404c: f8 00 15 0c calli 800947c <_Chain_Extract> } } while ( the_object ); 8004050: 45 a0 00 03 be r13,r0,800405c <_Objects_Shrink_information+0xc4> 8004054: b9 a0 08 00 mv r1,r13 8004058: e3 ff ff f6 bi 8004030 <_Objects_Shrink_information+0x98> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 800405c: 29 c1 00 34 lw r1,(r14+52) 8004060: b4 2b 08 00 add r1,r1,r11 8004064: 28 21 00 00 lw r1,(r1+0) 8004068: f8 00 07 de calli 8005fe0 <_Workspace_Free> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 800406c: 2d c3 00 2c lhu r3,(r14+44) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 8004070: 29 c1 00 34 lw r1,(r14+52) information->inactive_per_block[ block ] = 0; 8004074: 29 c4 00 30 lw r4,(r14+48) information->inactive -= information->allocation_size; 8004078: 2d c2 00 14 lhu r2,(r14+20) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 800407c: b4 2b 08 00 add r1,r1,r11 information->inactive_per_block[ block ] = 0; 8004080: b4 8b 58 00 add r11,r4,r11 information->inactive -= information->allocation_size; 8004084: c8 62 10 00 sub r2,r3,r2 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 8004088: 59 6d 00 00 sw (r11+0),r13 information->inactive -= information->allocation_size; 800408c: 0d c2 00 2c sh (r14+44),r2 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 8004090: 58 2d 00 00 sw (r1+0),r13 return; } index_base += information->allocation_size; } } 8004094: 2b 9d 00 04 lw ra,(sp+4) 8004098: 2b 8b 00 14 lw r11,(sp+20) 800409c: 2b 8c 00 10 lw r12,(sp+16) 80040a0: 2b 8d 00 0c lw r13,(sp+12) 80040a4: 2b 8e 00 08 lw r14,(sp+8) 80040a8: 37 9c 00 14 addi sp,sp,20 80040ac: c3 a0 00 00 ret 08003d60 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 8003d60: 37 9c ff e0 addi sp,sp,-32 8003d64: 5b 8b 00 1c sw (sp+28),r11 8003d68: 5b 8c 00 18 sw (sp+24),r12 8003d6c: 5b 8d 00 14 sw (sp+20),r13 8003d70: 5b 8e 00 10 sw (sp+16),r14 8003d74: 5b 8f 00 0c sw (sp+12),r15 8003d78: 5b 90 00 08 sw (sp+8),r16 8003d7c: 5b 9d 00 04 sw (sp+4),ra 8003d80: b8 40 58 00 mv r11,r2 8003d84: b8 20 70 00 mv r14,r1 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 8003d88: 37 82 00 20 addi r2,sp,32 8003d8c: b9 60 08 00 mv r1,r11 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 8003d90: b8 60 78 00 mv r15,r3 8003d94: 20 8d 00 ff andi r13,r4,0xff register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 8003d98: f8 00 00 90 calli 8003fd8 <_POSIX_Mutex_Get> 8003d9c: 44 20 00 0c be r1,r0,8003dcc <_POSIX_Condition_variables_Wait_support+0x6c> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 8003da0: 78 05 08 02 mvhi r5,0x802 8003da4: 38 a5 18 74 ori r5,r5,0x1874 8003da8: 28 a4 00 00 lw r4,(r5+0) return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 8003dac: b9 c0 08 00 mv r1,r14 8003db0: 37 82 00 20 addi r2,sp,32 8003db4: 34 84 ff ff addi r4,r4,-1 8003db8: 58 a4 00 00 sw (r5+0),r4 8003dbc: fb ff ff 39 calli 8003aa0 <_POSIX_Condition_variables_Get> switch ( location ) { 8003dc0: 2b 85 00 20 lw r5,(sp+32) return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 8003dc4: b8 20 60 00 mv r12,r1 switch ( location ) { 8003dc8: 44 a0 00 0c be r5,r0,8003df8 <_POSIX_Condition_variables_Wait_support+0x98> /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); if ( mutex_status ) 8003dcc: 34 0c 00 16 mvi r12,22 case OBJECTS_ERROR: break; } return EINVAL; } 8003dd0: b9 80 08 00 mv r1,r12 8003dd4: 2b 9d 00 04 lw ra,(sp+4) 8003dd8: 2b 8b 00 1c lw r11,(sp+28) 8003ddc: 2b 8c 00 18 lw r12,(sp+24) 8003de0: 2b 8d 00 14 lw r13,(sp+20) 8003de4: 2b 8e 00 10 lw r14,(sp+16) 8003de8: 2b 8f 00 0c lw r15,(sp+12) 8003dec: 2b 90 00 08 lw r16,(sp+8) 8003df0: 37 9c 00 20 addi sp,sp,32 8003df4: c3 a0 00 00 ret the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 8003df8: 28 21 00 14 lw r1,(r1+20) 8003dfc: 44 25 00 06 be r1,r5,8003e14 <_POSIX_Condition_variables_Wait_support+0xb4> 8003e00: 29 62 00 00 lw r2,(r11+0) 8003e04: 44 22 00 04 be r1,r2,8003e14 <_POSIX_Condition_variables_Wait_support+0xb4> _Thread_Enable_dispatch(); 8003e08: f8 00 0c a5 calli 800709c <_Thread_Enable_dispatch> 8003e0c: 34 0c 00 16 mvi r12,22 return EINVAL; 8003e10: e3 ff ff f0 bi 8003dd0 <_POSIX_Condition_variables_Wait_support+0x70> } (void) pthread_mutex_unlock( mutex ); 8003e14: b9 60 08 00 mv r1,r11 8003e18: f8 00 01 20 calli 8004298 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 8003e1c: 45 a0 00 07 be r13,r0,8003e38 <_POSIX_Condition_variables_Wait_support+0xd8> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 8003e20: f8 00 0c 9f calli 800709c <_Thread_Enable_dispatch> 8003e24: 34 0c 00 74 mvi r12,116 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 8003e28: b9 60 08 00 mv r1,r11 8003e2c: f8 00 00 e9 calli 80041d0 if ( mutex_status ) 8003e30: 44 20 ff e8 be r1,r0,8003dd0 <_POSIX_Condition_variables_Wait_support+0x70> 8003e34: e3 ff ff e6 bi 8003dcc <_POSIX_Condition_variables_Wait_support+0x6c> if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 8003e38: 78 10 08 02 mvhi r16,0x802 return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 8003e3c: 29 61 00 00 lw r1,(r11+0) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 8003e40: 3a 10 19 30 ori r16,r16,0x1930 8003e44: 2a 04 00 00 lw r4,(r16+0) return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 8003e48: 59 81 00 14 sw (r12+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; 8003e4c: 35 85 00 18 addi r5,r12,24 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 8003e50: 58 8d 00 34 sw (r4+52),r13 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 8003e54: 29 ce 00 00 lw r14,(r14+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; 8003e58: 34 01 00 01 mvi r1,1 _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 8003e5c: 78 03 08 00 mvhi r3,0x800 8003e60: 59 81 00 48 sw (r12+72),r1 8003e64: b9 e0 10 00 mv r2,r15 8003e68: b8 a0 08 00 mv r1,r5 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; 8003e6c: 58 8e 00 20 sw (r4+32),r14 _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 8003e70: 38 63 7b 44 ori r3,r3,0x7b44 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; 8003e74: 58 85 00 44 sw (r4+68),r5 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 8003e78: f8 00 0d e5 calli 800760c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 8003e7c: f8 00 0c 88 calli 800709c <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 8003e80: 2a 01 00 00 lw r1,(r16+0) 8003e84: 28 2c 00 34 lw r12,(r1+52) if ( status && status != ETIMEDOUT ) 8003e88: 7d 82 00 74 cmpnei r2,r12,116 8003e8c: 7d 81 00 00 cmpnei r1,r12,0 8003e90: a0 41 08 00 and r1,r2,r1 8003e94: 44 2d ff e5 be r1,r13,8003e28 <_POSIX_Condition_variables_Wait_support+0xc8> 8003e98: e3 ff ff ce bi 8003dd0 <_POSIX_Condition_variables_Wait_support+0x70> <== NOT EXECUTED 080085cc <_POSIX_Threads_Exitted_extension>: * This method is invoked each time a thread exits. */ void _POSIX_Threads_Exitted_extension( Thread_Control *executing ) { 80085cc: 37 9c ff f8 addi sp,sp,-8 80085d0: 5b 8b 00 08 sw (sp+8),r11 80085d4: 5b 9d 00 04 sw (sp+4),ra 80085d8: b8 20 58 00 mv r11,r1 /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) 80085dc: 28 21 00 08 lw r1,(r1+8) 80085e0: 34 02 00 18 mvi r2,24 80085e4: fb ff df 2b calli 8000290 <__lshrsi3> 80085e8: 20 21 00 07 andi r1,r1,0x7 80085ec: 34 02 00 03 mvi r2,3 80085f0: 44 22 00 05 be r1,r2,8008604 <_POSIX_Threads_Exitted_extension+0x38> pthread_exit( executing->Wait.return_argument ); } 80085f4: 2b 9d 00 04 lw ra,(sp+4) 80085f8: 2b 8b 00 08 lw r11,(sp+8) 80085fc: 37 9c 00 08 addi sp,sp,8 8008600: c3 a0 00 00 ret /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) pthread_exit( executing->Wait.return_argument ); 8008604: 29 61 00 28 lw r1,(r11+40) 8008608: f8 00 0d f3 calli 800bdd4 } 800860c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8008610: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8008614: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8008618: c3 a0 00 00 ret <== NOT EXECUTED 08002bbc <_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) { 8002bbc: 37 9c ff f8 addi sp,sp,-8 8002bc0: 5b 8b 00 08 sw (sp+8),r11 8002bc4: 5b 9d 00 04 sw (sp+4),ra 8002bc8: b8 40 58 00 mv r11,r2 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 8002bcc: 28 42 00 68 lw r2,(r2+104) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 8002bd0: 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; 8002bd4: 34 42 00 01 addi r2,r2,1 8002bd8: 59 62 00 68 sw (r11+104),r2 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 8002bdc: 5c 20 00 0e bne r1,r0,8002c14 <_POSIX_Timer_TSR+0x58> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 8002be0: 29 62 00 58 lw r2,(r11+88) 8002be4: 5c 41 00 0c bne r2,r1,8002c14 <_POSIX_Timer_TSR+0x58> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 8002be8: 34 01 00 04 mvi r1,4 <== NOT EXECUTED 8002bec: 31 61 00 3c sb (r11+60),r1 <== NOT EXECUTED /* * 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 ) ) { 8002bf0: 29 61 00 38 lw r1,(r11+56) 8002bf4: 29 62 00 44 lw r2,(r11+68) 8002bf8: f8 00 15 9c calli 8008268 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 8002bfc: 34 01 00 00 mvi r1,0 8002c00: 59 61 00 68 sw (r11+104),r1 } 8002c04: 2b 9d 00 04 lw ra,(sp+4) 8002c08: 2b 8b 00 08 lw r11,(sp+8) 8002c0c: 37 9c 00 08 addi sp,sp,8 8002c10: c3 a0 00 00 ret ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 8002c14: 29 62 00 64 lw r2,(r11+100) 8002c18: 29 63 00 08 lw r3,(r11+8) 8002c1c: 78 04 08 00 mvhi r4,0x800 8002c20: 38 84 2b bc ori r4,r4,0x2bbc 8002c24: 35 61 00 10 addi r1,r11,16 8002c28: b9 60 28 00 mv r5,r11 8002c2c: f8 00 16 f8 calli 800880c <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 8002c30: 44 20 ff f5 be r1,r0,8002c04 <_POSIX_Timer_TSR+0x48> return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 8002c34: 35 61 00 6c addi r1,r11,108 8002c38: f8 00 03 46 calli 8003950 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 8002c3c: 34 01 00 03 mvi r1,3 8002c40: 31 61 00 3c sb (r11+60),r1 /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 8002c44: e3 ff ff eb bi 8002bf0 <_POSIX_Timer_TSR+0x34> 0800d094 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 800d094: 37 9c ff f0 addi sp,sp,-16 800d098: 5b 8b 00 10 sw (sp+16),r11 800d09c: 5b 8c 00 0c sw (sp+12),r12 800d0a0: 5b 8d 00 08 sw (sp+8),r13 800d0a4: 5b 9d 00 04 sw (sp+4),ra 800d0a8: b8 20 58 00 mv r11,r1 clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 800d0ac: 90 00 68 00 rcsr r13,IE 800d0b0: 34 01 ff fe mvi r1,-2 800d0b4: a1 a1 08 00 and r1,r13,r1 800d0b8: d0 01 00 00 wcsr IE,r1 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 800d0bc: b5 6b 08 00 add r1,r11,r11 800d0c0: 34 02 00 02 mvi r2,2 800d0c4: b4 2b 08 00 add r1,r1,r11 800d0c8: 78 0c 08 01 mvhi r12,0x801 800d0cc: fb ff cc 49 calli 80001f0 <__ashlsi3> 800d0d0: 39 8c ed b0 ori r12,r12,0xedb0 800d0d4: b5 81 60 00 add r12,r12,r1 800d0d8: 29 83 00 00 lw r3,(r12+0) 800d0dc: 34 02 00 02 mvi r2,2 800d0e0: 44 62 00 17 be r3,r2,800d13c <_POSIX_signals_Clear_process_signals+0xa8> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 800d0e4: 35 62 ff ff addi r2,r11,-1 800d0e8: 34 01 00 01 mvi r1,1 800d0ec: fb ff cc 41 calli 80001f0 <__ashlsi3> 800d0f0: 78 02 08 01 mvhi r2,0x801 800d0f4: 38 42 ef 7c ori r2,r2,0xef7c 800d0f8: 28 43 00 00 lw r3,(r2+0) 800d0fc: a4 20 08 00 not r1,r1 800d100: a0 23 08 00 and r1,r1,r3 800d104: 58 41 00 00 sw (r2+0),r1 if ( !_POSIX_signals_Pending ) 800d108: 5c 20 00 06 bne r1,r0,800d120 <_POSIX_signals_Clear_process_signals+0x8c> _Thread_Do_post_task_switch_extension--; 800d10c: 78 01 08 01 mvhi r1,0x801 800d110: 38 21 e9 44 ori r1,r1,0xe944 800d114: 28 22 00 00 lw r2,(r1+0) 800d118: 34 42 ff ff addi r2,r2,-1 800d11c: 58 22 00 00 sw (r1+0),r2 } _ISR_Enable( level ); 800d120: d0 0d 00 00 wcsr IE,r13 } 800d124: 2b 9d 00 04 lw ra,(sp+4) 800d128: 2b 8b 00 10 lw r11,(sp+16) 800d12c: 2b 8c 00 0c lw r12,(sp+12) 800d130: 2b 8d 00 08 lw r13,(sp+8) 800d134: 37 9c 00 10 addi sp,sp,16 800d138: c3 a0 00 00 ret ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 800d13c: 78 02 08 01 mvhi r2,0x801 800d140: 38 42 ef 80 ori r2,r2,0xef80 800d144: b4 22 08 00 add r1,r1,r2 800d148: 28 22 00 00 lw r2,(r1+0) 800d14c: 34 21 00 04 addi r1,r1,4 800d150: 44 41 ff e5 be r2,r1,800d0e4 <_POSIX_signals_Clear_process_signals+0x50> if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level ); 800d154: d0 0d 00 00 wcsr IE,r13 <== NOT EXECUTED } 800d158: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800d15c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 800d160: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 800d164: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 800d168: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 800d16c: c3 a0 00 00 ret <== NOT EXECUTED 080423e8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 80423e8: 37 9c ff f4 addi sp,sp,-12 80423ec: 5b 8b 00 08 sw (sp+8),r11 80423f0: 5b 9d 00 04 sw (sp+4),ra 80423f4: b8 20 10 00 mv r2,r1 80423f8: 78 01 08 07 mvhi r1,0x807 80423fc: 38 21 7b c0 ori r1,r1,0x7bc0 8042400: 37 83 00 0c addi r3,sp,12 8042404: fb ff 28 e7 calli 800c7a0 <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 8042408: 2b 82 00 0c lw r2,(sp+12) 804240c: b8 20 58 00 mv r11,r1 8042410: 44 40 00 05 be r2,r0,8042424 <_Rate_monotonic_Timeout+0x3c> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 8042414: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8042418: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 804241c: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8042420: c3 a0 00 00 ret <== NOT EXECUTED */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_thread = the_period->owner; 8042424: 28 21 00 40 lw r1,(r1+64) if ( _States_Is_waiting_for_period( the_thread->current_state ) && 8042428: 28 23 00 10 lw r3,(r1+16) 804242c: 20 63 40 00 andi r3,r3,0x4000 8042430: 44 62 00 04 be r3,r2,8042440 <_Rate_monotonic_Timeout+0x58> the_thread->Wait.id == the_period->Object.id ) { 8042434: 28 23 00 20 lw r3,(r1+32) 8042438: 29 62 00 08 lw r2,(r11+8) 804243c: 44 62 00 1a be r3,r2,80424a4 <_Rate_monotonic_Timeout+0xbc> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 8042440: 29 62 00 38 lw r2,(r11+56) 8042444: 34 01 00 01 mvi r1,1 8042448: 44 41 00 0c be r2,r1,8042478 <_Rate_monotonic_Timeout+0x90> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 804244c: 34 01 00 04 mvi r1,4 8042450: 59 61 00 38 sw (r11+56),r1 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 8042454: 78 01 08 07 mvhi r1,0x807 8042458: 38 21 70 9c ori r1,r1,0x709c 804245c: 28 22 00 00 lw r2,(r1+0) 8042460: 34 42 ff ff addi r2,r2,-1 8042464: 58 22 00 00 sw (r1+0),r2 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 8042468: 2b 9d 00 04 lw ra,(sp+4) 804246c: 2b 8b 00 08 lw r11,(sp+8) 8042470: 37 9c 00 0c addi sp,sp,12 8042474: c3 a0 00 00 ret _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 8042478: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 804247c: 59 61 00 38 sw (r11+56),r1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 8042480: b9 60 08 00 mv r1,r11 8042484: fb ff fe a7 calli 8041f20 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8042488: 29 61 00 3c lw r1,(r11+60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 804248c: 35 62 00 10 addi r2,r11,16 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8042490: 59 61 00 1c sw (r11+28),r1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8042494: 78 01 08 07 mvhi r1,0x807 8042498: 38 21 71 78 ori r1,r1,0x7178 804249c: fb ff 30 fe calli 800e894 <_Watchdog_Insert> 80424a0: e3 ff ff ed bi 8042454 <_Rate_monotonic_Timeout+0x6c> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 80424a4: 78 02 10 03 mvhi r2,0x1003 80424a8: 38 42 ff f8 ori r2,r2,0xfff8 80424ac: fb ff b2 68 calli 802ee4c <_Thread_Clear_state> 80424b0: e3 ff ff f4 bi 8042480 <_Rate_monotonic_Timeout+0x98> 08009730 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 8009730: 37 9c ff e4 addi sp,sp,-28 8009734: 5b 8b 00 0c sw (sp+12),r11 8009738: 5b 8c 00 08 sw (sp+8),r12 800973c: 5b 9d 00 04 sw (sp+4),ra 8009740: 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 ); 8009744: 90 00 60 00 rcsr r12,IE 8009748: 34 01 ff fe mvi r1,-2 800974c: a1 81 08 00 and r1,r12,r1 8009750: d0 01 00 00 wcsr IE,r1 now = _TOD_Now; 8009754: 78 02 08 01 mvhi r2,0x801 8009758: 38 42 e9 34 ori r2,r2,0xe934 if ( _Watchdog_Nanoseconds_since_tick_handler ) 800975c: 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; 8009760: 28 41 00 04 lw r1,(r2+4) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8009764: 38 63 ea 44 ori r3,r3,0xea44 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; 8009768: 28 42 00 00 lw r2,(r2+0) if ( _Watchdog_Nanoseconds_since_tick_handler ) 800976c: 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; 8009770: 5b 81 00 14 sw (sp+20),r1 8009774: 5b 82 00 10 sw (sp+16),r2 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8009778: b8 60 20 00 mv r4,r3 800977c: 44 60 00 03 be r3,r0,8009788 <_TOD_Get+0x58> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 8009780: d8 60 00 00 call r3 <== NOT EXECUTED 8009784: b8 20 20 00 mv r4,r1 <== NOT EXECUTED _ISR_Enable( level ); 8009788: d0 0c 00 00 wcsr IE,r12 _Timestamp_Set( &offset, 0, nanoseconds ); 800978c: 34 03 00 00 mvi r3,0 _Timestamp_Add_to( &now, &offset ); 8009790: 37 81 00 10 addi r1,sp,16 8009794: 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 ); 8009798: 5b 83 00 18 sw (sp+24),r3 800979c: 5b 84 00 1c sw (sp+28),r4 _Timestamp_Add_to( &now, &offset ); 80097a0: fb ff ef f3 calli 800576c <_Timespec_Add_to> _Timestamp_To_timespec( &now, time ); 80097a4: 2b 81 00 14 lw r1,(sp+20) 80097a8: 59 61 00 04 sw (r11+4),r1 80097ac: 2b 81 00 10 lw r1,(sp+16) 80097b0: 59 61 00 00 sw (r11+0),r1 } 80097b4: 2b 9d 00 04 lw ra,(sp+4) 80097b8: 2b 8b 00 0c lw r11,(sp+12) 80097bc: 2b 8c 00 08 lw r12,(sp+8) 80097c0: 37 9c 00 1c addi sp,sp,28 80097c4: c3 a0 00 00 ret 080097c8 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( Timestamp_Control *uptime ) { 80097c8: 37 9c ff e4 addi sp,sp,-28 80097cc: 5b 8b 00 0c sw (sp+12),r11 80097d0: 5b 8c 00 08 sw (sp+8),r12 80097d4: 5b 9d 00 04 sw (sp+4),ra 80097d8: 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 ); 80097dc: 90 00 60 00 rcsr r12,IE 80097e0: 34 01 ff fe mvi r1,-2 80097e4: a1 81 08 00 and r1,r12,r1 80097e8: d0 01 00 00 wcsr IE,r1 up = _TOD_Uptime; 80097ec: 78 02 08 01 mvhi r2,0x801 80097f0: 38 42 e9 24 ori r2,r2,0xe924 if ( _Watchdog_Nanoseconds_since_tick_handler ) 80097f4: 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; 80097f8: 28 41 00 04 lw r1,(r2+4) if ( _Watchdog_Nanoseconds_since_tick_handler ) 80097fc: 38 63 ea 44 ori r3,r3,0xea44 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; 8009800: 28 42 00 00 lw r2,(r2+0) if ( _Watchdog_Nanoseconds_since_tick_handler ) 8009804: 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; 8009808: 5b 81 00 14 sw (sp+20),r1 800980c: 5b 82 00 10 sw (sp+16),r2 if ( _Watchdog_Nanoseconds_since_tick_handler ) 8009810: b8 60 20 00 mv r4,r3 8009814: 44 60 00 03 be r3,r0,8009820 <_TOD_Get_uptime+0x58> nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 8009818: d8 60 00 00 call r3 <== NOT EXECUTED 800981c: b8 20 20 00 mv r4,r1 <== NOT EXECUTED _ISR_Enable( level ); 8009820: d0 0c 00 00 wcsr IE,r12 _Timestamp_Set( &offset, 0, nanoseconds ); 8009824: 34 03 00 00 mvi r3,0 _Timestamp_Add_to( &up, &offset ); 8009828: 37 81 00 10 addi r1,sp,16 800982c: 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 ); 8009830: 5b 83 00 18 sw (sp+24),r3 8009834: 5b 84 00 1c sw (sp+28),r4 _Timestamp_Add_to( &up, &offset ); 8009838: fb ff ef cd calli 800576c <_Timespec_Add_to> *uptime = up; 800983c: 2b 81 00 14 lw r1,(sp+20) 8009840: 59 61 00 04 sw (r11+4),r1 8009844: 2b 81 00 10 lw r1,(sp+16) 8009848: 59 61 00 00 sw (r11+0),r1 } 800984c: 2b 9d 00 04 lw ra,(sp+4) 8009850: 2b 8b 00 0c lw r11,(sp+12) 8009854: 2b 8c 00 08 lw r12,(sp+8) 8009858: 37 9c 00 1c addi sp,sp,28 800985c: c3 a0 00 00 ret 080040b8 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 80040b8: 37 9c ff ec addi sp,sp,-20 80040bc: 5b 8b 00 14 sw (sp+20),r11 80040c0: 5b 8c 00 10 sw (sp+16),r12 80040c4: 5b 8d 00 0c sw (sp+12),r13 80040c8: 5b 8e 00 08 sw (sp+8),r14 80040cc: 5b 9d 00 04 sw (sp+4),ra 80040d0: b8 20 58 00 mv r11,r1 */ /* * Save original state */ original_state = the_thread->current_state; 80040d4: 28 2d 00 10 lw r13,(r1+16) void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 80040d8: b8 40 60 00 mv r12,r2 80040dc: 20 6e 00 ff andi r14,r3,0xff /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 80040e0: f8 00 04 f3 calli 80054ac <_Thread_Set_transient> /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 80040e4: 29 61 00 14 lw r1,(r11+20) 80040e8: 44 2c 00 04 be r1,r12,80040f8 <_Thread_Change_priority+0x40> _Thread_Set_priority( the_thread, new_priority ); 80040ec: b9 80 10 00 mv r2,r12 80040f0: b9 60 08 00 mv r1,r11 80040f4: f8 00 04 49 calli 8005218 <_Thread_Set_priority> _ISR_Disable( level ); 80040f8: 90 00 60 00 rcsr r12,IE 80040fc: 34 02 ff fe mvi r2,-2 8004100: a1 82 10 00 and r2,r12,r2 8004104: d0 02 00 00 wcsr IE,r2 /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 8004108: 29 61 00 10 lw r1,(r11+16) if ( state != STATES_TRANSIENT ) { 800410c: 34 04 00 04 mvi r4,4 8004110: 44 24 00 21 be r1,r4,8004194 <_Thread_Change_priority+0xdc> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 8004114: a1 a4 68 00 and r13,r13,r4 8004118: 45 a0 00 0d be r13,r0,800414c <_Thread_Change_priority+0x94> the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 800411c: d0 0c 00 00 wcsr IE,r12 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 8004120: 78 02 00 03 mvhi r2,0x3 <== NOT EXECUTED 8004124: 38 42 be e0 ori r2,r2,0xbee0 <== NOT EXECUTED 8004128: a0 22 08 00 and r1,r1,r2 <== NOT EXECUTED 800412c: 5c 20 00 10 bne r1,r0,800416c <_Thread_Change_priority+0xb4> <== NOT EXECUTED if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 8004130: 2b 9d 00 04 lw ra,(sp+4) 8004134: 2b 8b 00 14 lw r11,(sp+20) 8004138: 2b 8c 00 10 lw r12,(sp+16) 800413c: 2b 8d 00 0c lw r13,(sp+12) 8004140: 2b 8e 00 08 lw r14,(sp+8) 8004144: 37 9c 00 14 addi sp,sp,20 8004148: c3 a0 00 00 ret */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 800414c: 34 02 ff fb mvi r2,-5 8004150: a0 22 10 00 and r2,r1,r2 8004154: 59 62 00 10 sw (r11+16),r2 _ISR_Enable( level ); 8004158: d0 0c 00 00 wcsr IE,r12 if ( _States_Is_waiting_on_thread_queue( state ) ) { 800415c: 78 02 00 03 mvhi r2,0x3 8004160: 38 42 be e0 ori r2,r2,0xbee0 8004164: a0 22 08 00 and r1,r1,r2 8004168: 44 20 ff f2 be r1,r0,8004130 <_Thread_Change_priority+0x78> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 800416c: 29 61 00 44 lw r1,(r11+68) 8004170: b9 60 10 00 mv r2,r11 8004174: f8 00 03 ee calli 800512c <_Thread_queue_Requeue> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 8004178: 2b 9d 00 04 lw ra,(sp+4) 800417c: 2b 8b 00 14 lw r11,(sp+20) 8004180: 2b 8c 00 10 lw r12,(sp+16) 8004184: 2b 8d 00 0c lw r13,(sp+12) 8004188: 2b 8e 00 08 lw r14,(sp+8) 800418c: 37 9c 00 14 addi sp,sp,20 8004190: c3 a0 00 00 ret } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 8004194: 21 ad 00 04 andi r13,r13,0x4 8004198: 45 a0 00 3a be r13,r0,8004280 <_Thread_Change_priority+0x1c8> 800419c: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 80041a0: 38 21 e9 54 ori r1,r1,0xe954 <== NOT EXECUTED _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 80041a4: d0 0c 00 00 wcsr IE,r12 80041a8: d0 02 00 00 wcsr IE,r2 RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 80041ac: 2c 21 00 00 lhu r1,(r1+0) */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 80041b0: 78 02 08 01 mvhi r2,0x801 80041b4: 38 42 e8 30 ori r2,r2,0xe830 80041b8: 28 4e 00 00 lw r14,(r2+0) 80041bc: 20 21 ff ff andi r1,r1,0xffff 80041c0: 34 02 00 ff mvi r2,255 80041c4: 54 22 00 49 bgu r1,r2,80042e8 <_Thread_Change_priority+0x230> 80041c8: 78 0b 08 01 mvhi r11,0x801 80041cc: 39 6b ca 34 ori r11,r11,0xca34 80041d0: b5 61 08 00 add r1,r11,r1 80041d4: 40 2d 00 00 lbu r13,(r1+0) 80041d8: 35 ad 00 08 addi r13,r13,8 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 80041dc: 78 02 08 01 mvhi r2,0x801 80041e0: b5 ad 08 00 add r1,r13,r13 80041e4: 38 42 e9 d0 ori r2,r2,0xe9d0 80041e8: b4 41 10 00 add r2,r2,r1 80041ec: 2c 41 00 00 lhu r1,(r2+0) 80041f0: 34 02 00 ff mvi r2,255 80041f4: 54 22 00 38 bgu r1,r2,80042d4 <_Thread_Change_priority+0x21c> 80041f8: b5 61 58 00 add r11,r11,r1 80041fc: 41 6b 00 00 lbu r11,(r11+0) 8004200: 35 6b 00 08 addi r11,r11,8 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 8004204: 34 02 00 04 mvi r2,4 8004208: b9 a0 08 00 mv r1,r13 800420c: fb ff ef f9 calli 80001f0 <__ashlsi3> 8004210: b5 61 08 00 add r1,r11,r1 8004214: b4 21 10 00 add r2,r1,r1 8004218: b4 41 08 00 add r1,r2,r1 800421c: 34 02 00 02 mvi r2,2 8004220: fb ff ef f4 calli 80001f0 <__ashlsi3> 8004224: b5 c1 08 00 add r1,r14,r1 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 8004228: 78 02 08 01 mvhi r2,0x801 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 800422c: 28 23 00 00 lw r3,(r1+0) * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 8004230: 38 42 e9 60 ori r2,r2,0xe960 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 8004234: 78 01 08 01 mvhi r1,0x801 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 8004238: 28 42 00 00 lw r2,(r2+0) * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 800423c: 38 21 e9 30 ori r1,r1,0xe930 8004240: 58 23 00 00 sw (r1+0),r3 * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 8004244: 44 62 00 07 be r3,r2,8004260 <_Thread_Change_priority+0x1a8> _Thread_Executing->is_preemptible ) 8004248: 40 41 00 75 lbu r1,(r2+117) 800424c: 44 20 00 05 be r1,r0,8004260 <_Thread_Change_priority+0x1a8> _Context_Switch_necessary = true; 8004250: 78 01 08 01 mvhi r1,0x801 8004254: 38 21 e9 70 ori r1,r1,0xe970 8004258: 34 02 00 01 mvi r2,1 800425c: 30 22 00 00 sb (r1+0),r2 _ISR_Enable( level ); 8004260: d0 0c 00 00 wcsr IE,r12 } 8004264: 2b 9d 00 04 lw ra,(sp+4) 8004268: 2b 8b 00 14 lw r11,(sp+20) 800426c: 2b 8c 00 10 lw r12,(sp+16) 8004270: 2b 8d 00 0c lw r13,(sp+12) 8004274: 2b 8e 00 08 lw r14,(sp+8) 8004278: 37 9c 00 14 addi sp,sp,20 800427c: c3 a0 00 00 ret RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 8004280: 29 63 00 90 lw r3,(r11+144) 8004284: 2d 64 00 96 lhu r4,(r11+150) _Priority_Major_bit_map |= the_priority_map->ready_major; 8004288: 78 01 08 01 mvhi r1,0x801 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 800428c: 2c 65 00 00 lhu r5,(r3+0) _Priority_Major_bit_map |= the_priority_map->ready_major; 8004290: 38 21 e9 54 ori r1,r1,0xe954 * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 8004294: 59 6d 00 10 sw (r11+16),r13 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 8004298: b8 a4 20 00 or r4,r5,r4 800429c: 0c 64 00 00 sh (r3+0),r4 _Priority_Major_bit_map |= the_priority_map->ready_major; 80042a0: 2c 23 00 00 lhu r3,(r1+0) 80042a4: 2d 64 00 94 lhu r4,(r11+148) 80042a8: b8 83 18 00 or r3,r4,r3 80042ac: 20 63 ff ff andi r3,r3,0xffff 80042b0: 0c 23 00 00 sh (r1+0),r3 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 80042b4: 45 cd 00 14 be r14,r13,8004304 <_Thread_Change_priority+0x24c> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 80042b8: 29 63 00 8c lw r3,(r11+140) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 80042bc: 28 64 00 00 lw r4,(r3+0) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 80042c0: 59 63 00 04 sw (r11+4),r3 before_node = after_node->next; after_node->next = the_node; 80042c4: 58 6b 00 00 sw (r3+0),r11 the_node->next = before_node; before_node->previous = the_node; 80042c8: 58 8b 00 04 sw (r4+4),r11 Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 80042cc: 59 64 00 00 sw (r11+0),r4 80042d0: e3 ff ff b5 bi 80041a4 <_Thread_Change_priority+0xec> { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 80042d4: 34 02 00 08 mvi r2,8 80042d8: fb ff ef ee calli 8000290 <__lshrsi3> 80042dc: b5 61 08 00 add r1,r11,r1 80042e0: 40 2b 00 00 lbu r11,(r1+0) 80042e4: e3 ff ff c8 bi 8004204 <_Thread_Change_priority+0x14c> RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 80042e8: 34 02 00 08 mvi r2,8 80042ec: 78 0b 08 01 mvhi r11,0x801 80042f0: fb ff ef e8 calli 8000290 <__lshrsi3> 80042f4: 39 6b ca 34 ori r11,r11,0xca34 80042f8: b5 61 08 00 add r1,r11,r1 80042fc: 40 2d 00 00 lbu r13,(r1+0) 8004300: e3 ff ff b7 bi 80041dc <_Thread_Change_priority+0x124> _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 8004304: 29 63 00 8c lw r3,(r11+140) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 8004308: 34 64 00 04 addi r4,r3,4 800430c: 59 64 00 00 sw (r11+0),r4 old_last_node = the_chain->last; 8004310: 28 64 00 08 lw r4,(r3+8) the_chain->last = the_node; 8004314: 58 6b 00 08 sw (r3+8),r11 old_last_node->next = the_node; the_node->previous = old_last_node; 8004318: 59 64 00 04 sw (r11+4),r4 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 800431c: 58 8b 00 00 sw (r4+0),r11 8004320: e3 ff ff a1 bi 80041a4 <_Thread_Change_priority+0xec> 08004aa0 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 8004aa0: 37 9c ff f0 addi sp,sp,-16 8004aa4: 5b 8b 00 10 sw (sp+16),r11 8004aa8: 5b 8c 00 0c sw (sp+12),r12 8004aac: 5b 8d 00 08 sw (sp+8),r13 8004ab0: 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; 8004ab4: 78 01 08 01 mvhi r1,0x801 8004ab8: 38 21 e0 c4 ori r1,r1,0xe0c4 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 8004abc: 28 22 00 20 lw r2,(r1+32) 8004ac0: 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; 8004ac4: 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) 8004ac8: 64 42 00 00 cmpei r2,r2,0 8004acc: 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; 8004ad0: 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) 8004ad4: 99 22 48 00 xor r9,r9,r2 8004ad8: b9 20 58 00 mv r11,r9 8004adc: 5d 20 00 37 bne r9,r0,8004bb8 <_Thread_Handler_initialization+0x118> _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004ae0: 78 0c 08 01 mvhi r12,0x801 8004ae4: 39 8c e0 c0 ori r12,r12,0xe0c0 8004ae8: 41 81 00 00 lbu r1,(r12+0) INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 8004aec: 78 08 08 01 mvhi r8,0x801 _Thread_Executing = NULL; 8004af0: 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( 8004af4: 34 21 00 01 addi r1,r1,1 INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; 8004af8: 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; 8004afc: 78 03 08 01 mvhi r3,0x801 _Thread_Maximum_extensions = maximum_extensions; 8004b00: 78 07 08 01 mvhi r7,0x801 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 8004b04: 78 06 08 01 mvhi r6,0x801 INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; 8004b08: 38 84 e9 30 ori r4,r4,0xe930 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 8004b0c: 38 63 e9 44 ori r3,r3,0xe944 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; 8004b10: 38 c6 e8 34 ori r6,r6,0xe834 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 8004b14: 39 08 e9 70 ori r8,r8,0xe970 _Thread_Executing = NULL; 8004b18: 38 a5 e9 60 ori r5,r5,0xe960 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 8004b1c: 38 e7 e9 40 ori r7,r7,0xe940 _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004b20: 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; 8004b24: 58 ca 00 00 sw (r6+0),r10 INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; 8004b28: 58 89 00 00 sw (r4+0),r9 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 8004b2c: 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( 8004b30: b4 41 08 00 add r1,r2,r1 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 8004b34: 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( 8004b38: 34 02 00 02 mvi r2,2 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 8004b3c: 58 ed 00 00 sw (r7+0),r13 true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; 8004b40: 58 a9 00 00 sw (r5+0),r9 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004b44: fb ff ed ab calli 80001f0 <__ashlsi3> 8004b48: f8 00 05 0c calli 8005f78 <_Workspace_Allocate_or_fatal_error> 8004b4c: 78 03 08 01 mvhi r3,0x801 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 8004b50: 41 84 00 00 lbu r4,(r12+0) _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004b54: 38 63 e8 30 ori r3,r3,0xe830 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 8004b58: b9 60 10 00 mv r2,r11 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 8004b5c: 58 61 00 00 sw (r3+0),r1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 8004b60: 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); 8004b64: 34 23 00 04 addi r3,r1,4 8004b68: 58 23 00 00 sw (r1+0),r3 the_chain->permanent_null = NULL; 8004b6c: 58 26 00 04 sw (r1+4),r6 the_chain->last = _Chain_Head(the_chain); 8004b70: 58 21 00 08 sw (r1+8),r1 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 8004b74: 34 42 00 01 addi r2,r2,1 8004b78: 34 21 00 0c addi r1,r1,12 8004b7c: 50 82 ff fa bgeu r4,r2,8004b64 <_Thread_Handler_initialization+0xc4> /* * Initialize this class of objects. */ _Objects_Initialize_information( 8004b80: 34 02 00 01 mvi r2,1 8004b84: 78 01 08 01 mvhi r1,0x801 8004b88: 38 21 ea 00 ori r1,r1,0xea00 8004b8c: b8 40 18 00 mv r3,r2 8004b90: b8 40 20 00 mv r4,r2 8004b94: 34 05 01 3c mvi r5,316 8004b98: 34 07 00 08 mvi r7,8 8004b9c: fb ff fc 83 calli 8003da8 <_Objects_Initialize_information> false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 8004ba0: 2b 9d 00 04 lw ra,(sp+4) 8004ba4: 2b 8b 00 10 lw r11,(sp+16) 8004ba8: 2b 8c 00 0c lw r12,(sp+12) 8004bac: 2b 8d 00 08 lw r13,(sp+8) 8004bb0: 37 9c 00 10 addi sp,sp,16 8004bb4: c3 a0 00 00 ret * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 8004bb8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8004bbc: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8004bc0: 34 03 00 0f mvi r3,15 <== NOT EXECUTED 8004bc4: fb ff fa d3 calli 8003710 <_Internal_error_Occurred> <== NOT EXECUTED 0800619c <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 800619c: 37 9c ff f0 addi sp,sp,-16 80061a0: 5b 8b 00 08 sw (sp+8),r11 80061a4: 5b 9d 00 04 sw (sp+4),ra if ( !_States_Is_dormant( the_thread->current_state ) ) { 80061a8: 28 25 00 10 lw r5,(r1+16) 80061ac: 34 04 00 00 mvi r4,0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 80061b0: b8 20 58 00 mv r11,r1 if ( !_States_Is_dormant( the_thread->current_state ) ) { 80061b4: 20 a5 00 01 andi r5,r5,0x1 80061b8: 44 a4 00 06 be r5,r4,80061d0 <_Thread_Restart+0x34> return true; } return false; } 80061bc: b8 80 08 00 mv r1,r4 80061c0: 2b 9d 00 04 lw ra,(sp+4) 80061c4: 2b 8b 00 08 lw r11,(sp+8) 80061c8: 37 9c 00 10 addi sp,sp,16 80061cc: c3 a0 00 00 ret Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 80061d0: 5b 82 00 10 sw (sp+16),r2 80061d4: 5b 83 00 0c sw (sp+12),r3 80061d8: f8 00 00 b9 calli 80064bc <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 80061dc: 2b 82 00 10 lw r2,(sp+16) 80061e0: 2b 83 00 0c lw r3,(sp+12) 80061e4: b9 60 08 00 mv r1,r11 80061e8: f8 00 15 70 calli 800b7a8 <_Thread_Reset> _Thread_Load_environment( the_thread ); 80061ec: b9 60 08 00 mv r1,r11 80061f0: f8 00 14 35 calli 800b2c4 <_Thread_Load_environment> _Thread_Ready( the_thread ); 80061f4: b9 60 08 00 mv r1,r11 80061f8: f8 00 15 08 calli 800b618 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 80061fc: b9 60 08 00 mv r1,r11 8006200: f8 00 02 7b calli 8006bec <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 8006204: 78 01 08 02 mvhi r1,0x802 8006208: 38 21 39 b8 ori r1,r1,0x39b8 800620c: 28 21 00 00 lw r1,(r1+0) 8006210: 34 04 00 01 mvi r4,1 8006214: 5d 61 ff ea bne r11,r1,80061bc <_Thread_Restart+0x20> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 8006218: 35 61 00 d0 addi r1,r11,208 800621c: f8 00 04 16 calli 8007274 <_CPU_Context_restore> 8006220: 34 04 00 01 mvi r4,1 <== NOT EXECUTED 8006224: e3 ff ff e6 bi 80061bc <_Thread_Restart+0x20> <== NOT EXECUTED 08004bc8 <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 8004bc8: 37 9c ff f8 addi sp,sp,-8 8004bcc: 5b 8b 00 08 sw (sp+8),r11 8004bd0: 5b 9d 00 04 sw (sp+4),ra Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 8004bd4: 28 22 00 34 lw r2,(r1+52) */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 8004bd8: b8 20 58 00 mv r11,r1 Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 8004bdc: 34 01 00 01 mvi r1,1 8004be0: 44 41 00 0f be r2,r1,8004c1c <_Thread_queue_Dequeue+0x54> 8004be4: 78 02 08 00 mvhi r2,0x800 8004be8: 38 42 a0 fc ori r2,r2,0xa0fc dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); 8004bec: b9 60 08 00 mv r1,r11 8004bf0: d8 40 00 00 call r2 _ISR_Disable( level ); 8004bf4: 90 00 10 00 rcsr r2,IE 8004bf8: 34 03 ff fe mvi r3,-2 8004bfc: a0 43 18 00 and r3,r2,r3 8004c00: d0 03 00 00 wcsr IE,r3 if ( !the_thread ) { 8004c04: 44 20 00 0f be r1,r0,8004c40 <_Thread_queue_Dequeue+0x78> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; the_thread = _Thread_Executing; } } _ISR_Enable( level ); 8004c08: d0 02 00 00 wcsr IE,r2 return the_thread; } 8004c0c: 2b 9d 00 04 lw ra,(sp+4) 8004c10: 2b 8b 00 08 lw r11,(sp+8) 8004c14: 37 9c 00 08 addi sp,sp,8 8004c18: c3 a0 00 00 ret Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 8004c1c: 78 02 08 00 mvhi r2,0x800 8004c20: 38 42 4c 68 ori r2,r2,0x4c68 dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); 8004c24: b9 60 08 00 mv r1,r11 8004c28: d8 40 00 00 call r2 _ISR_Disable( level ); 8004c2c: 90 00 10 00 rcsr r2,IE 8004c30: 34 03 ff fe mvi r3,-2 8004c34: a0 43 18 00 and r3,r2,r3 8004c38: d0 03 00 00 wcsr IE,r3 if ( !the_thread ) { 8004c3c: 5c 20 ff f3 bne r1,r0,8004c08 <_Thread_queue_Dequeue+0x40> sync_state = the_thread_queue->sync_state; 8004c40: 29 64 00 30 lw r4,(r11+48) 8004c44: 34 03 00 01 mvi r3,1 8004c48: 34 84 ff ff addi r4,r4,-1 8004c4c: 54 83 ff ef bgu r4,r3,8004c08 <_Thread_queue_Dequeue+0x40> if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; the_thread = _Thread_Executing; 8004c50: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8004c54: 38 21 e9 60 ori r1,r1,0xe960 <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 8004c58: 34 03 00 03 mvi r3,3 <== NOT EXECUTED the_thread = _Thread_Executing; 8004c5c: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 8004c60: 59 63 00 30 sw (r11+48),r3 <== NOT EXECUTED 8004c64: e3 ff ff e9 bi 8004c08 <_Thread_queue_Dequeue+0x40> <== NOT EXECUTED 08004e70 <_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 ) { 8004e70: 37 9c ff ec addi sp,sp,-20 8004e74: 5b 8b 00 14 sw (sp+20),r11 8004e78: 5b 8c 00 10 sw (sp+16),r12 8004e7c: 5b 8d 00 0c sw (sp+12),r13 8004e80: 5b 8e 00 08 sw (sp+8),r14 8004e84: 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; 8004e88: 28 4b 00 14 lw r11,(r2+20) Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 8004e8c: b8 40 60 00 mv r12,r2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8004e90: 34 44 00 3c addi r4,r2,60 8004e94: 59 84 00 38 sw (r12+56),r4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 8004e98: 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; 8004e9c: 34 04 00 00 mvi r4,0 8004ea0: b8 20 68 00 mv r13,r1 8004ea4: 59 84 00 3c sw (r12+60),r4 the_chain->last = _Chain_Head(the_chain); 8004ea8: 59 82 00 40 sw (r12+64),r2 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 8004eac: b9 60 08 00 mv r1,r11 8004eb0: 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 ) { 8004eb4: 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 ]; 8004eb8: fb ff ec f6 calli 8000290 <__lshrsi3> 8004ebc: b4 21 10 00 add r2,r1,r1 8004ec0: b4 41 08 00 add r1,r2,r1 8004ec4: 34 02 00 02 mvi r2,2 8004ec8: fb ff ec ca calli 80001f0 <__ashlsi3> block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 8004ecc: 21 62 00 20 andi r2,r11,0x20 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 8004ed0: b5 a1 40 00 add r8,r13,r1 block_state = the_thread_queue->state; 8004ed4: 29 a6 00 38 lw r6,(r13+56) if ( _Thread_queue_Is_reverse_search( priority ) ) 8004ed8: 5c 40 00 25 bne r2,r0,8004f6c <_Thread_queue_Enqueue_priority+0xfc> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8004edc: 35 01 00 04 addi r1,r8,4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 8004ee0: 34 0a ff fe mvi r10,-2 8004ee4: 90 00 10 00 rcsr r2,IE 8004ee8: a0 4a 48 00 and r9,r2,r10 8004eec: d0 09 00 00 wcsr IE,r9 search_thread = (Thread_Control *) header->first; 8004ef0: 29 04 00 00 lw r4,(r8+0) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 8004ef4: 44 81 00 69 be r4,r1,8005098 <_Thread_queue_Enqueue_priority+0x228> search_priority = search_thread->current_priority; 8004ef8: 28 85 00 14 lw r5,(r4+20) if ( priority <= search_priority ) 8004efc: 50 ab 00 10 bgeu r5,r11,8004f3c <_Thread_queue_Enqueue_priority+0xcc> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 8004f00: d0 02 00 00 wcsr IE,r2 8004f04: d0 09 00 00 wcsr IE,r9 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 8004f08: 28 83 00 10 lw r3,(r4+16) 8004f0c: a0 c3 18 00 and r3,r6,r3 8004f10: 5c 60 00 09 bne r3,r0,8004f34 <_Thread_queue_Enqueue_priority+0xc4> 8004f14: e0 00 00 43 bi 8005020 <_Thread_queue_Enqueue_priority+0x1b0> <== NOT EXECUTED restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 8004f18: 28 85 00 14 lw r5,(r4+20) if ( priority <= search_priority ) 8004f1c: 50 ab 00 08 bgeu r5,r11,8004f3c <_Thread_queue_Enqueue_priority+0xcc> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 8004f20: d0 02 00 00 wcsr IE,r2 8004f24: d0 09 00 00 wcsr IE,r9 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 8004f28: 28 87 00 10 lw r7,(r4+16) 8004f2c: a0 c7 38 00 and r7,r6,r7 8004f30: 44 e0 00 3c be r7,r0,8005020 <_Thread_queue_Enqueue_priority+0x1b0> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 8004f34: 28 84 00 00 lw r4,(r4+0) restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 8004f38: 5c 81 ff f8 bne r4,r1,8004f18 <_Thread_queue_Enqueue_priority+0xa8> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 8004f3c: 29 a1 00 30 lw r1,(r13+48) 8004f40: 34 06 00 01 mvi r6,1 the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 8004f44: b8 40 18 00 mv r3,r2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 8004f48: 44 26 00 38 be r1,r6,8005028 <_Thread_queue_Enqueue_priority+0x1b8> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 8004f4c: 59 c3 00 00 sw (r14+0),r3 <== NOT EXECUTED return the_thread_queue->sync_state; } 8004f50: 2b 9d 00 04 lw ra,(sp+4) 8004f54: 2b 8b 00 14 lw r11,(sp+20) 8004f58: 2b 8c 00 10 lw r12,(sp+16) 8004f5c: 2b 8d 00 0c lw r13,(sp+12) 8004f60: 2b 8e 00 08 lw r14,(sp+8) 8004f64: 37 9c 00 14 addi sp,sp,20 8004f68: c3 a0 00 00 ret 8004f6c: 78 01 08 01 mvhi r1,0x801 8004f70: 38 21 e0 c0 ori r1,r1,0xe0c0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 8004f74: 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; 8004f78: 40 25 00 00 lbu r5,(r1+0) 8004f7c: 34 a5 00 01 addi r5,r5,1 _ISR_Disable( level ); 8004f80: 90 00 38 00 rcsr r7,IE 8004f84: a0 e3 48 00 and r9,r7,r3 8004f88: d0 09 00 00 wcsr IE,r9 search_thread = (Thread_Control *) header->last; 8004f8c: 29 04 00 08 lw r4,(r8+8) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 8004f90: 5c 88 00 04 bne r4,r8,8004fa0 <_Thread_queue_Enqueue_priority+0x130> 8004f94: e0 00 00 0c bi 8004fc4 <_Thread_queue_Enqueue_priority+0x154> _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 8004f98: 28 84 00 04 lw r4,(r4+4) restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 8004f9c: 45 04 00 0a be r8,r4,8004fc4 <_Thread_queue_Enqueue_priority+0x154> search_priority = search_thread->current_priority; 8004fa0: 28 85 00 14 lw r5,(r4+20) if ( priority >= search_priority ) 8004fa4: 51 65 00 08 bgeu r11,r5,8004fc4 <_Thread_queue_Enqueue_priority+0x154> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 8004fa8: d0 07 00 00 wcsr IE,r7 8004fac: d0 09 00 00 wcsr IE,r9 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 8004fb0: 28 82 00 10 lw r2,(r4+16) 8004fb4: a0 c2 10 00 and r2,r6,r2 8004fb8: 5c 40 ff f8 bne r2,r0,8004f98 <_Thread_queue_Enqueue_priority+0x128> _ISR_Enable( level ); 8004fbc: d0 07 00 00 wcsr IE,r7 <== NOT EXECUTED goto restart_reverse_search; 8004fc0: e3 ff ff ee bi 8004f78 <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 8004fc4: 29 a1 00 30 lw r1,(r13+48) 8004fc8: 34 02 00 01 mvi r2,1 8004fcc: b8 e0 18 00 mv r3,r7 8004fd0: 5c 22 ff df bne r1,r2,8004f4c <_Thread_queue_Enqueue_priority+0xdc> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 8004fd4: 34 01 00 00 mvi r1,0 8004fd8: 59 a1 00 30 sw (r13+48),r1 if ( priority == search_priority ) 8004fdc: b8 e0 10 00 mv r2,r7 8004fe0: 45 65 00 24 be r11,r5,8005070 <_Thread_queue_Enqueue_priority+0x200> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 8004fe4: 28 81 00 00 lw r1,(r4+0) the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 8004fe8: 59 84 00 04 sw (r12+4),r4 search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 8004fec: 59 8d 00 44 sw (r12+68),r13 search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 8004ff0: 59 81 00 00 sw (r12+0),r1 the_node->previous = search_node; search_node->next = the_node; 8004ff4: 58 8c 00 00 sw (r4+0),r12 next_node->previous = the_node; 8004ff8: 58 2c 00 04 sw (r1+4),r12 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 8004ffc: d0 07 00 00 wcsr IE,r7 8005000: 34 01 00 01 mvi r1,1 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 8005004: 2b 9d 00 04 lw ra,(sp+4) 8005008: 2b 8b 00 14 lw r11,(sp+20) 800500c: 2b 8c 00 10 lw r12,(sp+16) 8005010: 2b 8d 00 0c lw r13,(sp+12) 8005014: 2b 8e 00 08 lw r14,(sp+8) 8005018: 37 9c 00 14 addi sp,sp,20 800501c: c3 a0 00 00 ret if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 8005020: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED goto restart_forward_search; 8005024: e3 ff ff b0 bi 8004ee4 <_Thread_queue_Enqueue_priority+0x74> <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 8005028: 34 01 00 00 mvi r1,0 800502c: 59 a1 00 30 sw (r13+48),r1 if ( priority == search_priority ) 8005030: 45 65 00 10 be r11,r5,8005070 <_Thread_queue_Enqueue_priority+0x200> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 8005034: 28 81 00 04 lw r1,(r4+4) the_node = (Chain_Node *) the_thread; the_node->next = search_node; 8005038: 59 84 00 00 sw (r12+0),r4 the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 800503c: 59 8d 00 44 sw (r12+68),r13 search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; 8005040: 59 81 00 04 sw (r12+4),r1 previous_node->next = the_node; 8005044: 58 2c 00 00 sw (r1+0),r12 search_node->previous = the_node; 8005048: 58 8c 00 04 sw (r4+4),r12 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 800504c: d0 02 00 00 wcsr IE,r2 8005050: 34 01 00 01 mvi r1,1 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 8005054: 2b 9d 00 04 lw ra,(sp+4) 8005058: 2b 8b 00 14 lw r11,(sp+20) 800505c: 2b 8c 00 10 lw r12,(sp+16) 8005060: 2b 8d 00 0c lw r13,(sp+12) 8005064: 2b 8e 00 08 lw r14,(sp+8) 8005068: 37 9c 00 14 addi sp,sp,20 800506c: c3 a0 00 00 ret 8005070: 34 84 00 3c addi r4,r4,60 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 8005074: 28 81 00 04 lw r1,(r4+4) the_node = (Chain_Node *) the_thread; the_node->next = search_node; 8005078: 59 84 00 00 sw (r12+0),r4 the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 800507c: 59 8d 00 44 sw (r12+68),r13 search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; 8005080: 59 81 00 04 sw (r12+4),r1 previous_node->next = the_node; 8005084: 58 2c 00 00 sw (r1+0),r12 search_node->previous = the_node; 8005088: 58 8c 00 04 sw (r4+4),r12 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 800508c: d0 02 00 00 wcsr IE,r2 8005090: 34 01 00 01 mvi r1,1 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 8005094: e3 ff ff af bi 8004f50 <_Thread_queue_Enqueue_priority+0xe0> restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 8005098: 34 05 ff ff mvi r5,-1 800509c: e3 ff ff a8 bi 8004f3c <_Thread_queue_Enqueue_priority+0xcc> 0800512c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 800512c: 37 9c ff ec addi sp,sp,-20 8005130: 5b 8b 00 10 sw (sp+16),r11 8005134: 5b 8c 00 0c sw (sp+12),r12 8005138: 5b 8d 00 08 sw (sp+8),r13 800513c: 5b 9d 00 04 sw (sp+4),ra 8005140: b8 20 58 00 mv r11,r1 8005144: b8 40 60 00 mv r12,r2 /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 8005148: 44 20 00 04 be r1,r0,8005158 <_Thread_queue_Requeue+0x2c> /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 800514c: 28 22 00 34 lw r2,(r1+52) 8005150: 34 01 00 01 mvi r1,1 8005154: 44 41 00 07 be r2,r1,8005170 <_Thread_queue_Requeue+0x44> _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 8005158: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800515c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8005160: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8005164: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8005168: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 800516c: c3 a0 00 00 ret <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 8005170: 90 00 68 00 rcsr r13,IE 8005174: 34 01 ff fe mvi r1,-2 8005178: a1 a1 08 00 and r1,r13,r1 800517c: d0 01 00 00 wcsr IE,r1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 8005180: 29 82 00 10 lw r2,(r12+16) 8005184: 78 01 00 03 mvhi r1,0x3 8005188: 38 21 be e0 ori r1,r1,0xbee0 800518c: a0 41 08 00 and r1,r2,r1 8005190: 5c 20 00 08 bne r1,r0,80051b0 <_Thread_queue_Requeue+0x84> _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 8005194: d0 0d 00 00 wcsr IE,r13 <== NOT EXECUTED } } 8005198: 2b 9d 00 04 lw ra,(sp+4) 800519c: 2b 8b 00 10 lw r11,(sp+16) 80051a0: 2b 8c 00 0c lw r12,(sp+12) 80051a4: 2b 8d 00 08 lw r13,(sp+8) 80051a8: 37 9c 00 14 addi sp,sp,20 80051ac: c3 a0 00 00 ret 80051b0: 34 03 00 01 mvi r3,1 80051b4: 59 63 00 30 sw (r11+48),r3 ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 80051b8: b9 60 08 00 mv r1,r11 80051bc: b9 80 10 00 mv r2,r12 80051c0: f8 00 14 25 calli 800a254 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 80051c4: b9 60 08 00 mv r1,r11 80051c8: b9 80 10 00 mv r2,r12 80051cc: 37 83 00 14 addi r3,sp,20 80051d0: fb ff ff 28 calli 8004e70 <_Thread_queue_Enqueue_priority> } _ISR_Enable( level ); 80051d4: d0 0d 00 00 wcsr IE,r13 80051d8: e3 ff ff f0 bi 8005198 <_Thread_queue_Requeue+0x6c> 080143d4 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 80143d4: 37 9c ff a0 addi sp,sp,-96 80143d8: 5b 8b 00 44 sw (sp+68),r11 80143dc: 5b 8c 00 40 sw (sp+64),r12 80143e0: 5b 8d 00 3c sw (sp+60),r13 80143e4: 5b 8e 00 38 sw (sp+56),r14 80143e8: 5b 8f 00 34 sw (sp+52),r15 80143ec: 5b 90 00 30 sw (sp+48),r16 80143f0: 5b 91 00 2c sw (sp+44),r17 80143f4: 5b 92 00 28 sw (sp+40),r18 80143f8: 5b 93 00 24 sw (sp+36),r19 80143fc: 5b 94 00 20 sw (sp+32),r20 8014400: 5b 95 00 1c sw (sp+28),r21 8014404: 5b 96 00 18 sw (sp+24),r22 8014408: 5b 97 00 14 sw (sp+20),r23 801440c: 5b 98 00 10 sw (sp+16),r24 8014410: 5b 99 00 0c sw (sp+12),r25 8014414: 5b 9b 00 08 sw (sp+8),fp 8014418: 5b 9d 00 04 sw (sp+4),ra RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 801441c: 34 17 00 00 mvi r23,0 8014420: b8 20 58 00 mv r11,r1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8014424: 37 98 00 58 addi r24,sp,88 8014428: 37 96 00 5c addi r22,sp,92 801442c: 37 8f 00 4c addi r15,sp,76 8014430: 37 95 00 50 addi r21,sp,80 8014434: 78 14 08 04 mvhi r20,0x804 8014438: 78 13 08 04 mvhi r19,0x804 801443c: 78 19 08 04 mvhi r25,0x804 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 8014440: 34 31 00 30 addi r17,r1,48 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 8014444: 34 30 00 68 addi r16,r1,104 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 8014448: 34 21 00 08 addi r1,r1,8 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 801444c: 5b 96 00 58 sw (sp+88),r22 the_chain->permanent_null = NULL; 8014450: 5b 97 00 5c sw (sp+92),r23 the_chain->last = _Chain_Head(the_chain); 8014454: 5b 98 00 60 sw (sp+96),r24 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 8014458: 5b 95 00 4c sw (sp+76),r21 the_chain->permanent_null = NULL; 801445c: 5b 97 00 50 sw (sp+80),r23 the_chain->last = _Chain_Head(the_chain); 8014460: 5b 8f 00 54 sw (sp+84),r15 8014464: 3a 94 0d fc ori r20,r20,0xdfc 8014468: 3a 73 0d 3c ori r19,r19,0xd3c 801446c: 3b 39 0c ac ori r25,r25,0xcac 8014470: 5b 81 00 48 sw (sp+72),r1 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 8014474: 35 7b 00 40 addi fp,r11,64 /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 8014478: 34 0c 00 01 mvi r12,1 Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 801447c: 34 0d 00 03 mvi r13,3 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 8014480: 34 12 ff fe mvi r18,-2 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 8014484: 59 78 00 78 sw (r11+120),r24 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 8014488: 2a 82 00 00 lw r2,(r20+0) /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 801448c: 29 63 00 3c lw r3,(r11+60) watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 8014490: ba 20 08 00 mv r1,r17 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 8014494: 59 62 00 3c sw (r11+60),r2 _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 8014498: c8 43 10 00 sub r2,r2,r3 801449c: b9 e0 18 00 mv r3,r15 80144a0: f8 00 15 df calli 8019c1c <_Watchdog_Adjust_to_chain> Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 80144a4: 29 62 00 74 lw r2,(r11+116) static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 80144a8: 2a 6e 00 00 lw r14,(r19+0) /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 80144ac: 50 4e 00 19 bgeu r2,r14,8014510 <_Timer_server_Body+0x13c> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 80144b0: c9 c2 10 00 sub r2,r14,r2 80144b4: ba 00 08 00 mv r1,r16 80144b8: b9 e0 18 00 mv r3,r15 80144bc: f8 00 15 d8 calli 8019c1c <_Watchdog_Adjust_to_chain> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 80144c0: 59 6e 00 74 sw (r11+116),r14 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 80144c4: 29 61 00 78 lw r1,(r11+120) 80144c8: f8 00 03 34 calli 8015198 <_Chain_Get> if ( timer == NULL ) { 80144cc: 44 20 00 0a be r1,r0,80144f4 <_Timer_server_Body+0x120> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 80144d0: 28 22 00 38 lw r2,(r1+56) <== NOT EXECUTED 80144d4: 44 4c 00 15 be r2,r12,8014528 <_Timer_server_Body+0x154> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 80144d8: 5c 4d ff fb bne r2,r13,80144c4 <_Timer_server_Body+0xf0> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 80144dc: 34 22 00 10 addi r2,r1,16 <== NOT EXECUTED 80144e0: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 80144e4: f8 00 15 f8 calli 8019cc4 <_Watchdog_Insert> <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 80144e8: 29 61 00 78 lw r1,(r11+120) <== NOT EXECUTED 80144ec: f8 00 03 2b calli 8015198 <_Chain_Get> <== NOT EXECUTED if ( timer == NULL ) { 80144f0: 5c 20 ff f8 bne r1,r0,80144d0 <_Timer_server_Body+0xfc> <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 80144f4: 90 00 10 00 rcsr r2,IE 80144f8: a0 52 18 00 and r3,r2,r18 80144fc: d0 03 00 00 wcsr IE,r3 if ( _Chain_Is_empty( insert_chain ) ) { 8014500: 2b 83 00 58 lw r3,(sp+88) 8014504: 46 c3 00 0d be r22,r3,8014538 <_Timer_server_Body+0x164> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 8014508: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED 801450c: e3 ff ff df bi 8014488 <_Timer_server_Body+0xb4> <== NOT EXECUTED * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 8014510: 51 c2 ff ec bgeu r14,r2,80144c0 <_Timer_server_Body+0xec> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 8014514: c8 4e 18 00 sub r3,r2,r14 8014518: ba 00 08 00 mv r1,r16 801451c: 34 02 00 01 mvi r2,1 8014520: f8 00 15 81 calli 8019b24 <_Watchdog_Adjust> 8014524: e3 ff ff e7 bi 80144c0 <_Timer_server_Body+0xec> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 8014528: 34 22 00 10 addi r2,r1,16 <== NOT EXECUTED 801452c: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8014530: f8 00 15 e5 calli 8019cc4 <_Watchdog_Insert> <== NOT EXECUTED 8014534: e3 ff ff e4 bi 80144c4 <_Timer_server_Body+0xf0> <== NOT EXECUTED */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 8014538: 59 77 00 78 sw (r11+120),r23 _ISR_Enable( level ); 801453c: d0 02 00 00 wcsr IE,r2 _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 8014540: 2b 82 00 4c lw r2,(sp+76) 8014544: 5e a2 00 0b bne r21,r2,8014570 <_Timer_server_Body+0x19c> 8014548: e0 00 00 11 bi 801458c <_Timer_server_Body+0x1b8> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 801454c: 28 83 00 00 lw r3,(r4+0) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 8014550: 58 97 00 08 sw (r4+8),r23 the_chain->first = new_first; 8014554: 5b 83 00 4c sw (sp+76),r3 new_first->previous = _Chain_Head(the_chain); 8014558: 58 6f 00 04 sw (r3+4),r15 _ISR_Enable( level ); 801455c: d0 02 00 00 wcsr IE,r2 /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 8014560: 28 82 00 24 lw r2,(r4+36) 8014564: 28 83 00 1c lw r3,(r4+28) 8014568: 28 81 00 20 lw r1,(r4+32) 801456c: d8 60 00 00 call r3 /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 8014570: 90 00 10 00 rcsr r2,IE 8014574: a0 52 18 00 and r3,r2,r18 8014578: d0 03 00 00 wcsr IE,r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 801457c: 2b 84 00 4c lw r4,(sp+76) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 8014580: 5e a4 ff f3 bne r21,r4,801454c <_Timer_server_Body+0x178> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 8014584: d0 02 00 00 wcsr IE,r2 8014588: e3 ff ff bf bi 8014484 <_Timer_server_Body+0xb0> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 801458c: 34 01 00 00 mvi r1,0 8014590: 31 61 00 7c sb (r11+124),r1 8014594: 2b 21 00 00 lw r1,(r25+0) 8014598: 34 21 00 01 addi r1,r1,1 801459c: 5b 21 00 00 sw (r25+0),r1 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 80145a0: 29 61 00 00 lw r1,(r11+0) 80145a4: 34 02 00 08 mvi r2,8 80145a8: f8 00 12 38 calli 8018e88 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 80145ac: b9 60 08 00 mv r1,r11 80145b0: fb ff ff 47 calli 80142cc <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 80145b4: b9 60 08 00 mv r1,r11 80145b8: fb ff ff 66 calli 8014350 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 80145bc: f8 00 0e bf calli 80180b8 <_Thread_Enable_dispatch> ts->active = true; 80145c0: 34 01 00 01 mvi r1,1 80145c4: 31 61 00 7c sb (r11+124),r1 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 80145c8: 2b 81 00 48 lw r1,(sp+72) 80145cc: f8 00 16 25 calli 8019e60 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 80145d0: bb 60 08 00 mv r1,fp 80145d4: f8 00 16 23 calli 8019e60 <_Watchdog_Remove> 80145d8: e3 ff ff ab bi 8014484 <_Timer_server_Body+0xb0> 080145dc <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 80145dc: 37 9c ff f8 addi sp,sp,-8 80145e0: 5b 8b 00 08 sw (sp+8),r11 80145e4: 5b 9d 00 04 sw (sp+4),ra if ( ts->insert_chain == NULL ) { 80145e8: 28 23 00 78 lw r3,(r1+120) static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 80145ec: b8 20 58 00 mv r11,r1 80145f0: b8 40 08 00 mv r1,r2 if ( ts->insert_chain == NULL ) { 80145f4: 44 60 00 07 be r3,r0,8014610 <_Timer_server_Schedule_operation_method+0x34> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 80145f8: 29 61 00 78 lw r1,(r11+120) <== NOT EXECUTED 80145fc: f8 00 02 db calli 8015168 <_Chain_Append> <== NOT EXECUTED } } 8014600: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8014604: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8014608: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 801460c: c3 a0 00 00 ret <== NOT EXECUTED 8014610: 78 02 08 04 mvhi r2,0x804 8014614: 38 42 0c ac ori r2,r2,0xcac 8014618: 28 43 00 00 lw r3,(r2+0) 801461c: 34 63 00 01 addi r3,r3,1 8014620: 58 43 00 00 sw (r2+0),r3 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 8014624: 28 22 00 38 lw r2,(r1+56) 8014628: 34 03 00 01 mvi r3,1 801462c: 44 43 00 28 be r2,r3,80146cc <_Timer_server_Schedule_operation_method+0xf0> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 8014630: 34 03 00 03 mvi r3,3 8014634: 44 43 00 06 be r2,r3,801464c <_Timer_server_Schedule_operation_method+0x70> if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 8014638: f8 00 0e a0 calli 80180b8 <_Thread_Enable_dispatch> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 801463c: 2b 9d 00 04 lw ra,(sp+4) 8014640: 2b 8b 00 08 lw r11,(sp+8) 8014644: 37 9c 00 08 addi sp,sp,8 8014648: c3 a0 00 00 ret } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 801464c: 90 00 38 00 rcsr r7,IE 8014650: 34 02 ff fe mvi r2,-2 8014654: a0 e2 10 00 and r2,r7,r2 8014658: d0 02 00 00 wcsr IE,r2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 801465c: 29 63 00 68 lw r3,(r11+104) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 8014660: 78 02 08 04 mvhi r2,0x804 last_snapshot = ts->TOD_watchdogs.last_snapshot; 8014664: 29 64 00 74 lw r4,(r11+116) /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 8014668: 38 42 0d 3c ori r2,r2,0xd3c */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 801466c: 35 65 00 6c addi r5,r11,108 8014670: 28 42 00 00 lw r2,(r2+0) 8014674: 44 65 00 0b be r3,r5,80146a0 <_Timer_server_Schedule_operation_method+0xc4> last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 8014678: 28 66 00 10 lw r6,(r3+16) } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 801467c: b4 c4 28 00 add r5,r6,r4 delta_interval += delta; 8014680: c8 a2 28 00 sub r5,r5,r2 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { 8014684: 50 82 00 06 bgeu r4,r2,801469c <_Timer_server_Schedule_operation_method+0xc0> /* * We advanced in time. */ delta = snapshot - last_snapshot; 8014688: c8 44 20 00 sub r4,r2,r4 if (delta_interval > delta) { 801468c: f4 c4 40 00 cmpgu r8,r6,r4 delta_interval -= delta; 8014690: c8 c4 28 00 sub r5,r6,r4 if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { 8014694: c8 08 20 00 sub r4,r0,r8 8014698: a0 a4 28 00 and r5,r5,r4 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 801469c: 58 65 00 10 sw (r3+16),r5 } ts->TOD_watchdogs.last_snapshot = snapshot; 80146a0: 59 62 00 74 sw (r11+116),r2 _ISR_Enable( level ); 80146a4: d0 07 00 00 wcsr IE,r7 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 80146a8: 34 22 00 10 addi r2,r1,16 80146ac: 35 61 00 68 addi r1,r11,104 80146b0: f8 00 15 85 calli 8019cc4 <_Watchdog_Insert> if ( !ts->active ) { 80146b4: 41 61 00 7c lbu r1,(r11+124) 80146b8: 5c 20 ff e0 bne r1,r0,8014638 <_Timer_server_Schedule_operation_method+0x5c> _Timer_server_Reset_tod_system_watchdog( ts ); 80146bc: b9 60 08 00 mv r1,r11 80146c0: fb ff ff 24 calli 8014350 <_Timer_server_Reset_tod_system_watchdog> } } _Thread_Enable_dispatch(); 80146c4: f8 00 0e 7d calli 80180b8 <_Thread_Enable_dispatch> 80146c8: e3 ff ff dd bi 801463c <_Timer_server_Schedule_operation_method+0x60> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 80146cc: 90 00 20 00 rcsr r4,IE 80146d0: 34 02 ff fe mvi r2,-2 80146d4: a0 82 10 00 and r2,r4,r2 80146d8: d0 02 00 00 wcsr IE,r2 snapshot = _Watchdog_Ticks_since_boot; 80146dc: 78 03 08 04 mvhi r3,0x804 80146e0: 38 63 0d fc ori r3,r3,0xdfc */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 80146e4: 29 62 00 30 lw r2,(r11+48) 80146e8: 28 65 00 00 lw r5,(r3+0) last_snapshot = ts->Interval_watchdogs.last_snapshot; 80146ec: 29 63 00 3c lw r3,(r11+60) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 80146f0: 35 66 00 34 addi r6,r11,52 80146f4: 44 46 00 08 be r2,r6,8014714 <_Timer_server_Schedule_operation_method+0x138> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; 80146f8: 28 47 00 10 lw r7,(r2+16) first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 80146fc: c8 a3 18 00 sub r3,r5,r3 delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { 8014700: f4 e3 30 00 cmpgu r6,r7,r3 delta_interval -= delta; 8014704: c8 e3 18 00 sub r3,r7,r3 * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { 8014708: c8 06 30 00 sub r6,r0,r6 801470c: a0 66 18 00 and r3,r3,r6 delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 8014710: 58 43 00 10 sw (r2+16),r3 } ts->Interval_watchdogs.last_snapshot = snapshot; 8014714: 59 65 00 3c sw (r11+60),r5 _ISR_Enable( level ); 8014718: d0 04 00 00 wcsr IE,r4 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 801471c: 34 22 00 10 addi r2,r1,16 8014720: 35 61 00 30 addi r1,r11,48 8014724: f8 00 15 68 calli 8019cc4 <_Watchdog_Insert> if ( !ts->active ) { 8014728: 41 61 00 7c lbu r1,(r11+124) 801472c: 5c 20 ff c3 bne r1,r0,8014638 <_Timer_server_Schedule_operation_method+0x5c> _Timer_server_Reset_interval_system_watchdog( ts ); 8014730: b9 60 08 00 mv r1,r11 8014734: fb ff fe e6 calli 80142cc <_Timer_server_Reset_interval_system_watchdog> if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 8014738: f8 00 0e 60 calli 80180b8 <_Thread_Enable_dispatch> 801473c: e3 ff ff c0 bi 801463c <_Timer_server_Schedule_operation_method+0x60> 08007fb8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 8007fb8: 37 9c ff e4 addi sp,sp,-28 8007fbc: 5b 8b 00 1c sw (sp+28),r11 8007fc0: 5b 8c 00 18 sw (sp+24),r12 8007fc4: 5b 8d 00 14 sw (sp+20),r13 8007fc8: 5b 8e 00 10 sw (sp+16),r14 8007fcc: 5b 8f 00 0c sw (sp+12),r15 8007fd0: 5b 90 00 08 sw (sp+8),r16 8007fd4: 5b 9d 00 04 sw (sp+4),ra 8007fd8: b8 20 60 00 mv r12,r1 8007fdc: b8 60 58 00 mv r11,r3 ISR_Level level; _ISR_Disable( level ); 8007fe0: 90 00 20 00 rcsr r4,IE 8007fe4: 34 01 ff fe mvi r1,-2 8007fe8: a0 81 08 00 and r1,r4,r1 8007fec: 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)); 8007ff0: 29 81 00 00 lw r1,(r12+0) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8007ff4: 35 8e 00 04 addi r14,r12,4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 8007ff8: 44 2e 00 04 be r1,r14,8008008 <_Watchdog_Adjust+0x50> switch ( direction ) { 8007ffc: 44 40 00 11 be r2,r0,8008040 <_Watchdog_Adjust+0x88> 8008000: 34 03 00 01 mvi r3,1 8008004: 44 43 00 0b be r2,r3,8008030 <_Watchdog_Adjust+0x78> } break; } } _ISR_Enable( level ); 8008008: d0 04 00 00 wcsr IE,r4 } 800800c: 2b 9d 00 04 lw ra,(sp+4) 8008010: 2b 8b 00 1c lw r11,(sp+28) 8008014: 2b 8c 00 18 lw r12,(sp+24) 8008018: 2b 8d 00 14 lw r13,(sp+20) 800801c: 2b 8e 00 10 lw r14,(sp+16) 8008020: 2b 8f 00 0c lw r15,(sp+12) 8008024: 2b 90 00 08 lw r16,(sp+8) 8008028: 37 9c 00 1c addi sp,sp,28 800802c: c3 a0 00 00 ret * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 8008030: 28 22 00 10 lw r2,(r1+16) 8008034: b4 4b 58 00 add r11,r2,r11 8008038: 58 2b 00 10 sw (r1+16),r11 break; 800803c: e3 ff ff f3 bi 8008008 <_Watchdog_Adjust+0x50> case WATCHDOG_FORWARD: while ( units ) { 8008040: 44 62 ff f2 be r3,r2,8008008 <_Watchdog_Adjust+0x50> if ( units < _Watchdog_First( header )->delta_interval ) { 8008044: 28 2d 00 10 lw r13,(r1+16) _Watchdog_First( header )->delta_interval -= units; break; 8008048: b8 80 18 00 mv r3,r4 } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 800804c: 34 10 00 01 mvi r16,1 _ISR_Enable( level ); _Watchdog_Tickle( header ); _ISR_Disable( level ); 8008050: 34 0f ff fe mvi r15,-2 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 8008054: 51 6d 00 02 bgeu r11,r13,800805c <_Watchdog_Adjust+0xa4> 8008058: e0 00 00 11 bi 800809c <_Watchdog_Adjust+0xe4> <== NOT EXECUTED _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 800805c: 58 30 00 10 sw (r1+16),r16 _ISR_Enable( level ); 8008060: d0 03 00 00 wcsr IE,r3 _Watchdog_Tickle( header ); 8008064: b9 80 08 00 mv r1,r12 8008068: f8 00 00 b0 calli 8008328 <_Watchdog_Tickle> _ISR_Disable( level ); 800806c: 90 00 10 00 rcsr r2,IE 8008070: a0 4f 08 00 and r1,r2,r15 8008074: 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)); 8008078: 29 84 00 00 lw r4,(r12+0) while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 800807c: c9 6d 58 00 sub r11,r11,r13 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 8008080: b8 40 18 00 mv r3,r2 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 8008084: b8 80 08 00 mv r1,r4 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 8008088: 45 c4 00 08 be r14,r4,80080a8 <_Watchdog_Adjust+0xf0> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 800808c: 45 60 00 07 be r11,r0,80080a8 <_Watchdog_Adjust+0xf0> if ( units < _Watchdog_First( header )->delta_interval ) { 8008090: 28 2d 00 10 lw r13,(r1+16) 8008094: 51 6d ff f2 bgeu r11,r13,800805c <_Watchdog_Adjust+0xa4> 8008098: b8 60 20 00 mv r4,r3 _Watchdog_First( header )->delta_interval -= units; 800809c: c9 ab 58 00 sub r11,r13,r11 80080a0: 58 2b 00 10 sw (r1+16),r11 break; 80080a4: e3 ff ff d9 bi 8008008 <_Watchdog_Adjust+0x50> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 80080a8: b8 40 20 00 mv r4,r2 80080ac: e3 ff ff d7 bi 8008008 <_Watchdog_Adjust+0x50> 08005e88 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 8005e88: 37 9c ff e4 addi sp,sp,-28 8005e8c: 5b 8b 00 1c sw (sp+28),r11 8005e90: 5b 8c 00 18 sw (sp+24),r12 8005e94: 5b 8d 00 14 sw (sp+20),r13 8005e98: 5b 8e 00 10 sw (sp+16),r14 8005e9c: 5b 8f 00 0c sw (sp+12),r15 8005ea0: 5b 90 00 08 sw (sp+8),r16 8005ea4: 5b 9d 00 04 sw (sp+4),ra 8005ea8: b8 20 60 00 mv r12,r1 * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 8005eac: 90 00 68 00 rcsr r13,IE 8005eb0: 34 01 ff fe mvi r1,-2 8005eb4: a1 a1 08 00 and r1,r13,r1 8005eb8: 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)); 8005ebc: 29 8b 00 00 lw r11,(r12+0) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8005ec0: 35 8e 00 04 addi r14,r12,4 if ( _Chain_Is_empty( header ) ) 8005ec4: 45 6e 00 2b be r11,r14,8005f70 <_Watchdog_Tickle+0xe8> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 8005ec8: 29 61 00 10 lw r1,(r11+16) 8005ecc: 5c 20 00 26 bne r1,r0,8005f64 <_Watchdog_Tickle+0xdc> do { watchdog_state = _Watchdog_Remove( the_watchdog ); _ISR_Enable( level ); switch( watchdog_state ) { 8005ed0: 34 10 00 02 mvi r16,2 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 8005ed4: 34 0f ff fe mvi r15,-2 8005ed8: e0 00 00 0a bi 8005f00 <_Watchdog_Tickle+0x78> 8005edc: 90 00 10 00 rcsr r2,IE <== NOT EXECUTED 8005ee0: a0 4f 08 00 and r1,r2,r15 <== NOT EXECUTED 8005ee4: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 8005ee8: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8005eec: b8 40 68 00 mv r13,r2 <== NOT EXECUTED 8005ef0: b8 20 58 00 mv r11,r1 <== NOT EXECUTED the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 8005ef4: 45 c1 00 12 be r14,r1,8005f3c <_Watchdog_Tickle+0xb4> <== NOT EXECUTED 8005ef8: 28 21 00 10 lw r1,(r1+16) 8005efc: 5c 20 00 10 bne r1,r0,8005f3c <_Watchdog_Tickle+0xb4> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 8005f00: b9 60 08 00 mv r1,r11 8005f04: fb ff ff aa calli 8005dac <_Watchdog_Remove> _ISR_Enable( level ); 8005f08: d0 0d 00 00 wcsr IE,r13 switch( watchdog_state ) { 8005f0c: 5c 30 ff f4 bne r1,r16,8005edc <_Watchdog_Tickle+0x54> case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 8005f10: 29 62 00 24 lw r2,(r11+36) 8005f14: 29 63 00 1c lw r3,(r11+28) 8005f18: 29 61 00 20 lw r1,(r11+32) 8005f1c: d8 60 00 00 call r3 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 8005f20: 90 00 10 00 rcsr r2,IE 8005f24: a0 4f 08 00 and r1,r2,r15 8005f28: d0 01 00 00 wcsr IE,r1 8005f2c: 29 81 00 00 lw r1,(r12+0) 8005f30: b8 40 68 00 mv r13,r2 8005f34: b8 20 58 00 mv r11,r1 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 8005f38: 5d c1 ff f0 bne r14,r1,8005ef8 <_Watchdog_Tickle+0x70> leave: _ISR_Enable(level); 8005f3c: d0 02 00 00 wcsr IE,r2 } 8005f40: 2b 9d 00 04 lw ra,(sp+4) 8005f44: 2b 8b 00 1c lw r11,(sp+28) 8005f48: 2b 8c 00 18 lw r12,(sp+24) 8005f4c: 2b 8d 00 14 lw r13,(sp+20) 8005f50: 2b 8e 00 10 lw r14,(sp+16) 8005f54: 2b 8f 00 0c lw r15,(sp+12) 8005f58: 2b 90 00 08 lw r16,(sp+8) 8005f5c: 37 9c 00 1c addi sp,sp,28 8005f60: c3 a0 00 00 ret * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { the_watchdog->delta_interval--; 8005f64: 34 21 ff ff addi r1,r1,-1 8005f68: 59 61 00 10 sw (r11+16),r1 if ( the_watchdog->delta_interval != 0 ) 8005f6c: 44 20 ff d9 be r1,r0,8005ed0 <_Watchdog_Tickle+0x48> _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 8005f70: b9 a0 10 00 mv r2,r13 8005f74: e3 ff ff f2 bi 8005f3c <_Watchdog_Tickle+0xb4> 08005f78 <_Workspace_Allocate_or_fatal_error>: * _Workspace_Allocate_or_fatal_error */ void *_Workspace_Allocate_or_fatal_error( size_t size ) { 8005f78: 37 9c ff fc addi sp,sp,-4 8005f7c: 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 ); 8005f80: 34 03 00 00 mvi r3,0 8005f84: b8 20 10 00 mv r2,r1 8005f88: 78 01 08 01 mvhi r1,0x801 8005f8c: 38 21 e8 c8 ori r1,r1,0xe8c8 8005f90: b8 60 20 00 mv r4,r3 8005f94: f8 00 0e 33 calli 8009860 <_Heap_Allocate_aligned_with_boundary> __builtin_return_address( 1 ), memory ); #endif if ( memory == NULL ) 8005f98: 44 20 00 04 be r1,r0,8005fa8 <_Workspace_Allocate_or_fatal_error+0x30> true, INTERNAL_ERROR_WORKSPACE_ALLOCATION ); return memory; } 8005f9c: 2b 9d 00 04 lw ra,(sp+4) 8005fa0: 37 9c 00 04 addi sp,sp,4 8005fa4: c3 a0 00 00 ret memory ); #endif if ( memory == NULL ) _Internal_error_Occurred( 8005fa8: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8005fac: 34 03 00 04 mvi r3,4 <== NOT EXECUTED 8005fb0: fb ff f5 d8 calli 8003710 <_Internal_error_Occurred> <== NOT EXECUTED 0801bcdc <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 801bcdc: 37 9c ff f8 addi sp,sp,-8 801bce0: 5b 9d 00 04 sw (sp+4),ra 801bce4: 5b 81 00 08 sw (sp+8),r1 801bce8: f8 00 02 92 calli 801c730 <__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(); 801bcec: fb ff ff d7 calli 801bc48 rtems_shutdown_executive(status); 801bcf0: 2b 81 00 08 lw r1,(sp+8) 801bcf4: f8 00 00 64 calli 801be84 801bcf8: e0 00 00 00 bi 801bcf8 <_exit+0x1c> <== NOT EXECUTED 08040eec <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 8040eec: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8040ef0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return fcntl( fd, cmd, arg ); 8040ef4: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8040ef8: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8040efc: b8 80 18 00 mv r3,r4 <== NOT EXECUTED 8040f00: fb ff ff 5c calli 8040c70 <== NOT EXECUTED } 8040f04: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8040f08: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8040f0c: c3 a0 00 00 ret <== NOT EXECUTED 0800b830 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 800b830: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 800b834: c3 a0 00 00 ret <== NOT EXECUTED 08007b60 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 8007b60: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8007b64: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return gettimeofday( tp, tzp ); 8007b68: fb ff ff e0 calli 8007ae8 <== NOT EXECUTED } 8007b6c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8007b70: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8007b74: c3 a0 00 00 ret <== NOT EXECUTED 0802ad48 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 802ad48: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 802ad4c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return link( existing, new ); 802ad50: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 802ad54: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 802ad58: fb ff ff 64 calli 802aae8 <== NOT EXECUTED } 802ad5c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802ad60: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802ad64: c3 a0 00 00 ret <== NOT EXECUTED 0802b03c <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 802b03c: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 802b040: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return _STAT_NAME( path, buf ); 802b044: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 802b048: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 802b04c: fb ff ff b9 calli 802af30 <== NOT EXECUTED } 802b050: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802b054: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802b058: c3 a0 00 00 ret <== NOT EXECUTED 0801be40 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 801be40: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 801be44: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return realloc( ptr, size ); 801be48: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 801be4c: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 801be50: f8 00 00 1b calli 801bebc <== NOT EXECUTED } 801be54: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 801be58: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 801be5c: c3 a0 00 00 ret <== NOT EXECUTED 080655f0 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 80655f0: 37 9c ff a8 addi sp,sp,-88 <== NOT EXECUTED 80655f4: 5b 8b 00 18 sw (sp+24),r11 <== NOT EXECUTED 80655f8: 5b 8c 00 14 sw (sp+20),r12 <== NOT EXECUTED 80655fc: 5b 8d 00 10 sw (sp+16),r13 <== NOT EXECUTED 8065600: 5b 8e 00 0c sw (sp+12),r14 <== NOT EXECUTED 8065604: 5b 8f 00 08 sw (sp+8),r15 <== NOT EXECUTED 8065608: 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 ); 806560c: b8 40 08 00 mv r1,r2 <== NOT EXECUTED int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 8065610: b8 40 60 00 mv r12,r2 <== NOT EXECUTED 8065614: 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 ); 8065618: fb fe 88 7a calli 8007800 <== NOT EXECUTED 806561c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 8065620: 5c 20 00 e5 bne r1,r0,80659b4 <_rename_r+0x3c4> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 8065624: 41 82 00 00 lbu r2,(r12+0) <== NOT EXECUTED 8065628: 64 43 00 5c cmpei r3,r2,92 <== NOT EXECUTED 806562c: 64 41 00 2f cmpei r1,r2,47 <== NOT EXECUTED 8065630: b8 61 08 00 or r1,r3,r1 <== NOT EXECUTED 8065634: 44 2b 00 6d be r1,r11,80657e8 <_rename_r+0x1f8> <== NOT EXECUTED 8065638: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 806563c: 38 42 32 f0 ori r2,r2,0x32f0 <== NOT EXECUTED 8065640: 28 44 00 00 lw r4,(r2+0) <== NOT EXECUTED 8065644: 34 0e 00 00 mvi r14,0 <== NOT EXECUTED 8065648: 28 81 00 18 lw r1,(r4+24) <== NOT EXECUTED 806564c: 5b 81 00 30 sw (sp+48),r1 <== NOT EXECUTED 8065650: 28 82 00 1c lw r2,(r4+28) <== NOT EXECUTED 8065654: 5b 82 00 34 sw (sp+52),r2 <== NOT EXECUTED 8065658: 28 83 00 20 lw r3,(r4+32) <== NOT EXECUTED 806565c: 5b 83 00 38 sw (sp+56),r3 <== NOT EXECUTED 8065660: 28 81 00 24 lw r1,(r4+36) <== NOT EXECUTED 8065664: 5b 81 00 3c sw (sp+60),r1 <== NOT EXECUTED 8065668: 28 84 00 28 lw r4,(r4+40) <== NOT EXECUTED 806566c: 5b 84 00 40 sw (sp+64),r4 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 8065670: 2b 82 00 30 lw r2,(sp+48) <== NOT EXECUTED 8065674: 2b 83 00 34 lw r3,(sp+52) <== NOT EXECUTED name = old + old_parent_pathlen; 8065678: b5 8b 58 00 add r11,r12,r11 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 806567c: 5b 82 00 44 sw (sp+68),r2 <== NOT EXECUTED 8065680: 2b 82 00 38 lw r2,(sp+56) <== NOT EXECUTED 8065684: 5b 83 00 48 sw (sp+72),r3 <== NOT EXECUTED 8065688: 2b 83 00 3c lw r3,(sp+60) <== NOT EXECUTED 806568c: 5b 82 00 4c sw (sp+76),r2 <== NOT EXECUTED 8065690: 2b 82 00 40 lw r2,(sp+64) <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8065694: b9 60 08 00 mv r1,r11 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 8065698: 5b 83 00 50 sw (sp+80),r3 <== NOT EXECUTED 806569c: 5b 82 00 54 sw (sp+84),r2 <== NOT EXECUTED name = old + old_parent_pathlen; 80656a0: 5b 8b 00 58 sw (sp+88),r11 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 80656a4: fb ff ab 9d calli 8050518 <== NOT EXECUTED 80656a8: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 80656ac: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80656b0: fb fe 88 3b calli 800779c <== NOT EXECUTED 80656b4: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 80656b8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 80656bc: 5b 8b 00 58 sw (sp+88),r11 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 80656c0: fb ff ab 96 calli 8050518 <== NOT EXECUTED 80656c4: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 80656c8: 37 8c 00 44 addi r12,sp,68 <== NOT EXECUTED 80656cc: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 80656d0: b9 80 20 00 mv r4,r12 <== NOT EXECUTED 80656d4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80656d8: b8 60 28 00 mv r5,r3 <== NOT EXECUTED 80656dc: fb fe 88 66 calli 8007874 <== NOT EXECUTED 80656e0: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 80656e4: 5c 20 00 80 bne r1,r0,80658e4 <_rename_r+0x2f4> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 80656e8: 41 e2 00 00 lbu r2,(r15+0) <== NOT EXECUTED 80656ec: 64 44 00 5c cmpei r4,r2,92 <== NOT EXECUTED 80656f0: 64 41 00 2f cmpei r1,r2,47 <== NOT EXECUTED 80656f4: b8 81 20 00 or r4,r4,r1 <== NOT EXECUTED 80656f8: 44 8b 00 4c be r4,r11,8065828 <_rename_r+0x238> <== NOT EXECUTED 80656fc: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 8065700: 38 42 32 f0 ori r2,r2,0x32f0 <== NOT EXECUTED 8065704: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 8065708: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 806570c: 28 43 00 18 lw r3,(r2+24) <== NOT EXECUTED 8065710: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED 8065714: 28 43 00 1c lw r3,(r2+28) <== NOT EXECUTED 8065718: 5b 83 00 20 sw (sp+32),r3 <== NOT EXECUTED 806571c: 28 43 00 20 lw r3,(r2+32) <== NOT EXECUTED 8065720: 5b 83 00 24 sw (sp+36),r3 <== NOT EXECUTED 8065724: 28 43 00 24 lw r3,(r2+36) <== NOT EXECUTED 8065728: 5b 83 00 28 sw (sp+40),r3 <== NOT EXECUTED 806572c: 28 42 00 28 lw r2,(r2+40) <== NOT EXECUTED 8065730: 5b 82 00 2c sw (sp+44),r2 <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 8065734: 2b 82 00 28 lw r2,(sp+40) <== NOT EXECUTED 8065738: 28 44 00 04 lw r4,(r2+4) <== NOT EXECUTED 806573c: 44 80 00 8c be r4,r0,806596c <_rename_r+0x37c> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 8065740: 37 8b 00 1c addi r11,sp,28 <== NOT EXECUTED 8065744: b5 e1 08 00 add r1,r15,r1 <== NOT EXECUTED 8065748: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 806574c: 37 83 00 58 addi r3,sp,88 <== NOT EXECUTED 8065750: d8 80 00 00 call r4 <== NOT EXECUTED 8065754: b8 20 68 00 mv r13,r1 <== NOT EXECUTED if ( result != 0 ) { 8065758: 5c 20 00 6e bne r1,r0,8065910 <_rename_r+0x320> <== NOT EXECUTED /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 806575c: 2b 81 00 2c lw r1,(sp+44) <== NOT EXECUTED 8065760: 2b 82 00 40 lw r2,(sp+64) <== NOT EXECUTED 8065764: 5c 41 00 48 bne r2,r1,8065884 <_rename_r+0x294> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { 8065768: 2b 81 00 28 lw r1,(sp+40) <== NOT EXECUTED 806576c: 28 25 00 40 lw r5,(r1+64) <== NOT EXECUTED 8065770: 44 a0 00 9b be r5,r0,80659dc <_rename_r+0x3ec> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 8065774: 2b 84 00 58 lw r4,(sp+88) <== NOT EXECUTED 8065778: 37 8f 00 30 addi r15,sp,48 <== NOT EXECUTED 806577c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8065780: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8065784: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8065788: d8 a0 00 00 call r5 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 806578c: 2b 82 00 28 lw r2,(sp+40) <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 8065790: b8 20 68 00 mv r13,r1 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8065794: 44 40 00 05 be r2,r0,80657a8 <_rename_r+0x1b8> <== NOT EXECUTED 8065798: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 806579c: 44 40 00 03 be r2,r0,80657a8 <_rename_r+0x1b8> <== NOT EXECUTED 80657a0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80657a4: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_old_parentloc ) 80657a8: 5d c0 00 30 bne r14,r0,8065868 <_rename_r+0x278> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 80657ac: 2b 81 00 50 lw r1,(sp+80) <== NOT EXECUTED 80657b0: 44 20 00 05 be r1,r0,80657c4 <_rename_r+0x1d4> <== NOT EXECUTED 80657b4: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 80657b8: 44 40 00 03 be r2,r0,80657c4 <_rename_r+0x1d4> <== NOT EXECUTED 80657bc: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80657c0: d8 40 00 00 call r2 <== NOT EXECUTED return result; } 80657c4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80657c8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80657cc: 2b 8b 00 18 lw r11,(sp+24) <== NOT EXECUTED 80657d0: 2b 8c 00 14 lw r12,(sp+20) <== NOT EXECUTED 80657d4: 2b 8d 00 10 lw r13,(sp+16) <== NOT EXECUTED 80657d8: 2b 8e 00 0c lw r14,(sp+12) <== NOT EXECUTED 80657dc: 2b 8f 00 08 lw r15,(sp+8) <== NOT EXECUTED 80657e0: 37 9c 00 58 addi sp,sp,88 <== NOT EXECUTED 80657e4: c3 a0 00 00 ret <== NOT EXECUTED */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 80657e8: 44 40 ff 94 be r2,r0,8065638 <_rename_r+0x48> <== NOT EXECUTED 80657ec: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 80657f0: 38 21 32 f0 ori r1,r1,0x32f0 <== NOT EXECUTED 80657f4: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 80657f8: b9 60 70 00 mv r14,r11 <== NOT EXECUTED 80657fc: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 8065800: 5b 82 00 30 sw (sp+48),r2 <== NOT EXECUTED 8065804: 28 23 00 08 lw r3,(r1+8) <== NOT EXECUTED 8065808: 5b 83 00 34 sw (sp+52),r3 <== NOT EXECUTED 806580c: 28 22 00 0c lw r2,(r1+12) <== NOT EXECUTED 8065810: 5b 82 00 38 sw (sp+56),r2 <== NOT EXECUTED 8065814: 28 23 00 10 lw r3,(r1+16) <== NOT EXECUTED 8065818: 5b 83 00 3c sw (sp+60),r3 <== NOT EXECUTED 806581c: 28 21 00 14 lw r1,(r1+20) <== NOT EXECUTED 8065820: 5b 81 00 40 sw (sp+64),r1 <== NOT EXECUTED 8065824: e3 ff ff 93 bi 8065670 <_rename_r+0x80> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 8065828: 44 44 ff b5 be r2,r4,80656fc <_rename_r+0x10c> <== NOT EXECUTED 806582c: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8065830: 38 21 32 f0 ori r1,r1,0x32f0 <== NOT EXECUTED 8065834: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 8065838: b8 80 08 00 mv r1,r4 <== NOT EXECUTED 806583c: 28 43 00 04 lw r3,(r2+4) <== NOT EXECUTED 8065840: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED 8065844: 28 43 00 08 lw r3,(r2+8) <== NOT EXECUTED 8065848: 5b 83 00 20 sw (sp+32),r3 <== NOT EXECUTED 806584c: 28 43 00 0c lw r3,(r2+12) <== NOT EXECUTED 8065850: 5b 83 00 24 sw (sp+36),r3 <== NOT EXECUTED 8065854: 28 43 00 10 lw r3,(r2+16) <== NOT EXECUTED 8065858: 5b 83 00 28 sw (sp+40),r3 <== NOT EXECUTED 806585c: 28 42 00 14 lw r2,(r2+20) <== NOT EXECUTED 8065860: 5b 82 00 2c sw (sp+44),r2 <== NOT EXECUTED 8065864: e3 ff ff b4 bi 8065734 <_rename_r+0x144> <== NOT EXECUTED result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 8065868: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 806586c: 44 20 ff d0 be r1,r0,80657ac <_rename_r+0x1bc> <== NOT EXECUTED 8065870: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8065874: 44 40 ff ce be r2,r0,80657ac <_rename_r+0x1bc> <== NOT EXECUTED 8065878: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 806587c: d8 40 00 00 call r2 <== NOT EXECUTED 8065880: e3 ff ff cb bi 80657ac <_rename_r+0x1bc> <== NOT EXECUTED * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); 8065884: 2b 81 00 28 lw r1,(sp+40) <== NOT EXECUTED 8065888: 44 20 00 05 be r1,r0,806589c <_rename_r+0x2ac> <== NOT EXECUTED 806588c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8065890: 44 40 00 03 be r2,r0,806589c <_rename_r+0x2ac> <== NOT EXECUTED 8065894: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8065898: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_old_parentloc ) 806589c: 45 c0 00 07 be r14,r0,80658b8 <_rename_r+0x2c8> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 80658a0: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 80658a4: 44 20 00 05 be r1,r0,80658b8 <_rename_r+0x2c8> <== NOT EXECUTED 80658a8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 80658ac: 44 40 00 03 be r2,r0,80658b8 <_rename_r+0x2c8> <== NOT EXECUTED 80658b0: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 80658b4: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 80658b8: 2b 81 00 50 lw r1,(sp+80) <== NOT EXECUTED 80658bc: 44 20 00 05 be r1,r0,80658d0 <_rename_r+0x2e0> <== NOT EXECUTED 80658c0: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 80658c4: 44 40 00 03 be r2,r0,80658d0 <_rename_r+0x2e0> <== NOT EXECUTED 80658c8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80658cc: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 80658d0: fb ff 8d 12 calli 8048d18 <__errno> <== NOT EXECUTED 80658d4: 34 02 00 12 mvi r2,18 <== NOT EXECUTED 80658d8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80658dc: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED 80658e0: e3 ff ff b9 bi 80657c4 <_rename_r+0x1d4> <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) 80658e4: 45 c0 00 07 be r14,r0,8065900 <_rename_r+0x310> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 80658e8: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 80658ec: 44 20 00 05 be r1,r0,8065900 <_rename_r+0x310> <== NOT EXECUTED 80658f0: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 80658f4: 44 40 00 03 be r2,r0,8065900 <_rename_r+0x310> <== NOT EXECUTED 80658f8: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 80658fc: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 8065900: fb ff 8d 06 calli 8048d18 <__errno> <== NOT EXECUTED 8065904: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8065908: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED 806590c: e3 ff ff ae bi 80657c4 <_rename_r+0x1d4> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 8065910: 2b 81 00 28 lw r1,(sp+40) <== NOT EXECUTED 8065914: 44 20 00 05 be r1,r0,8065928 <_rename_r+0x338> <== NOT EXECUTED 8065918: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 806591c: 44 40 00 03 be r2,r0,8065928 <_rename_r+0x338> <== NOT EXECUTED 8065920: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8065924: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_old_parentloc ) 8065928: 45 c0 00 07 be r14,r0,8065944 <_rename_r+0x354> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 806592c: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 8065930: 44 20 00 05 be r1,r0,8065944 <_rename_r+0x354> <== NOT EXECUTED 8065934: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8065938: 44 40 00 03 be r2,r0,8065944 <_rename_r+0x354> <== NOT EXECUTED 806593c: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 8065940: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8065944: 2b 81 00 50 lw r1,(sp+80) <== NOT EXECUTED 8065948: 44 20 00 05 be r1,r0,806595c <_rename_r+0x36c> <== NOT EXECUTED 806594c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8065950: 44 40 00 03 be r2,r0,806595c <_rename_r+0x36c> <== NOT EXECUTED 8065954: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8065958: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 806595c: fb ff 8c ef calli 8048d18 <__errno> <== NOT EXECUTED 8065960: 58 2d 00 00 sw (r1+0),r13 <== NOT EXECUTED 8065964: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED 8065968: e3 ff ff 97 bi 80657c4 <_rename_r+0x1d4> <== NOT EXECUTED */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); if ( !new_parent_loc.ops->evalformake_h ) { if ( free_old_parentloc ) 806596c: 45 c4 00 07 be r14,r4,8065988 <_rename_r+0x398> <== NOT EXECUTED } if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 8065970: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 8065974: 44 20 00 05 be r1,r0,8065988 <_rename_r+0x398> <== NOT EXECUTED 8065978: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 806597c: 44 40 00 03 be r2,r0,8065988 <_rename_r+0x398> <== NOT EXECUTED 8065980: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 8065984: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8065988: 2b 81 00 50 lw r1,(sp+80) <== NOT EXECUTED 806598c: 44 20 00 05 be r1,r0,80659a0 <_rename_r+0x3b0> <== NOT EXECUTED 8065990: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8065994: 44 40 00 03 be r2,r0,80659a0 <_rename_r+0x3b0> <== NOT EXECUTED 8065998: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 806599c: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 80659a0: fb ff 8c de calli 8048d18 <__errno> <== NOT EXECUTED 80659a4: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80659a8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80659ac: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED 80659b0: e3 ff ff 85 bi 80657c4 <_rename_r+0x1d4> <== NOT EXECUTED old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 80659b4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80659b8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80659bc: 34 03 00 02 mvi r3,2 <== NOT EXECUTED 80659c0: 37 84 00 30 addi r4,sp,48 <== NOT EXECUTED 80659c4: 34 05 00 00 mvi r5,0 <== NOT EXECUTED 80659c8: fb fe 87 ee calli 8007980 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 80659cc: 34 0e 00 01 mvi r14,1 <== NOT EXECUTED 80659d0: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED 80659d4: 44 20 ff 27 be r1,r0,8065670 <_rename_r+0x80> <== NOT EXECUTED 80659d8: e3 ff ff 7b bi 80657c4 <_rename_r+0x1d4> <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); 80659dc: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 80659e0: 44 45 00 03 be r2,r5,80659ec <_rename_r+0x3fc> <== NOT EXECUTED 80659e4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80659e8: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_old_parentloc ) 80659ec: 45 c0 ff e7 be r14,r0,8065988 <_rename_r+0x398> <== NOT EXECUTED 80659f0: e3 ff ff e0 bi 8065970 <_rename_r+0x380> <== NOT EXECUTED 0800966c <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 800966c: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8009670: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return _STAT_NAME( path, buf ); 8009674: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8009678: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 800967c: fb ff ff b9 calli 8009560 <== NOT EXECUTED } 8009680: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8009684: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8009688: c3 a0 00 00 ret <== NOT EXECUTED 0800cd78 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 800cd78: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 800cd7c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED return unlink( path ); 800cd80: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 800cd84: fb ff ff 56 calli 800cadc <== NOT EXECUTED } 800cd88: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800cd8c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800cd90: c3 a0 00 00 ret <== NOT EXECUTED 08029384 : #include int chdir( const char *pathname ) { 8029384: 37 9c ff e0 addi sp,sp,-32 8029388: 5b 8b 00 0c sw (sp+12),r11 802938c: 5b 8c 00 08 sw (sp+8),r12 8029390: 5b 9d 00 04 sw (sp+4),ra 8029394: 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 ); 8029398: f8 00 9c 60 calli 8050518 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 802939c: 34 03 00 01 mvi r3,1 80293a0: 37 8b 00 10 addi r11,sp,16 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 80293a4: b8 20 10 00 mv r2,r1 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 80293a8: b8 60 28 00 mv r5,r3 80293ac: b9 80 08 00 mv r1,r12 80293b0: b9 60 20 00 mv r4,r11 80293b4: fb ff 79 73 calli 8007980 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 80293b8: 34 03 ff ff mvi r3,-1 80293bc: 5c 20 00 1d bne r1,r0,8029430 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 80293c0: 2b 83 00 1c lw r3,(sp+28) 80293c4: 28 62 00 10 lw r2,(r3+16) 80293c8: 44 41 00 2b be r2,r1,8029474 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 80293cc: b9 60 08 00 mv r1,r11 80293d0: d8 40 00 00 call r2 80293d4: 34 02 00 01 mvi r2,1 80293d8: 5c 22 00 1c bne r1,r2,8029448 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 80293dc: 78 0b 08 07 mvhi r11,0x807 80293e0: 39 6b 32 f0 ori r11,r11,0x32f0 80293e4: 29 62 00 00 lw r2,(r11+0) 80293e8: 28 41 00 10 lw r1,(r2+16) 80293ec: 44 20 00 06 be r1,r0,8029404 80293f0: 28 23 00 1c lw r3,(r1+28) 80293f4: 44 60 00 04 be r3,r0,8029404 80293f8: 34 41 00 04 addi r1,r2,4 80293fc: d8 60 00 00 call r3 8029400: 29 62 00 00 lw r2,(r11+0) rtems_filesystem_current = loc; 8029404: 2b 81 00 10 lw r1,(sp+16) 8029408: 34 03 00 00 mvi r3,0 802940c: 58 41 00 04 sw (r2+4),r1 8029410: 2b 81 00 14 lw r1,(sp+20) 8029414: 58 41 00 08 sw (r2+8),r1 8029418: 2b 81 00 18 lw r1,(sp+24) 802941c: 58 41 00 0c sw (r2+12),r1 8029420: 2b 81 00 1c lw r1,(sp+28) 8029424: 58 41 00 10 sw (r2+16),r1 8029428: 2b 81 00 20 lw r1,(sp+32) 802942c: 58 41 00 14 sw (r2+20),r1 return 0; } 8029430: b8 60 08 00 mv r1,r3 8029434: 2b 9d 00 04 lw ra,(sp+4) 8029438: 2b 8b 00 0c lw r11,(sp+12) 802943c: 2b 8c 00 08 lw r12,(sp+8) 8029440: 37 9c 00 20 addi sp,sp,32 8029444: c3 a0 00 00 ret rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 8029448: 2b 81 00 1c lw r1,(sp+28) 802944c: 44 20 00 05 be r1,r0,8029460 8029450: 28 22 00 1c lw r2,(r1+28) 8029454: 44 40 00 03 be r2,r0,8029460 8029458: b9 60 08 00 mv r1,r11 802945c: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( ENOTDIR ); 8029460: f8 00 7e 2e calli 8048d18 <__errno> 8029464: 34 02 00 14 mvi r2,20 8029468: 58 22 00 00 sw (r1+0),r2 802946c: 34 03 ff ff mvi r3,-1 8029470: e3 ff ff f0 bi 8029430 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 8029474: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED 8029478: 44 62 00 03 be r3,r2,8029484 <== NOT EXECUTED 802947c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8029480: d8 60 00 00 call r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8029484: f8 00 7e 25 calli 8048d18 <__errno> <== NOT EXECUTED 8029488: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 802948c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8029490: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 8029494: e3 ff ff e7 bi 8029430 <== NOT EXECUTED 080075cc : int chmod( const char *path, mode_t mode ) { 80075cc: 37 9c ff dc addi sp,sp,-36 80075d0: 5b 8b 00 10 sw (sp+16),r11 80075d4: 5b 8c 00 0c sw (sp+12),r12 80075d8: 5b 8d 00 08 sw (sp+8),r13 80075dc: 5b 9d 00 04 sw (sp+4),ra 80075e0: b8 20 58 00 mv r11,r1 80075e4: b8 40 68 00 mv r13,r2 int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 80075e8: 37 8c 00 14 addi r12,sp,20 80075ec: f8 01 23 cb calli 8050518 80075f0: b8 20 10 00 mv r2,r1 80075f4: 34 03 00 00 mvi r3,0 80075f8: b9 60 08 00 mv r1,r11 80075fc: b9 80 20 00 mv r4,r12 8007600: 34 05 00 01 mvi r5,1 8007604: f8 00 00 df calli 8007980 if ( status != 0 ) 8007608: 34 0b ff ff mvi r11,-1 800760c: 5c 20 00 0f bne r1,r0,8007648 return -1; if ( !loc.handlers ){ 8007610: 2b 83 00 1c lw r3,(sp+28) 8007614: 44 61 00 1f be r3,r1,8007690 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 8007618: 28 63 00 1c lw r3,(r3+28) 800761c: 44 60 00 12 be r3,r0,8007664 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 8007620: b9 a0 10 00 mv r2,r13 8007624: b9 80 08 00 mv r1,r12 8007628: d8 60 00 00 call r3 800762c: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &loc ); 8007630: 2b 81 00 20 lw r1,(sp+32) 8007634: 44 20 00 05 be r1,r0,8007648 8007638: 28 22 00 1c lw r2,(r1+28) 800763c: 44 40 00 03 be r2,r0,8007648 8007640: b9 80 08 00 mv r1,r12 8007644: d8 40 00 00 call r2 return result; } 8007648: b9 60 08 00 mv r1,r11 800764c: 2b 9d 00 04 lw ra,(sp+4) 8007650: 2b 8b 00 10 lw r11,(sp+16) 8007654: 2b 8c 00 0c lw r12,(sp+12) 8007658: 2b 8d 00 08 lw r13,(sp+8) 800765c: 37 9c 00 24 addi sp,sp,36 8007660: c3 a0 00 00 ret rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 8007664: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8007668: 44 23 00 05 be r1,r3,800767c <== NOT EXECUTED 800766c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8007670: 44 40 00 03 be r2,r0,800767c <== NOT EXECUTED 8007674: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8007678: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 800767c: f8 01 05 a7 calli 8048d18 <__errno> <== NOT EXECUTED 8007680: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8007684: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8007688: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 800768c: e3 ff ff ef bi 8007648 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 8007690: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8007694: 44 23 00 05 be r1,r3,80076a8 <== NOT EXECUTED 8007698: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800769c: 44 43 00 03 be r2,r3,80076a8 <== NOT EXECUTED 80076a0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80076a4: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 80076a8: f8 01 05 9c calli 8048d18 <__errno> <== NOT EXECUTED 80076ac: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 80076b0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80076b4: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 80076b8: e3 ff ff e4 bi 8007648 <== NOT EXECUTED 08029498 : int chown( const char *path, uid_t owner, gid_t group ) { 8029498: 37 9c ff d8 addi sp,sp,-40 802949c: 5b 8b 00 14 sw (sp+20),r11 80294a0: 5b 8c 00 10 sw (sp+16),r12 80294a4: 5b 8d 00 0c sw (sp+12),r13 80294a8: 5b 8e 00 08 sw (sp+8),r14 80294ac: 5b 9d 00 04 sw (sp+4),ra 80294b0: b8 20 58 00 mv r11,r1 80294b4: 20 4e ff ff andi r14,r2,0xffff 80294b8: 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 ) ) 80294bc: 37 8c 00 18 addi r12,sp,24 80294c0: f8 00 9c 16 calli 8050518 80294c4: b8 20 10 00 mv r2,r1 80294c8: 34 03 00 00 mvi r3,0 80294cc: b9 60 08 00 mv r1,r11 80294d0: b9 80 20 00 mv r4,r12 80294d4: 34 05 00 01 mvi r5,1 80294d8: fb ff 79 2a calli 8007980 80294dc: 34 0b ff ff mvi r11,-1 80294e0: 5c 20 00 0f bne r1,r0,802951c return -1; if ( !loc.ops->chown_h ) { 80294e4: 2b 82 00 24 lw r2,(sp+36) 80294e8: 28 44 00 18 lw r4,(r2+24) 80294ec: 44 81 00 14 be r4,r1,802953c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 80294f0: b9 c0 10 00 mv r2,r14 80294f4: b9 a0 18 00 mv r3,r13 80294f8: b9 80 08 00 mv r1,r12 80294fc: d8 80 00 00 call r4 8029500: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &loc ); 8029504: 2b 81 00 24 lw r1,(sp+36) 8029508: 44 20 00 05 be r1,r0,802951c 802950c: 28 22 00 1c lw r2,(r1+28) 8029510: 44 40 00 03 be r2,r0,802951c 8029514: b9 80 08 00 mv r1,r12 8029518: d8 40 00 00 call r2 return result; } 802951c: b9 60 08 00 mv r1,r11 8029520: 2b 9d 00 04 lw ra,(sp+4) 8029524: 2b 8b 00 14 lw r11,(sp+20) 8029528: 2b 8c 00 10 lw r12,(sp+16) 802952c: 2b 8d 00 0c lw r13,(sp+12) 8029530: 2b 8e 00 08 lw r14,(sp+8) 8029534: 37 9c 00 28 addi sp,sp,40 8029538: c3 a0 00 00 ret if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 802953c: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8029540: 44 44 00 03 be r2,r4,802954c <== NOT EXECUTED 8029544: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8029548: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 802954c: f8 00 7d f3 calli 8048d18 <__errno> <== NOT EXECUTED 8029550: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8029554: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8029558: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 802955c: e3 ff ff f0 bi 802951c <== NOT EXECUTED 08029560 : #include int chroot( const char *pathname ) { 8029560: 37 9c ff dc addi sp,sp,-36 8029564: 5b 8b 00 10 sw (sp+16),r11 8029568: 5b 8c 00 0c sw (sp+12),r12 802956c: 5b 8d 00 08 sw (sp+8),r13 8029570: 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) { 8029574: 78 0b 08 07 mvhi r11,0x807 8029578: 39 6b 32 f0 ori r11,r11,0x32f0 802957c: 29 6d 00 00 lw r13,(r11+0) 8029580: 78 02 08 07 mvhi r2,0x807 8029584: 38 42 6f 5c ori r2,r2,0x6f5c #include int chroot( const char *pathname ) { 8029588: b8 20 60 00 mv r12,r1 int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 802958c: 45 a2 00 26 be r13,r2,8029624 rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); 8029590: b9 80 08 00 mv r1,r12 8029594: fb ff ff 7c calli 8029384 8029598: b8 20 60 00 mv r12,r1 if (result) { 802959c: 5c 20 00 2a bne r1,r0,8029644 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 80295a0: 78 01 08 06 mvhi r1,0x806 80295a4: 38 21 78 c0 ori r1,r1,0x78c0 80295a8: 34 02 00 01 mvi r2,1 80295ac: b9 80 18 00 mv r3,r12 80295b0: 37 84 00 14 addi r4,sp,20 80295b4: b9 80 28 00 mv r5,r12 80295b8: fb ff 78 f2 calli 8007980 80295bc: 5c 2c 00 22 bne r1,r12,8029644 /* 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); 80295c0: 29 62 00 00 lw r2,(r11+0) 80295c4: 28 43 00 24 lw r3,(r2+36) 80295c8: 44 61 00 06 be r3,r1,80295e0 80295cc: 28 63 00 1c lw r3,(r3+28) 80295d0: 44 61 00 04 be r3,r1,80295e0 80295d4: 34 41 00 18 addi r1,r2,24 80295d8: d8 60 00 00 call r3 80295dc: 29 62 00 00 lw r2,(r11+0) rtems_filesystem_root = loc; 80295e0: 2b 81 00 14 lw r1,(sp+20) 80295e4: 58 41 00 18 sw (r2+24),r1 80295e8: 2b 83 00 18 lw r3,(sp+24) 80295ec: 34 01 00 00 mvi r1,0 80295f0: 58 43 00 1c sw (r2+28),r3 80295f4: 2b 83 00 1c lw r3,(sp+28) 80295f8: 58 43 00 20 sw (r2+32),r3 80295fc: 2b 83 00 20 lw r3,(sp+32) 8029600: 58 43 00 24 sw (r2+36),r3 8029604: 2b 83 00 24 lw r3,(sp+36) 8029608: 58 43 00 28 sw (r2+40),r3 return 0; } 802960c: 2b 9d 00 04 lw ra,(sp+4) 8029610: 2b 8b 00 10 lw r11,(sp+16) 8029614: 2b 8c 00 0c lw r12,(sp+12) 8029618: 2b 8d 00 08 lw r13,(sp+8) 802961c: 37 9c 00 24 addi sp,sp,36 8029620: c3 a0 00 00 ret int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ 8029624: f8 00 07 a1 calli 802b4a8 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 8029628: 29 61 00 00 lw r1,(r11+0) 802962c: 5c 2d ff d9 bne r1,r13,8029590 rtems_set_errno_and_return_minus_one( ENOTSUP ); 8029630: f8 00 7d ba calli 8048d18 <__errno> <== NOT EXECUTED 8029634: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8029638: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 802963c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8029640: e3 ff ff f3 bi 802960c <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 8029644: f8 00 7d b5 calli 8048d18 <__errno> <== NOT EXECUTED 8029648: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 802964c: f8 00 7d b3 calli 8048d18 <__errno> <== NOT EXECUTED 8029650: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8029654: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED 8029658: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 802965c: e3 ff ff ec bi 802960c <== NOT EXECUTED 08005068 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 8005068: 37 9c ff f0 addi sp,sp,-16 800506c: 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; 8005070: 28 23 00 3c lw r3,(r1+60) #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 8005074: 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; 8005078: 34 01 00 00 mvi r1,0 args.mode = 0; 800507c: 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; 8005080: 5b 81 00 0c sw (sp+12),r1 args.mode = 0; status = rtems_io_close( 8005084: 28 62 00 0c lw r2,(r3+12) 8005088: 28 61 00 08 lw r1,(r3+8) 800508c: 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; 8005090: 5b 84 00 08 sw (sp+8),r4 args.flags = 0; args.mode = 0; status = rtems_io_close( 8005094: f8 00 07 be calli 8006f8c np->major, np->minor, (void *) &args ); if ( status ) { 8005098: b8 20 10 00 mv r2,r1 800509c: 44 20 00 03 be r1,r0,80050a8 return rtems_deviceio_errno(status); 80050a0: f8 00 00 54 calli 80051f0 <== NOT EXECUTED 80050a4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED } return 0; } 80050a8: b8 40 08 00 mv r1,r2 80050ac: 2b 9d 00 04 lw ra,(sp+4) 80050b0: 37 9c 00 10 addi sp,sp,16 80050b4: c3 a0 00 00 ret 080050c4 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 80050c4: 37 9c ff dc addi sp,sp,-36 80050c8: 5b 8b 00 24 sw (sp+36),r11 80050cc: 5b 8c 00 20 sw (sp+32),r12 80050d0: 5b 8d 00 1c sw (sp+28),r13 80050d4: 5b 8e 00 18 sw (sp+24),r14 80050d8: 5b 8f 00 14 sw (sp+20),r15 80050dc: 5b 90 00 10 sw (sp+16),r16 80050e0: 5b 91 00 0c sw (sp+12),r17 80050e4: 5b 92 00 08 sw (sp+8),r18 80050e8: 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; 80050ec: 28 90 00 00 lw r16,(r4+0) const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 80050f0: b8 80 78 00 mv r15,r4 80050f4: b8 20 90 00 mv r18,r1 80050f8: b8 40 70 00 mv r14,r2 rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) 80050fc: 46 00 00 38 be r16,r0,80051dc rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 8005100: 78 02 08 00 mvhi r2,0x800 8005104: 38 42 f0 14 ori r2,r2,0xf014 8005108: 28 51 00 00 lw r17,(r2+0) } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 800510c: 34 01 00 00 mvi r1,0 8005110: b8 20 58 00 mv r11,r1 for (i = 0; i < rtems_device_table_size; i++) { 8005114: 46 21 00 15 be r17,r1,8005168 if (!device_name_table[i].device_name) 8005118: 34 02 00 02 mvi r2,2 800511c: fb ff ec 0f calli 8000158 <__ashlsi3> 8005120: 34 02 00 02 mvi r2,2 8005124: b8 20 68 00 mv r13,r1 8005128: fb ff ec 0c calli 8000158 <__ashlsi3> 800512c: b5 a1 68 00 add r13,r13,r1 8005130: b6 0d 68 00 add r13,r16,r13 8005134: 29 ac 00 00 lw r12,(r13+0) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8005138: ba 40 08 00 mv r1,r18 800513c: b9 c0 18 00 mv r3,r14 8005140: b9 80 10 00 mv r2,r12 /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 8005144: 35 6b 00 01 addi r11,r11,1 if (!device_name_table[i].device_name) 8005148: 45 80 00 06 be r12,r0,8005160 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 800514c: f8 00 1a 2a calli 800b9f4 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 8005150: b5 8e 60 00 add r12,r12,r14 for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8005154: 5c 20 00 03 bne r1,r0,8005160 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 8005158: 41 82 00 00 lbu r2,(r12+0) 800515c: 44 41 00 08 be r2,r1,800517c /* 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++) { 8005160: b9 60 08 00 mv r1,r11 8005164: 56 2b ff ed bgu r17,r11,8005118 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 8005168: f8 00 15 8e calli 800a7a0 <__errno> 800516c: 34 02 00 02 mvi r2,2 8005170: 58 22 00 00 sw (r1+0),r2 8005174: 34 01 ff ff mvi r1,-1 8005178: e0 00 00 0e bi 80051b0 /* 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; 800517c: 78 01 08 00 mvhi r1,0x800 8005180: 38 21 f1 7c ori r1,r1,0xf17c 8005184: 28 24 00 00 lw r4,(r1+0) if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 8005188: 78 03 08 00 mvhi r3,0x800 pathloc->ops = &devFS_ops; 800518c: 78 01 08 00 mvhi r1,0x800 pathloc->mt_entry = rtems_filesystem_root.mt_entry; 8005190: 28 84 00 28 lw r4,(r4+40) continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 8005194: 38 21 f0 fc ori r1,r1,0xf0fc 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; 8005198: 38 63 f1 44 ori r3,r3,0xf144 pathloc->ops = &devFS_ops; 800519c: 59 e1 00 0c sw (r15+12),r1 pathloc->mt_entry = rtems_filesystem_root.mt_entry; 80051a0: 59 e4 00 10 sw (r15+16),r4 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 80051a4: 59 ed 00 00 sw (r15+0),r13 pathloc->handlers = &devFS_file_handlers; 80051a8: 59 e3 00 08 sw (r15+8),r3 pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 80051ac: b8 40 08 00 mv r1,r2 return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 80051b0: 2b 9d 00 04 lw ra,(sp+4) 80051b4: 2b 8b 00 24 lw r11,(sp+36) 80051b8: 2b 8c 00 20 lw r12,(sp+32) 80051bc: 2b 8d 00 1c lw r13,(sp+28) 80051c0: 2b 8e 00 18 lw r14,(sp+24) 80051c4: 2b 8f 00 14 lw r15,(sp+20) 80051c8: 2b 90 00 10 lw r16,(sp+16) 80051cc: 2b 91 00 0c lw r17,(sp+12) 80051d0: 2b 92 00 08 lw r18,(sp+8) 80051d4: 37 9c 00 24 addi sp,sp,36 80051d8: c3 a0 00 00 ret } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 80051dc: f8 00 15 71 calli 800a7a0 <__errno> <== NOT EXECUTED 80051e0: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 80051e4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80051e8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80051ec: e3 ff ff f1 bi 80051b0 <== NOT EXECUTED 08000810 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 8000810: 37 9c ff f0 addi sp,sp,-16 8000814: 5b 8b 00 10 sw (sp+16),r11 8000818: 5b 8c 00 0c sw (sp+12),r12 800081c: 5b 8d 00 08 sw (sp+8),r13 8000820: 5b 9d 00 04 sw (sp+4),ra rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 8000824: 78 0b 08 00 mvhi r11,0x800 8000828: 39 6b f0 14 ori r11,r11,0xf014 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 800082c: b8 20 68 00 mv r13,r1 rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 8000830: 29 61 00 00 lw r1,(r11+0) 8000834: 34 02 00 02 mvi r2,2 8000838: fb ff fe 48 calli 8000158 <__ashlsi3> 800083c: 34 02 00 02 mvi r2,2 8000840: b8 20 60 00 mv r12,r1 8000844: fb ff fe 45 calli 8000158 <__ashlsi3> 8000848: b5 81 08 00 add r1,r12,r1 800084c: f8 00 10 ee calli 8004c04 <_Workspace_Allocate> 8000850: b8 20 60 00 mv r12,r1 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 8000854: 44 20 00 19 be r1,r0,80008b8 rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 8000858: 29 61 00 00 lw r1,(r11+0) 800085c: 34 02 00 02 mvi r2,2 8000860: fb ff fe 3e calli 8000158 <__ashlsi3> 8000864: 34 02 00 02 mvi r2,2 8000868: b8 20 58 00 mv r11,r1 800086c: fb ff fe 3b calli 8000158 <__ashlsi3> 8000870: b5 61 18 00 add r3,r11,r1 8000874: 34 02 00 00 mvi r2,0 8000878: b9 80 08 00 mv r1,r12 800087c: f8 00 2a ac calli 800b32c device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 8000880: 78 02 08 00 mvhi r2,0x800 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 8000884: 78 01 08 00 mvhi r1,0x800 8000888: 38 21 f0 fc ori r1,r1,0xf0fc device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 800088c: 38 42 f1 44 ori r2,r2,0xf144 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 8000890: 59 a1 00 28 sw (r13+40),r1 /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 8000894: 59 ac 00 1c sw (r13+28),r12 device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 8000898: 59 a2 00 24 sw (r13+36),r2 temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 800089c: 34 01 00 00 mvi r1,0 return 0; } 80008a0: 2b 9d 00 04 lw ra,(sp+4) 80008a4: 2b 8b 00 10 lw r11,(sp+16) 80008a8: 2b 8c 00 0c lw r12,(sp+12) 80008ac: 2b 8d 00 08 lw r13,(sp+8) 80008b0: 37 9c 00 10 addi sp,sp,16 80008b4: c3 a0 00 00 ret sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 80008b8: f8 00 27 ba calli 800a7a0 <__errno> <== NOT EXECUTED 80008bc: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 80008c0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80008c4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80008c8: e3 ff ff f6 bi 80008a0 <== NOT EXECUTED 08000a9c : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 8000a9c: 37 9c ff ec addi sp,sp,-20 8000aa0: 5b 9d 00 04 sw (sp+4),ra 8000aa4: b8 20 20 00 mv r4,r1 rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 8000aa8: 28 21 00 3c lw r1,(r1+60) args.iop = iop; args.command = command; 8000aac: 5b 82 00 0c sw (sp+12),r2 args.buffer = buffer; 8000ab0: 5b 83 00 10 sw (sp+16),r3 status = rtems_io_control( 8000ab4: 28 22 00 0c lw r2,(r1+12) 8000ab8: 28 21 00 08 lw r1,(r1+8) 8000abc: 37 83 00 08 addi r3,sp,8 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 8000ac0: 5b 84 00 08 sw (sp+8),r4 args.command = command; args.buffer = buffer; status = rtems_io_control( 8000ac4: f8 00 07 5b calli 8002830 np->major, np->minor, (void *) &args ); if ( status ) 8000ac8: 5c 20 00 05 bne r1,r0,8000adc return rtems_deviceio_errno(status); return args.ioctl_return; 8000acc: 2b 81 00 14 lw r1,(sp+20) } 8000ad0: 2b 9d 00 04 lw ra,(sp+4) 8000ad4: 37 9c 00 14 addi sp,sp,20 8000ad8: c3 a0 00 00 ret np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 8000adc: f8 00 11 c5 calli 80051f0 <== NOT EXECUTED return args.ioctl_return; } 8000ae0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8000ae4: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 8000ae8: c3 a0 00 00 ret <== NOT EXECUTED 080008cc : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 80008cc: 37 9c ff d8 addi sp,sp,-40 80008d0: 5b 8b 00 28 sw (sp+40),r11 80008d4: 5b 8c 00 24 sw (sp+36),r12 80008d8: 5b 8d 00 20 sw (sp+32),r13 80008dc: 5b 8e 00 1c sw (sp+28),r14 80008e0: 5b 8f 00 18 sw (sp+24),r15 80008e4: 5b 90 00 14 sw (sp+20),r16 80008e8: 5b 91 00 10 sw (sp+16),r17 80008ec: 5b 92 00 0c sw (sp+12),r18 80008f0: 5b 93 00 08 sw (sp+8),r19 80008f4: 5b 9d 00 04 sw (sp+4),ra * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 80008f8: 40 26 00 00 lbu r6,(r1+0) const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 80008fc: b8 20 60 00 mv r12,r1 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 8000900: 34 01 00 64 mvi r1,100 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 8000904: b8 40 88 00 mv r17,r2 8000908: b8 60 98 00 mv r19,r3 800090c: b8 80 90 00 mv r18,r4 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 8000910: 44 c1 00 48 be r6,r1,8000a30 (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 8000914: 22 26 f0 00 andi r6,r17,0xf000 8000918: 7c c2 60 00 cmpnei r2,r6,24576 800091c: 7c c1 20 00 cmpnei r1,r6,8192 8000920: a0 22 08 00 and r1,r1,r2 8000924: 5c 20 00 4d bne r1,r0,8000a58 rtems_set_errno_and_return_minus_one( EINVAL ); else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 8000928: 28 ae 00 00 lw r14,(r5+0) if (!device_name_table) 800092c: 45 c1 00 55 be r14,r1,8000a80 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 8000930: 78 05 08 00 mvhi r5,0x800 8000934: 38 a5 f0 14 ori r5,r5,0xf014 8000938: 28 af 00 00 lw r15,(r5+0) rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 800093c: 34 10 ff ff mvi r16,-1 8000940: b8 20 58 00 mv r11,r1 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 8000944: 45 e0 00 4a be r15,r0,8000a6c if (device_name_table[i].device_name == NULL) 8000948: 34 02 00 02 mvi r2,2 800094c: fb ff fe 03 calli 8000158 <__ashlsi3> 8000950: 34 02 00 02 mvi r2,2 8000954: b8 20 68 00 mv r13,r1 8000958: fb ff fe 00 calli 8000158 <__ashlsi3> 800095c: b5 a1 08 00 add r1,r13,r1 8000960: b5 c1 08 00 add r1,r14,r1 8000964: 28 25 00 00 lw r5,(r1+0) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 8000968: b9 80 08 00 mv r1,r12 800096c: b8 a0 10 00 mv r2,r5 device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 8000970: 44 a0 00 29 be r5,r0,8000a14 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 8000974: f8 00 2b a5 calli 800b808 <== NOT EXECUTED 8000978: 44 20 00 29 be r1,r0,8000a1c <== NOT EXECUTED /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 800097c: 35 6b 00 01 addi r11,r11,1 8000980: b9 60 08 00 mv r1,r11 8000984: 55 eb ff f1 bgu r15,r11,8000948 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 8000988: 34 01 ff ff mvi r1,-1 800098c: 46 01 00 38 be r16,r1,8000a6c rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 8000990: 90 00 58 00 rcsr r11,IE 8000994: 34 01 ff fe mvi r1,-2 8000998: a1 61 08 00 and r1,r11,r1 800099c: d0 01 00 00 wcsr IE,r1 device_name_table[slot].device_name = (char *)path; 80009a0: 34 02 00 02 mvi r2,2 80009a4: ba 00 08 00 mv r1,r16 80009a8: fb ff fd ec calli 8000158 <__ashlsi3> 80009ac: 34 02 00 02 mvi r2,2 80009b0: b8 20 68 00 mv r13,r1 80009b4: fb ff fd e9 calli 8000158 <__ashlsi3> 80009b8: b5 a1 08 00 add r1,r13,r1 80009bc: b5 c1 70 00 add r14,r14,r1 80009c0: 59 cc 00 00 sw (r14+0),r12 device_name_table[slot].device_name_length = strlen(path); 80009c4: b9 80 08 00 mv r1,r12 80009c8: f8 00 2b e0 calli 800b948 80009cc: 59 c1 00 04 sw (r14+4),r1 device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 80009d0: 59 d1 00 10 sw (r14+16),r17 rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); device_name_table[slot].major = major; 80009d4: 59 d3 00 08 sw (r14+8),r19 device_name_table[slot].minor = minor; 80009d8: 59 d2 00 0c sw (r14+12),r18 device_name_table[slot].mode = mode; _ISR_Enable(level); 80009dc: d0 0b 00 00 wcsr IE,r11 80009e0: 34 01 00 00 mvi r1,0 return 0; } 80009e4: 2b 9d 00 04 lw ra,(sp+4) 80009e8: 2b 8b 00 28 lw r11,(sp+40) 80009ec: 2b 8c 00 24 lw r12,(sp+36) 80009f0: 2b 8d 00 20 lw r13,(sp+32) 80009f4: 2b 8e 00 1c lw r14,(sp+28) 80009f8: 2b 8f 00 18 lw r15,(sp+24) 80009fc: 2b 90 00 14 lw r16,(sp+20) 8000a00: 2b 91 00 10 lw r17,(sp+16) 8000a04: 2b 92 00 0c lw r18,(sp+12) 8000a08: 2b 93 00 08 lw r19,(sp+8) 8000a0c: 37 9c 00 28 addi sp,sp,40 8000a10: c3 a0 00 00 ret for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 8000a14: b9 60 80 00 mv r16,r11 8000a18: e3 ff ff d9 bi 800097c 8000a1c: f8 00 27 61 calli 800a7a0 <__errno> <== NOT EXECUTED 8000a20: 34 02 00 11 mvi r2,17 <== NOT EXECUTED 8000a24: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000a28: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000a2c: e3 ff ff ee bi 80009e4 <== NOT EXECUTED * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 8000a30: 41 82 00 01 lbu r2,(r12+1) 8000a34: 34 01 00 65 mvi r1,101 8000a38: 5c 41 ff b7 bne r2,r1,8000914 (path[2] == 'v') && (path[3] == '\0')) 8000a3c: 41 82 00 02 lbu r2,(r12+2) 8000a40: 34 01 00 76 mvi r1,118 8000a44: 5c 41 ff b4 bne r2,r1,8000914 8000a48: 41 82 00 03 lbu r2,(r12+3) 8000a4c: b8 40 08 00 mv r1,r2 8000a50: 5c 40 ff b1 bne r2,r0,8000914 8000a54: e3 ff ff e4 bi 80009e4 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) rtems_set_errno_and_return_minus_one( EINVAL ); 8000a58: f8 00 27 52 calli 800a7a0 <__errno> <== NOT EXECUTED 8000a5c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8000a60: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000a64: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000a68: e3 ff ff df bi 80009e4 <== NOT EXECUTED if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 8000a6c: f8 00 27 4d calli 800a7a0 <__errno> <== NOT EXECUTED 8000a70: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8000a74: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000a78: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000a7c: e3 ff ff da bi 80009e4 <== NOT EXECUTED rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 8000a80: f8 00 27 48 calli 800a7a0 <__errno> <== NOT EXECUTED 8000a84: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8000a88: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000a8c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000a90: e3 ff ff d5 bi 80009e4 <== NOT EXECUTED 08000aec : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 8000aec: 37 9c ff f0 addi sp,sp,-16 8000af0: 5b 9d 00 04 sw (sp+4),ra 8000af4: b8 20 28 00 mv r5,r1 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = iop->flags; 8000af8: 28 21 00 18 lw r1,(r1+24) args.mode = mode; 8000afc: 5b 84 00 10 sw (sp+16),r4 status = rtems_io_open( 8000b00: 37 83 00 08 addi r3,sp,8 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = iop->flags; 8000b04: 5b 81 00 0c sw (sp+12),r1 { rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 8000b08: 28 a1 00 3c lw r1,(r5+60) args.iop = iop; 8000b0c: 5b 85 00 08 sw (sp+8),r5 args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 8000b10: 28 22 00 0c lw r2,(r1+12) 8000b14: 28 21 00 08 lw r1,(r1+8) 8000b18: f8 00 07 ca calli 8002a40 np->major, np->minor, (void *) &args ); if ( status ) 8000b1c: b8 20 10 00 mv r2,r1 8000b20: 44 20 00 03 be r1,r0,8000b2c return rtems_deviceio_errno(status); 8000b24: f8 00 11 b3 calli 80051f0 <== NOT EXECUTED 8000b28: b8 20 10 00 mv r2,r1 <== NOT EXECUTED return 0; } 8000b2c: b8 40 08 00 mv r1,r2 8000b30: 2b 9d 00 04 lw ra,(sp+4) 8000b34: 37 9c 00 10 addi sp,sp,16 8000b38: c3 a0 00 00 ret 08000b3c : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 8000b3c: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8000b40: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8000b44: b8 20 20 00 mv r4,r1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 8000b48: 28 21 00 18 lw r1,(r1+24) <== NOT EXECUTED 8000b4c: 5b 81 00 20 sw (sp+32),r1 <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 8000b50: 28 81 00 14 lw r1,(r4+20) <== NOT EXECUTED 8000b54: 5b 81 00 14 sw (sp+20),r1 <== NOT EXECUTED 8000b58: 28 81 00 10 lw r1,(r4+16) <== NOT EXECUTED args.buffer = buffer; args.count = count; 8000b5c: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 8000b60: 34 03 00 00 mvi r3,0 <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 8000b64: 5b 81 00 10 sw (sp+16),r1 <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 8000b68: 28 81 00 3c lw r1,(r4+60) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 8000b6c: 5b 83 00 24 sw (sp+36),r3 <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 8000b70: 5b 82 00 18 sw (sp+24),r2 <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 8000b74: 28 22 00 0c lw r2,(r1+12) <== NOT EXECUTED 8000b78: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8000b7c: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 8000b80: 5b 84 00 08 sw (sp+8),r4 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 8000b84: f8 00 07 d7 calli 8002ae0 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 8000b88: 5c 20 00 05 bne r1,r0,8000b9c <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 8000b8c: 2b 81 00 24 lw r1,(sp+36) <== NOT EXECUTED } 8000b90: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8000b94: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8000b98: c3 a0 00 00 ret <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 8000b9c: f8 00 11 95 calli 80051f0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 8000ba0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8000ba4: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8000ba8: c3 a0 00 00 ret <== NOT EXECUTED 08000bac : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8000bac: 37 9c ff fc addi sp,sp,-4 8000bb0: 5b 9d 00 04 sw (sp+4),ra rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 8000bb4: 28 21 00 00 lw r1,(r1+0) if (!the_dev) 8000bb8: 44 20 00 0b be r1,r0,8000be4 rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 8000bbc: 28 23 00 0c lw r3,(r1+12) buf->st_mode = the_dev->mode; 8000bc0: 28 24 00 10 lw r4,(r1+16) the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 8000bc4: 28 21 00 08 lw r1,(r1+8) 8000bc8: 58 43 00 1c sw (r2+28),r3 buf->st_mode = the_dev->mode; 8000bcc: 58 44 00 0c sw (r2+12),r4 the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 8000bd0: 58 41 00 18 sw (r2+24),r1 buf->st_mode = the_dev->mode; 8000bd4: 34 01 00 00 mvi r1,0 return 0; } 8000bd8: 2b 9d 00 04 lw ra,(sp+4) 8000bdc: 37 9c 00 04 addi sp,sp,4 8000be0: c3 a0 00 00 ret { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 8000be4: f8 00 26 ef calli 800a7a0 <__errno> <== NOT EXECUTED 8000be8: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8000bec: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000bf0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000bf4: e3 ff ff f9 bi 8000bd8 <== NOT EXECUTED 08000bf8 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 8000bf8: 37 9c ff dc addi sp,sp,-36 8000bfc: 5b 9d 00 04 sw (sp+4),ra 8000c00: b8 20 20 00 mv r4,r1 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 8000c04: 28 21 00 18 lw r1,(r1+24) 8000c08: 5b 81 00 20 sw (sp+32),r1 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 8000c0c: 28 81 00 14 lw r1,(r4+20) 8000c10: 5b 81 00 14 sw (sp+20),r1 8000c14: 28 81 00 10 lw r1,(r4+16) args.buffer = (void *) buffer; args.count = count; 8000c18: 5b 83 00 1c sw (sp+28),r3 args.flags = iop->flags; args.bytes_moved = 0; 8000c1c: 34 03 00 00 mvi r3,0 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 8000c20: 5b 81 00 10 sw (sp+16),r1 { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 8000c24: 28 81 00 3c lw r1,(r4+60) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 8000c28: 5b 83 00 24 sw (sp+36),r3 np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 8000c2c: 5b 82 00 18 sw (sp+24),r2 args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 8000c30: 28 22 00 0c lw r2,(r1+12) 8000c34: 28 21 00 08 lw r1,(r1+8) 8000c38: 37 83 00 08 addi r3,sp,8 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 8000c3c: 5b 84 00 08 sw (sp+8),r4 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 8000c40: f8 00 07 d0 calli 8002b80 np->major, np->minor, (void *) &args ); if ( status ) 8000c44: 5c 20 00 05 bne r1,r0,8000c58 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 8000c48: 2b 81 00 24 lw r1,(sp+36) } 8000c4c: 2b 9d 00 04 lw ra,(sp+4) 8000c50: 37 9c 00 24 addi sp,sp,36 8000c54: c3 a0 00 00 ret np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 8000c58: f8 00 11 66 calli 80051f0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 8000c5c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8000c60: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8000c64: c3 a0 00 00 ret <== NOT EXECUTED 0800a8b0 : */ int device_close( rtems_libio_t *iop ) { 800a8b0: 37 9c ff f0 addi sp,sp,-16 800a8b4: 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; 800a8b8: 28 23 00 3c lw r3,(r1+60) args.iop = iop; args.flags = 0; 800a8bc: 34 02 00 00 mvi r2,0 rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 800a8c0: 5b 81 00 08 sw (sp+8),r1 args.flags = 0; args.mode = 0; 800a8c4: 5b 82 00 10 sw (sp+16),r2 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = 0; 800a8c8: 5b 82 00 0c sw (sp+12),r2 args.mode = 0; status = rtems_io_close( 800a8cc: 28 62 00 54 lw r2,(r3+84) 800a8d0: 28 61 00 50 lw r1,(r3+80) 800a8d4: 37 83 00 08 addi r3,sp,8 800a8d8: f8 00 06 6d calli 800c28c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 800a8dc: b8 20 10 00 mv r2,r1 800a8e0: 44 20 00 03 be r1,r0,800a8ec return rtems_deviceio_errno(status); 800a8e4: f8 00 08 5b calli 800ca50 <== NOT EXECUTED 800a8e8: b8 20 10 00 mv r2,r1 <== NOT EXECUTED } return 0; } 800a8ec: b8 40 08 00 mv r1,r2 800a8f0: 2b 9d 00 04 lw ra,(sp+4) 800a8f4: 37 9c 00 10 addi sp,sp,16 800a8f8: c3 a0 00 00 ret 0800a78c : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 800a78c: 37 9c ff ec addi sp,sp,-20 800a790: 5b 9d 00 04 sw (sp+4),ra args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 800a794: 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; 800a798: 5b 82 00 0c sw (sp+12),r2 args.buffer = buffer; 800a79c: 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; 800a7a0: 5b 81 00 08 sw (sp+8),r1 args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 800a7a4: 28 82 00 54 lw r2,(r4+84) 800a7a8: 28 81 00 50 lw r1,(r4+80) 800a7ac: 37 83 00 08 addi r3,sp,8 800a7b0: f8 00 06 df calli 800c32c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 800a7b4: 5c 20 00 05 bne r1,r0,800a7c8 return rtems_deviceio_errno(status); return args.ioctl_return; 800a7b8: 2b 81 00 14 lw r1,(sp+20) } 800a7bc: 2b 9d 00 04 lw ra,(sp+4) 800a7c0: 37 9c 00 14 addi sp,sp,20 800a7c4: c3 a0 00 00 ret the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 800a7c8: f8 00 08 a2 calli 800ca50 <== NOT EXECUTED return args.ioctl_return; } 800a7cc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800a7d0: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 800a7d4: c3 a0 00 00 ret <== NOT EXECUTED 0800a8fc : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 800a8fc: 37 9c ff f0 addi sp,sp,-16 800a900: 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; 800a904: 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; 800a908: 28 23 00 3c lw r3,(r1+60) args.iop = iop; args.flags = iop->flags; args.mode = mode; 800a90c: 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; 800a910: 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; 800a914: 5b 81 00 08 sw (sp+8),r1 args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 800a918: 28 62 00 54 lw r2,(r3+84) 800a91c: 28 61 00 50 lw r1,(r3+80) 800a920: 37 83 00 08 addi r3,sp,8 800a924: f8 00 06 aa calli 800c3cc the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 800a928: b8 20 10 00 mv r2,r1 800a92c: 44 20 00 03 be r1,r0,800a938 return rtems_deviceio_errno(status); 800a930: f8 00 08 48 calli 800ca50 <== NOT EXECUTED 800a934: b8 20 10 00 mv r2,r1 <== NOT EXECUTED return 0; } 800a938: b8 40 08 00 mv r1,r2 800a93c: 2b 9d 00 04 lw ra,(sp+4) 800a940: 37 9c 00 10 addi sp,sp,16 800a944: c3 a0 00 00 ret 0800a844 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 800a844: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 800a848: 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; 800a84c: 28 24 00 18 lw r4,(r1+24) <== NOT EXECUTED 800a850: 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; 800a854: 28 24 00 14 lw r4,(r1+20) <== NOT EXECUTED 800a858: 5b 84 00 14 sw (sp+20),r4 <== NOT EXECUTED 800a85c: 28 24 00 10 lw r4,(r1+16) <== NOT EXECUTED args.buffer = buffer; 800a860: 5b 82 00 18 sw (sp+24),r2 <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 800a864: 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; 800a868: 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; 800a86c: 28 24 00 3c lw r4,(r1+60) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 800a870: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 800a874: 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; 800a878: 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( 800a87c: 28 82 00 54 lw r2,(r4+84) <== NOT EXECUTED 800a880: 28 81 00 50 lw r1,(r4+80) <== NOT EXECUTED 800a884: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED 800a888: f8 00 06 f9 calli 800c46c <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 800a88c: 5c 20 00 05 bne r1,r0,800a8a0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 800a890: 2b 81 00 24 lw r1,(sp+36) <== NOT EXECUTED } 800a894: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800a898: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 800a89c: c3 a0 00 00 ret <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 800a8a0: f8 00 08 6c calli 800ca50 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 800a8a4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800a8a8: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 800a8ac: c3 a0 00 00 ret <== NOT EXECUTED 0800a7d8 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 800a7d8: 37 9c ff dc addi sp,sp,-36 800a7dc: 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; 800a7e0: 28 24 00 18 lw r4,(r1+24) 800a7e4: 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; 800a7e8: 28 24 00 14 lw r4,(r1+20) 800a7ec: 5b 84 00 14 sw (sp+20),r4 800a7f0: 28 24 00 10 lw r4,(r1+16) args.buffer = (void *) buffer; 800a7f4: 5b 82 00 18 sw (sp+24),r2 args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 800a7f8: 34 02 00 00 mvi r2,0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 800a7fc: 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; 800a800: 28 24 00 3c lw r4,(r1+60) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 800a804: 5b 83 00 1c sw (sp+28),r3 args.flags = iop->flags; args.bytes_moved = 0; 800a808: 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; 800a80c: 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( 800a810: 28 82 00 54 lw r2,(r4+84) 800a814: 28 81 00 50 lw r1,(r4+80) 800a818: 37 83 00 08 addi r3,sp,8 800a81c: f8 00 07 3c calli 800c50c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 800a820: 5c 20 00 05 bne r1,r0,800a834 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 800a824: 2b 81 00 24 lw r1,(sp+36) } 800a828: 2b 9d 00 04 lw ra,(sp+4) 800a82c: 37 9c 00 24 addi sp,sp,36 800a830: c3 a0 00 00 ret the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 800a834: f8 00 08 87 calli 800ca50 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 800a838: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800a83c: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 800a840: c3 a0 00 00 ret <== NOT EXECUTED 08004be8 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 8004be8: 37 9c ff f0 addi sp,sp,-16 8004bec: 5b 8b 00 10 sw (sp+16),r11 8004bf0: 5b 8c 00 0c sw (sp+12),r12 8004bf4: 5b 8d 00 08 sw (sp+8),r13 8004bf8: 5b 9d 00 04 sw (sp+4),ra 8004bfc: b8 20 58 00 mv r11,r1 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 8004c00: 28 21 00 b4 lw r1,(r1+180) 8004c04: 44 20 00 1a be r1,r0,8004c6c rtems_interrupt_disable (level); 8004c08: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8004c0c: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 8004c10: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 8004c14: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 8004c18: 29 64 00 84 lw r4,(r11+132) <== NOT EXECUTED 8004c1c: 29 63 00 80 lw r3,(r11+128) <== NOT EXECUTED 8004c20: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8004c24: 44 83 00 11 be r4,r3,8004c68 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 8004c28: 34 0c 00 02 mvi r12,2 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 8004c2c: 34 0d ff fe mvi r13,-2 <== NOT EXECUTED rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 8004c30: 59 6c 00 94 sw (r11+148),r12 <== NOT EXECUTED rtems_interrupt_enable (level); 8004c34: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 8004c38: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED 8004c3c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8004c40: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 8004c44: f8 00 07 1d calli 80068b8 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 8004c48: 5c 20 00 0f bne r1,r0,8004c84 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 8004c4c: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8004c50: a0 2d 10 00 and r2,r1,r13 <== NOT EXECUTED 8004c54: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 8004c58: 29 63 00 84 lw r3,(r11+132) <== NOT EXECUTED 8004c5c: 29 62 00 80 lw r2,(r11+128) <== NOT EXECUTED 8004c60: 5c 62 ff f4 bne r3,r2,8004c30 <== NOT EXECUTED 8004c64: b8 20 10 00 mv r2,r1 <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 8004c68: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED } } 8004c6c: 2b 9d 00 04 lw ra,(sp+4) 8004c70: 2b 8b 00 10 lw r11,(sp+16) 8004c74: 2b 8c 00 0c lw r12,(sp+12) 8004c78: 2b 8d 00 08 lw r13,(sp+8) 8004c7c: 37 9c 00 10 addi sp,sp,16 8004c80: c3 a0 00 00 ret rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 8004c84: f8 00 09 3a calli 800716c <== NOT EXECUTED 08001edc : int dup2( int fildes, int fildes2 ) { 8001edc: 37 9c ff a4 addi sp,sp,-92 8001ee0: 5b 8b 00 14 sw (sp+20),r11 8001ee4: 5b 8c 00 10 sw (sp+16),r12 8001ee8: 5b 8d 00 0c sw (sp+12),r13 8001eec: 5b 8e 00 08 sw (sp+8),r14 8001ef0: 5b 9d 00 04 sw (sp+4),ra /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 8001ef4: 37 8c 00 18 addi r12,sp,24 int dup2( int fildes, int fildes2 ) { 8001ef8: b8 40 68 00 mv r13,r2 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 8001efc: b9 80 10 00 mv r2,r12 if ( status == -1 ) 8001f00: 34 0b ff ff mvi r11,-1 int dup2( int fildes, int fildes2 ) { 8001f04: b8 20 70 00 mv r14,r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 8001f08: f8 00 02 1c calli 8002778 if ( status == -1 ) 8001f0c: 5c 2b 00 09 bne r1,r11,8001f30 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 8001f10: 34 01 ff ff mvi r1,-1 } 8001f14: 2b 9d 00 04 lw ra,(sp+4) 8001f18: 2b 8b 00 14 lw r11,(sp+20) 8001f1c: 2b 8c 00 10 lw r12,(sp+16) 8001f20: 2b 8d 00 0c lw r13,(sp+12) 8001f24: 2b 8e 00 08 lw r14,(sp+8) 8001f28: 37 9c 00 5c addi sp,sp,92 8001f2c: c3 a0 00 00 ret /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 8001f30: b9 80 10 00 mv r2,r12 8001f34: b9 a0 08 00 mv r1,r13 8001f38: f8 00 02 10 calli 8002778 if ( status == -1 ) 8001f3c: 44 2b ff f5 be r1,r11,8001f10 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 8001f40: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8001f44: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 8001f48: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8001f4c: f8 00 00 bb calli 8002238 <== NOT EXECUTED 8001f50: e3 ff ff f1 bi 8001f14 <== NOT EXECUTED 0800458c : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 800458c: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8004590: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8004594: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8004598: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800459c: b8 40 58 00 mv r11,r2 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 80045a0: 28 42 00 3c lw r2,(r2+60) <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 80045a4: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 80045a8: 20 41 02 00 andi r1,r2,0x200 <== NOT EXECUTED 80045ac: 44 20 00 0b be r1,r0,80045d8 <== NOT EXECUTED 80045b0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80045b4: 38 21 63 0c ori r1,r1,0x630c <== NOT EXECUTED 80045b8: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 80045bc: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 80045c0: b4 2c 08 00 add r1,r1,r12 <== NOT EXECUTED 80045c4: 40 21 00 01 lbu r1,(r1+1) <== NOT EXECUTED 80045c8: fb ff f3 e5 calli 800155c <__lshrsi3> <== NOT EXECUTED 80045cc: 7d 82 00 09 cmpnei r2,r12,9 <== NOT EXECUTED 80045d0: a0 22 08 00 and r1,r1,r2 <== NOT EXECUTED 80045d4: 5c 20 00 09 bne r1,r0,80045f8 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 80045d8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80045dc: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80045e0: fb ff ff 86 calli 80043f8 <== NOT EXECUTED } } 80045e4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80045e8: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 80045ec: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 80045f0: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 80045f4: c3 a0 00 00 ret <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 80045f8: 34 01 00 0a mvi r1,10 <== NOT EXECUTED 80045fc: 45 81 ff f7 be r12,r1,80045d8 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; 8004600: 34 04 00 5e mvi r4,94 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 8004604: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 8004608: 19 8c 00 40 xori r12,r12,0x40 <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 800460c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8004610: b9 60 18 00 mv r3,r11 <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 8004614: 33 84 00 10 sb (sp+16),r4 <== NOT EXECUTED echobuf[1] = c ^ 0x40; 8004618: 33 8c 00 11 sb (sp+17),r12 <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 800461c: fb ff ff 1c calli 800428c <== NOT EXECUTED tty->column += 2; 8004620: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004624: 34 21 00 02 addi r1,r1,2 <== NOT EXECUTED 8004628: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED } else { oproc (c, tty); } } 800462c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004630: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8004634: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8004638: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 800463c: c3 a0 00 00 ret <== NOT EXECUTED 08029e28 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 8029e28: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8029e2c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (group_fp != NULL) 8029e30: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8029e34: 38 21 6d 18 ori r1,r1,0x6d18 <== NOT EXECUTED 8029e38: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8029e3c: 44 20 00 02 be r1,r0,8029e44 <== NOT EXECUTED fclose(group_fp); 8029e40: f8 00 7c 18 calli 8048ea0 <== NOT EXECUTED } 8029e44: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8029e48: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8029e4c: c3 a0 00 00 ret <== NOT EXECUTED 08029e50 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 8029e50: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8029e54: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (passwd_fp != NULL) 8029e58: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8029e5c: 38 21 6c 30 ori r1,r1,0x6c30 <== NOT EXECUTED 8029e60: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8029e64: 44 20 00 02 be r1,r0,8029e6c <== NOT EXECUTED fclose(passwd_fp); 8029e68: f8 00 7c 0e calli 8048ea0 <== NOT EXECUTED } 8029e6c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8029e70: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8029e74: c3 a0 00 00 ret <== NOT EXECUTED 08004640 : * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { 8004640: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED 8004644: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED 8004648: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED 800464c: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED 8004650: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED 8004654: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED 8004658: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED 800465c: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED 8004660: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (tty->ccount == 0) 8004664: 28 23 00 20 lw r3,(r1+32) <== NOT EXECUTED * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { 8004668: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 800466c: b8 40 68 00 mv r13,r2 <== NOT EXECUTED if (tty->ccount == 0) 8004670: 44 60 00 24 be r3,r0,8004700 <== NOT EXECUTED return; if (lineFlag) { 8004674: 5c 40 00 1f bne r2,r0,80046f0 <== NOT EXECUTED 8004678: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 800467c: 78 0e 08 02 mvhi r14,0x802 <== NOT EXECUTED 8004680: 39 ce 63 0c ori r14,r14,0x630c <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 8004684: 34 0f 00 09 mvi r15,9 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 8004688: 78 11 08 02 mvhi r17,0x802 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 800468c: 78 10 08 02 mvhi r16,0x802 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 8004690: 29 62 00 1c lw r2,(r11+28) <== NOT EXECUTED 8004694: 34 63 ff ff addi r3,r3,-1 <== NOT EXECUTED 8004698: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED 800469c: b4 43 28 00 add r5,r2,r3 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 80046a0: 20 24 00 08 andi r4,r1,0x8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 80046a4: 40 a5 00 00 lbu r5,(r5+0) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 80046a8: 44 80 00 0d be r4,r0,80046dc <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 80046ac: 5d a0 00 03 bne r13,r0,80046b8 <== NOT EXECUTED 80046b0: 20 24 00 10 andi r4,r1,0x10 <== NOT EXECUTED 80046b4: 44 8d 00 68 be r4,r13,8004854 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 80046b8: 44 af 00 37 be r5,r15,8004794 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 80046bc: 29 c2 00 00 lw r2,(r14+0) <== NOT EXECUTED 80046c0: 34 ac 00 01 addi r12,r5,1 <== NOT EXECUTED 80046c4: b4 4c 10 00 add r2,r2,r12 <== NOT EXECUTED 80046c8: 40 42 00 00 lbu r2,(r2+0) <== NOT EXECUTED 80046cc: 20 42 00 20 andi r2,r2,0x20 <== NOT EXECUTED 80046d0: 44 40 00 27 be r2,r0,800476c <== NOT EXECUTED 80046d4: 20 21 02 00 andi r1,r1,0x200 <== NOT EXECUTED 80046d8: 5c 20 00 14 bne r1,r0,8004728 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 80046dc: 45 a0 00 09 be r13,r0,8004700 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 80046e0: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED 80046e4: 44 60 00 07 be r3,r0,8004700 <== NOT EXECUTED 80046e8: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 80046ec: e3 ff ff e9 bi 8004690 <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 80046f0: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED 80046f4: 20 22 00 08 andi r2,r1,0x8 <== NOT EXECUTED 80046f8: 5c 40 00 4a bne r2,r0,8004820 <== NOT EXECUTED tty->ccount = 0; 80046fc: 59 62 00 20 sw (r11+32),r2 <== NOT EXECUTED } } if (!lineFlag) break; } } 8004700: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004704: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED 8004708: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED 800470c: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED 8004710: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED 8004714: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED 8004718: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED 800471c: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED 8004720: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED 8004724: c3 a0 00 00 ret <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 8004728: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 800472c: 38 21 3f 38 ori r1,r1,0x3f38 <== NOT EXECUTED 8004730: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8004734: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8004738: fb ff fe d5 calli 800428c <== NOT EXECUTED if (tty->column) 800473c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004740: 44 20 00 03 be r1,r0,800474c <== NOT EXECUTED tty->column--; 8004744: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 8004748: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 800474c: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED 8004750: b4 2c 60 00 add r12,r1,r12 <== NOT EXECUTED 8004754: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED 8004758: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 800475c: 44 20 00 04 be r1,r0,800476c <== NOT EXECUTED 8004760: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 8004764: 20 21 02 00 andi r1,r1,0x200 <== NOT EXECUTED 8004768: 44 20 ff dd be r1,r0,80046dc <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 800476c: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8004770: 38 21 3f 38 ori r1,r1,0x3f38 <== NOT EXECUTED 8004774: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8004778: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 800477c: fb ff fe c4 calli 800428c <== NOT EXECUTED if (tty->column) 8004780: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004784: 44 20 ff d6 be r1,r0,80046dc <== NOT EXECUTED tty->column--; 8004788: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 800478c: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED 8004790: e3 ff ff d3 bi 80046dc <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 8004794: 29 6c 00 2c lw r12,(r11+44) <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 8004798: 44 60 00 0f be r3,r0,80047d4 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 800479c: 29 c6 00 00 lw r6,(r14+0) <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 80047a0: 20 27 02 00 andi r7,r1,0x200 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 80047a4: 34 01 00 00 mvi r1,0 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 80047a8: b4 41 20 00 add r4,r2,r1 <== NOT EXECUTED 80047ac: 40 84 00 00 lbu r4,(r4+0) <== NOT EXECUTED 80047b0: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 80047b4: b4 c4 28 00 add r5,r6,r4 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 80047b8: 44 8f 00 16 be r4,r15,8004810 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 80047bc: 40 a4 00 01 lbu r4,(r5+1) <== NOT EXECUTED 80047c0: 20 84 00 20 andi r4,r4,0x20 <== NOT EXECUTED 80047c4: 44 80 00 10 be r4,r0,8004804 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 80047c8: 44 e0 00 02 be r7,r0,80047d0 <== NOT EXECUTED col += 2; 80047cc: 35 8c 00 02 addi r12,r12,2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 80047d0: 5c 61 ff f6 bne r3,r1,80047a8 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 80047d4: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 80047d8: 4d 81 ff c1 bge r12,r1,80046dc <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 80047dc: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 80047e0: 38 21 3f 34 ori r1,r1,0x3f34 <== NOT EXECUTED 80047e4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80047e8: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 80047ec: fb ff fe a8 calli 800428c <== NOT EXECUTED tty->column--; 80047f0: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 80047f4: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 80047f8: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 80047fc: 48 2c ff f8 bg r1,r12,80047dc <== NOT EXECUTED 8004800: e3 ff ff b7 bi 80046dc <== NOT EXECUTED else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 8004804: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 8004808: 5c 61 ff e8 bne r3,r1,80047a8 <== NOT EXECUTED 800480c: e3 ff ff f2 bi 80047d4 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 8004810: 39 8c 00 07 ori r12,r12,0x7 <== NOT EXECUTED 8004814: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 8004818: 5c 61 ff e4 bne r3,r1,80047a8 <== NOT EXECUTED 800481c: e3 ff ff ee bi 80047d4 <== NOT EXECUTED if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 8004820: 20 2c 00 10 andi r12,r1,0x10 <== NOT EXECUTED 8004824: 5d 80 ff 96 bne r12,r0,800467c <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 8004828: 41 61 00 44 lbu r1,(r11+68) <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 800482c: 59 6c 00 20 sw (r11+32),r12 <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 8004830: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004834: fb ff ff 56 calli 800458c <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 8004838: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 800483c: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 8004840: 44 2c ff b0 be r1,r12,8004700 <== NOT EXECUTED echo ('\n', tty); 8004844: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004848: 34 01 00 0a mvi r1,10 <== NOT EXECUTED 800484c: fb ff ff 50 calli 800458c <== NOT EXECUTED 8004850: e3 ff ff ac bi 8004700 <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 8004854: 41 61 00 43 lbu r1,(r11+67) <== NOT EXECUTED 8004858: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800485c: fb ff ff 4c calli 800458c <== NOT EXECUTED 8004860: e3 ff ff a8 bi 8004700 <== NOT EXECUTED 08040a90 : #include int fchdir( int fd ) { 8040a90: 37 9c ff c8 addi sp,sp,-56 <== NOT EXECUTED 8040a94: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8040a98: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8040a9c: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8040aa0: 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 ); 8040aa4: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 8040aa8: 38 42 30 10 ori r2,r2,0x3010 <== NOT EXECUTED 8040aac: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 8040ab0: 54 41 00 06 bgu r2,r1,8040ac8 <== NOT EXECUTED iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 8040ab4: f8 00 20 99 calli 8048d18 <__errno> <== NOT EXECUTED 8040ab8: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8040abc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8040ac0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8040ac4: e0 00 00 49 bi 8040be8 <== NOT EXECUTED { rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 8040ac8: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8040acc: fb ff 01 a5 calli 8001160 <__ashlsi3> <== NOT EXECUTED 8040ad0: 78 0c 08 07 mvhi r12,0x807 <== NOT EXECUTED 8040ad4: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8040ad8: 39 8c 6f 08 ori r12,r12,0x6f08 <== NOT EXECUTED 8040adc: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 8040ae0: fb ff 01 a0 calli 8001160 <__ashlsi3> <== NOT EXECUTED 8040ae4: 29 8b 00 00 lw r11,(r12+0) <== NOT EXECUTED 8040ae8: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED 8040aec: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED rtems_libio_check_is_open(iop); 8040af0: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED 8040af4: 20 22 01 00 andi r2,r1,0x100 <== NOT EXECUTED 8040af8: 44 40 ff ef be r2,r0,8040ab4 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 8040afc: 20 21 00 02 andi r1,r1,0x2 <== NOT EXECUTED 8040b00: 44 20 00 52 be r1,r0,8040c48 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 8040b04: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8040b08: 44 20 00 55 be r1,r0,8040c5c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 8040b0c: 28 22 00 10 lw r2,(r1+16) <== NOT EXECUTED 8040b10: 44 40 00 53 be r2,r0,8040c5c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 8040b14: 35 61 00 1c addi r1,r11,28 <== NOT EXECUTED 8040b18: d8 40 00 00 call r2 <== NOT EXECUTED 8040b1c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8040b20: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8040b24: 5c 41 00 37 bne r2,r1,8040c00 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 8040b28: 78 0c 08 07 mvhi r12,0x807 <== NOT EXECUTED 8040b2c: 39 8c 32 f0 ori r12,r12,0x32f0 <== NOT EXECUTED 8040b30: 29 86 00 00 lw r6,(r12+0) <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 8040b34: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8040b38: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 8040b3c: 28 c4 00 04 lw r4,(r6+4) <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 8040b40: 38 21 78 c0 ori r1,r1,0x78c0 <== NOT EXECUTED 8040b44: b8 60 28 00 mv r5,r3 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 8040b48: 5b 84 00 14 sw (sp+20),r4 <== NOT EXECUTED 8040b4c: 28 c7 00 08 lw r7,(r6+8) <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 8040b50: 37 84 00 28 addi r4,sp,40 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 8040b54: 5b 87 00 18 sw (sp+24),r7 <== NOT EXECUTED 8040b58: 28 c7 00 0c lw r7,(r6+12) <== NOT EXECUTED 8040b5c: 5b 87 00 1c sw (sp+28),r7 <== NOT EXECUTED 8040b60: 28 c7 00 10 lw r7,(r6+16) <== NOT EXECUTED 8040b64: 5b 87 00 20 sw (sp+32),r7 <== NOT EXECUTED 8040b68: 28 c7 00 14 lw r7,(r6+20) <== NOT EXECUTED 8040b6c: 5b 87 00 24 sw (sp+36),r7 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 8040b70: 29 67 00 1c lw r7,(r11+28) <== NOT EXECUTED 8040b74: 58 c7 00 04 sw (r6+4),r7 <== NOT EXECUTED 8040b78: 29 67 00 20 lw r7,(r11+32) <== NOT EXECUTED 8040b7c: 58 c7 00 08 sw (r6+8),r7 <== NOT EXECUTED 8040b80: 29 67 00 24 lw r7,(r11+36) <== NOT EXECUTED 8040b84: 58 c7 00 0c sw (r6+12),r7 <== NOT EXECUTED 8040b88: 29 67 00 28 lw r7,(r11+40) <== NOT EXECUTED 8040b8c: 58 c7 00 10 sw (r6+16),r7 <== NOT EXECUTED 8040b90: 29 6b 00 2c lw r11,(r11+44) <== NOT EXECUTED 8040b94: 58 cb 00 14 sw (r6+20),r11 <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 8040b98: fb ff 1b 7a calli 8007980 <== NOT EXECUTED 8040b9c: 5c 20 00 1e bne r1,r0,8040c14 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 8040ba0: 2b 82 00 20 lw r2,(sp+32) <== NOT EXECUTED 8040ba4: 44 41 00 05 be r2,r1,8040bb8 <== NOT EXECUTED 8040ba8: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8040bac: 44 40 00 03 be r2,r0,8040bb8 <== NOT EXECUTED 8040bb0: 37 81 00 14 addi r1,sp,20 <== NOT EXECUTED 8040bb4: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_current = loc; 8040bb8: 2b 87 00 28 lw r7,(sp+40) <== NOT EXECUTED 8040bbc: 29 82 00 00 lw r2,(r12+0) <== NOT EXECUTED 8040bc0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8040bc4: 58 47 00 04 sw (r2+4),r7 <== NOT EXECUTED 8040bc8: 2b 83 00 2c lw r3,(sp+44) <== NOT EXECUTED 8040bcc: 58 43 00 08 sw (r2+8),r3 <== NOT EXECUTED 8040bd0: 2b 84 00 30 lw r4,(sp+48) <== NOT EXECUTED 8040bd4: 58 44 00 0c sw (r2+12),r4 <== NOT EXECUTED 8040bd8: 2b 87 00 34 lw r7,(sp+52) <== NOT EXECUTED 8040bdc: 58 47 00 10 sw (r2+16),r7 <== NOT EXECUTED 8040be0: 2b 83 00 38 lw r3,(sp+56) <== NOT EXECUTED 8040be4: 58 43 00 14 sw (r2+20),r3 <== NOT EXECUTED return 0; } 8040be8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8040bec: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8040bf0: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8040bf4: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8040bf8: 37 9c 00 38 addi sp,sp,56 <== NOT EXECUTED 8040bfc: c3 a0 00 00 ret <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 8040c00: f8 00 20 46 calli 8048d18 <__errno> <== NOT EXECUTED 8040c04: 34 02 00 14 mvi r2,20 <== NOT EXECUTED 8040c08: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8040c0c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8040c10: e3 ff ff f6 bi 8040be8 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 8040c14: 2b 83 00 14 lw r3,(sp+20) <== NOT EXECUTED 8040c18: 29 82 00 00 lw r2,(r12+0) <== NOT EXECUTED 8040c1c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8040c20: 58 43 00 04 sw (r2+4),r3 <== NOT EXECUTED 8040c24: 2b 84 00 18 lw r4,(sp+24) <== NOT EXECUTED 8040c28: 58 44 00 08 sw (r2+8),r4 <== NOT EXECUTED 8040c2c: 2b 87 00 1c lw r7,(sp+28) <== NOT EXECUTED 8040c30: 58 47 00 0c sw (r2+12),r7 <== NOT EXECUTED 8040c34: 2b 83 00 20 lw r3,(sp+32) <== NOT EXECUTED 8040c38: 58 43 00 10 sw (r2+16),r3 <== NOT EXECUTED 8040c3c: 2b 84 00 24 lw r4,(sp+36) <== NOT EXECUTED 8040c40: 58 44 00 14 sw (r2+20),r4 <== NOT EXECUTED return -1; 8040c44: e3 ff ff e9 bi 8040be8 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 8040c48: f8 00 20 34 calli 8048d18 <__errno> <== NOT EXECUTED 8040c4c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8040c50: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8040c54: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8040c58: e3 ff ff e4 bi 8040be8 <== NOT EXECUTED if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); 8040c5c: f8 00 20 2f calli 8048d18 <__errno> <== NOT EXECUTED 8040c60: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8040c64: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8040c68: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8040c6c: e3 ff ff df bi 8040be8 <== NOT EXECUTED 08029900 : int fchmod( int fd, mode_t mode ) { 8029900: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8029904: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8029908: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 802990c: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8029910: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8029914: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 8029918: 38 63 30 10 ori r3,r3,0x3010 <== NOT EXECUTED 802991c: 28 63 00 00 lw r3,(r3+0) <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 8029920: b8 40 60 00 mv r12,r2 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8029924: 54 61 00 06 bgu r3,r1,802993c <== NOT EXECUTED iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 8029928: f8 00 7c fc calli 8048d18 <__errno> <== NOT EXECUTED 802992c: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8029930: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8029934: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8029938: e0 00 00 18 bi 8029998 <== NOT EXECUTED ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 802993c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8029940: fb ff 5e 08 calli 8001160 <__ashlsi3> <== NOT EXECUTED 8029944: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8029948: 78 0b 08 07 mvhi r11,0x807 <== NOT EXECUTED 802994c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 8029950: 39 6b 6f 08 ori r11,r11,0x6f08 <== NOT EXECUTED 8029954: fb ff 5e 03 calli 8001160 <__ashlsi3> <== NOT EXECUTED 8029958: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 802995c: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED 8029960: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED rtems_libio_check_is_open(iop); 8029964: 28 22 00 18 lw r2,(r1+24) <== NOT EXECUTED 8029968: 20 43 01 00 andi r3,r2,0x100 <== NOT EXECUTED 802996c: 44 60 ff ef be r3,r0,8029928 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8029970: 20 42 00 04 andi r2,r2,0x4 <== NOT EXECUTED 8029974: 44 40 00 0f be r2,r0,80299b0 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 8029978: 28 22 00 40 lw r2,(r1+64) <== NOT EXECUTED 802997c: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8029980: 44 40 00 11 be r2,r0,80299c4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 8029984: 28 23 00 24 lw r3,(r1+36) <== NOT EXECUTED 8029988: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 802998c: 34 21 00 1c addi r1,r1,28 <== NOT EXECUTED 8029990: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED 8029994: d8 60 00 00 call r3 <== NOT EXECUTED } 8029998: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802999c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 80299a0: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 80299a4: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 80299a8: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 80299ac: c3 a0 00 00 ret <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 80299b0: f8 00 7c da calli 8048d18 <__errno> <== NOT EXECUTED 80299b4: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 80299b8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80299bc: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80299c0: e3 ff ff f6 bi 8029998 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 80299c4: f8 00 7c d5 calli 8048d18 <__errno> <== NOT EXECUTED 80299c8: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80299cc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80299d0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80299d4: e3 ff ff f1 bi 8029998 <== NOT EXECUTED 080299d8 : int fchown( int fd, uid_t owner, gid_t group ) { 80299d8: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 80299dc: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 80299e0: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 80299e4: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 80299e8: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 80299ec: 78 04 08 07 mvhi r4,0x807 <== NOT EXECUTED 80299f0: 38 84 30 10 ori r4,r4,0x3010 <== NOT EXECUTED 80299f4: 28 84 00 00 lw r4,(r4+0) <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 80299f8: 20 4c ff ff andi r12,r2,0xffff <== NOT EXECUTED 80299fc: 20 63 ff ff andi r3,r3,0xffff <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8029a00: 54 81 00 06 bgu r4,r1,8029a18 <== NOT EXECUTED iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 8029a04: f8 00 7c c5 calli 8048d18 <__errno> <== NOT EXECUTED 8029a08: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8029a0c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8029a10: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8029a14: e0 00 00 18 bi 8029a74 <== NOT EXECUTED ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 8029a18: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8029a1c: 5b 83 00 14 sw (sp+20),r3 <== NOT EXECUTED 8029a20: fb ff 5d d0 calli 8001160 <__ashlsi3> <== NOT EXECUTED 8029a24: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8029a28: 78 0b 08 07 mvhi r11,0x807 <== NOT EXECUTED 8029a2c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 8029a30: 39 6b 6f 08 ori r11,r11,0x6f08 <== NOT EXECUTED 8029a34: fb ff 5d cb calli 8001160 <__ashlsi3> <== NOT EXECUTED 8029a38: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8029a3c: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED rtems_libio_check_is_open(iop); 8029a40: 2b 83 00 14 lw r3,(sp+20) <== NOT EXECUTED ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 8029a44: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED rtems_libio_check_is_open(iop); 8029a48: 28 22 00 18 lw r2,(r1+24) <== NOT EXECUTED 8029a4c: 20 44 01 00 andi r4,r2,0x100 <== NOT EXECUTED 8029a50: 44 80 ff ed be r4,r0,8029a04 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8029a54: 20 42 00 04 andi r2,r2,0x4 <== NOT EXECUTED 8029a58: 44 40 00 0d be r2,r0,8029a8c <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 8029a5c: 28 22 00 28 lw r2,(r1+40) <== NOT EXECUTED 8029a60: 28 44 00 18 lw r4,(r2+24) <== NOT EXECUTED 8029a64: 44 80 00 0f be r4,r0,8029aa0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 8029a68: 34 21 00 1c addi r1,r1,28 <== NOT EXECUTED 8029a6c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8029a70: d8 80 00 00 call r4 <== NOT EXECUTED } 8029a74: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8029a78: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8029a7c: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8029a80: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8029a84: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 8029a88: c3 a0 00 00 ret <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8029a8c: f8 00 7c a3 calli 8048d18 <__errno> <== NOT EXECUTED 8029a90: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8029a94: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8029a98: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8029a9c: e3 ff ff f6 bi 8029a74 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8029aa0: f8 00 7c 9e calli 8048d18 <__errno> <== NOT EXECUTED 8029aa4: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8029aa8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8029aac: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8029ab0: e3 ff ff f1 bi 8029a74 <== NOT EXECUTED 08040c70 : int fcntl( int fd, int cmd, ... ) { 8040c70: 37 9c ff c0 addi sp,sp,-64 8040c74: 5b 8b 00 24 sw (sp+36),r11 8040c78: 5b 8c 00 20 sw (sp+32),r12 8040c7c: 5b 8d 00 1c sw (sp+28),r13 8040c80: 5b 8e 00 18 sw (sp+24),r14 8040c84: 5b 8f 00 14 sw (sp+20),r15 8040c88: 5b 90 00 10 sw (sp+16),r16 8040c8c: 5b 91 00 0c sw (sp+12),r17 8040c90: 5b 92 00 08 sw (sp+8),r18 8040c94: 5b 9d 00 04 sw (sp+4),ra int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 8040c98: 78 09 08 07 mvhi r9,0x807 8040c9c: 39 29 30 10 ori r9,r9,0x3010 8040ca0: 29 30 00 00 lw r16,(r9+0) int fcntl( int fd, int cmd, ... ) { 8040ca4: 5b 83 00 2c sw (sp+44),r3 8040ca8: 5b 84 00 30 sw (sp+48),r4 8040cac: 5b 85 00 34 sw (sp+52),r5 8040cb0: 5b 86 00 38 sw (sp+56),r6 8040cb4: 5b 87 00 3c sw (sp+60),r7 8040cb8: 5b 88 00 40 sw (sp+64),r8 8040cbc: 5b 82 00 28 sw (sp+40),r2 8040cc0: b8 40 68 00 mv r13,r2 #include #include /* sigh. for the mode bits for open/creat */ extern int open _PARAMS ((const char *, int, ...)); extern int creat _PARAMS ((const char *, mode_t)); extern int fcntl _PARAMS ((int, int, ...)); 8040cc4: 37 91 00 2c addi r17,sp,44 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 8040cc8: 56 01 00 06 bgu r16,r1,8040ce0 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 8040ccc: f8 00 20 13 calli 8048d18 <__errno> <== NOT EXECUTED 8040cd0: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8040cd4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8040cd8: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8040cdc: e0 00 00 1c bi 8040d4c <== NOT EXECUTED int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 8040ce0: 34 02 00 03 mvi r2,3 8040ce4: 78 0e 08 07 mvhi r14,0x807 8040ce8: fb ff 01 1e calli 8001160 <__ashlsi3> 8040cec: 39 ce 6f 08 ori r14,r14,0x6f08 8040cf0: 29 d2 00 00 lw r18,(r14+0) 8040cf4: 34 02 00 03 mvi r2,3 8040cf8: b8 20 58 00 mv r11,r1 8040cfc: fb ff 01 19 calli 8001160 <__ashlsi3> 8040d00: b5 61 08 00 add r1,r11,r1 8040d04: b6 41 58 00 add r11,r18,r1 rtems_libio_check_is_open(iop); 8040d08: 29 6f 00 18 lw r15,(r11+24) 8040d0c: 21 e1 01 00 andi r1,r15,0x100 8040d10: 44 20 ff ef be r1,r0,8040ccc /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 8040d14: 34 02 00 09 mvi r2,9 8040d18: 55 a2 00 5b bgu r13,r2,8040e84 8040d1c: 78 0c 08 06 mvhi r12,0x806 8040d20: b9 a0 08 00 mv r1,r13 8040d24: 34 02 00 02 mvi r2,2 8040d28: fb ff 01 0e calli 8001160 <__ashlsi3> 8040d2c: 39 8c fa 10 ori r12,r12,0xfa10 8040d30: b5 81 08 00 add r1,r12,r1 8040d34: 28 21 00 00 lw r1,(r1+0) 8040d38: c0 20 00 00 b r1 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 8040d3c: f8 00 1f f7 calli 8048d18 <__errno> 8040d40: 34 02 00 86 mvi r2,134 8040d44: 58 22 00 00 sw (r1+0),r2 8040d48: 34 0c ff ff mvi r12,-1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 8040d4c: b9 80 08 00 mv r1,r12 8040d50: 2b 9d 00 04 lw ra,(sp+4) 8040d54: 2b 8b 00 24 lw r11,(sp+36) 8040d58: 2b 8c 00 20 lw r12,(sp+32) 8040d5c: 2b 8d 00 1c lw r13,(sp+28) 8040d60: 2b 8e 00 18 lw r14,(sp+24) 8040d64: 2b 8f 00 14 lw r15,(sp+20) 8040d68: 2b 90 00 10 lw r16,(sp+16) 8040d6c: 2b 91 00 0c lw r17,(sp+12) 8040d70: 2b 92 00 08 lw r18,(sp+8) 8040d74: 37 9c 00 40 addi sp,sp,64 8040d78: c3 a0 00 00 ret case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 8040d7c: 2a 21 00 00 lw r1,(r17+0) /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 8040d80: 34 0c 00 00 mvi r12,0 case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 8040d84: fb ff 1c a8 calli 8008024 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 8040d88: 29 63 00 18 lw r3,(r11+24) 8040d8c: 34 02 fd fe mvi r2,-514 8040d90: 20 21 02 01 andi r1,r1,0x201 8040d94: a0 62 10 00 and r2,r3,r2 8040d98: b8 22 08 00 or r1,r1,r2 8040d9c: 59 61 00 18 sw (r11+24),r1 * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) { 8040da0: 29 61 00 40 lw r1,(r11+64) 8040da4: 28 23 00 30 lw r3,(r1+48) 8040da8: 44 60 ff e9 be r3,r0,8040d4c int err = (*iop->handlers->fcntl_h)( cmd, iop ); 8040dac: b9 60 10 00 mv r2,r11 8040db0: b9 a0 08 00 mv r1,r13 8040db4: d8 60 00 00 call r3 8040db8: b8 20 58 00 mv r11,r1 if (err) { 8040dbc: 44 20 ff e4 be r1,r0,8040d4c errno = err; 8040dc0: f8 00 1f d6 calli 8048d18 <__errno> <== NOT EXECUTED 8040dc4: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8040dc8: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8040dcc: e3 ff ff e0 bi 8040d4c <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 8040dd0: b9 e0 08 00 mv r1,r15 8040dd4: fb ff 1b c4 calli 8007ce4 8040dd8: b8 20 60 00 mv r12,r1 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 8040ddc: 48 0c ff dc bg r0,r12,8040d4c 8040de0: e3 ff ff f0 bi 8040da0 * 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 ) ) 8040de4: 2a 2c 00 00 lw r12,(r17+0) 8040de8: 45 80 00 2c be r12,r0,8040e98 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 8040dec: 39 ef 08 00 ori r15,r15,0x800 8040df0: 59 6f 00 18 sw (r11+24),r15 8040df4: 34 0c 00 00 mvi r12,0 8040df8: e3 ff ff ea bi 8040da0 diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 8040dfc: b9 e0 08 00 mv r1,r15 8040e00: 34 02 00 0b mvi r2,11 8040e04: fb ff 00 ff calli 8001200 <__lshrsi3> 8040e08: 20 2c 00 01 andi r12,r1,0x1 8040e0c: e3 ff ff e5 bi 8040da0 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 8040e10: 2a 31 00 00 lw r17,(r17+0) if ( fd2 ) 8040e14: 46 20 00 2f be r17,r0,8040ed0 diop = rtems_libio_iop( fd2 ); 8040e18: 56 11 00 24 bgu r16,r17,8040ea8 <== NOT EXECUTED 8040e1c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8040e20: b8 20 18 00 mv r3,r1 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 8040e24: 29 62 00 1c lw r2,(r11+28) ret = -1; break; } } diop->handlers = iop->handlers; 8040e28: 29 64 00 40 lw r4,(r11+64) diop->file_info = iop->file_info; diop->flags = iop->flags; 8040e2c: 58 6f 00 18 sw (r3+24),r15 diop->pathinfo = iop->pathinfo; 8040e30: 58 62 00 1c sw (r3+28),r2 ret = -1; break; } } diop->handlers = iop->handlers; 8040e34: 58 64 00 40 sw (r3+64),r4 diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 8040e38: 29 64 00 20 lw r4,(r11+32) break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 8040e3c: 29 62 00 3c lw r2,(r11+60) diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 8040e40: c8 32 08 00 sub r1,r1,r18 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 8040e44: 58 64 00 20 sw (r3+32),r4 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 8040e48: 58 62 00 3c sw (r3+60),r2 diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 8040e4c: 29 62 00 24 lw r2,(r11+36) 8040e50: 58 62 00 24 sw (r3+36),r2 8040e54: 29 64 00 28 lw r4,(r11+40) ret = (int) (diop - rtems_libio_iops); 8040e58: 34 02 00 03 mvi r2,3 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 8040e5c: 58 64 00 28 sw (r3+40),r4 8040e60: 29 64 00 2c lw r4,(r11+44) 8040e64: 58 64 00 2c sw (r3+44),r4 ret = (int) (diop - rtems_libio_iops); 8040e68: fb ff 01 0e calli 80012a0 <__ashrsi3> 8040e6c: 78 02 38 e3 mvhi r2,0x38e3 8040e70: 38 42 8e 39 ori r2,r2,0x8e39 8040e74: fb ff 09 d4 calli 80035c4 <__mulsi3> 8040e78: b8 20 60 00 mv r12,r1 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 8040e7c: 48 0c ff b4 bg r0,r12,8040d4c 8040e80: e3 ff ff c8 bi 8040da0 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 8040e84: f8 00 1f a5 calli 8048d18 <__errno> 8040e88: 34 02 00 16 mvi r2,22 8040e8c: 58 22 00 00 sw (r1+0),r2 8040e90: 34 0c ff ff mvi r12,-1 8040e94: e3 ff ff ae bi 8040d4c */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 8040e98: 34 01 f7 ff mvi r1,-2049 <== NOT EXECUTED 8040e9c: a1 e1 78 00 and r15,r15,r1 <== NOT EXECUTED 8040ea0: 59 6f 00 18 sw (r11+24),r15 <== NOT EXECUTED 8040ea4: e3 ff ff bf bi 8040da0 <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 8040ea8: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8040eac: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8040eb0: fb ff 00 ac calli 8001160 <__ashlsi3> <== NOT EXECUTED 8040eb4: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8040eb8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 8040ebc: fb ff 00 a9 calli 8001160 <__ashlsi3> <== NOT EXECUTED 8040ec0: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 8040ec4: b6 41 18 00 add r3,r18,r1 <== NOT EXECUTED 8040ec8: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 8040ecc: e3 ff ff d6 bi 8040e24 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 8040ed0: fb ff 1c 1c calli 8007f40 8040ed4: b8 20 18 00 mv r3,r1 if ( diop == 0 ) { 8040ed8: 34 0c ff ff mvi r12,-1 8040edc: 44 31 ff 9c be r1,r17,8040d4c 8040ee0: 29 d2 00 00 lw r18,(r14+0) 8040ee4: 29 6f 00 18 lw r15,(r11+24) 8040ee8: e3 ff ff cf bi 8040e24 0800afa8 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 800afa8: 37 9c ff d4 addi sp,sp,-44 800afac: 5b 8b 00 24 sw (sp+36),r11 800afb0: 5b 8c 00 20 sw (sp+32),r12 800afb4: 5b 8d 00 1c sw (sp+28),r13 800afb8: 5b 8e 00 18 sw (sp+24),r14 800afbc: 5b 8f 00 14 sw (sp+20),r15 800afc0: 5b 90 00 10 sw (sp+16),r16 800afc4: 5b 91 00 0c sw (sp+12),r17 800afc8: 5b 92 00 08 sw (sp+8),r18 800afcc: 5b 9d 00 04 sw (sp+4),ra ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 800afd0: 78 0d 08 01 mvhi r13,0x801 800afd4: 39 ad e6 a4 ori r13,r13,0xe6a4 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 800afd8: b8 20 70 00 mv r14,r1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 800afdc: 29 a1 00 00 lw r1,(r13+0) */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 800afe0: b8 40 88 00 mv r17,r2 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 800afe4: 34 02 00 00 mvi r2,0 800afe8: b8 40 18 00 mv r3,r2 800afec: fb ff f7 85 calli 8008e00 800aff0: b8 20 58 00 mv r11,r1 800aff4: 34 0c ff fc mvi r12,-4 800aff8: 5c 20 00 1b bne r1,r0,800b064 RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 800affc: 29 cf 00 00 lw r15,(r14+0) <== NOT EXECUTED if (pipe == NULL) { 800b000: 45 e1 00 7c be r15,r1,800b1f0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 800b004: 29 e1 00 28 lw r1,(r15+40) <== NOT EXECUTED 800b008: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800b00c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800b010: fb ff f7 7c calli 8008e00 <== NOT EXECUTED 800b014: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 800b018: 44 20 00 02 be r1,r0,800b020 <== NOT EXECUTED 800b01c: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 800b020: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED 800b024: 44 20 00 3e be r1,r0,800b11c <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 800b028: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 800b02c: fb ff f7 d6 calli 8008f84 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 800b030: 5d 80 00 0d bne r12,r0,800b064 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 800b034: 2a 22 00 18 lw r2,(r17+24) <== NOT EXECUTED 800b038: 34 03 00 04 mvi r3,4 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 800b03c: 29 cb 00 00 lw r11,(r14+0) <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 800b040: 20 41 00 06 andi r1,r2,0x6 <== NOT EXECUTED 800b044: 44 23 00 14 be r1,r3,800b094 <== NOT EXECUTED 800b048: 34 02 00 06 mvi r2,6 <== NOT EXECUTED 800b04c: 44 22 00 57 be r1,r2,800b1a8 <== NOT EXECUTED 800b050: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 800b054: 44 22 00 37 be r1,r2,800b130 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 800b058: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800b05c: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 800b060: fb ff f7 c9 calli 8008f84 <== NOT EXECUTED return 0; out_error: pipe_release(pipep, iop); return err; } 800b064: b9 80 08 00 mv r1,r12 800b068: 2b 9d 00 04 lw ra,(sp+4) 800b06c: 2b 8b 00 24 lw r11,(sp+36) 800b070: 2b 8c 00 20 lw r12,(sp+32) 800b074: 2b 8d 00 1c lw r13,(sp+28) 800b078: 2b 8e 00 18 lw r14,(sp+24) 800b07c: 2b 8f 00 14 lw r15,(sp+20) 800b080: 2b 90 00 10 lw r16,(sp+16) 800b084: 2b 91 00 0c lw r17,(sp+12) 800b088: 2b 92 00 08 lw r18,(sp+8) 800b08c: 37 9c 00 2c addi sp,sp,44 800b090: c3 a0 00 00 ret } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 800b094: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800b098: 5c 20 00 04 bne r1,r0,800b0a8 <== NOT EXECUTED 800b09c: 20 42 00 01 andi r2,r2,0x1 <== NOT EXECUTED 800b0a0: 34 0c ff fa mvi r12,-6 <== NOT EXECUTED 800b0a4: 5c 41 00 1a bne r2,r1,800b10c <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; 800b0a8: 29 64 00 24 lw r4,(r11+36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 800b0ac: 29 62 00 14 lw r2,(r11+20) <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 800b0b0: 34 84 00 01 addi r4,r4,1 <== NOT EXECUTED if (pipe->Writers ++ == 0) 800b0b4: 34 43 00 01 addi r3,r2,1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 800b0b8: 59 64 00 24 sw (r11+36),r4 <== NOT EXECUTED if (pipe->Writers ++ == 0) 800b0bc: 59 63 00 14 sw (r11+20),r3 <== NOT EXECUTED 800b0c0: 44 40 00 ab be r2,r0,800b36c <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0) { 800b0c4: 5c 20 ff e5 bne r1,r0,800b058 <== NOT EXECUTED prevCounter = pipe->readerCounter; 800b0c8: 29 6d 00 20 lw r13,(r11+32) <== NOT EXECUTED 800b0cc: e0 00 00 06 bi 800b0e4 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 800b0d0: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800b0d4: fb ff f7 4b calli 8008e00 <== NOT EXECUTED 800b0d8: 5c 2c 00 0c bne r1,r12,800b108 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 800b0dc: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 800b0e0: 5c 2d ff de bne r1,r13,800b058 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 800b0e4: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800b0e8: fb ff f7 a7 calli 8008f84 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 800b0ec: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800b0f0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800b0f4: f8 00 03 c7 calli 800c010 <== NOT EXECUTED 800b0f8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 800b0fc: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 800b100: 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)) 800b104: 44 20 ff f3 be r1,r0,800b0d0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 800b108: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 800b10c: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 800b110: ba 20 10 00 mv r2,r17 <== NOT EXECUTED 800b114: fb ff ff 54 calli 800ae64 <== NOT EXECUTED return err; 800b118: e3 ff ff d3 bi 800b064 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 800b11c: 5d 81 00 a1 bne r12,r1,800b3a0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 800b120: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED if (*pipep == NULL) { if (err) pipe_free(pipe); else *pipep = pipe; 800b124: 59 cf 00 00 sw (r14+0),r15 <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 800b128: fb ff f7 97 calli 8008f84 <== NOT EXECUTED 800b12c: e3 ff ff c2 bi 800b034 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 800b130: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 800b134: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 800b138: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED if (pipe->Readers ++ == 0) 800b13c: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 800b140: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED if (pipe->Readers ++ == 0) 800b144: 59 62 00 10 sw (r11+16),r2 <== NOT EXECUTED 800b148: 44 20 00 8e be r1,r0,800b380 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 800b14c: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 800b150: 5c 20 ff c2 bne r1,r0,800b058 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 800b154: 2a 22 00 18 lw r2,(r17+24) <== NOT EXECUTED 800b158: 20 42 00 01 andi r2,r2,0x1 <== NOT EXECUTED 800b15c: 5c 41 ff bf bne r2,r1,800b058 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 800b160: 29 6d 00 24 lw r13,(r11+36) <== NOT EXECUTED 800b164: e0 00 00 06 bi 800b17c <== NOT EXECUTED /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 800b168: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800b16c: fb ff f7 25 calli 8008e00 <== NOT EXECUTED 800b170: 5c 2c ff e6 bne r1,r12,800b108 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 800b174: 29 61 00 24 lw r1,(r11+36) <== NOT EXECUTED 800b178: 5c 2d ff b8 bne r1,r13,800b058 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 800b17c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800b180: fb ff f7 81 calli 8008f84 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 800b184: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800b188: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800b18c: f8 00 03 a1 calli 800c010 <== NOT EXECUTED 800b190: b8 20 60 00 mv r12,r1 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 800b194: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 800b198: 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)) 800b19c: 44 20 ff f3 be r1,r0,800b168 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 800b1a0: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED 800b1a4: e3 ff ff da bi 800b10c <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 800b1a8: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 800b1ac: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 800b1b0: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED if (pipe->Readers ++ == 0) 800b1b4: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 800b1b8: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED if (pipe->Readers ++ == 0) 800b1bc: 59 62 00 10 sw (r11+16),r2 <== NOT EXECUTED 800b1c0: 44 20 00 74 be r1,r0,800b390 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 800b1c4: 29 63 00 24 lw r3,(r11+36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 800b1c8: 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 ++; 800b1cc: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED if (pipe->Writers ++ == 0) 800b1d0: 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 ++; 800b1d4: 59 63 00 24 sw (r11+36),r3 <== NOT EXECUTED if (pipe->Writers ++ == 0) 800b1d8: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED 800b1dc: 5c 20 ff 9f bne r1,r0,800b058 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 800b1e0: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800b1e4: 37 82 00 2c addi r2,sp,44 <== NOT EXECUTED 800b1e8: f8 00 03 6b calli 800bf94 <== NOT EXECUTED 800b1ec: e3 ff ff 9b bi 800b058 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 800b1f0: 34 01 00 34 mvi r1,52 <== NOT EXECUTED 800b1f4: fb ff f3 77 calli 8007fd0 <== NOT EXECUTED 800b1f8: b8 20 80 00 mv r16,r1 <== NOT EXECUTED 800b1fc: b8 20 78 00 mv r15,r1 <== NOT EXECUTED if (pipe == NULL) 800b200: 34 0c ff f4 mvi r12,-12 <== NOT EXECUTED 800b204: 44 20 ff 89 be r1,r0,800b028 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; 800b208: 34 02 02 00 mvi r2,512 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 800b20c: b8 40 08 00 mv r1,r2 <== NOT EXECUTED int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); 800b210: 5a 0b 00 00 sw (r16+0),r11 <== NOT EXECUTED 800b214: 5a 0b 00 08 sw (r16+8),r11 <== NOT EXECUTED 800b218: 5a 0b 00 0c sw (r16+12),r11 <== NOT EXECUTED 800b21c: 5a 0b 00 10 sw (r16+16),r11 <== NOT EXECUTED 800b220: 5a 0b 00 14 sw (r16+20),r11 <== NOT EXECUTED 800b224: 5a 0b 00 18 sw (r16+24),r11 <== NOT EXECUTED 800b228: 5a 0b 00 1c sw (r16+28),r11 <== NOT EXECUTED 800b22c: 5a 0b 00 20 sw (r16+32),r11 <== NOT EXECUTED 800b230: 5a 0b 00 24 sw (r16+36),r11 <== NOT EXECUTED 800b234: 5a 0b 00 28 sw (r16+40),r11 <== NOT EXECUTED 800b238: 5a 0b 00 2c sw (r16+44),r11 <== NOT EXECUTED 800b23c: 5a 0b 00 30 sw (r16+48),r11 <== NOT EXECUTED pipe->Size = PIPE_BUF; 800b240: 5a 02 00 04 sw (r16+4),r2 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 800b244: fb ff f3 63 calli 8007fd0 <== NOT EXECUTED 800b248: 5a 01 00 00 sw (r16+0),r1 <== NOT EXECUTED if (! pipe->Buffer) 800b24c: 44 20 00 45 be r1,r0,800b360 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 800b250: 78 0c 08 01 mvhi r12,0x801 <== NOT EXECUTED 800b254: 39 8c e1 9c ori r12,r12,0xe19c <== NOT EXECUTED 800b258: 41 83 00 00 lbu r3,(r12+0) <== NOT EXECUTED 800b25c: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED 800b260: 38 21 72 00 ori r1,r1,0x7200 <== NOT EXECUTED 800b264: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800b268: b8 61 08 00 or r1,r3,r1 <== NOT EXECUTED 800b26c: 36 04 00 2c addi r4,r16,44 <== NOT EXECUTED 800b270: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 800b274: f8 00 02 e2 calli 800bdfc <== NOT EXECUTED 800b278: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 800b27c: 5c 20 00 36 bne r1,r0,800b354 <== 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( 800b280: 41 82 00 00 lbu r2,(r12+0) <== NOT EXECUTED 800b284: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED 800b288: 38 21 77 00 ori r1,r1,0x7700 <== NOT EXECUTED 800b28c: b8 41 08 00 or r1,r2,r1 <== NOT EXECUTED 800b290: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 800b294: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800b298: 36 04 00 30 addi r4,r16,48 <== NOT EXECUTED 800b29c: f8 00 02 d8 calli 800bdfc <== NOT EXECUTED 800b2a0: b8 20 90 00 mv r18,r1 <== NOT EXECUTED 800b2a4: 5c 2b 00 2a bne r1,r11,800b34c <== 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( 800b2a8: 41 82 00 00 lbu r2,(r12+0) <== NOT EXECUTED 800b2ac: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED 800b2b0: 38 21 73 00 ori r1,r1,0x7300 <== NOT EXECUTED 800b2b4: b8 41 08 00 or r1,r2,r1 <== NOT EXECUTED 800b2b8: 34 03 00 10 mvi r3,16 <== NOT EXECUTED 800b2bc: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800b2c0: ba 40 20 00 mv r4,r18 <== NOT EXECUTED 800b2c4: 36 05 00 28 addi r5,r16,40 <== NOT EXECUTED 800b2c8: fb ff db ad calli 800217c <== NOT EXECUTED 800b2cc: 5c 32 00 1e bne r1,r18,800b344 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 800b2d0: 2a 02 00 2c lw r2,(r16+44) <== NOT EXECUTED 800b2d4: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800b2d8: 37 90 00 28 addi r16,sp,40 <== NOT EXECUTED 800b2dc: ba 00 18 00 mv r3,r16 <== NOT EXECUTED 800b2e0: 38 21 f1 98 ori r1,r1,0xf198 <== NOT EXECUTED 800b2e4: fb ff fa ba calli 8009dcc <_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 800b2e8: 28 22 00 4c lw r2,(r1+76) <== NOT EXECUTED 800b2ec: 78 0b 10 00 mvhi r11,0x1000 <== NOT EXECUTED 800b2f0: 39 6b 00 00 ori r11,r11,0x0 <== NOT EXECUTED 800b2f4: b8 4b 10 00 or r2,r2,r11 <== NOT EXECUTED 800b2f8: 58 22 00 4c sw (r1+76),r2 <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 800b2fc: fb ff e4 fa calli 80046e4 <_Thread_Enable_dispatch> <== NOT EXECUTED 800b300: 29 e2 00 30 lw r2,(r15+48) <== NOT EXECUTED 800b304: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800b308: ba 00 18 00 mv r3,r16 <== NOT EXECUTED 800b30c: 38 21 f1 98 ori r1,r1,0xf198 <== NOT EXECUTED 800b310: fb ff fa af calli 8009dcc <_Objects_Get> <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 800b314: 28 22 00 4c lw r2,(r1+76) <== NOT EXECUTED 800b318: b8 4b 58 00 or r11,r2,r11 <== NOT EXECUTED 800b31c: 58 2b 00 4c sw (r1+76),r11 <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 800b320: fb ff e4 f1 calli 80046e4 <_Thread_Enable_dispatch> <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 800b324: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED 800b328: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED 800b32c: 31 82 00 00 sb (r12+0),r2 <== NOT EXECUTED 800b330: 34 02 00 7a mvi r2,122 <== NOT EXECUTED 800b334: 5c 22 ff 34 bne r1,r2,800b004 <== NOT EXECUTED c = 'a'; 800b338: 34 01 00 61 mvi r1,97 <== NOT EXECUTED 800b33c: 31 81 00 00 sb (r12+0),r1 <== NOT EXECUTED 800b340: e3 ff ff 31 bi 800b004 <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 800b344: 2a 01 00 30 lw r1,(r16+48) <== NOT EXECUTED 800b348: f8 00 02 f3 calli 800bf14 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 800b34c: 2a 01 00 2c lw r1,(r16+44) <== NOT EXECUTED 800b350: f8 00 02 f1 calli 800bf14 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 800b354: 2a 01 00 00 lw r1,(r16+0) <== NOT EXECUTED 800b358: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED 800b35c: fb ff f1 5b calli 80078c8 <== NOT EXECUTED err_buf: free(pipe); 800b360: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 800b364: fb ff f1 59 calli 80078c8 <== NOT EXECUTED 800b368: e3 ff ff 30 bi 800b028 <== NOT EXECUTED goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 800b36c: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800b370: 37 82 00 2c addi r2,sp,44 <== NOT EXECUTED 800b374: f8 00 03 08 calli 800bf94 <== NOT EXECUTED 800b378: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800b37c: e3 ff ff 52 bi 800b0c4 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 800b380: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800b384: 37 82 00 2c addi r2,sp,44 <== NOT EXECUTED 800b388: f8 00 03 03 calli 800bf94 <== NOT EXECUTED 800b38c: e3 ff ff 70 bi 800b14c <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 800b390: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800b394: 37 82 00 2c addi r2,sp,44 <== NOT EXECUTED 800b398: f8 00 02 ff calli 800bf94 <== NOT EXECUTED 800b39c: e3 ff ff 8a bi 800b1c4 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 800b3a0: 29 e1 00 2c lw r1,(r15+44) <== NOT EXECUTED 800b3a4: f8 00 02 dc calli 800bf14 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 800b3a8: 29 e1 00 30 lw r1,(r15+48) <== NOT EXECUTED 800b3ac: f8 00 02 da calli 800bf14 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 800b3b0: 29 e1 00 28 lw r1,(r15+40) <== NOT EXECUTED 800b3b4: fb ff f6 50 calli 8008cf4 <== NOT EXECUTED free(pipe->Buffer); 800b3b8: 29 e1 00 00 lw r1,(r15+0) <== NOT EXECUTED 800b3bc: fb ff f1 43 calli 80078c8 <== NOT EXECUTED free(pipe); 800b3c0: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 800b3c4: fb ff f1 41 calli 80078c8 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 800b3c8: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 800b3cc: fb ff f6 ee calli 8008f84 <== NOT EXECUTED 800b3d0: e3 ff ff 25 bi 800b064 <== NOT EXECUTED 08009954 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8009954: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 8009958: 38 63 6f 50 ori r3,r3,0x6f50 <== NOT EXECUTED 800995c: 28 61 00 00 lw r1,(r3+0) <== NOT EXECUTED 8009960: 34 63 00 04 addi r3,r3,4 <== NOT EXECUTED 8009964: 44 23 00 09 be r1,r3,8009988 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 8009968: 28 42 00 10 lw r2,(r2+16) <== NOT EXECUTED 800996c: 28 24 00 18 lw r4,(r1+24) <== NOT EXECUTED 8009970: 5c 82 00 04 bne r4,r2,8009980 <== NOT EXECUTED 8009974: e0 00 00 07 bi 8009990 <== NOT EXECUTED 8009978: 28 24 00 18 lw r4,(r1+24) <== NOT EXECUTED 800997c: 44 82 00 05 be r4,r2,8009990 <== NOT EXECUTED * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 8009980: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8009984: 5c 23 ff fd bne r1,r3,8009978 <== NOT EXECUTED 8009988: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return true; } } return false; } 800998c: c3 a0 00 00 ret <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8009990: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8009994: c3 a0 00 00 ret <== NOT EXECUTED 080078c8 : void free( void *ptr ) { MSBUMP(free_calls, 1); 80078c8: 37 9c ff f4 addi sp,sp,-12 80078cc: 5b 8b 00 0c sw (sp+12),r11 80078d0: 5b 8c 00 08 sw (sp+8),r12 80078d4: 5b 9d 00 04 sw (sp+4),ra 80078d8: 78 03 08 01 mvhi r3,0x801 80078dc: 38 63 e7 28 ori r3,r3,0xe728 80078e0: 28 62 00 0c lw r2,(r3+12) 80078e4: b8 20 58 00 mv r11,r1 80078e8: 34 41 00 01 addi r1,r2,1 80078ec: 58 61 00 0c sw (r3+12),r1 if ( !ptr ) 80078f0: 45 60 00 1a be r11,r0,8007958 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 80078f4: 78 01 08 01 mvhi r1,0x801 80078f8: 38 21 ea 40 ori r1,r1,0xea40 80078fc: 28 22 00 00 lw r2,(r1+0) 8007900: 34 01 00 03 mvi r1,3 8007904: 44 41 00 1a be r2,r1,800796c #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 8007908: 78 01 08 01 mvhi r1,0x801 800790c: 38 21 e6 50 ori r1,r1,0xe650 8007910: 28 21 00 00 lw r1,(r1+0) 8007914: 44 20 00 04 be r1,r0,8007924 (*rtems_malloc_statistics_helpers->at_free)(ptr); 8007918: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED 800791c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8007920: d8 40 00 00 call r2 <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 8007924: 78 0c 08 01 mvhi r12,0x801 8007928: 39 8c e0 1c ori r12,r12,0xe01c 800792c: 29 81 00 00 lw r1,(r12+0) 8007930: b9 60 10 00 mv r2,r11 8007934: f8 00 09 7b calli 8009f20 <_Protected_heap_Free> 8007938: 5c 20 00 08 bne r1,r0,8007958 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 800793c: 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", 8007940: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8007944: 38 21 cd 84 ori r1,r1,0xcd84 <== NOT EXECUTED 8007948: 28 44 00 1c lw r4,(r2+28) <== NOT EXECUTED 800794c: 28 43 00 18 lw r3,(r2+24) <== NOT EXECUTED 8007950: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8007954: fb ff e8 db calli 8001cc0 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 8007958: 2b 9d 00 04 lw ra,(sp+4) 800795c: 2b 8b 00 0c lw r11,(sp+12) 8007960: 2b 8c 00 08 lw r12,(sp+8) 8007964: 37 9c 00 0c addi sp,sp,12 8007968: c3 a0 00 00 ret /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 800796c: f8 00 01 70 calli 8007f2c 8007970: 5c 20 ff e6 bne r1,r0,8007908 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 8007974: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8007978: f8 00 01 7f calli 8007f74 <== NOT EXECUTED return; 800797c: e3 ff ff f7 bi 8007958 <== NOT EXECUTED 0802b370 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 802b370: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 802b374: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 802b378: 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 802b37c: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 802b380: 38 42 6f 5c ori r2,r2,0x6f5c <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 802b384: 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 802b388: 44 22 00 0f be r1,r2,802b3c4 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 802b38c: 28 21 00 10 lw r1,(r1+16) <== NOT EXECUTED 802b390: 44 20 00 05 be r1,r0,802b3a4 <== NOT EXECUTED 802b394: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 802b398: 44 40 00 03 be r2,r0,802b3a4 <== NOT EXECUTED 802b39c: 35 61 00 04 addi r1,r11,4 <== NOT EXECUTED 802b3a0: d8 40 00 00 call r2 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 802b3a4: 29 61 00 24 lw r1,(r11+36) <== NOT EXECUTED 802b3a8: 44 20 00 05 be r1,r0,802b3bc <== NOT EXECUTED 802b3ac: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 802b3b0: 44 40 00 03 be r2,r0,802b3bc <== NOT EXECUTED 802b3b4: 35 61 00 18 addi r1,r11,24 <== NOT EXECUTED 802b3b8: d8 40 00 00 call r2 <== NOT EXECUTED free(env); 802b3bc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802b3c0: fb ff 71 a8 calli 8007a60 <== NOT EXECUTED } } 802b3c4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802b3c8: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 802b3cc: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 802b3d0: c3 a0 00 00 ret <== NOT EXECUTED 0801b938 : int fstat( int fd, struct stat *sbuf ) { 801b938: 37 9c ff ec addi sp,sp,-20 801b93c: 5b 8b 00 14 sw (sp+20),r11 801b940: 5b 8c 00 10 sw (sp+16),r12 801b944: 5b 8d 00 0c sw (sp+12),r13 801b948: 5b 8e 00 08 sw (sp+8),r14 801b94c: 5b 9d 00 04 sw (sp+4),ra 801b950: b8 40 60 00 mv r12,r2 /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 801b954: 45 80 00 30 be r12,r0,801ba14 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 801b958: 78 03 08 01 mvhi r3,0x801 801b95c: 38 63 e0 10 ori r3,r3,0xe010 801b960: 28 63 00 00 lw r3,(r3+0) 801b964: 50 23 00 22 bgeu r1,r3,801b9ec 801b968: 34 02 00 03 mvi r2,3 801b96c: fb ff 92 21 calli 80001f0 <__ashlsi3> 801b970: 78 0d 08 01 mvhi r13,0x801 801b974: 39 ad e7 18 ori r13,r13,0xe718 801b978: 34 02 00 03 mvi r2,3 801b97c: b8 20 70 00 mv r14,r1 801b980: fb ff 92 1c calli 80001f0 <__ashlsi3> 801b984: 29 ab 00 00 lw r11,(r13+0) 801b988: b5 c1 08 00 add r1,r14,r1 801b98c: b5 61 58 00 add r11,r11,r1 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 801b990: 29 61 00 18 lw r1,(r11+24) 801b994: 20 21 01 00 andi r1,r1,0x100 801b998: 44 20 00 15 be r1,r0,801b9ec if ( !iop->handlers ) 801b99c: 29 61 00 40 lw r1,(r11+64) 801b9a0: 44 20 00 13 be r1,r0,801b9ec rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 801b9a4: 28 21 00 18 lw r1,(r1+24) 801b9a8: 44 20 00 16 be r1,r0,801ba00 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 801b9ac: 34 02 00 00 mvi r2,0 801b9b0: 34 03 00 48 mvi r3,72 801b9b4: b9 80 08 00 mv r1,r12 801b9b8: fb ff ca 00 calli 800e1b8 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 801b9bc: 29 63 00 40 lw r3,(r11+64) 801b9c0: 35 61 00 1c addi r1,r11,28 801b9c4: b9 80 10 00 mv r2,r12 801b9c8: 28 63 00 18 lw r3,(r3+24) 801b9cc: d8 60 00 00 call r3 } 801b9d0: 2b 9d 00 04 lw ra,(sp+4) 801b9d4: 2b 8b 00 14 lw r11,(sp+20) 801b9d8: 2b 8c 00 10 lw r12,(sp+16) 801b9dc: 2b 8d 00 0c lw r13,(sp+12) 801b9e0: 2b 8e 00 08 lw r14,(sp+8) 801b9e4: 37 9c 00 14 addi sp,sp,20 801b9e8: c3 a0 00 00 ret iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 801b9ec: fb ff c6 ef calli 800d5a8 <__errno> 801b9f0: 34 02 00 09 mvi r2,9 801b9f4: 58 22 00 00 sw (r1+0),r2 801b9f8: 34 01 ff ff mvi r1,-1 801b9fc: e3 ff ff f5 bi 801b9d0 if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 801ba00: fb ff c6 ea calli 800d5a8 <__errno> <== NOT EXECUTED 801ba04: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 801ba08: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801ba0c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 801ba10: e3 ff ff f0 bi 801b9d0 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 801ba14: fb ff c6 e5 calli 800d5a8 <__errno> 801ba18: 34 02 00 0e mvi r2,14 801ba1c: 58 22 00 00 sw (r1+0),r2 801ba20: 34 01 ff ff mvi r1,-1 801ba24: e3 ff ff eb bi 801b9d0 08029bc4 : #include int fsync( int fd ) { 8029bc4: 37 9c ff f4 addi sp,sp,-12 8029bc8: 5b 8b 00 0c sw (sp+12),r11 8029bcc: 5b 8c 00 08 sw (sp+8),r12 8029bd0: 5b 9d 00 04 sw (sp+4),ra rtems_libio_t *iop; rtems_libio_check_fd( fd ); 8029bd4: 78 02 08 07 mvhi r2,0x807 8029bd8: 38 42 30 10 ori r2,r2,0x3010 8029bdc: 28 42 00 00 lw r2,(r2+0) 8029be0: 54 41 00 06 bgu r2,r1,8029bf8 /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 8029be4: f8 00 7c 4d calli 8048d18 <__errno> <== NOT EXECUTED 8029be8: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8029bec: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8029bf0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8029bf4: e0 00 00 15 bi 8029c48 <== NOT EXECUTED ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 8029bf8: 34 02 00 03 mvi r2,3 8029bfc: fb ff 5d 59 calli 8001160 <__ashlsi3> 8029c00: 34 02 00 03 mvi r2,3 8029c04: 78 0b 08 07 mvhi r11,0x807 8029c08: b8 20 60 00 mv r12,r1 8029c0c: 39 6b 6f 08 ori r11,r11,0x6f08 8029c10: fb ff 5d 54 calli 8001160 <__ashlsi3> 8029c14: 29 62 00 00 lw r2,(r11+0) 8029c18: b5 81 08 00 add r1,r12,r1 8029c1c: b4 41 08 00 add r1,r2,r1 rtems_libio_check_is_open(iop); 8029c20: 28 22 00 18 lw r2,(r1+24) 8029c24: 20 43 01 00 andi r3,r2,0x100 8029c28: 44 60 ff ef be r3,r0,8029be4 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8029c2c: 20 42 00 04 andi r2,r2,0x4 8029c30: 44 40 00 0b be r2,r0,8029c5c /* * Now process the fsync(). */ if ( !iop->handlers ) 8029c34: 28 22 00 40 lw r2,(r1+64) 8029c38: 44 40 ff eb be r2,r0,8029be4 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 8029c3c: 28 42 00 28 lw r2,(r2+40) 8029c40: 44 40 00 0c be r2,r0,8029c70 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 8029c44: d8 40 00 00 call r2 } 8029c48: 2b 9d 00 04 lw ra,(sp+4) 8029c4c: 2b 8b 00 0c lw r11,(sp+12) 8029c50: 2b 8c 00 08 lw r12,(sp+8) 8029c54: 37 9c 00 0c addi sp,sp,12 8029c58: c3 a0 00 00 ret rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8029c5c: f8 00 7c 2f calli 8048d18 <__errno> 8029c60: 34 02 00 16 mvi r2,22 8029c64: 58 22 00 00 sw (r1+0),r2 8029c68: 34 01 ff ff mvi r1,-1 8029c6c: e3 ff ff f7 bi 8029c48 if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8029c70: f8 00 7c 2a calli 8048d18 <__errno> 8029c74: 34 02 00 86 mvi r2,134 8029c78: 58 22 00 00 sw (r1+0),r2 8029c7c: 34 01 ff ff mvi r1,-1 8029c80: e3 ff ff f2 bi 8029c48 08007980 : int ftruncate( int fd, off_t length ) { 8007980: 37 9c ff d8 addi sp,sp,-40 8007984: 5b 8b 00 14 sw (sp+20),r11 8007988: 5b 8c 00 10 sw (sp+16),r12 800798c: 5b 8d 00 0c sw (sp+12),r13 8007990: 5b 8e 00 08 sw (sp+8),r14 8007994: 5b 9d 00 04 sw (sp+4),ra rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 8007998: 78 03 08 01 mvhi r3,0x801 800799c: 38 63 e0 10 ori r3,r3,0xe010 80079a0: 28 63 00 00 lw r3,(r3+0) int ftruncate( int fd, off_t length ) { 80079a4: b8 40 68 00 mv r13,r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 80079a8: 54 61 00 06 bgu r3,r1,80079c0 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 80079ac: f8 00 16 ff calli 800d5a8 <__errno> <== NOT EXECUTED 80079b0: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 80079b4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80079b8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80079bc: e0 00 00 2b bi 8007a68 <== NOT EXECUTED { rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 80079c0: 34 02 00 03 mvi r2,3 80079c4: fb ff e2 0b calli 80001f0 <__ashlsi3> 80079c8: 78 0c 08 01 mvhi r12,0x801 80079cc: 39 8c e7 18 ori r12,r12,0xe718 80079d0: 34 02 00 03 mvi r2,3 80079d4: b8 20 70 00 mv r14,r1 80079d8: fb ff e2 06 calli 80001f0 <__ashlsi3> 80079dc: 29 8b 00 00 lw r11,(r12+0) 80079e0: b5 c1 08 00 add r1,r14,r1 80079e4: b5 61 58 00 add r11,r11,r1 rtems_libio_check_is_open(iop); 80079e8: 29 61 00 18 lw r1,(r11+24) 80079ec: 20 21 01 00 andi r1,r1,0x100 80079f0: 44 20 ff ef be r1,r0,80079ac /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 80079f4: 29 61 00 1c lw r1,(r11+28) 80079f8: 5b 81 00 18 sw (sp+24),r1 80079fc: 29 61 00 20 lw r1,(r11+32) 8007a00: 5b 81 00 1c sw (sp+28),r1 8007a04: 29 61 00 24 lw r1,(r11+36) 8007a08: 5b 81 00 20 sw (sp+32),r1 8007a0c: 29 64 00 28 lw r4,(r11+40) 8007a10: 5b 84 00 24 sw (sp+36),r4 8007a14: 29 61 00 2c lw r1,(r11+44) if ( !loc.ops->node_type_h ) 8007a18: 28 84 00 10 lw r4,(r4+16) /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 8007a1c: 5b 81 00 28 sw (sp+40),r1 if ( !loc.ops->node_type_h ) 8007a20: 44 80 00 1e be r4,r0,8007a98 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 8007a24: 37 81 00 18 addi r1,sp,24 8007a28: d8 80 00 00 call r4 8007a2c: 34 02 00 01 mvi r2,1 8007a30: 44 22 00 1f be r1,r2,8007aac rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8007a34: 29 61 00 18 lw r1,(r11+24) 8007a38: 20 21 00 04 andi r1,r1,0x4 8007a3c: 44 20 00 12 be r1,r0,8007a84 if ( !iop->handlers->ftruncate_h ) 8007a40: 29 61 00 40 lw r1,(r11+64) 8007a44: 28 2c 00 20 lw r12,(r1+32) 8007a48: 45 80 00 14 be r12,r0,8007a98 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 8007a4c: 34 02 00 1f mvi r2,31 8007a50: b9 a0 08 00 mv r1,r13 8007a54: fb ff e2 37 calli 8000330 <__ashrsi3> 8007a58: b8 20 10 00 mv r2,r1 8007a5c: b9 a0 18 00 mv r3,r13 8007a60: b9 60 08 00 mv r1,r11 8007a64: d9 80 00 00 call r12 } 8007a68: 2b 9d 00 04 lw ra,(sp+4) 8007a6c: 2b 8b 00 14 lw r11,(sp+20) 8007a70: 2b 8c 00 10 lw r12,(sp+16) 8007a74: 2b 8d 00 0c lw r13,(sp+12) 8007a78: 2b 8e 00 08 lw r14,(sp+8) 8007a7c: 37 9c 00 28 addi sp,sp,40 8007a80: c3 a0 00 00 ret rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8007a84: f8 00 16 c9 calli 800d5a8 <__errno> <== NOT EXECUTED 8007a88: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8007a8c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8007a90: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8007a94: e3 ff ff f5 bi 8007a68 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8007a98: f8 00 16 c4 calli 800d5a8 <__errno> <== NOT EXECUTED 8007a9c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8007aa0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8007aa4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8007aa8: e3 ff ff f0 bi 8007a68 <== NOT EXECUTED loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 8007aac: f8 00 16 bf calli 800d5a8 <__errno> 8007ab0: 34 02 00 15 mvi r2,21 8007ab4: 58 22 00 00 sw (r1+0),r2 8007ab8: 34 01 ff ff mvi r1,-1 8007abc: e3 ff ff eb bi 8007a68 08065490 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 8065490: 37 9c ff d4 addi sp,sp,-44 8065494: 5b 8b 00 18 sw (sp+24),r11 8065498: 5b 8c 00 14 sw (sp+20),r12 806549c: 5b 8d 00 10 sw (sp+16),r13 80654a0: 5b 8e 00 0c sw (sp+12),r14 80654a4: 5b 8f 00 08 sw (sp+8),r15 80654a8: 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 ); 80654ac: 78 04 08 07 mvhi r4,0x807 80654b0: 38 84 30 10 ori r4,r4,0x3010 80654b4: 28 84 00 00 lw r4,(r4+0) int getdents( int dd_fd, char *dd_buf, int dd_len ) { 80654b8: b8 40 70 00 mv r14,r2 80654bc: b8 60 68 00 mv r13,r3 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 80654c0: 54 81 00 21 bgu r4,r1,8065544 80654c4: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED /* * Make sure we are working on a directory */ loc = iop->pathinfo; 80654c8: 29 61 00 1c lw r1,(r11+28) 80654cc: 5b 81 00 1c sw (sp+28),r1 80654d0: 29 61 00 20 lw r1,(r11+32) 80654d4: 5b 81 00 20 sw (sp+32),r1 80654d8: 29 61 00 24 lw r1,(r11+36) 80654dc: 5b 81 00 24 sw (sp+36),r1 80654e0: 29 61 00 28 lw r1,(r11+40) 80654e4: 5b 81 00 28 sw (sp+40),r1 if ( !loc.ops->node_type_h ) 80654e8: 28 24 00 10 lw r4,(r1+16) iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 80654ec: 29 61 00 2c lw r1,(r11+44) 80654f0: 5b 81 00 2c sw (sp+44),r1 if ( !loc.ops->node_type_h ) 80654f4: 44 80 00 24 be r4,r0,8065584 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 80654f8: 37 81 00 1c addi r1,sp,28 80654fc: d8 80 00 00 call r4 8065500: 34 04 00 01 mvi r4,1 8065504: 5c 24 00 1b bne r1,r4,8065570 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 8065508: 29 61 00 40 lw r1,(r11+64) 806550c: 28 24 00 08 lw r4,(r1+8) 8065510: 44 80 00 1d be r4,r0,8065584 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 8065514: b9 60 08 00 mv r1,r11 8065518: b9 c0 10 00 mv r2,r14 806551c: b9 a0 18 00 mv r3,r13 8065520: d8 80 00 00 call r4 } 8065524: 2b 9d 00 04 lw ra,(sp+4) 8065528: 2b 8b 00 18 lw r11,(sp+24) 806552c: 2b 8c 00 14 lw r12,(sp+20) 8065530: 2b 8d 00 10 lw r13,(sp+16) 8065534: 2b 8e 00 0c lw r14,(sp+12) 8065538: 2b 8f 00 08 lw r15,(sp+8) 806553c: 37 9c 00 2c addi sp,sp,44 8065540: c3 a0 00 00 ret /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 8065544: 34 02 00 03 mvi r2,3 8065548: fb fe 6f 06 calli 8001160 <__ashlsi3> 806554c: 78 0c 08 07 mvhi r12,0x807 8065550: 39 8c 6f 08 ori r12,r12,0x6f08 8065554: 34 02 00 03 mvi r2,3 8065558: b8 20 78 00 mv r15,r1 806555c: fb fe 6f 01 calli 8001160 <__ashlsi3> 8065560: 29 8b 00 00 lw r11,(r12+0) 8065564: b5 e1 08 00 add r1,r15,r1 8065568: b5 61 58 00 add r11,r11,r1 806556c: e3 ff ff d7 bi 80654c8 loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 8065570: fb ff 8d ea calli 8048d18 <__errno> 8065574: 34 02 00 14 mvi r2,20 8065578: 58 22 00 00 sw (r1+0),r2 806557c: 34 01 ff ff mvi r1,-1 8065580: e3 ff ff e9 bi 8065524 * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8065584: fb ff 8d e5 calli 8048d18 <__errno> <== NOT EXECUTED 8065588: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 806558c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8065590: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8065594: e3 ff ff e4 bi 8065524 <== NOT EXECUTED 08029dec : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 8029dec: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8029df0: 38 21 32 f0 ori r1,r1,0x32f0 <== NOT EXECUTED 8029df4: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED return _POSIX_types_Gid; } 8029df8: 2c 21 00 34 lhu r1,(r1+52) <== NOT EXECUTED 8029dfc: c3 a0 00 00 ret <== NOT EXECUTED 0802a5d8 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 802a5d8: 37 9c ff e0 addi sp,sp,-32 802a5dc: 5b 8b 00 20 sw (sp+32),r11 802a5e0: 5b 8c 00 1c sw (sp+28),r12 802a5e4: 5b 8d 00 18 sw (sp+24),r13 802a5e8: 5b 8e 00 14 sw (sp+20),r14 802a5ec: 5b 8f 00 10 sw (sp+16),r15 802a5f0: 5b 90 00 0c sw (sp+12),r16 802a5f4: 5b 91 00 08 sw (sp+8),r17 802a5f8: 5b 9d 00 04 sw (sp+4),ra 802a5fc: b8 20 68 00 mv r13,r1 802a600: b8 40 80 00 mv r16,r2 802a604: b8 60 58 00 mv r11,r3 802a608: b8 80 78 00 mv r15,r4 802a60c: b8 a0 70 00 mv r14,r5 802a610: b8 c0 88 00 mv r17,r6 FILE *fp; int match; init_etc_passwd_group(); 802a614: fb ff ff 97 calli 802a470 if ((fp = fopen("/etc/group", "r")) == NULL) { 802a618: 78 01 08 06 mvhi r1,0x806 802a61c: 78 02 08 06 mvhi r2,0x806 802a620: 38 21 63 14 ori r1,r1,0x6314 802a624: 38 42 ec 30 ori r2,r2,0xec30 802a628: f8 00 7c c3 calli 8049934 802a62c: b8 20 60 00 mv r12,r1 802a630: 44 20 00 26 be r1,r0,802a6c8 errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 802a634: b9 60 10 00 mv r2,r11 802a638: b9 e0 18 00 mv r3,r15 802a63c: b9 c0 20 00 mv r4,r14 802a640: b9 80 08 00 mv r1,r12 802a644: fb ff fe b0 calli 802a104 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 802a648: 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)) { 802a64c: 44 20 00 18 be r1,r0,802a6ac errno = EINVAL; fclose(fp); return -1; } if (name) { 802a650: 45 a0 00 13 be r13,r0,802a69c match = (strcmp(grp->gr_name, name) == 0); 802a654: 29 61 00 00 lw r1,(r11+0) 802a658: f8 00 96 34 calli 804ff28 802a65c: 64 21 00 00 cmpei r1,r1,0 } else { match = (grp->gr_gid == gid); } if (match) { 802a660: 44 20 ff f5 be r1,r0,802a634 fclose(fp); 802a664: b9 80 08 00 mv r1,r12 802a668: f8 00 7a 0e calli 8048ea0 *result = grp; 802a66c: 34 01 00 00 mvi r1,0 802a670: 5a 2b 00 00 sw (r17+0),r11 } } fclose(fp); errno = EINVAL; return -1; } 802a674: 2b 9d 00 04 lw ra,(sp+4) 802a678: 2b 8b 00 20 lw r11,(sp+32) 802a67c: 2b 8c 00 1c lw r12,(sp+28) 802a680: 2b 8d 00 18 lw r13,(sp+24) 802a684: 2b 8e 00 14 lw r14,(sp+20) 802a688: 2b 8f 00 10 lw r15,(sp+16) 802a68c: 2b 90 00 0c lw r16,(sp+12) 802a690: 2b 91 00 08 lw r17,(sp+8) 802a694: 37 9c 00 20 addi sp,sp,32 802a698: c3 a0 00 00 ret } if (name) { match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 802a69c: 2d 61 00 08 lhu r1,(r11+8) <== NOT EXECUTED 802a6a0: e4 30 08 00 cmpe r1,r1,r16 <== NOT EXECUTED } if (match) { 802a6a4: 44 20 ff e4 be r1,r0,802a634 <== NOT EXECUTED 802a6a8: e3 ff ff ef bi 802a664 <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 802a6ac: f8 00 79 9b calli 8048d18 <__errno> <== NOT EXECUTED 802a6b0: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 802a6b4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED fclose(fp); 802a6b8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802a6bc: f8 00 79 f9 calli 8048ea0 <== NOT EXECUTED 802a6c0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return -1; 802a6c4: e3 ff ff ec bi 802a674 <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 802a6c8: f8 00 79 94 calli 8048d18 <__errno> <== NOT EXECUTED 802a6cc: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 802a6d0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 802a6d4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return -1; 802a6d8: e3 ff ff e7 bi 802a674 <== NOT EXECUTED 0802a298 : return NULL; return p; } struct group *getgrent(void) { 802a298: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 802a29c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (group_fp == NULL) 802a2a0: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 802a2a4: 38 21 6d 18 ori r1,r1,0x6d18 <== NOT EXECUTED 802a2a8: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 802a2ac: 5c 20 00 05 bne r1,r0,802a2c0 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 802a2b0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return NULL; return &grent; } 802a2b4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a2b8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802a2bc: c3 a0 00 00 ret <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 802a2c0: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 802a2c4: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 802a2c8: 38 42 6d e4 ori r2,r2,0x6de4 <== NOT EXECUTED 802a2cc: 38 63 6d 1c ori r3,r3,0x6d1c <== NOT EXECUTED 802a2d0: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 802a2d4: fb ff ff 8c calli 802a104 <== NOT EXECUTED 802a2d8: 44 20 ff f6 be r1,r0,802a2b0 <== NOT EXECUTED 802a2dc: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 802a2e0: 38 21 6d e4 ori r1,r1,0x6de4 <== NOT EXECUTED return NULL; return &grent; } 802a2e4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a2e8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802a2ec: c3 a0 00 00 ret <== NOT EXECUTED 0802a718 : struct group *getgrgid( gid_t gid ) { 802a718: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 802a71c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 802a720: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 802a724: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 802a728: 38 42 6d e4 ori r2,r2,0x6de4 <== NOT EXECUTED 802a72c: 20 21 ff ff andi r1,r1,0xffff <== NOT EXECUTED 802a730: 38 63 6d 1c ori r3,r3,0x6d1c <== NOT EXECUTED 802a734: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 802a738: 37 85 00 08 addi r5,sp,8 <== NOT EXECUTED 802a73c: fb ff ff e8 calli 802a6dc <== NOT EXECUTED 802a740: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 802a744: 5c 22 00 02 bne r1,r2,802a74c <== NOT EXECUTED return NULL; return p; 802a748: 2b 82 00 08 lw r2,(sp+8) <== NOT EXECUTED } 802a74c: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 802a750: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a754: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 802a758: c3 a0 00 00 ret <== NOT EXECUTED 0802a6dc : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 802a6dc: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 802a6e0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 802a6e4: b8 40 48 00 mv r9,r2 <== NOT EXECUTED 802a6e8: b8 60 40 00 mv r8,r3 <== NOT EXECUTED 802a6ec: b8 80 38 00 mv r7,r4 <== NOT EXECUTED 802a6f0: b8 a0 30 00 mv r6,r5 <== NOT EXECUTED 802a6f4: 20 22 ff ff andi r2,r1,0xffff <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 802a6f8: b9 20 18 00 mv r3,r9 <== NOT EXECUTED 802a6fc: b9 00 20 00 mv r4,r8 <== NOT EXECUTED 802a700: b8 e0 28 00 mv r5,r7 <== NOT EXECUTED 802a704: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 802a708: fb ff ff b4 calli 802a5d8 <== NOT EXECUTED } 802a70c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a710: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802a714: c3 a0 00 00 ret <== NOT EXECUTED 0802a81c : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 802a81c: 37 9c ff e0 addi sp,sp,-32 802a820: 5b 8b 00 20 sw (sp+32),r11 802a824: 5b 8c 00 1c sw (sp+28),r12 802a828: 5b 8d 00 18 sw (sp+24),r13 802a82c: 5b 8e 00 14 sw (sp+20),r14 802a830: 5b 8f 00 10 sw (sp+16),r15 802a834: 5b 90 00 0c sw (sp+12),r16 802a838: 5b 91 00 08 sw (sp+8),r17 802a83c: 5b 9d 00 04 sw (sp+4),ra 802a840: b8 20 68 00 mv r13,r1 802a844: b8 40 80 00 mv r16,r2 802a848: b8 60 58 00 mv r11,r3 802a84c: b8 80 78 00 mv r15,r4 802a850: b8 a0 70 00 mv r14,r5 802a854: b8 c0 88 00 mv r17,r6 FILE *fp; int match; init_etc_passwd_group(); 802a858: fb ff ff 06 calli 802a470 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 802a85c: 78 01 08 06 mvhi r1,0x806 802a860: 78 02 08 06 mvhi r2,0x806 802a864: 38 21 62 64 ori r1,r1,0x6264 802a868: 38 42 ec 30 ori r2,r2,0xec30 802a86c: f8 00 7c 32 calli 8049934 802a870: b8 20 60 00 mv r12,r1 802a874: 44 20 00 26 be r1,r0,802a90c errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 802a878: b9 60 10 00 mv r2,r11 802a87c: b9 e0 18 00 mv r3,r15 802a880: b9 c0 20 00 mv r4,r14 802a884: b9 80 08 00 mv r1,r12 802a888: fb ff fe 9a calli 802a2f0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 802a88c: 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)) { 802a890: 44 20 00 18 be r1,r0,802a8f0 errno = EINVAL; fclose(fp); return -1; } if (name) { 802a894: 45 a0 00 13 be r13,r0,802a8e0 match = (strcmp(pwd->pw_name, name) == 0); 802a898: 29 61 00 00 lw r1,(r11+0) 802a89c: f8 00 95 a3 calli 804ff28 802a8a0: 64 21 00 00 cmpei r1,r1,0 } else { match = (pwd->pw_uid == uid); } if (match) { 802a8a4: 44 20 ff f5 be r1,r0,802a878 fclose(fp); 802a8a8: b9 80 08 00 mv r1,r12 802a8ac: f8 00 79 7d calli 8048ea0 *result = pwd; 802a8b0: 34 01 00 00 mvi r1,0 802a8b4: 5a 2b 00 00 sw (r17+0),r11 } } fclose(fp); errno = EINVAL; return -1; } 802a8b8: 2b 9d 00 04 lw ra,(sp+4) 802a8bc: 2b 8b 00 20 lw r11,(sp+32) 802a8c0: 2b 8c 00 1c lw r12,(sp+28) 802a8c4: 2b 8d 00 18 lw r13,(sp+24) 802a8c8: 2b 8e 00 14 lw r14,(sp+20) 802a8cc: 2b 8f 00 10 lw r15,(sp+16) 802a8d0: 2b 90 00 0c lw r16,(sp+12) 802a8d4: 2b 91 00 08 lw r17,(sp+8) 802a8d8: 37 9c 00 20 addi sp,sp,32 802a8dc: c3 a0 00 00 ret } if (name) { match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 802a8e0: 2d 61 00 08 lhu r1,(r11+8) <== NOT EXECUTED 802a8e4: e4 30 08 00 cmpe r1,r1,r16 <== NOT EXECUTED } if (match) { 802a8e8: 44 20 ff e4 be r1,r0,802a878 <== NOT EXECUTED 802a8ec: e3 ff ff ef bi 802a8a8 <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 802a8f0: f8 00 79 0a calli 8048d18 <__errno> <== NOT EXECUTED 802a8f4: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 802a8f8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED fclose(fp); 802a8fc: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802a900: f8 00 79 68 calli 8048ea0 <== NOT EXECUTED 802a904: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return -1; 802a908: e3 ff ff ec bi 802a8b8 <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 802a90c: f8 00 79 03 calli 8048d18 <__errno> <== NOT EXECUTED 802a910: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 802a914: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 802a918: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return -1; 802a91c: e3 ff ff e7 bi 802a8b8 <== NOT EXECUTED 0802a418 : return NULL; return p; } struct passwd *getpwent(void) { 802a418: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 802a41c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (passwd_fp == NULL) 802a420: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 802a424: 38 21 6c 30 ori r1,r1,0x6c30 <== NOT EXECUTED 802a428: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 802a42c: 5c 20 00 05 bne r1,r0,802a440 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 802a430: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return NULL; return &pwent; } 802a434: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a438: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802a43c: c3 a0 00 00 ret <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 802a440: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 802a444: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 802a448: 38 42 6c fc ori r2,r2,0x6cfc <== NOT EXECUTED 802a44c: 38 63 6c 34 ori r3,r3,0x6c34 <== NOT EXECUTED 802a450: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 802a454: fb ff ff a7 calli 802a2f0 <== NOT EXECUTED 802a458: 44 20 ff f6 be r1,r0,802a430 <== NOT EXECUTED 802a45c: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 802a460: 38 21 6c fc ori r1,r1,0x6cfc <== NOT EXECUTED return NULL; return &pwent; } 802a464: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a468: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802a46c: c3 a0 00 00 ret <== NOT EXECUTED 0802a95c : struct passwd *getpwuid( uid_t uid ) { 802a95c: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 802a960: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 802a964: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 802a968: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 802a96c: 38 42 6c fc ori r2,r2,0x6cfc <== NOT EXECUTED 802a970: 20 21 ff ff andi r1,r1,0xffff <== NOT EXECUTED 802a974: 38 63 6c 34 ori r3,r3,0x6c34 <== NOT EXECUTED 802a978: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 802a97c: 37 85 00 08 addi r5,sp,8 <== NOT EXECUTED 802a980: fb ff ff e8 calli 802a920 <== NOT EXECUTED 802a984: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 802a988: 5c 22 00 02 bne r1,r2,802a990 <== NOT EXECUTED return NULL; return p; 802a98c: 2b 82 00 08 lw r2,(sp+8) <== NOT EXECUTED } 802a990: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 802a994: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a998: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 802a99c: c3 a0 00 00 ret <== NOT EXECUTED 0802a920 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 802a920: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 802a924: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 802a928: b8 40 48 00 mv r9,r2 <== NOT EXECUTED 802a92c: b8 60 40 00 mv r8,r3 <== NOT EXECUTED 802a930: b8 80 38 00 mv r7,r4 <== NOT EXECUTED 802a934: b8 a0 30 00 mv r6,r5 <== NOT EXECUTED 802a938: 20 22 ff ff andi r2,r1,0xffff <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 802a93c: b9 20 18 00 mv r3,r9 <== NOT EXECUTED 802a940: b9 00 20 00 mv r4,r8 <== NOT EXECUTED 802a944: b8 e0 28 00 mv r5,r7 <== NOT EXECUTED 802a948: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 802a94c: fb ff ff b4 calli 802a81c <== NOT EXECUTED } 802a950: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a954: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802a958: c3 a0 00 00 ret <== NOT EXECUTED 08007ae8 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 8007ae8: 37 9c ff ec addi sp,sp,-20 8007aec: 5b 8b 00 0c sw (sp+12),r11 8007af0: 5b 8c 00 08 sw (sp+8),r12 8007af4: 5b 9d 00 04 sw (sp+4),ra 8007af8: b8 20 58 00 mv r11,r1 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 8007afc: 44 20 00 14 be r1,r0,8007b4c { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 8007b00: 90 00 60 00 rcsr r12,IE 8007b04: 34 01 ff fe mvi r1,-2 8007b08: a1 81 08 00 and r1,r12,r1 8007b0c: d0 01 00 00 wcsr IE,r1 _TOD_Get( &now ); 8007b10: 37 81 00 10 addi r1,sp,16 8007b14: f8 00 07 07 calli 8009730 <_TOD_Get> _ISR_Enable(level); 8007b18: 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; 8007b1c: 2b 82 00 10 lw r2,(sp+16) _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 8007b20: 2b 81 00 14 lw r1,(sp+20) useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 8007b24: 59 62 00 00 sw (r11+0),r2 time->tv_usec = useconds; 8007b28: 34 02 03 e8 mvi r2,1000 8007b2c: f8 00 4e a4 calli 801b5bc <__divsi3> 8007b30: 59 61 00 04 sw (r11+4),r1 8007b34: 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; } 8007b38: 2b 9d 00 04 lw ra,(sp+4) 8007b3c: 2b 8b 00 0c lw r11,(sp+12) 8007b40: 2b 8c 00 08 lw r12,(sp+8) 8007b44: 37 9c 00 14 addi sp,sp,20 8007b48: c3 a0 00 00 ret void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 8007b4c: f8 00 16 97 calli 800d5a8 <__errno> <== NOT EXECUTED 8007b50: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8007b54: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8007b58: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED return -1; 8007b5c: e3 ff ff f7 bi 8007b38 <== NOT EXECUTED 08007bc8 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 8007bc8: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8007bcc: 38 21 32 f0 ori r1,r1,0x32f0 <== NOT EXECUTED 8007bd0: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED return _POSIX_types_Uid; } 8007bd4: 2c 21 00 32 lhu r1,(r1+50) <== NOT EXECUTED 8007bd8: c3 a0 00 00 ret <== NOT EXECUTED 080127a4 : ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 80127a4: 28 23 00 3c lw r3,(r1+60) rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 80127a8: b8 20 10 00 mv r2,r1 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 80127ac: 34 01 ff ff mvi r1,-1 80127b0: 28 64 00 4c lw r4,(r3+76) 80127b4: 34 03 00 01 mvi r3,1 80127b8: 44 83 00 02 be r4,r3,80127c0 if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 80127bc: c3 a0 00 00 ret <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 80127c0: 34 01 00 00 mvi r1,0 80127c4: 58 41 00 14 sw (r2+20),r1 80127c8: 58 41 00 10 sw (r2+16),r1 return 0; } 80127cc: c3 a0 00 00 ret 080128d4 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 80128d4: 37 9c ff e8 addi sp,sp,-24 80128d8: 5b 8b 00 10 sw (sp+16),r11 80128dc: 5b 8c 00 0c sw (sp+12),r12 80128e0: 5b 8d 00 08 sw (sp+8),r13 80128e4: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 80128e8: 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 */ ) { 80128ec: b8 40 60 00 mv r12,r2 80128f0: 29 62 00 50 lw r2,(r11+80) 80128f4: 35 61 00 54 addi r1,r11,84 80128f8: 5c 41 00 2e bne r2,r1,80129b0 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 80128fc: 29 81 00 10 lw r1,(r12+16) 8012900: 28 21 00 1c lw r1,(r1+28) 8012904: 45 61 00 30 be r11,r1,80129c4 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 8012908: 29 6d 00 5c lw r13,(r11+92) 801290c: 5d a0 00 2e bne r13,r0,80129c4 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 8012910: 29 61 00 08 lw r1,(r11+8) 8012914: 44 2d 00 04 be r1,r13,8012924 8012918: b9 60 08 00 mv r1,r11 801291c: fb ff ca 82 calli 8005324 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 8012920: 59 6d 00 08 sw (r11+8),r13 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 8012924: 2d 63 00 34 lhu r3,(r11+52) IMFS_update_ctime( the_jnode ); 8012928: 34 02 00 00 mvi r2,0 801292c: 37 81 00 14 addi r1,sp,20 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 8012930: 34 63 ff ff addi r3,r3,-1 8012934: 0d 63 00 34 sh (r11+52),r3 IMFS_update_ctime( the_jnode ); 8012938: fb ff c0 ce calli 8002c70 801293c: 2b 81 00 14 lw r1,(sp+20) 8012940: 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) ) { 8012944: b9 60 08 00 mv r1,r11 8012948: fb ff ed 59 calli 800deac 801294c: 5c 20 00 12 bne r1,r0,8012994 8012950: 2d 62 00 34 lhu r2,(r11+52) 8012954: 5c 41 00 10 bne r2,r1,8012994 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 8012958: 78 01 08 02 mvhi r1,0x802 801295c: 38 21 60 f8 ori r1,r1,0x60f8 8012960: 28 21 00 00 lw r1,(r1+0) 8012964: 29 83 00 00 lw r3,(r12+0) 8012968: 28 24 00 04 lw r4,(r1+4) 801296c: 44 83 00 1b be r4,r3,80129d8 /* * Free memory associated with a memory file. */ free( the_jnode ); 8012970: b9 60 08 00 mv r1,r11 8012974: fb ff c0 91 calli 8002bb8 8012978: 34 01 00 00 mvi r1,0 } return 0; } 801297c: 2b 9d 00 04 lw ra,(sp+4) 8012980: 2b 8b 00 10 lw r11,(sp+16) 8012984: 2b 8c 00 0c lw r12,(sp+12) 8012988: 2b 8d 00 08 lw r13,(sp+8) 801298c: 37 9c 00 18 addi sp,sp,24 8012990: c3 a0 00 00 ret /* * Free memory associated with a memory file. */ free( the_jnode ); 8012994: 34 01 00 00 mvi r1,0 } return 0; } 8012998: 2b 9d 00 04 lw ra,(sp+4) 801299c: 2b 8b 00 10 lw r11,(sp+16) 80129a0: 2b 8c 00 0c lw r12,(sp+12) 80129a4: 2b 8d 00 08 lw r13,(sp+8) 80129a8: 37 9c 00 18 addi sp,sp,24 80129ac: c3 a0 00 00 ret /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 80129b0: f8 00 05 af calli 801406c <__errno> 80129b4: 34 02 00 5a mvi r2,90 80129b8: 58 22 00 00 sw (r1+0),r2 80129bc: 34 01 ff ff mvi r1,-1 80129c0: e3 ff ff f6 bi 8012998 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 80129c4: f8 00 05 aa calli 801406c <__errno> 80129c8: 34 02 00 10 mvi r2,16 80129cc: 58 22 00 00 sw (r1+0),r2 80129d0: 34 01 ff ff mvi r1,-1 80129d4: e3 ff ff f1 bi 8012998 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 80129d8: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED 80129dc: e3 ff ff e5 bi 8012970 <== NOT EXECUTED 0802a470 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 802a470: 37 9c ff f4 addi sp,sp,-12 802a474: 5b 8b 00 0c sw (sp+12),r11 802a478: 5b 8c 00 08 sw (sp+8),r12 802a47c: 5b 9d 00 04 sw (sp+4),ra FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 802a480: 78 03 08 07 mvhi r3,0x807 802a484: 38 63 6c 2c ori r3,r3,0x6c2c 802a488: 40 6b 00 00 lbu r11,(r3+0) 802a48c: 45 60 00 06 be r11,r0,802a4a4 fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 802a490: 2b 9d 00 04 lw ra,(sp+4) 802a494: 2b 8b 00 0c lw r11,(sp+12) 802a498: 2b 8c 00 08 lw r12,(sp+8) 802a49c: 37 9c 00 0c addi sp,sp,12 802a4a0: c3 a0 00 00 ret FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 802a4a4: 34 04 00 01 mvi r4,1 mkdir("/etc", 0777); 802a4a8: 78 01 08 06 mvhi r1,0x806 802a4ac: 34 02 01 ff mvi r2,511 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 802a4b0: 30 64 00 00 sb (r3+0),r4 mkdir("/etc", 0777); 802a4b4: 38 21 61 e4 ori r1,r1,0x61e4 802a4b8: fb ff 77 f2 calli 8008480 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 802a4bc: 78 01 08 06 mvhi r1,0x806 802a4c0: 78 02 08 06 mvhi r2,0x806 802a4c4: 38 21 62 64 ori r1,r1,0x6264 802a4c8: 38 42 ec 30 ori r2,r2,0xec30 802a4cc: f8 00 7d 1a calli 8049934 802a4d0: b8 20 60 00 mv r12,r1 802a4d4: 44 2b 00 1f be r1,r11,802a550 } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 802a4d8: f8 00 7a 72 calli 8048ea0 } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 802a4dc: 78 01 08 06 mvhi r1,0x806 802a4e0: 78 02 08 06 mvhi r2,0x806 802a4e4: 38 21 63 14 ori r1,r1,0x6314 802a4e8: 38 42 ec 30 ori r2,r2,0xec30 802a4ec: f8 00 7d 12 calli 8049934 802a4f0: b8 20 58 00 mv r11,r1 802a4f4: 44 20 00 07 be r1,r0,802a510 } else if ((fp = fopen("/etc/group", "w")) != NULL) { fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 802a4f8: f8 00 7a 6a calli 8048ea0 <== NOT EXECUTED } } 802a4fc: 2b 9d 00 04 lw ra,(sp+4) 802a500: 2b 8b 00 0c lw r11,(sp+12) 802a504: 2b 8c 00 08 lw r12,(sp+8) 802a508: 37 9c 00 0c addi sp,sp,12 802a50c: c3 a0 00 00 ret * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 802a510: 78 01 08 06 mvhi r1,0x806 802a514: 78 02 08 06 mvhi r2,0x806 802a518: 38 21 63 14 ori r1,r1,0x6314 802a51c: 38 42 75 b4 ori r2,r2,0x75b4 802a520: f8 00 7d 05 calli 8049934 802a524: b8 20 60 00 mv r12,r1 802a528: 44 2b ff da be r1,r11,802a490 fprintf( fp, "root:x:0:root\n" 802a52c: 78 01 08 06 mvhi r1,0x806 802a530: 34 02 00 01 mvi r2,1 802a534: 34 03 00 2a mvi r3,42 802a538: b9 80 20 00 mv r4,r12 802a53c: 38 21 bc 08 ori r1,r1,0xbc08 802a540: f8 00 82 38 calli 804ae20 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 802a544: b9 80 08 00 mv r1,r12 802a548: f8 00 7a 56 calli 8048ea0 802a54c: e3 ff ff ec bi 802a4fc * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 802a550: 78 01 08 06 mvhi r1,0x806 802a554: 78 02 08 06 mvhi r2,0x806 802a558: 38 21 62 64 ori r1,r1,0x6264 802a55c: 38 42 75 b4 ori r2,r2,0x75b4 802a560: f8 00 7c f5 calli 8049934 802a564: b8 20 58 00 mv r11,r1 802a568: 44 2c ff dd be r1,r12,802a4dc fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 802a56c: 78 01 08 06 mvhi r1,0x806 802a570: 38 21 bb a0 ori r1,r1,0xbba0 802a574: 34 02 00 01 mvi r2,1 802a578: 34 03 00 66 mvi r3,102 802a57c: b9 60 20 00 mv r4,r11 802a580: f8 00 82 28 calli 804ae20 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 802a584: b9 60 08 00 mv r1,r11 802a588: e3 ff ff d4 bi 802a4d8 0800592c : int ioctl( int fd, ioctl_command_t command, ... ) { 800592c: 37 9c ff d4 addi sp,sp,-44 8005930: 5b 8b 00 10 sw (sp+16),r11 8005934: 5b 8c 00 0c sw (sp+12),r12 8005938: 5b 8d 00 08 sw (sp+8),r13 800593c: 5b 9d 00 04 sw (sp+4),ra va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 8005940: 78 09 08 02 mvhi r9,0x802 8005944: 39 29 60 10 ori r9,r9,0x6010 8005948: 29 29 00 00 lw r9,(r9+0) int ioctl( int fd, ioctl_command_t command, ... ) { 800594c: 5b 83 00 18 sw (sp+24),r3 8005950: 5b 84 00 1c sw (sp+28),r4 8005954: 5b 85 00 20 sw (sp+32),r5 8005958: 5b 86 00 24 sw (sp+36),r6 800595c: 5b 87 00 28 sw (sp+40),r7 8005960: 5b 88 00 2c sw (sp+44),r8 8005964: 5b 82 00 14 sw (sp+20),r2 8005968: b8 40 60 00 mv r12,r2 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 800596c: 55 21 00 06 bgu r9,r1,8005984 /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 8005970: f8 00 3b 34 calli 8014640 <__errno> 8005974: 34 02 00 09 mvi r2,9 8005978: 58 22 00 00 sw (r1+0),r2 800597c: 34 01 ff ff mvi r1,-1 8005980: e0 00 00 15 bi 80059d4 rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 8005984: 34 02 00 03 mvi r2,3 8005988: fb ff ec bf calli 8000c84 <__ashlsi3> 800598c: 34 02 00 03 mvi r2,3 8005990: 78 0b 08 02 mvhi r11,0x802 8005994: b8 20 68 00 mv r13,r1 8005998: 39 6b 67 f0 ori r11,r11,0x67f0 800599c: fb ff ec ba calli 8000c84 <__ashlsi3> 80059a0: 29 62 00 00 lw r2,(r11+0) 80059a4: b5 a1 08 00 add r1,r13,r1 80059a8: b4 41 08 00 add r1,r2,r1 rtems_libio_check_is_open(iop); 80059ac: 28 22 00 18 lw r2,(r1+24) 80059b0: 20 42 01 00 andi r2,r2,0x100 80059b4: 44 40 ff ef be r2,r0,8005970 /* * Now process the ioctl(). */ if ( !iop->handlers ) 80059b8: 28 22 00 40 lw r2,(r1+64) iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 80059bc: 2b 83 00 18 lw r3,(sp+24) /* * Now process the ioctl(). */ if ( !iop->handlers ) 80059c0: 44 40 ff ec be r2,r0,8005970 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 80059c4: 28 44 00 10 lw r4,(r2+16) 80059c8: 44 80 00 09 be r4,r0,80059ec rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 80059cc: b9 80 10 00 mv r2,r12 80059d0: d8 80 00 00 call r4 return rc; } 80059d4: 2b 9d 00 04 lw ra,(sp+4) 80059d8: 2b 8b 00 10 lw r11,(sp+16) 80059dc: 2b 8c 00 0c lw r12,(sp+12) 80059e0: 2b 8d 00 08 lw r13,(sp+8) 80059e4: 37 9c 00 2c addi sp,sp,44 80059e8: c3 a0 00 00 ret if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 80059ec: f8 00 3b 15 calli 8014640 <__errno> <== NOT EXECUTED 80059f0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80059f4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80059f8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80059fc: e3 ff ff f6 bi 80059d4 <== NOT EXECUTED 08004864 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 8004864: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED 8004868: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 800486c: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8004870: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8004874: b8 40 58 00 mv r11,r2 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 8004878: 28 42 00 30 lw r2,(r2+48) <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 800487c: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 8004880: 20 41 00 20 andi r1,r2,0x20 <== NOT EXECUTED 8004884: 44 20 00 02 be r1,r0,800488c <== NOT EXECUTED c &= 0x7f; 8004888: 21 8c 00 7f andi r12,r12,0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 800488c: 20 41 02 00 andi r1,r2,0x200 <== NOT EXECUTED 8004890: 44 20 00 0b be r1,r0,80048bc <== NOT EXECUTED c = tolower (c); 8004894: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8004898: 38 21 63 0c ori r1,r1,0x630c <== NOT EXECUTED 800489c: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 80048a0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80048a4: b4 6c 60 00 add r12,r3,r12 <== NOT EXECUTED 80048a8: 41 84 00 01 lbu r4,(r12+1) <== NOT EXECUTED 80048ac: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 80048b0: 20 84 00 03 andi r4,r4,0x3 <== NOT EXECUTED 80048b4: 44 83 00 44 be r4,r3,80049c4 <== NOT EXECUTED 80048b8: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED if (c == '\r') { 80048bc: 34 01 00 0d mvi r1,13 <== NOT EXECUTED 80048c0: 45 81 00 18 be r12,r1,8004920 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 80048c4: 34 03 00 0a mvi r3,10 <== NOT EXECUTED 80048c8: 45 83 00 3b be r12,r3,80049b4 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 80048cc: 5d 80 00 20 bne r12,r0,800494c <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 80048d0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80048d4: 38 21 62 34 ori r1,r1,0x6234 <== NOT EXECUTED 80048d8: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 80048dc: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED 80048e0: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 80048e4: 4c 41 00 11 bge r2,r1,8004928 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 80048e8: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 80048ec: 20 21 00 08 andi r1,r1,0x8 <== NOT EXECUTED 80048f0: 5c 20 00 37 bne r1,r0,80049cc <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 80048f4: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED 80048f8: 34 43 00 01 addi r3,r2,1 <== NOT EXECUTED 80048fc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8004900: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED 8004904: 30 4c 00 00 sb (r2+0),r12 <== NOT EXECUTED 8004908: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED } return 0; } 800490c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004910: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8004914: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8004918: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 800491c: c3 a0 00 00 ret <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 8004920: 20 41 00 80 andi r1,r2,0x80 <== NOT EXECUTED 8004924: 44 20 00 07 be r1,r0,8004940 <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 8004928: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } return 0; } 800492c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004930: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8004934: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8004938: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 800493c: c3 a0 00 00 ret <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 8004940: 20 42 01 00 andi r2,r2,0x100 <== NOT EXECUTED 8004944: 44 41 00 02 be r2,r1,800494c <== NOT EXECUTED 8004948: 34 0c 00 0a mvi r12,10 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 800494c: 29 62 00 3c lw r2,(r11+60) <== NOT EXECUTED 8004950: 20 41 00 02 andi r1,r2,0x2 <== NOT EXECUTED 8004954: 44 20 ff df be r1,r0,80048d0 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 8004958: 41 61 00 43 lbu r1,(r11+67) <== NOT EXECUTED 800495c: 44 2c 00 38 be r1,r12,8004a3c <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 8004960: 41 61 00 44 lbu r1,(r11+68) <== NOT EXECUTED 8004964: 44 2c 00 23 be r1,r12,80049f0 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 8004968: 41 63 00 45 lbu r3,(r11+69) <== NOT EXECUTED 800496c: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8004970: 44 6c ff e7 be r3,r12,800490c <== NOT EXECUTED return 1; } else if (c == '\n') { 8004974: 34 01 00 0a mvi r1,10 <== NOT EXECUTED 8004978: 45 81 00 23 be r12,r1,8004a04 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) 800497c: 41 61 00 4c lbu r1,(r11+76) <== NOT EXECUTED 8004980: 44 2c 00 03 be r1,r12,800498c <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 8004984: 41 61 00 51 lbu r1,(r11+81) <== NOT EXECUTED 8004988: 5c 2c ff d2 bne r1,r12,80048d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 800498c: 20 42 00 08 andi r2,r2,0x8 <== NOT EXECUTED 8004990: 5c 40 00 14 bne r2,r0,80049e0 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 8004994: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED 8004998: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED 800499c: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 80049a0: b4 61 10 00 add r2,r3,r1 <== NOT EXECUTED 80049a4: b4 83 18 00 add r3,r4,r3 <== NOT EXECUTED 80049a8: 30 6c 00 00 sb (r3+0),r12 <== NOT EXECUTED 80049ac: 59 62 00 20 sw (r11+32),r2 <== NOT EXECUTED return 1; 80049b0: e3 ff ff d7 bi 800490c <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 80049b4: 20 42 00 40 andi r2,r2,0x40 <== NOT EXECUTED 80049b8: 44 40 ff e5 be r2,r0,800494c <== NOT EXECUTED 80049bc: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 80049c0: e3 ff ff e3 bi 800494c <== NOT EXECUTED iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 80049c4: 34 21 00 20 addi r1,r1,32 <== NOT EXECUTED 80049c8: e3 ff ff bc bi 80048b8 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 80049cc: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80049d0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80049d4: fb ff fe ee calli 800458c <== NOT EXECUTED 80049d8: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED 80049dc: e3 ff ff c6 bi 80048f4 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 80049e0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80049e4: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80049e8: fb ff fe e9 calli 800458c <== NOT EXECUTED 80049ec: e3 ff ff ea bi 8004994 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 80049f0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80049f4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80049f8: fb ff ff 12 calli 8004640 <== NOT EXECUTED 80049fc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return 0; 8004a00: e3 ff ff c3 bi 800490c <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 8004a04: 20 42 00 48 andi r2,r2,0x48 <== NOT EXECUTED 8004a08: 44 40 00 04 be r2,r0,8004a18 <== NOT EXECUTED echo (c, tty); 8004a0c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004a10: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004a14: fb ff fe de calli 800458c <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 8004a18: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED 8004a1c: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED 8004a20: 34 03 00 0a mvi r3,10 <== NOT EXECUTED 8004a24: 34 41 00 01 addi r1,r2,1 <== NOT EXECUTED 8004a28: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED 8004a2c: 30 43 00 00 sb (r2+0),r3 <== NOT EXECUTED 8004a30: 59 61 00 20 sw (r11+32),r1 <== NOT EXECUTED 8004a34: 34 01 00 01 mvi r1,1 <== NOT EXECUTED return 1; 8004a38: e3 ff ff b5 bi 800490c <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 8004a3c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8004a40: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8004a44: fb ff fe ff calli 8004640 <== NOT EXECUTED 8004a48: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return 0; 8004a4c: e3 ff ff b0 bi 800490c <== NOT EXECUTED 0800cd94 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 800cd94: 37 9c ff d8 addi sp,sp,-40 800cd98: 5b 8b 00 1c sw (sp+28),r11 800cd9c: 5b 8c 00 18 sw (sp+24),r12 800cda0: 5b 8d 00 14 sw (sp+20),r13 800cda4: 5b 8e 00 10 sw (sp+16),r14 800cda8: 5b 8f 00 0c sw (sp+12),r15 800cdac: 5b 90 00 08 sw (sp+8),r16 800cdb0: 5b 9d 00 04 sw (sp+4),ra 800cdb4: b8 20 58 00 mv r11,r1 800cdb8: b8 40 60 00 mv r12,r2 800cdbc: b8 60 78 00 mv r15,r3 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 800cdc0: fb ff fa 9a calli 800b828 800cdc4: 5c 2b 00 a9 bne r1,r11,800d068 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 800cdc8: 45 80 00 04 be r12,r0,800cdd8 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 800cdcc: 35 8b ff ff addi r11,r12,-1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 800cdd0: 34 01 00 1f mvi r1,31 800cdd4: 50 2b 00 06 bgeu r1,r11,800cdec rtems_set_errno_and_return_minus_one( EINVAL ); 800cdd8: f8 00 01 f4 calli 800d5a8 <__errno> 800cddc: 34 02 00 16 mvi r2,22 800cde0: 58 22 00 00 sw (r1+0),r2 800cde4: 34 01 ff ff mvi r1,-1 800cde8: e0 00 00 50 bi 800cf28 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 800cdec: b5 8c 80 00 add r16,r12,r12 800cdf0: 34 02 00 02 mvi r2,2 800cdf4: 78 0d 08 01 mvhi r13,0x801 800cdf8: b6 0c 08 00 add r1,r16,r12 800cdfc: fb ff cc fd calli 80001f0 <__ashlsi3> 800ce00: 39 ad ed b0 ori r13,r13,0xedb0 800ce04: b5 a1 08 00 add r1,r13,r1 800ce08: 28 22 00 08 lw r2,(r1+8) 800ce0c: 34 0e 00 01 mvi r14,1 800ce10: 34 01 00 00 mvi r1,0 800ce14: 44 4e 00 45 be r2,r14,800cf28 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 800ce18: 65 82 00 04 cmpei r2,r12,4 800ce1c: 65 81 00 08 cmpei r1,r12,8 800ce20: b8 41 08 00 or r1,r2,r1 800ce24: 5c 20 00 4a bne r1,r0,800cf4c 800ce28: 34 01 00 0b mvi r1,11 800ce2c: 45 81 00 48 be r12,r1,800cf4c static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 800ce30: b9 60 10 00 mv r2,r11 800ce34: b9 c0 08 00 mv r1,r14 800ce38: fb ff cc ee calli 80001f0 <__ashlsi3> /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 800ce3c: 5b 8e 00 24 sw (sp+36),r14 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 800ce40: 5b 8c 00 20 sw (sp+32),r12 800ce44: b8 20 58 00 mv r11,r1 siginfo->si_code = SI_USER; if ( !value ) { 800ce48: 45 e0 00 02 be r15,r0,800ce50 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 800ce4c: 29 ef 00 00 lw r15,(r15+0) 800ce50: 78 02 08 01 mvhi r2,0x801 800ce54: 5b 8f 00 28 sw (sp+40),r15 800ce58: 38 42 e8 a4 ori r2,r2,0xe8a4 800ce5c: 28 41 00 00 lw r1,(r2+0) 800ce60: 34 21 00 01 addi r1,r1,1 800ce64: 58 41 00 00 sw (r2+0),r1 /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 800ce68: 78 02 08 01 mvhi r2,0x801 800ce6c: 38 42 e9 60 ori r2,r2,0xe960 800ce70: 28 41 00 00 lw r1,(r2+0) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 800ce74: 28 22 01 2c lw r2,(r1+300) 800ce78: 28 42 00 cc lw r2,(r2+204) 800ce7c: a4 40 10 00 not r2,r2 800ce80: a1 62 10 00 and r2,r11,r2 800ce84: 5c 40 00 17 bne r2,r0,800cee0 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 800ce88: 78 05 08 01 mvhi r5,0x801 800ce8c: 38 a5 ef 3c ori r5,r5,0xef3c 800ce90: 28 a3 00 00 lw r3,(r5+0) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 800ce94: 34 a5 00 04 addi r5,r5,4 800ce98: 44 65 00 42 be r3,r5,800cfa0 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 800ce9c: 28 62 00 30 lw r2,(r3+48) for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 800cea0: b8 60 08 00 mv r1,r3 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 800cea4: 28 64 01 2c lw r4,(r3+300) #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 800cea8: a1 62 10 00 and r2,r11,r2 800ceac: 44 40 00 09 be r2,r0,800ced0 800ceb0: e0 00 00 0c bi 800cee0 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 800ceb4: 28 63 00 00 lw r3,(r3+0) /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 800ceb8: 44 65 00 3a be r3,r5,800cfa0 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 800cebc: 28 62 00 30 lw r2,(r3+48) <== NOT EXECUTED for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 800cec0: 28 64 01 2c lw r4,(r3+300) <== NOT EXECUTED for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 800cec4: b8 60 08 00 mv r1,r3 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 800cec8: a1 62 10 00 and r2,r11,r2 <== NOT EXECUTED 800cecc: 5c 40 00 05 bne r2,r0,800cee0 <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 800ced0: 28 84 00 cc lw r4,(r4+204) 800ced4: a4 80 20 00 not r4,r4 800ced8: a1 64 20 00 and r4,r11,r4 800cedc: 44 82 ff f6 be r4,r2,800ceb4 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 800cee0: 34 02 00 01 mvi r2,1 800cee4: 30 22 00 74 sb (r1+116),r2 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 800cee8: 37 83 00 20 addi r3,sp,32 800ceec: b9 80 10 00 mv r2,r12 800cef0: f8 00 00 b1 calli 800d1b4 <_POSIX_signals_Unblock_thread> 800cef4: 5c 20 00 0b bne r1,r0,800cf20 /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 800cef8: b9 60 08 00 mv r1,r11 800cefc: f8 00 00 9d calli 800d170 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 800cf00: 34 02 00 02 mvi r2,2 800cf04: b6 0c 08 00 add r1,r16,r12 800cf08: fb ff cc ba calli 80001f0 <__ashlsi3> 800cf0c: b5 a1 68 00 add r13,r13,r1 800cf10: 29 a2 00 00 lw r2,(r13+0) 800cf14: b8 20 58 00 mv r11,r1 800cf18: 34 01 00 02 mvi r1,2 800cf1c: 44 41 00 10 be r2,r1,800cf5c _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 800cf20: fb ff dd f1 calli 80046e4 <_Thread_Enable_dispatch> 800cf24: 34 01 00 00 mvi r1,0 return 0; } 800cf28: 2b 9d 00 04 lw ra,(sp+4) 800cf2c: 2b 8b 00 1c lw r11,(sp+28) 800cf30: 2b 8c 00 18 lw r12,(sp+24) 800cf34: 2b 8d 00 14 lw r13,(sp+20) 800cf38: 2b 8e 00 10 lw r14,(sp+16) 800cf3c: 2b 8f 00 0c lw r15,(sp+12) 800cf40: 2b 90 00 08 lw r16,(sp+8) 800cf44: 37 9c 00 28 addi sp,sp,40 800cf48: c3 a0 00 00 ret * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); 800cf4c: f8 00 01 4e calli 800d484 800cf50: b9 80 10 00 mv r2,r12 800cf54: f8 00 00 fd calli 800d348 800cf58: e3 ff ff f4 bi 800cf28 */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 800cf5c: 78 01 08 01 mvhi r1,0x801 800cf60: 38 21 ef 30 ori r1,r1,0xef30 800cf64: fb ff f1 50 calli 80094a4 <_Chain_Get> 800cf68: b8 20 18 00 mv r3,r1 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 800cf6c: 44 20 00 44 be r1,r0,800d07c _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 800cf70: 2b 81 00 20 lw r1,(sp+32) 800cf74: 58 61 00 08 sw (r3+8),r1 800cf78: 2b 82 00 24 lw r2,(sp+36) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 800cf7c: 78 01 08 01 mvhi r1,0x801 800cf80: 38 21 ef 80 ori r1,r1,0xef80 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 800cf84: 58 62 00 0c sw (r3+12),r2 800cf88: 2b 84 00 28 lw r4,(sp+40) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 800cf8c: b5 61 08 00 add r1,r11,r1 800cf90: b8 60 10 00 mv r2,r3 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 800cf94: 58 64 00 10 sw (r3+16),r4 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 800cf98: fb ff d7 84 calli 8002da8 <_Chain_Append> 800cf9c: e3 ff ff e1 bi 800cf20 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 800cfa0: 78 01 08 01 mvhi r1,0x801 800cfa4: 38 21 e0 c0 ori r1,r1,0xe0c0 800cfa8: 40 26 00 00 lbu r6,(r1+0) 800cfac: 78 07 08 01 mvhi r7,0x801 800cfb0: 38 e7 e8 44 ori r7,r7,0xe844 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 800cfb4: 78 0a 10 00 mvhi r10,0x1000 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 800cfb8: 34 c6 00 01 addi r6,r6,1 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 800cfbc: 39 4a 00 00 ori r10,r10,0x0 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 800cfc0: 34 ee 00 0c addi r14,r7,12 800cfc4: 34 01 00 00 mvi r1,0 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 800cfc8: 28 e2 00 00 lw r2,(r7+0) 800cfcc: 44 40 00 1d be r2,r0,800d040 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 800cfd0: 28 42 00 04 lw r2,(r2+4) */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 800cfd4: 2c 48 00 10 lhu r8,(r2+16) object_table = the_info->local_table; 800cfd8: 28 44 00 1c lw r4,(r2+28) for ( index = 1 ; index <= maximum ; index++ ) { 800cfdc: 45 00 00 19 be r8,r0,800d040 800cfe0: 34 03 00 01 mvi r3,1 the_thread = (Thread_Control *) object_table[ index ]; 800cfe4: 28 82 00 04 lw r2,(r4+4) #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 800cfe8: 34 63 00 01 addi r3,r3,1 800cfec: 34 84 00 04 addi r4,r4,4 the_thread = (Thread_Control *) object_table[ index ]; if ( !the_thread ) 800cff0: 44 40 00 13 be r2,r0,800d03c /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 800cff4: 28 45 00 14 lw r5,(r2+20) 800cff8: 54 a6 00 11 bgu r5,r6,800d03c DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 800cffc: 28 49 01 2c lw r9,(r2+300) 800d000: 29 29 00 cc lw r9,(r9+204) 800d004: a5 20 48 00 not r9,r9 800d008: a1 69 48 00 and r9,r11,r9 800d00c: 45 20 00 0c be r9,r0,800d03c * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 800d010: 54 c5 00 09 bgu r6,r5,800d034 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 800d014: 28 29 00 10 lw r9,(r1+16) 800d018: 45 20 00 09 be r9,r0,800d03c /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 800d01c: 28 4f 00 10 lw r15,(r2+16) continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 800d020: a1 2a 48 00 and r9,r9,r10 */ if ( !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 800d024: 45 e0 00 04 be r15,r0,800d034 DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 800d028: a1 ea 78 00 and r15,r15,r10 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 800d02c: 5d 20 00 04 bne r9,r0,800d03c DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 800d030: 45 e9 00 03 be r15,r9,800d03c 800d034: b8 a0 30 00 mv r6,r5 800d038: b8 40 08 00 mv r1,r2 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 800d03c: 51 03 ff ea bgeu r8,r3,800cfe4 800d040: 34 e7 00 04 addi r7,r7,4 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 800d044: 5c ee ff e1 bne r7,r14,800cfc8 } } } } if ( interested ) { 800d048: 44 20 ff ac be r1,r0,800cef8 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 800d04c: 34 02 00 01 mvi r2,1 800d050: 30 22 00 74 sb (r1+116),r2 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 800d054: 37 83 00 20 addi r3,sp,32 800d058: b9 80 10 00 mv r2,r12 800d05c: f8 00 00 56 calli 800d1b4 <_POSIX_signals_Unblock_thread> 800d060: 44 20 ff a6 be r1,r0,800cef8 800d064: e3 ff ff af bi 800cf20 <== NOT EXECUTED /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 800d068: f8 00 01 50 calli 800d5a8 <__errno> 800d06c: 34 02 00 03 mvi r2,3 800d070: 58 22 00 00 sw (r1+0),r2 800d074: 34 01 ff ff mvi r1,-1 800d078: e3 ff ff ac bi 800cf28 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); 800d07c: fb ff dd 9a calli 80046e4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 800d080: f8 00 01 4a calli 800d5a8 <__errno> 800d084: 34 02 00 0b mvi r2,11 800d088: 58 22 00 00 sw (r1+0),r2 800d08c: 34 01 ff ff mvi r1,-1 800d090: e3 ff ff a6 bi 800cf28 0802aae8 : int link( const char *existing, const char *new ) { 802aae8: 37 9c ff c0 addi sp,sp,-64 802aaec: 5b 8b 00 14 sw (sp+20),r11 802aaf0: 5b 8c 00 10 sw (sp+16),r12 802aaf4: 5b 8d 00 0c sw (sp+12),r13 802aaf8: 5b 8e 00 08 sw (sp+8),r14 802aafc: 5b 9d 00 04 sw (sp+4),ra 802ab00: b8 20 60 00 mv r12,r1 802ab04: b8 40 70 00 mv r14,r2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 802ab08: 37 8b 00 2c addi r11,sp,44 802ab0c: f8 00 96 83 calli 8050518 802ab10: b8 20 10 00 mv r2,r1 802ab14: 34 03 00 00 mvi r3,0 802ab18: b9 80 08 00 mv r1,r12 802ab1c: b9 60 20 00 mv r4,r11 802ab20: 34 05 00 01 mvi r5,1 802ab24: fb ff 73 97 calli 8007980 0, &existing_loc, true ); if ( result != 0 ) 802ab28: 34 0c ff ff mvi r12,-1 802ab2c: 5c 20 00 35 bne r1,r0,802ac00 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 802ab30: 41 c3 00 00 lbu r3,(r14+0) 802ab34: 64 64 00 5c cmpei r4,r3,92 802ab38: 64 62 00 2f cmpei r2,r3,47 802ab3c: b8 82 20 00 or r4,r4,r2 802ab40: 44 81 00 38 be r4,r1,802ac20 802ab44: 78 03 08 07 mvhi r3,0x807 802ab48: 38 63 32 f0 ori r3,r3,0x32f0 802ab4c: 28 63 00 00 lw r3,(r3+0) 802ab50: 34 01 00 01 mvi r1,1 802ab54: 28 62 00 18 lw r2,(r3+24) 802ab58: 5b 82 00 18 sw (sp+24),r2 802ab5c: 28 62 00 1c lw r2,(r3+28) 802ab60: 5b 82 00 1c sw (sp+28),r2 802ab64: 28 62 00 20 lw r2,(r3+32) 802ab68: 5b 82 00 20 sw (sp+32),r2 802ab6c: 28 62 00 24 lw r2,(r3+36) 802ab70: 5b 82 00 24 sw (sp+36),r2 802ab74: 28 63 00 28 lw r3,(r3+40) 802ab78: 5b 83 00 28 sw (sp+40),r3 if ( !parent_loc.ops->evalformake_h ) { 802ab7c: 2b 82 00 24 lw r2,(sp+36) 802ab80: 28 44 00 04 lw r4,(r2+4) 802ab84: 44 80 00 59 be r4,r0,802ace8 rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 802ab88: 37 8d 00 18 addi r13,sp,24 802ab8c: b5 c1 08 00 add r1,r14,r1 802ab90: b9 a0 10 00 mv r2,r13 802ab94: 37 83 00 40 addi r3,sp,64 802ab98: d8 80 00 00 call r4 802ab9c: b8 20 60 00 mv r12,r1 if ( result != 0 ) { 802aba0: 5c 20 00 48 bne r1,r0,802acc0 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 802aba4: 2b 81 00 3c lw r1,(sp+60) 802aba8: 2b 82 00 28 lw r2,(sp+40) 802abac: 5c 41 00 2d bne r2,r1,802ac60 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 802abb0: 2b 82 00 24 lw r2,(sp+36) 802abb4: 28 44 00 08 lw r4,(r2+8) 802abb8: 44 80 00 57 be r4,r0,802ad14 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 802abbc: 2b 83 00 40 lw r3,(sp+64) 802abc0: b9 60 08 00 mv r1,r11 802abc4: b9 a0 10 00 mv r2,r13 802abc8: d8 80 00 00 call r4 802abcc: b8 20 60 00 mv r12,r1 rtems_filesystem_freenode( &existing_loc ); 802abd0: 2b 81 00 38 lw r1,(sp+56) 802abd4: 44 20 00 05 be r1,r0,802abe8 802abd8: 28 22 00 1c lw r2,(r1+28) 802abdc: 44 40 00 03 be r2,r0,802abe8 802abe0: b9 60 08 00 mv r1,r11 802abe4: d8 40 00 00 call r2 rtems_filesystem_freenode( &parent_loc ); 802abe8: 2b 81 00 24 lw r1,(sp+36) 802abec: 44 20 00 05 be r1,r0,802ac00 802abf0: 28 22 00 1c lw r2,(r1+28) 802abf4: 44 40 00 03 be r2,r0,802ac00 802abf8: b9 a0 08 00 mv r1,r13 802abfc: d8 40 00 00 call r2 return result; } 802ac00: b9 80 08 00 mv r1,r12 802ac04: 2b 9d 00 04 lw ra,(sp+4) 802ac08: 2b 8b 00 14 lw r11,(sp+20) 802ac0c: 2b 8c 00 10 lw r12,(sp+16) 802ac10: 2b 8d 00 0c lw r13,(sp+12) 802ac14: 2b 8e 00 08 lw r14,(sp+8) 802ac18: 37 9c 00 40 addi sp,sp,64 802ac1c: c3 a0 00 00 ret /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 802ac20: 44 64 ff c9 be r3,r4,802ab44 802ac24: 78 01 08 07 mvhi r1,0x807 802ac28: 38 21 32 f0 ori r1,r1,0x32f0 802ac2c: 28 22 00 00 lw r2,(r1+0) 802ac30: b8 80 08 00 mv r1,r4 802ac34: 28 43 00 04 lw r3,(r2+4) 802ac38: 5b 83 00 18 sw (sp+24),r3 802ac3c: 28 43 00 08 lw r3,(r2+8) 802ac40: 5b 83 00 1c sw (sp+28),r3 802ac44: 28 43 00 0c lw r3,(r2+12) 802ac48: 5b 83 00 20 sw (sp+32),r3 802ac4c: 28 43 00 10 lw r3,(r2+16) 802ac50: 5b 83 00 24 sw (sp+36),r3 802ac54: 28 42 00 14 lw r2,(r2+20) 802ac58: 5b 82 00 28 sw (sp+40),r2 802ac5c: e3 ff ff c8 bi 802ab7c * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); 802ac60: 2b 81 00 38 lw r1,(sp+56) 802ac64: 44 20 00 05 be r1,r0,802ac78 802ac68: 28 22 00 1c lw r2,(r1+28) 802ac6c: 44 40 00 03 be r2,r0,802ac78 802ac70: b9 60 08 00 mv r1,r11 802ac74: d8 40 00 00 call r2 rtems_filesystem_freenode( &parent_loc ); 802ac78: 2b 81 00 24 lw r1,(sp+36) 802ac7c: 44 20 00 05 be r1,r0,802ac90 802ac80: 28 22 00 1c lw r2,(r1+28) 802ac84: 44 40 00 03 be r2,r0,802ac90 802ac88: b9 a0 08 00 mv r1,r13 802ac8c: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( EXDEV ); 802ac90: f8 00 78 22 calli 8048d18 <__errno> 802ac94: 34 02 00 12 mvi r2,18 802ac98: 34 0c ff ff mvi r12,-1 802ac9c: 58 22 00 00 sw (r1+0),r2 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 802aca0: b9 80 08 00 mv r1,r12 802aca4: 2b 9d 00 04 lw ra,(sp+4) 802aca8: 2b 8b 00 14 lw r11,(sp+20) 802acac: 2b 8c 00 10 lw r12,(sp+16) 802acb0: 2b 8d 00 0c lw r13,(sp+12) 802acb4: 2b 8e 00 08 lw r14,(sp+8) 802acb8: 37 9c 00 40 addi sp,sp,64 802acbc: c3 a0 00 00 ret rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 802acc0: 2b 81 00 38 lw r1,(sp+56) 802acc4: 44 20 00 05 be r1,r0,802acd8 802acc8: 28 22 00 1c lw r2,(r1+28) 802accc: 44 40 00 03 be r2,r0,802acd8 802acd0: b9 60 08 00 mv r1,r11 802acd4: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( result ); 802acd8: f8 00 78 10 calli 8048d18 <__errno> 802acdc: 58 2c 00 00 sw (r1+0),r12 802ace0: 34 0c ff ff mvi r12,-1 802ace4: e3 ff ff c7 bi 802ac00 */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 802ace8: 2b 81 00 38 lw r1,(sp+56) <== NOT EXECUTED 802acec: 44 24 00 05 be r1,r4,802ad00 <== NOT EXECUTED 802acf0: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 802acf4: 44 40 00 03 be r2,r0,802ad00 <== NOT EXECUTED 802acf8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802acfc: d8 40 00 00 call r2 <== NOT EXECUTED } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 802ad00: f8 00 78 06 calli 8048d18 <__errno> <== NOT EXECUTED 802ad04: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 802ad08: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 802ad0c: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 802ad10: e3 ff ff bc bi 802ac00 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 802ad14: 2b 81 00 38 lw r1,(sp+56) <== NOT EXECUTED 802ad18: 44 24 00 06 be r1,r4,802ad30 <== NOT EXECUTED 802ad1c: 28 23 00 1c lw r3,(r1+28) <== NOT EXECUTED 802ad20: 44 64 00 04 be r3,r4,802ad30 <== NOT EXECUTED 802ad24: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802ad28: d8 60 00 00 call r3 <== NOT EXECUTED 802ad2c: 2b 82 00 24 lw r2,(sp+36) <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 802ad30: 44 40 ff f4 be r2,r0,802ad00 <== NOT EXECUTED 802ad34: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 802ad38: 44 40 ff f2 be r2,r0,802ad00 <== NOT EXECUTED 802ad3c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 802ad40: d8 40 00 00 call r2 <== NOT EXECUTED 802ad44: e3 ff ff ef bi 802ad00 <== NOT EXECUTED 0801ba64 : off_t lseek( int fd, off_t offset, int whence ) { 801ba64: 37 9c ff e4 addi sp,sp,-28 801ba68: 5b 8b 00 1c sw (sp+28),r11 801ba6c: 5b 8c 00 18 sw (sp+24),r12 801ba70: 5b 8d 00 14 sw (sp+20),r13 801ba74: 5b 8e 00 10 sw (sp+16),r14 801ba78: 5b 8f 00 0c sw (sp+12),r15 801ba7c: 5b 90 00 08 sw (sp+8),r16 801ba80: 5b 9d 00 04 sw (sp+4),ra rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 801ba84: 78 04 08 01 mvhi r4,0x801 801ba88: 38 84 e0 10 ori r4,r4,0xe010 801ba8c: 28 84 00 00 lw r4,(r4+0) off_t lseek( int fd, off_t offset, int whence ) { 801ba90: b8 40 60 00 mv r12,r2 801ba94: b8 60 68 00 mv r13,r3 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 801ba98: 54 81 00 06 bgu r4,r1,801bab0 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 801ba9c: fb ff c6 c3 calli 800d5a8 <__errno> <== NOT EXECUTED 801baa0: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 801baa4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801baa8: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 801baac: e0 00 00 1c bi 801bb1c <== NOT EXECUTED rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 801bab0: 34 02 00 03 mvi r2,3 801bab4: fb ff 91 cf calli 80001f0 <__ashlsi3> 801bab8: 78 0e 08 01 mvhi r14,0x801 801babc: 39 ce e7 18 ori r14,r14,0xe718 801bac0: 34 02 00 03 mvi r2,3 801bac4: b8 20 78 00 mv r15,r1 801bac8: fb ff 91 ca calli 80001f0 <__ashlsi3> 801bacc: 29 cb 00 00 lw r11,(r14+0) 801bad0: b5 e1 08 00 add r1,r15,r1 801bad4: b5 61 58 00 add r11,r11,r1 rtems_libio_check_is_open(iop); 801bad8: 29 61 00 18 lw r1,(r11+24) 801badc: 20 21 01 00 andi r1,r1,0x100 801bae0: 44 20 ff ef be r1,r0,801ba9c /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 801bae4: 29 6e 00 40 lw r14,(r11+64) 801bae8: 29 c1 00 14 lw r1,(r14+20) 801baec: 44 20 00 42 be r1,r0,801bbf4 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 801baf0: 34 01 00 01 mvi r1,1 /* * Now process the lseek(). */ old_offset = iop->offset; 801baf4: 29 70 00 10 lw r16,(r11+16) 801baf8: 29 6f 00 14 lw r15,(r11+20) switch ( whence ) { 801bafc: 45 a1 00 33 be r13,r1,801bbc8 801bb00: 34 01 00 02 mvi r1,2 801bb04: 45 a1 00 24 be r13,r1,801bb94 801bb08: 45 a0 00 0f be r13,r0,801bb44 case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 801bb0c: fb ff c6 a7 calli 800d5a8 <__errno> 801bb10: 34 02 00 16 mvi r2,22 801bb14: 58 22 00 00 sw (r1+0),r2 801bb18: 34 0c ff ff mvi r12,-1 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 801bb1c: b9 80 08 00 mv r1,r12 801bb20: 2b 9d 00 04 lw ra,(sp+4) 801bb24: 2b 8b 00 1c lw r11,(sp+28) 801bb28: 2b 8c 00 18 lw r12,(sp+24) 801bb2c: 2b 8d 00 14 lw r13,(sp+20) 801bb30: 2b 8e 00 10 lw r14,(sp+16) 801bb34: 2b 8f 00 0c lw r15,(sp+12) 801bb38: 2b 90 00 08 lw r16,(sp+8) 801bb3c: 37 9c 00 1c addi sp,sp,28 801bb40: c3 a0 00 00 ret */ old_offset = iop->offset; switch ( whence ) { case SEEK_SET: iop->offset = offset; 801bb44: 34 02 00 1f mvi r2,31 801bb48: b9 80 08 00 mv r1,r12 801bb4c: fb ff 91 f9 calli 8000330 <__ashrsi3> 801bb50: b8 20 10 00 mv r2,r1 801bb54: 59 61 00 10 sw (r11+16),r1 801bb58: 59 6c 00 14 sw (r11+20),r12 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 801bb5c: 29 c5 00 14 lw r5,(r14+20) 801bb60: b9 80 18 00 mv r3,r12 801bb64: b9 a0 20 00 mv r4,r13 801bb68: b9 60 08 00 mv r1,r11 801bb6c: d8 a0 00 00 call r5 if ( status == (off_t) -1 ) 801bb70: 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 ); 801bb74: b8 40 60 00 mv r12,r2 if ( status == (off_t) -1 ) 801bb78: 5c 41 ff e9 bne r2,r1,801bb1c iop->offset = old_offset; 801bb7c: b9 e0 08 00 mv r1,r15 801bb80: 34 02 00 1f mvi r2,31 801bb84: fb ff 91 eb calli 8000330 <__ashrsi3> 801bb88: 59 61 00 10 sw (r11+16),r1 801bb8c: 59 6f 00 14 sw (r11+20),r15 801bb90: e3 ff ff e3 bi 801bb1c case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 801bb94: 34 02 00 1f mvi r2,31 801bb98: b9 80 08 00 mv r1,r12 801bb9c: fb ff 91 e5 calli 8000330 <__ashrsi3> 801bba0: b8 20 10 00 mv r2,r1 801bba4: 29 61 00 0c lw r1,(r11+12) 801bba8: 29 63 00 08 lw r3,(r11+8) 801bbac: b5 81 08 00 add r1,r12,r1 801bbb0: f5 81 20 00 cmpgu r4,r12,r1 801bbb4: b4 43 18 00 add r3,r2,r3 801bbb8: b4 83 18 00 add r3,r4,r3 801bbbc: 59 63 00 10 sw (r11+16),r3 801bbc0: 59 61 00 14 sw (r11+20),r1 break; 801bbc4: e3 ff ff e6 bi 801bb5c case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 801bbc8: 34 02 00 1f mvi r2,31 801bbcc: b9 80 08 00 mv r1,r12 801bbd0: fb ff 91 d8 calli 8000330 <__ashrsi3> 801bbd4: b8 20 10 00 mv r2,r1 801bbd8: b5 8f 08 00 add r1,r12,r15 801bbdc: f5 81 18 00 cmpgu r3,r12,r1 801bbe0: b4 50 80 00 add r16,r2,r16 801bbe4: b4 70 80 00 add r16,r3,r16 801bbe8: 59 70 00 10 sw (r11+16),r16 801bbec: 59 61 00 14 sw (r11+20),r1 break; 801bbf0: e3 ff ff db bi 801bb5c /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 801bbf4: fb ff c6 6d calli 800d5a8 <__errno> <== NOT EXECUTED 801bbf8: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 801bbfc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801bc00: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 801bc04: e3 ff ff c6 bi 801bb1c <== NOT EXECUTED 0802af30 : int _STAT_NAME( const char *path, struct stat *buf ) { 802af30: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 802af34: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 802af38: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 802af3c: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 802af40: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 802af44: b8 40 60 00 mv r12,r2 <== NOT EXECUTED 802af48: b8 20 58 00 mv r11,r1 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 802af4c: 44 40 00 26 be r2,r0,802afe4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 802af50: f8 00 95 72 calli 8050518 <== NOT EXECUTED 802af54: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 802af58: 37 8d 00 14 addi r13,sp,20 <== NOT EXECUTED 802af5c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 802af60: b8 60 28 00 mv r5,r3 <== NOT EXECUTED 802af64: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802af68: b9 a0 20 00 mv r4,r13 <== NOT EXECUTED 802af6c: fb ff 72 85 calli 8007980 <== NOT EXECUTED 802af70: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 802af74: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 802af78: 5c 20 00 14 bne r1,r0,802afc8 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 802af7c: 2b 81 00 1c lw r1,(sp+28) <== NOT EXECUTED 802af80: 28 22 00 18 lw r2,(r1+24) <== NOT EXECUTED 802af84: 44 43 00 23 be r2,r3,802b010 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 802af88: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 802af8c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802af90: 34 03 00 48 mvi r3,72 <== NOT EXECUTED 802af94: f8 00 86 cd calli 804cac8 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 802af98: 2b 83 00 1c lw r3,(sp+28) <== NOT EXECUTED 802af9c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 802afa0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 802afa4: 28 63 00 18 lw r3,(r3+24) <== NOT EXECUTED 802afa8: d8 60 00 00 call r3 <== NOT EXECUTED 802afac: b8 20 58 00 mv r11,r1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 802afb0: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 802afb4: 44 20 00 05 be r1,r0,802afc8 <== NOT EXECUTED 802afb8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 802afbc: 44 40 00 03 be r2,r0,802afc8 <== NOT EXECUTED 802afc0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 802afc4: d8 40 00 00 call r2 <== NOT EXECUTED return status; } 802afc8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802afcc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802afd0: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 802afd4: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 802afd8: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 802afdc: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 802afe0: c3 a0 00 00 ret <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 802afe4: f8 00 77 4d calli 8048d18 <__errno> <== NOT EXECUTED 802afe8: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 802afec: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 802aff0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 802aff4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802aff8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802affc: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 802b000: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 802b004: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 802b008: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 802b00c: c3 a0 00 00 ret <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 802b010: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 802b014: 44 22 00 05 be r1,r2,802b028 <== NOT EXECUTED 802b018: 28 23 00 1c lw r3,(r1+28) <== NOT EXECUTED 802b01c: 44 62 00 03 be r3,r2,802b028 <== NOT EXECUTED 802b020: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 802b024: d8 60 00 00 call r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 802b028: f8 00 77 3c calli 8048d18 <__errno> <== NOT EXECUTED 802b02c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 802b030: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 802b034: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 802b038: e3 ff ff e4 bi 802afc8 <== NOT EXECUTED 08007fd0 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 8007fd0: 37 9c ff f0 addi sp,sp,-16 8007fd4: 5b 8b 00 10 sw (sp+16),r11 8007fd8: 5b 8c 00 0c sw (sp+12),r12 8007fdc: 5b 8d 00 08 sw (sp+8),r13 8007fe0: 5b 9d 00 04 sw (sp+4),ra 8007fe4: 78 03 08 01 mvhi r3,0x801 8007fe8: 38 63 e7 28 ori r3,r3,0xe728 8007fec: 28 62 00 04 lw r2,(r3+4) 8007ff0: b8 20 60 00 mv r12,r1 8007ff4: 34 41 00 01 addi r1,r2,1 8007ff8: 58 61 00 04 sw (r3+4),r1 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 8007ffc: fb ff ff e7 calli 8007f98 /* * Validate the parameters */ if ( !size ) 8008000: 45 80 00 29 be r12,r0,80080a4 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 8008004: 78 01 08 01 mvhi r1,0x801 8008008: 38 21 ea 40 ori r1,r1,0xea40 800800c: 28 22 00 00 lw r2,(r1+0) 8008010: 34 01 00 03 mvi r1,3 8008014: 44 41 00 22 be r2,r1,800809c RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 8008018: 78 01 08 01 mvhi r1,0x801 800801c: 38 21 e0 1c ori r1,r1,0xe01c 8008020: 28 21 00 00 lw r1,(r1+0) 8008024: 34 03 00 00 mvi r3,0 8008028: b9 80 10 00 mv r2,r12 800802c: b8 60 20 00 mv r4,r3 8008030: f8 00 07 a2 calli 8009eb8 <_Protected_heap_Allocate_aligned_with_boundary> 8008034: 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; 8008038: b8 20 68 00 mv r13,r1 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 800803c: 44 20 00 22 be r1,r0,80080c4 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 8008040: 78 01 08 01 mvhi r1,0x801 8008044: 38 21 e6 58 ori r1,r1,0xe658 8008048: 28 21 00 00 lw r1,(r1+0) 800804c: 44 20 00 05 be r1,r0,8008060 (*rtems_malloc_dirty_helper)( return_this, size ); 8008050: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 8008054: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8008058: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 800805c: d8 60 00 00 call r3 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 8008060: 78 01 08 01 mvhi r1,0x801 8008064: 38 21 e6 50 ori r1,r1,0xe650 8008068: 28 21 00 00 lw r1,(r1+0) 800806c: b9 a0 58 00 mv r11,r13 8008070: 44 20 00 04 be r1,r0,8008080 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 8008074: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 8008078: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 800807c: d8 40 00 00 call r2 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 8008080: b9 60 08 00 mv r1,r11 8008084: 2b 9d 00 04 lw ra,(sp+4) 8008088: 2b 8b 00 10 lw r11,(sp+16) 800808c: 2b 8c 00 0c lw r12,(sp+12) 8008090: 2b 8d 00 08 lw r13,(sp+8) 8008094: 37 9c 00 10 addi sp,sp,16 8008098: c3 a0 00 00 ret return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 800809c: fb ff ff a4 calli 8007f2c 80080a0: 5c 20 ff de bne r1,r0,8008018 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 80080a4: 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; } 80080a8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80080ac: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80080b0: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 80080b4: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 80080b8: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 80080bc: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 80080c0: c3 a0 00 00 ret <== NOT EXECUTED */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 80080c4: 78 01 08 01 mvhi r1,0x801 80080c8: 38 21 e6 54 ori r1,r1,0xe654 80080cc: 28 21 00 00 lw r1,(r1+0) 80080d0: 44 2b 00 06 be r1,r11,80080e8 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 80080d4: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 80080d8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80080dc: d8 40 00 00 call r2 <== NOT EXECUTED 80080e0: b8 20 68 00 mv r13,r1 <== NOT EXECUTED if ( !return_this ) { 80080e4: 5c 20 ff d7 bne r1,r0,8008040 <== NOT EXECUTED errno = ENOMEM; 80080e8: f8 00 15 30 calli 800d5a8 <__errno> 80080ec: 34 02 00 0c mvi r2,12 80080f0: 58 22 00 00 sw (r1+0),r2 return (void *) 0; 80080f4: e3 ff ff e3 bi 8008080 08007f74 : } void malloc_deferred_free( void *pointer ) { 8007f74: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8007f78: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8007f7c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8007f80: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8007f84: 38 21 ed a4 ori r1,r1,0xeda4 <== NOT EXECUTED 8007f88: fb ff eb 88 calli 8002da8 <_Chain_Append> <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 8007f8c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8007f90: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8007f94: c3 a0 00 00 ret <== NOT EXECUTED 08007f98 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 8007f98: 37 9c ff f8 addi sp,sp,-8 8007f9c: 5b 8b 00 08 sw (sp+8),r11 8007fa0: 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 ); 8007fa4: 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) 8007fa8: e0 00 00 02 bi 8007fb0 free(to_be_freed); 8007fac: fb ff fe 47 calli 80078c8 <== NOT EXECUTED 8007fb0: b9 60 08 00 mv r1,r11 8007fb4: 38 21 ed a4 ori r1,r1,0xeda4 8007fb8: f8 00 05 3b calli 80094a4 <_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) 8007fbc: 5c 20 ff fc bne r1,r0,8007fac free(to_be_freed); } 8007fc0: 2b 9d 00 04 lw ra,(sp+4) 8007fc4: 2b 8b 00 08 lw r11,(sp+8) 8007fc8: 37 9c 00 08 addi sp,sp,8 8007fcc: c3 a0 00 00 ret 08011878 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 8011878: 37 9c ff f8 addi sp,sp,-8 801187c: 5b 8b 00 08 sw (sp+8),r11 8011880: 5b 9d 00 04 sw (sp+4),ra 8011884: 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) ) { 8011888: fb ff f1 89 calli 800deac 801188c: 5c 20 00 0f bne r1,r0,80118c8 8011890: 2d 62 00 34 lhu r2,(r11+52) 8011894: 5c 41 00 0d bne r2,r1,80118c8 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 8011898: 78 01 08 02 mvhi r1,0x802 801189c: 38 21 60 f8 ori r1,r1,0x60f8 80118a0: 28 21 00 00 lw r1,(r1+0) 80118a4: 28 23 00 04 lw r3,(r1+4) 80118a8: 44 6b 00 0d be r3,r11,80118dc rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 80118ac: 29 62 00 4c lw r2,(r11+76) 80118b0: 34 01 00 06 mvi r1,6 80118b4: 44 41 00 03 be r2,r1,80118c0 IMFS_memfile_remove( the_jnode ); 80118b8: b9 60 08 00 mv r1,r11 80118bc: fb ff ff 67 calli 8011658 free( the_jnode ); 80118c0: b9 60 08 00 mv r1,r11 80118c4: fb ff c4 bd calli 8002bb8 } return 0; } 80118c8: 34 01 00 00 mvi r1,0 80118cc: 2b 9d 00 04 lw ra,(sp+4) 80118d0: 2b 8b 00 08 lw r11,(sp+8) 80118d4: 37 9c 00 08 addi sp,sp,8 80118d8: c3 a0 00 00 ret /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) rtems_filesystem_current.node_access = NULL; 80118dc: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED 80118e0: e3 ff ff f3 bi 80118ac <== NOT EXECUTED 08011558 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 8011558: 37 9c ff e8 addi sp,sp,-24 801155c: 5b 8b 00 18 sw (sp+24),r11 8011560: 5b 8c 00 14 sw (sp+20),r12 8011564: 5b 8d 00 10 sw (sp+16),r13 8011568: 5b 8e 00 0c sw (sp+12),r14 801156c: 5b 8f 00 08 sw (sp+8),r15 8011570: 5b 9d 00 04 sw (sp+4),ra 8011574: b8 20 78 00 mv r15,r1 8011578: b8 40 68 00 mv r13,r2 /* * Perform internal consistency checks */ assert( block_table ); 801157c: 44 20 00 19 be r1,r0,80115e0 /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 8011580: 28 21 00 00 lw r1,(r1+0) for ( i=0 ; i 8011588: 34 0c 00 00 mvi r12,0 801158c: b8 20 58 00 mv r11,r1 if ( b[i] ) { 8011590: b9 80 70 00 mv r14,r12 8011594: 29 61 00 00 lw r1,(r11+0) 8011598: 44 20 00 03 be r1,r0,80115a4 memfile_free_block( b[i] ); 801159c: fb ff ff 27 calli 8011238 b[i] = 0; 80115a0: 59 6e 00 00 sw (r11+0),r14 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 80115b0: 29 e1 00 00 lw r1,(r15+0) /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 80115b4: fb ff ff 21 calli 8011238 *block_table = 0; 80115b8: 34 01 00 00 mvi r1,0 80115bc: 59 e1 00 00 sw (r15+0),r1 } 80115c0: 2b 9d 00 04 lw ra,(sp+4) 80115c4: 2b 8b 00 18 lw r11,(sp+24) 80115c8: 2b 8c 00 14 lw r12,(sp+20) 80115cc: 2b 8d 00 10 lw r13,(sp+16) 80115d0: 2b 8e 00 0c lw r14,(sp+12) 80115d4: 2b 8f 00 08 lw r15,(sp+8) 80115d8: 37 9c 00 18 addi sp,sp,24 80115dc: c3 a0 00 00 ret /* * Perform internal consistency checks */ assert( block_table ); 80115e0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80115e4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80115e8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80115ec: 38 21 48 e0 ori r1,r1,0x48e0 <== NOT EXECUTED 80115f0: 38 63 4a 28 ori r3,r3,0x4a28 <== NOT EXECUTED 80115f4: 38 84 49 58 ori r4,r4,0x4958 <== NOT EXECUTED 80115f8: 34 02 01 b3 mvi r2,435 <== NOT EXECUTED 80115fc: fb ff f1 66 calli 800db94 <__assert_func> <== NOT EXECUTED 08011bdc : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 8011bdc: 37 9c ff f0 addi sp,sp,-16 8011be0: 5b 8b 00 08 sw (sp+8),r11 8011be4: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 8011be8: 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 ) 8011bec: 29 64 00 50 lw r4,(r11+80) 8011bf0: 48 44 00 10 bg r2,r4,8011c30 8011bf4: 44 82 00 16 be r4,r2,8011c4c * 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; 8011bf8: 59 62 00 50 sw (r11+80),r2 8011bfc: 59 63 00 54 sw (r11+84),r3 iop->size = the_jnode->info.file.size; 8011c00: 58 23 00 0c sw (r1+12),r3 8011c04: 58 22 00 08 sw (r1+8),r2 IMFS_update_atime( the_jnode ); 8011c08: 37 81 00 0c addi r1,sp,12 8011c0c: 34 02 00 00 mvi r2,0 8011c10: fb ff c4 18 calli 8002c70 8011c14: 2b 81 00 0c lw r1,(sp+12) 8011c18: 59 61 00 40 sw (r11+64),r1 8011c1c: 34 01 00 00 mvi r1,0 return 0; } 8011c20: 2b 9d 00 04 lw ra,(sp+4) 8011c24: 2b 8b 00 08 lw r11,(sp+8) 8011c28: 37 9c 00 10 addi sp,sp,16 8011c2c: c3 a0 00 00 ret * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) return IMFS_memfile_extend( the_jnode, length ); 8011c30: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8011c34: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8011c38: fb ff ff 7d calli 8011a2c <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 8011c3c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8011c40: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8011c44: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8011c48: c3 a0 00 00 ret <== NOT EXECUTED * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 8011c4c: 29 64 00 54 lw r4,(r11+84) 8011c50: 54 64 ff f8 bgu r3,r4,8011c30 8011c54: e3 ff ff e9 bi 8011bf8 08011c58 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 8011c58: 37 9c ff f4 addi sp,sp,-12 8011c5c: 5b 8b 00 0c sw (sp+12),r11 8011c60: 5b 8c 00 08 sw (sp+8),r12 8011c64: 5b 9d 00 04 sw (sp+4),ra IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 8011c68: 28 2c 00 3c lw r12,(r1+60) rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 8011c6c: b8 20 58 00 mv r11,r1 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 8011c70: 34 01 00 06 mvi r1,6 8011c74: 29 82 00 4c lw r2,(r12+76) 8011c78: 44 41 00 11 be r2,r1,8011cbc if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 8011c7c: 29 62 00 14 lw r2,(r11+20) 8011c80: b9 80 08 00 mv r1,r12 8011c84: fb ff ff 6a calli 8011a2c 8011c88: 5c 20 00 25 bne r1,r0,8011d1c rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 8011c8c: 29 81 00 50 lw r1,(r12+80) 8011c90: 29 62 00 14 lw r2,(r11+20) 8011c94: 29 63 00 10 lw r3,(r11+16) 8011c98: 59 61 00 08 sw (r11+8),r1 8011c9c: 29 8c 00 54 lw r12,(r12+84) 8011ca0: 59 6c 00 0c sw (r11+12),r12 } return iop->offset; } 8011ca4: b8 60 08 00 mv r1,r3 8011ca8: 2b 9d 00 04 lw ra,(sp+4) 8011cac: 2b 8b 00 0c lw r11,(sp+12) 8011cb0: 2b 8c 00 08 lw r12,(sp+8) 8011cb4: 37 9c 00 0c addi sp,sp,12 8011cb8: c3 a0 00 00 ret IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 8011cbc: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8011cc0: 29 83 00 50 lw r3,(r12+80) <== NOT EXECUTED 8011cc4: 29 82 00 54 lw r2,(r12+84) <== NOT EXECUTED 8011cc8: 29 64 00 14 lw r4,(r11+20) <== NOT EXECUTED 8011ccc: 48 23 00 0a bg r1,r3,8011cf4 <== NOT EXECUTED 8011cd0: 44 23 00 11 be r1,r3,8011d14 <== NOT EXECUTED 8011cd4: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 8011cd8: b8 80 10 00 mv r2,r4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 8011cdc: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 8011ce0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8011ce4: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8011ce8: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8011cec: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8011cf0: c3 a0 00 00 ret <== NOT EXECUTED 8011cf4: b8 60 08 00 mv r1,r3 <== NOT EXECUTED the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; 8011cf8: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED 8011cfc: 59 63 00 10 sw (r11+16),r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 8011d00: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8011d04: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8011d08: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8011d0c: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8011d10: c3 a0 00 00 ret <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 8011d14: 54 82 ff f8 bgu r4,r2,8011cf4 <== NOT EXECUTED 8011d18: e3 ff ff ef bi 8011cd4 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 8011d1c: f8 00 08 d4 calli 801406c <__errno> <== NOT EXECUTED 8011d20: 34 02 00 1c mvi r2,28 <== NOT EXECUTED 8011d24: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 8011d28: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8011d2c: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8011d30: e3 ff ff dd bi 8011ca4 <== NOT EXECUTED 0801202c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 801202c: 37 9c ff f4 addi sp,sp,-12 8012030: 5b 8b 00 0c sw (sp+12),r11 8012034: 5b 8c 00 08 sw (sp+8),r12 8012038: 5b 9d 00 04 sw (sp+4),ra the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 801203c: 28 23 00 18 lw r3,(r1+24) rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 8012040: b8 20 60 00 mv r12,r1 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 8012044: 28 2b 00 3c lw r11,(r1+60) /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 8012048: 34 02 00 00 mvi r2,0 801204c: 20 61 02 04 andi r1,r3,0x204 8012050: 44 22 00 04 be r1,r2,8012060 && (the_jnode->type == IMFS_LINEAR_FILE)) { 8012054: 29 64 00 4c lw r4,(r11+76) 8012058: 34 01 00 06 mvi r1,6 801205c: 44 81 00 12 be r4,r1,80120a4 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) 8012060: 29 61 00 50 lw r1,(r11+80) 8012064: 29 62 00 54 lw r2,(r11+84) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 8012068: 20 63 02 00 andi r3,r3,0x200 801206c: 5c 60 00 09 bne r3,r0,8012090 iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 8012070: 59 81 00 08 sw (r12+8),r1 8012074: 59 82 00 0c sw (r12+12),r2 8012078: 34 01 00 00 mvi r1,0 return 0; } 801207c: 2b 9d 00 04 lw ra,(sp+4) 8012080: 2b 8b 00 0c lw r11,(sp+12) 8012084: 2b 8c 00 08 lw r12,(sp+8) 8012088: 37 9c 00 0c addi sp,sp,12 801208c: c3 a0 00 00 ret if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; 8012090: 59 81 00 10 sw (r12+16),r1 8012094: 59 82 00 14 sw (r12+20),r2 8012098: 29 62 00 54 lw r2,(r11+84) 801209c: 29 61 00 50 lw r1,(r11+80) 80120a0: e3 ff ff f4 bi 8012070 /* * 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; 80120a4: 29 61 00 54 lw r1,(r11+84) <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 80120a8: 34 03 00 05 mvi r3,5 <== NOT EXECUTED 80120ac: 59 63 00 4c sw (r11+76),r3 <== NOT EXECUTED the_jnode->info.file.size = 0; 80120b0: 59 62 00 50 sw (r11+80),r2 <== NOT EXECUTED * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; 80120b4: 29 63 00 58 lw r3,(r11+88) <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 80120b8: 59 62 00 54 sw (r11+84),r2 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 80120bc: 59 62 00 5c sw (r11+92),r2 <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 80120c0: 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; 80120c4: 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) 80120c8: 5c 20 00 04 bne r1,r0,80120d8 <== NOT EXECUTED 80120cc: 29 83 00 18 lw r3,(r12+24) <== NOT EXECUTED 80120d0: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 80120d4: e3 ff ff e5 bi 8012068 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 80120d8: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 80120dc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80120e0: fb ff ff 15 calli 8011d34 <== NOT EXECUTED 80120e4: 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) 80120e8: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 80120ec: 44 43 ff e4 be r2,r3,801207c <== NOT EXECUTED 80120f0: 29 83 00 18 lw r3,(r12+24) <== NOT EXECUTED 80120f4: e3 ff ff db bi 8012060 <== NOT EXECUTED 080011c4 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 80011c4: 37 9c ff d0 addi sp,sp,-48 80011c8: 5b 8b 00 18 sw (sp+24),r11 80011cc: 5b 8c 00 14 sw (sp+20),r12 80011d0: 5b 8d 00 10 sw (sp+16),r13 80011d4: 5b 8e 00 0c sw (sp+12),r14 80011d8: 5b 8f 00 08 sw (sp+8),r15 80011dc: 5b 9d 00 04 sw (sp+4),ra 80011e0: b8 40 68 00 mv r13,r2 rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 80011e4: 20 42 f0 00 andi r2,r2,0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 80011e8: b8 60 78 00 mv r15,r3 80011ec: b8 80 70 00 mv r14,r4 rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 80011f0: 44 40 00 4d be r2,r0,8001324 rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 80011f4: 40 25 00 00 lbu r5,(r1+0) 80011f8: 64 a6 00 5c cmpei r6,r5,92 80011fc: 64 a2 00 2f cmpei r2,r5,47 8001200: b8 c2 30 00 or r6,r6,r2 8001204: 44 c0 00 32 be r6,r0,80012cc 8001208: 78 05 08 01 mvhi r5,0x801 800120c: 38 a5 e1 10 ori r5,r5,0xe110 8001210: 28 a5 00 00 lw r5,(r5+0) 8001214: 34 06 00 01 mvi r6,1 8001218: 28 a2 00 18 lw r2,(r5+24) 800121c: 5b 82 00 1c sw (sp+28),r2 8001220: 28 a3 00 1c lw r3,(r5+28) 8001224: 5b 83 00 20 sw (sp+32),r3 8001228: 28 a2 00 20 lw r2,(r5+32) 800122c: 5b 82 00 24 sw (sp+36),r2 8001230: 28 a3 00 24 lw r3,(r5+36) 8001234: 5b 83 00 28 sw (sp+40),r3 8001238: 28 a5 00 28 lw r5,(r5+40) if ( !temp_loc.ops->evalformake_h ) { 800123c: 2b 82 00 28 lw r2,(sp+40) int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 8001240: 5b 85 00 2c sw (sp+44),r5 if ( !temp_loc.ops->evalformake_h ) { 8001244: 28 45 00 04 lw r5,(r2+4) 8001248: 44 a0 00 32 be r5,r0,8001310 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 800124c: 37 8c 00 1c addi r12,sp,28 8001250: b4 26 08 00 add r1,r1,r6 8001254: b9 80 10 00 mv r2,r12 8001258: 37 83 00 30 addi r3,sp,48 800125c: d8 a0 00 00 call r5 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 8001260: 34 0b ff ff mvi r11,-1 8001264: 5c 20 00 11 bne r1,r0,80012a8 return -1; if ( !temp_loc.ops->mknod_h ) { 8001268: 2b 82 00 28 lw r2,(sp+40) 800126c: 28 46 00 14 lw r6,(r2+20) 8001270: 44 c1 00 32 be r6,r1,8001338 rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 8001274: 2b 81 00 30 lw r1,(sp+48) 8001278: b9 a0 10 00 mv r2,r13 800127c: b9 e0 18 00 mv r3,r15 8001280: b9 c0 20 00 mv r4,r14 8001284: b9 80 28 00 mv r5,r12 8001288: d8 c0 00 00 call r6 800128c: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &temp_loc ); 8001290: 2b 81 00 28 lw r1,(sp+40) 8001294: 44 20 00 05 be r1,r0,80012a8 8001298: 28 22 00 1c lw r2,(r1+28) 800129c: 44 40 00 03 be r2,r0,80012a8 80012a0: b9 80 08 00 mv r1,r12 80012a4: d8 40 00 00 call r2 return result; } 80012a8: b9 60 08 00 mv r1,r11 80012ac: 2b 9d 00 04 lw ra,(sp+4) 80012b0: 2b 8b 00 18 lw r11,(sp+24) 80012b4: 2b 8c 00 14 lw r12,(sp+20) 80012b8: 2b 8d 00 10 lw r13,(sp+16) 80012bc: 2b 8e 00 0c lw r14,(sp+12) 80012c0: 2b 8f 00 08 lw r15,(sp+8) 80012c4: 37 9c 00 30 addi sp,sp,48 80012c8: c3 a0 00 00 ret int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 80012cc: 44 a6 ff cf be r5,r6,8001208 80012d0: 78 02 08 01 mvhi r2,0x801 80012d4: 38 42 e1 10 ori r2,r2,0xe110 80012d8: 28 42 00 00 lw r2,(r2+0) 80012dc: 28 43 00 04 lw r3,(r2+4) 80012e0: 5b 83 00 1c sw (sp+28),r3 80012e4: 28 43 00 08 lw r3,(r2+8) 80012e8: 5b 83 00 20 sw (sp+32),r3 80012ec: 28 43 00 0c lw r3,(r2+12) 80012f0: 5b 83 00 24 sw (sp+36),r3 80012f4: 28 43 00 10 lw r3,(r2+16) 80012f8: 5b 83 00 28 sw (sp+40),r3 80012fc: 28 42 00 14 lw r2,(r2+20) 8001300: 5b 82 00 2c sw (sp+44),r2 if ( !temp_loc.ops->evalformake_h ) { 8001304: 2b 82 00 28 lw r2,(sp+40) 8001308: 28 45 00 04 lw r5,(r2+4) 800130c: 5c a0 ff d0 bne r5,r0,800124c if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 8001310: f8 00 30 a6 calli 800d5a8 <__errno> <== NOT EXECUTED 8001314: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8001318: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800131c: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8001320: e3 ff ff e2 bi 80012a8 <== NOT EXECUTED int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 8001324: f8 00 30 a1 calli 800d5a8 <__errno> <== NOT EXECUTED 8001328: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 800132c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8001330: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8001334: e3 ff ff dd bi 80012a8 <== NOT EXECUTED ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 8001338: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 800133c: 44 46 ff f5 be r2,r6,8001310 <== NOT EXECUTED 8001340: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8001344: d8 40 00 00 call r2 <== NOT EXECUTED 8001348: e3 ff ff f2 bi 8001310 <== NOT EXECUTED 0800136c : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 800136c: 37 9c ff cc addi sp,sp,-52 8001370: 5b 8b 00 20 sw (sp+32),r11 8001374: 5b 8c 00 1c sw (sp+28),r12 8001378: 5b 8d 00 18 sw (sp+24),r13 800137c: 5b 8e 00 14 sw (sp+20),r14 8001380: 5b 8f 00 10 sw (sp+16),r15 8001384: 5b 90 00 0c sw (sp+12),r16 8001388: 5b 91 00 08 sw (sp+8),r17 800138c: 5b 9d 00 04 sw (sp+4),ra 8001390: b8 40 70 00 mv r14,r2 8001394: b8 20 78 00 mv r15,r1 8001398: b8 60 80 00 mv r16,r3 800139c: b8 80 68 00 mv r13,r4 80013a0: b8 a0 60 00 mv r12,r5 /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 80013a4: 44 40 00 03 be r2,r0,80013b0 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 80013a8: 34 01 00 01 mvi r1,1 80013ac: 50 23 00 06 bgeu r1,r3,80013c4 options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 80013b0: f8 00 30 7e calli 800d5a8 <__errno> 80013b4: 34 02 00 16 mvi r2,22 80013b8: 58 22 00 00 sw (r1+0),r2 80013bc: 34 02 ff ff mvi r2,-1 return -1; 80013c0: e0 00 00 4e bi 80014f8 } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 80013c4: 28 4b 00 24 lw r11,(r2+36) 80013c8: 45 60 00 85 be r11,r0,80015dc /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 80013cc: 34 01 00 6c mvi r1,108 80013d0: 44 80 00 04 be r4,r0,80013e0 size += strlen( device ) + 1; 80013d4: b8 80 08 00 mv r1,r4 <== NOT EXECUTED 80013d8: f8 00 35 44 calli 800e8e8 <== NOT EXECUTED 80013dc: 34 21 00 6d addi r1,r1,109 <== NOT EXECUTED temp_mt_entry = malloc( size ); 80013e0: f8 00 1a fc calli 8007fd0 80013e4: b8 20 58 00 mv r11,r1 80013e8: b8 20 88 00 mv r17,r1 if ( !temp_mt_entry ) { 80013ec: 44 20 00 84 be r1,r0,80015fc errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 80013f0: 58 30 00 30 sw (r1+48),r16 if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 80013f4: 59 61 00 2c sw (r11+44),r1 temp_mt_entry->options = options; if ( device ) { 80013f8: 45 a0 00 59 be r13,r0,800155c temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 80013fc: 34 23 00 6c addi r3,r1,108 <== NOT EXECUTED strcpy( temp_mt_entry->dev, device ); 8001400: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 8001404: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 8001408: 59 63 00 68 sw (r11+104),r3 <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 800140c: f8 00 35 15 calli 800e860 <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 8001410: 45 80 00 55 be r12,r0,8001564 <== NOT EXECUTED if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 8001414: b9 80 08 00 mv r1,r12 8001418: f8 00 35 34 calli 800e8e8 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 800141c: 37 8d 00 24 addi r13,sp,36 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 8001420: b8 20 10 00 mv r2,r1 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 8001424: 34 03 00 07 mvi r3,7 8001428: b9 80 08 00 mv r1,r12 800142c: b9 a0 20 00 mv r4,r13 8001430: 34 05 00 01 mvi r5,1 8001434: fb ff fe a6 calli 8000ecc 8001438: 34 02 ff ff mvi r2,-1 800143c: 44 22 00 6c be r1,r2,80015ec /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 8001440: 2b 81 00 30 lw r1,(sp+48) 8001444: 28 22 00 10 lw r2,(r1+16) 8001448: 44 40 00 37 be r2,r0,8001524 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 800144c: b9 a0 08 00 mv r1,r13 8001450: d8 40 00 00 call r2 8001454: 34 02 00 01 mvi r2,1 8001458: 5c 22 00 5d bne r1,r2,80015cc /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 800145c: 78 06 08 01 mvhi r6,0x801 8001460: 38 c6 e7 58 ori r6,r6,0xe758 8001464: 28 c3 00 00 lw r3,(r6+0) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8001468: 34 c6 00 04 addi r6,r6,4 800146c: 44 66 00 56 be r3,r6,80015c4 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 8001470: 2b 85 00 24 lw r5,(sp+36) 8001474: 28 61 00 1c lw r1,(r3+28) 8001478: 5c 25 00 04 bne r1,r5,8001488 800147c: e0 00 00 34 bi 800154c <== NOT EXECUTED 8001480: 28 67 00 1c lw r7,(r3+28) 8001484: 44 e5 00 32 be r7,r5,800154c * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 8001488: 28 63 00 00 lw r3,(r3+0) /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 800148c: 5c 66 ff fd bne r3,r6,8001480 * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; 8001490: 2b 82 00 2c lw r2,(sp+44) temp_mt_entry->mt_point_node.ops = loc.ops; 8001494: 2b 81 00 30 lw r1,(sp+48) * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; 8001498: 59 65 00 08 sw (r11+8),r5 temp_mt_entry->mt_point_node.handlers = loc.handlers; 800149c: 59 62 00 10 sw (r11+16),r2 temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 80014a0: 2b 82 00 34 lw r2,(sp+52) * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 80014a4: 59 61 00 14 sw (r11+20),r1 temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 80014a8: 59 62 00 18 sw (r11+24),r2 /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 80014ac: 28 22 00 20 lw r2,(r1+32) 80014b0: 44 40 00 1d be r2,r0,8001524 errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 80014b4: b9 60 08 00 mv r1,r11 80014b8: d8 40 00 00 call r2 80014bc: b9 a0 60 00 mv r12,r13 80014c0: 5c 20 00 1c bne r1,r0,8001530 temp_mt_entry->mt_point_node.handlers = NULL; temp_mt_entry->mt_point_node.ops = NULL; temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 80014c4: 29 c2 00 24 lw r2,(r14+36) 80014c8: b9 60 08 00 mv r1,r11 80014cc: d8 40 00 00 call r2 80014d0: b8 20 68 00 mv r13,r1 80014d4: 5c 20 00 2c bne r1,r0,8001584 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 80014d8: 78 01 08 01 mvhi r1,0x801 80014dc: b9 60 10 00 mv r2,r11 80014e0: 38 21 e7 58 ori r1,r1,0xe758 80014e4: f8 00 06 31 calli 8002da8 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 80014e8: b9 e0 10 00 mv r2,r15 80014ec: 45 ed 00 03 be r15,r13,80014f8 *mt_entry = temp_mt_entry; 80014f0: 59 eb 00 00 sw (r15+0),r11 80014f4: b9 a0 10 00 mv r2,r13 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 80014f8: b8 40 08 00 mv r1,r2 80014fc: 2b 9d 00 04 lw ra,(sp+4) 8001500: 2b 8b 00 20 lw r11,(sp+32) 8001504: 2b 8c 00 1c lw r12,(sp+28) 8001508: 2b 8d 00 18 lw r13,(sp+24) 800150c: 2b 8e 00 14 lw r14,(sp+20) 8001510: 2b 8f 00 10 lw r15,(sp+16) 8001514: 2b 90 00 0c lw r16,(sp+12) 8001518: 2b 91 00 08 lw r17,(sp+8) 800151c: 37 9c 00 34 addi sp,sp,52 8001520: c3 a0 00 00 ret * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; 8001524: f8 00 30 21 calli 800d5a8 <__errno> <== NOT EXECUTED 8001528: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 800152c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 8001530: b9 60 08 00 mv r1,r11 8001534: f8 00 18 e5 calli 80078c8 8001538: b9 a0 60 00 mv r12,r13 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 800153c: 29 81 00 0c lw r1,(r12+12) 8001540: 5c 20 00 1b bne r1,r0,80015ac 8001544: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8001548: e3 ff ff ec bi 80014f8 <== NOT EXECUTED /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 800154c: f8 00 30 17 calli 800d5a8 <__errno> 8001550: 34 02 00 10 mvi r2,16 8001554: 58 22 00 00 sw (r1+0),r2 goto cleanup_and_bail; 8001558: e3 ff ff f6 bi 8001530 if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); } else temp_mt_entry->dev = 0; 800155c: 58 2d 00 68 sw (r1+104),r13 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 8001560: 5d 80 ff ad bne r12,r0,8001414 * This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; 8001564: 59 6c 00 1c sw (r11+28),r12 temp_mt_entry->mt_fs_root.handlers = NULL; 8001568: 59 6c 00 24 sw (r11+36),r12 temp_mt_entry->mt_fs_root.ops = NULL; 800156c: 59 6c 00 28 sw (r11+40),r12 temp_mt_entry->mt_point_node.node_access = NULL; 8001570: 59 6c 00 08 sw (r11+8),r12 temp_mt_entry->mt_point_node.handlers = NULL; 8001574: 59 6c 00 10 sw (r11+16),r12 temp_mt_entry->mt_point_node.ops = NULL; 8001578: 59 6c 00 14 sw (r11+20),r12 temp_mt_entry->mt_point_node.mt_entry = NULL; 800157c: 59 6c 00 18 sw (r11+24),r12 8001580: e3 ff ff d1 bi 80014c4 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 8001584: 2b 81 00 30 lw r1,(sp+48) <== NOT EXECUTED 8001588: 28 22 00 28 lw r2,(r1+40) <== NOT EXECUTED 800158c: 44 40 00 03 be r2,r0,8001598 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 8001590: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8001594: d8 40 00 00 call r2 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 8001598: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800159c: f8 00 18 cb calli 80078c8 <== NOT EXECUTED if ( loc_to_free ) 80015a0: 5d 80 ff e7 bne r12,r0,800153c <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 80015a4: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80015a8: e3 ff ff d4 bi 80014f8 <== NOT EXECUTED 80015ac: 28 22 00 1c lw r2,(r1+28) 80015b0: 44 40 ff e5 be r2,r0,8001544 80015b4: b9 80 08 00 mv r1,r12 80015b8: d8 40 00 00 call r2 80015bc: 34 02 ff ff mvi r2,-1 80015c0: e3 ff ff ce bi 80014f8 80015c4: 2b 85 00 24 lw r5,(sp+36) <== NOT EXECUTED 80015c8: e3 ff ff b2 bi 8001490 <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 80015cc: f8 00 2f f7 calli 800d5a8 <__errno> 80015d0: 34 02 00 14 mvi r2,20 80015d4: 58 22 00 00 sw (r1+0),r2 goto cleanup_and_bail; 80015d8: e3 ff ff d6 bi 8001530 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 80015dc: f8 00 2f f3 calli 800d5a8 <__errno> <== NOT EXECUTED 80015e0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80015e4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80015e8: b9 60 88 00 mv r17,r11 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 80015ec: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 80015f0: f8 00 18 b6 calli 80078c8 <== NOT EXECUTED 80015f4: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80015f8: e3 ff ff c0 bi 80014f8 <== NOT EXECUTED if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 80015fc: f8 00 2f eb calli 800d5a8 <__errno> <== NOT EXECUTED 8001600: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8001604: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8001608: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED return -1; 800160c: e3 ff ff bb bi 80014f8 <== NOT EXECUTED 080016bc : */ int newlib_free_buffers( FILE *fp ) { 80016bc: 37 9c ff f4 addi sp,sp,-12 80016c0: 5b 8b 00 0c sw (sp+12),r11 80016c4: 5b 8c 00 08 sw (sp+8),r12 80016c8: 5b 9d 00 04 sw (sp+4),ra 80016cc: b8 20 58 00 mv r11,r1 switch ( fileno(fp) ) { 80016d0: f8 00 30 da calli 800da38 80016d4: 34 02 00 02 mvi r2,2 80016d8: 54 22 00 0b bgu r1,r2,8001704 case 0: case 1: case 2: if (fp->_flags & __SMBF) { 80016dc: 2d 61 00 0c lhu r1,(r11+12) 80016e0: 34 0c 00 00 mvi r12,0 80016e4: 20 21 00 80 andi r1,r1,0x80 80016e8: 5c 2c 00 0f bne r1,r12,8001724 break; default: fclose(fp); } return 0; } 80016ec: 34 01 00 00 mvi r1,0 80016f0: 2b 9d 00 04 lw ra,(sp+4) 80016f4: 2b 8b 00 0c lw r11,(sp+12) 80016f8: 2b 8c 00 08 lw r12,(sp+8) 80016fc: 37 9c 00 0c addi sp,sp,12 8001700: c3 a0 00 00 ret fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 8001704: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8001708: f8 00 30 0a calli 800d730 <== NOT EXECUTED } return 0; } 800170c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8001710: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8001714: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8001718: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 800171c: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8001720: c3 a0 00 00 ret <== NOT EXECUTED switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); 8001724: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8001728: f8 00 18 68 calli 80078c8 <== NOT EXECUTED fp->_flags &= ~__SMBF; 800172c: 2d 61 00 0c lhu r1,(r11+12) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 8001730: 59 6c 00 10 sw (r11+16),r12 <== NOT EXECUTED 8001734: 59 6c 00 00 sw (r11+0),r12 <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 8001738: 20 21 ff 7f andi r1,r1,0xff7f <== NOT EXECUTED 800173c: 0d 61 00 0c sh (r11+12),r1 <== NOT EXECUTED break; default: fclose(fp); } return 0; } 8001740: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8001744: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8001748: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 800174c: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8001750: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8001754: c3 a0 00 00 ret <== NOT EXECUTED 08001844 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 8001844: 37 9c ff f4 addi sp,sp,-12 8001848: 5b 8b 00 0c sw (sp+12),r11 800184c: 5b 8c 00 08 sw (sp+8),r12 8001850: 5b 9d 00 04 sw (sp+4),ra rtems_device_driver status; if ( !initialized ) { 8001854: 78 04 08 02 mvhi r4,0x802 8001858: 38 84 37 20 ori r4,r4,0x3720 800185c: 40 8b 00 00 lbu r11,(r4+0) rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 8001860: b8 20 60 00 mv r12,r1 rtems_device_driver status; if ( !initialized ) { 8001864: 45 60 00 07 be r11,r0,8001880 NULL_major = major; } return RTEMS_SUCCESSFUL; } 8001868: 34 01 00 00 mvi r1,0 800186c: 2b 9d 00 04 lw ra,(sp+4) 8001870: 2b 8b 00 0c lw r11,(sp+12) 8001874: 2b 8c 00 08 lw r12,(sp+8) 8001878: 37 9c 00 0c addi sp,sp,12 800187c: c3 a0 00 00 ret rtems_device_driver status; if ( !initialized ) { initialized = 1; status = rtems_io_register_name( 8001880: 78 01 08 02 mvhi r1,0x802 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 8001884: 34 05 00 01 mvi r5,1 status = rtems_io_register_name( 8001888: 38 21 09 ec ori r1,r1,0x9ec 800188c: b9 80 10 00 mv r2,r12 8001890: b9 60 18 00 mv r3,r11 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 8001894: 30 85 00 00 sb (r4+0),r5 status = rtems_io_register_name( 8001898: f8 00 00 56 calli 80019f0 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 800189c: 5c 2b 00 0a bne r1,r11,80018c4 rtems_fatal_error_occurred(status); NULL_major = major; 80018a0: 78 03 08 02 mvhi r3,0x802 80018a4: 38 63 37 c4 ori r3,r3,0x37c4 } return RTEMS_SUCCESSFUL; } 80018a8: 34 01 00 00 mvi r1,0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); NULL_major = major; 80018ac: 58 6c 00 00 sw (r3+0),r12 } return RTEMS_SUCCESSFUL; } 80018b0: 2b 9d 00 04 lw ra,(sp+4) 80018b4: 2b 8b 00 0c lw r11,(sp+12) 80018b8: 2b 8c 00 08 lw r12,(sp+8) 80018bc: 37 9c 00 0c addi sp,sp,12 80018c0: c3 a0 00 00 ret major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 80018c4: f8 00 08 90 calli 8003b04 <== NOT EXECUTED 08001828 : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 8001828: 44 60 00 03 be r3,r0,8001834 rw_args->bytes_moved = rw_args->count; 800182c: 28 61 00 14 lw r1,(r3+20) <== NOT EXECUTED 8001830: 58 61 00 1c sw (r3+28),r1 <== NOT EXECUTED return NULL_SUCCESSFUL; } 8001834: 34 01 00 00 mvi r1,0 8001838: c3 a0 00 00 ret 080019c0 : int open( const char *pathname, int flags, ... ) { 80019c0: 37 9c ff ac addi sp,sp,-84 80019c4: 5b 8b 00 24 sw (sp+36),r11 80019c8: 5b 8c 00 20 sw (sp+32),r12 80019cc: 5b 8d 00 1c sw (sp+28),r13 80019d0: 5b 8e 00 18 sw (sp+24),r14 80019d4: 5b 8f 00 14 sw (sp+20),r15 80019d8: 5b 90 00 10 sw (sp+16),r16 80019dc: 5b 91 00 0c sw (sp+12),r17 80019e0: 5b 92 00 08 sw (sp+8),r18 80019e4: 5b 9d 00 04 sw (sp+4),ra /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 80019e8: 34 49 00 01 addi r9,r2,1 int open( const char *pathname, int flags, ... ) { 80019ec: b8 40 60 00 mv r12,r2 80019f0: 5b 82 00 3c sw (sp+60),r2 80019f4: 5b 83 00 40 sw (sp+64),r3 80019f8: 5b 84 00 44 sw (sp+68),r4 80019fc: 5b 85 00 48 sw (sp+72),r5 8001a00: 5b 86 00 4c sw (sp+76),r6 8001a04: 5b 87 00 50 sw (sp+80),r7 8001a08: 5b 88 00 54 sw (sp+84),r8 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 8001a0c: 21 22 00 01 andi r2,r9,0x1 int open( const char *pathname, int flags, ... ) { 8001a10: b8 20 78 00 mv r15,r1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 8001a14: 34 0d 00 04 mvi r13,4 8001a18: 5c 40 00 02 bne r2,r0,8001a20 8001a1c: b8 40 68 00 mv r13,r2 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 8001a20: 21 29 00 02 andi r9,r9,0x2 8001a24: 45 20 00 02 be r9,r0,8001a2c eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 8001a28: 39 ad 00 02 ori r13,r13,0x2 va_start(ap, flags); mode = va_arg( ap, int ); 8001a2c: 2b 91 00 40 lw r17,(sp+64) * code does not require changes here since network file * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); 8001a30: f8 00 18 f1 calli 8007df4 8001a34: b8 20 58 00 mv r11,r1 if ( iop == 0 ) { 8001a38: 34 0e 00 17 mvi r14,23 8001a3c: 44 20 00 53 be r1,r0,8001b88 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 8001a40: b9 e0 08 00 mv r1,r15 8001a44: f8 00 33 a9 calli 800e8e8 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 8001a48: 37 90 00 28 addi r16,sp,40 8001a4c: b8 20 10 00 mv r2,r1 8001a50: b9 a0 18 00 mv r3,r13 8001a54: b9 e0 08 00 mv r1,r15 8001a58: ba 00 20 00 mv r4,r16 8001a5c: 34 05 00 01 mvi r5,1 8001a60: fb ff fd 1b calli 8000ecc pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 8001a64: 34 02 ff ff mvi r2,-1 8001a68: 44 22 00 4f be r1,r2,8001ba4 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 8001a6c: 21 82 0a 00 andi r2,r12,0xa00 8001a70: 34 01 0a 00 mvi r1,2560 8001a74: ba 00 68 00 mv r13,r16 8001a78: 34 0e 00 11 mvi r14,17 8001a7c: 44 41 00 39 be r2,r1,8001b60 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 8001a80: 2b 81 00 30 lw r1,(sp+48) iop->file_info = loc.node_access; 8001a84: 2b 82 00 28 lw r2,(sp+40) iop->flags |= rtems_libio_fcntl_flags( flags ); 8001a88: 29 6d 00 18 lw r13,(r11+24) /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 8001a8c: 59 61 00 40 sw (r11+64),r1 iop->file_info = loc.node_access; 8001a90: 59 62 00 3c sw (r11+60),r2 iop->flags |= rtems_libio_fcntl_flags( flags ); 8001a94: b9 80 08 00 mv r1,r12 8001a98: f8 00 19 10 calli 8007ed8 iop->pathinfo = loc; 8001a9c: 2b 83 00 28 lw r3,(sp+40) * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 8001aa0: b8 2d 08 00 or r1,r1,r13 8001aa4: 59 61 00 18 sw (r11+24),r1 iop->pathinfo = loc; 8001aa8: 59 63 00 1c sw (r11+28),r3 8001aac: 2b 83 00 2c lw r3,(sp+44) if ( !iop->handlers || !iop->handlers->open_h ) { 8001ab0: 29 62 00 40 lw r2,(r11+64) */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 8001ab4: 59 63 00 20 sw (r11+32),r3 8001ab8: 2b 81 00 30 lw r1,(sp+48) 8001abc: 59 61 00 24 sw (r11+36),r1 8001ac0: 2b 83 00 34 lw r3,(sp+52) 8001ac4: 59 63 00 28 sw (r11+40),r3 8001ac8: 2b 81 00 38 lw r1,(sp+56) 8001acc: 59 61 00 2c sw (r11+44),r1 if ( !iop->handlers || !iop->handlers->open_h ) { 8001ad0: 44 40 00 32 be r2,r0,8001b98 8001ad4: 28 45 00 00 lw r5,(r2+0) 8001ad8: 44 a0 00 30 be r5,r0,8001b98 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 8001adc: b9 e0 10 00 mv r2,r15 8001ae0: ba 20 20 00 mv r4,r17 8001ae4: b9 60 08 00 mv r1,r11 8001ae8: b9 80 18 00 mv r3,r12 8001aec: d8 a0 00 00 call r5 8001af0: b8 20 68 00 mv r13,r1 if ( rc ) { 8001af4: 5c 20 00 17 bne r1,r0,8001b50 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 8001af8: 21 8c 04 00 andi r12,r12,0x400 8001afc: 5d 81 00 33 bne r12,r1,8001bc8 8001b00: 78 0c 08 01 mvhi r12,0x801 8001b04: 39 8c e7 18 ori r12,r12,0xe718 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 8001b08: 29 81 00 00 lw r1,(r12+0) 8001b0c: 34 02 00 03 mvi r2,3 8001b10: c9 61 08 00 sub r1,r11,r1 8001b14: fb ff fa 07 calli 8000330 <__ashrsi3> 8001b18: 78 02 38 e3 mvhi r2,0x38e3 8001b1c: 38 42 8e 39 ori r2,r2,0x8e39 8001b20: f8 00 66 87 calli 801b53c <__mulsi3> } 8001b24: 2b 9d 00 04 lw ra,(sp+4) 8001b28: 2b 8b 00 24 lw r11,(sp+36) 8001b2c: 2b 8c 00 20 lw r12,(sp+32) 8001b30: 2b 8d 00 1c lw r13,(sp+28) 8001b34: 2b 8e 00 18 lw r14,(sp+24) 8001b38: 2b 8f 00 14 lw r15,(sp+20) 8001b3c: 2b 90 00 10 lw r16,(sp+16) 8001b40: 2b 91 00 0c lw r17,(sp+12) 8001b44: 2b 92 00 08 lw r18,(sp+8) 8001b48: 37 9c 00 54 addi sp,sp,84 8001b4c: c3 a0 00 00 ret goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 8001b50: f8 00 2e 96 calli 800d5a8 <__errno> 8001b54: 28 2e 00 00 lw r14,(r1+0) 8001b58: ba 00 68 00 mv r13,r16 */ done: va_end(ap); if ( rc ) { 8001b5c: 45 c0 ff e9 be r14,r0,8001b00 if ( iop ) 8001b60: 45 60 00 03 be r11,r0,8001b6c rtems_libio_free( iop ); 8001b64: b9 60 08 00 mv r1,r11 8001b68: f8 00 18 85 calli 8007d7c if ( loc_to_free ) 8001b6c: 45 a0 00 07 be r13,r0,8001b88 rtems_filesystem_freenode( loc_to_free ); 8001b70: 29 a1 00 0c lw r1,(r13+12) 8001b74: 44 20 00 05 be r1,r0,8001b88 8001b78: 28 22 00 1c lw r2,(r1+28) 8001b7c: 44 40 00 03 be r2,r0,8001b88 8001b80: b9 a0 08 00 mv r1,r13 8001b84: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( rc ); 8001b88: f8 00 2e 88 calli 800d5a8 <__errno> 8001b8c: 58 2e 00 00 sw (r1+0),r14 8001b90: 34 01 ff ff mvi r1,-1 8001b94: e3 ff ff e4 bi 8001b24 } return iop - rtems_libio_iops; 8001b98: ba 00 68 00 mv r13,r16 <== NOT EXECUTED 8001b9c: 34 0e 00 86 mvi r14,134 <== NOT EXECUTED 8001ba0: e3 ff ff f0 bi 8001b60 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 8001ba4: f8 00 2e 81 calli 800d5a8 <__errno> 8001ba8: 28 2e 00 00 lw r14,(r1+0) 8001bac: 34 01 00 02 mvi r1,2 8001bb0: 45 c1 00 22 be r14,r1,8001c38 } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 8001bb4: f8 00 2e 7d calli 800d5a8 <__errno> 8001bb8: 28 2e 00 00 lw r14,(r1+0) 8001bbc: 34 0d 00 00 mvi r13,0 */ done: va_end(ap); if ( rc ) { 8001bc0: 45 c0 ff d0 be r14,r0,8001b00 8001bc4: e3 ff ff e7 bi 8001b60 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 8001bc8: 78 0c 08 01 mvhi r12,0x801 8001bcc: 39 8c e7 18 ori r12,r12,0xe718 8001bd0: 29 81 00 00 lw r1,(r12+0) 8001bd4: 34 02 00 03 mvi r2,3 8001bd8: c9 61 08 00 sub r1,r11,r1 8001bdc: fb ff f9 d5 calli 8000330 <__ashrsi3> 8001be0: 78 02 38 e3 mvhi r2,0x38e3 8001be4: 38 42 8e 39 ori r2,r2,0x8e39 8001be8: f8 00 66 55 calli 801b53c <__mulsi3> 8001bec: b9 a0 10 00 mv r2,r13 8001bf0: f8 00 17 64 calli 8007980 8001bf4: b8 20 70 00 mv r14,r1 if ( rc ) { 8001bf8: 44 20 ff c4 be r1,r0,8001b08 if(errno) rc = errno; 8001bfc: f8 00 2e 6b calli 800d5a8 <__errno> <== NOT EXECUTED 8001c00: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8001c04: 5c 20 00 23 bne r1,r0,8001c90 <== NOT EXECUTED close( iop - rtems_libio_iops ); 8001c08: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8001c0c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8001c10: c9 61 08 00 sub r1,r11,r1 <== NOT EXECUTED 8001c14: fb ff f9 c7 calli 8000330 <__ashrsi3> <== NOT EXECUTED 8001c18: 78 02 38 e3 mvhi r2,0x38e3 <== NOT EXECUTED 8001c1c: 38 42 8e 39 ori r2,r2,0x8e39 <== NOT EXECUTED 8001c20: f8 00 66 47 calli 801b53c <__mulsi3> <== NOT EXECUTED 8001c24: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 8001c28: f8 00 16 f0 calli 80077e8 <== NOT EXECUTED 8001c2c: b9 60 68 00 mv r13,r11 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 8001c30: 45 c0 ff b4 be r14,r0,8001b00 <== NOT EXECUTED 8001c34: e3 ff ff cb bi 8001b60 <== NOT EXECUTED rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 8001c38: 21 81 02 00 andi r1,r12,0x200 8001c3c: b8 20 68 00 mv r13,r1 8001c40: 44 20 ff c8 be r1,r0,8001b60 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 8001c44: 34 03 00 00 mvi r3,0 8001c48: b9 e0 08 00 mv r1,r15 8001c4c: 3a 22 80 00 ori r2,r17,0x8000 8001c50: b8 60 20 00 mv r4,r3 8001c54: fb ff fd 5c calli 80011c4 8001c58: b8 20 90 00 mv r18,r1 if ( rc ) { 8001c5c: 5c 20 ff d6 bne r1,r0,8001bb4 rc = errno; goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 8001c60: b9 e0 08 00 mv r1,r15 8001c64: f8 00 33 21 calli 800e8e8 8001c68: b8 20 10 00 mv r2,r1 8001c6c: ba 40 18 00 mv r3,r18 8001c70: b9 e0 08 00 mv r1,r15 8001c74: ba 00 20 00 mv r4,r16 8001c78: 34 05 00 01 mvi r5,1 8001c7c: fb ff fc 94 calli 8000ecc if ( status != 0 ) { /* The file did not exist */ 8001c80: ba 40 68 00 mv r13,r18 8001c84: 34 0e 00 0d mvi r14,13 8001c88: 5c 32 ff b6 bne r1,r18,8001b60 8001c8c: e3 ff ff 7d bi 8001a80 */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 8001c90: f8 00 2e 46 calli 800d5a8 <__errno> <== NOT EXECUTED 8001c94: 28 2e 00 00 lw r14,(r1+0) <== NOT EXECUTED 8001c98: e3 ff ff dc bi 8001c08 <== NOT EXECUTED 08001940 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 8001940: 37 9c ff f8 addi sp,sp,-8 8001944: 5b 8b 00 08 sw (sp+8),r11 8001948: 5b 9d 00 04 sw (sp+4),ra int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 800194c: 34 02 00 00 mvi r2,0 8001950: 78 01 08 01 mvhi r1,0x801 8001954: 38 21 ca 00 ori r1,r1,0xca00 8001958: b8 40 18 00 mv r3,r2 800195c: f8 00 00 19 calli 80019c0 8001960: 34 0b ff ff mvi r11,-1 8001964: 44 2b 00 0d be r1,r11,8001998 /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 8001968: 78 01 08 01 mvhi r1,0x801 800196c: 38 21 ca 00 ori r1,r1,0xca00 8001970: 34 02 00 01 mvi r2,1 8001974: 34 03 00 00 mvi r3,0 8001978: f8 00 00 12 calli 80019c0 800197c: 44 2b 00 0b be r1,r11,80019a8 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 8001980: 78 01 08 01 mvhi r1,0x801 8001984: 38 21 ca 00 ori r1,r1,0xca00 8001988: 34 02 00 01 mvi r2,1 800198c: 34 03 00 00 mvi r3,0 8001990: f8 00 00 0c calli 80019c0 8001994: 44 2b 00 08 be r1,r11,80019b4 rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ } 8001998: 2b 9d 00 04 lw ra,(sp+4) 800199c: 2b 8b 00 08 lw r11,(sp+8) 80019a0: 37 9c 00 08 addi sp,sp,8 80019a4: c3 a0 00 00 ret /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 80019a8: 78 01 55 54 mvhi r1,0x5554 <== NOT EXECUTED 80019ac: 38 21 44 31 ori r1,r1,0x4431 <== NOT EXECUTED 80019b0: f8 00 03 e3 calli 800293c <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 80019b4: 78 01 55 54 mvhi r1,0x5554 <== NOT EXECUTED 80019b8: 38 21 44 32 ori r1,r1,0x4432 <== NOT EXECUTED 80019bc: f8 00 03 e0 calli 800293c <== NOT EXECUTED 080043f8 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 80043f8: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED 80043fc: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8004400: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8004404: b8 40 58 00 mv r11,r2 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { 8004408: 28 42 00 34 lw r2,(r2+52) <== NOT EXECUTED /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 800440c: 33 81 00 0c sb (sp+12),r1 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { 8004410: 20 41 00 01 andi r1,r2,0x1 <== NOT EXECUTED 8004414: 44 20 00 0b be r1,r0,8004440 <== NOT EXECUTED switch (c) { 8004418: 43 81 00 0c lbu r1,(sp+12) <== NOT EXECUTED 800441c: 34 03 00 09 mvi r3,9 <== NOT EXECUTED 8004420: 44 23 00 2f be r1,r3,80044dc <== NOT EXECUTED 8004424: 54 23 00 0f bgu r1,r3,8004460 <== NOT EXECUTED 8004428: 34 03 00 08 mvi r3,8 <== NOT EXECUTED 800442c: 5c 23 00 11 bne r1,r3,8004470 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 8004430: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004434: 4c 01 00 03 bge r0,r1,8004440 <== NOT EXECUTED tty->column--; 8004438: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 800443c: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 8004440: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8004444: 37 81 00 0c addi r1,sp,12 <== NOT EXECUTED 8004448: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800444c: fb ff ff 90 calli 800428c <== NOT EXECUTED } 8004450: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004454: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8004458: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 800445c: c3 a0 00 00 ret <== NOT EXECUTED oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 8004460: 34 03 00 0a mvi r3,10 <== NOT EXECUTED 8004464: 44 23 00 10 be r1,r3,80044a4 <== NOT EXECUTED 8004468: 34 03 00 0d mvi r3,13 <== NOT EXECUTED 800446c: 44 23 00 26 be r1,r3,8004504 <== NOT EXECUTED if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 8004470: 20 42 00 02 andi r2,r2,0x2 <== NOT EXECUTED 8004474: 5c 40 00 31 bne r2,r0,8004538 <== NOT EXECUTED 8004478: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 800447c: 38 42 63 0c ori r2,r2,0x630c <== NOT EXECUTED 8004480: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED c = toupper(c); if (!iscntrl(c)) 8004484: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 8004488: 40 21 00 01 lbu r1,(r1+1) <== NOT EXECUTED 800448c: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 8004490: 5c 20 ff ec bne r1,r0,8004440 <== NOT EXECUTED tty->column++; 8004494: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004498: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 800449c: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED 80044a0: e3 ff ff e8 bi 8004440 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 80044a4: 20 41 00 20 andi r1,r2,0x20 <== NOT EXECUTED 80044a8: 44 20 00 03 be r1,r0,80044b4 <== NOT EXECUTED tty->column = 0; 80044ac: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80044b0: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 80044b4: 20 42 00 04 andi r2,r2,0x4 <== NOT EXECUTED 80044b8: 44 40 ff e2 be r2,r0,8004440 <== NOT EXECUTED rtems_termios_puts ("\r", 1, tty); 80044bc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80044c0: 38 21 3f 24 ori r1,r1,0x3f24 <== NOT EXECUTED 80044c4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80044c8: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 80044cc: fb ff ff 70 calli 800428c <== NOT EXECUTED tty->column = 0; 80044d0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80044d4: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED 80044d8: e3 ff ff da bi 8004440 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 80044dc: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 80044e0: 34 03 00 08 mvi r3,8 <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { 80044e4: 20 44 18 00 andi r4,r2,0x1800 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 80044e8: 20 22 00 07 andi r2,r1,0x7 <== NOT EXECUTED 80044ec: c8 62 10 00 sub r2,r3,r2 <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { 80044f0: 34 03 18 00 mvi r3,6144 <== NOT EXECUTED 80044f4: 44 83 00 1f be r4,r3,8004570 <== NOT EXECUTED tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 80044f8: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 80044fc: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED break; 8004500: e3 ff ff d0 bi 8004440 <== NOT EXECUTED tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 8004504: 20 41 00 10 andi r1,r2,0x10 <== NOT EXECUTED 8004508: 44 20 00 03 be r1,r0,8004514 <== NOT EXECUTED 800450c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004510: 44 20 ff d0 be r1,r0,8004450 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 8004514: 20 41 00 08 andi r1,r2,0x8 <== NOT EXECUTED 8004518: 44 20 ff e1 be r1,r0,800449c <== NOT EXECUTED c = '\n'; 800451c: 34 01 00 0a mvi r1,10 <== NOT EXECUTED 8004520: 33 81 00 0c sb (sp+12),r1 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 8004524: 20 42 00 20 andi r2,r2,0x20 <== NOT EXECUTED 8004528: 44 40 ff c6 be r2,r0,8004440 <== NOT EXECUTED tty->column = 0; 800452c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8004530: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED 8004534: e3 ff ff c3 bi 8004440 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 8004538: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 800453c: 38 42 63 0c ori r2,r2,0x630c <== NOT EXECUTED 8004540: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 8004544: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 8004548: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 800454c: 40 24 00 01 lbu r4,(r1+1) <== NOT EXECUTED 8004550: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8004554: 20 84 00 03 andi r4,r4,0x3 <== NOT EXECUTED 8004558: 44 81 00 04 be r4,r1,8004568 <== NOT EXECUTED 800455c: 20 61 00 ff andi r1,r3,0xff <== NOT EXECUTED 8004560: 33 81 00 0c sb (sp+12),r1 <== NOT EXECUTED 8004564: e3 ff ff c8 bi 8004484 <== NOT EXECUTED 8004568: 34 63 ff e0 addi r3,r3,-32 <== NOT EXECUTED 800456c: e3 ff ff fc bi 800455c <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 8004570: b4 41 18 00 add r3,r2,r1 <== NOT EXECUTED rtems_termios_puts ( " ", i, tty); 8004574: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 8004578: 59 63 00 28 sw (r11+40),r3 <== NOT EXECUTED rtems_termios_puts ( " ", i, tty); 800457c: 38 21 3f 28 ori r1,r1,0x3f28 <== NOT EXECUTED 8004580: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8004584: fb ff ff 42 calli 800428c <== NOT EXECUTED return; 8004588: e3 ff ff b2 bi 8004450 <== NOT EXECUTED 0800c88c : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 800c88c: 37 9c ff c4 addi sp,sp,-60 800c890: 5b 8b 00 18 sw (sp+24),r11 800c894: 5b 8c 00 14 sw (sp+20),r12 800c898: 5b 8d 00 10 sw (sp+16),r13 800c89c: 5b 8e 00 0c sw (sp+12),r14 800c8a0: 5b 8f 00 08 sw (sp+8),r15 800c8a4: 5b 9d 00 04 sw (sp+4),ra 800c8a8: 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) 800c8ac: 37 8b 00 1c addi r11,sp,28 800c8b0: 78 01 08 01 mvhi r1,0x801 800c8b4: 34 02 00 03 mvi r2,3 800c8b8: 38 21 d1 48 ori r1,r1,0xd148 800c8bc: 34 03 00 07 mvi r3,7 800c8c0: b9 60 20 00 mv r4,r11 800c8c4: 34 05 00 01 mvi r5,1 800c8c8: fb ff d1 81 calli 8000ecc 800c8cc: b8 20 10 00 mv r2,r1 800c8d0: 5c 20 00 46 bne r1,r0,800c9e8 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc); 800c8d4: 2b 81 00 28 lw r1,(sp+40) <== NOT EXECUTED 800c8d8: 44 22 00 05 be r1,r2,800c8ec <== NOT EXECUTED 800c8dc: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800c8e0: 44 40 00 03 be r2,r0,800c8ec <== NOT EXECUTED 800c8e4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800c8e8: d8 40 00 00 call r2 <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 800c8ec: 78 04 08 01 mvhi r4,0x801 800c8f0: 38 84 e6 aa ori r4,r4,0xe6aa 800c8f4: 2c 81 00 00 lhu r1,(r4+0) else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 800c8f8: 78 06 2f 74 mvhi r6,0x2f74 800c8fc: 78 05 2f 2e mvhi r5,0x2f2e sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 800c900: 34 28 00 01 addi r8,r1,1 800c904: 78 02 08 01 mvhi r2,0x801 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 800c908: 38 c6 6d 70 ori r6,r6,0x6d70 800c90c: 38 a5 66 69 ori r5,r5,0x6669 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 800c910: b8 20 18 00 mv r3,r1 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 800c914: 37 8b 00 30 addi r11,sp,48 800c918: 34 07 66 6f mvi r7,26223 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 800c91c: 38 42 d1 50 ori r2,r2,0xd150 800c920: 0c 88 00 00 sh (r4+0),r8 800c924: 37 81 00 3a addi r1,sp,58 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 800c928: 5b 86 00 30 sw (sp+48),r6 800c92c: 59 65 00 04 sw (r11+4),r5 800c930: 0d 67 00 08 sh (r11+8),r7 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 800c934: f8 00 06 c3 calli 800e440 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 800c938: b9 60 08 00 mv r1,r11 800c93c: 34 02 01 80 mvi r2,384 800c940: f8 00 00 5e calli 800cab8 800c944: b8 20 60 00 mv r12,r1 800c948: 5c 20 00 1e bne r1,r0,800c9c0 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); 800c94c: b9 60 08 00 mv r1,r11 800c950: 34 02 40 00 mvi r2,16384 800c954: fb ff d4 1b calli 80019c0 800c958: 59 a1 00 00 sw (r13+0),r1 if (filsdes[0] < 0) { 800c95c: 4c 2c 00 06 bge r1,r12,800c974 err = errno; 800c960: f8 00 03 12 calli 800d5a8 <__errno> 800c964: 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); 800c968: b9 60 08 00 mv r1,r11 800c96c: f8 00 00 5c calli 800cadc 800c970: e0 00 00 11 bi 800c9b4 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 800c974: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED 800c978: 38 63 e0 10 ori r3,r3,0xe010 <== NOT EXECUTED 800c97c: 28 63 00 00 lw r3,(r3+0) <== NOT EXECUTED 800c980: 54 61 00 24 bgu r3,r1,800ca10 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 800c984: 29 83 00 18 lw r3,(r12+24) <== NOT EXECUTED 800c988: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 800c98c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 800c990: a0 62 10 00 and r2,r3,r2 <== NOT EXECUTED 800c994: 59 82 00 18 sw (r12+24),r2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 800c998: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800c99c: fb ff d4 09 calli 80019c0 <== NOT EXECUTED 800c9a0: 59 a1 00 04 sw (r13+4),r1 <== NOT EXECUTED if (filsdes[1] < 0) { 800c9a4: 48 01 00 26 bg r0,r1,800ca3c <== NOT EXECUTED 800c9a8: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 800c9ac: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800c9b0: f8 00 00 4b calli 800cadc <== NOT EXECUTED } rtems_set_errno_and_return_minus_one(err); 800c9b4: f8 00 02 fd calli 800d5a8 <__errno> 800c9b8: 58 2c 00 00 sw (r1+0),r12 800c9bc: e0 00 00 02 bi 800c9c4 memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { if (errno != EEXIST){ 800c9c0: f8 00 02 fa calli 800d5a8 <__errno> <== NOT EXECUTED } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 800c9c4: 34 01 ff ff mvi r1,-1 800c9c8: 2b 9d 00 04 lw ra,(sp+4) 800c9cc: 2b 8b 00 18 lw r11,(sp+24) 800c9d0: 2b 8c 00 14 lw r12,(sp+20) 800c9d4: 2b 8d 00 10 lw r13,(sp+16) 800c9d8: 2b 8e 00 0c lw r14,(sp+12) 800c9dc: 2b 8f 00 08 lw r15,(sp+8) 800c9e0: 37 9c 00 3c addi sp,sp,60 800c9e4: c3 a0 00 00 ret rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) != 0) { if (errno != ENOENT) 800c9e8: f8 00 02 f0 calli 800d5a8 <__errno> 800c9ec: 28 22 00 00 lw r2,(r1+0) 800c9f0: 34 01 00 02 mvi r1,2 800c9f4: 5c 41 ff f4 bne r2,r1,800c9c4 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 800c9f8: 78 01 08 01 mvhi r1,0x801 800c9fc: 38 21 d1 48 ori r1,r1,0xd148 800ca00: 34 02 03 ff mvi r2,1023 800ca04: fb ff d1 e7 calli 80011a0 800ca08: 44 20 ff b9 be r1,r0,800c8ec 800ca0c: e3 ff ff ee bi 800c9c4 <== NOT EXECUTED the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 800ca10: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 800ca14: fb ff cd f7 calli 80001f0 <__ashlsi3> <== NOT EXECUTED 800ca18: 78 0e 08 01 mvhi r14,0x801 <== NOT EXECUTED 800ca1c: 39 ce e7 18 ori r14,r14,0xe718 <== NOT EXECUTED 800ca20: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 800ca24: b8 20 78 00 mv r15,r1 <== NOT EXECUTED 800ca28: fb ff cd f2 calli 80001f0 <__ashlsi3> <== NOT EXECUTED 800ca2c: 29 cc 00 00 lw r12,(r14+0) <== NOT EXECUTED 800ca30: b5 e1 08 00 add r1,r15,r1 <== NOT EXECUTED 800ca34: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED 800ca38: e3 ff ff d3 bi 800c984 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; 800ca3c: f8 00 02 db calli 800d5a8 <__errno> <== NOT EXECUTED 800ca40: 28 2c 00 00 lw r12,(r1+0) <== NOT EXECUTED close(filsdes[0]); 800ca44: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 800ca48: fb ff eb 68 calli 80077e8 <== NOT EXECUTED 800ca4c: e3 ff ff d8 bi 800c9ac <== NOT EXECUTED 0800a9cc : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 800a9cc: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 800a9d0: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 800a9d4: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 800a9d8: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 800a9dc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED if (cmd == FIONREAD) { 800a9e0: 78 04 40 04 mvhi r4,0x4004 <== NOT EXECUTED 800a9e4: 38 84 66 7f ori r4,r4,0x667f <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 800a9e8: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 800a9ec: b8 60 60 00 mv r12,r3 <== NOT EXECUTED if (cmd == FIONREAD) { 800a9f0: 34 05 ff ea mvi r5,-22 <== NOT EXECUTED 800a9f4: 44 44 00 08 be r2,r4,800aa14 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 800a9f8: b8 a0 08 00 mv r1,r5 <== NOT EXECUTED 800a9fc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800aa00: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 800aa04: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 800aa08: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 800aa0c: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 800aa10: c3 a0 00 00 ret <== NOT EXECUTED void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 800aa14: 34 05 ff f2 mvi r5,-14 <== NOT EXECUTED 800aa18: 44 60 ff f8 be r3,r0,800a9f8 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 800aa1c: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED 800aa20: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800aa24: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800aa28: fb ff f8 f6 calli 8008e00 <== NOT EXECUTED 800aa2c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 800aa30: 34 05 ff fc mvi r5,-4 <== NOT EXECUTED 800aa34: 5c 20 ff f1 bne r1,r0,800a9f8 <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 800aa38: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED 800aa3c: 59 81 00 00 sw (r12+0),r1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 800aa40: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800aa44: fb ff f9 50 calli 8008f84 <== NOT EXECUTED 800aa48: b9 a0 28 00 mv r5,r13 <== NOT EXECUTED return 0; 800aa4c: e3 ff ff eb bi 800a9f8 <== NOT EXECUTED 0800a948 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 800a948: 34 01 ff e3 mvi r1,-29 <== NOT EXECUTED 800a94c: c3 a0 00 00 ret <== NOT EXECUTED 0800aa50 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 800aa50: 37 9c ff d8 addi sp,sp,-40 <== NOT EXECUTED 800aa54: 5b 8b 00 24 sw (sp+36),r11 <== NOT EXECUTED 800aa58: 5b 8c 00 20 sw (sp+32),r12 <== NOT EXECUTED 800aa5c: 5b 8d 00 1c sw (sp+28),r13 <== NOT EXECUTED 800aa60: 5b 8e 00 18 sw (sp+24),r14 <== NOT EXECUTED 800aa64: 5b 8f 00 14 sw (sp+20),r15 <== NOT EXECUTED 800aa68: 5b 90 00 10 sw (sp+16),r16 <== NOT EXECUTED 800aa6c: 5b 91 00 0c sw (sp+12),r17 <== NOT EXECUTED 800aa70: 5b 92 00 08 sw (sp+8),r18 <== NOT EXECUTED 800aa74: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800aa78: b8 20 58 00 mv r11,r1 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 800aa7c: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 800aa80: b8 40 90 00 mv r18,r2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 800aa84: 34 02 00 00 mvi r2,0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 800aa88: b8 60 80 00 mv r16,r3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 800aa8c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 800aa90: b8 80 78 00 mv r15,r4 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 800aa94: fb ff f8 db calli 8008e00 <== NOT EXECUTED 800aa98: 34 0e ff fc mvi r14,-4 <== NOT EXECUTED 800aa9c: 5c 20 00 24 bne r1,r0,800ab2c <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 800aaa0: b8 20 88 00 mv r17,r1 <== NOT EXECUTED 800aaa4: b8 20 70 00 mv r14,r1 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 800aaa8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 800aaac: 46 01 00 1c be r16,r1,800ab1c <== NOT EXECUTED while (PIPE_EMPTY(pipe)) { 800aab0: 29 65 00 0c lw r5,(r11+12) <== NOT EXECUTED 800aab4: 5c a0 00 41 bne r5,r0,800abb8 <== NOT EXECUTED /* Not an error */ if (pipe->Writers == 0) 800aab8: 29 64 00 14 lw r4,(r11+20) <== NOT EXECUTED 800aabc: 44 85 00 3d be r4,r5,800abb0 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 800aac0: 29 ed 00 18 lw r13,(r15+24) <== NOT EXECUTED 800aac4: 21 ad 00 01 andi r13,r13,0x1 <== NOT EXECUTED 800aac8: 5d a0 00 4f bne r13,r0,800ac04 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 800aacc: 29 64 00 18 lw r4,(r11+24) <== NOT EXECUTED PIPE_UNLOCK(pipe); 800aad0: 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 ++; 800aad4: 34 84 00 01 addi r4,r4,1 <== NOT EXECUTED 800aad8: 59 64 00 18 sw (r11+24),r4 <== NOT EXECUTED PIPE_UNLOCK(pipe); 800aadc: fb ff f9 2a calli 8008f84 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 800aae0: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800aae4: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 800aae8: f8 00 05 4a calli 800c010 <== NOT EXECUTED 800aaec: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 800aaf0: 44 2d 00 02 be r1,r13,800aaf8 <== NOT EXECUTED 800aaf4: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800aaf8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800aafc: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800ab00: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800ab04: fb ff f8 bf calli 8008e00 <== NOT EXECUTED 800ab08: 5c 20 00 41 bne r1,r0,800ac0c <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 800ab0c: 29 64 00 18 lw r4,(r11+24) <== NOT EXECUTED 800ab10: 34 84 ff ff addi r4,r4,-1 <== NOT EXECUTED 800ab14: 59 64 00 18 sw (r11+24),r4 <== NOT EXECUTED if (ret != 0) 800ab18: 45 81 ff e6 be r12,r1,800aab0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 800ab1c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800ab20: fb ff f9 19 calli 8008f84 <== NOT EXECUTED out_nolock: if (read > 0) 800ab24: 49 c0 00 02 bg r14,r0,800ab2c <== NOT EXECUTED 800ab28: b9 80 70 00 mv r14,r12 <== NOT EXECUTED return read; return ret; } 800ab2c: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 800ab30: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800ab34: 2b 8b 00 24 lw r11,(sp+36) <== NOT EXECUTED 800ab38: 2b 8c 00 20 lw r12,(sp+32) <== NOT EXECUTED 800ab3c: 2b 8d 00 1c lw r13,(sp+28) <== NOT EXECUTED 800ab40: 2b 8e 00 18 lw r14,(sp+24) <== NOT EXECUTED 800ab44: 2b 8f 00 14 lw r15,(sp+20) <== NOT EXECUTED 800ab48: 2b 90 00 10 lw r16,(sp+16) <== NOT EXECUTED 800ab4c: 2b 91 00 0c lw r17,(sp+12) <== NOT EXECUTED 800ab50: 2b 92 00 08 lw r18,(sp+8) <== NOT EXECUTED 800ab54: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED 800ab58: c3 a0 00 00 ret <== NOT EXECUTED if (chunk > chunk1) { memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 800ab5c: 29 64 00 00 lw r4,(r11+0) <== NOT EXECUTED 800ab60: b6 51 08 00 add r1,r18,r17 <== NOT EXECUTED 800ab64: b9 80 18 00 mv r3,r12 <== NOT EXECUTED 800ab68: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED 800ab6c: f8 00 0d 35 calli 800e040 <== NOT EXECUTED pipe->Start += chunk; 800ab70: 29 61 00 08 lw r1,(r11+8) <== NOT EXECUTED pipe->Start %= pipe->Size; 800ab74: 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; 800ab78: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 800ab7c: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED pipe->Start %= pipe->Size; 800ab80: f8 00 42 fe calli 801b778 <__umodsi3> <== NOT EXECUTED pipe->Length -= chunk; 800ab84: 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; 800ab88: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED pipe->Length -= chunk; 800ab8c: c8 4c 08 00 sub r1,r2,r12 <== NOT EXECUTED 800ab90: 59 61 00 0c sw (r11+12),r1 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 800ab94: 5c 20 00 02 bne r1,r0,800ab9c <== NOT EXECUTED pipe->Start = 0; 800ab98: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED if (pipe->waitingWriters > 0) 800ab9c: 29 61 00 1c lw r1,(r11+28) <== NOT EXECUTED 800aba0: 5c 20 00 1e bne r1,r0,800ac18 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; 800aba4: b5 cc 70 00 add r14,r14,r12 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 800aba8: b9 c0 88 00 mv r17,r14 <== NOT EXECUTED 800abac: 56 0e ff c1 bgu r16,r14,800aab0 <== NOT EXECUTED 800abb0: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 800abb4: e3 ff ff da bi 800ab1c <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 800abb8: ca 11 08 00 sub r1,r16,r17 <== NOT EXECUTED 800abbc: b8 a0 60 00 mv r12,r5 <== NOT EXECUTED 800abc0: 50 25 00 02 bgeu r1,r5,800abc8 <== NOT EXECUTED 800abc4: b8 20 60 00 mv r12,r1 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 800abc8: 29 62 00 08 lw r2,(r11+8) <== NOT EXECUTED 800abcc: 29 6d 00 04 lw r13,(r11+4) <== NOT EXECUTED 800abd0: c9 a2 68 00 sub r13,r13,r2 <== NOT EXECUTED if (chunk > chunk1) { 800abd4: 4d ac ff e2 bge r13,r12,800ab5c <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 800abd8: 29 64 00 00 lw r4,(r11+0) <== NOT EXECUTED 800abdc: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 800abe0: b6 51 08 00 add r1,r18,r17 <== NOT EXECUTED 800abe4: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED 800abe8: f8 00 0d 16 calli 800e040 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 800abec: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 800abf0: b6 2d 08 00 add r1,r17,r13 <== NOT EXECUTED 800abf4: b6 41 08 00 add r1,r18,r1 <== NOT EXECUTED 800abf8: c9 8d 18 00 sub r3,r12,r13 <== NOT EXECUTED 800abfc: f8 00 0d 11 calli 800e040 <== NOT EXECUTED 800ac00: e3 ff ff dc bi 800ab70 <== NOT EXECUTED while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { 800ac04: 34 0c ff f5 mvi r12,-11 <== NOT EXECUTED 800ac08: e3 ff ff c5 bi 800ab1c <== NOT EXECUTED /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800ac0c: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 800ac10: 49 c0 ff c7 bg r14,r0,800ab2c <== NOT EXECUTED 800ac14: e3 ff ff c5 bi 800ab28 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 800ac18: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800ac1c: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED 800ac20: f8 00 04 dd calli 800bf94 <== NOT EXECUTED 800ac24: e3 ff ff e0 bi 800aba4 <== NOT EXECUTED 0800ae64 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 800ae64: 37 9c ff e4 addi sp,sp,-28 <== NOT EXECUTED 800ae68: 5b 8b 00 18 sw (sp+24),r11 <== NOT EXECUTED 800ae6c: 5b 8c 00 14 sw (sp+20),r12 <== NOT EXECUTED 800ae70: 5b 8d 00 10 sw (sp+16),r13 <== NOT EXECUTED 800ae74: 5b 8e 00 0c sw (sp+12),r14 <== NOT EXECUTED 800ae78: 5b 8f 00 08 sw (sp+8),r15 <== NOT EXECUTED 800ae7c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED pipe_control_t *pipe = *pipep; 800ae80: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 800ae84: b8 20 78 00 mv r15,r1 <== NOT EXECUTED 800ae88: 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, 800ae8c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800ae90: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800ae94: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800ae98: fb ff f7 da calli 8008e00 <== NOT EXECUTED 800ae9c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 800aea0: 5c 20 00 41 bne r1,r0,800afa4 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 800aea4: 29 8d 00 18 lw r13,(r12+24) <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 800aea8: 21 a1 00 02 andi r1,r13,0x2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 800aeac: 21 ad 00 06 andi r13,r13,0x6 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 800aeb0: 44 23 00 04 be r1,r3,800aec0 <== NOT EXECUTED pipe->Readers --; 800aeb4: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800aeb8: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 800aebc: 59 61 00 10 sw (r11+16),r1 <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 800aec0: 21 a1 00 04 andi r1,r13,0x4 <== NOT EXECUTED 800aec4: 5c 20 00 20 bne r1,r0,800af44 <== NOT EXECUTED pipe->Writers --; sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 800aec8: 78 0c 08 01 mvhi r12,0x801 <== NOT EXECUTED 800aecc: 39 8c e6 a4 ori r12,r12,0xe6a4 <== NOT EXECUTED 800aed0: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 800aed4: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800aed8: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800aedc: fb ff f7 c9 calli 8008e00 <== NOT EXECUTED 800aee0: 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) 800aee4: 5c 20 00 30 bne r1,r0,800afa4 <== NOT EXECUTED rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); 800aee8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800aeec: fb ff f8 26 calli 8008f84 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 800aef0: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED 800aef4: 44 4e 00 18 be r2,r14,800af54 <== NOT EXECUTED *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 800aef8: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 800aefc: 7d ad 00 02 cmpnei r13,r13,2 <== NOT EXECUTED 800af00: 64 21 00 00 cmpei r1,r1,0 <== NOT EXECUTED 800af04: a0 2d 68 00 and r13,r1,r13 <== NOT EXECUTED 800af08: 45 a0 00 04 be r13,r0,800af18 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 800af0c: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800af10: 37 82 00 1c addi r2,sp,28 <== NOT EXECUTED 800af14: f8 00 04 20 calli 800bf94 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 800af18: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 800af1c: fb ff f8 1a calli 8008f84 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 800af20: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 800af24: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800af28: 2b 8b 00 18 lw r11,(sp+24) <== NOT EXECUTED 800af2c: 2b 8c 00 14 lw r12,(sp+20) <== NOT EXECUTED 800af30: 2b 8d 00 10 lw r13,(sp+16) <== NOT EXECUTED 800af34: 2b 8e 00 0c lw r14,(sp+12) <== NOT EXECUTED 800af38: 2b 8f 00 08 lw r15,(sp+8) <== NOT EXECUTED 800af3c: 37 9c 00 1c addi sp,sp,28 <== NOT EXECUTED 800af40: c3 a0 00 00 ret <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; 800af44: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 800af48: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 800af4c: 59 61 00 14 sw (r11+20),r1 <== NOT EXECUTED 800af50: e3 ff ff de bi 800aec8 <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 800af54: 29 6e 00 14 lw r14,(r11+20) <== NOT EXECUTED 800af58: 45 c2 00 07 be r14,r2,800af74 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 800af5c: 7d ad 00 04 cmpnei r13,r13,4 <== NOT EXECUTED 800af60: 45 a2 ff ee be r13,r2,800af18 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 800af64: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800af68: 37 82 00 1c addi r2,sp,28 <== NOT EXECUTED 800af6c: f8 00 04 0a calli 800bf94 <== NOT EXECUTED 800af70: e3 ff ff ea bi 800af18 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 800af74: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800af78: f8 00 03 e7 calli 800bf14 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 800af7c: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800af80: f8 00 03 e5 calli 800bf14 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 800af84: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800af88: fb ff f7 5b calli 8008cf4 <== NOT EXECUTED free(pipe->Buffer); 800af8c: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 800af90: fb ff f2 4e calli 80078c8 <== NOT EXECUTED free(pipe); 800af94: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800af98: fb ff f2 4c calli 80078c8 <== NOT EXECUTED /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; 800af9c: 59 ee 00 00 sw (r15+0),r14 <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 800afa0: e3 ff ff de bi 800af18 <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); 800afa4: fb ff de 66 calli 800293c <== NOT EXECUTED 0800ac28 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 800ac28: 37 9c ff d4 addi sp,sp,-44 <== NOT EXECUTED 800ac2c: 5b 8b 00 24 sw (sp+36),r11 <== NOT EXECUTED 800ac30: 5b 8c 00 20 sw (sp+32),r12 <== NOT EXECUTED 800ac34: 5b 8d 00 1c sw (sp+28),r13 <== NOT EXECUTED 800ac38: 5b 8e 00 18 sw (sp+24),r14 <== NOT EXECUTED 800ac3c: 5b 8f 00 14 sw (sp+20),r15 <== NOT EXECUTED 800ac40: 5b 90 00 10 sw (sp+16),r16 <== NOT EXECUTED 800ac44: 5b 91 00 0c sw (sp+12),r17 <== NOT EXECUTED 800ac48: 5b 92 00 08 sw (sp+8),r18 <== NOT EXECUTED 800ac4c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800ac50: b8 60 60 00 mv r12,r3 <== NOT EXECUTED 800ac54: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 800ac58: b8 40 70 00 mv r14,r2 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 800ac5c: b8 60 58 00 mv r11,r3 <== NOT EXECUTED 800ac60: 5c 60 00 0d bne r3,r0,800ac94 <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 800ac64: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800ac68: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800ac6c: 2b 8b 00 24 lw r11,(sp+36) <== NOT EXECUTED 800ac70: 2b 8c 00 20 lw r12,(sp+32) <== NOT EXECUTED 800ac74: 2b 8d 00 1c lw r13,(sp+28) <== NOT EXECUTED 800ac78: 2b 8e 00 18 lw r14,(sp+24) <== NOT EXECUTED 800ac7c: 2b 8f 00 14 lw r15,(sp+20) <== NOT EXECUTED 800ac80: 2b 90 00 10 lw r16,(sp+16) <== NOT EXECUTED 800ac84: 2b 91 00 0c lw r17,(sp+12) <== NOT EXECUTED 800ac88: 2b 92 00 08 lw r18,(sp+8) <== NOT EXECUTED 800ac8c: 37 9c 00 2c addi sp,sp,44 <== NOT EXECUTED 800ac90: c3 a0 00 00 ret <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 800ac94: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED 800ac98: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800ac9c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800aca0: 5b 84 00 28 sw (sp+40),r4 <== NOT EXECUTED 800aca4: fb ff f8 57 calli 8008e00 <== NOT EXECUTED 800aca8: 34 0b ff fc mvi r11,-4 <== NOT EXECUTED 800acac: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED 800acb0: 5c 20 ff ed bne r1,r0,800ac64 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 800acb4: 29 ab 00 10 lw r11,(r13+16) <== NOT EXECUTED 800acb8: 45 61 00 54 be r11,r1,800ae08 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 800acbc: 29 af 00 04 lw r15,(r13+4) <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 800acc0: 34 11 00 01 mvi r17,1 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 800acc4: 55 8f 00 02 bgu r12,r15,800accc <== NOT EXECUTED 800acc8: b9 80 88 00 mv r17,r12 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 800accc: 34 12 00 00 mvi r18,0 <== NOT EXECUTED 800acd0: ba 40 58 00 mv r11,r18 <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { 800acd4: 29 a1 00 0c lw r1,(r13+12) <== NOT EXECUTED 800acd8: c9 e1 18 00 sub r3,r15,r1 <== NOT EXECUTED 800acdc: 56 23 00 2c bgu r17,r3,800ad8c <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 800ace0: c9 92 10 00 sub r2,r12,r18 <== NOT EXECUTED 800ace4: b8 60 80 00 mv r16,r3 <== NOT EXECUTED 800ace8: 50 43 00 02 bgeu r2,r3,800acf0 <== NOT EXECUTED 800acec: b8 40 80 00 mv r16,r2 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 800acf0: 29 a3 00 08 lw r3,(r13+8) <== NOT EXECUTED 800acf4: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 800acf8: 5b 84 00 28 sw (sp+40),r4 <== NOT EXECUTED 800acfc: b4 23 08 00 add r1,r1,r3 <== NOT EXECUTED 800ad00: f8 00 42 9e calli 801b778 <__umodsi3> <== NOT EXECUTED 800ad04: c9 e1 78 00 sub r15,r15,r1 <== NOT EXECUTED if (chunk > chunk1) { 800ad08: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED 800ad0c: 4d f0 00 48 bge r15,r16,800ae2c <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 800ad10: 29 a5 00 00 lw r5,(r13+0) <== NOT EXECUTED 800ad14: b5 d2 10 00 add r2,r14,r18 <== NOT EXECUTED 800ad18: b9 e0 18 00 mv r3,r15 <== NOT EXECUTED 800ad1c: b4 a1 08 00 add r1,r5,r1 <== NOT EXECUTED 800ad20: f8 00 0c c8 calli 800e040 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 800ad24: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 800ad28: b5 f2 10 00 add r2,r15,r18 <== NOT EXECUTED 800ad2c: b5 c2 10 00 add r2,r14,r2 <== NOT EXECUTED 800ad30: ca 0f 18 00 sub r3,r16,r15 <== NOT EXECUTED 800ad34: f8 00 0c c3 calli 800e040 <== NOT EXECUTED 800ad38: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 800ad3c: 29 a1 00 0c lw r1,(r13+12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 800ad40: 29 a2 00 18 lw r2,(r13+24) <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 800ad44: b4 30 08 00 add r1,r1,r16 <== NOT EXECUTED 800ad48: 59 a1 00 0c sw (r13+12),r1 <== NOT EXECUTED if (pipe->waitingReaders > 0) 800ad4c: 5c 40 00 40 bne r2,r0,800ae4c <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); written += chunk; 800ad50: b5 70 58 00 add r11,r11,r16 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 800ad54: b9 60 90 00 mv r18,r11 <== NOT EXECUTED 800ad58: 55 8b 00 2e bgu r12,r11,800ae10 <== NOT EXECUTED 800ad5c: 34 0f 00 00 mvi r15,0 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 800ad60: 29 a1 00 28 lw r1,(r13+40) <== NOT EXECUTED 800ad64: fb ff f8 88 calli 8008f84 <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 800ad68: 34 01 ff e0 mvi r1,-32 <== NOT EXECUTED 800ad6c: 45 e1 00 04 be r15,r1,800ad7c <== NOT EXECUTED kill(getpid(), SIGPIPE); #endif if (written > 0) 800ad70: 49 60 ff bd bg r11,r0,800ac64 <== NOT EXECUTED 800ad74: b9 e0 58 00 mv r11,r15 <== NOT EXECUTED 800ad78: e3 ff ff bb bi 800ac64 <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); 800ad7c: f8 00 02 ab calli 800b828 <== NOT EXECUTED 800ad80: 34 02 00 0d mvi r2,13 <== NOT EXECUTED 800ad84: f8 00 03 53 calli 800bad0 <== NOT EXECUTED 800ad88: e3 ff ff fa bi 800ad70 <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 800ad8c: 28 90 00 18 lw r16,(r4+24) <== NOT EXECUTED 800ad90: 22 10 00 01 andi r16,r16,0x1 <== NOT EXECUTED 800ad94: 5e 00 00 22 bne r16,r0,800ae1c <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 800ad98: 29 a3 00 1c lw r3,(r13+28) <== NOT EXECUTED PIPE_UNLOCK(pipe); 800ad9c: 29 a1 00 28 lw r1,(r13+40) <== NOT EXECUTED 800ada0: 5b 84 00 28 sw (sp+40),r4 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 800ada4: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED 800ada8: 59 a3 00 1c sw (r13+28),r3 <== NOT EXECUTED PIPE_UNLOCK(pipe); 800adac: fb ff f8 76 calli 8008f84 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 800adb0: 29 a1 00 30 lw r1,(r13+48) <== NOT EXECUTED 800adb4: ba 00 10 00 mv r2,r16 <== NOT EXECUTED 800adb8: f8 00 04 96 calli 800c010 <== NOT EXECUTED 800adbc: b8 20 78 00 mv r15,r1 <== NOT EXECUTED 800adc0: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED 800adc4: 44 30 00 02 be r1,r16,800adcc <== NOT EXECUTED 800adc8: 34 0f ff fc mvi r15,-4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800adcc: 29 a1 00 28 lw r1,(r13+40) <== NOT EXECUTED 800add0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800add4: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800add8: 5b 84 00 28 sw (sp+40),r4 <== NOT EXECUTED 800addc: fb ff f8 09 calli 8008e00 <== NOT EXECUTED 800ade0: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED 800ade4: 5c 20 00 10 bne r1,r0,800ae24 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 800ade8: 29 a3 00 1c lw r3,(r13+28) <== NOT EXECUTED 800adec: 34 63 ff ff addi r3,r3,-1 <== NOT EXECUTED 800adf0: 59 a3 00 1c sw (r13+28),r3 <== NOT EXECUTED if (ret != 0) 800adf4: 5d e1 ff db bne r15,r1,800ad60 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 800adf8: 29 a1 00 10 lw r1,(r13+16) <== NOT EXECUTED 800adfc: 44 2f 00 03 be r1,r15,800ae08 <== NOT EXECUTED 800ae00: 29 af 00 04 lw r15,(r13+4) <== NOT EXECUTED 800ae04: e3 ff ff b4 bi 800acd4 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 800ae08: 34 0f ff e0 mvi r15,-32 <== NOT EXECUTED 800ae0c: e3 ff ff d5 bi 800ad60 <== NOT EXECUTED 800ae10: 29 af 00 04 lw r15,(r13+4) <== NOT EXECUTED 800ae14: 34 11 00 01 mvi r17,1 <== NOT EXECUTED 800ae18: e3 ff ff af bi 800acd4 <== NOT EXECUTED while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 800ae1c: 34 0f ff f5 mvi r15,-11 <== NOT EXECUTED 800ae20: e3 ff ff d0 bi 800ad60 <== NOT EXECUTED /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 800ae24: 34 0f ff fc mvi r15,-4 <== NOT EXECUTED 800ae28: e3 ff ff d2 bi 800ad70 <== NOT EXECUTED if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 800ae2c: 29 a5 00 00 lw r5,(r13+0) <== NOT EXECUTED 800ae30: b5 d2 10 00 add r2,r14,r18 <== NOT EXECUTED 800ae34: ba 00 18 00 mv r3,r16 <== NOT EXECUTED 800ae38: b4 a1 08 00 add r1,r5,r1 <== NOT EXECUTED 800ae3c: 5b 84 00 28 sw (sp+40),r4 <== NOT EXECUTED 800ae40: f8 00 0c 80 calli 800e040 <== NOT EXECUTED 800ae44: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED 800ae48: e3 ff ff bd bi 800ad3c <== NOT EXECUTED pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 800ae4c: 29 a1 00 2c lw r1,(r13+44) <== NOT EXECUTED 800ae50: 37 82 00 2c addi r2,sp,44 <== NOT EXECUTED 800ae54: 5b 84 00 28 sw (sp+40),r4 <== NOT EXECUTED 800ae58: f8 00 04 4f calli 800bf94 <== NOT EXECUTED 800ae5c: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED 800ae60: e3 ff ff bc bi 800ad50 <== NOT EXECUTED 0800bdd4 : void pthread_exit( void *value_ptr ) { 800bdd4: 37 9c ff fc addi sp,sp,-4 800bdd8: 5b 9d 00 04 sw (sp+4),ra _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 800bddc: 78 03 08 01 mvhi r3,0x801 800bde0: 38 63 e9 60 ori r3,r3,0xe960 } void pthread_exit( void *value_ptr ) { 800bde4: b8 20 10 00 mv r2,r1 _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 800bde8: 28 61 00 00 lw r1,(r3+0) 800bdec: fb ff ff d4 calli 800bd3c <_POSIX_Thread_Exit> } 800bdf0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800bdf4: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800bdf8: c3 a0 00 00 ret <== NOT EXECUTED 08006314 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 8006314: 37 9c ff dc addi sp,sp,-36 8006318: 5b 8b 00 18 sw (sp+24),r11 800631c: 5b 8c 00 14 sw (sp+20),r12 8006320: 5b 8d 00 10 sw (sp+16),r13 8006324: 5b 8e 00 0c sw (sp+12),r14 8006328: 5b 8f 00 08 sw (sp+8),r15 800632c: 5b 9d 00 04 sw (sp+4),ra int rc; /* * Check all the parameters */ if ( !param ) 8006330: 34 0c 00 16 mvi r12,22 int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 8006334: b8 60 58 00 mv r11,r3 8006338: b8 20 68 00 mv r13,r1 800633c: b8 40 70 00 mv r14,r2 int rc; /* * Check all the parameters */ if ( !param ) 8006340: 44 60 00 08 be r3,r0,8006360 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 8006344: b8 40 08 00 mv r1,r2 8006348: 37 84 00 20 addi r4,sp,32 800634c: b8 60 10 00 mv r2,r3 8006350: 37 83 00 24 addi r3,sp,36 8006354: f8 00 19 ba calli 800ca3c <_POSIX_Thread_Translate_sched_param> 8006358: b8 20 60 00 mv r12,r1 policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 800635c: 44 20 00 0a be r1,r0,8006384 case OBJECTS_ERROR: break; } return ESRCH; } 8006360: b9 80 08 00 mv r1,r12 8006364: 2b 9d 00 04 lw ra,(sp+4) 8006368: 2b 8b 00 18 lw r11,(sp+24) 800636c: 2b 8c 00 14 lw r12,(sp+20) 8006370: 2b 8d 00 10 lw r13,(sp+16) 8006374: 2b 8e 00 0c lw r14,(sp+12) 8006378: 2b 8f 00 08 lw r15,(sp+8) 800637c: 37 9c 00 24 addi sp,sp,36 8006380: c3 a0 00 00 ret 8006384: 78 01 08 02 mvhi r1,0x802 8006388: 38 21 4a c4 ori r1,r1,0x4ac4 800638c: b9 a0 10 00 mv r2,r13 8006390: 37 83 00 1c addi r3,sp,28 8006394: f8 00 07 1a calli 8007ffc <_Objects_Get> 8006398: b8 20 78 00 mv r15,r1 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 800639c: 2b 81 00 1c lw r1,(sp+28) 80063a0: 44 2c 00 03 be r1,r12,80063ac 80063a4: 34 0c 00 03 mvi r12,3 80063a8: e3 ff ff ee bi 8006360 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 80063ac: 29 ed 01 2c lw r13,(r15+300) if ( api->schedpolicy == SCHED_SPORADIC ) 80063b0: 34 01 00 04 mvi r1,4 80063b4: 29 a2 00 80 lw r2,(r13+128) 80063b8: 44 41 00 32 be r2,r1,8006480 (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; 80063bc: 2b 82 00 24 lw r2,(sp+36) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 80063c0: 59 ae 00 80 sw (r13+128),r14 api->schedparam = *param; 80063c4: 29 61 00 00 lw r1,(r11+0) the_thread->budget_algorithm = budget_algorithm; 80063c8: 59 e2 00 7c sw (r15+124),r2 the_thread->budget_callout = budget_callout; 80063cc: 2b 82 00 20 lw r2,(sp+32) if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 80063d0: 59 a1 00 84 sw (r13+132),r1 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 80063d4: 59 e2 00 80 sw (r15+128),r2 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 80063d8: 29 62 00 04 lw r2,(r11+4) 80063dc: 59 a2 00 88 sw (r13+136),r2 80063e0: 29 62 00 08 lw r2,(r11+8) 80063e4: 59 a2 00 8c sw (r13+140),r2 80063e8: 29 62 00 0c lw r2,(r11+12) 80063ec: 59 a2 00 90 sw (r13+144),r2 80063f0: 29 62 00 10 lw r2,(r11+16) 80063f4: 59 a2 00 94 sw (r13+148),r2 80063f8: 29 62 00 14 lw r2,(r11+20) 80063fc: 59 a2 00 98 sw (r13+152),r2 8006400: 29 6b 00 18 lw r11,(r11+24) 8006404: 59 ab 00 9c sw (r13+156),r11 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 8006408: 48 0e 00 05 bg r0,r14,800641c 800640c: 34 02 00 02 mvi r2,2 8006410: 4c 4e 00 0d bge r2,r14,8006444 8006414: 34 02 00 04 mvi r2,4 8006418: 45 c2 00 03 be r14,r2,8006424 _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 800641c: f8 00 09 63 calli 80089a8 <_Thread_Enable_dispatch> <== NOT EXECUTED return 0; 8006420: e3 ff ff d0 bi 8006360 <== NOT EXECUTED true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 8006424: 59 a1 00 a0 sw (r13+160),r1 _Watchdog_Remove( &api->Sporadic_timer ); 8006428: 35 a1 00 a4 addi r1,r13,164 800642c: f8 00 0f 5b calli 800a198 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 8006430: b9 e0 10 00 mv r2,r15 8006434: 34 01 00 00 mvi r1,0 8006438: fb ff ff 90 calli 8006278 <_POSIX_Threads_Sporadic_budget_TSR> break; } _Thread_Enable_dispatch(); 800643c: f8 00 09 5b calli 80089a8 <_Thread_Enable_dispatch> 8006440: e3 ff ff c8 bi 8006360 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 8006444: 78 01 08 02 mvhi r1,0x802 8006448: 38 21 48 54 ori r1,r1,0x4854 800644c: 28 21 00 00 lw r1,(r1+0) 8006450: 29 a2 00 84 lw r2,(r13+132) the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 8006454: 34 03 00 01 mvi r3,1 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 8006458: 59 e1 00 78 sw (r15+120),r1 800645c: 78 01 08 02 mvhi r1,0x802 8006460: 38 21 40 e4 ori r1,r1,0x40e4 8006464: 40 24 00 00 lbu r4,(r1+0) the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 8006468: b9 e0 08 00 mv r1,r15 800646c: c8 82 10 00 sub r2,r4,r2 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; the_thread->real_priority = 8006470: 59 e2 00 18 sw (r15+24),r2 _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 8006474: f8 00 07 c2 calli 800837c <_Thread_Change_priority> _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 8006478: f8 00 09 4c calli 80089a8 <_Thread_Enable_dispatch> 800647c: e3 ff ff b9 bi 8006360 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 8006480: 35 a1 00 a4 addi r1,r13,164 8006484: f8 00 0f 45 calli 800a198 <_Watchdog_Remove> 8006488: e3 ff ff cd bi 80063bc 08003058 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 8003058: 37 9c ff f8 addi sp,sp,-8 800305c: 5b 8b 00 08 sw (sp+8),r11 8003060: 5b 9d 00 04 sw (sp+4),ra * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 8003064: 78 01 08 02 mvhi r1,0x802 8003068: 38 21 08 f4 ori r1,r1,0x8f4 800306c: 28 22 00 00 lw r2,(r1+0) 8003070: 5c 40 00 12 bne r2,r0,80030b8 8003074: 78 01 08 02 mvhi r1,0x802 8003078: 38 21 08 5c ori r1,r1,0x85c return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 800307c: 78 0b 08 02 mvhi r11,0x802 8003080: 28 23 00 00 lw r3,(r1+0) 8003084: 39 6b 09 18 ori r11,r11,0x918 8003088: 29 64 00 00 lw r4,(r11+0) 800308c: 34 63 00 01 addi r3,r3,1 8003090: 58 23 00 00 sw (r1+0),r3 8003094: 28 83 01 2c lw r3,(r4+300) _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 8003098: 28 61 00 d4 lw r1,(r3+212) 800309c: 5c 22 00 0b bne r1,r2,80030c8 thread_support->cancelation_requested ) 80030a0: 28 62 00 dc lw r2,(r3+220) 80030a4: 44 41 00 09 be r2,r1,80030c8 cancel = true; _Thread_Enable_dispatch(); 80030a8: f8 00 08 2b calli 8005154 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 80030ac: 29 61 00 00 lw r1,(r11+0) 80030b0: 34 02 ff ff mvi r2,-1 80030b4: f8 00 18 92 calli 80092fc <_POSIX_Thread_Exit> } 80030b8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80030bc: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 80030c0: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 80030c4: c3 a0 00 00 ret <== NOT EXECUTED _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 80030c8: f8 00 08 23 calli 8005154 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); } 80030cc: 2b 9d 00 04 lw ra,(sp+4) 80030d0: 2b 8b 00 08 lw r11,(sp+8) 80030d4: 37 9c 00 08 addi sp,sp,8 80030d8: c3 a0 00 00 ret 08001954 : * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s) { 8001954: 37 9c ff f4 addi sp,sp,-12 8001958: 5b 8b 00 0c sw (sp+12),r11 800195c: 5b 8c 00 08 sw (sp+8),r12 8001960: 5b 9d 00 04 sw (sp+4),ra 8001964: b8 20 60 00 mv r12,r1 const char *p = s; for (p=s ; *p ; p++ ) 8001968: 40 21 00 00 lbu r1,(r1+0) 800196c: 44 20 00 10 be r1,r0,80019ac 8001970: 78 0b 08 01 mvhi r11,0x801 8001974: 39 6b c5 ec ori r11,r11,0xc5ec BSP_output_char(*p); 8001978: 29 62 00 00 lw r2,(r11+0) */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 800197c: 35 8c 00 01 addi r12,r12,1 BSP_output_char(*p); 8001980: d8 40 00 00 call r2 */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 8001984: 41 81 00 00 lbu r1,(r12+0) 8001988: 5c 20 ff fc bne r1,r0,8001978 BSP_output_char(*p); BSP_output_char('\n'); 800198c: 29 62 00 00 lw r2,(r11+0) 8001990: 34 01 00 0a mvi r1,10 8001994: d8 40 00 00 call r2 } 8001998: 2b 9d 00 04 lw ra,(sp+4) 800199c: 2b 8b 00 0c lw r11,(sp+12) 80019a0: 2b 8c 00 08 lw r12,(sp+8) 80019a4: 37 9c 00 0c addi sp,sp,12 80019a8: c3 a0 00 00 ret 80019ac: 78 0b 08 01 mvhi r11,0x801 <== NOT EXECUTED 80019b0: 39 6b c5 ec ori r11,r11,0xc5ec <== NOT EXECUTED 80019b4: e3 ff ff f6 bi 800198c <== NOT EXECUTED 0801bcfc : ssize_t read( int fd, void *buffer, size_t count ) { 801bcfc: 37 9c ff e8 addi sp,sp,-24 801bd00: 5b 8b 00 14 sw (sp+20),r11 801bd04: 5b 8c 00 10 sw (sp+16),r12 801bd08: 5b 8d 00 0c sw (sp+12),r13 801bd0c: 5b 8e 00 08 sw (sp+8),r14 801bd10: 5b 9d 00 04 sw (sp+4),ra ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 801bd14: 78 04 08 01 mvhi r4,0x801 801bd18: 38 84 e0 10 ori r4,r4,0xe010 801bd1c: 28 84 00 00 lw r4,(r4+0) ssize_t read( int fd, void *buffer, size_t count ) { 801bd20: b8 40 68 00 mv r13,r2 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 801bd24: 54 81 00 06 bgu r4,r1,801bd3c iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 801bd28: fb ff c6 20 calli 800d5a8 <__errno> 801bd2c: 34 02 00 09 mvi r2,9 801bd30: 58 22 00 00 sw (r1+0),r2 801bd34: 34 0c ff ff mvi r12,-1 801bd38: e0 00 00 27 bi 801bdd4 { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 801bd3c: 34 02 00 03 mvi r2,3 801bd40: 5b 83 00 18 sw (sp+24),r3 801bd44: 78 0c 08 01 mvhi r12,0x801 801bd48: fb ff 91 2a calli 80001f0 <__ashlsi3> 801bd4c: 34 02 00 03 mvi r2,3 801bd50: 39 8c e7 18 ori r12,r12,0xe718 801bd54: b8 20 70 00 mv r14,r1 801bd58: fb ff 91 26 calli 80001f0 <__ashlsi3> 801bd5c: 29 8b 00 00 lw r11,(r12+0) 801bd60: b5 c1 08 00 add r1,r14,r1 rtems_libio_check_is_open( iop ); 801bd64: 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 ); 801bd68: b5 61 58 00 add r11,r11,r1 rtems_libio_check_is_open( iop ); 801bd6c: 29 61 00 18 lw r1,(r11+24) 801bd70: 20 22 01 00 andi r2,r1,0x100 801bd74: 44 40 ff ed be r2,r0,801bd28 rtems_libio_check_buffer( buffer ); 801bd78: 45 a0 00 1f be r13,r0,801bdf4 rtems_libio_check_count( count ); 801bd7c: b8 60 60 00 mv r12,r3 801bd80: 44 60 00 15 be r3,r0,801bdd4 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 801bd84: 20 21 00 02 andi r1,r1,0x2 801bd88: 44 20 00 1b be r1,r0,801bdf4 /* * Now process the read(). */ if ( !iop->handlers->read_h ) 801bd8c: 29 61 00 40 lw r1,(r11+64) 801bd90: 28 24 00 08 lw r4,(r1+8) 801bd94: 44 80 00 1d be r4,r0,801be08 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 801bd98: b9 a0 10 00 mv r2,r13 801bd9c: b9 60 08 00 mv r1,r11 801bda0: d8 80 00 00 call r4 801bda4: b8 20 60 00 mv r12,r1 if ( rc > 0 ) 801bda8: 4c 01 00 0b bge r0,r1,801bdd4 iop->offset += rc; 801bdac: 34 02 00 1f mvi r2,31 801bdb0: fb ff 91 60 calli 8000330 <__ashrsi3> 801bdb4: 29 62 00 14 lw r2,(r11+20) 801bdb8: 29 64 00 10 lw r4,(r11+16) 801bdbc: b5 82 10 00 add r2,r12,r2 801bdc0: f5 82 18 00 cmpgu r3,r12,r2 801bdc4: b4 24 08 00 add r1,r1,r4 801bdc8: b4 61 08 00 add r1,r3,r1 801bdcc: 59 62 00 14 sw (r11+20),r2 801bdd0: 59 61 00 10 sw (r11+16),r1 return rc; } 801bdd4: b9 80 08 00 mv r1,r12 801bdd8: 2b 9d 00 04 lw ra,(sp+4) 801bddc: 2b 8b 00 14 lw r11,(sp+20) 801bde0: 2b 8c 00 10 lw r12,(sp+16) 801bde4: 2b 8d 00 0c lw r13,(sp+12) 801bde8: 2b 8e 00 08 lw r14,(sp+8) 801bdec: 37 9c 00 18 addi sp,sp,24 801bdf0: c3 a0 00 00 ret rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 801bdf4: fb ff c5 ed calli 800d5a8 <__errno> <== NOT EXECUTED 801bdf8: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 801bdfc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801be00: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 801be04: e3 ff ff f4 bi 801bdd4 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 801be08: fb ff c5 e8 calli 800d5a8 <__errno> <== NOT EXECUTED 801be0c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 801be10: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801be14: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 801be18: e3 ff ff ef bi 801bdd4 <== NOT EXECUTED 0802b6c4 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 802b6c4: 37 9c ff d8 addi sp,sp,-40 802b6c8: 5b 8b 00 14 sw (sp+20),r11 802b6cc: 5b 8c 00 10 sw (sp+16),r12 802b6d0: 5b 8d 00 0c sw (sp+12),r13 802b6d4: 5b 8e 00 08 sw (sp+8),r14 802b6d8: 5b 9d 00 04 sw (sp+4),ra 802b6dc: b8 40 68 00 mv r13,r2 802b6e0: b8 60 70 00 mv r14,r3 802b6e4: b8 20 60 00 mv r12,r1 rtems_filesystem_location_info_t loc; int result; if (!buf) 802b6e8: 44 40 00 29 be r2,r0,802b78c rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 802b6ec: f8 00 93 8b calli 8050518 802b6f0: b8 20 20 00 mv r4,r1 802b6f4: 34 03 00 00 mvi r3,0 802b6f8: 37 8b 00 18 addi r11,sp,24 802b6fc: b9 80 08 00 mv r1,r12 802b700: b8 80 10 00 mv r2,r4 802b704: b8 60 28 00 mv r5,r3 802b708: b9 60 20 00 mv r4,r11 802b70c: fb ff 70 9d calli 8007980 0, &loc, false ); if ( result != 0 ) 802b710: 34 0c ff ff mvi r12,-1 802b714: 5c 20 00 16 bne r1,r0,802b76c return -1; if ( !loc.ops->node_type_h ){ 802b718: 2b 83 00 24 lw r3,(sp+36) 802b71c: 28 62 00 10 lw r2,(r3+16) 802b720: 44 41 00 32 be r2,r1,802b7e8 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 802b724: b9 60 08 00 mv r1,r11 802b728: d8 40 00 00 call r2 802b72c: 34 02 00 04 mvi r2,4 802b730: 5c 22 00 23 bne r1,r2,802b7bc rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 802b734: 2b 81 00 24 lw r1,(sp+36) 802b738: 28 24 00 3c lw r4,(r1+60) 802b73c: 44 80 00 34 be r4,r0,802b80c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 802b740: b9 a0 10 00 mv r2,r13 802b744: b9 c0 18 00 mv r3,r14 802b748: b9 60 08 00 mv r1,r11 802b74c: d8 80 00 00 call r4 802b750: b8 20 60 00 mv r12,r1 rtems_filesystem_freenode( &loc ); 802b754: 2b 81 00 24 lw r1,(sp+36) 802b758: 44 20 00 05 be r1,r0,802b76c 802b75c: 28 22 00 1c lw r2,(r1+28) 802b760: 44 40 00 03 be r2,r0,802b76c 802b764: b9 60 08 00 mv r1,r11 802b768: d8 40 00 00 call r2 return result; } 802b76c: b9 80 08 00 mv r1,r12 802b770: 2b 9d 00 04 lw ra,(sp+4) 802b774: 2b 8b 00 14 lw r11,(sp+20) 802b778: 2b 8c 00 10 lw r12,(sp+16) 802b77c: 2b 8d 00 0c lw r13,(sp+12) 802b780: 2b 8e 00 08 lw r14,(sp+8) 802b784: 37 9c 00 28 addi sp,sp,40 802b788: c3 a0 00 00 ret { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 802b78c: f8 00 75 63 calli 8048d18 <__errno> <== NOT EXECUTED 802b790: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 802b794: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 802b798: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 802b79c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802b7a0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802b7a4: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED 802b7a8: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED 802b7ac: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED 802b7b0: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED 802b7b4: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED 802b7b8: c3 a0 00 00 ret <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); 802b7bc: 2b 81 00 24 lw r1,(sp+36) 802b7c0: 44 20 00 05 be r1,r0,802b7d4 802b7c4: 28 22 00 1c lw r2,(r1+28) 802b7c8: 44 40 00 03 be r2,r0,802b7d4 802b7cc: b9 60 08 00 mv r1,r11 802b7d0: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( EINVAL ); 802b7d4: f8 00 75 51 calli 8048d18 <__errno> 802b7d8: 34 02 00 16 mvi r2,22 802b7dc: 58 22 00 00 sw (r1+0),r2 802b7e0: 34 0c ff ff mvi r12,-1 802b7e4: e3 ff ff e2 bi 802b76c 0, &loc, false ); if ( result != 0 ) return -1; if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 802b7e8: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED 802b7ec: 44 62 00 03 be r3,r2,802b7f8 <== NOT EXECUTED 802b7f0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802b7f4: d8 60 00 00 call r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 802b7f8: f8 00 75 48 calli 8048d18 <__errno> <== NOT EXECUTED 802b7fc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 802b800: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 802b804: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 802b808: e3 ff ff d9 bi 802b76c <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 802b80c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 802b810: 44 44 ff fa be r2,r4,802b7f8 <== NOT EXECUTED 802b814: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802b818: d8 40 00 00 call r2 <== NOT EXECUTED 802b81c: e3 ff ff f7 bi 802b7f8 <== NOT EXECUTED 0800357c : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 800357c: 37 9c ff e4 addi sp,sp,-28 8003580: 5b 8b 00 1c sw (sp+28),r11 8003584: 5b 8c 00 18 sw (sp+24),r12 8003588: 5b 8d 00 14 sw (sp+20),r13 800358c: 5b 8e 00 10 sw (sp+16),r14 8003590: 5b 8f 00 0c sw (sp+12),r15 8003594: 5b 90 00 08 sw (sp+8),r16 8003598: 5b 9d 00 04 sw (sp+4),ra int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 800359c: 78 04 08 02 mvhi r4,0x802 80035a0: 38 84 30 10 ori r4,r4,0x3010 80035a4: 28 84 00 00 lw r4,(r4+0) ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 80035a8: b8 40 70 00 mv r14,r2 80035ac: b8 60 60 00 mv r12,r3 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 80035b0: 54 81 00 06 bgu r4,r1,80035c8 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 80035b4: f8 00 32 b4 calli 8010084 <__errno> <== NOT EXECUTED 80035b8: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 80035bc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80035c0: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED 80035c4: e0 00 00 16 bi 800361c <== NOT EXECUTED int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 80035c8: 34 02 00 03 mvi r2,3 80035cc: fb ff f6 3b calli 8000eb8 <__ashlsi3> 80035d0: 78 0d 08 02 mvhi r13,0x802 80035d4: 34 02 00 03 mvi r2,3 80035d8: 39 ad 3e ec ori r13,r13,0x3eec 80035dc: b8 20 78 00 mv r15,r1 80035e0: fb ff f6 36 calli 8000eb8 <__ashlsi3> 80035e4: 29 ab 00 00 lw r11,(r13+0) 80035e8: b5 e1 08 00 add r1,r15,r1 80035ec: b5 61 58 00 add r11,r11,r1 rtems_libio_check_is_open( iop ); 80035f0: 29 61 00 18 lw r1,(r11+24) 80035f4: 20 22 01 00 andi r2,r1,0x100 80035f8: 44 40 ff ef be r2,r0,80035b4 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 80035fc: 20 21 00 02 andi r1,r1,0x2 8003600: 44 20 00 03 be r1,r0,800360c /* * Argument validation on IO vector */ if ( !iov ) 8003604: 45 c0 00 02 be r14,r0,800360c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 8003608: 49 80 00 0f bg r12,r0,8003644 /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 800360c: f8 00 32 9e calli 8010084 <__errno> 8003610: 34 02 00 16 mvi r2,22 8003614: 58 22 00 00 sw (r1+0),r2 8003618: 34 0f ff ff mvi r15,-1 if (bytes != iov[ v ].iov_len) break; } return total; } 800361c: b9 e0 08 00 mv r1,r15 8003620: 2b 9d 00 04 lw ra,(sp+4) 8003624: 2b 8b 00 1c lw r11,(sp+28) 8003628: 2b 8c 00 18 lw r12,(sp+24) 800362c: 2b 8d 00 14 lw r13,(sp+20) 8003630: 2b 8e 00 10 lw r14,(sp+16) 8003634: 2b 8f 00 0c lw r15,(sp+12) 8003638: 2b 90 00 08 lw r16,(sp+8) 800363c: 37 9c 00 1c addi sp,sp,28 8003640: c3 a0 00 00 ret rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 8003644: 34 01 04 00 mvi r1,1024 8003648: 4c 2c 00 02 bge r1,r12,8003650 800364c: e3 ff ff f0 bi 800360c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 8003650: 29 61 00 40 lw r1,(r11+64) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8003654: 34 05 00 00 mvi r5,0 8003658: b9 c0 20 00 mv r4,r14 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 800365c: 28 29 00 08 lw r9,(r1+8) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8003660: b8 a0 30 00 mv r6,r5 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 8003664: 45 20 00 2c be r9,r0,8003714 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 8003668: 28 82 00 00 lw r2,(r4+0) * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 800366c: 34 a5 00 01 addi r5,r5,1 ssize_t old; if ( !iov[v].iov_base ) 8003670: 44 40 ff e7 be r2,r0,800360c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 8003674: 28 87 00 04 lw r7,(r4+4) * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 8003678: 34 84 00 08 addi r4,r4,8 if ( iov[v].iov_len <= 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 800367c: b4 c7 40 00 add r8,r6,r7 ssize_t old; if ( !iov[v].iov_base ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 8003680: 44 e0 ff e3 be r7,r0,800360c rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) 8003684: 4d 06 00 02 bge r8,r6,800368c 8003688: e3 ff ff e1 bi 800360c * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 800368c: 4c ac 00 03 bge r5,r12,8003698 8003690: b9 00 30 00 mv r6,r8 8003694: e3 ff ff f5 bi 8003668 8003698: 34 10 00 00 mvi r16,0 800369c: ba 00 78 00 mv r15,r16 80036a0: e0 00 00 04 bi 80036b0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 80036a4: 4e 0c ff de bge r16,r12,800361c <== NOT EXECUTED 80036a8: 29 61 00 40 lw r1,(r11+64) <== NOT EXECUTED 80036ac: 28 29 00 08 lw r9,(r1+8) <== NOT EXECUTED bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 80036b0: 29 c2 00 00 lw r2,(r14+0) 80036b4: 29 c3 00 04 lw r3,(r14+4) 80036b8: b9 60 08 00 mv r1,r11 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 80036bc: 36 10 00 01 addi r16,r16,1 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 80036c0: d9 20 00 00 call r9 80036c4: b8 20 68 00 mv r13,r1 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 80036c8: 34 02 00 1f mvi r2,31 * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 80036cc: 48 01 00 10 bg r0,r1,800370c return -1; if ( bytes > 0 ) { 80036d0: 44 20 00 0b be r1,r0,80036fc iop->offset += bytes; 80036d4: fb ff f6 49 calli 8000ff8 <__ashrsi3> <== NOT EXECUTED 80036d8: 29 62 00 14 lw r2,(r11+20) <== NOT EXECUTED 80036dc: 29 64 00 10 lw r4,(r11+16) <== NOT EXECUTED total += bytes; 80036e0: b5 ed 78 00 add r15,r15,r13 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 80036e4: b5 a2 10 00 add r2,r13,r2 <== NOT EXECUTED 80036e8: f5 a2 18 00 cmpgu r3,r13,r2 <== NOT EXECUTED 80036ec: b4 24 08 00 add r1,r1,r4 <== NOT EXECUTED 80036f0: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 80036f4: 59 61 00 10 sw (r11+16),r1 <== NOT EXECUTED 80036f8: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 80036fc: 29 c1 00 04 lw r1,(r14+4) } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 8003700: 35 ce 00 08 addi r14,r14,8 if ( bytes > 0 ) { iop->offset += bytes; total += bytes; } if (bytes != iov[ v ].iov_len) 8003704: 45 a1 ff e8 be r13,r1,80036a4 8003708: e3 ff ff c5 bi 800361c } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 800370c: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED 8003710: e3 ff ff c3 bi 800361c <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8003714: f8 00 32 5c calli 8010084 <__errno> <== NOT EXECUTED 8003718: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 800371c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8003720: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED 8003724: e3 ff ff be bi 800361c <== NOT EXECUTED 0801bebc : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 801bebc: 37 9c ff e4 addi sp,sp,-28 801bec0: 5b 8b 00 18 sw (sp+24),r11 801bec4: 5b 8c 00 14 sw (sp+20),r12 801bec8: 5b 8d 00 10 sw (sp+16),r13 801becc: 5b 8e 00 0c sw (sp+12),r14 801bed0: 5b 8f 00 08 sw (sp+8),r15 801bed4: 5b 9d 00 04 sw (sp+4),ra 801bed8: 78 0c 08 01 mvhi r12,0x801 801bedc: 39 8c e7 28 ori r12,r12,0xe728 801bee0: 29 84 00 10 lw r4,(r12+16) /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 801bee4: 78 03 08 01 mvhi r3,0x801 801bee8: 38 63 ea 40 ori r3,r3,0xea40 801beec: 28 63 00 00 lw r3,(r3+0) { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 801bef0: 34 84 00 01 addi r4,r4,1 801bef4: b8 20 58 00 mv r11,r1 801bef8: 59 84 00 10 sw (r12+16),r4 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 801befc: 34 01 00 03 mvi r1,3 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 801bf00: b8 40 70 00 mv r14,r2 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 801bf04: 44 61 00 23 be r3,r1,801bf90 } /* * Continue with realloc(). */ if ( !ptr ) 801bf08: 45 60 00 2e be r11,r0,801bfc0 return malloc( size ); if ( !size ) { 801bf0c: 45 c0 00 18 be r14,r0,801bf6c free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 801bf10: 78 0d 08 01 mvhi r13,0x801 801bf14: 39 ad e0 1c ori r13,r13,0xe01c 801bf18: 29 a1 00 00 lw r1,(r13+0) 801bf1c: b9 60 10 00 mv r2,r11 801bf20: 37 83 00 1c addi r3,sp,28 801bf24: f8 00 00 85 calli 801c138 <_Protected_heap_Get_block_size> 801bf28: b8 20 78 00 mv r15,r1 801bf2c: 44 20 00 14 be r1,r0,801bf7c #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 ) ) { 801bf30: 29 a1 00 00 lw r1,(r13+0) 801bf34: b9 60 10 00 mv r2,r11 801bf38: b9 c0 18 00 mv r3,r14 801bf3c: f8 00 00 97 calli 801c198 <_Protected_heap_Resize_block> 801bf40: b8 20 68 00 mv r13,r1 801bf44: 44 20 00 23 be r1,r0,801bfd0 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 801bf48: b9 60 08 00 mv r1,r11 801bf4c: 2b 9d 00 04 lw ra,(sp+4) 801bf50: 2b 8b 00 18 lw r11,(sp+24) 801bf54: 2b 8c 00 14 lw r12,(sp+20) 801bf58: 2b 8d 00 10 lw r13,(sp+16) 801bf5c: 2b 8e 00 0c lw r14,(sp+12) 801bf60: 2b 8f 00 08 lw r15,(sp+8) 801bf64: 37 9c 00 1c addi sp,sp,28 801bf68: c3 a0 00 00 ret */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 801bf6c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 801bf70: fb ff ae 56 calli 80078c8 <== NOT EXECUTED 801bf74: b9 c0 58 00 mv r11,r14 <== NOT EXECUTED return (void *) 0; 801bf78: e3 ff ff f4 bi 801bf48 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 801bf7c: fb ff c5 8b calli 800d5a8 <__errno> 801bf80: 34 02 00 16 mvi r2,22 801bf84: 58 22 00 00 sw (r1+0),r2 801bf88: b9 e0 58 00 mv r11,r15 return (void *) 0; 801bf8c: e3 ff ff ef bi 801bf48 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) 801bf90: 78 01 08 01 mvhi r1,0x801 801bf94: 38 21 e8 a4 ori r1,r1,0xe8a4 801bf98: 28 21 00 00 lw r1,(r1+0) 801bf9c: 44 20 00 03 be r1,r0,801bfa8 } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 801bfa0: 34 0b 00 00 mvi r11,0 801bfa4: e3 ff ff e9 bi 801bf48 if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 801bfa8: 78 02 08 01 mvhi r2,0x801 801bfac: 38 42 e9 3c ori r2,r2,0xe93c 801bfb0: 28 42 00 00 lw r2,(r2+0) 801bfb4: 44 41 ff d5 be r2,r1,801bf08 } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 801bfb8: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 801bfbc: e3 ff ff e3 bi 801bf48 <== NOT EXECUTED /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 801bfc0: b9 c0 08 00 mv r1,r14 801bfc4: fb ff b0 03 calli 8007fd0 801bfc8: b8 20 58 00 mv r11,r1 801bfcc: e3 ff ff df bi 801bf48 * 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 ); 801bfd0: b9 c0 08 00 mv r1,r14 801bfd4: fb ff af ff calli 8007fd0 801bfd8: b8 20 78 00 mv r15,r1 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 801bfdc: 29 81 00 04 lw r1,(r12+4) 801bfe0: 34 21 ff ff addi r1,r1,-1 801bfe4: 59 81 00 04 sw (r12+4),r1 if ( !new_area ) { 801bfe8: 45 ed ff ee be r15,r13,801bfa0 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 801bfec: 2b 81 00 1c lw r1,(sp+28) 801bff0: b9 c0 18 00 mv r3,r14 801bff4: 50 2e 00 02 bgeu r1,r14,801bffc 801bff8: b8 20 18 00 mv r3,r1 801bffc: b9 60 10 00 mv r2,r11 801c000: b9 e0 08 00 mv r1,r15 801c004: fb ff c8 0f calli 800e040 free( ptr ); 801c008: b9 60 08 00 mv r1,r11 801c00c: fb ff ae 2f calli 80078c8 801c010: b9 e0 58 00 mv r11,r15 return new_area; 801c014: e3 ff ff cd bi 801bf48 080092bc : #include int rmdir( const char *pathname ) { 80092bc: 37 9c ff c4 addi sp,sp,-60 80092c0: 5b 8b 00 14 sw (sp+20),r11 80092c4: 5b 8c 00 10 sw (sp+16),r12 80092c8: 5b 8d 00 0c sw (sp+12),r13 80092cc: 5b 8e 00 08 sw (sp+8),r14 80092d0: 5b 9d 00 04 sw (sp+4),ra 80092d4: b8 20 60 00 mv r12,r1 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 80092d8: fb ff f9 4a calli 8007800 80092dc: b8 20 58 00 mv r11,r1 if ( parentpathlen == 0 ) 80092e0: 5c 20 00 80 bne r1,r0,80094e0 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 80092e4: 41 82 00 00 lbu r2,(r12+0) 80092e8: 64 43 00 5c cmpei r3,r2,92 80092ec: 64 41 00 2f cmpei r1,r2,47 80092f0: b8 61 08 00 or r1,r3,r1 80092f4: 44 2b 00 4e be r1,r11,800942c 80092f8: 78 01 08 07 mvhi r1,0x807 80092fc: 38 21 32 f0 ori r1,r1,0x32f0 8009300: 28 22 00 00 lw r2,(r1+0) 8009304: 34 0d 00 00 mvi r13,0 8009308: 28 41 00 18 lw r1,(r2+24) 800930c: 5b 81 00 2c sw (sp+44),r1 8009310: 28 41 00 1c lw r1,(r2+28) 8009314: 5b 81 00 30 sw (sp+48),r1 8009318: 28 41 00 20 lw r1,(r2+32) 800931c: 5b 81 00 34 sw (sp+52),r1 8009320: 28 41 00 24 lw r1,(r2+36) 8009324: 5b 81 00 38 sw (sp+56),r1 8009328: 28 42 00 28 lw r2,(r2+40) 800932c: 5b 82 00 3c sw (sp+60),r2 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 8009330: 2b 82 00 2c lw r2,(sp+44) name = pathname + parentpathlen; 8009334: b5 8b 58 00 add r11,r12,r11 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8009338: b9 60 08 00 mv r1,r11 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 800933c: 5b 82 00 18 sw (sp+24),r2 8009340: 2b 82 00 30 lw r2,(sp+48) 8009344: 5b 82 00 1c sw (sp+28),r2 8009348: 2b 82 00 34 lw r2,(sp+52) 800934c: 5b 82 00 20 sw (sp+32),r2 8009350: 2b 82 00 38 lw r2,(sp+56) 8009354: 5b 82 00 24 sw (sp+36),r2 8009358: 2b 82 00 3c lw r2,(sp+60) 800935c: 5b 82 00 28 sw (sp+40),r2 name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8009360: f8 01 1c 6e calli 8050518 8009364: b8 20 10 00 mv r2,r1 8009368: b9 60 08 00 mv r1,r11 800936c: fb ff f9 0c calli 800779c 8009370: b5 61 60 00 add r12,r11,r1 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 8009374: b9 80 08 00 mv r1,r12 8009378: f8 01 1c 68 calli 8050518 800937c: 34 03 00 00 mvi r3,0 8009380: 37 8b 00 18 addi r11,sp,24 8009384: b8 20 10 00 mv r2,r1 8009388: b9 60 20 00 mv r4,r11 800938c: b9 80 08 00 mv r1,r12 8009390: b8 60 28 00 mv r5,r3 8009394: fb ff f9 38 calli 8007874 0, &loc, false ); if ( result != 0 ) { 8009398: 5c 20 00 47 bne r1,r0,80094b4 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 800939c: 2b 83 00 24 lw r3,(sp+36) 80093a0: 28 62 00 10 lw r2,(r3+16) 80093a4: 44 41 00 6a be r2,r1,800954c if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 80093a8: b9 60 08 00 mv r1,r11 80093ac: d8 40 00 00 call r2 80093b0: 34 02 00 01 mvi r2,1 80093b4: 5c 22 00 2e bne r1,r2,800946c /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 80093b8: 2b 81 00 20 lw r1,(sp+32) 80093bc: 28 23 00 34 lw r3,(r1+52) 80093c0: 44 60 00 51 be r3,r0,8009504 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 80093c4: 37 8e 00 2c addi r14,sp,44 80093c8: b9 60 10 00 mv r2,r11 80093cc: b9 c0 08 00 mv r1,r14 80093d0: d8 60 00 00 call r3 rtems_filesystem_freenode( &loc ); 80093d4: 2b 82 00 24 lw r2,(sp+36) if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 80093d8: b8 20 60 00 mv r12,r1 rtems_filesystem_freenode( &loc ); 80093dc: 44 40 00 05 be r2,r0,80093f0 80093e0: 28 42 00 1c lw r2,(r2+28) 80093e4: 44 40 00 03 be r2,r0,80093f0 80093e8: b9 60 08 00 mv r1,r11 80093ec: d8 40 00 00 call r2 if ( free_parentloc ) 80093f0: 45 a0 00 07 be r13,r0,800940c rtems_filesystem_freenode( &parentloc ); 80093f4: 2b 81 00 38 lw r1,(sp+56) 80093f8: 44 20 00 05 be r1,r0,800940c 80093fc: 28 22 00 1c lw r2,(r1+28) 8009400: 44 40 00 03 be r2,r0,800940c 8009404: b9 c0 08 00 mv r1,r14 8009408: d8 40 00 00 call r2 return result; } 800940c: b9 80 08 00 mv r1,r12 8009410: 2b 9d 00 04 lw ra,(sp+4) 8009414: 2b 8b 00 14 lw r11,(sp+20) 8009418: 2b 8c 00 10 lw r12,(sp+16) 800941c: 2b 8d 00 0c lw r13,(sp+12) 8009420: 2b 8e 00 08 lw r14,(sp+8) 8009424: 37 9c 00 3c addi sp,sp,60 8009428: c3 a0 00 00 ret */ parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 800942c: 44 40 ff b3 be r2,r0,80092f8 <== NOT EXECUTED 8009430: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8009434: 38 21 32 f0 ori r1,r1,0x32f0 <== NOT EXECUTED 8009438: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 800943c: b9 60 68 00 mv r13,r11 <== NOT EXECUTED 8009440: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 8009444: 5b 82 00 2c sw (sp+44),r2 <== NOT EXECUTED 8009448: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED 800944c: 5b 82 00 30 sw (sp+48),r2 <== NOT EXECUTED 8009450: 28 22 00 0c lw r2,(r1+12) <== NOT EXECUTED 8009454: 5b 82 00 34 sw (sp+52),r2 <== NOT EXECUTED 8009458: 28 22 00 10 lw r2,(r1+16) <== NOT EXECUTED 800945c: 5b 82 00 38 sw (sp+56),r2 <== NOT EXECUTED 8009460: 28 21 00 14 lw r1,(r1+20) <== NOT EXECUTED 8009464: 5b 81 00 3c sw (sp+60),r1 <== NOT EXECUTED 8009468: e3 ff ff b2 bi 8009330 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ rtems_filesystem_freenode( &loc ); 800946c: 2b 81 00 24 lw r1,(sp+36) 8009470: 44 20 00 05 be r1,r0,8009484 8009474: 28 22 00 1c lw r2,(r1+28) 8009478: 44 40 00 03 be r2,r0,8009484 800947c: b9 60 08 00 mv r1,r11 8009480: d8 40 00 00 call r2 if ( free_parentloc ) 8009484: 45 a0 00 07 be r13,r0,80094a0 rtems_filesystem_freenode( &parentloc ); 8009488: 2b 81 00 38 lw r1,(sp+56) 800948c: 44 20 00 05 be r1,r0,80094a0 8009490: 28 22 00 1c lw r2,(r1+28) 8009494: 44 40 00 03 be r2,r0,80094a0 8009498: 37 81 00 2c addi r1,sp,44 800949c: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( ENOTDIR ); 80094a0: f8 00 fe 1e calli 8048d18 <__errno> 80094a4: 34 02 00 14 mvi r2,20 80094a8: 58 22 00 00 sw (r1+0),r2 80094ac: 34 0c ff ff mvi r12,-1 80094b0: e3 ff ff d7 bi 800940c name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 80094b4: 5d a0 00 03 bne r13,r0,80094c0 result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 80094b8: 34 0c ff ff mvi r12,-1 80094bc: e3 ff ff d4 bi 800940c result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 80094c0: 2b 81 00 38 lw r1,(sp+56) <== NOT EXECUTED 80094c4: 44 20 ff fd be r1,r0,80094b8 <== NOT EXECUTED 80094c8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 80094cc: 44 40 ff fb be r2,r0,80094b8 <== NOT EXECUTED 80094d0: 37 81 00 2c addi r1,sp,44 <== NOT EXECUTED 80094d4: d8 40 00 00 call r2 <== NOT EXECUTED 80094d8: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 80094dc: e3 ff ff cc bi 800940c <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 80094e0: b9 80 08 00 mv r1,r12 80094e4: b9 60 10 00 mv r2,r11 80094e8: 34 03 00 02 mvi r3,2 80094ec: 37 84 00 2c addi r4,sp,44 80094f0: 34 05 00 00 mvi r5,0 80094f4: fb ff f9 23 calli 8007980 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 80094f8: 5c 20 ff f0 bne r1,r0,80094b8 80094fc: 34 0d 00 01 mvi r13,1 8009500: e3 ff ff 8c bi 8009330 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 8009504: 2b 81 00 24 lw r1,(sp+36) <== NOT EXECUTED 8009508: 44 23 00 05 be r1,r3,800951c <== NOT EXECUTED 800950c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8009510: 44 40 00 03 be r2,r0,800951c <== NOT EXECUTED 8009514: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8009518: d8 40 00 00 call r2 <== NOT EXECUTED if ( free_parentloc ) 800951c: 45 a0 00 07 be r13,r0,8009538 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 8009520: 2b 81 00 38 lw r1,(sp+56) <== NOT EXECUTED 8009524: 44 20 00 05 be r1,r0,8009538 <== NOT EXECUTED 8009528: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800952c: 44 40 00 03 be r2,r0,8009538 <== NOT EXECUTED 8009530: 37 81 00 2c addi r1,sp,44 <== NOT EXECUTED 8009534: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8009538: f8 00 fd f8 calli 8048d18 <__errno> <== NOT EXECUTED 800953c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8009540: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8009544: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8009548: e3 ff ff b1 bi 800940c <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 800954c: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED 8009550: 44 62 ff f3 be r3,r2,800951c <== NOT EXECUTED 8009554: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8009558: d8 60 00 00 call r3 <== NOT EXECUTED 800955c: e3 ff ff f0 bi 800951c <== NOT EXECUTED 08014a5c : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 8014a5c: 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; } 8014a60: 38 21 b1 f0 ori r1,r1,0xb1f0 <== NOT EXECUTED 8014a64: c3 a0 00 00 ret <== NOT EXECUTED 080105f8 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 80105f8: 37 9c ff f8 addi sp,sp,-8 80105fc: 5b 8b 00 08 sw (sp+8),r11 8010600: 5b 9d 00 04 sw (sp+4),ra 8010604: b8 40 58 00 mv r11,r2 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 8010608: f8 00 00 0d calli 801063c if (nap) 801060c: 44 20 00 06 be r1,r0,8010624 return nap->name; 8010610: 28 21 00 00 lw r1,(r1+0) return rtems_assoc_name_bad(local_value); } 8010614: 2b 9d 00 04 lw ra,(sp+4) 8010618: 2b 8b 00 08 lw r11,(sp+8) 801061c: 37 9c 00 08 addi sp,sp,8 8010620: c3 a0 00 00 ret nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 8010624: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8010628: f8 00 11 0d calli 8014a5c <== NOT EXECUTED } 801062c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8010630: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8010634: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8010638: c3 a0 00 00 ret <== NOT EXECUTED 0800d4cc : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 800d4cc: 37 9c ff f4 addi sp,sp,-12 800d4d0: 5b 8b 00 0c sw (sp+12),r11 800d4d4: 5b 8c 00 08 sw (sp+8),r12 800d4d8: 5b 9d 00 04 sw (sp+4),ra 800d4dc: b8 20 58 00 mv r11,r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800d4e0: 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 ) { 800d4e4: b8 40 60 00 mv r12,r2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800d4e8: 44 20 00 1f be r1,r0,800d564 800d4ec: 78 02 08 01 mvhi r2,0x801 800d4f0: 38 42 d1 3c ori r2,r2,0xd13c 800d4f4: f8 00 04 ad calli 800e7a8 800d4f8: 34 02 00 00 mvi r2,0 800d4fc: 5c 22 00 0b bne r1,r2,800d528 default_ap = ap++; for ( ; ap->name; ap++) 800d500: 29 62 00 0c lw r2,(r11+12) <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 800d504: 35 63 00 0c addi r3,r11,12 <== NOT EXECUTED for ( ; ap->name; ap++) 800d508: 44 41 00 0a be r2,r1,800d530 <== NOT EXECUTED 800d50c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800d510: b8 60 58 00 mv r11,r3 <== NOT EXECUTED if (ap->local_value == local_value) 800d514: 29 61 00 04 lw r1,(r11+4) <== NOT EXECUTED 800d518: 44 2c 00 06 be r1,r12,800d530 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 800d51c: 35 6b 00 0c addi r11,r11,12 800d520: 29 61 00 00 lw r1,(r11+0) 800d524: 44 20 00 09 be r1,r0,800d548 if (ap->local_value == local_value) 800d528: 29 61 00 04 lw r1,(r11+4) 800d52c: 5c 2c ff fc bne r1,r12,800d51c return ap; return default_ap; } 800d530: b9 60 08 00 mv r1,r11 800d534: 2b 9d 00 04 lw ra,(sp+4) 800d538: 2b 8b 00 0c lw r11,(sp+12) 800d53c: 2b 8c 00 08 lw r12,(sp+8) 800d540: 37 9c 00 0c addi sp,sp,12 800d544: c3 a0 00 00 ret const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 800d548: b8 40 58 00 mv r11,r2 if (ap->local_value == local_value) return ap; return default_ap; } 800d54c: b9 60 08 00 mv r1,r11 800d550: 2b 9d 00 04 lw ra,(sp+4) 800d554: 2b 8b 00 0c lw r11,(sp+12) 800d558: 2b 8c 00 08 lw r12,(sp+8) 800d55c: 37 9c 00 0c addi sp,sp,12 800d560: c3 a0 00 00 ret uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800d564: b8 20 58 00 mv r11,r1 <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; } 800d568: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800d56c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800d570: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 800d574: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 800d578: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 800d57c: c3 a0 00 00 ret <== NOT EXECUTED 0800b774 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 800b774: 37 9c ff f4 addi sp,sp,-12 800b778: 5b 8b 00 0c sw (sp+12),r11 800b77c: 5b 8c 00 08 sw (sp+8),r12 800b780: 5b 9d 00 04 sw (sp+4),ra 800b784: b8 20 58 00 mv r11,r1 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800b788: 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 ) { 800b78c: b8 40 60 00 mv r12,r2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800b790: 44 20 00 1f be r1,r0,800b80c 800b794: 78 02 08 01 mvhi r2,0x801 800b798: 38 42 d1 3c ori r2,r2,0xd13c 800b79c: f8 00 0c 03 calli 800e7a8 800b7a0: 34 02 00 00 mvi r2,0 800b7a4: 5c 22 00 0b bne r1,r2,800b7d0 default_ap = ap++; for ( ; ap->name; ap++) 800b7a8: 29 62 00 0c lw r2,(r11+12) <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 800b7ac: 35 63 00 0c addi r3,r11,12 <== NOT EXECUTED for ( ; ap->name; ap++) 800b7b0: 44 41 00 0a be r2,r1,800b7d8 <== NOT EXECUTED 800b7b4: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800b7b8: b8 60 58 00 mv r11,r3 <== NOT EXECUTED if (ap->remote_value == remote_value) 800b7bc: 29 61 00 08 lw r1,(r11+8) <== NOT EXECUTED 800b7c0: 44 2c 00 06 be r1,r12,800b7d8 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 800b7c4: 35 6b 00 0c addi r11,r11,12 800b7c8: 29 61 00 00 lw r1,(r11+0) 800b7cc: 44 20 00 09 be r1,r0,800b7f0 if (ap->remote_value == remote_value) 800b7d0: 29 61 00 08 lw r1,(r11+8) 800b7d4: 5c 2c ff fc bne r1,r12,800b7c4 return ap; return default_ap; } 800b7d8: b9 60 08 00 mv r1,r11 800b7dc: 2b 9d 00 04 lw ra,(sp+4) 800b7e0: 2b 8b 00 0c lw r11,(sp+12) 800b7e4: 2b 8c 00 08 lw r12,(sp+8) 800b7e8: 37 9c 00 0c addi sp,sp,12 800b7ec: c3 a0 00 00 ret const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 800b7f0: b8 40 58 00 mv r11,r2 if (ap->remote_value == remote_value) return ap; return default_ap; } 800b7f4: b9 60 08 00 mv r1,r11 800b7f8: 2b 9d 00 04 lw ra,(sp+4) 800b7fc: 2b 8b 00 0c lw r11,(sp+12) 800b800: 2b 8c 00 08 lw r12,(sp+8) 800b804: 37 9c 00 0c addi sp,sp,12 800b808: c3 a0 00 00 ret uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 800b80c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; } 800b810: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800b814: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800b818: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 800b81c: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 800b820: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 800b824: c3 a0 00 00 ret <== NOT EXECUTED 0800ca90 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 800ca90: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 800ca94: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 800ca98: f8 00 02 8d calli 800d4cc <== NOT EXECUTED if (nap) 800ca9c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 800caa0: 44 20 00 02 be r1,r0,800caa8 <== NOT EXECUTED return nap->remote_value; 800caa4: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED return 0; } 800caa8: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 800caac: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800cab0: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800cab4: c3 a0 00 00 ret <== NOT EXECUTED 08000f2c : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 8000f2c: 37 9c ff f0 addi sp,sp,-16 8000f30: 5b 8b 00 08 sw (sp+8),r11 8000f34: 5b 9d 00 04 sw (sp+4),ra const char *p; if ( !name ) 8000f38: 34 0b 00 00 mvi r11,0 8000f3c: 5c 2b 00 07 bne r1,r11,8000f58 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i return NULL; if ( !length ) 8000f5c: 44 6b ff f9 be r3,r11,8000f40 return NULL; value[0] = '\0'; 8000f60: 30 4b 00 00 sb (r2+0),r11 p = rtems_bsp_cmdline_get_param_raw( name ); 8000f64: 5b 82 00 10 sw (sp+16),r2 8000f68: 5b 83 00 0c sw (sp+12),r3 8000f6c: f8 00 00 1e calli 8000fe4 if ( !p ) 8000f70: 2b 82 00 10 lw r2,(sp+16) 8000f74: 2b 83 00 0c lw r3,(sp+12) 8000f78: 44 2b ff f2 be r1,r11,8000f40 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 8000f84: 34 63 ff ff addi r3,r3,-1 8000f88: 44 6b ff ef be r3,r11,8000f44 8000f8c: b9 60 20 00 mv r4,r11 8000f90: b9 60 30 00 mv r6,r11 if ( *p == '\"' ) { 8000f94: 34 08 00 22 mvi r8,34 quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 8000f98: 34 09 00 20 mvi r9,32 8000f9c: 20 c7 00 01 andi r7,r6,0x1 int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 8000fa4: 5c e0 00 02 bne r7,r0,8000fac 8000fa8: 44 a9 ff e7 be r5,r9,8000f44 break; value[i++] = *p++; 8000fac: 34 84 00 01 addi r4,r4,1 8000fb0: b4 4b 58 00 add r11,r2,r11 8000fb4: 31 65 00 00 sb (r11+0),r5 value[i] = '\0'; 8000fb8: 34 07 00 00 mvi r7,0 8000fbc: b4 44 28 00 add r5,r2,r4 8000fc0: 30 a7 00 00 sb (r5+0),r7 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 8000fd4: 54 64 ff f2 bgu r3,r4,8000f9c 8000fd8: e3 ff ff db bi 8000f44 <== NOT EXECUTED if ( *p == '\"' ) { quotes++; 8000fdc: 34 c6 00 01 addi r6,r6,1 <== NOT EXECUTED 8000fe0: e3 ff ff f3 bi 8000fac <== NOT EXECUTED 08001024 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 8001024: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8001028: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 800102c: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8001030: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8001034: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8001038: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 800103c: b8 40 58 00 mv r11,r2 <== NOT EXECUTED const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 8001040: fb ff ff bb calli 8000f2c <== NOT EXECUTED 8001044: b8 20 60 00 mv r12,r1 <== NOT EXECUTED if ( !p ) 8001048: 5c 20 00 09 bne r1,r0,800106c <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; 800104c: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED } 8001050: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8001054: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8001058: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 800105c: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8001060: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8001064: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8001068: c3 a0 00 00 ret <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 800106c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8001070: f8 00 36 41 calli 800e974 <== NOT EXECUTED 8001074: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED if ( *rhs != '=' ) 8001078: 40 23 00 00 lbu r3,(r1+0) <== NOT EXECUTED 800107c: 34 02 00 3d mvi r2,61 <== NOT EXECUTED 8001080: 5c 62 ff f3 bne r3,r2,800104c <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) 8001084: 40 24 00 01 lbu r4,(r1+1) <== NOT EXECUTED 8001088: 34 02 00 22 mvi r2,34 <== NOT EXECUTED rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; rhs++; 800108c: 34 25 00 01 addi r5,r1,1 <== NOT EXECUTED if ( *rhs == '\"' ) 8001090: 44 82 00 16 be r4,r2,80010e8 <== NOT EXECUTED rhs++; for ( d=value ; *rhs ; ) 8001094: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8001098: 44 80 00 06 be r4,r0,80010b0 <== NOT EXECUTED *d++ = *rhs++; 800109c: 30 64 00 00 sb (r3+0),r4 <== NOT EXECUTED 80010a0: 34 a5 00 01 addi r5,r5,1 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 80010a4: 40 a4 00 00 lbu r4,(r5+0) <== NOT EXECUTED *d++ = *rhs++; 80010a8: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 80010ac: 5c 80 ff fc bne r4,r0,800109c <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 80010b0: 40 64 ff ff lbu r4,(r3+-1) <== NOT EXECUTED 80010b4: 34 02 00 22 mvi r2,34 <== NOT EXECUTED 80010b8: 34 61 ff ff addi r1,r3,-1 <== NOT EXECUTED 80010bc: 44 82 00 02 be r4,r2,80010c4 <== NOT EXECUTED 80010c0: b8 60 08 00 mv r1,r3 <== NOT EXECUTED d--; *d = '\0'; 80010c4: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 80010c8: 30 22 00 00 sb (r1+0),r2 <== NOT EXECUTED return value; } 80010cc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80010d0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80010d4: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 80010d8: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 80010dc: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 80010e0: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 80010e4: c3 a0 00 00 ret <== NOT EXECUTED if ( *rhs != '=' ) return NULL; rhs++; if ( *rhs == '\"' ) rhs++; 80010e8: 40 24 00 02 lbu r4,(r1+2) <== NOT EXECUTED 80010ec: 34 25 00 02 addi r5,r1,2 <== NOT EXECUTED 80010f0: e3 ff ff e9 bi 8001094 <== NOT EXECUTED 0800fe3c : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 800fe3c: b8 20 18 00 mv r3,r1 if ( !routine ) 800fe40: 34 01 00 09 mvi r1,9 800fe44: 44 60 00 05 be r3,r0,800fe58 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 800fe48: 78 02 08 04 mvhi r2,0x804 <== NOT EXECUTED 800fe4c: 38 42 0e 4c ori r2,r2,0xe4c <== NOT EXECUTED 800fe50: 58 43 00 00 sw (r2+0),r3 <== NOT EXECUTED 800fe54: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 800fe58: c3 a0 00 00 ret 0800ca50 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 800ca50: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 800ca54: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 800ca58: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800ca5c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 800ca60: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800ca64: 38 21 d1 d4 ori r1,r1,0xd1d4 <== NOT EXECUTED 800ca68: f8 00 00 0a calli 800ca90 <== NOT EXECUTED 800ca6c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 800ca70: 44 20 00 03 be r1,r0,800ca7c <== NOT EXECUTED { errno = rc; 800ca74: f8 00 02 cd calli 800d5a8 <__errno> <== NOT EXECUTED 800ca78: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED return -1; } return -1; } 800ca7c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800ca80: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800ca84: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 800ca88: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 800ca8c: c3 a0 00 00 ret <== NOT EXECUTED 080071c0 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 80071c0: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED 80071c4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 80071c8: 5b 83 00 0c sw (sp+12),r3 <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); chars_written = rtems_verror(error_flag, printf_format, arglist); 80071cc: 37 83 00 0c addi r3,sp,12 <== NOT EXECUTED int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 80071d0: 5b 84 00 10 sw (sp+16),r4 <== NOT EXECUTED 80071d4: 5b 85 00 14 sw (sp+20),r5 <== NOT EXECUTED 80071d8: 5b 86 00 18 sw (sp+24),r6 <== NOT EXECUTED 80071dc: 5b 87 00 1c sw (sp+28),r7 <== NOT EXECUTED 80071e0: 5b 88 00 20 sw (sp+32),r8 <== NOT EXECUTED 80071e4: 5b 82 00 08 sw (sp+8),r2 <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); chars_written = rtems_verror(error_flag, printf_format, arglist); 80071e8: fb ff ff 65 calli 8006f7c <== NOT EXECUTED va_end(arglist); return chars_written; } 80071ec: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80071f0: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED 80071f4: c3 a0 00 00 ret <== NOT EXECUTED 08000ecc : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 8000ecc: 37 9c ff fc addi sp,sp,-4 8000ed0: 5b 9d 00 04 sw (sp+4),ra /* * Verify Input parameters. */ if ( !pathname ) 8000ed4: 44 20 00 31 be r1,r0,8000f98 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 8000ed8: 44 80 00 2b be r4,r0,8000f84 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 8000edc: 40 26 00 00 lbu r6,(r1+0) 8000ee0: 64 c8 00 5c cmpei r8,r6,92 8000ee4: 64 c7 00 2f cmpei r7,r6,47 8000ee8: b9 07 38 00 or r7,r8,r7 8000eec: 44 e0 00 16 be r7,r0,8000f44 8000ef0: 78 06 08 01 mvhi r6,0x801 8000ef4: 38 c6 e1 10 ori r6,r6,0xe110 8000ef8: 28 c6 00 00 lw r6,(r6+0) 8000efc: 34 07 00 01 mvi r7,1 8000f00: b8 e0 40 00 mv r8,r7 8000f04: 28 c9 00 18 lw r9,(r6+24) 8000f08: 58 89 00 00 sw (r4+0),r9 8000f0c: 28 c9 00 1c lw r9,(r6+28) 8000f10: 58 89 00 04 sw (r4+4),r9 8000f14: 28 c9 00 20 lw r9,(r6+32) 8000f18: 58 89 00 08 sw (r4+8),r9 8000f1c: 28 c9 00 24 lw r9,(r6+36) 8000f20: 58 89 00 0c sw (r4+12),r9 8000f24: 28 c6 00 28 lw r6,(r6+40) 8000f28: 58 86 00 10 sw (r4+16),r6 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 8000f2c: b4 27 08 00 add r1,r1,r7 8000f30: c8 48 10 00 sub r2,r2,r8 8000f34: fb ff ff a3 calli 8000dc0 pathnamelen - i, flags, pathloc, follow_link ); } 8000f38: 2b 9d 00 04 lw ra,(sp+4) 8000f3c: 37 9c 00 04 addi sp,sp,4 8000f40: c3 a0 00 00 ret /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 8000f44: 44 c7 ff eb be r6,r7,8000ef0 8000f48: 78 06 08 01 mvhi r6,0x801 8000f4c: 38 c6 e1 10 ori r6,r6,0xe110 8000f50: 28 c6 00 00 lw r6,(r6+0) 8000f54: b8 e0 40 00 mv r8,r7 8000f58: 28 c9 00 04 lw r9,(r6+4) 8000f5c: 58 89 00 00 sw (r4+0),r9 8000f60: 28 c9 00 08 lw r9,(r6+8) 8000f64: 58 89 00 04 sw (r4+4),r9 8000f68: 28 c9 00 0c lw r9,(r6+12) 8000f6c: 58 89 00 08 sw (r4+8),r9 8000f70: 28 c9 00 10 lw r9,(r6+16) 8000f74: 58 89 00 0c sw (r4+12),r9 8000f78: 28 c6 00 14 lw r6,(r6+20) 8000f7c: 58 86 00 10 sw (r4+16),r6 8000f80: e3 ff ff eb bi 8000f2c if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 8000f84: f8 00 31 89 calli 800d5a8 <__errno> <== NOT EXECUTED 8000f88: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8000f8c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000f90: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000f94: e3 ff ff e9 bi 8000f38 <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 8000f98: f8 00 31 84 calli 800d5a8 <__errno> 8000f9c: 34 02 00 0e mvi r2,14 8000fa0: 58 22 00 00 sw (r1+0),r2 8000fa4: 34 01 ff ff mvi r1,-1 8000fa8: e3 ff ff e4 bi 8000f38 08000dc0 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 8000dc0: 37 9c ff f0 addi sp,sp,-16 8000dc4: 5b 8b 00 10 sw (sp+16),r11 8000dc8: 5b 8c 00 0c sw (sp+12),r12 8000dcc: 5b 8d 00 08 sw (sp+8),r13 8000dd0: 5b 9d 00 04 sw (sp+4),ra 8000dd4: b8 a0 60 00 mv r12,r5 8000dd8: b8 60 68 00 mv r13,r3 8000ddc: b8 80 58 00 mv r11,r4 /* * Verify Input parameters. */ if ( !pathname ) 8000de0: 44 20 00 33 be r1,r0,8000eac rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 8000de4: 44 80 00 2d be r4,r0,8000e98 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 8000de8: 28 85 00 0c lw r5,(r4+12) 8000dec: 28 a6 00 00 lw r6,(r5+0) 8000df0: 44 c0 00 25 be r6,r0,8000e84 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 8000df4: d8 c0 00 00 call r6 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 8000df8: 7d 8c 00 00 cmpnei r12,r12,0 8000dfc: 64 24 00 00 cmpei r4,r1,0 8000e00: a0 8c 60 00 and r12,r4,r12 8000e04: 45 80 00 0a be r12,r0,8000e2c if ( !pathloc->ops->node_type_h ){ 8000e08: 29 61 00 0c lw r1,(r11+12) 8000e0c: 28 24 00 10 lw r4,(r1+16) 8000e10: 44 80 00 19 be r4,r0,8000e74 rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 8000e14: b9 60 08 00 mv r1,r11 8000e18: d8 80 00 00 call r4 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 8000e1c: 34 21 ff fd addi r1,r1,-3 8000e20: 34 02 00 01 mvi r2,1 8000e24: 50 41 00 08 bgeu r2,r1,8000e44 8000e28: 34 01 00 00 mvi r1,0 result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 8000e2c: 2b 9d 00 04 lw ra,(sp+4) 8000e30: 2b 8b 00 10 lw r11,(sp+16) 8000e34: 2b 8c 00 0c lw r12,(sp+12) 8000e38: 2b 8d 00 08 lw r13,(sp+8) 8000e3c: 37 9c 00 10 addi sp,sp,16 8000e40: c3 a0 00 00 ret type = (*pathloc->ops->node_type_h)( pathloc ); if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 8000e44: 29 61 00 0c lw r1,(r11+12) 8000e48: 28 23 00 34 lw r3,(r1+52) 8000e4c: 44 60 00 1d be r3,r0,8000ec0 * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 8000e50: b9 60 08 00 mv r1,r11 8000e54: b9 a0 10 00 mv r2,r13 8000e58: d8 60 00 00 call r3 } } return result; } 8000e5c: 2b 9d 00 04 lw ra,(sp+4) 8000e60: 2b 8b 00 10 lw r11,(sp+16) 8000e64: 2b 8c 00 0c lw r12,(sp+12) 8000e68: 2b 8d 00 08 lw r13,(sp+8) 8000e6c: 37 9c 00 10 addi sp,sp,16 8000e70: c3 a0 00 00 ret */ if ( (result == 0) && follow_link ) { if ( !pathloc->ops->node_type_h ){ rtems_filesystem_freenode( pathloc ); 8000e74: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8000e78: 44 44 00 03 be r2,r4,8000e84 <== NOT EXECUTED if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 8000e7c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000e80: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8000e84: f8 00 31 c9 calli 800d5a8 <__errno> <== NOT EXECUTED 8000e88: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8000e8c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000e90: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000e94: e3 ff ff e6 bi 8000e2c <== NOT EXECUTED if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 8000e98: f8 00 31 c4 calli 800d5a8 <__errno> <== NOT EXECUTED 8000e9c: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8000ea0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000ea4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000ea8: e3 ff ff e1 bi 8000e2c <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 8000eac: f8 00 31 bf calli 800d5a8 <__errno> <== NOT EXECUTED 8000eb0: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8000eb4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000eb8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000ebc: e3 ff ff dc bi 8000e2c <== NOT EXECUTED if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 8000ec0: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8000ec4: 5c 43 ff ee bne r2,r3,8000e7c <== NOT EXECUTED 8000ec8: e3 ff ff ef bi 8000e84 <== NOT EXECUTED 08000b64 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 8000b64: 37 9c ff d8 addi sp,sp,-40 8000b68: 5b 8b 00 10 sw (sp+16),r11 8000b6c: 5b 8c 00 0c sw (sp+12),r12 8000b70: 5b 8d 00 08 sw (sp+8),r13 8000b74: 5b 9d 00 04 sw (sp+4),ra /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 8000b78: 78 0b 08 01 mvhi r11,0x801 8000b7c: 39 6b e1 10 ori r11,r11,0xe110 8000b80: 29 62 00 00 lw r2,(r11+0) 8000b84: 34 01 00 12 mvi r1,18 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 8000b88: 34 0c 00 00 mvi r12,0 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 8000b8c: 58 41 00 2c sw (r2+44),r1 init_fs_mount_table(); 8000b90: f8 00 01 ef calli 800134c /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 8000b94: 78 01 08 01 mvhi r1,0x801 8000b98: 38 21 c7 b4 ori r1,r1,0xc7b4 8000b9c: 28 21 00 00 lw r1,(r1+0) 8000ba0: 44 2c 00 49 be r1,r12,8000cc4 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 8000ba4: 78 01 08 01 mvhi r1,0x801 8000ba8: 38 21 e0 18 ori r1,r1,0xe018 8000bac: 28 24 00 00 lw r4,(r1+0) status = mount( 8000bb0: 37 81 00 28 addi r1,sp,40 8000bb4: 28 82 00 00 lw r2,(r4+0) 8000bb8: 28 85 00 0c lw r5,(r4+12) 8000bbc: 28 83 00 04 lw r3,(r4+4) 8000bc0: 28 84 00 08 lw r4,(r4+8) 8000bc4: f8 00 01 ea calli 800136c &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 8000bc8: 34 02 ff ff mvi r2,-1 8000bcc: 44 22 00 44 be r1,r2,8000cdc * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8000bd0: 2b 87 00 28 lw r7,(sp+40) &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 8000bd4: 29 66 00 00 lw r6,(r11+0) * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000bd8: 37 8d 00 14 addi r13,sp,20 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8000bdc: 28 e2 00 1c lw r2,(r7+28) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000be0: 78 01 08 01 mvhi r1,0x801 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 8000be4: 0c cc 00 30 sh (r6+48),r12 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8000be8: 58 c2 00 18 sw (r6+24),r2 8000bec: 28 e4 00 20 lw r4,(r7+32) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000bf0: 34 02 00 01 mvi r2,1 8000bf4: b9 80 18 00 mv r3,r12 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8000bf8: 58 c4 00 1c sw (r6+28),r4 8000bfc: 28 e8 00 24 lw r8,(r7+36) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000c00: b9 a0 20 00 mv r4,r13 8000c04: b9 80 28 00 mv r5,r12 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8000c08: 58 c8 00 20 sw (r6+32),r8 8000c0c: 28 e8 00 28 lw r8,(r7+40) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000c10: 38 21 ca 10 ori r1,r1,0xca10 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 8000c14: 58 c8 00 24 sw (r6+36),r8 8000c18: 28 e7 00 2c lw r7,(r7+44) 8000c1c: 58 c7 00 28 sw (r6+40),r7 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000c20: f8 00 00 ab calli 8000ecc rtems_filesystem_root = loc; 8000c24: 2b 82 00 14 lw r2,(sp+20) 8000c28: 29 66 00 00 lw r6,(r11+0) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000c2c: 78 01 08 01 mvhi r1,0x801 8000c30: b9 80 18 00 mv r3,r12 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 8000c34: 58 c2 00 18 sw (r6+24),r2 8000c38: 2b 87 00 18 lw r7,(sp+24) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000c3c: b9 a0 20 00 mv r4,r13 8000c40: 34 02 00 01 mvi r2,1 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 8000c44: 58 c7 00 1c sw (r6+28),r7 8000c48: 2b 88 00 1c lw r8,(sp+28) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000c4c: 38 21 ca 10 ori r1,r1,0xca10 8000c50: b9 80 28 00 mv r5,r12 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 8000c54: 58 c8 00 20 sw (r6+32),r8 8000c58: 2b 87 00 20 lw r7,(sp+32) 8000c5c: 58 c7 00 24 sw (r6+36),r7 8000c60: 2b 88 00 24 lw r8,(sp+36) 8000c64: 58 c8 00 28 sw (r6+40),r8 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 8000c68: f8 00 00 99 calli 8000ecc rtems_filesystem_current = loc; 8000c6c: 2b 82 00 14 lw r2,(sp+20) 8000c70: 29 63 00 00 lw r3,(r11+0) * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 8000c74: 78 01 08 01 mvhi r1,0x801 8000c78: 38 21 ca 14 ori r1,r1,0xca14 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 8000c7c: 58 62 00 04 sw (r3+4),r2 8000c80: 2b 84 00 18 lw r4,(sp+24) * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 8000c84: 34 02 01 ff mvi r2,511 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 8000c88: 58 64 00 08 sw (r3+8),r4 8000c8c: 2b 87 00 1c lw r7,(sp+28) 8000c90: 58 67 00 0c sw (r3+12),r7 8000c94: 2b 88 00 20 lw r8,(sp+32) 8000c98: 58 68 00 10 sw (r3+16),r8 8000c9c: 2b 84 00 24 lw r4,(sp+36) 8000ca0: 58 64 00 14 sw (r3+20),r4 * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 8000ca4: f8 00 01 3f calli 80011a0 if ( status != 0 ) 8000ca8: 5c 20 00 0a bne r1,r0,8000cd0 * it will be mounted onto is created. Moreover, if it is going to * use a device, then it is REALLY unfair to attempt this * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ } 8000cac: 2b 9d 00 04 lw ra,(sp+4) 8000cb0: 2b 8b 00 10 lw r11,(sp+16) 8000cb4: 2b 8c 00 0c lw r12,(sp+12) 8000cb8: 2b 8d 00 08 lw r13,(sp+8) 8000cbc: 37 9c 00 28 addi sp,sp,40 8000cc0: c3 a0 00 00 ret /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 8000cc4: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8000cc8: 38 21 00 01 ori r1,r1,0x1 <== NOT EXECUTED 8000ccc: f8 00 07 1c calli 800293c <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 8000cd0: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8000cd4: 38 21 00 03 ori r1,r1,0x3 <== NOT EXECUTED 8000cd8: f8 00 07 19 calli 800293c <== NOT EXECUTED status = mount( &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 8000cdc: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8000ce0: 38 21 00 02 ori r1,r1,0x2 <== NOT EXECUTED 8000ce4: f8 00 07 16 calli 800293c <== NOT EXECUTED 08009944 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 8009944: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 8009948: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 800994c: e4 61 08 00 cmpe r1,r3,r1 <== NOT EXECUTED 8009950: c3 a0 00 00 ret <== NOT EXECUTED 08000ce8 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 8000ce8: b8 20 38 00 mv r7,r1 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 8000cec: 40 21 00 00 lbu r1,(r1+0) 8000cf0: 7c 44 00 00 cmpnei r4,r2,0 8000cf4: 7c 23 00 00 cmpnei r3,r1,0 8000cf8: a0 83 18 00 and r3,r4,r3 8000cfc: 44 60 00 12 be r3,r0,8000d44 8000d00: 64 23 00 2f cmpei r3,r1,47 8000d04: 64 21 00 5c cmpei r1,r1,92 8000d08: b8 23 08 00 or r1,r1,r3 8000d0c: 44 20 00 0e be r1,r0,8000d44 8000d10: 34 01 00 00 mvi r1,0 { pathname++; pathnamelen--; stripped++; 8000d14: 34 21 00 01 addi r1,r1,1 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 8000d18: b4 e1 18 00 add r3,r7,r1 8000d1c: 40 63 00 00 lbu r3,(r3+0) 8000d20: fc 41 30 00 cmpne r6,r2,r1 8000d24: 7c 64 00 00 cmpnei r4,r3,0 8000d28: 64 65 00 2f cmpei r5,r3,47 8000d2c: 64 63 00 5c cmpei r3,r3,92 8000d30: a0 c4 20 00 and r4,r6,r4 8000d34: b8 65 18 00 or r3,r3,r5 8000d38: 44 80 00 04 be r4,r0,8000d48 8000d3c: 5c 60 ff f6 bne r3,r0,8000d14 8000d40: c3 a0 00 00 ret 8000d44: 34 01 00 00 mvi r1,0 <== NOT EXECUTED pathname++; pathnamelen--; stripped++; } return stripped; } 8000d48: c3 a0 00 00 ret <== NOT EXECUTED 08000a08 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 8000a08: 37 9c ff d0 addi sp,sp,-48 <== NOT EXECUTED 8000a0c: 5b 8b 00 1c sw (sp+28),r11 <== NOT EXECUTED 8000a10: 5b 8c 00 18 sw (sp+24),r12 <== NOT EXECUTED 8000a14: 5b 8d 00 14 sw (sp+20),r13 <== NOT EXECUTED 8000a18: 5b 8e 00 10 sw (sp+16),r14 <== NOT EXECUTED 8000a1c: 5b 8f 00 0c sw (sp+12),r15 <== NOT EXECUTED 8000a20: 5b 90 00 08 sw (sp+8),r16 <== NOT EXECUTED 8000a24: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8000a28: b8 40 68 00 mv r13,r2 <== NOT EXECUTED 8000a2c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 8000a30: 37 8b 00 20 addi r11,sp,32 <== NOT EXECUTED 8000a34: f8 00 37 ad calli 800e8e8 <== NOT EXECUTED 8000a38: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8000a3c: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8000a40: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8000a44: b9 60 20 00 mv r4,r11 <== NOT EXECUTED 8000a48: 34 05 00 01 mvi r5,1 <== NOT EXECUTED 8000a4c: f8 00 01 20 calli 8000ecc <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 8000a50: 2b 82 00 2c lw r2,(sp+44) <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 8000a54: b8 20 78 00 mv r15,r1 <== NOT EXECUTED the_jnode = loc.node_access; 8000a58: 2b 90 00 20 lw r16,(sp+32) <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 8000a5c: 28 43 00 10 lw r3,(r2+16) <== NOT EXECUTED 8000a60: 44 60 00 17 be r3,r0,8000abc <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); 8000a64: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000a68: d8 60 00 00 call r3 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 8000a6c: 7c 21 00 02 cmpnei r1,r1,2 <== NOT EXECUTED 8000a70: 7d ee 00 00 cmpnei r14,r15,0 <== NOT EXECUTED 8000a74: b8 2e 70 00 or r14,r1,r14 <== NOT EXECUTED 8000a78: 45 c0 00 1a be r14,r0,8000ae0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 8000a7c: 2b 81 00 2c lw r1,(sp+44) <== NOT EXECUTED 8000a80: 44 20 00 28 be r1,r0,8000b20 <== NOT EXECUTED 8000a84: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8000a88: 44 40 00 26 be r2,r0,8000b20 <== NOT EXECUTED 8000a8c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000a90: d8 40 00 00 call r2 <== NOT EXECUTED 8000a94: 34 01 00 0d mvi r1,13 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 8000a98: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8000a9c: 2b 8b 00 1c lw r11,(sp+28) <== NOT EXECUTED 8000aa0: 2b 8c 00 18 lw r12,(sp+24) <== NOT EXECUTED 8000aa4: 2b 8d 00 14 lw r13,(sp+20) <== NOT EXECUTED 8000aa8: 2b 8e 00 10 lw r14,(sp+16) <== NOT EXECUTED 8000aac: 2b 8f 00 0c lw r15,(sp+12) <== NOT EXECUTED 8000ab0: 2b 90 00 08 lw r16,(sp+8) <== NOT EXECUTED 8000ab4: 37 9c 00 30 addi sp,sp,48 <== NOT EXECUTED 8000ab8: c3 a0 00 00 ret <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 8000abc: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8000ac0: 44 43 00 03 be r2,r3,8000acc <== NOT EXECUTED 8000ac4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000ac8: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8000acc: f8 00 32 b7 calli 800d5a8 <__errno> <== NOT EXECUTED 8000ad0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8000ad4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000ad8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000adc: e3 ff ff ef bi 8000a98 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 8000ae0: 59 ac 00 00 sw (r13+0),r12 <== NOT EXECUTED device_info->device_name_length = strlen( name ); 8000ae4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8000ae8: f8 00 37 80 calli 800e8e8 <== NOT EXECUTED 8000aec: 59 a1 00 04 sw (r13+4),r1 <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 8000af0: 2a 01 00 50 lw r1,(r16+80) <== NOT EXECUTED 8000af4: 59 a1 00 08 sw (r13+8),r1 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 8000af8: 2a 10 00 54 lw r16,(r16+84) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 8000afc: 2b 81 00 2c lw r1,(sp+44) <== NOT EXECUTED } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; 8000b00: 59 b0 00 0c sw (r13+12),r16 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 8000b04: 44 2e 00 09 be r1,r14,8000b28 <== NOT EXECUTED 8000b08: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8000b0c: 44 40 00 07 be r2,r0,8000b28 <== NOT EXECUTED 8000b10: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000b14: d8 40 00 00 call r2 <== NOT EXECUTED 8000b18: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8000b1c: e3 ff ff df bi 8000a98 <== NOT EXECUTED 8000b20: 34 01 00 0d mvi r1,13 <== NOT EXECUTED 8000b24: e3 ff ff dd bi 8000a98 <== NOT EXECUTED 8000b28: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8000b2c: e3 ff ff db bi 8000a98 <== NOT EXECUTED 08004e08 : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 8004e08: 37 9c ff ec addi sp,sp,-20 8004e0c: 5b 8b 00 10 sw (sp+16),r11 8004e10: 5b 8c 00 0c sw (sp+12),r12 8004e14: 5b 8d 00 08 sw (sp+8),r13 8004e18: 5b 9d 00 04 sw (sp+4),ra rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 8004e1c: 78 04 08 02 mvhi r4,0x802 8004e20: 38 84 69 dc ori r4,r4,0x69dc 8004e24: 28 85 00 00 lw r5,(r4+0) rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; 8004e28: 78 04 08 02 mvhi r4,0x802 8004e2c: 38 84 72 7c ori r4,r4,0x727c rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 8004e30: b8 20 58 00 mv r11,r1 8004e34: b8 40 60 00 mv r12,r2 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 8004e38: 34 01 00 12 mvi r1,18 rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; 8004e3c: 28 82 00 00 lw r2,(r4+0) if ( rtems_interrupt_is_in_progress() ) 8004e40: 5c a0 00 08 bne r5,r0,8004e60 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 8004e44: 44 65 00 52 be r3,r5,8004f8c return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 8004e48: 58 62 00 00 sw (r3+0),r2 if ( driver_table == NULL ) 8004e4c: 45 80 00 50 be r12,r0,8004f8c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004e50: 29 81 00 00 lw r1,(r12+0) 8004e54: 44 20 00 4c be r1,r0,8004f84 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 8004e58: 54 4b 00 08 bgu r2,r11,8004e78 8004e5c: 34 01 00 0a mvi r1,10 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 8004e60: 2b 9d 00 04 lw ra,(sp+4) 8004e64: 2b 8b 00 10 lw r11,(sp+16) 8004e68: 2b 8c 00 0c lw r12,(sp+12) 8004e6c: 2b 8d 00 08 lw r13,(sp+8) 8004e70: 37 9c 00 14 addi sp,sp,20 8004e74: c3 a0 00 00 ret rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 8004e78: 78 01 08 02 mvhi r1,0x802 8004e7c: 38 21 69 44 ori r1,r1,0x6944 8004e80: 28 22 00 00 lw r2,(r1+0) 8004e84: 34 42 00 01 addi r2,r2,1 8004e88: 58 22 00 00 sw (r1+0),r2 if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 8004e8c: 5d 60 00 2a bne r11,r0,8004f34 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 8004e90: 28 84 00 00 lw r4,(r4+0) rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 8004e94: 44 8b 00 48 be r4,r11,8004fb4 8004e98: 78 01 08 02 mvhi r1,0x802 8004e9c: 38 21 72 80 ori r1,r1,0x7280 8004ea0: 28 2d 00 00 lw r13,(r1+0) 8004ea4: b9 a0 08 00 mv r1,r13 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004ea8: 28 22 00 00 lw r2,(r1+0) 8004eac: 44 40 00 3f be r2,r0,8004fa8 rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 8004eb0: 35 6b 00 01 addi r11,r11,1 8004eb4: 34 21 00 18 addi r1,r1,24 8004eb8: 54 8b ff fc bgu r4,r11,8004ea8 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 8004ebc: 58 6b 00 00 sw (r3+0),r11 if ( m != n ) 8004ec0: 44 8b 00 3e be r4,r11,8004fb8 8004ec4: b5 6b 08 00 add r1,r11,r11 8004ec8: b4 2b 08 00 add r1,r1,r11 8004ecc: 34 02 00 03 mvi r2,3 8004ed0: fb ff ef 45 calli 8000be4 <__ashlsi3> 8004ed4: b5 a1 08 00 add r1,r13,r1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 8004ed8: 29 82 00 00 lw r2,(r12+0) 8004edc: 58 22 00 00 sw (r1+0),r2 8004ee0: 29 82 00 04 lw r2,(r12+4) 8004ee4: 58 22 00 04 sw (r1+4),r2 8004ee8: 29 82 00 08 lw r2,(r12+8) 8004eec: 58 22 00 08 sw (r1+8),r2 8004ef0: 29 82 00 0c lw r2,(r12+12) 8004ef4: 58 22 00 0c sw (r1+12),r2 8004ef8: 29 82 00 10 lw r2,(r12+16) 8004efc: 58 22 00 10 sw (r1+16),r2 8004f00: 29 8c 00 14 lw r12,(r12+20) 8004f04: 58 2c 00 14 sw (r1+20),r12 _Thread_Enable_dispatch(); 8004f08: f8 00 07 eb calli 8006eb4 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 8004f0c: 34 02 00 00 mvi r2,0 8004f10: b9 60 08 00 mv r1,r11 8004f14: b8 40 18 00 mv r3,r2 8004f18: f8 00 2b b4 calli 800fde8 } 8004f1c: 2b 9d 00 04 lw ra,(sp+4) 8004f20: 2b 8b 00 10 lw r11,(sp+16) 8004f24: 2b 8c 00 0c lw r12,(sp+12) 8004f28: 2b 8d 00 08 lw r13,(sp+8) 8004f2c: 37 9c 00 14 addi sp,sp,20 8004f30: c3 a0 00 00 ret _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 8004f34: b5 6b 08 00 add r1,r11,r11 8004f38: 34 02 00 03 mvi r2,3 8004f3c: 78 0d 08 02 mvhi r13,0x802 8004f40: b4 2b 08 00 add r1,r1,r11 8004f44: 5b 83 00 14 sw (sp+20),r3 8004f48: 39 ad 72 80 ori r13,r13,0x7280 8004f4c: fb ff ef 26 calli 8000be4 <__ashlsi3> 8004f50: 29 a2 00 00 lw r2,(r13+0) static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004f54: 2b 83 00 14 lw r3,(sp+20) _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 8004f58: b4 41 08 00 add r1,r2,r1 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004f5c: 28 22 00 00 lw r2,(r1+0) 8004f60: 44 40 00 19 be r2,r0,8004fc4 major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 8004f64: f8 00 07 d4 calli 8006eb4 <_Thread_Enable_dispatch> 8004f68: 34 01 00 0c mvi r1,12 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 8004f6c: 2b 9d 00 04 lw ra,(sp+4) 8004f70: 2b 8b 00 10 lw r11,(sp+16) 8004f74: 2b 8c 00 0c lw r12,(sp+12) 8004f78: 2b 8d 00 08 lw r13,(sp+8) 8004f7c: 37 9c 00 14 addi sp,sp,20 8004f80: c3 a0 00 00 ret static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004f84: 29 85 00 04 lw r5,(r12+4) 8004f88: 5c a1 ff b4 bne r5,r1,8004e58 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 8004f8c: 34 01 00 09 mvi r1,9 } 8004f90: 2b 9d 00 04 lw ra,(sp+4) 8004f94: 2b 8b 00 10 lw r11,(sp+16) 8004f98: 2b 8c 00 0c lw r12,(sp+12) 8004f9c: 2b 8d 00 08 lw r13,(sp+8) 8004fa0: 37 9c 00 14 addi sp,sp,20 8004fa4: c3 a0 00 00 ret static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004fa8: 28 25 00 04 lw r5,(r1+4) 8004fac: 5c a2 ff c1 bne r5,r2,8004eb0 8004fb0: e3 ff ff c3 bi 8004ebc if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 8004fb4: 58 6b 00 00 sw (r3+0),r11 <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 8004fb8: f8 00 07 bf calli 8006eb4 <_Thread_Enable_dispatch> 8004fbc: 34 01 00 05 mvi r1,5 return sc; 8004fc0: e3 ff ff a8 bi 8004e60 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 8004fc4: 28 24 00 04 lw r4,(r1+4) 8004fc8: 5c 82 ff e7 bne r4,r2,8004f64 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 8004fcc: 58 6b 00 00 sw (r3+0),r11 8004fd0: e3 ff ff c2 bi 8004ed8 08000fac : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 8000fac: 37 9c ff f4 addi sp,sp,-12 8000fb0: 5b 8b 00 0c sw (sp+12),r11 8000fb4: 5b 8c 00 08 sw (sp+8),r12 8000fb8: 5b 9d 00 04 sw (sp+4),ra rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 8000fbc: 78 0b 08 01 mvhi r11,0x801 8000fc0: 39 6b e0 10 ori r11,r11,0xe010 8000fc4: 29 61 00 00 lw r1,(r11+0) 8000fc8: 44 20 00 1e be r1,r0,8001040 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 8000fcc: 34 02 00 48 mvi r2,72 8000fd0: f8 00 19 e7 calli 800776c 8000fd4: b8 20 60 00 mv r12,r1 8000fd8: 78 01 08 01 mvhi r1,0x801 8000fdc: 38 21 e7 18 ori r1,r1,0xe718 8000fe0: 58 2c 00 00 sw (r1+0),r12 8000fe4: b9 80 10 00 mv r2,r12 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 8000fe8: 45 80 00 2b be r12,r0,8001094 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 8000fec: 78 01 08 01 mvhi r1,0x801 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 8000ff0: 29 64 00 00 lw r4,(r11+0) rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 8000ff4: 38 21 e7 1c ori r1,r1,0xe71c 8000ff8: 58 2c 00 00 sw (r1+0),r12 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 8000ffc: 34 03 00 01 mvi r3,1 8001000: 50 64 00 0e bgeu r3,r4,8001038 8001004: 35 82 00 48 addi r2,r12,72 iop->data1 = iop + 1; 8001008: 58 42 ff f0 sw (r2+-16),r2 800100c: 34 63 00 01 addi r3,r3,1 8001010: 34 42 00 48 addi r2,r2,72 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 8001014: 5c 64 ff fd bne r3,r4,8001008 8001018: 34 61 ff ff addi r1,r3,-1 800101c: 34 02 00 03 mvi r2,3 8001020: fb ff fc 74 calli 80001f0 <__ashlsi3> 8001024: 34 02 00 03 mvi r2,3 8001028: b8 20 58 00 mv r11,r1 800102c: fb ff fc 71 calli 80001f0 <__ashlsi3> 8001030: b5 61 08 00 add r1,r11,r1 8001034: b5 81 10 00 add r2,r12,r1 iop->data1 = iop + 1; iop->data1 = NULL; 8001038: 34 01 00 00 mvi r1,0 800103c: 58 41 00 38 sw (r2+56),r1 /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 8001040: 78 01 4c 42 mvhi r1,0x4c42 8001044: 78 05 08 01 mvhi r5,0x801 8001048: 34 03 00 54 mvi r3,84 800104c: 38 21 49 4f ori r1,r1,0x494f 8001050: 38 a5 e7 20 ori r5,r5,0xe720 8001054: 34 02 00 01 mvi r2,1 8001058: 34 04 00 00 mvi r4,0 800105c: f8 00 04 48 calli 800217c 8001060: b8 20 18 00 mv r3,r1 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 8001064: 5c 20 00 0b bne r1,r0,8001090 /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 8001068: 78 02 08 01 mvhi r2,0x801 800106c: 38 42 e0 0c ori r2,r2,0xe00c 8001070: 28 41 00 00 lw r1,(r2+0) 8001074: 44 23 00 02 be r1,r3,800107c (* rtems_fs_init_helper)(); 8001078: d8 20 00 00 call r1 } 800107c: 2b 9d 00 04 lw ra,(sp+4) 8001080: 2b 8b 00 0c lw r11,(sp+12) 8001084: 2b 8c 00 08 lw r12,(sp+8) 8001088: 37 9c 00 0c addi sp,sp,12 800108c: c3 a0 00 00 ret RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); 8001090: f8 00 06 2b calli 800293c <== NOT EXECUTED if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 8001094: 34 01 00 1a mvi r1,26 <== NOT EXECUTED 8001098: f8 00 06 29 calli 800293c <== NOT EXECUTED 0802b4a8 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 802b4a8: 37 9c ff d0 addi sp,sp,-48 802b4ac: 5b 8b 00 18 sw (sp+24),r11 802b4b0: 5b 8c 00 14 sw (sp+20),r12 802b4b4: 5b 8d 00 10 sw (sp+16),r13 802b4b8: 5b 8e 00 0c sw (sp+12),r14 802b4bc: 5b 8f 00 08 sw (sp+8),r15 802b4c0: 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); 802b4c4: 34 01 00 00 mvi r1,0 802b4c8: b8 20 10 00 mv r2,r1 802b4cc: 37 83 00 30 addi r3,sp,48 802b4d0: f8 00 08 fb calli 802d8bc 802b4d4: b8 20 70 00 mv r14,r1 if (sc != RTEMS_SUCCESSFUL) return sc; 802b4d8: b8 20 78 00 mv r15,r1 802b4dc: 5c 20 00 60 bne r1,r0,802b65c /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 802b4e0: 78 0d 08 07 mvhi r13,0x807 802b4e4: 39 ad 32 f0 ori r13,r13,0x32f0 802b4e8: 29 ab 00 00 lw r11,(r13+0) 802b4ec: 78 0c 08 07 mvhi r12,0x807 802b4f0: 39 8c 6f 5c ori r12,r12,0x6f5c 802b4f4: 45 6c 00 63 be r11,r12,802b680 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 802b4f8: 29 81 00 00 lw r1,(r12+0) rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 802b4fc: 78 06 08 07 mvhi r6,0x807 802b500: 38 c6 6f 50 ori r6,r6,0x6f50 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 802b504: 59 61 00 00 sw (r11+0),r1 802b508: 29 82 00 04 lw r2,(r12+4) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 802b50c: 34 03 00 00 mvi r3,0 802b510: 37 8e 00 1c addi r14,sp,28 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 802b514: 59 62 00 04 sw (r11+4),r2 802b518: 29 84 00 08 lw r4,(r12+8) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 802b51c: 78 01 08 07 mvhi r1,0x807 802b520: b8 60 28 00 mv r5,r3 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 802b524: 59 64 00 08 sw (r11+8),r4 802b528: 29 87 00 0c lw r7,(r12+12) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 802b52c: 34 02 00 01 mvi r2,1 802b530: 38 21 14 60 ori r1,r1,0x1460 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 802b534: 59 67 00 0c sw (r11+12),r7 802b538: 29 84 00 10 lw r4,(r12+16) */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 802b53c: b8 60 78 00 mv r15,r3 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 802b540: 59 64 00 10 sw (r11+16),r4 802b544: 29 87 00 14 lw r7,(r12+20) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 802b548: b9 c0 20 00 mv r4,r14 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 802b54c: 59 67 00 14 sw (r11+20),r7 802b550: 29 87 00 18 lw r7,(r12+24) 802b554: 59 67 00 18 sw (r11+24),r7 802b558: 29 87 00 1c lw r7,(r12+28) 802b55c: 59 67 00 1c sw (r11+28),r7 802b560: 29 87 00 20 lw r7,(r12+32) 802b564: 59 67 00 20 sw (r11+32),r7 802b568: 29 87 00 24 lw r7,(r12+36) 802b56c: 59 67 00 24 sw (r11+36),r7 802b570: 29 87 00 28 lw r7,(r12+40) 802b574: 59 67 00 28 sw (r11+40),r7 802b578: 29 87 00 2c lw r7,(r12+44) 802b57c: 59 67 00 2c sw (r11+44),r7 802b580: 29 87 00 30 lw r7,(r12+48) 802b584: 59 67 00 30 sw (r11+48),r7 802b588: 29 87 00 34 lw r7,(r12+52) 802b58c: 59 67 00 34 sw (r11+52),r7 802b590: 29 87 00 38 lw r7,(r12+56) 802b594: 59 67 00 38 sw (r11+56),r7 802b598: 29 87 00 3c lw r7,(r12+60) 802b59c: 59 67 00 3c sw (r11+60),r7 802b5a0: 29 87 00 40 lw r7,(r12+64) 802b5a4: 59 67 00 40 sw (r11+64),r7 802b5a8: 29 8c 00 44 lw r12,(r12+68) 802b5ac: 59 6c 00 44 sw (r11+68),r12 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 802b5b0: 28 c6 00 00 lw r6,(r6+0) } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 802b5b4: 2b 87 00 30 lw r7,(sp+48) 802b5b8: 59 67 00 00 sw (r11+0),r7 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 802b5bc: 28 c7 00 1c lw r7,(r6+28) 802b5c0: 59 67 00 18 sw (r11+24),r7 802b5c4: 28 c7 00 20 lw r7,(r6+32) 802b5c8: 59 67 00 1c sw (r11+28),r7 802b5cc: 28 c7 00 24 lw r7,(r6+36) 802b5d0: 59 67 00 20 sw (r11+32),r7 802b5d4: 28 c7 00 28 lw r7,(r6+40) 802b5d8: 59 67 00 24 sw (r11+36),r7 802b5dc: 28 c6 00 2c lw r6,(r6+44) 802b5e0: 59 66 00 28 sw (r11+40),r6 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 802b5e4: fb ff 70 e7 calli 8007980 rtems_filesystem_root = loc; 802b5e8: 2b 82 00 1c lw r2,(sp+28) 802b5ec: 29 a6 00 00 lw r6,(r13+0) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 802b5f0: 78 01 08 07 mvhi r1,0x807 802b5f4: b9 c0 20 00 mv r4,r14 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 802b5f8: 58 c2 00 18 sw (r6+24),r2 802b5fc: 2b 87 00 20 lw r7,(sp+32) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 802b600: 34 02 00 01 mvi r2,1 802b604: b9 e0 18 00 mv r3,r15 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 802b608: 58 c7 00 1c sw (r6+28),r7 802b60c: 2b 87 00 24 lw r7,(sp+36) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 802b610: 38 21 14 60 ori r1,r1,0x1460 802b614: b9 e0 28 00 mv r5,r15 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 802b618: 58 c7 00 20 sw (r6+32),r7 802b61c: 2b 87 00 28 lw r7,(sp+40) 802b620: 58 c7 00 24 sw (r6+36),r7 802b624: 2b 87 00 2c lw r7,(sp+44) 802b628: 58 c7 00 28 sw (r6+40),r7 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 802b62c: fb ff 70 d5 calli 8007980 rtems_filesystem_current = loc; 802b630: 2b 81 00 1c lw r1,(sp+28) 802b634: 29 a2 00 00 lw r2,(r13+0) 802b638: 58 41 00 04 sw (r2+4),r1 802b63c: 2b 84 00 20 lw r4,(sp+32) 802b640: 58 44 00 08 sw (r2+8),r4 802b644: 2b 87 00 24 lw r7,(sp+36) 802b648: 58 47 00 0c sw (r2+12),r7 802b64c: 2b 81 00 28 lw r1,(sp+40) 802b650: 58 41 00 10 sw (r2+16),r1 802b654: 2b 84 00 2c lw r4,(sp+44) 802b658: 58 44 00 14 sw (r2+20),r4 return RTEMS_SUCCESSFUL; } 802b65c: b9 e0 08 00 mv r1,r15 802b660: 2b 9d 00 04 lw ra,(sp+4) 802b664: 2b 8b 00 18 lw r11,(sp+24) 802b668: 2b 8c 00 14 lw r12,(sp+20) 802b66c: 2b 8d 00 10 lw r13,(sp+16) 802b670: 2b 8e 00 0c lw r14,(sp+12) 802b674: 2b 8f 00 08 lw r15,(sp+8) 802b678: 37 9c 00 30 addi sp,sp,48 802b67c: c3 a0 00 00 ret sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 802b680: 34 01 00 48 mvi r1,72 802b684: fb ff 72 f2 calli 800824c 802b688: b8 20 58 00 mv r11,r1 if (!tmp) 802b68c: 34 0f 00 1a mvi r15,26 802b690: 44 20 ff f3 be r1,r0,802b65c #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); 802b694: 78 03 08 02 mvhi r3,0x802 802b698: b9 c0 08 00 mv r1,r14 802b69c: 38 63 b3 70 ori r3,r3,0xb370 802b6a0: b9 a0 10 00 mv r2,r13 802b6a4: f8 00 09 c4 calli 802ddb4 802b6a8: b8 20 78 00 mv r15,r1 if (sc != RTEMS_SUCCESSFUL) { 802b6ac: 5c 20 00 03 bne r1,r0,802b6b8 * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 802b6b0: 59 ab 00 00 sw (r13+0),r11 802b6b4: e3 ff ff 91 bi 802b4f8 sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); if (sc != RTEMS_SUCCESSFUL) { /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 802b6b8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802b6bc: fb ff 70 e9 calli 8007a60 <== NOT EXECUTED return sc; 802b6c0: e3 ff ff e7 bi 802b65c <== NOT EXECUTED 0802b3d4 : * 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) { 802b3d4: 37 9c ff e4 addi sp,sp,-28 <== NOT EXECUTED 802b3d8: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED 802b3dc: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED 802b3e0: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED 802b3e4: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED 802b3e8: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 802b3ec: b8 20 70 00 mv r14,r1 <== NOT EXECUTED rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id); 802b3f0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 802b3f4: 37 83 00 18 addi r3,sp,24 <== NOT EXECUTED 802b3f8: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 802b3fc: f8 00 09 30 calli 802d8bc <== NOT EXECUTED 802b400: b8 20 18 00 mv r3,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 802b404: 5c 20 00 11 bne r1,r0,802b448 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 802b408: 78 0b 08 07 mvhi r11,0x807 <== NOT EXECUTED 802b40c: 39 6b 32 f0 ori r11,r11,0x32f0 <== NOT EXECUTED 802b410: 29 6d 00 00 lw r13,(r11+0) <== NOT EXECUTED 802b414: 2b 82 00 18 lw r2,(sp+24) <== NOT EXECUTED 802b418: b9 60 60 00 mv r12,r11 <== NOT EXECUTED 802b41c: 29 a3 00 00 lw r3,(r13+0) <== NOT EXECUTED 802b420: 44 62 00 12 be r3,r2,802b468 <== NOT EXECUTED free_user_env(tmp); }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 802b424: 37 83 00 1c addi r3,sp,28 <== NOT EXECUTED 802b428: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 802b42c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 802b430: f8 00 0a cf calli 802df6c <== NOT EXECUTED 802b434: b8 20 18 00 mv r3,r1 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 802b438: 44 20 00 13 be r1,r0,802b484 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 802b43c: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 802b440: 38 21 6f 5c ori r1,r1,0x6f5c <== NOT EXECUTED 802b444: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED return sc; } 802b448: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 802b44c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802b450: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED 802b454: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED 802b458: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED 802b45c: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED 802b460: 37 9c 00 1c addi sp,sp,28 <== NOT EXECUTED 802b464: c3 a0 00 00 ret <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_current_user_env->task_id==current_task_id) { /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 802b468: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 802b46c: f8 00 0a 91 calli 802deb0 <== NOT EXECUTED 802b470: b8 20 18 00 mv r3,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 802b474: 5c 20 ff f5 bne r1,r0,802b448 <== NOT EXECUTED free_user_env(tmp); 802b478: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 802b47c: fb ff ff bd calli 802b370 <== NOT EXECUTED 802b480: e3 ff ff e9 bi 802b424 <== NOT EXECUTED sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 802b484: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 802b488: 38 63 b3 70 ori r3,r3,0xb370 <== NOT EXECUTED 802b48c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 802b490: f8 00 0a 49 calli 802ddb4 <== NOT EXECUTED 802b494: b8 20 18 00 mv r3,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 802b498: 5c 20 ff e9 bne r1,r0,802b43c <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 802b49c: 2b 81 00 1c lw r1,(sp+28) <== NOT EXECUTED 802b4a0: 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; 802b4a4: e3 ff ff e9 bi 802b448 <== NOT EXECUTED 08007b98 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 8007b98: 37 9c ff f8 addi sp,sp,-8 8007b9c: 5b 8b 00 08 sw (sp+8),r11 8007ba0: 5b 9d 00 04 sw (sp+4),ra uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 8007ba4: 34 03 00 06 mvi r3,6 8007ba8: 20 24 00 06 andi r4,r1,0x6 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 8007bac: b8 20 58 00 mv r11,r1 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 8007bb0: 34 02 00 02 mvi r2,2 8007bb4: 44 83 00 04 be r4,r3,8007bc4 fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 8007bb8: a0 22 18 00 and r3,r1,r2 8007bbc: 34 02 00 00 mvi r2,0 8007bc0: 44 62 00 0f be r3,r2,8007bfc 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 ) { 8007bc4: 21 61 00 01 andi r1,r11,0x1 8007bc8: 44 20 00 02 be r1,r0,8007bd0 fcntl_flags |= O_NONBLOCK; 8007bcc: 38 42 40 00 ori r2,r2,0x4000 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 8007bd0: 21 61 02 00 andi r1,r11,0x200 8007bd4: 44 20 00 02 be r1,r0,8007bdc fcntl_flags |= O_APPEND; 8007bd8: 38 42 00 08 ori r2,r2,0x8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 8007bdc: 21 6b 04 00 andi r11,r11,0x400 8007be0: 45 60 00 02 be r11,r0,8007be8 fcntl_flags |= O_CREAT; 8007be4: 38 42 02 00 ori r2,r2,0x200 } return fcntl_flags; } 8007be8: b8 40 08 00 mv r1,r2 8007bec: 2b 9d 00 04 lw ra,(sp+4) 8007bf0: 2b 8b 00 08 lw r11,(sp+8) 8007bf4: 37 9c 00 08 addi sp,sp,8 8007bf8: c3 a0 00 00 ret { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 8007bfc: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8007c00: fb ff e1 a4 calli 8000290 <__lshrsi3> <== NOT EXECUTED 8007c04: 20 22 00 01 andi r2,r1,0x1 <== NOT EXECUTED 8007c08: e3 ff ff ef bi 8007bc4 <== NOT EXECUTED 08008374 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 8008374: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8008378: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 800837c: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 8008380: 38 63 30 1c ori r3,r3,0x301c <== NOT EXECUTED * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 8008384: b8 20 10 00 mv r2,r1 <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 8008388: 28 61 00 00 lw r1,(r3+0) <== NOT EXECUTED 800838c: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED 8008390: f8 00 12 12 calli 800cbd8 <_Protected_heap_Get_block_size> <== NOT EXECUTED 8008394: 44 20 00 0b be r1,r0,80083c0 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 8008398: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 800839c: 38 21 6f 20 ori r1,r1,0x6f20 <== NOT EXECUTED 80083a0: 2b 83 00 08 lw r3,(sp+8) <== NOT EXECUTED 80083a4: 28 22 00 2c lw r2,(r1+44) <== NOT EXECUTED 80083a8: 28 24 00 28 lw r4,(r1+40) <== NOT EXECUTED 80083ac: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED 80083b0: f4 62 18 00 cmpgu r3,r3,r2 <== NOT EXECUTED 80083b4: 58 22 00 2c sw (r1+44),r2 <== NOT EXECUTED 80083b8: b4 64 10 00 add r2,r3,r4 <== NOT EXECUTED 80083bc: 58 22 00 28 sw (r1+40),r2 <== NOT EXECUTED } } 80083c0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80083c4: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 80083c8: c3 a0 00 00 ret <== NOT EXECUTED 080083cc : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 80083cc: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 80083d0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 80083d4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 80083d8: 44 20 00 17 be r1,r0,8008434 <== NOT EXECUTED return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 80083dc: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 80083e0: 38 63 30 1c ori r3,r3,0x301c <== NOT EXECUTED 80083e4: 28 61 00 00 lw r1,(r3+0) <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 80083e8: 34 04 00 00 mvi r4,0 <== NOT EXECUTED rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 80083ec: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 80083f0: 5b 84 00 08 sw (sp+8),r4 <== NOT EXECUTED rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 80083f4: f8 00 11 f9 calli 800cbd8 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 80083f8: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 80083fc: 38 21 6f 20 ori r1,r1,0x6f20 <== NOT EXECUTED 8008400: 2b 84 00 08 lw r4,(sp+8) <== NOT EXECUTED 8008404: 28 22 00 24 lw r2,(r1+36) <== NOT EXECUTED 8008408: 28 26 00 20 lw r6,(r1+32) <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 800840c: 28 23 00 2c lw r3,(r1+44) <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 8008410: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED 8008414: f4 82 20 00 cmpgu r4,r4,r2 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 8008418: 28 25 00 18 lw r5,(r1+24) <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 800841c: b4 86 20 00 add r4,r4,r6 <== NOT EXECUTED 8008420: 58 24 00 20 sw (r1+32),r4 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 8008424: c8 43 18 00 sub r3,r2,r3 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 8008428: 58 22 00 24 sw (r1+36),r2 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 800842c: 50 a3 00 02 bgeu r5,r3,8008434 <== NOT EXECUTED s->max_depth = current_depth; 8008430: 58 23 00 18 sw (r1+24),r3 <== NOT EXECUTED } 8008434: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8008438: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 800843c: c3 a0 00 00 ret <== NOT EXECUTED 08008440 : static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 8008440: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8008444: 38 21 6f 20 ori r1,r1,0x6f20 <== NOT EXECUTED 8008448: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800844c: 58 22 00 2c sw (r1+44),r2 <== NOT EXECUTED 8008450: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8008454: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED 8008458: 58 22 00 08 sw (r1+8),r2 <== NOT EXECUTED 800845c: 58 22 00 0c sw (r1+12),r2 <== NOT EXECUTED 8008460: 58 22 00 10 sw (r1+16),r2 <== NOT EXECUTED 8008464: 58 22 00 14 sw (r1+20),r2 <== NOT EXECUTED 8008468: 58 22 00 18 sw (r1+24),r2 <== NOT EXECUTED 800846c: 58 22 00 1c sw (r1+28),r2 <== NOT EXECUTED 8008470: 58 22 00 20 sw (r1+32),r2 <== NOT EXECUTED 8008474: 58 22 00 24 sw (r1+36),r2 <== NOT EXECUTED 8008478: 58 22 00 28 sw (r1+40),r2 <== NOT EXECUTED } 800847c: c3 a0 00 00 ret <== NOT EXECUTED 0800e1cc : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 800e1cc: 37 9c ff f0 addi sp,sp,-16 800e1d0: 5b 8b 00 10 sw (sp+16),r11 800e1d4: 5b 8c 00 0c sw (sp+12),r12 800e1d8: 5b 8d 00 08 sw (sp+8),r13 800e1dc: 5b 9d 00 04 sw (sp+4),ra 800e1e0: b8 20 58 00 mv r11,r1 800e1e4: b8 40 60 00 mv r12,r2 800e1e8: b8 60 68 00 mv r13,r3 void *return_this; /* * Parameter error checks */ if ( !pointer ) 800e1ec: 44 20 00 24 be r1,r0,800e27c *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 800e1f0: 78 01 08 02 mvhi r1,0x802 800e1f4: 38 21 6a e0 ori r1,r1,0x6ae0 800e1f8: 28 22 00 00 lw r2,(r1+0) * Parameter error checks */ if ( !pointer ) return EINVAL; *pointer = NULL; 800e1fc: 34 01 00 00 mvi r1,0 800e200: 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()) && 800e204: 34 01 00 03 mvi r1,3 800e208: 44 41 00 1b be r2,r1,800e274 /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 800e20c: fb ff d3 1c calli 8002e7c uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 800e210: 78 01 08 02 mvhi r1,0x802 800e214: 38 21 60 1c ori r1,r1,0x601c 800e218: 28 21 00 00 lw r1,(r1+0) 800e21c: b9 80 18 00 mv r3,r12 800e220: b9 a0 10 00 mv r2,r13 800e224: 34 04 00 00 mvi r4,0 800e228: fb ff e1 6b calli 80067d4 <_Protected_heap_Allocate_aligned_with_boundary> 800e22c: b8 20 60 00 mv r12,r1 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 800e230: 34 01 00 0c mvi r1,12 800e234: 45 80 00 0a be r12,r0,800e25c return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 800e238: 78 02 08 02 mvhi r2,0x802 800e23c: 38 42 66 80 ori r2,r2,0x6680 800e240: 28 41 00 00 lw r1,(r2+0) 800e244: 44 20 00 04 be r1,r0,800e254 (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 800e248: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 800e24c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800e250: 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; 800e254: 59 6c 00 00 sw (r11+0),r12 800e258: 34 01 00 00 mvi r1,0 return 0; } 800e25c: 2b 9d 00 04 lw ra,(sp+4) 800e260: 2b 8b 00 10 lw r11,(sp+16) 800e264: 2b 8c 00 0c lw r12,(sp+12) 800e268: 2b 8d 00 08 lw r13,(sp+8) 800e26c: 37 9c 00 10 addi sp,sp,16 800e270: c3 a0 00 00 ret *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 800e274: fb ff d2 e7 calli 8002e10 800e278: 5c 20 ff e5 bne r1,r0,800e20c if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; 800e27c: 34 01 00 16 mvi r1,22 } 800e280: 2b 9d 00 04 lw ra,(sp+4) 800e284: 2b 8b 00 10 lw r11,(sp+16) 800e288: 2b 8c 00 0c lw r12,(sp+12) 800e28c: 2b 8d 00 08 lw r13,(sp+8) 800e290: 37 9c 00 10 addi sp,sp,16 800e294: c3 a0 00 00 ret 08007174 : void rtems_panic( const char *printf_format, ... ) { 8007174: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8007178: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800717c: b8 20 48 00 mv r9,r1 <== NOT EXECUTED 8007180: 5b 81 00 08 sw (sp+8),r1 <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 8007184: 78 01 20 00 mvhi r1,0x2000 <== NOT EXECUTED void rtems_panic( const char *printf_format, ... ) { 8007188: 5b 82 00 0c sw (sp+12),r2 <== NOT EXECUTED 800718c: 5b 83 00 10 sw (sp+16),r3 <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 8007190: b9 20 10 00 mv r2,r9 <== NOT EXECUTED 8007194: 37 83 00 0c addi r3,sp,12 <== NOT EXECUTED 8007198: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED void rtems_panic( const char *printf_format, ... ) { 800719c: 5b 84 00 14 sw (sp+20),r4 <== NOT EXECUTED 80071a0: 5b 85 00 18 sw (sp+24),r5 <== NOT EXECUTED 80071a4: 5b 86 00 1c sw (sp+28),r6 <== NOT EXECUTED 80071a8: 5b 87 00 20 sw (sp+32),r7 <== NOT EXECUTED 80071ac: 5b 88 00 24 sw (sp+36),r8 <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 80071b0: fb ff ff 73 calli 8006f7c <== NOT EXECUTED va_end(arglist); } 80071b4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80071b8: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 80071bc: c3 a0 00 00 ret <== NOT EXECUTED 0800a950 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 800a950: 37 9c ff f8 addi sp,sp,-8 800a954: 5b 8b 00 08 sw (sp+8),r11 800a958: 5b 9d 00 04 sw (sp+4),ra if (!rtems_pipe_configured) 800a95c: 78 01 08 01 mvhi r1,0x801 800a960: 38 21 e6 4c ori r1,r1,0xe64c 800a964: 40 21 00 00 lbu r1,(r1+0) 800a968: 44 20 00 05 be r1,r0,800a97c return; if (rtems_pipe_semaphore) 800a96c: 78 05 08 01 mvhi r5,0x801 <== NOT EXECUTED 800a970: 38 a5 e6 a4 ori r5,r5,0xe6a4 <== NOT EXECUTED 800a974: 28 ab 00 00 lw r11,(r5+0) <== NOT EXECUTED 800a978: 45 60 00 05 be r11,r0,800a98c <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; } 800a97c: 2b 9d 00 04 lw ra,(sp+4) 800a980: 2b 8b 00 08 lw r11,(sp+8) 800a984: 37 9c 00 08 addi sp,sp,8 800a988: c3 a0 00 00 ret if (rtems_pipe_semaphore) return; rtems_status_code sc; sc = rtems_semaphore_create( 800a98c: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED 800a990: 38 21 50 45 ori r1,r1,0x5045 <== NOT EXECUTED 800a994: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800a998: 34 03 00 54 mvi r3,84 <== NOT EXECUTED 800a99c: b9 60 20 00 mv r4,r11 <== NOT EXECUTED 800a9a0: fb ff dd f7 calli 800217c <== NOT EXECUTED rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) 800a9a4: 5c 2b 00 09 bne r1,r11,800a9c8 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 800a9a8: f8 00 05 ba calli 800c090 <== NOT EXECUTED rtems_pipe_no = now; 800a9ac: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 800a9b0: 38 42 e6 aa ori r2,r2,0xe6aa <== NOT EXECUTED 800a9b4: 0c 41 00 00 sh (r2+0),r1 <== NOT EXECUTED } 800a9b8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800a9bc: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 800a9c0: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 800a9c4: c3 a0 00 00 ret <== NOT EXECUTED sc = rtems_semaphore_create( rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 800a9c8: fb ff df dd calli 800293c <== NOT EXECUTED 080421dc : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 80421dc: 37 9c ff e0 addi sp,sp,-32 80421e0: 5b 8b 00 18 sw (sp+24),r11 80421e4: 5b 8c 00 14 sw (sp+20),r12 80421e8: 5b 8d 00 10 sw (sp+16),r13 80421ec: 5b 8e 00 0c sw (sp+12),r14 80421f0: 5b 8f 00 08 sw (sp+8),r15 80421f4: 5b 9d 00 04 sw (sp+4),ra 80421f8: b8 20 70 00 mv r14,r1 80421fc: 78 01 08 07 mvhi r1,0x807 8042200: b8 40 68 00 mv r13,r2 8042204: 38 21 7b c0 ori r1,r1,0x7bc0 8042208: b9 c0 10 00 mv r2,r14 804220c: 37 83 00 20 addi r3,sp,32 8042210: fb ff 29 64 calli 800c7a0 <_Objects_Get> 8042214: 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 ) { 8042218: 2b 81 00 20 lw r1,(sp+32) 804221c: 44 20 00 0a be r1,r0,8042244 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 8042220: 34 01 00 04 mvi r1,4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8042224: 2b 9d 00 04 lw ra,(sp+4) 8042228: 2b 8b 00 18 lw r11,(sp+24) 804222c: 2b 8c 00 14 lw r12,(sp+20) 8042230: 2b 8d 00 10 lw r13,(sp+16) 8042234: 2b 8e 00 0c lw r14,(sp+12) 8042238: 2b 8f 00 08 lw r15,(sp+8) 804223c: 37 9c 00 20 addi sp,sp,32 8042240: c3 a0 00 00 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 8042244: 78 0c 08 07 mvhi r12,0x807 8042248: 39 8c 71 58 ori r12,r12,0x7158 804224c: 29 62 00 40 lw r2,(r11+64) 8042250: 29 81 00 00 lw r1,(r12+0) 8042254: 44 41 00 0b be r2,r1,8042280 _Thread_Enable_dispatch(); 8042258: fb ff 2c 34 calli 800d328 <_Thread_Enable_dispatch> 804225c: 34 01 00 17 mvi r1,23 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 8042260: 2b 9d 00 04 lw ra,(sp+4) 8042264: 2b 8b 00 18 lw r11,(sp+24) 8042268: 2b 8c 00 14 lw r12,(sp+20) 804226c: 2b 8d 00 10 lw r13,(sp+16) 8042270: 2b 8e 00 0c lw r14,(sp+12) 8042274: 2b 8f 00 08 lw r15,(sp+8) 8042278: 37 9c 00 20 addi sp,sp,32 804227c: c3 a0 00 00 ret if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 8042280: 45 a0 00 32 be r13,r0,8042348 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 8042284: 90 00 78 00 rcsr r15,IE 8042288: 34 01 ff fe mvi r1,-2 804228c: a1 e1 08 00 and r1,r15,r1 8042290: d0 01 00 00 wcsr IE,r1 switch ( the_period->state ) { 8042294: 29 61 00 38 lw r1,(r11+56) 8042298: 34 02 00 02 mvi r2,2 804229c: 44 22 00 30 be r1,r2,804235c 80422a0: 34 02 00 04 mvi r2,4 80422a4: 44 22 00 19 be r1,r2,8042308 80422a8: 5c 20 ff de bne r1,r0,8042220 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 80422ac: d0 0f 00 00 wcsr IE,r15 /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 80422b0: b9 60 08 00 mv r1,r11 80422b4: fb ff ff 1b calli 8041f20 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 80422b8: 78 02 08 04 mvhi r2,0x804 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 80422bc: 34 0c 00 00 mvi r12,0 the_watchdog->routine = routine; 80422c0: 38 42 23 e8 ori r2,r2,0x23e8 the_period->state = RATE_MONOTONIC_ACTIVE; 80422c4: 34 03 00 02 mvi r3,2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 80422c8: 78 01 08 07 mvhi r1,0x807 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 80422cc: 59 62 00 2c sw (r11+44),r2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 80422d0: 38 21 71 78 ori r1,r1,0x7178 80422d4: 59 63 00 38 sw (r11+56),r3 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 80422d8: 59 6e 00 30 sw (r11+48),r14 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 80422dc: 59 6d 00 1c sw (r11+28),r13 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 80422e0: 35 62 00 10 addi r2,r11,16 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 80422e4: 59 6c 00 18 sw (r11+24),r12 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 80422e8: 59 6c 00 34 sw (r11+52),r12 _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 80422ec: 59 6d 00 3c sw (r11+60),r13 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 80422f0: fb ff 31 69 calli 800e894 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 80422f4: b9 80 08 00 mv r1,r12 80422f8: 5b 81 00 1c sw (sp+28),r1 80422fc: fb ff 2c 0b calli 800d328 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 8042300: 2b 81 00 1c lw r1,(sp+28) 8042304: e3 ff ff d7 bi 8042260 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 8042308: b9 60 08 00 mv r1,r11 804230c: fb ff ff 6a calli 80420b4 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 8042310: d0 0f 00 00 wcsr IE,r15 the_period->state = RATE_MONOTONIC_ACTIVE; 8042314: 34 02 00 02 mvi r2,2 8042318: 78 01 08 07 mvhi r1,0x807 804231c: 59 62 00 38 sw (r11+56),r2 8042320: 38 21 71 78 ori r1,r1,0x7178 8042324: 35 62 00 10 addi r2,r11,16 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8042328: 59 6d 00 1c sw (r11+28),r13 the_period->next_length = length; 804232c: 59 6d 00 3c sw (r11+60),r13 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8042330: fb ff 31 59 calli 800e894 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 8042334: 34 01 00 06 mvi r1,6 8042338: 5b 81 00 1c sw (sp+28),r1 804233c: fb ff 2b fb calli 800d328 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 8042340: 2b 81 00 1c lw r1,(sp+28) 8042344: e3 ff ff c7 bi 8042260 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 8042348: 29 61 00 38 lw r1,(r11+56) 804234c: 34 02 00 04 mvi r2,4 8042350: 50 41 00 1b bgeu r2,r1,80423bc 8042354: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8042358: e3 ff ff e8 bi 80422f8 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 804235c: b9 60 08 00 mv r1,r11 8042360: fb ff ff 55 calli 80420b4 <_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; 8042364: 34 01 00 01 mvi r1,1 the_period->next_length = length; 8042368: 59 6d 00 3c sw (r11+60),r13 /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 804236c: 59 61 00 38 sw (r11+56),r1 the_period->next_length = length; _ISR_Enable( level ); 8042370: d0 0f 00 00 wcsr IE,r15 _Thread_Executing->Wait.id = the_period->Object.id; 8042374: 29 81 00 00 lw r1,(r12+0) 8042378: 29 63 00 08 lw r3,(r11+8) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 804237c: 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; 8042380: 58 23 00 20 sw (r1+32),r3 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 8042384: fb ff 2e f3 calli 800df50 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 8042388: 90 00 08 00 rcsr r1,IE 804238c: 34 02 ff fe mvi r2,-2 8042390: a0 22 10 00 and r2,r1,r2 8042394: d0 02 00 00 wcsr IE,r2 local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 8042398: 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; 804239c: 29 62 00 38 lw r2,(r11+56) the_period->state = RATE_MONOTONIC_ACTIVE; 80423a0: 59 63 00 38 sw (r11+56),r3 _ISR_Enable( level ); 80423a4: 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 ) 80423a8: 34 01 00 03 mvi r1,3 80423ac: 44 41 00 0b be r2,r1,80423d8 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 80423b0: fb ff 2b de calli 800d328 <_Thread_Enable_dispatch> 80423b4: 34 01 00 00 mvi r1,0 return RTEMS_SUCCESSFUL; 80423b8: e3 ff ff aa bi 8042260 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 80423bc: 78 0b 08 06 mvhi r11,0x806 80423c0: 34 02 00 02 mvi r2,2 80423c4: fb fe fb 67 calli 8001160 <__ashlsi3> 80423c8: 39 6b fa 38 ori r11,r11,0xfa38 80423cc: b5 61 08 00 add r1,r11,r1 80423d0: 28 21 00 00 lw r1,(r1+0) 80423d4: e3 ff ff c9 bi 80422f8 /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 80423d8: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 80423dc: 34 02 40 00 mvi r2,16384 <== NOT EXECUTED 80423e0: fb ff b2 9b calli 802ee4c <_Thread_Clear_state> <== NOT EXECUTED 80423e4: e3 ff ff f3 bi 80423b0 <== NOT EXECUTED 08012244 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 8012244: 37 9c ff e8 addi sp,sp,-24 8012248: 5b 8b 00 14 sw (sp+20),r11 801224c: 5b 8c 00 10 sw (sp+16),r12 8012250: 5b 8d 00 0c sw (sp+12),r13 8012254: 5b 8e 00 08 sw (sp+8),r14 8012258: 5b 9d 00 04 sw (sp+4),ra 801225c: b8 40 60 00 mv r12,r2 8012260: b8 20 68 00 mv r13,r1 8012264: b8 60 70 00 mv r14,r3 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 8012268: 44 40 00 1b be r2,r0,80122d4 return RTEMS_INVALID_ADDRESS; if ( !size ) 801226c: 44 60 00 1a be r3,r0,80122d4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 8012270: 78 0b 08 04 mvhi r11,0x804 8012274: 39 6b 0d 60 ori r11,r11,0xd60 8012278: 29 61 00 00 lw r1,(r11+0) 801227c: f8 00 0b 90 calli 80150bc <_API_Mutex_Lock> 8012280: 78 01 08 04 mvhi r1,0x804 8012284: b9 a0 10 00 mv r2,r13 8012288: 38 21 0b 74 ori r1,r1,0xb74 801228c: 37 83 00 18 addi r3,sp,24 8012290: f8 00 14 4a calli 80173b8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 8012294: 2b 8d 00 18 lw r13,(sp+24) 8012298: 45 a0 00 18 be r13,r0,80122f8 801229c: 34 01 00 01 mvi r1,1 80122a0: 34 0c 00 04 mvi r12,4 80122a4: 45 a1 00 02 be r13,r1,80122ac case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 80122a8: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 80122ac: 29 61 00 00 lw r1,(r11+0) 80122b0: f8 00 0b 9f calli 801512c <_API_Mutex_Unlock> return return_status; } 80122b4: b9 80 08 00 mv r1,r12 80122b8: 2b 9d 00 04 lw ra,(sp+4) 80122bc: 2b 8b 00 14 lw r11,(sp+20) 80122c0: 2b 8c 00 10 lw r12,(sp+16) 80122c4: 2b 8d 00 0c lw r13,(sp+12) 80122c8: 2b 8e 00 08 lw r14,(sp+8) 80122cc: 37 9c 00 18 addi sp,sp,24 80122d0: c3 a0 00 00 ret return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 80122d4: 34 0c 00 09 mvi r12,9 } 80122d8: b9 80 08 00 mv r1,r12 80122dc: 2b 9d 00 04 lw ra,(sp+4) 80122e0: 2b 8b 00 14 lw r11,(sp+20) 80122e4: 2b 8c 00 10 lw r12,(sp+16) 80122e8: 2b 8d 00 0c lw r13,(sp+12) 80122ec: 2b 8e 00 08 lw r14,(sp+8) 80122f0: 37 9c 00 18 addi sp,sp,24 80122f4: c3 a0 00 00 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 80122f8: b9 80 10 00 mv r2,r12 80122fc: 34 21 00 68 addi r1,r1,104 8012300: b9 c0 18 00 mv r3,r14 8012304: f8 00 12 13 calli 8016b50 <_Heap_Size_of_alloc_area> 8012308: 34 0c 00 09 mvi r12,9 801230c: 44 2d ff e8 be r1,r13,80122ac 8012310: 34 0c 00 00 mvi r12,0 8012314: e3 ff ff e6 bi 80122ac 080058f0 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 80058f0: 37 9c ff f0 addi sp,sp,-16 80058f4: 5b 9b 00 08 sw (sp+8),fp 80058f8: 34 1b 00 10 mvi fp,16 80058fc: b7 7c d8 00 add fp,fp,sp 8005900: 5b 8b 00 10 sw (sp+16),r11 8005904: 5b 8c 00 0c sw (sp+12),r12 8005908: 5b 9d 00 04 sw (sp+4),ra Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 800590c: 78 0b 08 07 mvhi r11,0x807 8005910: 39 6b 71 58 ori r11,r11,0x7158 8005914: 29 62 00 00 lw r2,(r11+0) ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 8005918: 28 41 00 c8 lw r1,(r2+200) 800591c: 53 61 00 19 bgeu fp,r1,8005980 8005920: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 8005924: 78 02 08 07 mvhi r2,0x807 8005928: 38 42 45 24 ori r2,r2,0x4524 800592c: 28 43 00 00 lw r3,(r2+0) 8005930: 34 02 00 01 mvi r2,1 8005934: 44 60 00 07 be r3,r0,8005950 pattern_ok = (!memcmp( 8005938: 78 02 08 07 mvhi r2,0x807 800593c: 38 42 6e f0 ori r2,r2,0x6ef0 8005940: 34 21 00 08 addi r1,r1,8 8005944: 34 03 00 10 mvi r3,16 8005948: f8 01 1b 76 calli 804c720 800594c: 64 22 00 00 cmpei r2,r1,0 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 8005950: 45 80 00 03 be r12,r0,800595c 8005954: 34 01 00 00 mvi r1,0 8005958: 5c 41 00 04 bne r2,r1,8005968 return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 800595c: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 8005960: fb ff ff b5 calli 8005834 <== NOT EXECUTED 8005964: 34 01 00 01 mvi r1,1 <== NOT EXECUTED return true; } 8005968: 2b 9d 00 04 lw ra,(sp+4) 800596c: 2b 8b 00 10 lw r11,(sp+16) 8005970: 2b 8c 00 0c lw r12,(sp+12) 8005974: 2b 9b 00 08 lw fp,(sp+8) 8005978: 37 9c 00 10 addi sp,sp,16 800597c: c3 a0 00 00 ret } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 8005980: 28 4c 00 c4 lw r12,(r2+196) 8005984: b4 2c 60 00 add r12,r1,r12 8005988: f1 9b 60 00 cmpgeu r12,r12,fp 800598c: e3 ff ff e6 bi 8005924 08005810 : void rtems_stack_checker_report_usage( void ) { 8005810: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8005814: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 8005818: 78 02 08 00 mvhi r2,0x800 <== NOT EXECUTED 800581c: 38 42 8f dc ori r2,r2,0x8fdc <== NOT EXECUTED 8005820: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8005824: fb ff ff d7 calli 8005780 <== NOT EXECUTED } 8005828: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800582c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8005830: c3 a0 00 00 ret <== NOT EXECUTED 08005780 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 8005780: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 8005784: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED 8005788: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED 800578c: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED 8005790: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED 8005794: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED print_context = context; 8005798: 78 0b 08 07 mvhi r11,0x807 <== NOT EXECUTED print_handler = print; 800579c: 78 0c 08 07 mvhi r12,0x807 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 80057a0: b8 40 68 00 mv r13,r2 <== NOT EXECUTED print_context = context; 80057a4: 39 6b 45 28 ori r11,r11,0x4528 <== NOT EXECUTED print_handler = print; 80057a8: 39 8c 45 2c ori r12,r12,0x452c <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 80057ac: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80057b0: 38 42 6b c0 ori r2,r2,0x6bc0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 80057b4: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED print_handler = print; 80057b8: 59 8d 00 00 sw (r12+0),r13 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 80057bc: b8 20 70 00 mv r14,r1 <== NOT EXECUTED print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n"); 80057c0: d9 a0 00 00 call r13 <== NOT EXECUTED (*print)( context, 80057c4: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80057c8: 38 42 6b d8 ori r2,r2,0x6bd8 <== NOT EXECUTED 80057cc: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 80057d0: d9 a0 00 00 call r13 <== NOT EXECUTED " ID NAME LOW HIGH CURRENT AVAILABLE USED\n" ); /* iterate over all threads and dump the usage */ rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); 80057d4: 78 01 08 00 mvhi r1,0x800 <== NOT EXECUTED 80057d8: 38 21 55 e8 ori r1,r1,0x55e8 <== NOT EXECUTED 80057dc: f8 00 19 c0 calli 800bedc <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 80057e0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80057e4: fb ff ff 81 calli 80055e8 <== NOT EXECUTED print_context = NULL; 80057e8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED print_handler = NULL; 80057ec: 59 81 00 00 sw (r12+0),r1 <== NOT EXECUTED rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); print_context = NULL; 80057f0: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED print_handler = NULL; } 80057f4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80057f8: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED 80057fc: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED 8005800: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED 8005804: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED 8005808: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 800580c: c3 a0 00 00 ret <== NOT EXECUTED 08005990 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 8005990: 37 9c ff f4 addi sp,sp,-12 8005994: 5b 9b 00 08 sw (sp+8),fp 8005998: 34 1b 00 0c mvi fp,12 800599c: b7 7c d8 00 add fp,fp,sp 80059a0: 5b 8b 00 0c sw (sp+12),r11 80059a4: 5b 9d 00 04 sw (sp+4),ra Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 80059a8: 28 22 00 c8 lw r2,(r1+200) */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 80059ac: b8 20 58 00 mv r11,r1 Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 80059b0: 34 41 00 08 addi r1,r2,8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 80059b4: 54 5b 00 04 bgu r2,fp,80059c4 void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { Stack_Control *the_stack = &running->Start.Initial_stack; 80059b8: 29 63 00 c4 lw r3,(r11+196) 80059bc: b4 43 10 00 add r2,r2,r3 80059c0: 50 5b 00 0d bgeu r2,fp,80059f4 /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 80059c4: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 80059c8: 38 42 6e f0 ori r2,r2,0x6ef0 <== NOT EXECUTED 80059cc: 34 03 00 10 mvi r3,16 <== NOT EXECUTED 80059d0: f8 01 1b 54 calli 804c720 <== NOT EXECUTED 80059d4: 64 22 00 00 cmpei r2,r1,0 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 80059d8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80059dc: fb ff ff 96 calli 8005834 <== NOT EXECUTED } } 80059e0: 2b 9d 00 04 lw ra,(sp+4) 80059e4: 2b 8b 00 0c lw r11,(sp+12) 80059e8: 2b 9b 00 08 lw fp,(sp+8) 80059ec: 37 9c 00 0c addi sp,sp,12 80059f0: c3 a0 00 00 ret /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 80059f4: 78 02 08 07 mvhi r2,0x807 80059f8: 38 42 6e f0 ori r2,r2,0x6ef0 80059fc: 34 03 00 10 mvi r3,16 8005a00: f8 01 1b 48 calli 804c720 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 8005a04: 34 02 00 00 mvi r2,0 8005a08: 5c 22 ff f4 bne r1,r2,80059d8 8005a0c: e3 ff ff f5 bi 80059e0 0801f01c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 801f01c: 37 9c ff e8 addi sp,sp,-24 801f020: 5b 8b 00 14 sw (sp+20),r11 801f024: 5b 8c 00 10 sw (sp+16),r12 801f028: 5b 8d 00 0c sw (sp+12),r13 801f02c: 5b 8e 00 08 sw (sp+8),r14 801f030: 5b 9d 00 04 sw (sp+4),ra STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 801f034: 34 0c 00 00 mvi r12,0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 801f038: b8 40 58 00 mv r11,r2 801f03c: b8 20 68 00 mv r13,r1 801f040: b8 60 70 00 mv r14,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 801f044: 34 04 00 09 mvi r4,9 801f048: 44 4c 00 12 be r2,r12,801f090 return RTEMS_INVALID_ADDRESS; errno = 0; 801f04c: f8 00 a7 33 calli 8048d18 <__errno> 801f050: 58 2c 00 00 sw (r1+0),r12 *n = 0; 801f054: 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 ); 801f058: b9 a0 08 00 mv r1,r13 801f05c: 37 82 00 18 addi r2,sp,24 801f060: 34 03 00 10 mvi r3,16 801f064: f8 00 ca 5d calli 80519d8 801f068: 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 ) 801f06c: 45 c0 00 17 be r14,r0,801f0c8 *endptr = end; 801f070: 2b 82 00 18 lw r2,(sp+24) 801f074: 59 c2 00 00 sw (r14+0),r2 /* nothing was converted */ if ( end == s ) 801f078: 34 04 00 0b mvi r4,11 801f07c: 44 4d 00 05 be r2,r13,801f090 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 801f080: 34 01 ff ff mvi r1,-1 801f084: 45 81 00 0b be r12,r1,801f0b0 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 801f088: 59 6c 00 00 sw (r11+0),r12 801f08c: 34 04 00 00 mvi r4,0 return RTEMS_SUCCESSFUL; } 801f090: b8 80 08 00 mv r1,r4 801f094: 2b 9d 00 04 lw ra,(sp+4) 801f098: 2b 8b 00 14 lw r11,(sp+20) 801f09c: 2b 8c 00 10 lw r12,(sp+16) 801f0a0: 2b 8d 00 0c lw r13,(sp+12) 801f0a4: 2b 8e 00 08 lw r14,(sp+8) 801f0a8: 37 9c 00 18 addi sp,sp,24 801f0ac: c3 a0 00 00 ret return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 801f0b0: f8 00 a7 1a calli 8048d18 <__errno> <== NOT EXECUTED 801f0b4: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 801f0b8: 34 01 00 22 mvi r1,34 <== NOT EXECUTED 801f0bc: 34 04 00 0a mvi r4,10 <== NOT EXECUTED 801f0c0: 5c 41 ff f2 bne r2,r1,801f088 <== NOT EXECUTED 801f0c4: e3 ff ff f3 bi 801f090 <== NOT EXECUTED 801f0c8: 2b 82 00 18 lw r2,(sp+24) 801f0cc: e3 ff ff eb bi 801f078 08003834 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8003834: 34 03 00 09 mvi r3,9 case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; 8003838: b8 20 10 00 mv r2,r1 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 800383c: 44 23 00 0a be r1,r3,8003864 8003840: 48 23 00 0b bg r1,r3,800386c 8003844: 34 03 00 04 mvi r3,4 8003848: 44 23 00 07 be r1,r3,8003864 800384c: 48 23 00 22 bg r1,r3,80038d4 8003850: 34 01 00 01 mvi r1,1 8003854: 44 41 00 04 be r2,r1,8003864 8003858: 48 41 00 2a bg r2,r1,8003900 800385c: 44 40 00 02 be r2,r0,8003864 case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 8003860: 34 02 ff ff mvi r2,-1 default: baud_index = -1; break; } return baud_index; } 8003864: b8 40 08 00 mv r1,r2 8003868: c3 a0 00 00 ret rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 800386c: 34 03 00 0e mvi r3,14 <== NOT EXECUTED 8003870: 44 23 ff fd be r1,r3,8003864 <== NOT EXECUTED 8003874: 48 23 00 0c bg r1,r3,80038a4 <== NOT EXECUTED 8003878: 34 03 00 0b mvi r3,11 <== NOT EXECUTED 800387c: 44 23 ff fa be r1,r3,8003864 <== NOT EXECUTED case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; 8003880: 34 02 00 0a mvi r2,10 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8003884: 48 61 ff f8 bg r3,r1,8003864 <== NOT EXECUTED case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; 8003888: b8 20 10 00 mv r2,r1 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 800388c: 34 01 00 0c mvi r1,12 <== NOT EXECUTED 8003890: 44 41 ff f5 be r2,r1,8003864 <== NOT EXECUTED 8003894: 34 01 00 0d mvi r1,13 <== NOT EXECUTED 8003898: 44 41 ff f3 be r2,r1,8003864 <== NOT EXECUTED case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 800389c: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80038a0: e3 ff ff f1 bi 8003864 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80038a4: 34 03 10 02 mvi r3,4098 <== NOT EXECUTED case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; 80038a8: 34 02 00 11 mvi r2,17 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80038ac: 44 23 ff ee be r1,r3,8003864 <== NOT EXECUTED 80038b0: 48 23 00 19 bg r1,r3,8003914 <== NOT EXECUTED 80038b4: 34 03 00 0f mvi r3,15 <== NOT EXECUTED case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; 80038b8: b8 20 10 00 mv r2,r1 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80038bc: 44 23 ff ea be r1,r3,8003864 <== NOT EXECUTED 80038c0: 34 03 10 01 mvi r3,4097 <== NOT EXECUTED case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; 80038c4: 34 02 00 10 mvi r2,16 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80038c8: 44 23 ff e7 be r1,r3,8003864 <== NOT EXECUTED case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 80038cc: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80038d0: e3 ff ff e5 bi 8003864 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80038d4: 34 03 00 06 mvi r3,6 <== NOT EXECUTED 80038d8: 44 23 ff e3 be r1,r3,8003864 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; 80038dc: 34 02 00 05 mvi r2,5 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80038e0: 48 61 ff e1 bg r3,r1,8003864 <== NOT EXECUTED case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; 80038e4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 80038e8: 34 01 00 07 mvi r1,7 <== NOT EXECUTED 80038ec: 44 41 ff de be r2,r1,8003864 <== NOT EXECUTED 80038f0: 34 01 00 08 mvi r1,8 <== NOT EXECUTED 80038f4: 44 41 ff dc be r2,r1,8003864 <== NOT EXECUTED case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 80038f8: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80038fc: e3 ff ff da bi 8003864 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8003900: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8003904: 44 41 ff d8 be r2,r1,8003864 <== NOT EXECUTED 8003908: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 800390c: 5c 41 ff d5 bne r2,r1,8003860 <== NOT EXECUTED 8003910: e3 ff ff d5 bi 8003864 <== NOT EXECUTED 8003914: 34 03 10 03 mvi r3,4099 <== NOT EXECUTED case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; 8003918: 34 02 00 12 mvi r2,18 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 800391c: 44 23 ff d2 be r1,r3,8003864 <== NOT EXECUTED 8003920: 34 03 10 04 mvi r3,4100 <== NOT EXECUTED case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 8003924: 34 02 00 13 mvi r2,19 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 8003928: 5c 23 ff ce bne r1,r3,8003860 <== NOT EXECUTED 800392c: e3 ff ff ce bi 8003864 <== NOT EXECUTED 08003930 : int termios_baud ) { int32_t baud; switch (termios_baud) { 8003930: 34 03 00 09 mvi r3,9 case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; 8003934: 34 02 04 b0 mvi r2,1200 int termios_baud ) { int32_t baud; switch (termios_baud) { 8003938: 44 23 00 0d be r1,r3,800396c 800393c: 48 23 00 0e bg r1,r3,8003974 8003940: 34 03 00 04 mvi r3,4 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; 8003944: 34 02 00 86 mvi r2,134 int termios_baud ) { int32_t baud; switch (termios_baud) { 8003948: 44 23 00 09 be r1,r3,800396c 800394c: 48 23 00 26 bg r1,r3,80039e4 8003950: 34 03 00 01 mvi r3,1 8003954: 34 02 00 32 mvi r2,50 8003958: 44 23 00 05 be r1,r3,800396c 800395c: 48 23 00 2f bg r1,r3,8003a18 8003960: b8 20 10 00 mv r2,r1 8003964: 44 20 00 02 be r1,r0,800396c case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 8003968: 34 02 ff ff mvi r2,-1 default: baud = -1; break; } return baud; } 800396c: b8 40 08 00 mv r1,r2 8003970: c3 a0 00 00 ret int termios_baud ) { int32_t baud; switch (termios_baud) { 8003974: 34 03 00 0e mvi r3,14 case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; 8003978: 34 02 4b 00 mvi r2,19200 int termios_baud ) { int32_t baud; switch (termios_baud) { 800397c: 44 23 ff fc be r1,r3,800396c 8003980: 48 23 00 0e bg r1,r3,80039b8 8003984: 34 03 00 0b mvi r3,11 case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; 8003988: 34 02 09 60 mvi r2,2400 int termios_baud ) { int32_t baud; switch (termios_baud) { 800398c: 44 23 ff f8 be r1,r3,800396c case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; 8003990: 34 02 07 08 mvi r2,1800 int termios_baud ) { int32_t baud; switch (termios_baud) { 8003994: 48 61 ff f6 bg r3,r1,800396c 8003998: 34 03 00 0c mvi r3,12 case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; 800399c: 34 02 12 c0 mvi r2,4800 int termios_baud ) { int32_t baud; switch (termios_baud) { 80039a0: 44 23 ff f3 be r1,r3,800396c 80039a4: 34 03 00 0d mvi r3,13 case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; 80039a8: 34 02 25 80 mvi r2,9600 int termios_baud ) { int32_t baud; switch (termios_baud) { 80039ac: 44 23 ff f0 be r1,r3,800396c case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 80039b0: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80039b4: e3 ff ff ee bi 800396c <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 80039b8: 34 02 10 02 mvi r2,4098 80039bc: 44 22 00 25 be r1,r2,8003a50 80039c0: 48 22 00 1d bg r1,r2,8003a34 80039c4: 34 03 00 0f mvi r3,15 case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; 80039c8: 38 02 96 00 mvu r2,0x9600 int termios_baud ) { int32_t baud; switch (termios_baud) { 80039cc: 44 23 ff e8 be r1,r3,800396c 80039d0: 34 03 10 01 mvi r3,4097 case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; 80039d4: 38 02 e1 00 mvu r2,0xe100 int termios_baud ) { int32_t baud; switch (termios_baud) { 80039d8: 44 23 ff e5 be r1,r3,800396c case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 80039dc: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 80039e0: e3 ff ff e3 bi 800396c <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 80039e4: 34 03 00 06 mvi r3,6 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; 80039e8: 34 02 00 c8 mvi r2,200 int termios_baud ) { int32_t baud; switch (termios_baud) { 80039ec: 44 23 ff e0 be r1,r3,800396c case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; 80039f0: 34 02 00 96 mvi r2,150 int termios_baud ) { int32_t baud; switch (termios_baud) { 80039f4: 48 61 ff de bg r3,r1,800396c 80039f8: 34 03 00 07 mvi r3,7 case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; 80039fc: 34 02 01 2c mvi r2,300 int termios_baud ) { int32_t baud; switch (termios_baud) { 8003a00: 44 23 ff db be r1,r3,800396c 8003a04: 34 03 00 08 mvi r3,8 case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; 8003a08: 34 02 02 58 mvi r2,600 int termios_baud ) { int32_t baud; switch (termios_baud) { 8003a0c: 44 23 ff d8 be r1,r3,800396c case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 8003a10: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8003a14: e3 ff ff d6 bi 800396c <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 8003a18: 34 03 00 02 mvi r3,2 8003a1c: 34 02 00 4b mvi r2,75 8003a20: 44 23 ff d3 be r1,r3,800396c 8003a24: 34 03 00 03 mvi r3,3 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; 8003a28: 34 02 00 6e mvi r2,110 int termios_baud ) { int32_t baud; switch (termios_baud) { 8003a2c: 5c 23 ff cf bne r1,r3,8003968 8003a30: e3 ff ff cf bi 800396c 8003a34: 34 02 10 03 mvi r2,4099 8003a38: 44 22 00 09 be r1,r2,8003a5c 8003a3c: 34 02 10 04 mvi r2,4100 8003a40: 5c 22 ff ca bne r1,r2,8003968 case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; 8003a44: 78 02 00 07 mvhi r2,0x7 8003a48: 38 42 08 00 ori r2,r2,0x800 case B460800: baud = 460800; break; 8003a4c: e3 ff ff c8 bi 800396c case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; 8003a50: 78 02 00 01 mvhi r2,0x1 8003a54: 38 42 c2 00 ori r2,r2,0xc200 case B115200: baud = 115200; break; 8003a58: e3 ff ff c5 bi 800396c 8003a5c: 78 02 00 03 mvhi r2,0x3 8003a60: 38 42 84 00 ori r2,r2,0x8400 case B230400: baud = 230400; break; 8003a64: e3 ff ff c2 bi 800396c 08003bf8 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 8003bf8: 78 06 08 02 mvhi r6,0x802 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 8003bfc: 78 05 08 02 mvhi r5,0x802 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 8003c00: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 8003c04: 38 c6 62 34 ori r6,r6,0x6234 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 8003c08: 38 a5 62 38 ori r5,r5,0x6238 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 8003c0c: 38 84 62 3c ori r4,r4,0x623c <== NOT EXECUTED int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 8003c10: 58 c1 00 00 sw (r6+0),r1 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 8003c14: 58 a2 00 00 sw (r5+0),r2 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 8003c18: 58 83 00 00 sw (r4+0),r3 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 8003c1c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8003c20: c3 a0 00 00 ret <== NOT EXECUTED 08005490 : } } rtems_status_code rtems_termios_close (void *arg) { 8005490: 37 9c ff e8 addi sp,sp,-24 8005494: 5b 8b 00 18 sw (sp+24),r11 8005498: 5b 8c 00 14 sw (sp+20),r12 800549c: 5b 8d 00 10 sw (sp+16),r13 80054a0: 5b 8e 00 0c sw (sp+12),r14 80054a4: 5b 8f 00 08 sw (sp+8),r15 80054a8: 5b 9d 00 04 sw (sp+4),ra rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 80054ac: 78 0c 08 02 mvhi r12,0x802 80054b0: 39 8c 69 c4 ori r12,r12,0x69c4 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 80054b4: 28 24 00 00 lw r4,(r1+0) } } rtems_status_code rtems_termios_close (void *arg) { 80054b8: b8 20 78 00 mv r15,r1 rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 80054bc: 29 81 00 00 lw r1,(r12+0) 80054c0: 34 02 00 00 mvi r2,0 80054c4: b8 40 18 00 mv r3,r2 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 80054c8: 28 8b 00 38 lw r11,(r4+56) rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 80054cc: f8 00 04 fb calli 80068b8 if (sc != RTEMS_SUCCESSFUL) 80054d0: 5c 20 00 62 bne r1,r0,8005658 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 80054d4: 29 6d 00 08 lw r13,(r11+8) 80054d8: 35 ad ff ff addi r13,r13,-1 80054dc: 59 6d 00 08 sw (r11+8),r13 80054e0: 5d a1 00 2e bne r13,r1,8005598 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 80054e4: 29 61 00 cc lw r1,(r11+204) 80054e8: 78 0e 08 02 mvhi r14,0x802 80054ec: 34 02 00 05 mvi r2,5 80054f0: 39 ce 67 f8 ori r14,r14,0x67f8 80054f4: fb ff ef f2 calli 80014bc <__ashlsi3> 80054f8: b5 c1 08 00 add r1,r14,r1 80054fc: 28 2e 00 04 lw r14,(r1+4) 8005500: 45 cd 00 43 be r14,r13,800560c /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 8005504: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005508: d9 c0 00 00 call r14 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts 800550c: 29 62 00 b4 lw r2,(r11+180) <== NOT EXECUTED 8005510: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8005514: 44 41 00 48 be r2,r1,8005634 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 8005518: 29 64 00 9c lw r4,(r11+156) 800551c: 44 80 00 05 be r4,r0,8005530 (*tty->device.lastClose)(tty->major, tty->minor, arg); 8005520: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED 8005524: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED 8005528: b9 e0 18 00 mv r3,r15 <== NOT EXECUTED 800552c: d8 80 00 00 call r4 <== NOT EXECUTED if (tty->forw == NULL) { 8005530: 29 61 00 00 lw r1,(r11+0) 8005534: 44 20 00 27 be r1,r0,80055d0 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 8005538: 29 62 00 04 lw r2,(r11+4) <== NOT EXECUTED 800553c: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED } if (tty->back == NULL) { 8005540: 29 62 00 04 lw r2,(r11+4) <== NOT EXECUTED 8005544: 44 40 00 2c be r2,r0,80055f4 <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 8005548: 58 41 00 00 sw (r2+0),r1 <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 800554c: 29 61 00 14 lw r1,(r11+20) 8005550: f8 00 04 a7 calli 80067ec rtems_semaphore_delete (tty->osem); 8005554: 29 61 00 18 lw r1,(r11+24) 8005558: f8 00 04 a5 calli 80067ec rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 800555c: 29 61 00 8c lw r1,(r11+140) 8005560: f8 00 04 a3 calli 80067ec if ((tty->device.pollRead == NULL) || 8005564: 29 61 00 a0 lw r1,(r11+160) 8005568: 44 20 00 17 be r1,r0,80055c4 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 800556c: 29 62 00 b4 lw r2,(r11+180) 8005570: 34 01 00 02 mvi r1,2 8005574: 44 41 00 14 be r2,r1,80055c4 rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 8005578: 29 61 00 58 lw r1,(r11+88) 800557c: f8 00 1c d9 calli 800c8e0 free (tty->rawOutBuf.theBuf); 8005580: 29 61 00 7c lw r1,(r11+124) 8005584: f8 00 1c d7 calli 800c8e0 free (tty->cbuf); 8005588: 29 61 00 1c lw r1,(r11+28) 800558c: f8 00 1c d5 calli 800c8e0 free (tty); 8005590: b9 60 08 00 mv r1,r11 8005594: f8 00 1c d3 calli 800c8e0 } rtems_semaphore_release (rtems_termios_ttyMutex); 8005598: 29 81 00 00 lw r1,(r12+0) 800559c: f8 00 05 28 calli 8006a3c return RTEMS_SUCCESSFUL; } 80055a0: 34 01 00 00 mvi r1,0 80055a4: 2b 9d 00 04 lw ra,(sp+4) 80055a8: 2b 8b 00 18 lw r11,(sp+24) 80055ac: 2b 8c 00 14 lw r12,(sp+20) 80055b0: 2b 8d 00 10 lw r13,(sp+16) 80055b4: 2b 8e 00 0c lw r14,(sp+12) 80055b8: 2b 8f 00 08 lw r15,(sp+8) 80055bc: 37 9c 00 18 addi sp,sp,24 80055c0: c3 a0 00 00 ret rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 80055c4: 29 61 00 68 lw r1,(r11+104) <== NOT EXECUTED 80055c8: f8 00 04 89 calli 80067ec <== NOT EXECUTED 80055cc: e3 ff ff eb bi 8005578 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; 80055d0: 29 62 00 04 lw r2,(r11+4) 80055d4: 78 03 08 02 mvhi r3,0x802 80055d8: 38 63 69 c8 ori r3,r3,0x69c8 80055dc: 58 62 00 00 sw (r3+0),r2 if ( rtems_termios_ttyTail != NULL ) { 80055e0: 44 41 00 1f be r2,r1,800565c rtems_termios_ttyTail->forw = NULL; 80055e4: 58 41 00 00 sw (r2+0),r1 <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 80055e8: 29 62 00 04 lw r2,(r11+4) <== NOT EXECUTED 80055ec: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 80055f0: 5c 40 ff d6 bne r2,r0,8005548 <== NOT EXECUTED rtems_termios_ttyHead = tty->forw; 80055f4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80055f8: 38 63 69 cc ori r3,r3,0x69cc <== NOT EXECUTED 80055fc: 58 61 00 00 sw (r3+0),r1 <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { 8005600: 44 22 ff d3 be r1,r2,800554c <== NOT EXECUTED rtems_termios_ttyHead->back = NULL; 8005604: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED 8005608: e3 ff ff d1 bi 800554c <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 800560c: 29 61 00 18 lw r1,(r11+24) 8005610: b9 c0 10 00 mv r2,r14 8005614: b9 c0 18 00 mv r3,r14 8005618: f8 00 04 a8 calli 80068b8 if (sc != RTEMS_SUCCESSFUL) { 800561c: 5d c1 00 0f bne r14,r1,8005658 rtems_fatal_error_occurred (sc); } drainOutput (tty); 8005620: b9 60 08 00 mv r1,r11 8005624: fb ff fd 71 calli 8004be8 } if (tty->device.outputUsesInterrupts 8005628: 29 62 00 b4 lw r2,(r11+180) 800562c: 34 01 00 02 mvi r1,2 8005630: 5c 41 ff ba bne r2,r1,8005518 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 8005634: 29 61 00 c4 lw r1,(r11+196) <== NOT EXECUTED 8005638: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800563c: f8 00 03 2e calli 80062f4 <== NOT EXECUTED 8005640: b8 20 68 00 mv r13,r1 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 8005644: 5c 20 00 05 bne r1,r0,8005658 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 8005648: 29 61 00 c8 lw r1,(r11+200) <== NOT EXECUTED 800564c: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8005650: f8 00 03 29 calli 80062f4 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 8005654: 44 2d ff b1 be r1,r13,8005518 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 8005658: f8 00 06 c5 calli 800716c <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 800565c: 78 01 08 02 mvhi r1,0x802 8005660: 38 21 69 cc ori r1,r1,0x69cc 8005664: 58 22 00 00 sw (r1+0),r2 8005668: e3 ff ff b9 bi 800554c 08003eb4 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 8003eb4: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8003eb8: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 8003ebc: 28 25 00 90 lw r5,(r1+144) <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 8003ec0: 28 24 00 b4 lw r4,(r1+180) <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 8003ec4: b4 a2 10 00 add r2,r5,r2 <== NOT EXECUTED 8003ec8: 58 22 00 90 sw (r1+144),r2 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 8003ecc: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8003ed0: 44 82 00 11 be r4,r2,8003f14 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 8003ed4: 28 23 00 cc lw r3,(r1+204) <== NOT EXECUTED 8003ed8: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8003edc: 44 62 00 05 be r3,r2,8003ef0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 8003ee0: fb ff ff 59 calli 8003c44 <== NOT EXECUTED } } 8003ee4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003ee8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8003eec: c3 a0 00 00 ret <== NOT EXECUTED } else if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 8003ef0: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8003ef4: 38 42 67 f8 ori r2,r2,0x67f8 <== NOT EXECUTED 8003ef8: 28 42 00 b4 lw r2,(r2+180) <== NOT EXECUTED 8003efc: 44 40 00 0a be r2,r0,8003f24 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 8003f00: d8 40 00 00 call r2 <== NOT EXECUTED 8003f04: 34 01 00 00 mvi r1,0 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 8003f08: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003f0c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8003f10: c3 a0 00 00 ret <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 8003f14: 28 21 00 c8 lw r1,(r1+200) <== NOT EXECUTED 8003f18: b8 80 10 00 mv r2,r4 <== NOT EXECUTED 8003f1c: f8 00 08 f6 calli 80062f4 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 8003f20: 5c 20 00 05 bne r1,r0,8003f34 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 8003f24: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } } 8003f28: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003f2c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8003f30: c3 a0 00 00 ret <== NOT EXECUTED * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 8003f34: f8 00 0c 8e calli 800716c <== NOT EXECUTED 08003f38 : * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 8003f38: 37 9c ff b8 addi sp,sp,-72 <== NOT EXECUTED 8003f3c: 5b 8b 00 44 sw (sp+68),r11 <== NOT EXECUTED 8003f40: 5b 8c 00 40 sw (sp+64),r12 <== NOT EXECUTED 8003f44: 5b 8d 00 3c sw (sp+60),r13 <== NOT EXECUTED 8003f48: 5b 8e 00 38 sw (sp+56),r14 <== NOT EXECUTED 8003f4c: 5b 8f 00 34 sw (sp+52),r15 <== NOT EXECUTED 8003f50: 5b 90 00 30 sw (sp+48),r16 <== NOT EXECUTED 8003f54: 5b 91 00 2c sw (sp+44),r17 <== NOT EXECUTED 8003f58: 5b 92 00 28 sw (sp+40),r18 <== NOT EXECUTED 8003f5c: 5b 93 00 24 sw (sp+36),r19 <== NOT EXECUTED 8003f60: 5b 94 00 20 sw (sp+32),r20 <== NOT EXECUTED 8003f64: 5b 95 00 1c sw (sp+28),r21 <== NOT EXECUTED 8003f68: 5b 96 00 18 sw (sp+24),r22 <== NOT EXECUTED 8003f6c: 5b 97 00 14 sw (sp+20),r23 <== NOT EXECUTED 8003f70: 5b 98 00 10 sw (sp+16),r24 <== NOT EXECUTED 8003f74: 5b 99 00 0c sw (sp+12),r25 <== NOT EXECUTED 8003f78: 5b 9b 00 08 sw (sp+8),fp <== NOT EXECUTED 8003f7c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8003f80: b8 20 58 00 mv r11,r1 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 8003f84: 28 21 00 cc lw r1,(r1+204) <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 8003f88: b8 40 68 00 mv r13,r2 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 8003f8c: 78 0e 08 02 mvhi r14,0x802 <== NOT EXECUTED 8003f90: b4 21 08 00 add r1,r1,r1 <== NOT EXECUTED 8003f94: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 8003f98: 34 02 00 04 mvi r2,4 <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 8003f9c: b8 60 78 00 mv r15,r3 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 8003fa0: 39 ce 67 f8 ori r14,r14,0x67f8 <== NOT EXECUTED 8003fa4: fb ff f5 46 calli 80014bc <__ashlsi3> <== NOT EXECUTED 8003fa8: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8003fac: 28 24 00 00 lw r4,(r1+0) <== NOT EXECUTED 8003fb0: 44 80 00 31 be r4,r0,8004074 <== NOT EXECUTED while (len--) { 8003fb4: 45 e0 00 10 be r15,r0,8003ff4 <== NOT EXECUTED 8003fb8: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 8003fbc: e0 00 00 07 bi 8003fd8 <== NOT EXECUTED 8003fc0: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 8003fc4: b4 21 08 00 add r1,r1,r1 <== NOT EXECUTED 8003fc8: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 8003fcc: fb ff f5 3c calli 80014bc <__ashlsi3> <== NOT EXECUTED 8003fd0: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8003fd4: 28 24 00 00 lw r4,(r1+0) <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 8003fd8: b5 ac 08 00 add r1,r13,r12 <== NOT EXECUTED 8003fdc: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED 8003fe0: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8003fe4: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED 8003fe8: d8 80 00 00 call r4 <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 8003fec: 34 02 00 04 mvi r2,4 <== NOT EXECUTED 8003ff0: 5d ec ff f4 bne r15,r12,8003fc0 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 8003ff4: 29 63 00 e4 lw r3,(r11+228) <== NOT EXECUTED 8003ff8: 5c 60 00 1d bne r3,r0,800406c <== NOT EXECUTED 8003ffc: 29 64 00 dc lw r4,(r11+220) <== NOT EXECUTED 8004000: 44 83 00 1b be r4,r3,800406c <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 8004004: 29 62 00 e0 lw r2,(r11+224) <== NOT EXECUTED 8004008: 35 61 00 30 addi r1,r11,48 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 800400c: b8 60 80 00 mv r16,r3 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 8004010: d8 80 00 00 call r4 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 8004014: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8004018: 59 61 00 e4 sw (r11+228),r1 <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 800401c: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 8004020: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004024: 2b 8b 00 44 lw r11,(sp+68) <== NOT EXECUTED 8004028: 2b 8c 00 40 lw r12,(sp+64) <== NOT EXECUTED 800402c: 2b 8d 00 3c lw r13,(sp+60) <== NOT EXECUTED 8004030: 2b 8e 00 38 lw r14,(sp+56) <== NOT EXECUTED 8004034: 2b 8f 00 34 lw r15,(sp+52) <== NOT EXECUTED 8004038: 2b 90 00 30 lw r16,(sp+48) <== NOT EXECUTED 800403c: 2b 91 00 2c lw r17,(sp+44) <== NOT EXECUTED 8004040: 2b 92 00 28 lw r18,(sp+40) <== NOT EXECUTED 8004044: 2b 93 00 24 lw r19,(sp+36) <== NOT EXECUTED 8004048: 2b 94 00 20 lw r20,(sp+32) <== NOT EXECUTED 800404c: 2b 95 00 1c lw r21,(sp+28) <== NOT EXECUTED 8004050: 2b 96 00 18 lw r22,(sp+24) <== NOT EXECUTED 8004054: 2b 97 00 14 lw r23,(sp+20) <== NOT EXECUTED 8004058: 2b 98 00 10 lw r24,(sp+16) <== NOT EXECUTED 800405c: 2b 99 00 0c lw r25,(sp+12) <== NOT EXECUTED 8004060: 2b 9b 00 08 lw fp,(sp+8) <== NOT EXECUTED 8004064: 37 9c 00 48 addi sp,sp,72 <== NOT EXECUTED 8004068: c3 a0 00 00 ret <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 800406c: 34 10 00 00 mvi r16,0 <== NOT EXECUTED 8004070: e3 ff ff eb bi 800401c <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 8004074: 35 61 00 4a addi r1,r11,74 <== NOT EXECUTED 8004078: 5b 81 00 48 sw (sp+72),r1 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 800407c: b8 80 88 00 mv r17,r4 <== NOT EXECUTED 8004080: 35 78 00 30 addi r24,r11,48 <== NOT EXECUTED 8004084: b8 80 80 00 mv r16,r4 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 8004088: 34 14 00 20 mvi r20,32 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 800408c: 34 13 ff fe mvi r19,-2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 8004090: 34 15 ff df mvi r21,-33 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 8004094: 34 17 00 01 mvi r23,1 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 8004098: 34 16 04 00 mvi r22,1024 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 800409c: 34 1b 01 00 mvi fp,256 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 80040a0: 34 19 ff ef mvi r25,-17 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 80040a4: 45 e0 00 38 be r15,r0,8004184 <== NOT EXECUTED c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 80040a8: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 80040ac: 41 ae 00 00 lbu r14,(r13+0) <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 80040b0: 20 63 02 00 andi r3,r3,0x200 <== NOT EXECUTED 80040b4: 44 60 00 05 be r3,r0,80040c8 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 80040b8: 41 63 00 4a lbu r3,(r11+74) <== NOT EXECUTED 80040bc: 44 6e 00 52 be r3,r14,8004204 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 80040c0: 41 63 00 49 lbu r3,(r11+73) <== NOT EXECUTED 80040c4: 44 6e 00 36 be r3,r14,800419c <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 80040c8: 5e 20 00 39 bne r17,r0,80041ac <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 80040cc: 29 63 00 60 lw r3,(r11+96) <== NOT EXECUTED 80040d0: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 80040d4: 34 61 00 01 addi r1,r3,1 <== NOT EXECUTED 80040d8: f8 00 78 5a calli 8022240 <__umodsi3> <== NOT EXECUTED 80040dc: b8 20 60 00 mv r12,r1 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 80040e0: 90 00 90 00 rcsr r18,IE <== NOT EXECUTED 80040e4: a2 53 18 00 and r3,r18,r19 <== NOT EXECUTED 80040e8: d0 03 00 00 wcsr IE,r3 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 80040ec: 29 63 00 5c lw r3,(r11+92) <== NOT EXECUTED 80040f0: 29 64 00 64 lw r4,(r11+100) <== NOT EXECUTED 80040f4: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 80040f8: c8 83 18 00 sub r3,r4,r3 <== NOT EXECUTED 80040fc: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 8004100: f8 00 78 50 calli 8022240 <__umodsi3> <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 8004104: 29 63 00 c0 lw r3,(r11+192) <== NOT EXECUTED 8004108: 50 61 00 0d bgeu r3,r1,800413c <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 800410c: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 8004110: 20 63 00 01 andi r3,r3,0x1 <== NOT EXECUTED 8004114: 5c 60 00 0a bne r3,r0,800413c <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 8004118: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 800411c: 38 63 00 01 ori r3,r3,0x1 <== NOT EXECUTED 8004120: 59 63 00 b8 sw (r11+184),r3 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 8004124: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8004128: 20 63 04 02 andi r3,r3,0x402 <== NOT EXECUTED 800412c: 44 76 00 42 be r3,r22,8004234 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 8004130: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004134: 20 21 01 04 andi r1,r1,0x104 <== NOT EXECUTED 8004138: 44 3b 00 4d be r1,fp,800426c <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 800413c: d0 12 00 00 wcsr IE,r18 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 8004140: 29 63 00 5c lw r3,(r11+92) <== NOT EXECUTED 8004144: 44 6c 00 36 be r3,r12,800421c <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 8004148: 29 63 00 58 lw r3,(r11+88) <== NOT EXECUTED 800414c: b4 6c 18 00 add r3,r3,r12 <== NOT EXECUTED 8004150: 30 6e 00 00 sb (r3+0),r14 <== NOT EXECUTED tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 8004154: 29 63 00 e4 lw r3,(r11+228) <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 8004158: 59 6c 00 60 sw (r11+96),r12 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 800415c: 5c 60 00 07 bne r3,r0,8004178 <== NOT EXECUTED 8004160: 29 64 00 dc lw r4,(r11+220) <== NOT EXECUTED 8004164: 44 83 00 05 be r4,r3,8004178 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 8004168: 29 62 00 e0 lw r2,(r11+224) <== NOT EXECUTED 800416c: bb 00 08 00 mv r1,r24 <== NOT EXECUTED 8004170: d8 80 00 00 call r4 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 8004174: 59 77 00 e4 sw (r11+228),r23 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 8004178: 35 ef ff ff addi r15,r15,-1 <== NOT EXECUTED 800417c: 35 ad 00 01 addi r13,r13,1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 8004180: 5d e0 ff ca bne r15,r0,80040a8 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 8004184: 29 62 00 78 lw r2,(r11+120) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 8004188: 29 61 00 68 lw r1,(r11+104) <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 800418c: b4 50 10 00 add r2,r2,r16 <== NOT EXECUTED 8004190: 59 62 00 78 sw (r11+120),r2 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 8004194: f8 00 0a 2a calli 8006a3c <== NOT EXECUTED return dropped; 8004198: e3 ff ff a1 bi 800401c <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 800419c: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 80041a0: a0 39 08 00 and r1,r1,r25 <== NOT EXECUTED 80041a4: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 80041a8: 34 11 00 01 mvi r17,1 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 80041ac: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 80041b0: 20 63 00 30 andi r3,r3,0x30 <== NOT EXECUTED 80041b4: 5c 74 ff f1 bne r3,r20,8004178 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 80041b8: 90 00 60 00 rcsr r12,IE <== NOT EXECUTED 80041bc: a1 93 18 00 and r3,r12,r19 <== NOT EXECUTED 80041c0: d0 03 00 00 wcsr IE,r3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 80041c4: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 80041c8: 29 61 00 94 lw r1,(r11+148) <== NOT EXECUTED if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 80041cc: a0 75 18 00 and r3,r3,r21 <== NOT EXECUTED 80041d0: 59 63 00 b8 sw (r11+184),r3 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 80041d4: 5c 20 00 03 bne r1,r0,80041e0 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 80041d8: d0 0c 00 00 wcsr IE,r12 <== NOT EXECUTED 80041dc: e3 ff ff e7 bi 8004178 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 80041e0: 29 63 00 7c lw r3,(r11+124) <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 80041e4: 29 62 00 84 lw r2,(r11+132) <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 80041e8: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 80041ec: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 80041f0: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED 80041f4: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 80041f8: d8 80 00 00 call r4 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 80041fc: d0 0c 00 00 wcsr IE,r12 <== NOT EXECUTED 8004200: e3 ff ff de bi 8004178 <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { 8004204: 41 64 00 49 lbu r4,(r11+73) <== NOT EXECUTED 8004208: 44 83 00 07 be r4,r3,8004224 <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 800420c: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004210: 38 21 00 10 ori r1,r1,0x10 <== NOT EXECUTED 8004214: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED 8004218: e3 ff ff e4 bi 80041a8 <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; 800421c: 36 10 00 01 addi r16,r16,1 <== NOT EXECUTED 8004220: e3 ff ff d6 bi 8004178 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 8004224: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004228: 18 21 00 10 xori r1,r1,0x10 <== NOT EXECUTED 800422c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED 8004230: e3 ff ff de bi 80041a8 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 8004234: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004238: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 800423c: 5c 20 00 03 bne r1,r0,8004248 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 8004240: 29 62 00 94 lw r2,(r11+148) <== NOT EXECUTED 8004244: 5c 41 ff be bne r2,r1,800413c <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 8004248: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED (*tty->device.write)(tty->minor, 800424c: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8004250: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 8004254: 38 42 00 02 ori r2,r2,0x2 <== NOT EXECUTED 8004258: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 800425c: 2b 82 00 48 lw r2,(sp+72) <== NOT EXECUTED 8004260: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8004264: d8 80 00 00 call r4 <== NOT EXECUTED 8004268: e3 ff ff b5 bi 800413c <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 800426c: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 8004270: 29 62 00 ac lw r2,(r11+172) <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 8004274: 38 21 00 04 ori r1,r1,0x4 <== NOT EXECUTED 8004278: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 800427c: 44 40 ff b0 be r2,r0,800413c <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 8004280: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004284: d8 40 00 00 call r2 <== NOT EXECUTED 8004288: e3 ff ff ad bi 800413c <== NOT EXECUTED 08003a68 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 8003a68: 37 9c ff f8 addi sp,sp,-8 8003a6c: 5b 8b 00 08 sw (sp+8),r11 8003a70: 5b 9d 00 04 sw (sp+4),ra rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 8003a74: 78 05 08 02 mvhi r5,0x802 8003a78: 38 a5 69 c4 ori r5,r5,0x69c4 8003a7c: 28 ab 00 00 lw r11,(r5+0) 8003a80: 45 60 00 05 be r11,r0,8003a94 RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 8003a84: 2b 9d 00 04 lw ra,(sp+4) 8003a88: 2b 8b 00 08 lw r11,(sp+8) 8003a8c: 37 9c 00 08 addi sp,sp,8 8003a90: c3 a0 00 00 ret /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create ( 8003a94: 78 01 54 52 mvhi r1,0x5452 8003a98: 38 21 6d 69 ori r1,r1,0x6d69 8003a9c: 34 02 00 01 mvi r2,1 8003aa0: 34 03 00 54 mvi r3,84 8003aa4: b9 60 20 00 mv r4,r11 8003aa8: f8 00 0a c7 calli 80065c4 rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) 8003aac: 44 2b ff f6 be r1,r11,8003a84 rtems_fatal_error_occurred (sc); 8003ab0: f8 00 0d af calli 800716c <== NOT EXECUTED 0800502c : } } rtems_status_code rtems_termios_ioctl (void *arg) { 800502c: 37 9c ff e8 addi sp,sp,-24 8005030: 5b 8b 00 18 sw (sp+24),r11 8005034: 5b 8c 00 14 sw (sp+20),r12 8005038: 5b 8d 00 10 sw (sp+16),r13 800503c: 5b 8e 00 0c sw (sp+12),r14 8005040: 5b 8f 00 08 sw (sp+8),r15 8005044: 5b 9d 00 04 sw (sp+4),ra 8005048: b8 20 60 00 mv r12,r1 rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 800504c: 28 21 00 00 lw r1,(r1+0) struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 8005050: 34 02 00 00 mvi r2,0 8005054: 59 82 00 0c sw (r12+12),r2 rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8005058: 28 2b 00 38 lw r11,(r1+56) struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 800505c: b8 40 18 00 mv r3,r2 rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 8005060: 29 8e 00 08 lw r14,(r12+8) rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8005064: 29 61 00 18 lw r1,(r11+24) 8005068: f8 00 06 14 calli 80068b8 800506c: b8 20 68 00 mv r13,r1 if (sc != RTEMS_SUCCESSFUL) { 8005070: 5c 20 00 1e bne r1,r0,80050e8 args->ioctl_return = sc; return sc; } switch (args->command) { 8005074: 29 81 00 04 lw r1,(r12+4) 8005078: 34 02 00 04 mvi r2,4 800507c: 44 22 00 15 be r1,r2,80050d0 8005080: 54 22 00 24 bgu r1,r2,8005110 8005084: 34 02 00 02 mvi r2,2 8005088: 44 22 00 2d be r1,r2,800513c 800508c: 54 22 00 d9 bgu r1,r2,80053f0 8005090: 34 02 00 01 mvi r2,1 8005094: 44 22 00 c3 be r1,r2,80053a0 default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 8005098: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 800509c: 78 0d 08 02 mvhi r13,0x802 <== NOT EXECUTED 80050a0: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 80050a4: 39 ad 67 f8 ori r13,r13,0x67f8 <== NOT EXECUTED 80050a8: fb ff f1 05 calli 80014bc <__ashlsi3> <== NOT EXECUTED 80050ac: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED 80050b0: 28 23 00 18 lw r3,(r1+24) <== NOT EXECUTED 80050b4: 34 0d 00 0a mvi r13,10 <== NOT EXECUTED 80050b8: 44 60 00 0a be r3,r0,80050e0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 80050bc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80050c0: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 80050c4: d8 60 00 00 call r3 <== NOT EXECUTED 80050c8: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 80050cc: e0 00 00 05 bi 80050e0 <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 80050d0: 29 c2 00 00 lw r2,(r14+0) <== NOT EXECUTED 80050d4: 59 62 00 dc sw (r11+220),r2 <== NOT EXECUTED 80050d8: 29 ce 00 04 lw r14,(r14+4) <== NOT EXECUTED 80050dc: 59 6e 00 e0 sw (r11+224),r14 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 80050e0: 29 61 00 18 lw r1,(r11+24) 80050e4: f8 00 06 56 calli 8006a3c args->ioctl_return = sc; return sc; } 80050e8: b9 a0 08 00 mv r1,r13 *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; 80050ec: 59 8d 00 0c sw (r12+12),r13 return sc; } 80050f0: 2b 9d 00 04 lw ra,(sp+4) 80050f4: 2b 8b 00 18 lw r11,(sp+24) 80050f8: 2b 8c 00 14 lw r12,(sp+20) 80050fc: 2b 8d 00 10 lw r13,(sp+16) 8005100: 2b 8e 00 0c lw r14,(sp+12) 8005104: 2b 8f 00 08 lw r15,(sp+8) 8005108: 37 9c 00 18 addi sp,sp,24 800510c: c3 a0 00 00 ret sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 8005110: 78 02 40 04 mvhi r2,0x4004 <== NOT EXECUTED 8005114: 38 42 66 7f ori r2,r2,0x667f <== NOT EXECUTED 8005118: 44 22 00 72 be r1,r2,80052e0 <== NOT EXECUTED 800511c: 54 22 00 7e bgu r1,r2,8005314 <== NOT EXECUTED 8005120: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8005124: 5c 22 ff dd bne r1,r2,8005098 <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 8005128: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED 800512c: 59 61 00 d4 sw (r11+212),r1 <== NOT EXECUTED 8005130: 29 ce 00 04 lw r14,(r14+4) <== NOT EXECUTED 8005134: 59 6e 00 d8 sw (r11+216),r14 <== NOT EXECUTED break; 8005138: e3 ff ff ea bi 80050e0 <== NOT EXECUTED case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 800513c: 29 81 00 08 lw r1,(r12+8) /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 8005140: 29 63 00 b8 lw r3,(r11+184) case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 8005144: 28 22 00 00 lw r2,(r1+0) /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 8005148: 20 63 02 00 andi r3,r3,0x200 case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 800514c: 59 62 00 30 sw (r11+48),r2 8005150: 28 24 00 04 lw r4,(r1+4) 8005154: 59 64 00 34 sw (r11+52),r4 8005158: 28 24 00 08 lw r4,(r1+8) 800515c: 59 64 00 38 sw (r11+56),r4 8005160: 28 24 00 0c lw r4,(r1+12) 8005164: 59 64 00 3c sw (r11+60),r4 8005168: 28 24 00 10 lw r4,(r1+16) 800516c: 59 64 00 40 sw (r11+64),r4 8005170: 28 24 00 14 lw r4,(r1+20) 8005174: 59 64 00 44 sw (r11+68),r4 8005178: 28 24 00 18 lw r4,(r1+24) 800517c: 59 64 00 48 sw (r11+72),r4 8005180: 28 24 00 1c lw r4,(r1+28) 8005184: 59 64 00 4c sw (r11+76),r4 8005188: 28 21 00 20 lw r1,(r1+32) 800518c: 59 61 00 50 sw (r11+80),r1 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 8005190: 44 60 00 15 be r3,r0,80051e4 8005194: 20 42 04 00 andi r2,r2,0x400 8005198: 5c 40 00 13 bne r2,r0,80051e4 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 800519c: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 80051a0: 34 01 fd ef mvi r1,-529 <== NOT EXECUTED 80051a4: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 80051a8: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 80051ac: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 80051b0: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 80051b4: 44 20 00 0c be r1,r0,80051e4 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 80051b8: 90 00 70 00 rcsr r14,IE <== NOT EXECUTED 80051bc: 34 01 ff fe mvi r1,-2 <== NOT EXECUTED 80051c0: a1 c1 08 00 and r1,r14,r1 <== NOT EXECUTED 80051c4: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 80051c8: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 80051cc: 34 01 ff df mvi r1,-33 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 80051d0: 29 63 00 94 lw r3,(r11+148) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 80051d4: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 80051d8: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 80051dc: 5c 60 00 8a bne r3,r0,8005404 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 80051e0: d0 0e 00 00 wcsr IE,r14 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 80051e4: 29 61 00 b8 lw r1,(r11+184) 80051e8: 20 21 04 00 andi r1,r1,0x400 80051ec: 44 20 00 0c be r1,r0,800521c 80051f0: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 80051f4: 20 21 10 00 andi r1,r1,0x1000 <== NOT EXECUTED 80051f8: 5c 20 00 09 bne r1,r0,800521c <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 80051fc: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8005200: 34 01 fb ff mvi r1,-1025 <== NOT EXECUTED 8005204: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8005208: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 800520c: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8005210: 34 01 ff fd mvi r1,-3 <== NOT EXECUTED 8005214: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8005218: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 800521c: 29 61 00 b8 lw r1,(r11+184) 8005220: 20 21 01 00 andi r1,r1,0x100 8005224: 44 20 00 76 be r1,r0,80053fc 8005228: 29 62 00 38 lw r2,(r11+56) <== NOT EXECUTED 800522c: 48 02 00 12 bg r0,r2,8005274 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 8005230: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8005234: 34 01 fe ff mvi r1,-257 <== NOT EXECUTED 8005238: a0 61 08 00 and r1,r3,r1 <== NOT EXECUTED 800523c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 8005240: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8005244: 20 21 00 04 andi r1,r1,0x4 <== NOT EXECUTED 8005248: 44 20 00 06 be r1,r0,8005260 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 800524c: 29 63 00 b0 lw r3,(r11+176) <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 8005250: 44 60 00 04 be r3,r0,8005260 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 8005254: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8005258: d8 60 00 00 call r3 <== NOT EXECUTED 800525c: 29 62 00 38 lw r2,(r11+56) <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 8005260: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8005264: 34 01 ff fb mvi r1,-5 <== NOT EXECUTED 8005268: a0 61 08 00 and r1,r3,r1 <== NOT EXECUTED 800526c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 8005270: 4c 40 00 04 bge r2,r0,8005280 tty->flow_ctrl |= FL_MDRTS; 8005274: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8005278: 38 21 01 00 ori r1,r1,0x100 <== NOT EXECUTED 800527c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 8005280: 29 61 00 30 lw r1,(r11+48) 8005284: 20 22 10 00 andi r2,r1,0x1000 8005288: 44 40 00 04 be r2,r0,8005298 tty->flow_ctrl |= FL_MDXOF; 800528c: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8005290: 38 42 04 00 ori r2,r2,0x400 <== NOT EXECUTED 8005294: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 8005298: 20 21 04 00 andi r1,r1,0x400 800529c: 44 20 00 04 be r1,r0,80052ac tty->flow_ctrl |= FL_MDXON; 80052a0: 29 61 00 b8 lw r1,(r11+184) 80052a4: 38 21 02 00 ori r1,r1,0x200 80052a8: 59 61 00 b8 sw (r11+184),r1 tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 80052ac: 29 6e 00 3c lw r14,(r11+60) 80052b0: 34 01 00 00 mvi r1,0 80052b4: 21 ce 00 02 andi r14,r14,0x2 80052b8: 45 c1 00 5c be r14,r1,8005428 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 80052bc: 59 61 00 74 sw (r11+116),r1 /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 80052c0: 59 61 00 6c sw (r11+108),r1 tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 80052c4: 59 61 00 70 sw (r11+112),r1 else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 80052c8: 29 63 00 a8 lw r3,(r11+168) 80052cc: 44 60 ff 85 be r3,r0,80050e0 (*tty->device.setAttributes)(tty->minor, &tty->termios); 80052d0: 29 61 00 10 lw r1,(r11+16) 80052d4: 35 62 00 30 addi r2,r11,48 80052d8: d8 60 00 00 call r3 80052dc: e3 ff ff 81 bi 80050e0 *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 80052e0: 29 62 00 60 lw r2,(r11+96) <== NOT EXECUTED 80052e4: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED 80052e8: c8 41 08 00 sub r1,r2,r1 <== NOT EXECUTED if ( rawnc < 0 ) 80052ec: 4c 20 00 03 bge r1,r0,80052f8 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 80052f0: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 80052f4: b4 22 08 00 add r1,r1,r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 80052f8: 29 64 00 20 lw r4,(r11+32) <== NOT EXECUTED 80052fc: 29 62 00 24 lw r2,(r11+36) <== NOT EXECUTED 8005300: 29 83 00 08 lw r3,(r12+8) <== NOT EXECUTED 8005304: c8 82 10 00 sub r2,r4,r2 <== NOT EXECUTED 8005308: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 800530c: 58 61 00 00 sw (r3+0),r1 <== NOT EXECUTED 8005310: e3 ff ff 74 bi 80050e0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 8005314: 78 02 40 04 mvhi r2,0x4004 <== NOT EXECUTED 8005318: 38 42 74 1a ori r2,r2,0x741a <== NOT EXECUTED 800531c: 44 22 00 1d be r1,r2,8005390 <== NOT EXECUTED 8005320: 78 02 80 04 mvhi r2,0x8004 <== NOT EXECUTED 8005324: 38 42 74 1b ori r2,r2,0x741b <== NOT EXECUTED 8005328: 5c 22 ff 5c bne r1,r2,8005098 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 800532c: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 8005330: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8005334: 78 0e 08 02 mvhi r14,0x802 <== NOT EXECUTED 8005338: fb ff f0 61 calli 80014bc <__ashlsi3> <== NOT EXECUTED 800533c: 39 ce 67 f8 ori r14,r14,0x67f8 <== NOT EXECUTED 8005340: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8005344: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 8005348: 44 40 00 04 be r2,r0,8005358 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 800534c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005350: d8 40 00 00 call r2 <== NOT EXECUTED 8005354: b8 20 68 00 mv r13,r1 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 8005358: 29 81 00 08 lw r1,(r12+8) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 800535c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8005360: 59 62 00 d0 sw (r11+208),r2 <== NOT EXECUTED * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); 8005364: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 8005368: 34 02 00 05 mvi r2,5 <== NOT EXECUTED * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); 800536c: 59 61 00 cc sw (r11+204),r1 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 8005370: fb ff f0 53 calli 80014bc <__ashlsi3> <== NOT EXECUTED 8005374: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8005378: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 800537c: 44 40 ff 59 be r2,r0,80050e0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 8005380: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005384: d8 40 00 00 call r2 <== NOT EXECUTED 8005388: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 800538c: e3 ff ff 55 bi 80050e0 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 8005390: 29 81 00 08 lw r1,(r12+8) <== NOT EXECUTED 8005394: 29 64 00 cc lw r4,(r11+204) <== NOT EXECUTED 8005398: 58 24 00 00 sw (r1+0),r4 <== NOT EXECUTED break; 800539c: e3 ff ff 51 bi 80050e0 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 80053a0: 29 62 00 30 lw r2,(r11+48) 80053a4: 29 81 00 08 lw r1,(r12+8) 80053a8: 58 22 00 00 sw (r1+0),r2 80053ac: 29 64 00 34 lw r4,(r11+52) 80053b0: 58 24 00 04 sw (r1+4),r4 80053b4: 29 62 00 38 lw r2,(r11+56) 80053b8: 58 22 00 08 sw (r1+8),r2 80053bc: 29 64 00 3c lw r4,(r11+60) 80053c0: 58 24 00 0c sw (r1+12),r4 80053c4: 29 62 00 40 lw r2,(r11+64) 80053c8: 58 22 00 10 sw (r1+16),r2 80053cc: 29 64 00 44 lw r4,(r11+68) 80053d0: 58 24 00 14 sw (r1+20),r4 80053d4: 29 62 00 48 lw r2,(r11+72) 80053d8: 58 22 00 18 sw (r1+24),r2 80053dc: 29 64 00 4c lw r4,(r11+76) 80053e0: 58 24 00 1c sw (r1+28),r4 80053e4: 29 62 00 50 lw r2,(r11+80) 80053e8: 58 22 00 20 sw (r1+32),r2 break; 80053ec: e3 ff ff 3d bi 80050e0 if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 80053f0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80053f4: fb ff fd fd calli 8004be8 <== NOT EXECUTED break; 80053f8: e3 ff ff 3a bi 80050e0 <== NOT EXECUTED 80053fc: 29 62 00 38 lw r2,(r11+56) 8005400: e3 ff ff 9c bi 8005270 rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 8005404: 29 63 00 7c lw r3,(r11+124) <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 8005408: 29 62 00 84 lw r2,(r11+132) <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 800540c: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8005410: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8005414: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED 8005418: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 800541c: d8 80 00 00 call r4 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 8005420: d0 0e 00 00 wcsr IE,r14 <== NOT EXECUTED 8005424: e3 ff ff 70 bi 80051e4 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 8005428: 41 6f 00 46 lbu r15,(r11+70) <== NOT EXECUTED 800542c: f8 00 03 12 calli 8006074 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 8005430: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8005434: f8 00 72 f4 calli 8022004 <__mulsi3> <== NOT EXECUTED 8005438: 34 02 00 0a mvi r2,10 <== NOT EXECUTED 800543c: f8 00 73 71 calli 8022200 <__udivsi3> <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 8005440: 41 62 00 46 lbu r2,(r11+70) <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 8005444: 59 61 00 54 sw (r11+84),r1 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 8005448: 44 4e 00 07 be r2,r14,8005464 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 800544c: 41 62 00 47 lbu r2,(r11+71) <== NOT EXECUTED } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 8005450: 59 6e 00 6c sw (r11+108),r14 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 8005454: 59 61 00 70 sw (r11+112),r1 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 8005458: 44 40 00 09 be r2,r0,800547c <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 800545c: 59 6e 00 74 sw (r11+116),r14 <== NOT EXECUTED 8005460: e3 ff ff 9a bi 80052c8 <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 8005464: 41 61 00 47 lbu r1,(r11+71) <== NOT EXECUTED 8005468: 44 22 00 07 be r1,r2,8005484 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 800546c: 59 62 00 74 sw (r11+116),r2 <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 8005470: 59 62 00 6c sw (r11+108),r2 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 8005474: 59 62 00 70 sw (r11+112),r2 <== NOT EXECUTED 8005478: e3 ff ff 94 bi 80052c8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 800547c: 59 61 00 74 sw (r11+116),r1 <== NOT EXECUTED 8005480: e3 ff ff 92 bi 80052c8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 8005484: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8005488: 59 61 00 6c sw (r11+108),r1 <== NOT EXECUTED 800548c: e3 ff ff 8f bi 80052c8 <== NOT EXECUTED 08003ab4 : int32_t baud ) { int termios_baud; switch (baud) { 8003ab4: 34 03 04 b0 mvi r3,1200 case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; 8003ab8: 34 02 00 09 mvi r2,9 int32_t baud ) { int termios_baud; switch (baud) { 8003abc: 44 23 00 0d be r1,r3,8003af0 8003ac0: 48 23 00 0e bg r1,r3,8003af8 8003ac4: 34 03 00 86 mvi r3,134 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; 8003ac8: 34 02 00 04 mvi r2,4 int32_t baud ) { int termios_baud; switch (baud) { 8003acc: 44 23 00 09 be r1,r3,8003af0 8003ad0: 48 23 00 24 bg r1,r3,8003b60 8003ad4: 34 03 00 32 mvi r3,50 8003ad8: 34 02 00 01 mvi r2,1 8003adc: 44 23 00 05 be r1,r3,8003af0 8003ae0: 48 23 00 2f bg r1,r3,8003b9c 8003ae4: b8 20 10 00 mv r2,r1 8003ae8: 44 20 00 02 be r1,r0,8003af0 case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 8003aec: 34 02 ff ff mvi r2,-1 default: termios_baud = -1; break; } return termios_baud; } 8003af0: b8 40 08 00 mv r1,r2 8003af4: c3 a0 00 00 ret int32_t baud ) { int termios_baud; switch (baud) { 8003af8: 34 03 4b 00 mvi r3,19200 case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; 8003afc: 34 02 00 0e mvi r2,14 int32_t baud ) { int termios_baud; switch (baud) { 8003b00: 44 23 ff fc be r1,r3,8003af0 8003b04: 48 23 00 0a bg r1,r3,8003b2c 8003b08: 34 03 09 60 mvi r3,2400 case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; 8003b0c: 34 02 00 0b mvi r2,11 int32_t baud ) { int termios_baud; switch (baud) { 8003b10: 44 23 ff f8 be r1,r3,8003af0 8003b14: 48 23 00 32 bg r1,r3,8003bdc 8003b18: 34 03 07 08 mvi r3,1800 case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; 8003b1c: 34 02 00 0a mvi r2,10 int32_t baud ) { int termios_baud; switch (baud) { 8003b20: 44 23 ff f4 be r1,r3,8003af0 case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 8003b24: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8003b28: e3 ff ff f2 bi 8003af0 <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 8003b2c: 78 03 00 01 mvhi r3,0x1 8003b30: 38 63 c2 00 ori r3,r3,0xc200 case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; 8003b34: 34 02 10 02 mvi r2,4098 int32_t baud ) { int termios_baud; switch (baud) { 8003b38: 44 23 ff ee be r1,r3,8003af0 8003b3c: 48 23 00 1f bg r1,r3,8003bb8 8003b40: 38 03 96 00 mvu r3,0x9600 case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; 8003b44: 34 02 00 0f mvi r2,15 int32_t baud ) { int termios_baud; switch (baud) { 8003b48: 44 23 ff ea be r1,r3,8003af0 8003b4c: 38 03 e1 00 mvu r3,0xe100 case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; 8003b50: 34 02 10 01 mvi r2,4097 int32_t baud ) { int termios_baud; switch (baud) { 8003b54: 44 23 ff e7 be r1,r3,8003af0 case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 8003b58: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED 8003b5c: e3 ff ff e5 bi 8003af0 <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 8003b60: 34 03 00 c8 mvi r3,200 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; 8003b64: 34 02 00 06 mvi r2,6 int32_t baud ) { int termios_baud; switch (baud) { 8003b68: 44 23 ff e2 be r1,r3,8003af0 8003b6c: 48 23 00 05 bg r1,r3,8003b80 8003b70: 34 03 00 96 mvi r3,150 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; 8003b74: 34 02 00 05 mvi r2,5 int32_t baud ) { int termios_baud; switch (baud) { 8003b78: 5c 23 ff dd bne r1,r3,8003aec 8003b7c: e3 ff ff dd bi 8003af0 8003b80: 34 03 01 2c mvi r3,300 case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; 8003b84: 34 02 00 07 mvi r2,7 int32_t baud ) { int termios_baud; switch (baud) { 8003b88: 44 23 ff da be r1,r3,8003af0 8003b8c: 34 03 02 58 mvi r3,600 case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; 8003b90: 34 02 00 08 mvi r2,8 int32_t baud ) { int termios_baud; switch (baud) { 8003b94: 5c 23 ff d6 bne r1,r3,8003aec 8003b98: e3 ff ff d6 bi 8003af0 8003b9c: 34 03 00 4b mvi r3,75 8003ba0: 34 02 00 02 mvi r2,2 8003ba4: 44 23 ff d3 be r1,r3,8003af0 8003ba8: 34 03 00 6e mvi r3,110 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 8003bac: 34 02 00 03 mvi r2,3 int32_t baud ) { int termios_baud; switch (baud) { 8003bb0: 5c 23 ff cf bne r1,r3,8003aec 8003bb4: e3 ff ff cf bi 8003af0 8003bb8: 78 03 00 03 mvhi r3,0x3 8003bbc: 38 63 84 00 ori r3,r3,0x8400 case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; 8003bc0: 34 02 10 03 mvi r2,4099 int32_t baud ) { int termios_baud; switch (baud) { 8003bc4: 44 23 ff cb be r1,r3,8003af0 8003bc8: 78 03 00 07 mvhi r3,0x7 8003bcc: 38 63 08 00 ori r3,r3,0x800 case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; 8003bd0: 34 02 10 04 mvi r2,4100 int32_t baud ) { int termios_baud; switch (baud) { 8003bd4: 5c 23 ff c6 bne r1,r3,8003aec 8003bd8: e3 ff ff c6 bi 8003af0 8003bdc: 34 03 12 c0 mvi r3,4800 case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; 8003be0: 34 02 00 0c mvi r2,12 int32_t baud ) { int termios_baud; switch (baud) { 8003be4: 44 23 ff c3 be r1,r3,8003af0 8003be8: 34 03 25 80 mvi r3,9600 case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; 8003bec: 34 02 00 0d mvi r2,13 int32_t baud ) { int termios_baud; switch (baud) { 8003bf0: 5c 23 ff bf bne r1,r3,8003aec 8003bf4: e3 ff ff bf bi 8003af0 0800566c : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 800566c: 37 9c ff c4 addi sp,sp,-60 8005670: 5b 8b 00 3c sw (sp+60),r11 8005674: 5b 8c 00 38 sw (sp+56),r12 8005678: 5b 8d 00 34 sw (sp+52),r13 800567c: 5b 8e 00 30 sw (sp+48),r14 8005680: 5b 8f 00 2c sw (sp+44),r15 8005684: 5b 90 00 28 sw (sp+40),r16 8005688: 5b 91 00 24 sw (sp+36),r17 800568c: 5b 92 00 20 sw (sp+32),r18 8005690: 5b 93 00 1c sw (sp+28),r19 8005694: 5b 94 00 18 sw (sp+24),r20 8005698: 5b 95 00 14 sw (sp+20),r21 800569c: 5b 96 00 10 sw (sp+16),r22 80056a0: 5b 97 00 0c sw (sp+12),r23 80056a4: 5b 98 00 08 sw (sp+8),r24 80056a8: 5b 9d 00 04 sw (sp+4),ra struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 80056ac: 78 0d 08 02 mvhi r13,0x802 80056b0: 39 ad 69 c4 ori r13,r13,0x69c4 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 80056b4: b8 20 60 00 mv r12,r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 80056b8: 29 a1 00 00 lw r1,(r13+0) rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 80056bc: b8 40 78 00 mv r15,r2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 80056c0: 34 02 00 00 mvi r2,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 80056c4: b8 60 90 00 mv r18,r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 80056c8: b8 40 18 00 mv r3,r2 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 80056cc: b8 80 98 00 mv r19,r4 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 80056d0: f8 00 04 7a calli 80068b8 80056d4: b8 20 70 00 mv r14,r1 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 80056d8: 5c 20 00 1d bne r1,r0,800574c return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 80056dc: 78 10 08 02 mvhi r16,0x802 80056e0: 3a 10 69 cc ori r16,r16,0x69cc 80056e4: 2a 0b 00 00 lw r11,(r16+0) 80056e8: 5d 61 00 04 bne r11,r1,80056f8 80056ec: e0 00 00 38 bi 80057cc 80056f0: 29 6b 00 00 lw r11,(r11+0) <== NOT EXECUTED 80056f4: 45 60 00 36 be r11,r0,80057cc <== NOT EXECUTED if ((tty->major == major) && (tty->minor == minor)) 80056f8: 29 65 00 0c lw r5,(r11+12) <== NOT EXECUTED 80056fc: 5c ac ff fd bne r5,r12,80056f0 <== NOT EXECUTED 8005700: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8005704: 5c 2f ff fb bne r1,r15,80056f0 <== NOT EXECUTED if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { 8005708: 29 62 00 08 lw r2,(r11+8) */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 800570c: 2a 43 00 00 lw r3,(r18+0) if (!tty->refcount++) { 8005710: 34 41 00 01 addi r1,r2,1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 8005714: 58 6b 00 38 sw (r3+56),r11 if (!tty->refcount++) { 8005718: 59 61 00 08 sw (r11+8),r1 800571c: 5c 40 00 0a bne r2,r0,8005744 if (tty->device.firstOpen) 8005720: 29 64 00 98 lw r4,(r11+152) 8005724: 44 82 00 05 be r4,r2,8005738 (*tty->device.firstOpen)(major, minor, arg); 8005728: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 800572c: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8005730: ba 40 18 00 mv r3,r18 <== NOT EXECUTED 8005734: d8 80 00 00 call r4 <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 8005738: 29 62 00 b4 lw r2,(r11+180) 800573c: 34 01 00 02 mvi r1,2 8005740: 44 41 00 15 be r2,r1,8005794 (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 8005744: 29 a1 00 00 lw r1,(r13+0) 8005748: f8 00 04 bd calli 8006a3c return RTEMS_SUCCESSFUL; } 800574c: b9 c0 08 00 mv r1,r14 8005750: 2b 9d 00 04 lw ra,(sp+4) 8005754: 2b 8b 00 3c lw r11,(sp+60) 8005758: 2b 8c 00 38 lw r12,(sp+56) 800575c: 2b 8d 00 34 lw r13,(sp+52) 8005760: 2b 8e 00 30 lw r14,(sp+48) 8005764: 2b 8f 00 2c lw r15,(sp+44) 8005768: 2b 90 00 28 lw r16,(sp+40) 800576c: 2b 91 00 24 lw r17,(sp+36) 8005770: 2b 92 00 20 lw r18,(sp+32) 8005774: 2b 93 00 1c lw r19,(sp+28) 8005778: 2b 94 00 18 lw r20,(sp+24) 800577c: 2b 95 00 14 lw r21,(sp+20) 8005780: 2b 96 00 10 lw r22,(sp+16) 8005784: 2b 97 00 0c lw r23,(sp+12) 8005788: 2b 98 00 08 lw r24,(sp+8) 800578c: 37 9c 00 3c addi sp,sp,60 8005790: c3 a0 00 00 ret (*tty->device.firstOpen)(major, minor, arg); /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start(tty->rxTaskId, 8005794: 29 61 00 c4 lw r1,(r11+196) <== NOT EXECUTED 8005798: 78 02 08 00 mvhi r2,0x800 <== NOT EXECUTED 800579c: 38 42 5b b8 ori r2,r2,0x5bb8 <== NOT EXECUTED 80057a0: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 80057a4: f8 00 05 ae calli 8006e5c <== NOT EXECUTED 80057a8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 80057ac: 5c 20 00 c0 bne r1,r0,8005aac <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 80057b0: 29 61 00 c8 lw r1,(r11+200) <== NOT EXECUTED 80057b4: 78 02 08 00 mvhi r2,0x800 <== NOT EXECUTED 80057b8: 38 42 5b 2c ori r2,r2,0x5b2c <== NOT EXECUTED 80057bc: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 80057c0: f8 00 05 a7 calli 8006e5c <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 80057c4: 44 2c ff e0 be r1,r12,8005744 <== NOT EXECUTED 80057c8: e0 00 00 b9 bi 8005aac <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 80057cc: 34 01 00 01 mvi r1,1 80057d0: 34 02 00 e8 mvi r2,232 80057d4: f8 00 1c 24 calli 800c864 if (tty == NULL) { 80057d8: 34 14 00 00 mvi r20,0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 80057dc: b8 20 88 00 mv r17,r1 80057e0: b8 20 58 00 mv r11,r1 if (tty == NULL) { 80057e4: 44 34 00 9c be r1,r20,8005a54 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 80057e8: 78 01 08 02 mvhi r1,0x802 80057ec: 38 21 62 38 ori r1,r1,0x6238 80057f0: 28 21 00 00 lw r1,(r1+0) 80057f4: 5a 21 00 64 sw (r17+100),r1 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 80057f8: 2a 21 00 64 lw r1,(r17+100) 80057fc: f8 00 1d 4b calli 800cd28 8005800: 5a 21 00 58 sw (r17+88),r1 if (tty->rawInBuf.theBuf == NULL) { 8005804: 44 20 00 92 be r1,r0,8005a4c return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 8005808: 78 01 08 02 mvhi r1,0x802 800580c: 38 21 62 3c ori r1,r1,0x623c 8005810: 28 21 00 00 lw r1,(r1+0) 8005814: 5a 21 00 88 sw (r17+136),r1 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 8005818: 2a 21 00 88 lw r1,(r17+136) 800581c: f8 00 1d 43 calli 800cd28 8005820: 5a 21 00 7c sw (r17+124),r1 if (tty->rawOutBuf.theBuf == NULL) { 8005824: 44 20 00 90 be r1,r0,8005a64 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 8005828: 78 01 08 02 mvhi r1,0x802 800582c: 38 21 62 34 ori r1,r1,0x6234 8005830: 28 21 00 00 lw r1,(r1+0) 8005834: f8 00 1d 3d calli 800cd28 8005838: 5a 21 00 1c sw (r17+28),r1 if (tty->cbuf == NULL) { 800583c: 44 20 00 9d be r1,r0,8005ab0 tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 8005840: 2a 01 00 00 lw r1,(r16+0) return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 8005844: 5a 34 00 d4 sw (r17+212),r20 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 8005848: 5a 34 00 04 sw (r17+4),r20 } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; tty->tty_snd.sw_arg = NULL; 800584c: 5a 34 00 d8 sw (r17+216),r20 tty->tty_rcv.sw_pfn = NULL; 8005850: 5a 34 00 dc sw (r17+220),r20 tty->tty_rcv.sw_arg = NULL; 8005854: 5a 34 00 e0 sw (r17+224),r20 tty->tty_rcvwakeup = 0; 8005858: 5a 34 00 e4 sw (r17+228),r20 /* * link tty */ tty->forw = rtems_termios_ttyHead; 800585c: 5a 21 00 00 sw (r17+0),r1 tty->back = NULL; if (rtems_termios_ttyHead != NULL) 8005860: 44 20 00 02 be r1,r0,8005868 rtems_termios_ttyHead->back = tty; 8005864: 58 31 00 04 sw (r1+4),r17 <== NOT EXECUTED rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 8005868: 78 01 08 02 mvhi r1,0x802 800586c: 38 21 69 c8 ori r1,r1,0x69c8 8005870: 28 22 00 00 lw r2,(r1+0) */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 8005874: 5a 11 00 00 sw (r16+0),r17 if (rtems_termios_ttyTail == NULL) 8005878: 44 40 00 ab be r2,r0,8005b24 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 800587c: 78 10 08 02 mvhi r16,0x802 8005880: 3a 10 62 40 ori r16,r16,0x6240 8005884: 42 02 00 00 lbu r2,(r16+0) 8005888: 78 01 54 52 mvhi r1,0x5452 800588c: 38 21 69 00 ori r1,r1,0x6900 8005890: b8 41 08 00 or r1,r2,r1 8005894: 34 03 00 54 mvi r3,84 8005898: 34 02 00 01 mvi r2,1 800589c: 34 04 00 00 mvi r4,0 80058a0: 36 25 00 14 addi r5,r17,20 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 80058a4: 5a 2f 00 10 sw (r17+16),r15 tty->major = major; 80058a8: 5a 2c 00 0c sw (r17+12),r12 /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 80058ac: f8 00 03 46 calli 80065c4 80058b0: b8 20 a0 00 mv r20,r1 rtems_build_name ('T', 'R', 'i', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) 80058b4: 5c 20 00 7e bne r1,r0,8005aac rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 80058b8: 42 01 00 00 lbu r1,(r16+0) 80058bc: 78 02 54 52 mvhi r2,0x5452 80058c0: 38 42 6f 00 ori r2,r2,0x6f00 80058c4: b8 22 08 00 or r1,r1,r2 80058c8: 34 03 00 54 mvi r3,84 80058cc: 34 02 00 01 mvi r2,1 80058d0: ba 80 20 00 mv r4,r20 80058d4: 36 25 00 18 addi r5,r17,24 80058d8: f8 00 03 3b calli 80065c4 80058dc: b8 20 a8 00 mv r21,r1 rtems_build_name ('T', 'R', 'o', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) 80058e0: 5c 34 00 73 bne r1,r20,8005aac rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 80058e4: 42 02 00 00 lbu r2,(r16+0) 80058e8: 78 01 54 52 mvhi r1,0x5452 80058ec: 38 21 78 00 ori r1,r1,0x7800 80058f0: b8 41 08 00 or r1,r2,r1 80058f4: 34 03 00 20 mvi r3,32 80058f8: ba a0 10 00 mv r2,r21 80058fc: ba a0 20 00 mv r4,r21 8005900: 36 25 00 8c addi r5,r17,140 8005904: f8 00 03 30 calli 80065c4 8005908: b8 20 a0 00 mv r20,r1 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 800590c: 5c 35 00 68 bne r1,r21,8005aac tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 8005910: 2a 62 00 00 lw r2,(r19+0) 8005914: 2a 61 00 1c lw r1,(r19+28) RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 8005918: 5a 34 00 94 sw (r17+148),r20 /* * Set callbacks */ tty->device = *callbacks; 800591c: 5a 22 00 98 sw (r17+152),r2 8005920: 2a 62 00 04 lw r2,(r19+4) 8005924: 5a 22 00 9c sw (r17+156),r2 8005928: 2a 62 00 08 lw r2,(r19+8) 800592c: 5a 22 00 a0 sw (r17+160),r2 8005930: 2a 62 00 0c lw r2,(r19+12) 8005934: 5a 22 00 a4 sw (r17+164),r2 8005938: 2a 62 00 10 lw r2,(r19+16) 800593c: 5a 22 00 a8 sw (r17+168),r2 8005940: 2a 62 00 14 lw r2,(r19+20) 8005944: 5a 22 00 ac sw (r17+172),r2 8005948: 2a 73 00 18 lw r19,(r19+24) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 800594c: 34 02 00 02 mvi r2,2 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 8005950: 5a 21 00 b4 sw (r17+180),r1 8005954: 5a 33 00 b0 sw (r17+176),r19 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 8005958: 44 22 00 5b be r1,r2,8005ac4 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 800595c: 2a 21 00 a0 lw r1,(r17+160) 8005960: 44 20 00 49 be r1,r0,8005a84 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 8005964: 2a 22 00 b4 lw r2,(r17+180) 8005968: 34 01 00 02 mvi r1,2 800596c: 44 41 00 46 be r2,r1,8005a84 tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 8005970: 34 01 00 00 mvi r1,0 8005974: 5a 21 00 b8 sw (r17+184),r1 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 8005978: 34 18 25 02 mvi r24,9474 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 800597c: 2a 21 00 64 lw r1,(r17+100) } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 8005980: 5a 38 00 30 sw (r17+48),r24 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 8005984: 34 18 18 05 mvi r24,6149 8005988: 5a 38 00 34 sw (r17+52),r24 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 800598c: 34 18 08 bd mvi r24,2237 tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 8005990: 34 03 00 00 mvi r3,0 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 8005994: 34 0a 00 11 mvi r10,17 tty->termios.c_cc[VSTOP] = '\023'; 8005998: 34 09 00 13 mvi r9,19 tty->termios.c_cc[VSUSP] = '\032'; 800599c: 34 08 00 1a mvi r8,26 tty->termios.c_cc[VREPRINT] = '\022'; 80059a0: 34 07 00 12 mvi r7,18 tty->termios.c_cc[VDISCARD] = '\017'; 80059a4: 34 06 00 0f mvi r6,15 tty->termios.c_cc[VWERASE] = '\027'; 80059a8: 34 05 00 17 mvi r5,23 tty->termios.c_cc[VLNEXT] = '\026'; 80059ac: 34 04 00 16 mvi r4,22 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 80059b0: 34 02 00 01 mvi r2,1 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 80059b4: 5a 38 00 38 sw (r17+56),r24 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 80059b8: 34 17 00 03 mvi r23,3 tty->termios.c_cc[VQUIT] = '\034'; 80059bc: 34 16 00 1c mvi r22,28 tty->termios.c_cc[VERASE] = '\177'; 80059c0: 34 15 00 7f mvi r21,127 tty->termios.c_cc[VKILL] = '\025'; 80059c4: 34 14 00 15 mvi r20,21 tty->termios.c_cc[VEOF] = '\004'; 80059c8: 34 13 00 04 mvi r19,4 * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 80059cc: 38 18 82 3b mvu r24,0x823b tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; 80059d0: 32 23 00 51 sb (r17+81),r3 tty->termios.c_cc[VSTART] = '\021'; 80059d4: 32 2a 00 49 sb (r17+73),r10 tty->termios.c_cc[VSTOP] = '\023'; 80059d8: 32 29 00 4a sb (r17+74),r9 tty->termios.c_cc[VSUSP] = '\032'; 80059dc: 32 28 00 4b sb (r17+75),r8 tty->termios.c_cc[VREPRINT] = '\022'; 80059e0: 32 27 00 4d sb (r17+77),r7 tty->termios.c_cc[VDISCARD] = '\017'; 80059e4: 32 26 00 4e sb (r17+78),r6 tty->termios.c_cc[VWERASE] = '\027'; 80059e8: 32 25 00 4f sb (r17+79),r5 tty->termios.c_cc[VLNEXT] = '\026'; 80059ec: 32 24 00 50 sb (r17+80),r4 tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 80059f0: 32 23 00 4c sb (r17+76),r3 * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 80059f4: 5a 38 00 3c sw (r17+60),r24 tty->termios.c_cc[VINTR] = '\003'; 80059f8: 32 37 00 41 sb (r17+65),r23 tty->termios.c_cc[VQUIT] = '\034'; 80059fc: 32 36 00 42 sb (r17+66),r22 tty->termios.c_cc[VERASE] = '\177'; 8005a00: 32 35 00 43 sb (r17+67),r21 tty->termios.c_cc[VKILL] = '\025'; 8005a04: 32 34 00 44 sb (r17+68),r20 tty->termios.c_cc[VEOF] = '\004'; 8005a08: 32 33 00 45 sb (r17+69),r19 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 8005a0c: fb ff ee d4 calli 800155c <__lshrsi3> tty->highwater = tty->rawInBuf.Size * 3/4; 8005a10: 2a 23 00 64 lw r3,(r17+100) /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 8005a14: 5a 21 00 bc sw (r17+188),r1 tty->highwater = tty->rawInBuf.Size * 3/4; 8005a18: 34 02 00 02 mvi r2,2 8005a1c: b4 63 08 00 add r1,r3,r3 8005a20: b4 23 08 00 add r1,r1,r3 8005a24: fb ff ee ce calli 800155c <__lshrsi3> /* * Bump name characer */ if (c++ == 'z') 8005a28: 42 02 00 00 lbu r2,(r16+0) tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 8005a2c: 5a 21 00 c0 sw (r17+192),r1 /* * Bump name characer */ if (c++ == 'z') 8005a30: 34 41 00 01 addi r1,r2,1 8005a34: 32 01 00 00 sb (r16+0),r1 8005a38: 34 01 00 7a mvi r1,122 8005a3c: 5c 41 ff 33 bne r2,r1,8005708 c = 'a'; 8005a40: 34 01 00 61 mvi r1,97 <== NOT EXECUTED 8005a44: 32 01 00 00 sb (r16+0),r1 <== NOT EXECUTED 8005a48: e3 ff ff 30 bi 8005708 <== NOT EXECUTED * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 8005a4c: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8005a50: f8 00 1b a4 calli 800c8e0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 8005a54: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 8005a58: 34 0e 00 1a mvi r14,26 <== NOT EXECUTED 8005a5c: f8 00 03 f8 calli 8006a3c <== NOT EXECUTED return RTEMS_NO_MEMORY; 8005a60: e3 ff ff 3b bi 800574c <== NOT EXECUTED * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); 8005a64: 2a 21 00 58 lw r1,(r17+88) <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 8005a68: 34 0e 00 1a mvi r14,26 <== NOT EXECUTED * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); free((void *)(tty->rawInBuf.theBuf)); 8005a6c: f8 00 1b 9d calli 800c8e0 <== NOT EXECUTED free(tty); 8005a70: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8005a74: f8 00 1b 9b calli 800c8e0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 8005a78: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 8005a7c: f8 00 03 f0 calli 8006a3c <== NOT EXECUTED return RTEMS_NO_MEMORY; 8005a80: e3 ff ff 33 bi 800574c <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 8005a84: 42 03 00 00 lbu r3,(r16+0) <== NOT EXECUTED 8005a88: 78 01 54 52 mvhi r1,0x5452 <== NOT EXECUTED 8005a8c: 38 21 72 00 ori r1,r1,0x7200 <== NOT EXECUTED 8005a90: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8005a94: b8 61 08 00 or r1,r3,r1 <== NOT EXECUTED 8005a98: b8 40 20 00 mv r4,r2 <== NOT EXECUTED 8005a9c: 34 03 00 24 mvi r3,36 <== NOT EXECUTED 8005aa0: 36 25 00 68 addi r5,r17,104 <== NOT EXECUTED 8005aa4: f8 00 02 c8 calli 80065c4 <== NOT EXECUTED rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 8005aa8: 44 20 ff b2 be r1,r0,8005970 <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 8005aac: f8 00 05 b0 calli 800716c <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 8005ab0: 2a 21 00 7c lw r1,(r17+124) <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 8005ab4: 34 0e 00 1a mvi r14,26 <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 8005ab8: f8 00 1b 8a calli 800c8e0 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 8005abc: 2a 21 00 58 lw r1,(r17+88) <== NOT EXECUTED 8005ac0: e3 ff ff eb bi 8005a6c <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 8005ac4: 42 02 00 00 lbu r2,(r16+0) <== NOT EXECUTED 8005ac8: 78 01 54 78 mvhi r1,0x5478 <== NOT EXECUTED 8005acc: 38 21 54 00 ori r1,r1,0x5400 <== NOT EXECUTED 8005ad0: b8 41 08 00 or r1,r2,r1 <== NOT EXECUTED 8005ad4: 34 03 04 00 mvi r3,1024 <== NOT EXECUTED 8005ad8: 34 02 00 0a mvi r2,10 <== NOT EXECUTED 8005adc: 34 04 05 00 mvi r4,1280 <== NOT EXECUTED 8005ae0: ba 80 28 00 mv r5,r20 <== NOT EXECUTED 8005ae4: 36 26 00 c8 addi r6,r17,200 <== NOT EXECUTED 8005ae8: f8 00 04 1e calli 8006b60 <== NOT EXECUTED 8005aec: b8 20 98 00 mv r19,r1 <== NOT EXECUTED TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 8005af0: 5c 34 ff ef bne r1,r20,8005aac <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 8005af4: 42 01 00 00 lbu r1,(r16+0) <== NOT EXECUTED 8005af8: 78 02 52 78 mvhi r2,0x5278 <== NOT EXECUTED 8005afc: 38 42 54 00 ori r2,r2,0x5400 <== NOT EXECUTED 8005b00: b8 22 08 00 or r1,r1,r2 <== NOT EXECUTED 8005b04: 34 03 04 00 mvi r3,1024 <== NOT EXECUTED 8005b08: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8005b0c: 34 04 05 00 mvi r4,1280 <== NOT EXECUTED 8005b10: ba 60 28 00 mv r5,r19 <== NOT EXECUTED 8005b14: 36 26 00 c4 addi r6,r17,196 <== NOT EXECUTED 8005b18: f8 00 04 12 calli 8006b60 <== NOT EXECUTED TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 8005b1c: 44 33 ff 90 be r1,r19,800595c <== NOT EXECUTED 8005b20: e3 ff ff e3 bi 8005aac <== NOT EXECUTED tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; 8005b24: 58 31 00 00 sw (r1+0),r17 8005b28: e3 ff ff 55 bi 800587c 0800428c : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 800428c: 37 9c ff d8 addi sp,sp,-40 <== NOT EXECUTED 8004290: 5b 8b 00 28 sw (sp+40),r11 <== NOT EXECUTED 8004294: 5b 8c 00 24 sw (sp+36),r12 <== NOT EXECUTED 8004298: 5b 8d 00 20 sw (sp+32),r13 <== NOT EXECUTED 800429c: 5b 8e 00 1c sw (sp+28),r14 <== NOT EXECUTED 80042a0: 5b 8f 00 18 sw (sp+24),r15 <== NOT EXECUTED 80042a4: 5b 90 00 14 sw (sp+20),r16 <== NOT EXECUTED 80042a8: 5b 91 00 10 sw (sp+16),r17 <== NOT EXECUTED 80042ac: 5b 92 00 0c sw (sp+12),r18 <== NOT EXECUTED 80042b0: 5b 93 00 08 sw (sp+8),r19 <== NOT EXECUTED 80042b4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 80042b8: 28 64 00 b4 lw r4,(r3+180) <== NOT EXECUTED * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 80042bc: b8 60 58 00 mv r11,r3 <== NOT EXECUTED 80042c0: b8 40 80 00 mv r16,r2 <== NOT EXECUTED 80042c4: b8 20 18 00 mv r3,r1 <== NOT EXECUTED const unsigned char *buf = _buf; 80042c8: b8 20 88 00 mv r17,r1 <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 80042cc: 44 80 00 39 be r4,r0,80043b0 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 80042d0: 29 6f 00 80 lw r15,(r11+128) <== NOT EXECUTED while (len) { 80042d4: 44 40 00 3c be r2,r0,80043c4 <== NOT EXECUTED * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); 80042d8: 34 0d ff fe mvi r13,-2 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; 80042dc: 34 0e 00 02 mvi r14,2 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 80042e0: 34 13 00 01 mvi r19,1 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 80042e4: 29 62 00 88 lw r2,(r11+136) <== NOT EXECUTED 80042e8: 35 e1 00 01 addi r1,r15,1 <== NOT EXECUTED 80042ec: f8 00 77 d5 calli 8022240 <__umodsi3> <== NOT EXECUTED 80042f0: b8 20 78 00 mv r15,r1 <== NOT EXECUTED rtems_interrupt_disable (level); 80042f4: 90 00 20 00 rcsr r4,IE <== NOT EXECUTED 80042f8: a0 8d 08 00 and r1,r4,r13 <== NOT EXECUTED 80042fc: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { 8004300: 29 6c 00 84 lw r12,(r11+132) <== NOT EXECUTED 8004304: b8 80 90 00 mv r18,r4 <== NOT EXECUTED 8004308: 5d 8f 00 0e bne r12,r15,8004340 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 800430c: 59 6e 00 94 sw (r11+148),r14 <== NOT EXECUTED rtems_interrupt_enable (level); 8004310: d0 04 00 00 wcsr IE,r4 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 8004314: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED 8004318: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800431c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 8004320: f8 00 09 66 calli 80068b8 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 8004324: 5c 20 00 34 bne r1,r0,80043f4 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 8004328: 90 00 20 00 rcsr r4,IE <== NOT EXECUTED 800432c: a0 8d 28 00 and r5,r4,r13 <== NOT EXECUTED 8004330: d0 05 00 00 wcsr IE,r5 <== NOT EXECUTED * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 8004334: 29 65 00 84 lw r5,(r11+132) <== NOT EXECUTED 8004338: 44 ac ff f5 be r5,r12,800430c <== NOT EXECUTED 800433c: b8 80 90 00 mv r18,r4 <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 8004340: 29 61 00 80 lw r1,(r11+128) <== NOT EXECUTED 8004344: 29 62 00 7c lw r2,(r11+124) <== NOT EXECUTED 8004348: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 800434c: 42 22 00 00 lbu r2,(r17+0) <== NOT EXECUTED 8004350: 30 22 00 00 sb (r1+0),r2 <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 8004354: 29 61 00 94 lw r1,(r11+148) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; 8004358: 59 6f 00 80 sw (r11+128),r15 <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 800435c: 5c 20 00 08 bne r1,r0,800437c <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 8004360: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8004364: 20 42 00 10 andi r2,r2,0x10 <== NOT EXECUTED 8004368: 44 41 00 0a be r2,r1,8004390 <== NOT EXECUTED (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 800436c: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004370: 38 21 00 20 ori r1,r1,0x20 <== NOT EXECUTED 8004374: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 8004378: 59 73 00 94 sw (r11+148),r19 <== NOT EXECUTED } rtems_interrupt_enable (level); 800437c: d0 12 00 00 wcsr IE,r18 <== NOT EXECUTED len--; 8004380: 36 10 ff ff addi r16,r16,-1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 8004384: 46 00 00 10 be r16,r0,80043c4 <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 8004388: 36 31 00 01 addi r17,r17,1 <== NOT EXECUTED 800438c: e3 ff ff d6 bi 80042e4 <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, 8004390: 29 63 00 7c lw r3,(r11+124) <== NOT EXECUTED (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 8004394: 29 62 00 84 lw r2,(r11+132) <== NOT EXECUTED tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, 8004398: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 800439c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 80043a0: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED 80043a4: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 80043a8: d8 80 00 00 call r4 <== NOT EXECUTED 80043ac: e3 ff ff f3 bi 8004378 <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 80043b0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 80043b4: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 80043b8: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 80043bc: ba 00 18 00 mv r3,r16 <== NOT EXECUTED 80043c0: d8 80 00 00 call r4 <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 80043c4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80043c8: 2b 8b 00 28 lw r11,(sp+40) <== NOT EXECUTED 80043cc: 2b 8c 00 24 lw r12,(sp+36) <== NOT EXECUTED 80043d0: 2b 8d 00 20 lw r13,(sp+32) <== NOT EXECUTED 80043d4: 2b 8e 00 1c lw r14,(sp+28) <== NOT EXECUTED 80043d8: 2b 8f 00 18 lw r15,(sp+24) <== NOT EXECUTED 80043dc: 2b 90 00 14 lw r16,(sp+20) <== NOT EXECUTED 80043e0: 2b 91 00 10 lw r17,(sp+16) <== NOT EXECUTED 80043e4: 2b 92 00 0c lw r18,(sp+12) <== NOT EXECUTED 80043e8: 2b 93 00 08 lw r19,(sp+8) <== NOT EXECUTED 80043ec: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED 80043f0: c3 a0 00 00 ret <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 80043f4: f8 00 0b 5e calli 800716c <== NOT EXECUTED 08004c88 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 8004c88: 37 9c ff cc addi sp,sp,-52 <== NOT EXECUTED 8004c8c: 5b 8b 00 34 sw (sp+52),r11 <== NOT EXECUTED 8004c90: 5b 8c 00 30 sw (sp+48),r12 <== NOT EXECUTED 8004c94: 5b 8d 00 2c sw (sp+44),r13 <== NOT EXECUTED 8004c98: 5b 8e 00 28 sw (sp+40),r14 <== NOT EXECUTED 8004c9c: 5b 8f 00 24 sw (sp+36),r15 <== NOT EXECUTED 8004ca0: 5b 90 00 20 sw (sp+32),r16 <== NOT EXECUTED 8004ca4: 5b 91 00 1c sw (sp+28),r17 <== NOT EXECUTED 8004ca8: 5b 92 00 18 sw (sp+24),r18 <== NOT EXECUTED 8004cac: 5b 93 00 14 sw (sp+20),r19 <== NOT EXECUTED 8004cb0: 5b 94 00 10 sw (sp+16),r20 <== NOT EXECUTED 8004cb4: 5b 95 00 0c sw (sp+12),r21 <== NOT EXECUTED 8004cb8: 5b 96 00 08 sw (sp+8),r22 <== NOT EXECUTED 8004cbc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8004cc0: b8 20 80 00 mv r16,r1 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8004cc4: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8004cc8: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8004ccc: b8 40 18 00 mv r3,r2 <== NOT EXECUTED rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8004cd0: 28 2b 00 38 lw r11,(r1+56) <== NOT EXECUTED uint32_t count = args->count; 8004cd4: 2a 0e 00 14 lw r14,(r16+20) <== NOT EXECUTED char *buffer = args->buffer; 8004cd8: 2a 0f 00 10 lw r15,(r16+16) <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8004cdc: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 8004ce0: f8 00 06 f6 calli 80068b8 <== NOT EXECUTED 8004ce4: b8 20 88 00 mv r17,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 8004ce8: 5c 20 00 14 bne r1,r0,8004d38 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 8004cec: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 8004cf0: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8004cf4: 78 0c 08 02 mvhi r12,0x802 <== NOT EXECUTED 8004cf8: fb ff f1 f1 calli 80014bc <__ashlsi3> <== NOT EXECUTED 8004cfc: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 8004d00: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8004d04: fb ff f1 ee calli 80014bc <__ashlsi3> <== NOT EXECUTED 8004d08: 39 8c 67 f8 ori r12,r12,0x67f8 <== NOT EXECUTED 8004d0c: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 8004d10: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 8004d14: 44 71 00 19 be r3,r17,8004d78 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 8004d18: ba 00 10 00 mv r2,r16 <== NOT EXECUTED 8004d1c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8004d20: d8 60 00 00 call r3 <== NOT EXECUTED 8004d24: b8 20 88 00 mv r17,r1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 8004d28: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); tty->tty_rcvwakeup = 0; 8004d2c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8004d30: 59 62 00 e4 sw (r11+228),r2 <== NOT EXECUTED rtems_semaphore_release (tty->isem); 8004d34: f8 00 07 42 calli 8006a3c <== NOT EXECUTED } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 8004d38: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8004d3c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004d40: 2b 8b 00 34 lw r11,(sp+52) <== NOT EXECUTED 8004d44: 2b 8c 00 30 lw r12,(sp+48) <== NOT EXECUTED 8004d48: 2b 8d 00 2c lw r13,(sp+44) <== NOT EXECUTED 8004d4c: 2b 8e 00 28 lw r14,(sp+40) <== NOT EXECUTED 8004d50: 2b 8f 00 24 lw r15,(sp+36) <== NOT EXECUTED 8004d54: 2b 90 00 20 lw r16,(sp+32) <== NOT EXECUTED 8004d58: 2b 91 00 1c lw r17,(sp+28) <== NOT EXECUTED 8004d5c: 2b 92 00 18 lw r18,(sp+24) <== NOT EXECUTED 8004d60: 2b 93 00 14 lw r19,(sp+20) <== NOT EXECUTED 8004d64: 2b 94 00 10 lw r20,(sp+16) <== NOT EXECUTED 8004d68: 2b 95 00 0c lw r21,(sp+12) <== NOT EXECUTED 8004d6c: 2b 96 00 08 lw r22,(sp+8) <== NOT EXECUTED 8004d70: 37 9c 00 34 addi sp,sp,52 <== NOT EXECUTED 8004d74: c3 a0 00 00 ret <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 8004d78: 29 62 00 24 lw r2,(r11+36) <== NOT EXECUTED 8004d7c: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 8004d80: 44 41 00 16 be r2,r1,8004dd8 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 8004d84: 45 c0 00 0d be r14,r0,8004db8 <== NOT EXECUTED 8004d88: 29 63 00 24 lw r3,(r11+36) <== NOT EXECUTED 8004d8c: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 8004d90: 4c 61 00 0a bge r3,r1,8004db8 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 8004d94: 29 61 00 1c lw r1,(r11+28) <== NOT EXECUTED count--; 8004d98: 35 ce ff ff addi r14,r14,-1 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 8004d9c: b4 23 08 00 add r1,r1,r3 <== NOT EXECUTED 8004da0: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED 8004da4: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED 8004da8: 31 e1 00 00 sb (r15+0),r1 <== NOT EXECUTED 8004dac: 59 63 00 24 sw (r11+36),r3 <== NOT EXECUTED 8004db0: 35 ef 00 01 addi r15,r15,1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 8004db4: 5d c0 ff f6 bne r14,r0,8004d8c <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 8004db8: 2a 02 00 14 lw r2,(r16+20) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 8004dbc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8004dc0: 59 61 00 e4 sw (r11+228),r1 <== NOT EXECUTED } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 8004dc4: c8 4e 70 00 sub r14,r2,r14 <== NOT EXECUTED 8004dc8: 5a 0e 00 1c sw (r16+28),r14 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 8004dcc: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 8004dd0: f8 00 07 1b calli 8006a3c <== NOT EXECUTED return sc; 8004dd4: e3 ff ff d9 bi 8004d38 <== NOT EXECUTED rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 8004dd8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED if (tty->device.pollRead != NULL && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 8004ddc: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 8004de0: 59 71 00 20 sw (r11+32),r17 <== NOT EXECUTED tty->read_start_column = tty->column; 8004de4: 59 61 00 2c sw (r11+44),r1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 8004de8: 59 71 00 24 sw (r11+36),r17 <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 8004dec: 44 40 00 03 be r2,r0,8004df8 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 8004df0: 29 61 00 b4 lw r1,(r11+180) <== NOT EXECUTED 8004df4: 44 20 00 5a be r1,r0,8004f5c <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 8004df8: 29 6d 00 74 lw r13,(r11+116) <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 8004dfc: 78 0c 08 02 mvhi r12,0x802 <== NOT EXECUTED 8004e00: 39 8c 62 34 ori r12,r12,0x6234 <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 8004e04: 35 76 00 49 addi r22,r11,73 <== NOT EXECUTED 8004e08: 34 12 00 01 mvi r18,1 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 8004e0c: 34 14 ff fe mvi r20,-2 <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 8004e10: 34 13 02 02 mvi r19,514 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 8004e14: 34 15 ff fb mvi r21,-5 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 8004e18: 29 63 00 5c lw r3,(r11+92) <== NOT EXECUTED 8004e1c: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED 8004e20: 44 61 00 05 be r3,r1,8004e34 <== NOT EXECUTED 8004e24: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8004e28: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED 8004e2c: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 8004e30: 48 22 00 08 bg r1,r2,8004e50 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 8004e34: 46 40 ff d4 be r18,r0,8004d84 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 8004e38: 29 61 00 68 lw r1,(r11+104) <== NOT EXECUTED 8004e3c: 29 62 00 6c lw r2,(r11+108) <== NOT EXECUTED 8004e40: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 8004e44: f8 00 06 9d calli 80068b8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 8004e48: 44 20 ff f4 be r1,r0,8004e18 <== NOT EXECUTED 8004e4c: e3 ff ff ce bi 8004d84 <== NOT EXECUTED while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 8004e50: 29 63 00 5c lw r3,(r11+92) <== NOT EXECUTED 8004e54: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 8004e58: 34 61 00 01 addi r1,r3,1 <== NOT EXECUTED 8004e5c: f8 00 74 f9 calli 8022240 <__umodsi3> <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 8004e60: 29 64 00 58 lw r4,(r11+88) <== NOT EXECUTED 8004e64: b4 81 20 00 add r4,r4,r1 <== NOT EXECUTED 8004e68: 40 8d 00 00 lbu r13,(r4+0) <== NOT EXECUTED tty->rawInBuf.Head = newHead; 8004e6c: 59 61 00 5c sw (r11+92),r1 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 8004e70: 29 64 00 60 lw r4,(r11+96) <== NOT EXECUTED 8004e74: 29 65 00 64 lw r5,(r11+100) <== NOT EXECUTED 8004e78: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 8004e7c: b4 a4 20 00 add r4,r5,r4 <== NOT EXECUTED 8004e80: c8 81 08 00 sub r1,r4,r1 <== NOT EXECUTED 8004e84: f8 00 74 ef calli 8022240 <__umodsi3> <== NOT EXECUTED 8004e88: 29 63 00 bc lw r3,(r11+188) <== NOT EXECUTED 8004e8c: 50 23 00 11 bgeu r1,r3,8004ed0 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 8004e90: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8004e94: a0 74 18 00 and r3,r3,r20 <== NOT EXECUTED 8004e98: 59 63 00 b8 sw (r11+184),r3 <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 8004e9c: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8004ea0: 20 63 02 02 andi r3,r3,0x202 <== NOT EXECUTED 8004ea4: 44 73 00 23 be r3,r19,8004f30 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 8004ea8: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8004eac: 20 63 01 00 andi r3,r3,0x100 <== NOT EXECUTED 8004eb0: 44 60 00 08 be r3,r0,8004ed0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 8004eb4: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 8004eb8: 29 63 00 b0 lw r3,(r11+176) <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 8004ebc: a0 35 08 00 and r1,r1,r21 <== NOT EXECUTED 8004ec0: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 8004ec4: 44 60 00 03 be r3,r0,8004ed0 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 8004ec8: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004ecc: d8 60 00 00 call r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 8004ed0: 29 63 00 3c lw r3,(r11+60) <== NOT EXECUTED 8004ed4: 20 63 00 02 andi r3,r3,0x2 <== NOT EXECUTED 8004ed8: 44 60 00 0e be r3,r0,8004f10 <== NOT EXECUTED if (siproc (c, tty)) 8004edc: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8004ee0: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004ee4: fb ff fe db calli 8004a50 <== NOT EXECUTED 8004ee8: 5c 20 00 10 bne r1,r0,8004f28 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 8004eec: 29 65 00 5c lw r5,(r11+92) <== NOT EXECUTED 8004ef0: 29 64 00 60 lw r4,(r11+96) <== NOT EXECUTED else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 8004ef4: 29 6d 00 70 lw r13,(r11+112) <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 8004ef8: 44 a4 ff cf be r5,r4,8004e34 <== NOT EXECUTED 8004efc: 29 84 00 00 lw r4,(r12+0) <== NOT EXECUTED 8004f00: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED 8004f04: 34 84 ff ff addi r4,r4,-1 <== NOT EXECUTED 8004f08: 48 83 ff d2 bg r4,r3,8004e50 <== NOT EXECUTED 8004f0c: e3 ff ff ca bi 8004e34 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 8004f10: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8004f14: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004f18: fb ff fe ce calli 8004a50 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 8004f1c: 41 63 00 47 lbu r3,(r11+71) <== NOT EXECUTED 8004f20: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 8004f24: 48 61 ff f2 bg r3,r1,8004eec <== NOT EXECUTED 8004f28: 34 12 00 00 mvi r18,0 <== NOT EXECUTED 8004f2c: e3 ff ff f0 bi 8004eec <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 8004f30: 29 61 00 94 lw r1,(r11+148) <== NOT EXECUTED 8004f34: 44 20 00 04 be r1,r0,8004f44 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 8004f38: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 8004f3c: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 8004f40: 44 20 ff da be r1,r0,8004ea8 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 8004f44: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8004f48: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004f4c: ba c0 10 00 mv r2,r22 <== NOT EXECUTED 8004f50: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8004f54: d8 80 00 00 call r4 <== NOT EXECUTED 8004f58: e3 ff ff de bi 8004ed0 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 8004f5c: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 8004f60: 20 21 00 02 andi r1,r1,0x2 <== NOT EXECUTED 8004f64: 44 20 00 14 be r1,r0,8004fb4 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 8004f68: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004f6c: d8 40 00 00 call r2 <== NOT EXECUTED 8004f70: b8 20 18 00 mv r3,r1 <== NOT EXECUTED if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 8004f74: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004f78: 20 21 00 ff andi r1,r1,0xff <== NOT EXECUTED int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { 8004f7c: 4c 60 00 21 bge r3,r0,8005000 <== NOT EXECUTED rtems_task_wake_after (1); 8004f80: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8004f84: f8 00 07 e3 calli 8006f10 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 8004f88: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED 8004f8c: e3 ff ff f7 bi 8004f68 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 8004f90: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004f94: 20 21 00 ff andi r1,r1,0xff <== NOT EXECUTED 8004f98: fb ff fe ae calli 8004a50 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 8004f9c: 41 62 00 47 lbu r2,(r11+71) <== NOT EXECUTED 8004fa0: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 8004fa4: 4c 22 ff 78 bge r1,r2,8004d84 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 8004fa8: 44 40 00 05 be r2,r0,8004fbc <== NOT EXECUTED 8004fac: 41 61 00 46 lbu r1,(r11+70) <== NOT EXECUTED 8004fb0: 44 20 00 03 be r1,r0,8004fbc <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 8004fb4: f8 00 04 3b calli 80060a0 <== NOT EXECUTED 8004fb8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 8004fbc: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED 8004fc0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004fc4: d8 40 00 00 call r2 <== NOT EXECUTED if (n < 0) { 8004fc8: 4c 20 ff f2 bge r1,r0,8004f90 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 8004fcc: 41 62 00 47 lbu r2,(r11+71) <== NOT EXECUTED 8004fd0: 44 40 00 10 be r2,r0,8005010 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 8004fd4: 41 61 00 46 lbu r1,(r11+70) <== NOT EXECUTED 8004fd8: 44 20 00 03 be r1,r0,8004fe4 <== NOT EXECUTED 8004fdc: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 8004fe0: 5c 20 00 0e bne r1,r0,8005018 <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 8004fe4: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8004fe8: f8 00 07 ca calli 8006f10 <== NOT EXECUTED } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); 8004fec: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED 8004ff0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004ff4: d8 40 00 00 call r2 <== NOT EXECUTED if (n < 0) { 8004ff8: 4c 20 ff e6 bge r1,r0,8004f90 <== NOT EXECUTED 8004ffc: e3 ff ff f4 bi 8004fcc <== NOT EXECUTED n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 8005000: fb ff fe 94 calli 8004a50 <== NOT EXECUTED 8005004: 5c 20 ff 60 bne r1,r0,8004d84 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 8005008: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED 800500c: e3 ff ff d7 bi 8004f68 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 8005010: 41 61 00 46 lbu r1,(r11+70) <== NOT EXECUTED 8005014: 44 22 ff 5c be r1,r2,8004d84 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 8005018: f8 00 04 22 calli 80060a0 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 800501c: 29 62 00 54 lw r2,(r11+84) <== NOT EXECUTED 8005020: c8 2c 08 00 sub r1,r1,r12 <== NOT EXECUTED 8005024: 54 22 ff 58 bgu r1,r2,8004d84 <== NOT EXECUTED 8005028: e3 ff ff ef bi 8004fe4 <== NOT EXECUTED 08003c44 : * in task-driven mode, this function is called in Tx task context * in interrupt-driven mode, this function is called in TxIRQ context */ int rtems_termios_refill_transmitter (struct rtems_termios_tty *tty) { 8003c44: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8003c48: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8003c4c: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8003c50: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8003c54: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 8003c58: 28 22 00 b8 lw r2,(r1+184) <== NOT EXECUTED * in task-driven mode, this function is called in Tx task context * in interrupt-driven mode, this function is called in TxIRQ context */ int rtems_termios_refill_transmitter (struct rtems_termios_tty *tty) { 8003c5c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 8003c60: 34 01 04 01 mvi r1,1025 <== NOT EXECUTED 8003c64: 20 42 04 03 andi r2,r2,0x403 <== NOT EXECUTED 8003c68: 44 41 00 52 be r2,r1,8003db0 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 8003c6c: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8003c70: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8003c74: 20 42 00 03 andi r2,r2,0x3 <== NOT EXECUTED 8003c78: 44 41 00 66 be r2,r1,8003e10 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 8003c7c: 29 63 00 80 lw r3,(r11+128) <== NOT EXECUTED 8003c80: 29 62 00 84 lw r2,(r11+132) <== NOT EXECUTED 8003c84: 44 62 00 1d be r3,r2,8003cf8 <== NOT EXECUTED rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 8003c88: 90 00 10 00 rcsr r2,IE <== NOT EXECUTED 8003c8c: 34 01 ff fe mvi r1,-2 <== NOT EXECUTED 8003c90: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8003c94: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED len = tty->t_dqlen; tty->t_dqlen = 0; 8003c98: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 8003c9c: 29 63 00 90 lw r3,(r11+144) <== NOT EXECUTED tty->t_dqlen = 0; 8003ca0: 59 61 00 90 sw (r11+144),r1 <== NOT EXECUTED rtems_interrupt_enable(level); 8003ca4: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 8003ca8: 29 61 00 84 lw r1,(r11+132) <== NOT EXECUTED 8003cac: 29 62 00 88 lw r2,(r11+136) <== NOT EXECUTED 8003cb0: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 8003cb4: f8 00 79 63 calli 8022240 <__umodsi3> <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 8003cb8: 29 62 00 94 lw r2,(r11+148) <== NOT EXECUTED rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 8003cbc: b8 20 60 00 mv r12,r1 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; 8003cc0: 59 61 00 84 sw (r11+132),r1 <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 8003cc4: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8003cc8: 44 41 00 37 be r2,r1,8003da4 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 8003ccc: 29 61 00 80 lw r1,(r11+128) <== NOT EXECUTED 8003cd0: 44 2c 00 14 be r1,r12,8003d20 <== NOT EXECUTED if ( tty->tty_snd.sw_pfn != NULL) { (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 8003cd4: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8003cd8: 34 01 02 10 mvi r1,528 <== NOT EXECUTED 8003cdc: 20 42 02 10 andi r2,r2,0x210 <== NOT EXECUTED 8003ce0: 44 41 00 65 be r2,r1,8003e74 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 8003ce4: 29 61 00 80 lw r1,(r11+128) <== NOT EXECUTED 8003ce8: 50 2c 00 1f bgeu r1,r12,8003d64 <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 8003cec: 29 6d 00 88 lw r13,(r11+136) <== NOT EXECUTED 8003cf0: c9 ac 68 00 sub r13,r13,r12 <== NOT EXECUTED 8003cf4: e0 00 00 1e bi 8003d6c <== NOT EXECUTED else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 8003cf8: 29 62 00 94 lw r2,(r11+148) <== NOT EXECUTED 8003cfc: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED 8003d00: 44 41 00 6a be r2,r1,8003ea8 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 8003d04: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8003d08: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003d0c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8003d10: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8003d14: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8003d18: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8003d1c: c3 a0 00 00 ret <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 8003d20: 29 63 00 d4 lw r3,(r11+212) <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 8003d24: 34 04 00 00 mvi r4,0 <== NOT EXECUTED 8003d28: 59 64 00 94 sw (r11+148),r4 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 8003d2c: b8 60 68 00 mv r13,r3 <== NOT EXECUTED 8003d30: 44 64 00 05 be r3,r4,8003d44 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 8003d34: 29 62 00 d8 lw r2,(r11+216) <== NOT EXECUTED 8003d38: 35 61 00 30 addi r1,r11,48 <== NOT EXECUTED 8003d3c: b8 80 68 00 mv r13,r4 <== NOT EXECUTED 8003d40: d8 60 00 00 call r3 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 8003d44: 59 6c 00 84 sw (r11+132),r12 <== NOT EXECUTED } return nToSend; } 8003d48: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8003d4c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003d50: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8003d54: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8003d58: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8003d5c: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8003d60: c3 a0 00 00 ret <== NOT EXECUTED * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 8003d64: 29 6d 00 80 lw r13,(r11+128) <== NOT EXECUTED 8003d68: c9 ac 68 00 sub r13,r13,r12 <== NOT EXECUTED /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 8003d6c: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8003d70: 20 21 06 00 andi r1,r1,0x600 <== NOT EXECUTED 8003d74: 44 20 00 02 be r1,r0,8003d7c <== NOT EXECUTED 8003d78: 34 0d 00 01 mvi r13,1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 8003d7c: 29 62 00 7c lw r2,(r11+124) <== NOT EXECUTED 8003d80: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8003d84: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 8003d88: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003d8c: 59 63 00 94 sw (r11+148),r3 <== NOT EXECUTED (*tty->device.write)(tty->minor, 8003d90: b4 4c 10 00 add r2,r2,r12 <== NOT EXECUTED 8003d94: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 8003d98: d8 80 00 00 call r4 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 8003d9c: 59 6c 00 84 sw (r11+132),r12 <== NOT EXECUTED 8003da0: e3 ff ff ea bi 8003d48 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 8003da4: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED 8003da8: f8 00 0b 25 calli 8006a3c <== NOT EXECUTED 8003dac: e3 ff ff c8 bi 8003ccc <== NOT EXECUTED /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 8003db0: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8003db4: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8003db8: 35 62 00 4a addi r2,r11,74 <== NOT EXECUTED 8003dbc: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003dc0: d8 80 00 00 call r4 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 8003dc4: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8003dc8: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 8003dcc: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 8003dd0: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED tty->t_dqlen--; 8003dd4: 29 62 00 90 lw r2,(r11+144) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 8003dd8: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 8003ddc: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 8003de0: 38 63 00 02 ori r3,r3,0x2 <== NOT EXECUTED 8003de4: 59 63 00 b8 sw (r11+184),r3 <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 8003de8: 59 62 00 90 sw (r11+144),r2 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); 8003dec: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED 8003df0: 34 0d 00 01 mvi r13,1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 8003df4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8003df8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003dfc: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8003e00: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8003e04: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8003e08: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8003e0c: c3 a0 00 00 ret <== NOT EXECUTED * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, 8003e10: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8003e14: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8003e18: 35 62 00 49 addi r2,r11,73 <== NOT EXECUTED 8003e1c: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003e20: d8 80 00 00 call r4 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 8003e24: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8003e28: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 8003e2c: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 8003e30: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED tty->t_dqlen--; 8003e34: 29 62 00 90 lw r2,(r11+144) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 8003e38: 29 64 00 b8 lw r4,(r11+184) <== NOT EXECUTED 8003e3c: 34 03 ff fd mvi r3,-3 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 8003e40: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 8003e44: a0 83 18 00 and r3,r4,r3 <== NOT EXECUTED 8003e48: 59 63 00 b8 sw (r11+184),r3 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 8003e4c: 59 62 00 90 sw (r11+144),r2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); 8003e50: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED 8003e54: 34 0d 00 01 mvi r13,1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 8003e58: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8003e5c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003e60: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8003e64: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8003e68: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8003e6c: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8003e70: c3 a0 00 00 ret <== NOT EXECUTED /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 8003e74: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8003e78: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 8003e7c: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 8003e80: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 8003e84: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 8003e88: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003e8c: 59 63 00 94 sw (r11+148),r3 <== NOT EXECUTED else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP; 8003e90: 38 42 00 20 ori r2,r2,0x20 <== NOT EXECUTED 8003e94: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 8003e98: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED 8003e9c: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 8003ea0: 59 6c 00 84 sw (r11+132),r12 <== NOT EXECUTED 8003ea4: e3 ff ff a9 bi 8003d48 <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 8003ea8: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED 8003eac: f8 00 0a e4 calli 8006a3c <== NOT EXECUTED 8003eb0: e3 ff ff 95 bi 8003d04 <== NOT EXECUTED 08005bb8 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 8005bb8: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED 8005bbc: 5b 8b 00 18 sw (sp+24),r11 <== NOT EXECUTED 8005bc0: 5b 8c 00 14 sw (sp+20),r12 <== NOT EXECUTED 8005bc4: 5b 8d 00 10 sw (sp+16),r13 <== NOT EXECUTED 8005bc8: 5b 8e 00 0c sw (sp+12),r14 <== NOT EXECUTED 8005bcc: 5b 8f 00 08 sw (sp+8),r15 <== NOT EXECUTED 8005bd0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 8005bd4: 34 0f 00 00 mvi r15,0 <== NOT EXECUTED /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 8005bd8: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 8005bdc: 37 8c 00 1c addi r12,sp,28 <== NOT EXECUTED 8005be0: 37 8e 00 23 addi r14,sp,35 <== NOT EXECUTED else { /* * do something */ c = tty->device.pollRead(tty->minor); if (c != EOF) { 8005be4: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 8005be8: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8005bec: b9 80 20 00 mv r4,r12 <== NOT EXECUTED 8005bf0: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8005bf4: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 8005bf8: f8 00 01 46 calli 8006110 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 8005bfc: 2b 83 00 1c lw r3,(sp+28) <== NOT EXECUTED 8005c00: 20 63 00 01 andi r3,r3,0x1 <== NOT EXECUTED 8005c04: 5c 60 00 13 bne r3,r0,8005c50 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 8005c08: 29 63 00 a0 lw r3,(r11+160) <== NOT EXECUTED 8005c0c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8005c10: d8 60 00 00 call r3 <== NOT EXECUTED 8005c14: b8 20 28 00 mv r5,r1 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 8005c18: b9 c0 10 00 mv r2,r14 <== NOT EXECUTED 8005c1c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005c20: 34 03 00 01 mvi r3,1 <== NOT EXECUTED else { /* * do something */ c = tty->device.pollRead(tty->minor); if (c != EOF) { 8005c24: 44 ad ff f1 be r5,r13,8005be8 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 8005c28: 33 85 00 23 sb (sp+35),r5 <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 8005c2c: fb ff f8 c3 calli 8003f38 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 8005c30: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8005c34: b9 80 20 00 mv r4,r12 <== NOT EXECUTED 8005c38: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8005c3c: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 8005c40: f8 00 01 34 calli 8006110 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 8005c44: 2b 83 00 1c lw r3,(sp+28) <== NOT EXECUTED 8005c48: 20 63 00 01 andi r3,r3,0x1 <== NOT EXECUTED 8005c4c: 44 60 ff ef be r3,r0,8005c08 <== NOT EXECUTED tty->rxTaskId = 0; 8005c50: 59 6f 00 c4 sw (r11+196),r15 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 8005c54: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8005c58: f8 00 04 29 calli 8006cfc <== NOT EXECUTED 8005c5c: e3 ff ff e3 bi 8005be8 <== NOT EXECUTED 08003c24 : * signal receive interrupt to rx daemon * NOTE: This routine runs in the context of the * device receive interrupt handler. */ void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { 8003c24: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8003c28: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 8003c2c: 28 21 00 c4 lw r1,(r1+196) <== NOT EXECUTED 8003c30: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8003c34: f8 00 09 b0 calli 80062f4 <== NOT EXECUTED } 8003c38: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003c3c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8003c40: c3 a0 00 00 ret <== NOT EXECUTED 08005b2c : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 8005b2c: 37 9c ff e8 addi sp,sp,-24 <== NOT EXECUTED 8005b30: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED 8005b34: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED 8005b38: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED 8005b3c: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED 8005b40: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8005b44: 78 0d 08 02 mvhi r13,0x802 <== NOT EXECUTED 8005b48: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 8005b4c: 39 ad 67 f8 ori r13,r13,0x67f8 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 8005b50: 34 0e 00 00 mvi r14,0 <== NOT EXECUTED 8005b54: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8005b58: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8005b5c: 37 84 00 18 addi r4,sp,24 <== NOT EXECUTED 8005b60: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 8005b64: f8 00 01 6b calli 8006110 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 8005b68: 2b 8c 00 18 lw r12,(sp+24) <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 8005b6c: 34 02 00 04 mvi r2,4 <== NOT EXECUTED rtems_event_receive((TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 8005b70: 21 8c 00 01 andi r12,r12,0x1 <== NOT EXECUTED 8005b74: 5d 80 00 0d bne r12,r0,8005ba8 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 8005b78: 29 63 00 cc lw r3,(r11+204) <== NOT EXECUTED 8005b7c: b4 63 18 00 add r3,r3,r3 <== NOT EXECUTED 8005b80: 34 61 00 01 addi r1,r3,1 <== NOT EXECUTED 8005b84: fb ff ee 4e calli 80014bc <__ashlsi3> <== NOT EXECUTED 8005b88: b5 a1 10 00 add r2,r13,r1 <== NOT EXECUTED 8005b8c: 28 42 00 04 lw r2,(r2+4) <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 8005b90: b9 60 08 00 mv r1,r11 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 8005b94: 44 4c 00 02 be r2,r12,8005b9c <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 8005b98: d8 40 00 00 call r2 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 8005b9c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005ba0: fb ff f8 29 calli 8003c44 <== NOT EXECUTED 8005ba4: e3 ff ff ec bi 8005b54 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { tty->txTaskId = 0; 8005ba8: 59 6e 00 c8 sw (r11+200),r14 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 8005bac: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8005bb0: f8 00 04 53 calli 8006cfc <== NOT EXECUTED 8005bb4: e3 ff ff e8 bi 8005b54 <== NOT EXECUTED 08004ad8 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 8004ad8: 37 9c ff e4 addi sp,sp,-28 <== NOT EXECUTED 8004adc: 5b 8b 00 1c sw (sp+28),r11 <== NOT EXECUTED 8004ae0: 5b 8c 00 18 sw (sp+24),r12 <== NOT EXECUTED 8004ae4: 5b 8d 00 14 sw (sp+20),r13 <== NOT EXECUTED 8004ae8: 5b 8e 00 10 sw (sp+16),r14 <== NOT EXECUTED 8004aec: 5b 8f 00 0c sw (sp+12),r15 <== NOT EXECUTED 8004af0: 5b 90 00 08 sw (sp+8),r16 <== NOT EXECUTED 8004af4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8004af8: b8 20 68 00 mv r13,r1 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8004afc: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8004b00: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8004b04: b8 40 18 00 mv r3,r2 <== NOT EXECUTED rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 8004b08: 28 2b 00 38 lw r11,(r1+56) <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8004b0c: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED 8004b10: f8 00 07 6a calli 80068b8 <== NOT EXECUTED 8004b14: b8 20 70 00 mv r14,r1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 8004b18: 5c 20 00 12 bne r1,r0,8004b60 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 8004b1c: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 8004b20: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8004b24: 78 0c 08 02 mvhi r12,0x802 <== NOT EXECUTED 8004b28: fb ff f2 65 calli 80014bc <__ashlsi3> <== NOT EXECUTED 8004b2c: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 8004b30: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8004b34: fb ff f2 62 calli 80014bc <__ashlsi3> <== NOT EXECUTED 8004b38: 39 8c 67 f8 ori r12,r12,0x67f8 <== NOT EXECUTED 8004b3c: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 8004b40: 28 23 00 04 lw r3,(r1+4) <== NOT EXECUTED 8004b44: 44 6e 00 11 be r3,r14,8004b88 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 8004b48: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8004b4c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8004b50: d8 60 00 00 call r3 <== NOT EXECUTED 8004b54: b8 20 70 00 mv r14,r1 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 8004b58: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED 8004b5c: f8 00 07 b8 calli 8006a3c <== NOT EXECUTED rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 8004b60: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8004b64: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004b68: 2b 8b 00 1c lw r11,(sp+28) <== NOT EXECUTED 8004b6c: 2b 8c 00 18 lw r12,(sp+24) <== NOT EXECUTED 8004b70: 2b 8d 00 14 lw r13,(sp+20) <== NOT EXECUTED 8004b74: 2b 8e 00 10 lw r14,(sp+16) <== NOT EXECUTED 8004b78: 2b 8f 00 0c lw r15,(sp+12) <== NOT EXECUTED 8004b7c: 2b 90 00 08 lw r16,(sp+8) <== NOT EXECUTED 8004b80: 37 9c 00 1c addi sp,sp,28 <== NOT EXECUTED 8004b84: c3 a0 00 00 ret <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 8004b88: 29 61 00 34 lw r1,(r11+52) <== NOT EXECUTED 8004b8c: 20 21 00 01 andi r1,r1,0x1 <== NOT EXECUTED 8004b90: 44 20 00 11 be r1,r0,8004bd4 <== NOT EXECUTED uint32_t count = args->count; 8004b94: 29 af 00 14 lw r15,(r13+20) <== NOT EXECUTED char *buffer = args->buffer; 8004b98: 29 b0 00 10 lw r16,(r13+16) <== NOT EXECUTED while (count--) 8004b9c: b9 c0 60 00 mv r12,r14 <== NOT EXECUTED 8004ba0: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8004ba4: 45 e0 00 08 be r15,r0,8004bc4 <== NOT EXECUTED oproc (*buffer++, tty); 8004ba8: b6 0c 08 00 add r1,r16,r12 <== NOT EXECUTED 8004bac: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED 8004bb0: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED 8004bb4: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004bb8: fb ff fe 10 calli 80043f8 <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 8004bbc: 5d ec ff fb bne r15,r12,8004ba8 <== NOT EXECUTED oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; 8004bc0: 29 a1 00 14 lw r1,(r13+20) <== NOT EXECUTED 8004bc4: 59 a1 00 1c sw (r13+28),r1 <== NOT EXECUTED } rtems_semaphore_release (tty->osem); 8004bc8: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED 8004bcc: f8 00 07 9c calli 8006a3c <== NOT EXECUTED return sc; 8004bd0: e3 ff ff e4 bi 8004b60 <== NOT EXECUTED while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 8004bd4: 29 a1 00 10 lw r1,(r13+16) <== NOT EXECUTED 8004bd8: 29 a2 00 14 lw r2,(r13+20) <== NOT EXECUTED 8004bdc: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8004be0: fb ff fd ab calli 800428c <== NOT EXECUTED 8004be4: e3 ff ff f7 bi 8004bc0 <== NOT EXECUTED 08006f7c : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 8006f7c: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED 8006f80: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED 8006f84: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED 8006f88: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED 8006f8c: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED 8006f90: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED 8006f94: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED 8006f98: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED 8006f9c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 8006fa0: 78 04 20 00 mvhi r4,0x2000 <== NOT EXECUTED 8006fa4: 38 84 00 00 ori r4,r4,0x0 <== NOT EXECUTED 8006fa8: a0 24 78 00 and r15,r1,r4 <== NOT EXECUTED static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 8006fac: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 8006fb0: b8 40 80 00 mv r16,r2 <== NOT EXECUTED 8006fb4: b8 60 70 00 mv r14,r3 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 8006fb8: 45 e0 00 0f be r15,r0,8006ff4 <== NOT EXECUTED { if (rtems_panic_in_progress++) 8006fbc: 78 05 08 02 mvhi r5,0x802 <== NOT EXECUTED 8006fc0: 38 a5 b8 94 ori r5,r5,0xb894 <== NOT EXECUTED 8006fc4: 28 a4 00 00 lw r4,(r5+0) <== NOT EXECUTED 8006fc8: 34 81 00 01 addi r1,r4,1 <== NOT EXECUTED 8006fcc: 58 a1 00 00 sw (r5+0),r1 <== NOT EXECUTED 8006fd0: 44 80 00 07 be r4,r0,8006fec <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 8006fd4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8006fd8: 38 21 ba 2c ori r1,r1,0xba2c <== NOT EXECUTED 8006fdc: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 8006fe0: 34 42 00 01 addi r2,r2,1 <== NOT EXECUTED 8006fe4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 8006fe8: 28 a1 00 00 lw r1,(r5+0) <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 8006fec: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8006ff0: 48 22 00 37 bg r1,r2,80070cc <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 8006ff4: 78 0b 08 02 mvhi r11,0x802 <== NOT EXECUTED 8006ff8: 39 6b b2 28 ori r11,r11,0xb228 <== NOT EXECUTED 8006ffc: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 8007000: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8007004: f8 00 3c 68 calli 80161a4 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 8007008: 78 06 40 00 mvhi r6,0x4000 <== NOT EXECUTED 800700c: 38 c6 00 00 ori r6,r6,0x0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; 8007010: 78 05 8f ff mvhi r5,0x8fff <== NOT EXECUTED 8007014: 38 a5 ff ff ori r5,r5,0xffff <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 8007018: a1 86 30 00 and r6,r12,r6 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; 800701c: a1 85 88 00 and r17,r12,r5 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 8007020: b8 c0 68 00 mv r13,r6 <== NOT EXECUTED 8007024: 5c c0 00 46 bne r6,r0,800713c <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 8007028: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 800702c: b9 c0 18 00 mv r3,r14 <== NOT EXECUTED 8007030: ba 00 10 00 mv r2,r16 <== NOT EXECUTED 8007034: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED 8007038: f8 00 52 c2 calli 801bb40 <== NOT EXECUTED 800703c: b8 20 70 00 mv r14,r1 <== NOT EXECUTED if (status) 8007040: 5e 20 00 2e bne r17,r0,80070f8 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 8007044: 45 a0 00 0d be r13,r0,8007078 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 8007048: 4c 0d 00 05 bge r0,r13,800705c <== NOT EXECUTED 800704c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8007050: f8 00 41 35 calli 8017524 <== NOT EXECUTED 8007054: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED 8007058: 5c 20 00 3c bne r1,r0,8007148 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 800705c: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 8007060: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8007064: 38 42 8e 54 ori r2,r2,0x8e54 <== NOT EXECUTED 8007068: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED 800706c: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 8007070: f8 00 3d 5a calli 80165d8 <== NOT EXECUTED 8007074: b5 c1 70 00 add r14,r14,r1 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 8007078: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 800707c: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8007080: 38 42 86 8c ori r2,r2,0x868c <== NOT EXECUTED 8007084: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED 8007088: f8 00 3d 54 calli 80165d8 <== NOT EXECUTED 800708c: b8 20 80 00 mv r16,r1 <== NOT EXECUTED (void) fflush(stderr); 8007090: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 8007094: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED 8007098: f8 00 3c 43 calli 80161a4 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 800709c: 78 02 30 00 mvhi r2,0x3000 <== NOT EXECUTED 80070a0: 38 42 00 00 ori r2,r2,0x0 <== NOT EXECUTED 80070a4: a1 82 60 00 and r12,r12,r2 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 80070a8: b6 0e 08 00 add r1,r16,r14 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 80070ac: 45 80 00 09 be r12,r0,80070d0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 80070b0: 45 e0 00 1e be r15,r0,8007128 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 80070b4: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 80070b8: 38 42 8e 68 ori r2,r2,0x8e68 <== NOT EXECUTED 80070bc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80070c0: f8 00 00 40 calli 80071c0 <== NOT EXECUTED _exit(local_errno); 80070c4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80070c8: f8 00 03 88 calli 8007ee8 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); abort(); 80070cc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } } return chars_written; } 80070d0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80070d4: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED 80070d8: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED 80070dc: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED 80070e0: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED 80070e4: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED 80070e8: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED 80070ec: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED 80070f0: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED 80070f4: c3 a0 00 00 ret <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 80070f8: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 80070fc: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8007100: 28 50 00 0c lw r16,(r2+12) <== NOT EXECUTED 8007104: fb ff ff 95 calli 8006f58 <== NOT EXECUTED 8007108: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 800710c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 8007110: 38 42 8e 34 ori r2,r2,0x8e34 <== NOT EXECUTED 8007114: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 8007118: f8 00 3d 30 calli 80165d8 <== NOT EXECUTED 800711c: b5 c1 70 00 add r14,r14,r1 <== NOT EXECUTED if (local_errno) 8007120: 45 a0 ff d6 be r13,r0,8007078 <== NOT EXECUTED 8007124: e3 ff ff c9 bi 8007048 <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 8007128: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 800712c: 38 42 8e 80 ori r2,r2,0x8e80 <== NOT EXECUTED 8007130: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8007134: f8 00 00 23 calli 80071c0 <== NOT EXECUTED abort(); 8007138: f8 00 3a fb calli 8015d24 <== NOT EXECUTED (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; 800713c: f8 00 3b 0a calli 8015d64 <__errno> <== NOT EXECUTED 8007140: 28 2d 00 00 lw r13,(r1+0) <== NOT EXECUTED 8007144: e3 ff ff b9 bi 8007028 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 8007148: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 800714c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8007150: 28 50 00 0c lw r16,(r2+12) <== NOT EXECUTED 8007154: f8 00 40 f4 calli 8017524 <== NOT EXECUTED 8007158: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 800715c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 8007160: 38 42 8e 44 ori r2,r2,0x8e44 <== NOT EXECUTED 8007164: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 8007168: f8 00 3d 1c calli 80165d8 <== NOT EXECUTED 800716c: b5 c1 70 00 add r14,r14,r1 <== NOT EXECUTED if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) 8007170: e3 ff ff c2 bi 8007078 <== NOT EXECUTED 08029e78 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 8029e78: 37 9c ff d4 addi sp,sp,-44 8029e7c: 5b 8b 00 2c sw (sp+44),r11 8029e80: 5b 8c 00 28 sw (sp+40),r12 8029e84: 5b 8d 00 24 sw (sp+36),r13 8029e88: 5b 8e 00 20 sw (sp+32),r14 8029e8c: 5b 8f 00 1c sw (sp+28),r15 8029e90: 5b 90 00 18 sw (sp+24),r16 8029e94: 5b 91 00 14 sw (sp+20),r17 8029e98: 5b 92 00 10 sw (sp+16),r18 8029e9c: 5b 93 00 0c sw (sp+12),r19 8029ea0: 5b 94 00 08 sw (sp+8),r20 8029ea4: 5b 9d 00 04 sw (sp+4),ra 8029ea8: 34 0f 00 00 mvi r15,0 8029eac: 78 10 7f ff mvhi r16,0x7fff unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 8029eb0: 78 13 08 07 mvhi r19,0x807 limit++; continue; } sign = 1; } if (!isdigit(c)) 8029eb4: 78 0e 08 07 mvhi r14,0x807 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 8029eb8: b8 20 58 00 mv r11,r1 8029ebc: b8 40 a0 00 mv r20,r2 8029ec0: 3a 10 ff ff ori r16,r16,0xffff unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 8029ec4: 3a 73 3b 08 ori r19,r19,0x3b08 limit++; continue; } sign = 1; } if (!isdigit(c)) 8029ec8: 39 ce 3a fc ori r14,r14,0x3afc /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 8029ecc: b9 e0 68 00 mv r13,r15 int sign = 0; int d; for (;;) { c = getc(fp); if (c == ':') 8029ed0: 34 11 00 3a mvi r17,58 break; if (sign == 0) { if (c == '-') { 8029ed4: 34 12 00 2d mvi r18,45 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 8029ed8: 29 63 00 04 lw r3,(r11+4) 8029edc: 34 63 ff ff addi r3,r3,-1 8029ee0: 59 63 00 04 sw (r11+4),r3 8029ee4: 4c 60 00 1b bge r3,r0,8029f50 8029ee8: 2a 61 00 00 lw r1,(r19+0) <== NOT EXECUTED 8029eec: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8029ef0: f8 00 93 cb calli 804ee1c <__srget_r> <== NOT EXECUTED 8029ef4: b8 20 60 00 mv r12,r1 <== NOT EXECUTED if (c == ':') 8029ef8: 45 91 00 1b be r12,r17,8029f64 <== NOT EXECUTED break; if (sign == 0) { 8029efc: 5d e0 00 03 bne r15,r0,8029f08 if (c == '-') { sign = -1; limit++; continue; 8029f00: 34 0f 00 01 mvi r15,1 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 8029f04: 45 92 00 32 be r12,r18,8029fcc limit++; continue; } sign = 1; } if (!isdigit(c)) 8029f08: 29 c1 00 00 lw r1,(r14+0) 8029f0c: b4 2c 08 00 add r1,r1,r12 8029f10: 40 21 00 01 lbu r1,(r1+1) 8029f14: 20 21 00 04 andi r1,r1,0x4 8029f18: 44 20 00 1f be r1,r0,8029f94 return 0; d = c - '0'; if ((i > (limit / 10)) 8029f1c: ba 00 08 00 mv r1,r16 8029f20: 34 02 00 0a mvi r2,10 8029f24: fb ff 65 c8 calli 8003644 <__udivsi3> 8029f28: 55 a1 00 1b bgu r13,r1,8029f94 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 8029f2c: 35 8c ff d0 addi r12,r12,-48 if ((i > (limit / 10)) 8029f30: 45 a1 00 14 be r13,r1,8029f80 || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 8029f34: b5 ad 68 00 add r13,r13,r13 8029f38: b9 a0 08 00 mv r1,r13 8029f3c: 34 02 00 02 mvi r2,2 8029f40: fb ff 5c 88 calli 8001160 <__ashlsi3> 8029f44: b5 a1 68 00 add r13,r13,r1 8029f48: b5 8d 68 00 add r13,r12,r13 8029f4c: e3 ff ff e3 bi 8029ed8 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 8029f50: 29 63 00 00 lw r3,(r11+0) 8029f54: 40 6c 00 00 lbu r12,(r3+0) 8029f58: 34 61 00 01 addi r1,r3,1 8029f5c: 59 61 00 00 sw (r11+0),r1 if (c == ':') 8029f60: 5d 91 ff e7 bne r12,r17,8029efc if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 8029f64: 45 e0 00 0c be r15,r0,8029f94 return 0; *val = i * sign; 8029f68: b9 e0 08 00 mv r1,r15 8029f6c: b9 a0 10 00 mv r2,r13 8029f70: fb ff 65 95 calli 80035c4 <__mulsi3> 8029f74: 5a 81 00 00 sw (r20+0),r1 8029f78: 34 01 00 01 mvi r1,1 return 1; 8029f7c: e0 00 00 07 bi 8029f98 sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 8029f80: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 8029f84: 34 02 00 0a mvi r2,10 <== NOT EXECUTED 8029f88: fb ff 65 bf calli 8003684 <__umodsi3> <== NOT EXECUTED 8029f8c: 55 81 00 02 bgu r12,r1,8029f94 <== NOT EXECUTED 8029f90: e3 ff ff e9 bi 8029f34 <== NOT EXECUTED i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; return 1; 8029f94: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } 8029f98: 2b 9d 00 04 lw ra,(sp+4) 8029f9c: 2b 8b 00 2c lw r11,(sp+44) 8029fa0: 2b 8c 00 28 lw r12,(sp+40) 8029fa4: 2b 8d 00 24 lw r13,(sp+36) 8029fa8: 2b 8e 00 20 lw r14,(sp+32) 8029fac: 2b 8f 00 1c lw r15,(sp+28) 8029fb0: 2b 90 00 18 lw r16,(sp+24) 8029fb4: 2b 91 00 14 lw r17,(sp+20) 8029fb8: 2b 92 00 10 lw r18,(sp+16) 8029fbc: 2b 93 00 0c lw r19,(sp+12) 8029fc0: 2b 94 00 08 lw r20,(sp+8) 8029fc4: 37 9c 00 2c addi sp,sp,44 8029fc8: c3 a0 00 00 ret if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 8029fcc: b6 0f 80 00 add r16,r16,r15 <== NOT EXECUTED 8029fd0: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED continue; 8029fd4: e3 ff ff c1 bi 8029ed8 <== NOT EXECUTED 08029fd8 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 8029fd8: 37 9c ff d8 addi sp,sp,-40 8029fdc: 5b 8b 00 28 sw (sp+40),r11 8029fe0: 5b 8c 00 24 sw (sp+36),r12 8029fe4: 5b 8d 00 20 sw (sp+32),r13 8029fe8: 5b 8e 00 1c sw (sp+28),r14 8029fec: 5b 8f 00 18 sw (sp+24),r15 8029ff0: 5b 90 00 14 sw (sp+20),r16 8029ff4: 5b 91 00 10 sw (sp+16),r17 8029ff8: 5b 92 00 0c sw (sp+12),r18 8029ffc: 5b 93 00 08 sw (sp+8),r19 802a000: 5b 9d 00 04 sw (sp+4),ra 802a004: b8 60 58 00 mv r11,r3 int c; *name = *bufp; 802a008: 28 63 00 00 lw r3,(r3+0) for (;;) { c = getc(fp); 802a00c: 78 12 08 07 mvhi r18,0x807 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 802a010: b8 20 60 00 mv r12,r1 int c; *name = *bufp; 802a014: 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) { 802a018: b8 80 68 00 mv r13,r4 802a01c: b8 a0 98 00 mv r19,r5 int c; *name = *bufp; for (;;) { c = getc(fp); 802a020: 3a 52 3b 08 ori r18,r18,0x3b08 if (c == ':') { 802a024: 34 0e 00 3a mvi r14,58 if (nlFlag) return 0; break; } if (c == '\n') { 802a028: 34 0f 00 0a mvi r15,10 if (!nlFlag) return 0; break; } if (c == EOF) 802a02c: 34 10 ff ff mvi r16,-1 return 0; if (*nleft < 2) 802a030: 34 11 00 01 mvi r17,1 { int c; *name = *bufp; for (;;) { c = getc(fp); 802a034: 29 81 00 04 lw r1,(r12+4) 802a038: 34 21 ff ff addi r1,r1,-1 802a03c: 59 81 00 04 sw (r12+4),r1 802a040: 4c 20 00 12 bge r1,r0,802a088 802a044: 2a 41 00 00 lw r1,(r18+0) 802a048: b9 80 10 00 mv r2,r12 802a04c: f8 00 93 74 calli 804ee1c <__srget_r> if (c == ':') { 802a050: 44 2e 00 13 be r1,r14,802a09c if (nlFlag) return 0; break; } if (c == '\n') { 802a054: 44 2f 00 1e be r1,r15,802a0cc if (!nlFlag) return 0; break; } if (c == EOF) 802a058: 44 30 00 1e be r1,r16,802a0d0 return 0; if (*nleft < 2) 802a05c: 29 a2 00 00 lw r2,(r13+0) 802a060: 52 22 00 1c bgeu r17,r2,802a0d0 return 0; **bufp = c; 802a064: 29 62 00 00 lw r2,(r11+0) 802a068: 30 41 00 00 sb (r2+0),r1 ++(*bufp); 802a06c: 29 62 00 00 lw r2,(r11+0) --(*nleft); 802a070: 29 a1 00 00 lw r1,(r13+0) if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 802a074: 34 42 00 01 addi r2,r2,1 --(*nleft); 802a078: 34 21 ff ff addi r1,r1,-1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 802a07c: 59 62 00 00 sw (r11+0),r2 --(*nleft); 802a080: 59 a1 00 00 sw (r13+0),r1 } 802a084: e3 ff ff ec bi 802a034 { int c; *name = *bufp; for (;;) { c = getc(fp); 802a088: 29 81 00 00 lw r1,(r12+0) 802a08c: 34 22 00 01 addi r2,r1,1 802a090: 40 21 00 00 lbu r1,(r1+0) 802a094: 59 82 00 00 sw (r12+0),r2 if (c == ':') { 802a098: 5c 2e ff ef bne r1,r14,802a054 if (nlFlag) 802a09c: 5e 60 00 0d bne r19,r0,802a0d0 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 802a0a0: 29 63 00 00 lw r3,(r11+0) 802a0a4: 34 02 00 00 mvi r2,0 ++(*bufp); --(*nleft); 802a0a8: 34 01 00 01 mvi r1,1 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 802a0ac: 30 62 00 00 sb (r3+0),r2 ++(*bufp); 802a0b0: 29 63 00 00 lw r3,(r11+0) --(*nleft); 802a0b4: 29 a2 00 00 lw r2,(r13+0) **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 802a0b8: b4 61 18 00 add r3,r3,r1 --(*nleft); 802a0bc: 34 42 ff ff addi r2,r2,-1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 802a0c0: 59 63 00 00 sw (r11+0),r3 --(*nleft); 802a0c4: 59 a2 00 00 sw (r13+0),r2 return 1; 802a0c8: e0 00 00 03 bi 802a0d4 if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 802a0cc: 5e 60 ff f5 bne r19,r0,802a0a0 --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 802a0d0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } 802a0d4: 2b 9d 00 04 lw ra,(sp+4) 802a0d8: 2b 8b 00 28 lw r11,(sp+40) 802a0dc: 2b 8c 00 24 lw r12,(sp+36) 802a0e0: 2b 8d 00 20 lw r13,(sp+32) 802a0e4: 2b 8e 00 1c lw r14,(sp+28) 802a0e8: 2b 8f 00 18 lw r15,(sp+24) 802a0ec: 2b 90 00 14 lw r16,(sp+20) 802a0f0: 2b 91 00 10 lw r17,(sp+16) 802a0f4: 2b 92 00 0c lw r18,(sp+12) 802a0f8: 2b 93 00 08 lw r19,(sp+8) 802a0fc: 37 9c 00 28 addi sp,sp,40 802a100: c3 a0 00 00 ret 0802a104 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 802a104: 37 9c ff d8 addi sp,sp,-40 802a108: 5b 8b 00 18 sw (sp+24),r11 802a10c: 5b 8c 00 14 sw (sp+20),r12 802a110: 5b 8d 00 10 sw (sp+16),r13 802a114: 5b 8e 00 0c sw (sp+12),r14 802a118: 5b 8f 00 08 sw (sp+8),r15 802a11c: 5b 9d 00 04 sw (sp+4),ra int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 802a120: 37 8c 00 20 addi r12,sp,32 802a124: 37 8b 00 1c addi r11,sp,28 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 802a128: 5b 83 00 20 sw (sp+32),r3 802a12c: 5b 84 00 1c sw (sp+28),r4 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 802a130: b9 80 18 00 mv r3,r12 802a134: b9 60 20 00 mv r4,r11 802a138: 34 05 00 00 mvi r5,0 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 802a13c: b8 20 68 00 mv r13,r1 802a140: b8 40 70 00 mv r14,r2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 802a144: fb ff ff a5 calli 8029fd8 802a148: 5c 20 00 0a bne r1,r0,802a170 *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; 802a14c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } 802a150: 2b 9d 00 04 lw ra,(sp+4) 802a154: 2b 8b 00 18 lw r11,(sp+24) 802a158: 2b 8c 00 14 lw r12,(sp+20) 802a15c: 2b 8d 00 10 lw r13,(sp+16) 802a160: 2b 8e 00 0c lw r14,(sp+12) 802a164: 2b 8f 00 08 lw r15,(sp+8) 802a168: 37 9c 00 28 addi sp,sp,40 802a16c: c3 a0 00 00 ret int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 802a170: b9 a0 08 00 mv r1,r13 802a174: 35 c2 00 04 addi r2,r14,4 802a178: b9 80 18 00 mv r3,r12 802a17c: b9 60 20 00 mv r4,r11 802a180: 34 05 00 00 mvi r5,0 802a184: fb ff ff 95 calli 8029fd8 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 802a188: 44 20 ff f1 be r1,r0,802a14c || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 802a18c: b9 a0 08 00 mv r1,r13 802a190: 37 82 00 28 addi r2,sp,40 802a194: fb ff ff 39 calli 8029e78 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 802a198: 44 20 ff ed be r1,r0,802a14c || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 802a19c: b9 a0 08 00 mv r1,r13 802a1a0: b9 80 18 00 mv r3,r12 802a1a4: b9 60 20 00 mv r4,r11 802a1a8: 37 82 00 24 addi r2,sp,36 802a1ac: 34 05 00 01 mvi r5,1 802a1b0: fb ff ff 8a calli 8029fd8 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 802a1b4: 44 20 ff e6 be r1,r0,802a14c || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 802a1b8: 2f 82 00 2a lhu r2,(sp+42) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 802a1bc: 2b 8b 00 24 lw r11,(sp+36) 802a1c0: 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; 802a1c4: 0d c2 00 08 sh (r14+8),r2 /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 802a1c8: 41 62 00 00 lbu r2,(r11+0) 802a1cc: b9 60 18 00 mv r3,r11 802a1d0: 34 04 00 17 mvi r4,23 802a1d4: 44 40 00 0a be r2,r0,802a1fc 802a1d8: 34 63 00 01 addi r3,r3,1 if(*cp == ',') memcount++; 802a1dc: 64 44 00 2c cmpei r4,r2,44 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 802a1e0: 40 62 00 00 lbu r2,(r3+0) if(*cp == ',') memcount++; 802a1e4: b4 24 08 00 add r1,r1,r4 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 802a1e8: 5c 40 ff fc bne r2,r0,802a1d8 802a1ec: 34 21 00 01 addi r1,r1,1 802a1f0: 34 02 00 02 mvi r2,2 802a1f4: fb ff 5b db calli 8001160 <__ashlsi3> 802a1f8: 34 24 00 0f addi r4,r1,15 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 802a1fc: 2b 81 00 1c lw r1,(sp+28) 802a200: 54 81 ff d3 bgu r4,r1,802a14c return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 802a204: 2b 82 00 20 lw r2,(sp+32) 802a208: 34 01 ff f0 mvi r1,-16 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 802a20c: 34 0c 00 01 mvi r12,1 /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 802a210: 34 42 00 0f addi r2,r2,15 802a214: a0 41 08 00 and r1,r2,r1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 802a218: 58 2b 00 00 sw (r1+0),r11 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 802a21c: 2b 8b 00 24 lw r11,(sp+36) /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 802a220: 59 c1 00 0c sw (r14+12),r1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 802a224: 34 03 00 04 mvi r3,4 802a228: 41 62 00 00 lbu r2,(r11+0) 802a22c: b5 6c 58 00 add r11,r11,r12 802a230: 44 40 00 0a be r2,r0,802a258 if(*cp == ',') { 802a234: 34 0d 00 2c mvi r13,44 802a238: 44 4d 00 0e be r2,r13,802a270 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 802a23c: 41 62 00 00 lbu r2,(r11+0) 802a240: 35 6b 00 01 addi r11,r11,1 802a244: 5c 40 ff fd bne r2,r0,802a238 802a248: b9 80 08 00 mv r1,r12 802a24c: 34 02 00 02 mvi r2,2 802a250: fb ff 5b c4 calli 8001160 <__ashlsi3> 802a254: b8 20 18 00 mv r3,r1 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 802a258: 29 c2 00 0c lw r2,(r14+12) 802a25c: 34 01 00 01 mvi r1,1 802a260: b4 43 18 00 add r3,r2,r3 802a264: 34 02 00 00 mvi r2,0 802a268: 58 62 00 00 sw (r3+0),r2 return 1; 802a26c: e3 ff ff b9 bi 802a150 * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 802a270: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 802a274: 31 61 ff ff sb (r11+-1),r1 <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 802a278: 29 cf 00 0c lw r15,(r14+12) <== NOT EXECUTED 802a27c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802a280: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 802a284: fb ff 5b b7 calli 8001160 <__ashlsi3> <== NOT EXECUTED 802a288: b5 e1 08 00 add r1,r15,r1 <== NOT EXECUTED 802a28c: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 802a290: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED 802a294: e3 ff ff ea bi 802a23c <== NOT EXECUTED 0802a2f0 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 802a2f0: 37 9c ff dc addi sp,sp,-36 802a2f4: 5b 8b 00 14 sw (sp+20),r11 802a2f8: 5b 8c 00 10 sw (sp+16),r12 802a2fc: 5b 8d 00 0c sw (sp+12),r13 802a300: 5b 8e 00 08 sw (sp+8),r14 802a304: 5b 9d 00 04 sw (sp+4),ra int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a308: 37 8c 00 1c addi r12,sp,28 802a30c: 37 8b 00 18 addi r11,sp,24 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 802a310: 5b 83 00 1c sw (sp+28),r3 802a314: 5b 84 00 18 sw (sp+24),r4 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a318: b9 80 18 00 mv r3,r12 802a31c: b9 60 20 00 mv r4,r11 802a320: 34 05 00 00 mvi r5,0 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 802a324: b8 20 68 00 mv r13,r1 802a328: b8 40 70 00 mv r14,r2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a32c: fb ff ff 2b calli 8029fd8 802a330: 5c 20 00 09 bne r1,r0,802a354 || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; 802a334: 34 01 00 00 mvi r1,0 <== NOT EXECUTED } 802a338: 2b 9d 00 04 lw ra,(sp+4) 802a33c: 2b 8b 00 14 lw r11,(sp+20) 802a340: 2b 8c 00 10 lw r12,(sp+16) 802a344: 2b 8d 00 0c lw r13,(sp+12) 802a348: 2b 8e 00 08 lw r14,(sp+8) 802a34c: 37 9c 00 24 addi sp,sp,36 802a350: c3 a0 00 00 ret ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 802a354: b9 a0 08 00 mv r1,r13 802a358: 35 c2 00 04 addi r2,r14,4 802a35c: b9 80 18 00 mv r3,r12 802a360: b9 60 20 00 mv r4,r11 802a364: 34 05 00 00 mvi r5,0 802a368: fb ff ff 1c calli 8029fd8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a36c: 44 20 ff f2 be r1,r0,802a334 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 802a370: b9 a0 08 00 mv r1,r13 802a374: 37 82 00 24 addi r2,sp,36 802a378: fb ff fe c0 calli 8029e78 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a37c: 44 20 ff ee be r1,r0,802a334 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 802a380: b9 a0 08 00 mv r1,r13 802a384: 37 82 00 20 addi r2,sp,32 802a388: fb ff fe bc calli 8029e78 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a38c: 44 20 ff ea be r1,r0,802a334 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 802a390: b9 a0 08 00 mv r1,r13 802a394: 35 c2 00 0c addi r2,r14,12 802a398: b9 80 18 00 mv r3,r12 802a39c: b9 60 20 00 mv r4,r11 802a3a0: 34 05 00 00 mvi r5,0 802a3a4: fb ff ff 0d calli 8029fd8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a3a8: 44 20 ff e3 be r1,r0,802a334 || !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) 802a3ac: b9 a0 08 00 mv r1,r13 802a3b0: 35 c2 00 10 addi r2,r14,16 802a3b4: b9 80 18 00 mv r3,r12 802a3b8: b9 60 20 00 mv r4,r11 802a3bc: 34 05 00 00 mvi r5,0 802a3c0: fb ff ff 06 calli 8029fd8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a3c4: 44 20 ff dc be r1,r0,802a334 || !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) 802a3c8: b9 a0 08 00 mv r1,r13 802a3cc: 35 c2 00 14 addi r2,r14,20 802a3d0: b9 80 18 00 mv r3,r12 802a3d4: b9 60 20 00 mv r4,r11 802a3d8: 34 05 00 00 mvi r5,0 802a3dc: fb ff fe ff calli 8029fd8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a3e0: 44 20 ff d5 be r1,r0,802a334 || !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)) 802a3e4: b9 a0 08 00 mv r1,r13 802a3e8: b9 80 18 00 mv r3,r12 802a3ec: b9 60 20 00 mv r4,r11 802a3f0: 35 c2 00 18 addi r2,r14,24 802a3f4: 34 05 00 01 mvi r5,1 802a3f8: fb ff fe f8 calli 8029fd8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 802a3fc: 44 20 ff ce be r1,r0,802a334 || !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; 802a400: 2f 82 00 26 lhu r2,(sp+38) pwd->pw_gid = pwgid; 802a404: 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; 802a408: 0d c2 00 08 sh (r14+8),r2 pwd->pw_gid = pwgid; 802a40c: 2b 82 00 20 lw r2,(sp+32) 802a410: 0d c2 00 0a sh (r14+10),r2 return 1; 802a414: e3 ff ff c9 bi 802a338 08003598 : #include int sched_get_priority_min( int policy ) { 8003598: 37 9c ff fc addi sp,sp,-4 800359c: 5b 9d 00 04 sw (sp+4),ra switch ( policy ) { 80035a0: 48 01 00 05 bg r0,r1,80035b4 80035a4: 34 02 00 02 mvi r2,2 80035a8: 4c 41 00 08 bge r2,r1,80035c8 80035ac: 34 02 00 04 mvi r2,4 <== NOT EXECUTED 80035b0: 44 22 00 06 be r1,r2,80035c8 <== NOT EXECUTED case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 80035b4: f8 00 2b d6 calli 800e50c <__errno> 80035b8: 34 02 00 16 mvi r2,22 80035bc: 58 22 00 00 sw (r1+0),r2 80035c0: 34 01 ff ff mvi r1,-1 80035c4: e0 00 00 02 bi 80035cc int sched_get_priority_min( int policy ) { switch ( policy ) { 80035c8: 34 01 00 01 mvi r1,1 default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 80035cc: 2b 9d 00 04 lw ra,(sp+4) 80035d0: 37 9c 00 04 addi sp,sp,4 80035d4: c3 a0 00 00 ret 08005994 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 8005994: 37 9c ff f4 addi sp,sp,-12 8005998: 5b 8b 00 08 sw (sp+8),r11 800599c: 5b 9d 00 04 sw (sp+4),ra 80059a0: b8 20 58 00 mv r11,r1 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 80059a4: b8 40 08 00 mv r1,r2 80059a8: 37 82 00 0c addi r2,sp,12 80059ac: f8 00 14 2c calli 800aa5c <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 80059b0: 34 02 00 03 mvi r2,3 80059b4: 44 22 00 09 be r1,r2,80059d8 do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 80059b8: 2b 83 00 0c lw r3,(sp+12) <== NOT EXECUTED 80059bc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80059c0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 80059c4: f8 00 17 a8 calli 800b864 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED break; } } return lock_status; } 80059c8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80059cc: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 80059d0: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 80059d4: c3 a0 00 00 ret <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 80059d8: 2b 83 00 0c lw r3,(sp+12) 80059dc: b9 60 08 00 mv r1,r11 80059e0: 34 02 00 01 mvi r2,1 80059e4: f8 00 17 a0 calli 800b864 <_POSIX_Semaphore_Wait_support> break; } } return lock_status; } 80059e8: 2b 9d 00 04 lw ra,(sp+4) 80059ec: 2b 8b 00 08 lw r11,(sp+8) 80059f0: 37 9c 00 0c addi sp,sp,12 80059f4: c3 a0 00 00 ret 08029e00 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 8029e00: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 8029e04: 38 42 32 f0 ori r2,r2,0x32f0 <== NOT EXECUTED 8029e08: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 8029e0c: 0c 41 00 34 sh (r2+52),r1 <== NOT EXECUTED return 0; } 8029e10: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8029e14: c3 a0 00 00 ret <== NOT EXECUTED 0802a58c : return NULL; return &grent; } void setgrent(void) { 802a58c: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 802a590: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 802a594: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED init_etc_passwd_group(); if (group_fp != NULL) 802a598: 78 0b 08 07 mvhi r11,0x807 <== NOT EXECUTED 802a59c: 39 6b 6d 18 ori r11,r11,0x6d18 <== NOT EXECUTED return &grent; } void setgrent(void) { init_etc_passwd_group(); 802a5a0: fb ff ff b4 calli 802a470 <== NOT EXECUTED if (group_fp != NULL) 802a5a4: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 802a5a8: 44 20 00 02 be r1,r0,802a5b0 <== NOT EXECUTED fclose(group_fp); 802a5ac: f8 00 7a 3d calli 8048ea0 <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 802a5b0: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 802a5b4: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 802a5b8: 38 42 ec 30 ori r2,r2,0xec30 <== NOT EXECUTED 802a5bc: 38 21 63 14 ori r1,r1,0x6314 <== NOT EXECUTED 802a5c0: f8 00 7c dd calli 8049934 <== NOT EXECUTED 802a5c4: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED } 802a5c8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a5cc: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 802a5d0: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 802a5d4: c3 a0 00 00 ret <== NOT EXECUTED 0802a7d0 : return NULL; return &pwent; } void setpwent(void) { 802a7d0: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 802a7d4: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 802a7d8: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED init_etc_passwd_group(); if (passwd_fp != NULL) 802a7dc: 78 0b 08 07 mvhi r11,0x807 <== NOT EXECUTED 802a7e0: 39 6b 6c 30 ori r11,r11,0x6c30 <== NOT EXECUTED return &pwent; } void setpwent(void) { init_etc_passwd_group(); 802a7e4: fb ff ff 23 calli 802a470 <== NOT EXECUTED if (passwd_fp != NULL) 802a7e8: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 802a7ec: 44 20 00 02 be r1,r0,802a7f4 <== NOT EXECUTED fclose(passwd_fp); 802a7f0: f8 00 79 ac calli 8048ea0 <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 802a7f4: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 802a7f8: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 802a7fc: 38 42 ec 30 ori r2,r2,0xec30 <== NOT EXECUTED 802a800: 38 21 62 64 ori r1,r1,0x6264 <== NOT EXECUTED 802a804: f8 00 7c 4c calli 8049934 <== NOT EXECUTED 802a808: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED } 802a80c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802a810: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 802a814: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 802a818: c3 a0 00 00 ret <== NOT EXECUTED 08007bdc : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 8007bdc: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 8007be0: 38 42 32 f0 ori r2,r2,0x32f0 <== NOT EXECUTED 8007be4: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 8007be8: 0c 41 00 32 sh (r2+50),r1 <== NOT EXECUTED return 0; } 8007bec: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8007bf0: c3 a0 00 00 ret <== NOT EXECUTED 08004a50 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 8004a50: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED 8004a54: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8004a58: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8004a5c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 8004a60: 28 43 00 3c lw r3,(r2+60) <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 8004a64: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED 8004a68: b8 40 58 00 mv r11,r2 <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 8004a6c: 20 61 0e 78 andi r1,r3,0xe78 <== NOT EXECUTED 8004a70: 5c 20 00 0a bne r1,r0,8004a98 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 8004a74: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004a78: fb ff ff 7b calli 8004864 <== NOT EXECUTED 8004a7c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED } return i; } 8004a80: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004a84: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004a88: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8004a8c: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8004a90: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8004a94: c3 a0 00 00 ret <== NOT EXECUTED /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 8004a98: 28 41 00 18 lw r1,(r2+24) <== NOT EXECUTED 8004a9c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8004aa0: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 8004aa4: f8 00 07 85 calli 80068b8 <== NOT EXECUTED i = iproc (c, tty); 8004aa8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004aac: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004ab0: fb ff ff 6d calli 8004864 <== NOT EXECUTED 8004ab4: b8 20 60 00 mv r12,r1 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 8004ab8: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED 8004abc: f8 00 07 e0 calli 8006a3c <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 8004ac0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004ac4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004ac8: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8004acc: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8004ad0: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8004ad4: c3 a0 00 00 ret <== NOT EXECUTED 08009560 : int _STAT_NAME( const char *path, struct stat *buf ) { 8009560: 37 9c ff dc addi sp,sp,-36 8009564: 5b 8b 00 10 sw (sp+16),r11 8009568: 5b 8c 00 0c sw (sp+12),r12 800956c: 5b 8d 00 08 sw (sp+8),r13 8009570: 5b 9d 00 04 sw (sp+4),ra 8009574: b8 40 60 00 mv r12,r2 8009578: b8 20 58 00 mv r11,r1 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 800957c: 44 40 00 26 be r2,r0,8009614 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 8009580: f8 01 1b e6 calli 8050518 8009584: 37 8d 00 14 addi r13,sp,20 8009588: b8 20 10 00 mv r2,r1 800958c: 34 03 00 00 mvi r3,0 8009590: b9 60 08 00 mv r1,r11 8009594: b9 a0 20 00 mv r4,r13 8009598: 34 05 00 01 mvi r5,1 800959c: fb ff f8 f9 calli 8007980 80095a0: b8 20 18 00 mv r3,r1 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 80095a4: 34 0b ff ff mvi r11,-1 80095a8: 5c 20 00 14 bne r1,r0,80095f8 return -1; if ( !loc.handlers->fstat_h ){ 80095ac: 2b 81 00 1c lw r1,(sp+28) 80095b0: 28 22 00 18 lw r2,(r1+24) 80095b4: 44 43 00 23 be r2,r3,8009640 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 80095b8: b8 60 10 00 mv r2,r3 80095bc: b9 80 08 00 mv r1,r12 80095c0: 34 03 00 48 mvi r3,72 80095c4: f8 01 0d 41 calli 804cac8 status = (*loc.handlers->fstat_h)( &loc, buf ); 80095c8: 2b 83 00 1c lw r3,(sp+28) 80095cc: b9 80 10 00 mv r2,r12 80095d0: b9 a0 08 00 mv r1,r13 80095d4: 28 63 00 18 lw r3,(r3+24) 80095d8: d8 60 00 00 call r3 80095dc: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &loc ); 80095e0: 2b 81 00 20 lw r1,(sp+32) 80095e4: 44 20 00 05 be r1,r0,80095f8 80095e8: 28 22 00 1c lw r2,(r1+28) 80095ec: 44 40 00 03 be r2,r0,80095f8 80095f0: b9 a0 08 00 mv r1,r13 80095f4: d8 40 00 00 call r2 return status; } 80095f8: b9 60 08 00 mv r1,r11 80095fc: 2b 9d 00 04 lw ra,(sp+4) 8009600: 2b 8b 00 10 lw r11,(sp+16) 8009604: 2b 8c 00 0c lw r12,(sp+12) 8009608: 2b 8d 00 08 lw r13,(sp+8) 800960c: 37 9c 00 24 addi sp,sp,36 8009610: c3 a0 00 00 ret /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 8009614: f8 00 fd c1 calli 8048d18 <__errno> 8009618: 34 02 00 0e mvi r2,14 800961c: 34 0b ff ff mvi r11,-1 8009620: 58 22 00 00 sw (r1+0),r2 status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 8009624: b9 60 08 00 mv r1,r11 8009628: 2b 9d 00 04 lw ra,(sp+4) 800962c: 2b 8b 00 10 lw r11,(sp+16) 8009630: 2b 8c 00 0c lw r12,(sp+12) 8009634: 2b 8d 00 08 lw r13,(sp+8) 8009638: 37 9c 00 24 addi sp,sp,36 800963c: c3 a0 00 00 ret 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 8009640: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8009644: 44 22 00 05 be r1,r2,8009658 <== NOT EXECUTED 8009648: 28 23 00 1c lw r3,(r1+28) <== NOT EXECUTED 800964c: 44 62 00 03 be r3,r2,8009658 <== NOT EXECUTED 8009650: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8009654: d8 60 00 00 call r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8009658: f8 00 fd b0 calli 8048d18 <__errno> <== NOT EXECUTED 800965c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8009660: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8009664: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8009668: e3 ff ff e4 bi 80095f8 <== NOT EXECUTED 0802b8ec : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 802b8ec: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 802b8f0: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 802b8f4: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 802b8f8: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 802b8fc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 802b900: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 802b904: b8 40 58 00 mv r11,r2 <== NOT EXECUTED * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 802b908: 37 8d 00 14 addi r13,sp,20 <== NOT EXECUTED 802b90c: f8 00 93 03 calli 8050518 <== NOT EXECUTED 802b910: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 802b914: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 802b918: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802b91c: b9 a0 20 00 mv r4,r13 <== NOT EXECUTED 802b920: 34 05 00 01 mvi r5,1 <== NOT EXECUTED 802b924: fb ff 70 17 calli 8007980 <== NOT EXECUTED 802b928: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 802b92c: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 802b930: 5c 20 00 1f bne r1,r0,802b9ac <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 802b934: 2b 82 00 24 lw r2,(sp+36) <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 802b938: 28 41 00 28 lw r1,(r2+40) <== NOT EXECUTED 802b93c: 28 21 00 44 lw r1,(r1+68) <== NOT EXECUTED 802b940: 44 23 00 22 be r1,r3,802b9c8 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs)); 802b944: 59 63 00 34 sw (r11+52),r3 <== NOT EXECUTED 802b948: 59 63 00 00 sw (r11+0),r3 <== NOT EXECUTED 802b94c: 59 63 00 04 sw (r11+4),r3 <== NOT EXECUTED 802b950: 59 63 00 08 sw (r11+8),r3 <== NOT EXECUTED 802b954: 59 63 00 0c sw (r11+12),r3 <== NOT EXECUTED 802b958: 59 63 00 10 sw (r11+16),r3 <== NOT EXECUTED 802b95c: 59 63 00 14 sw (r11+20),r3 <== NOT EXECUTED 802b960: 59 63 00 18 sw (r11+24),r3 <== NOT EXECUTED 802b964: 59 63 00 1c sw (r11+28),r3 <== NOT EXECUTED 802b968: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED 802b96c: 59 63 00 24 sw (r11+36),r3 <== NOT EXECUTED 802b970: 59 63 00 28 sw (r11+40),r3 <== NOT EXECUTED 802b974: 59 63 00 2c sw (r11+44),r3 <== NOT EXECUTED 802b978: 59 63 00 30 sw (r11+48),r3 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 802b97c: 28 43 00 28 lw r3,(r2+40) <== NOT EXECUTED 802b980: 34 41 00 1c addi r1,r2,28 <== NOT EXECUTED 802b984: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 802b988: 28 63 00 44 lw r3,(r3+68) <== NOT EXECUTED 802b98c: d8 60 00 00 call r3 <== NOT EXECUTED 802b990: b8 20 60 00 mv r12,r1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 802b994: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 802b998: 44 20 00 05 be r1,r0,802b9ac <== NOT EXECUTED 802b99c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 802b9a0: 44 40 00 03 be r2,r0,802b9ac <== NOT EXECUTED 802b9a4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 802b9a8: d8 40 00 00 call r2 <== NOT EXECUTED return result; } 802b9ac: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802b9b0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802b9b4: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 802b9b8: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 802b9bc: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 802b9c0: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 802b9c4: c3 a0 00 00 ret <== NOT EXECUTED mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 802b9c8: f8 00 74 d4 calli 8048d18 <__errno> <== NOT EXECUTED 802b9cc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 802b9d0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 802b9d4: e3 ff ff f6 bi 802b9ac <== NOT EXECUTED 0802b9d8 : int symlink( const char *actualpath, const char *sympath ) { 802b9d8: 37 9c ff d8 addi sp,sp,-40 802b9dc: 5b 8b 00 10 sw (sp+16),r11 802b9e0: 5b 8c 00 0c sw (sp+12),r12 802b9e4: 5b 8d 00 08 sw (sp+8),r13 802b9e8: 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 ); 802b9ec: 40 43 00 00 lbu r3,(r2+0) int symlink( const char *actualpath, const char *sympath ) { 802b9f0: b8 20 68 00 mv r13,r1 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 802b9f4: 64 65 00 5c cmpei r5,r3,92 802b9f8: 64 64 00 2f cmpei r4,r3,47 802b9fc: b8 a4 20 00 or r4,r5,r4 802ba00: 5c 80 00 02 bne r4,r0,802ba08 802ba04: 5c 64 00 2f bne r3,r4,802bac0 802ba08: 78 03 08 07 mvhi r3,0x807 802ba0c: 38 63 32 f0 ori r3,r3,0x32f0 802ba10: 28 63 00 00 lw r3,(r3+0) 802ba14: 34 04 00 01 mvi r4,1 802ba18: 28 61 00 18 lw r1,(r3+24) 802ba1c: 5b 81 00 14 sw (sp+20),r1 802ba20: 28 61 00 1c lw r1,(r3+28) 802ba24: 5b 81 00 18 sw (sp+24),r1 802ba28: 28 61 00 20 lw r1,(r3+32) 802ba2c: 5b 81 00 1c sw (sp+28),r1 802ba30: 28 61 00 24 lw r1,(r3+36) 802ba34: 5b 81 00 20 sw (sp+32),r1 if ( !loc.ops->evalformake_h ) { 802ba38: 2b 81 00 20 lw r1,(sp+32) rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 802ba3c: 28 63 00 28 lw r3,(r3+40) if ( !loc.ops->evalformake_h ) { 802ba40: 28 25 00 04 lw r5,(r1+4) rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 802ba44: 5b 83 00 24 sw (sp+36),r3 if ( !loc.ops->evalformake_h ) { 802ba48: 44 a0 00 2e be r5,r0,802bb00 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 802ba4c: 37 8c 00 14 addi r12,sp,20 802ba50: b4 44 08 00 add r1,r2,r4 802ba54: 37 83 00 28 addi r3,sp,40 802ba58: b9 80 10 00 mv r2,r12 802ba5c: d8 a0 00 00 call r5 802ba60: b8 20 18 00 mv r3,r1 if ( result != 0 ) 802ba64: 34 0b ff ff mvi r11,-1 802ba68: 5c 20 00 0f bne r1,r0,802baa4 return -1; if ( !loc.ops->symlink_h ) { 802ba6c: 2b 81 00 20 lw r1,(sp+32) 802ba70: 28 24 00 38 lw r4,(r1+56) 802ba74: 44 83 00 2e be r4,r3,802bb2c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 802ba78: 2b 83 00 28 lw r3,(sp+40) 802ba7c: b9 a0 10 00 mv r2,r13 802ba80: b9 80 08 00 mv r1,r12 802ba84: d8 80 00 00 call r4 802ba88: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &loc ); 802ba8c: 2b 81 00 20 lw r1,(sp+32) 802ba90: 44 20 00 05 be r1,r0,802baa4 802ba94: 28 22 00 1c lw r2,(r1+28) 802ba98: 44 40 00 03 be r2,r0,802baa4 802ba9c: b9 80 08 00 mv r1,r12 802baa0: d8 40 00 00 call r2 return result; } 802baa4: b9 60 08 00 mv r1,r11 802baa8: 2b 9d 00 04 lw ra,(sp+4) 802baac: 2b 8b 00 10 lw r11,(sp+16) 802bab0: 2b 8c 00 0c lw r12,(sp+12) 802bab4: 2b 8d 00 08 lw r13,(sp+8) 802bab8: 37 9c 00 28 addi sp,sp,40 802babc: c3 a0 00 00 ret rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 802bac0: 78 01 08 07 mvhi r1,0x807 802bac4: 38 21 32 f0 ori r1,r1,0x32f0 802bac8: 28 23 00 00 lw r3,(r1+0) 802bacc: 28 61 00 04 lw r1,(r3+4) 802bad0: 5b 81 00 14 sw (sp+20),r1 802bad4: 28 61 00 08 lw r1,(r3+8) 802bad8: 5b 81 00 18 sw (sp+24),r1 802badc: 28 61 00 0c lw r1,(r3+12) 802bae0: 5b 81 00 1c sw (sp+28),r1 802bae4: 28 61 00 10 lw r1,(r3+16) 802bae8: 5b 81 00 20 sw (sp+32),r1 if ( !loc.ops->evalformake_h ) { 802baec: 2b 81 00 20 lw r1,(sp+32) rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 802baf0: 28 63 00 14 lw r3,(r3+20) if ( !loc.ops->evalformake_h ) { 802baf4: 28 25 00 04 lw r5,(r1+4) rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 802baf8: 5b 83 00 24 sw (sp+36),r3 if ( !loc.ops->evalformake_h ) { 802bafc: 5c a0 ff d4 bne r5,r0,802ba4c if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 802bb00: f8 00 74 86 calli 8048d18 <__errno> <== NOT EXECUTED 802bb04: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 802bb08: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 802bb0c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 802bb10: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802bb14: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802bb18: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 802bb1c: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 802bb20: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 802bb24: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED 802bb28: c3 a0 00 00 ret <== NOT EXECUTED result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 802bb2c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 802bb30: 44 44 ff f4 be r2,r4,802bb00 <== NOT EXECUTED 802bb34: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802bb38: d8 40 00 00 call r2 <== NOT EXECUTED 802bb3c: e3 ff ff f1 bi 802bb00 <== NOT EXECUTED 08012d94 : int tcsetattr( int fd, int opt, struct termios *tp ) { 8012d94: 37 9c ff f4 addi sp,sp,-12 8012d98: 5b 8b 00 0c sw (sp+12),r11 8012d9c: 5b 8c 00 08 sw (sp+8),r12 8012da0: 5b 9d 00 04 sw (sp+4),ra 8012da4: b8 60 58 00 mv r11,r3 8012da8: b8 20 60 00 mv r12,r1 switch (opt) { 8012dac: 44 40 00 0c be r2,r0,8012ddc 8012db0: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8012db4: 44 43 00 13 be r2,r3,8012e00 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 8012db8: f8 00 1a 3b calli 80196a4 <__errno> <== NOT EXECUTED 8012dbc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8012dc0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8012dc4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 8012dc8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8012dcc: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8012dd0: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8012dd4: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8012dd8: c3 a0 00 00 ret <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 8012ddc: b9 80 08 00 mv r1,r12 8012de0: b9 60 18 00 mv r3,r11 8012de4: 34 02 00 02 mvi r2,2 8012de8: f8 00 12 4d calli 801771c } } 8012dec: 2b 9d 00 04 lw ra,(sp+4) 8012df0: 2b 8b 00 0c lw r11,(sp+12) 8012df4: 2b 8c 00 08 lw r12,(sp+8) 8012df8: 37 9c 00 0c addi sp,sp,12 8012dfc: c3 a0 00 00 ret switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 8012e00: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8012e04: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8012e08: f8 00 12 45 calli 801771c <== NOT EXECUTED 8012e0c: 4c 20 ff f4 bge r1,r0,8012ddc <== NOT EXECUTED 8012e10: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8012e14: e3 ff ff ed bi 8012dc8 <== NOT EXECUTED 080027dc : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 80027dc: 37 9c ff e8 addi sp,sp,-24 80027e0: 5b 8b 00 18 sw (sp+24),r11 80027e4: 5b 8c 00 14 sw (sp+20),r12 80027e8: 5b 8d 00 10 sw (sp+16),r13 80027ec: 5b 8e 00 0c sw (sp+12),r14 80027f0: 5b 8f 00 08 sw (sp+8),r15 80027f4: 5b 9d 00 04 sw (sp+4),ra 80027f8: b8 40 60 00 mv r12,r2 POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 80027fc: 34 02 00 01 mvi r2,1 int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 8002800: b8 60 68 00 mv r13,r3 POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 8002804: 5c 22 00 06 bne r1,r2,800281c rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 8002808: 44 60 00 05 be r3,r0,800281c /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 800280c: 45 80 00 16 be r12,r0,8002864 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 8002810: 29 82 00 00 lw r2,(r12+0) 8002814: 34 42 ff ff addi r2,r2,-1 8002818: 50 22 00 0d bgeu r1,r2,800284c if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 800281c: f8 00 2e b3 calli 800e2e8 <__errno> 8002820: 34 02 00 16 mvi r2,22 8002824: 58 22 00 00 sw (r1+0),r2 8002828: 34 01 ff ff mvi r1,-1 _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } 800282c: 2b 9d 00 04 lw ra,(sp+4) 8002830: 2b 8b 00 18 lw r11,(sp+24) 8002834: 2b 8c 00 14 lw r12,(sp+20) 8002838: 2b 8d 00 10 lw r13,(sp+16) 800283c: 2b 8e 00 0c lw r14,(sp+12) 8002840: 2b 8f 00 08 lw r15,(sp+8) 8002844: 37 9c 00 18 addi sp,sp,24 8002848: c3 a0 00 00 ret ( 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 ) 800284c: 29 81 00 04 lw r1,(r12+4) 8002850: 44 20 ff f3 be r1,r0,800281c rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 8002854: 34 21 ff ff addi r1,r1,-1 8002858: 34 02 00 1f mvi r2,31 800285c: 50 41 00 02 bgeu r2,r1,8002864 8002860: e3 ff ff ef bi 800281c <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 8002864: 78 01 08 02 mvhi r1,0x802 8002868: 38 21 38 b4 ori r1,r1,0x38b4 800286c: 28 22 00 00 lw r2,(r1+0) 8002870: 34 42 00 01 addi r2,r2,1 8002874: 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 ); 8002878: 78 01 08 02 mvhi r1,0x802 800287c: 38 21 3b 74 ori r1,r1,0x3b74 8002880: f8 00 05 e8 calli 8004020 <_Objects_Allocate> 8002884: b8 20 58 00 mv r11,r1 /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 8002888: 44 20 00 2e be r1,r0,8002940 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; 800288c: 34 02 00 02 mvi r2,2 ptimer->thread_id = _Thread_Executing->Object.id; 8002890: 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; 8002894: 31 62 00 3c sb (r11+60),r2 ptimer->thread_id = _Thread_Executing->Object.id; 8002898: 38 21 39 70 ori r1,r1,0x3970 800289c: 28 21 00 00 lw r1,(r1+0) 80028a0: 28 21 00 08 lw r1,(r1+8) 80028a4: 59 61 00 38 sw (r11+56),r1 if ( evp != NULL ) { 80028a8: 45 80 00 07 be r12,r0,80028c4 ptimer->inf.sigev_notify = evp->sigev_notify; ptimer->inf.sigev_signo = evp->sigev_signo; ptimer->inf.sigev_value = evp->sigev_value; 80028ac: 29 81 00 08 lw r1,(r12+8) 80028b0: 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; 80028b4: 29 81 00 00 lw r1,(r12+0) ptimer->inf.sigev_signo = evp->sigev_signo; 80028b8: 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; 80028bc: 59 61 00 40 sw (r11+64),r1 ptimer->inf.sigev_signo = evp->sigev_signo; 80028c0: 59 6c 00 44 sw (r11+68),r12 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 80028c4: 29 6e 00 08 lw r14,(r11+8) 80028c8: 78 01 08 02 mvhi r1,0x802 80028cc: 38 21 3b 74 ori r1,r1,0x3b74 ptimer->inf.sigev_value = evp->sigev_value; } ptimer->overrun = 0; 80028d0: 34 0c 00 00 mvi r12,0 80028d4: 28 2f 00 1c lw r15,(r1+28) 80028d8: 34 02 00 02 mvi r2,2 80028dc: 59 6c 00 68 sw (r11+104),r12 ptimer->timer_data.it_value.tv_sec = 0; 80028e0: 59 6c 00 5c sw (r11+92),r12 ptimer->timer_data.it_value.tv_nsec = 0; 80028e4: 59 6c 00 60 sw (r11+96),r12 ptimer->timer_data.it_interval.tv_sec = 0; 80028e8: 59 6c 00 54 sw (r11+84),r12 ptimer->timer_data.it_interval.tv_nsec = 0; 80028ec: 59 6c 00 58 sw (r11+88),r12 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 80028f0: 59 6c 00 18 sw (r11+24),r12 the_watchdog->routine = routine; 80028f4: 59 6c 00 2c sw (r11+44),r12 the_watchdog->id = id; 80028f8: 59 6c 00 30 sw (r11+48),r12 the_watchdog->user_data = user_data; 80028fc: 59 6c 00 34 sw (r11+52),r12 8002900: 21 c1 ff ff andi r1,r14,0xffff 8002904: fb ff f7 2c calli 80005b4 <__ashlsi3> 8002908: b5 e1 08 00 add r1,r15,r1 800290c: 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; 8002910: 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; 8002914: 59 ae 00 00 sw (r13+0),r14 _Thread_Enable_dispatch(); 8002918: f8 00 08 85 calli 8004b2c <_Thread_Enable_dispatch> 800291c: b9 80 08 00 mv r1,r12 return 0; } 8002920: 2b 9d 00 04 lw ra,(sp+4) 8002924: 2b 8b 00 18 lw r11,(sp+24) 8002928: 2b 8c 00 14 lw r12,(sp+20) 800292c: 2b 8d 00 10 lw r13,(sp+16) 8002930: 2b 8e 00 0c lw r14,(sp+12) 8002934: 2b 8f 00 08 lw r15,(sp+8) 8002938: 37 9c 00 18 addi sp,sp,24 800293c: c3 a0 00 00 ret /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); 8002940: f8 00 08 7b calli 8004b2c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 8002944: f8 00 2e 69 calli 800e2e8 <__errno> 8002948: 34 02 00 0b mvi r2,11 800294c: 58 22 00 00 sw (r1+0),r2 8002950: 34 01 ff ff mvi r1,-1 8002954: e3 ff ff f3 bi 8002920 08002958 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 8002958: 37 9c ff c8 addi sp,sp,-56 800295c: 5b 8b 00 18 sw (sp+24),r11 8002960: 5b 8c 00 14 sw (sp+20),r12 8002964: 5b 8d 00 10 sw (sp+16),r13 8002968: 5b 8e 00 0c sw (sp+12),r14 800296c: 5b 8f 00 08 sw (sp+8),r15 8002970: 5b 9d 00 04 sw (sp+4),ra 8002974: b8 60 60 00 mv r12,r3 8002978: b8 20 58 00 mv r11,r1 800297c: b8 80 68 00 mv r13,r4 Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 8002980: 44 60 00 1c be r3,r0,80029f0 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 ) || 8002984: 28 64 00 0c lw r4,(r3+12) 8002988: 78 03 3b 9a mvhi r3,0x3b9a 800298c: 38 63 c9 ff ori r3,r3,0xc9ff 8002990: 54 83 00 18 bgu r4,r3,80029f0 ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 8002994: 29 85 00 04 lw r5,(r12+4) 8002998: 50 65 00 02 bgeu r3,r5,80029a0 800299c: e0 00 00 15 bi 80029f0 <== 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 ) { 80029a0: 7c 43 00 00 cmpnei r3,r2,0 80029a4: 7c 41 00 04 cmpnei r1,r2,4 80029a8: a0 61 08 00 and r1,r3,r1 80029ac: 5c 20 00 11 bne r1,r0,80029f0 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 80029b0: 29 81 00 00 lw r1,(r12+0) 80029b4: 5b 81 00 20 sw (sp+32),r1 80029b8: 29 83 00 08 lw r3,(r12+8) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 80029bc: 34 01 00 04 mvi r1,4 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 80029c0: 5b 85 00 24 sw (sp+36),r5 80029c4: 5b 83 00 28 sw (sp+40),r3 80029c8: 5b 84 00 2c sw (sp+44),r4 /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 80029cc: 44 41 00 45 be r2,r1,8002ae0 RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 80029d0: 78 01 08 02 mvhi r1,0x802 80029d4: b9 60 10 00 mv r2,r11 80029d8: 38 21 3b 74 ori r1,r1,0x3b74 80029dc: 37 83 00 38 addi r3,sp,56 80029e0: f8 00 06 c8 calli 8004500 <_Objects_Get> 80029e4: b8 20 58 00 mv r11,r1 * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 80029e8: 2b 81 00 38 lw r1,(sp+56) 80029ec: 44 20 00 0d be r1,r0,8002a20 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 80029f0: f8 00 2e 3e calli 800e2e8 <__errno> 80029f4: 34 02 00 16 mvi r2,22 80029f8: 58 22 00 00 sw (r1+0),r2 80029fc: 34 01 ff ff mvi r1,-1 } 8002a00: 2b 9d 00 04 lw ra,(sp+4) 8002a04: 2b 8b 00 18 lw r11,(sp+24) 8002a08: 2b 8c 00 14 lw r12,(sp+20) 8002a0c: 2b 8d 00 10 lw r13,(sp+16) 8002a10: 2b 8e 00 0c lw r14,(sp+12) 8002a14: 2b 8f 00 08 lw r15,(sp+8) 8002a18: 37 9c 00 38 addi sp,sp,56 8002a1c: c3 a0 00 00 ret ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 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 ) { 8002a20: 2b 82 00 28 lw r2,(sp+40) 8002a24: 5c 41 00 03 bne r2,r1,8002a30 8002a28: 2b 8e 00 2c lw r14,(sp+44) 8002a2c: 45 c2 00 3a be r14,r2,8002b14 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 8002a30: b9 80 08 00 mv r1,r12 8002a34: f8 00 0a 79 calli 8005418 <_Timespec_To_ticks> 8002a38: 59 61 00 64 sw (r11+100),r1 initial_period = _Timespec_To_ticks( &normalize.it_value ); 8002a3c: 37 81 00 28 addi r1,sp,40 8002a40: f8 00 0a 76 calli 8005418 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 8002a44: 29 63 00 08 lw r3,(r11+8) 8002a48: 78 04 08 00 mvhi r4,0x800 8002a4c: b8 20 10 00 mv r2,r1 8002a50: 38 84 2b bc ori r4,r4,0x2bbc 8002a54: 35 61 00 10 addi r1,r11,16 8002a58: b9 60 28 00 mv r5,r11 8002a5c: f8 00 17 6c calli 800880c <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 8002a60: 44 20 00 4c be r1,r0,8002b90 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 8002a64: 45 a0 00 09 be r13,r0,8002a88 *ovalue = ptimer->timer_data; 8002a68: 29 61 00 54 lw r1,(r11+84) 8002a6c: 59 a1 00 00 sw (r13+0),r1 8002a70: 29 62 00 58 lw r2,(r11+88) 8002a74: 59 a2 00 04 sw (r13+4),r2 8002a78: 29 63 00 5c lw r3,(r11+92) 8002a7c: 59 a3 00 08 sw (r13+8),r3 8002a80: 29 61 00 60 lw r1,(r11+96) 8002a84: 59 a1 00 0c sw (r13+12),r1 ptimer->timer_data = normalize; 8002a88: 2b 82 00 20 lw r2,(sp+32) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); 8002a8c: 35 61 00 6c addi r1,r11,108 * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; 8002a90: 59 62 00 54 sw (r11+84),r2 8002a94: 2b 83 00 24 lw r3,(sp+36) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 8002a98: 34 02 00 03 mvi r2,3 * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; 8002a9c: 59 63 00 58 sw (r11+88),r3 8002aa0: 2b 83 00 28 lw r3,(sp+40) 8002aa4: 59 63 00 5c sw (r11+92),r3 8002aa8: 2b 83 00 2c lw r3,(sp+44) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 8002aac: 31 62 00 3c sb (r11+60),r2 * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; 8002ab0: 59 63 00 60 sw (r11+96),r3 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); 8002ab4: f8 00 03 a7 calli 8003950 <_TOD_Get> _Thread_Enable_dispatch(); 8002ab8: f8 00 08 1d calli 8004b2c <_Thread_Enable_dispatch> 8002abc: 34 01 00 00 mvi r1,0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 8002ac0: 2b 9d 00 04 lw ra,(sp+4) 8002ac4: 2b 8b 00 18 lw r11,(sp+24) 8002ac8: 2b 8c 00 14 lw r12,(sp+20) 8002acc: 2b 8d 00 10 lw r13,(sp+16) 8002ad0: 2b 8e 00 0c lw r14,(sp+12) 8002ad4: 2b 8f 00 08 lw r15,(sp+8) 8002ad8: 37 9c 00 38 addi sp,sp,56 8002adc: c3 a0 00 00 ret normalize = *value; /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 8002ae0: 37 8e 00 30 addi r14,sp,48 8002ae4: b9 c0 08 00 mv r1,r14 8002ae8: f8 00 03 9a calli 8003950 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 8002aec: 37 8f 00 28 addi r15,sp,40 8002af0: b9 c0 08 00 mv r1,r14 8002af4: b9 e0 10 00 mv r2,r15 8002af8: f8 00 0a 27 calli 8005394 <_Timespec_Greater_than> 8002afc: 5c 20 ff bd bne r1,r0,80029f0 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 8002b00: b9 e0 10 00 mv r2,r15 8002b04: b9 c0 08 00 mv r1,r14 8002b08: b9 e0 18 00 mv r3,r15 8002b0c: f8 00 0a 2e calli 80053c4 <_Timespec_Subtract> 8002b10: e3 ff ff b0 bi 80029d0 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 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 8002b14: 35 61 00 10 addi r1,r11,16 8002b18: f8 00 0b ae calli 80059d0 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 8002b1c: 45 ae 00 09 be r13,r14,8002b40 *ovalue = ptimer->timer_data; 8002b20: 29 61 00 54 lw r1,(r11+84) 8002b24: 59 a1 00 00 sw (r13+0),r1 8002b28: 29 62 00 58 lw r2,(r11+88) 8002b2c: 59 a2 00 04 sw (r13+4),r2 8002b30: 29 63 00 5c lw r3,(r11+92) 8002b34: 59 a3 00 08 sw (r13+8),r3 8002b38: 29 61 00 60 lw r1,(r11+96) 8002b3c: 59 a1 00 0c sw (r13+12),r1 /* The new data are set */ ptimer->timer_data = normalize; 8002b40: 2b 82 00 20 lw r2,(sp+32) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 8002b44: 34 01 00 04 mvi r1,4 (void) _Watchdog_Remove( &ptimer->Timer ); /* The old data of the timer are returned */ if ( ovalue ) *ovalue = ptimer->timer_data; /* The new data are set */ ptimer->timer_data = normalize; 8002b48: 59 62 00 54 sw (r11+84),r2 8002b4c: 2b 83 00 24 lw r3,(sp+36) 8002b50: 59 63 00 58 sw (r11+88),r3 8002b54: 2b 82 00 28 lw r2,(sp+40) 8002b58: 59 62 00 5c sw (r11+92),r2 8002b5c: 2b 83 00 2c lw r3,(sp+44) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 8002b60: 31 61 00 3c sb (r11+60),r1 (void) _Watchdog_Remove( &ptimer->Timer ); /* The old data of the timer are returned */ if ( ovalue ) *ovalue = ptimer->timer_data; /* The new data are set */ ptimer->timer_data = normalize; 8002b64: 59 63 00 60 sw (r11+96),r3 /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; /* Returns with success */ _Thread_Enable_dispatch(); 8002b68: f8 00 07 f1 calli 8004b2c <_Thread_Enable_dispatch> 8002b6c: 34 01 00 00 mvi r1,0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 8002b70: 2b 9d 00 04 lw ra,(sp+4) 8002b74: 2b 8b 00 18 lw r11,(sp+24) 8002b78: 2b 8c 00 14 lw r12,(sp+20) 8002b7c: 2b 8d 00 10 lw r13,(sp+16) 8002b80: 2b 8e 00 0c lw r14,(sp+12) 8002b84: 2b 8f 00 08 lw r15,(sp+8) 8002b88: 37 9c 00 38 addi sp,sp,56 8002b8c: c3 a0 00 00 ret ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch(); 8002b90: 5b 81 00 1c sw (sp+28),r1 8002b94: f8 00 07 e6 calli 8004b2c <_Thread_Enable_dispatch> 8002b98: 2b 81 00 1c lw r1,(sp+28) case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 8002b9c: 2b 9d 00 04 lw ra,(sp+4) 8002ba0: 2b 8b 00 18 lw r11,(sp+24) 8002ba4: 2b 8c 00 14 lw r12,(sp+20) 8002ba8: 2b 8d 00 10 lw r13,(sp+16) 8002bac: 2b 8e 00 0c lw r14,(sp+12) 8002bb0: 2b 8f 00 08 lw r15,(sp+8) 8002bb4: 37 9c 00 38 addi sp,sp,56 8002bb8: c3 a0 00 00 ret 080089b4 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 80089b4: 37 9c ff e8 addi sp,sp,-24 80089b8: 5b 8b 00 10 sw (sp+16),r11 80089bc: 5b 8c 00 0c sw (sp+12),r12 80089c0: 5b 8d 00 08 sw (sp+8),r13 80089c4: 5b 9d 00 04 sw (sp+4),ra /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 80089c8: 78 0b 08 01 mvhi r11,0x801 80089cc: 39 6b f1 00 ori r11,r11,0xf100 80089d0: 29 62 00 1c lw r2,(r11+28) useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 80089d4: b8 20 60 00 mv r12,r1 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 80089d8: 44 40 00 25 be r2,r0,8008a6c _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 80089dc: b9 60 08 00 mv r1,r11 80089e0: fb ff f4 f3 calli 8005dac <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 80089e4: 34 21 ff fe addi r1,r1,-2 80089e8: 34 02 00 01 mvi r2,1 80089ec: 50 41 00 28 bgeu r2,r1,8008a8c 80089f0: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED /* * 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 ) { 80089f4: 45 80 00 17 be r12,r0,8008a50 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 80089f8: 78 02 00 0f mvhi r2,0xf 80089fc: 38 42 42 40 ori r2,r2,0x4240 8008a00: b9 80 08 00 mv r1,r12 8008a04: f8 00 4b 4d calli 801b738 <__udivsi3> tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 8008a08: 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; 8008a0c: 5b 81 00 14 sw (sp+20),r1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 8008a10: 38 42 42 40 ori r2,r2,0x4240 8008a14: b9 80 08 00 mv r1,r12 8008a18: f8 00 4b 58 calli 801b778 <__umodsi3> 8008a1c: 34 02 03 e8 mvi r2,1000 8008a20: f8 00 4a c7 calli 801b53c <__mulsi3> ticks = _Timespec_To_ticks( &tp ); 8008a24: 37 8c 00 14 addi r12,sp,20 */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 8008a28: 5b 81 00 18 sw (sp+24),r1 ticks = _Timespec_To_ticks( &tp ); 8008a2c: b9 80 08 00 mv r1,r12 8008a30: f8 00 07 1c calli 800a6a0 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 8008a34: b9 80 08 00 mv r1,r12 8008a38: f8 00 07 1a calli 800a6a0 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 8008a3c: 59 61 00 0c sw (r11+12),r1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 8008a40: 78 01 08 01 mvhi r1,0x801 8008a44: 38 21 e9 80 ori r1,r1,0xe980 8008a48: b9 60 10 00 mv r2,r11 8008a4c: fb ff f4 71 calli 8005c10 <_Watchdog_Insert> } return remaining; } 8008a50: b9 a0 08 00 mv r1,r13 8008a54: 2b 9d 00 04 lw ra,(sp+4) 8008a58: 2b 8b 00 10 lw r11,(sp+16) 8008a5c: 2b 8c 00 0c lw r12,(sp+12) 8008a60: 2b 8d 00 08 lw r13,(sp+8) 8008a64: 37 9c 00 18 addi sp,sp,24 8008a68: c3 a0 00 00 ret Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 8008a6c: 78 01 08 00 mvhi r1,0x800 8008a70: 38 21 8a d0 ori r1,r1,0x8ad0 8008a74: 59 61 00 1c sw (r11+28),r1 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 8008a78: 59 62 00 08 sw (r11+8),r2 the_watchdog->routine = routine; the_watchdog->id = id; 8008a7c: 59 62 00 20 sw (r11+32),r2 the_watchdog->user_data = user_data; 8008a80: 59 62 00 24 sw (r11+36),r2 8008a84: b8 40 68 00 mv r13,r2 8008a88: e3 ff ff db bi 80089f4 * 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); 8008a8c: 29 64 00 14 lw r4,(r11+20) 8008a90: 29 61 00 0c lw r1,(r11+12) /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 8008a94: 29 63 00 18 lw r3,(r11+24) 8008a98: 37 82 00 14 addi r2,sp,20 * 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); 8008a9c: b4 81 08 00 add r1,r4,r1 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 8008aa0: c8 23 08 00 sub r1,r1,r3 8008aa4: f8 00 06 e5 calli 800a638 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 8008aa8: 2b 81 00 14 lw r1,(sp+20) 8008aac: 78 02 00 0f mvhi r2,0xf 8008ab0: 38 42 42 40 ori r2,r2,0x4240 8008ab4: f8 00 4a a2 calli 801b53c <__mulsi3> 8008ab8: b8 20 68 00 mv r13,r1 remaining += tp.tv_nsec / 1000; 8008abc: 2b 81 00 18 lw r1,(sp+24) 8008ac0: 34 02 03 e8 mvi r2,1000 8008ac4: f8 00 4a be calli 801b5bc <__divsi3> 8008ac8: b4 2d 68 00 add r13,r1,r13 8008acc: e3 ff ff ca bi 80089f4 0800cadc : #include int unlink( const char *path ) { 800cadc: 37 9c ff c4 addi sp,sp,-60 800cae0: 5b 8b 00 14 sw (sp+20),r11 800cae4: 5b 8c 00 10 sw (sp+16),r12 800cae8: 5b 8d 00 0c sw (sp+12),r13 800caec: 5b 8e 00 08 sw (sp+8),r14 800caf0: 5b 9d 00 04 sw (sp+4),ra 800caf4: b8 20 60 00 mv r12,r1 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 800caf8: fb ff d0 95 calli 8000d4c 800cafc: b8 20 58 00 mv r11,r1 if ( parentpathlen == 0 ) 800cb00: 5c 20 00 6e bne r1,r0,800ccb8 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 800cb04: 41 82 00 00 lbu r2,(r12+0) 800cb08: 64 43 00 5c cmpei r3,r2,92 800cb0c: 64 41 00 2f cmpei r1,r2,47 800cb10: b8 61 08 00 or r1,r3,r1 800cb14: 44 2b 00 4e be r1,r11,800cc4c 800cb18: 78 01 08 01 mvhi r1,0x801 800cb1c: 38 21 e1 10 ori r1,r1,0xe110 800cb20: 28 22 00 00 lw r2,(r1+0) 800cb24: 34 0d 00 00 mvi r13,0 800cb28: 28 41 00 18 lw r1,(r2+24) 800cb2c: 5b 81 00 2c sw (sp+44),r1 800cb30: 28 41 00 1c lw r1,(r2+28) 800cb34: 5b 81 00 30 sw (sp+48),r1 800cb38: 28 41 00 20 lw r1,(r2+32) 800cb3c: 5b 81 00 34 sw (sp+52),r1 800cb40: 28 41 00 24 lw r1,(r2+36) 800cb44: 5b 81 00 38 sw (sp+56),r1 800cb48: 28 42 00 28 lw r2,(r2+40) 800cb4c: 5b 82 00 3c sw (sp+60),r2 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 800cb50: 2b 82 00 2c lw r2,(sp+44) name = path + parentpathlen; 800cb54: b5 8b 58 00 add r11,r12,r11 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 800cb58: b9 60 08 00 mv r1,r11 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 800cb5c: 5b 82 00 18 sw (sp+24),r2 800cb60: 2b 82 00 30 lw r2,(sp+48) 800cb64: 5b 82 00 1c sw (sp+28),r2 800cb68: 2b 82 00 34 lw r2,(sp+52) 800cb6c: 5b 82 00 20 sw (sp+32),r2 800cb70: 2b 82 00 38 lw r2,(sp+56) 800cb74: 5b 82 00 24 sw (sp+36),r2 800cb78: 2b 82 00 3c lw r2,(sp+60) 800cb7c: 5b 82 00 28 sw (sp+40),r2 name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 800cb80: f8 00 07 5a calli 800e8e8 800cb84: b8 20 10 00 mv r2,r1 800cb88: b9 60 08 00 mv r1,r11 800cb8c: fb ff d0 57 calli 8000ce8 800cb90: b5 61 60 00 add r12,r11,r1 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 800cb94: b9 80 08 00 mv r1,r12 800cb98: f8 00 07 54 calli 800e8e8 800cb9c: 34 03 00 00 mvi r3,0 800cba0: 37 8b 00 18 addi r11,sp,24 800cba4: b8 20 10 00 mv r2,r1 800cba8: b9 60 20 00 mv r4,r11 800cbac: b9 80 08 00 mv r1,r12 800cbb0: b8 60 28 00 mv r5,r3 800cbb4: fb ff d0 83 calli 8000dc0 0, &loc, false ); if ( result != 0 ) { 800cbb8: 5c 20 00 35 bne r1,r0,800cc8c if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { 800cbbc: 2b 83 00 24 lw r3,(sp+36) 800cbc0: 28 62 00 10 lw r2,(r3+16) 800cbc4: 44 41 00 58 be r2,r1,800cd24 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 ) { 800cbc8: b9 60 08 00 mv r1,r11 800cbcc: d8 40 00 00 call r2 800cbd0: 34 02 00 01 mvi r2,1 800cbd4: 44 22 00 42 be r1,r2,800ccdc if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { 800cbd8: 2b 81 00 24 lw r1,(sp+36) 800cbdc: 28 23 00 0c lw r3,(r1+12) 800cbe0: 44 60 00 61 be r3,r0,800cd64 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 800cbe4: 37 8e 00 2c addi r14,sp,44 800cbe8: b9 60 10 00 mv r2,r11 800cbec: b9 c0 08 00 mv r1,r14 800cbf0: d8 60 00 00 call r3 rtems_filesystem_freenode( &loc ); 800cbf4: 2b 82 00 24 lw r2,(sp+36) if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 800cbf8: b8 20 60 00 mv r12,r1 rtems_filesystem_freenode( &loc ); 800cbfc: 44 40 00 05 be r2,r0,800cc10 800cc00: 28 42 00 1c lw r2,(r2+28) 800cc04: 44 40 00 03 be r2,r0,800cc10 800cc08: b9 60 08 00 mv r1,r11 800cc0c: d8 40 00 00 call r2 if ( free_parentloc ) 800cc10: 45 a0 00 07 be r13,r0,800cc2c rtems_filesystem_freenode( &parentloc ); 800cc14: 2b 81 00 38 lw r1,(sp+56) 800cc18: 44 20 00 05 be r1,r0,800cc2c 800cc1c: 28 22 00 1c lw r2,(r1+28) 800cc20: 44 40 00 03 be r2,r0,800cc2c 800cc24: b9 c0 08 00 mv r1,r14 800cc28: d8 40 00 00 call r2 return result; } 800cc2c: b9 80 08 00 mv r1,r12 800cc30: 2b 9d 00 04 lw ra,(sp+4) 800cc34: 2b 8b 00 14 lw r11,(sp+20) 800cc38: 2b 8c 00 10 lw r12,(sp+16) 800cc3c: 2b 8d 00 0c lw r13,(sp+12) 800cc40: 2b 8e 00 08 lw r14,(sp+8) 800cc44: 37 9c 00 3c addi sp,sp,60 800cc48: c3 a0 00 00 ret */ parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); 800cc4c: 44 40 ff b3 be r2,r0,800cb18 <== NOT EXECUTED 800cc50: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800cc54: 38 21 e1 10 ori r1,r1,0xe110 <== NOT EXECUTED 800cc58: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 800cc5c: b9 60 68 00 mv r13,r11 <== NOT EXECUTED 800cc60: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 800cc64: 5b 82 00 2c sw (sp+44),r2 <== NOT EXECUTED 800cc68: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED 800cc6c: 5b 82 00 30 sw (sp+48),r2 <== NOT EXECUTED 800cc70: 28 22 00 0c lw r2,(r1+12) <== NOT EXECUTED 800cc74: 5b 82 00 34 sw (sp+52),r2 <== NOT EXECUTED 800cc78: 28 22 00 10 lw r2,(r1+16) <== NOT EXECUTED 800cc7c: 5b 82 00 38 sw (sp+56),r2 <== NOT EXECUTED 800cc80: 28 21 00 14 lw r1,(r1+20) <== NOT EXECUTED 800cc84: 5b 81 00 3c sw (sp+60),r1 <== NOT EXECUTED 800cc88: e3 ff ff b2 bi 800cb50 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 800cc8c: 5d a0 00 03 bne r13,r0,800cc98 result = (*loc.ops->unlink_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 800cc90: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 800cc94: e3 ff ff e6 bi 800cc2c <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 800cc98: 2b 81 00 38 lw r1,(sp+56) 800cc9c: 44 20 ff fd be r1,r0,800cc90 800cca0: 28 22 00 1c lw r2,(r1+28) 800cca4: 44 40 ff fb be r2,r0,800cc90 800cca8: 37 81 00 2c addi r1,sp,44 800ccac: d8 40 00 00 call r2 800ccb0: 34 0c ff ff mvi r12,-1 800ccb4: e3 ff ff de bi 800cc2c parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 800ccb8: b9 80 08 00 mv r1,r12 800ccbc: b9 60 10 00 mv r2,r11 800ccc0: 34 03 00 02 mvi r3,2 800ccc4: 37 84 00 2c addi r4,sp,44 800ccc8: 34 05 00 00 mvi r5,0 800cccc: fb ff d0 80 calli 8000ecc RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 800ccd0: 5c 20 ff f0 bne r1,r0,800cc90 800ccd4: 34 0d 00 01 mvi r13,1 800ccd8: e3 ff ff 9e bi 800cb50 rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 800ccdc: 2b 81 00 24 lw r1,(sp+36) 800cce0: 44 20 00 05 be r1,r0,800ccf4 800cce4: 28 22 00 1c lw r2,(r1+28) 800cce8: 44 40 00 03 be r2,r0,800ccf4 800ccec: b9 60 08 00 mv r1,r11 800ccf0: d8 40 00 00 call r2 if ( free_parentloc ) 800ccf4: 45 a0 00 07 be r13,r0,800cd10 rtems_filesystem_freenode( &parentloc ); 800ccf8: 2b 81 00 38 lw r1,(sp+56) <== NOT EXECUTED 800ccfc: 44 20 00 05 be r1,r0,800cd10 <== NOT EXECUTED 800cd00: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800cd04: 44 40 00 03 be r2,r0,800cd10 <== NOT EXECUTED 800cd08: 37 81 00 2c addi r1,sp,44 <== NOT EXECUTED 800cd0c: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 800cd10: f8 00 02 26 calli 800d5a8 <__errno> 800cd14: 34 02 00 15 mvi r2,21 800cd18: 58 22 00 00 sw (r1+0),r2 800cd1c: 34 0c ff ff mvi r12,-1 800cd20: e3 ff ff c3 bi 800cc2c rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 800cd24: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED 800cd28: 44 62 00 03 be r3,r2,800cd34 <== NOT EXECUTED 800cd2c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800cd30: d8 60 00 00 call r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); if ( free_parentloc ) 800cd34: 45 a0 00 07 be r13,r0,800cd50 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 800cd38: 2b 81 00 38 lw r1,(sp+56) <== NOT EXECUTED 800cd3c: 44 20 00 05 be r1,r0,800cd50 <== NOT EXECUTED 800cd40: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800cd44: 44 40 00 03 be r2,r0,800cd50 <== NOT EXECUTED 800cd48: 37 81 00 2c addi r1,sp,44 <== NOT EXECUTED 800cd4c: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 800cd50: f8 00 02 16 calli 800d5a8 <__errno> <== NOT EXECUTED 800cd54: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 800cd58: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800cd5c: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 800cd60: e3 ff ff b3 bi 800cc2c <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); 800cd64: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800cd68: 44 43 ff f3 be r2,r3,800cd34 <== NOT EXECUTED 800cd6c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800cd70: d8 40 00 00 call r2 <== NOT EXECUTED 800cd74: e3 ff ff f0 bi 800cd34 <== NOT EXECUTED 08009998 : */ int unmount( const char *path ) { 8009998: 37 9c ff dc addi sp,sp,-36 800999c: 5b 8b 00 10 sw (sp+16),r11 80099a0: 5b 8c 00 0c sw (sp+12),r12 80099a4: 5b 8d 00 08 sw (sp+8),r13 80099a8: 5b 9d 00 04 sw (sp+4),ra 80099ac: b8 20 58 00 mv r11,r1 * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 80099b0: 37 8c 00 14 addi r12,sp,20 80099b4: f8 01 1a d9 calli 8050518 80099b8: b8 20 10 00 mv r2,r1 80099bc: 34 03 00 00 mvi r3,0 80099c0: b9 60 08 00 mv r1,r11 80099c4: b9 80 20 00 mv r4,r12 80099c8: 34 05 00 01 mvi r5,1 80099cc: fb ff f7 ed calli 8007980 80099d0: 5c 20 00 2d bne r1,r0,8009a84 return -1; mt_entry = loc.mt_entry; 80099d4: 2b 8b 00 24 lw r11,(sp+36) fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 80099d8: 2b 81 00 14 lw r1,(sp+20) 80099dc: 29 62 00 1c lw r2,(r11+28) 80099e0: 5c 41 00 51 bne r2,r1,8009b24 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 80099e4: 2b 81 00 20 lw r1,(sp+32) 80099e8: 44 20 00 05 be r1,r0,80099fc 80099ec: 28 22 00 1c lw r2,(r1+28) 80099f0: 44 40 00 03 be r2,r0,80099fc 80099f4: b9 80 08 00 mv r1,r12 80099f8: d8 40 00 00 call r2 if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; 80099fc: 29 61 00 14 lw r1,(r11+20) 8009a00: 28 21 00 28 lw r1,(r1+40) 8009a04: 44 20 00 5f be r1,r0,8009b80 fs_root_loc = &mt_entry->mt_fs_root; 8009a08: 29 61 00 28 lw r1,(r11+40) 8009a0c: 28 21 00 2c lw r1,(r1+44) 8009a10: 44 20 00 5c be r1,r0,8009b80 * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 8009a14: 78 01 08 07 mvhi r1,0x807 8009a18: 38 21 32 f0 ori r1,r1,0x32f0 8009a1c: 28 21 00 00 lw r1,(r1+0) 8009a20: 28 21 00 14 lw r1,(r1+20) 8009a24: 44 2b 00 1f be r1,r11,8009aa0 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8009a28: 78 01 08 07 mvhi r1,0x807 8009a2c: 38 21 6f 50 ori r1,r1,0x6f50 8009a30: 28 22 00 00 lw r2,(r1+0) 8009a34: 34 21 00 04 addi r1,r1,4 8009a38: 44 41 00 09 be r2,r1,8009a5c !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 8009a3c: 29 63 00 2c lw r3,(r11+44) 8009a40: 28 44 00 18 lw r4,(r2+24) 8009a44: 5c 83 00 04 bne r4,r3,8009a54 8009a48: e0 00 00 16 bi 8009aa0 <== NOT EXECUTED 8009a4c: 28 44 00 18 lw r4,(r2+24) 8009a50: 44 64 00 14 be r3,r4,8009aa0 * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 8009a54: 28 42 00 00 lw r2,(r2+0) /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8009a58: 5c 41 ff fd bne r2,r1,8009a4c * Run the file descriptor table to determine if there are any file * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) 8009a5c: b9 60 08 00 mv r1,r11 8009a60: fb ff f8 ec calli 8007e10 8009a64: 34 02 00 01 mvi r2,1 8009a68: 44 22 00 0e be r1,r2,8009aa0 * Allow the file system being unmounted on to do its cleanup. * If it fails it will set the errno to the approprate value * and the fileystem will not be modified. */ if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 ) 8009a6c: 29 62 00 14 lw r2,(r11+20) 8009a70: b9 60 08 00 mv r1,r11 8009a74: 28 42 00 28 lw r2,(r2+40) 8009a78: d8 40 00 00 call r2 8009a7c: b8 20 60 00 mv r12,r1 8009a80: 44 20 00 12 be r1,r0,8009ac8 */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 8009a84: 34 01 ff ff mvi r1,-1 } 8009a88: 2b 9d 00 04 lw ra,(sp+4) 8009a8c: 2b 8b 00 10 lw r11,(sp+16) 8009a90: 2b 8c 00 0c lw r12,(sp+12) 8009a94: 2b 8d 00 08 lw r13,(sp+8) 8009a98: 37 9c 00 24 addi sp,sp,36 8009a9c: c3 a0 00 00 ret * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) rtems_set_errno_and_return_minus_one( EBUSY ); 8009aa0: f8 00 fc 9e calli 8048d18 <__errno> 8009aa4: 34 02 00 10 mvi r2,16 8009aa8: 58 22 00 00 sw (r1+0),r2 8009aac: 34 01 ff ff mvi r1,-1 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 8009ab0: 2b 9d 00 04 lw ra,(sp+4) 8009ab4: 2b 8b 00 10 lw r11,(sp+16) 8009ab8: 2b 8c 00 0c lw r12,(sp+12) 8009abc: 2b 8d 00 08 lw r13,(sp+8) 8009ac0: 37 9c 00 24 addi sp,sp,36 8009ac4: c3 a0 00 00 ret * NOTE: Fatal error is called in a case which should never happen * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ 8009ac8: 29 62 00 28 lw r2,(r11+40) 8009acc: b9 60 08 00 mv r1,r11 8009ad0: 28 42 00 2c lw r2,(r2+44) 8009ad4: d8 40 00 00 call r2 8009ad8: b8 20 68 00 mv r13,r1 8009adc: 5c 2c 00 22 bne r1,r12,8009b64 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 8009ae0: b9 60 08 00 mv r1,r11 8009ae4: f8 00 06 0a calli 800b30c <_Chain_Extract> /* * Free the memory node that was allocated in mount * Free the memory associated with the extracted mount table entry. */ rtems_filesystem_freenode( fs_mount_loc ); 8009ae8: 29 61 00 14 lw r1,(r11+20) 8009aec: 44 2d 00 05 be r1,r13,8009b00 8009af0: 28 22 00 1c lw r2,(r1+28) 8009af4: 44 4d 00 03 be r2,r13,8009b00 8009af8: 35 61 00 08 addi r1,r11,8 8009afc: d8 40 00 00 call r2 free( mt_entry ); 8009b00: b9 60 08 00 mv r1,r11 8009b04: fb ff f7 d7 calli 8007a60 8009b08: 34 01 00 00 mvi r1,0 return 0; } 8009b0c: 2b 9d 00 04 lw ra,(sp+4) 8009b10: 2b 8b 00 10 lw r11,(sp+16) 8009b14: 2b 8c 00 0c lw r12,(sp+12) 8009b18: 2b 8d 00 08 lw r13,(sp+8) 8009b1c: 37 9c 00 24 addi sp,sp,36 8009b20: c3 a0 00 00 ret /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ rtems_filesystem_freenode( &loc ); 8009b24: 2b 81 00 20 lw r1,(sp+32) 8009b28: 44 20 00 05 be r1,r0,8009b3c 8009b2c: 28 22 00 1c lw r2,(r1+28) 8009b30: 44 40 00 03 be r2,r0,8009b3c 8009b34: b9 80 08 00 mv r1,r12 8009b38: d8 40 00 00 call r2 rtems_set_errno_and_return_minus_one( EACCES ); 8009b3c: f8 00 fc 77 calli 8048d18 <__errno> 8009b40: 34 02 00 0d mvi r2,13 8009b44: 58 22 00 00 sw (r1+0),r2 8009b48: 34 01 ff ff mvi r1,-1 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 8009b4c: 2b 9d 00 04 lw ra,(sp+4) 8009b50: 2b 8b 00 10 lw r11,(sp+16) 8009b54: 2b 8c 00 0c lw r12,(sp+12) 8009b58: 2b 8d 00 08 lw r13,(sp+8) 8009b5c: 37 9c 00 24 addi sp,sp,36 8009b60: c3 a0 00 00 ret * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 8009b64: 29 62 00 14 lw r2,(r11+20) <== NOT EXECUTED 8009b68: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8009b6c: 28 42 00 20 lw r2,(r2+32) <== NOT EXECUTED 8009b70: d8 40 00 00 call r2 <== NOT EXECUTED 8009b74: 44 20 ff c4 be r1,r0,8009a84 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 8009b78: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8009b7c: f8 00 04 bd calli 800ae70 <== NOT EXECUTED if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8009b80: f8 00 fc 66 calli 8048d18 <__errno> <== NOT EXECUTED 8009b84: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8009b88: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8009b8c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8009b90: e3 ff ff be bi 8009a88 <== NOT EXECUTED 0802bc20 : int utime( const char *path, const struct utimbuf *times ) { 802bc20: 37 9c ff dc addi sp,sp,-36 802bc24: 5b 8b 00 10 sw (sp+16),r11 802bc28: 5b 8c 00 0c sw (sp+12),r12 802bc2c: 5b 8d 00 08 sw (sp+8),r13 802bc30: 5b 9d 00 04 sw (sp+4),ra 802bc34: b8 20 58 00 mv r11,r1 802bc38: 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 ) ) 802bc3c: 37 8c 00 14 addi r12,sp,20 802bc40: f8 00 92 36 calli 8050518 802bc44: b8 20 10 00 mv r2,r1 802bc48: 34 03 00 00 mvi r3,0 802bc4c: b9 60 08 00 mv r1,r11 802bc50: b9 80 20 00 mv r4,r12 802bc54: 34 05 00 01 mvi r5,1 802bc58: fb ff 6f 4a calli 8007980 802bc5c: 34 0b ff ff mvi r11,-1 802bc60: 5c 20 00 0f bne r1,r0,802bc9c return -1; if ( !temp_loc.ops->utime_h ){ 802bc64: 2b 82 00 20 lw r2,(sp+32) 802bc68: 28 44 00 30 lw r4,(r2+48) 802bc6c: 44 81 00 13 be r4,r1,802bcb8 rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 802bc70: 29 a3 00 04 lw r3,(r13+4) 802bc74: 29 a2 00 00 lw r2,(r13+0) 802bc78: b9 80 08 00 mv r1,r12 802bc7c: d8 80 00 00 call r4 802bc80: b8 20 58 00 mv r11,r1 rtems_filesystem_freenode( &temp_loc ); 802bc84: 2b 81 00 20 lw r1,(sp+32) 802bc88: 44 20 00 05 be r1,r0,802bc9c 802bc8c: 28 22 00 1c lw r2,(r1+28) 802bc90: 44 40 00 03 be r2,r0,802bc9c 802bc94: b9 80 08 00 mv r1,r12 802bc98: d8 40 00 00 call r2 return result; } 802bc9c: b9 60 08 00 mv r1,r11 802bca0: 2b 9d 00 04 lw ra,(sp+4) 802bca4: 2b 8b 00 10 lw r11,(sp+16) 802bca8: 2b 8c 00 0c lw r12,(sp+12) 802bcac: 2b 8d 00 08 lw r13,(sp+8) 802bcb0: 37 9c 00 24 addi sp,sp,36 802bcb4: c3 a0 00 00 ret if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); 802bcb8: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 802bcbc: 44 44 00 03 be r2,r4,802bcc8 <== NOT EXECUTED 802bcc0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802bcc4: d8 40 00 00 call r2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 802bcc8: f8 00 74 14 calli 8048d18 <__errno> <== NOT EXECUTED 802bccc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 802bcd0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 802bcd4: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 802bcd8: e3 ff ff f1 bi 802bc9c <== NOT EXECUTED 0801c018 : ssize_t write( int fd, const void *buffer, size_t count ) { 801c018: 37 9c ff e8 addi sp,sp,-24 801c01c: 5b 8b 00 14 sw (sp+20),r11 801c020: 5b 8c 00 10 sw (sp+16),r12 801c024: 5b 8d 00 0c sw (sp+12),r13 801c028: 5b 8e 00 08 sw (sp+8),r14 801c02c: 5b 9d 00 04 sw (sp+4),ra ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 801c030: 78 04 08 01 mvhi r4,0x801 801c034: 38 84 e0 10 ori r4,r4,0xe010 801c038: 28 84 00 00 lw r4,(r4+0) ssize_t write( int fd, const void *buffer, size_t count ) { 801c03c: b8 40 68 00 mv r13,r2 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 801c040: 54 81 00 06 bgu r4,r1,801c058 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 801c044: fb ff c5 59 calli 800d5a8 <__errno> <== NOT EXECUTED 801c048: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 801c04c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801c050: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 801c054: e0 00 00 27 bi 801c0f0 <== NOT EXECUTED { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 801c058: 34 02 00 03 mvi r2,3 801c05c: 5b 83 00 18 sw (sp+24),r3 801c060: 78 0c 08 01 mvhi r12,0x801 801c064: fb ff 90 63 calli 80001f0 <__ashlsi3> 801c068: 34 02 00 03 mvi r2,3 801c06c: 39 8c e7 18 ori r12,r12,0xe718 801c070: b8 20 70 00 mv r14,r1 801c074: fb ff 90 5f calli 80001f0 <__ashlsi3> 801c078: 29 8b 00 00 lw r11,(r12+0) 801c07c: b5 c1 08 00 add r1,r14,r1 rtems_libio_check_is_open( iop ); 801c080: 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 ); 801c084: b5 61 58 00 add r11,r11,r1 rtems_libio_check_is_open( iop ); 801c088: 29 61 00 18 lw r1,(r11+24) 801c08c: 20 22 01 00 andi r2,r1,0x100 801c090: 44 40 ff ed be r2,r0,801c044 rtems_libio_check_buffer( buffer ); 801c094: 45 a0 00 1f be r13,r0,801c110 rtems_libio_check_count( count ); 801c098: b8 60 60 00 mv r12,r3 801c09c: 44 60 00 15 be r3,r0,801c0f0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 801c0a0: 20 21 00 04 andi r1,r1,0x4 801c0a4: 44 20 00 1b be r1,r0,801c110 /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 801c0a8: 29 61 00 40 lw r1,(r11+64) 801c0ac: 28 24 00 0c lw r4,(r1+12) 801c0b0: 44 80 00 1d be r4,r0,801c124 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 801c0b4: b9 a0 10 00 mv r2,r13 801c0b8: b9 60 08 00 mv r1,r11 801c0bc: d8 80 00 00 call r4 801c0c0: b8 20 60 00 mv r12,r1 if ( rc > 0 ) 801c0c4: 4c 01 00 0b bge r0,r1,801c0f0 iop->offset += rc; 801c0c8: 34 02 00 1f mvi r2,31 801c0cc: fb ff 90 99 calli 8000330 <__ashrsi3> 801c0d0: 29 62 00 14 lw r2,(r11+20) 801c0d4: 29 64 00 10 lw r4,(r11+16) 801c0d8: b5 82 10 00 add r2,r12,r2 801c0dc: f5 82 18 00 cmpgu r3,r12,r2 801c0e0: b4 24 08 00 add r1,r1,r4 801c0e4: b4 61 08 00 add r1,r3,r1 801c0e8: 59 62 00 14 sw (r11+20),r2 801c0ec: 59 61 00 10 sw (r11+16),r1 return rc; } 801c0f0: b9 80 08 00 mv r1,r12 801c0f4: 2b 9d 00 04 lw ra,(sp+4) 801c0f8: 2b 8b 00 14 lw r11,(sp+20) 801c0fc: 2b 8c 00 10 lw r12,(sp+16) 801c100: 2b 8d 00 0c lw r13,(sp+12) 801c104: 2b 8e 00 08 lw r14,(sp+8) 801c108: 37 9c 00 18 addi sp,sp,24 801c10c: c3 a0 00 00 ret rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 801c110: fb ff c5 26 calli 800d5a8 <__errno> <== NOT EXECUTED 801c114: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 801c118: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801c11c: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 801c120: e3 ff ff f4 bi 801c0f0 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 801c124: fb ff c5 21 calli 800d5a8 <__errno> <== NOT EXECUTED 801c128: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 801c12c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801c130: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 801c134: e3 ff ff ef bi 801c0f0 <== NOT EXECUTED 08003da8 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 8003da8: 37 9c ff e4 addi sp,sp,-28 8003dac: 5b 8b 00 1c sw (sp+28),r11 8003db0: 5b 8c 00 18 sw (sp+24),r12 8003db4: 5b 8d 00 14 sw (sp+20),r13 8003db8: 5b 8e 00 10 sw (sp+16),r14 8003dbc: 5b 8f 00 0c sw (sp+12),r15 8003dc0: 5b 90 00 08 sw (sp+8),r16 8003dc4: 5b 9d 00 04 sw (sp+4),ra int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 8003dc8: 78 04 08 02 mvhi r4,0x802 8003dcc: 38 84 30 10 ori r4,r4,0x3010 8003dd0: 28 84 00 00 lw r4,(r4+0) ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 8003dd4: b8 40 58 00 mv r11,r2 8003dd8: b8 60 68 00 mv r13,r3 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 8003ddc: 54 81 00 06 bgu r4,r1,8003df4 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 8003de0: f8 00 30 a9 calli 8010084 <__errno> 8003de4: 34 02 00 09 mvi r2,9 8003de8: 58 22 00 00 sw (r1+0),r2 8003dec: 34 0e ff ff mvi r14,-1 8003df0: e0 00 00 16 bi 8003e48 rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); 8003df4: 34 02 00 03 mvi r2,3 8003df8: fb ff f4 30 calli 8000eb8 <__ashlsi3> 8003dfc: 78 0c 08 02 mvhi r12,0x802 8003e00: 34 02 00 03 mvi r2,3 8003e04: 39 8c 3e ec ori r12,r12,0x3eec 8003e08: b8 20 70 00 mv r14,r1 8003e0c: fb ff f4 2b calli 8000eb8 <__ashlsi3> 8003e10: 29 8f 00 00 lw r15,(r12+0) 8003e14: b5 c1 08 00 add r1,r14,r1 8003e18: b5 e1 78 00 add r15,r15,r1 rtems_libio_check_is_open( iop ); 8003e1c: 29 e1 00 18 lw r1,(r15+24) 8003e20: 20 22 01 00 andi r2,r1,0x100 8003e24: 44 40 ff ef be r2,r0,8003de0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8003e28: 20 21 00 04 andi r1,r1,0x4 8003e2c: 44 20 00 03 be r1,r0,8003e38 /* * Argument validation on IO vector */ if ( !iov ) 8003e30: 45 60 00 02 be r11,r0,8003e38 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 8003e34: 49 a0 00 0f bg r13,r0,8003e70 /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 8003e38: f8 00 30 93 calli 8010084 <__errno> 8003e3c: 34 02 00 16 mvi r2,22 8003e40: 58 22 00 00 sw (r1+0),r2 8003e44: 34 0e ff ff mvi r14,-1 if (bytes != iov[ v ].iov_len) break; } return total; } 8003e48: b9 c0 08 00 mv r1,r14 8003e4c: 2b 9d 00 04 lw ra,(sp+4) 8003e50: 2b 8b 00 1c lw r11,(sp+28) 8003e54: 2b 8c 00 18 lw r12,(sp+24) 8003e58: 2b 8d 00 14 lw r13,(sp+20) 8003e5c: 2b 8e 00 10 lw r14,(sp+16) 8003e60: 2b 8f 00 0c lw r15,(sp+12) 8003e64: 2b 90 00 08 lw r16,(sp+8) 8003e68: 37 9c 00 1c addi sp,sp,28 8003e6c: c3 a0 00 00 ret rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 8003e70: 34 01 04 00 mvi r1,1024 8003e74: 4c 2d 00 02 bge r1,r13,8003e7c 8003e78: e3 ff ff f0 bi 8003e38 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 8003e7c: 29 e1 00 40 lw r1,(r15+64) 8003e80: 28 21 00 0c lw r1,(r1+12) 8003e84: 44 20 00 39 be r1,r0,8003f68 rtems_set_errno_and_return_minus_one( ENOTSUP ); 8003e88: 34 06 00 00 mvi r6,0 8003e8c: b9 60 20 00 mv r4,r11 8003e90: 34 08 00 01 mvi r8,1 8003e94: b8 c0 38 00 mv r7,r6 8003e98: e0 00 00 0d bi 8003ecc rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 8003e9c: 28 82 00 04 lw r2,(r4+4) * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 8003ea0: 34 84 00 08 addi r4,r4,8 if ( iov[v].iov_len ) all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 8003ea4: b4 e2 28 00 add r5,r7,r2 if ( total < old || total > SSIZE_MAX ) 8003ea8: e8 e5 38 00 cmpg r7,r7,r5 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 8003eac: 64 42 00 00 cmpei r2,r2,0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 8003eb0: 68 a3 7f ff cmpgi r3,r5,32767 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 8003eb4: c8 02 10 00 sub r2,r0,r2 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 8003eb8: b8 67 38 00 or r7,r3,r7 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 8003ebc: a1 02 40 00 and r8,r8,r2 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 8003ec0: 5c e0 ff de bne r7,r0,8003e38 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 8003ec4: 4c cd 00 06 bge r6,r13,8003edc 8003ec8: b8 a0 38 00 mv r7,r5 if ( !iov[v].iov_base ) 8003ecc: 28 82 00 00 lw r2,(r4+0) * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 8003ed0: 34 c6 00 01 addi r6,r6,1 if ( !iov[v].iov_base ) 8003ed4: 5c 40 ff f2 bne r2,r0,8003e9c 8003ed8: e3 ff ff d8 bi 8003e38 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 8003edc: b9 00 60 00 mv r12,r8 <== NOT EXECUTED 8003ee0: b9 00 70 00 mv r14,r8 <== NOT EXECUTED 8003ee4: 5d 00 00 07 bne r8,r0,8003f00 <== NOT EXECUTED /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 8003ee8: 29 63 00 04 lw r3,(r11+4) <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 8003eec: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 8003ef0: 5c 60 00 06 bne r3,r0,8003f08 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 8003ef4: 35 6b 00 08 addi r11,r11,8 <== NOT EXECUTED 8003ef8: 49 ac ff fc bg r13,r12,8003ee8 <== NOT EXECUTED 8003efc: e3 ff ff d3 bi 8003e48 <== NOT EXECUTED } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 8003f00: b8 e0 70 00 mv r14,r7 <== NOT EXECUTED 8003f04: e3 ff ff d1 bi 8003e48 <== NOT EXECUTED for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 8003f08: 29 e1 00 40 lw r1,(r15+64) <== NOT EXECUTED 8003f0c: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8003f10: 28 24 00 0c lw r4,(r1+12) <== NOT EXECUTED 8003f14: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8003f18: d8 80 00 00 call r4 <== NOT EXECUTED 8003f1c: b8 20 80 00 mv r16,r1 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 8003f20: 34 02 00 1f mvi r2,31 <== NOT EXECUTED if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 8003f24: 4c 20 00 03 bge r1,r0,8003f30 <== NOT EXECUTED 8003f28: 34 0e ff ff mvi r14,-1 <== NOT EXECUTED 8003f2c: e3 ff ff c7 bi 8003e48 <== NOT EXECUTED return -1; if ( bytes > 0 ) { 8003f30: 44 20 00 0b be r1,r0,8003f5c <== NOT EXECUTED iop->offset += bytes; 8003f34: fb ff f4 31 calli 8000ff8 <__ashrsi3> <== NOT EXECUTED 8003f38: 29 e2 00 14 lw r2,(r15+20) <== NOT EXECUTED 8003f3c: 29 e4 00 10 lw r4,(r15+16) <== NOT EXECUTED total += bytes; 8003f40: b5 d0 70 00 add r14,r14,r16 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 8003f44: b6 02 10 00 add r2,r16,r2 <== NOT EXECUTED 8003f48: f6 02 18 00 cmpgu r3,r16,r2 <== NOT EXECUTED 8003f4c: b4 24 08 00 add r1,r1,r4 <== NOT EXECUTED 8003f50: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 8003f54: 59 e1 00 10 sw (r15+16),r1 <== NOT EXECUTED 8003f58: 59 e2 00 14 sw (r15+20),r2 <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 8003f5c: 29 61 00 04 lw r1,(r11+4) <== NOT EXECUTED 8003f60: 46 01 ff e5 be r16,r1,8003ef4 <== NOT EXECUTED 8003f64: e3 ff ff b9 bi 8003e48 <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 8003f68: f8 00 30 47 calli 8010084 <__errno> <== NOT EXECUTED 8003f6c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8003f70: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8003f74: 34 0e ff ff mvi r14,-1 <== NOT EXECUTED 8003f78: e3 ff ff b4 bi 8003e48 <== NOT EXECUTED