Annotated Report
08005e50 <IMFS_Set_handlers>: #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) {
8005e50: 37 9c ff f0 addi sp,sp,-16 8005e54: 5b 8b 00 10 sw (sp+16),r11 8005e58: 5b 8c 00 0c sw (sp+12),r12 8005e5c: 5b 8d 00 08 sw (sp+8),r13 8005e60: 5b 9d 00 04 sw (sp+4),ra 8005e64: b8 20 58 00 mv r11,r1
IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) {
8005e68: 28 21 00 00 lw r1,(r1+0)
) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info;
8005e6c: 29 62 00 10 lw r2,(r11+16)
switch( node->type ) {
8005e70: 28 21 00 4c lw r1,(r1+76)
) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info;
8005e74: 28 4c 00 34 lw r12,(r2+52)
switch( node->type ) {
8005e78: 34 02 00 06 mvi r2,6 8005e7c: 34 21 ff ff addi r1,r1,-1
8005e80: 54 22 00 16 bgu r1,r2,8005ed8 <IMFS_Set_handlers+0x88> <== NEVER TAKEN
8005e84: 78 0d 08 01 mvhi r13,0x801 8005e88: 34 02 00 02 mvi r2,2 8005e8c: fb ff e8 d9 calli 80001f0 <__ashlsi3> 8005e90: 39 ad bb 1c ori r13,r13,0xbb1c 8005e94: b5 a1 08 00 add r1,r13,r1 8005e98: 28 21 00 00 lw r1,(r1+0) 8005e9c: c0 20 00 00 b r1
case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers;
8005ea0: 29 8c 00 0c lw r12,(r12+12) 8005ea4: e0 00 00 08 bi 8005ec4 <IMFS_Set_handlers+0x74>
break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers;
8005ea8: 78 01 08 01 mvhi r1,0x801 8005eac: 38 21 bb f0 ori r1,r1,0xbbf0 8005eb0: e0 00 00 09 bi 8005ed4 <IMFS_Set_handlers+0x84>
break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers;
8005eb4: 78 01 08 01 mvhi r1,0x801 8005eb8: 38 21 bc 28 ori r1,r1,0xbc28 8005ebc: e0 00 00 06 bi 8005ed4 <IMFS_Set_handlers+0x84>
break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers;
8005ec0: 29 8c 00 08 lw r12,(r12+8) 8005ec4: 59 6c 00 08 sw (r11+8),r12
break;
8005ec8: e0 00 00 04 bi 8005ed8 <IMFS_Set_handlers+0x88>
case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers;
8005ecc: 78 01 08 01 mvhi r1,0x801 8005ed0: 38 21 bb 38 ori r1,r1,0xbb38 8005ed4: 59 61 00 08 sw (r11+8),r1
break; } return 0; }
8005ed8: 34 01 00 00 mvi r1,0 8005edc: 2b 9d 00 04 lw ra,(sp+4) 8005ee0: 2b 8b 00 10 lw r11,(sp+16) 8005ee4: 2b 8c 00 0c lw r12,(sp+12) 8005ee8: 2b 8d 00 08 lw r13,(sp+8) 8005eec: 37 9c 00 10 addi sp,sp,16 8005ef0: c3 a0 00 00 ret
0800a700 <IMFS_allocate_node>: IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) {
800a700: 37 9c ff e4 addi sp,sp,-28 800a704: 5b 8b 00 14 sw (sp+20),r11 800a708: 5b 8c 00 10 sw (sp+16),r12 800a70c: 5b 8d 00 0c sw (sp+12),r13 800a710: 5b 8e 00 08 sw (sp+8),r14 800a714: 5b 9d 00 04 sw (sp+4),ra 800a718: b8 20 68 00 mv r13,r1 800a71c: b8 40 70 00 mv r14,r2
struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) );
800a720: 34 01 00 01 mvi r1,1 800a724: 34 02 00 68 mvi r2,104
IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) {
800a728: b8 60 60 00 mv r12,r3
struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) );
800a72c: fb ff f2 16 calli 8006f84 <calloc> 800a730: b8 20 58 00 mv r11,r1
if ( !node )
800a734: 44 20 00 14 be r1,r0,800a784 <IMFS_allocate_node+0x84> <== NEVER TAKEN
return NULL; /* * Fill in the basic information */ node->st_nlink = 1;
800a738: 34 04 00 01 mvi r4,1
node->type = type; strncpy( node->name, name, IMFS_NAME_MAX );
800a73c: b9 c0 10 00 mv r2,r14 800a740: 34 03 00 20 mvi r3,32 800a744: 34 21 00 0c addi r1,r1,12
return NULL; /* * Fill in the basic information */ node->st_nlink = 1;
800a748: 0d 64 00 34 sh (r11+52),r4
node->type = type;
800a74c: 59 6d 00 4c sw (r11+76),r13
strncpy( node->name, name, IMFS_NAME_MAX );
800a750: f8 00 0c 76 calli 800d928 <strncpy>
/* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode;
800a754: 59 6c 00 30 sw (r11+48),r12
#if defined(RTEMS_POSIX_API) node->st_uid = geteuid();
800a758: fb ff f2 dd calli 80072cc <geteuid> 800a75c: 0d 61 00 3c sh (r11+60),r1
node->st_gid = getegid();
800a760: fb ff f2 d6 calli 80072b8 <getegid> 800a764: 0d 61 00 3e sh (r11+62),r1
#endif /* * Now set all the times. */ gettimeofday( &tv, 0 );
800a768: 34 02 00 00 mvi r2,0 800a76c: 37 81 00 18 addi r1,sp,24 800a770: fb ff f2 dc calli 80072e0 <gettimeofday>
node->stat_atime = (time_t) tv.tv_sec;
800a774: 2b 81 00 18 lw r1,(sp+24)
node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec;
800a778: 59 61 00 48 sw (r11+72),r1
/* * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec;
800a77c: 59 61 00 40 sw (r11+64),r1
node->stat_mtime = (time_t) tv.tv_sec;
800a780: 59 61 00 44 sw (r11+68),r1
node->stat_ctime = (time_t) tv.tv_sec; return node; }
800a784: b9 60 08 00 mv r1,r11 800a788: 2b 9d 00 04 lw ra,(sp+4) 800a78c: 2b 8b 00 14 lw r11,(sp+20) 800a790: 2b 8c 00 10 lw r12,(sp+16) 800a794: 2b 8d 00 0c lw r13,(sp+12) 800a798: 2b 8e 00 08 lw r14,(sp+8) 800a79c: 37 9c 00 1c addi sp,sp,28 800a7a0: c3 a0 00 00 ret
0800bbc4 <IMFS_chown>: int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) {
800bbc4: 37 9c ff e4 addi sp,sp,-28 800bbc8: 5b 8b 00 14 sw (sp+20),r11 800bbcc: 5b 8c 00 10 sw (sp+16),r12 800bbd0: 5b 8d 00 0c sw (sp+12),r13 800bbd4: 5b 8e 00 08 sw (sp+8),r14 800bbd8: 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;
800bbdc: 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 */ ) {
800bbe0: 20 4e ff ff andi r14,r2,0xffff 800bbe4: 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();
800bbe8: f8 00 05 2e calli 800d0a0 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
800bbec: 2d 62 00 3c lhu r2,(r11+60) 800bbf0: 7c 2c 00 00 cmpnei r12,r1,0 800bbf4: fc 41 08 00 cmpne r1,r2,r1 800bbf8: a1 81 60 00 and r12,r12,r1
800bbfc: 45 80 00 06 be r12,r0,800bc14 <IMFS_chown+0x50> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
800bc00: f8 00 1b da calli 8012b68 <__errno> <== NOT EXECUTED 800bc04: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800bc08: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800bc0c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800bc10: e0 00 00 09 bi 800bc34 <IMFS_chown+0x70> <== NOT EXECUTED
#endif jnode->st_uid = owner;
800bc14: 0d 6e 00 3c sh (r11+60),r14
jnode->st_gid = group;
800bc18: 0d 6d 00 3e sh (r11+62),r13
IMFS_update_ctime( jnode );
800bc1c: 37 81 00 18 addi r1,sp,24 800bc20: b9 80 10 00 mv r2,r12 800bc24: fb ff db 8d calli 8002a58 <gettimeofday> 800bc28: 2b 81 00 18 lw r1,(sp+24) 800bc2c: 59 61 00 48 sw (r11+72),r1 800bc30: b9 80 08 00 mv r1,r12
return 0; }
800bc34: 2b 9d 00 04 lw ra,(sp+4) 800bc38: 2b 8b 00 14 lw r11,(sp+20) 800bc3c: 2b 8c 00 10 lw r12,(sp+16) 800bc40: 2b 8d 00 0c lw r13,(sp+12) 800bc44: 2b 8e 00 08 lw r14,(sp+8) 800bc48: 37 9c 00 1c addi sp,sp,28 800bc4c: c3 a0 00 00 ret
0800a7e8 <IMFS_create_node>: IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) {
800a7e8: 37 9c ff ec addi sp,sp,-20 800a7ec: 5b 8b 00 14 sw (sp+20),r11 800a7f0: 5b 8c 00 10 sw (sp+16),r12 800a7f4: 5b 8d 00 0c sw (sp+12),r13 800a7f8: 5b 8e 00 08 sw (sp+8),r14 800a7fc: 5b 9d 00 04 sw (sp+4),ra 800a800: b8 40 70 00 mv r14,r2 800a804: b8 20 60 00 mv r12,r1 800a808: b8 60 10 00 mv r2,r3 800a80c: b8 a0 68 00 mv r13,r5
IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL )
800a810: b8 20 58 00 mv r11,r1
800a814: 44 20 00 42 be r1,r0,800a91c <IMFS_create_node+0x134> <== NEVER TAKEN
return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
800a818: 78 05 08 01 mvhi r5,0x801 800a81c: 38 a5 d1 10 ori r5,r5,0xd110 800a820: 28 a3 00 00 lw r3,(r5+0) 800a824: b9 c0 08 00 mv r1,r14 800a828: 28 63 00 2c lw r3,(r3+44) 800a82c: a4 60 18 00 not r3,r3 800a830: a0 83 18 00 and r3,r4,r3 800a834: fb ff ff b3 calli 800a700 <IMFS_allocate_node> 800a838: b8 20 58 00 mv r11,r1
if ( !node )
800a83c: 44 20 00 38 be r1,r0,800a91c <IMFS_create_node+0x134> <== NEVER TAKEN
return NULL; /* * Set the type specific information */ switch (type) {
800a840: 35 c1 ff ff addi r1,r14,-1 800a844: 34 02 00 06 mvi r2,6
800a848: 54 22 00 22 bgu r1,r2,800a8d0 <IMFS_create_node+0xe8> <== NEVER TAKEN
800a84c: 78 0e 08 01 mvhi r14,0x801 800a850: 34 02 00 02 mvi r2,2 800a854: fb ff d6 67 calli 80001f0 <__ashlsi3> 800a858: 39 ce c0 3c ori r14,r14,0xc03c 800a85c: b5 c1 08 00 add r1,r14,r1 800a860: 28 21 00 00 lw r1,(r1+0) 800a864: c0 20 00 00 b r1
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
800a868: 35 62 00 54 addi r2,r11,84
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
800a86c: 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);
800a870: 59 62 00 50 sw (r11+80),r2
the_chain->permanent_null = NULL;
800a874: 34 02 00 00 mvi r2,0 800a878: 59 62 00 54 sw (r11+84),r2
the_chain->last = _Chain_Head(the_chain);
800a87c: 59 61 00 58 sw (r11+88),r1 800a880: e0 00 00 1c bi 800a8f0 <IMFS_create_node+0x108>
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;
800a884: 29 a1 00 04 lw r1,(r13+4) 800a888: 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;
800a88c: 29 ad 00 00 lw r13,(r13+0) 800a890: 59 6d 00 50 sw (r11+80),r13
node->info.device.minor = info->device.minor; break;
800a894: e0 00 00 17 bi 800a8f0 <IMFS_create_node+0x108>
case IMFS_LINEAR_FILE: node->info.linearfile.size = 0;
800a898: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
node->info.linearfile.direct = 0;
800a89c: 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;
800a8a0: 59 61 00 50 sw (r11+80),r1 <== NOT EXECUTED 800a8a4: 59 61 00 54 sw (r11+84),r1 <== NOT EXECUTED
node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0;
800a8a8: 34 02 00 00 mvi r2,0
node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0;
800a8ac: 59 62 00 60 sw (r11+96),r2
case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0;
800a8b0: 59 62 00 50 sw (r11+80),r2 800a8b4: 59 62 00 54 sw (r11+84),r2
node->info.file.indirect = 0;
800a8b8: 59 62 00 58 sw (r11+88),r2
node->info.file.doubly_indirect = 0;
800a8bc: 59 62 00 5c sw (r11+92),r2
node->info.file.triply_indirect = 0; break;
800a8c0: e0 00 00 0c bi 800a8f0 <IMFS_create_node+0x108>
case IMFS_FIFO: node->info.fifo.pipe = NULL;
800a8c4: 34 01 00 00 mvi r1,0 800a8c8: 59 61 00 50 sw (r11+80),r1
break;
800a8cc: e0 00 00 09 bi 800a8f0 <IMFS_create_node+0x108>
default: assert(0);
800a8d0: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800a8d4: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED 800a8d8: 78 04 08 01 mvhi r4,0x801 <== NOT EXECUTED 800a8dc: 38 21 bf ec ori r1,r1,0xbfec <== NOT EXECUTED 800a8e0: 38 63 c0 58 ori r3,r3,0xc058 <== NOT EXECUTED 800a8e4: 38 84 c0 38 ori r4,r4,0xc038 <== NOT EXECUTED 800a8e8: 34 02 00 5c mvi r2,92 <== NOT EXECUTED 800a8ec: fb ff f1 93 calli 8006f38 <__assert_func> <== NOT EXECUTED
/* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info;
800a8f0: 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;
800a8f4: 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 );
800a8f8: b9 60 10 00 mv r2,r11
fs_info = parent_loc->mt_entry->fs_info;
800a8fc: 28 63 00 34 lw r3,(r3+52)
node->Parent = parent;
800a900: 59 61 00 08 sw (r11+8),r1 800a904: 34 21 00 50 addi r1,r1,80
node->st_ino = ++fs_info->ino_count;
800a908: 28 64 00 04 lw r4,(r3+4) 800a90c: 34 84 00 01 addi r4,r4,1 800a910: 58 64 00 04 sw (r3+4),r4 800a914: 59 64 00 38 sw (r11+56),r4 800a918: fb ff e0 69 calli 8002abc <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; }
800a91c: b9 60 08 00 mv r1,r11 800a920: 2b 9d 00 04 lw ra,(sp+4) 800a924: 2b 8b 00 14 lw r11,(sp+20) 800a928: 2b 8c 00 10 lw r12,(sp+16) 800a92c: 2b 8d 00 0c lw r13,(sp+12) 800a930: 2b 8e 00 08 lw r14,(sp+8) 800a934: 37 9c 00 14 addi sp,sp,20 800a938: c3 a0 00 00 ret
0800a7a4 <IMFS_create_root_node>: IMFS_jnode_t *IMFS_create_root_node(void) {
800a7a4: 37 9c ff fc addi sp,sp,-4 800a7a8: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *node; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( IMFS_DIRECTORY, "", (S_IFDIR | 0755) );
800a7ac: 78 02 08 01 mvhi r2,0x801 800a7b0: 38 42 b9 18 ori r2,r2,0xb918 800a7b4: 34 01 00 01 mvi r1,1 800a7b8: 34 03 41 ed mvi r3,16877 800a7bc: fb ff ff d1 calli 800a700 <IMFS_allocate_node>
if ( !node )
800a7c0: 44 20 00 07 be r1,r0,800a7dc <IMFS_create_root_node+0x38> <== NEVER TAKEN
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
800a7c4: 34 23 00 54 addi r3,r1,84
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
800a7c8: 34 22 00 50 addi r2,r1,80
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
800a7cc: 58 23 00 50 sw (r1+80),r3
the_chain->permanent_null = NULL;
800a7d0: 34 03 00 00 mvi r3,0 800a7d4: 58 23 00 54 sw (r1+84),r3
the_chain->last = _Chain_Head(the_chain);
800a7d8: 58 22 00 58 sw (r1+88),r2
* NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; }
800a7dc: 2b 9d 00 04 lw ra,(sp+4) 800a7e0: 37 9c 00 04 addi sp,sp,4 800a7e4: c3 a0 00 00 ret
08002ccc <IMFS_dump_directory>: void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) {
8002ccc: 37 9c ff dc addi sp,sp,-36 8002cd0: 5b 8b 00 24 sw (sp+36),r11 8002cd4: 5b 8c 00 20 sw (sp+32),r12 8002cd8: 5b 8d 00 1c sw (sp+28),r13 8002cdc: 5b 8e 00 18 sw (sp+24),r14 8002ce0: 5b 8f 00 14 sw (sp+20),r15 8002ce4: 5b 90 00 10 sw (sp+16),r16 8002ce8: 5b 91 00 0c sw (sp+12),r17 8002cec: 5b 92 00 08 sw (sp+8),r18 8002cf0: 5b 9d 00 04 sw (sp+4),ra 8002cf4: 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 );
8002cf8: 5c 20 00 09 bne r1,r0,8002d1c <IMFS_dump_directory+0x50> <== ALWAYS TAKEN
8002cfc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002d00: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002d04: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002d08: 38 21 51 88 ori r1,r1,0x5188 <== NOT EXECUTED 8002d0c: 38 63 53 4c ori r3,r3,0x534c <== NOT EXECUTED 8002d10: 38 84 52 4c ori r4,r4,0x524c <== NOT EXECUTED 8002d14: 34 02 00 84 mvi r2,132 <== NOT EXECUTED 8002d18: e0 00 00 09 bi 8002d3c <IMFS_dump_directory+0x70> <== NOT EXECUTED
assert( level >= 0 );
8002d1c: 4c 40 00 09 bge r2,r0,8002d40 <IMFS_dump_directory+0x74> <== ALWAYS TAKEN
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 51 88 ori r1,r1,0x5188 <== NOT EXECUTED 8002d30: 38 63 53 4c ori r3,r3,0x534c <== NOT EXECUTED 8002d34: 38 84 52 5c ori r4,r4,0x525c <== NOT EXECUTED 8002d38: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8002d3c: f8 00 02 2b calli 80035e8 <__assert_func> <== NOT EXECUTED
assert( the_directory->type == IMFS_DIRECTORY );
8002d40: 28 22 00 4c lw r2,(r1+76) 8002d44: 34 03 00 01 mvi r3,1
8002d48: 44 43 00 09 be r2,r3,8002d6c <IMFS_dump_directory+0xa0> <== ALWAYS TAKEN
8002d4c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002d50: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002d54: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002d58: 38 21 51 88 ori r1,r1,0x5188 <== NOT EXECUTED 8002d5c: 38 63 53 4c ori r3,r3,0x534c <== NOT EXECUTED 8002d60: 38 84 52 68 ori r4,r4,0x5268 <== NOT EXECUTED 8002d64: 34 02 00 88 mvi r2,136 <== NOT EXECUTED 8002d68: e3 ff ff f5 bi 8002d3c <IMFS_dump_directory+0x70> <== NOT EXECUTED
the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." );
8002d6c: 78 0c 08 02 mvhi r12,0x802
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
8002d70: 34 32 00 54 addi r18,r1,84 8002d74: 39 8c 81 d8 ori r12,r12,0x81d8
IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY )
8002d78: b8 40 88 00 mv r17,r2
assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first;
8002d7c: 28 2b 00 50 lw r11,(r1+80)
the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." );
8002d80: 78 10 08 02 mvhi r16,0x802
IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 );
8002d84: 35 af 00 01 addi r15,r13,1
assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first;
8002d88: e0 00 00 11 bi 8002dcc <IMFS_dump_directory+0x100>
!rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node;
8002d8c: 34 0e 00 00 mvi r14,0
for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." );
8002d90: 29 82 00 00 lw r2,(r12+0) 8002d94: ba 00 08 00 mv r1,r16
!rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ )
8002d98: 35 ce 00 01 addi r14,r14,1
fprintf(stdout, "...." );
8002d9c: 28 42 00 08 lw r2,(r2+8) 8002da0: 38 21 52 90 ori r1,r1,0x5290 8002da4: f8 00 3c 50 calli 8011ee4 <fputs>
!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++ ) 8002da8: 4d ae ff fa bge r13,r14,8002d90 <IMFS_dump_directory+0xc4> fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode );
8002dac: b9 60 08 00 mv r1,r11 8002db0: fb ff ff 4f calli 8002aec <IMFS_print_jnode>
if ( the_jnode->type == IMFS_DIRECTORY )
8002db4: 29 61 00 4c lw r1,(r11+76)
8002db8: 5c 31 00 04 bne r1,r17,8002dc8 <IMFS_dump_directory+0xfc> IMFS_dump_directory( the_jnode, level + 1 );
8002dbc: b9 60 08 00 mv r1,r11 8002dc0: b9 e0 10 00 mv r2,r15 8002dc4: fb ff ff c2 calli 8002ccc <IMFS_dump_directory>
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 ) {
8002dc8: 29 6b 00 00 lw r11,(r11+0)
assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 8002dcc: 5d 72 ff f0 bne r11,r18,8002d8c <IMFS_dump_directory+0xc0> fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } }
8002dd0: 2b 9d 00 04 lw ra,(sp+4) 8002dd4: 2b 8b 00 24 lw r11,(sp+36) 8002dd8: 2b 8c 00 20 lw r12,(sp+32) 8002ddc: 2b 8d 00 1c lw r13,(sp+28) 8002de0: 2b 8e 00 18 lw r14,(sp+24) 8002de4: 2b 8f 00 14 lw r15,(sp+20) 8002de8: 2b 90 00 10 lw r16,(sp+16) 8002dec: 2b 91 00 0c lw r17,(sp+12) 8002df0: 2b 92 00 08 lw r18,(sp+8) 8002df4: 37 9c 00 24 addi sp,sp,36 8002df8: c3 a0 00 00 ret
080060e0 <IMFS_eval_path>: const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) {
80060e0: 37 9c ff 84 addi sp,sp,-124 80060e4: 5b 8b 00 40 sw (sp+64),r11 80060e8: 5b 8c 00 3c sw (sp+60),r12 80060ec: 5b 8d 00 38 sw (sp+56),r13 80060f0: 5b 8e 00 34 sw (sp+52),r14 80060f4: 5b 8f 00 30 sw (sp+48),r15 80060f8: 5b 90 00 2c sw (sp+44),r16 80060fc: 5b 91 00 28 sw (sp+40),r17 8006100: 5b 92 00 24 sw (sp+36),r18 8006104: 5b 93 00 20 sw (sp+32),r19 8006108: 5b 94 00 1c sw (sp+28),r20 800610c: 5b 95 00 18 sw (sp+24),r21 8006110: 5b 96 00 14 sw (sp+20),r22 8006114: 5b 97 00 10 sw (sp+16),r23 8006118: 5b 98 00 0c sw (sp+12),r24 800611c: 5b 99 00 08 sw (sp+8),r25 8006120: 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;
8006124: 34 0e 00 01 mvi r14,1
case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access )
8006128: 78 13 08 01 mvhi r19,0x801
const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) {
800612c: b8 80 58 00 mv r11,r4 8006130: b8 20 90 00 mv r18,r1 8006134: b8 40 78 00 mv r15,r2 8006138: b8 60 88 00 mv r17,r3
case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access )
800613c: 3a 73 d1 10 ori r19,r19,0xd110
/* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access;
8006140: 28 8c 00 00 lw r12,(r4+0) 8006144: 34 10 00 00 mvi r16,0
* Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
8006148: 37 96 00 44 addi r22,sp,68
/* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY )
800614c: b9 c0 a0 00 mv r20,r14
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) {
8006150: 34 19 00 03 mvi r25,3
node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) {
8006154: 34 15 00 04 mvi r21,4
result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; if ( result == -1 )
8006158: 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 ) {
800615c: 34 17 00 02 mvi r23,2
/* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
8006160: e0 00 00 4b bi 800628c <IMFS_eval_path+0x1ac>
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
8006164: b6 50 08 00 add r1,r18,r16 8006168: b9 e0 10 00 mv r2,r15 800616c: ba c0 18 00 mv r3,r22 8006170: 37 84 00 7c addi r4,sp,124 8006174: f8 00 02 43 calli 8006a80 <IMFS_get_token> 8006178: b8 20 70 00 mv r14,r1
pathnamelen -= len; i += len; if ( !pathloc->node_access )
800617c: 29 61 00 00 lw r1,(r11+0)
*/ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len;
8006180: 2b 8d 00 7c lw r13,(sp+124)
i += len; if ( !pathloc->node_access )
8006184: 44 20 00 3a be r1,r0,800626c <IMFS_eval_path+0x18c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8006188: 45 c0 00 07 be r14,r0,80061a4 <IMFS_eval_path+0xc4> if ( node->type == IMFS_DIRECTORY )
800618c: 29 81 00 4c lw r1,(r12+76)
8006190: 5c 34 00 05 bne r1,r20,80061a4 <IMFS_eval_path+0xc4> if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
8006194: b9 60 08 00 mv r1,r11 8006198: ba 80 10 00 mv r2,r20 800619c: fb ff ff 56 calli 8005ef4 <IMFS_evaluate_permission>
80061a0: 44 20 00 5f be r1,r0,800631c <IMFS_eval_path+0x23c> while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len;
80061a4: b6 0d 80 00 add r16,r16,r13
*/ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len;
80061a8: c9 ed 78 00 sub r15,r15,r13
if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access;
80061ac: 29 6c 00 00 lw r12,(r11+0)
switch( type ) { 80061b0: 45 d9 00 11 be r14,r25,80061f4 <IMFS_eval_path+0x114> 80061b4: 45 d5 00 33 be r14,r21,8006280 <IMFS_eval_path+0x1a0> 80061b8: 5d d7 00 35 bne r14,r23,800628c <IMFS_eval_path+0x1ac> case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access )
80061bc: 2a 61 00 00 lw r1,(r19+0) 80061c0: 28 21 00 18 lw r1,(r1+24)
80061c4: 45 81 00 32 be r12,r1,800628c <IMFS_eval_path+0x1ac> /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) {
80061c8: 29 64 00 10 lw r4,(r11+16)
/* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access ==
80061cc: 28 81 00 1c lw r1,(r4+28)
80061d0: 5d 81 00 04 bne r12,r1,80061e0 <IMFS_eval_path+0x100> */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node;
80061d4: 37 8c 00 68 addi r12,sp,104 80061d8: 34 82 00 08 addi r2,r4,8 80061dc: e0 00 00 37 bi 80062b8 <IMFS_eval_path+0x1d8>
pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent )
80061e0: 29 8c 00 08 lw r12,(r12+8)
80061e4: 5d 80 00 25 bne r12,r0,8006278 <IMFS_eval_path+0x198> rtems_set_errno_and_return_minus_one( ENOENT );
80061e8: f8 00 18 d5 calli 800c53c <__errno> 80061ec: 58 2e 00 00 sw (r1+0),r14 80061f0: e0 00 00 4e bi 8006328 <IMFS_eval_path+0x248>
case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) {
80061f4: 29 81 00 4c lw r1,(r12+76)
80061f8: 5c 2e 00 07 bne r1,r14,8006214 <IMFS_eval_path+0x134> IMFS_evaluate_hard_link( pathloc, 0 );
80061fc: b9 60 08 00 mv r1,r11 8006200: 34 02 00 00 mvi r2,0 8006204: fb ff ff 5b calli 8005f70 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
8006208: 29 6c 00 00 lw r12,(r11+0)
if ( !node )
800620c: 5d 80 00 09 bne r12,r0,8006230 <IMFS_eval_path+0x150> <== ALWAYS TAKEN
8006210: e0 00 00 0a bi 8006238 <IMFS_eval_path+0x158> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 8006214: 5c 35 00 07 bne r1,r21,8006230 <IMFS_eval_path+0x150> result = IMFS_evaluate_sym_link( pathloc, 0 );
8006218: b9 60 08 00 mv r1,r11 800621c: 34 02 00 00 mvi r2,0 8006220: fb ff ff 71 calli 8005fe4 <IMFS_evaluate_sym_link> 8006224: b8 20 68 00 mv r13,r1
node = pathloc->node_access;
8006228: 29 6c 00 00 lw r12,(r11+0)
if ( result == -1 )
800622c: 44 38 00 40 be r1,r24,800632c <IMFS_eval_path+0x24c> <== NEVER TAKEN
/* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY )
8006230: 29 81 00 4c lw r1,(r12+76)
8006234: 44 34 00 04 be r1,r20,8006244 <IMFS_eval_path+0x164> rtems_set_errno_and_return_minus_one( ENOTDIR );
8006238: f8 00 18 c1 calli 800c53c <__errno> 800623c: 34 02 00 14 mvi r2,20 8006240: e0 00 00 39 bi 8006324 <IMFS_eval_path+0x244>
/* * 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 ) {
8006244: 29 8d 00 5c lw r13,(r12+92)
8006248: 45 a0 00 04 be r13,r0,8006258 <IMFS_eval_path+0x178> newloc = node->info.directory.mt_fs->mt_fs_root;
800624c: 37 8c 00 68 addi r12,sp,104 8006250: 35 a2 00 1c addi r2,r13,28 8006254: e0 00 00 19 bi 80062b8 <IMFS_eval_path+0x1d8>
/* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token );
8006258: b9 80 08 00 mv r1,r12 800625c: ba c0 10 00 mv r2,r22 8006260: f8 00 01 da calli 80069c8 <IMFS_find_match_in_dir> 8006264: b8 20 60 00 mv r12,r1
if ( !node ) 8006268: 5c 2d 00 04 bne r1,r13,8006278 <IMFS_eval_path+0x198> rtems_set_errno_and_return_minus_one( ENOENT );
800626c: f8 00 18 b4 calli 800c53c <__errno> 8006270: 34 02 00 02 mvi r2,2 8006274: e0 00 00 2c bi 8006324 <IMFS_eval_path+0x244>
/* * Set the node access to the point we have found. */ pathloc->node_access = node;
8006278: 59 6c 00 00 sw (r11+0),r12 800627c: e0 00 00 04 bi 800628c <IMFS_eval_path+0x1ac>
case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
8006280: f8 00 18 af calli 800c53c <__errno> 8006284: 34 02 00 5b mvi r2,91 8006288: e0 00 00 27 bi 8006324 <IMFS_eval_path+0x244>
/* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
800628c: 7d c1 00 00 cmpnei r1,r14,0 8006290: 7d ce 00 04 cmpnei r14,r14,4 8006294: a1 c1 70 00 and r14,r14,r1
8006298: 5d c0 ff b3 bne r14,r0,8006164 <IMFS_eval_path+0x84> * 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 ) {
800629c: 29 82 00 4c lw r2,(r12+76) 80062a0: 34 01 00 01 mvi r1,1
80062a4: 5c 41 00 17 bne r2,r1,8006300 <IMFS_eval_path+0x220> if ( node->info.directory.mt_fs != NULL ) {
80062a8: 29 83 00 5c lw r3,(r12+92)
80062ac: 44 60 00 15 be r3,r0,8006300 <IMFS_eval_path+0x220> newloc = node->info.directory.mt_fs->mt_fs_root;
80062b0: 37 8c 00 68 addi r12,sp,104 80062b4: 34 62 00 1c addi r2,r3,28 80062b8: 34 03 00 14 mvi r3,20 80062bc: b9 80 08 00 mv r1,r12 80062c0: f8 00 1b 45 calli 800cfd4 <memcpy>
*pathloc = newloc;
80062c4: b9 80 10 00 mv r2,r12 80062c8: 34 03 00 14 mvi r3,20 80062cc: b9 60 08 00 mv r1,r11 80062d0: f8 00 1b 41 calli 800cfd4 <memcpy>
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
80062d4: 29 61 00 0c lw r1,(r11+12) 80062d8: 2b 82 00 7c lw r2,(sp+124) 80062dc: ba 20 18 00 mv r3,r17 80062e0: 28 25 00 00 lw r5,(r1+0) 80062e4: ca 02 08 00 sub r1,r16,r2 80062e8: b6 41 08 00 add r1,r18,r1 80062ec: b5 e2 10 00 add r2,r15,r2 80062f0: b9 60 20 00 mv r4,r11 80062f4: d8 a0 00 00 call r5 80062f8: b8 20 68 00 mv r13,r1 80062fc: e0 00 00 0c bi 800632c <IMFS_eval_path+0x24c>
flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc );
8006300: b9 60 08 00 mv r1,r11 8006304: fb ff fe d3 calli 8005e50 <IMFS_Set_handlers> 8006308: b8 20 68 00 mv r13,r1
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) )
800630c: ba 20 10 00 mv r2,r17 8006310: b9 60 08 00 mv r1,r11 8006314: fb ff fe f8 calli 8005ef4 <IMFS_evaluate_permission>
8006318: 5c 20 00 05 bne r1,r0,800632c <IMFS_eval_path+0x24c> rtems_set_errno_and_return_minus_one( EACCES );
800631c: f8 00 18 88 calli 800c53c <__errno> 8006320: 34 02 00 0d mvi r2,13 8006324: 58 22 00 00 sw (r1+0),r2 8006328: 34 0d ff ff mvi r13,-1
return result; }
800632c: b9 a0 08 00 mv r1,r13 8006330: 2b 9d 00 04 lw ra,(sp+4) 8006334: 2b 8b 00 40 lw r11,(sp+64) 8006338: 2b 8c 00 3c lw r12,(sp+60) 800633c: 2b 8d 00 38 lw r13,(sp+56) 8006340: 2b 8e 00 34 lw r14,(sp+52) 8006344: 2b 8f 00 30 lw r15,(sp+48) 8006348: 2b 90 00 2c lw r16,(sp+44) 800634c: 2b 91 00 28 lw r17,(sp+40) 8006350: 2b 92 00 24 lw r18,(sp+36) 8006354: 2b 93 00 20 lw r19,(sp+32) 8006358: 2b 94 00 1c lw r20,(sp+28) 800635c: 2b 95 00 18 lw r21,(sp+24) 8006360: 2b 96 00 14 lw r22,(sp+20) 8006364: 2b 97 00 10 lw r23,(sp+16) 8006368: 2b 98 00 0c lw r24,(sp+12) 800636c: 2b 99 00 08 lw r25,(sp+8) 8006370: 37 9c 00 7c addi sp,sp,124 8006374: c3 a0 00 00 ret
08006474 <IMFS_evaluate_for_make>: int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) {
8006474: 37 9c ff 84 addi sp,sp,-124 8006478: 5b 8b 00 40 sw (sp+64),r11 800647c: 5b 8c 00 3c sw (sp+60),r12 8006480: 5b 8d 00 38 sw (sp+56),r13 8006484: 5b 8e 00 34 sw (sp+52),r14 8006488: 5b 8f 00 30 sw (sp+48),r15 800648c: 5b 90 00 2c sw (sp+44),r16 8006490: 5b 91 00 28 sw (sp+40),r17 8006494: 5b 92 00 24 sw (sp+36),r18 8006498: 5b 93 00 20 sw (sp+32),r19 800649c: 5b 94 00 1c sw (sp+28),r20 80064a0: 5b 95 00 18 sw (sp+24),r21 80064a4: 5b 96 00 14 sw (sp+20),r22 80064a8: 5b 97 00 10 sw (sp+16),r23 80064ac: 5b 98 00 0c sw (sp+12),r24 80064b0: 5b 99 00 08 sw (sp+8),r25 80064b4: 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 )
80064b8: 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 */ ) {
80064bc: b8 40 60 00 mv r12,r2
/* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access;
80064c0: 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 */ ) {
80064c4: b8 60 88 00 mv r17,r3 80064c8: b8 20 78 00 mv r15,r1
node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path );
80064cc: f8 00 1c ec calli 800d87c <strlen>
case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access )
80064d0: 3a 10 d1 10 ori r16,r16,0xd110
node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path );
80064d4: 34 0d 00 00 mvi r13,0
* Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len );
80064d8: 37 98 00 44 addi r24,sp,68
/* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY )
80064dc: 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 ) {
80064e0: 34 17 00 02 mvi r23,2 80064e4: 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 ) {
80064e8: 34 15 00 04 mvi r21,4
result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 )
80064ec: 34 14 ff ff mvi r20,-1
node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path );
80064f0: b8 20 90 00 mv r18,r1
* Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len );
80064f4: ba 40 10 00 mv r2,r18 80064f8: b5 ed 08 00 add r1,r15,r13 80064fc: bb 00 18 00 mv r3,r24 8006500: 37 84 00 7c addi r4,sp,124 8006504: f8 00 01 5f calli 8006a80 <IMFS_get_token> 8006508: b8 20 70 00 mv r14,r1
pathlen -= len;
800650c: 2b 99 00 7c lw r25,(sp+124)
i += len; if ( !pathloc->node_access )
8006510: 29 81 00 00 lw r1,(r12+0)
*/ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len;
8006514: ca 59 90 00 sub r18,r18,r25
i += len; if ( !pathloc->node_access )
8006518: 44 20 00 55 be r1,r0,800666c <IMFS_evaluate_for_make+0x1f8><== NEVER TAKEN
/* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 800651c: 45 c0 00 07 be r14,r0,8006538 <IMFS_evaluate_for_make+0xc4> if ( node->type == IMFS_DIRECTORY )
8006520: 29 61 00 4c lw r1,(r11+76)
8006524: 5c 33 00 05 bne r1,r19,8006538 <IMFS_evaluate_for_make+0xc4> if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
8006528: b9 80 08 00 mv r1,r12 800652c: ba 60 10 00 mv r2,r19 8006530: fb ff fe 71 calli 8005ef4 <IMFS_evaluate_permission>
8006534: 44 20 00 64 be r1,r0,80066c4 <IMFS_evaluate_for_make+0x250> while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len;
8006538: b5 b9 68 00 add r13,r13,r25
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;
800653c: 29 8b 00 00 lw r11,(r12+0)
switch( type ) { 8006540: 45 d7 00 07 be r14,r23,800655c <IMFS_evaluate_for_make+0xe8> 8006544: 55 d7 00 03 bgu r14,r23,8006550 <IMFS_evaluate_for_make+0xdc> 8006548: 5d c0 ff eb bne r14,r0,80064f4 <IMFS_evaluate_for_make+0x80>
800654c: e0 00 00 3a bi 8006634 <IMFS_evaluate_for_make+0x1c0>
8006550: 45 d6 00 11 be r14,r22,8006594 <IMFS_evaluate_for_make+0x120>
8006554: 5d d5 ff e8 bne r14,r21,80064f4 <IMFS_evaluate_for_make+0x80><== NEVER TAKEN
8006558: e0 00 00 3a bi 8006640 <IMFS_evaluate_for_make+0x1cc>
case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access )
800655c: 2a 01 00 00 lw r1,(r16+0) 8006560: 28 21 00 18 lw r1,(r1+24)
8006564: 45 61 ff e4 be r11,r1,80064f4 <IMFS_evaluate_for_make+0x80> /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
8006568: 29 84 00 10 lw r4,(r12+16) 800656c: 28 81 00 1c lw r1,(r4+28)
8006570: 5d 61 00 04 bne r11,r1,8006580 <IMFS_evaluate_for_make+0x10c> if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node;
8006574: 37 8b 00 68 addi r11,sp,104 8006578: 34 82 00 08 addi r2,r4,8 800657c: e0 00 00 16 bi 80065d4 <IMFS_evaluate_for_make+0x160>
*pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent )
8006580: 29 6b 00 08 lw r11,(r11+8)
8006584: 5d 60 00 2a bne r11,r0,800662c <IMFS_evaluate_for_make+0x1b8> rtems_set_errno_and_return_minus_one( ENOENT );
8006588: f8 00 17 ed calli 800c53c <__errno> 800658c: 58 2e 00 00 sw (r1+0),r14 8006590: e0 00 00 50 bi 80066d0 <IMFS_evaluate_for_make+0x25c>
pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) {
8006594: 29 61 00 4c lw r1,(r11+76)
8006598: 44 36 00 02 be r1,r22,80065a0 <IMFS_evaluate_for_make+0x12c> result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 800659c: 5c 35 00 06 bne r1,r21,80065b4 <IMFS_evaluate_for_make+0x140> result = IMFS_evaluate_link( pathloc, 0 );
80065a0: b9 80 08 00 mv r1,r12 80065a4: 34 02 00 00 mvi r2,0 80065a8: fb ff ff 74 calli 8006378 <IMFS_evaluate_link> 80065ac: b8 20 58 00 mv r11,r1
if ( result == -1 )
80065b0: 44 34 00 49 be r1,r20,80066d4 <IMFS_evaluate_for_make+0x260><== NEVER TAKEN
return -1; } node = pathloc->node_access;
80065b4: 29 84 00 00 lw r4,(r12+0)
if ( !node )
80065b8: 44 80 00 3c be r4,r0,80066a8 <IMFS_evaluate_for_make+0x234><== NEVER TAKEN
/* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY )
80065bc: 28 81 00 4c lw r1,(r4+76)
80065c0: 5c 33 00 3a bne r1,r19,80066a8 <IMFS_evaluate_for_make+0x234> /* * 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 ) {
80065c4: 28 8e 00 5c lw r14,(r4+92)
80065c8: 45 c0 00 14 be r14,r0,8006618 <IMFS_evaluate_for_make+0x1a4> newloc = node->info.directory.mt_fs->mt_fs_root;
80065cc: 37 8b 00 68 addi r11,sp,104 80065d0: 35 c2 00 1c addi r2,r14,28 80065d4: 34 03 00 14 mvi r3,20 80065d8: b9 60 08 00 mv r1,r11 80065dc: f8 00 1a 7e calli 800cfd4 <memcpy>
*pathloc = newloc;
80065e0: b9 60 10 00 mv r2,r11 80065e4: 34 03 00 14 mvi r3,20 80065e8: b9 80 08 00 mv r1,r12 80065ec: f8 00 1a 7a calli 800cfd4 <memcpy>
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
80065f0: 29 81 00 0c lw r1,(r12+12) 80065f4: b9 80 10 00 mv r2,r12 80065f8: ba 20 18 00 mv r3,r17 80065fc: 28 24 00 04 lw r4,(r1+4) 8006600: 2b 81 00 7c lw r1,(sp+124) 8006604: c9 a1 68 00 sub r13,r13,r1 8006608: b5 ed 08 00 add r1,r15,r13 800660c: d8 80 00 00 call r4 8006610: b8 20 58 00 mv r11,r1 8006614: e0 00 00 30 bi 80066d4 <IMFS_evaluate_for_make+0x260>
/* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token );
8006618: b8 80 08 00 mv r1,r4 800661c: bb 00 10 00 mv r2,r24 8006620: f8 00 00 ea calli 80069c8 <IMFS_find_match_in_dir> 8006624: 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 ) 8006628: 44 2e 00 09 be r1,r14,800664c <IMFS_evaluate_for_make+0x1d8> done = true; else pathloc->node_access = node;
800662c: 59 8b 00 00 sw (r12+0),r11 8006630: e3 ff ff b1 bi 80064f4 <IMFS_evaluate_for_make+0x80>
break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST );
8006634: f8 00 17 c2 calli 800c53c <__errno> 8006638: 34 02 00 11 mvi r2,17 800663c: e0 00 00 24 bi 80066cc <IMFS_evaluate_for_make+0x258>
break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
8006640: f8 00 17 bf calli 800c53c <__errno> 8006644: 34 02 00 5b mvi r2,91 8006648: e0 00 00 21 bi 80066cc <IMFS_evaluate_for_make+0x258>
case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ];
800664c: 2b 82 00 7c lw r2,(sp+124) 8006650: b5 ed 08 00 add r1,r15,r13 8006654: c9 a2 68 00 sub r13,r13,r2 8006658: b5 ed 78 00 add r15,r15,r13 800665c: 5a 2f 00 00 sw (r17+0),r15
/* * 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++) {
8006660: e0 00 00 06 bi 8006678 <IMFS_evaluate_for_make+0x204>
if ( !IMFS_is_separator( path[ i ] ) )
8006664: a0 64 18 00 and r3,r3,r4
8006668: 44 60 00 04 be r3,r0,8006678 <IMFS_evaluate_for_make+0x204> rtems_set_errno_and_return_minus_one( ENOENT );
800666c: f8 00 17 b4 calli 800c53c <__errno> 8006670: 34 02 00 02 mvi r2,2 8006674: e0 00 00 16 bi 80066cc <IMFS_evaluate_for_make+0x258>
/* * 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++) {
8006678: 40 22 00 00 lbu r2,(r1+0) 800667c: 34 21 00 01 addi r1,r1,1
if ( !IMFS_is_separator( path[ i ] ) )
8006680: 7c 44 00 2f cmpnei r4,r2,47 8006684: 7c 43 00 5c cmpnei r3,r2,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++) { 8006688: 5c 40 ff f7 bne r2,r0,8006664 <IMFS_evaluate_for_make+0x1f0> /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc );
800668c: b9 80 08 00 mv r1,r12 8006690: fb ff fd f0 calli 8005e50 <IMFS_Set_handlers> 8006694: b8 20 58 00 mv r11,r1
/* * The returned node must be a directory */ node = pathloc->node_access;
8006698: 29 81 00 00 lw r1,(r12+0) 800669c: 28 22 00 4c lw r2,(r1+76) 80066a0: 34 01 00 01 mvi r1,1
80066a4: 44 41 00 04 be r2,r1,80066b4 <IMFS_evaluate_for_make+0x240><== ALWAYS TAKEN
if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR );
80066a8: f8 00 17 a5 calli 800c53c <__errno> 80066ac: 34 02 00 14 mvi r2,20 80066b0: e0 00 00 07 bi 80066cc <IMFS_evaluate_for_make+0x258>
/* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
80066b4: b9 80 08 00 mv r1,r12 80066b8: 34 02 00 03 mvi r2,3 80066bc: fb ff fe 0e calli 8005ef4 <IMFS_evaluate_permission>
80066c0: 5c 20 00 05 bne r1,r0,80066d4 <IMFS_evaluate_for_make+0x260> rtems_set_errno_and_return_minus_one( EACCES );
80066c4: f8 00 17 9e calli 800c53c <__errno> 80066c8: 34 02 00 0d mvi r2,13 80066cc: 58 22 00 00 sw (r1+0),r2 80066d0: 34 0b ff ff mvi r11,-1
return result; }
80066d4: b9 60 08 00 mv r1,r11 80066d8: 2b 9d 00 04 lw ra,(sp+4) 80066dc: 2b 8b 00 40 lw r11,(sp+64) 80066e0: 2b 8c 00 3c lw r12,(sp+60) 80066e4: 2b 8d 00 38 lw r13,(sp+56) 80066e8: 2b 8e 00 34 lw r14,(sp+52) 80066ec: 2b 8f 00 30 lw r15,(sp+48) 80066f0: 2b 90 00 2c lw r16,(sp+44) 80066f4: 2b 91 00 28 lw r17,(sp+40) 80066f8: 2b 92 00 24 lw r18,(sp+36) 80066fc: 2b 93 00 20 lw r19,(sp+32) 8006700: 2b 94 00 1c lw r20,(sp+28) 8006704: 2b 95 00 18 lw r21,(sp+24) 8006708: 2b 96 00 14 lw r22,(sp+20) 800670c: 2b 97 00 10 lw r23,(sp+16) 8006710: 2b 98 00 0c lw r24,(sp+12) 8006714: 2b 99 00 08 lw r25,(sp+8) 8006718: 37 9c 00 7c addi sp,sp,124 800671c: c3 a0 00 00 ret
08005f70 <IMFS_evaluate_hard_link>: int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) {
8005f70: 37 9c ff f4 addi sp,sp,-12 8005f74: 5b 8b 00 08 sw (sp+8),r11 8005f78: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *jnode = node->node_access;
8005f7c: 28 23 00 00 lw r3,(r1+0)
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK )
8005f80: 34 04 00 03 mvi r4,3
int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) {
8005f84: b8 20 58 00 mv r11,r1
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK )
8005f88: 28 65 00 4c lw r5,(r3+76)
8005f8c: 44 a4 00 04 be r5,r4,8005f9c <IMFS_evaluate_hard_link+0x2c><== ALWAYS TAKEN
rtems_fatal_error_occurred (0xABCD0000);
8005f90: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8005f94: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED 8005f98: fb ff f1 c3 calli 80026a4 <rtems_fatal_error_occurred> <== NOT EXECUTED
/* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node;
8005f9c: 28 63 00 50 lw r3,(r3+80)
IMFS_Set_handlers( node );
8005fa0: 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;
8005fa4: 58 23 00 00 sw (r1+0),r3
IMFS_Set_handlers( node );
8005fa8: fb ff ff aa calli 8005e50 <IMFS_Set_handlers>
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) )
8005fac: 2b 82 00 0c lw r2,(sp+12) 8005fb0: b9 60 08 00 mv r1,r11 8005fb4: fb ff ff d0 calli 8005ef4 <IMFS_evaluate_permission> 8005fb8: 34 02 00 00 mvi r2,0
8005fbc: 5c 22 00 05 bne r1,r2,8005fd0 <IMFS_evaluate_hard_link+0x60><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EACCES );
8005fc0: f8 00 19 5f calli 800c53c <__errno> <== NOT EXECUTED 8005fc4: 34 02 00 0d mvi r2,13 <== NOT EXECUTED 8005fc8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8005fcc: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
return result; }
8005fd0: b8 40 08 00 mv r1,r2 8005fd4: 2b 9d 00 04 lw ra,(sp+4) 8005fd8: 2b 8b 00 08 lw r11,(sp+8) 8005fdc: 37 9c 00 0c addi sp,sp,12 8005fe0: c3 a0 00 00 ret
08005ef4 <IMFS_evaluate_permission>: int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) {
8005ef4: 37 9c ff f0 addi sp,sp,-16 8005ef8: 5b 8b 00 10 sw (sp+16),r11 8005efc: 5b 8c 00 0c sw (sp+12),r12 8005f00: 5b 8d 00 08 sw (sp+8),r13 8005f04: 5b 9d 00 04 sw (sp+4),ra
if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access;
8005f08: 28 2b 00 00 lw r11,(r1+0)
int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) {
8005f0c: b8 40 60 00 mv r12,r2
} jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid();
8005f10: f8 00 04 ef calli 80072cc <geteuid> 8005f14: b8 20 68 00 mv r13,r1
st_gid = getegid();
8005f18: f8 00 04 e8 calli 80072b8 <getegid>
* Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid )
8005f1c: 2d 62 00 3c lhu r2,(r11+60)
8005f20: 5c 4d 00 04 bne r2,r13,8005f30 <IMFS_evaluate_permission+0x3c> flags_to_test <<= 6;
8005f24: b9 80 08 00 mv r1,r12 8005f28: 34 02 00 06 mvi r2,6 8005f2c: e0 00 00 06 bi 8005f44 <IMFS_evaluate_permission+0x50>
else if ( st_gid == jnode->st_gid )
8005f30: 2d 62 00 3e lhu r2,(r11+62) 8005f34: b9 80 18 00 mv r3,r12
8005f38: 5c 41 00 05 bne r2,r1,8005f4c <IMFS_evaluate_permission+0x58><== NEVER TAKEN
flags_to_test <<= 3;
8005f3c: b9 80 08 00 mv r1,r12 8005f40: 34 02 00 03 mvi r2,3 8005f44: fb ff e8 ab calli 80001f0 <__ashlsi3> 8005f48: b8 20 18 00 mv r3,r1
/* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
8005f4c: 29 61 00 30 lw r1,(r11+48) 8005f50: a0 61 08 00 and r1,r3,r1
return 1; return 0; }
8005f54: e4 23 08 00 cmpe r1,r1,r3 8005f58: 2b 9d 00 04 lw ra,(sp+4) 8005f5c: 2b 8b 00 10 lw r11,(sp+16) 8005f60: 2b 8c 00 0c lw r12,(sp+12) 8005f64: 2b 8d 00 08 lw r13,(sp+8) 8005f68: 37 9c 00 10 addi sp,sp,16 8005f6c: c3 a0 00 00 ret
08005fe4 <IMFS_evaluate_sym_link>: int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) {
8005fe4: 37 9c ff f0 addi sp,sp,-16 8005fe8: 5b 8b 00 10 sw (sp+16),r11 8005fec: 5b 8c 00 0c sw (sp+12),r12 8005ff0: 5b 8d 00 08 sw (sp+8),r13 8005ff4: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *jnode = node->node_access;
8005ff8: 28 2c 00 00 lw r12,(r1+0)
int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) {
8005ffc: b8 40 68 00 mv r13,r2 8006000: b8 20 58 00 mv r11,r1
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK )
8006004: 29 82 00 4c lw r2,(r12+76) 8006008: 34 01 00 04 mvi r1,4
800600c: 44 41 00 04 be r2,r1,800601c <IMFS_evaluate_sym_link+0x38> <== ALWAYS TAKEN
rtems_fatal_error_occurred (0xABCD0000);
8006010: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8006014: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED 8006018: e0 00 00 05 bi 800602c <IMFS_evaluate_sym_link+0x48> <== NOT EXECUTED
if ( !jnode->Parent )
800601c: 29 81 00 08 lw r1,(r12+8)
8006020: 5c 20 00 04 bne r1,r0,8006030 <IMFS_evaluate_sym_link+0x4c><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xBAD00000 );
8006024: 78 01 ba d0 mvhi r1,0xbad0 <== NOT EXECUTED 8006028: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED 800602c: fb ff f1 9e calli 80026a4 <rtems_fatal_error_occurred> <== NOT EXECUTED
/* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent;
8006030: 59 61 00 00 sw (r11+0),r1
rtems_filesystem_get_sym_start_loc(
8006034: 29 81 00 50 lw r1,(r12+80) 8006038: 40 25 00 00 lbu r5,(r1+0) 800603c: 64 a4 00 5c cmpei r4,r5,92 8006040: 64 a1 00 2f cmpei r1,r5,47 8006044: b8 81 20 00 or r4,r4,r1
8006048: 5c 80 00 03 bne r4,r0,8006054 <IMFS_evaluate_sym_link+0x70>
800604c: b8 80 08 00 mv r1,r4
8006050: 5c a4 00 09 bne r5,r4,8006074 <IMFS_evaluate_sym_link+0x90><== ALWAYS TAKEN
8006054: 78 01 08 01 mvhi r1,0x801 8006058: 38 21 d1 10 ori r1,r1,0xd110 800605c: 28 22 00 00 lw r2,(r1+0) 8006060: 34 03 00 14 mvi r3,20 8006064: b9 60 08 00 mv r1,r11 8006068: 34 42 00 18 addi r2,r2,24 800606c: f8 00 1b da calli 800cfd4 <memcpy> 8006070: 34 01 00 01 mvi r1,1
* Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ),
8006074: 29 8c 00 50 lw r12,(r12+80) 8006078: b5 81 60 00 add r12,r12,r1 800607c: b9 80 08 00 mv r1,r12 8006080: f8 00 1d ff calli 800d87c <strlen> 8006084: b8 20 10 00 mv r2,r1
/* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path(
8006088: b9 a0 18 00 mv r3,r13 800608c: b9 80 08 00 mv r1,r12 8006090: b9 60 20 00 mv r4,r11 8006094: f8 00 00 13 calli 80060e0 <IMFS_eval_path> 8006098: b8 20 60 00 mv r12,r1
strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node );
800609c: b9 60 08 00 mv r1,r11 80060a0: fb ff ff 6c calli 8005e50 <IMFS_Set_handlers>
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) )
80060a4: b9 60 08 00 mv r1,r11 80060a8: b9 a0 10 00 mv r2,r13 80060ac: fb ff ff 92 calli 8005ef4 <IMFS_evaluate_permission>
80060b0: 5c 20 00 05 bne r1,r0,80060c4 <IMFS_evaluate_sym_link+0xe0><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EACCES );
80060b4: f8 00 19 22 calli 800c53c <__errno> <== NOT EXECUTED 80060b8: 34 02 00 0d mvi r2,13 <== NOT EXECUTED 80060bc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80060c0: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
return result; }
80060c4: b9 80 08 00 mv r1,r12 80060c8: 2b 9d 00 04 lw ra,(sp+4) 80060cc: 2b 8b 00 10 lw r11,(sp+16) 80060d0: 2b 8c 00 0c lw r12,(sp+12) 80060d4: 2b 8d 00 08 lw r13,(sp+8) 80060d8: 37 9c 00 10 addi sp,sp,16 80060dc: c3 a0 00 00 ret
0800a93c <IMFS_fchmod>: int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) {
800a93c: 37 9c ff e8 addi sp,sp,-24 800a940: 5b 8b 00 10 sw (sp+16),r11 800a944: 5b 8c 00 0c sw (sp+12),r12 800a948: 5b 8d 00 08 sw (sp+8),r13 800a94c: 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;
800a950: 28 2b 00 00 lw r11,(r1+0)
int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) {
800a954: 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();
800a958: fb ff f2 5d calli 80072cc <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
800a95c: 2d 62 00 3c lhu r2,(r11+60) 800a960: 7c 2c 00 00 cmpnei r12,r1,0 800a964: fc 41 08 00 cmpne r1,r2,r1 800a968: a1 81 60 00 and r12,r12,r1
800a96c: 45 80 00 06 be r12,r0,800a984 <IMFS_fchmod+0x48> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
800a970: f8 00 06 f3 calli 800c53c <__errno> <== NOT EXECUTED 800a974: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800a978: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800a97c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800a980: e0 00 00 0d bi 800a9b4 <IMFS_fchmod+0x78> <== NOT EXECUTED
/* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
800a984: 29 63 00 30 lw r3,(r11+48) 800a988: 34 01 f0 00 mvi r1,-4096 800a98c: 21 a2 0f ff andi r2,r13,0xfff 800a990: a0 61 08 00 and r1,r3,r1 800a994: b8 41 10 00 or r2,r2,r1 800a998: 59 62 00 30 sw (r11+48),r2
IMFS_update_ctime( jnode );
800a99c: 37 81 00 14 addi r1,sp,20 800a9a0: b9 80 10 00 mv r2,r12 800a9a4: fb ff f2 4f calli 80072e0 <gettimeofday> 800a9a8: 2b 81 00 14 lw r1,(sp+20) 800a9ac: 59 61 00 48 sw (r11+72),r1 800a9b0: b9 80 08 00 mv r1,r12
return 0; }
800a9b4: 2b 9d 00 04 lw ra,(sp+4) 800a9b8: 2b 8b 00 10 lw r11,(sp+16) 800a9bc: 2b 8c 00 0c lw r12,(sp+12) 800a9c0: 2b 8d 00 08 lw r13,(sp+8) 800a9c4: 37 9c 00 18 addi sp,sp,24 800a9c8: c3 a0 00 00 ret
080068f0 <IMFS_fifo_close>: } int IMFS_fifo_close( rtems_libio_t *iop ) {
80068f0: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 80068f4: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 80068f8: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 80068fc: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8006900: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
8006904: 28 2d 00 3c lw r13,(r1+60) <== NOT EXECUTED
int err = pipe_release(&JNODE2PIPE(jnode), iop);
8006908: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
} int IMFS_fifo_close( rtems_libio_t *iop ) {
800690c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop);
8006910: 35 a1 00 50 addi r1,r13,80 <== NOT EXECUTED 8006914: f8 00 0e 44 calli 800a224 <pipe_release> <== NOT EXECUTED 8006918: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if (! err) {
800691c: 5c 20 00 0d bne r1,r0,8006950 <IMFS_fifo_close+0x60> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_OPEN;
8006920: 29 83 00 18 lw r3,(r12+24) <== NOT EXECUTED 8006924: 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)
8006928: 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;
800692c: a0 62 10 00 and r2,r3,r2 <== NOT EXECUTED 8006930: 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)
8006934: f8 00 02 b3 calli 8007400 <rtems_libio_is_file_open> <== NOT EXECUTED 8006938: 5c 2b 00 0b bne r1,r11,8006964 <IMFS_fifo_close+0x74> <== NOT EXECUTED 800693c: 2d a1 00 34 lhu r1,(r13+52) <== NOT EXECUTED 8006940: 5c 20 00 09 bne r1,r0,8006964 <IMFS_fifo_close+0x74> <== NOT EXECUTED
free(jnode);
8006944: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8006948: f8 00 01 e7 calli 80070e4 <free> <== NOT EXECUTED 800694c: e0 00 00 06 bi 8006964 <IMFS_fifo_close+0x74> <== NOT EXECUTED
} IMFS_FIFO_RETURN(err);
8006950: 4c 20 00 05 bge r1,r0,8006964 <IMFS_fifo_close+0x74> <== NOT EXECUTED 8006954: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 8006958: f8 00 16 f9 calli 800c53c <__errno> <== NOT EXECUTED 800695c: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8006960: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
}
8006964: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8006968: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800696c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8006970: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8006974: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8006978: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 800697c: c3 a0 00 00 ret <== NOT EXECUTED
0800678c <IMFS_fifo_ioctl>: int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) {
800678c: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8006790: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8006794: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
int err; if (command == FIONBIO) {
8006798: 78 04 80 04 mvhi r4,0x8004 <== NOT EXECUTED 800679c: 38 84 66 7e ori r4,r4,0x667e <== NOT EXECUTED 80067a0: 5c 44 00 0e bne r2,r4,80067d8 <IMFS_fifo_ioctl+0x4c> <== NOT EXECUTED
if (buffer == NULL)
80067a4: 34 0b ff f2 mvi r11,-14 <== NOT EXECUTED 80067a8: 44 60 00 12 be r3,r0,80067f0 <IMFS_fifo_ioctl+0x64> <== NOT EXECUTED
err = -EFAULT; else { if (*(int *)buffer)
80067ac: 28 6b 00 00 lw r11,(r3+0) <== NOT EXECUTED 80067b0: 28 22 00 18 lw r2,(r1+24) <== NOT EXECUTED 80067b4: 45 60 00 05 be r11,r0,80067c8 <IMFS_fifo_ioctl+0x3c> <== NOT EXECUTED
iop->flags |= LIBIO_FLAGS_NO_DELAY;
80067b8: 38 42 00 01 ori r2,r2,0x1 <== NOT EXECUTED 80067bc: 58 22 00 18 sw (r1+24),r2 <== NOT EXECUTED 80067c0: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 80067c4: e0 00 00 0f bi 8006800 <IMFS_fifo_ioctl+0x74> <== NOT EXECUTED
else iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
80067c8: 34 03 ff fe mvi r3,-2 <== NOT EXECUTED 80067cc: a0 43 10 00 and r2,r2,r3 <== NOT EXECUTED 80067d0: 58 22 00 18 sw (r1+24),r2 <== NOT EXECUTED 80067d4: e0 00 00 0b bi 8006800 <IMFS_fifo_ioctl+0x74> <== NOT EXECUTED
return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
80067d8: 28 25 00 3c lw r5,(r1+60) <== NOT EXECUTED 80067dc: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 80067e0: 28 a1 00 50 lw r1,(r5+80) <== NOT EXECUTED 80067e4: f8 00 0d 7b calli 8009dd0 <pipe_ioctl> <== NOT EXECUTED 80067e8: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
80067ec: 4c 20 00 05 bge r1,r0,8006800 <IMFS_fifo_ioctl+0x74> <== NOT EXECUTED 80067f0: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 80067f4: f8 00 17 52 calli 800c53c <__errno> <== NOT EXECUTED 80067f8: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 80067fc: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
}
8006800: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8006804: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006808: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 800680c: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8006810: c3 a0 00 00 ret <== NOT EXECUTED
08006720 <IMFS_fifo_lseek>: rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) {
8006720: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8006724: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8006728: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800672c: b8 20 28 00 mv r5,r1 <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
8006730: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED 8006734: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8006738: b8 80 18 00 mv r3,r4 <== NOT EXECUTED 800673c: 28 21 00 50 lw r1,(r1+80) <== NOT EXECUTED 8006740: b8 a0 20 00 mv r4,r5 <== NOT EXECUTED 8006744: f8 00 0d 86 calli 8009d5c <pipe_lseek> <== NOT EXECUTED 8006748: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
800674c: 4c 20 00 07 bge r1,r0,8006768 <IMFS_fifo_lseek+0x48> <== NOT EXECUTED 8006750: f8 00 17 7b calli 800c53c <__errno> <== NOT EXECUTED 8006754: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 8006758: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 800675c: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8006760: b8 60 58 00 mv r11,r3 <== NOT EXECUTED 8006764: e0 00 00 04 bi 8006774 <IMFS_fifo_lseek+0x54> <== NOT EXECUTED 8006768: 34 02 00 1f mvi r2,31 <== NOT EXECUTED 800676c: fb ff e6 f1 calli 8000330 <__ashrsi3> <== NOT EXECUTED 8006770: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
}
8006774: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 8006778: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800677c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006780: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8006784: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8006788: c3 a0 00 00 ret <== NOT EXECUTED
08006980 <IMFS_fifo_open>: rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) {
8006980: 37 9c ff f8 addi sp,sp,-8 8006984: 5b 8b 00 08 sw (sp+8),r11 8006988: 5b 9d 00 04 sw (sp+4),ra 800698c: b8 20 10 00 mv r2,r1
IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop);
8006990: 28 21 00 3c lw r1,(r1+60) 8006994: 34 21 00 50 addi r1,r1,80 8006998: f8 00 0e 6b calli 800a344 <fifo_open> 800699c: b8 20 58 00 mv r11,r1
IMFS_FIFO_RETURN(err);
80069a0: 4c 20 00 05 bge r1,r0,80069b4 <IMFS_fifo_open+0x34> <== NEVER TAKEN
80069a4: c8 0b 58 00 sub r11,r0,r11 80069a8: f8 00 16 e5 calli 800c53c <__errno> 80069ac: 58 2b 00 00 sw (r1+0),r11 80069b0: 34 0b ff ff mvi r11,-1
}
80069b4: b9 60 08 00 mv r1,r11 80069b8: 2b 9d 00 04 lw ra,(sp+4) 80069bc: 2b 8b 00 08 lw r11,(sp+8) 80069c0: 37 9c 00 08 addi sp,sp,8 80069c4: c3 a0 00 00 ret
08006884 <IMFS_fifo_read>: ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) {
8006884: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 8006888: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 800688c: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8006890: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
8006894: 28 2c 00 3c lw r12,(r1+60) <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
8006898: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 800689c: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED 80068a0: f8 00 0d 6c calli 8009e50 <pipe_read> <== NOT EXECUTED 80068a4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if (err > 0)
80068a8: 4c 01 00 07 bge r0,r1,80068c4 <IMFS_fifo_read+0x40> <== NOT EXECUTED
IMFS_update_atime(jnode);
80068ac: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED 80068b0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 80068b4: f8 00 02 8b calli 80072e0 <gettimeofday> <== NOT EXECUTED 80068b8: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED 80068bc: 59 81 00 40 sw (r12+64),r1 <== NOT EXECUTED 80068c0: e0 00 00 06 bi 80068d8 <IMFS_fifo_read+0x54> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
80068c4: 44 20 00 05 be r1,r0,80068d8 <IMFS_fifo_read+0x54> <== NOT EXECUTED 80068c8: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 80068cc: f8 00 17 1c calli 800c53c <__errno> <== NOT EXECUTED 80068d0: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 80068d4: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
}
80068d8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80068dc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80068e0: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 80068e4: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 80068e8: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 80068ec: c3 a0 00 00 ret <== NOT EXECUTED
08006814 <IMFS_fifo_write>: ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) {
8006814: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 8006818: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 800681c: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8006820: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
8006824: 28 2c 00 3c lw r12,(r1+60) <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
8006828: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 800682c: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED 8006830: f8 00 0d f1 calli 8009ff4 <pipe_write> <== NOT EXECUTED 8006834: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if (err > 0) {
8006838: 4c 01 00 08 bge r0,r1,8006858 <IMFS_fifo_write+0x44> <== NOT EXECUTED
IMFS_mtime_ctime_update(jnode);
800683c: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED 8006840: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8006844: f8 00 02 a7 calli 80072e0 <gettimeofday> <== NOT EXECUTED 8006848: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED 800684c: 59 81 00 48 sw (r12+72),r1 <== NOT EXECUTED 8006850: 59 81 00 44 sw (r12+68),r1 <== NOT EXECUTED 8006854: e0 00 00 06 bi 800686c <IMFS_fifo_write+0x58> <== NOT EXECUTED
} IMFS_FIFO_RETURN(err);
8006858: 44 20 00 05 be r1,r0,800686c <IMFS_fifo_write+0x58> <== NOT EXECUTED 800685c: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED 8006860: f8 00 17 37 calli 800c53c <__errno> <== NOT EXECUTED 8006864: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED 8006868: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
}
800686c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8006870: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006874: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8006878: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 800687c: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 8006880: c3 a0 00 00 ret <== NOT EXECUTED
080069c8 <IMFS_find_match_in_dir>: IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) {
80069c8: 37 9c ff f0 addi sp,sp,-16 80069cc: 5b 8b 00 10 sw (sp+16),r11 80069d0: 5b 8c 00 0c sw (sp+12),r12 80069d4: 5b 8d 00 08 sw (sp+8),r13 80069d8: 5b 9d 00 04 sw (sp+4),ra 80069dc: b8 20 58 00 mv r11,r1 80069e0: b8 40 60 00 mv r12,r2
/* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory );
80069e4: 5c 20 00 09 bne r1,r0,8006a08 <IMFS_find_match_in_dir+0x40><== ALWAYS TAKEN
80069e8: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 80069ec: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED 80069f0: 78 04 08 01 mvhi r4,0x801 <== NOT EXECUTED 80069f4: 38 21 bb 70 ori r1,r1,0xbb70 <== NOT EXECUTED 80069f8: 38 63 bb d0 ori r3,r3,0xbbd0 <== NOT EXECUTED 80069fc: 38 84 bb bc ori r4,r4,0xbbbc <== NOT EXECUTED 8006a00: 34 02 00 2a mvi r2,42 <== NOT EXECUTED 8006a04: f8 00 01 4d calli 8006f38 <__assert_func> <== NOT EXECUTED
if ( !name )
8006a08: 44 40 00 16 be r2,r0,8006a60 <IMFS_find_match_in_dir+0x98> <== NEVER TAKEN
/* * Check for "." and ".." */ if ( !strcmp( name, dotname ) )
8006a0c: 78 02 08 01 mvhi r2,0x801 8006a10: 38 42 bb c8 ori r2,r2,0xbbc8 8006a14: b9 80 08 00 mv r1,r12 8006a18: f8 00 1b 49 calli 800d73c <strcmp>
8006a1c: 44 20 00 12 be r1,r0,8006a64 <IMFS_find_match_in_dir+0x9c> <== NEVER TAKEN
return directory; if ( !strcmp( name, dotdotname ) )
8006a20: 78 02 08 01 mvhi r2,0x801 8006a24: 38 42 bb cc ori r2,r2,0xbbcc 8006a28: b9 80 08 00 mv r1,r12 8006a2c: f8 00 1b 44 calli 800d73c <strcmp>
8006a30: 5c 20 00 03 bne r1,r0,8006a3c <IMFS_find_match_in_dir+0x74><== ALWAYS TAKEN
return directory->Parent;
8006a34: 29 6b 00 08 lw r11,(r11+8) <== NOT EXECUTED 8006a38: e0 00 00 0b bi 8006a64 <IMFS_find_match_in_dir+0x9c> <== NOT EXECUTED
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
8006a3c: 35 6d 00 54 addi r13,r11,84
the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first;
8006a40: 29 6b 00 50 lw r11,(r11+80) 8006a44: e0 00 00 06 bi 8006a5c <IMFS_find_match_in_dir+0x94>
!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 ) )
8006a48: b9 80 08 00 mv r1,r12 8006a4c: 35 62 00 0c addi r2,r11,12 8006a50: f8 00 1b 3b calli 800d73c <strcmp>
8006a54: 44 20 00 04 be r1,r0,8006a64 <IMFS_find_match_in_dir+0x9c> the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) {
8006a58: 29 6b 00 00 lw r11,(r11+0)
if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 8006a5c: 5d 6d ff fb bne r11,r13,8006a48 <IMFS_find_match_in_dir+0x80>
8006a60: 34 0b 00 00 mvi r11,0
if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; }
8006a64: b9 60 08 00 mv r1,r11 8006a68: 2b 9d 00 04 lw ra,(sp+4) 8006a6c: 2b 8b 00 10 lw r11,(sp+16) 8006a70: 2b 8c 00 0c lw r12,(sp+12) 8006a74: 2b 8d 00 08 lw r13,(sp+8) 8006a78: 37 9c 00 10 addi sp,sp,16 8006a7c: c3 a0 00 00 ret
0800ca0c <IMFS_fsunmount>: ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) {
800ca0c: 37 9c ff d8 addi sp,sp,-40 800ca10: 5b 8b 00 14 sw (sp+20),r11 800ca14: 5b 8c 00 10 sw (sp+16),r12 800ca18: 5b 8d 00 0c sw (sp+12),r13 800ca1c: 5b 8e 00 08 sw (sp+8),r14 800ca20: 5b 9d 00 04 sw (sp+4),ra 800ca24: b8 20 68 00 mv r13,r1
* Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root;
800ca28: 37 8c 00 18 addi r12,sp,24 800ca2c: 35 a2 00 1c addi r2,r13,28 800ca30: b9 80 08 00 mv r1,r12 800ca34: 34 03 00 14 mvi r3,20
/* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
800ca38: 29 ab 00 1c lw r11,(r13+28)
loc = temp_mt_entry->mt_fs_root;
800ca3c: f8 00 1a f1 calli 8013600 <memcpy>
/* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL;
800ca40: 34 01 00 00 mvi r1,0 800ca44: 59 a1 00 1c sw (r13+28),r1
do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) {
800ca48: 34 0d 00 01 mvi r13,1
temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc );
800ca4c: b9 80 08 00 mv r1,r12
temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode;
800ca50: 5b 8b 00 18 sw (sp+24),r11
*/ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent;
800ca54: 29 6e 00 08 lw r14,(r11+8)
loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc );
800ca58: fb ff fd 0d calli 800be8c <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
800ca5c: 29 62 00 4c lw r2,(r11+76)
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
800ca60: 35 61 00 54 addi r1,r11,84
800ca64: 5c 4d 00 03 bne r2,r13,800ca70 <IMFS_fsunmount+0x64>
800ca68: 29 62 00 50 lw r2,(r11+80)
800ca6c: 5c 41 00 06 bne r2,r1,800ca84 <IMFS_fsunmount+0x78> result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc );
800ca70: 34 01 00 00 mvi r1,0 800ca74: b9 80 10 00 mv r2,r12 800ca78: fb ff d6 15 calli 80022cc <IMFS_unlink>
if (result != 0)
800ca7c: 5c 20 00 0b bne r1,r0,800caa8 <IMFS_fsunmount+0x9c> <== NEVER TAKEN
800ca80: b9 c0 58 00 mv r11,r14
return -1; jnode = next; } if ( jnode != NULL ) { 800ca84: 45 60 00 0b be r11,r0,800cab0 <IMFS_fsunmount+0xa4> if ( jnode->type == IMFS_DIRECTORY ) {
800ca88: 29 61 00 4c lw r1,(r11+76)
800ca8c: 5c 2d ff f0 bne r1,r13,800ca4c <IMFS_fsunmount+0x40> <== NEVER TAKEN
800ca90: 29 61 00 50 lw r1,(r11+80) 800ca94: 35 62 00 54 addi r2,r11,84
800ca98: 44 22 ff ed be r1,r2,800ca4c <IMFS_fsunmount+0x40> if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode );
800ca9c: b8 20 58 00 mv r11,r1
} } } while (jnode != NULL);
800caa0: 5c 20 ff eb bne r1,r0,800ca4c <IMFS_fsunmount+0x40> <== ALWAYS TAKEN
800caa4: e0 00 00 03 bi 800cab0 <IMFS_fsunmount+0xa4> <== NOT EXECUTED 800caa8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800caac: e0 00 00 02 bi 800cab4 <IMFS_fsunmount+0xa8> <== NOT EXECUTED
800cab0: 34 01 00 00 mvi r1,0
return 0; }
800cab4: 2b 9d 00 04 lw ra,(sp+4) 800cab8: 2b 8b 00 14 lw r11,(sp+20) 800cabc: 2b 8c 00 10 lw r12,(sp+16) 800cac0: 2b 8d 00 0c lw r13,(sp+12) 800cac4: 2b 8e 00 08 lw r14,(sp+8) 800cac8: 37 9c 00 28 addi sp,sp,40 800cacc: c3 a0 00 00 ret
08006a80 <IMFS_get_token>: const char *path, int pathlen, char *token, int *token_len ) {
8006a80: 37 9c ff f4 addi sp,sp,-12 8006a84: 5b 8b 00 0c sw (sp+12),r11 8006a88: 5b 8c 00 08 sw (sp+8),r12 8006a8c: 5b 9d 00 04 sw (sp+4),ra
register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i];
8006a90: 34 05 00 00 mvi r5,0
const char *path, int pathlen, char *token, int *token_len ) {
8006a94: b8 60 60 00 mv r12,r3
register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i];
8006a98: 40 26 00 00 lbu r6,(r1+0)
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX )
8006a9c: 34 03 00 20 mvi r3,32
/* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
8006aa0: e0 00 00 08 bi 8006ac0 <IMFS_get_token+0x40>
token[i] = c;
8006aa4: 31 06 00 00 sb (r8+0),r6
if ( i == IMFS_NAME_MAX ) 8006aa8: 5c a3 00 03 bne r5,r3,8006ab4 <IMFS_get_token+0x34>
8006aac: 34 0b 00 04 mvi r11,4 8006ab0: e0 00 00 2d bi 8006b64 <IMFS_get_token+0xe4>
return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i];
8006ab4: 34 a5 00 01 addi r5,r5,1 8006ab8: b4 25 30 00 add r6,r1,r5 8006abc: 40 c6 00 00 lbu r6,(r6+0)
/* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
8006ac0: 7c cb 00 5c cmpnei r11,r6,92 8006ac4: 7c c9 00 2f cmpnei r9,r6,47 8006ac8: e8 45 50 00 cmpg r10,r2,r5 8006acc: 7c c7 00 00 cmpnei r7,r6,0 8006ad0: a1 69 48 00 and r9,r11,r9
token[i] = c;
8006ad4: b5 85 40 00 add r8,r12,r5
/* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
8006ad8: a1 47 38 00 and r7,r10,r7
8006adc: 45 20 00 02 be r9,r0,8006ae4 <IMFS_get_token+0x64> 8006ae0: 5c e0 ff f1 bne r7,r0,8006aa4 <IMFS_get_token+0x24> /* * Copy a seperator into token. */ if ( i == 0 ) { 8006ae4: 5c a0 00 0a bne r5,r0,8006b0c <IMFS_get_token+0x8c> token[i] = c; if ( (token[i] != '\0') && pathlen ) {
8006ae8: 7c c1 00 00 cmpnei r1,r6,0 8006aec: 7c 42 00 00 cmpnei r2,r2,0
/* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c;
8006af0: 31 86 00 00 sb (r12+0),r6
if ( (token[i] != '\0') && pathlen ) {
8006af4: a0 22 10 00 and r2,r1,r2 8006af8: b8 a0 58 00 mv r11,r5
8006afc: 44 45 00 0a be r2,r5,8006b24 <IMFS_get_token+0xa4>
8006b00: 34 05 00 01 mvi r5,1 8006b04: b8 a0 58 00 mv r11,r5 8006b08: e0 00 00 07 bi 8006b24 <IMFS_get_token+0xa4>
i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') {
8006b0c: b5 85 08 00 add r1,r12,r5 8006b10: 40 22 ff ff lbu r2,(r1+-1) 8006b14: 34 0b 00 03 mvi r11,3
8006b18: 44 40 00 03 be r2,r0,8006b24 <IMFS_get_token+0xa4> <== NEVER TAKEN
token[i] = '\0';
8006b1c: 34 02 00 00 mvi r2,0 8006b20: 30 22 00 00 sb (r1+0),r2
/* * Set token_len to the number of characters copied. */ *token_len = i;
8006b24: 58 85 00 00 sw (r4+0),r5
/* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) {
8006b28: 34 01 00 03 mvi r1,3
8006b2c: 5d 61 00 0e bne r11,r1,8006b64 <IMFS_get_token+0xe4> if ( strcmp( token, "..") == 0 )
8006b30: 78 02 08 01 mvhi r2,0x801 8006b34: 38 42 bb e8 ori r2,r2,0xbbe8 8006b38: b9 80 08 00 mv r1,r12 8006b3c: f8 00 1b 00 calli 800d73c <strcmp>
8006b40: 5c 20 00 03 bne r1,r0,8006b4c <IMFS_get_token+0xcc>
8006b44: 34 0b 00 02 mvi r11,2 8006b48: e0 00 00 07 bi 8006b64 <IMFS_get_token+0xe4>
type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 )
8006b4c: 78 02 08 01 mvhi r2,0x801 8006b50: b9 80 08 00 mv r1,r12 8006b54: 38 42 bb ec ori r2,r2,0xbbec 8006b58: f8 00 1a f9 calli 800d73c <strcmp>
8006b5c: 5c 20 00 02 bne r1,r0,8006b64 <IMFS_get_token+0xe4>
8006b60: 34 0b 00 01 mvi r11,1
type = IMFS_CURRENT_DIR; } return type; }
8006b64: b9 60 08 00 mv r1,r11 8006b68: 2b 9d 00 04 lw ra,(sp+4) 8006b6c: 2b 8b 00 0c lw r11,(sp+12) 8006b70: 2b 8c 00 08 lw r12,(sp+8) 8006b74: 37 9c 00 0c addi sp,sp,12 8006b78: c3 a0 00 00 ret
08006b7c <IMFS_initialize_support>: 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 ) {
8006b7c: 37 9c ff ec addi sp,sp,-20 8006b80: 5b 8b 00 14 sw (sp+20),r11 8006b84: 5b 8c 00 10 sw (sp+16),r12 8006b88: 5b 8d 00 0c sw (sp+12),r13 8006b8c: 5b 8e 00 08 sw (sp+8),r14 8006b90: 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,
8006b94: 78 05 08 01 mvhi r5,0x801 8006b98: 38 a5 d0 14 ori r5,r5,0xd014 8006b9c: 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 ) {
8006ba0: b8 20 58 00 mv r11,r1 8006ba4: b8 40 70 00 mv r14,r2 8006ba8: b8 60 68 00 mv r13,r3 8006bac: b8 80 60 00 mv r12,r4
IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
8006bb0: 34 05 00 00 mvi r5,0 8006bb4: 34 01 00 10 mvi r1,16
int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
8006bb8: 34 02 00 06 mvi r2,6 8006bbc: 34 a5 00 01 addi r5,r5,1
8006bc0: 44 26 00 04 be r1,r6,8006bd0 <IMFS_initialize_support+0x54>
8006bc4: b4 21 08 00 add r1,r1,r1
8006bc8: 5c a2 ff fd bne r5,r2,8006bbc <IMFS_initialize_support+0x40><== ALWAYS TAKEN
8006bcc: 34 01 00 80 mvi r1,128 <== NOT EXECUTED
if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid)
8006bd0: 78 05 08 01 mvhi r5,0x801 8006bd4: 38 a5 d6 a0 ori r5,r5,0xd6a0 8006bd8: 58 a1 00 00 sw (r5+0),r1
/* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
8006bdc: f8 00 0e f2 calli 800a7a4 <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;
8006be0: 78 02 08 01 mvhi r2,0x801
/* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
8006be4: 59 61 00 1c sw (r11+28),r1
temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
8006be8: 38 42 bf bc ori r2,r2,0xbfbc 8006bec: 34 03 00 30 mvi r3,48
* * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table;
8006bf0: 59 6e 00 28 sw (r11+40),r14
* Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers;
8006bf4: 59 6c 00 24 sw (r11+36),r12
temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
8006bf8: 35 61 00 38 addi r1,r11,56 8006bfc: f8 00 18 f6 calli 800cfd4 <memcpy>
/* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
8006c00: 34 02 00 10 mvi r2,16 8006c04: 34 01 00 01 mvi r1,1 8006c08: f8 00 00 df calli 8006f84 <calloc> 8006c0c: b8 20 10 00 mv r2,r1 8006c10: 29 61 00 1c lw r1,(r11+28)
if ( !fs_info ) {
8006c14: 5c 40 00 07 bne r2,r0,8006c30 <IMFS_initialize_support+0xb4><== ALWAYS TAKEN
free(temp_mt_entry->mt_fs_root.node_access);
8006c18: f8 00 01 33 calli 80070e4 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
8006c1c: f8 00 16 48 calli 800c53c <__errno> <== NOT EXECUTED 8006c20: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8006c24: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8006c28: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8006c2c: e0 00 00 0f bi 8006c68 <IMFS_initialize_support+0xec> <== NOT EXECUTED
/* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++;
8006c30: 78 05 08 01 mvhi r5,0x801 8006c34: 38 a5 d6 a4 ori r5,r5,0xd6a4 8006c38: 28 a6 00 00 lw r6,(r5+0)
fs_info->ino_count = 1;
8006c3c: 34 04 00 01 mvi r4,1 8006c40: 58 44 00 04 sw (r2+4),r4
fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count;
8006c44: 58 24 00 38 sw (r1+56),r4
/* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++;
8006c48: b4 c4 08 00 add r1,r6,r4 8006c4c: 58 a1 00 00 sw (r5+0),r1
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;
8006c50: 59 62 00 34 sw (r11+52),r2
*/ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers;
8006c54: 58 4c 00 0c sw (r2+12),r12
* Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers;
8006c58: 58 4d 00 08 sw (r2+8),r13
/* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++;
8006c5c: 58 46 00 00 sw (r2+0),r6
jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize();
8006c60: f8 00 0c 41 calli 8009d64 <rtems_pipe_initialize> 8006c64: 34 01 00 00 mvi r1,0
return 0; }
8006c68: 2b 9d 00 04 lw ra,(sp+4) 8006c6c: 2b 8b 00 14 lw r11,(sp+20) 8006c70: 2b 8c 00 10 lw r12,(sp+16) 8006c74: 2b 8d 00 0c lw r13,(sp+12) 8006c78: 2b 8e 00 08 lw r14,(sp+8) 8006c7c: 37 9c 00 14 addi sp,sp,20 8006c80: c3 a0 00 00 ret
08001f44 <IMFS_link>: int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) {
8001f44: 37 9c ff a8 addi sp,sp,-88 8001f48: 5b 8b 00 10 sw (sp+16),r11 8001f4c: 5b 8c 00 0c sw (sp+12),r12 8001f50: 5b 8d 00 08 sw (sp+8),r13 8001f54: 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;
8001f58: 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 */ ) {
8001f5c: 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 )
8001f60: 34 02 00 07 mvi r2,7
int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access;
8001f64: 5b 84 00 38 sw (sp+56),r4
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
8001f68: 2c 81 00 34 lhu r1,(r4+52)
int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) {
8001f6c: b8 60 60 00 mv r12,r3
/* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 8001f70: 50 41 00 04 bgeu r2,r1,8001f80 <IMFS_link+0x3c> rtems_set_errno_and_return_minus_one( EMLINK );
8001f74: f8 00 42 fd calli 8012b68 <__errno> 8001f78: 34 02 00 1f mvi r2,31 8001f7c: e0 00 00 12 bi 8001fc4 <IMFS_link+0x80>
/* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i );
8001f80: b8 60 08 00 mv r1,r3 8001f84: f8 00 47 aa calli 8013e2c <strlen> 8001f88: 37 8b 00 14 addi r11,sp,20 8001f8c: b8 20 10 00 mv r2,r1 8001f90: b9 60 18 00 mv r3,r11 8001f94: 37 84 00 58 addi r4,sp,88 8001f98: b9 80 08 00 mv r1,r12 8001f9c: f8 00 2a fb calli 800cb88 <IMFS_get_token>
* 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(
8001fa0: b9 a0 08 00 mv r1,r13 8001fa4: b9 60 18 00 mv r3,r11 8001fa8: 34 02 00 03 mvi r2,3 8001fac: 38 04 a1 ff mvu r4,0xa1ff 8001fb0: 37 85 00 38 addi r5,sp,56 8001fb4: f8 00 27 61 calli 800bd38 <IMFS_create_node>
new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node )
8001fb8: 5c 20 00 06 bne r1,r0,8001fd0 <IMFS_link+0x8c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
8001fbc: f8 00 42 eb calli 8012b68 <__errno> <== NOT EXECUTED 8001fc0: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
8001fc4: 58 22 00 00 sw (r1+0),r2 8001fc8: 34 01 ff ff mvi r1,-1 8001fcc: e0 00 00 0c bi 8001ffc <IMFS_link+0xb8>
/* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++;
8001fd0: 2b 83 00 38 lw r3,(sp+56)
IMFS_update_ctime( info.hard_link.link_node );
8001fd4: 34 02 00 00 mvi r2,0 8001fd8: 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++;
8001fdc: 2c 64 00 34 lhu r4,(r3+52) 8001fe0: 34 84 00 01 addi r4,r4,1 8001fe4: 0c 64 00 34 sh (r3+52),r4
IMFS_update_ctime( info.hard_link.link_node );
8001fe8: f8 00 02 9c calli 8002a58 <gettimeofday> 8001fec: 2b 82 00 38 lw r2,(sp+56) 8001ff0: 2b 83 00 50 lw r3,(sp+80) 8001ff4: 34 01 00 00 mvi r1,0 8001ff8: 58 43 00 48 sw (r2+72),r3
return 0; }
8001ffc: 2b 9d 00 04 lw ra,(sp+4) 8002000: 2b 8b 00 10 lw r11,(sp+16) 8002004: 2b 8c 00 0c lw r12,(sp+12) 8002008: 2b 8d 00 08 lw r13,(sp+8) 800200c: 37 9c 00 58 addi sp,sp,88 8002010: c3 a0 00 00 ret
080107c4 <IMFS_memfile_addblock>: MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) {
80107c4: 37 9c ff f4 addi sp,sp,-12 80107c8: 5b 8b 00 0c sw (sp+12),r11 80107cc: 5b 8c 00 08 sw (sp+8),r12 80107d0: 5b 9d 00 04 sw (sp+4),ra
block_p memory; block_p *block_entry_ptr; assert( the_jnode );
80107d4: 5c 20 00 09 bne r1,r0,80107f8 <IMFS_memfile_addblock+0x34> <== ALWAYS TAKEN
80107d8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80107dc: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80107e0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80107e4: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 80107e8: 38 63 35 5c ori r3,r3,0x355c <== NOT EXECUTED 80107ec: 38 84 33 f4 ori r4,r4,0x33f4 <== NOT EXECUTED 80107f0: 34 02 01 69 mvi r2,361 <== NOT EXECUTED 80107f4: e0 00 00 0b bi 8010820 <IMFS_memfile_addblock+0x5c> <== NOT EXECUTED
if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
80107f8: 28 24 00 4c lw r4,(r1+76) 80107fc: 34 03 00 05 mvi r3,5
8010800: 44 83 00 09 be r4,r3,8010824 <IMFS_memfile_addblock+0x60> <== ALWAYS TAKEN
8010804: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010808: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 801080c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010810: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 8010814: 38 63 35 5c ori r3,r3,0x355c <== NOT EXECUTED 8010818: 38 84 34 00 ori r4,r4,0x3400 <== NOT EXECUTED 801081c: 34 02 01 6d mvi r2,365 <== NOT EXECUTED 8010820: fb ff f1 88 calli 800ce40 <__assert_func> <== NOT EXECUTED
if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
8010824: 34 03 00 01 mvi r3,1 8010828: fb ff fe 45 calli 801013c <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
801082c: 28 2b 00 00 lw r11,(r1+0) 8010830: 34 02 00 00 mvi r2,0
assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
8010834: b8 20 60 00 mv r12,r1
if ( *block_entry_ptr ) 8010838: 5d 62 00 06 bne r11,r2,8010850 <IMFS_memfile_addblock+0x8c> #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block();
801083c: fb ff fe 30 calli 80100fc <memfile_alloc_block>
if ( !memory )
8010840: 34 02 00 01 mvi r2,1
8010844: 44 2b 00 03 be r1,r11,8010850 <IMFS_memfile_addblock+0x8c> <== NEVER TAKEN
return 1; *block_entry_ptr = memory;
8010848: 59 81 00 00 sw (r12+0),r1 801084c: b9 60 10 00 mv r2,r11
return 0; }
8010850: b8 40 08 00 mv r1,r2 8010854: 2b 9d 00 04 lw ra,(sp+4) 8010858: 2b 8b 00 0c lw r11,(sp+12) 801085c: 2b 8c 00 08 lw r12,(sp+8) 8010860: 37 9c 00 0c addi sp,sp,12 8010864: c3 a0 00 00 ret
08010868 <IMFS_memfile_extend>: MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) {
8010868: 37 9c ff e0 addi sp,sp,-32 801086c: 5b 8b 00 20 sw (sp+32),r11 8010870: 5b 8c 00 1c sw (sp+28),r12 8010874: 5b 8d 00 18 sw (sp+24),r13 8010878: 5b 8e 00 14 sw (sp+20),r14 801087c: 5b 8f 00 10 sw (sp+16),r15 8010880: 5b 90 00 0c sw (sp+12),r16 8010884: 5b 91 00 08 sw (sp+8),r17 8010888: 5b 9d 00 04 sw (sp+4),ra 801088c: b8 20 58 00 mv r11,r1 8010890: b8 40 68 00 mv r13,r2
/* * Perform internal consistency checks */ assert( the_jnode );
8010894: 5c 20 00 09 bne r1,r0,80108b8 <IMFS_memfile_extend+0x50> <== ALWAYS TAKEN
8010898: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 801089c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80108a0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80108a4: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 80108a8: 38 63 35 74 ori r3,r3,0x3574 <== NOT EXECUTED 80108ac: 38 84 33 f4 ori r4,r4,0x33f4 <== NOT EXECUTED 80108b0: 34 02 01 31 mvi r2,305 <== NOT EXECUTED 80108b4: e0 00 00 0b bi 80108e0 <IMFS_memfile_extend+0x78> <== NOT EXECUTED
if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
80108b8: 28 22 00 4c lw r2,(r1+76) 80108bc: 34 01 00 05 mvi r1,5
80108c0: 44 41 00 09 be r2,r1,80108e4 <IMFS_memfile_extend+0x7c> <== ALWAYS TAKEN
80108c4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80108c8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80108cc: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80108d0: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 80108d4: 38 63 35 74 ori r3,r3,0x3574 <== NOT EXECUTED 80108d8: 38 84 34 00 ori r4,r4,0x3400 <== NOT EXECUTED 80108dc: 34 02 01 35 mvi r2,309 <== NOT EXECUTED 80108e0: fb ff f1 58 calli 800ce40 <__assert_func> <== NOT EXECUTED
if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
80108e4: 78 01 08 02 mvhi r1,0x802 80108e8: 38 21 46 d8 ori r1,r1,0x46d8 80108ec: 28 2c 00 00 lw r12,(r1+0) 80108f0: 34 02 00 02 mvi r2,2 80108f4: b9 80 08 00 mv r1,r12 80108f8: fb ff c0 dd calli 8000c6c <__lshrsi3> 80108fc: b8 20 10 00 mv r2,r1 8010900: b8 20 70 00 mv r14,r1 8010904: 34 21 00 01 addi r1,r1,1 8010908: f8 00 44 60 calli 8021a88 <__mulsi3> 801090c: b9 c0 10 00 mv r2,r14 8010910: 34 21 00 01 addi r1,r1,1 8010914: f8 00 44 5d calli 8021a88 <__mulsi3> 8010918: 34 21 ff ff addi r1,r1,-1 801091c: b9 80 10 00 mv r2,r12 8010920: f8 00 44 5a calli 8021a88 <__mulsi3>
8010924: 54 2d 00 04 bgu r1,r13,8010934 <IMFS_memfile_extend+0xcc> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
8010928: f8 00 08 90 calli 8012b68 <__errno> <== NOT EXECUTED 801092c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8010930: e0 00 00 26 bi 80109c8 <IMFS_memfile_extend+0x160> <== NOT EXECUTED
if ( new_length <= the_jnode->info.file.size )
8010934: b9 a0 08 00 mv r1,r13 8010938: 34 02 00 1f mvi r2,31 801093c: fb ff c0 f4 calli 8000d0c <__ashrsi3> 8010940: 29 6f 00 50 lw r15,(r11+80) 8010944: b8 20 70 00 mv r14,r1 8010948: 29 70 00 54 lw r16,(r11+84)
801094c: 48 2f 00 04 bg r1,r15,801095c <IMFS_memfile_extend+0xf4> <== NEVER TAKEN 8010950: 5c 2f 00 25 bne r1,r15,80109e4 <IMFS_memfile_extend+0x17c> <== NEVER TAKEN
8010954: 55 b0 00 02 bgu r13,r16,801095c <IMFS_memfile_extend+0xf4>
8010958: e0 00 00 23 bi 80109e4 <IMFS_memfile_extend+0x17c>
/* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
801095c: b9 80 10 00 mv r2,r12 8010960: b9 a0 08 00 mv r1,r13 8010964: f8 00 44 69 calli 8021b08 <__divsi3>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
8010968: 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;
801096c: b8 20 88 00 mv r17,r1
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
8010970: b9 80 08 00 mv r1,r12 8010974: fb ff c0 e6 calli 8000d0c <__ashrsi3> 8010978: b8 20 18 00 mv r3,r1 801097c: b9 80 20 00 mv r4,r12 8010980: b9 e0 08 00 mv r1,r15 8010984: ba 00 10 00 mv r2,r16 8010988: f8 00 2f 02 calli 801c590 <__divdi3> 801098c: b8 40 78 00 mv r15,r2 8010990: b8 40 60 00 mv r12,r2
/* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) {
8010994: e0 00 00 11 bi 80109d8 <IMFS_memfile_extend+0x170>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
8010998: b9 60 08 00 mv r1,r11 801099c: b9 80 10 00 mv r2,r12 80109a0: fb ff ff 89 calli 80107c4 <IMFS_memfile_addblock>
80109a4: 44 20 00 0c be r1,r0,80109d4 <IMFS_memfile_extend+0x16c> <== ALWAYS TAKEN
80109a8: e0 00 00 05 bi 80109bc <IMFS_memfile_extend+0x154> <== NOT EXECUTED
for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block );
80109ac: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 80109b0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80109b4: fb ff fe bd calli 80104a8 <IMFS_memfile_remove_block> <== 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-- ) {
80109b8: 35 8c ff ff addi r12,r12,-1 <== NOT EXECUTED 80109bc: 51 8f ff fc bgeu r12,r15,80109ac <IMFS_memfile_extend+0x144><== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC );
80109c0: f8 00 08 6a calli 8012b68 <__errno> <== NOT EXECUTED 80109c4: 34 02 00 1c mvi r2,28 <== NOT EXECUTED 80109c8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80109cc: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80109d0: e0 00 00 06 bi 80109e8 <IMFS_memfile_extend+0x180> <== NOT EXECUTED
/* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) {
80109d4: 35 8c 00 01 addi r12,r12,1
80109d8: 52 2c ff f0 bgeu r17,r12,8010998 <IMFS_memfile_extend+0x130> /* * Set the new length of the file. */ the_jnode->info.file.size = new_length;
80109dc: 59 6d 00 54 sw (r11+84),r13 80109e0: 59 6e 00 50 sw (r11+80),r14 80109e4: 34 01 00 00 mvi r1,0
return 0; }
80109e8: 2b 9d 00 04 lw ra,(sp+4) 80109ec: 2b 8b 00 20 lw r11,(sp+32) 80109f0: 2b 8c 00 1c lw r12,(sp+28) 80109f4: 2b 8d 00 18 lw r13,(sp+24) 80109f8: 2b 8e 00 14 lw r14,(sp+20) 80109fc: 2b 8f 00 10 lw r15,(sp+16) 8010a00: 2b 90 00 0c lw r16,(sp+12) 8010a04: 2b 91 00 08 lw r17,(sp+8) 8010a08: 37 9c 00 20 addi sp,sp,32 8010a0c: c3 a0 00 00 ret
0801013c <IMFS_memfile_get_block_pointer>: #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) {
801013c: 37 9c ff e4 addi sp,sp,-28 8010140: 5b 8b 00 1c sw (sp+28),r11 8010144: 5b 8c 00 18 sw (sp+24),r12 8010148: 5b 8d 00 14 sw (sp+20),r13 801014c: 5b 8e 00 10 sw (sp+16),r14 8010150: 5b 8f 00 0c sw (sp+12),r15 8010154: 5b 90 00 08 sw (sp+8),r16 8010158: 5b 9d 00 04 sw (sp+4),ra 801015c: b8 20 60 00 mv r12,r1 8010160: b8 40 68 00 mv r13,r2 8010164: b8 60 70 00 mv r14,r3
/* * Perform internal consistency checks */ assert( the_jnode );
8010168: 5c 20 00 09 bne r1,r0,801018c <IMFS_memfile_get_block_pointer+0x50><== ALWAYS TAKEN
801016c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010170: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010174: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010178: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 801017c: 38 63 34 c4 ori r3,r3,0x34c4 <== NOT EXECUTED 8010180: 38 84 33 f4 ori r4,r4,0x33f4 <== NOT EXECUTED 8010184: 34 02 03 88 mvi r2,904 <== NOT EXECUTED 8010188: e0 00 00 0b bi 80101b4 <IMFS_memfile_get_block_pointer+0x78><== NOT EXECUTED
if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE );
801018c: 28 22 00 4c lw r2,(r1+76) 8010190: 34 01 00 05 mvi r1,5
8010194: 44 41 00 09 be r2,r1,80101b8 <IMFS_memfile_get_block_pointer+0x7c><== ALWAYS TAKEN
8010198: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 801019c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80101a0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80101a4: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 80101a8: 38 63 34 c4 ori r3,r3,0x34c4 <== NOT EXECUTED 80101ac: 38 84 34 00 ori r4,r4,0x3400 <== NOT EXECUTED 80101b0: 34 02 03 8c mvi r2,908 <== NOT EXECUTED 80101b4: fb ff f3 23 calli 800ce40 <__assert_func> <== NOT EXECUTED
/* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) {
80101b8: 78 01 08 02 mvhi r1,0x802 80101bc: 38 21 46 d8 ori r1,r1,0x46d8 80101c0: 28 21 00 00 lw r1,(r1+0) 80101c4: 34 02 00 02 mvi r2,2 80101c8: fb ff c2 a9 calli 8000c6c <__lshrsi3> 80101cc: b8 20 58 00 mv r11,r1 80101d0: 34 21 ff ff addi r1,r1,-1
80101d4: 55 a1 00 0f bgu r13,r1,8010210 <IMFS_memfile_get_block_pointer+0xd4><== NEVER TAKEN
#if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect;
80101d8: 29 8b 00 58 lw r11,(r12+88)
if ( malloc_it ) { 80101dc: 45 c0 00 0a be r14,r0,8010204 <IMFS_memfile_get_block_pointer+0xc8> if ( !p ) { 80101e0: 5d 60 00 04 bne r11,r0,80101f0 <IMFS_memfile_get_block_pointer+0xb4> p = memfile_alloc_block();
80101e4: fb ff ff c6 calli 80100fc <memfile_alloc_block>
if ( !p )
80101e8: 44 2b 00 7d be r1,r11,80103dc <IMFS_memfile_get_block_pointer+0x2a0><== NEVER TAKEN
return 0; info->indirect = p;
80101ec: 59 81 00 58 sw (r12+88),r1
} return &info->indirect[ my_block ];
80101f0: 34 02 00 02 mvi r2,2 80101f4: b9 a0 08 00 mv r1,r13 80101f8: fb ff c2 75 calli 8000bcc <__ashlsi3> 80101fc: 29 82 00 58 lw r2,(r12+88) 8010200: e0 00 00 75 bi 80103d4 <IMFS_memfile_get_block_pointer+0x298>
} if ( !p ) return 0; return &info->indirect[ my_block ];
8010204: b9 a0 08 00 mv r1,r13
info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p )
8010208: 5d 6e 00 60 bne r11,r14,8010388 <IMFS_memfile_get_block_pointer+0x24c><== ALWAYS TAKEN
801020c: e0 00 00 74 bi 80103dc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
/* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) {
8010210: 35 61 00 01 addi r1,r11,1 <== NOT EXECUTED 8010214: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8010218: f8 00 46 1c calli 8021a88 <__mulsi3> <== NOT EXECUTED 801021c: b8 20 78 00 mv r15,r1 <== NOT EXECUTED 8010220: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 8010224: 55 a1 00 28 bgu r13,r1,80102c4 <IMFS_memfile_get_block_pointer+0x188><== NOT EXECUTED
#if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT;
8010228: c9 ab 68 00 sub r13,r13,r11 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
801022c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8010230: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8010234: f8 00 46 a4 calli 8021cc4 <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
8010238: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
801023c: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
8010240: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8010244: f8 00 46 90 calli 8021c84 <__udivsi3> <== NOT EXECUTED 8010248: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
p = info->doubly_indirect;
801024c: 29 8b 00 5c lw r11,(r12+92) <== NOT EXECUTED
if ( malloc_it ) {
8010250: 45 c0 00 15 be r14,r0,80102a4 <IMFS_memfile_get_block_pointer+0x168><== NOT EXECUTED
if ( !p ) {
8010254: 5d 60 00 05 bne r11,r0,8010268 <IMFS_memfile_get_block_pointer+0x12c><== NOT EXECUTED
p = memfile_alloc_block();
8010258: fb ff ff a9 calli 80100fc <memfile_alloc_block> <== NOT EXECUTED 801025c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if ( !p )
8010260: 44 20 00 5f be r1,r0,80103dc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
return 0; info->doubly_indirect = p;
8010264: 59 81 00 5c sw (r12+92),r1 <== NOT EXECUTED
} p1 = (block_p *)p[ doubly ];
8010268: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 801026c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8010270: fb ff c2 57 calli 8000bcc <__ashlsi3> <== NOT EXECUTED 8010274: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED 8010278: 29 6c 00 00 lw r12,(r11+0) <== NOT EXECUTED
if ( !p1 ) {
801027c: 5d 80 00 05 bne r12,r0,8010290 <IMFS_memfile_get_block_pointer+0x154><== NOT EXECUTED
p1 = memfile_alloc_block();
8010280: fb ff ff 9f calli 80100fc <memfile_alloc_block> <== NOT EXECUTED 8010284: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
if ( !p1 )
8010288: 44 20 00 55 be r1,r0,80103dc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
return 0; p[ doubly ] = (block_p) p1;
801028c: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED
} return (block_p *)&p1[ singly ];
8010290: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8010294: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8010298: fb ff c2 4d calli 8000bcc <__ashlsi3> <== NOT EXECUTED 801029c: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 80102a0: e0 00 00 50 bi 80103e0 <IMFS_memfile_get_block_pointer+0x2a4><== NOT EXECUTED
} if ( !p )
80102a4: 45 6e 00 4e be r11,r14,80103dc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
return 0; p = (block_p *)p[ doubly ];
80102a8: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80102ac: fb ff c2 48 calli 8000bcc <__ashlsi3> <== NOT EXECUTED 80102b0: b5 61 08 00 add r1,r11,r1 <== NOT EXECUTED 80102b4: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED
#if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ];
80102b8: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p )
80102bc: 5d 60 00 33 bne r11,r0,8010388 <IMFS_memfile_get_block_pointer+0x24c><== NOT EXECUTED 80102c0: e0 00 00 47 bi 80103dc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
#endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) {
80102c4: 35 e1 00 01 addi r1,r15,1 <== NOT EXECUTED 80102c8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80102cc: f8 00 45 ef calli 8021a88 <__mulsi3> <== NOT EXECUTED 80102d0: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 80102d4: 55 a1 00 42 bgu r13,r1,80103dc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
80102d8: c9 af 68 00 sub r13,r13,r15 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
80102dc: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80102e0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80102e4: f8 00 46 78 calli 8021cc4 <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
80102e8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
*/ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
80102ec: b8 20 80 00 mv r16,r1 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
80102f0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80102f4: f8 00 46 64 calli 8021c84 <__udivsi3> <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
80102f8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
80102fc: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
8010300: f8 00 46 61 calli 8021c84 <__udivsi3> <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
8010304: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
8010308: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
801030c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8010310: f8 00 46 6d calli 8021cc4 <__umodsi3> <== NOT EXECUTED 8010314: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
p = info->triply_indirect;
8010318: 29 8b 00 60 lw r11,(r12+96) <== NOT EXECUTED
if ( malloc_it ) {
801031c: 45 c0 00 1f be r14,r0,8010398 <IMFS_memfile_get_block_pointer+0x25c><== NOT EXECUTED
if ( !p ) {
8010320: 5d 60 00 05 bne r11,r0,8010334 <IMFS_memfile_get_block_pointer+0x1f8><== NOT EXECUTED
p = memfile_alloc_block();
8010324: fb ff ff 76 calli 80100fc <memfile_alloc_block> <== NOT EXECUTED 8010328: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if ( !p )
801032c: 44 20 00 2c be r1,r0,80103dc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
return 0; info->triply_indirect = p;
8010330: 59 81 00 60 sw (r12+96),r1 <== NOT EXECUTED
} p1 = (block_p *) p[ triply ];
8010334: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8010338: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 801033c: fb ff c2 24 calli 8000bcc <__ashlsi3> <== NOT EXECUTED 8010340: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED 8010344: 29 6c 00 00 lw r12,(r11+0) <== NOT EXECUTED
if ( !p1 ) {
8010348: 5d 80 00 05 bne r12,r0,801035c <IMFS_memfile_get_block_pointer+0x220><== NOT EXECUTED
p1 = memfile_alloc_block();
801034c: fb ff ff 6c calli 80100fc <memfile_alloc_block> <== NOT EXECUTED 8010350: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
if ( !p1 )
8010354: 44 20 00 22 be r1,r0,80103dc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
return 0; p[ triply ] = (block_p) p1;
8010358: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED
} p2 = (block_p *)p1[ doubly ];
801035c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8010360: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8010364: fb ff c2 1a calli 8000bcc <__ashlsi3> <== NOT EXECUTED 8010368: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED 801036c: 29 8b 00 00 lw r11,(r12+0) <== NOT EXECUTED
if ( !p2 ) {
8010370: 5d 60 00 05 bne r11,r0,8010384 <IMFS_memfile_get_block_pointer+0x248><== NOT EXECUTED
p2 = memfile_alloc_block();
8010374: fb ff ff 62 calli 80100fc <memfile_alloc_block> <== NOT EXECUTED 8010378: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if ( !p2 )
801037c: 44 20 00 18 be r1,r0,80103dc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
return 0; p1[ doubly ] = (block_p) p2;
8010380: 59 81 00 00 sw (r12+0),r1 <== NOT EXECUTED
} return (block_p *)&p2[ singly ];
8010384: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
8010388: 34 02 00 02 mvi r2,2 801038c: fb ff c2 10 calli 8000bcc <__ashlsi3> 8010390: b5 61 08 00 add r1,r11,r1 8010394: e0 00 00 13 bi 80103e0 <IMFS_memfile_get_block_pointer+0x2a4>
} if ( !p )
8010398: 45 6e 00 11 be r11,r14,80103dc <IMFS_memfile_get_block_pointer+0x2a0><== 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 ];
801039c: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 80103a0: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80103a4: fb ff c2 0a calli 8000bcc <__ashlsi3> <== NOT EXECUTED 80103a8: b5 61 08 00 add r1,r11,r1 <== NOT EXECUTED 80103ac: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED
if ( !p1 )
80103b0: 45 60 00 0b be r11,r0,80103dc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ];
80103b4: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80103b8: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80103bc: fb ff c2 04 calli 8000bcc <__ashlsi3> <== NOT EXECUTED 80103c0: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED 80103c4: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80103c8: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 80103cc: fb ff c2 00 calli 8000bcc <__ashlsi3> <== NOT EXECUTED 80103d0: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED
80103d4: b4 41 08 00 add r1,r2,r1 80103d8: e0 00 00 02 bi 80103e0 <IMFS_memfile_get_block_pointer+0x2a4>
80103dc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
/* * This means the requested block number is out of range. */ return 0; }
80103e0: 2b 9d 00 04 lw ra,(sp+4) 80103e4: 2b 8b 00 1c lw r11,(sp+28) 80103e8: 2b 8c 00 18 lw r12,(sp+24) 80103ec: 2b 8d 00 14 lw r13,(sp+20) 80103f0: 2b 8e 00 10 lw r14,(sp+16) 80103f4: 2b 8f 00 0c lw r15,(sp+12) 80103f8: 2b 90 00 08 lw r16,(sp+8) 80103fc: 37 9c 00 1c addi sp,sp,28 8010400: c3 a0 00 00 ret
08010ef4 <IMFS_memfile_read>: IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) {
8010ef4: 37 9c ff d4 addi sp,sp,-44 8010ef8: 5b 8b 00 24 sw (sp+36),r11 8010efc: 5b 8c 00 20 sw (sp+32),r12 8010f00: 5b 8d 00 1c sw (sp+28),r13 8010f04: 5b 8e 00 18 sw (sp+24),r14 8010f08: 5b 8f 00 14 sw (sp+20),r15 8010f0c: 5b 90 00 10 sw (sp+16),r16 8010f10: 5b 91 00 0c sw (sp+12),r17 8010f14: 5b 92 00 08 sw (sp+8),r18 8010f18: 5b 9d 00 04 sw (sp+4),ra 8010f1c: b8 20 60 00 mv r12,r1 8010f20: b8 40 68 00 mv r13,r2 8010f24: b8 60 80 00 mv r16,r3 8010f28: b8 80 58 00 mv r11,r4
/* * Perform internal consistency checks */ assert( the_jnode );
8010f2c: 5c 20 00 09 bne r1,r0,8010f50 <IMFS_memfile_read+0x5c> <== ALWAYS TAKEN
8010f30: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010f34: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010f38: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010f3c: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 8010f40: 38 63 34 f8 ori r3,r3,0x34f8 <== NOT EXECUTED 8010f44: 38 84 33 f4 ori r4,r4,0x33f4 <== NOT EXECUTED 8010f48: 34 02 02 4c mvi r2,588 <== NOT EXECUTED 8010f4c: e0 00 00 0c bi 8010f7c <IMFS_memfile_read+0x88> <== NOT EXECUTED
if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ||
8010f50: 28 21 00 4c lw r1,(r1+76) 8010f54: 34 03 00 01 mvi r3,1 8010f58: 34 22 ff fb addi r2,r1,-5
8010f5c: 50 62 00 09 bgeu r3,r2,8010f80 <IMFS_memfile_read+0x8c> <== ALWAYS TAKEN
8010f60: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010f64: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010f68: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010f6c: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 8010f70: 38 63 34 f8 ori r3,r3,0x34f8 <== NOT EXECUTED 8010f74: 38 84 34 70 ori r4,r4,0x3470 <== NOT EXECUTED 8010f78: 34 02 02 51 mvi r2,593 <== NOT EXECUTED 8010f7c: fb ff ef b1 calli 800ce40 <__assert_func> <== NOT EXECUTED
/* * Error checks on arguments */ assert( dest );
8010f80: 5e 00 00 09 bne r16,r0,8010fa4 <IMFS_memfile_read+0xb0> <== ALWAYS TAKEN
8010f84: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010f88: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010f8c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010f90: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 8010f94: 38 63 34 f8 ori r3,r3,0x34f8 <== NOT EXECUTED 8010f98: 38 84 34 bc ori r4,r4,0x34bc <== NOT EXECUTED 8010f9c: 34 02 02 5a mvi r2,602 <== NOT EXECUTED 8010fa0: e3 ff ff f7 bi 8010f7c <IMFS_memfile_read+0x88> <== NOT EXECUTED
/* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length )
8010fa4: 5c 80 00 06 bne r4,r0,8010fbc <IMFS_memfile_read+0xc8> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
8010fa8: f8 00 06 f0 calli 8012b68 <__errno> <== NOT EXECUTED 8010fac: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8010fb0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8010fb4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8010fb8: e0 00 00 88 bi 80111d8 <IMFS_memfile_read+0x2e4> <== NOT EXECUTED
/* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) {
8010fbc: 34 02 00 06 mvi r2,6 8010fc0: 29 8e 00 50 lw r14,(r12+80) 8010fc4: 29 8f 00 54 lw r15,(r12+84)
8010fc8: 5c 22 00 19 bne r1,r2,801102c <IMFS_memfile_read+0x138> <== ALWAYS TAKEN
unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start))
8010fcc: 34 02 00 1f mvi r2,31 <== NOT EXECUTED 8010fd0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8010fd4: fb ff bf 4e calli 8000d0c <__ashrsi3> <== NOT EXECUTED 8010fd8: c9 ed 18 00 sub r3,r15,r13 <== NOT EXECUTED 8010fdc: f4 6f 10 00 cmpgu r2,r3,r15 <== NOT EXECUTED 8010fe0: c9 c1 08 00 sub r1,r14,r1 <== NOT EXECUTED 8010fe4: c8 22 70 00 sub r14,r1,r2 <== NOT EXECUTED
* than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
8010fe8: 29 82 00 58 lw r2,(r12+88) <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start))
8010fec: 48 0e 00 04 bg r0,r14,8010ffc <IMFS_memfile_read+0x108> <== NOT EXECUTED 8010ff0: 5c 0e 00 04 bne r0,r14,8011000 <IMFS_memfile_read+0x10c> <== NOT EXECUTED 8010ff4: 55 63 00 02 bgu r11,r3,8010ffc <IMFS_memfile_read+0x108> <== NOT EXECUTED 8010ff8: e0 00 00 02 bi 8011000 <IMFS_memfile_read+0x10c> <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
8010ffc: c9 ed 58 00 sub r11,r15,r13 <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
8011000: b4 4d 10 00 add r2,r2,r13 <== NOT EXECUTED 8011004: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8011008: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 801100c: f8 00 09 7d calli 8013600 <memcpy> <== NOT EXECUTED
IMFS_update_atime( the_jnode );
8011010: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED 8011014: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8011018: fb ff c6 90 calli 8002a58 <gettimeofday> <== NOT EXECUTED 801101c: 2b 81 00 28 lw r1,(sp+40) <== NOT EXECUTED 8011020: 59 81 00 40 sw (r12+64),r1 <== NOT EXECUTED
return my_length;
8011024: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8011028: e0 00 00 6c bi 80111d8 <IMFS_memfile_read+0x2e4> <== 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 )
801102c: b4 8d 08 00 add r1,r4,r13
8011030: 48 0e 00 04 bg r0,r14,8011040 <IMFS_memfile_read+0x14c> <== NEVER TAKEN 8011034: 5c 0e 00 04 bne r0,r14,8011044 <IMFS_memfile_read+0x150> <== NEVER TAKEN
8011038: 54 2f 00 02 bgu r1,r15,8011040 <IMFS_memfile_read+0x14c>
801103c: e0 00 00 02 bi 8011044 <IMFS_memfile_read+0x150>
my_length = the_jnode->info.file.size - start;
8011040: c9 ed 58 00 sub r11,r15,r13
/* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
8011044: 78 01 08 02 mvhi r1,0x802 8011048: 38 21 46 d8 ori r1,r1,0x46d8 801104c: 28 32 00 00 lw r18,(r1+0) 8011050: b9 a0 08 00 mv r1,r13
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) {
8011054: ba 00 78 00 mv r15,r16
/* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
8011058: ba 40 10 00 mv r2,r18 801105c: f8 00 42 de calli 8021bd4 <__modsi3> 8011060: b8 20 88 00 mv r17,r1
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
8011064: ba 40 10 00 mv r2,r18 8011068: b9 a0 08 00 mv r1,r13 801106c: f8 00 42 a7 calli 8021b08 <__divsi3> 8011070: b8 20 68 00 mv r13,r1
if ( start_offset ) {
8011074: ba 20 70 00 mv r14,r17
8011078: 46 20 00 1a be r17,r0,80110e0 <IMFS_memfile_read+0x1ec> 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 );
801107c: b9 80 08 00 mv r1,r12 8011080: b9 a0 10 00 mv r2,r13 8011084: 34 03 00 00 mvi r3,0 8011088: fb ff fc 2d calli 801013c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
801108c: 5c 20 00 09 bne r1,r0,80110b0 <IMFS_memfile_read+0x1bc> <== ALWAYS TAKEN
8011090: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011094: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011098: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 801109c: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 80110a0: 38 63 34 f8 ori r3,r3,0x34f8 <== NOT EXECUTED 80110a4: 38 84 34 30 ori r4,r4,0x3430 <== NOT EXECUTED 80110a8: 34 02 02 96 mvi r2,662 <== NOT EXECUTED 80110ac: e3 ff ff b4 bi 8010f7c <IMFS_memfile_read+0x88> <== NOT EXECUTED
*/ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
80110b0: ca 51 90 00 sub r18,r18,r17 80110b4: b9 60 70 00 mv r14,r11
80110b8: 52 4b 00 02 bgeu r18,r11,80110c0 <IMFS_memfile_read+0x1cc>
80110bc: ba 40 70 00 mv r14,r18
to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
80110c0: 28 22 00 00 lw r2,(r1+0) 80110c4: b9 c0 18 00 mv r3,r14 80110c8: ba 00 08 00 mv r1,r16 80110cc: b4 51 10 00 add r2,r2,r17 80110d0: f8 00 09 4c calli 8013600 <memcpy>
dest += to_copy;
80110d4: b6 0e 78 00 add r15,r16,r14
block++;
80110d8: 35 ad 00 01 addi r13,r13,1
my_length -= to_copy;
80110dc: c9 6e 58 00 sub r11,r11,r14
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
80110e0: 78 01 08 02 mvhi r1,0x802 80110e4: 38 21 46 d8 ori r1,r1,0x46d8
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
80110e8: b8 20 88 00 mv r17,r1
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
80110ec: 28 30 00 00 lw r16,(r1+0)
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
80110f0: e0 00 00 16 bi 8011148 <IMFS_memfile_read+0x254>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
80110f4: b9 80 08 00 mv r1,r12 80110f8: b9 a0 10 00 mv r2,r13 80110fc: 34 03 00 00 mvi r3,0 8011100: fb ff fc 0f calli 801013c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
8011104: 5c 20 00 09 bne r1,r0,8011128 <IMFS_memfile_read+0x234> <== ALWAYS TAKEN
8011108: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 801110c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011110: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011114: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 8011118: 38 63 34 f8 ori r3,r3,0x34f8 <== NOT EXECUTED 801111c: 38 84 34 30 ori r4,r4,0x3430 <== NOT EXECUTED 8011120: 34 02 02 a7 mvi r2,679 <== NOT EXECUTED 8011124: e3 ff ff 96 bi 8010f7c <IMFS_memfile_read+0x88> <== NOT EXECUTED
if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
8011128: 28 22 00 00 lw r2,(r1+0) 801112c: ba 00 18 00 mv r3,r16 8011130: b9 e0 08 00 mv r1,r15 8011134: f8 00 09 33 calli 8013600 <memcpy>
dest += to_copy;
8011138: b5 f0 78 00 add r15,r15,r16
block++;
801113c: 35 ad 00 01 addi r13,r13,1
my_length -= to_copy;
8011140: c9 70 58 00 sub r11,r11,r16
copied += to_copy;
8011144: b5 d0 70 00 add r14,r14,r16
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
8011148: 2a 21 00 00 lw r1,(r17+0)
801114c: 51 61 ff ea bgeu r11,r1,80110f4 <IMFS_memfile_read+0x200> /* * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
8011150: 54 2b 00 09 bgu r1,r11,8011174 <IMFS_memfile_read+0x280> <== ALWAYS TAKEN
8011154: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011158: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 801115c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011160: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 8011164: 38 63 34 f8 ori r3,r3,0x34f8 <== NOT EXECUTED 8011168: 38 84 34 44 ori r4,r4,0x3444 <== NOT EXECUTED 801116c: 34 02 02 b5 mvi r2,693 <== NOT EXECUTED 8011170: e3 ff ff 83 bi 8010f7c <IMFS_memfile_read+0x88> <== NOT EXECUTED
if ( my_length ) { 8011174: 45 60 00 13 be r11,r0,80111c0 <IMFS_memfile_read+0x2cc> block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
8011178: b9 a0 10 00 mv r2,r13 801117c: b9 80 08 00 mv r1,r12 8011180: 34 03 00 00 mvi r3,0 8011184: fb ff fb ee calli 801013c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
8011188: 5c 20 00 09 bne r1,r0,80111ac <IMFS_memfile_read+0x2b8> <== ALWAYS TAKEN
801118c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8011190: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8011194: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8011198: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 801119c: 38 63 34 f8 ori r3,r3,0x34f8 <== NOT EXECUTED 80111a0: 38 84 34 30 ori r4,r4,0x3430 <== NOT EXECUTED 80111a4: 34 02 02 b9 mvi r2,697 <== NOT EXECUTED 80111a8: e3 ff ff 75 bi 8010f7c <IMFS_memfile_read+0x88> <== NOT EXECUTED
if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length );
80111ac: 28 22 00 00 lw r2,(r1+0) 80111b0: b9 60 18 00 mv r3,r11 80111b4: b9 e0 08 00 mv r1,r15 80111b8: f8 00 09 12 calli 8013600 <memcpy>
copied += my_length;
80111bc: b5 6e 70 00 add r14,r11,r14
} IMFS_update_atime( the_jnode );
80111c0: 37 81 00 28 addi r1,sp,40 80111c4: 34 02 00 00 mvi r2,0 80111c8: fb ff c6 24 calli 8002a58 <gettimeofday> 80111cc: 2b 81 00 28 lw r1,(sp+40) 80111d0: 59 81 00 40 sw (r12+64),r1
return copied;
80111d4: b9 c0 08 00 mv r1,r14
}
80111d8: 2b 9d 00 04 lw ra,(sp+4) 80111dc: 2b 8b 00 24 lw r11,(sp+36) 80111e0: 2b 8c 00 20 lw r12,(sp+32) 80111e4: 2b 8d 00 1c lw r13,(sp+28) 80111e8: 2b 8e 00 18 lw r14,(sp+24) 80111ec: 2b 8f 00 14 lw r15,(sp+20) 80111f0: 2b 90 00 10 lw r16,(sp+16) 80111f4: 2b 91 00 0c lw r17,(sp+12) 80111f8: 2b 92 00 08 lw r18,(sp+8) 80111fc: 37 9c 00 2c addi sp,sp,44 8011200: c3 a0 00 00 ret
08010500 <IMFS_memfile_remove>: */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) {
8010500: 37 9c ff e0 addi sp,sp,-32 8010504: 5b 8b 00 20 sw (sp+32),r11 8010508: 5b 8c 00 1c sw (sp+28),r12 801050c: 5b 8d 00 18 sw (sp+24),r13 8010510: 5b 8e 00 14 sw (sp+20),r14 8010514: 5b 8f 00 10 sw (sp+16),r15 8010518: 5b 90 00 0c sw (sp+12),r16 801051c: 5b 91 00 08 sw (sp+8),r17 8010520: 5b 9d 00 04 sw (sp+4),ra 8010524: b8 20 58 00 mv r11,r1
/* * Perform internal consistency checks */ assert( the_jnode );
8010528: 5c 20 00 09 bne r1,r0,801054c <IMFS_memfile_remove+0x4c> <== ALWAYS TAKEN
801052c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010530: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010534: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010538: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 801053c: 38 63 35 0c ori r3,r3,0x350c <== NOT EXECUTED 8010540: 38 84 33 f4 ori r4,r4,0x33f4 <== NOT EXECUTED 8010544: 34 02 01 ee mvi r2,494 <== NOT EXECUTED 8010548: e0 00 00 0b bi 8010574 <IMFS_memfile_remove+0x74> <== NOT EXECUTED
if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
801054c: 28 22 00 4c lw r2,(r1+76) 8010550: 34 01 00 05 mvi r1,5
8010554: 44 41 00 09 be r2,r1,8010578 <IMFS_memfile_remove+0x78> <== ALWAYS TAKEN
8010558: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 801055c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010560: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010564: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 8010568: 38 63 35 0c ori r3,r3,0x350c <== NOT EXECUTED 801056c: 38 84 34 00 ori r4,r4,0x3400 <== NOT EXECUTED 8010570: 34 02 01 f2 mvi r2,498 <== NOT EXECUTED 8010574: fb ff f2 33 calli 800ce40 <__assert_func> <== NOT EXECUTED
/* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS;
8010578: 78 01 08 02 mvhi r1,0x802 801057c: 38 21 46 d8 ori r1,r1,0x46d8 8010580: 28 21 00 00 lw r1,(r1+0) 8010584: 34 02 00 02 mvi r2,2 8010588: fb ff c1 b9 calli 8000c6c <__lshrsi3> 801058c: b8 20 60 00 mv r12,r1
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file;
8010590: 29 61 00 58 lw r1,(r11+88)
8010594: 44 20 00 04 be r1,r0,80105a4 <IMFS_memfile_remove+0xa4> if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free );
8010598: 35 61 00 58 addi r1,r11,88 801059c: b9 80 10 00 mv r2,r12 80105a0: fb ff ff 99 calli 8010404 <memfile_free_blocks_in_table>
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file;
80105a4: 29 61 00 5c lw r1,(r11+92)
80105a8: 44 20 00 15 be r1,r0,80105fc <IMFS_memfile_remove+0xfc> <== ALWAYS TAKEN
80105ac: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED
memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
80105b0: 78 0f 08 02 mvhi r15,0x802 <== NOT EXECUTED 80105b4: 39 ef 46 d8 ori r15,r15,0x46d8 <== NOT EXECUTED
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file;
80105b8: b9 a0 70 00 mv r14,r13 <== NOT EXECUTED 80105bc: e0 00 00 09 bi 80105e0 <IMFS_memfile_remove+0xe0> <== NOT EXECUTED
} if ( info->doubly_indirect ) { for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) { if ( info->doubly_indirect[i] ) {
80105c0: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED 80105c4: b4 2d 08 00 add r1,r1,r13 <== NOT EXECUTED 80105c8: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 80105cc: 44 40 00 03 be r2,r0,80105d8 <IMFS_memfile_remove+0xd8> <== NOT EXECUTED
memfile_free_blocks_in_table(
80105d0: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 80105d4: fb ff ff 8c calli 8010404 <memfile_free_blocks_in_table> <== NOT EXECUTED
memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
80105d8: 35 ce 00 01 addi r14,r14,1 <== NOT EXECUTED 80105dc: 35 ad 00 04 addi r13,r13,4 <== NOT EXECUTED 80105e0: 29 e1 00 00 lw r1,(r15+0) <== NOT EXECUTED 80105e4: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80105e8: fb ff c1 a1 calli 8000c6c <__lshrsi3> <== NOT EXECUTED 80105ec: 54 2e ff f5 bgu r1,r14,80105c0 <IMFS_memfile_remove+0xc0> <== 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 );
80105f0: 35 61 00 5c addi r1,r11,92 <== NOT EXECUTED 80105f4: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 80105f8: fb ff ff 83 calli 8010404 <memfile_free_blocks_in_table> <== NOT EXECUTED
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file;
80105fc: 29 61 00 60 lw r1,(r11+96)
8010600: 44 20 00 24 be r1,r0,8010690 <IMFS_memfile_remove+0x190> <== ALWAYS TAKEN
8010604: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED
memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
8010608: 78 0f 08 02 mvhi r15,0x802 <== NOT EXECUTED 801060c: 39 ef 46 d8 ori r15,r15,0x46d8 <== NOT EXECUTED
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file;
8010610: b9 a0 80 00 mv r16,r13 <== NOT EXECUTED 8010614: e0 00 00 18 bi 8010674 <IMFS_memfile_remove+0x174> <== NOT EXECUTED
} if ( info->triply_indirect ) { for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) { p = (block_p *) info->triply_indirect[i];
8010618: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED 801061c: b4 2d 08 00 add r1,r1,r13 <== NOT EXECUTED 8010620: 28 2e 00 00 lw r14,(r1+0) <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
8010624: 45 c0 00 18 be r14,r0,8010684 <IMFS_memfile_remove+0x184> <== NOT EXECUTED 8010628: 34 11 00 00 mvi r17,0 <== NOT EXECUTED 801062c: e0 00 00 08 bi 801064c <IMFS_memfile_remove+0x14c> <== NOT EXECUTED
break; for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) { if ( p[j] ) {
8010630: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED 8010634: 44 20 00 04 be r1,r0,8010644 <IMFS_memfile_remove+0x144> <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
8010638: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 801063c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8010640: fb ff ff 71 calli 8010404 <memfile_free_blocks_in_table> <== NOT EXECUTED
if ( info->triply_indirect ) { for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) { p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
8010644: 36 31 00 01 addi r17,r17,1 <== NOT EXECUTED 8010648: 35 ce 00 04 addi r14,r14,4 <== NOT EXECUTED 801064c: 29 e1 00 00 lw r1,(r15+0) <== NOT EXECUTED 8010650: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8010654: fb ff c1 86 calli 8000c6c <__lshrsi3> <== NOT EXECUTED 8010658: 54 31 ff f6 bgu r1,r17,8010630 <IMFS_memfile_remove+0x130> <== NOT EXECUTED
if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table(
801065c: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED 8010660: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
8010664: 36 10 00 01 addi r16,r16,1 <== NOT EXECUTED
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) { if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table(
8010668: b4 2d 08 00 add r1,r1,r13 <== NOT EXECUTED 801066c: fb ff ff 66 calli 8010404 <memfile_free_blocks_in_table> <== NOT EXECUTED
memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
8010670: 35 ad 00 04 addi r13,r13,4 <== NOT EXECUTED 8010674: 29 e1 00 00 lw r1,(r15+0) <== NOT EXECUTED 8010678: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 801067c: fb ff c1 7c calli 8000c6c <__lshrsi3> <== NOT EXECUTED 8010680: 54 30 ff e6 bgu r1,r16,8010618 <IMFS_memfile_remove+0x118> <== NOT EXECUTED
} } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table(
8010684: 35 61 00 60 addi r1,r11,96 <== NOT EXECUTED 8010688: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 801068c: fb ff ff 5e calli 8010404 <memfile_free_blocks_in_table> <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free ); } return 0; }
8010690: 34 01 00 00 mvi r1,0 8010694: 2b 9d 00 04 lw ra,(sp+4) 8010698: 2b 8b 00 20 lw r11,(sp+32) 801069c: 2b 8c 00 1c lw r12,(sp+28) 80106a0: 2b 8d 00 18 lw r13,(sp+24) 80106a4: 2b 8e 00 14 lw r14,(sp+20) 80106a8: 2b 8f 00 10 lw r15,(sp+16) 80106ac: 2b 90 00 0c lw r16,(sp+12) 80106b0: 2b 91 00 08 lw r17,(sp+8) 80106b4: 37 9c 00 20 addi sp,sp,32 80106b8: c3 a0 00 00 ret
080104a8 <IMFS_memfile_remove_block>: MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) {
80104a8: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 80104ac: 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 );
80104b0: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 80104b4: fb ff ff 22 calli 801013c <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
assert( block_ptr );
80104b8: 5c 20 00 09 bne r1,r0,80104dc <IMFS_memfile_remove_block+0x34><== NOT EXECUTED 80104bc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80104c0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 80104c4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 80104c8: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 80104cc: 38 63 35 40 ori r3,r3,0x3540 <== NOT EXECUTED 80104d0: 38 84 34 30 ori r4,r4,0x3430 <== NOT EXECUTED 80104d4: 34 02 01 96 mvi r2,406 <== NOT EXECUTED 80104d8: fb ff f2 5a calli 800ce40 <__assert_func> <== NOT EXECUTED
if ( block_ptr ) { ptr = *block_ptr;
80104dc: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED
*block_ptr = 0;
80104e0: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 80104e4: 58 23 00 00 sw (r1+0),r3 <== NOT EXECUTED
memfile_free_block( ptr );
80104e8: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 80104ec: fb ff fe f9 calli 80100d0 <memfile_free_block> <== NOT EXECUTED
} return 1; }
80104f0: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 80104f4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80104f8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 80104fc: c3 a0 00 00 ret <== NOT EXECUTED
08010b28 <IMFS_memfile_write>: IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) {
8010b28: 37 9c ff d0 addi sp,sp,-48 8010b2c: 5b 8b 00 28 sw (sp+40),r11 8010b30: 5b 8c 00 24 sw (sp+36),r12 8010b34: 5b 8d 00 20 sw (sp+32),r13 8010b38: 5b 8e 00 1c sw (sp+28),r14 8010b3c: 5b 8f 00 18 sw (sp+24),r15 8010b40: 5b 90 00 14 sw (sp+20),r16 8010b44: 5b 91 00 10 sw (sp+16),r17 8010b48: 5b 92 00 0c sw (sp+12),r18 8010b4c: 5b 93 00 08 sw (sp+8),r19 8010b50: 5b 9d 00 04 sw (sp+4),ra 8010b54: b8 20 58 00 mv r11,r1 8010b58: b8 40 60 00 mv r12,r2 8010b5c: b8 60 88 00 mv r17,r3 8010b60: b8 80 78 00 mv r15,r4
/* * Perform internal consistency checks */ assert( the_jnode );
8010b64: 5c 20 00 09 bne r1,r0,8010b88 <IMFS_memfile_write+0x60> <== ALWAYS TAKEN
8010b68: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010b6c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010b70: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010b74: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 8010b78: 38 63 34 e4 ori r3,r3,0x34e4 <== NOT EXECUTED 8010b7c: 38 84 33 f4 ori r4,r4,0x33f4 <== NOT EXECUTED 8010b80: 34 02 02 e3 mvi r2,739 <== NOT EXECUTED 8010b84: e0 00 00 0b bi 8010bb0 <IMFS_memfile_write+0x88> <== NOT EXECUTED
if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
8010b88: 28 22 00 4c lw r2,(r1+76) 8010b8c: 34 01 00 05 mvi r1,5
8010b90: 44 41 00 09 be r2,r1,8010bb4 <IMFS_memfile_write+0x8c> <== ALWAYS TAKEN
8010b94: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010b98: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010b9c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010ba0: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 8010ba4: 38 63 34 e4 ori r3,r3,0x34e4 <== NOT EXECUTED 8010ba8: 38 84 34 00 ori r4,r4,0x3400 <== NOT EXECUTED 8010bac: 34 02 02 e7 mvi r2,743 <== NOT EXECUTED 8010bb0: fb ff f0 a4 calli 800ce40 <__assert_func> <== NOT EXECUTED
/* * Error check arguments */ assert( source );
8010bb4: 5c 60 00 09 bne r3,r0,8010bd8 <IMFS_memfile_write+0xb0> <== ALWAYS TAKEN
8010bb8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010bbc: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010bc0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010bc4: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 8010bc8: 38 63 34 e4 ori r3,r3,0x34e4 <== NOT EXECUTED 8010bcc: 38 84 34 3c ori r4,r4,0x343c <== NOT EXECUTED 8010bd0: 34 02 02 ef mvi r2,751 <== NOT EXECUTED 8010bd4: e3 ff ff f7 bi 8010bb0 <IMFS_memfile_write+0x88> <== NOT EXECUTED
/* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length )
8010bd8: 5c 80 00 04 bne r4,r0,8010be8 <IMFS_memfile_write+0xc0> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
8010bdc: f8 00 07 e3 calli 8012b68 <__errno> <== NOT EXECUTED 8010be0: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8010be4: e0 00 00 0d bi 8010c18 <IMFS_memfile_write+0xf0> <== 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 ) {
8010be8: 29 61 00 50 lw r1,(r11+80)
/* * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length;
8010bec: b4 8c 10 00 add r2,r4,r12
if ( last_byte > the_jnode->info.file.size ) {
8010bf0: 48 01 00 05 bg r0,r1,8010c04 <IMFS_memfile_write+0xdc> <== NEVER TAKEN 8010bf4: 5c 20 00 0c bne r1,r0,8010c24 <IMFS_memfile_write+0xfc> <== NEVER TAKEN
8010bf8: 29 61 00 54 lw r1,(r11+84)
8010bfc: 54 41 00 02 bgu r2,r1,8010c04 <IMFS_memfile_write+0xdc> <== ALWAYS TAKEN
8010c00: e0 00 00 09 bi 8010c24 <IMFS_memfile_write+0xfc> <== NOT EXECUTED
status = IMFS_memfile_extend( the_jnode, last_byte );
8010c04: b9 60 08 00 mv r1,r11 8010c08: fb ff ff 18 calli 8010868 <IMFS_memfile_extend>
if ( status )
8010c0c: 44 20 00 06 be r1,r0,8010c24 <IMFS_memfile_write+0xfc> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
8010c10: f8 00 07 d6 calli 8012b68 <__errno> <== NOT EXECUTED 8010c14: 34 02 00 1c mvi r2,28 <== NOT EXECUTED 8010c18: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8010c1c: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8010c20: e0 00 00 66 bi 8010db8 <IMFS_memfile_write+0x290> <== NOT EXECUTED
/* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
8010c24: 78 01 08 02 mvhi r1,0x802 8010c28: 38 21 46 d8 ori r1,r1,0x46d8 8010c2c: 28 33 00 00 lw r19,(r1+0) 8010c30: b9 80 08 00 mv r1,r12
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) {
8010c34: b9 e0 68 00 mv r13,r15
/* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
8010c38: ba 60 10 00 mv r2,r19 8010c3c: f8 00 43 e6 calli 8021bd4 <__modsi3> 8010c40: b8 20 90 00 mv r18,r1
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
8010c44: ba 60 10 00 mv r2,r19 8010c48: b9 80 08 00 mv r1,r12 8010c4c: f8 00 43 af calli 8021b08 <__divsi3> 8010c50: b8 20 70 00 mv r14,r1
if ( start_offset ) {
8010c54: ba 20 80 00 mv r16,r17 8010c58: ba 40 60 00 mv r12,r18
8010c5c: 46 40 00 19 be r18,r0,8010cc0 <IMFS_memfile_write+0x198> 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 );
8010c60: b9 60 08 00 mv r1,r11 8010c64: b9 c0 10 00 mv r2,r14 8010c68: 34 03 00 00 mvi r3,0 8010c6c: fb ff fd 34 calli 801013c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
8010c70: 5c 20 00 09 bne r1,r0,8010c94 <IMFS_memfile_write+0x16c> <== ALWAYS TAKEN
8010c74: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010c78: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010c7c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010c80: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 8010c84: 38 63 34 e4 ori r3,r3,0x34e4 <== NOT EXECUTED 8010c88: 38 84 34 30 ori r4,r4,0x3430 <== NOT EXECUTED 8010c8c: 34 02 03 1c mvi r2,796 <== NOT EXECUTED 8010c90: e3 ff ff c8 bi 8010bb0 <IMFS_memfile_write+0x88> <== NOT EXECUTED
*/ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
8010c94: ca 72 60 00 sub r12,r19,r18
8010c98: 51 ec 00 02 bgeu r15,r12,8010ca0 <IMFS_memfile_write+0x178>
8010c9c: b9 e0 60 00 mv r12,r15
if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
8010ca0: 28 21 00 00 lw r1,(r1+0) 8010ca4: ba 20 10 00 mv r2,r17 8010ca8: b9 80 18 00 mv r3,r12 8010cac: b4 32 08 00 add r1,r1,r18 8010cb0: f8 00 0a 54 calli 8013600 <memcpy>
src += to_copy;
8010cb4: b6 2c 80 00 add r16,r17,r12
block++;
8010cb8: 35 ce 00 01 addi r14,r14,1
my_length -= to_copy;
8010cbc: c9 ec 68 00 sub r13,r15,r12
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
8010cc0: 78 01 08 02 mvhi r1,0x802 8010cc4: 38 21 46 d8 ori r1,r1,0x46d8
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
8010cc8: b8 20 88 00 mv r17,r1
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
8010ccc: 28 2f 00 00 lw r15,(r1+0)
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
8010cd0: e0 00 00 16 bi 8010d28 <IMFS_memfile_write+0x200>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
8010cd4: b9 60 08 00 mv r1,r11 8010cd8: b9 c0 10 00 mv r2,r14 8010cdc: 34 03 00 00 mvi r3,0 8010ce0: fb ff fd 17 calli 801013c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
8010ce4: 5c 20 00 09 bne r1,r0,8010d08 <IMFS_memfile_write+0x1e0> <== ALWAYS TAKEN
8010ce8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010cec: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010cf0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010cf4: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 8010cf8: 38 63 34 e4 ori r3,r3,0x34e4 <== NOT EXECUTED 8010cfc: 38 84 34 30 ori r4,r4,0x3430 <== NOT EXECUTED 8010d00: 34 02 03 30 mvi r2,816 <== NOT EXECUTED 8010d04: e3 ff ff ab bi 8010bb0 <IMFS_memfile_write+0x88> <== NOT EXECUTED
if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy );
8010d08: 28 21 00 00 lw r1,(r1+0) 8010d0c: ba 00 10 00 mv r2,r16 8010d10: b9 e0 18 00 mv r3,r15 8010d14: f8 00 0a 3b calli 8013600 <memcpy>
src += to_copy;
8010d18: b6 0f 80 00 add r16,r16,r15
block++;
8010d1c: 35 ce 00 01 addi r14,r14,1
my_length -= to_copy;
8010d20: c9 af 68 00 sub r13,r13,r15
* * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write(
8010d24: b5 8f 60 00 add r12,r12,r15
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
8010d28: 2a 21 00 00 lw r1,(r17+0)
8010d2c: 51 a1 ff ea bgeu r13,r1,8010cd4 <IMFS_memfile_write+0x1ac> /* * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
8010d30: 54 2d 00 09 bgu r1,r13,8010d54 <IMFS_memfile_write+0x22c> <== ALWAYS TAKEN
8010d34: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010d38: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010d3c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010d40: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 8010d44: 38 63 34 e4 ori r3,r3,0x34e4 <== NOT EXECUTED 8010d48: 38 84 34 44 ori r4,r4,0x3444 <== NOT EXECUTED 8010d4c: 34 02 03 41 mvi r2,833 <== NOT EXECUTED 8010d50: e3 ff ff 98 bi 8010bb0 <IMFS_memfile_write+0x88> <== NOT EXECUTED
to_copy = my_length; if ( my_length ) { 8010d54: 45 a0 00 13 be r13,r0,8010da0 <IMFS_memfile_write+0x278> block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
8010d58: b9 c0 10 00 mv r2,r14 8010d5c: b9 60 08 00 mv r1,r11 8010d60: 34 03 00 00 mvi r3,0 8010d64: fb ff fc f6 calli 801013c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
8010d68: 5c 20 00 09 bne r1,r0,8010d8c <IMFS_memfile_write+0x264> <== ALWAYS TAKEN
8010d6c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010d70: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010d74: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010d78: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 8010d7c: 38 63 34 e4 ori r3,r3,0x34e4 <== NOT EXECUTED 8010d80: 38 84 34 30 ori r4,r4,0x3430 <== NOT EXECUTED 8010d84: 34 02 03 46 mvi r2,838 <== NOT EXECUTED 8010d88: e3 ff ff 8a bi 8010bb0 <IMFS_memfile_write+0x88> <== NOT EXECUTED
if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length );
8010d8c: 28 21 00 00 lw r1,(r1+0) 8010d90: ba 00 10 00 mv r2,r16 8010d94: b9 a0 18 00 mv r3,r13 8010d98: f8 00 0a 1a calli 8013600 <memcpy>
my_length = 0; copied += to_copy;
8010d9c: b5 8d 60 00 add r12,r12,r13
} IMFS_mtime_ctime_update( the_jnode );
8010da0: 37 81 00 2c addi r1,sp,44 8010da4: 34 02 00 00 mvi r2,0 8010da8: fb ff c7 2c calli 8002a58 <gettimeofday> 8010dac: 2b 81 00 2c lw r1,(sp+44) 8010db0: 59 61 00 48 sw (r11+72),r1 8010db4: 59 61 00 44 sw (r11+68),r1
return copied; }
8010db8: b9 80 08 00 mv r1,r12 8010dbc: 2b 9d 00 04 lw ra,(sp+4) 8010dc0: 2b 8b 00 28 lw r11,(sp+40) 8010dc4: 2b 8c 00 24 lw r12,(sp+36) 8010dc8: 2b 8d 00 20 lw r13,(sp+32) 8010dcc: 2b 8e 00 1c lw r14,(sp+28) 8010dd0: 2b 8f 00 18 lw r15,(sp+24) 8010dd4: 2b 90 00 14 lw r16,(sp+20) 8010dd8: 2b 91 00 10 lw r17,(sp+16) 8010ddc: 2b 92 00 0c lw r18,(sp+12) 8010de0: 2b 93 00 08 lw r19,(sp+8) 8010de4: 37 9c 00 30 addi sp,sp,48 8010de8: c3 a0 00 00 ret
08006c84 <IMFS_mknod>: const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) {
8006c84: 37 9c ff a8 addi sp,sp,-88 8006c88: 5b 8b 00 18 sw (sp+24),r11 8006c8c: 5b 8c 00 14 sw (sp+20),r12 8006c90: 5b 8d 00 10 sw (sp+16),r13 8006c94: 5b 8e 00 0c sw (sp+12),r14 8006c98: 5b 8f 00 08 sw (sp+8),r15 8006c9c: 5b 9d 00 04 sw (sp+4),ra 8006ca0: b8 40 58 00 mv r11,r2 8006ca4: b8 20 78 00 mv r15,r1 8006ca8: b8 60 70 00 mv r14,r3 8006cac: b8 80 68 00 mv r13,r4 8006cb0: b8 a0 60 00 mv r12,r5
IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result );
8006cb4: f8 00 1a f2 calli 800d87c <strlen> 8006cb8: b8 20 10 00 mv r2,r1 8006cbc: 37 83 00 1c addi r3,sp,28 8006cc0: b9 e0 08 00 mv r1,r15 8006cc4: 37 84 00 58 addi r4,sp,88 8006cc8: fb ff ff 6e calli 8006a80 <IMFS_get_token>
/* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) )
8006ccc: 21 66 f0 00 andi r6,r11,0xf000 8006cd0: 34 01 40 00 mvi r1,16384
8006cd4: 44 c1 00 12 be r6,r1,8006d1c <IMFS_mknod+0x98> type = IMFS_DIRECTORY; else if ( S_ISREG(mode) )
8006cd8: 38 01 80 00 mvu r1,0x8000 8006cdc: 34 02 00 05 mvi r2,5
8006ce0: 44 c1 00 10 be r6,r1,8006d20 <IMFS_mknod+0x9c> type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
8006ce4: 64 c2 20 00 cmpei r2,r6,8192 8006ce8: 64 c1 60 00 cmpei r1,r6,24576 8006cec: b8 41 08 00 or r1,r2,r1
8006cf0: 44 20 00 05 be r1,r0,8006d04 <IMFS_mknod+0x80> type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
8006cf4: 5b 8e 00 40 sw (sp+64),r14 8006cf8: 5b 8d 00 44 sw (sp+68),r13 8006cfc: 34 02 00 02 mvi r2,2 8006d00: e0 00 00 08 bi 8006d20 <IMFS_mknod+0x9c>
} else if (S_ISFIFO(mode))
8006d04: 34 01 10 00 mvi r1,4096 8006d08: 34 02 00 07 mvi r2,7
8006d0c: 44 c1 00 05 be r6,r1,8006d20 <IMFS_mknod+0x9c> <== ALWAYS TAKEN
type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL );
8006d10: f8 00 16 0b calli 800c53c <__errno> <== NOT EXECUTED 8006d14: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8006d18: e0 00 00 0b bi 8006d44 <IMFS_mknod+0xc0> <== NOT EXECUTED
8006d1c: 34 02 00 01 mvi r2,1
* was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node(
8006d20: b9 80 08 00 mv r1,r12 8006d24: b9 60 20 00 mv r4,r11 8006d28: 37 83 00 1c addi r3,sp,28 8006d2c: 37 85 00 40 addi r5,sp,64 8006d30: f8 00 0e ae calli 800a7e8 <IMFS_create_node>
new_name, mode, &info ); if ( !new_node )
8006d34: 34 02 00 00 mvi r2,0
8006d38: 5c 22 00 05 bne r1,r2,8006d4c <IMFS_mknod+0xc8> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
8006d3c: f8 00 16 00 calli 800c53c <__errno> <== NOT EXECUTED 8006d40: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8006d44: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8006d48: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
return 0; }
8006d4c: b8 40 08 00 mv r1,r2 8006d50: 2b 9d 00 04 lw ra,(sp+4) 8006d54: 2b 8b 00 18 lw r11,(sp+24) 8006d58: 2b 8c 00 14 lw r12,(sp+20) 8006d5c: 2b 8d 00 10 lw r13,(sp+16) 8006d60: 2b 8e 00 0c lw r14,(sp+12) 8006d64: 2b 8f 00 08 lw r15,(sp+8) 8006d68: 37 9c 00 58 addi sp,sp,88 8006d6c: c3 a0 00 00 ret
08002100 <IMFS_mount>: #include <rtems/seterr.h> int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) {
8002100: 37 9c ff fc addi sp,sp,-4 8002104: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access;
8002108: 28 22 00 08 lw r2,(r1+8)
/* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY )
800210c: 34 03 00 01 mvi r3,1 8002110: 28 44 00 4c lw r4,(r2+76)
8002114: 44 83 00 06 be r4,r3,800212c <IMFS_mount+0x2c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
8002118: f8 00 42 94 calli 8012b68 <__errno> <== NOT EXECUTED 800211c: 34 02 00 14 mvi r2,20 <== NOT EXECUTED 8002120: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8002124: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8002128: e0 00 00 03 bi 8002134 <IMFS_mount+0x34> <== NOT EXECUTED
/* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry;
800212c: 58 41 00 5c sw (r2+92),r1 8002130: 34 01 00 00 mvi r1,0
return 0; }
8002134: 2b 9d 00 04 lw ra,(sp+4) 8002138: 37 9c 00 04 addi sp,sp,4 800213c: c3 a0 00 00 ret
08002aec <IMFS_print_jnode>: */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) {
8002aec: 37 9c ff f0 addi sp,sp,-16 8002af0: 5b 8b 00 10 sw (sp+16),r11 8002af4: 5b 8c 00 0c sw (sp+12),r12 8002af8: 5b 8d 00 08 sw (sp+8),r13 8002afc: 5b 9d 00 04 sw (sp+4),ra 8002b00: b8 20 58 00 mv r11,r1
assert( the_jnode );
8002b04: 5c 20 00 09 bne r1,r0,8002b28 <IMFS_print_jnode+0x3c> <== ALWAYS TAKEN
8002b08: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002b0c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002b10: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002b14: 38 21 51 88 ori r1,r1,0x5188 <== NOT EXECUTED 8002b18: 38 63 53 60 ori r3,r3,0x5360 <== NOT EXECUTED 8002b1c: 38 84 51 d4 ori r4,r4,0x51d4 <== NOT EXECUTED 8002b20: 34 02 00 38 mvi r2,56 <== NOT EXECUTED 8002b24: e0 00 00 39 bi 8002c08 <IMFS_print_jnode+0x11c> <== NOT EXECUTED
fprintf(stdout, "%s", the_jnode->name );
8002b28: 78 0c 08 02 mvhi r12,0x802 8002b2c: 39 8c 81 d8 ori r12,r12,0x81d8 8002b30: 29 82 00 00 lw r2,(r12+0) 8002b34: 34 21 00 0c addi r1,r1,12 8002b38: 28 42 00 08 lw r2,(r2+8) 8002b3c: f8 00 3c ea calli 8011ee4 <fputs>
switch( the_jnode->type ) {
8002b40: 29 63 00 4c lw r3,(r11+76) 8002b44: 34 02 00 06 mvi r2,6 8002b48: 34 61 ff ff addi r1,r3,-1
8002b4c: 54 22 00 4a bgu r1,r2,8002c74 <IMFS_print_jnode+0x188> <== NEVER TAKEN
8002b50: 34 02 00 02 mvi r2,2 8002b54: 78 0d 08 02 mvhi r13,0x802 8002b58: fb ff fd bf calli 8002254 <__ashlsi3> 8002b5c: 39 ad 53 30 ori r13,r13,0x5330 8002b60: b5 a1 08 00 add r1,r13,r1 8002b64: 28 22 00 00 lw r2,(r1+0) 8002b68: c0 40 00 00 b r2
case IMFS_DIRECTORY: fprintf(stdout, "/" );
8002b6c: 29 82 00 00 lw r2,(r12+0) 8002b70: 34 01 00 2f mvi r1,47 8002b74: 28 42 00 08 lw r2,(r2+8) 8002b78: f8 00 3c 85 calli 8011d8c <fputc>
break;
8002b7c: e0 00 00 4b bi 8002ca8 <IMFS_print_jnode+0x1bc>
case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
8002b80: 29 81 00 00 lw r1,(r12+0) 8002b84: 78 02 08 02 mvhi r2,0x802 8002b88: 29 64 00 54 lw r4,(r11+84) 8002b8c: 29 63 00 50 lw r3,(r11+80) 8002b90: 28 21 00 08 lw r1,(r1+8) 8002b94: 38 42 51 e0 ori r2,r2,0x51e0 8002b98: e0 00 00 07 bi 8002bb4 <IMFS_print_jnode+0xc8>
the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)",
8002b9c: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8002ba0: 29 64 00 58 lw r4,(r11+88) <== NOT EXECUTED 8002ba4: 29 63 00 54 lw r3,(r11+84) <== NOT EXECUTED 8002ba8: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8002bac: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8002bb0: 38 42 51 f4 ori r2,r2,0x51f4 <== NOT EXECUTED
8002bb4: f8 00 3c 55 calli 8011d08 <fprintf>
(uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break;
8002bb8: e0 00 00 3c bi 8002ca8 <IMFS_print_jnode+0x1bc>
the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")",
8002bbc: 29 81 00 00 lw r1,(r12+0) 8002bc0: 29 63 00 54 lw r3,(r11+84) 8002bc4: 78 02 08 02 mvhi r2,0x802 8002bc8: 28 21 00 08 lw r1,(r1+8) 8002bcc: 38 42 52 04 ori r2,r2,0x5204 8002bd0: f8 00 3c 4e calli 8011d08 <fprintf>
(uint32_t)the_jnode->info.file.size ); #endif break;
8002bd4: e0 00 00 35 bi 8002ca8 <IMFS_print_jnode+0x1bc>
case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" );
8002bd8: 29 82 00 00 lw r2,(r12+0) <== NOT EXECUTED 8002bdc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002be0: 38 21 52 10 ori r1,r1,0x5210 <== NOT EXECUTED 8002be4: 28 42 00 08 lw r2,(r2+8) <== NOT EXECUTED 8002be8: f8 00 3c bf calli 8011ee4 <fputs> <== NOT EXECUTED
assert(0);
8002bec: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002bf0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002bf4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002bf8: 38 21 51 88 ori r1,r1,0x5188 <== NOT EXECUTED 8002bfc: 38 63 53 60 ori r3,r3,0x5360 <== NOT EXECUTED 8002c00: 38 84 52 24 ori r4,r4,0x5224 <== NOT EXECUTED 8002c04: 34 02 00 5d mvi r2,93 <== NOT EXECUTED 8002c08: f8 00 02 78 calli 80035e8 <__assert_func> <== NOT EXECUTED
break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" );
8002c0c: 29 82 00 00 lw r2,(r12+0) <== NOT EXECUTED 8002c10: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002c14: 38 21 52 10 ori r1,r1,0x5210 <== NOT EXECUTED 8002c18: 28 42 00 08 lw r2,(r2+8) <== NOT EXECUTED 8002c1c: f8 00 3c b2 calli 8011ee4 <fputs> <== NOT EXECUTED
assert(0);
8002c20: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002c24: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002c28: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002c2c: 38 21 51 88 ori r1,r1,0x5188 <== NOT EXECUTED 8002c30: 38 63 53 60 ori r3,r3,0x5360 <== NOT EXECUTED 8002c34: 38 84 52 24 ori r4,r4,0x5224 <== NOT EXECUTED 8002c38: 34 02 00 62 mvi r2,98 <== NOT EXECUTED 8002c3c: e3 ff ff f3 bi 8002c08 <IMFS_print_jnode+0x11c> <== NOT EXECUTED
break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" );
8002c40: 29 82 00 00 lw r2,(r12+0) <== NOT EXECUTED 8002c44: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002c48: 38 21 52 28 ori r1,r1,0x5228 <== NOT EXECUTED 8002c4c: 28 42 00 08 lw r2,(r2+8) <== NOT EXECUTED 8002c50: f8 00 3c a5 calli 8011ee4 <fputs> <== NOT EXECUTED
assert(0);
8002c54: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002c58: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002c5c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002c60: 38 21 51 88 ori r1,r1,0x5188 <== NOT EXECUTED 8002c64: 38 63 53 60 ori r3,r3,0x5360 <== NOT EXECUTED 8002c68: 38 84 52 24 ori r4,r4,0x5224 <== NOT EXECUTED 8002c6c: 34 02 00 67 mvi r2,103 <== NOT EXECUTED 8002c70: e3 ff ff e6 bi 8002c08 <IMFS_print_jnode+0x11c> <== NOT EXECUTED
break; default: fprintf(stdout, " bad type %d\n", the_jnode->type );
8002c74: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8002c78: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8002c7c: 38 42 52 3c ori r2,r2,0x523c <== NOT EXECUTED 8002c80: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8002c84: f8 00 3c 21 calli 8011d08 <fprintf> <== NOT EXECUTED
assert(0);
8002c88: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8002c8c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8002c90: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8002c94: 38 21 51 88 ori r1,r1,0x5188 <== NOT EXECUTED 8002c98: 38 63 53 60 ori r3,r3,0x5360 <== NOT EXECUTED 8002c9c: 38 84 52 24 ori r4,r4,0x5224 <== NOT EXECUTED 8002ca0: 34 02 00 6c mvi r2,108 <== NOT EXECUTED 8002ca4: e3 ff ff d9 bi 8002c08 <IMFS_print_jnode+0x11c> <== NOT EXECUTED
break; } puts("");
8002ca8: 78 01 08 02 mvhi r1,0x802 8002cac: 38 21 4b f4 ori r1,r1,0x4bf4 8002cb0: f8 00 44 3c calli 8013da0 <puts>
}
8002cb4: 2b 9d 00 04 lw ra,(sp+4) 8002cb8: 2b 8b 00 10 lw r11,(sp+16) 8002cbc: 2b 8c 00 0c lw r12,(sp+12) 8002cc0: 2b 8d 00 08 lw r13,(sp+8) 8002cc4: 37 9c 00 10 addi sp,sp,16 8002cc8: c3 a0 00 00 ret
0800214c <IMFS_readlink>: int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) {
800214c: 37 9c ff fc addi sp,sp,-4 8002150: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *node; int i; node = loc->node_access;
8002154: 28 24 00 00 lw r4,(r1+0)
if ( node->type != IMFS_SYM_LINK )
8002158: 34 05 00 04 mvi r5,4 800215c: 34 01 00 00 mvi r1,0 8002160: 28 86 00 4c lw r6,(r4+76)
8002164: 44 c5 00 08 be r6,r5,8002184 <IMFS_readlink+0x38> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
8002168: f8 00 42 80 calli 8012b68 <__errno> <== NOT EXECUTED 800216c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8002170: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8002174: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8002178: e0 00 00 09 bi 800219c <IMFS_readlink+0x50> <== NOT EXECUTED
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i];
800217c: 30 c5 00 00 sb (r6+0),r5
node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
8002180: 34 21 00 01 addi r1,r1,1
buf[i] = node->info.sym_link.name[i];
8002184: b4 41 30 00 add r6,r2,r1
node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ ) 8002188: 50 23 00 05 bgeu r1,r3,800219c <IMFS_readlink+0x50>
800218c: 28 85 00 50 lw r5,(r4+80) 8002190: b4 a1 28 00 add r5,r5,r1 8002194: 40 a5 00 00 lbu r5,(r5+0)
8002198: 5c a0 ff f9 bne r5,r0,800217c <IMFS_readlink+0x30> buf[i] = node->info.sym_link.name[i]; return i; }
800219c: 2b 9d 00 04 lw ra,(sp+4) 80021a0: 37 9c 00 04 addi sp,sp,4 80021a4: c3 a0 00 00 ret
080021a8 <IMFS_rename>: 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 */ ) {
80021a8: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 80021ac: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 80021b0: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 80021b4: 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;
80021b8: 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 */ ) {
80021bc: 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 );
80021c0: b8 80 10 00 mv r2,r4 <== NOT EXECUTED 80021c4: 35 61 00 0c addi r1,r11,12 <== NOT EXECUTED 80021c8: 34 03 00 20 mvi r3,32 <== NOT EXECUTED 80021cc: f8 00 47 43 calli 8013ed8 <strncpy> <== NOT EXECUTED
if ( the_jnode->Parent != NULL )
80021d0: 29 61 00 08 lw r1,(r11+8) <== NOT EXECUTED 80021d4: 44 20 00 03 be r1,r0,80021e0 <IMFS_rename+0x38> <== NOT EXECUTED
*/ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node );
80021d8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80021dc: f8 00 0a e8 calli 8004d7c <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access;
80021e0: 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 );
80021e4: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80021e8: 34 61 00 50 addi r1,r3,80 <== NOT EXECUTED
the_jnode->Parent = new_parent;
80021ec: 59 63 00 08 sw (r11+8),r3 <== NOT EXECUTED 80021f0: f8 00 0a d7 calli 8004d4c <_Chain_Append> <== NOT EXECUTED
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode );
80021f4: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED 80021f8: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 80021fc: f8 00 02 17 calli 8002a58 <gettimeofday> <== NOT EXECUTED 8002200: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED 8002204: 59 61 00 48 sw (r11+72),r1 <== NOT EXECUTED
return 0; }
8002208: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 800220c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8002210: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8002214: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 8002218: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 800221c: c3 a0 00 00 ret <== NOT EXECUTED
08006d7c <IMFS_rmnod>: int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) {
8006d7c: 37 9c ff ec addi sp,sp,-20 8006d80: 5b 8b 00 0c sw (sp+12),r11 8006d84: 5b 8c 00 08 sw (sp+8),r12 8006d88: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access;
8006d8c: 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 */ ) {
8006d90: 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 ) {
8006d94: 29 61 00 08 lw r1,(r11+8)
8006d98: 44 20 00 05 be r1,r0,8006dac <IMFS_rmnod+0x30> <== NEVER TAKEN
*/ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node );
8006d9c: b9 60 08 00 mv r1,r11 8006da0: f8 00 07 0e calli 80089d8 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL;
8006da4: 34 01 00 00 mvi r1,0 8006da8: 59 61 00 08 sw (r11+8),r1
/* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--;
8006dac: 2d 63 00 34 lhu r3,(r11+52)
IMFS_update_ctime( the_jnode );
8006db0: 34 02 00 00 mvi r2,0 8006db4: 37 81 00 10 addi r1,sp,16
/* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--;
8006db8: 34 63 ff ff addi r3,r3,-1 8006dbc: 0d 63 00 34 sh (r11+52),r3
IMFS_update_ctime( the_jnode );
8006dc0: f8 00 01 48 calli 80072e0 <gettimeofday> 8006dc4: 2b 81 00 10 lw r1,(sp+16) 8006dc8: 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) ) {
8006dcc: b9 60 08 00 mv r1,r11 8006dd0: f8 00 01 8c calli 8007400 <rtems_libio_is_file_open>
8006dd4: 5c 20 00 12 bne r1,r0,8006e1c <IMFS_rmnod+0xa0> <== NEVER TAKEN
8006dd8: 2d 63 00 34 lhu r3,(r11+52)
8006ddc: 5c 61 00 10 bne r3,r1,8006e1c <IMFS_rmnod+0xa0> <== NEVER TAKEN
/* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access )
8006de0: 78 01 08 01 mvhi r1,0x801 8006de4: 38 21 d1 10 ori r1,r1,0xd110 8006de8: 28 21 00 00 lw r1,(r1+0) 8006dec: 29 82 00 00 lw r2,(r12+0) 8006df0: 28 24 00 04 lw r4,(r1+4)
8006df4: 5c 82 00 02 bne r4,r2,8006dfc <IMFS_rmnod+0x80> <== ALWAYS TAKEN
rtems_filesystem_current.node_access = NULL;
8006df8: 58 23 00 04 sw (r1+4),r3 <== NOT EXECUTED
/* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) {
8006dfc: 29 62 00 4c lw r2,(r11+76) 8006e00: 34 01 00 04 mvi r1,4
8006e04: 5c 41 00 04 bne r2,r1,8006e14 <IMFS_rmnod+0x98> if ( the_jnode->info.sym_link.name )
8006e08: 29 61 00 50 lw r1,(r11+80)
8006e0c: 44 20 00 02 be r1,r0,8006e14 <IMFS_rmnod+0x98> <== NEVER TAKEN
free( (void*) the_jnode->info.sym_link.name );
8006e10: f8 00 00 b5 calli 80070e4 <free>
} free( the_jnode );
8006e14: b9 60 08 00 mv r1,r11 8006e18: f8 00 00 b3 calli 80070e4 <free>
} return 0; }
8006e1c: 34 01 00 00 mvi r1,0 8006e20: 2b 9d 00 04 lw ra,(sp+4) 8006e24: 2b 8b 00 0c lw r11,(sp+12) 8006e28: 2b 8c 00 08 lw r12,(sp+8) 8006e2c: 37 9c 00 14 addi sp,sp,20 8006e30: c3 a0 00 00 ret
08006e34 <IMFS_stat>: int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) {
8006e34: 37 9c ff ec addi sp,sp,-20 8006e38: 5b 8b 00 14 sw (sp+20),r11 8006e3c: 5b 8c 00 10 sw (sp+16),r12 8006e40: 5b 8d 00 0c sw (sp+12),r13 8006e44: 5b 8e 00 08 sw (sp+8),r14 8006e48: 5b 9d 00 04 sw (sp+4),ra
IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access;
8006e4c: 28 2c 00 00 lw r12,(r1+0)
int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) {
8006e50: b8 20 70 00 mv r14,r1 8006e54: b8 40 58 00 mv r11,r2
IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) {
8006e58: 29 81 00 4c lw r1,(r12+76) 8006e5c: 34 02 00 05 mvi r2,5 8006e60: 34 21 ff fe addi r1,r1,-2
8006e64: 54 22 00 12 bgu r1,r2,8006eac <IMFS_stat+0x78> <== NEVER TAKEN
8006e68: 78 0d 08 01 mvhi r13,0x801 8006e6c: 34 02 00 02 mvi r2,2 8006e70: fb ff e4 e0 calli 80001f0 <__ashlsi3> 8006e74: 39 ad bc 60 ori r13,r13,0xbc60 8006e78: b5 a1 08 00 add r1,r13,r1 8006e7c: 28 21 00 00 lw r1,(r1+0) 8006e80: c0 20 00 00 b r1
case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
8006e84: 29 81 00 54 lw r1,(r12+84) 8006e88: 29 82 00 50 lw r2,(r12+80) 8006e8c: 59 61 00 1c sw (r11+28),r1 8006e90: 59 62 00 18 sw (r11+24),r2
break;
8006e94: e0 00 00 0b bi 8006ec0 <IMFS_stat+0x8c>
case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size;
8006e98: 29 81 00 54 lw r1,(r12+84) 8006e9c: e0 00 00 02 bi 8006ea4 <IMFS_stat+0x70>
case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0;
8006ea0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8006ea4: 59 61 00 20 sw (r11+32),r1
break;
8006ea8: e0 00 00 06 bi 8006ec0 <IMFS_stat+0x8c>
default: rtems_set_errno_and_return_minus_one( ENOTSUP );
8006eac: f8 00 15 a4 calli 800c53c <__errno> <== NOT EXECUTED 8006eb0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8006eb4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8006eb8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8006ebc: e0 00 00 18 bi 8006f1c <IMFS_stat+0xe8> <== NOT EXECUTED
*/ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode;
8006ec0: 29 82 00 30 lw r2,(r12+48)
* The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
8006ec4: 29 c1 00 10 lw r1,(r14+16)
buf->st_mode = the_jnode->st_mode;
8006ec8: 59 62 00 0c sw (r11+12),r2
buf->st_nlink = the_jnode->st_nlink;
8006ecc: 2d 82 00 34 lhu r2,(r12+52)
* The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
8006ed0: 28 21 00 34 lw r1,(r1+52)
buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink;
8006ed4: 0d 62 00 10 sh (r11+16),r2
buf->st_ino = the_jnode->st_ino;
8006ed8: 29 82 00 38 lw r2,(r12+56) 8006edc: 59 62 00 08 sw (r11+8),r2
buf->st_uid = the_jnode->st_uid;
8006ee0: 2d 82 00 3c lhu r2,(r12+60) 8006ee4: 0d 62 00 12 sh (r11+18),r2
buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime;
8006ee8: 29 82 00 40 lw r2,(r12+64) 8006eec: 59 62 00 24 sw (r11+36),r2
* The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
8006ef0: 28 22 00 00 lw r2,(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; buf->st_gid = the_jnode->st_gid;
8006ef4: 2d 81 00 3e lhu r1,(r12+62)
/* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev =
8006ef8: 59 62 00 04 sw (r11+4),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;
8006efc: 0d 61 00 14 sh (r11+20),r1
buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime;
8006f00: 29 81 00 44 lw r1,(r12+68) 8006f04: 59 61 00 2c sw (r11+44),r1
buf->st_ctime = the_jnode->stat_ctime;
8006f08: 29 8c 00 48 lw r12,(r12+72)
rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major;
8006f0c: 38 01 ff fe mvu r1,0xfffe
/* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev =
8006f10: 59 61 00 00 sw (r11+0),r1
buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime;
8006f14: 59 6c 00 34 sw (r11+52),r12 8006f18: 34 01 00 00 mvi r1,0
return 0; }
8006f1c: 2b 9d 00 04 lw ra,(sp+4) 8006f20: 2b 8b 00 14 lw r11,(sp+20) 8006f24: 2b 8c 00 10 lw r12,(sp+16) 8006f28: 2b 8d 00 0c lw r13,(sp+12) 8006f2c: 2b 8e 00 08 lw r14,(sp+8) 8006f30: 37 9c 00 14 addi sp,sp,20 8006f34: c3 a0 00 00 ret
08002220 <IMFS_symlink>: int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) {
8002220: 37 9c ff ac addi sp,sp,-84 8002224: 5b 8b 00 14 sw (sp+20),r11 8002228: 5b 8c 00 10 sw (sp+16),r12 800222c: 5b 8d 00 0c sw (sp+12),r13 8002230: 5b 8e 00 08 sw (sp+8),r14 8002234: 5b 9d 00 04 sw (sp+4),ra 8002238: b8 20 68 00 mv r13,r1
int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
800223c: 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 ) {
8002240: b8 60 60 00 mv r12,r3 8002244: b8 40 70 00 mv r14,r2
int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
8002248: 37 8b 00 18 addi r11,sp,24 800224c: f8 00 46 f8 calli 8013e2c <strlen> 8002250: b8 20 10 00 mv r2,r1 8002254: b9 60 18 00 mv r3,r11 8002258: 37 84 00 54 addi r4,sp,84 800225c: b9 80 08 00 mv r1,r12 8002260: f8 00 2a 4a calli 800cb88 <IMFS_get_token>
/* * Duplicate link name */ info.sym_link.name = strdup(link_name);
8002264: b9 c0 08 00 mv r1,r14 8002268: f8 00 46 ce calli 8013da0 <strdup> 800226c: 5b 81 00 3c sw (sp+60),r1
if (info.sym_link.name == NULL) {
8002270: 44 20 00 0b be r1,r0,800229c <IMFS_symlink+0x7c> <== NEVER TAKEN
* 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(
8002274: 34 02 00 04 mvi r2,4 8002278: b9 a0 08 00 mv r1,r13 800227c: b9 60 18 00 mv r3,r11 8002280: 38 04 a1 ff mvu r4,0xa1ff 8002284: 37 85 00 3c addi r5,sp,60 8002288: f8 00 26 ac calli 800bd38 <IMFS_create_node>
new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) {
800228c: 34 02 00 00 mvi r2,0
8002290: 5c 22 00 07 bne r1,r2,80022ac <IMFS_symlink+0x8c> <== ALWAYS TAKEN
free(info.sym_link.name);
8002294: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 8002298: f8 00 01 c2 calli 80029a0 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
800229c: f8 00 42 33 calli 8012b68 <__errno> <== NOT EXECUTED 80022a0: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 80022a4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80022a8: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
} return 0; }
80022ac: b8 40 08 00 mv r1,r2 80022b0: 2b 9d 00 04 lw ra,(sp+4) 80022b4: 2b 8b 00 14 lw r11,(sp+20) 80022b8: 2b 8c 00 10 lw r12,(sp+16) 80022bc: 2b 8d 00 0c lw r13,(sp+12) 80022c0: 2b 8e 00 08 lw r14,(sp+8) 80022c4: 37 9c 00 54 addi sp,sp,84 80022c8: c3 a0 00 00 ret
080022cc <IMFS_unlink>: int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) {
80022cc: 37 9c ff cc addi sp,sp,-52 80022d0: 5b 8b 00 18 sw (sp+24),r11 80022d4: 5b 8c 00 14 sw (sp+20),r12 80022d8: 5b 8d 00 10 sw (sp+16),r13 80022dc: 5b 8e 00 0c sw (sp+12),r14 80022e0: 5b 8f 00 08 sw (sp+8),r15 80022e4: 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;
80022e8: 28 4b 00 00 lw r11,(r2+0)
int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) {
80022ec: b8 20 70 00 mv r14,r1
/* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) {
80022f0: 34 01 00 03 mvi r1,3 80022f4: 29 63 00 4c lw r3,(r11+76)
int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) {
80022f8: b8 40 60 00 mv r12,r2
/* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 80022fc: 5c 61 00 23 bne r3,r1,8002388 <IMFS_unlink+0xbc> if ( !node->info.hard_link.link_node )
8002300: 29 6f 00 50 lw r15,(r11+80)
8002304: 5d e0 00 06 bne r15,r0,800231c <IMFS_unlink+0x50> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
8002308: f8 00 42 18 calli 8012b68 <__errno> <== NOT EXECUTED 800230c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8002310: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8002314: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 8002318: e0 00 00 22 bi 80023a0 <IMFS_unlink+0xd4> <== NOT EXECUTED
the_link = *loc;
800231c: 37 8d 00 1c addi r13,sp,28 8002320: 34 03 00 14 mvi r3,20 8002324: b9 a0 08 00 mv r1,r13 8002328: f8 00 44 b6 calli 8013600 <memcpy>
the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link );
800232c: b9 a0 08 00 mv r1,r13
if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; the_link.node_access = node->info.hard_link.link_node;
8002330: 5b 8f 00 1c sw (sp+28),r15
IMFS_Set_handlers( &the_link );
8002334: f8 00 26 d6 calli 800be8c <IMFS_Set_handlers>
/* * 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)
8002338: 29 61 00 50 lw r1,(r11+80) 800233c: 34 03 00 01 mvi r3,1 8002340: 2c 22 00 34 lhu r2,(r1+52)
8002344: 5c 43 00 09 bne r2,r3,8002368 <IMFS_unlink+0x9c> { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
8002348: 2b 83 00 24 lw r3,(sp+36) 800234c: b9 a0 10 00 mv r2,r13 8002350: b9 c0 08 00 mv r1,r14 8002354: 28 63 00 34 lw r3,(r3+52) 8002358: d8 60 00 00 call r3
if ( result != 0 )
800235c: 34 03 ff ff mvi r3,-1
8002360: 44 20 00 0a be r1,r0,8002388 <IMFS_unlink+0xbc>
8002364: e0 00 00 0f bi 80023a0 <IMFS_unlink+0xd4>
return -1; } else { node->info.hard_link.link_node->st_nlink --;
8002368: 34 42 ff ff addi r2,r2,-1 800236c: 0c 22 00 34 sh (r1+52),r2
IMFS_update_ctime( node->info.hard_link.link_node );
8002370: 34 02 00 00 mvi r2,0 8002374: 37 81 00 30 addi r1,sp,48 8002378: f8 00 01 b8 calli 8002a58 <gettimeofday> 800237c: 29 61 00 50 lw r1,(r11+80) 8002380: 2b 82 00 30 lw r2,(sp+48) 8002384: 58 22 00 48 sw (r1+72),r2
/* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc );
8002388: 29 83 00 08 lw r3,(r12+8) 800238c: b9 c0 08 00 mv r1,r14 8002390: b9 80 10 00 mv r2,r12 8002394: 28 63 00 34 lw r3,(r3+52) 8002398: d8 60 00 00 call r3 800239c: b8 20 18 00 mv r3,r1
return result; }
80023a0: b8 60 08 00 mv r1,r3 80023a4: 2b 9d 00 04 lw ra,(sp+4) 80023a8: 2b 8b 00 18 lw r11,(sp+24) 80023ac: 2b 8c 00 14 lw r12,(sp+20) 80023b0: 2b 8d 00 10 lw r13,(sp+16) 80023b4: 2b 8e 00 0c lw r14,(sp+12) 80023b8: 2b 8f 00 08 lw r15,(sp+8) 80023bc: 37 9c 00 34 addi sp,sp,52 80023c0: c3 a0 00 00 ret
080023c4 <IMFS_unmount>: #include <rtems/seterr.h> int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) {
80023c4: 37 9c ff fc addi sp,sp,-4 80023c8: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access;
80023cc: 28 22 00 08 lw r2,(r1+8)
/* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY )
80023d0: 34 01 00 01 mvi r1,1 80023d4: 28 43 00 4c lw r3,(r2+76)
80023d8: 44 61 00 04 be r3,r1,80023e8 <IMFS_unmount+0x24> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
80023dc: f8 00 41 e3 calli 8012b68 <__errno> <== NOT EXECUTED 80023e0: 34 02 00 14 mvi r2,20 <== NOT EXECUTED 80023e4: e0 00 00 06 bi 80023fc <IMFS_unmount+0x38> <== NOT EXECUTED
/* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL )
80023e8: 28 43 00 5c lw r3,(r2+92) 80023ec: 34 01 00 00 mvi r1,0
80023f0: 5c 61 00 06 bne r3,r1,8002408 <IMFS_unmount+0x44> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
80023f4: f8 00 41 dd calli 8012b68 <__errno> <== NOT EXECUTED 80023f8: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 80023fc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8002400: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8002404: e0 00 00 02 bi 800240c <IMFS_unmount+0x48> <== NOT EXECUTED
/* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL;
8002408: 58 41 00 5c sw (r2+92),r1
return 0; }
800240c: 2b 9d 00 04 lw ra,(sp+4) 8002410: 37 9c 00 04 addi sp,sp,4 8002414: c3 a0 00 00 ret
08000fdc <RTEMS_Malloc_Initialize>: void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) {
8000fdc: 37 9c ff f0 addi sp,sp,-16 8000fe0: 5b 8b 00 10 sw (sp+16),r11 8000fe4: 5b 8c 00 0c sw (sp+12),r12 8000fe8: 5b 8d 00 08 sw (sp+8),r13 8000fec: 5b 9d 00 04 sw (sp+4),ra
#endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) {
8000ff0: 78 04 08 01 mvhi r4,0x801 8000ff4: 38 84 d6 50 ori r4,r4,0xd650 8000ff8: 28 84 00 00 lw r4,(r4+0)
void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) {
8000ffc: b8 20 58 00 mv r11,r1 8001000: b8 40 60 00 mv r12,r2 8001004: b8 60 68 00 mv r13,r3
#endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) {
8001008: 44 80 00 03 be r4,r0,8001014 <RTEMS_Malloc_Initialize+0x38><== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->initialize)();
800100c: 28 81 00 00 lw r1,(r4+0) <== NOT EXECUTED 8001010: d8 20 00 00 call r1 <== NOT EXECUTED
} /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize();
8001014: f8 00 19 bd calli 8007708 <malloc_deferred_frees_initialize>
/* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) {
8001018: 78 01 08 01 mvhi r1,0x801 800101c: 38 21 d6 54 ori r1,r1,0xd654 8001020: 28 21 00 00 lw r1,(r1+0)
8001024: 44 20 00 08 be r1,r0,8001044 <RTEMS_Malloc_Initialize+0x68><== ALWAYS TAKEN
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
8001028: 28 24 00 00 lw r4,(r1+0) <== NOT EXECUTED 800102c: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8001030: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8001034: d8 80 00 00 call r4 <== NOT EXECUTED
heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
8001038: b5 6c 60 00 add r12,r11,r12 <== NOT EXECUTED 800103c: c9 81 60 00 sub r12,r12,r1 <== NOT EXECUTED 8001040: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
* of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if (
8001044: 78 01 08 01 mvhi r1,0x801 8001048: 38 21 d6 4d ori r1,r1,0xd64d 800104c: 40 22 00 00 lbu r2,(r1+0)
8001050: 5c 40 00 08 bne r2,r0,8001070 <RTEMS_Malloc_Initialize+0x94> !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace()
8001054: 78 01 08 01 mvhi r1,0x801 8001058: 38 21 d0 c4 ori r1,r1,0xd0c4 800105c: 40 21 00 28 lbu r1,(r1+40)
8001060: 44 22 00 04 be r1,r2,8001070 <RTEMS_Malloc_Initialize+0x94> ) { memset( heap_begin, 0, heap_size );
8001064: b9 60 08 00 mv r1,r11 8001068: b9 80 18 00 mv r3,r12 800106c: f8 00 30 38 calli 800d14c <memset>
* 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 ) {
8001070: 78 01 08 01 mvhi r1,0x801 8001074: 38 21 d6 4d ori r1,r1,0xd64d 8001078: 40 2d 00 00 lbu r13,(r1+0)
800107c: 5d a0 00 0b bne r13,r0,80010a8 <RTEMS_Malloc_Initialize+0xcc> void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size );
8001080: 78 01 08 01 mvhi r1,0x801 8001084: 38 21 d0 1c ori r1,r1,0xd01c 8001088: 28 21 00 00 lw r1,(r1+0) 800108c: b9 60 10 00 mv r2,r11 8001090: b9 80 18 00 mv r3,r12 8001094: 34 04 00 08 mvi r4,8 8001098: f8 00 07 bb calli 8002f84 <_Heap_Initialize>
RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) {
800109c: 5c 2d 00 03 bne r1,r13,80010a8 <RTEMS_Malloc_Initialize+0xcc><== ALWAYS TAKEN
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
80010a0: 34 01 00 1a mvi r1,26 <== NOT EXECUTED 80010a4: f8 00 05 80 calli 80026a4 <rtems_fatal_error_occurred> <== NOT EXECUTED
} } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
80010a8: 78 01 08 01 mvhi r1,0x801 80010ac: 38 21 d0 1c ori r1,r1,0xd01c 80010b0: 78 0b 08 01 mvhi r11,0x801 80010b4: 39 6b d7 28 ori r11,r11,0xd728 80010b8: 28 21 00 00 lw r1,(r1+0) 80010bc: 29 6c 00 00 lw r12,(r11+0) 80010c0: f8 00 0b 1a calli 8003d28 <_Protected_heap_Get_size> 80010c4: b4 2c 08 00 add r1,r1,r12 80010c8: 59 61 00 00 sw (r11+0),r1
printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif }
80010cc: 2b 9d 00 04 lw ra,(sp+4) 80010d0: 2b 8b 00 10 lw r11,(sp+16) 80010d4: 2b 8c 00 0c lw r12,(sp+12) 80010d8: 2b 8d 00 08 lw r13,(sp+8) 80010dc: 37 9c 00 10 addi sp,sp,16 80010e0: c3 a0 00 00 ret
080040f4 <Stack_check_Dump_threads_usage>: static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) {
80040f4: 37 9c ff d8 addi sp,sp,-40 <== NOT EXECUTED 80040f8: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED 80040fc: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED 8004100: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED 8004104: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED 8004108: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED 800410c: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED 8004110: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED 8004114: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8004118: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread )
800411c: 44 20 00 4f be r1,r0,8004258 <Stack_check_Dump_threads_usage+0x164><== NOT EXECUTED
return; if ( !print_handler )
8004120: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8004124: 38 21 e5 2c ori r1,r1,0xe52c <== NOT EXECUTED 8004128: 28 2f 00 00 lw r15,(r1+0) <== NOT EXECUTED 800412c: 45 e0 00 4b be r15,r0,8004258 <Stack_check_Dump_threads_usage+0x164><== NOT EXECUTED
/* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) {
8004130: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8004134: 5d 61 00 08 bne r11,r1,8004154 <Stack_check_Dump_threads_usage+0x60><== NOT EXECUTED
if (Stack_check_Interrupt_stack.area) {
8004138: 78 0c 08 07 mvhi r12,0x807 <== NOT EXECUTED 800413c: 39 8c 0f 08 ori r12,r12,0xf08 <== NOT EXECUTED 8004140: 29 81 00 04 lw r1,(r12+4) <== NOT EXECUTED 8004144: 34 0e 00 00 mvi r14,0 <== NOT EXECUTED 8004148: b9 c0 58 00 mv r11,r14 <== NOT EXECUTED 800414c: 5c 2e 00 04 bne r1,r14,800415c <Stack_check_Dump_threads_usage+0x68><== NOT EXECUTED 8004150: e0 00 00 42 bi 8004258 <Stack_check_Dump_threads_usage+0x164><== NOT EXECUTED
} else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
8004154: 29 6e 01 14 lw r14,(r11+276) <== NOT EXECUTED
current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack;
8004158: 35 6c 00 c4 addi r12,r11,196 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack);
800415c: 29 90 00 04 lw r16,(r12+4) <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
8004160: 29 8d 00 00 lw r13,(r12+0) <== NOT EXECUTED
} else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack);
8004164: 36 10 00 10 addi r16,r16,16 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
8004168: 35 ad ff f0 addi r13,r13,-16 <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
800416c: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 8004170: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8004174: fb ff ff c8 calli 8004094 <Stack_check_find_high_water_mark><== NOT EXECUTED
if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark );
8004178: b6 0d 80 00 add r16,r16,r13 <== NOT EXECUTED 800417c: ca 01 80 00 sub r16,r16,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 )
8004180: 5c 20 00 02 bne r1,r0,8004188 <Stack_check_Dump_threads_usage+0x94><== NOT EXECUTED 8004184: b8 20 80 00 mv r16,r1 <== NOT EXECUTED 8004188: 78 04 08 06 mvhi r4,0x806 <== NOT EXECUTED 800418c: 38 84 e5 28 ori r4,r4,0xe528 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) {
8004190: 45 60 00 0e be r11,r0,80041c8 <Stack_check_Dump_threads_usage+0xd4><== NOT EXECUTED
(*print_handler)(
8004194: 29 6b 00 08 lw r11,(r11+8) <== NOT EXECUTED 8004198: 28 91 00 00 lw r17,(r4+0) <== NOT EXECUTED 800419c: 37 83 00 24 addi r3,sp,36 <== NOT EXECUTED 80041a0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80041a4: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 80041a8: f8 00 10 b8 calli 8008488 <rtems_object_get_name> <== NOT EXECUTED 80041ac: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80041b0: b8 20 20 00 mv r4,r1 <== NOT EXECUTED 80041b4: 38 42 1b b0 ori r2,r2,0x1bb0 <== NOT EXECUTED 80041b8: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 80041bc: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 80041c0: d9 e0 00 00 call r15 <== NOT EXECUTED 80041c4: e0 00 00 06 bi 80041dc <Stack_check_Dump_threads_usage+0xe8><== 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 );
80041c8: 28 81 00 00 lw r1,(r4+0) <== NOT EXECUTED 80041cc: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80041d0: 38 42 1b c0 ori r2,r2,0x1bc0 <== NOT EXECUTED 80041d4: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 80041d8: d9 e0 00 00 call r15 <== NOT EXECUTED
} (*print_handler)(
80041dc: 29 84 00 00 lw r4,(r12+0) <== NOT EXECUTED 80041e0: 29 83 00 04 lw r3,(r12+4) <== NOT EXECUTED 80041e4: 78 0b 08 06 mvhi r11,0x806 <== NOT EXECUTED 80041e8: 78 0c 08 06 mvhi r12,0x806 <== NOT EXECUTED 80041ec: 39 6b e5 2c ori r11,r11,0xe52c <== NOT EXECUTED 80041f0: 39 8c e5 28 ori r12,r12,0xe528 <== NOT EXECUTED 80041f4: 29 67 00 00 lw r7,(r11+0) <== NOT EXECUTED 80041f8: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 80041fc: 34 84 ff ff addi r4,r4,-1 <== NOT EXECUTED 8004200: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8004204: 38 42 1b d0 ori r2,r2,0x1bd0 <== NOT EXECUTED 8004208: b4 64 20 00 add r4,r3,r4 <== NOT EXECUTED 800420c: b9 c0 28 00 mv r5,r14 <== NOT EXECUTED 8004210: b9 a0 30 00 mv r6,r13 <== NOT EXECUTED 8004214: d8 e0 00 00 call r7 <== NOT EXECUTED
stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) {
8004218: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 800421c: 38 42 e5 24 ori r2,r2,0xe524 <== NOT EXECUTED 8004220: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 8004224: 5c 20 00 07 bne r1,r0,8004240 <Stack_check_Dump_threads_usage+0x14c><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
8004228: 29 63 00 00 lw r3,(r11+0) <== NOT EXECUTED 800422c: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8004230: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8004234: 38 42 1b f0 ori r2,r2,0x1bf0 <== NOT EXECUTED 8004238: d8 60 00 00 call r3 <== NOT EXECUTED 800423c: e0 00 00 07 bi 8004258 <Stack_check_Dump_threads_usage+0x164><== NOT EXECUTED
} else { (*print_handler)( print_context, "%8" PRId32 "\n", used );
8004240: 29 64 00 00 lw r4,(r11+0) <== NOT EXECUTED 8004244: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED 8004248: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 800424c: 38 42 1c 00 ori r2,r2,0x1c00 <== NOT EXECUTED 8004250: ba 00 18 00 mv r3,r16 <== NOT EXECUTED 8004254: d8 80 00 00 call r4 <== NOT EXECUTED
} }
8004258: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800425c: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED 8004260: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED 8004264: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED 8004268: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED 800426c: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED 8004270: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED 8004274: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED 8004278: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED 800427c: c3 a0 00 00 ret <== NOT EXECUTED
08004508 <Stack_check_Initialize>: /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) {
8004508: 37 9c ff ec addi sp,sp,-20 800450c: 5b 8b 00 14 sw (sp+20),r11 8004510: 5b 8c 00 10 sw (sp+16),r12 8004514: 5b 8d 00 0c sw (sp+12),r13 8004518: 5b 8e 00 08 sw (sp+8),r14 800451c: 5b 9d 00 04 sw (sp+4),ra
static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if (Stack_check_Initialized)
8004520: 78 01 08 06 mvhi r1,0x806 8004524: 38 21 e5 24 ori r1,r1,0xe524 8004528: 28 2c 00 00 lw r12,(r1+0)
800452c: 5d 80 00 24 bne r12,r0,80045bc <Stack_check_Initialize+0xb4>
8004530: 78 0b 08 07 mvhi r11,0x807
/* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ];
8004534: 78 0d 08 06 mvhi r13,0x806
static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if (Stack_check_Initialized)
8004538: 39 6b 0e f8 ori r11,r11,0xef8
/* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ];
800453c: 39 ad 1d 48 ori r13,r13,0x1d48
/* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
8004540: 34 0e 00 04 mvi r14,4
p[i] = pattern[ i%4 ];
8004544: 21 81 00 03 andi r1,r12,0x3 8004548: 34 02 00 02 mvi r2,2 800454c: fb ff f2 fb calli 8001138 <__ashlsi3> 8004550: b5 a1 08 00 add r1,r13,r1 8004554: 28 21 00 00 lw r1,(r1+0)
/* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
8004558: 35 8c 00 01 addi r12,r12,1
p[i] = pattern[ i%4 ];
800455c: 59 61 00 00 sw (r11+0),r1
/* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
8004560: 35 6b 00 04 addi r11,r11,4
8004564: 5d 8e ff f8 bne r12,r14,8004544 <Stack_check_Initialize+0x3c> /* * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
8004568: 78 01 08 07 mvhi r1,0x807 800456c: 38 21 10 b4 ori r1,r1,0x10b4 8004570: 28 24 00 00 lw r4,(r1+0)
8004574: 44 80 00 0e be r4,r0,80045ac <Stack_check_Initialize+0xa4> <== NEVER TAKEN
8004578: 78 01 08 07 mvhi r1,0x807 800457c: 38 21 10 38 ori r1,r1,0x1038 8004580: 28 26 00 00 lw r6,(r1+0)
8004584: 44 c0 00 0a be r6,r0,80045ac <Stack_check_Initialize+0xa4> <== NEVER TAKEN
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
8004588: 78 05 08 07 mvhi r5,0x807
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
800458c: c8 c4 30 00 sub r6,r6,r4
* If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
8004590: 38 a5 0f 08 ori r5,r5,0xf08
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
8004594: b8 80 08 00 mv r1,r4 8004598: b8 c0 18 00 mv r3,r6 800459c: 34 02 00 a5 mvi r2,165
* also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
80045a0: 58 a6 00 00 sw (r5+0),r6
* If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
80045a4: 58 a4 00 04 sw (r5+4),r4
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
80045a8: f8 01 0d e5 calli 8047d3c <memset>
} #endif Stack_check_Initialized = 1;
80045ac: 78 01 08 06 mvhi r1,0x806 80045b0: 38 21 e5 24 ori r1,r1,0xe524 80045b4: 34 02 00 01 mvi r2,1 80045b8: 58 22 00 00 sw (r1+0),r2
}
80045bc: 2b 9d 00 04 lw ra,(sp+4) 80045c0: 2b 8b 00 14 lw r11,(sp+20) 80045c4: 2b 8c 00 10 lw r12,(sp+16) 80045c8: 2b 8d 00 0c lw r13,(sp+12) 80045cc: 2b 8e 00 08 lw r14,(sp+8) 80045d0: 37 9c 00 14 addi sp,sp,20 80045d4: c3 a0 00 00 ret
08004094 <Stack_check_find_high_water_mark>: */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) {
8004094: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8004098: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 800409c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
/* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS;
80040a0: 34 2b 00 10 addi r11,r1,16 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
80040a4: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 80040a8: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80040ac: fb ff f4 4b calli 80011d8 <__lshrsi3> <== NOT EXECUTED 80040b0: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80040b4: fb ff f4 21 calli 8001138 <__ashlsi3> <== NOT EXECUTED
if (*base != U32_PATTERN)
80040b8: 78 02 a5 a5 mvhi r2,0xa5a5 <== NOT EXECUTED
* start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++)
80040bc: b5 61 08 00 add r1,r11,r1 <== NOT EXECUTED
if (*base != U32_PATTERN)
80040c0: 38 42 a5 a5 ori r2,r2,0xa5a5 <== NOT EXECUTED
* start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++)
80040c4: e0 00 00 06 bi 80040dc <Stack_check_find_high_water_mark+0x48><== NOT EXECUTED
if (*base != U32_PATTERN)
80040c8: 29 63 00 00 lw r3,(r11+0) <== NOT EXECUTED 80040cc: 44 62 00 03 be r3,r2,80040d8 <Stack_check_find_high_water_mark+0x44><== NOT EXECUTED
return (void *) base;
80040d0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80040d4: e0 00 00 04 bi 80040e4 <Stack_check_find_high_water_mark+0x50><== 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++)
80040d8: 35 6b 00 04 addi r11,r11,4 <== NOT EXECUTED 80040dc: 54 2b ff fb bgu r1,r11,80040c8 <Stack_check_find_high_water_mark+0x34><== NOT EXECUTED 80040e0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; }
80040e4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80040e8: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 80040ec: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 80040f0: c3 a0 00 00 ret <== NOT EXECUTED
08004334 <Stack_check_report_blown_task>: * * 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) {
8004334: 37 9c ff d0 addi sp,sp,-48 8004338: 5b 8b 00 10 sw (sp+16),r11 800433c: 5b 8c 00 0c sw (sp+12),r12 8004340: 5b 8d 00 08 sw (sp+8),r13 8004344: 5b 9d 00 04 sw (sp+4),ra 8004348: b8 20 58 00 mv r11,r1
Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); char name [32]; printk("BLOWN STACK!!!\n");
800434c: 78 01 08 06 mvhi r1,0x806 8004350: 38 21 1c 6c ori r1,r1,0x1c6c
* * 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) {
8004354: 20 4d 00 ff andi r13,r2,0xff
Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack);
8004358: 29 6c 00 c8 lw r12,(r11+200)
char name [32]; printk("BLOWN STACK!!!\n");
800435c: f8 00 0c e1 calli 80076e0 <printk>
printk("task control block: 0x%08" PRIxPTR "\n", running);
8004360: 78 01 08 06 mvhi r1,0x806 8004364: 38 21 1c 7c ori r1,r1,0x1c7c 8004368: b9 60 10 00 mv r2,r11 800436c: f8 00 0c dd calli 80076e0 <printk>
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
8004370: 29 62 00 08 lw r2,(r11+8) 8004374: 78 01 08 06 mvhi r1,0x806 8004378: 38 21 1c 9c ori r1,r1,0x1c9c 800437c: f8 00 0c d9 calli 80076e0 <printk>
printk(
8004380: 29 62 00 0c lw r2,(r11+12) 8004384: 78 01 08 06 mvhi r1,0x806 8004388: 38 21 1c b0 ori r1,r1,0x1cb0 800438c: f8 00 0c d5 calli 80076e0 <printk>
"task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk(
8004390: 29 61 00 08 lw r1,(r11+8) 8004394: 37 83 00 14 addi r3,sp,20 8004398: 34 02 00 20 mvi r2,32 800439c: f8 00 10 3b calli 8008488 <rtems_object_get_name> 80043a0: b8 20 10 00 mv r2,r1 80043a4: 78 01 08 06 mvhi r1,0x806 80043a8: 38 21 1c c4 ori r1,r1,0x1cc4 80043ac: f8 00 0c cd calli 80076e0 <printk>
"task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk(
80043b0: 29 62 00 c4 lw r2,(r11+196) 80043b4: 29 63 00 c8 lw r3,(r11+200) 80043b8: 78 01 08 06 mvhi r1,0x806 80043bc: 38 21 1c dc ori r1,r1,0x1cdc 80043c0: b4 62 20 00 add r4,r3,r2 80043c4: f8 00 0c c7 calli 80076e0 <printk>
"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) {
80043c8: 5d a0 00 07 bne r13,r0,80043e4 <Stack_check_report_blown_task+0xb0><== NEVER TAKEN
printk(
80043cc: 78 01 08 06 mvhi r1,0x806 80043d0: 38 21 1d 10 ori r1,r1,0x1d10 80043d4: 35 84 00 18 addi r4,r12,24 80043d8: 34 02 00 10 mvi r2,16 80043dc: 35 83 00 08 addi r3,r12,8 80043e0: f8 00 0c c0 calli 80076e0 <printk>
rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81);
80043e4: 34 01 00 81 mvi r1,129 80043e8: f8 00 12 9e calli 8008e60 <rtems_fatal_error_occurred>
0800532c <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) {
800532c: 37 9c ff e4 addi sp,sp,-28 8005330: 5b 8b 00 1c sw (sp+28),r11 8005334: 5b 8c 00 18 sw (sp+24),r12 8005338: 5b 8d 00 14 sw (sp+20),r13 800533c: 5b 8e 00 10 sw (sp+16),r14 8005340: 5b 8f 00 0c sw (sp+12),r15 8005344: 5b 90 00 08 sw (sp+8),r16 8005348: 5b 9d 00 04 sw (sp+4),ra
ISR_Level level; Thread_Control *executing = _Thread_Executing;
800534c: 78 05 08 02 mvhi r5,0x802 8005350: 38 a5 19 38 ori r5,r5,0x1938 8005354: 28 ac 00 00 lw r12,(r5+0)
Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) {
8005358: b8 20 58 00 mv r11,r1 800535c: b8 40 78 00 mv r15,r2 8005360: b8 80 70 00 mv r14,r4 8005364: 20 70 00 ff andi r16,r3,0xff
* If unlocked, then OK to read. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level );
8005368: 90 00 68 00 rcsr r13,IE 800536c: 34 01 ff fe mvi r1,-2 8005370: a1 a1 08 00 and r1,r13,r1 8005374: d0 01 00 00 wcsr IE,r1
switch ( the_rwlock->current_state ) {
8005378: 29 61 00 44 lw r1,(r11+68)
800537c: 44 20 00 04 be r1,r0,800538c <_CORE_RWLock_Obtain_for_reading+0x60>
8005380: 34 02 00 01 mvi r2,1
8005384: 5c 22 00 12 bne r1,r2,80053cc <_CORE_RWLock_Obtain_for_reading+0xa0>
8005388: e0 00 00 08 bi 80053a8 <_CORE_RWLock_Obtain_for_reading+0x7c>
case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; the_rwlock->number_of_readers += 1;
800538c: 29 61 00 48 lw r1,(r11+72)
*/ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
8005390: 34 02 00 01 mvi r2,1 8005394: 59 62 00 44 sw (r11+68),r2
the_rwlock->number_of_readers += 1;
8005398: b4 22 08 00 add r1,r1,r2 800539c: 59 61 00 48 sw (r11+72),r1
_ISR_Enable( level );
80053a0: d0 0d 00 00 wcsr IE,r13 80053a4: e0 00 00 08 bi 80053c4 <_CORE_RWLock_Obtain_for_reading+0x98>
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; return; case CORE_RWLOCK_LOCKED_FOR_READING: { Thread_Control *waiter; waiter = _Thread_queue_First( &the_rwlock->Wait_queue );
80053a8: b9 60 08 00 mv r1,r11 80053ac: f8 00 08 27 calli 8007448 <_Thread_queue_First>
if ( !waiter ) {
80053b0: 5c 20 00 07 bne r1,r0,80053cc <_CORE_RWLock_Obtain_for_reading+0xa0><== NEVER TAKEN
the_rwlock->number_of_readers += 1;
80053b4: 29 61 00 48 lw r1,(r11+72) 80053b8: 34 21 00 01 addi r1,r1,1 80053bc: 59 61 00 48 sw (r11+72),r1
_ISR_Enable( level );
80053c0: d0 0d 00 00 wcsr IE,r13
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
80053c4: 34 01 00 00 mvi r1,0 80053c8: e0 00 00 05 bi 80053dc <_CORE_RWLock_Obtain_for_reading+0xb0>
/* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) {
80053cc: 34 01 00 00 mvi r1,0
80053d0: 5e 01 00 05 bne r16,r1,80053e4 <_CORE_RWLock_Obtain_for_reading+0xb8> _ISR_Enable( level );
80053d4: d0 0d 00 00 wcsr IE,r13
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
80053d8: 34 01 00 02 mvi r1,2 80053dc: 59 81 00 34 sw (r12+52),r1
return;
80053e0: e0 00 00 0d bi 8005414 <_CORE_RWLock_Obtain_for_reading+0xe8> 80053e4: 34 02 00 01 mvi r2,1
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
80053e8: 59 81 00 34 sw (r12+52),r1 80053ec: 59 62 00 30 sw (r11+48),r2
* We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id;
80053f0: 59 8f 00 20 sw (r12+32),r15
/* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue;
80053f4: 59 8b 00 44 sw (r12+68),r11
executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
80053f8: 59 81 00 30 sw (r12+48),r1
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level );
80053fc: d0 0d 00 00 wcsr IE,r13
_Thread_queue_Enqueue_with_handler(
8005400: 78 03 08 00 mvhi r3,0x800 8005404: b9 60 08 00 mv r1,r11 8005408: b9 c0 10 00 mv r2,r14 800540c: 38 63 55 c8 ori r3,r3,0x55c8 8005410: f8 00 07 1e calli 8007088 <_Thread_queue_Enqueue_with_handler>
timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ }
8005414: 2b 9d 00 04 lw ra,(sp+4) 8005418: 2b 8b 00 1c lw r11,(sp+28) 800541c: 2b 8c 00 18 lw r12,(sp+24) 8005420: 2b 8d 00 14 lw r13,(sp+20) 8005424: 2b 8e 00 10 lw r14,(sp+16) 8005428: 2b 8f 00 0c lw r15,(sp+12) 800542c: 2b 90 00 08 lw r16,(sp+8) 8005430: 37 9c 00 1c addi sp,sp,28 8005434: c3 a0 00 00 ret
080054cc <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) {
80054cc: 37 9c ff f4 addi sp,sp,-12 80054d0: 5b 8b 00 0c sw (sp+12),r11 80054d4: 5b 8c 00 08 sw (sp+8),r12 80054d8: 5b 9d 00 04 sw (sp+4),ra
ISR_Level level; Thread_Control *executing = _Thread_Executing;
80054dc: 78 02 08 02 mvhi r2,0x802 80054e0: 38 42 19 38 ori r2,r2,0x1938 80054e4: 28 43 00 00 lw r3,(r2+0)
*/ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) {
80054e8: b8 20 58 00 mv r11,r1
* Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level );
80054ec: 90 00 08 00 rcsr r1,IE 80054f0: 34 02 ff fe mvi r2,-2 80054f4: a0 22 10 00 and r2,r1,r2 80054f8: d0 02 00 00 wcsr IE,r2
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
80054fc: 29 62 00 44 lw r2,(r11+68)
8005500: 5c 40 00 05 bne r2,r0,8005514 <_CORE_RWLock_Release+0x48> _ISR_Enable( level );
8005504: d0 01 00 00 wcsr IE,r1
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
8005508: 34 01 00 02 mvi r1,2 800550c: 58 61 00 34 sw (r3+52),r1
return CORE_RWLOCK_SUCCESSFUL;
8005510: e0 00 00 28 bi 80055b0 <_CORE_RWLock_Release+0xe4>
} if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
8005514: 34 04 00 01 mvi r4,1
8005518: 5c 44 00 07 bne r2,r4,8005534 <_CORE_RWLock_Release+0x68> the_rwlock->number_of_readers -= 1;
800551c: 29 62 00 48 lw r2,(r11+72) 8005520: 34 42 ff ff addi r2,r2,-1 8005524: 59 62 00 48 sw (r11+72),r2
if ( the_rwlock->number_of_readers != 0 ) { 8005528: 44 40 00 03 be r2,r0,8005534 <_CORE_RWLock_Release+0x68> /* must be unlocked again */ _ISR_Enable( level );
800552c: d0 01 00 00 wcsr IE,r1
return CORE_RWLOCK_SUCCESSFUL;
8005530: e0 00 00 20 bi 80055b0 <_CORE_RWLock_Release+0xe4>
} } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
8005534: 34 02 00 00 mvi r2,0 8005538: 58 62 00 34 sw (r3+52),r2
/* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
800553c: 59 62 00 44 sw (r11+68),r2
_ISR_Enable( level );
8005540: d0 01 00 00 wcsr IE,r1
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
8005544: b9 60 08 00 mv r1,r11 8005548: f8 00 06 63 calli 8006ed4 <_Thread_queue_Dequeue>
if ( next ) { 800554c: 44 20 00 19 be r1,r0,80055b0 <_CORE_RWLock_Release+0xe4> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
8005550: 28 22 00 30 lw r2,(r1+48) 8005554: 34 01 00 01 mvi r1,1
8005558: 5c 41 00 04 bne r2,r1,8005568 <_CORE_RWLock_Release+0x9c> the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
800555c: 34 01 00 02 mvi r1,2 8005560: 59 61 00 44 sw (r11+68),r1
return CORE_RWLOCK_SUCCESSFUL;
8005564: e0 00 00 13 bi 80055b0 <_CORE_RWLock_Release+0xe4>
} /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1;
8005568: 29 62 00 48 lw r2,(r11+72)
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
800556c: 59 61 00 44 sw (r11+68),r1
* Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
8005570: b8 20 60 00 mv r12,r1
} /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1;
8005574: 34 42 00 01 addi r2,r2,1 8005578: 59 62 00 48 sw (r11+72),r2
/* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue );
800557c: b9 60 08 00 mv r1,r11 8005580: f8 00 07 b2 calli 8007448 <_Thread_queue_First> 8005584: b8 20 18 00 mv r3,r1
if ( !next || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; _Thread_queue_Extract( &the_rwlock->Wait_queue, next );
8005588: b8 20 10 00 mv r2,r1 800558c: b9 60 08 00 mv r1,r11
/* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || 8005590: 44 60 00 08 be r3,r0,80055b0 <_CORE_RWLock_Release+0xe4> next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
8005594: 28 63 00 30 lw r3,(r3+48)
8005598: 44 6c 00 06 be r3,r12,80055b0 <_CORE_RWLock_Release+0xe4> <== NEVER TAKEN
return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1;
800559c: 29 63 00 48 lw r3,(r11+72) 80055a0: 34 63 00 01 addi r3,r3,1 80055a4: 59 63 00 48 sw (r11+72),r3
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
80055a8: f8 00 07 60 calli 8007328 <_Thread_queue_Extract>
}
80055ac: e3 ff ff f4 bi 800557c <_CORE_RWLock_Release+0xb0>
} /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; }
80055b0: 34 01 00 00 mvi r1,0 80055b4: 2b 9d 00 04 lw ra,(sp+4) 80055b8: 2b 8b 00 0c lw r11,(sp+12) 80055bc: 2b 8c 00 08 lw r12,(sp+8) 80055c0: 37 9c 00 0c addi sp,sp,12 80055c4: c3 a0 00 00 ret
080055c8 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) {
80055c8: 37 9c ff f8 addi sp,sp,-8 80055cc: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location );
80055d0: 37 82 00 08 addi r2,sp,8 80055d4: f8 00 05 33 calli 8006aa0 <_Thread_Get>
switch ( location ) {
80055d8: 2b 82 00 08 lw r2,(sp+8)
80055dc: 5c 40 00 07 bne r2,r0,80055f8 <_CORE_RWLock_Timeout+0x30> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread );
80055e0: f8 00 07 d5 calli 8007534 <_Thread_queue_Process_timeout>
*/ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1;
80055e4: 78 01 08 02 mvhi r1,0x802 80055e8: 38 21 18 7c ori r1,r1,0x187c 80055ec: 28 22 00 00 lw r2,(r1+0) 80055f0: 34 42 ff ff addi r2,r2,-1 80055f4: 58 22 00 00 sw (r1+0),r2
_Thread_Unnest_dispatch(); break; } }
80055f8: 2b 9d 00 04 lw ra,(sp+4) 80055fc: 37 9c 00 08 addi sp,sp,8 8005600: c3 a0 00 00 ret
08014ecc <_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 ) {
8014ecc: 37 9c ff e4 addi sp,sp,-28 8014ed0: 5b 8b 00 1c sw (sp+28),r11 8014ed4: 5b 8c 00 18 sw (sp+24),r12 8014ed8: 5b 8d 00 14 sw (sp+20),r13 8014edc: 5b 8e 00 10 sw (sp+16),r14 8014ee0: 5b 8f 00 0c sw (sp+12),r15 8014ee4: 5b 90 00 08 sw (sp+8),r16 8014ee8: 5b 9d 00 04 sw (sp+4),ra 8014eec: b8 20 58 00 mv r11,r1
Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) {
8014ef0: 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 ) {
8014ef4: b8 60 70 00 mv r14,r3 8014ef8: b8 40 80 00 mv r16,r2 8014efc: b8 c0 78 00 mv r15,r6
Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) {
8014f00: 50 23 00 03 bgeu r1,r3,8014f0c <_CORE_message_queue_Broadcast+0x40><== ALWAYS TAKEN
8014f04: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8014f08: e0 00 00 13 bi 8014f54 <_CORE_message_queue_Broadcast+0x88><== NOT EXECUTED
* NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) {
8014f0c: 29 63 00 48 lw r3,(r11+72) 8014f10: 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))) {
8014f14: b8 60 68 00 mv r13,r3
* NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 8014f18: 44 61 00 08 be r3,r1,8014f38 <_CORE_message_queue_Broadcast+0x6c> *count = 0;
8014f1c: 58 c1 00 00 sw (r6+0),r1
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
8014f20: e0 00 00 0d bi 8014f54 <_CORE_message_queue_Broadcast+0x88>
const void *source, void *destination, size_t size ) { memcpy(destination, source, size);
8014f24: 29 81 00 2c lw r1,(r12+44)
*/ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1;
8014f28: 35 ad 00 01 addi r13,r13,1 8014f2c: f8 00 2c 6e calli 80200e4 <memcpy>
buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size;
8014f30: 29 81 00 28 lw r1,(r12+40) 8014f34: 58 2e 00 00 sw (r1+0),r14
* There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
8014f38: b9 60 08 00 mv r1,r11 8014f3c: f8 00 0c 27 calli 8017fd8 <_Thread_queue_Dequeue> 8014f40: b8 20 60 00 mv r12,r1 8014f44: ba 00 10 00 mv r2,r16 8014f48: b9 c0 18 00 mv r3,r14
/* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 8014f4c: 5c 20 ff f6 bne r1,r0,8014f24 <_CORE_message_queue_Broadcast+0x58> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted;
8014f50: 59 ed 00 00 sw (r15+0),r13
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; }
8014f54: 2b 9d 00 04 lw ra,(sp+4) 8014f58: 2b 8b 00 1c lw r11,(sp+28) 8014f5c: 2b 8c 00 18 lw r12,(sp+24) 8014f60: 2b 8d 00 14 lw r13,(sp+20) 8014f64: 2b 8e 00 10 lw r14,(sp+16) 8014f68: 2b 8f 00 0c lw r15,(sp+12) 8014f6c: 2b 90 00 08 lw r16,(sp+8) 8014f70: 37 9c 00 1c addi sp,sp,28 8014f74: c3 a0 00 00 ret
0800d738 <_CORE_message_queue_Initialize>: CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) {
800d738: 37 9c ff e8 addi sp,sp,-24 800d73c: 5b 8b 00 18 sw (sp+24),r11 800d740: 5b 8c 00 14 sw (sp+20),r12 800d744: 5b 8d 00 10 sw (sp+16),r13 800d748: 5b 8e 00 0c sw (sp+12),r14 800d74c: 5b 8f 00 08 sw (sp+8),r15 800d750: 5b 9d 00 04 sw (sp+4),ra 800d754: b8 20 58 00 mv r11,r1
size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0;
800d758: 34 01 00 00 mvi r1,0
CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; the_message_queue->notify_argument = the_argument;
800d75c: 59 61 00 64 sw (r11+100),r1 800d760: 59 61 00 48 sw (r11+72),r1
CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler;
800d764: 59 61 00 60 sw (r11+96),r1
) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages;
800d768: 59 63 00 44 sw (r11+68),r3
the_message_queue->number_of_pending_messages = 0; the_message_queue->maximum_message_size = maximum_message_size;
800d76c: 59 64 00 4c sw (r11+76),r4
/* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) {
800d770: 20 81 00 03 andi r1,r4,0x3
CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) {
800d774: b8 60 68 00 mv r13,r3 800d778: b8 40 78 00 mv r15,r2
/* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) {
800d77c: b8 80 60 00 mv r12,r4
800d780: 44 20 00 05 be r1,r0,800d794 <_CORE_message_queue_Initialize+0x5c> allocated_message_size += sizeof(uint32_t);
800d784: 34 8c 00 04 addi r12,r4,4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
800d788: 34 01 ff fc mvi r1,-4 800d78c: a1 81 60 00 and r12,r12,r1
} if (allocated_message_size < maximum_message_size)
800d790: 54 8c 00 1c bgu r4,r12,800d800 <_CORE_message_queue_Initialize+0xc8><== NEVER TAKEN
/* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
800d794: 35 8e 00 14 addi r14,r12,20
/* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages *
800d798: b9 c0 08 00 mv r1,r14 800d79c: b9 a0 10 00 mv r2,r13 800d7a0: f8 00 6a 94 calli 80281f0 <__mulsi3>
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size)
800d7a4: 55 81 00 17 bgu r12,r1,800d800 <_CORE_message_queue_Initialize+0xc8><== NEVER TAKEN
return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
800d7a8: f8 00 0d f7 calli 8010f84 <_Workspace_Allocate> 800d7ac: 59 61 00 5c sw (r11+92),r1
_Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 800d7b0: 44 20 00 14 be r1,r0,800d800 <_CORE_message_queue_Initialize+0xc8> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize (
800d7b4: b8 20 10 00 mv r2,r1 800d7b8: b9 a0 18 00 mv r3,r13 800d7bc: b9 c0 20 00 mv r4,r14 800d7c0: 35 61 00 68 addi r1,r11,104 800d7c4: f8 00 18 89 calli 80139e8 <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize(
800d7c8: 29 e2 00 00 lw r2,(r15+0)
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
800d7cc: 35 63 00 54 addi r3,r11,84
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
800d7d0: 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);
800d7d4: 59 63 00 50 sw (r11+80),r3 800d7d8: 64 42 00 01 cmpei r2,r2,1
the_chain->permanent_null = NULL;
800d7dc: 34 03 00 00 mvi r3,0 800d7e0: 59 63 00 54 sw (r11+84),r3
the_chain->last = _Chain_Head(the_chain);
800d7e4: 59 61 00 58 sw (r11+88),r1 800d7e8: 34 03 00 80 mvi r3,128 800d7ec: b9 60 08 00 mv r1,r11 800d7f0: 34 04 00 06 mvi r4,6 800d7f4: f8 00 0a 6d calli 80101a8 <_Thread_queue_Initialize> 800d7f8: 34 01 00 01 mvi r1,1
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true;
800d7fc: e0 00 00 02 bi 800d804 <_CORE_message_queue_Initialize+0xcc> 800d800: 34 01 00 00 mvi r1,0
}
800d804: 2b 9d 00 04 lw ra,(sp+4) 800d808: 2b 8b 00 18 lw r11,(sp+24) 800d80c: 2b 8c 00 14 lw r12,(sp+20) 800d810: 2b 8d 00 10 lw r13,(sp+16) 800d814: 2b 8e 00 0c lw r14,(sp+12) 800d818: 2b 8f 00 08 lw r15,(sp+8) 800d81c: 37 9c 00 18 addi sp,sp,24 800d820: c3 a0 00 00 ret
0800d824 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) {
800d824: 37 9c ff f0 addi sp,sp,-16 800d828: 5b 8b 00 10 sw (sp+16),r11 800d82c: 5b 8c 00 0c sw (sp+12),r12 800d830: 5b 8d 00 08 sw (sp+8),r13 800d834: 5b 9d 00 04 sw (sp+4),ra
ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing;
800d838: 78 07 08 02 mvhi r7,0x802 800d83c: 38 e7 ca f8 ori r7,r7,0xcaf8 800d840: 28 e7 00 00 lw r7,(r7+0)
void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) {
800d844: b8 20 58 00 mv r11,r1
ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
800d848: 34 01 00 00 mvi r1,0 800d84c: 58 e1 00 34 sw (r7+52),r1
void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) {
800d850: 20 a5 00 ff andi r5,r5,0xff 800d854: b8 60 08 00 mv r1,r3
CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level );
800d858: 90 00 40 00 rcsr r8,IE 800d85c: 34 03 ff fe mvi r3,-2 800d860: a1 03 18 00 and r3,r8,r3 800d864: 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));
800d868: 29 6c 00 50 lw r12,(r11+80)
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
800d86c: 35 63 00 54 addi r3,r11,84
800d870: 5d 83 00 03 bne r12,r3,800d87c <_CORE_message_queue_Seize+0x58>
800d874: 34 0c 00 00 mvi r12,0 800d878: e0 00 00 28 bi 800d918 <_CORE_message_queue_Seize+0xf4>
{ Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next;
800d87c: 29 83 00 00 lw r3,(r12+0)
the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain);
800d880: 35 69 00 50 addi r9,r11,80
Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first;
800d884: 59 63 00 50 sw (r11+80),r3
new_first->previous = _Chain_Head(the_chain);
800d888: 58 69 00 04 sw (r3+4),r9
the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) {
800d88c: 45 80 00 23 be r12,r0,800d918 <_CORE_message_queue_Seize+0xf4><== NEVER TAKEN
the_message_queue->number_of_pending_messages -= 1;
800d890: 29 62 00 48 lw r2,(r11+72) 800d894: 34 42 ff ff addi r2,r2,-1 800d898: 59 62 00 48 sw (r11+72),r2
_ISR_Enable( level );
800d89c: d0 08 00 00 wcsr IE,r8
*size_p = the_message->Contents.size;
800d8a0: 29 83 00 0c lw r3,(r12+12)
_Thread_Executing->Wait.count =
800d8a4: 78 02 08 02 mvhi r2,0x802 800d8a8: 38 42 ca f8 ori r2,r2,0xcaf8
the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size;
800d8ac: 58 83 00 00 sw (r4+0),r3
_Thread_Executing->Wait.count =
800d8b0: 29 84 00 08 lw r4,(r12+8) 800d8b4: 28 42 00 00 lw r2,(r2+0)
_CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer,
800d8b8: 35 8d 00 10 addi r13,r12,16
if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; _Thread_Executing->Wait.count =
800d8bc: 58 44 00 24 sw (r2+36),r4
const void *source, void *destination, size_t size ) { memcpy(destination, source, size);
800d8c0: b9 a0 10 00 mv r2,r13 800d8c4: f8 00 28 1a calli 801792c <memcpy>
* is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
800d8c8: b9 60 08 00 mv r1,r11 800d8cc: f8 00 09 02 calli 800fcd4 <_Thread_queue_Dequeue> 800d8d0: b8 20 20 00 mv r4,r1
if ( !the_thread ) { 800d8d4: 5c 20 00 05 bne r1,r0,800d8e8 <_CORE_message_queue_Seize+0xc4> RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
800d8d8: 35 61 00 68 addi r1,r11,104 800d8dc: b9 80 10 00 mv r2,r12 800d8e0: fb ff ff 66 calli 800d678 <_Chain_Append>
_CORE_message_queue_Free_message_buffer( the_message_queue, the_message ); return;
800d8e4: e0 00 00 1e bi 800d95c <_CORE_message_queue_Seize+0x138>
*/ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option;
800d8e8: 28 23 00 30 lw r3,(r1+48)
CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority;
800d8ec: 28 21 00 24 lw r1,(r1+36) 800d8f0: 59 83 00 0c sw (r12+12),r3 800d8f4: 59 81 00 08 sw (r12+8),r1
const void *source, void *destination, size_t size ) { memcpy(destination, source, size);
800d8f8: 28 82 00 2c lw r2,(r4+44) 800d8fc: b9 a0 08 00 mv r1,r13 800d900: f8 00 28 0b calli 801792c <memcpy>
the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message(
800d904: 29 83 00 08 lw r3,(r12+8) 800d908: b9 60 08 00 mv r1,r11 800d90c: b9 80 10 00 mv r2,r12 800d910: f8 00 18 44 calli 8013a20 <_CORE_message_queue_Insert_message>
the_message_queue, the_message, _CORE_message_queue_Get_message_priority( the_message ) ); return;
800d914: e0 00 00 12 bi 800d95c <_CORE_message_queue_Seize+0x138>
} #endif } if ( !wait ) { 800d918: 5c ac 00 05 bne r5,r12,800d92c <_CORE_message_queue_Seize+0x108> _ISR_Enable( level );
800d91c: d0 08 00 00 wcsr IE,r8
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
800d920: 34 01 00 04 mvi r1,4 800d924: 58 e1 00 34 sw (r7+52),r1
return;
800d928: e0 00 00 0d bi 800d95c <_CORE_message_queue_Seize+0x138>
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;
800d92c: 34 03 00 01 mvi r3,1 800d930: 59 63 00 30 sw (r11+48),r3
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p;
800d934: 58 e4 00 28 sw (r7+40),r4
return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id;
800d938: 58 e2 00 20 sw (r7+32),r2
executing->Wait.return_argument_second.mutable_object = buffer;
800d93c: 58 e1 00 2c sw (r7+44),r1
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue;
800d940: 58 eb 00 44 sw (r7+68),r11
executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level );
800d944: d0 08 00 00 wcsr IE,r8
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
800d948: 78 03 08 01 mvhi r3,0x801 800d94c: b9 60 08 00 mv r1,r11 800d950: b8 c0 10 00 mv r2,r6 800d954: 38 63 02 88 ori r3,r3,0x288 800d958: f8 00 09 4c calli 800fe88 <_Thread_queue_Enqueue_with_handler>
}
800d95c: 2b 9d 00 04 lw ra,(sp+4) 800d960: 2b 8b 00 10 lw r11,(sp+16) 800d964: 2b 8c 00 0c lw r12,(sp+12) 800d968: 2b 8d 00 08 lw r13,(sp+8) 800d96c: 37 9c 00 10 addi sp,sp,16 800d970: c3 a0 00 00 ret
08002c44 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) {
8002c44: 37 9c ff e8 addi sp,sp,-24 8002c48: 5b 8b 00 14 sw (sp+20),r11 8002c4c: 5b 8c 00 10 sw (sp+16),r12 8002c50: 5b 8d 00 0c sw (sp+12),r13 8002c54: 5b 8e 00 08 sw (sp+8),r14 8002c58: 5b 9d 00 04 sw (sp+4),ra
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
8002c5c: 78 06 08 01 mvhi r6,0x801 8002c60: 38 c6 d8 a4 ori r6,r6,0xd8a4 8002c64: 28 c6 00 00 lw r6,(r6+0)
Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) {
8002c68: 5b 85 00 18 sw (sp+24),r5 8002c6c: b8 20 58 00 mv r11,r1 8002c70: b8 40 70 00 mv r14,r2 8002c74: b8 80 68 00 mv r13,r4 8002c78: 20 6c 00 ff andi r12,r3,0xff
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 8002c7c: 44 c0 00 0b be r6,r0,8002ca8 <_CORE_mutex_Seize+0x64>
8002c80: 45 80 00 0a be r12,r0,8002ca8 <_CORE_mutex_Seize+0x64> <== NEVER TAKEN
8002c84: 78 01 08 01 mvhi r1,0x801 8002c88: 38 21 da 40 ori r1,r1,0xda40 8002c8c: 28 21 00 00 lw r1,(r1+0) 8002c90: 34 02 00 01 mvi r2,1
8002c94: 50 41 00 05 bgeu r2,r1,8002ca8 <_CORE_mutex_Seize+0x64>
8002c98: 34 01 00 00 mvi r1,0 8002c9c: b8 20 10 00 mv r2,r1 8002ca0: 34 03 00 13 mvi r3,19 8002ca4: f8 00 01 d4 calli 80033f4 <_Internal_error_Occurred> 8002ca8: b9 60 08 00 mv r1,r11 8002cac: 37 82 00 18 addi r2,sp,24 8002cb0: f8 00 17 77 calli 8008a8c <_CORE_mutex_Seize_interrupt_trylock>
8002cb4: 44 20 00 19 be r1,r0,8002d18 <_CORE_mutex_Seize+0xd4>
8002cb8: 78 01 08 01 mvhi r1,0x801 8002cbc: 38 21 d9 60 ori r1,r1,0xd960
8002cc0: 5d 80 00 07 bne r12,r0,8002cdc <_CORE_mutex_Seize+0x98>
8002cc4: 2b 82 00 18 lw r2,(sp+24) 8002cc8: d0 02 00 00 wcsr IE,r2 8002ccc: 28 21 00 00 lw r1,(r1+0) 8002cd0: 34 02 00 01 mvi r2,1 8002cd4: 58 22 00 34 sw (r1+52),r2 8002cd8: e0 00 00 10 bi 8002d18 <_CORE_mutex_Seize+0xd4> 8002cdc: 28 23 00 00 lw r3,(r1+0) 8002ce0: 78 01 08 01 mvhi r1,0x801 8002ce4: 38 21 d8 a4 ori r1,r1,0xd8a4 8002ce8: 58 6e 00 20 sw (r3+32),r14 8002cec: 28 22 00 00 lw r2,(r1+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;
8002cf0: 34 04 00 01 mvi r4,1 8002cf4: 59 64 00 30 sw (r11+48),r4 8002cf8: b4 44 10 00 add r2,r2,r4 8002cfc: 58 22 00 00 sw (r1+0),r2 8002d00: 58 6b 00 44 sw (r3+68),r11 8002d04: 2b 81 00 18 lw r1,(sp+24) 8002d08: d0 01 00 00 wcsr IE,r1 8002d0c: b9 60 08 00 mv r1,r11 8002d10: b9 a0 10 00 mv r2,r13 8002d14: fb ff ff ab calli 8002bc0 <_CORE_mutex_Seize_interrupt_blocking>
}
8002d18: 2b 9d 00 04 lw ra,(sp+4) 8002d1c: 2b 8b 00 14 lw r11,(sp+20) 8002d20: 2b 8c 00 10 lw r12,(sp+16) 8002d24: 2b 8d 00 0c lw r13,(sp+12) 8002d28: 2b 8e 00 08 lw r14,(sp+8) 8002d2c: 37 9c 00 18 addi sp,sp,24 8002d30: c3 a0 00 00 ret
08008bf0 <_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 ) {
8008bf0: 37 9c ff f8 addi sp,sp,-8 8008bf4: 5b 8b 00 08 sw (sp+8),r11 8008bf8: 5b 9d 00 04 sw (sp+4),ra 8008bfc: 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)) ) {
8008c00: fb ff ee d7 calli 800475c <_Thread_queue_Dequeue> 8008c04: 34 02 00 00 mvi r2,0
8008c08: 5c 22 00 0e bne r1,r2,8008c40 <_CORE_semaphore_Surrender+0x50> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level );
8008c0c: 90 00 08 00 rcsr r1,IE 8008c10: 34 02 ff fe mvi r2,-2 8008c14: a0 22 10 00 and r2,r1,r2 8008c18: d0 02 00 00 wcsr IE,r2
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
8008c1c: 29 62 00 48 lw r2,(r11+72) 8008c20: 29 63 00 40 lw r3,(r11+64)
8008c24: 54 62 00 03 bgu r3,r2,8008c30 <_CORE_semaphore_Surrender+0x40><== ALWAYS TAKEN
8008c28: 34 02 00 04 mvi r2,4 <== NOT EXECUTED 8008c2c: e0 00 00 04 bi 8008c3c <_CORE_semaphore_Surrender+0x4c> <== NOT EXECUTED
the_semaphore->count += 1;
8008c30: 34 42 00 01 addi r2,r2,1 8008c34: 59 62 00 48 sw (r11+72),r2 8008c38: 34 02 00 00 mvi r2,0
else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level );
8008c3c: d0 01 00 00 wcsr IE,r1
} return status; }
8008c40: b8 40 08 00 mv r1,r2 8008c44: 2b 9d 00 04 lw ra,(sp+4) 8008c48: 2b 8b 00 08 lw r11,(sp+8) 8008c4c: 37 9c 00 08 addi sp,sp,8 8008c50: c3 a0 00 00 ret
0800e0ec <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) {
800e0ec: 37 9c ff f8 addi sp,sp,-8 800e0f0: 5b 8b 00 08 sw (sp+8),r11 800e0f4: 5b 9d 00 04 sw (sp+4),ra
rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing;
800e0f8: 78 05 08 02 mvhi r5,0x802 800e0fc: 38 a5 4a 00 ori r5,r5,0x4a00 800e100: 28 ab 00 00 lw r11,(r5+0)
executing->Wait.return_code = RTEMS_SUCCESSFUL;
800e104: 34 05 00 00 mvi r5,0 800e108: 59 65 00 34 sw (r11+52),r5
api = executing->API_Extensions[ THREAD_API_RTEMS ];
800e10c: 29 67 01 28 lw r7,(r11+296)
_ISR_Disable( level );
800e110: 90 00 30 00 rcsr r6,IE 800e114: 34 05 ff fe mvi r5,-2 800e118: a0 c5 28 00 and r5,r6,r5 800e11c: d0 05 00 00 wcsr IE,r5
pending_events = api->pending_events;
800e120: 28 e8 00 00 lw r8,(r7+0)
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition );
800e124: a0 28 28 00 and r5,r1,r8
seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 800e128: 44 a0 00 09 be r5,r0,800e14c <_Event_Seize+0x60> 800e12c: 44 a1 00 03 be r5,r1,800e138 <_Event_Seize+0x4c>
800e130: 20 49 00 02 andi r9,r2,0x2
800e134: 45 20 00 06 be r9,r0,800e14c <_Event_Seize+0x60> <== NEVER TAKEN
(seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events =
800e138: a4 a0 08 00 not r1,r5 800e13c: a0 28 40 00 and r8,r1,r8 800e140: 58 e8 00 00 sw (r7+0),r8
_Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level );
800e144: d0 06 00 00 wcsr IE,r6 800e148: e0 00 00 06 bi 800e160 <_Event_Seize+0x74>
*event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) {
800e14c: 20 47 00 01 andi r7,r2,0x1
800e150: 44 e0 00 06 be r7,r0,800e168 <_Event_Seize+0x7c> _ISR_Enable( level );
800e154: d0 06 00 00 wcsr IE,r6
executing->Wait.return_code = RTEMS_UNSATISFIED;
800e158: 34 01 00 0d mvi r1,13 800e15c: 59 61 00 34 sw (r11+52),r1
*event_out = seized_events;
800e160: 58 85 00 00 sw (r4+0),r5
return;
800e164: e0 00 00 29 bi 800e208 <_Event_Seize+0x11c>
*/ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
800e168: 78 05 08 02 mvhi r5,0x802 800e16c: 38 a5 52 ec ori r5,r5,0x52ec 800e170: 34 07 00 01 mvi r7,1 800e174: 58 a7 00 00 sw (r5+0),r7
* set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set;
800e178: 59 62 00 30 sw (r11+48),r2
executing->Wait.count = (uint32_t) event_in;
800e17c: 59 61 00 24 sw (r11+36),r1
executing->Wait.return_argument = event_out;
800e180: 59 64 00 28 sw (r11+40),r4
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level );
800e184: d0 06 00 00 wcsr IE,r6
if ( ticks ) {
800e188: 34 04 00 00 mvi r4,0
800e18c: 44 64 00 0d be r3,r4,800e1c0 <_Event_Seize+0xd4> _Watchdog_Initialize(
800e190: 29 65 00 08 lw r5,(r11+8)
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
800e194: 78 02 08 00 mvhi r2,0x800 800e198: 38 42 e3 d4 ori r2,r2,0xe3d4
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
800e19c: 78 01 08 02 mvhi r1,0x802
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
800e1a0: 59 62 00 64 sw (r11+100),r2
the_watchdog->id = id;
800e1a4: 59 65 00 68 sw (r11+104),r5
the_watchdog->user_data = user_data;
800e1a8: 59 64 00 6c sw (r11+108),r4
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
800e1ac: 59 63 00 54 sw (r11+84),r3
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
800e1b0: 59 64 00 50 sw (r11+80),r4
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
800e1b4: 38 21 4a 20 ori r1,r1,0x4a20 800e1b8: 35 62 00 48 addi r2,r11,72 800e1bc: fb ff e6 29 calli 8007a60 <_Watchdog_Insert>
NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
800e1c0: b9 60 08 00 mv r1,r11 800e1c4: 34 02 01 00 mvi r2,256 800e1c8: fb ff e4 32 calli 8007290 <_Thread_Set_state>
_ISR_Disable( level );
800e1cc: 90 00 18 00 rcsr r3,IE 800e1d0: 34 01 ff fe mvi r1,-2 800e1d4: a0 61 08 00 and r1,r3,r1 800e1d8: d0 01 00 00 wcsr IE,r1
sync_state = _Event_Sync_state;
800e1dc: 78 02 08 02 mvhi r2,0x802 800e1e0: 38 42 52 ec ori r2,r2,0x52ec 800e1e4: 28 41 00 00 lw r1,(r2+0)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
800e1e8: 34 04 00 00 mvi r4,0 800e1ec: 58 44 00 00 sw (r2+0),r4
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
800e1f0: 34 02 00 01 mvi r2,1
800e1f4: 5c 22 00 03 bne r1,r2,800e200 <_Event_Seize+0x114> _ISR_Enable( level );
800e1f8: d0 03 00 00 wcsr IE,r3
return;
800e1fc: e0 00 00 03 bi 800e208 <_Event_Seize+0x11c>
* An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level );
800e200: b9 60 10 00 mv r2,r11 800e204: f8 00 05 b5 calli 800f8d8 <_Thread_blocking_operation_Cancel>
}
800e208: 2b 9d 00 04 lw ra,(sp+4) 800e20c: 2b 8b 00 08 lw r11,(sp+8) 800e210: 37 9c 00 08 addi sp,sp,8 800e214: c3 a0 00 00 ret
0800e280 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) {
800e280: 37 9c ff f8 addi sp,sp,-8 800e284: 5b 8b 00 08 sw (sp+8),r11 800e288: 5b 9d 00 04 sw (sp+4),ra
rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
800e28c: 28 24 01 28 lw r4,(r1+296)
option_set = (rtems_option) the_thread->Wait.option;
800e290: 28 28 00 30 lw r8,(r1+48)
*/ void _Event_Surrender( Thread_Control *the_thread ) {
800e294: b8 20 58 00 mv r11,r1
api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level );
800e298: 90 00 08 00 rcsr r1,IE 800e29c: 34 07 ff fe mvi r7,-2 800e2a0: a0 27 38 00 and r7,r1,r7 800e2a4: d0 07 00 00 wcsr IE,r7
pending_events = api->pending_events;
800e2a8: 28 85 00 00 lw r5,(r4+0)
event_condition = (rtems_event_set) the_thread->Wait.count;
800e2ac: 29 66 00 24 lw r6,(r11+36)
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition );
800e2b0: a0 c5 10 00 and r2,r6,r5
seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 800e2b4: 5c 40 00 03 bne r2,r0,800e2c0 <_Event_Surrender+0x40> _ISR_Enable( level );
800e2b8: d0 01 00 00 wcsr IE,r1
return;
800e2bc: e0 00 00 42 bi 800e3c4 <_Event_Surrender+0x144>
/* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() &&
800e2c0: 78 03 08 02 mvhi r3,0x802 800e2c4: 38 63 49 dc ori r3,r3,0x49dc 800e2c8: 28 63 00 00 lw r3,(r3+0)
800e2cc: 44 60 00 1d be r3,r0,800e340 <_Event_Surrender+0xc0>
800e2d0: 78 03 08 02 mvhi r3,0x802 800e2d4: 38 63 4a 00 ori r3,r3,0x4a00 800e2d8: 28 63 00 00 lw r3,(r3+0)
800e2dc: 5d 63 00 19 bne r11,r3,800e340 <_Event_Surrender+0xc0> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
800e2e0: 78 03 08 02 mvhi r3,0x802 800e2e4: 38 63 52 ec ori r3,r3,0x52ec 800e2e8: 28 6a 00 00 lw r10,(r3+0)
/* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() &&
800e2ec: 34 09 00 02 mvi r9,2
800e2f0: 45 49 00 04 be r10,r9,800e300 <_Event_Surrender+0x80> <== NEVER TAKEN
_Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
800e2f4: 28 69 00 00 lw r9,(r3+0)
/* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() &&
800e2f8: 34 03 00 01 mvi r3,1
800e2fc: 5d 23 00 11 bne r9,r3,800e340 <_Event_Surrender+0xc0> <== NEVER TAKEN
_Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
800e300: 44 46 00 03 be r2,r6,800e30c <_Event_Surrender+0x8c> <== ALWAYS TAKEN
800e304: 21 08 00 02 andi r8,r8,0x2 <== NOT EXECUTED 800e308: 45 00 00 0c be r8,r0,800e338 <_Event_Surrender+0xb8> <== NOT EXECUTED
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
800e30c: a4 40 18 00 not r3,r2 800e310: a0 65 28 00 and r5,r3,r5
the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800e314: 29 66 00 28 lw r6,(r11+40)
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events );
800e318: 58 85 00 00 sw (r4+0),r5
the_thread->Wait.count = 0;
800e31c: 34 04 00 00 mvi r4,0
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
800e320: 78 03 08 02 mvhi r3,0x802
_Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0;
800e324: 59 64 00 24 sw (r11+36),r4
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
800e328: 38 63 52 ec ori r3,r3,0x52ec
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800e32c: 58 c2 00 00 sw (r6+0),r2
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
800e330: 34 02 00 03 mvi r2,3 800e334: 58 62 00 00 sw (r3+0),r2
} _ISR_Enable( level );
800e338: d0 01 00 00 wcsr IE,r1
return;
800e33c: e0 00 00 22 bi 800e3c4 <_Event_Surrender+0x144>
} /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
800e340: 29 63 00 10 lw r3,(r11+16) 800e344: 20 63 01 00 andi r3,r3,0x100
800e348: 44 60 00 1e be r3,r0,800e3c0 <_Event_Surrender+0x140> <== NEVER TAKEN
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 800e34c: 44 46 00 03 be r2,r6,800e358 <_Event_Surrender+0xd8>
800e350: 21 08 00 02 andi r8,r8,0x2
800e354: 45 00 00 1b be r8,r0,800e3c0 <_Event_Surrender+0x140> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
800e358: a4 40 18 00 not r3,r2 800e35c: a0 65 28 00 and r5,r3,r5
the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800e360: 29 66 00 28 lw r6,(r11+40)
/* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events );
800e364: 58 85 00 00 sw (r4+0),r5
the_thread->Wait.count = 0;
800e368: 34 03 00 00 mvi r3,0 800e36c: 59 63 00 24 sw (r11+36),r3
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800e370: 58 c2 00 00 sw (r6+0),r2
_ISR_Flash( level );
800e374: d0 01 00 00 wcsr IE,r1 800e378: d0 07 00 00 wcsr IE,r7
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
800e37c: 29 63 00 50 lw r3,(r11+80) 800e380: 34 02 00 02 mvi r2,2
800e384: 44 62 00 05 be r3,r2,800e398 <_Event_Surrender+0x118> _ISR_Enable( level );
800e388: d0 01 00 00 wcsr IE,r1
RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED );
800e38c: 78 02 10 03 mvhi r2,0x1003 800e390: b9 60 08 00 mv r1,r11 800e394: e0 00 00 08 bi 800e3b4 <_Event_Surrender+0x134>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT;
800e398: 34 02 00 03 mvi r2,3 800e39c: 59 62 00 50 sw (r11+80),r2
_Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level );
800e3a0: d0 01 00 00 wcsr IE,r1
(void) _Watchdog_Remove( &the_thread->Timer );
800e3a4: 35 61 00 48 addi r1,r11,72 800e3a8: fb ff e6 0d calli 8007bdc <_Watchdog_Remove> 800e3ac: b9 60 08 00 mv r1,r11 800e3b0: 78 02 10 03 mvhi r2,0x1003 800e3b4: 38 42 ff f8 ori r2,r2,0xfff8 800e3b8: f8 00 05 60 calli 800f938 <_Thread_Clear_state> 800e3bc: e0 00 00 02 bi 800e3c4 <_Event_Surrender+0x144>
_Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level );
800e3c0: d0 01 00 00 wcsr IE,r1
}
800e3c4: 2b 9d 00 04 lw ra,(sp+4) 800e3c8: 2b 8b 00 08 lw r11,(sp+8) 800e3cc: 37 9c 00 08 addi sp,sp,8 800e3d0: c3 a0 00 00 ret
0800e3d4 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) {
800e3d4: 37 9c ff f8 addi sp,sp,-8 800e3d8: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location );
800e3dc: 37 82 00 08 addi r2,sp,8 800e3e0: fb ff e1 05 calli 80067f4 <_Thread_Get>
switch ( location ) {
800e3e4: 2b 82 00 08 lw r2,(sp+8)
800e3e8: 5c 40 00 1d bne r2,r0,800e45c <_Event_Timeout+0x88> <== NEVER TAKEN
* * 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 );
800e3ec: 90 00 18 00 rcsr r3,IE 800e3f0: 34 02 ff fe mvi r2,-2 800e3f4: a0 62 10 00 and r2,r3,r2 800e3f8: d0 02 00 00 wcsr IE,r2
return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) {
800e3fc: 78 02 08 02 mvhi r2,0x802 800e400: 38 42 4a 00 ori r2,r2,0x4a00 800e404: 28 42 00 00 lw r2,(r2+0)
_ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0;
800e408: 34 04 00 00 mvi r4,0 800e40c: 58 24 00 24 sw (r1+36),r4
if ( _Thread_Is_executing( the_thread ) ) {
800e410: 5c 22 00 08 bne r1,r2,800e430 <_Event_Timeout+0x5c> <== ALWAYS TAKEN
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
800e414: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 800e418: 38 42 52 ec ori r2,r2,0x52ec <== NOT EXECUTED 800e41c: 28 45 00 00 lw r5,(r2+0) <== NOT EXECUTED 800e420: 34 04 00 01 mvi r4,1 <== NOT EXECUTED 800e424: 5c a4 00 03 bne r5,r4,800e430 <_Event_Timeout+0x5c> <== NOT EXECUTED
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
800e428: 34 04 00 02 mvi r4,2 <== NOT EXECUTED 800e42c: 58 44 00 00 sw (r2+0),r4 <== NOT EXECUTED
} the_thread->Wait.return_code = RTEMS_TIMEOUT;
800e430: 34 02 00 06 mvi r2,6 800e434: 58 22 00 34 sw (r1+52),r2
_ISR_Enable( level );
800e438: d0 03 00 00 wcsr IE,r3 800e43c: 78 02 10 03 mvhi r2,0x1003 800e440: 38 42 ff f8 ori r2,r2,0xfff8 800e444: f8 00 05 3d calli 800f938 <_Thread_Clear_state>
*/ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1;
800e448: 78 01 08 02 mvhi r1,0x802 800e44c: 38 21 49 44 ori r1,r1,0x4944 800e450: 28 22 00 00 lw r2,(r1+0) 800e454: 34 42 ff ff addi r2,r2,-1 800e458: 58 22 00 00 sw (r1+0),r2
case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } }
800e45c: 2b 9d 00 04 lw ra,(sp+4) 800e460: 37 9c 00 08 addi sp,sp,8 800e464: c3 a0 00 00 ret
08008d84 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) {
8008d84: 37 9c ff b4 addi sp,sp,-76 8008d88: 5b 8b 00 44 sw (sp+68),r11 8008d8c: 5b 8c 00 40 sw (sp+64),r12 8008d90: 5b 8d 00 3c sw (sp+60),r13 8008d94: 5b 8e 00 38 sw (sp+56),r14 8008d98: 5b 8f 00 34 sw (sp+52),r15 8008d9c: 5b 90 00 30 sw (sp+48),r16 8008da0: 5b 91 00 2c sw (sp+44),r17 8008da4: 5b 92 00 28 sw (sp+40),r18 8008da8: 5b 93 00 24 sw (sp+36),r19 8008dac: 5b 94 00 20 sw (sp+32),r20 8008db0: 5b 95 00 1c sw (sp+28),r21 8008db4: 5b 96 00 18 sw (sp+24),r22 8008db8: 5b 97 00 14 sw (sp+20),r23 8008dbc: 5b 98 00 10 sw (sp+16),r24 8008dc0: 5b 99 00 0c sw (sp+12),r25 8008dc4: 5b 9b 00 08 sw (sp+8),fp 8008dc8: 5b 9d 00 04 sw (sp+4),ra
Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET;
8008dcc: 34 55 00 04 addi r21,r2,4
Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) {
8008dd0: b8 40 68 00 mv r13,r2 8008dd4: b8 20 60 00 mv r12,r1 8008dd8: b8 60 78 00 mv r15,r3 8008ddc: b8 80 90 00 mv r18,r4
return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next;
8008de0: 28 2e 00 08 lw r14,(r1+8)
Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size;
8008de4: 28 33 00 10 lw r19,(r1+16)
uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 8008de8: 54 55 00 59 bgu r2,r21,8008f4c <_Heap_Allocate_aligned_with_boundary+0x1c8> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 8008dec: 44 80 00 04 be r4,r0,8008dfc <_Heap_Allocate_aligned_with_boundary+0x78> if ( boundary < alloc_size ) { 8008df0: 54 44 00 57 bgu r2,r4,8008f4c <_Heap_Allocate_aligned_with_boundary+0x1c8> return NULL; } if ( alignment == 0 ) { 8008df4: 5c 60 00 02 bne r3,r0,8008dfc <_Heap_Allocate_aligned_with_boundary+0x78>
8008df8: ba 60 78 00 mv r15,r19
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size;
8008dfc: 34 01 00 04 mvi r1,4 8008e00: c8 2d 08 00 sub r1,r1,r13 8008e04: 5b 81 00 4c sw (sp+76),r1
if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) {
8008e08: 34 11 00 00 mvi r17,0
uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size;
8008e0c: 34 1b ff fe mvi fp,-2
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1;
8008e10: 36 79 00 07 addi r25,r19,7
/* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin;
8008e14: 34 18 ff f8 mvi r24,-8 8008e18: e0 00 00 3d bi 8008f0c <_Heap_Allocate_aligned_with_boundary+0x188>
/* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) {
8008e1c: 29 d0 00 04 lw r16,(r14+4)
while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count;
8008e20: 36 31 00 01 addi r17,r17,1
/* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 8008e24: 52 b0 00 39 bgeu r21,r16,8008f08 <_Heap_Allocate_aligned_with_boundary+0x184>
8008e28: 35 d4 00 08 addi r20,r14,8
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
8008e2c: ba 80 58 00 mv r11,r20
if ( alignment == 0 ) { 8008e30: 45 e0 00 35 be r15,r0,8008f04 <_Heap_Allocate_aligned_with_boundary+0x180> uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size;
8008e34: 2b 81 00 4c lw r1,(sp+76)
uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size;
8008e38: a2 1b 80 00 and r16,r16,fp
uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size;
8008e3c: 29 96 00 14 lw r22,(r12+20)
uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size;
8008e40: b5 d0 80 00 add r16,r14,r16
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size;
8008e44: b4 30 58 00 add r11,r1,r16
uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1;
8008e48: cb 36 18 00 sub r3,r25,r22
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment);
8008e4c: b9 60 08 00 mv r1,r11 8008e50: b9 e0 10 00 mv r2,r15 8008e54: b4 70 80 00 add r16,r3,r16 8008e58: f8 00 46 34 calli 801a728 <__umodsi3> 8008e5c: c9 61 58 00 sub r11,r11,r1
uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 8008e60: 52 0b 00 05 bgeu r16,r11,8008e74 <_Heap_Allocate_aligned_with_boundary+0xf0>
8008e64: ba 00 08 00 mv r1,r16 8008e68: b9 e0 10 00 mv r2,r15 8008e6c: f8 00 46 2f calli 801a728 <__umodsi3> 8008e70: ca 01 58 00 sub r11,r16,r1
} alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 8008e74: 46 40 00 19 be r18,r0,8008ed8 <_Heap_Allocate_aligned_with_boundary+0x154> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size;
8008e78: b5 6d 80 00 add r16,r11,r13 8008e7c: ba 00 08 00 mv r1,r16 8008e80: ba 40 10 00 mv r2,r18 8008e84: f8 00 46 29 calli 801a728 <__umodsi3> 8008e88: ca 01 18 00 sub r3,r16,r1
/* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
8008e8c: b6 8d 20 00 add r4,r20,r13 8008e90: e0 00 00 0b bi 8008ebc <_Heap_Allocate_aligned_with_boundary+0x138>
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 8008e94: 54 83 00 1d bgu r4,r3,8008f08 <_Heap_Allocate_aligned_with_boundary+0x184>
8008e98: 5b 84 00 48 sw (sp+72),r4 8008e9c: f8 00 46 23 calli 801a728 <__umodsi3> 8008ea0: ca e1 58 00 sub r11,r23,r1
return 0; } alloc_begin = boundary_line - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size;
8008ea4: b5 6d 80 00 add r16,r11,r13 8008ea8: ba 00 08 00 mv r1,r16 8008eac: ba 40 10 00 mv r2,r18 8008eb0: f8 00 46 1e calli 801a728 <__umodsi3> 8008eb4: 2b 84 00 48 lw r4,(sp+72) 8008eb8: ca 01 18 00 sub r3,r16,r1
/* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
8008ebc: f6 03 80 00 cmpgu r16,r16,r3 8008ec0: f4 6b 28 00 cmpgu r5,r3,r11
if ( boundary_line < boundary_floor ) { return 0; } alloc_begin = boundary_line - alloc_size;
8008ec4: c8 6d b8 00 sub r23,r3,r13
/* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
8008ec8: a2 05 80 00 and r16,r16,r5 8008ecc: b9 e0 10 00 mv r2,r15 8008ed0: ba e0 08 00 mv r1,r23
8008ed4: 5e 00 ff f0 bne r16,r0,8008e94 <_Heap_Allocate_aligned_with_boundary+0x110> boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 8008ed8: 56 8b 00 0c bgu r20,r11,8008f08 <_Heap_Allocate_aligned_with_boundary+0x184> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin;
8008edc: cb 0e 80 00 sub r16,r24,r14 8008ee0: b9 60 08 00 mv r1,r11 8008ee4: ba 60 10 00 mv r2,r19 8008ee8: b6 0b 80 00 add r16,r16,r11 8008eec: f8 00 46 0f calli 801a728 <__umodsi3> 8008ef0: ca 01 08 00 sub r1,r16,r1
if ( free_size >= min_block_size || free_size == 0 ) {
8008ef4: f0 36 b0 00 cmpgeu r22,r1,r22 8008ef8: 64 21 00 00 cmpei r1,r1,0 8008efc: b8 36 08 00 or r1,r1,r22
8008f00: 44 20 00 02 be r1,r0,8008f08 <_Heap_Allocate_aligned_with_boundary+0x184> boundary ); } } if ( alloc_begin != 0 ) {
8008f04: 5d 60 00 05 bne r11,r0,8008f18 <_Heap_Allocate_aligned_with_boundary+0x194><== ALWAYS TAKEN
break; } block = block->next;
8008f08: 29 ce 00 08 lw r14,(r14+8)
if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 8008f0c: 5d cc ff c4 bne r14,r12,8008e1c <_Heap_Allocate_aligned_with_boundary+0x98>
8008f10: 34 0b 00 00 mvi r11,0 8008f14: e0 00 00 09 bi 8008f38 <_Heap_Allocate_aligned_with_boundary+0x1b4>
block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count;
8008f18: 29 81 00 4c lw r1,(r12+76)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
8008f1c: b9 c0 10 00 mv r2,r14 8008f20: b9 a0 20 00 mv r4,r13
block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count;
8008f24: b4 31 08 00 add r1,r1,r17 8008f28: 59 81 00 4c sw (r12+76),r1
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
8008f2c: b9 60 18 00 mv r3,r11 8008f30: b9 80 08 00 mv r1,r12 8008f34: fb ff e8 ce calli 800326c <_Heap_Block_allocate>
uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats;
8008f38: 29 81 00 44 lw r1,(r12+68)
8008f3c: 50 31 00 02 bgeu r1,r17,8008f44 <_Heap_Allocate_aligned_with_boundary+0x1c0> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count;
8008f40: 59 91 00 44 sw (r12+68),r17
} return (void *) alloc_begin;
8008f44: b9 60 08 00 mv r1,r11 8008f48: e0 00 00 02 bi 8008f50 <_Heap_Allocate_aligned_with_boundary+0x1cc> 8008f4c: 34 01 00 00 mvi r1,0
}
8008f50: 2b 9d 00 04 lw ra,(sp+4) 8008f54: 2b 8b 00 44 lw r11,(sp+68) 8008f58: 2b 8c 00 40 lw r12,(sp+64) 8008f5c: 2b 8d 00 3c lw r13,(sp+60) 8008f60: 2b 8e 00 38 lw r14,(sp+56) 8008f64: 2b 8f 00 34 lw r15,(sp+52) 8008f68: 2b 90 00 30 lw r16,(sp+48) 8008f6c: 2b 91 00 2c lw r17,(sp+44) 8008f70: 2b 92 00 28 lw r18,(sp+40) 8008f74: 2b 93 00 24 lw r19,(sp+36) 8008f78: 2b 94 00 20 lw r20,(sp+32) 8008f7c: 2b 95 00 1c lw r21,(sp+28) 8008f80: 2b 96 00 18 lw r22,(sp+24) 8008f84: 2b 97 00 14 lw r23,(sp+20) 8008f88: 2b 98 00 10 lw r24,(sp+16) 8008f8c: 2b 99 00 0c lw r25,(sp+12) 8008f90: 2b 9b 00 08 lw fp,(sp+8) 8008f94: 37 9c 00 4c addi sp,sp,76 8008f98: c3 a0 00 00 ret
0800ecd8 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) {
800ecd8: 37 9c ff e8 addi sp,sp,-24 800ecdc: 5b 8b 00 18 sw (sp+24),r11 800ece0: 5b 8c 00 14 sw (sp+20),r12 800ece4: 5b 8d 00 10 sw (sp+16),r13 800ece8: 5b 8e 00 0c sw (sp+12),r14 800ecec: 5b 8f 00 08 sw (sp+8),r15 800ecf0: 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;
800ecf4: 28 2d 00 18 lw r13,(r1+24)
uintptr_t const heap_area_end = heap->area_end;
800ecf8: 28 25 00 1c lw r5,(r1+28)
Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) {
800ecfc: 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;
800ed00: f0 4d 68 00 cmpgeu r13,r2,r13
* 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
800ed04: f4 a2 08 00 cmpgu r1,r5,r2
Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) {
800ed08: b8 80 78 00 mv r15,r4
Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin;
800ed0c: a0 2d 68 00 and r13,r1,r13
uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block;
800ed10: 29 6c 00 24 lw r12,(r11+36)
uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin;
800ed14: 34 01 00 01 mvi r1,1
800ed18: 5d a0 00 26 bne r13,r0,800edb0 <_Heap_Extend+0xd8> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) {
800ed1c: 34 01 00 02 mvi r1,2
800ed20: 5c 45 00 24 bne r2,r5,800edb0 <_Heap_Extend+0xd8> { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size;
800ed24: b4 62 18 00 add r3,r3,r2
* block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end
800ed28: c8 6c 70 00 sub r14,r3,r12
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment);
800ed2c: 29 62 00 10 lw r2,(r11+16) 800ed30: 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;
800ed34: 59 63 00 1c sw (r11+28),r3 800ed38: b9 c0 08 00 mv r1,r14 800ed3c: fb ff d5 8b calli 8004368 <__umodsi3> 800ed40: c9 c1 08 00 sub r1,r14,r1
extend_size = new_heap_area_end - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size;
800ed44: 59 e1 00 00 sw (r15+0),r1
if( extend_size >= heap->min_block_size ) {
800ed48: 29 62 00 14 lw r2,(r11+20)
800ed4c: 50 22 00 02 bgeu r1,r2,800ed54 <_Heap_Extend+0x7c> <== ALWAYS TAKEN
800ed50: e0 00 00 17 bi 800edac <_Heap_Extend+0xd4> <== NOT EXECUTED
uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag;
800ed54: 29 84 00 04 lw r4,(r12+4)
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag =
800ed58: 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);
800ed5c: b4 2c 10 00 add r2,r1,r12
uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag;
800ed60: 20 84 00 01 andi r4,r4,0x1 800ed64: b8 24 20 00 or r4,r1,r4 800ed68: c8 62 18 00 sub r3,r3,r2 800ed6c: 59 84 00 04 sw (r12+4),r4 800ed70: 38 63 00 01 ori r3,r3,0x1 800ed74: 58 43 00 04 sw (r2+4),r3
| HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size;
800ed78: 29 65 00 2c lw r5,(r11+44)
++stats->used_blocks;
800ed7c: 29 64 00 40 lw r4,(r11+64)
--stats->frees; /* Do not count subsequent call as actual free() */
800ed80: 29 63 00 50 lw r3,(r11+80)
| HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size;
800ed84: b4 a1 08 00 add r1,r5,r1
++stats->used_blocks;
800ed88: 34 84 00 01 addi r4,r4,1
--stats->frees; /* Do not count subsequent call as actual free() */
800ed8c: 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;
800ed90: 59 62 00 24 sw (r11+36),r2
/* Statistics */ stats->size += extend_size;
800ed94: 59 61 00 2c sw (r11+44),r1
++stats->used_blocks;
800ed98: 59 64 00 40 sw (r11+64),r4
--stats->frees; /* Do not count subsequent call as actual free() */
800ed9c: 59 63 00 50 sw (r11+80),r3
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
800eda0: b9 60 08 00 mv r1,r11 800eda4: 35 82 00 08 addi r2,r12,8 800eda8: fb ff e5 74 calli 8008378 <_Heap_Free> 800edac: b9 a0 08 00 mv r1,r13
} return HEAP_EXTEND_SUCCESSFUL; }
800edb0: 2b 9d 00 04 lw ra,(sp+4) 800edb4: 2b 8b 00 18 lw r11,(sp+24) 800edb8: 2b 8c 00 14 lw r12,(sp+20) 800edbc: 2b 8d 00 10 lw r13,(sp+16) 800edc0: 2b 8e 00 0c lw r14,(sp+12) 800edc4: 2b 8f 00 08 lw r15,(sp+8) 800edc8: 37 9c 00 18 addi sp,sp,24 800edcc: c3 a0 00 00 ret
08008f9c <_Heap_Free>: #include <rtems/system.h> #include <rtems/score/sysstate.h> #include <rtems/score/heap.h> bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) {
8008f9c: 37 9c ff f4 addi sp,sp,-12 8008fa0: 5b 8b 00 0c sw (sp+12),r11 8008fa4: 5b 8c 00 08 sw (sp+8),r12 8008fa8: 5b 9d 00 04 sw (sp+4),ra 8008fac: b8 40 18 00 mv r3,r2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
8008fb0: 28 22 00 10 lw r2,(r1+16) 8008fb4: b8 20 58 00 mv r11,r1 8008fb8: b8 60 08 00 mv r1,r3 8008fbc: 34 6c ff f8 addi r12,r3,-8 8008fc0: f8 00 45 da calli 801a728 <__umodsi3>
const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block;
8008fc4: 29 66 00 20 lw r6,(r11+32)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
8008fc8: c9 81 08 00 sub r1,r12,r1
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 8008fcc: 50 26 00 03 bgeu r1,r6,8008fd8 <_Heap_Free+0x3c>
8008fd0: 34 02 00 00 mvi r2,0 8008fd4: e0 00 00 03 bi 8008fe0 <_Heap_Free+0x44> 8008fd8: 29 62 00 24 lw r2,(r11+36) 8008fdc: f0 41 10 00 cmpgeu r2,r2,r1
Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 8008fe0: 44 40 00 66 be r2,r0,8009178 <_Heap_Free+0x1dc> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
8008fe4: 28 25 00 04 lw r5,(r1+4) 8008fe8: 34 02 ff fe mvi r2,-2 8008fec: a0 a2 10 00 and r2,r5,r2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset);
8008ff0: b4 22 18 00 add r3,r1,r2
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block
8008ff4: 50 66 00 03 bgeu r3,r6,8009000 <_Heap_Free+0x64> <== ALWAYS TAKEN
8008ff8: 34 04 00 00 mvi r4,0 <== NOT EXECUTED 8008ffc: e0 00 00 03 bi 8009008 <_Heap_Free+0x6c> <== NOT EXECUTED
8009000: 29 64 00 24 lw r4,(r11+36) 8009004: f0 83 20 00 cmpgeu r4,r4,r3
} block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
8009008: 44 80 00 5c be r4,r0,8009178 <_Heap_Free+0x1dc> <== NEVER TAKEN
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;
800900c: 28 64 00 04 lw r4,(r3+4)
_HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) {
8009010: 20 87 00 01 andi r7,r4,0x1
8009014: 44 e0 00 59 be r7,r0,8009178 <_Heap_Free+0x1dc> <== NEVER TAKEN
return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
8009018: 29 68 00 24 lw r8,(r11+36)
- HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
800901c: 34 07 ff fe mvi r7,-2 8009020: a0 87 20 00 and r4,r4,r7
_HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block
8009024: 34 07 00 00 mvi r7,0
8009028: 45 03 00 05 be r8,r3,800903c <_Heap_Free+0xa0>
800902c: b4 64 38 00 add r7,r3,r4 8009030: 28 e7 00 04 lw r7,(r7+4) 8009034: 20 e7 00 01 andi r7,r7,0x1 8009038: 18 e7 00 01 xori r7,r7,0x1
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) {
800903c: 20 a5 00 01 andi r5,r5,0x1
_HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block
8009040: 20 e7 00 ff andi r7,r7,0xff
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 8009044: 5c a0 00 23 bne r5,r0,80090d0 <_Heap_Free+0x134> uintptr_t const prev_size = block->prev_size;
8009048: 28 25 00 00 lw r5,(r1+0)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset);
800904c: c8 25 08 00 sub r1,r1,r5
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block
8009050: f0 26 30 00 cmpgeu r6,r1,r6 8009054: f1 01 40 00 cmpgeu r8,r8,r1 8009058: c8 06 30 00 sub r6,r0,r6
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
800905c: a1 06 40 00 and r8,r8,r6
8009060: 45 00 00 46 be r8,r0,8009178 <_Heap_Free+0x1dc> <== NEVER TAKEN
return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) {
8009064: 28 26 00 04 lw r6,(r1+4) 8009068: 20 c6 00 01 andi r6,r6,0x1
800906c: 44 c0 00 43 be r6,r0,8009178 <_Heap_Free+0x1dc> <== NEVER TAKEN
_HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 8009070: 44 e0 00 0f be r7,r0,80090ac <_Heap_Free+0x110> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1;
8009074: 29 68 00 38 lw r8,(r11+56)
} RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev;
8009078: 28 66 00 0c lw r6,(r3+12)
return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next;
800907c: 28 67 00 08 lw r7,(r3+8)
_HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size;
8009080: b4 44 20 00 add r4,r2,r4 8009084: b4 85 28 00 add r5,r4,r5
_Heap_Free_list_remove( next_block ); stats->free_blocks -= 1;
8009088: 35 03 ff ff addi r3,r8,-1 800908c: 59 63 00 38 sw (r11+56),r3
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size;
8009090: b4 25 20 00 add r4,r1,r5
if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
8009094: 38 a3 00 01 ori r3,r5,0x1
Heap_Block *prev = block->prev; prev->next = next; next->prev = prev;
8009098: 58 e6 00 0c sw (r7+12),r6
next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size;
800909c: 58 85 00 00 sw (r4+0),r5
if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
80090a0: 58 23 00 04 sw (r1+4),r3
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next;
80090a4: 58 c7 00 08 sw (r6+8),r7 80090a8: e0 00 00 29 bi 800914c <_Heap_Free+0x1b0>
next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size;
80090ac: b4 45 28 00 add r5,r2,r5
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
80090b0: 38 a4 00 01 ori r4,r5,0x1 80090b4: 58 24 00 04 sw (r1+4),r4
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
80090b8: 28 64 00 04 lw r4,(r3+4) 80090bc: 34 01 ff fe mvi r1,-2
next_block->prev_size = size;
80090c0: 58 65 00 00 sw (r3+0),r5
_HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
80090c4: a0 81 08 00 and r1,r4,r1 80090c8: 58 61 00 04 sw (r3+4),r1 80090cc: e0 00 00 20 bi 800914c <_Heap_Free+0x1b0>
next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 80090d0: 44 e0 00 0d be r7,r0,8009104 <_Heap_Free+0x168> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev;
80090d4: 28 65 00 0c lw r5,(r3+12)
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next;
80090d8: 28 66 00 08 lw r6,(r3+8)
uintptr_t const size = block_size + next_block_size;
80090dc: b4 82 18 00 add r3,r4,r2
Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev;
80090e0: 58 25 00 0c sw (r1+12),r5
) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next;
80090e4: 58 26 00 08 sw (r1+8),r6
_Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( block, size ); next_block->prev_size = size;
80090e8: b4 23 38 00 add r7,r1,r3
next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
80090ec: 38 64 00 01 ori r4,r3,0x1
next_block = _Heap_Block_at( block, size ); next_block->prev_size = size;
80090f0: 58 e3 00 00 sw (r7+0),r3
new_block->prev = prev; next->prev = new_block;
80090f4: 58 c1 00 0c sw (r6+12),r1
prev->next = new_block;
80090f8: 58 a1 00 08 sw (r5+8),r1
next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
80090fc: 58 24 00 04 sw (r1+4),r4 8009100: e0 00 00 13 bi 800914c <_Heap_Free+0x1b0>
next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
8009104: 38 44 00 01 ori r4,r2,0x1 8009108: 58 24 00 04 sw (r1+4),r4
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
800910c: 28 65 00 04 lw r5,(r3+4) 8009110: 34 04 ff fe mvi r4,-2
next_block->prev_size = block_size;
8009114: 58 62 00 00 sw (r3+0),r2
} else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
8009118: a0 a4 20 00 and r4,r5,r4 800911c: 58 64 00 04 sw (r3+4),r4
next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks;
8009120: 29 63 00 38 lw r3,(r11+56)
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next;
8009124: 29 64 00 08 lw r4,(r11+8)
#include <rtems/score/sysstate.h> #include <rtems/score/heap.h> bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats;
8009128: 29 65 00 3c lw r5,(r11+60)
new_block->next = next; new_block->prev = block_before;
800912c: 58 2b 00 0c sw (r1+12),r11
Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next;
8009130: 58 24 00 08 sw (r1+8),r4
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks;
8009134: 34 63 00 01 addi r3,r3,1
new_block->prev = block_before; block_before->next = new_block; next->prev = new_block;
8009138: 58 81 00 0c sw (r4+12),r1
{ Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block;
800913c: 59 61 00 08 sw (r11+8),r1 8009140: 59 63 00 38 sw (r11+56),r3
#include <rtems/score/sysstate.h> #include <rtems/score/heap.h> bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 8009144: 50 a3 00 02 bgeu r5,r3,800914c <_Heap_Free+0x1b0> next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks;
8009148: 59 63 00 3c sw (r11+60),r3
} } /* Statistics */ --stats->used_blocks;
800914c: 29 63 00 40 lw r3,(r11+64)
++stats->frees;
8009150: 29 61 00 50 lw r1,(r11+80)
stats->free_size += block_size;
8009154: 29 64 00 30 lw r4,(r11+48)
stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks;
8009158: 34 63 ff ff addi r3,r3,-1
++stats->frees;
800915c: 34 21 00 01 addi r1,r1,1
stats->free_size += block_size;
8009160: b4 82 10 00 add r2,r4,r2
} } /* Statistics */ --stats->used_blocks; ++stats->frees;
8009164: 59 61 00 50 sw (r11+80),r1
stats->free_size += block_size;
8009168: 59 62 00 30 sw (r11+48),r2
stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks;
800916c: 59 63 00 40 sw (r11+64),r3
++stats->frees; stats->free_size += block_size;
8009170: 34 01 00 01 mvi r1,1
return( true );
8009174: e0 00 00 02 bi 800917c <_Heap_Free+0x1e0> 8009178: 34 01 00 00 mvi r1,0
}
800917c: 2b 9d 00 04 lw ra,(sp+4) 8009180: 2b 8b 00 0c lw r11,(sp+12) 8009184: 2b 8c 00 08 lw r12,(sp+8) 8009188: 37 9c 00 0c addi sp,sp,12 800918c: c3 a0 00 00 ret
0801b2c4 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) {
801b2c4: 37 9c ff f0 addi sp,sp,-16 801b2c8: 5b 8b 00 10 sw (sp+16),r11 801b2cc: 5b 8c 00 0c sw (sp+12),r12 801b2d0: 5b 8d 00 08 sw (sp+8),r13 801b2d4: 5b 9d 00 04 sw (sp+4),ra 801b2d8: b8 40 60 00 mv r12,r2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
801b2dc: 28 22 00 10 lw r2,(r1+16) 801b2e0: b8 20 58 00 mv r11,r1 801b2e4: b9 80 08 00 mv r1,r12 801b2e8: b8 60 68 00 mv r13,r3 801b2ec: fb ff fd 0f calli 801a728 <__umodsi3>
const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block;
801b2f0: 29 62 00 20 lw r2,(r11+32)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
801b2f4: 35 84 ff f8 addi r4,r12,-8 801b2f8: c8 81 20 00 sub r4,r4,r1
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 801b2fc: 50 82 00 03 bgeu r4,r2,801b308 <_Heap_Size_of_alloc_area+0x44>
801b300: 34 01 00 00 mvi r1,0 801b304: e0 00 00 03 bi 801b310 <_Heap_Size_of_alloc_area+0x4c> 801b308: 29 61 00 24 lw r1,(r11+36) 801b30c: f0 24 08 00 cmpgeu r1,r1,r4
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 801b310: 44 20 00 13 be r1,r0,801b35c <_Heap_Size_of_alloc_area+0x98> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset);
801b314: 28 83 00 04 lw r3,(r4+4) 801b318: 34 01 ff fe mvi r1,-2 801b31c: a0 61 08 00 and r1,r3,r1 801b320: b4 81 20 00 add r4,r4,r1
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block
801b324: 50 82 00 03 bgeu r4,r2,801b330 <_Heap_Size_of_alloc_area+0x6c><== ALWAYS TAKEN
801b328: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 801b32c: e0 00 00 03 bi 801b338 <_Heap_Size_of_alloc_area+0x74> <== NOT EXECUTED
801b330: 29 61 00 24 lw r1,(r11+36) 801b334: f0 24 08 00 cmpgeu r1,r1,r4
} block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if (
801b338: 44 20 00 09 be r1,r0,801b35c <_Heap_Size_of_alloc_area+0x98><== NEVER TAKEN
801b33c: 28 81 00 04 lw r1,(r4+4) 801b340: 20 21 00 01 andi r1,r1,0x1
801b344: 44 20 00 06 be r1,r0,801b35c <_Heap_Size_of_alloc_area+0x98><== NEVER TAKEN
|| !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
801b348: c8 8c 20 00 sub r4,r4,r12 801b34c: 34 84 00 04 addi r4,r4,4 801b350: 59 a4 00 00 sw (r13+0),r4 801b354: 34 01 00 01 mvi r1,1
return true;
801b358: e0 00 00 02 bi 801b360 <_Heap_Size_of_alloc_area+0x9c> 801b35c: 34 01 00 00 mvi r1,0
}
801b360: 2b 9d 00 04 lw ra,(sp+4) 801b364: 2b 8b 00 10 lw r11,(sp+16) 801b368: 2b 8c 00 0c lw r12,(sp+12) 801b36c: 2b 8d 00 08 lw r13,(sp+8) 801b370: 37 9c 00 10 addi sp,sp,16 801b374: c3 a0 00 00 ret
08003c44 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) {
8003c44: 37 9c ff ac addi sp,sp,-84 8003c48: 5b 8b 00 50 sw (sp+80),r11 8003c4c: 5b 8c 00 4c sw (sp+76),r12 8003c50: 5b 8d 00 48 sw (sp+72),r13 8003c54: 5b 8e 00 44 sw (sp+68),r14 8003c58: 5b 8f 00 40 sw (sp+64),r15 8003c5c: 5b 90 00 3c sw (sp+60),r16 8003c60: 5b 91 00 38 sw (sp+56),r17 8003c64: 5b 92 00 34 sw (sp+52),r18 8003c68: 5b 93 00 30 sw (sp+48),r19 8003c6c: 5b 94 00 2c sw (sp+44),r20 8003c70: 5b 95 00 28 sw (sp+40),r21 8003c74: 5b 96 00 24 sw (sp+36),r22 8003c78: 5b 97 00 20 sw (sp+32),r23 8003c7c: 5b 98 00 1c sw (sp+28),r24 8003c80: 5b 99 00 18 sw (sp+24),r25 8003c84: 5b 9b 00 14 sw (sp+20),fp 8003c88: 5b 9d 00 10 sw (sp+16),ra 8003c8c: 20 63 00 ff andi r3,r3,0xff 8003c90: b8 20 68 00 mv r13,r1 8003c94: b8 40 70 00 mv r14,r2
uintptr_t const page_size = heap->page_size;
8003c98: 28 2f 00 10 lw r15,(r1+16)
uintptr_t const min_block_size = heap->min_block_size;
8003c9c: 28 33 00 14 lw r19,(r1+20)
Heap_Block *const last_block = heap->last_block;
8003ca0: 28 32 00 24 lw r18,(r1+36)
Heap_Block *block = heap->first_block;
8003ca4: 28 2b 00 20 lw r11,(r1+32)
Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 8003ca8: 5c 60 00 04 bne r3,r0,8003cb8 <_Heap_Walk+0x74>
8003cac: 78 0c 08 00 mvhi r12,0x800 8003cb0: 39 8c 3c 20 ori r12,r12,0x3c20 8003cb4: e0 00 00 03 bi 8003cc0 <_Heap_Walk+0x7c> 8003cb8: 78 0c 08 00 mvhi r12,0x800 8003cbc: 39 8c 41 70 ori r12,r12,0x4170
if ( !_System_state_Is_up( _System_state_Get() ) ) {
8003cc0: 78 02 08 02 mvhi r2,0x802 8003cc4: 38 42 0a 88 ori r2,r2,0xa88 8003cc8: 28 42 00 00 lw r2,(r2+0) 8003ccc: 34 01 00 03 mvi r1,3
8003cd0: 5c 41 01 0c bne r2,r1,8004100 <_Heap_Walk+0x4bc> <== NEVER TAKEN
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)(
8003cd4: 29 a1 00 08 lw r1,(r13+8) 8003cd8: 29 a6 00 18 lw r6,(r13+24) 8003cdc: 29 a7 00 1c lw r7,(r13+28) 8003ce0: 5b 81 00 08 sw (sp+8),r1 8003ce4: 29 a1 00 0c lw r1,(r13+12) 8003ce8: 78 03 08 01 mvhi r3,0x801 8003cec: 5b 92 00 04 sw (sp+4),r18 8003cf0: 5b 81 00 0c sw (sp+12),r1 8003cf4: 38 63 cc c4 ori r3,r3,0xccc4 8003cf8: b9 c0 08 00 mv r1,r14 8003cfc: 34 02 00 00 mvi r2,0 8003d00: b9 e0 20 00 mv r4,r15 8003d04: ba 60 28 00 mv r5,r19 8003d08: b9 60 40 00 mv r8,r11 8003d0c: d9 80 00 00 call r12
heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 8003d10: 5d e0 00 05 bne r15,r0,8003d24 <_Heap_Walk+0xe0> (*printer)( source, true, "page size is zero\n" );
8003d14: 78 03 08 01 mvhi r3,0x801 8003d18: b9 c0 08 00 mv r1,r14 8003d1c: 38 63 cd 58 ori r3,r3,0xcd58 8003d20: e0 00 00 3b bi 8003e0c <_Heap_Walk+0x1c8>
return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
8003d24: 21 f0 00 07 andi r16,r15,0x7
8003d28: 46 00 00 06 be r16,r0,8003d40 <_Heap_Walk+0xfc> (*printer)(
8003d2c: 78 03 08 01 mvhi r3,0x801 8003d30: b9 c0 08 00 mv r1,r14 8003d34: 38 63 cd 6c ori r3,r3,0xcd6c 8003d38: b9 e0 20 00 mv r4,r15 8003d3c: e0 00 01 09 bi 8004160 <_Heap_Walk+0x51c>
); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
8003d40: ba 60 08 00 mv r1,r19 8003d44: b9 e0 10 00 mv r2,r15 8003d48: fb ff f3 de calli 8000cc0 <__umodsi3> 8003d4c: b8 20 88 00 mv r17,r1
8003d50: 44 30 00 08 be r1,r16,8003d70 <_Heap_Walk+0x12c> (*printer)(
8003d54: 78 03 08 01 mvhi r3,0x801 8003d58: b9 c0 08 00 mv r1,r14 8003d5c: 38 63 cd 8c ori r3,r3,0xcd8c 8003d60: ba 60 20 00 mv r4,r19 8003d64: 34 02 00 01 mvi r2,1 8003d68: d9 80 00 00 call r12 8003d6c: e0 00 00 5a bi 8003ed4 <_Heap_Walk+0x290>
); return false; } if (
8003d70: 35 61 00 08 addi r1,r11,8 8003d74: b9 e0 10 00 mv r2,r15 8003d78: fb ff f3 d2 calli 8000cc0 <__umodsi3> 8003d7c: b8 20 80 00 mv r16,r1
8003d80: 44 31 00 08 be r1,r17,8003da0 <_Heap_Walk+0x15c> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)(
8003d84: 78 03 08 01 mvhi r3,0x801 8003d88: b9 c0 08 00 mv r1,r14 8003d8c: 38 63 cd b0 ori r3,r3,0xcdb0 8003d90: b9 60 20 00 mv r4,r11 8003d94: 34 02 00 01 mvi r2,1 8003d98: d9 80 00 00 call r12 8003d9c: e0 00 00 92 bi 8003fe4 <_Heap_Walk+0x3a0>
); return false; } if ( !_Heap_Is_prev_used( first_block ) ) {
8003da0: 29 71 00 04 lw r17,(r11+4) 8003da4: 22 31 00 01 andi r17,r17,0x1
8003da8: 5e 21 00 07 bne r17,r1,8003dc4 <_Heap_Walk+0x180> (*printer)(
8003dac: 78 03 08 01 mvhi r3,0x801 8003db0: b9 c0 08 00 mv r1,r14 8003db4: 38 63 cd e4 ori r3,r3,0xcde4 8003db8: 34 02 00 01 mvi r2,1 8003dbc: d9 80 00 00 call r12 8003dc0: e0 00 00 89 bi 8003fe4 <_Heap_Walk+0x3a0>
); return false; } if ( first_block->prev_size != page_size ) {
8003dc4: 29 79 00 00 lw r25,(r11+0)
8003dc8: 47 2f 00 07 be r25,r15,8003de4 <_Heap_Walk+0x1a0> (*printer)(
8003dcc: 78 03 08 01 mvhi r3,0x801 8003dd0: b9 c0 08 00 mv r1,r14 8003dd4: 38 63 ce 14 ori r3,r3,0xce14 8003dd8: bb 20 20 00 mv r4,r25 8003ddc: b9 e0 28 00 mv r5,r15 8003de0: e0 00 00 3b bi 8003ecc <_Heap_Walk+0x288>
); return false; } if ( _Heap_Is_free( last_block ) ) {
8003de4: 2a 41 00 04 lw r1,(r18+4) 8003de8: 34 02 ff fe mvi r2,-2 8003dec: a0 22 08 00 and r1,r1,r2 8003df0: b6 41 08 00 add r1,r18,r1 8003df4: 28 2f 00 04 lw r15,(r1+4) 8003df8: 21 ef 00 01 andi r15,r15,0x1
8003dfc: 5d f0 00 07 bne r15,r16,8003e18 <_Heap_Walk+0x1d4> (*printer)(
8003e00: 78 03 08 01 mvhi r3,0x801 8003e04: b9 c0 08 00 mv r1,r14 8003e08: 38 63 ce 40 ori r3,r3,0xce40 8003e0c: 34 02 00 01 mvi r2,1 8003e10: d9 80 00 00 call r12 8003e14: e0 00 00 a5 bi 80040a8 <_Heap_Walk+0x464>
return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next;
8003e18: 29 a4 00 08 lw r4,(r13+8)
); return false; } if ( _Heap_Is_used( free_block ) ) {
8003e1c: b8 40 a8 00 mv r21,r2
int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size;
8003e20: 29 b4 00 10 lw r20,(r13+16) 8003e24: b9 a0 88 00 mv r17,r13 8003e28: b8 80 b0 00 mv r22,r4 8003e2c: e0 00 00 2e bi 8003ee4 <_Heap_Walk+0x2a0>
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block
8003e30: 29 a1 00 20 lw r1,(r13+32) 8003e34: 34 0f 00 00 mvi r15,0
8003e38: 52 c1 00 02 bgeu r22,r1,8003e40 <_Heap_Walk+0x1fc>
8003e3c: e0 00 00 03 bi 8003e48 <_Heap_Walk+0x204> 8003e40: 29 af 00 24 lw r15,(r13+36) 8003e44: f1 f6 78 00 cmpgeu r15,r15,r22
); return false; } if (
8003e48: 36 c1 00 08 addi r1,r22,8 8003e4c: ba 80 10 00 mv r2,r20
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 8003e50: 5d e0 00 06 bne r15,r0,8003e68 <_Heap_Walk+0x224> (*printer)(
8003e54: 78 03 08 01 mvhi r3,0x801 8003e58: ba c0 20 00 mv r4,r22 8003e5c: b9 c0 08 00 mv r1,r14 8003e60: 38 63 ce 58 ori r3,r3,0xce58 8003e64: e0 00 00 8f bi 80040a0 <_Heap_Walk+0x45c>
); return false; } if (
8003e68: fb ff f3 96 calli 8000cc0 <__umodsi3>
8003e6c: 44 20 00 06 be r1,r0,8003e84 <_Heap_Walk+0x240> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)(
8003e70: 78 03 08 01 mvhi r3,0x801 8003e74: ba c0 20 00 mv r4,r22 8003e78: b9 c0 08 00 mv r1,r14 8003e7c: 38 63 ce 78 ori r3,r3,0xce78 8003e80: e0 00 00 b8 bi 8004160 <_Heap_Walk+0x51c>
); return false; } if ( _Heap_Is_used( free_block ) ) {
8003e84: 2a c3 00 04 lw r3,(r22+4) 8003e88: a0 75 18 00 and r3,r3,r21 8003e8c: b6 c3 18 00 add r3,r22,r3 8003e90: 28 70 00 04 lw r16,(r3+4) 8003e94: 22 10 00 01 andi r16,r16,0x1
8003e98: 46 01 00 07 be r16,r1,8003eb4 <_Heap_Walk+0x270> (*printer)(
8003e9c: 78 03 08 01 mvhi r3,0x801 8003ea0: b8 20 78 00 mv r15,r1 8003ea4: ba c0 20 00 mv r4,r22 8003ea8: b9 c0 08 00 mv r1,r14 8003eac: 38 63 ce a8 ori r3,r3,0xcea8 8003eb0: e0 00 00 7c bi 80040a0 <_Heap_Walk+0x45c>
); return false; } if ( free_block->prev != prev_block ) {
8003eb4: 2a c5 00 0c lw r5,(r22+12)
8003eb8: 44 b1 00 09 be r5,r17,8003edc <_Heap_Walk+0x298> (*printer)(
8003ebc: 78 03 08 01 mvhi r3,0x801 8003ec0: ba c0 20 00 mv r4,r22 8003ec4: b9 c0 08 00 mv r1,r14 8003ec8: 38 63 ce c4 ori r3,r3,0xcec4 8003ecc: 34 02 00 01 mvi r2,1 8003ed0: d9 80 00 00 call r12 8003ed4: ba 00 08 00 mv r1,r16 8003ed8: e0 00 00 8b bi 8004104 <_Heap_Walk+0x4c0>
return false; } prev_block = free_block; free_block = free_block->next;
8003edc: ba c0 88 00 mv r17,r22 8003ee0: 2a d6 00 08 lw r22,(r22+8)
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 8003ee4: 5e cd ff d3 bne r22,r13,8003e30 <_Heap_Walk+0x1ec>
8003ee8: e0 00 00 7a bi 80040d0 <_Heap_Walk+0x48c>
- HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
8003eec: 29 6f 00 04 lw r15,(r11+4)
uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) {
8003ef0: 21 e2 00 01 andi r2,r15,0x1 8003ef4: a1 fb 78 00 and r15,r15,fp
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset);
8003ef8: b5 6f 80 00 add r16,r11,r15
8003efc: 44 40 00 09 be r2,r0,8003f20 <_Heap_Walk+0x2dc> (*printer)(
8003f00: 78 03 08 01 mvhi r3,0x801 8003f04: b9 c0 08 00 mv r1,r14 8003f08: 34 02 00 00 mvi r2,0 8003f0c: 38 63 ce f8 ori r3,r3,0xcef8 8003f10: b9 60 20 00 mv r4,r11 8003f14: b9 e0 28 00 mv r5,r15 8003f18: d9 80 00 00 call r12 8003f1c: e0 00 00 08 bi 8003f3c <_Heap_Walk+0x2f8>
"block 0x%08x: size %u\n", block, block_size ); } else { (*printer)(
8003f20: 29 66 00 00 lw r6,(r11+0) 8003f24: 78 03 08 01 mvhi r3,0x801 8003f28: b9 c0 08 00 mv r1,r14 8003f2c: 38 63 cf 10 ori r3,r3,0xcf10 8003f30: b9 60 20 00 mv r4,r11 8003f34: b9 e0 28 00 mv r5,r15 8003f38: d9 80 00 00 call r12
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block
8003f3c: 29 a1 00 20 lw r1,(r13+32)
8003f40: 52 01 00 03 bgeu r16,r1,8003f4c <_Heap_Walk+0x308> <== ALWAYS TAKEN
8003f44: 34 11 00 00 mvi r17,0 <== NOT EXECUTED 8003f48: e0 00 00 03 bi 8003f54 <_Heap_Walk+0x310> <== NOT EXECUTED
8003f4c: 29 b1 00 24 lw r17,(r13+36) 8003f50: f2 30 88 00 cmpgeu r17,r17,r16
block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 8003f54: 5e 20 00 05 bne r17,r0,8003f68 <_Heap_Walk+0x324> (*printer)(
8003f58: 78 03 08 01 mvhi r3,0x801 8003f5c: b9 c0 08 00 mv r1,r14 8003f60: 38 63 cf 38 ori r3,r3,0xcf38 8003f64: e0 00 00 1c bi 8003fd4 <_Heap_Walk+0x390>
); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) {
8003f68: b9 e0 08 00 mv r1,r15 8003f6c: bb 20 10 00 mv r2,r25 8003f70: fb ff f3 54 calli 8000cc0 <__umodsi3> 8003f74: b8 20 88 00 mv r17,r1
8003f78: 44 20 00 09 be r1,r0,8003f9c <_Heap_Walk+0x358> (*printer)(
8003f7c: 78 03 08 01 mvhi r3,0x801 8003f80: b9 c0 08 00 mv r1,r14 8003f84: 38 63 cf 68 ori r3,r3,0xcf68 8003f88: b9 60 20 00 mv r4,r11 8003f8c: b9 e0 28 00 mv r5,r15 8003f90: 34 02 00 01 mvi r2,1 8003f94: d9 80 00 00 call r12 8003f98: e0 00 00 74 bi 8004168 <_Heap_Walk+0x524>
); return false; } if ( block_size < min_block_size ) { 8003f9c: 51 f3 00 0a bgeu r15,r19,8003fc4 <_Heap_Walk+0x380> (*printer)(
8003fa0: 78 03 08 01 mvhi r3,0x801 8003fa4: b9 c0 08 00 mv r1,r14 8003fa8: 38 63 cf 98 ori r3,r3,0xcf98 8003fac: b9 60 20 00 mv r4,r11 8003fb0: b9 e0 28 00 mv r5,r15 8003fb4: ba 60 30 00 mv r6,r19 8003fb8: 34 02 00 01 mvi r2,1 8003fbc: d9 80 00 00 call r12 8003fc0: e0 00 00 09 bi 8003fe4 <_Heap_Walk+0x3a0>
); return false; } if ( next_block_begin <= block_begin ) { 8003fc4: 56 0b 00 0a bgu r16,r11,8003fec <_Heap_Walk+0x3a8> (*printer)(
8003fc8: 78 03 08 01 mvhi r3,0x801 8003fcc: b9 c0 08 00 mv r1,r14 8003fd0: 38 63 cf c4 ori r3,r3,0xcfc4 8003fd4: b9 60 20 00 mv r4,r11 8003fd8: ba 00 28 00 mv r5,r16 8003fdc: 34 02 00 01 mvi r2,1 8003fe0: d9 80 00 00 call r12 8003fe4: ba 20 08 00 mv r1,r17
"block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false;
8003fe8: e0 00 00 47 bi 8004104 <_Heap_Walk+0x4c0>
} if ( !_Heap_Is_prev_used( next_block ) ) {
8003fec: 2a 03 00 04 lw r3,(r16+4) 8003ff0: 20 63 00 01 andi r3,r3,0x1
8003ff4: 5c 60 00 35 bne r3,r0,80040c8 <_Heap_Walk+0x484> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED;
8003ff8: 29 6f 00 04 lw r15,(r11+4)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)(
8003ffc: 29 65 00 0c lw r5,(r11+12)
return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next;
8004000: 29 a1 00 08 lw r1,(r13+8)
- HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
8004004: a1 fb 88 00 and r17,r15,fp
return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev;
8004008: 29 a3 00 0c lw r3,(r13+12)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset);
800400c: b5 71 50 00 add r10,r11,r17
return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next;
8004010: ba a0 30 00 mv r6,r21
8004014: 44 a1 00 04 be r5,r1,8004024 <_Heap_Walk+0x3e0> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""),
8004018: ba 80 30 00 mv r6,r20
800401c: 5c ad 00 02 bne r5,r13,8004024 <_Heap_Walk+0x3e0>
8004020: ba c0 30 00 mv r6,r22
Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)(
8004024: 29 67 00 08 lw r7,(r11+8) 8004028: ba e0 40 00 mv r8,r23
800402c: 44 e3 00 04 be r7,r3,800403c <_Heap_Walk+0x3f8> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "")
8004030: ba 80 40 00 mv r8,r20
8004034: 5c ed 00 02 bne r7,r13,800403c <_Heap_Walk+0x3f8>
8004038: bb 00 40 00 mv r8,r24
Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)(
800403c: 78 03 08 01 mvhi r3,0x801 8004040: 5b 8a 00 54 sw (sp+84),r10 8004044: b9 c0 08 00 mv r1,r14 8004048: 34 02 00 00 mvi r2,0 800404c: 38 63 d0 28 ori r3,r3,0xd028 8004050: b9 60 20 00 mv r4,r11 8004054: d9 80 00 00 call r12
block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) {
8004058: 2b 8a 00 54 lw r10,(sp+84) 800405c: 29 46 00 00 lw r6,(r10+0)
8004060: 46 26 00 0a be r17,r6,8004088 <_Heap_Walk+0x444> (*printer)(
8004064: 78 03 08 01 mvhi r3,0x801 8004068: b9 c0 08 00 mv r1,r14 800406c: 38 63 d0 54 ori r3,r3,0xd054 8004070: b9 60 20 00 mv r4,r11 8004074: ba 20 28 00 mv r5,r17 8004078: b9 40 38 00 mv r7,r10 800407c: 34 02 00 01 mvi r2,1 8004080: d9 80 00 00 call r12 8004084: e0 00 00 39 bi 8004168 <_Heap_Walk+0x524>
); return false; } if ( !prev_used ) {
8004088: 21 ef 00 01 andi r15,r15,0x1
800408c: 5d e0 00 09 bne r15,r0,80040b0 <_Heap_Walk+0x46c> (*printer)(
8004090: 78 03 08 01 mvhi r3,0x801 8004094: b9 c0 08 00 mv r1,r14 8004098: 38 63 d0 90 ori r3,r3,0xd090 800409c: b9 60 20 00 mv r4,r11 80040a0: 34 02 00 01 mvi r2,1 80040a4: d9 80 00 00 call r12 80040a8: b9 e0 08 00 mv r1,r15 80040ac: e0 00 00 16 bi 8004104 <_Heap_Walk+0x4c0> 80040b0: 29 a3 00 08 lw r3,(r13+8) 80040b4: e0 00 00 03 bi 80040c0 <_Heap_Walk+0x47c>
{ const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { 80040b8: 44 6b 00 04 be r3,r11,80040c8 <_Heap_Walk+0x484> return true; } free_block = free_block->next;
80040bc: 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 ) { 80040c0: 5c 6d ff fe bne r3,r13,80040b8 <_Heap_Walk+0x474>
80040c4: e0 00 00 23 bi 8004150 <_Heap_Walk+0x50c> 80040c8: ba 00 58 00 mv r11,r16 80040cc: e0 00 00 0c bi 80040fc <_Heap_Walk+0x4b8>
" (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "")
80040d0: 78 18 08 01 mvhi r24,0x801 80040d4: 78 14 08 01 mvhi r20,0x801
Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)(
80040d8: 78 17 08 01 mvhi r23,0x801
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""),
80040dc: 78 16 08 01 mvhi r22,0x801 80040e0: 78 15 08 01 mvhi r21,0x801
block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "")
80040e4: 3b 18 d0 1c ori r24,r24,0xd01c 80040e8: 3a 94 d0 8c ori r20,r20,0xd08c
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)(
80040ec: 3a f7 d0 10 ori r23,r23,0xd010
"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)" : ""),
80040f0: 3a d6 d0 04 ori r22,r22,0xd004 80040f4: 3a b5 cf f8 ori r21,r21,0xcff8
- 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;
80040f8: 34 1b ff fe mvi fp,-2
if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) {
80040fc: 5d 72 ff 7c bne r11,r18,8003eec <_Heap_Walk+0x2a8> <== NEVER TAKEN
8004100: 34 01 00 01 mvi r1,1
block = next_block; } return true; }
8004104: 2b 9d 00 10 lw ra,(sp+16) 8004108: 2b 8b 00 50 lw r11,(sp+80) 800410c: 2b 8c 00 4c lw r12,(sp+76) 8004110: 2b 8d 00 48 lw r13,(sp+72) 8004114: 2b 8e 00 44 lw r14,(sp+68) 8004118: 2b 8f 00 40 lw r15,(sp+64) 800411c: 2b 90 00 3c lw r16,(sp+60) 8004120: 2b 91 00 38 lw r17,(sp+56) 8004124: 2b 92 00 34 lw r18,(sp+52) 8004128: 2b 93 00 30 lw r19,(sp+48) 800412c: 2b 94 00 2c lw r20,(sp+44) 8004130: 2b 95 00 28 lw r21,(sp+40) 8004134: 2b 96 00 24 lw r22,(sp+36) 8004138: 2b 97 00 20 lw r23,(sp+32) 800413c: 2b 98 00 1c lw r24,(sp+28) 8004140: 2b 99 00 18 lw r25,(sp+24) 8004144: 2b 9b 00 14 lw fp,(sp+20) 8004148: 37 9c 00 54 addi sp,sp,84 800414c: c3 a0 00 00 ret
return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)(
8004150: 78 03 08 01 mvhi r3,0x801 8004154: b9 c0 08 00 mv r1,r14 8004158: 38 63 d0 c0 ori r3,r3,0xd0c0 800415c: b9 60 20 00 mv r4,r11 8004160: 34 02 00 01 mvi r2,1 8004164: d9 80 00 00 call r12 8004168: 34 01 00 00 mvi r1,0 800416c: e3 ff ff e6 bi 8004104 <_Heap_Walk+0x4c0>
0800270c <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) {
800270c: 37 9c ff e8 addi sp,sp,-24 8002710: 5b 8b 00 18 sw (sp+24),r11 8002714: 5b 8c 00 14 sw (sp+20),r12 8002718: 5b 8d 00 10 sw (sp+16),r13 800271c: 5b 8e 00 0c sw (sp+12),r14 8002720: 5b 8f 00 08 sw (sp+8),r15 8002724: 5b 9d 00 04 sw (sp+4),ra
uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table;
8002728: 78 01 08 01 mvhi r1,0x801 800272c: 38 21 d0 c4 ori r1,r1,0xd0c4
drivers_in_table = Configuration.number_of_device_drivers; number_of_drivers = Configuration.maximum_drivers;
8002730: 28 2b 00 2c lw r11,(r1+44)
rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; drivers_in_table = Configuration.number_of_device_drivers;
8002734: 28 2d 00 30 lw r13,(r1+48)
uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table;
8002738: 28 2f 00 34 lw r15,(r1+52)
/* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 800273c: 51 ab 00 02 bgeu r13,r11,8002744 <_IO_Manager_initialization+0x38> /* * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) {
8002740: 5d 6d 00 08 bne r11,r13,8002760 <_IO_Manager_initialization+0x54><== ALWAYS TAKEN
_IO_Driver_address_table = driver_table;
8002744: 78 02 08 01 mvhi r2,0x801
_IO_Number_of_drivers = number_of_drivers;
8002748: 78 01 08 01 mvhi r1,0x801
* If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table;
800274c: 38 42 e1 94 ori r2,r2,0xe194
_IO_Number_of_drivers = number_of_drivers;
8002750: 38 21 e1 90 ori r1,r1,0xe190
* If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table;
8002754: 58 4f 00 00 sw (r2+0),r15
_IO_Number_of_drivers = number_of_drivers;
8002758: 58 2d 00 00 sw (r1+0),r13
return;
800275c: e0 00 00 1b bi 80027c8 <_IO_Manager_initialization+0xbc>
* have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers )
8002760: b5 6b 08 00 add r1,r11,r11 8002764: 34 02 00 03 mvi r2,3 8002768: b4 2b 08 00 add r1,r1,r11 800276c: fb ff f6 a1 calli 80001f0 <__ashlsi3> 8002770: b8 20 60 00 mv r12,r1
/* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *)
8002774: f8 00 0c 86 calli 800598c <_Workspace_Allocate_or_fatal_error> 8002778: 78 04 08 01 mvhi r4,0x801
_Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers;
800277c: 78 05 08 01 mvhi r5,0x801
/* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *)
8002780: 38 84 e1 94 ori r4,r4,0xe194
_Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers;
8002784: 38 a5 e1 90 ori r5,r5,0xe190
memset(
8002788: 34 02 00 00 mvi r2,0 800278c: b9 80 18 00 mv r3,r12
_IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers;
8002790: 58 ab 00 00 sw (r5+0),r11
_IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index];
8002794: b8 40 60 00 mv r12,r2
/* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *)
8002798: 58 81 00 00 sw (r4+0),r1 800279c: b8 20 70 00 mv r14,r1
_IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index];
80027a0: b9 80 58 00 mv r11,r12
_Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset(
80027a4: f8 00 2a 6a calli 800d14c <memset>
_IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ )
80027a8: e0 00 00 04 bi 80027b8 <_IO_Manager_initialization+0xac>
_IO_Driver_address_table[index] = driver_table[index];
80027ac: f8 00 2a 0a calli 800cfd4 <memcpy>
memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ )
80027b0: 35 6b 00 01 addi r11,r11,1 80027b4: 35 8c 00 18 addi r12,r12,24
_IO_Driver_address_table[index] = driver_table[index];
80027b8: b5 cc 08 00 add r1,r14,r12 80027bc: b5 ec 10 00 add r2,r15,r12 80027c0: 34 03 00 18 mvi r3,24
memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 80027c4: 55 ab ff fa bgu r13,r11,80027ac <_IO_Manager_initialization+0xa0> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; }
80027c8: 2b 9d 00 04 lw ra,(sp+4) 80027cc: 2b 8b 00 18 lw r11,(sp+24) 80027d0: 2b 8c 00 14 lw r12,(sp+20) 80027d4: 2b 8d 00 10 lw r13,(sp+16) 80027d8: 2b 8e 00 0c lw r14,(sp+12) 80027dc: 2b 8f 00 08 lw r15,(sp+8) 80027e0: 37 9c 00 18 addi sp,sp,24 80027e4: c3 a0 00 00 ret
08003430 <_ISR_Handler_initialization>: * * Output parameters: NONE */ void _ISR_Handler_initialization( void ) {
8003430: 37 9c ff f4 addi sp,sp,-12 8003434: 5b 8b 00 0c sw (sp+12),r11 8003438: 5b 8c 00 08 sw (sp+8),r12 800343c: 5b 9d 00 04 sw (sp+4),ra
_ISR_Signals_to_thread_executing = false;
8003440: 78 03 08 01 mvhi r3,0x801
_ISR_Nest_level = 0;
8003444: 78 02 08 01 mvhi r2,0x801
* Output parameters: NONE */ void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false;
8003448: 34 04 00 00 mvi r4,0 800344c: 38 63 d9 f8 ori r3,r3,0xd9f8
_ISR_Nest_level = 0;
8003450: 38 42 d9 3c ori r2,r2,0xd93c
* Output parameters: NONE */ void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false;
8003454: 30 64 00 00 sb (r3+0),r4
_ISR_Nest_level = 0;
8003458: 58 44 00 00 sw (r2+0),r4
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE) _ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
800345c: 34 01 00 80 mvi r1,128
void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = false; _ISR_Nest_level = 0;
8003460: b8 80 60 00 mv r12,r4
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE) _ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
8003464: f8 00 09 4a calli 800598c <_Workspace_Allocate_or_fatal_error>
_CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) )
8003468: 78 0b 08 01 mvhi r11,0x801 800346c: 78 02 08 01 mvhi r2,0x801 8003470: 38 42 d0 bc ori r2,r2,0xd0bc 8003474: 39 6b d0 c4 ori r11,r11,0xd0c4 8003478: 28 44 00 00 lw r4,(r2+0) 800347c: 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(
8003480: 78 02 08 01 mvhi r2,0x801 8003484: 38 42 d9 20 ori r2,r2,0xd920 8003488: 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) )
800348c: 50 64 00 05 bgeu r3,r4,80034a0 <_ISR_Handler_initialization+0x70><== ALWAYS TAKEN
_Internal_error_Occurred(
8003490: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8003494: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8003498: 34 03 00 05 mvi r3,5 <== NOT EXECUTED 800349c: fb ff ff d6 calli 80033f4 <_Internal_error_Occurred> <== NOT EXECUTED
INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
80034a0: b8 60 08 00 mv r1,r3 80034a4: f8 00 09 3a calli 800598c <_Workspace_Allocate_or_fatal_error>
Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset(
80034a8: 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(
80034ac: 78 02 08 01 mvhi r2,0x801
Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset(
80034b0: 78 03 08 01 mvhi r3,0x801 80034b4: 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(
80034b8: 38 42 d8 b4 ori r2,r2,0xd8b4
Configuration.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset(
80034bc: 38 63 d8 38 ori r3,r3,0xd838 80034c0: 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(
80034c4: 58 41 00 00 sw (r2+0),r1
#if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE ) _CPU_Install_interrupt_stack(); #endif }
80034c8: 2b 9d 00 04 lw ra,(sp+4) 80034cc: 2b 8b 00 0c lw r11,(sp+12) 80034d0: 2b 8c 00 08 lw r12,(sp+8) 80034d4: 37 9c 00 0c addi sp,sp,12 80034d8: c3 a0 00 00 ret
080034dc <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) {
80034dc: 37 9c ff ec addi sp,sp,-20 80034e0: 5b 8b 00 14 sw (sp+20),r11 80034e4: 5b 8c 00 10 sw (sp+16),r12 80034e8: 5b 8d 00 0c sw (sp+12),r13 80034ec: 5b 8e 00 08 sw (sp+8),r14 80034f0: 5b 9d 00 04 sw (sp+4),ra 80034f4: b8 20 58 00 mv r11,r1
* If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 )
80034f8: 28 21 00 18 lw r1,(r1+24) 80034fc: b8 20 60 00 mv r12,r1
8003500: 44 20 00 20 be r1,r0,8003580 <_Objects_Allocate+0xa4> <== NEVER TAKEN
/* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
8003504: 35 6d 00 20 addi r13,r11,32 8003508: b9 a0 08 00 mv r1,r13 800350c: f8 00 15 3d calli 8008a00 <_Chain_Get> 8003510: b8 20 60 00 mv r12,r1
if ( information->auto_extend ) {
8003514: 41 61 00 12 lbu r1,(r11+18)
/* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
8003518: b9 80 70 00 mv r14,r12
if ( information->auto_extend ) { 800351c: 44 20 00 19 be r1,r0,8003580 <_Objects_Allocate+0xa4> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 8003520: 5d 80 00 07 bne r12,r0,800353c <_Objects_Allocate+0x60> _Objects_Extend_information( information );
8003524: b9 60 08 00 mv r1,r11 8003528: f8 00 00 1e calli 80035a0 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
800352c: b9 a0 08 00 mv r1,r13 8003530: f8 00 15 34 calli 8008a00 <_Chain_Get> 8003534: b8 20 60 00 mv r12,r1
} if ( the_object ) { 8003538: 44 2e 00 12 be r1,r14,8003580 <_Objects_Allocate+0xa4> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) -
800353c: 29 83 00 08 lw r3,(r12+8) 8003540: 29 61 00 08 lw r1,(r11+8)
_Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--;
8003544: 2d 62 00 14 lhu r2,(r11+20)
} if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) -
8003548: 20 63 ff ff andi r3,r3,0xffff 800354c: 20 21 ff ff andi r1,r1,0xffff
_Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--;
8003550: c8 61 08 00 sub r1,r3,r1 8003554: f8 00 5c 65 calli 801a6e8 <__udivsi3> 8003558: 34 02 00 02 mvi r2,2 800355c: fb ff f3 25 calli 80001f0 <__ashlsi3> 8003560: 29 62 00 30 lw r2,(r11+48)
information->inactive--;
8003564: 2d 63 00 2c lhu r3,(r11+44)
block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--;
8003568: b4 41 08 00 add r1,r2,r1 800356c: 28 22 00 00 lw r2,(r1+0)
information->inactive--;
8003570: 34 63 ff ff addi r3,r3,-1 8003574: 0d 63 00 2c sh (r11+44),r3
block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--;
8003578: 34 42 ff ff addi r2,r2,-1 800357c: 58 22 00 00 sw (r1+0),r2
information->inactive--; } } return the_object; }
8003580: b9 80 08 00 mv r1,r12 8003584: 2b 9d 00 04 lw ra,(sp+4) 8003588: 2b 8b 00 14 lw r11,(sp+20) 800358c: 2b 8c 00 10 lw r12,(sp+16) 8003590: 2b 8d 00 0c lw r13,(sp+12) 8003594: 2b 8e 00 08 lw r14,(sp+8) 8003598: 37 9c 00 14 addi sp,sp,20 800359c: c3 a0 00 00 ret
080035a0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) {
80035a0: 37 9c ff c4 addi sp,sp,-60 80035a4: 5b 8b 00 30 sw (sp+48),r11 80035a8: 5b 8c 00 2c sw (sp+44),r12 80035ac: 5b 8d 00 28 sw (sp+40),r13 80035b0: 5b 8e 00 24 sw (sp+36),r14 80035b4: 5b 8f 00 20 sw (sp+32),r15 80035b8: 5b 90 00 1c sw (sp+28),r16 80035bc: 5b 91 00 18 sw (sp+24),r17 80035c0: 5b 92 00 14 sw (sp+20),r18 80035c4: 5b 93 00 10 sw (sp+16),r19 80035c8: 5b 94 00 0c sw (sp+12),r20 80035cc: 5b 95 00 08 sw (sp+8),r21 80035d0: 5b 9d 00 04 sw (sp+4),ra
/* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id );
80035d4: 28 2e 00 08 lw r14,(r1+8)
index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL )
80035d8: 28 2f 00 34 lw r15,(r1+52)
*/ void _Objects_Extend_information( Objects_Information *information ) {
80035dc: b8 20 58 00 mv r11,r1
/* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id );
80035e0: 21 ce ff ff andi r14,r14,0xffff
index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL )
80035e4: b9 e0 68 00 mv r13,r15 80035e8: b9 c0 60 00 mv r12,r14 80035ec: b9 e0 88 00 mv r17,r15
80035f0: 45 e0 00 0f be r15,r0,800362c <_Objects_Extend_information+0x8c> block_count = 0; else { block_count = information->maximum / information->allocation_size;
80035f4: 2c 30 00 14 lhu r16,(r1+20) 80035f8: 2c 21 00 10 lhu r1,(r1+16) 80035fc: 34 0d 00 00 mvi r13,0 8003600: ba 00 10 00 mv r2,r16 8003604: f8 00 5c 39 calli 801a6e8 <__udivsi3> 8003608: 20 31 ff ff andi r17,r1,0xffff 800360c: b9 e0 08 00 mv r1,r15
for ( ; block < block_count; block++ ) {
8003610: e0 00 00 06 bi 8003628 <_Objects_Extend_information+0x88>
if ( information->object_blocks[ block ] == NULL )
8003614: 28 22 00 00 lw r2,(r1+0) 8003618: 34 21 00 04 addi r1,r1,4
800361c: 44 40 00 04 be r2,r0,800362c <_Objects_Extend_information+0x8c>
8003620: b5 90 60 00 add r12,r12,r16
if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) {
8003624: 35 ad 00 01 addi r13,r13,1
8003628: 56 2d ff fb bgu r17,r13,8003614 <_Objects_Extend_information+0x74> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size;
800362c: 2d 61 00 14 lhu r1,(r11+20) 8003630: 2d 74 00 10 lhu r20,(r11+16)
/* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
8003634: 38 02 ff ff mvu r2,0xffff
else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size;
8003638: b4 34 a0 00 add r20,r1,r20
/* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
800363c: 56 82 00 97 bgu r20,r2,8003898 <_Objects_Extend_information+0x2f8><== NEVER TAKEN
/* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size;
8003640: 29 62 00 18 lw r2,(r11+24) 8003644: f8 00 5b aa calli 801a4ec <__mulsi3>
if ( information->auto_extend ) {
8003648: 41 62 00 12 lbu r2,(r11+18)
800364c: 44 40 00 05 be r2,r0,8003660 <_Objects_Extend_information+0xc0> new_object_block = _Workspace_Allocate( block_size );
8003650: f8 00 08 de calli 80059c8 <_Workspace_Allocate> 8003654: b8 20 78 00 mv r15,r1
if ( !new_object_block ) 8003658: 5c 20 00 04 bne r1,r0,8003668 <_Objects_Extend_information+0xc8>
800365c: e0 00 00 8f bi 8003898 <_Objects_Extend_information+0x2f8>
return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
8003660: f8 00 08 cb calli 800598c <_Workspace_Allocate_or_fatal_error> 8003664: b8 20 78 00 mv r15,r1
} /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) {
8003668: 2d 61 00 10 lhu r1,(r11+16)
800366c: 54 2c 00 60 bgu r1,r12,80037ec <_Objects_Extend_information+0x24c> */ /* * Up the block count and maximum */ block_count++;
8003670: 36 32 00 01 addi r18,r17,1
* Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size );
8003674: b6 52 08 00 add r1,r18,r18 8003678: b6 8e 10 00 add r2,r20,r14 800367c: b4 32 08 00 add r1,r1,r18 8003680: b4 41 08 00 add r1,r2,r1 8003684: 34 02 00 02 mvi r2,2 8003688: fb ff f2 da calli 80001f0 <__ashlsi3> 800368c: f8 00 08 cf calli 80059c8 <_Workspace_Allocate> 8003690: b8 20 80 00 mv r16,r1
if ( !object_blocks ) { 8003694: 5c 20 00 04 bne r1,r0,80036a4 <_Objects_Extend_information+0x104> _Workspace_Free( new_object_block );
8003698: b9 e0 08 00 mv r1,r15 800369c: f8 00 08 d6 calli 80059f4 <_Workspace_Free>
return;
80036a0: e0 00 00 7e bi 8003898 <_Objects_Extend_information+0x2f8>
} /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset(
80036a4: ba 40 08 00 mv r1,r18 80036a8: 34 02 00 02 mvi r2,2 80036ac: fb ff f2 d1 calli 80001f0 <__ashlsi3>
* Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) {
80036b0: 2d 62 00 10 lhu r2,(r11+16)
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset);
80036b4: b6 01 98 00 add r19,r16,r1 80036b8: b6 61 90 00 add r18,r19,r1
80036bc: 54 4e 00 05 bgu r2,r14,80036d0 <_Objects_Extend_information+0x130>
80036c0: 34 01 00 00 mvi r1,0 80036c4: ba 40 10 00 mv r2,r18
/* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL;
80036c8: b8 20 18 00 mv r3,r1 80036cc: e0 00 00 19 bi 8003730 <_Objects_Extend_information+0x190>
* separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) );
80036d0: ba 20 08 00 mv r1,r17 80036d4: 34 02 00 02 mvi r2,2 80036d8: fb ff f2 c6 calli 80001f0 <__ashlsi3>
/* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks,
80036dc: 29 62 00 34 lw r2,(r11+52)
information->object_blocks, block_count * sizeof(void*) );
80036e0: b8 20 a8 00 mv r21,r1
/* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks,
80036e4: ba a0 18 00 mv r3,r21 80036e8: ba 00 08 00 mv r1,r16 80036ec: f8 00 26 3a calli 800cfd4 <memcpy>
information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block,
80036f0: 29 62 00 30 lw r2,(r11+48) 80036f4: ba a0 18 00 mv r3,r21 80036f8: ba 60 08 00 mv r1,r19 80036fc: f8 00 26 36 calli 800cfd4 <memcpy>
information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table,
8003700: 2d 61 00 10 lhu r1,(r11+16) 8003704: 34 02 00 02 mvi r2,2 8003708: b5 c1 08 00 add r1,r14,r1 800370c: fb ff f2 b9 calli 80001f0 <__ashlsi3> 8003710: 29 62 00 1c lw r2,(r11+28) 8003714: b8 20 18 00 mv r3,r1 8003718: ba 40 08 00 mv r1,r18 800371c: f8 00 26 2e calli 800cfd4 <memcpy> 8003720: e0 00 00 05 bi 8003734 <_Objects_Extend_information+0x194>
/* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL;
8003724: 58 43 00 00 sw (r2+0),r3
} else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) {
8003728: 34 21 00 01 addi r1,r1,1 800372c: 34 42 00 04 addi r2,r2,4
8003730: 55 c1 ff fd bgu r14,r1,8003724 <_Objects_Extend_information+0x184> } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL;
8003734: ba 20 08 00 mv r1,r17 8003738: 34 02 00 02 mvi r2,2 800373c: fb ff f2 ad calli 80001f0 <__ashlsi3>
inactive_per_block[block_count] = 0;
8003740: b6 61 10 00 add r2,r19,r1
} /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL;
8003744: 34 0e 00 00 mvi r14,0 8003748: b6 01 08 00 add r1,r16,r1
inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base );
800374c: 2d 71 00 14 lhu r17,(r11+20)
} /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL;
8003750: 58 2e 00 00 sw (r1+0),r14
inactive_per_block[block_count] = 0;
8003754: 58 4e 00 00 sw (r2+0),r14
for ( index=index_base ; index < ( information->allocation_size + index_base );
8003758: b9 80 08 00 mv r1,r12 800375c: 34 02 00 02 mvi r2,2 8003760: fb ff f2 a4 calli 80001f0 <__ashlsi3> 8003764: b5 91 88 00 add r17,r12,r17 8003768: b6 41 08 00 add r1,r18,r1 800376c: b9 80 10 00 mv r2,r12
* Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ;
8003770: e0 00 00 04 bi 8003780 <_Objects_Extend_information+0x1e0>
index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL;
8003774: 58 2e 00 00 sw (r1+0),r14
object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) {
8003778: 34 42 00 01 addi r2,r2,1 800377c: 34 21 00 04 addi r1,r1,4
* Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 8003780: 56 22 ff fd bgu r17,r2,8003774 <_Objects_Extend_information+0x1d4> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level );
8003784: 90 00 88 00 rcsr r17,IE 8003788: 34 01 ff fe mvi r1,-2 800378c: a2 21 08 00 and r1,r17,r1 8003790: d0 01 00 00 wcsr IE,r1
information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id(
8003794: 29 61 00 00 lw r1,(r11+0)
old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum;
8003798: 22 94 ff ff andi r20,r20,0xffff 800379c: 0d 74 00 10 sh (r11+16),r20
_ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block;
80037a0: 59 73 00 30 sw (r11+48),r19
information->local_table = local_table;
80037a4: 59 72 00 1c sw (r11+28),r18
local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks;
80037a8: 29 6e 00 34 lw r14,(r11+52)
information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id(
80037ac: 34 02 00 18 mvi r2,24
_ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks;
80037b0: 59 70 00 34 sw (r11+52),r16
information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id(
80037b4: fb ff f2 8f calli 80001f0 <__ashlsi3> 80037b8: 78 02 00 01 mvhi r2,0x1 80037bc: 38 42 00 00 ori r2,r2,0x0 80037c0: b8 22 80 00 or r16,r1,r2 80037c4: 2d 61 00 04 lhu r1,(r11+4) 80037c8: 34 02 00 1b mvi r2,27 80037cc: fb ff f2 89 calli 80001f0 <__ashlsi3> 80037d0: ba 01 08 00 or r1,r16,r1 80037d4: b8 34 a0 00 or r20,r1,r20 80037d8: 59 74 00 0c sw (r11+12),r20
information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level );
80037dc: d0 11 00 00 wcsr IE,r17
if ( old_tables ) 80037e0: 45 c0 00 03 be r14,r0,80037ec <_Objects_Extend_information+0x24c> _Workspace_Free( old_tables );
80037e4: b9 c0 08 00 mv r1,r14 80037e8: f8 00 08 83 calli 80059f4 <_Workspace_Free>
} /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block;
80037ec: b9 a0 08 00 mv r1,r13 80037f0: 34 02 00 02 mvi r2,2 80037f4: fb ff f2 7f calli 80001f0 <__ashlsi3> 80037f8: b8 20 80 00 mv r16,r1 80037fc: 29 61 00 34 lw r1,(r11+52)
/* * Initialize objects .. add to a local chain first. */ _Chain_Initialize(
8003800: 2d 63 00 14 lhu r3,(r11+20) 8003804: 29 64 00 18 lw r4,(r11+24)
} /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block;
8003808: b4 30 08 00 add r1,r1,r16
/* * Initialize objects .. add to a local chain first. */ _Chain_Initialize(
800380c: 37 8e 00 34 addi r14,sp,52
} /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block;
8003810: 58 2f 00 00 sw (r1+0),r15
/* * Initialize objects .. add to a local chain first. */ _Chain_Initialize(
8003814: b9 e0 10 00 mv r2,r15 8003818: b9 c0 08 00 mv r1,r14
*/ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id(
800381c: 78 0d 00 01 mvhi r13,0x1
information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize(
8003820: f8 00 14 87 calli 8008a3c <_Chain_Initialize>
/* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
8003824: b9 c0 88 00 mv r17,r14
the_object->id = _Objects_Build_id(
8003828: 39 ad 00 00 ori r13,r13,0x0
information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node );
800382c: 35 6f 00 20 addi r15,r11,32
/* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
8003830: e0 00 00 0e bi 8003868 <_Objects_Extend_information+0x2c8>
the_object->id = _Objects_Build_id(
8003834: 29 61 00 00 lw r1,(r11+0) 8003838: fb ff f2 6e calli 80001f0 <__ashlsi3> 800383c: b8 2d 90 00 or r18,r1,r13 8003840: 2d 61 00 04 lhu r1,(r11+4) 8003844: 34 02 00 1b mvi r2,27 8003848: fb ff f2 6a calli 80001f0 <__ashlsi3> 800384c: ba 41 10 00 or r2,r18,r1 8003850: b8 4c 10 00 or r2,r2,r12 8003854: 59 c2 00 08 sw (r14+8),r2
information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node );
8003858: b9 e0 08 00 mv r1,r15 800385c: b9 c0 10 00 mv r2,r14 8003860: fb ff fc 97 calli 8002abc <_Chain_Append>
index++;
8003864: 35 8c 00 01 addi r12,r12,1
/* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
8003868: ba 20 08 00 mv r1,r17 800386c: f8 00 14 65 calli 8008a00 <_Chain_Get> 8003870: b8 20 70 00 mv r14,r1
the_object->id = _Objects_Build_id(
8003874: 34 02 00 18 mvi r2,24
/* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 8003878: 5c 20 ff ef bne r1,r0,8003834 <_Objects_Extend_information+0x294> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
800387c: 2d 62 00 14 lhu r2,(r11+20)
information->inactive =
8003880: 2d 61 00 2c lhu r1,(r11+44)
_Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
8003884: 29 63 00 30 lw r3,(r11+48)
information->inactive =
8003888: b4 41 08 00 add r1,r2,r1
_Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
800388c: b4 70 80 00 add r16,r3,r16
information->inactive =
8003890: 0d 61 00 2c sh (r11+44),r1
_Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
8003894: 5a 02 00 00 sw (r16+0),r2
information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); }
8003898: 2b 9d 00 04 lw ra,(sp+4) 800389c: 2b 8b 00 30 lw r11,(sp+48) 80038a0: 2b 8c 00 2c lw r12,(sp+44) 80038a4: 2b 8d 00 28 lw r13,(sp+40) 80038a8: 2b 8e 00 24 lw r14,(sp+36) 80038ac: 2b 8f 00 20 lw r15,(sp+32) 80038b0: 2b 90 00 1c lw r16,(sp+28) 80038b4: 2b 91 00 18 lw r17,(sp+24) 80038b8: 2b 92 00 14 lw r18,(sp+20) 80038bc: 2b 93 00 10 lw r19,(sp+16) 80038c0: 2b 94 00 0c lw r20,(sp+12) 80038c4: 2b 95 00 08 lw r21,(sp+8) 80038c8: 37 9c 00 3c addi sp,sp,60 80038cc: c3 a0 00 00 ret
080039c8 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) {
80039c8: 37 9c ff f4 addi sp,sp,-12 80039cc: 5b 8b 00 0c sw (sp+12),r11 80039d0: 5b 8c 00 08 sw (sp+8),r12 80039d4: 5b 9d 00 04 sw (sp+4),ra 80039d8: b8 40 58 00 mv r11,r2 80039dc: b8 20 60 00 mv r12,r1
Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 80039e0: 44 40 00 14 be r2,r0,8003a30 <_Objects_Get_information+0x68> /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api );
80039e4: f8 00 15 eb calli 8009190 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 ) 80039e8: 44 20 00 12 be r1,r0,8003a30 <_Objects_Get_information+0x68> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 80039ec: 55 61 00 11 bgu r11,r1,8003a30 <_Objects_Get_information+0x68> return NULL; if ( !_Objects_Information_table[ the_api ] )
80039f0: b9 80 08 00 mv r1,r12 80039f4: 34 02 00 02 mvi r2,2 80039f8: 78 0c 08 01 mvhi r12,0x801 80039fc: 39 8c d8 3c ori r12,r12,0xd83c 8003a00: fb ff f1 fc calli 80001f0 <__ashlsi3> 8003a04: b5 81 08 00 add r1,r12,r1 8003a08: 28 2c 00 00 lw r12,(r1+0)
8003a0c: 45 80 00 09 be r12,r0,8003a30 <_Objects_Get_information+0x68><== NEVER TAKEN
return NULL; info = _Objects_Information_table[ the_api ][ the_class ];
8003a10: b9 60 08 00 mv r1,r11 8003a14: 34 02 00 02 mvi r2,2 8003a18: fb ff f1 f6 calli 80001f0 <__ashlsi3> 8003a1c: b5 81 08 00 add r1,r12,r1 8003a20: 28 21 00 00 lw r1,(r1+0)
if ( !info )
8003a24: 44 20 00 04 be r1,r0,8003a34 <_Objects_Get_information+0x6c><== NEVER TAKEN
* In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 )
8003a28: 2c 22 00 10 lhu r2,(r1+16)
8003a2c: 5c 40 00 02 bne r2,r0,8003a34 <_Objects_Get_information+0x6c>
8003a30: 34 01 00 00 mvi r1,0
return NULL; #endif return info; }
8003a34: 2b 9d 00 04 lw ra,(sp+4) 8003a38: 2b 8b 00 0c lw r11,(sp+12) 8003a3c: 2b 8c 00 08 lw r12,(sp+8) 8003a40: 37 9c 00 0c addi sp,sp,12 8003a44: c3 a0 00 00 ret
08012618 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) {
8012618: 37 9c ff e0 addi sp,sp,-32 801261c: 5b 8b 00 14 sw (sp+20),r11 8012620: 5b 8c 00 10 sw (sp+16),r12 8012624: 5b 8d 00 0c sw (sp+12),r13 8012628: 5b 8e 00 08 sw (sp+8),r14 801262c: 5b 9d 00 04 sw (sp+4),ra 8012630: b8 40 68 00 mv r13,r2 8012634: b8 60 58 00 mv r11,r3
char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 )
8012638: 44 40 00 3e be r2,r0,8012730 <_Objects_Get_name_as_string+0x118><== NEVER TAKEN
return NULL; if ( name == NULL )
801263c: 44 60 00 3e be r3,r0,8012734 <_Objects_Get_name_as_string+0x11c><== NEVER TAKEN
return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
8012640: b8 20 60 00 mv r12,r1
8012644: 5c 20 00 05 bne r1,r0,8012658 <_Objects_Get_name_as_string+0x40>
8012648: 78 01 08 03 mvhi r1,0x803 801264c: 38 21 02 80 ori r1,r1,0x280 8012650: 28 21 00 00 lw r1,(r1+0) 8012654: 28 2c 00 08 lw r12,(r1+8)
information = _Objects_Get_information_id( tmpId );
8012658: b9 80 08 00 mv r1,r12 801265c: fb ff db 82 calli 8009464 <_Objects_Get_information_id> 8012660: b8 20 70 00 mv r14,r1
if ( !information )
8012664: 44 20 00 33 be r1,r0,8012730 <_Objects_Get_name_as_string+0x118><== NEVER TAKEN
return NULL; the_object = _Objects_Get( information, tmpId, &location );
8012668: b9 80 10 00 mv r2,r12 801266c: 37 83 00 20 addi r3,sp,32 8012670: fb ff db db calli 80095dc <_Objects_Get>
switch ( location ) {
8012674: 2b 82 00 20 lw r2,(sp+32)
8012678: 5c 40 00 2e bne r2,r0,8012730 <_Objects_Get_name_as_string+0x118><== NEVER TAKEN
return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) {
801267c: 41 ce 00 38 lbu r14,(r14+56)
8012680: 45 c2 00 05 be r14,r2,8012694 <_Objects_Get_name_as_string+0x7c> s = the_object->name.name_p;
8012684: 28 26 00 0c lw r6,(r1+12)
lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) {
8012688: b9 60 08 00 mv r1,r11
801268c: 5c c0 00 12 bne r6,r0,80126d4 <_Objects_Get_name_as_string+0xbc>
8012690: e0 00 00 24 bi 8012720 <_Objects_Get_name_as_string+0x108>
if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32;
8012694: 28 2c 00 0c lw r12,(r1+12)
lname[ 0 ] = (u32_name >> 24) & 0xff;
8012698: 34 02 00 18 mvi r2,24 801269c: b9 80 08 00 mv r1,r12 80126a0: fb ff b8 46 calli 80007b8 <__lshrsi3> 80126a4: 33 81 00 18 sb (sp+24),r1
lname[ 1 ] = (u32_name >> 16) & 0xff;
80126a8: 34 02 00 10 mvi r2,16 80126ac: b9 80 08 00 mv r1,r12 80126b0: fb ff b8 42 calli 80007b8 <__lshrsi3> 80126b4: 33 81 00 19 sb (sp+25),r1
lname[ 2 ] = (u32_name >> 8) & 0xff;
80126b8: 34 02 00 08 mvi r2,8 80126bc: b9 80 08 00 mv r1,r12 80126c0: fb ff b8 3e calli 80007b8 <__lshrsi3> 80126c4: 33 81 00 1a sb (sp+26),r1
lname[ 3 ] = (u32_name >> 0) & 0xff;
80126c8: 33 8c 00 1b sb (sp+27),r12
lname[ 4 ] = '\0';
80126cc: 33 8e 00 1c sb (sp+28),r14 80126d0: 37 86 00 18 addi r6,sp,24
} d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*';
80126d4: 78 04 08 02 mvhi r4,0x802
s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
80126d8: 35 ad ff ff addi r13,r13,-1
*d = (isprint((unsigned char)*s)) ? *s : '*';
80126dc: 38 84 f3 b0 ori r4,r4,0xf3b0
lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0';
80126e0: b9 60 08 00 mv r1,r11 80126e4: 34 03 00 00 mvi r3,0 80126e8: e0 00 00 09 bi 801270c <_Objects_Get_name_as_string+0xf4>
} d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*';
80126ec: 28 82 00 00 lw r2,(r4+0) 80126f0: b4 45 10 00 add r2,r2,r5 80126f4: 40 42 00 01 lbu r2,(r2+1) 80126f8: 20 42 00 97 andi r2,r2,0x97
80126fc: 5c 40 00 02 bne r2,r0,8012704 <_Objects_Get_name_as_string+0xec>
8012700: 34 05 00 2a mvi r5,42 8012704: 30 25 00 00 sb (r1+0),r5
s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
8012708: 34 21 00 01 addi r1,r1,1 801270c: b4 c3 10 00 add r2,r6,r3
8012710: 50 6d 00 04 bgeu r3,r13,8012720 <_Objects_Get_name_as_string+0x108>
8012714: 40 45 00 00 lbu r5,(r2+0) 8012718: 34 63 00 01 addi r3,r3,1
801271c: 5c a0 ff f4 bne r5,r0,80126ec <_Objects_Get_name_as_string+0xd4> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0';
8012720: 34 02 00 00 mvi r2,0 8012724: 30 22 00 00 sb (r1+0),r2
_Thread_Enable_dispatch();
8012728: fb ff de d0 calli 800a268 <_Thread_Enable_dispatch>
return name;
801272c: e0 00 00 02 bi 8012734 <_Objects_Get_name_as_string+0x11c> 8012730: 34 0b 00 00 mvi r11,0
} return NULL; /* unreachable path */ }
8012734: b9 60 08 00 mv r1,r11 8012738: 2b 9d 00 04 lw ra,(sp+4) 801273c: 2b 8b 00 14 lw r11,(sp+20) 8012740: 2b 8c 00 10 lw r12,(sp+16) 8012744: 2b 8d 00 0c lw r13,(sp+12) 8012748: 2b 8e 00 08 lw r14,(sp+8) 801274c: 37 9c 00 20 addi sp,sp,32 8012750: c3 a0 00 00 ret
08016ee8 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) {
8016ee8: 37 9c ff f4 addi sp,sp,-12 8016eec: 5b 8b 00 0c sw (sp+12),r11 8016ef0: 5b 8c 00 08 sw (sp+8),r12 8016ef4: 5b 9d 00 04 sw (sp+4),ra 8016ef8: b8 20 20 00 mv r4,r1
/* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1;
8016efc: 28 21 00 08 lw r1,(r1+8)
if ( information->maximum >= index ) {
8016f00: 2c 85 00 10 lhu r5,(r4+16)
Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) {
8016f04: b8 60 58 00 mv r11,r3
/* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1;
8016f08: c8 41 08 00 sub r1,r2,r1 8016f0c: 34 21 00 01 addi r1,r1,1
if ( information->maximum >= index ) { 8016f10: 54 25 00 0a bgu r1,r5,8016f38 <_Objects_Get_no_protection+0x50> if ( (the_object = information->local_table[ index ]) != NULL ) {
8016f14: 28 8c 00 1c lw r12,(r4+28) 8016f18: 34 02 00 02 mvi r2,2 8016f1c: fb ff db df calli 800de98 <__ashlsi3> 8016f20: b5 81 08 00 add r1,r12,r1 8016f24: 28 21 00 00 lw r1,(r1+0)
8016f28: 44 20 00 04 be r1,r0,8016f38 <_Objects_Get_no_protection+0x50><== NEVER TAKEN
*location = OBJECTS_LOCAL;
8016f2c: 34 02 00 00 mvi r2,0 8016f30: 59 62 00 00 sw (r11+0),r2
return the_object;
8016f34: e0 00 00 04 bi 8016f44 <_Objects_Get_no_protection+0x5c>
/* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR;
8016f38: 34 01 00 01 mvi r1,1 8016f3c: 59 61 00 00 sw (r11+0),r1 8016f40: 34 01 00 00 mvi r1,0
return NULL; }
8016f44: 2b 9d 00 04 lw ra,(sp+4) 8016f48: 2b 8b 00 0c lw r11,(sp+12) 8016f4c: 2b 8c 00 08 lw r12,(sp+8) 8016f50: 37 9c 00 0c addi sp,sp,12 8016f54: c3 a0 00 00 ret
08009678 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) {
8009678: 37 9c ff ec addi sp,sp,-20 800967c: 5b 8b 00 10 sw (sp+16),r11 8009680: 5b 8c 00 0c sw (sp+12),r12 8009684: 5b 8d 00 08 sw (sp+8),r13 8009688: 5b 9d 00 04 sw (sp+4),ra 800968c: b8 40 68 00 mv r13,r2
/* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
8009690: b8 20 58 00 mv r11,r1
8009694: 5c 20 00 05 bne r1,r0,80096a8 <_Objects_Id_to_name+0x30>
8009698: 78 01 08 03 mvhi r1,0x803 800969c: 38 21 02 80 ori r1,r1,0x280 80096a0: 28 21 00 00 lw r1,(r1+0) 80096a4: 28 2b 00 08 lw r11,(r1+8)
*/ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
80096a8: 34 02 00 18 mvi r2,24 80096ac: b9 60 08 00 mv r1,r11 80096b0: fb ff dc 42 calli 80007b8 <__lshrsi3> 80096b4: 20 21 00 07 andi r1,r1,0x7
*/ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST )
80096b8: 34 23 ff ff addi r3,r1,-1 80096bc: 34 02 00 03 mvi r2,3
80096c0: 54 62 00 15 bgu r3,r2,8009714 <_Objects_Id_to_name+0x9c>
80096c4: e0 00 00 1b bi 8009730 <_Objects_Id_to_name+0xb8>
if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ];
80096c8: 34 02 00 1b mvi r2,27 80096cc: b9 60 08 00 mv r1,r11 80096d0: fb ff dc 3a calli 80007b8 <__lshrsi3> 80096d4: 34 02 00 02 mvi r2,2 80096d8: fb ff dc 10 calli 8000718 <__ashlsi3> 80096dc: b5 81 08 00 add r1,r12,r1 80096e0: 28 21 00 00 lw r1,(r1+0)
if ( !information )
80096e4: 44 20 00 0c be r1,r0,8009714 <_Objects_Id_to_name+0x9c> <== NEVER TAKEN
return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string )
80096e8: 40 2c 00 38 lbu r12,(r1+56)
80096ec: 5d 80 00 0a bne r12,r0,8009714 <_Objects_Id_to_name+0x9c> <== NEVER TAKEN
return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location );
80096f0: b9 60 10 00 mv r2,r11 80096f4: 37 83 00 14 addi r3,sp,20 80096f8: fb ff ff b9 calli 80095dc <_Objects_Get>
if ( !the_object ) 80096fc: 44 2c 00 06 be r1,r12,8009714 <_Objects_Id_to_name+0x9c> return OBJECTS_INVALID_ID; *name = the_object->name;
8009700: 28 21 00 0c lw r1,(r1+12) 8009704: 59 a1 00 00 sw (r13+0),r1
_Thread_Enable_dispatch();
8009708: f8 00 02 d8 calli 800a268 <_Thread_Enable_dispatch> 800970c: b9 80 08 00 mv r1,r12
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
8009710: e0 00 00 02 bi 8009718 <_Objects_Id_to_name+0xa0> 8009714: 34 01 00 03 mvi r1,3
}
8009718: 2b 9d 00 04 lw ra,(sp+4) 800971c: 2b 8b 00 10 lw r11,(sp+16) 8009720: 2b 8c 00 0c lw r12,(sp+12) 8009724: 2b 8d 00 08 lw r13,(sp+8) 8009728: 37 9c 00 14 addi sp,sp,20 800972c: c3 a0 00 00 ret
the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] )
8009730: 78 0c 08 03 mvhi r12,0x803 8009734: 34 02 00 02 mvi r2,2 8009738: 39 8c 01 5c ori r12,r12,0x15c 800973c: fb ff db f7 calli 8000718 <__ashlsi3> 8009740: b5 81 08 00 add r1,r12,r1 8009744: 28 2c 00 00 lw r12,(r1+0)
8009748: 5d 80 ff e0 bne r12,r0,80096c8 <_Objects_Id_to_name+0x50>
800974c: e3 ff ff f2 bi 8009714 <_Objects_Id_to_name+0x9c>
08003ec0 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) {
8003ec0: 37 9c ff e4 addi sp,sp,-28 8003ec4: 5b 8b 00 1c sw (sp+28),r11 8003ec8: 5b 8c 00 18 sw (sp+24),r12 8003ecc: 5b 8d 00 14 sw (sp+20),r13 8003ed0: 5b 8e 00 10 sw (sp+16),r14 8003ed4: 5b 8f 00 0c sw (sp+12),r15 8003ed8: 5b 90 00 08 sw (sp+8),r16 8003edc: 5b 9d 00 04 sw (sp+4),ra 8003ee0: b8 40 70 00 mv r14,r2
size_t length; const char *s; s = name; length = strnlen( name, information->name_length );
8003ee4: 2c 22 00 3a lhu r2,(r1+58)
bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) {
8003ee8: b8 20 68 00 mv r13,r1
size_t length; const char *s; s = name; length = strnlen( name, information->name_length );
8003eec: b8 60 08 00 mv r1,r3
bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) {
8003ef0: b8 60 58 00 mv r11,r3
size_t length; const char *s; s = name; length = strnlen( name, information->name_length );
8003ef4: f8 00 2a ce calli 800ea2c <strnlen> 8003ef8: b8 20 60 00 mv r12,r1
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) {
8003efc: 41 a1 00 38 lbu r1,(r13+56)
8003f00: 44 20 00 13 be r1,r0,8003f4c <_Objects_Set_name+0x8c> char *d; d = _Workspace_Allocate( length + 1 );
8003f04: 35 81 00 01 addi r1,r12,1 8003f08: f8 00 04 22 calli 8004f90 <_Workspace_Allocate> 8003f0c: b8 20 68 00 mv r13,r1
if ( !d )
8003f10: 45 a0 00 28 be r13,r0,8003fb0 <_Objects_Set_name+0xf0> <== NEVER TAKEN
return false; if ( the_object->name.name_p ) {
8003f14: 29 c1 00 0c lw r1,(r14+12)
8003f18: 44 20 00 04 be r1,r0,8003f28 <_Objects_Set_name+0x68> _Workspace_Free( (void *)the_object->name.name_p );
8003f1c: f8 00 04 28 calli 8004fbc <_Workspace_Free>
the_object->name.name_p = NULL;
8003f20: 34 01 00 00 mvi r1,0 8003f24: 59 c1 00 0c sw (r14+12),r1
} strncpy( d, name, length );
8003f28: b9 80 18 00 mv r3,r12 8003f2c: b9 60 10 00 mv r2,r11 8003f30: b9 a0 08 00 mv r1,r13 8003f34: f8 00 2a 8c calli 800e964 <strncpy>
d[length] = '\0';
8003f38: b5 ac 60 00 add r12,r13,r12 8003f3c: 34 01 00 00 mvi r1,0 8003f40: 31 81 00 00 sb (r12+0),r1
the_object->name.name_p = d;
8003f44: 59 cd 00 0c sw (r14+12),r13 8003f48: e0 00 00 19 bi 8003fac <_Objects_Set_name+0xec>
} else #endif { the_object->name.name_u32 = _Objects_Build_name(
8003f4c: 34 01 00 01 mvi r1,1 8003f50: 41 70 00 00 lbu r16,(r11+0)
8003f54: 50 2c 00 20 bgeu r1,r12,8003fd4 <_Objects_Set_name+0x114>
8003f58: 41 61 00 01 lbu r1,(r11+1) 8003f5c: 34 02 00 10 mvi r2,16 8003f60: fb ff f1 2a calli 8000408 <__ashlsi3> 8003f64: b8 20 68 00 mv r13,r1 8003f68: 34 01 00 02 mvi r1,2
8003f6c: 50 2c 00 1c bgeu r1,r12,8003fdc <_Objects_Set_name+0x11c>
8003f70: 41 61 00 02 lbu r1,(r11+2) 8003f74: 34 02 00 08 mvi r2,8 8003f78: fb ff f1 24 calli 8000408 <__ashlsi3> 8003f7c: b8 20 78 00 mv r15,r1 8003f80: 34 01 00 03 mvi r1,3
8003f84: 55 81 00 02 bgu r12,r1,8003f8c <_Objects_Set_name+0xcc>
8003f88: e0 00 00 16 bi 8003fe0 <_Objects_Set_name+0x120> 8003f8c: 41 6b 00 03 lbu r11,(r11+3) 8003f90: ba 00 08 00 mv r1,r16 8003f94: 34 02 00 18 mvi r2,24 8003f98: fb ff f1 1c calli 8000408 <__ashlsi3> 8003f9c: b9 a1 68 00 or r13,r13,r1 8003fa0: b9 af 68 00 or r13,r13,r15 8003fa4: b9 ab 58 00 or r11,r13,r11 8003fa8: 59 cb 00 0c sw (r14+12),r11 8003fac: 34 01 00 01 mvi r1,1
); } return true; }
8003fb0: 2b 9d 00 04 lw ra,(sp+4) 8003fb4: 2b 8b 00 1c lw r11,(sp+28) 8003fb8: 2b 8c 00 18 lw r12,(sp+24) 8003fbc: 2b 8d 00 14 lw r13,(sp+20) 8003fc0: 2b 8e 00 10 lw r14,(sp+16) 8003fc4: 2b 8f 00 0c lw r15,(sp+12) 8003fc8: 2b 90 00 08 lw r16,(sp+8) 8003fcc: 37 9c 00 1c addi sp,sp,28 8003fd0: c3 a0 00 00 ret
d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name(
8003fd4: 78 0d 00 20 mvhi r13,0x20 8003fd8: 39 ad 00 00 ori r13,r13,0x0 8003fdc: 34 0f 20 00 mvi r15,8192 8003fe0: 34 0b 00 20 mvi r11,32 8003fe4: e3 ff ff eb bi 8003f90 <_Objects_Set_name+0xd0>
080039a0 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) {
80039a0: 37 9c ff e0 addi sp,sp,-32 80039a4: 5b 8b 00 1c sw (sp+28),r11 80039a8: 5b 8c 00 18 sw (sp+24),r12 80039ac: 5b 8d 00 14 sw (sp+20),r13 80039b0: 5b 8e 00 10 sw (sp+16),r14 80039b4: 5b 8f 00 0c sw (sp+12),r15 80039b8: 5b 90 00 08 sw (sp+8),r16 80039bc: 5b 9d 00 04 sw (sp+4),ra 80039c0: b8 40 60 00 mv r12,r2 80039c4: b8 20 78 00 mv r15,r1
register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
80039c8: 37 82 00 20 addi r2,sp,32 80039cc: b9 80 08 00 mv r1,r12
pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) {
80039d0: b8 60 80 00 mv r16,r3 80039d4: 20 8e 00 ff andi r14,r4,0xff
register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
80039d8: f8 00 00 84 calli 8003be8 <_POSIX_Mutex_Get>
80039dc: 44 20 00 33 be r1,r0,8003aa8 <_POSIX_Condition_variables_Wait_support+0x108> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1;
80039e0: 78 05 08 02 mvhi r5,0x802 80039e4: 38 a5 08 74 ori r5,r5,0x874 80039e8: 28 a3 00 00 lw r3,(r5+0)
return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location );
80039ec: b9 e0 08 00 mv r1,r15 80039f0: 37 82 00 20 addi r2,sp,32 80039f4: 34 63 ff ff addi r3,r3,-1 80039f8: 58 a3 00 00 sw (r5+0),r3 80039fc: fb ff ff 49 calli 8003720 <_POSIX_Condition_variables_Get>
switch ( location ) {
8003a00: 2b 84 00 20 lw r4,(sp+32)
return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location );
8003a04: b8 20 68 00 mv r13,r1
switch ( location ) { 8003a08: 5c 80 00 28 bne r4,r0,8003aa8 <_POSIX_Condition_variables_Wait_support+0x108> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
8003a0c: 28 21 00 14 lw r1,(r1+20)
8003a10: 44 24 00 05 be r1,r4,8003a24 <_POSIX_Condition_variables_Wait_support+0x84>
8003a14: 29 82 00 00 lw r2,(r12+0)
8003a18: 44 22 00 03 be r1,r2,8003a24 <_POSIX_Condition_variables_Wait_support+0x84> _Thread_Enable_dispatch();
8003a1c: f8 00 0b eb calli 80069c8 <_Thread_Enable_dispatch> 8003a20: e0 00 00 22 bi 8003aa8 <_POSIX_Condition_variables_Wait_support+0x108>
return EINVAL; } (void) pthread_mutex_unlock( mutex );
8003a24: b9 80 08 00 mv r1,r12 8003a28: f8 00 01 1e calli 8003ea0 <pthread_mutex_unlock>
_Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 8003a2c: 5d c0 00 1a bne r14,r0,8003a94 <_POSIX_Condition_variables_Wait_support+0xf4> the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0;
8003a30: 78 0b 08 02 mvhi r11,0x802
return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex;
8003a34: 29 81 00 00 lw r1,(r12+0)
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0;
8003a38: 39 6b 09 30 ori r11,r11,0x930 8003a3c: 29 64 00 00 lw r4,(r11+0)
return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex;
8003a40: 59 a1 00 14 sw (r13+20),r1
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue;
8003a44: 35 a5 00 18 addi r5,r13,24
if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0;
8003a48: 58 8e 00 34 sw (r4+52),r14
_Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond;
8003a4c: 29 ef 00 00 lw r15,(r15+0)
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
8003a50: 34 01 00 01 mvi r1,1
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
8003a54: 78 03 08 00 mvhi r3,0x800 8003a58: ba 00 10 00 mv r2,r16
the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond;
8003a5c: 58 8f 00 20 sw (r4+32),r15 8003a60: 59 a1 00 48 sw (r13+72),r1
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
8003a64: 38 63 73 90 ori r3,r3,0x7390 8003a68: b8 a0 08 00 mv r1,r5
if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue;
8003a6c: 58 85 00 44 sw (r4+68),r5
_Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
8003a70: f8 00 0d 21 calli 8006ef4 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
8003a74: f8 00 0b d5 calli 80069c8 <_Thread_Enable_dispatch>
/* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code;
8003a78: 29 61 00 00 lw r1,(r11+0) 8003a7c: 28 2b 00 34 lw r11,(r1+52)
if ( status && status != ETIMEDOUT )
8003a80: 7d 62 00 74 cmpnei r2,r11,116 8003a84: 7d 61 00 00 cmpnei r1,r11,0 8003a88: a0 41 08 00 and r1,r2,r1
8003a8c: 44 2e 00 04 be r1,r14,8003a9c <_POSIX_Condition_variables_Wait_support+0xfc><== ALWAYS TAKEN
8003a90: e0 00 00 07 bi 8003aac <_POSIX_Condition_variables_Wait_support+0x10c><== NOT EXECUTED
return status; } else { _Thread_Enable_dispatch();
8003a94: f8 00 0b cd calli 80069c8 <_Thread_Enable_dispatch> 8003a98: 34 0b 00 74 mvi r11,116
/* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex );
8003a9c: b9 80 08 00 mv r1,r12 8003aa0: f8 00 00 ce calli 8003dd8 <pthread_mutex_lock>
if ( mutex_status ) 8003aa4: 44 20 00 02 be r1,r0,8003aac <_POSIX_Condition_variables_Wait_support+0x10c>
8003aa8: 34 0b 00 16 mvi r11,22
case OBJECTS_ERROR: break; } return EINVAL; }
8003aac: b9 60 08 00 mv r1,r11 8003ab0: 2b 9d 00 04 lw ra,(sp+4) 8003ab4: 2b 8b 00 1c lw r11,(sp+28) 8003ab8: 2b 8c 00 18 lw r12,(sp+24) 8003abc: 2b 8d 00 14 lw r13,(sp+20) 8003ac0: 2b 8e 00 10 lw r14,(sp+16) 8003ac4: 2b 8f 00 0c lw r15,(sp+12) 8003ac8: 2b 90 00 08 lw r16,(sp+8) 8003acc: 37 9c 00 20 addi sp,sp,32 8003ad0: c3 a0 00 00 ret
08008744 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) {
8008744: 37 9c ff d8 addi sp,sp,-40 8008748: 5b 8b 00 20 sw (sp+32),r11 800874c: 5b 8c 00 1c sw (sp+28),r12 8008750: 5b 8d 00 18 sw (sp+24),r13 8008754: 5b 8e 00 14 sw (sp+20),r14 8008758: 5b 8f 00 10 sw (sp+16),r15 800875c: 5b 90 00 0c sw (sp+12),r16 8008760: 5b 91 00 08 sw (sp+8),r17 8008764: 5b 9d 00 04 sw (sp+4),ra 8008768: b8 20 68 00 mv r13,r1
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get(
800876c: 78 01 08 02 mvhi r1,0x802 8008770: b8 40 80 00 mv r16,r2 8008774: b8 60 88 00 mv r17,r3 8008778: b9 a0 10 00 mv r2,r13 800877c: 38 21 92 40 ori r1,r1,0x9240 8008780: 37 83 00 28 addi r3,sp,40 8008784: b8 80 70 00 mv r14,r4 8008788: b8 c0 78 00 mv r15,r6 800878c: 20 ab 00 ff andi r11,r5,0xff 8008790: f8 00 0b ab calli 800b63c <_Objects_Get>
Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) {
8008794: 2b 82 00 28 lw r2,(sp+40)
8008798: 5c 40 00 34 bne r2,r0,8008868 <_POSIX_Message_queue_Receive_support+0x124> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
800879c: 28 27 00 14 lw r7,(r1+20) 80087a0: 34 02 00 01 mvi r2,1 80087a4: 20 e3 00 03 andi r3,r7,0x3
80087a8: 5c 62 00 03 bne r3,r2,80087b4 <_POSIX_Message_queue_Receive_support+0x70> _Thread_Enable_dispatch();
80087ac: f8 00 0e 2e calli 800c064 <_Thread_Enable_dispatch> 80087b0: e0 00 00 2e bi 8008868 <_POSIX_Message_queue_Receive_support+0x124>
rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue;
80087b4: 28 2c 00 10 lw r12,(r1+16)
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
80087b8: 29 81 00 68 lw r1,(r12+104)
80087bc: 52 21 00 05 bgeu r17,r1,80087d0 <_POSIX_Message_queue_Receive_support+0x8c> _Thread_Enable_dispatch();
80087c0: f8 00 0e 29 calli 800c064 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
80087c4: f8 00 2e c7 calli 80142e0 <__errno> 80087c8: 34 02 00 7a mvi r2,122 80087cc: e0 00 00 29 bi 8008870 <_POSIX_Message_queue_Receive_support+0x12c>
length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait )
80087d0: b9 60 28 00 mv r5,r11
80087d4: 45 60 00 06 be r11,r0,80087ec <_POSIX_Message_queue_Receive_support+0xa8><== NEVER TAKEN
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
80087d8: b8 e0 08 00 mv r1,r7 80087dc: 34 02 00 0e mvi r2,14 80087e0: fb ff f7 3f calli 80064dc <__lshrsi3> 80087e4: 18 21 00 01 xori r1,r1,0x1 80087e8: 20 25 00 01 andi r5,r1,0x1
timeout ); _Thread_Enable_dispatch(); *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
80087ec: 78 0b 08 02 mvhi r11,0x802
do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize(
80087f0: 35 81 00 1c addi r1,r12,28 80087f4: b9 a0 10 00 mv r2,r13 80087f8: ba 00 18 00 mv r3,r16 80087fc: b9 e0 30 00 mv r6,r15 8008800: 37 84 00 24 addi r4,sp,36
timeout ); _Thread_Enable_dispatch(); *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
8008804: 39 6b 8e 70 ori r11,r11,0x8e70
/* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1;
8008808: 34 0d ff ff mvi r13,-1 800880c: 5b 8d 00 24 sw (sp+36),r13
do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize(
8008810: f8 00 06 b6 calli 800a2e8 <_CORE_message_queue_Seize>
&length_out, do_wait, timeout ); _Thread_Enable_dispatch();
8008814: f8 00 0e 14 calli 800c064 <_Thread_Enable_dispatch>
*msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
8008818: 29 6c 00 00 lw r12,(r11+0)
do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio =
800881c: 34 02 00 1f mvi r2,31 8008820: 29 81 00 24 lw r1,(r12+36) 8008824: fb ff f7 56 calli 800657c <__ashrsi3> 8008828: 29 83 00 24 lw r3,(r12+36)
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code )
800882c: 29 82 00 34 lw r2,(r12+52)
do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio =
8008830: 98 23 18 00 xor r3,r1,r3 8008834: c8 61 08 00 sub r1,r3,r1 8008838: 59 c1 00 00 sw (r14+0),r1
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 800883c: 5c 40 00 03 bne r2,r0,8008848 <_POSIX_Message_queue_Receive_support+0x104> return length_out;
8008840: 2b 81 00 24 lw r1,(sp+36) 8008844: e0 00 00 0d bi 8008878 <_POSIX_Message_queue_Receive_support+0x134>
rtems_set_errno_and_return_minus_one(
8008848: f8 00 2e a6 calli 80142e0 <__errno> 800884c: b8 20 60 00 mv r12,r1 8008850: 29 61 00 00 lw r1,(r11+0) 8008854: 28 21 00 34 lw r1,(r1+52) 8008858: f8 00 00 c0 calli 8008b58 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 800885c: 59 81 00 00 sw (r12+0),r1 8008860: b9 a0 08 00 mv r1,r13 8008864: e0 00 00 05 bi 8008878 <_POSIX_Message_queue_Receive_support+0x134>
#endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF );
8008868: f8 00 2e 9e calli 80142e0 <__errno> 800886c: 34 02 00 09 mvi r2,9 8008870: 58 22 00 00 sw (r1+0),r2 8008874: 34 01 ff ff mvi r1,-1
}
8008878: 2b 9d 00 04 lw ra,(sp+4) 800887c: 2b 8b 00 20 lw r11,(sp+32) 8008880: 2b 8c 00 1c lw r12,(sp+28) 8008884: 2b 8d 00 18 lw r13,(sp+24) 8008888: 2b 8e 00 14 lw r14,(sp+20) 800888c: 2b 8f 00 10 lw r15,(sp+16) 8008890: 2b 90 00 0c lw r16,(sp+12) 8008894: 2b 91 00 08 lw r17,(sp+8) 8008898: 37 9c 00 28 addi sp,sp,40 800889c: c3 a0 00 00 ret
08006b20 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include <rtems/posix/pthread.h> void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) {
8006b20: 37 9c ff fc addi sp,sp,-4 8006b24: 5b 9d 00 04 sw (sp+4),ra
POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
8006b28: 28 22 01 2c lw r2,(r1+300)
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
8006b2c: 28 43 00 d4 lw r3,(r2+212)
8006b30: 5c 60 00 0e bne r3,r0,8006b68 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x48><== NEVER TAKEN
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
8006b34: 28 44 00 d8 lw r4,(r2+216) 8006b38: 34 03 00 01 mvi r3,1
8006b3c: 5c 83 00 0b bne r4,r3,8006b68 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x48> thread_support->cancelation_requested ) {
8006b40: 28 42 00 dc lw r2,(r2+220)
8006b44: 44 40 00 09 be r2,r0,8006b68 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x48> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1;
8006b48: 78 03 08 01 mvhi r3,0x801 8006b4c: 38 63 e8 6c ori r3,r3,0xe86c 8006b50: 28 64 00 00 lw r4,(r3+0)
_Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
8006b54: 34 02 ff ff mvi r2,-1 8006b58: b4 82 20 00 add r4,r4,r2 8006b5c: 58 64 00 00 sw (r3+0),r4 8006b60: f8 00 01 e5 calli 80072f4 <_POSIX_Thread_Exit>
{ POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
8006b64: e0 00 00 02 bi 8006b6c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x4c>
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch();
8006b68: fb ff f4 d0 calli 8003ea8 <_Thread_Enable_dispatch>
}
8006b6c: 2b 9d 00 04 lw ra,(sp+4) 8006b70: 37 9c 00 04 addi sp,sp,4 8006b74: c3 a0 00 00 ret
080090c8 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) {
80090c8: 37 9c ff ec addi sp,sp,-20 80090cc: 5b 8b 00 14 sw (sp+20),r11 80090d0: 5b 8c 00 10 sw (sp+16),r12 80090d4: 5b 8d 00 0c sw (sp+12),r13 80090d8: 5b 8e 00 08 sw (sp+8),r14 80090dc: 5b 9d 00 04 sw (sp+4),ra 80090e0: b8 20 60 00 mv r12,r1
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
80090e4: 28 41 00 00 lw r1,(r2+0)
int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) {
80090e8: b8 40 58 00 mv r11,r2 80090ec: b8 60 68 00 mv r13,r3 80090f0: b8 80 70 00 mv r14,r4
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
80090f4: fb ff ff ed calli 80090a8 <_POSIX_Priority_Is_valid> 80090f8: 34 02 00 00 mvi r2,0
80090fc: 44 22 00 2b be r1,r2,80091a8 <_POSIX_Thread_Translate_sched_param+0xe0><== NEVER TAKEN
return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
8009100: 59 a2 00 00 sw (r13+0),r2
*budget_callout = NULL;
8009104: 59 c2 00 00 sw (r14+0),r2
if ( policy == SCHED_OTHER ) { 8009108: 5d 82 00 05 bne r12,r2,800911c <_POSIX_Thread_Translate_sched_param+0x54> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
800910c: 34 01 00 01 mvi r1,1 8009110: 59 a1 00 00 sw (r13+0),r1 8009114: b9 80 08 00 mv r1,r12
return 0;
8009118: e0 00 00 25 bi 80091ac <_POSIX_Thread_Translate_sched_param+0xe4>
} if ( policy == SCHED_FIFO ) {
800911c: 34 01 00 01 mvi r1,1
8009120: 5d 81 00 03 bne r12,r1,800912c <_POSIX_Thread_Translate_sched_param+0x64> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
8009124: 59 a2 00 00 sw (r13+0),r2 8009128: e0 00 00 04 bi 8009138 <_POSIX_Thread_Translate_sched_param+0x70>
return 0; } if ( policy == SCHED_RR ) {
800912c: 34 01 00 02 mvi r1,2
8009130: 5d 81 00 04 bne r12,r1,8009140 <_POSIX_Thread_Translate_sched_param+0x78> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
8009134: 59 ac 00 00 sw (r13+0),r12 8009138: b8 40 08 00 mv r1,r2
return 0;
800913c: e0 00 00 1c bi 80091ac <_POSIX_Thread_Translate_sched_param+0xe4>
} if ( policy == SCHED_SPORADIC ) {
8009140: 34 01 00 04 mvi r1,4
8009144: 5d 81 00 19 bne r12,r1,80091a8 <_POSIX_Thread_Translate_sched_param+0xe0> if ( (param->sched_ss_repl_period.tv_sec == 0) &&
8009148: 29 61 00 08 lw r1,(r11+8)
800914c: 5c 20 00 03 bne r1,r0,8009158 <_POSIX_Thread_Translate_sched_param+0x90> (param->sched_ss_repl_period.tv_nsec == 0) )
8009150: 29 62 00 0c lw r2,(r11+12)
8009154: 44 41 00 15 be r2,r1,80091a8 <_POSIX_Thread_Translate_sched_param+0xe0> return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) &&
8009158: 29 61 00 10 lw r1,(r11+16)
800915c: 5c 20 00 03 bne r1,r0,8009168 <_POSIX_Thread_Translate_sched_param+0xa0> (param->sched_ss_init_budget.tv_nsec == 0) )
8009160: 29 62 00 14 lw r2,(r11+20)
8009164: 44 41 00 11 be r2,r1,80091a8 <_POSIX_Thread_Translate_sched_param+0xe0> return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
8009168: 35 61 00 08 addi r1,r11,8 800916c: fb ff f4 a8 calli 800640c <_Timespec_To_ticks> 8009170: b8 20 60 00 mv r12,r1 8009174: 35 61 00 10 addi r1,r11,16 8009178: fb ff f4 a5 calli 800640c <_Timespec_To_ticks>
800917c: 54 2c 00 0b bgu r1,r12,80091a8 <_POSIX_Thread_Translate_sched_param+0xe0> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
8009180: 29 61 00 04 lw r1,(r11+4) 8009184: fb ff ff c9 calli 80090a8 <_POSIX_Priority_Is_valid>
8009188: 44 20 00 08 be r1,r0,80091a8 <_POSIX_Thread_Translate_sched_param+0xe0> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout;
800918c: 78 01 08 00 mvhi r1,0x800 8009190: 38 21 2f c8 ori r1,r1,0x2fc8
return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
8009194: 34 02 00 03 mvi r2,3
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
8009198: 59 c1 00 00 sw (r14+0),r1
return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
800919c: 59 a2 00 00 sw (r13+0),r2
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
80091a0: 34 01 00 00 mvi r1,0
return 0;
80091a4: e0 00 00 02 bi 80091ac <_POSIX_Thread_Translate_sched_param+0xe4> 80091a8: 34 01 00 16 mvi r1,22
} return EINVAL; }
80091ac: 2b 9d 00 04 lw ra,(sp+4) 80091b0: 2b 8b 00 14 lw r11,(sp+20) 80091b4: 2b 8c 00 10 lw r12,(sp+16) 80091b8: 2b 8d 00 0c lw r13,(sp+12) 80091bc: 2b 8e 00 08 lw r14,(sp+8) 80091c0: 37 9c 00 14 addi sp,sp,20 80091c4: c3 a0 00 00 ret
08002c84 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) {
8002c84: 37 9c ff ac addi sp,sp,-84 8002c88: 5b 8b 00 14 sw (sp+20),r11 8002c8c: 5b 8c 00 10 sw (sp+16),r12 8002c90: 5b 8d 00 0c sw (sp+12),r13 8002c94: 5b 8e 00 08 sw (sp+8),r14 8002c98: 5b 9d 00 04 sw (sp+4),ra
uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table;
8002c9c: 78 01 08 01 mvhi r1,0x801 8002ca0: 38 21 e0 a8 ori r1,r1,0xe0a8
maximum = Configuration_POSIX_API.number_of_initialization_threads;
8002ca4: 28 2e 00 30 lw r14,(r1+48)
uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table;
8002ca8: 28 2c 00 34 lw r12,(r1+52)
maximum = Configuration_POSIX_API.number_of_initialization_threads; if ( !user_threads || maximum == 0 )
8002cac: 65 cd 00 00 cmpei r13,r14,0 8002cb0: 65 81 00 00 cmpei r1,r12,0 8002cb4: b9 a1 68 00 or r13,r13,r1
8002cb8: 5d a0 00 17 bne r13,r0,8002d14 <_POSIX_Threads_Initialize_user_threads_body+0x90><== NEVER TAKEN
for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr );
8002cbc: 37 8b 00 18 addi r11,sp,24 8002cc0: b9 60 08 00 mv r1,r11 8002cc4: f8 00 19 41 calli 80091c8 <pthread_attr_init>
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
8002cc8: 34 02 00 02 mvi r2,2 8002ccc: b9 60 08 00 mv r1,r11 8002cd0: f8 00 19 4b calli 80091fc <pthread_attr_setinheritsched>
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
8002cd4: 29 82 00 04 lw r2,(r12+4) 8002cd8: b9 60 08 00 mv r1,r11 8002cdc: f8 00 19 55 calli 8009230 <pthread_attr_setstacksize>
status = pthread_create(
8002ce0: 29 83 00 00 lw r3,(r12+0) 8002ce4: 37 81 00 54 addi r1,sp,84 8002ce8: b9 60 10 00 mv r2,r11 8002cec: 34 04 00 00 mvi r4,0 8002cf0: fb ff ff 12 calli 8002938 <pthread_create>
&thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 8002cf4: 44 20 00 05 be r1,r0,8002d08 <_POSIX_Threads_Initialize_user_threads_body+0x84> _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
8002cf8: b8 20 18 00 mv r3,r1 8002cfc: 34 02 00 01 mvi r2,1 8002d00: 34 01 00 02 mvi r1,2 8002d04: f8 00 06 19 calli 8004568 <_Internal_error_Occurred>
* * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) {
8002d08: 35 ad 00 01 addi r13,r13,1 8002d0c: 35 8c 00 08 addi r12,r12,8
8002d10: 55 cd ff ec bgu r14,r13,8002cc0 <_POSIX_Threads_Initialize_user_threads_body+0x3c><== NEVER TAKEN
NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } }
8002d14: 2b 9d 00 04 lw ra,(sp+4) 8002d18: 2b 8b 00 14 lw r11,(sp+20) 8002d1c: 2b 8c 00 10 lw r12,(sp+16) 8002d20: 2b 8d 00 0c lw r13,(sp+12) 8002d24: 2b 8e 00 08 lw r14,(sp+8) 8002d28: 37 9c 00 54 addi sp,sp,84 8002d2c: c3 a0 00 00 ret
08007fd0 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) {
8007fd0: 37 9c ff f4 addi sp,sp,-12 8007fd4: 5b 8b 00 0c sw (sp+12),r11 8007fd8: 5b 8c 00 08 sw (sp+8),r12 8007fdc: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ];
8007fe0: 28 4c 01 2c lw r12,(r2+300)
*/ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) {
8007fe4: b8 40 58 00 mv r11,r2
the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
8007fe8: 35 81 00 94 addi r1,r12,148 8007fec: f8 00 06 bd calli 8009ae0 <_Timespec_To_ticks> 8007ff0: 78 02 08 01 mvhi r2,0x801 8007ff4: 38 42 d0 c0 ori r2,r2,0xd0c0
the_thread->cpu_time_budget = ticks;
8007ff8: 59 61 00 78 sw (r11+120),r1 8007ffc: 40 41 00 00 lbu r1,(r2+0) 8008000: 29 82 00 84 lw r2,(r12+132)
*/ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) {
8008004: 29 63 00 1c lw r3,(r11+28) 8008008: c8 22 10 00 sub r2,r1,r2
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); the_thread->cpu_time_budget = ticks; new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority;
800800c: 59 62 00 18 sw (r11+24),r2
*/ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) {
8008010: 5c 60 00 06 bne r3,r0,8008028 <_POSIX_Threads_Sporadic_budget_TSR+0x58><== NEVER TAKEN
/* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) {
8008014: 29 61 00 14 lw r1,(r11+20)
8008018: 50 41 00 04 bgeu r2,r1,8008028 <_POSIX_Threads_Sporadic_budget_TSR+0x58> _Thread_Change_priority( the_thread, new_priority, true );
800801c: b9 60 08 00 mv r1,r11 8008020: 34 03 00 01 mvi r3,1 8008024: fb ff ef 43 calli 8003d30 <_Thread_Change_priority>
#endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
8008028: 35 81 00 8c addi r1,r12,140 800802c: f8 00 06 ad calli 8009ae0 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
8008030: 59 81 00 b0 sw (r12+176),r1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8008034: 78 01 08 01 mvhi r1,0x801 8008038: 38 21 d9 80 ori r1,r1,0xd980 800803c: 35 82 00 a4 addi r2,r12,164 8008040: fb ff f5 95 calli 8005694 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); }
8008044: 2b 9d 00 04 lw ra,(sp+4) 8008048: 2b 8b 00 0c lw r11,(sp+12) 800804c: 2b 8c 00 08 lw r12,(sp+8) 8008050: 37 9c 00 0c addi sp,sp,12 8008054: c3 a0 00 00 ret
08007f80 <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) {
8007f80: 37 9c ff fc addi sp,sp,-4 8007f84: 5b 9d 00 04 sw (sp+4),ra
POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ];
8007f88: 28 25 01 2c lw r5,(r1+300)
/* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
8007f8c: 34 04 ff ff mvi r4,-1
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
8007f90: 78 02 08 01 mvhi r2,0x801 8007f94: 38 42 d0 c0 ori r2,r2,0xd0c0 8007f98: 58 24 00 78 sw (r1+120),r4 8007f9c: 40 44 00 00 lbu r4,(r2+0) 8007fa0: 28 a2 00 88 lw r2,(r5+136)
*/ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) {
8007fa4: 28 25 00 1c lw r5,(r1+28) 8007fa8: c8 82 10 00 sub r2,r4,r2
* while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority;
8007fac: 58 22 00 18 sw (r1+24),r2
*/ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) {
8007fb0: 5c a0 00 05 bne r5,r0,8007fc4 <_POSIX_Threads_Sporadic_budget_callout+0x44><== NEVER TAKEN
/* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) {
8007fb4: 28 23 00 14 lw r3,(r1+20)
8007fb8: 50 62 00 03 bgeu r3,r2,8007fc4 <_POSIX_Threads_Sporadic_budget_callout+0x44><== NEVER TAKEN
_Thread_Change_priority( the_thread, new_priority, true );
8007fbc: 34 03 00 01 mvi r3,1 8007fc0: fb ff ef 5c calli 8003d30 <_Thread_Change_priority>
#if 0 printk( "lower priority\n" ); #endif } } }
8007fc4: 2b 9d 00 04 lw ra,(sp+4) 8007fc8: 37 9c 00 04 addi sp,sp,4 8007fcc: c3 a0 00 00 ret
080028fc <_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) {
80028fc: 37 9c ff f8 addi sp,sp,-8 8002900: 5b 8b 00 08 sw (sp+8),r11 8002904: 5b 9d 00 04 sw (sp+4),ra 8002908: b8 40 58 00 mv r11,r2
bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1;
800290c: 28 42 00 68 lw r2,(r2+104)
/* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
8002910: 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;
8002914: 34 42 00 01 addi r2,r2,1 8002918: 59 62 00 68 sw (r11+104),r2
/* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 800291c: 5c 20 00 03 bne r1,r0,8002928 <_POSIX_Timer_TSR+0x2c> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
8002920: 29 62 00 58 lw r2,(r11+88)
8002924: 44 41 00 0d be r2,r1,8002958 <_POSIX_Timer_TSR+0x5c> <== NEVER TAKEN
activated = _POSIX_Timer_Insert_helper(
8002928: 29 62 00 64 lw r2,(r11+100) 800292c: 29 63 00 08 lw r3,(r11+8) 8002930: 78 04 08 00 mvhi r4,0x800 8002934: 38 84 28 fc ori r4,r4,0x28fc 8002938: 35 61 00 10 addi r1,r11,16 800293c: b9 60 28 00 mv r5,r11 8002940: f8 00 15 8a calli 8007f68 <_POSIX_Timer_Insert_helper>
ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated )
8002944: 44 20 00 0c be r1,r0,8002974 <_POSIX_Timer_TSR+0x78> <== NEVER TAKEN
return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time );
8002948: 35 61 00 6c addi r1,r11,108 800294c: f8 00 03 1e calli 80035c4 <_TOD_Get>
/* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
8002950: 34 01 00 03 mvi r1,3 8002954: e0 00 00 02 bi 800295c <_POSIX_Timer_TSR+0x60>
} else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
8002958: 34 01 00 04 mvi r1,4 <== NOT EXECUTED
800295c: 31 61 00 3c sb (r11+60),r1
/* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) {
8002960: 29 62 00 44 lw r2,(r11+68) 8002964: 29 61 00 38 lw r1,(r11+56) 8002968: f8 00 14 2a calli 8007a10 <pthread_kill>
} /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0;
800296c: 34 01 00 00 mvi r1,0 8002970: 59 61 00 68 sw (r11+104),r1
}
8002974: 2b 9d 00 04 lw ra,(sp+4) 8002978: 2b 8b 00 08 lw r11,(sp+8) 800297c: 37 9c 00 08 addi sp,sp,8 8002980: c3 a0 00 00 ret
0800acc8 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) {
800acc8: 37 9c ff e0 addi sp,sp,-32 800accc: 5b 8b 00 14 sw (sp+20),r11 800acd0: 5b 8c 00 10 sw (sp+16),r12 800acd4: 5b 8d 00 0c sw (sp+12),r13 800acd8: 5b 8e 00 08 sw (sp+8),r14 800acdc: 5b 9d 00 04 sw (sp+4),ra
siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
800ace0: 37 8e 00 18 addi r14,sp,24
bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) {
800ace4: 20 64 00 ff andi r4,r3,0xff
siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
800ace8: 34 05 00 01 mvi r5,1 800acec: b9 c0 18 00 mv r3,r14
bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) {
800acf0: b8 20 60 00 mv r12,r1 800acf4: b8 40 58 00 mv r11,r2
siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
800acf8: f8 00 00 25 calli 800ad8c <_POSIX_signals_Clear_signals>
800acfc: 44 20 00 1c be r1,r0,800ad6c <_POSIX_signals_Check_signal+0xa4> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
800ad00: b5 6b 08 00 add r1,r11,r11 800ad04: b4 2b 08 00 add r1,r1,r11 800ad08: 78 0d 08 01 mvhi r13,0x801 800ad0c: 34 02 00 02 mvi r2,2 800ad10: fb ff d5 38 calli 80001f0 <__ashlsi3> 800ad14: 39 ad dd b0 ori r13,r13,0xddb0 800ad18: b5 a1 20 00 add r4,r13,r1 800ad1c: 28 85 00 08 lw r5,(r4+8) 800ad20: 34 01 00 01 mvi r1,1
800ad24: 44 a1 00 12 be r5,r1,800ad6c <_POSIX_signals_Check_signal+0xa4><== NEVER TAKEN
return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked;
800ad28: 29 8d 00 cc lw r13,(r12+204)
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
800ad2c: 28 81 00 04 lw r1,(r4+4)
/* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
800ad30: 28 82 00 00 lw r2,(r4+0)
/* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
800ad34: b8 2d 08 00 or r1,r1,r13 800ad38: 59 81 00 cc sw (r12+204),r1
/* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
800ad3c: 34 01 00 02 mvi r1,2
800ad40: 5c 41 00 06 bne r2,r1,800ad58 <_POSIX_signals_Check_signal+0x90> case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
800ad44: b9 60 08 00 mv r1,r11 800ad48: b9 c0 10 00 mv r2,r14 800ad4c: 34 03 00 00 mvi r3,0 800ad50: d8 a0 00 00 call r5
signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break;
800ad54: e0 00 00 03 bi 800ad60 <_POSIX_signals_Check_signal+0x98>
default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
800ad58: b9 60 08 00 mv r1,r11 800ad5c: d8 a0 00 00 call r5
} /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked;
800ad60: 59 8d 00 cc sw (r12+204),r13 800ad64: 34 01 00 01 mvi r1,1
return true;
800ad68: e0 00 00 02 bi 800ad70 <_POSIX_signals_Check_signal+0xa8> 800ad6c: 34 01 00 00 mvi r1,0
}
800ad70: 2b 9d 00 04 lw ra,(sp+4) 800ad74: 2b 8b 00 14 lw r11,(sp+20) 800ad78: 2b 8c 00 10 lw r12,(sp+16) 800ad7c: 2b 8d 00 0c lw r13,(sp+12) 800ad80: 2b 8e 00 08 lw r14,(sp+8) 800ad84: 37 9c 00 20 addi sp,sp,32 800ad88: c3 a0 00 00 ret
0800c0cc <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) {
800c0cc: 37 9c ff f0 addi sp,sp,-16 800c0d0: 5b 8b 00 10 sw (sp+16),r11 800c0d4: 5b 8c 00 0c sw (sp+12),r12 800c0d8: 5b 8d 00 08 sw (sp+8),r13 800c0dc: 5b 9d 00 04 sw (sp+4),ra 800c0e0: b8 20 58 00 mv r11,r1
clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level );
800c0e4: 90 00 68 00 rcsr r13,IE 800c0e8: 34 01 ff fe mvi r1,-2 800c0ec: a1 a1 08 00 and r1,r13,r1 800c0f0: d0 01 00 00 wcsr IE,r1
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
800c0f4: b5 6b 08 00 add r1,r11,r11 800c0f8: 34 02 00 02 mvi r2,2 800c0fc: b4 2b 08 00 add r1,r1,r11 800c100: 78 0c 08 01 mvhi r12,0x801 800c104: fb ff d0 3b calli 80001f0 <__ashlsi3> 800c108: 39 8c dd b0 ori r12,r12,0xddb0 800c10c: b5 81 60 00 add r12,r12,r1 800c110: 29 83 00 00 lw r3,(r12+0) 800c114: 34 02 00 02 mvi r2,2
800c118: 5c 62 00 07 bne r3,r2,800c134 <_POSIX_signals_Clear_process_signals+0x68> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
800c11c: 78 02 08 01 mvhi r2,0x801 800c120: 38 42 df a8 ori r2,r2,0xdfa8 800c124: b4 22 10 00 add r2,r1,r2 800c128: 28 41 00 00 lw r1,(r2+0) 800c12c: 34 42 00 04 addi r2,r2,4
800c130: 5c 22 00 10 bne r1,r2,800c170 <_POSIX_signals_Clear_process_signals+0xa4><== NEVER TAKEN
clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask;
800c134: 35 62 ff ff addi r2,r11,-1 800c138: 34 01 00 01 mvi r1,1 800c13c: fb ff d0 2d calli 80001f0 <__ashlsi3> 800c140: 78 02 08 01 mvhi r2,0x801 800c144: 38 42 df a4 ori r2,r2,0xdfa4 800c148: 28 43 00 00 lw r3,(r2+0) 800c14c: a4 20 08 00 not r1,r1 800c150: a0 23 08 00 and r1,r1,r3 800c154: 58 41 00 00 sw (r2+0),r1
if ( !_POSIX_signals_Pending )
800c158: 5c 20 00 06 bne r1,r0,800c170 <_POSIX_signals_Clear_process_signals+0xa4><== NEVER TAKEN
_Thread_Do_post_task_switch_extension--;
800c15c: 78 01 08 01 mvhi r1,0x801 800c160: 38 21 d9 44 ori r1,r1,0xd944 800c164: 28 22 00 00 lw r2,(r1+0) 800c168: 34 42 ff ff addi r2,r2,-1 800c16c: 58 22 00 00 sw (r1+0),r2
} _ISR_Enable( level );
800c170: d0 0d 00 00 wcsr IE,r13
}
800c174: 2b 9d 00 04 lw ra,(sp+4) 800c178: 2b 8b 00 10 lw r11,(sp+16) 800c17c: 2b 8c 00 0c lw r12,(sp+12) 800c180: 2b 8d 00 08 lw r13,(sp+8) 800c184: 37 9c 00 10 addi sp,sp,16 800c188: c3 a0 00 00 ret
0800357c <_POSIX_signals_Get_highest>: #include <rtems/score/isr.h> int _POSIX_signals_Get_highest( sigset_t set ) {
800357c: 37 9c ff f0 addi sp,sp,-16 8003580: 5b 8b 00 10 sw (sp+16),r11 8003584: 5b 8c 00 0c sw (sp+12),r12 8003588: 5b 8d 00 08 sw (sp+8),r13 800358c: 5b 9d 00 04 sw (sp+4),ra 8003590: 34 0b 00 1b mvi r11,27 8003594: b8 20 60 00 mv r12,r1
int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
8003598: 34 0d 00 20 mvi r13,32
if ( set & signo_to_mask( signo ) ) {
800359c: 35 62 ff ff addi r2,r11,-1 80035a0: 34 01 00 01 mvi r1,1 80035a4: fb ff f5 de calli 8000d1c <__ashlsi3> 80035a8: a0 2c 08 00 and r1,r1,r12
80035ac: 5c 20 00 0c bne r1,r0,80035dc <_POSIX_signals_Get_highest+0x60><== NEVER TAKEN
sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
80035b0: 35 6b 00 01 addi r11,r11,1
80035b4: 5d 6d ff fa bne r11,r13,800359c <_POSIX_signals_Get_highest+0x20>
80035b8: 34 0b 00 01 mvi r11,1
*/ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
80035bc: 34 0d 00 1b mvi r13,27
if ( set & signo_to_mask( signo ) ) {
80035c0: 35 62 ff ff addi r2,r11,-1 80035c4: 34 01 00 01 mvi r1,1 80035c8: fb ff f5 d5 calli 8000d1c <__ashlsi3> 80035cc: a0 2c 08 00 and r1,r1,r12
80035d0: 5c 20 00 03 bne r1,r0,80035dc <_POSIX_signals_Get_highest+0x60> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
80035d4: 35 6b 00 01 addi r11,r11,1
80035d8: 5d 6d ff fa bne r11,r13,80035c0 <_POSIX_signals_Get_highest+0x44><== ALWAYS TAKEN
* a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; }
80035dc: b9 60 08 00 mv r1,r11 80035e0: 2b 9d 00 04 lw ra,(sp+4) 80035e4: 2b 8b 00 10 lw r11,(sp+16) 80035e8: 2b 8c 00 0c lw r12,(sp+12) 80035ec: 2b 8d 00 08 lw r13,(sp+8) 80035f0: 37 9c 00 10 addi sp,sp,16 80035f4: c3 a0 00 00 ret
0800c1d8 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) {
800c1d8: 37 9c ff f0 addi sp,sp,-16 800c1dc: 5b 8b 00 10 sw (sp+16),r11 800c1e0: 5b 8c 00 0c sw (sp+12),r12 800c1e4: 5b 8d 00 08 sw (sp+8),r13 800c1e8: 5b 9d 00 04 sw (sp+4),ra 800c1ec: b8 20 58 00 mv r11,r1 800c1f0: b8 40 68 00 mv r13,r2 800c1f4: 34 01 00 01 mvi r1,1 800c1f8: 34 42 ff ff addi r2,r2,-1 800c1fc: b8 60 60 00 mv r12,r3 800c200: fb ff cf fc calli 80001f0 <__ashlsi3>
/* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
800c204: 29 64 00 10 lw r4,(r11+16) 800c208: 78 05 10 00 mvhi r5,0x1000 800c20c: 38 a5 80 00 ori r5,r5,0x8000 800c210: a0 85 10 00 and r2,r4,r5
{ POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ];
800c214: 29 63 01 2c lw r3,(r11+300)
/* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 800c218: 5c 45 00 18 bne r2,r5,800c278 <_POSIX_signals_Unblock_thread+0xa0> if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
800c21c: 29 62 00 30 lw r2,(r11+48) 800c220: a0 22 10 00 and r2,r1,r2
800c224: 5c 40 00 05 bne r2,r0,800c238 <_POSIX_signals_Unblock_thread+0x60>
800c228: 28 63 00 cc lw r3,(r3+204) 800c22c: a4 60 18 00 not r3,r3 800c230: a0 23 08 00 and r1,r1,r3
800c234: 44 22 00 37 be r1,r2,800c310 <_POSIX_signals_Unblock_thread+0x138> the_thread->Wait.return_code = EINTR;
800c238: 34 01 00 04 mvi r1,4 800c23c: 59 61 00 34 sw (r11+52),r1
the_info = (siginfo_t *) the_thread->Wait.return_argument;
800c240: 29 61 00 28 lw r1,(r11+40)
if ( !info ) { 800c244: 5d 80 00 06 bne r12,r0,800c25c <_POSIX_signals_Unblock_thread+0x84> the_info->si_signo = signo; the_info->si_code = SI_USER;
800c248: 34 02 00 01 mvi r2,1
the_info->si_value.sival_int = 0;
800c24c: 58 2c 00 08 sw (r1+8),r12
the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo;
800c250: 58 2d 00 00 sw (r1+0),r13
the_info->si_code = SI_USER;
800c254: 58 22 00 04 sw (r1+4),r2 800c258: e0 00 00 04 bi 800c268 <_POSIX_signals_Unblock_thread+0x90>
the_info->si_value.sival_int = 0; } else { *the_info = *info;
800c25c: b9 80 10 00 mv r2,r12 800c260: 34 03 00 0c mvi r3,12 800c264: f8 00 03 5c calli 800cfd4 <memcpy>
} _Thread_queue_Extract_with_proxy( the_thread );
800c268: b9 60 08 00 mv r1,r11 800c26c: fb ff e2 51 calli 8004bb0 <_Thread_queue_Extract_with_proxy> 800c270: 34 01 00 01 mvi r1,1
return true;
800c274: e0 00 00 28 bi 800c314 <_POSIX_signals_Unblock_thread+0x13c>
} /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) {
800c278: 28 62 00 cc lw r2,(r3+204) 800c27c: a4 40 10 00 not r2,r2 800c280: a0 22 08 00 and r1,r1,r2
800c284: 44 20 00 23 be r1,r0,800c310 <_POSIX_signals_Unblock_thread+0x138> * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
800c288: 78 01 10 00 mvhi r1,0x1000 800c28c: 38 21 00 00 ori r1,r1,0x0
* it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true;
800c290: 34 02 00 01 mvi r2,1 800c294: 31 62 00 74 sb (r11+116),r2
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
800c298: a0 81 08 00 and r1,r4,r1
800c29c: 44 20 00 0f be r1,r0,800c2d8 <_POSIX_signals_Unblock_thread+0x100> the_thread->Wait.return_code = EINTR;
800c2a0: 34 01 00 04 mvi r1,4 800c2a4: 59 61 00 34 sw (r11+52),r1
#if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){
800c2a8: 20 84 00 08 andi r4,r4,0x8
800c2ac: 44 80 00 19 be r4,r0,800c310 <_POSIX_signals_Unblock_thread+0x138><== NEVER TAKEN
if ( _Watchdog_Is_active( &the_thread->Timer ) )
800c2b0: 29 62 00 50 lw r2,(r11+80) 800c2b4: 34 01 00 02 mvi r1,2
800c2b8: 5c 41 00 03 bne r2,r1,800c2c4 <_POSIX_signals_Unblock_thread+0xec><== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
800c2bc: 35 61 00 48 addi r1,r11,72 800c2c0: fb ff e5 54 calli 8005810 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED );
800c2c4: 78 02 10 03 mvhi r2,0x1003 800c2c8: b9 60 08 00 mv r1,r11 800c2cc: 38 42 ff f8 ori r2,r2,0xfff8 800c2d0: fb ff f4 83 calli 80094dc <_Thread_Clear_state> 800c2d4: e0 00 00 0f bi 800c310 <_POSIX_signals_Unblock_thread+0x138>
_Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) {
800c2d8: 5c 81 00 0e bne r4,r1,800c310 <_POSIX_signals_Unblock_thread+0x138><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
800c2dc: 78 01 08 01 mvhi r1,0x801 800c2e0: 38 21 d9 3c ori r1,r1,0xd93c 800c2e4: 28 21 00 00 lw r1,(r1+0)
800c2e8: 44 24 00 0a be r1,r4,800c310 <_POSIX_signals_Unblock_thread+0x138>
800c2ec: 78 01 08 01 mvhi r1,0x801 800c2f0: 38 21 d9 60 ori r1,r1,0xd960 800c2f4: 28 21 00 00 lw r1,(r1+0)
800c2f8: 5d 61 00 06 bne r11,r1,800c310 <_POSIX_signals_Unblock_thread+0x138><== NEVER TAKEN
_ISR_Signals_to_thread_executing = true;
800c2fc: 78 01 08 01 mvhi r1,0x801 800c300: 38 21 d9 f8 ori r1,r1,0xd9f8 800c304: 30 22 00 00 sb (r1+0),r2 800c308: b8 80 08 00 mv r1,r4 800c30c: e0 00 00 02 bi 800c314 <_POSIX_signals_Unblock_thread+0x13c> 800c310: 34 01 00 00 mvi r1,0
} } return false; }
800c314: 2b 9d 00 04 lw ra,(sp+4) 800c318: 2b 8b 00 10 lw r11,(sp+16) 800c31c: 2b 8c 00 0c lw r12,(sp+12) 800c320: 2b 8d 00 08 lw r13,(sp+8) 800c324: 37 9c 00 10 addi sp,sp,16 800c328: c3 a0 00 00 ret
080086f8 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) {
80086f8: 37 9c ff f0 addi sp,sp,-16 80086fc: 5b 8b 00 0c sw (sp+12),r11 8008700: 5b 8c 00 08 sw (sp+8),r12 8008704: 5b 9d 00 04 sw (sp+4),ra
RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ];
8008708: 28 2b 01 28 lw r11,(r1+296)
if ( !api )
800870c: 45 60 00 1b be r11,r0,8008778 <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN
* Signal Processing */ asr = &api->Signal; _ISR_Disable( level );
8008710: 90 00 08 00 rcsr r1,IE 8008714: 34 02 ff fe mvi r2,-2 8008718: a0 22 10 00 and r2,r1,r2 800871c: d0 02 00 00 wcsr IE,r2
signal_set = asr->signals_posted; asr->signals_posted = 0;
8008720: 34 02 00 00 mvi r2,0
*/ asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted;
8008724: 29 6c 00 14 lw r12,(r11+20)
asr->signals_posted = 0;
8008728: 59 62 00 14 sw (r11+20),r2
_ISR_Enable( level );
800872c: d0 01 00 00 wcsr IE,r1
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 8008730: 45 80 00 12 be r12,r0,8008778 <_RTEMS_tasks_Post_switch_extension+0x80> return; asr->nest_level += 1;
8008734: 29 63 00 1c lw r3,(r11+28)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
8008738: 29 61 00 10 lw r1,(r11+16) 800873c: 38 02 ff ff mvu r2,0xffff
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1;
8008740: 34 63 00 01 addi r3,r3,1 8008744: 59 63 00 1c sw (r11+28),r3
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
8008748: 37 83 00 10 addi r3,sp,16 800874c: f8 00 0a b9 calli 800b230 <rtems_task_mode>
(*asr->handler)( signal_set );
8008750: 29 62 00 0c lw r2,(r11+12) 8008754: b9 80 08 00 mv r1,r12 8008758: d8 40 00 00 call r2
asr->nest_level -= 1;
800875c: 29 63 00 1c lw r3,(r11+28)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
8008760: 2b 81 00 10 lw r1,(sp+16) 8008764: 38 02 ff ff mvu r2,0xffff
asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1;
8008768: 34 63 ff ff addi r3,r3,-1 800876c: 59 63 00 1c sw (r11+28),r3
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
8008770: 37 83 00 10 addi r3,sp,16 8008774: f8 00 0a af calli 800b230 <rtems_task_mode>
}
8008778: 2b 9d 00 04 lw ra,(sp+4) 800877c: 2b 8b 00 0c lw r11,(sp+12) 8008780: 2b 8c 00 08 lw r12,(sp+8) 8008784: 37 9c 00 10 addi sp,sp,16 8008788: c3 a0 00 00 ret
0803dd00 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) {
803dd00: 37 9c ff f4 addi sp,sp,-12 803dd04: 5b 8b 00 08 sw (sp+8),r11 803dd08: 5b 9d 00 04 sw (sp+4),ra 803dd0c: b8 20 10 00 mv r2,r1 803dd10: 78 01 08 07 mvhi r1,0x807 803dd14: 38 21 1b c8 ori r1,r1,0x1bc8 803dd18: 37 83 00 0c addi r3,sp,12 803dd1c: fb ff 32 59 calli 800a680 <_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 ) {
803dd20: 2b 82 00 0c lw r2,(sp+12) 803dd24: b8 20 58 00 mv r11,r1
803dd28: 5c 40 00 21 bne r2,r0,803ddac <_Rate_monotonic_Timeout+0xac><== NEVER TAKEN
case OBJECTS_LOCAL: the_thread = the_period->owner;
803dd2c: 28 21 00 40 lw r1,(r1+64)
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
803dd30: 28 23 00 10 lw r3,(r1+16) 803dd34: 20 63 40 00 andi r3,r3,0x4000
803dd38: 44 62 00 08 be r3,r2,803dd58 <_Rate_monotonic_Timeout+0x58> the_thread->Wait.id == the_period->Object.id ) {
803dd3c: 28 23 00 20 lw r3,(r1+32) 803dd40: 29 62 00 08 lw r2,(r11+8)
803dd44: 5c 62 00 05 bne r3,r2,803dd58 <_Rate_monotonic_Timeout+0x58> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED );
803dd48: 78 02 10 03 mvhi r2,0x1003 803dd4c: 38 42 ff f8 ori r2,r2,0xfff8 803dd50: fb ff b7 a7 calli 802bbec <_Thread_Clear_state> 803dd54: e0 00 00 06 bi 803dd6c <_Rate_monotonic_Timeout+0x6c>
_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 ) {
803dd58: 29 62 00 38 lw r2,(r11+56) 803dd5c: 34 01 00 01 mvi r1,1
803dd60: 5c 41 00 0c bne r2,r1,803dd90 <_Rate_monotonic_Timeout+0x90><== ALWAYS TAKEN
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
803dd64: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 803dd68: 59 61 00 38 sw (r11+56),r1 <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
803dd6c: b9 60 08 00 mv r1,r11 803dd70: fb ff fe cd calli 803d8a4 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
803dd74: 29 61 00 3c lw r1,(r11+60)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
803dd78: 35 62 00 10 addi r2,r11,16
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
803dd7c: 59 61 00 1c sw (r11+28),r1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
803dd80: 78 01 08 07 mvhi r1,0x807 803dd84: 38 21 11 80 ori r1,r1,0x1180 803dd88: fb ff 39 ef calli 800c544 <_Watchdog_Insert> 803dd8c: e0 00 00 03 bi 803dd98 <_Rate_monotonic_Timeout+0x98>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED;
803dd90: 34 01 00 04 mvi r1,4 803dd94: 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;
803dd98: 78 01 08 07 mvhi r1,0x807 803dd9c: 38 21 10 a4 ori r1,r1,0x10a4 803dda0: 28 22 00 00 lw r2,(r1+0) 803dda4: 34 42 ff ff addi r2,r2,-1 803dda8: 58 22 00 00 sw (r1+0),r2
case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } }
803ddac: 2b 9d 00 04 lw ra,(sp+4) 803ddb0: 2b 8b 00 08 lw r11,(sp+8) 803ddb4: 37 9c 00 0c addi sp,sp,12 803ddb8: c3 a0 00 00 ret
0803da1c <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) {
803da1c: 37 9c ff e4 addi sp,sp,-28 803da20: 5b 8b 00 0c sw (sp+12),r11 803da24: 5b 8c 00 08 sw (sp+8),r12 803da28: 5b 9d 00 04 sw (sp+4),ra 803da2c: b8 20 58 00 mv r11,r1
/* * Update the counts. */ stats = &the_period->Statistics; stats->count++;
803da30: 28 21 00 54 lw r1,(r1+84)
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
803da34: 29 62 00 38 lw r2,(r11+56)
/* * Update the counts. */ stats = &the_period->Statistics; stats->count++;
803da38: 34 21 00 01 addi r1,r1,1 803da3c: 59 61 00 54 sw (r11+84),r1
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
803da40: 34 01 00 04 mvi r1,4
803da44: 5c 41 00 04 bne r2,r1,803da54 <_Rate_monotonic_Update_statistics+0x38> stats->missed_count++;
803da48: 29 61 00 58 lw r1,(r11+88) 803da4c: 34 21 00 01 addi r1,r1,1 803da50: 59 61 00 58 sw (r11+88),r1
/* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
803da54: 37 8c 00 18 addi r12,sp,24 803da58: b9 60 08 00 mv r1,r11 803da5c: 37 82 00 10 addi r2,sp,16 803da60: b9 80 18 00 mv r3,r12 803da64: fb ff ff b5 calli 803d938 <_Rate_monotonic_Get_status>
if (!valid_status)
803da68: 44 20 00 28 be r1,r0,803db08 <_Rate_monotonic_Update_statistics+0xec><== NEVER TAKEN
/* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed );
803da6c: b9 80 10 00 mv r2,r12 803da70: 35 61 00 6c addi r1,r11,108 803da74: fb ff 39 99 calli 800c0d8 <_Timespec_Add_to>
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
803da78: b9 80 08 00 mv r1,r12 803da7c: 35 62 00 5c addi r2,r11,92 803da80: f8 00 02 e5 calli 803e614 <_Timespec_Less_than>
803da84: 44 20 00 05 be r1,r0,803da98 <_Rate_monotonic_Update_statistics+0x7c> stats->min_cpu_time = executed;
803da88: 2b 81 00 18 lw r1,(sp+24) 803da8c: 59 61 00 5c sw (r11+92),r1 803da90: 2b 81 00 1c lw r1,(sp+28) 803da94: 59 61 00 60 sw (r11+96),r1
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
803da98: 37 81 00 18 addi r1,sp,24 803da9c: 35 62 00 64 addi r2,r11,100 803daa0: f8 00 02 d1 calli 803e5e4 <_Timespec_Greater_than>
803daa4: 44 20 00 05 be r1,r0,803dab8 <_Rate_monotonic_Update_statistics+0x9c> stats->max_cpu_time = executed;
803daa8: 2b 81 00 18 lw r1,(sp+24) 803daac: 59 61 00 64 sw (r11+100),r1 803dab0: 2b 81 00 1c lw r1,(sp+28) 803dab4: 59 61 00 68 sw (r11+104),r1
/* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
803dab8: 37 8c 00 10 addi r12,sp,16 803dabc: b9 80 10 00 mv r2,r12 803dac0: 35 61 00 84 addi r1,r11,132 803dac4: fb ff 39 85 calli 800c0d8 <_Timespec_Add_to>
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
803dac8: b9 80 08 00 mv r1,r12 803dacc: 35 62 00 74 addi r2,r11,116 803dad0: f8 00 02 d1 calli 803e614 <_Timespec_Less_than>
803dad4: 44 20 00 05 be r1,r0,803dae8 <_Rate_monotonic_Update_statistics+0xcc> stats->min_wall_time = since_last_period;
803dad8: 2b 81 00 10 lw r1,(sp+16) 803dadc: 59 61 00 74 sw (r11+116),r1 803dae0: 2b 81 00 14 lw r1,(sp+20) 803dae4: 59 61 00 78 sw (r11+120),r1
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
803dae8: 37 81 00 10 addi r1,sp,16 803daec: 35 62 00 7c addi r2,r11,124 803daf0: f8 00 02 bd calli 803e5e4 <_Timespec_Greater_than>
803daf4: 44 20 00 05 be r1,r0,803db08 <_Rate_monotonic_Update_statistics+0xec> stats->max_wall_time = since_last_period;
803daf8: 2b 81 00 14 lw r1,(sp+20) 803dafc: 59 61 00 80 sw (r11+128),r1 803db00: 2b 81 00 10 lw r1,(sp+16) 803db04: 59 61 00 7c sw (r11+124),r1
stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif }
803db08: 2b 9d 00 04 lw ra,(sp+4) 803db0c: 2b 8b 00 0c lw r11,(sp+12) 803db10: 2b 8c 00 08 lw r12,(sp+8) 803db14: 37 9c 00 1c addi sp,sp,28 803db18: c3 a0 00 00 ret
08008c54 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) {
8008c54: 37 9c ff e4 addi sp,sp,-28 8008c58: 5b 8b 00 0c sw (sp+12),r11 8008c5c: 5b 8c 00 08 sw (sp+8),r12 8008c60: 5b 9d 00 04 sw (sp+4),ra 8008c64: 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 );
8008c68: 90 00 60 00 rcsr r12,IE 8008c6c: 34 01 ff fe mvi r1,-2 8008c70: a1 81 08 00 and r1,r12,r1 8008c74: d0 01 00 00 wcsr IE,r1
now = _TOD_Now;
8008c78: 78 02 08 01 mvhi r2,0x801 8008c7c: 38 42 d9 34 ori r2,r2,0xd934
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008c80: 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;
8008c84: 28 41 00 04 lw r1,(r2+4)
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008c88: 38 63 da 44 ori r3,r3,0xda44
/* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now;
8008c8c: 28 42 00 00 lw r2,(r2+0)
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008c90: 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;
8008c94: 5b 81 00 14 sw (sp+20),r1 8008c98: 5b 82 00 10 sw (sp+16),r2
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008c9c: b8 60 20 00 mv r4,r3
8008ca0: 44 60 00 03 be r3,r0,8008cac <_TOD_Get+0x58> <== ALWAYS TAKEN
nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)();
8008ca4: d8 60 00 00 call r3 <== NOT EXECUTED 8008ca8: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
_ISR_Enable( level );
8008cac: d0 0c 00 00 wcsr IE,r12
_Timestamp_Set( &offset, 0, nanoseconds );
8008cb0: 34 03 00 00 mvi r3,0
_Timestamp_Add_to( &now, &offset );
8008cb4: 37 81 00 10 addi r1,sp,16 8008cb8: 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 );
8008cbc: 5b 83 00 18 sw (sp+24),r3 8008cc0: 5b 84 00 1c sw (sp+28),r4
_Timestamp_Add_to( &now, &offset );
8008cc4: fb ff f1 59 calli 8005228 <_Timespec_Add_to>
_Timestamp_To_timespec( &now, time );
8008cc8: 2b 81 00 14 lw r1,(sp+20) 8008ccc: 59 61 00 04 sw (r11+4),r1 8008cd0: 2b 81 00 10 lw r1,(sp+16) 8008cd4: 59 61 00 00 sw (r11+0),r1
}
8008cd8: 2b 9d 00 04 lw ra,(sp+4) 8008cdc: 2b 8b 00 0c lw r11,(sp+12) 8008ce0: 2b 8c 00 08 lw r12,(sp+8) 8008ce4: 37 9c 00 1c addi sp,sp,28 8008ce8: c3 a0 00 00 ret
08008cec <_TOD_Get_uptime>: */ void _TOD_Get_uptime( Timestamp_Control *uptime ) {
8008cec: 37 9c ff e4 addi sp,sp,-28 8008cf0: 5b 8b 00 0c sw (sp+12),r11 8008cf4: 5b 8c 00 08 sw (sp+8),r12 8008cf8: 5b 9d 00 04 sw (sp+4),ra 8008cfc: 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 );
8008d00: 90 00 60 00 rcsr r12,IE 8008d04: 34 01 ff fe mvi r1,-2 8008d08: a1 81 08 00 and r1,r12,r1 8008d0c: d0 01 00 00 wcsr IE,r1
up = _TOD_Uptime;
8008d10: 78 02 08 01 mvhi r2,0x801 8008d14: 38 42 d9 24 ori r2,r2,0xd924
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008d18: 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;
8008d1c: 28 41 00 04 lw r1,(r2+4)
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008d20: 38 63 da 44 ori r3,r3,0xda44
/* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime;
8008d24: 28 42 00 00 lw r2,(r2+0)
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008d28: 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;
8008d2c: 5b 81 00 14 sw (sp+20),r1 8008d30: 5b 82 00 10 sw (sp+16),r2
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008d34: b8 60 20 00 mv r4,r3
8008d38: 44 60 00 03 be r3,r0,8008d44 <_TOD_Get_uptime+0x58> <== ALWAYS TAKEN
nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)();
8008d3c: d8 60 00 00 call r3 <== NOT EXECUTED 8008d40: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
_ISR_Enable( level );
8008d44: d0 0c 00 00 wcsr IE,r12
_Timestamp_Set( &offset, 0, nanoseconds );
8008d48: 34 03 00 00 mvi r3,0
_Timestamp_Add_to( &up, &offset );
8008d4c: 37 81 00 10 addi r1,sp,16 8008d50: 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 );
8008d54: 5b 83 00 18 sw (sp+24),r3 8008d58: 5b 84 00 1c sw (sp+28),r4
_Timestamp_Add_to( &up, &offset );
8008d5c: fb ff f1 33 calli 8005228 <_Timespec_Add_to>
*uptime = up;
8008d60: 2b 81 00 14 lw r1,(sp+20) 8008d64: 59 61 00 04 sw (r11+4),r1 8008d68: 2b 81 00 10 lw r1,(sp+16) 8008d6c: 59 61 00 00 sw (r11+0),r1
}
8008d70: 2b 9d 00 04 lw ra,(sp+4) 8008d74: 2b 8b 00 0c lw r11,(sp+12) 8008d78: 2b 8c 00 08 lw r12,(sp+8) 8008d7c: 37 9c 00 1c addi sp,sp,28 8008d80: c3 a0 00 00 ret
0800380c <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) {
800380c: 37 9c ff f4 addi sp,sp,-12 8003810: 5b 8b 00 0c sw (sp+12),r11 8003814: 5b 8c 00 08 sw (sp+8),r12 8003818: 5b 9d 00 04 sw (sp+4),ra
uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick();
800381c: 78 02 08 02 mvhi r2,0x802 8003820: 38 42 40 c4 ori r2,r2,0x40c4
*/ bool _TOD_Validate( const rtems_time_of_day *the_tod ) {
8003824: b8 20 58 00 mv r11,r1
uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick();
8003828: 28 42 00 0c lw r2,(r2+12)
if ((!the_tod) ||
800382c: 44 20 00 22 be r1,r0,80038b4 <_TOD_Validate+0xa8> <== NEVER TAKEN
(the_tod->ticks >= ticks_per_second) ||
8003830: 78 01 00 0f mvhi r1,0xf 8003834: 38 21 42 40 ori r1,r1,0x4240 8003838: f8 00 70 25 calli 801f8cc <__udivsi3> 800383c: 29 62 00 18 lw r2,(r11+24)
8003840: 50 41 00 1d bgeu r2,r1,80038b4 <_TOD_Validate+0xa8> (the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
8003844: 29 62 00 14 lw r2,(r11+20) 8003848: 34 01 00 3b mvi r1,59
800384c: 54 41 00 1a bgu r2,r1,80038b4 <_TOD_Validate+0xa8> (the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
8003850: 29 62 00 10 lw r2,(r11+16)
8003854: 54 41 00 18 bgu r2,r1,80038b4 <_TOD_Validate+0xa8> (the_tod->hour >= TOD_HOURS_PER_DAY) ||
8003858: 29 62 00 0c lw r2,(r11+12) 800385c: 34 01 00 17 mvi r1,23
8003860: 54 41 00 15 bgu r2,r1,80038b4 <_TOD_Validate+0xa8> (the_tod->month == 0) ||
8003864: 29 61 00 04 lw r1,(r11+4)
uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) ||
8003868: 44 20 00 13 be r1,r0,80038b4 <_TOD_Validate+0xa8> <== NEVER TAKEN
800386c: 34 02 00 0c mvi r2,12
8003870: 54 22 00 11 bgu r1,r2,80038b4 <_TOD_Validate+0xa8> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) ||
8003874: 29 62 00 00 lw r2,(r11+0)
uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) ||
8003878: 34 03 07 c3 mvi r3,1987
800387c: 50 62 00 0e bgeu r3,r2,80038b4 <_TOD_Validate+0xa8> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) )
8003880: 29 6c 00 08 lw r12,(r11+8)
uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) ||
8003884: 45 80 00 0c be r12,r0,80038b4 <_TOD_Validate+0xa8> <== NEVER TAKEN
8003888: 78 0b 08 02 mvhi r11,0x802
(the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 )
800388c: 20 42 00 03 andi r2,r2,0x3 8003890: 39 6b 13 c0 ori r11,r11,0x13c0
8003894: 5c 40 00 02 bne r2,r0,800389c <_TOD_Validate+0x90> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
8003898: 34 21 00 0d addi r1,r1,13
else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
800389c: 34 02 00 02 mvi r2,2 80038a0: fb ff f6 62 calli 8001228 <__ashlsi3> 80038a4: b5 61 08 00 add r1,r11,r1 80038a8: 28 21 00 00 lw r1,(r1+0)
* false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate(
80038ac: f0 2c 08 00 cmpgeu r1,r1,r12 80038b0: e0 00 00 02 bi 80038b8 <_TOD_Validate+0xac> 80038b4: 34 01 00 00 mvi r1,0
if ( the_tod->day > days_in_month ) return false; return true; }
80038b8: 2b 9d 00 04 lw ra,(sp+4) 80038bc: 2b 8b 00 0c lw r11,(sp+12) 80038c0: 2b 8c 00 08 lw r12,(sp+8) 80038c4: 37 9c 00 0c addi sp,sp,12 80038c8: c3 a0 00 00 ret
08003d30 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) {
8003d30: 37 9c ff ec addi sp,sp,-20 8003d34: 5b 8b 00 14 sw (sp+20),r11 8003d38: 5b 8c 00 10 sw (sp+16),r12 8003d3c: 5b 8d 00 0c sw (sp+12),r13 8003d40: 5b 8e 00 08 sw (sp+8),r14 8003d44: 5b 9d 00 04 sw (sp+4),ra 8003d48: b8 20 58 00 mv r11,r1
*/ /* * Save original state */ original_state = the_thread->current_state;
8003d4c: 28 2e 00 10 lw r14,(r1+16)
void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) {
8003d50: b8 40 60 00 mv r12,r2 8003d54: 20 6d 00 ff andi r13,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 );
8003d58: f8 00 04 8f calli 8004f94 <_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 )
8003d5c: 29 61 00 14 lw r1,(r11+20)
8003d60: 44 2c 00 04 be r1,r12,8003d70 <_Thread_Change_priority+0x40> _Thread_Set_priority( the_thread, new_priority );
8003d64: b9 80 10 00 mv r2,r12 8003d68: b9 60 08 00 mv r1,r11 8003d6c: f8 00 03 e7 calli 8004d08 <_Thread_Set_priority>
_ISR_Disable( level );
8003d70: 90 00 60 00 rcsr r12,IE 8003d74: 34 05 ff fe mvi r5,-2 8003d78: a1 85 28 00 and r5,r12,r5 8003d7c: d0 05 00 00 wcsr IE,r5
/* * 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;
8003d80: 29 64 00 10 lw r4,(r11+16)
if ( state != STATES_TRANSIENT ) {
8003d84: 34 01 00 04 mvi r1,4 8003d88: 21 c2 00 04 andi r2,r14,0x4
8003d8c: 44 81 00 0e be r4,r1,8003dc4 <_Thread_Change_priority+0x94> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) )
8003d90: 5c 40 00 04 bne r2,r0,8003da0 <_Thread_Change_priority+0x70><== NEVER TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
8003d94: 34 01 ff fb mvi r1,-5 8003d98: a0 81 08 00 and r1,r4,r1 8003d9c: 59 61 00 10 sw (r11+16),r1
_ISR_Enable( level );
8003da0: d0 0c 00 00 wcsr IE,r12
if ( _States_Is_waiting_on_thread_queue( state ) ) {
8003da4: 78 01 00 03 mvhi r1,0x3 8003da8: 38 21 be e0 ori r1,r1,0xbee0 8003dac: a0 81 08 00 and r1,r4,r1
8003db0: 44 20 00 5f be r1,r0,8003f2c <_Thread_Change_priority+0x1fc> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
8003db4: 29 61 00 44 lw r1,(r11+68) 8003db8: b9 60 10 00 mv r2,r11 8003dbc: f8 00 03 a0 calli 8004c3c <_Thread_queue_Requeue> 8003dc0: e0 00 00 5b bi 8003f2c <_Thread_Change_priority+0x1fc>
} return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) {
8003dc4: 5c 40 00 1c bne r2,r0,8003e34 <_Thread_Change_priority+0x104><== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor;
8003dc8: 29 61 00 90 lw r1,(r11+144) 8003dcc: 2d 63 00 96 lhu r3,(r11+150)
_Priority_Major_bit_map |= the_priority_map->ready_major;
8003dd0: 78 04 08 01 mvhi r4,0x801
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor;
8003dd4: 2c 26 00 00 lhu r6,(r1+0)
_Priority_Major_bit_map |= the_priority_map->ready_major;
8003dd8: 38 84 d9 54 ori r4,r4,0xd954
* 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 );
8003ddc: 59 62 00 10 sw (r11+16),r2
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor;
8003de0: b8 c3 18 00 or r3,r6,r3 8003de4: 0c 23 00 00 sh (r1+0),r3
_Priority_Major_bit_map |= the_priority_map->ready_major;
8003de8: 2c 83 00 00 lhu r3,(r4+0) 8003dec: 2d 66 00 94 lhu r6,(r11+148) 8003df0: 29 61 00 8c lw r1,(r11+140) 8003df4: b8 c3 18 00 or r3,r6,r3 8003df8: 20 63 ff ff andi r3,r3,0xffff 8003dfc: 0c 83 00 00 sh (r4+0),r3
_Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 8003e00: 45 a2 00 07 be r13,r2,8003e1c <_Thread_Change_priority+0xec> ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next;
8003e04: 28 22 00 00 lw r2,(r1+0)
Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node;
8003e08: 59 61 00 04 sw (r11+4),r1
before_node = after_node->next; after_node->next = the_node;
8003e0c: 58 2b 00 00 sw (r1+0),r11
the_node->next = before_node; before_node->previous = the_node;
8003e10: 58 4b 00 04 sw (r2+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;
8003e14: 59 62 00 00 sw (r11+0),r2 8003e18: e0 00 00 07 bi 8003e34 <_Thread_Change_priority+0x104>
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
8003e1c: 34 22 00 04 addi r2,r1,4 8003e20: 59 62 00 00 sw (r11+0),r2
old_last_node = the_chain->last;
8003e24: 28 22 00 08 lw r2,(r1+8)
the_chain->last = the_node;
8003e28: 58 2b 00 08 sw (r1+8),r11
old_last_node->next = the_node; the_node->previous = old_last_node;
8003e2c: 59 62 00 04 sw (r11+4),r2
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;
8003e30: 58 4b 00 00 sw (r2+0),r11
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level );
8003e34: d0 0c 00 00 wcsr IE,r12 8003e38: d0 05 00 00 wcsr IE,r5
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 );
8003e3c: 78 01 08 01 mvhi r1,0x801 8003e40: 38 21 d9 54 ori r1,r1,0xd954 8003e44: 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;
8003e48: 78 02 08 01 mvhi r2,0x801 8003e4c: 38 42 d8 30 ori r2,r2,0xd830 8003e50: 78 0b 08 01 mvhi r11,0x801 8003e54: 28 4e 00 00 lw r14,(r2+0) 8003e58: 20 21 ff ff andi r1,r1,0xffff 8003e5c: 34 02 00 ff mvi r2,255 8003e60: 39 6b b9 64 ori r11,r11,0xb964
8003e64: 54 22 00 05 bgu r1,r2,8003e78 <_Thread_Change_priority+0x148>
8003e68: b5 61 58 00 add r11,r11,r1 8003e6c: 41 6d 00 00 lbu r13,(r11+0) 8003e70: 35 ad 00 08 addi r13,r13,8 8003e74: e0 00 00 05 bi 8003e88 <_Thread_Change_priority+0x158> 8003e78: 34 02 00 08 mvi r2,8 8003e7c: fb ff f1 05 calli 8000290 <__lshrsi3> 8003e80: b5 61 58 00 add r11,r11,r1 8003e84: 41 6d 00 00 lbu r13,(r11+0)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
8003e88: 78 02 08 01 mvhi r2,0x801 8003e8c: b5 ad 08 00 add r1,r13,r13 8003e90: 38 42 d9 d0 ori r2,r2,0xd9d0 8003e94: b4 41 10 00 add r2,r2,r1 8003e98: 2c 41 00 00 lhu r1,(r2+0) 8003e9c: 78 0b 08 01 mvhi r11,0x801 8003ea0: 34 02 00 ff mvi r2,255 8003ea4: 39 6b b9 64 ori r11,r11,0xb964
8003ea8: 54 22 00 05 bgu r1,r2,8003ebc <_Thread_Change_priority+0x18c>
8003eac: b5 61 58 00 add r11,r11,r1 8003eb0: 41 6b 00 00 lbu r11,(r11+0) 8003eb4: 35 6b 00 08 addi r11,r11,8 8003eb8: e0 00 00 05 bi 8003ecc <_Thread_Change_priority+0x19c> 8003ebc: 34 02 00 08 mvi r2,8 8003ec0: fb ff f0 f4 calli 8000290 <__lshrsi3> 8003ec4: b5 61 58 00 add r11,r11,r1 8003ec8: 41 6b 00 00 lbu r11,(r11+0)
* ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *)
8003ecc: 34 02 00 04 mvi r2,4 8003ed0: b9 a0 08 00 mv r1,r13 8003ed4: fb ff f0 c7 calli 80001f0 <__ashlsi3> 8003ed8: b5 61 08 00 add r1,r11,r1 8003edc: b4 21 10 00 add r2,r1,r1 8003ee0: b4 41 08 00 add r1,r2,r1 8003ee4: 34 02 00 02 mvi r2,2 8003ee8: fb ff f0 c2 calli 80001f0 <__ashlsi3> 8003eec: 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 );
8003ef0: 78 02 08 01 mvhi r2,0x801
* ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *)
8003ef4: 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 );
8003ef8: 38 42 d9 60 ori r2,r2,0xd960
* ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *)
8003efc: 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 );
8003f00: 28 42 00 00 lw r2,(r2+0)
* ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *)
8003f04: 38 21 d9 30 ori r1,r1,0xd930 8003f08: 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() && 8003f0c: 44 43 00 07 be r2,r3,8003f28 <_Thread_Change_priority+0x1f8> _Thread_Executing->is_preemptible )
8003f10: 40 41 00 75 lbu r1,(r2+117)
8003f14: 44 20 00 05 be r1,r0,8003f28 <_Thread_Change_priority+0x1f8> _Context_Switch_necessary = true;
8003f18: 78 01 08 01 mvhi r1,0x801 8003f1c: 38 21 d9 70 ori r1,r1,0xd970 8003f20: 34 02 00 01 mvi r2,1 8003f24: 30 22 00 00 sb (r1+0),r2
_ISR_Enable( level );
8003f28: d0 0c 00 00 wcsr IE,r12
}
8003f2c: 2b 9d 00 04 lw ra,(sp+4) 8003f30: 2b 8b 00 14 lw r11,(sp+20) 8003f34: 2b 8c 00 10 lw r12,(sp+16) 8003f38: 2b 8d 00 0c lw r13,(sp+12) 8003f3c: 2b 8e 00 08 lw r14,(sp+8) 8003f40: 37 9c 00 14 addi sp,sp,20 8003f44: c3 a0 00 00 ret
080094dc <_Thread_Clear_state>: ) { ISR_Level level; States_Control current_state; _ISR_Disable( level );
80094dc: 90 00 18 00 rcsr r3,IE 80094e0: 34 05 ff fe mvi r5,-2 80094e4: a0 65 28 00 and r5,r3,r5 80094e8: d0 05 00 00 wcsr IE,r5
current_state = the_thread->current_state;
80094ec: 28 24 00 10 lw r4,(r1+16)
if ( current_state & state ) {
80094f0: a0 44 30 00 and r6,r2,r4
80094f4: 44 c0 00 2b be r6,r0,80095a0 <_Thread_Clear_state+0xc4> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear);
80094f8: a4 40 10 00 not r2,r2 80094fc: a0 44 10 00 and r2,r2,r4
current_state =
8009500: 58 22 00 10 sw (r1+16),r2
the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 8009504: 5c 40 00 27 bne r2,r0,80095a0 <_Thread_Clear_state+0xc4> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor;
8009508: 28 26 00 90 lw r6,(r1+144) 800950c: 2c 27 00 96 lhu r7,(r1+150)
_Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
8009510: 28 24 00 8c lw r4,(r1+140) 8009514: 2c c8 00 00 lhu r8,(r6+0)
_Priority_Major_bit_map |= the_priority_map->ready_major;
8009518: 78 02 08 01 mvhi r2,0x801 800951c: 38 42 d9 54 ori r2,r2,0xd954
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor;
8009520: b9 07 38 00 or r7,r8,r7 8009524: 0c c7 00 00 sh (r6+0),r7
_Priority_Major_bit_map |= the_priority_map->ready_major;
8009528: 2c 47 00 00 lhu r7,(r2+0) 800952c: 2c 28 00 94 lhu r8,(r1+148)
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
8009530: 34 86 00 04 addi r6,r4,4 8009534: 58 26 00 00 sw (r1+0),r6
old_last_node = the_chain->last;
8009538: 28 86 00 08 lw r6,(r4+8) 800953c: b9 07 38 00 or r7,r8,r7
the_chain->last = the_node;
8009540: 58 81 00 08 sw (r4+8),r1 8009544: 20 e4 ff ff andi r4,r7,0xffff 8009548: 0c 44 00 00 sh (r2+0),r4
old_last_node->next = the_node; the_node->previous = old_last_node;
800954c: 58 26 00 04 sw (r1+4),r6
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;
8009550: 58 c1 00 00 sw (r6+0),r1
_ISR_Flash( level );
8009554: d0 03 00 00 wcsr IE,r3 8009558: d0 05 00 00 wcsr IE,r5
* a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
800955c: 78 02 08 01 mvhi r2,0x801 8009560: 38 42 d9 30 ori r2,r2,0xd930 8009564: 28 44 00 00 lw r4,(r2+0) 8009568: 28 25 00 14 lw r5,(r1+20) 800956c: 28 84 00 14 lw r4,(r4+20)
8009570: 50 a4 00 0c bgeu r5,r4,80095a0 <_Thread_Clear_state+0xc4> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible ||
8009574: 78 04 08 01 mvhi r4,0x801 8009578: 38 84 d9 60 ori r4,r4,0xd960 800957c: 28 84 00 00 lw r4,(r4+0)
* Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread;
8009580: 58 41 00 00 sw (r2+0),r1
if ( _Thread_Executing->is_preemptible ||
8009584: 40 81 00 75 lbu r1,(r4+117)
8009588: 5c 20 00 02 bne r1,r0,8009590 <_Thread_Clear_state+0xb4>
800958c: 5c a1 00 05 bne r5,r1,80095a0 <_Thread_Clear_state+0xc4> <== ALWAYS TAKEN
the_thread->current_priority == 0 ) _Context_Switch_necessary = true;
8009590: 78 01 08 01 mvhi r1,0x801 8009594: 38 21 d9 70 ori r1,r1,0xd970 8009598: 34 02 00 01 mvi r2,1 800959c: 30 22 00 00 sb (r1+0),r2
} } } _ISR_Enable( level );
80095a0: d0 03 00 00 wcsr IE,r3
}
80095a4: c3 a0 00 00 ret
0800baf4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) {
800baf4: 37 9c ff f8 addi sp,sp,-8 800baf8: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location );
800bafc: 37 82 00 08 addi r2,sp,8 800bb00: f8 00 00 a2 calli 800bd88 <_Thread_Get>
switch ( location ) {
800bb04: 2b 82 00 08 lw r2,(sp+8)
800bb08: 5c 40 00 09 bne r2,r0,800bb2c <_Thread_Delay_ended+0x38> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state(
800bb0c: 78 02 10 00 mvhi r2,0x1000 800bb10: 38 42 00 18 ori r2,r2,0x18 800bb14: fb ff ff 4e calli 800b84c <_Thread_Clear_state> 800bb18: 78 01 08 02 mvhi r1,0x802 800bb1c: 38 21 aa 34 ori r1,r1,0xaa34 800bb20: 28 22 00 00 lw r2,(r1+0) 800bb24: 34 42 ff ff addi r2,r2,-1 800bb28: 58 22 00 00 sw (r1+0),r2
| STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } }
800bb2c: 2b 9d 00 04 lw ra,(sp+4) 800bb30: 37 9c 00 08 addi sp,sp,8 800bb34: c3 a0 00 00 ret
08004124 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) {
8004124: 37 9c ff b0 addi sp,sp,-80 8004128: 5b 8b 00 40 sw (sp+64),r11 800412c: 5b 8c 00 3c sw (sp+60),r12 8004130: 5b 8d 00 38 sw (sp+56),r13 8004134: 5b 8e 00 34 sw (sp+52),r14 8004138: 5b 8f 00 30 sw (sp+48),r15 800413c: 5b 90 00 2c sw (sp+44),r16 8004140: 5b 91 00 28 sw (sp+40),r17 8004144: 5b 92 00 24 sw (sp+36),r18 8004148: 5b 93 00 20 sw (sp+32),r19 800414c: 5b 94 00 1c sw (sp+28),r20 8004150: 5b 95 00 18 sw (sp+24),r21 8004154: 5b 96 00 14 sw (sp+20),r22 8004158: 5b 97 00 10 sw (sp+16),r23 800415c: 5b 98 00 0c sw (sp+12),r24 8004160: 5b 99 00 08 sw (sp+8),r25 8004164: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing;
8004168: 78 01 08 01 mvhi r1,0x801 800416c: 38 21 d9 60 ori r1,r1,0xd960 8004170: 28 2b 00 00 lw r11,(r1+0)
_ISR_Disable( level );
8004174: 90 00 20 00 rcsr r4,IE 8004178: 34 01 ff fe mvi r1,-2 800417c: a0 81 08 00 and r1,r4,r1 8004180: d0 01 00 00 wcsr IE,r1
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract(
8004184: 78 14 08 01 mvhi r20,0x801
Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) {
8004188: 78 0f 08 01 mvhi r15,0x801 800418c: 78 0d 08 01 mvhi r13,0x801
heir = _Thread_Heir;
8004190: 78 12 08 01 mvhi r18,0x801
_Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; _Thread_Executing = heir;
8004194: 78 0e 08 01 mvhi r14,0x801
#if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
8004198: 78 11 08 01 mvhi r17,0x801
#endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) {
800419c: 78 10 08 01 mvhi r16,0x801
&_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime;
80041a0: ba 80 98 00 mv r19,r20
Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) {
80041a4: 39 ef d9 70 ori r15,r15,0xd970 80041a8: 39 ad d8 a4 ori r13,r13,0xd8a4
heir = _Thread_Heir;
80041ac: 3a 52 d9 30 ori r18,r18,0xd930
_Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; _Thread_Executing = heir;
80041b0: 39 ce d9 60 ori r14,r14,0xd960
#if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
80041b4: 3a 31 d8 34 ori r17,r17,0xd834
#endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) {
80041b8: 3a 10 d9 2c ori r16,r16,0xd92c
Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) {
80041bc: 34 19 00 00 mvi r25,0
heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1;
80041c0: 34 17 00 01 mvi r23,1
_ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime );
80041c4: 37 96 00 4c addi r22,sp,76
_Timestamp_Subtract(
80041c8: 37 95 00 44 addi r21,sp,68
&_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime;
80041cc: 3a 73 d9 68 ori r19,r19,0xd968
#endif #endif executing = _Thread_Executing; _ISR_Disable( level );
80041d0: 34 18 ff fe mvi r24,-2
Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) {
80041d4: e0 00 00 28 bi 8004274 <_Thread_Dispatch+0x150>
heir = _Thread_Heir;
80041d8: 2a 4c 00 00 lw r12,(r18+0)
_Thread_Dispatch_disable_level = 1;
80041dc: 59 b7 00 00 sw (r13+0),r23
_Context_Switch_necessary = false;
80041e0: 31 f9 00 00 sb (r15+0),r25
_Thread_Executing = heir; #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
80041e4: 29 81 00 7c lw r1,(r12+124)
_ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; _Thread_Executing = heir;
80041e8: 59 cc 00 00 sw (r14+0),r12
#if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 80041ec: 5c 37 00 03 bne r1,r23,80041f8 <_Thread_Dispatch+0xd4> heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
80041f0: 2a 21 00 00 lw r1,(r17+0) 80041f4: 59 81 00 78 sw (r12+120),r1
_ISR_Enable( level );
80041f8: d0 04 00 00 wcsr IE,r4
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime );
80041fc: ba c0 08 00 mv r1,r22 8004200: f8 00 12 bb calli 8008cec <_TOD_Get_uptime>
_Timestamp_Subtract(
8004204: ba 80 08 00 mv r1,r20 8004208: ba a0 18 00 mv r3,r21 800420c: 38 21 d9 68 ori r1,r1,0xd968 8004210: ba c0 10 00 mv r2,r22 8004214: f8 00 04 1c calli 8005284 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran );
8004218: ba a0 10 00 mv r2,r21 800421c: 35 61 00 84 addi r1,r11,132 8004220: f8 00 04 02 calli 8005228 <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
8004224: 2b 83 00 4c lw r3,(sp+76)
#endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) {
8004228: 2a 04 00 00 lw r4,(r16+0)
executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir );
800422c: b9 60 08 00 mv r1,r11
&_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime;
8004230: 5a 63 00 00 sw (r19+0),r3 8004234: 2b 83 00 50 lw r3,(sp+80)
if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir );
8004238: b9 80 10 00 mv r2,r12
&_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime;
800423c: 5a 63 00 04 sw (r19+4),r3
#endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) {
8004240: 44 80 00 05 be r4,r0,8004254 <_Thread_Dispatch+0x130> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
8004244: 28 83 00 00 lw r3,(r4+0) 8004248: 59 63 01 24 sw (r11+292),r3
*_Thread_libc_reent = heir->libc_reent;
800424c: 29 83 01 24 lw r3,(r12+292) 8004250: 58 83 00 00 sw (r4+0),r3
} _User_extensions_Thread_switch( executing, heir );
8004254: f8 00 04 f6 calli 800562c <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers );
8004258: 35 61 00 d0 addi r1,r11,208 800425c: 35 82 00 d0 addi r2,r12,208 8004260: f8 00 06 0b calli 8005a8c <_CPU_Context_switch>
if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing;
8004264: 29 cb 00 00 lw r11,(r14+0)
_ISR_Disable( level );
8004268: 90 00 20 00 rcsr r4,IE 800426c: a0 98 08 00 and r1,r4,r24 8004270: d0 01 00 00 wcsr IE,r1
Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) {
8004274: 41 e5 00 00 lbu r5,(r15+0) 8004278: 20 a5 00 ff andi r5,r5,0xff
800427c: 5c a0 ff d7 bne r5,r0,80041d8 <_Thread_Dispatch+0xb4> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0;
8004280: 59 a5 00 00 sw (r13+0),r5
_ISR_Enable( level );
8004284: d0 04 00 00 wcsr IE,r4
if ( _Thread_Do_post_task_switch_extension ||
8004288: 78 01 08 01 mvhi r1,0x801 800428c: 38 21 d9 44 ori r1,r1,0xd944 8004290: 28 21 00 00 lw r1,(r1+0)
8004294: 5c 20 00 03 bne r1,r0,80042a0 <_Thread_Dispatch+0x17c> executing->do_post_task_switch_extension ) {
8004298: 41 62 00 74 lbu r2,(r11+116)
800429c: 44 41 00 04 be r2,r1,80042ac <_Thread_Dispatch+0x188> executing->do_post_task_switch_extension = false;
80042a0: 34 01 00 00 mvi r1,0 80042a4: 31 61 00 74 sb (r11+116),r1
_API_extensions_Run_postswitch();
80042a8: fb ff f9 94 calli 80028f8 <_API_extensions_Run_postswitch>
} }
80042ac: 2b 9d 00 04 lw ra,(sp+4) 80042b0: 2b 8b 00 40 lw r11,(sp+64) 80042b4: 2b 8c 00 3c lw r12,(sp+60) 80042b8: 2b 8d 00 38 lw r13,(sp+56) 80042bc: 2b 8e 00 34 lw r14,(sp+52) 80042c0: 2b 8f 00 30 lw r15,(sp+48) 80042c4: 2b 90 00 2c lw r16,(sp+44) 80042c8: 2b 91 00 28 lw r17,(sp+40) 80042cc: 2b 92 00 24 lw r18,(sp+36) 80042d0: 2b 93 00 20 lw r19,(sp+32) 80042d4: 2b 94 00 1c lw r20,(sp+28) 80042d8: 2b 95 00 18 lw r21,(sp+24) 80042dc: 2b 96 00 14 lw r22,(sp+20) 80042e0: 2b 97 00 10 lw r23,(sp+16) 80042e4: 2b 98 00 0c lw r24,(sp+12) 80042e8: 2b 99 00 08 lw r25,(sp+8) 80042ec: 37 9c 00 50 addi sp,sp,80 80042f0: c3 a0 00 00 ret
0800b7fc <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing;
800b7fc: 78 01 08 01 mvhi r1,0x801 800b800: 38 21 d9 60 ori r1,r1,0xd960 800b804: 28 21 00 00 lw r1,(r1+0)
if ( !_States_Is_ready( executing->current_state ) ||
800b808: 28 22 00 10 lw r2,(r1+16)
800b80c: 5c 40 00 07 bne r2,r0,800b828 <_Thread_Evaluate_mode+0x2c> <== NEVER TAKEN
800b810: 78 02 08 01 mvhi r2,0x801 800b814: 38 42 d9 30 ori r2,r2,0xd930 800b818: 28 42 00 00 lw r2,(r2+0)
800b81c: 44 22 00 09 be r1,r2,800b840 <_Thread_Evaluate_mode+0x44> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
800b820: 40 21 00 75 lbu r1,(r1+117)
800b824: 44 20 00 07 be r1,r0,800b840 <_Thread_Evaluate_mode+0x44> <== NEVER TAKEN
_Context_Switch_necessary = true;
800b828: 78 01 08 01 mvhi r1,0x801 800b82c: 38 21 d9 70 ori r1,r1,0xd970 800b830: 34 02 00 01 mvi r2,1 800b834: 30 22 00 00 sb (r1+0),r2 800b838: b8 40 08 00 mv r1,r2
return true;
800b83c: c3 a0 00 00 ret 800b840: 34 01 00 00 mvi r1,0
} return false; }
800b844: c3 a0 00 00 ret
0800b848 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) {
800b848: 37 9c ff f4 addi sp,sp,-12 800b84c: 5b 8b 00 0c sw (sp+12),r11 800b850: 5b 8c 00 08 sw (sp+8),r12 800b854: 5b 9d 00 04 sw (sp+4),ra
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing;
800b858: 78 01 08 01 mvhi r1,0x801 800b85c: 38 21 d9 60 ori r1,r1,0xd960 800b860: 28 2b 00 00 lw r11,(r1+0)
/* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level;
800b864: 29 61 00 b8 lw r1,(r11+184)
_ISR_Set_level(level);
800b868: 64 21 00 00 cmpei r1,r1,0 800b86c: d0 01 00 00 wcsr IE,r1
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors;
800b870: 78 02 08 01 mvhi r2,0x801 800b874: 38 42 d6 ac ori r2,r2,0xd6ac 800b878: 40 4c 00 00 lbu r12,(r2+0)
doneConstructors = 1;
800b87c: 34 03 00 01 mvi r3,1
/* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing );
800b880: b9 60 08 00 mv r1,r11
level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1;
800b884: 30 43 00 00 sb (r2+0),r3
/* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing );
800b888: fb ff e6 c6 calli 80053a0 <_User_extensions_Thread_begin>
/* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch();
800b88c: fb ff e2 9a calli 80042f4 <_Thread_Enable_dispatch>
/* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { 800b890: 5d 80 00 02 bne r12,r0,800b898 <_Thread_Handler+0x50> INIT_NAME ();
800b894: fb ff d1 db calli 8000000 <RamBase>
} #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
800b898: 29 61 00 a0 lw r1,(r11+160)
800b89c: 5c 20 00 04 bne r1,r0,800b8ac <_Thread_Handler+0x64> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)(
800b8a0: 29 62 00 9c lw r2,(r11+156) 800b8a4: 29 61 00 a8 lw r1,(r11+168) 800b8a8: e0 00 00 05 bi 800b8bc <_Thread_Handler+0x74>
executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) {
800b8ac: 34 02 00 01 mvi r2,1
800b8b0: 5c 22 00 05 bne r1,r2,800b8c4 <_Thread_Handler+0x7c> <== NEVER TAKEN
executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)(
800b8b4: 29 62 00 9c lw r2,(r11+156) 800b8b8: 29 61 00 a4 lw r1,(r11+164) 800b8bc: d8 40 00 00 call r2
executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument =
800b8c0: 59 61 00 28 sw (r11+40),r1
* was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing );
800b8c4: b9 60 08 00 mv r1,r11 800b8c8: fb ff e6 cd calli 80053fc <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
800b8cc: 34 01 00 00 mvi r1,0 800b8d0: 34 02 00 01 mvi r2,1 800b8d4: 34 03 00 06 mvi r3,6 800b8d8: fb ff de c7 calli 80033f4 <_Internal_error_Occurred>
08004638 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) {
8004638: 37 9c ff f0 addi sp,sp,-16 800463c: 5b 8b 00 10 sw (sp+16),r11 8004640: 5b 8c 00 0c sw (sp+12),r12 8004644: 5b 8d 00 08 sw (sp+8),r13 8004648: 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;
800464c: 78 01 08 01 mvhi r1,0x801 8004650: 38 21 d0 c4 ori r1,r1,0xd0c4
#endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook)
8004654: 28 22 00 20 lw r2,(r1+32) 8004658: 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;
800465c: 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)
8004660: 64 42 00 00 cmpei r2,r2,0 8004664: 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;
8004668: 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)
800466c: 99 22 48 00 xor r9,r9,r2 8004670: b9 20 58 00 mv r11,r9
8004674: 45 20 00 05 be r9,r0,8004688 <_Thread_Handler_initialization+0x50><== ALWAYS TAKEN
== (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred(
8004678: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 800467c: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8004680: 34 03 00 0f mvi r3,15 <== NOT EXECUTED 8004684: fb ff fb 5c calli 80033f4 <_Internal_error_Occurred> <== NOT EXECUTED
_Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
8004688: 78 0c 08 01 mvhi r12,0x801 800468c: 39 8c d0 c0 ori r12,r12,0xd0c0 8004690: 41 81 00 00 lbu r1,(r12+0)
INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false;
8004694: 78 08 08 01 mvhi r8,0x801
_Thread_Executing = NULL;
8004698: 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(
800469c: 34 21 00 01 addi r1,r1,1
INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL;
80046a0: 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;
80046a4: 78 03 08 01 mvhi r3,0x801
_Thread_Maximum_extensions = maximum_extensions;
80046a8: 78 07 08 01 mvhi r7,0x801
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
80046ac: 78 06 08 01 mvhi r6,0x801
_Thread_Heir = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0;
80046b0: 38 63 d9 44 ori r3,r3,0xd944
_Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice;
80046b4: 38 c6 d8 34 ori r6,r6,0xd834
INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false;
80046b8: 39 08 d9 70 ori r8,r8,0xd970
_Thread_Executing = NULL;
80046bc: 38 a5 d9 60 ori r5,r5,0xd960
_Thread_Heir = NULL;
80046c0: 38 84 d9 30 ori r4,r4,0xd930
_Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions;
80046c4: 38 e7 d9 40 ori r7,r7,0xd940
_Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
80046c8: 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;
80046cc: 58 ca 00 00 sw (r6+0),r10
_Thread_Heir = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0;
80046d0: 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(
80046d4: b4 41 08 00 add r1,r2,r1
INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false;
80046d8: 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(
80046dc: 34 02 00 02 mvi r2,2
_Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions;
80046e0: 58 ed 00 00 sw (r7+0),r13
true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; _Thread_Executing = NULL;
80046e4: 58 a9 00 00 sw (r5+0),r9
_Thread_Heir = NULL;
80046e8: 58 89 00 00 sw (r4+0),r9
_Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
80046ec: fb ff ee c1 calli 80001f0 <__ashlsi3> 80046f0: f8 00 04 a7 calli 800598c <_Workspace_Allocate_or_fatal_error> 80046f4: 78 02 08 01 mvhi r2,0x801
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
80046f8: 41 83 00 00 lbu r3,(r12+0)
_Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
80046fc: 38 42 d8 30 ori r2,r2,0xd830 8004700: 58 41 00 00 sw (r2+0),r1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL;
8004704: 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);
8004708: 34 22 00 04 addi r2,r1,4 800470c: 58 22 00 00 sw (r1+0),r2
the_chain->permanent_null = NULL;
8004710: 58 26 00 04 sw (r1+4),r6
the_chain->last = _Chain_Head(the_chain);
8004714: 58 21 00 08 sw (r1+8),r1
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
8004718: 35 6b 00 01 addi r11,r11,1 800471c: 34 21 00 0c addi r1,r1,12
8004720: 50 6b ff fa bgeu r3,r11,8004708 <_Thread_Handler_initialization+0xd0> /* * Initialize this class of objects. */ _Objects_Initialize_information(
8004724: 34 02 00 01 mvi r2,1 8004728: 78 01 08 01 mvhi r1,0x801 800472c: 38 21 da 00 ori r1,r1,0xda00 8004730: b8 40 18 00 mv r3,r2 8004734: b8 40 20 00 mv r4,r2 8004738: 34 05 01 3c mvi r5,316 800473c: 34 07 00 08 mvi r7,8 8004740: fb ff fc c2 calli 8003a48 <_Objects_Initialize_information>
false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); }
8004744: 2b 9d 00 04 lw ra,(sp+4) 8004748: 2b 8b 00 10 lw r11,(sp+16) 800474c: 2b 8c 00 0c lw r12,(sp+12) 8004750: 2b 8d 00 08 lw r13,(sp+8) 8004754: 37 9c 00 10 addi sp,sp,16 8004758: c3 a0 00 00 ret
08004418 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) {
8004418: 37 9c ff e0 addi sp,sp,-32 800441c: 5b 8b 00 20 sw (sp+32),r11 8004420: 5b 8c 00 1c sw (sp+28),r12 8004424: 5b 8d 00 18 sw (sp+24),r13 8004428: 5b 8e 00 14 sw (sp+20),r14 800442c: 5b 8f 00 10 sw (sp+16),r15 8004430: 5b 90 00 0c sw (sp+12),r16 8004434: 5b 91 00 08 sw (sp+8),r17 8004438: 5b 9d 00 04 sw (sp+4),ra
/* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL;
800443c: 34 05 00 00 mvi r5,0 8004440: 58 45 01 28 sw (r2+296),r5 8004444: 58 45 01 2c sw (r2+300),r5 8004448: 58 45 01 30 sw (r2+304),r5
extensions_area = NULL; the_thread->libc_reent = NULL;
800444c: 58 45 01 24 sw (r2+292),r5
Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) {
8004450: b8 40 58 00 mv r11,r2 8004454: b8 60 60 00 mv r12,r3 8004458: b8 20 80 00 mv r16,r1 800445c: b8 80 68 00 mv r13,r4 8004460: b8 c0 70 00 mv r14,r6 8004464: b9 00 78 00 mv r15,r8 8004468: 20 f1 00 ff andi r17,r7,0xff
if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 800446c: 5c 65 00 0e bne r3,r5,80044a4 <_Thread_Initialize+0x8c> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
8004470: b8 40 08 00 mv r1,r2 8004474: b8 80 10 00 mv r2,r4 8004478: f8 00 02 ec calli 8005028 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
800447c: f5 a1 68 00 cmpgu r13,r13,r1
return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
8004480: b8 20 28 00 mv r5,r1
if ( !actual_stack_size || actual_stack_size < stack_size )
8004484: 64 21 00 00 cmpei r1,r1,0 8004488: b9 80 48 00 mv r9,r12 800448c: b9 a1 68 00 or r13,r13,r1
8004490: 5d ac 00 5f bne r13,r12,800460c <_Thread_Initialize+0x1f4> return false; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true;
8004494: 34 01 00 01 mvi r1,1 8004498: 31 61 00 c0 sb (r11+192),r1
if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack;
800449c: 29 6c 00 cc lw r12,(r11+204) 80044a0: e0 00 00 03 bi 80044ac <_Thread_Initialize+0x94>
the_thread->Start.core_allocated_stack = true; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false;
80044a4: 30 45 00 c0 sb (r2+192),r5 80044a8: b8 80 28 00 mv r5,r4
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
80044ac: 34 04 00 00 mvi r4,0
#endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) {
80044b0: 78 02 08 01 mvhi r2,0x801
the_watchdog->routine = routine; the_watchdog->id = id;
80044b4: 59 64 00 68 sw (r11+104),r4 80044b8: 38 42 d9 40 ori r2,r2,0xd940 80044bc: 28 43 00 00 lw r3,(r2+0)
Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address;
80044c0: 59 6c 00 c8 sw (r11+200),r12
the_stack->size = size;
80044c4: 59 65 00 c4 sw (r11+196),r5
the_watchdog->user_data = user_data;
80044c8: 59 64 00 6c sw (r11+108),r4
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
80044cc: 59 64 00 50 sw (r11+80),r4
the_watchdog->routine = routine;
80044d0: 59 64 00 64 sw (r11+100),r4 80044d4: b8 60 60 00 mv r12,r3
80044d8: 44 64 00 07 be r3,r4,80044f4 <_Thread_Initialize+0xdc> extensions_area = _Workspace_Allocate(
80044dc: 34 61 00 01 addi r1,r3,1 80044e0: 34 02 00 02 mvi r2,2 80044e4: fb ff ef 43 calli 80001f0 <__ashlsi3> 80044e8: f8 00 05 38 calli 80059c8 <_Workspace_Allocate> 80044ec: b8 20 60 00 mv r12,r1
(_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 80044f0: 44 20 00 35 be r1,r0,80045c4 <_Thread_Initialize+0x1ac> goto failed; } the_thread->extensions = (void **) extensions_area;
80044f4: 59 6c 01 34 sw (r11+308),r12
* if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 80044f8: 45 80 00 0e be r12,r0,8004530 <_Thread_Initialize+0x118> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
80044fc: 78 02 08 01 mvhi r2,0x801 8004500: 38 42 d9 40 ori r2,r2,0xd940 8004504: 34 03 00 00 mvi r3,0 8004508: 28 44 00 00 lw r4,(r2+0)
the_thread->extensions[i] = NULL;
800450c: b8 60 08 00 mv r1,r3
* create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
8004510: b8 60 10 00 mv r2,r3 8004514: e0 00 00 06 bi 800452c <_Thread_Initialize+0x114>
the_thread->extensions[i] = NULL;
8004518: 29 65 01 34 lw r5,(r11+308)
* create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
800451c: 34 42 00 01 addi r2,r2,1
the_thread->extensions[i] = NULL;
8004520: b4 a3 28 00 add r5,r5,r3 8004524: 58 a1 00 00 sw (r5+0),r1
* create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
8004528: 34 63 00 04 addi r3,r3,4
800452c: 50 82 ff fb bgeu r4,r2,8004518 <_Thread_Initialize+0x100> * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout;
8004530: 2b 81 00 24 lw r1,(sp+36)
/* * General initialization */ the_thread->Start.is_preemptible = is_preemptible;
8004534: 31 71 00 ac sb (r11+172),r17
the_thread->Start.budget_algorithm = budget_algorithm;
8004538: 59 6f 00 b0 sw (r11+176),r15
the_thread->Start.budget_callout = budget_callout;
800453c: 59 61 00 b4 sw (r11+180),r1
switch ( budget_algorithm ) {
8004540: 34 01 00 02 mvi r1,2
8004544: 5d e1 00 05 bne r15,r1,8004558 <_Thread_Initialize+0x140> case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
8004548: 78 02 08 01 mvhi r2,0x801 800454c: 38 42 d8 34 ori r2,r2,0xd834 8004550: 28 42 00 00 lw r2,(r2+0) 8004554: 59 62 00 78 sw (r11+120),r2
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level;
8004558: 2b 81 00 28 lw r1,(sp+40)
the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL;
800455c: 34 0d 00 00 mvi r13,0
#endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT;
8004560: 34 0f 00 01 mvi r15,1
#if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority );
8004564: b9 c0 10 00 mv r2,r14
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level;
8004568: 59 61 00 b8 sw (r11+184),r1
the_thread->Wait.queue = NULL; the_thread->resource_count = 0; #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority;
800456c: 59 6e 00 18 sw (r11+24),r14
the_thread->Start.initial_priority = priority;
8004570: 59 6e 00 bc sw (r11+188),r14
_Thread_Set_priority( the_thread, priority );
8004574: b9 60 08 00 mv r1,r11
#endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT;
8004578: 59 6f 00 10 sw (r11+16),r15
the_thread->Wait.queue = NULL;
800457c: 59 6d 00 44 sw (r11+68),r13
the_thread->resource_count = 0;
8004580: 59 6d 00 1c sw (r11+28),r13
#if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority );
8004584: f8 00 01 e1 calli 8004d08 <_Thread_Set_priority>
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
8004588: 29 61 00 08 lw r1,(r11+8) 800458c: 2a 0e 00 1c lw r14,(r16+28) 8004590: 34 02 00 02 mvi r2,2
/* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used );
8004594: 59 6d 00 88 sw (r11+136),r13 8004598: 59 6d 00 84 sw (r11+132),r13 800459c: 20 21 ff ff andi r1,r1,0xffff 80045a0: fb ff ef 14 calli 80001f0 <__ashlsi3> 80045a4: b5 c1 08 00 add r1,r14,r1 80045a8: 58 2b 00 00 sw (r1+0),r11
information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name;
80045ac: 2b 81 00 2c lw r1,(sp+44) 80045b0: 59 61 00 0c sw (r11+12),r1
* enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread );
80045b4: b9 60 08 00 mv r1,r11 80045b8: f8 00 03 c7 calli 80054d4 <_User_extensions_Thread_create>
if ( extension_status )
80045bc: b9 e0 48 00 mv r9,r15
80045c0: 5c 2d 00 13 bne r1,r13,800460c <_Thread_Initialize+0x1f4> return true; failed: if ( the_thread->libc_reent )
80045c4: 29 61 01 24 lw r1,(r11+292)
80045c8: 44 20 00 02 be r1,r0,80045d0 <_Thread_Initialize+0x1b8> _Workspace_Free( the_thread->libc_reent );
80045cc: f8 00 05 0a calli 80059f4 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] )
80045d0: 29 61 01 28 lw r1,(r11+296)
80045d4: 44 20 00 02 be r1,r0,80045dc <_Thread_Initialize+0x1c4> _Workspace_Free( the_thread->API_Extensions[i] );
80045d8: f8 00 05 07 calli 80059f4 <_Workspace_Free>
failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] )
80045dc: 29 61 01 2c lw r1,(r11+300)
80045e0: 44 20 00 02 be r1,r0,80045e8 <_Thread_Initialize+0x1d0> _Workspace_Free( the_thread->API_Extensions[i] );
80045e4: f8 00 05 04 calli 80059f4 <_Workspace_Free>
failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] )
80045e8: 29 61 01 30 lw r1,(r11+304)
80045ec: 44 20 00 02 be r1,r0,80045f4 <_Thread_Initialize+0x1dc> <== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
80045f0: f8 00 05 01 calli 80059f4 <_Workspace_Free> <== NOT EXECUTED
if ( extensions_area ) 80045f4: 45 80 00 03 be r12,r0,8004600 <_Thread_Initialize+0x1e8> (void) _Workspace_Free( extensions_area );
80045f8: b9 80 08 00 mv r1,r12 80045fc: f8 00 04 fe calli 80059f4 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread );
8004600: b9 60 08 00 mv r1,r11 8004604: f8 00 02 a6 calli 800509c <_Thread_Stack_Free> 8004608: 34 09 00 00 mvi r9,0
return false; }
800460c: b9 20 08 00 mv r1,r9 8004610: 2b 9d 00 04 lw ra,(sp+4) 8004614: 2b 8b 00 20 lw r11,(sp+32) 8004618: 2b 8c 00 1c lw r12,(sp+28) 800461c: 2b 8d 00 18 lw r13,(sp+24) 8004620: 2b 8e 00 14 lw r14,(sp+20) 8004624: 2b 8f 00 10 lw r15,(sp+16) 8004628: 2b 90 00 0c lw r16,(sp+12) 800462c: 2b 91 00 08 lw r17,(sp+8) 8004630: 37 9c 00 20 addi sp,sp,32 8004634: c3 a0 00 00 ret
08005cf4 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) {
8005cf4: 37 9c ff f0 addi sp,sp,-16 8005cf8: 5b 8b 00 08 sw (sp+8),r11 8005cfc: 5b 9d 00 04 sw (sp+4),ra
if ( !_States_Is_dormant( the_thread->current_state ) ) {
8005d00: 28 25 00 10 lw r5,(r1+16) 8005d04: 34 04 00 00 mvi r4,0
bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) {
8005d08: b8 20 58 00 mv r11,r1
if ( !_States_Is_dormant( the_thread->current_state ) ) {
8005d0c: 20 a5 00 01 andi r5,r5,0x1
8005d10: 5c a4 00 16 bne r5,r4,8005d68 <_Thread_Restart+0x74> _Thread_Set_transient( the_thread );
8005d14: 5b 82 00 10 sw (sp+16),r2 8005d18: 5b 83 00 0c sw (sp+12),r3 8005d1c: f8 00 00 bb calli 8006008 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
8005d20: 2b 82 00 10 lw r2,(sp+16) 8005d24: 2b 83 00 0c lw r3,(sp+12) 8005d28: b9 60 08 00 mv r1,r11 8005d2c: f8 00 13 d1 calli 800ac70 <_Thread_Reset>
_Thread_Load_environment( the_thread );
8005d30: b9 60 08 00 mv r1,r11 8005d34: f8 00 12 a6 calli 800a7cc <_Thread_Load_environment>
_Thread_Ready( the_thread );
8005d38: b9 60 08 00 mv r1,r11 8005d3c: f8 00 13 69 calli 800aae0 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
8005d40: b9 60 08 00 mv r1,r11 8005d44: f8 00 02 61 calli 80066c8 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
8005d48: 78 01 08 02 mvhi r1,0x802 8005d4c: 38 21 29 c0 ori r1,r1,0x29c0 8005d50: 28 21 00 00 lw r1,(r1+0) 8005d54: 34 04 00 01 mvi r4,1
8005d58: 5d 61 00 04 bne r11,r1,8005d68 <_Thread_Restart+0x74> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers );
8005d5c: 35 61 00 d0 addi r1,r11,208 8005d60: f8 00 03 df calli 8006cdc <_CPU_Context_restore>
8005d64: 34 04 00 01 mvi r4,1 <== NOT EXECUTED
return true; } return false; }
8005d68: b8 80 08 00 mv r1,r4 8005d6c: 2b 9d 00 04 lw ra,(sp+4) 8005d70: 2b 8b 00 08 lw r11,(sp+8) 8005d74: 37 9c 00 10 addi sp,sp,16 8005d78: c3 a0 00 00 ret
0800a164 <_Thread_Resume>: { ISR_Level level; States_Control current_state; _ISR_Disable( level );
800a164: 90 00 18 00 rcsr r3,IE 800a168: 34 05 ff fe mvi r5,-2 800a16c: a0 65 28 00 and r5,r3,r5 800a170: d0 05 00 00 wcsr IE,r5
_ISR_Enable( level ); return; } #endif current_state = the_thread->current_state;
800a174: 28 22 00 10 lw r2,(r1+16)
if ( current_state & STATES_SUSPENDED ) {
800a178: 20 44 00 02 andi r4,r2,0x2
800a17c: 44 80 00 2b be r4,r0,800a228 <_Thread_Resume+0xc4> <== NEVER TAKEN
800a180: 34 04 ff fd mvi r4,-3 800a184: a0 44 10 00 and r2,r2,r4
current_state =
800a188: 58 22 00 10 sw (r1+16),r2
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 800a18c: 5c 40 00 27 bne r2,r0,800a228 <_Thread_Resume+0xc4> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor;
800a190: 28 26 00 90 lw r6,(r1+144) 800a194: 2c 27 00 96 lhu r7,(r1+150)
_Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
800a198: 28 24 00 8c lw r4,(r1+140) 800a19c: 2c c8 00 00 lhu r8,(r6+0)
_Priority_Major_bit_map |= the_priority_map->ready_major;
800a1a0: 78 02 08 02 mvhi r2,0x802 800a1a4: 38 42 4a 34 ori r2,r2,0x4a34
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor;
800a1a8: b9 07 38 00 or r7,r8,r7 800a1ac: 0c c7 00 00 sh (r6+0),r7
_Priority_Major_bit_map |= the_priority_map->ready_major;
800a1b0: 2c 47 00 00 lhu r7,(r2+0) 800a1b4: 2c 28 00 94 lhu r8,(r1+148)
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
800a1b8: 34 86 00 04 addi r6,r4,4 800a1bc: 58 26 00 00 sw (r1+0),r6
old_last_node = the_chain->last;
800a1c0: 28 86 00 08 lw r6,(r4+8) 800a1c4: b9 07 38 00 or r7,r8,r7
the_chain->last = the_node;
800a1c8: 58 81 00 08 sw (r4+8),r1 800a1cc: 20 e4 ff ff andi r4,r7,0xffff 800a1d0: 0c 44 00 00 sh (r2+0),r4
old_last_node->next = the_node; the_node->previous = old_last_node;
800a1d4: 58 26 00 04 sw (r1+4),r6
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;
800a1d8: 58 c1 00 00 sw (r6+0),r1
_ISR_Flash( level );
800a1dc: d0 03 00 00 wcsr IE,r3 800a1e0: d0 05 00 00 wcsr IE,r5
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
800a1e4: 78 02 08 02 mvhi r2,0x802 800a1e8: 38 42 4a 10 ori r2,r2,0x4a10 800a1ec: 28 44 00 00 lw r4,(r2+0) 800a1f0: 28 25 00 14 lw r5,(r1+20) 800a1f4: 28 84 00 14 lw r4,(r4+20)
800a1f8: 50 a4 00 0c bgeu r5,r4,800a228 <_Thread_Resume+0xc4> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible ||
800a1fc: 78 04 08 02 mvhi r4,0x802 800a200: 38 84 4a 40 ori r4,r4,0x4a40 800a204: 28 84 00 00 lw r4,(r4+0)
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread;
800a208: 58 41 00 00 sw (r2+0),r1
if ( _Thread_Executing->is_preemptible ||
800a20c: 40 81 00 75 lbu r1,(r4+117)
800a210: 5c 20 00 02 bne r1,r0,800a218 <_Thread_Resume+0xb4>
800a214: 5c a1 00 05 bne r5,r1,800a228 <_Thread_Resume+0xc4> <== ALWAYS TAKEN
the_thread->current_priority == 0 ) _Context_Switch_necessary = true;
800a218: 78 01 08 02 mvhi r1,0x802 800a21c: 38 21 4a 50 ori r1,r1,0x4a50 800a220: 34 02 00 01 mvi r2,1 800a224: 30 22 00 00 sb (r1+0),r2
} } } _ISR_Enable( level );
800a228: d0 03 00 00 wcsr IE,r3
}
800a22c: c3 a0 00 00 ret
08005190 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) {
8005190: 37 9c ff f8 addi sp,sp,-8 8005194: 5b 8b 00 08 sw (sp+8),r11 8005198: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *executing; executing = _Thread_Executing;
800519c: 78 01 08 01 mvhi r1,0x801 80051a0: 38 21 d9 60 ori r1,r1,0xd960 80051a4: 28 2b 00 00 lw r11,(r1+0)
/* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible )
80051a8: 41 61 00 75 lbu r1,(r11+117)
80051ac: 44 20 00 1b be r1,r0,8005218 <_Thread_Tickle_timeslice+0x88> return; if ( !_States_Is_ready( executing->current_state ) )
80051b0: 29 61 00 10 lw r1,(r11+16)
80051b4: 5c 20 00 19 bne r1,r0,8005218 <_Thread_Tickle_timeslice+0x88> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) {
80051b8: 29 61 00 7c lw r1,(r11+124)
80051bc: 44 20 00 17 be r1,r0,8005218 <_Thread_Tickle_timeslice+0x88>
80051c0: 34 02 00 02 mvi r2,2
80051c4: 50 41 00 04 bgeu r2,r1,80051d4 <_Thread_Tickle_timeslice+0x44>
80051c8: 34 02 00 03 mvi r2,3
80051cc: 5c 22 00 13 bne r1,r2,8005218 <_Thread_Tickle_timeslice+0x88><== NEVER TAKEN
80051d0: e0 00 00 0b bi 80051fc <_Thread_Tickle_timeslice+0x6c>
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) {
80051d4: 29 61 00 78 lw r1,(r11+120) 80051d8: 34 21 ff ff addi r1,r1,-1 80051dc: 59 61 00 78 sw (r11+120),r1
80051e0: 48 20 00 0e bg r1,r0,8005218 <_Thread_Tickle_timeslice+0x88> _Thread_Reset_timeslice();
80051e4: f8 00 12 1a calli 8009a4c <_Thread_Reset_timeslice>
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
80051e8: 78 01 08 01 mvhi r1,0x801 80051ec: 38 21 d8 34 ori r1,r1,0xd834 80051f0: 28 21 00 00 lw r1,(r1+0) 80051f4: 59 61 00 78 sw (r11+120),r1 80051f8: e0 00 00 08 bi 8005218 <_Thread_Tickle_timeslice+0x88>
} break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 )
80051fc: 29 61 00 78 lw r1,(r11+120) 8005200: 34 21 ff ff addi r1,r1,-1 8005204: 59 61 00 78 sw (r11+120),r1
8005208: 5c 20 00 04 bne r1,r0,8005218 <_Thread_Tickle_timeslice+0x88> (*executing->budget_callout)( executing );
800520c: 29 62 00 80 lw r2,(r11+128) 8005210: b9 60 08 00 mv r1,r11 8005214: d8 40 00 00 call r2
break; #endif } }
8005218: 2b 9d 00 04 lw ra,(sp+4) 800521c: 2b 8b 00 08 lw r11,(sp+8) 8005220: 37 9c 00 08 addi sp,sp,8 8005224: c3 a0 00 00 ret
0800cccc <_Thread_Yield_processor>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing;
800cccc: 78 01 08 02 mvhi r1,0x802 800ccd0: 38 21 aa f0 ori r1,r1,0xaaf0 800ccd4: 28 21 00 00 lw r1,(r1+0)
ready = executing->ready;
800ccd8: 28 22 00 8c lw r2,(r1+140)
_ISR_Disable( level );
800ccdc: 90 00 20 00 rcsr r4,IE 800cce0: 34 05 ff fe mvi r5,-2 800cce4: a0 85 28 00 and r5,r4,r5 800cce8: d0 05 00 00 wcsr IE,r5
if ( !_Chain_Has_only_one_node( ready ) ) {
800ccec: 28 47 00 00 lw r7,(r2+0) 800ccf0: 28 46 00 08 lw r6,(r2+8) 800ccf4: 78 03 08 02 mvhi r3,0x802 800ccf8: 38 63 aa c0 ori r3,r3,0xaac0
800ccfc: 44 e6 00 12 be r7,r6,800cd44 <_Thread_Yield_processor+0x78> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next;
800cd00: 28 26 00 00 lw r6,(r1+0)
previous = the_node->previous;
800cd04: 28 27 00 04 lw r7,(r1+4)
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
800cd08: 34 48 00 04 addi r8,r2,4
Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next;
800cd0c: 58 e6 00 00 sw (r7+0),r6
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
800cd10: 58 28 00 00 sw (r1+0),r8
Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous;
800cd14: 58 c7 00 04 sw (r6+4),r7
) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last;
800cd18: 28 46 00 08 lw r6,(r2+8)
the_chain->last = the_node;
800cd1c: 58 41 00 08 sw (r2+8),r1
old_last_node->next = the_node; the_node->previous = old_last_node;
800cd20: 58 26 00 04 sw (r1+4),r6
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;
800cd24: 58 c1 00 00 sw (r6+0),r1
_Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level );
800cd28: d0 04 00 00 wcsr IE,r4 800cd2c: d0 05 00 00 wcsr IE,r5
if ( _Thread_Is_heir( executing ) )
800cd30: 28 65 00 00 lw r5,(r3+0)
800cd34: 5c 25 00 06 bne r1,r5,800cd4c <_Thread_Yield_processor+0x80><== NEVER TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
800cd38: 28 42 00 00 lw r2,(r2+0) 800cd3c: 58 62 00 00 sw (r3+0),r2 800cd40: e0 00 00 03 bi 800cd4c <_Thread_Yield_processor+0x80>
_Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) )
800cd44: 28 62 00 00 lw r2,(r3+0)
800cd48: 44 22 00 05 be r1,r2,800cd5c <_Thread_Yield_processor+0x90><== ALWAYS TAKEN
_Context_Switch_necessary = true;
800cd4c: 78 01 08 02 mvhi r1,0x802 800cd50: 38 21 ab 00 ori r1,r1,0xab00 800cd54: 34 02 00 01 mvi r2,1 800cd58: 30 22 00 00 sb (r1+0),r2
_ISR_Enable( level );
800cd5c: d0 04 00 00 wcsr IE,r4
}
800cd60: c3 a0 00 00 ret
080049dc <_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 ) {
80049dc: 37 9c ff ec addi sp,sp,-20 80049e0: 5b 8b 00 14 sw (sp+20),r11 80049e4: 5b 8c 00 10 sw (sp+16),r12 80049e8: 5b 8d 00 0c sw (sp+12),r13 80049ec: 5b 8e 00 08 sw (sp+8),r14 80049f0: 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;
80049f4: 28 4d 00 14 lw r13,(r2+20)
Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) {
80049f8: b8 40 58 00 mv r11,r2
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
80049fc: 34 44 00 3c addi r4,r2,60 8004a00: 59 64 00 38 sw (r11+56),r4
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
8004a04: 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;
8004a08: 34 04 00 00 mvi r4,0 8004a0c: b8 20 60 00 mv r12,r1 8004a10: 59 64 00 3c sw (r11+60),r4
the_chain->last = _Chain_Head(the_chain);
8004a14: 59 62 00 40 sw (r11+64),r2
_Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ];
8004a18: b9 a0 08 00 mv r1,r13 8004a1c: 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 ) {
8004a20: 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 ];
8004a24: fb ff ee 1b calli 8000290 <__lshrsi3> 8004a28: b4 21 10 00 add r2,r1,r1 8004a2c: b4 41 08 00 add r1,r2,r1 8004a30: 34 02 00 02 mvi r2,2 8004a34: fb ff ed ef calli 80001f0 <__ashlsi3>
block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) )
8004a38: 21 a2 00 20 andi r2,r13,0x20
_Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ];
8004a3c: b5 81 08 00 add r1,r12,r1
block_state = the_thread_queue->state;
8004a40: 29 87 00 38 lw r7,(r12+56)
if ( _Thread_queue_Is_reverse_search( priority ) ) 8004a44: 5c 40 00 23 bne r2,r0,8004ad0 <_Thread_queue_Enqueue_priority+0xf4> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
8004a48: 34 28 00 04 addi r8,r1,4
goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level );
8004a4c: 34 03 ff fe mvi r3,-2 8004a50: 90 00 20 00 rcsr r4,IE 8004a54: a0 83 30 00 and r6,r4,r3 8004a58: d0 06 00 00 wcsr IE,r6
search_thread = (Thread_Control *) header->first;
8004a5c: 34 05 ff ff mvi r5,-1 8004a60: 28 22 00 00 lw r2,(r1+0)
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
8004a64: e0 00 00 0b bi 8004a90 <_Thread_queue_Enqueue_priority+0xb4>
search_priority = search_thread->current_priority;
8004a68: 28 45 00 14 lw r5,(r2+20)
if ( priority <= search_priority ) 8004a6c: 50 ad 00 0a bgeu r5,r13,8004a94 <_Thread_queue_Enqueue_priority+0xb8> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level );
8004a70: d0 04 00 00 wcsr IE,r4 8004a74: d0 06 00 00 wcsr IE,r6
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
8004a78: 28 49 00 10 lw r9,(r2+16) 8004a7c: a0 e9 48 00 and r9,r7,r9
8004a80: 5d 20 00 03 bne r9,r0,8004a8c <_Thread_queue_Enqueue_priority+0xb0><== ALWAYS TAKEN
_ISR_Enable( level );
8004a84: d0 04 00 00 wcsr IE,r4 <== NOT EXECUTED
goto restart_forward_search;
8004a88: e3 ff ff f2 bi 8004a50 <_Thread_queue_Enqueue_priority+0x74><== NOT EXECUTED
} search_thread = (Thread_Control *)search_thread->Object.Node.next;
8004a8c: 28 42 00 00 lw r2,(r2+0)
restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 8004a90: 5c 48 ff f6 bne r2,r8,8004a68 <_Thread_queue_Enqueue_priority+0x8c> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state !=
8004a94: 29 83 00 30 lw r3,(r12+48) 8004a98: 34 01 00 01 mvi r1,1
the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
8004a9c: b8 80 38 00 mv r7,r4
} search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 8004aa0: 5c 61 00 3b bne r3,r1,8004b8c <_Thread_queue_Enqueue_priority+0x1b0> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
8004aa4: 34 01 00 00 mvi r1,0 8004aa8: 59 81 00 30 sw (r12+48),r1
if ( priority == search_priority ) 8004aac: 45 a5 00 2f be r13,r5,8004b68 <_Thread_queue_Enqueue_priority+0x18c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous;
8004ab0: 28 41 00 04 lw r1,(r2+4)
the_node = (Chain_Node *) the_thread; the_node->next = search_node;
8004ab4: 59 62 00 00 sw (r11+0),r2
the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
8004ab8: 59 6c 00 44 sw (r11+68),r12
search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node;
8004abc: 59 61 00 04 sw (r11+4),r1
previous_node->next = the_node;
8004ac0: 58 2b 00 00 sw (r1+0),r11
search_node->previous = the_node;
8004ac4: 58 4b 00 04 sw (r2+4),r11
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
8004ac8: d0 04 00 00 wcsr IE,r4 8004acc: e0 00 00 25 bi 8004b60 <_Thread_queue_Enqueue_priority+0x184>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1;
8004ad0: 78 04 08 01 mvhi r4,0x801 8004ad4: 38 84 d0 c0 ori r4,r4,0xd0c0
_ISR_Disable( level );
8004ad8: 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;
8004adc: 40 86 00 00 lbu r6,(r4+0) 8004ae0: 34 c6 00 01 addi r6,r6,1
_ISR_Disable( level );
8004ae4: 90 00 28 00 rcsr r5,IE 8004ae8: a0 a3 40 00 and r8,r5,r3 8004aec: d0 08 00 00 wcsr IE,r8
search_thread = (Thread_Control *) header->last;
8004af0: 28 22 00 08 lw r2,(r1+8)
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
8004af4: e0 00 00 0b bi 8004b20 <_Thread_queue_Enqueue_priority+0x144>
search_priority = search_thread->current_priority;
8004af8: 28 46 00 14 lw r6,(r2+20)
if ( priority >= search_priority ) 8004afc: 51 a6 00 0a bgeu r13,r6,8004b24 <_Thread_queue_Enqueue_priority+0x148> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level );
8004b00: d0 05 00 00 wcsr IE,r5 8004b04: d0 08 00 00 wcsr IE,r8
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
8004b08: 28 49 00 10 lw r9,(r2+16) 8004b0c: a0 e9 48 00 and r9,r7,r9
8004b10: 5d 20 00 03 bne r9,r0,8004b1c <_Thread_queue_Enqueue_priority+0x140> _ISR_Enable( level );
8004b14: d0 05 00 00 wcsr IE,r5
goto restart_reverse_search;
8004b18: e3 ff ff f1 bi 8004adc <_Thread_queue_Enqueue_priority+0x100>
} search_thread = (Thread_Control *)
8004b1c: 28 42 00 04 lw r2,(r2+4)
restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 8004b20: 5c 41 ff f6 bne r2,r1,8004af8 <_Thread_queue_Enqueue_priority+0x11c> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state !=
8004b24: 29 83 00 30 lw r3,(r12+48) 8004b28: 34 01 00 01 mvi r1,1 8004b2c: b8 a0 38 00 mv r7,r5
8004b30: 5c 61 00 17 bne r3,r1,8004b8c <_Thread_queue_Enqueue_priority+0x1b0> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
8004b34: 34 01 00 00 mvi r1,0 8004b38: 59 81 00 30 sw (r12+48),r1
if ( priority == search_priority )
8004b3c: b8 a0 20 00 mv r4,r5
8004b40: 45 a6 00 0a be r13,r6,8004b68 <_Thread_queue_Enqueue_priority+0x18c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next;
8004b44: 28 41 00 00 lw r1,(r2+0)
the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node;
8004b48: 59 62 00 04 sw (r11+4),r2
search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
8004b4c: 59 6c 00 44 sw (r11+68),r12
search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node;
8004b50: 59 61 00 00 sw (r11+0),r1
the_node->previous = search_node; search_node->next = the_node;
8004b54: 58 4b 00 00 sw (r2+0),r11
next_node->previous = the_node;
8004b58: 58 2b 00 04 sw (r1+4),r11
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
8004b5c: d0 05 00 00 wcsr IE,r5 8004b60: 34 01 00 01 mvi r1,1
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
8004b64: e0 00 00 0c bi 8004b94 <_Thread_queue_Enqueue_priority+0x1b8> 8004b68: 34 42 00 3c addi r2,r2,60
equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous;
8004b6c: 28 41 00 04 lw r1,(r2+4)
the_node = (Chain_Node *) the_thread; the_node->next = search_node;
8004b70: 59 62 00 00 sw (r11+0),r2
the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
8004b74: 59 6c 00 44 sw (r11+68),r12
search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node;
8004b78: 59 61 00 04 sw (r11+4),r1
previous_node->next = the_node;
8004b7c: 58 2b 00 00 sw (r1+0),r11
search_node->previous = the_node;
8004b80: 58 4b 00 04 sw (r2+4),r11
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
8004b84: d0 04 00 00 wcsr IE,r4 8004b88: e3 ff ff f6 bi 8004b60 <_Thread_queue_Enqueue_priority+0x184>
* the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state;
8004b8c: 29 81 00 30 lw r1,(r12+48)
* For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level;
8004b90: 59 c7 00 00 sw (r14+0),r7
return the_thread_queue->sync_state; }
8004b94: 2b 9d 00 04 lw ra,(sp+4) 8004b98: 2b 8b 00 14 lw r11,(sp+20) 8004b9c: 2b 8c 00 10 lw r12,(sp+16) 8004ba0: 2b 8d 00 0c lw r13,(sp+12) 8004ba4: 2b 8e 00 08 lw r14,(sp+8) 8004ba8: 37 9c 00 14 addi sp,sp,20 8004bac: c3 a0 00 00 ret
0800985c <_Thread_queue_Process_timeout>: #include <rtems/score/tqdata.h> void _Thread_queue_Process_timeout( Thread_Control *the_thread ) {
800985c: 37 9c ff fc addi sp,sp,-4 8009860: 5b 9d 00 04 sw (sp+4),ra 8009864: b8 20 10 00 mv r2,r1
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
8009868: 28 21 00 44 lw r1,(r1+68)
* If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
800986c: 28 24 00 30 lw r4,(r1+48)
8009870: 44 80 00 0c be r4,r0,80098a0 <_Thread_queue_Process_timeout+0x44>
8009874: 78 03 08 01 mvhi r3,0x801 8009878: 38 63 d9 60 ori r3,r3,0xd960 800987c: 28 63 00 00 lw r3,(r3+0)
8009880: 5c 43 00 08 bne r2,r3,80098a0 <_Thread_queue_Process_timeout+0x44> _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
8009884: 34 03 00 03 mvi r3,3
8009888: 44 83 00 0a be r4,r3,80098b0 <_Thread_queue_Process_timeout+0x54><== NEVER TAKEN
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
800988c: 34 03 00 02 mvi r3,2 8009890: 58 23 00 30 sw (r1+48),r3
*/ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
8009894: 28 21 00 3c lw r1,(r1+60) 8009898: 58 41 00 34 sw (r2+52),r1 800989c: e0 00 00 05 bi 80098b0 <_Thread_queue_Process_timeout+0x54>
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
80098a0: 28 21 00 3c lw r1,(r1+60) 80098a4: 58 41 00 34 sw (r2+52),r1
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
80098a8: 28 41 00 44 lw r1,(r2+68) 80098ac: fb ff ff 93 calli 80096f8 <_Thread_queue_Extract>
} }
80098b0: 2b 9d 00 04 lw ra,(sp+4) 80098b4: 37 9c 00 04 addi sp,sp,4 80098b8: c3 a0 00 00 ret
08004c3c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) {
8004c3c: 37 9c ff ec addi sp,sp,-20 8004c40: 5b 8b 00 10 sw (sp+16),r11 8004c44: 5b 8c 00 0c sw (sp+12),r12 8004c48: 5b 8d 00 08 sw (sp+8),r13 8004c4c: 5b 9d 00 04 sw (sp+4),ra 8004c50: b8 20 58 00 mv r11,r1 8004c54: 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 )
8004c58: 44 20 00 17 be r1,r0,8004cb4 <_Thread_queue_Requeue+0x78> <== NEVER TAKEN
/* * 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 ) {
8004c5c: 28 22 00 34 lw r2,(r1+52) 8004c60: 34 01 00 01 mvi r1,1
8004c64: 5c 41 00 14 bne r2,r1,8004cb4 <_Thread_queue_Requeue+0x78> <== NEVER TAKEN
Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level );
8004c68: 90 00 68 00 rcsr r13,IE 8004c6c: 34 01 ff fe mvi r1,-2 8004c70: a1 a1 08 00 and r1,r13,r1 8004c74: d0 01 00 00 wcsr IE,r1
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
8004c78: 29 82 00 10 lw r2,(r12+16) 8004c7c: 78 01 00 03 mvhi r1,0x3 8004c80: 38 21 be e0 ori r1,r1,0xbee0 8004c84: a0 41 08 00 and r1,r2,r1
8004c88: 44 20 00 0a be r1,r0,8004cb0 <_Thread_queue_Requeue+0x74> <== NEVER TAKEN
8004c8c: 34 03 00 01 mvi r3,1 8004c90: 59 63 00 30 sw (r11+48),r3
_Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true );
8004c94: b9 60 08 00 mv r1,r11 8004c98: b9 80 10 00 mv r2,r12 8004c9c: f8 00 12 a3 calli 8009728 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
8004ca0: b9 60 08 00 mv r1,r11 8004ca4: b9 80 10 00 mv r2,r12 8004ca8: 37 83 00 14 addi r3,sp,20 8004cac: fb ff ff 4c calli 80049dc <_Thread_queue_Enqueue_priority>
} _ISR_Enable( level );
8004cb0: d0 0d 00 00 wcsr IE,r13
} }
8004cb4: 2b 9d 00 04 lw ra,(sp+4) 8004cb8: 2b 8b 00 10 lw r11,(sp+16) 8004cbc: 2b 8c 00 0c lw r12,(sp+12) 8004cc0: 2b 8d 00 08 lw r13,(sp+8) 8004cc4: 37 9c 00 14 addi sp,sp,20 8004cc8: c3 a0 00 00 ret
08004ccc <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) {
8004ccc: 37 9c ff f8 addi sp,sp,-8 8004cd0: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location );
8004cd4: 37 82 00 08 addi r2,sp,8 8004cd8: fb ff fd 94 calli 8004328 <_Thread_Get>
switch ( location ) {
8004cdc: 2b 82 00 08 lw r2,(sp+8)
8004ce0: 5c 40 00 07 bne r2,r0,8004cfc <_Thread_queue_Timeout+0x30> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread );
8004ce4: f8 00 12 de calli 800985c <_Thread_queue_Process_timeout>
*/ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1;
8004ce8: 78 01 08 01 mvhi r1,0x801 8004cec: 38 21 d8 a4 ori r1,r1,0xd8a4 8004cf0: 28 22 00 00 lw r2,(r1+0) 8004cf4: 34 42 ff ff addi r2,r2,-1 8004cf8: 58 22 00 00 sw (r1+0),r2
_Thread_Unnest_dispatch(); break; } }
8004cfc: 2b 9d 00 04 lw ra,(sp+4) 8004d00: 37 9c 00 08 addi sp,sp,8 8004d04: c3 a0 00 00 ret
08014140 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) {
8014140: 37 9c ff a4 addi sp,sp,-92 8014144: 5b 8b 00 44 sw (sp+68),r11 8014148: 5b 8c 00 40 sw (sp+64),r12 801414c: 5b 8d 00 3c sw (sp+60),r13 8014150: 5b 8e 00 38 sw (sp+56),r14 8014154: 5b 8f 00 34 sw (sp+52),r15 8014158: 5b 90 00 30 sw (sp+48),r16 801415c: 5b 91 00 2c sw (sp+44),r17 8014160: 5b 92 00 28 sw (sp+40),r18 8014164: 5b 93 00 24 sw (sp+36),r19 8014168: 5b 94 00 20 sw (sp+32),r20 801416c: 5b 95 00 1c sw (sp+28),r21 8014170: 5b 96 00 18 sw (sp+24),r22 8014174: 5b 97 00 14 sw (sp+20),r23 8014178: 5b 98 00 10 sw (sp+16),r24 801417c: 5b 99 00 0c sw (sp+12),r25 8014180: 5b 9b 00 08 sw (sp+8),fp 8014184: 5b 9d 00 04 sw (sp+4),ra
static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
8014188: 78 11 08 03 mvhi r17,0x803
* @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) {
801418c: b8 20 58 00 mv r11,r1 8014190: 37 82 00 54 addi r2,sp,84
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL;
8014194: 34 01 00 00 mvi r1,0
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
8014198: 37 96 00 58 addi r22,sp,88 801419c: 37 8e 00 48 addi r14,sp,72 80141a0: 37 92 00 4c addi r18,sp,76
static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
80141a4: 78 10 08 03 mvhi r16,0x803 80141a8: 78 0d 08 03 mvhi r13,0x803
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
80141ac: 5b 96 00 54 sw (sp+84),r22
the_chain->permanent_null = NULL;
80141b0: 5b 81 00 58 sw (sp+88),r1
the_chain->last = _Chain_Head(the_chain);
80141b4: 5b 82 00 5c sw (sp+92),r2
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
80141b8: 5b 92 00 48 sw (sp+72),r18
the_chain->permanent_null = NULL;
80141bc: 5b 81 00 4c sw (sp+76),r1
the_chain->last = _Chain_Head(the_chain);
80141c0: 5b 8e 00 50 sw (sp+80),r14
static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
80141c4: 3a 31 fd fc ori r17,r17,0xfdfc
static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
80141c8: 3a 10 fd 3c ori r16,r16,0xfd3c
*/ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL;
80141cc: b8 20 a8 00 mv r21,r1 80141d0: 39 ad fc ac ori r13,r13,0xfcac
*/ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
80141d4: 35 74 00 30 addi r20,r11,48
/* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
80141d8: 35 6f 00 68 addi r15,r11,104
static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
80141dc: 35 7b 00 08 addi fp,r11,8
static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
80141e0: 35 79 00 40 addi r25,r11,64
/* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
80141e4: 34 18 00 01 mvi r24,1
Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
80141e8: 34 17 00 03 mvi r23,3
* of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level );
80141ec: 34 13 ff fe mvi r19,-2
{ /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain;
80141f0: 37 81 00 54 addi r1,sp,84 80141f4: 59 61 00 78 sw (r11+120),r1
static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
80141f8: 2a 22 00 00 lw r2,(r17+0)
/* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
80141fc: 29 63 00 3c lw r3,(r11+60)
watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
8014200: ba 80 08 00 mv r1,r20
/* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot;
8014204: 59 62 00 3c sw (r11+60),r2
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
8014208: c8 43 10 00 sub r2,r2,r3 801420c: b9 c0 18 00 mv r3,r14 8014210: f8 00 14 af calli 80194cc <_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;
8014214: 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();
8014218: 2a 0c 00 00 lw r12,(r16+0)
/* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 801421c: 50 4c 00 06 bgeu r2,r12,8014234 <_Timer_server_Body+0xf4> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
8014220: c9 82 10 00 sub r2,r12,r2 8014224: b9 e0 08 00 mv r1,r15 8014228: b9 c0 18 00 mv r3,r14 801422c: f8 00 14 a8 calli 80194cc <_Watchdog_Adjust_to_chain> 8014230: e0 00 00 06 bi 8014248 <_Timer_server_Body+0x108>
} else if ( snapshot < last_snapshot ) { 8014234: 51 82 00 05 bgeu r12,r2,8014248 <_Timer_server_Body+0x108> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
8014238: c8 4c 18 00 sub r3,r2,r12 801423c: b9 e0 08 00 mv r1,r15 8014240: 34 02 00 01 mvi r2,1 8014244: f8 00 14 6a calli 80193ec <_Watchdog_Adjust>
} watchdogs->last_snapshot = snapshot;
8014248: 59 6c 00 74 sw (r11+116),r12
} static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
801424c: 29 61 00 78 lw r1,(r11+120) 8014250: f8 00 03 02 calli 8014e58 <_Chain_Get>
if ( timer == NULL ) {
8014254: 44 20 00 0b be r1,r0,8014280 <_Timer_server_Body+0x140> <== ALWAYS TAKEN
static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
8014258: 28 23 00 38 lw r3,(r1+56) <== NOT EXECUTED 801425c: 5c 78 00 04 bne r3,r24,801426c <_Timer_server_Body+0x12c> <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
8014260: 34 22 00 10 addi r2,r1,16 <== NOT EXECUTED 8014264: ba 80 08 00 mv r1,r20 <== NOT EXECUTED 8014268: e0 00 00 04 bi 8014278 <_Timer_server_Body+0x138> <== NOT EXECUTED
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
801426c: 5c 77 ff f8 bne r3,r23,801424c <_Timer_server_Body+0x10c> <== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
8014270: 34 22 00 10 addi r2,r1,16 <== NOT EXECUTED 8014274: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8014278: f8 00 14 c0 calli 8019578 <_Watchdog_Insert> <== NOT EXECUTED 801427c: e3 ff ff f4 bi 801424c <_Timer_server_Body+0x10c> <== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level );
8014280: 90 00 10 00 rcsr r2,IE 8014284: a0 53 08 00 and r1,r2,r19 8014288: d0 01 00 00 wcsr IE,r1
if ( _Chain_Is_empty( insert_chain ) ) {
801428c: 2b 81 00 54 lw r1,(sp+84)
8014290: 5c 36 00 06 bne r1,r22,80142a8 <_Timer_server_Body+0x168> <== NEVER TAKEN
ts->insert_chain = NULL;
8014294: 59 75 00 78 sw (r11+120),r21
_ISR_Enable( level );
8014298: 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 ) ) {
801429c: 2b 81 00 48 lw r1,(sp+72)
80142a0: 5c 32 00 04 bne r1,r18,80142b0 <_Timer_server_Body+0x170>
80142a4: e0 00 00 17 bi 8014300 <_Timer_server_Body+0x1c0>
ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level );
80142a8: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED 80142ac: e3 ff ff d3 bi 80141f8 <_Timer_server_Body+0xb8> <== NOT EXECUTED
/* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level );
80142b0: 90 00 10 00 rcsr r2,IE 80142b4: a0 53 08 00 and r1,r2,r19 80142b8: 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));
80142bc: 2b 84 00 48 lw r4,(sp+72)
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 80142c0: 5c 92 00 03 bne r4,r18,80142cc <_Timer_server_Body+0x18c>
80142c4: 34 04 00 00 mvi r4,0 80142c8: e0 00 00 04 bi 80142d8 <_Timer_server_Body+0x198>
{ Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next;
80142cc: 28 83 00 00 lw r3,(r4+0)
the_chain->first = new_first;
80142d0: 5b 83 00 48 sw (sp+72),r3
new_first->previous = _Chain_Head(the_chain);
80142d4: 58 6e 00 04 sw (r3+4),r14
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 80142d8: 44 80 00 08 be r4,r0,80142f8 <_Timer_server_Body+0x1b8> watchdog->state = WATCHDOG_INACTIVE;
80142dc: 58 95 00 08 sw (r4+8),r21
_ISR_Enable( level );
80142e0: 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 );
80142e4: 28 82 00 24 lw r2,(r4+36) 80142e8: 28 83 00 1c lw r3,(r4+28) 80142ec: 28 81 00 20 lw r1,(r4+32) 80142f0: d8 60 00 00 call r3
}
80142f4: e3 ff ff ef bi 80142b0 <_Timer_server_Body+0x170>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level );
80142f8: d0 02 00 00 wcsr IE,r2 80142fc: e3 ff ff bd bi 80141f0 <_Timer_server_Body+0xb0>
* the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false;
8014300: 34 01 00 00 mvi r1,0 8014304: 31 61 00 7c sb (r11+124),r1 8014308: 29 a1 00 00 lw r1,(r13+0) 801430c: 34 21 00 01 addi r1,r1,1 8014310: 59 a1 00 00 sw (r13+0),r1
/* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING );
8014314: 29 61 00 00 lw r1,(r11+0) 8014318: 34 02 00 08 mvi r2,8 801431c: f8 00 11 2d calli 80187d0 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
8014320: b9 60 08 00 mv r1,r11 8014324: fb ff ff 4d calli 8014058 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
8014328: b9 60 08 00 mv r1,r11 801432c: fb ff ff 68 calli 80140cc <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
8014330: f8 00 0d fd calli 8017b24 <_Thread_Enable_dispatch>
ts->active = true;
8014334: 34 01 00 01 mvi r1,1 8014338: 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 );
801433c: bb 60 08 00 mv r1,fp 8014340: f8 00 14 ed calli 80196f4 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
8014344: bb 20 08 00 mv r1,r25 8014348: f8 00 14 eb calli 80196f4 <_Watchdog_Remove> 801434c: e3 ff ff a9 bi 80141f0 <_Timer_server_Body+0xb0>
08014350 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) {
8014350: 37 9c ff f8 addi sp,sp,-8 8014354: 5b 8b 00 08 sw (sp+8),r11 8014358: 5b 9d 00 04 sw (sp+4),ra 801435c: b8 20 58 00 mv r11,r1
if ( ts->insert_chain == NULL ) {
8014360: 28 21 00 78 lw r1,(r1+120)
static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) {
8014364: b8 40 20 00 mv r4,r2
if ( ts->insert_chain == NULL ) {
8014368: 5c 20 00 47 bne r1,r0,8014484 <_Timer_server_Schedule_operation_method+0x134><== NEVER TAKEN
801436c: 78 01 08 03 mvhi r1,0x803 8014370: 38 21 fc ac ori r1,r1,0xfcac 8014374: 28 22 00 00 lw r2,(r1+0) 8014378: 34 42 00 01 addi r2,r2,1 801437c: 58 22 00 00 sw (r1+0),r2
* being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
8014380: 28 81 00 38 lw r1,(r4+56) 8014384: 34 02 00 01 mvi r2,1
8014388: 5c 22 00 1d bne r1,r2,80143fc <_Timer_server_Schedule_operation_method+0xac> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level );
801438c: 90 00 18 00 rcsr r3,IE 8014390: 34 01 ff fe mvi r1,-2 8014394: a0 61 08 00 and r1,r3,r1 8014398: d0 01 00 00 wcsr IE,r1
snapshot = _Watchdog_Ticks_since_boot;
801439c: 78 02 08 03 mvhi r2,0x803 80143a0: 38 42 fd fc ori r2,r2,0xfdfc
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
80143a4: 29 61 00 30 lw r1,(r11+48) 80143a8: 28 45 00 00 lw r5,(r2+0)
last_snapshot = ts->Interval_watchdogs.last_snapshot;
80143ac: 29 62 00 3c lw r2,(r11+60)
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
80143b0: 35 66 00 34 addi r6,r11,52
80143b4: 44 26 00 08 be r1,r6,80143d4 <_Timer_server_Schedule_operation_method+0x84> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval;
80143b8: 28 27 00 10 lw r7,(r1+16)
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot;
80143bc: c8 a2 10 00 sub r2,r5,r2
delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) {
80143c0: f4 e2 30 00 cmpgu r6,r7,r2
delta_interval -= delta;
80143c4: c8 e2 10 00 sub r2,r7,r2
* We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) {
80143c8: c8 06 30 00 sub r6,r0,r6 80143cc: a0 46 10 00 and r2,r2,r6
delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval;
80143d0: 58 22 00 10 sw (r1+16),r2
} ts->Interval_watchdogs.last_snapshot = snapshot;
80143d4: 59 65 00 3c sw (r11+60),r5
_ISR_Enable( level );
80143d8: d0 03 00 00 wcsr IE,r3
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
80143dc: 35 61 00 30 addi r1,r11,48 80143e0: 34 82 00 10 addi r2,r4,16 80143e4: f8 00 14 65 calli 8019578 <_Watchdog_Insert>
if ( !ts->active ) {
80143e8: 41 61 00 7c lbu r1,(r11+124)
80143ec: 5c 20 00 24 bne r1,r0,801447c <_Timer_server_Schedule_operation_method+0x12c> _Timer_server_Reset_interval_system_watchdog( ts );
80143f0: b9 60 08 00 mv r1,r11 80143f4: fb ff ff 19 calli 8014058 <_Timer_server_Reset_interval_system_watchdog> 80143f8: e0 00 00 21 bi 801447c <_Timer_server_Schedule_operation_method+0x12c>
} } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
80143fc: 34 02 00 03 mvi r2,3
8014400: 5c 22 00 1f bne r1,r2,801447c <_Timer_server_Schedule_operation_method+0x12c> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level );
8014404: 90 00 38 00 rcsr r7,IE 8014408: 34 01 ff fe mvi r1,-2 801440c: a0 e1 08 00 and r1,r7,r1 8014410: 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));
8014414: 29 62 00 68 lw r2,(r11+104)
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
8014418: 78 01 08 03 mvhi r1,0x803
last_snapshot = ts->TOD_watchdogs.last_snapshot;
801441c: 29 66 00 74 lw r6,(r11+116)
/* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
8014420: 38 21 fd 3c ori r1,r1,0xfd3c
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
8014424: 35 63 00 6c addi r3,r11,108 8014428: 28 21 00 00 lw r1,(r1+0)
801442c: 44 43 00 0b be r2,r3,8014458 <_Timer_server_Schedule_operation_method+0x108> last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval;
8014430: 28 45 00 10 lw r5,(r2+16)
} } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot;
8014434: b4 a6 18 00 add r3,r5,r6
delta_interval += delta;
8014438: c8 61 18 00 sub r3,r3,r1
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { 801443c: 50 c1 00 06 bgeu r6,r1,8014454 <_Timer_server_Schedule_operation_method+0x104> /* * We advanced in time. */ delta = snapshot - last_snapshot;
8014440: c8 26 18 00 sub r3,r1,r6
if (delta_interval > delta) {
8014444: f4 a3 30 00 cmpgu r6,r5,r3
delta_interval -= delta;
8014448: c8 a3 18 00 sub r3,r5,r3
if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) {
801444c: c8 06 28 00 sub r5,r0,r6 8014450: a0 65 18 00 and r3,r3,r5
* Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval;
8014454: 58 43 00 10 sw (r2+16),r3
} ts->TOD_watchdogs.last_snapshot = snapshot;
8014458: 59 61 00 74 sw (r11+116),r1
_ISR_Enable( level );
801445c: d0 07 00 00 wcsr IE,r7
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
8014460: 35 61 00 68 addi r1,r11,104 8014464: 34 82 00 10 addi r2,r4,16 8014468: f8 00 14 44 calli 8019578 <_Watchdog_Insert>
if ( !ts->active ) {
801446c: 41 61 00 7c lbu r1,(r11+124)
8014470: 5c 20 00 03 bne r1,r0,801447c <_Timer_server_Schedule_operation_method+0x12c> _Timer_server_Reset_tod_system_watchdog( ts );
8014474: b9 60 08 00 mv r1,r11 8014478: fb ff ff 15 calli 80140cc <_Timer_server_Reset_tod_system_watchdog>
} } _Thread_Enable_dispatch();
801447c: f8 00 0d aa calli 8017b24 <_Thread_Enable_dispatch> 8014480: e0 00 00 03 bi 801448c <_Timer_server_Schedule_operation_method+0x13c>
* server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node );
8014484: 29 61 00 78 lw r1,(r11+120) <== NOT EXECUTED 8014488: f8 00 02 68 calli 8014e28 <_Chain_Append> <== NOT EXECUTED
} }
801448c: 2b 9d 00 04 lw ra,(sp+4) 8014490: 2b 8b 00 08 lw r11,(sp+8) 8014494: 37 9c 00 08 addi sp,sp,8 8014498: c3 a0 00 00 ret
080079a4 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) {
80079a4: 37 9c ff e4 addi sp,sp,-28 80079a8: 5b 8b 00 1c sw (sp+28),r11 80079ac: 5b 8c 00 18 sw (sp+24),r12 80079b0: 5b 8d 00 14 sw (sp+20),r13 80079b4: 5b 8e 00 10 sw (sp+16),r14 80079b8: 5b 8f 00 0c sw (sp+12),r15 80079bc: 5b 90 00 08 sw (sp+8),r16 80079c0: 5b 9d 00 04 sw (sp+4),ra 80079c4: b8 20 60 00 mv r12,r1 80079c8: b8 40 20 00 mv r4,r2 80079cc: b8 60 58 00 mv r11,r3
ISR_Level level; _ISR_Disable( level );
80079d0: 90 00 10 00 rcsr r2,IE 80079d4: 34 01 ff fe mvi r1,-2 80079d8: a0 41 08 00 and r1,r2,r1 80079dc: 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));
80079e0: 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;
80079e4: 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 ) ) { 80079e8: 44 2e 00 1d be r1,r14,8007a5c <_Watchdog_Adjust+0xb8> switch ( direction ) { 80079ec: 44 80 00 04 be r4,r0,80079fc <_Watchdog_Adjust+0x58>
80079f0: 34 03 00 01 mvi r3,1
80079f4: 5c 83 00 1a bne r4,r3,8007a5c <_Watchdog_Adjust+0xb8> <== NEVER TAKEN
80079f8: e0 00 00 04 bi 8007a08 <_Watchdog_Adjust+0x64>
if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1;
80079fc: 34 10 00 01 mvi r16,1
_ISR_Enable( level ); _Watchdog_Tickle( header ); _ISR_Disable( level );
8007a00: 34 0f ff fe mvi r15,-2 8007a04: e0 00 00 15 bi 8007a58 <_Watchdog_Adjust+0xb4>
* Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units;
8007a08: 28 23 00 10 lw r3,(r1+16) 8007a0c: b4 6b 58 00 add r11,r3,r11 8007a10: e0 00 00 05 bi 8007a24 <_Watchdog_Adjust+0x80>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first );
8007a14: 29 81 00 00 lw r1,(r12+0)
break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) {
8007a18: 28 2d 00 10 lw r13,(r1+16)
8007a1c: 51 6d 00 04 bgeu r11,r13,8007a2c <_Watchdog_Adjust+0x88> _Watchdog_First( header )->delta_interval -= units;
8007a20: c9 ab 58 00 sub r11,r13,r11 8007a24: 58 2b 00 10 sw (r1+16),r11
break;
8007a28: e0 00 00 0d bi 8007a5c <_Watchdog_Adjust+0xb8>
} else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1;
8007a2c: 58 30 00 10 sw (r1+16),r16
_ISR_Enable( level );
8007a30: d0 02 00 00 wcsr IE,r2
_Watchdog_Tickle( header );
8007a34: b9 80 08 00 mv r1,r12 8007a38: f8 00 00 9e calli 8007cb0 <_Watchdog_Tickle>
_ISR_Disable( level );
8007a3c: 90 00 08 00 rcsr r1,IE 8007a40: a0 2f 10 00 and r2,r1,r15 8007a44: d0 02 00 00 wcsr IE,r2
if ( _Chain_Is_empty( header ) )
8007a48: 29 83 00 00 lw r3,(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;
8007a4c: c9 6d 58 00 sub r11,r11,r13 8007a50: b8 20 10 00 mv r2,r1
_Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 8007a54: 44 6e 00 02 be r3,r14,8007a5c <_Watchdog_Adjust+0xb8> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) {
8007a58: 5d 60 ff ef bne r11,r0,8007a14 <_Watchdog_Adjust+0x70> <== ALWAYS TAKEN
} break; } } _ISR_Enable( level );
8007a5c: d0 02 00 00 wcsr IE,r2
}
8007a60: 2b 9d 00 04 lw ra,(sp+4) 8007a64: 2b 8b 00 1c lw r11,(sp+28) 8007a68: 2b 8c 00 18 lw r12,(sp+24) 8007a6c: 2b 8d 00 14 lw r13,(sp+20) 8007a70: 2b 8e 00 10 lw r14,(sp+16) 8007a74: 2b 8f 00 0c lw r15,(sp+12) 8007a78: 2b 90 00 08 lw r16,(sp+8) 8007a7c: 37 9c 00 1c addi sp,sp,28 8007a80: c3 a0 00 00 ret
08005694 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) {
8005694: 37 9c ff f8 addi sp,sp,-8 8005698: 5b 8b 00 08 sw (sp+8),r11 800569c: 5b 8c 00 04 sw (sp+4),r12
Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level;
80056a0: 78 03 08 01 mvhi r3,0x801 80056a4: 38 63 d9 3c ori r3,r3,0xd93c 80056a8: 28 67 00 00 lw r7,(r3+0)
_ISR_Disable( level );
80056ac: 90 00 28 00 rcsr r5,IE 80056b0: 34 09 ff fe mvi r9,-2 80056b4: a0 a9 48 00 and r9,r5,r9 80056b8: d0 09 00 00 wcsr IE,r9
/* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
80056bc: 28 43 00 08 lw r3,(r2+8)
80056c0: 44 60 00 03 be r3,r0,80056cc <_Watchdog_Insert+0x38> _ISR_Enable( level );
80056c4: d0 05 00 00 wcsr IE,r5
return;
80056c8: e0 00 00 37 bi 80057a4 <_Watchdog_Insert+0x110>
} the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++;
80056cc: 78 03 08 01 mvhi r3,0x801 80056d0: 38 63 d9 f0 ori r3,r3,0xd9f0 80056d4: 28 68 00 00 lw r8,(r3+0)
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
80056d8: 78 06 08 01 mvhi r6,0x801
if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED;
80056dc: 34 04 00 01 mvi r4,1
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
80056e0: 38 c6 d9 5c ori r6,r6,0xd95c
_ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++;
80056e4: 35 08 00 01 addi r8,r8,1 80056e8: 58 68 00 00 sw (r3+0),r8
if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED;
80056ec: 58 44 00 08 sw (r2+8),r4
* mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
80056f0: b8 80 58 00 mv r11,r4
goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
80056f4: b8 c0 50 00 mv r10,r6
the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial;
80056f8: 28 44 00 0c lw r4,(r2+12)
* cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
80056fc: 28 23 00 00 lw r3,(r1+0)
; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 8005700: 44 80 00 13 be r4,r0,800574c <_Watchdog_Insert+0xb8>
8005704: 28 68 00 00 lw r8,(r3+0)
8005708: 45 00 00 11 be r8,r0,800574c <_Watchdog_Insert+0xb8> break; if ( delta_interval < after->delta_interval ) {
800570c: 28 68 00 10 lw r8,(r3+16)
8005710: 50 88 00 04 bgeu r4,r8,8005720 <_Watchdog_Insert+0x8c> after->delta_interval -= delta_interval;
8005714: c9 04 40 00 sub r8,r8,r4 8005718: 58 68 00 10 sw (r3+16),r8
break;
800571c: e0 00 00 0c bi 800574c <_Watchdog_Insert+0xb8>
* used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level );
8005720: d0 05 00 00 wcsr IE,r5 8005724: d0 09 00 00 wcsr IE,r9
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
8005728: 28 4c 00 08 lw r12,(r2+8)
if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval;
800572c: c8 88 20 00 sub r4,r4,r8
* mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
8005730: 5d 8b 00 14 bne r12,r11,8005780 <_Watchdog_Insert+0xec> <== NEVER TAKEN
goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
8005734: 28 c8 00 00 lw r8,(r6+0)
8005738: 50 e8 00 03 bgeu r7,r8,8005744 <_Watchdog_Insert+0xb0> _Watchdog_Sync_level = insert_isr_nest_level;
800573c: 59 47 00 00 sw (r10+0),r7
goto restart;
8005740: e3 ff ff ee bi 80056f8 <_Watchdog_Insert+0x64>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next );
8005744: 28 63 00 00 lw r3,(r3+0)
} }
8005748: e3 ff ff ee bi 8005700 <_Watchdog_Insert+0x6c>
_Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
800574c: 28 63 00 04 lw r3,(r3+4)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
8005750: 78 01 08 01 mvhi r1,0x801 8005754: 38 21 d9 f4 ori r1,r1,0xd9f4
} } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval;
8005758: 58 44 00 10 sw (r2+16),r4
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot;
800575c: 28 24 00 00 lw r4,(r1+0)
) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next;
8005760: 28 61 00 00 lw r1,(r3+0)
Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node;
8005764: 58 43 00 04 sw (r2+4),r3
before_node = after_node->next; after_node->next = the_node;
8005768: 58 62 00 00 sw (r3+0),r2
RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE;
800576c: 34 03 00 02 mvi r3,2 8005770: 58 44 00 14 sw (r2+20),r4 8005774: 58 43 00 08 sw (r2+8),r3
the_node->next = before_node; before_node->previous = the_node;
8005778: 58 22 00 04 sw (r1+4),r2
Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node;
800577c: 58 41 00 00 sw (r2+0),r1
exit_insert: _Watchdog_Sync_level = insert_isr_nest_level;
8005780: 78 02 08 01 mvhi r2,0x801 8005784: 38 42 d9 5c ori r2,r2,0xd95c
_Watchdog_Sync_count--;
8005788: 78 01 08 01 mvhi r1,0x801
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level;
800578c: 58 47 00 00 sw (r2+0),r7
_Watchdog_Sync_count--;
8005790: 38 21 d9 f0 ori r1,r1,0xd9f0 8005794: 28 22 00 00 lw r2,(r1+0) 8005798: 34 42 ff ff addi r2,r2,-1 800579c: 58 22 00 00 sw (r1+0),r2
_ISR_Enable( level );
80057a0: d0 05 00 00 wcsr IE,r5
}
80057a4: 2b 8b 00 08 lw r11,(sp+8) 80057a8: 2b 8c 00 04 lw r12,(sp+4) 80057ac: 37 9c 00 08 addi sp,sp,8 80057b0: c3 a0 00 00 ret
08005810 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level );
8005810: 90 00 20 00 rcsr r4,IE 8005814: 34 02 ff fe mvi r2,-2 8005818: a0 82 10 00 and r2,r4,r2 800581c: d0 02 00 00 wcsr IE,r2
previous_state = the_watchdog->state;
8005820: 28 22 00 08 lw r2,(r1+8)
switch ( previous_state ) {
8005824: 34 03 00 01 mvi r3,1
8005828: 44 43 00 05 be r2,r3,800583c <_Watchdog_Remove+0x2c> 800582c: 44 40 00 1e be r2,r0,80058a4 <_Watchdog_Remove+0x94>
8005830: 34 03 00 03 mvi r3,3
8005834: 54 43 00 1c bgu r2,r3,80058a4 <_Watchdog_Remove+0x94> <== NEVER TAKEN
8005838: e0 00 00 04 bi 8005848 <_Watchdog_Remove+0x38>
/* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE;
800583c: 34 03 00 00 mvi r3,0 8005840: 58 23 00 08 sw (r1+8),r3
break;
8005844: e0 00 00 18 bi 80058a4 <_Watchdog_Remove+0x94>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next );
8005848: 28 23 00 00 lw r3,(r1+0)
case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE;
800584c: 34 05 00 00 mvi r5,0 8005850: 58 25 00 08 sw (r1+8),r5
next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) )
8005854: 28 65 00 00 lw r5,(r3+0)
8005858: 44 a0 00 05 be r5,r0,800586c <_Watchdog_Remove+0x5c> next_watchdog->delta_interval += the_watchdog->delta_interval;
800585c: 28 66 00 10 lw r6,(r3+16) 8005860: 28 25 00 10 lw r5,(r1+16) 8005864: b4 c5 28 00 add r5,r6,r5 8005868: 58 65 00 10 sw (r3+16),r5
if ( _Watchdog_Sync_count )
800586c: 78 03 08 01 mvhi r3,0x801 8005870: 38 63 d9 f0 ori r3,r3,0xd9f0 8005874: 28 63 00 00 lw r3,(r3+0)
8005878: 44 60 00 07 be r3,r0,8005894 <_Watchdog_Remove+0x84> _Watchdog_Sync_level = _ISR_Nest_level;
800587c: 78 03 08 01 mvhi r3,0x801 8005880: 38 63 d9 3c ori r3,r3,0xd93c 8005884: 28 65 00 00 lw r5,(r3+0) 8005888: 78 03 08 01 mvhi r3,0x801 800588c: 38 63 d9 5c ori r3,r3,0xd95c 8005890: 58 65 00 00 sw (r3+0),r5
) { Chain_Node *next; Chain_Node *previous; next = the_node->next;
8005894: 28 23 00 00 lw r3,(r1+0)
previous = the_node->previous;
8005898: 28 25 00 04 lw r5,(r1+4)
next->previous = previous; previous->next = next;
800589c: 58 a3 00 00 sw (r5+0),r3
Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous;
80058a0: 58 65 00 04 sw (r3+4),r5
_Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
80058a4: 78 03 08 01 mvhi r3,0x801 80058a8: 38 63 d9 f4 ori r3,r3,0xd9f4 80058ac: 28 63 00 00 lw r3,(r3+0) 80058b0: 58 23 00 18 sw (r1+24),r3
_ISR_Enable( level );
80058b4: d0 04 00 00 wcsr IE,r4
return( previous_state ); }
80058b8: b8 40 08 00 mv r1,r2 80058bc: c3 a0 00 00 ret
080076a8 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) {
80076a8: 37 9c ff ec addi sp,sp,-20 80076ac: 5b 8b 00 14 sw (sp+20),r11 80076b0: 5b 8c 00 10 sw (sp+16),r12 80076b4: 5b 8d 00 0c sw (sp+12),r13 80076b8: 5b 8e 00 08 sw (sp+8),r14 80076bc: 5b 9d 00 04 sw (sp+4),ra 80076c0: b8 20 70 00 mv r14,r1 80076c4: b8 40 60 00 mv r12,r2
ISR_Level level; Chain_Node *node; _ISR_Disable( level );
80076c8: 90 00 68 00 rcsr r13,IE 80076cc: 34 01 ff fe mvi r1,-2 80076d0: a1 a1 08 00 and r1,r13,r1 80076d4: d0 01 00 00 wcsr IE,r1
printk( "Watchdog Chain: %s %p\n", name, header );
80076d8: 78 01 08 02 mvhi r1,0x802 80076dc: b9 80 18 00 mv r3,r12 80076e0: 38 21 0e 78 ori r1,r1,0xe78 80076e4: b9 c0 10 00 mv r2,r14 80076e8: fb ff ec ed calli 8002a9c <printk>
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
80076ec: 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;
80076f0: 35 8c 00 04 addi r12,r12,4
if ( !_Chain_Is_empty( header ) ) { 80076f4: 45 6c 00 0b be r11,r12,8007720 <_Watchdog_Report_chain+0x78> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch );
80076f8: b9 60 10 00 mv r2,r11 80076fc: 34 01 00 00 mvi r1,0 8007700: f8 00 00 13 calli 800774c <_Watchdog_Report>
_ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next )
8007704: 29 6b 00 00 lw r11,(r11+0)
Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ;
8007708: 5d 6c ff fc bne r11,r12,80076f8 <_Watchdog_Report_chain+0x50><== NEVER TAKEN
{ Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name );
800770c: 78 01 08 02 mvhi r1,0x802 8007710: 38 21 0e 90 ori r1,r1,0xe90 8007714: b9 c0 10 00 mv r2,r14 8007718: fb ff ec e1 calli 8002a9c <printk> 800771c: e0 00 00 04 bi 800772c <_Watchdog_Report_chain+0x84>
} else { printk( "Chain is empty\n" );
8007720: 78 01 08 02 mvhi r1,0x802 8007724: 38 21 0e a0 ori r1,r1,0xea0 8007728: fb ff ec dd calli 8002a9c <printk>
} _ISR_Enable( level );
800772c: d0 0d 00 00 wcsr IE,r13
}
8007730: 2b 9d 00 04 lw ra,(sp+4) 8007734: 2b 8b 00 14 lw r11,(sp+20) 8007738: 2b 8c 00 10 lw r12,(sp+16) 800773c: 2b 8d 00 0c lw r13,(sp+12) 8007740: 2b 8e 00 08 lw r14,(sp+8) 8007744: 37 9c 00 14 addi sp,sp,20 8007748: c3 a0 00 00 ret
080058c0 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) {
80058c0: 37 9c ff e4 addi sp,sp,-28 80058c4: 5b 8b 00 1c sw (sp+28),r11 80058c8: 5b 8c 00 18 sw (sp+24),r12 80058cc: 5b 8d 00 14 sw (sp+20),r13 80058d0: 5b 8e 00 10 sw (sp+16),r14 80058d4: 5b 8f 00 0c sw (sp+12),r15 80058d8: 5b 90 00 08 sw (sp+8),r16 80058dc: 5b 9d 00 04 sw (sp+4),ra 80058e0: 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 );
80058e4: 90 00 08 00 rcsr r1,IE 80058e8: 34 02 ff fe mvi r2,-2 80058ec: a0 22 10 00 and r2,r1,r2 80058f0: 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));
80058f4: 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;
80058f8: 35 8e 00 04 addi r14,r12,4
if ( _Chain_Is_empty( header ) ) 80058fc: 45 6e 00 1a be r11,r14,8005964 <_Watchdog_Tickle+0xa4> * 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) {
8005900: 29 62 00 10 lw r2,(r11+16)
8005904: 44 40 00 04 be r2,r0,8005914 <_Watchdog_Tickle+0x54> the_watchdog->delta_interval--;
8005908: 34 42 ff ff addi r2,r2,-1 800590c: 59 62 00 10 sw (r11+16),r2
if ( the_watchdog->delta_interval != 0 ) 8005910: 5c 40 00 15 bne r2,r0,8005964 <_Watchdog_Tickle+0xa4>
8005914: b8 20 68 00 mv r13,r1
do { watchdog_state = _Watchdog_Remove( the_watchdog ); _ISR_Enable( level ); switch( watchdog_state ) {
8005918: 34 10 00 02 mvi r16,2
case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level );
800591c: 34 0f ff fe mvi r15,-2
if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog );
8005920: b9 60 08 00 mv r1,r11 8005924: fb ff ff bb calli 8005810 <_Watchdog_Remove>
_ISR_Enable( level );
8005928: d0 0d 00 00 wcsr IE,r13
switch( watchdog_state ) {
800592c: 5c 30 00 05 bne r1,r16,8005940 <_Watchdog_Tickle+0x80> <== NEVER TAKEN
case WATCHDOG_ACTIVE: (*the_watchdog->routine)(
8005930: 29 62 00 24 lw r2,(r11+36) 8005934: 29 63 00 1c lw r3,(r11+28) 8005938: 29 61 00 20 lw r1,(r11+32) 800593c: d8 60 00 00 call r3
case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level );
8005940: 90 00 08 00 rcsr r1,IE 8005944: a0 2f 10 00 and r2,r1,r15 8005948: d0 02 00 00 wcsr IE,r2
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first );
800594c: 29 82 00 00 lw r2,(r12+0) 8005950: b8 20 68 00 mv r13,r1 8005954: b8 40 58 00 mv r11,r2
the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 8005958: 44 4e 00 03 be r2,r14,8005964 <_Watchdog_Tickle+0xa4>
800595c: 28 42 00 10 lw r2,(r2+16)
8005960: 44 40 ff f0 be r2,r0,8005920 <_Watchdog_Tickle+0x60> leave: _ISR_Enable(level);
8005964: d0 01 00 00 wcsr IE,r1
}
8005968: 2b 9d 00 04 lw ra,(sp+4) 800596c: 2b 8b 00 1c lw r11,(sp+28) 8005970: 2b 8c 00 18 lw r12,(sp+24) 8005974: 2b 8d 00 14 lw r13,(sp+20) 8005978: 2b 8e 00 10 lw r14,(sp+16) 800597c: 2b 8f 00 0c lw r15,(sp+12) 8005980: 2b 90 00 08 lw r16,(sp+8) 8005984: 37 9c 00 1c addi sp,sp,28 8005988: c3 a0 00 00 ret
0800598c <_Workspace_Allocate_or_fatal_error>: * _Workspace_Allocate_or_fatal_error */ void *_Workspace_Allocate_or_fatal_error( size_t size ) {
800598c: 37 9c ff fc addi sp,sp,-4 8005990: 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 );
8005994: 34 03 00 00 mvi r3,0 8005998: b8 20 10 00 mv r2,r1 800599c: 78 01 08 01 mvhi r1,0x801 80059a0: 38 21 d8 c8 ori r1,r1,0xd8c8 80059a4: b8 60 20 00 mv r4,r3 80059a8: f8 00 0c f7 calli 8008d84 <_Heap_Allocate_aligned_with_boundary>
__builtin_return_address( 1 ), memory ); #endif if ( memory == NULL )
80059ac: 5c 20 00 04 bne r1,r0,80059bc <_Workspace_Allocate_or_fatal_error+0x30><== ALWAYS TAKEN
_Internal_error_Occurred(
80059b0: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80059b4: 34 03 00 04 mvi r3,4 <== NOT EXECUTED 80059b8: fb ff f6 8f calli 80033f4 <_Internal_error_Occurred> <== NOT EXECUTED
true, INTERNAL_ERROR_WORKSPACE_ALLOCATION ); return memory; }
80059bc: 2b 9d 00 04 lw ra,(sp+4) 80059c0: 37 9c 00 04 addi sp,sp,4 80059c4: c3 a0 00 00 ret
0801ac60 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL();
801ac60: 37 9c ff f8 addi sp,sp,-8 801ac64: 5b 9d 00 04 sw (sp+4),ra 801ac68: 5b 81 00 08 sw (sp+8),r1 801ac6c: f8 00 02 7d calli 801b660 <__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();
801ac70: fb ff ff d9 calli 801abd4 <libc_wrapup>
rtems_shutdown_executive(status);
801ac74: 2b 81 00 08 lw r1,(sp+8) 801ac78: f8 00 00 61 calli 801adfc <rtems_shutdown_executive>
801ac7c: e0 00 00 00 bi 801ac7c <_exit+0x1c> <== NOT EXECUTED
0803ca30 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) {
803ca30: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 803ca34: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return fcntl( fd, cmd, arg );
803ca38: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 803ca3c: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 803ca40: b8 80 18 00 mv r3,r4 <== NOT EXECUTED 803ca44: fb ff ff 69 calli 803c7e8 <fcntl> <== NOT EXECUTED
}
803ca48: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 803ca4c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 803ca50: c3 a0 00 00 ret <== NOT EXECUTED
0800aaf8 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); }
800aaf8: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 800aafc: c3 a0 00 00 ret <== NOT EXECUTED
08007358 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) {
8007358: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 800735c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return gettimeofday( tp, tzp );
8007360: fb ff ff e0 calli 80072e0 <gettimeofday> <== NOT EXECUTED
}
8007364: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8007368: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800736c: c3 a0 00 00 ret <== NOT EXECUTED
08027cbc <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) {
8027cbc: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8027cc0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return link( existing, new );
8027cc4: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8027cc8: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8027ccc: fb ff ff 7e calli 8027ac4 <link> <== NOT EXECUTED
}
8027cd0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027cd4: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8027cd8: c3 a0 00 00 ret <== NOT EXECUTED
08027f78 <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) {
8027f78: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8027f7c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return _STAT_NAME( path, buf );
8027f80: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8027f84: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8027f88: fb ff ff c2 calli 8027e90 <lstat> <== NOT EXECUTED
}
8027f8c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027f90: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8027f94: c3 a0 00 00 ret <== NOT EXECUTED
0801adb8 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) {
801adb8: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 801adbc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return realloc( ptr, size );
801adc0: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 801adc4: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 801adc8: f8 00 00 1b calli 801ae34 <realloc> <== NOT EXECUTED
}
801adcc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 801add0: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 801add4: c3 a0 00 00 ret <== NOT EXECUTED
0806086c <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) {
806086c: 37 9c ff a4 addi sp,sp,-92 <== NOT EXECUTED 8060870: 5b 8b 00 1c sw (sp+28),r11 <== NOT EXECUTED 8060874: 5b 8c 00 18 sw (sp+24),r12 <== NOT EXECUTED 8060878: 5b 8d 00 14 sw (sp+20),r13 <== NOT EXECUTED 806087c: 5b 8e 00 10 sw (sp+16),r14 <== NOT EXECUTED 8060880: 5b 8f 00 0c sw (sp+12),r15 <== NOT EXECUTED 8060884: 5b 90 00 08 sw (sp+8),r16 <== NOT EXECUTED 8060888: 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 );
806088c: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) {
8060890: b8 40 70 00 mv r14,r2 <== NOT EXECUTED 8060894: 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 );
8060898: fb fe 96 11 calli 80060dc <rtems_filesystem_dirname> <== NOT EXECUTED 806089c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
if ( old_parent_pathlen == 0 )
80608a0: 5c 20 00 19 bne r1,r0,8060904 <_rename_r+0x98> <== NOT EXECUTED
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
80608a4: 41 c2 00 00 lbu r2,(r14+0) <== NOT EXECUTED 80608a8: 64 43 00 5c cmpei r3,r2,92 <== NOT EXECUTED 80608ac: 64 41 00 2f cmpei r1,r2,47 <== NOT EXECUTED 80608b0: b8 61 08 00 or r1,r3,r1 <== NOT EXECUTED 80608b4: 5c 2d 00 02 bne r1,r13,80608bc <_rename_r+0x50> <== NOT EXECUTED 80608b8: 5c 40 00 0a bne r2,r0,80608e0 <_rename_r+0x74> <== NOT EXECUTED 80608bc: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80608c0: 38 42 d2 f0 ori r2,r2,0xd2f0 <== NOT EXECUTED 80608c4: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 80608c8: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 80608cc: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 80608d0: 34 42 00 18 addi r2,r2,24 <== NOT EXECUTED 80608d4: fb ff 9c 50 calli 8047a14 <memcpy> <== NOT EXECUTED 80608d8: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 80608dc: e0 00 00 13 bi 8060928 <_rename_r+0xbc> <== NOT EXECUTED 80608e0: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80608e4: 38 42 d2 f0 ori r2,r2,0xd2f0 <== NOT EXECUTED 80608e8: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 80608ec: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 80608f0: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 80608f4: 34 42 00 04 addi r2,r2,4 <== NOT EXECUTED 80608f8: fb ff 9c 47 calli 8047a14 <memcpy> <== NOT EXECUTED 80608fc: b9 a0 58 00 mv r11,r13 <== NOT EXECUTED 8060900: e0 00 00 0a bi 8060928 <_rename_r+0xbc> <== NOT EXECUTED
else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
8060904: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8060908: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 806090c: 34 03 00 02 mvi r3,2 <== NOT EXECUTED 8060910: 37 84 00 34 addi r4,sp,52 <== NOT EXECUTED 8060914: 34 05 00 00 mvi r5,0 <== NOT EXECUTED 8060918: fb fe 96 3f calli 8006214 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 )
806091c: 34 0b 00 01 mvi r11,1 <== NOT EXECUTED 8060920: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8060924: 5c 20 00 a6 bne r1,r0,8060bbc <_rename_r+0x350> <== NOT EXECUTED
/* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc;
8060928: 37 90 00 48 addi r16,sp,72 <== NOT EXECUTED 806092c: 37 8c 00 34 addi r12,sp,52 <== NOT EXECUTED 8060930: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 8060934: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8060938: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 806093c: fb ff 9c 36 calli 8047a14 <memcpy> <== NOT EXECUTED
name = old + old_parent_pathlen;
8060940: b5 cd 68 00 add r13,r14,r13 <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
8060944: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
/* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen;
8060948: 5b 8d 00 5c sw (sp+92),r13 <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
806094c: fb ff ab 90 calli 804b78c <strlen> <== NOT EXECUTED 8060950: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8060954: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8060958: fb fe 95 d2 calli 80060a0 <rtems_filesystem_prefix_separators><== NOT EXECUTED 806095c: b5 a1 68 00 add r13,r13,r1 <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
8060960: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
* Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
8060964: 5b 8d 00 5c sw (sp+92),r13 <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
8060968: fb ff ab 89 calli 804b78c <strlen> <== NOT EXECUTED 806096c: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8060970: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8060974: ba 00 20 00 mv r4,r16 <== NOT EXECUTED 8060978: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 806097c: b8 60 28 00 mv r5,r3 <== NOT EXECUTED 8060980: fb fe 95 eb calli 800612c <rtems_filesystem_evaluate_relative_path><== NOT EXECUTED 8060984: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
0, &old_loc, false ); if ( result != 0 ) {
8060988: 44 20 00 0b be r1,r0,80609b4 <_rename_r+0x148> <== NOT EXECUTED
if ( free_old_parentloc )
806098c: 45 60 00 07 be r11,r0,80609a8 <_rename_r+0x13c> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
8060990: 2b 81 00 40 lw r1,(sp+64) <== NOT EXECUTED 8060994: 44 20 00 05 be r1,r0,80609a8 <_rename_r+0x13c> <== NOT EXECUTED 8060998: 28 23 00 1c lw r3,(r1+28) <== NOT EXECUTED 806099c: 44 60 00 03 be r3,r0,80609a8 <_rename_r+0x13c> <== NOT EXECUTED 80609a0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80609a4: d8 60 00 00 call r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( result );
80609a8: fb ff 8d 78 calli 8043f88 <__errno> <== NOT EXECUTED 80609ac: 58 2d 00 00 sw (r1+0),r13 <== NOT EXECUTED 80609b0: e0 00 00 2a bi 8060a58 <_rename_r+0x1ec> <== NOT EXECUTED
/* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
80609b4: 41 e2 00 00 lbu r2,(r15+0) <== NOT EXECUTED 80609b8: 64 4c 00 5c cmpei r12,r2,92 <== NOT EXECUTED 80609bc: 64 41 00 2f cmpei r1,r2,47 <== NOT EXECUTED 80609c0: b9 81 60 00 or r12,r12,r1 <== NOT EXECUTED 80609c4: 5d 8d 00 02 bne r12,r13,80609cc <_rename_r+0x160> <== NOT EXECUTED 80609c8: 5c 4c 00 0a bne r2,r12,80609f0 <_rename_r+0x184> <== NOT EXECUTED 80609cc: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80609d0: 38 42 d2 f0 ori r2,r2,0xd2f0 <== NOT EXECUTED 80609d4: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 80609d8: 37 81 00 20 addi r1,sp,32 <== NOT EXECUTED 80609dc: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 80609e0: 34 42 00 18 addi r2,r2,24 <== NOT EXECUTED 80609e4: fb ff 9c 0c calli 8047a14 <memcpy> <== NOT EXECUTED 80609e8: 34 0c 00 01 mvi r12,1 <== NOT EXECUTED 80609ec: e0 00 00 08 bi 8060a0c <_rename_r+0x1a0> <== NOT EXECUTED 80609f0: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80609f4: 38 42 d2 f0 ori r2,r2,0xd2f0 <== NOT EXECUTED 80609f8: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 80609fc: 37 81 00 20 addi r1,sp,32 <== NOT EXECUTED 8060a00: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 8060a04: 34 42 00 04 addi r2,r2,4 <== NOT EXECUTED 8060a08: fb ff 9c 03 calli 8047a14 <memcpy> <== NOT EXECUTED
if ( !new_parent_loc.ops->evalformake_h ) {
8060a0c: 2b 81 00 2c lw r1,(sp+44) <== NOT EXECUTED 8060a10: 28 24 00 04 lw r4,(r1+4) <== NOT EXECUTED 8060a14: 5c 80 00 13 bne r4,r0,8060a60 <_rename_r+0x1f4> <== NOT EXECUTED
if ( free_old_parentloc )
8060a18: 45 64 00 07 be r11,r4,8060a34 <_rename_r+0x1c8> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
8060a1c: 2b 81 00 40 lw r1,(sp+64) <== NOT EXECUTED 8060a20: 44 20 00 05 be r1,r0,8060a34 <_rename_r+0x1c8> <== NOT EXECUTED 8060a24: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060a28: 44 40 00 03 be r2,r0,8060a34 <_rename_r+0x1c8> <== NOT EXECUTED 8060a2c: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 8060a30: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
8060a34: 2b 81 00 54 lw r1,(sp+84) <== NOT EXECUTED 8060a38: 44 20 00 05 be r1,r0,8060a4c <_rename_r+0x1e0> <== NOT EXECUTED 8060a3c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060a40: 44 40 00 03 be r2,r0,8060a4c <_rename_r+0x1e0> <== NOT EXECUTED 8060a44: 37 81 00 48 addi r1,sp,72 <== NOT EXECUTED 8060a48: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8060a4c: fb ff 8d 4f calli 8043f88 <__errno> <== NOT EXECUTED 8060a50: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8060a54: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8060a58: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8060a5c: e0 00 00 58 bi 8060bbc <_rename_r+0x350> <== NOT EXECUTED
} result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
8060a60: 37 8d 00 20 addi r13,sp,32 <== NOT EXECUTED 8060a64: b5 ec 08 00 add r1,r15,r12 <== NOT EXECUTED 8060a68: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8060a6c: 37 83 00 5c addi r3,sp,92 <== NOT EXECUTED 8060a70: d8 80 00 00 call r4 <== NOT EXECUTED 8060a74: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
if ( result != 0 ) {
8060a78: 44 20 00 17 be r1,r0,8060ad4 <_rename_r+0x268> <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
8060a7c: 2b 81 00 2c lw r1,(sp+44) <== NOT EXECUTED 8060a80: 44 20 00 05 be r1,r0,8060a94 <_rename_r+0x228> <== NOT EXECUTED 8060a84: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060a88: 44 40 00 03 be r2,r0,8060a94 <_rename_r+0x228> <== NOT EXECUTED 8060a8c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8060a90: d8 40 00 00 call r2 <== NOT EXECUTED
if ( free_old_parentloc )
8060a94: 45 60 00 07 be r11,r0,8060ab0 <_rename_r+0x244> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
8060a98: 2b 81 00 40 lw r1,(sp+64) <== NOT EXECUTED 8060a9c: 44 20 00 05 be r1,r0,8060ab0 <_rename_r+0x244> <== NOT EXECUTED 8060aa0: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060aa4: 44 40 00 03 be r2,r0,8060ab0 <_rename_r+0x244> <== NOT EXECUTED 8060aa8: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 8060aac: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
8060ab0: 2b 81 00 54 lw r1,(sp+84) <== NOT EXECUTED 8060ab4: 44 20 00 05 be r1,r0,8060ac8 <_rename_r+0x25c> <== NOT EXECUTED 8060ab8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060abc: 44 40 00 03 be r2,r0,8060ac8 <_rename_r+0x25c> <== NOT EXECUTED 8060ac0: 37 81 00 48 addi r1,sp,72 <== NOT EXECUTED 8060ac4: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( result );
8060ac8: fb ff 8d 30 calli 8043f88 <__errno> <== NOT EXECUTED 8060acc: 58 2c 00 00 sw (r1+0),r12 <== NOT EXECUTED 8060ad0: e3 ff ff e2 bi 8060a58 <_rename_r+0x1ec> <== NOT EXECUTED
/* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
8060ad4: 2b 81 00 30 lw r1,(sp+48) <== NOT EXECUTED 8060ad8: 2b 83 00 44 lw r3,(sp+68) <== NOT EXECUTED 8060adc: 2b 82 00 2c lw r2,(sp+44) <== NOT EXECUTED 8060ae0: 44 61 00 16 be r3,r1,8060b38 <_rename_r+0x2cc> <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
8060ae4: 44 40 00 05 be r2,r0,8060af8 <_rename_r+0x28c> <== NOT EXECUTED 8060ae8: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8060aec: 44 40 00 03 be r2,r0,8060af8 <_rename_r+0x28c> <== NOT EXECUTED 8060af0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8060af4: d8 40 00 00 call r2 <== NOT EXECUTED
if ( free_old_parentloc )
8060af8: 45 60 00 07 be r11,r0,8060b14 <_rename_r+0x2a8> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
8060afc: 2b 81 00 40 lw r1,(sp+64) <== NOT EXECUTED 8060b00: 44 20 00 05 be r1,r0,8060b14 <_rename_r+0x2a8> <== NOT EXECUTED 8060b04: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060b08: 44 40 00 03 be r2,r0,8060b14 <_rename_r+0x2a8> <== NOT EXECUTED 8060b0c: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 8060b10: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
8060b14: 2b 81 00 54 lw r1,(sp+84) <== NOT EXECUTED 8060b18: 44 20 00 05 be r1,r0,8060b2c <_rename_r+0x2c0> <== NOT EXECUTED 8060b1c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060b20: 44 40 00 03 be r2,r0,8060b2c <_rename_r+0x2c0> <== NOT EXECUTED 8060b24: 37 81 00 48 addi r1,sp,72 <== NOT EXECUTED 8060b28: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EXDEV );
8060b2c: fb ff 8d 17 calli 8043f88 <__errno> <== NOT EXECUTED 8060b30: 34 02 00 12 mvi r2,18 <== NOT EXECUTED 8060b34: e3 ff ff c8 bi 8060a54 <_rename_r+0x1e8> <== NOT EXECUTED
} if ( !new_parent_loc.ops->rename_h ) {
8060b38: 28 45 00 40 lw r5,(r2+64) <== NOT EXECUTED 8060b3c: 5c a0 00 07 bne r5,r0,8060b58 <_rename_r+0x2ec> <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
8060b40: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8060b44: 44 45 00 03 be r2,r5,8060b50 <_rename_r+0x2e4> <== NOT EXECUTED 8060b48: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8060b4c: d8 40 00 00 call r2 <== NOT EXECUTED
if ( free_old_parentloc )
8060b50: 45 60 ff b9 be r11,r0,8060a34 <_rename_r+0x1c8> <== NOT EXECUTED 8060b54: e3 ff ff b2 bi 8060a1c <_rename_r+0x1b0> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
8060b58: 2b 84 00 5c lw r4,(sp+92) <== NOT EXECUTED 8060b5c: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 8060b60: 37 82 00 48 addi r2,sp,72 <== NOT EXECUTED 8060b64: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 8060b68: d8 a0 00 00 call r5 <== NOT EXECUTED 8060b6c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
8060b70: 2b 81 00 2c lw r1,(sp+44) <== NOT EXECUTED 8060b74: 44 20 00 05 be r1,r0,8060b88 <_rename_r+0x31c> <== NOT EXECUTED 8060b78: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060b7c: 44 40 00 03 be r2,r0,8060b88 <_rename_r+0x31c> <== NOT EXECUTED 8060b80: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8060b84: d8 40 00 00 call r2 <== NOT EXECUTED
if ( free_old_parentloc )
8060b88: 45 60 00 07 be r11,r0,8060ba4 <_rename_r+0x338> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
8060b8c: 2b 81 00 40 lw r1,(sp+64) <== NOT EXECUTED 8060b90: 44 20 00 05 be r1,r0,8060ba4 <_rename_r+0x338> <== NOT EXECUTED 8060b94: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060b98: 44 40 00 03 be r2,r0,8060ba4 <_rename_r+0x338> <== NOT EXECUTED 8060b9c: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED 8060ba0: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
8060ba4: 2b 81 00 54 lw r1,(sp+84) <== NOT EXECUTED 8060ba8: 44 20 00 05 be r1,r0,8060bbc <_rename_r+0x350> <== NOT EXECUTED 8060bac: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8060bb0: 44 40 00 03 be r2,r0,8060bbc <_rename_r+0x350> <== NOT EXECUTED 8060bb4: 37 81 00 48 addi r1,sp,72 <== NOT EXECUTED 8060bb8: d8 40 00 00 call r2 <== NOT EXECUTED
return result; }
8060bbc: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8060bc0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8060bc4: 2b 8b 00 1c lw r11,(sp+28) <== NOT EXECUTED 8060bc8: 2b 8c 00 18 lw r12,(sp+24) <== NOT EXECUTED 8060bcc: 2b 8d 00 14 lw r13,(sp+20) <== NOT EXECUTED 8060bd0: 2b 8e 00 10 lw r14,(sp+16) <== NOT EXECUTED 8060bd4: 2b 8f 00 0c lw r15,(sp+12) <== NOT EXECUTED 8060bd8: 2b 90 00 08 lw r16,(sp+8) <== NOT EXECUTED 8060bdc: 37 9c 00 5c addi sp,sp,92 <== NOT EXECUTED 8060be0: c3 a0 00 00 ret <== NOT EXECUTED
08007acc <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) {
8007acc: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8007ad0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return _STAT_NAME( path, buf );
8007ad4: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8007ad8: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8007adc: fb ff ff c2 calli 80079e4 <stat> <== NOT EXECUTED
}
8007ae0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8007ae4: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8007ae8: c3 a0 00 00 ret <== NOT EXECUTED
0800bde8 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) {
800bde8: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 800bdec: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return unlink( path );
800bdf0: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 800bdf4: fb ff ff 6d calli 800bba8 <unlink> <== NOT EXECUTED
}
800bdf8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800bdfc: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800be00: c3 a0 00 00 ret <== NOT EXECUTED
08002718 <adjtime>: int adjtime( struct timeval *delta, struct timeval *olddelta ) {
8002718: 37 9c ff e8 addi sp,sp,-24 800271c: 5b 8b 00 10 sw (sp+16),r11 8002720: 5b 8c 00 0c sw (sp+12),r12 8002724: 5b 8d 00 08 sw (sp+8),r13 8002728: 5b 9d 00 04 sw (sp+4),ra 800272c: b8 40 60 00 mv r12,r2
long adjustment; /* * Simple validations */ if ( !delta )
8002730: 34 02 00 00 mvi r2,0
int adjtime( struct timeval *delta, struct timeval *olddelta ) {
8002734: b8 20 58 00 mv r11,r1
long adjustment; /* * Simple validations */ if ( !delta ) 8002738: 44 22 00 05 be r1,r2,800274c <adjtime+0x34> rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
800273c: 28 23 00 04 lw r3,(r1+4) 8002740: 78 01 00 0f mvhi r1,0xf 8002744: 38 21 42 3f ori r1,r1,0x423f
8002748: 50 23 00 06 bgeu r1,r3,8002760 <adjtime+0x48> rtems_set_errno_and_return_minus_one( EINVAL );
800274c: f8 00 2b 1e calli 800d3c4 <__errno> 8002750: 34 02 00 16 mvi r2,22 8002754: 58 22 00 00 sw (r1+0),r2 8002758: 34 01 ff ff mvi r1,-1 800275c: e0 00 00 3e bi 8002854 <adjtime+0x13c>
if ( olddelta ) { 8002760: 45 80 00 03 be r12,r0,800276c <adjtime+0x54> olddelta->tv_sec = 0; olddelta->tv_usec = 0;
8002764: 59 82 00 04 sw (r12+4),r2
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { olddelta->tv_sec = 0;
8002768: 59 82 00 00 sw (r12+0),r2
olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
800276c: 29 61 00 00 lw r1,(r11+0) 8002770: 78 02 00 0f mvhi r2,0xf 8002774: 38 42 42 40 ori r2,r2,0x4240 8002778: f8 00 64 e7 calli 801bb14 <__mulsi3>
adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
800277c: 78 02 08 01 mvhi r2,0x801 8002780: 38 42 f0 c4 ori r2,r2,0xf0c4
olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); adjustment += delta->tv_usec;
8002784: 29 63 00 04 lw r3,(r11+4)
/* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
8002788: 28 42 00 0c lw r2,(r2+12)
olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); adjustment += delta->tv_usec;
800278c: b4 23 08 00 add r1,r1,r3
/* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 8002790: 54 41 00 30 bgu r2,r1,8002850 <adjtime+0x138> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
8002794: 78 01 08 01 mvhi r1,0x801 8002798: 38 21 f9 9c ori r1,r1,0xf99c 800279c: 28 22 00 00 lw r2,(r1+0) 80027a0: 34 42 00 01 addi r2,r2,1 80027a4: 58 22 00 00 sw (r1+0),r2
* This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts );
80027a8: 37 81 00 14 addi r1,sp,20 80027ac: f8 00 03 b3 calli 8003678 <_TOD_Get>
ts.tv_sec += delta->tv_sec;
80027b0: 29 63 00 00 lw r3,(r11+0)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
80027b4: 29 61 00 04 lw r1,(r11+4)
_Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec;
80027b8: 2b 8d 00 14 lw r13,(sp+20)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
80027bc: 34 02 03 e8 mvi r2,1000
_Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec;
80027c0: b5 a3 68 00 add r13,r13,r3
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
80027c4: f8 00 64 d4 calli 801bb14 <__mulsi3> 80027c8: 2b 84 00 18 lw r4,(sp+24)
/* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
80027cc: 78 03 3b 9a mvhi r3,0x3b9a 80027d0: 78 02 c4 65 mvhi r2,0xc465
_Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
80027d4: b4 24 08 00 add r1,r1,r4
/* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
80027d8: 38 63 c9 ff ori r3,r3,0xc9ff
_Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
80027dc: b9 a0 20 00 mv r4,r13
/* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
80027e0: 38 42 36 00 ori r2,r2,0x3600 80027e4: e0 00 00 02 bi 80027ec <adjtime+0xd4> 80027e8: b4 22 08 00 add r1,r1,r2 80027ec: b8 80 28 00 mv r5,r4 80027f0: 34 84 00 01 addi r4,r4,1
80027f4: 54 23 ff fd bgu r1,r3,80027e8 <adjtime+0xd0> ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
80027f8: 78 04 c4 65 mvhi r4,0xc465
ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
80027fc: 78 03 3b 9a mvhi r3,0x3b9a 8002800: b8 20 10 00 mv r2,r1
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
8002804: 38 84 36 00 ori r4,r4,0x3600
ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
8002808: 38 63 ca 00 ori r3,r3,0xca00 800280c: e0 00 00 02 bi 8002814 <adjtime+0xfc> 8002810: b4 43 10 00 add r2,r2,r3 8002814: b8 a0 30 00 mv r6,r5 8002818: 34 a5 ff ff addi r5,r5,-1
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 800281c: 50 82 ff fd bgeu r4,r2,8002810 <adjtime+0xf8> ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts );
8002820: 37 81 00 14 addi r1,sp,20
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
8002824: 5b 82 00 18 sw (sp+24),r2 8002828: 5b 86 00 14 sw (sp+20),r6
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts );
800282c: f8 00 03 c8 calli 800374c <_TOD_Set>
_Thread_Enable_dispatch();
8002830: f8 00 07 f3 calli 80047fc <_Thread_Enable_dispatch>
/* set the user's output */ if ( olddelta )
8002834: 45 80 00 07 be r12,r0,8002850 <adjtime+0x138> <== NEVER TAKEN
*olddelta = *delta;
8002838: 29 61 00 00 lw r1,(r11+0) 800283c: 59 81 00 00 sw (r12+0),r1 8002840: 29 6b 00 04 lw r11,(r11+4) 8002844: 34 01 00 00 mvi r1,0 8002848: 59 8b 00 04 sw (r12+4),r11 800284c: e0 00 00 02 bi 8002854 <adjtime+0x13c> 8002850: 34 01 00 00 mvi r1,0
return 0; }
8002854: 2b 9d 00 04 lw ra,(sp+4) 8002858: 2b 8b 00 10 lw r11,(sp+16) 800285c: 2b 8c 00 0c lw r12,(sp+12) 8002860: 2b 8d 00 08 lw r13,(sp+8) 8002864: 37 9c 00 18 addi sp,sp,24 8002868: c3 a0 00 00 ret
08006f84 <calloc>: ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1);
8006f84: 37 9c ff f4 addi sp,sp,-12 8006f88: 5b 8b 00 0c sw (sp+12),r11 8006f8c: 5b 8c 00 08 sw (sp+8),r12 8006f90: 5b 9d 00 04 sw (sp+4),ra 8006f94: 78 03 08 01 mvhi r3,0x801 8006f98: 38 63 d7 28 ori r3,r3,0xd728 8006f9c: 28 65 00 14 lw r5,(r3+20) 8006fa0: b8 20 20 00 mv r4,r1
length = nelem * elsize;
8006fa4: b8 40 08 00 mv r1,r2
) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1);
8006fa8: 34 a5 00 01 addi r5,r5,1
length = nelem * elsize;
8006fac: b8 80 10 00 mv r2,r4
) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1);
8006fb0: 58 65 00 14 sw (r3+20),r5
length = nelem * elsize;
8006fb4: f8 00 4d 4e calli 801a4ec <__mulsi3> 8006fb8: b8 20 60 00 mv r12,r1
cptr = malloc( length );
8006fbc: f8 00 01 f2 calli 8007784 <malloc> 8006fc0: b8 20 58 00 mv r11,r1
if ( cptr )
8006fc4: 44 20 00 04 be r1,r0,8006fd4 <calloc+0x50> <== NEVER TAKEN
memset( cptr, '\0', length );
8006fc8: b9 80 18 00 mv r3,r12 8006fcc: 34 02 00 00 mvi r2,0 8006fd0: f8 00 18 5f calli 800d14c <memset>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
8006fd4: 78 02 08 01 mvhi r2,0x801 8006fd8: 38 42 d7 28 ori r2,r2,0xd728 8006fdc: 28 43 00 04 lw r3,(r2+4)
return cptr; }
8006fe0: b9 60 08 00 mv r1,r11
length = nelem * elsize; cptr = malloc( length ); if ( cptr ) memset( cptr, '\0', length ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
8006fe4: 34 63 ff ff addi r3,r3,-1 8006fe8: 58 43 00 04 sw (r2+4),r3
return cptr; }
8006fec: 2b 9d 00 04 lw ra,(sp+4) 8006ff0: 2b 8b 00 0c lw r11,(sp+12) 8006ff4: 2b 8c 00 08 lw r12,(sp+8) 8006ff8: 37 9c 00 0c addi sp,sp,12 8006ffc: c3 a0 00 00 ret
08026414 <chdir>: #include <rtems/seterr.h> int chdir( const char *pathname ) {
8026414: 37 9c ff e0 addi sp,sp,-32 8026418: 5b 8b 00 0c sw (sp+12),r11 802641c: 5b 8c 00 08 sw (sp+8),r12 8026420: 5b 9d 00 04 sw (sp+4),ra 8026424: b8 20 60 00 mv r12,r1
rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 8026428: 5c 20 00 04 bne r1,r0,8026438 <chdir+0x24> rtems_set_errno_and_return_minus_one( EFAULT );
802642c: f8 00 76 d7 calli 8043f88 <__errno> 8026430: 34 02 00 0e mvi r2,14 8026434: e0 00 00 14 bi 8026484 <chdir+0x70>
/* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
8026438: f8 00 94 d5 calli 804b78c <strlen>
rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path(
802643c: 34 03 00 01 mvi r3,1 8026440: 37 8b 00 10 addi r11,sp,16
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
8026444: b8 20 10 00 mv r2,r1
rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path(
8026448: b9 60 20 00 mv r4,r11 802644c: b9 80 08 00 mv r1,r12 8026450: b8 60 28 00 mv r5,r3 8026454: fb ff 7f 70 calli 8006214 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 )
8026458: 34 02 ff ff mvi r2,-1
802645c: 5c 20 00 2b bne r1,r0,8026508 <chdir+0xf4> return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) {
8026460: 2b 83 00 1c lw r3,(sp+28) 8026464: 28 62 00 10 lw r2,(r3+16)
8026468: 5c 41 00 0a bne r2,r1,8026490 <chdir+0x7c> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
802646c: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED 8026470: 44 62 00 03 be r3,r2,802647c <chdir+0x68> <== NOT EXECUTED 8026474: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8026478: d8 60 00 00 call r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
802647c: f8 00 76 c3 calli 8043f88 <__errno> <== NOT EXECUTED 8026480: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8026484: 58 22 00 00 sw (r1+0),r2 8026488: 34 02 ff ff mvi r2,-1 802648c: e0 00 00 1f bi 8026508 <chdir+0xf4>
} if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
8026490: b9 60 08 00 mv r1,r11 8026494: d8 40 00 00 call r2 8026498: 34 02 00 01 mvi r2,1
802649c: 44 22 00 0a be r1,r2,80264c4 <chdir+0xb0> rtems_filesystem_freenode( &loc );
80264a0: 2b 81 00 1c lw r1,(sp+28)
80264a4: 44 20 00 05 be r1,r0,80264b8 <chdir+0xa4> <== NEVER TAKEN
80264a8: 28 22 00 1c lw r2,(r1+28)
80264ac: 44 40 00 03 be r2,r0,80264b8 <chdir+0xa4> <== NEVER TAKEN
80264b0: b9 60 08 00 mv r1,r11 80264b4: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( ENOTDIR );
80264b8: f8 00 76 b4 calli 8043f88 <__errno> 80264bc: 34 02 00 14 mvi r2,20 80264c0: e3 ff ff f1 bi 8026484 <chdir+0x70>
} rtems_filesystem_freenode( &rtems_filesystem_current );
80264c4: 78 01 08 06 mvhi r1,0x806 80264c8: 38 21 d2 f0 ori r1,r1,0xd2f0 80264cc: 28 21 00 00 lw r1,(r1+0) 80264d0: 28 22 00 10 lw r2,(r1+16)
80264d4: 44 40 00 05 be r2,r0,80264e8 <chdir+0xd4> <== NEVER TAKEN
80264d8: 28 42 00 1c lw r2,(r2+28)
80264dc: 44 40 00 03 be r2,r0,80264e8 <chdir+0xd4> <== NEVER TAKEN
80264e0: 34 21 00 04 addi r1,r1,4 80264e4: d8 40 00 00 call r2
rtems_filesystem_current = loc;
80264e8: 78 01 08 06 mvhi r1,0x806 80264ec: 38 21 d2 f0 ori r1,r1,0xd2f0 80264f0: 28 21 00 00 lw r1,(r1+0) 80264f4: 37 82 00 10 addi r2,sp,16 80264f8: 34 03 00 14 mvi r3,20 80264fc: 34 21 00 04 addi r1,r1,4 8026500: f8 00 85 45 calli 8047a14 <memcpy> 8026504: 34 02 00 00 mvi r2,0
return 0; }
8026508: b8 40 08 00 mv r1,r2 802650c: 2b 9d 00 04 lw ra,(sp+4) 8026510: 2b 8b 00 0c lw r11,(sp+12) 8026514: 2b 8c 00 08 lw r12,(sp+8) 8026518: 37 9c 00 20 addi sp,sp,32 802651c: c3 a0 00 00 ret
08005ed4 <chmod>: int chmod( const char *path, mode_t mode ) {
8005ed4: 37 9c ff dc addi sp,sp,-36 8005ed8: 5b 8b 00 10 sw (sp+16),r11 8005edc: 5b 8c 00 0c sw (sp+12),r12 8005ee0: 5b 8d 00 08 sw (sp+8),r13 8005ee4: 5b 9d 00 04 sw (sp+4),ra 8005ee8: b8 20 60 00 mv r12,r1 8005eec: 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 );
8005ef0: 37 8b 00 14 addi r11,sp,20 8005ef4: f8 01 16 26 calli 804b78c <strlen> 8005ef8: b8 20 10 00 mv r2,r1 8005efc: 34 03 00 00 mvi r3,0 8005f00: b9 80 08 00 mv r1,r12 8005f04: b9 60 20 00 mv r4,r11 8005f08: 34 05 00 01 mvi r5,1 8005f0c: f8 00 00 c2 calli 8006214 <rtems_filesystem_evaluate_path>
if ( status != 0 )
8005f10: 34 0c ff ff mvi r12,-1
8005f14: 5c 20 00 23 bne r1,r0,8005fa0 <chmod+0xcc> return -1; if ( !loc.handlers ){
8005f18: 2b 83 00 1c lw r3,(sp+28)
8005f1c: 5c 61 00 0a bne r3,r1,8005f44 <chmod+0x70> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
8005f20: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8005f24: 44 23 00 05 be r1,r3,8005f38 <chmod+0x64> <== NOT EXECUTED 8005f28: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8005f2c: 44 43 00 03 be r2,r3,8005f38 <chmod+0x64> <== NOT EXECUTED 8005f30: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005f34: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
8005f38: f8 00 f8 14 calli 8043f88 <__errno> <== NOT EXECUTED 8005f3c: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8005f40: e0 00 00 0b bi 8005f6c <chmod+0x98> <== NOT EXECUTED
} if ( !loc.handlers->fchmod_h ){
8005f44: 28 63 00 1c lw r3,(r3+28)
8005f48: 5c 60 00 0c bne r3,r0,8005f78 <chmod+0xa4> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
8005f4c: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8005f50: 44 23 00 05 be r1,r3,8005f64 <chmod+0x90> <== NOT EXECUTED 8005f54: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8005f58: 44 40 00 03 be r2,r0,8005f64 <chmod+0x90> <== NOT EXECUTED 8005f5c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005f60: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8005f64: f8 00 f8 09 calli 8043f88 <__errno> <== NOT EXECUTED 8005f68: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8005f6c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8005f70: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8005f74: e0 00 00 0b bi 8005fa0 <chmod+0xcc> <== NOT EXECUTED
} result = (*loc.handlers->fchmod_h)( &loc, mode );
8005f78: b9 a0 10 00 mv r2,r13 8005f7c: b9 60 08 00 mv r1,r11 8005f80: d8 60 00 00 call r3 8005f84: b8 20 60 00 mv r12,r1
rtems_filesystem_freenode( &loc );
8005f88: 2b 81 00 20 lw r1,(sp+32)
8005f8c: 44 20 00 05 be r1,r0,8005fa0 <chmod+0xcc> <== NEVER TAKEN
8005f90: 28 22 00 1c lw r2,(r1+28)
8005f94: 44 40 00 03 be r2,r0,8005fa0 <chmod+0xcc> <== NEVER TAKEN
8005f98: b9 60 08 00 mv r1,r11 8005f9c: d8 40 00 00 call r2
return result; }
8005fa0: b9 80 08 00 mv r1,r12 8005fa4: 2b 9d 00 04 lw ra,(sp+4) 8005fa8: 2b 8b 00 10 lw r11,(sp+16) 8005fac: 2b 8c 00 0c lw r12,(sp+12) 8005fb0: 2b 8d 00 08 lw r13,(sp+8) 8005fb4: 37 9c 00 24 addi sp,sp,36 8005fb8: c3 a0 00 00 ret
08026520 <chown>: int chown( const char *path, uid_t owner, gid_t group ) {
8026520: 37 9c ff d8 addi sp,sp,-40 8026524: 5b 8b 00 14 sw (sp+20),r11 8026528: 5b 8c 00 10 sw (sp+16),r12 802652c: 5b 8d 00 0c sw (sp+12),r13 8026530: 5b 8e 00 08 sw (sp+8),r14 8026534: 5b 9d 00 04 sw (sp+4),ra 8026538: b8 20 60 00 mv r12,r1 802653c: 20 4e ff ff andi r14,r2,0xffff 8026540: 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 ) )
8026544: 37 8b 00 18 addi r11,sp,24 8026548: f8 00 94 91 calli 804b78c <strlen> 802654c: b8 20 10 00 mv r2,r1 8026550: 34 03 00 00 mvi r3,0 8026554: b9 80 08 00 mv r1,r12 8026558: b9 60 20 00 mv r4,r11 802655c: 34 05 00 01 mvi r5,1 8026560: fb ff 7f 2d calli 8006214 <rtems_filesystem_evaluate_path> 8026564: 34 0c ff ff mvi r12,-1
8026568: 5c 20 00 18 bne r1,r0,80265c8 <chown+0xa8> return -1; if ( !loc.ops->chown_h ) {
802656c: 2b 85 00 24 lw r5,(sp+36) 8026570: 28 a4 00 18 lw r4,(r5+24)
8026574: 5c 81 00 0a bne r4,r1,802659c <chown+0x7c> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
8026578: 28 a2 00 1c lw r2,(r5+28) <== NOT EXECUTED 802657c: 44 44 00 03 be r2,r4,8026588 <chown+0x68> <== NOT EXECUTED 8026580: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8026584: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8026588: f8 00 76 80 calli 8043f88 <__errno> <== NOT EXECUTED 802658c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8026590: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8026594: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8026598: e0 00 00 0c bi 80265c8 <chown+0xa8> <== NOT EXECUTED
} result = (*loc.ops->chown_h)( &loc, owner, group );
802659c: b9 c0 10 00 mv r2,r14 80265a0: b9 a0 18 00 mv r3,r13 80265a4: b9 60 08 00 mv r1,r11 80265a8: d8 80 00 00 call r4 80265ac: b8 20 60 00 mv r12,r1
rtems_filesystem_freenode( &loc );
80265b0: 2b 81 00 24 lw r1,(sp+36)
80265b4: 44 20 00 05 be r1,r0,80265c8 <chown+0xa8> <== NEVER TAKEN
80265b8: 28 22 00 1c lw r2,(r1+28)
80265bc: 44 40 00 03 be r2,r0,80265c8 <chown+0xa8> <== NEVER TAKEN
80265c0: b9 60 08 00 mv r1,r11 80265c4: d8 40 00 00 call r2
return result; }
80265c8: b9 80 08 00 mv r1,r12 80265cc: 2b 9d 00 04 lw ra,(sp+4) 80265d0: 2b 8b 00 14 lw r11,(sp+20) 80265d4: 2b 8c 00 10 lw r12,(sp+16) 80265d8: 2b 8d 00 0c lw r13,(sp+12) 80265dc: 2b 8e 00 08 lw r14,(sp+8) 80265e0: 37 9c 00 28 addi sp,sp,40 80265e4: c3 a0 00 00 ret
080265e8 <chroot>: #include <rtems/seterr.h> int chroot( const char *pathname ) {
80265e8: 37 9c ff dc addi sp,sp,-36 80265ec: 5b 8b 00 10 sw (sp+16),r11 80265f0: 5b 8c 00 0c sw (sp+12),r12 80265f4: 5b 8d 00 08 sw (sp+8),r13 80265f8: 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) {
80265fc: 78 0b 08 06 mvhi r11,0x806 8026600: 39 6b d2 f0 ori r11,r11,0xd2f0 8026604: 29 6c 00 00 lw r12,(r11+0) 8026608: 78 02 08 07 mvhi r2,0x807 802660c: 38 42 0f 64 ori r2,r2,0xf64
#include <rtems/seterr.h> int chroot( const char *pathname ) {
8026610: b8 20 68 00 mv r13,r1
int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) {
8026614: 5d 82 00 08 bne r12,r2,8026634 <chroot+0x4c> <== NEVER TAKEN
rtems_libio_set_private_env(); /* try to set a new private env*/
8026618: f8 00 07 6e calli 80283d0 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
802661c: 29 61 00 00 lw r1,(r11+0)
8026620: 5c 2c 00 05 bne r1,r12,8026634 <chroot+0x4c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
8026624: f8 00 76 59 calli 8043f88 <__errno> <== NOT EXECUTED 8026628: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 802662c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8026630: e0 00 00 0a bi 8026658 <chroot+0x70> <== NOT EXECUTED
} result = chdir(pathname);
8026634: b9 a0 08 00 mv r1,r13 8026638: fb ff ff 77 calli 8026414 <chdir> 802663c: b8 20 58 00 mv r11,r1
if (result) {
8026640: 44 20 00 08 be r1,r0,8026660 <chroot+0x78> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( errno );
8026644: f8 00 76 51 calli 8043f88 <__errno> <== NOT EXECUTED 8026648: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 802664c: f8 00 76 4f calli 8043f88 <__errno> <== NOT EXECUTED 8026650: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8026654: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED 8026658: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 802665c: e0 00 00 1b bi 80266c8 <chroot+0xe0> <== NOT EXECUTED
} /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
8026660: 78 01 08 06 mvhi r1,0x806 8026664: 34 02 00 01 mvi r2,1 8026668: 38 21 29 14 ori r1,r1,0x2914 802666c: b9 60 18 00 mv r3,r11 8026670: 37 84 00 14 addi r4,sp,20 8026674: b9 60 28 00 mv r5,r11 8026678: fb ff 7e e7 calli 8006214 <rtems_filesystem_evaluate_path> 802667c: b8 20 10 00 mv r2,r1
8026680: 5c 2b ff f1 bne r1,r11,8026644 <chroot+0x5c> <== NEVER TAKEN
/* 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);
8026684: 78 01 08 06 mvhi r1,0x806 8026688: 38 21 d2 f0 ori r1,r1,0xd2f0 802668c: 28 21 00 00 lw r1,(r1+0) 8026690: 28 23 00 24 lw r3,(r1+36)
8026694: 44 62 00 05 be r3,r2,80266a8 <chroot+0xc0> <== NEVER TAKEN
8026698: 28 63 00 1c lw r3,(r3+28)
802669c: 44 62 00 03 be r3,r2,80266a8 <chroot+0xc0> <== NEVER TAKEN
80266a0: 34 21 00 18 addi r1,r1,24 80266a4: d8 60 00 00 call r3
rtems_filesystem_root = loc;
80266a8: 78 01 08 06 mvhi r1,0x806 80266ac: 38 21 d2 f0 ori r1,r1,0xd2f0 80266b0: 28 21 00 00 lw r1,(r1+0) 80266b4: 37 82 00 14 addi r2,sp,20 80266b8: 34 03 00 14 mvi r3,20 80266bc: 34 21 00 18 addi r1,r1,24 80266c0: f8 00 84 d5 calli 8047a14 <memcpy> 80266c4: 34 01 00 00 mvi r1,0
return 0; }
80266c8: 2b 9d 00 04 lw ra,(sp+4) 80266cc: 2b 8b 00 10 lw r11,(sp+16) 80266d0: 2b 8c 00 0c lw r12,(sp+12) 80266d4: 2b 8d 00 08 lw r13,(sp+8) 80266d8: 37 9c 00 24 addi sp,sp,36 80266dc: c3 a0 00 00 ret
080025f0 <clock_gettime>: int clock_gettime( clockid_t clock_id, struct timespec *tp ) {
80025f0: 37 9c ff fc addi sp,sp,-4 80025f4: 5b 9d 00 04 sw (sp+4),ra
if ( !tp ) 80025f8: 44 40 00 13 be r2,r0,8002644 <clock_gettime+0x54> rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) {
80025fc: 34 03 00 01 mvi r3,1
8002600: 5c 23 00 04 bne r1,r3,8002610 <clock_gettime+0x20> _TOD_Get(tp);
8002604: b8 40 08 00 mv r1,r2 8002608: f8 00 06 0f calli 8003e44 <_TOD_Get> 800260c: e0 00 00 07 bi 8002628 <clock_gettime+0x38>
return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) {
8002610: 34 03 00 04 mvi r3,4
8002614: 44 23 00 03 be r1,r3,8002620 <clock_gettime+0x30> <== NEVER TAKEN
return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
8002618: 34 03 00 02 mvi r3,2
800261c: 5c 23 00 05 bne r1,r3,8002630 <clock_gettime+0x40> _TOD_Get_uptime_as_timespec( tp );
8002620: b8 40 08 00 mv r1,r2 8002624: f8 00 06 2e calli 8003edc <_TOD_Get_uptime_as_timespec> 8002628: 34 01 00 00 mvi r1,0
return 0;
800262c: e0 00 00 0a bi 8002654 <clock_gettime+0x64>
} #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME )
8002630: 34 02 00 03 mvi r2,3
8002634: 5c 22 00 04 bne r1,r2,8002644 <clock_gettime+0x54> rtems_set_errno_and_return_minus_one( ENOSYS );
8002638: f8 00 2b c8 calli 800d558 <__errno> 800263c: 34 02 00 58 mvi r2,88 8002640: e0 00 00 03 bi 800264c <clock_gettime+0x5c>
#endif rtems_set_errno_and_return_minus_one( EINVAL );
8002644: f8 00 2b c5 calli 800d558 <__errno> 8002648: 34 02 00 16 mvi r2,22 800264c: 58 22 00 00 sw (r1+0),r2 8002650: 34 01 ff ff mvi r1,-1
return 0; }
8002654: 2b 9d 00 04 lw ra,(sp+4) 8002658: 37 9c 00 04 addi sp,sp,4 800265c: c3 a0 00 00 ret
08028ea0 <clock_settime>: int clock_settime( clockid_t clock_id, const struct timespec *tp ) {
8028ea0: 37 9c ff fc addi sp,sp,-4 8028ea4: 5b 9d 00 04 sw (sp+4),ra
if ( !tp )
8028ea8: 44 40 00 19 be r2,r0,8028f0c <clock_settime+0x6c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) {
8028eac: 34 03 00 01 mvi r3,1
8028eb0: 5c 23 00 10 bne r1,r3,8028ef0 <clock_settime+0x50> if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
8028eb4: 28 43 00 00 lw r3,(r2+0) 8028eb8: 78 01 21 da mvhi r1,0x21da 8028ebc: 38 21 e4 ff ori r1,r1,0xe4ff
8028ec0: 54 61 00 02 bgu r3,r1,8028ec8 <clock_settime+0x28>
8028ec4: e0 00 00 12 bi 8028f0c <clock_settime+0x6c>
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
8028ec8: 78 01 08 07 mvhi r1,0x807 8028ecc: 38 21 10 a4 ori r1,r1,0x10a4 8028ed0: 28 23 00 00 lw r3,(r1+0) 8028ed4: 34 63 00 01 addi r3,r3,1 8028ed8: 58 23 00 00 sw (r1+0),r3
rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp );
8028edc: b8 40 08 00 mv r1,r2 8028ee0: f8 00 09 1b calli 802b34c <_TOD_Set>
_Thread_Enable_dispatch();
8028ee4: fb ff 88 9f calli 800b160 <_Thread_Enable_dispatch> 8028ee8: 34 01 00 00 mvi r1,0
rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0;
8028eec: e0 00 00 0c bi 8028f1c <clock_settime+0x7c>
_Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME )
8028ef0: 34 02 00 02 mvi r2,2
8028ef4: 44 22 00 03 be r1,r2,8028f00 <clock_settime+0x60> rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME )
8028ef8: 34 02 00 03 mvi r2,3
8028efc: 5c 22 00 04 bne r1,r2,8028f0c <clock_settime+0x6c> rtems_set_errno_and_return_minus_one( ENOSYS );
8028f00: f8 00 6c 22 calli 8043f88 <__errno> 8028f04: 34 02 00 58 mvi r2,88 8028f08: e0 00 00 03 bi 8028f14 <clock_settime+0x74>
#endif else rtems_set_errno_and_return_minus_one( EINVAL );
8028f0c: f8 00 6c 1f calli 8043f88 <__errno> 8028f10: 34 02 00 16 mvi r2,22 8028f14: 58 22 00 00 sw (r1+0),r2 8028f18: 34 01 ff ff mvi r1,-1
return 0; }
8028f1c: 2b 9d 00 04 lw ra,(sp+4) 8028f20: 37 9c 00 04 addi sp,sp,4 8028f24: c3 a0 00 00 ret
08007000 <close>: #include <rtems/libio_.h> int close( int fd ) {
8007000: 37 9c ff f0 addi sp,sp,-16 8007004: 5b 8b 00 10 sw (sp+16),r11 8007008: 5b 8c 00 0c sw (sp+12),r12 800700c: 5b 8d 00 08 sw (sp+8),r13 8007010: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd);
8007014: 78 02 08 01 mvhi r2,0x801 8007018: 38 42 d0 10 ori r2,r2,0xd010 800701c: 28 42 00 00 lw r2,(r2+0)
8007020: 54 41 00 02 bgu r2,r1,8007028 <close+0x28>
8007024: e0 00 00 0e bi 800705c <close+0x5c>
iop = rtems_libio_iop(fd);
8007028: 34 02 00 03 mvi r2,3 800702c: fb ff e4 71 calli 80001f0 <__ashlsi3> 8007030: 78 0c 08 01 mvhi r12,0x801 8007034: 39 8c d7 1c ori r12,r12,0xd71c 8007038: 34 02 00 03 mvi r2,3 800703c: b8 20 68 00 mv r13,r1 8007040: fb ff e4 6c calli 80001f0 <__ashlsi3> 8007044: 29 8b 00 00 lw r11,(r12+0) 8007048: b5 a1 08 00 add r1,r13,r1 800704c: b5 61 58 00 add r11,r11,r1
rtems_libio_check_is_open(iop);
8007050: 29 61 00 18 lw r1,(r11+24) 8007054: 20 21 01 00 andi r1,r1,0x100
8007058: 5c 20 00 06 bne r1,r0,8007070 <close+0x70>
800705c: f8 00 15 38 calli 800c53c <__errno> 8007060: 34 02 00 09 mvi r2,9 8007064: 58 22 00 00 sw (r1+0),r2 8007068: 34 01 ff ff mvi r1,-1 800706c: e0 00 00 11 bi 80070b0 <close+0xb0>
rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h )
8007070: 29 61 00 40 lw r1,(r11+64) 8007074: 28 22 00 04 lw r2,(r1+4) 8007078: b8 40 60 00 mv r12,r2
800707c: 44 40 00 04 be r2,r0,800708c <close+0x8c> <== NEVER TAKEN
rc = (*iop->handlers->close_h)( iop );
8007080: b9 60 08 00 mv r1,r11 8007084: d8 40 00 00 call r2 8007088: b8 20 60 00 mv r12,r1
rtems_filesystem_freenode( &iop->pathinfo );
800708c: 29 61 00 28 lw r1,(r11+40)
8007090: 44 20 00 05 be r1,r0,80070a4 <close+0xa4> <== NEVER TAKEN
8007094: 28 22 00 1c lw r2,(r1+28)
8007098: 44 40 00 03 be r2,r0,80070a4 <close+0xa4>
800709c: 35 61 00 1c addi r1,r11,28 80070a0: d8 40 00 00 call r2
rtems_libio_free( iop );
80070a4: b9 60 08 00 mv r1,r11 80070a8: f8 00 01 22 calli 8007530 <rtems_libio_free>
return rc;
80070ac: b9 80 08 00 mv r1,r12
}
80070b0: 2b 9d 00 04 lw ra,(sp+4) 80070b4: 2b 8b 00 10 lw r11,(sp+16) 80070b8: 2b 8c 00 0c lw r12,(sp+12) 80070bc: 2b 8d 00 08 lw r13,(sp+8) 80070c0: 37 9c 00 10 addi sp,sp,16 80070c4: c3 a0 00 00 ret
08004b90 <devFS_close>: #include "devfs.h" int devFS_close( rtems_libio_t *iop ) {
8004b90: 37 9c ff f0 addi sp,sp,-16 8004b94: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info;
8004b98: 28 23 00 3c lw r3,(r1+60)
#include "devfs.h" int devFS_close( rtems_libio_t *iop ) {
8004b9c: b8 20 20 00 mv r4,r1
rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = 0;
8004ba0: 34 01 00 00 mvi r1,0
args.mode = 0;
8004ba4: 5b 81 00 10 sw (sp+16),r1
rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = 0;
8004ba8: 5b 81 00 0c sw (sp+12),r1
args.mode = 0; status = rtems_io_close(
8004bac: 28 62 00 0c lw r2,(r3+12) 8004bb0: 28 61 00 08 lw r1,(r3+8) 8004bb4: 37 83 00 08 addi r3,sp,8
rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop;
8004bb8: 5b 84 00 08 sw (sp+8),r4
args.flags = 0; args.mode = 0; status = rtems_io_close(
8004bbc: f8 00 07 08 calli 80067dc <rtems_io_close>
np->major, np->minor, (void *) &args ); if ( status ) {
8004bc0: b8 20 10 00 mv r2,r1
8004bc4: 44 20 00 03 be r1,r0,8004bd0 <devFS_close+0x40> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8004bc8: f8 00 00 48 calli 8004ce8 <rtems_deviceio_errno> <== NOT EXECUTED 8004bcc: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
} return 0; }
8004bd0: b8 40 08 00 mv r1,r2 8004bd4: 2b 9d 00 04 lw ra,(sp+4) 8004bd8: 37 9c 00 10 addi sp,sp,16 8004bdc: c3 a0 00 00 ret
08004bec <devFS_evaluate_path>: const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) {
8004bec: 37 9c ff e0 addi sp,sp,-32 8004bf0: 5b 8b 00 20 sw (sp+32),r11 8004bf4: 5b 8c 00 1c sw (sp+28),r12 8004bf8: 5b 8d 00 18 sw (sp+24),r13 8004bfc: 5b 8e 00 14 sw (sp+20),r14 8004c00: 5b 8f 00 10 sw (sp+16),r15 8004c04: 5b 90 00 0c sw (sp+12),r16 8004c08: 5b 91 00 08 sw (sp+8),r17 8004c0c: 5b 9d 00 04 sw (sp+4),ra
assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access;
8004c10: 28 8c 00 00 lw r12,(r4+0)
const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) {
8004c14: b8 80 58 00 mv r11,r4 8004c18: b8 20 88 00 mv r17,r1 8004c1c: b8 40 80 00 mv r16,r2
rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table)
8004c20: 45 80 00 05 be r12,r0,8004c34 <devFS_evaluate_path+0x48> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) {
8004c24: 78 0d 08 00 mvhi r13,0x800 8004c28: 39 ad d0 14 ori r13,r13,0xd014
rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table)
8004c2c: 34 0e 00 00 mvi r14,0 8004c30: e0 00 00 1c bi 8004ca0 <devFS_evaluate_path+0xb4>
rtems_set_errno_and_return_minus_one( EFAULT );
8004c34: f8 00 12 21 calli 80094b8 <__errno> <== NOT EXECUTED 8004c38: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8004c3c: e0 00 00 1f bi 8004cb8 <devFS_evaluate_path+0xcc> <== NOT EXECUTED
for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name)
8004c40: 29 8f 00 00 lw r15,(r12+0)
/* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) {
8004c44: 35 ce 00 01 addi r14,r14,1
if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8004c48: b9 e0 10 00 mv r2,r15
device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 8004c4c: 45 e0 00 14 be r15,r0,8004c9c <devFS_evaluate_path+0xb0> continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8004c50: f8 00 16 af calli 800a70c <strncmp>
continue; if (device_name_table[i].device_name[pathnamelen] != '\0')
8004c54: b5 f0 78 00 add r15,r15,r16
for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8004c58: 5c 20 00 11 bne r1,r0,8004c9c <devFS_evaluate_path+0xb0> <== NEVER TAKEN
continue; if (device_name_table[i].device_name[pathnamelen] != '\0')
8004c5c: 41 e5 00 00 lbu r5,(r15+0)
8004c60: 5c a1 00 0f bne r5,r1,8004c9c <devFS_evaluate_path+0xb0> <== NEVER TAKEN
/* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry;
8004c64: 78 02 08 00 mvhi r2,0x800 8004c68: 38 42 d1 7c ori r2,r2,0xd17c 8004c6c: 28 41 00 00 lw r1,(r2+0)
if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers;
8004c70: 78 03 08 00 mvhi r3,0x800
pathloc->ops = &devFS_ops;
8004c74: 78 02 08 00 mvhi r2,0x800
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
8004c78: 28 21 00 28 lw r1,(r1+40)
if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers;
8004c7c: 38 63 d1 44 ori r3,r3,0xd144
pathloc->ops = &devFS_ops;
8004c80: 38 42 d0 fc ori r2,r2,0xd0fc
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
8004c84: 59 61 00 10 sw (r11+16),r1
if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i];
8004c88: 59 6c 00 00 sw (r11+0),r12
pathloc->handlers = &devFS_file_handlers;
8004c8c: 59 63 00 08 sw (r11+8),r3
pathloc->ops = &devFS_ops;
8004c90: 59 62 00 0c sw (r11+12),r2
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
8004c94: b8 a0 08 00 mv r1,r5
return 0;
8004c98: e0 00 00 0a bi 8004cc0 <devFS_evaluate_path+0xd4>
/* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) {
8004c9c: 35 8c 00 14 addi r12,r12,20 8004ca0: 29 a2 00 00 lw r2,(r13+0)
if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8004ca4: ba 20 08 00 mv r1,r17 8004ca8: ba 00 18 00 mv r3,r16
/* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 8004cac: 54 4e ff e5 bgu r2,r14,8004c40 <devFS_evaluate_path+0x54> pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT );
8004cb0: f8 00 12 02 calli 80094b8 <__errno> 8004cb4: 34 02 00 02 mvi r2,2 8004cb8: 58 22 00 00 sw (r1+0),r2 8004cbc: 34 01 ff ff mvi r1,-1
}
8004cc0: 2b 9d 00 04 lw ra,(sp+4) 8004cc4: 2b 8b 00 20 lw r11,(sp+32) 8004cc8: 2b 8c 00 1c lw r12,(sp+28) 8004ccc: 2b 8d 00 18 lw r13,(sp+24) 8004cd0: 2b 8e 00 14 lw r14,(sp+20) 8004cd4: 2b 8f 00 10 lw r15,(sp+16) 8004cd8: 2b 90 00 0c lw r16,(sp+12) 8004cdc: 2b 91 00 08 lw r17,(sp+8) 8004ce0: 37 9c 00 20 addi sp,sp,32 8004ce4: c3 a0 00 00 ret
080007e8 <devFS_initialize>: int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) {
80007e8: 37 9c ff f0 addi sp,sp,-16 80007ec: 5b 8b 00 10 sw (sp+16),r11 80007f0: 5b 8c 00 0c sw (sp+12),r12 80007f4: 5b 8d 00 08 sw (sp+8),r13 80007f8: 5b 9d 00 04 sw (sp+4),ra
rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
80007fc: 78 0b 08 00 mvhi r11,0x800 8000800: 39 6b d0 14 ori r11,r11,0xd014
int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) {
8000804: b8 20 60 00 mv r12,r1
rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
8000808: 29 61 00 00 lw r1,(r11+0) 800080c: 34 02 00 02 mvi r2,2 8000810: fb ff fe 52 calli 8000158 <__ashlsi3> 8000814: 34 02 00 02 mvi r2,2 8000818: b8 20 68 00 mv r13,r1 800081c: fb ff fe 4f calli 8000158 <__ashlsi3> 8000820: b5 a1 08 00 add r1,r13,r1 8000824: f8 00 0f c4 calli 8004734 <_Workspace_Allocate> 8000828: b8 20 68 00 mv r13,r1
sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table)
800082c: 5c 20 00 06 bne r1,r0,8000844 <devFS_initialize+0x5c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
8000830: f8 00 23 22 calli 80094b8 <__errno> <== NOT EXECUTED 8000834: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8000838: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 800083c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000840: e0 00 00 13 bi 800088c <devFS_initialize+0xa4> <== NOT EXECUTED
memset(
8000844: 29 61 00 00 lw r1,(r11+0) 8000848: 34 02 00 02 mvi r2,2 800084c: fb ff fe 43 calli 8000158 <__ashlsi3> 8000850: 34 02 00 02 mvi r2,2 8000854: b8 20 58 00 mv r11,r1 8000858: fb ff fe 40 calli 8000158 <__ashlsi3> 800085c: b5 61 18 00 add r3,r11,r1 8000860: 34 02 00 00 mvi r2,0 8000864: b9 a0 08 00 mv r1,r13 8000868: f8 00 25 f7 calli 800a044 <memset>
device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
800086c: 78 03 08 00 mvhi r3,0x800
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
8000870: 78 02 08 00 mvhi r2,0x800
device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
8000874: 38 63 d1 44 ori r3,r3,0xd144
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
8000878: 38 42 d0 fc ori r2,r2,0xd0fc
/* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
800087c: 59 8d 00 1c sw (r12+28),r13
device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
8000880: 59 83 00 24 sw (r12+36),r3
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
8000884: 59 82 00 28 sw (r12+40),r2
/* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
8000888: 34 01 00 00 mvi r1,0
return 0; }
800088c: 2b 9d 00 04 lw ra,(sp+4) 8000890: 2b 8b 00 10 lw r11,(sp+16) 8000894: 2b 8c 00 0c lw r12,(sp+12) 8000898: 2b 8d 00 08 lw r13,(sp+8) 800089c: 37 9c 00 10 addi sp,sp,16 80008a0: c3 a0 00 00 ret
08000a40 <devFS_ioctl>: int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) {
8000a40: 37 9c ff ec addi sp,sp,-20 8000a44: 5b 9d 00 04 sw (sp+4),ra 8000a48: b8 20 20 00 mv r4,r1
rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info;
8000a4c: 28 21 00 3c lw r1,(r1+60)
args.iop = iop; args.command = command;
8000a50: 5b 82 00 0c sw (sp+12),r2
args.buffer = buffer;
8000a54: 5b 83 00 10 sw (sp+16),r3
status = rtems_io_control(
8000a58: 28 22 00 0c lw r2,(r1+12) 8000a5c: 28 21 00 08 lw r1,(r1+8) 8000a60: 37 83 00 08 addi r3,sp,8
rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop;
8000a64: 5b 84 00 08 sw (sp+8),r4
args.command = command; args.buffer = buffer; status = rtems_io_control(
8000a68: f8 00 06 b6 calli 8002540 <rtems_io_control>
np->major, np->minor, (void *) &args ); if ( status )
8000a6c: 44 20 00 03 be r1,r0,8000a78 <devFS_ioctl+0x38> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8000a70: f8 00 10 9e calli 8004ce8 <rtems_deviceio_errno> <== NOT EXECUTED 8000a74: e0 00 00 02 bi 8000a7c <devFS_ioctl+0x3c> <== NOT EXECUTED
return args.ioctl_return;
8000a78: 2b 81 00 14 lw r1,(sp+20)
}
8000a7c: 2b 9d 00 04 lw ra,(sp+4) 8000a80: 37 9c 00 14 addi sp,sp,20 8000a84: c3 a0 00 00 ret
080008a4 <devFS_mknod>: const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) {
80008a4: 37 9c ff d8 addi sp,sp,-40 80008a8: 5b 8b 00 28 sw (sp+40),r11 80008ac: 5b 8c 00 24 sw (sp+36),r12 80008b0: 5b 8d 00 20 sw (sp+32),r13 80008b4: 5b 8e 00 1c sw (sp+28),r14 80008b8: 5b 8f 00 18 sw (sp+24),r15 80008bc: 5b 90 00 14 sw (sp+20),r16 80008c0: 5b 91 00 10 sw (sp+16),r17 80008c4: 5b 92 00 0c sw (sp+12),r18 80008c8: 5b 93 00 08 sw (sp+8),r19 80008cc: 5b 9d 00 04 sw (sp+4),ra
* condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') &&
80008d0: 40 26 00 00 lbu r6,(r1+0)
const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) {
80008d4: b8 20 58 00 mv r11,r1
* condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') &&
80008d8: 34 01 00 64 mvi r1,100
const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) {
80008dc: b8 40 88 00 mv r17,r2 80008e0: b8 60 98 00 mv r19,r3 80008e4: b8 80 90 00 mv r18,r4
* condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') &&
80008e8: 5c c1 00 0a bne r6,r1,8000910 <devFS_mknod+0x6c> <== NEVER TAKEN
80008ec: 41 62 00 01 lbu r2,(r11+1) 80008f0: 34 01 00 65 mvi r1,101
80008f4: 5c 41 00 07 bne r2,r1,8000910 <devFS_mknod+0x6c> <== NEVER TAKEN
(path[2] == 'v') && (path[3] == '\0'))
80008f8: 41 62 00 02 lbu r2,(r11+2) 80008fc: 34 01 00 76 mvi r1,118
8000900: 5c 41 00 04 bne r2,r1,8000910 <devFS_mknod+0x6c> <== NEVER TAKEN
8000904: 41 62 00 03 lbu r2,(r11+3) 8000908: b8 40 08 00 mv r1,r2
800090c: 44 40 00 3f be r2,r0,8000a08 <devFS_mknod+0x164> return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode))
8000910: 22 21 f0 00 andi r1,r17,0xf000 8000914: 7c 22 60 00 cmpnei r2,r1,24576 8000918: 7c 2f 20 00 cmpnei r15,r1,8192 800091c: a1 e2 78 00 and r15,r15,r2
8000920: 45 e0 00 04 be r15,r0,8000930 <devFS_mknod+0x8c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
8000924: f8 00 22 e5 calli 80094b8 <__errno> <== NOT EXECUTED 8000928: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 800092c: e0 00 00 0a bi 8000954 <devFS_mknod+0xb0> <== NOT EXECUTED
else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access;
8000930: 28 b0 00 00 lw r16,(r5+0)
if (!device_name_table)
8000934: 46 0f 00 06 be r16,r15,800094c <devFS_mknod+0xa8> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){
8000938: 78 0e 08 00 mvhi r14,0x800 800093c: 39 ce d0 14 ori r14,r14,0xd014
else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table)
8000940: ba 00 60 00 mv r12,r16 8000944: 34 0d ff ff mvi r13,-1 8000948: e0 00 00 11 bi 800098c <devFS_mknod+0xe8>
rtems_set_errno_and_return_minus_one( EFAULT );
800094c: f8 00 22 db calli 80094b8 <__errno> <== NOT EXECUTED 8000950: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8000954: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000958: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800095c: e0 00 00 2b bi 8000a08 <devFS_mknod+0x164> <== NOT EXECUTED
for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL)
8000960: 29 85 00 00 lw r5,(r12+0)
/* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){
8000964: 35 8c 00 14 addi r12,r12,20
if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0)
8000968: b8 a0 10 00 mv r2,r5
device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL)
800096c: 44 a0 00 06 be r5,r0,8000984 <devFS_mknod+0xe0> <== ALWAYS TAKEN
slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0)
8000970: f8 00 26 ec calli 800a520 <strcmp> <== NOT EXECUTED 8000974: 5c 20 00 05 bne r1,r0,8000988 <devFS_mknod+0xe4> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EEXIST );
8000978: f8 00 22 d0 calli 80094b8 <__errno> <== NOT EXECUTED 800097c: 34 02 00 11 mvi r2,17 <== NOT EXECUTED 8000980: e3 ff ff f5 bi 8000954 <devFS_mknod+0xb0> <== NOT EXECUTED
8000984: b9 e0 68 00 mv r13,r15
/* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){
8000988: 35 ef 00 01 addi r15,r15,1 800098c: 29 c2 00 00 lw r2,(r14+0)
if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0)
8000990: b9 60 08 00 mv r1,r11
/* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 8000994: 54 4f ff f3 bgu r2,r15,8000960 <devFS_mknod+0xbc> else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1)
8000998: 34 01 ff ff mvi r1,-1
800099c: 5d a1 00 06 bne r13,r1,80009b4 <devFS_mknod+0x110> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
80009a0: f8 00 22 c6 calli 80094b8 <__errno> <== NOT EXECUTED 80009a4: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 80009a8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80009ac: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80009b0: e0 00 00 16 bi 8000a08 <devFS_mknod+0x164> <== NOT EXECUTED
_ISR_Disable(level);
80009b4: 90 00 70 00 rcsr r14,IE 80009b8: 34 01 ff fe mvi r1,-2 80009bc: a1 c1 08 00 and r1,r14,r1 80009c0: d0 01 00 00 wcsr IE,r1
device_name_table[slot].device_name = (char *)path;
80009c4: 34 02 00 02 mvi r2,2 80009c8: b9 a0 08 00 mv r1,r13 80009cc: fb ff fd e3 calli 8000158 <__ashlsi3> 80009d0: 34 02 00 02 mvi r2,2 80009d4: b8 20 60 00 mv r12,r1 80009d8: fb ff fd e0 calli 8000158 <__ashlsi3> 80009dc: b5 81 08 00 add r1,r12,r1 80009e0: b6 01 60 00 add r12,r16,r1 80009e4: 59 8b 00 00 sw (r12+0),r11
device_name_table[slot].device_name_length = strlen(path);
80009e8: b9 60 08 00 mv r1,r11 80009ec: f8 00 27 1d calli 800a660 <strlen> 80009f0: 59 81 00 04 sw (r12+4),r1
device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode;
80009f4: 59 91 00 10 sw (r12+16),r17
rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); device_name_table[slot].major = major;
80009f8: 59 93 00 08 sw (r12+8),r19
device_name_table[slot].minor = minor;
80009fc: 59 92 00 0c sw (r12+12),r18
device_name_table[slot].mode = mode; _ISR_Enable(level);
8000a00: d0 0e 00 00 wcsr IE,r14 8000a04: 34 01 00 00 mvi r1,0
return 0; }
8000a08: 2b 9d 00 04 lw ra,(sp+4) 8000a0c: 2b 8b 00 28 lw r11,(sp+40) 8000a10: 2b 8c 00 24 lw r12,(sp+36) 8000a14: 2b 8d 00 20 lw r13,(sp+32) 8000a18: 2b 8e 00 1c lw r14,(sp+28) 8000a1c: 2b 8f 00 18 lw r15,(sp+24) 8000a20: 2b 90 00 14 lw r16,(sp+20) 8000a24: 2b 91 00 10 lw r17,(sp+16) 8000a28: 2b 92 00 0c lw r18,(sp+12) 8000a2c: 2b 93 00 08 lw r19,(sp+8) 8000a30: 37 9c 00 28 addi sp,sp,40 8000a34: c3 a0 00 00 ret
08000a88 <devFS_open>: rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) {
8000a88: 37 9c ff f0 addi sp,sp,-16 8000a8c: 5b 9d 00 04 sw (sp+4),ra 8000a90: b8 20 28 00 mv r5,r1
rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = iop->flags;
8000a94: 28 21 00 18 lw r1,(r1+24)
args.mode = mode;
8000a98: 5b 84 00 10 sw (sp+16),r4
status = rtems_io_open(
8000a9c: 37 83 00 08 addi r3,sp,8
rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = iop->flags;
8000aa0: 5b 81 00 0c sw (sp+12),r1
{ rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info;
8000aa4: 28 a1 00 3c lw r1,(r5+60)
args.iop = iop;
8000aa8: 5b 85 00 08 sw (sp+8),r5
args.flags = iop->flags; args.mode = mode; status = rtems_io_open(
8000aac: 28 22 00 0c lw r2,(r1+12) 8000ab0: 28 21 00 08 lw r1,(r1+8) 8000ab4: f8 00 07 13 calli 8002700 <rtems_io_open>
np->major, np->minor, (void *) &args ); if ( status )
8000ab8: b8 20 10 00 mv r2,r1
8000abc: 44 20 00 03 be r1,r0,8000ac8 <devFS_open+0x40> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8000ac0: f8 00 10 8a calli 8004ce8 <rtems_deviceio_errno> <== NOT EXECUTED 8000ac4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
return 0; }
8000ac8: b8 40 08 00 mv r1,r2 8000acc: 2b 9d 00 04 lw ra,(sp+4) 8000ad0: 37 9c 00 10 addi sp,sp,16 8000ad4: c3 a0 00 00 ret
08000ad8 <devFS_read>: ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) {
8000ad8: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8000adc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8000ae0: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags;
8000ae4: 28 21 00 18 lw r1,(r1+24) <== NOT EXECUTED 8000ae8: 5b 81 00 20 sw (sp+32),r1 <== NOT EXECUTED
rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset;
8000aec: 28 81 00 14 lw r1,(r4+20) <== NOT EXECUTED 8000af0: 5b 81 00 14 sw (sp+20),r1 <== NOT EXECUTED 8000af4: 28 81 00 10 lw r1,(r4+16) <== NOT EXECUTED
args.buffer = buffer; args.count = count;
8000af8: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED
args.flags = iop->flags; args.bytes_moved = 0;
8000afc: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset;
8000b00: 5b 81 00 10 sw (sp+16),r1 <== NOT EXECUTED
{ rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info;
8000b04: 28 81 00 3c lw r1,(r4+60) <== NOT EXECUTED
args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
8000b08: 5b 83 00 24 sw (sp+36),r3 <== NOT EXECUTED
np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer;
8000b0c: 5b 82 00 18 sw (sp+24),r2 <== NOT EXECUTED
args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read(
8000b10: 28 22 00 0c lw r2,(r1+12) <== NOT EXECUTED 8000b14: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8000b18: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED
rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop;
8000b1c: 5b 84 00 08 sw (sp+8),r4 <== NOT EXECUTED
args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read(
8000b20: f8 00 07 1d calli 8002794 <rtems_io_read> <== NOT EXECUTED
np->major, np->minor, (void *) &args ); if ( status )
8000b24: 44 20 00 03 be r1,r0,8000b30 <devFS_read+0x58> <== NOT EXECUTED
return rtems_deviceio_errno(status);
8000b28: f8 00 10 70 calli 8004ce8 <rtems_deviceio_errno> <== NOT EXECUTED 8000b2c: e0 00 00 02 bi 8000b34 <devFS_read+0x5c> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
8000b30: 2b 81 00 24 lw r1,(sp+36) <== NOT EXECUTED
}
8000b34: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8000b38: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8000b3c: c3 a0 00 00 ret <== NOT EXECUTED
08000b40 <devFS_stat>: int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) {
8000b40: 37 9c ff fc addi sp,sp,-4 8000b44: 5b 9d 00 04 sw (sp+4),ra
rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access;
8000b48: 28 21 00 00 lw r1,(r1+0)
if (!the_dev)
8000b4c: 5c 20 00 06 bne r1,r0,8000b64 <devFS_stat+0x24> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
8000b50: f8 00 22 5a calli 80094b8 <__errno> <== NOT EXECUTED 8000b54: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8000b58: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000b5c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000b60: e0 00 00 08 bi 8000b80 <devFS_stat+0x40> <== NOT EXECUTED
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
8000b64: 28 23 00 0c lw r3,(r1+12) 8000b68: 28 24 00 08 lw r4,(r1+8)
buf->st_mode = the_dev->mode;
8000b6c: 28 21 00 10 lw r1,(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 );
8000b70: 58 43 00 1c sw (r2+28),r3 8000b74: 58 44 00 18 sw (r2+24),r4
buf->st_mode = the_dev->mode;
8000b78: 58 41 00 0c sw (r2+12),r1 8000b7c: 34 01 00 00 mvi r1,0
return 0; }
8000b80: 2b 9d 00 04 lw ra,(sp+4) 8000b84: 37 9c 00 04 addi sp,sp,4 8000b88: c3 a0 00 00 ret
08000b8c <devFS_write>: ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) {
8000b8c: 37 9c ff dc addi sp,sp,-36 8000b90: 5b 9d 00 04 sw (sp+4),ra 8000b94: b8 20 20 00 mv r4,r1
args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags;
8000b98: 28 21 00 18 lw r1,(r1+24) 8000b9c: 5b 81 00 20 sw (sp+32),r1
rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset;
8000ba0: 28 81 00 14 lw r1,(r4+20) 8000ba4: 5b 81 00 14 sw (sp+20),r1 8000ba8: 28 81 00 10 lw r1,(r4+16)
args.buffer = (void *) buffer; args.count = count;
8000bac: 5b 83 00 1c sw (sp+28),r3
args.flags = iop->flags; args.bytes_moved = 0;
8000bb0: 34 03 00 00 mvi r3,0
rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset;
8000bb4: 5b 81 00 10 sw (sp+16),r1
{ rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info;
8000bb8: 28 81 00 3c lw r1,(r4+60)
args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
8000bbc: 5b 83 00 24 sw (sp+36),r3
np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer;
8000bc0: 5b 82 00 18 sw (sp+24),r2
args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write(
8000bc4: 28 22 00 0c lw r2,(r1+12) 8000bc8: 28 21 00 08 lw r1,(r1+8) 8000bcc: 37 83 00 08 addi r3,sp,8
rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop;
8000bd0: 5b 84 00 08 sw (sp+8),r4
args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write(
8000bd4: f8 00 07 15 calli 8002828 <rtems_io_write>
np->major, np->minor, (void *) &args ); if ( status )
8000bd8: 44 20 00 03 be r1,r0,8000be4 <devFS_write+0x58> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8000bdc: f8 00 10 43 calli 8004ce8 <rtems_deviceio_errno> <== NOT EXECUTED 8000be0: e0 00 00 02 bi 8000be8 <devFS_write+0x5c> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
8000be4: 2b 81 00 24 lw r1,(sp+36)
}
8000be8: 2b 9d 00 04 lw ra,(sp+4) 8000bec: 37 9c 00 24 addi sp,sp,36 8000bf0: c3 a0 00 00 ret
08009cc4 <device_close>: */ int device_close( rtems_libio_t *iop ) {
8009cc4: 37 9c ff f0 addi sp,sp,-16 8009cc8: 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;
8009ccc: 28 23 00 3c lw r3,(r1+60)
args.iop = iop; args.flags = 0;
8009cd0: 34 02 00 00 mvi r2,0
rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop;
8009cd4: 5b 81 00 08 sw (sp+8),r1
args.flags = 0; args.mode = 0;
8009cd8: 5b 82 00 10 sw (sp+16),r2
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = 0;
8009cdc: 5b 82 00 0c sw (sp+12),r2
args.mode = 0; status = rtems_io_close(
8009ce0: 28 62 00 54 lw r2,(r3+84) 8009ce4: 28 61 00 50 lw r1,(r3+80) 8009ce8: 37 83 00 08 addi r3,sp,8 8009cec: f8 00 05 ba calli 800b3d4 <rtems_io_close>
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) {
8009cf0: b8 20 10 00 mv r2,r1
8009cf4: 44 20 00 03 be r1,r0,8009d00 <device_close+0x3c> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8009cf8: f8 00 07 89 calli 800bb1c <rtems_deviceio_errno> <== NOT EXECUTED 8009cfc: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
} return 0; }
8009d00: b8 40 08 00 mv r1,r2 8009d04: 2b 9d 00 04 lw ra,(sp+4) 8009d08: 37 9c 00 10 addi sp,sp,16 8009d0c: c3 a0 00 00 ret
08009bb8 <device_ioctl>: int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) {
8009bb8: 37 9c ff ec addi sp,sp,-20 8009bbc: 5b 9d 00 04 sw (sp+4),ra
args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info;
8009bc0: 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;
8009bc4: 5b 82 00 0c sw (sp+12),r2
args.buffer = buffer;
8009bc8: 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;
8009bcc: 5b 81 00 08 sw (sp+8),r1
args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control(
8009bd0: 28 82 00 54 lw r2,(r4+84) 8009bd4: 28 81 00 50 lw r1,(r4+80) 8009bd8: 37 83 00 08 addi r3,sp,8 8009bdc: f8 00 06 23 calli 800b468 <rtems_io_control>
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status )
8009be0: 44 20 00 03 be r1,r0,8009bec <device_ioctl+0x34> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8009be4: f8 00 07 ce calli 800bb1c <rtems_deviceio_errno> <== NOT EXECUTED 8009be8: e0 00 00 02 bi 8009bf0 <device_ioctl+0x38> <== NOT EXECUTED
return args.ioctl_return;
8009bec: 2b 81 00 14 lw r1,(sp+20)
}
8009bf0: 2b 9d 00 04 lw ra,(sp+4) 8009bf4: 37 9c 00 14 addi sp,sp,20 8009bf8: c3 a0 00 00 ret
08009d10 <device_open>: rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) {
8009d10: 37 9c ff f0 addi sp,sp,-16 8009d14: 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;
8009d18: 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;
8009d1c: 28 23 00 3c lw r3,(r1+60)
args.iop = iop; args.flags = iop->flags; args.mode = mode;
8009d20: 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;
8009d24: 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;
8009d28: 5b 81 00 08 sw (sp+8),r1
args.flags = iop->flags; args.mode = mode; status = rtems_io_open(
8009d2c: 28 62 00 54 lw r2,(r3+84) 8009d30: 28 61 00 50 lw r1,(r3+80) 8009d34: 37 83 00 08 addi r3,sp,8 8009d38: f8 00 05 f1 calli 800b4fc <rtems_io_open>
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status )
8009d3c: b8 20 10 00 mv r2,r1
8009d40: 44 20 00 03 be r1,r0,8009d4c <device_open+0x3c> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8009d44: f8 00 07 76 calli 800bb1c <rtems_deviceio_errno> <== NOT EXECUTED 8009d48: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
return 0; }
8009d4c: b8 40 08 00 mv r1,r2 8009d50: 2b 9d 00 04 lw ra,(sp+4) 8009d54: 37 9c 00 10 addi sp,sp,16 8009d58: c3 a0 00 00 ret
08009c60 <device_read>: ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) {
8009c60: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8009c64: 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;
8009c68: 28 24 00 18 lw r4,(r1+24) <== NOT EXECUTED 8009c6c: 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;
8009c70: 28 24 00 14 lw r4,(r1+20) <== NOT EXECUTED 8009c74: 5b 84 00 14 sw (sp+20),r4 <== NOT EXECUTED 8009c78: 28 24 00 10 lw r4,(r1+16) <== NOT EXECUTED
args.buffer = buffer;
8009c7c: 5b 82 00 18 sw (sp+24),r2 <== NOT EXECUTED
args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
8009c80: 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;
8009c84: 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;
8009c88: 28 24 00 3c lw r4,(r1+60) <== NOT EXECUTED
args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count;
8009c8c: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED
args.flags = iop->flags; args.bytes_moved = 0;
8009c90: 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;
8009c94: 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(
8009c98: 28 82 00 54 lw r2,(r4+84) <== NOT EXECUTED 8009c9c: 28 81 00 50 lw r1,(r4+80) <== NOT EXECUTED 8009ca0: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED 8009ca4: f8 00 06 3b calli 800b590 <rtems_io_read> <== NOT EXECUTED
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status )
8009ca8: 44 20 00 03 be r1,r0,8009cb4 <device_read+0x54> <== NOT EXECUTED
return rtems_deviceio_errno(status);
8009cac: f8 00 07 9c calli 800bb1c <rtems_deviceio_errno> <== NOT EXECUTED 8009cb0: e0 00 00 02 bi 8009cb8 <device_read+0x58> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
8009cb4: 2b 81 00 24 lw r1,(sp+36) <== NOT EXECUTED
}
8009cb8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8009cbc: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8009cc0: c3 a0 00 00 ret <== NOT EXECUTED
08009bfc <device_write>: ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) {
8009bfc: 37 9c ff dc addi sp,sp,-36 8009c00: 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;
8009c04: 28 24 00 18 lw r4,(r1+24) 8009c08: 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;
8009c0c: 28 24 00 14 lw r4,(r1+20) 8009c10: 5b 84 00 14 sw (sp+20),r4 8009c14: 28 24 00 10 lw r4,(r1+16)
args.buffer = (void *) buffer;
8009c18: 5b 82 00 18 sw (sp+24),r2
args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
8009c1c: 34 02 00 00 mvi r2,0
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset;
8009c20: 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;
8009c24: 28 24 00 3c lw r4,(r1+60)
args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count;
8009c28: 5b 83 00 1c sw (sp+28),r3
args.flags = iop->flags; args.bytes_moved = 0;
8009c2c: 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;
8009c30: 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(
8009c34: 28 82 00 54 lw r2,(r4+84) 8009c38: 28 81 00 50 lw r1,(r4+80) 8009c3c: 37 83 00 08 addi r3,sp,8 8009c40: f8 00 06 79 calli 800b624 <rtems_io_write>
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status )
8009c44: 44 20 00 03 be r1,r0,8009c50 <device_write+0x54> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8009c48: f8 00 07 b5 calli 800bb1c <rtems_deviceio_errno> <== NOT EXECUTED 8009c4c: e0 00 00 02 bi 8009c54 <device_write+0x58> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
8009c50: 2b 81 00 24 lw r1,(sp+36)
}
8009c54: 2b 9d 00 04 lw ra,(sp+4) 8009c58: 37 9c 00 24 addi sp,sp,36 8009c5c: c3 a0 00 00 ret
080047f0 <drainOutput>: /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) {
80047f0: 37 9c ff f0 addi sp,sp,-16 80047f4: 5b 8b 00 10 sw (sp+16),r11 80047f8: 5b 8c 00 0c sw (sp+12),r12 80047fc: 5b 8d 00 08 sw (sp+8),r13 8004800: 5b 9d 00 04 sw (sp+4),ra 8004804: b8 20 58 00 mv r11,r1
rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
8004808: 28 21 00 b4 lw r1,(r1+180)
800480c: 44 20 00 17 be r1,r0,8004868 <drainOutput+0x78> <== ALWAYS TAKEN
rtems_interrupt_disable (level);
8004810: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8004814: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 8004818: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 800481c: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait;
8004820: 34 0d 00 02 mvi r13,2 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level);
8004824: 34 0c ff fe mvi r12,-2 <== NOT EXECUTED
rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
8004828: e0 00 00 0c bi 8004858 <drainOutput+0x68> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
800482c: 59 6d 00 94 sw (r11+148),r13 <== NOT EXECUTED
rtems_interrupt_enable (level);
8004830: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
8004834: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED 8004838: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800483c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 8004840: f8 00 06 81 calli 8006244 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
8004844: 44 20 00 02 be r1,r0,800484c <drainOutput+0x5c> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
8004848: f8 00 08 78 calli 8006a28 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
800484c: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8004850: a0 2c 10 00 and r2,r1,r12 <== NOT EXECUTED 8004854: 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) {
8004858: 29 63 00 84 lw r3,(r11+132) <== NOT EXECUTED 800485c: 29 62 00 80 lw r2,(r11+128) <== NOT EXECUTED 8004860: 5c 62 ff f3 bne r3,r2,800482c <drainOutput+0x3c> <== NOT EXECUTED
RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level);
8004864: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
} }
8004868: 2b 9d 00 04 lw ra,(sp+4) 800486c: 2b 8b 00 10 lw r11,(sp+16) 8004870: 2b 8c 00 0c lw r12,(sp+12) 8004874: 2b 8d 00 08 lw r13,(sp+8) 8004878: 37 9c 00 10 addi sp,sp,16 800487c: c3 a0 00 00 ret
08001dc8 <dup2>: int dup2( int fildes, int fildes2 ) {
8001dc8: 37 9c ff a4 addi sp,sp,-92 8001dcc: 5b 8b 00 14 sw (sp+20),r11 8001dd0: 5b 8c 00 10 sw (sp+16),r12 8001dd4: 5b 8d 00 0c sw (sp+12),r13 8001dd8: 5b 8e 00 08 sw (sp+8),r14 8001ddc: 5b 9d 00 04 sw (sp+4),ra
/* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf );
8001de0: 37 8d 00 18 addi r13,sp,24
int dup2( int fildes, int fildes2 ) {
8001de4: b8 40 58 00 mv r11,r2
/* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf );
8001de8: b9 a0 10 00 mv r2,r13
if ( status == -1 )
8001dec: 34 0c ff ff mvi r12,-1
int dup2( int fildes, int fildes2 ) {
8001df0: b8 20 70 00 mv r14,r1
/* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf );
8001df4: f8 00 01 f4 calli 80025c4 <fstat>
if ( status == -1 )
8001df8: 44 2c 00 0a be r1,r12,8001e20 <dup2+0x58> <== NEVER TAKEN
/* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf );
8001dfc: b9 a0 10 00 mv r2,r13 8001e00: b9 60 08 00 mv r1,r11 8001e04: f8 00 01 f0 calli 80025c4 <fstat>
if ( status == -1 )
8001e08: 44 2c 00 06 be r1,r12,8001e20 <dup2+0x58> <== ALWAYS TAKEN
/* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 );
8001e0c: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8001e10: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8001e14: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8001e18: f8 00 00 ac calli 80020c8 <fcntl> <== NOT EXECUTED 8001e1c: e0 00 00 02 bi 8001e24 <dup2+0x5c> <== NOT EXECUTED
8001e20: 34 01 ff ff mvi r1,-1
}
8001e24: 2b 9d 00 04 lw ra,(sp+4) 8001e28: 2b 8b 00 14 lw r11,(sp+20) 8001e2c: 2b 8c 00 10 lw r12,(sp+16) 8001e30: 2b 8d 00 0c lw r13,(sp+12) 8001e34: 2b 8e 00 08 lw r14,(sp+8) 8001e38: 37 9c 00 5c addi sp,sp,92 8001e3c: c3 a0 00 00 ret
08004210 <echo>: /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) {
8004210: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8004214: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8004218: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 800421c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8004220: b8 40 58 00 mv r11,r2 <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
8004224: 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) {
8004228: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
800422c: 20 41 02 00 andi r1,r2,0x200 <== NOT EXECUTED 8004230: 44 20 00 19 be r1,r0,8004294 <echo+0x84> <== NOT EXECUTED 8004234: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8004238: 38 21 53 0c ori r1,r1,0x530c <== NOT EXECUTED 800423c: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8004240: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8004244: b4 2c 08 00 add r1,r1,r12 <== NOT EXECUTED 8004248: 40 21 00 01 lbu r1,(r1+1) <== NOT EXECUTED 800424c: fb ff f4 93 calli 8001498 <__lshrsi3> <== NOT EXECUTED 8004250: 7d 82 00 09 cmpnei r2,r12,9 <== NOT EXECUTED 8004254: a0 22 08 00 and r1,r1,r2 <== NOT EXECUTED 8004258: 44 20 00 0f be r1,r0,8004294 <echo+0x84> <== NOT EXECUTED 800425c: 34 01 00 0a mvi r1,10 <== NOT EXECUTED 8004260: 45 81 00 0d be r12,r1,8004294 <echo+0x84> <== NOT EXECUTED
char echobuf[2]; echobuf[0] = '^';
8004264: 34 04 00 5e mvi r4,94 <== NOT EXECUTED
echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty);
8004268: 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;
800426c: 19 8c 00 40 xori r12,r12,0x40 <== NOT EXECUTED
rtems_termios_puts (echobuf, 2, tty);
8004270: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8004274: 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] = '^';
8004278: 33 84 00 10 sb (sp+16),r4 <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
800427c: 33 8c 00 11 sb (sp+17),r12 <== NOT EXECUTED
rtems_termios_puts (echobuf, 2, tty);
8004280: fb ff ff 2e calli 8003f38 <rtems_termios_puts> <== NOT EXECUTED
tty->column += 2;
8004284: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004288: 34 21 00 02 addi r1,r1,2 <== NOT EXECUTED 800428c: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
* Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
8004290: e0 00 00 04 bi 80042a0 <echo+0x90> <== NOT EXECUTED
echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty);
8004294: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004298: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800429c: fb ff ff 7d calli 8004090 <oproc> <== NOT EXECUTED
} }
80042a0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80042a4: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 80042a8: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 80042ac: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 80042b0: c3 a0 00 00 ret <== NOT EXECUTED
08026e68 <endgrent>: fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) {
8026e68: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8026e6c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
if (group_fp != NULL)
8026e70: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8026e74: 38 21 0d 20 ori r1,r1,0xd20 <== NOT EXECUTED 8026e78: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8026e7c: 44 20 00 02 be r1,r0,8026e84 <endgrent+0x1c> <== NOT EXECUTED
fclose(group_fp);
8026e80: f8 00 74 a4 calli 8044110 <fclose> <== NOT EXECUTED
}
8026e84: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8026e88: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8026e8c: c3 a0 00 00 ret <== NOT EXECUTED
08026e90 <endpwent>: fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) {
8026e90: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8026e94: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
if (passwd_fp != NULL)
8026e98: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8026e9c: 38 21 0c 38 ori r1,r1,0xc38 <== NOT EXECUTED 8026ea0: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8026ea4: 44 20 00 02 be r1,r0,8026eac <endpwent+0x1c> <== NOT EXECUTED
fclose(passwd_fp);
8026ea8: f8 00 74 9a calli 8044110 <fclose> <== NOT EXECUTED
}
8026eac: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8026eb0: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8026eb4: c3 a0 00 00 ret <== NOT EXECUTED
080042b4 <erase>: * 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) {
80042b4: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED 80042b8: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED 80042bc: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED 80042c0: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED 80042c4: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED 80042c8: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED 80042cc: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED 80042d0: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED 80042d4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 80042d8: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if (tty->ccount == 0)
80042dc: 28 21 00 20 lw r1,(r1+32) <== NOT EXECUTED
* FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) {
80042e0: b8 40 70 00 mv r14,r2 <== NOT EXECUTED
if (tty->ccount == 0)
80042e4: 44 20 00 6f be r1,r0,80044a0 <erase+0x1ec> <== NOT EXECUTED
return; if (lineFlag) {
80042e8: 44 40 00 67 be r2,r0,8004484 <erase+0x1d0> <== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
80042ec: 29 6c 00 3c lw r12,(r11+60) <== NOT EXECUTED 80042f0: 21 81 00 08 andi r1,r12,0x8 <== NOT EXECUTED 80042f4: 5c 20 00 03 bne r1,r0,8004300 <erase+0x4c> <== NOT EXECUTED
tty->ccount = 0;
80042f8: 59 61 00 20 sw (r11+32),r1 <== NOT EXECUTED
return;
80042fc: e0 00 00 69 bi 80044a0 <erase+0x1ec> <== NOT EXECUTED
} if (!(tty->termios.c_lflag & ECHOE)) {
8004300: 21 8c 00 10 andi r12,r12,0x10 <== NOT EXECUTED 8004304: 5d 80 00 60 bne r12,r0,8004484 <erase+0x1d0> <== NOT EXECUTED
tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty);
8004308: 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;
800430c: 59 6c 00 20 sw (r11+32),r12 <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
8004310: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004314: fb ff ff bf calli 8004210 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
8004318: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 800431c: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 8004320: 44 2c 00 60 be r1,r12,80044a0 <erase+0x1ec> <== NOT EXECUTED
echo ('\n', tty);
8004324: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004328: 34 01 00 0a mvi r1,10 <== NOT EXECUTED 800432c: e0 00 00 0e bi 8004364 <erase+0xb0> <== NOT EXECUTED
return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount];
8004330: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
8004334: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED
echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount];
8004338: 34 63 ff ff addi r3,r3,-1 <== NOT EXECUTED 800433c: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED 8004340: b4 83 20 00 add r4,r4,r3 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
8004344: 20 22 00 08 andi r2,r1,0x8 <== NOT EXECUTED
echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount];
8004348: 40 8c 00 00 lbu r12,(r4+0) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
800434c: 44 40 00 4c be r2,r0,800447c <erase+0x1c8> <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
8004350: 5d c0 00 07 bne r14,r0,800436c <erase+0xb8> <== NOT EXECUTED 8004354: 20 22 00 10 andi r2,r1,0x10 <== NOT EXECUTED 8004358: 5c 4e 00 05 bne r2,r14,800436c <erase+0xb8> <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
800435c: 41 61 00 43 lbu r1,(r11+67) <== NOT EXECUTED 8004360: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004364: fb ff ff ab calli 8004210 <echo> <== NOT EXECUTED 8004368: e0 00 00 4e bi 80044a0 <erase+0x1ec> <== NOT EXECUTED
} else if (c == '\t') {
800436c: 5d 90 00 22 bne r12,r16,80043f4 <erase+0x140> <== NOT EXECUTED
c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL)
8004370: 20 21 02 00 andi r1,r1,0x200 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column;
8004374: 29 6c 00 2c lw r12,(r11+44) <== NOT EXECUTED
while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) {
8004378: 29 a5 00 00 lw r5,(r13+0) <== NOT EXECUTED 800437c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) {
8004380: e0 00 00 10 bi 80043c0 <erase+0x10c> <== NOT EXECUTED
c = tty->cbuf[i++];
8004384: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED 8004388: b4 82 20 00 add r4,r4,r2 <== NOT EXECUTED 800438c: 40 84 00 00 lbu r4,(r4+0) <== NOT EXECUTED
if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) {
8004390: b4 a4 30 00 add r6,r5,r4 <== NOT EXECUTED
/* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') {
8004394: 5c 90 00 03 bne r4,r16,80043a0 <erase+0xec> <== NOT EXECUTED
col = (col | 7) + 1;
8004398: 39 8c 00 07 ori r12,r12,0x7 <== NOT EXECUTED 800439c: e0 00 00 07 bi 80043b8 <erase+0x104> <== NOT EXECUTED
} else if (iscntrl (c)) {
80043a0: 40 c4 00 01 lbu r4,(r6+1) <== NOT EXECUTED 80043a4: 20 84 00 20 andi r4,r4,0x20 <== NOT EXECUTED 80043a8: 44 80 00 04 be r4,r0,80043b8 <erase+0x104> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
80043ac: 44 20 00 04 be r1,r0,80043bc <erase+0x108> <== NOT EXECUTED
col += 2;
80043b0: 35 8c 00 02 addi r12,r12,2 <== NOT EXECUTED 80043b4: e0 00 00 02 bi 80043bc <erase+0x108> <== NOT EXECUTED
} else { col++;
80043b8: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED
/* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++];
80043bc: 34 42 00 01 addi r2,r2,1 <== NOT EXECUTED
int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) {
80043c0: 5c 43 ff f1 bne r2,r3,8004384 <erase+0xd0> <== NOT EXECUTED 80043c4: e0 00 00 05 bi 80043d8 <erase+0x124> <== NOT EXECUTED
/* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty);
80043c8: fb ff fe dc calli 8003f38 <rtems_termios_puts> <== NOT EXECUTED
tty->column--;
80043cc: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 80043d0: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 80043d4: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
} /* * Back up over the tab */ while (tty->column > col) {
80043d8: 29 64 00 28 lw r4,(r11+40) <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
80043dc: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 80043e0: 38 21 2a 14 ori r1,r1,0x2a14 <== NOT EXECUTED 80043e4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80043e8: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
} /* * Back up over the tab */ while (tty->column > col) {
80043ec: 48 8c ff f7 bg r4,r12,80043c8 <erase+0x114> <== NOT EXECUTED 80043f0: e0 00 00 23 bi 800447c <erase+0x1c8> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
80043f4: 29 a2 00 00 lw r2,(r13+0) <== NOT EXECUTED 80043f8: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED 80043fc: b4 4c 10 00 add r2,r2,r12 <== NOT EXECUTED 8004400: 40 42 00 00 lbu r2,(r2+0) <== NOT EXECUTED 8004404: 20 42 00 20 andi r2,r2,0x20 <== NOT EXECUTED 8004408: 44 40 00 0c be r2,r0,8004438 <erase+0x184> <== NOT EXECUTED 800440c: 20 21 02 00 andi r1,r1,0x200 <== NOT EXECUTED 8004410: 44 20 00 0a be r1,r0,8004438 <erase+0x184> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
8004414: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8004418: 38 21 2a 18 ori r1,r1,0x2a18 <== NOT EXECUTED 800441c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8004420: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8004424: fb ff fe c5 calli 8003f38 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
8004428: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800442c: 44 20 00 03 be r1,r0,8004438 <erase+0x184> <== NOT EXECUTED
tty->column--;
8004430: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 8004434: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
} if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
8004438: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 800443c: b4 2c 60 00 add r12,r1,r12 <== NOT EXECUTED 8004440: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED 8004444: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 8004448: 44 20 00 04 be r1,r0,8004458 <erase+0x1a4> <== NOT EXECUTED 800444c: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 8004450: 20 21 02 00 andi r1,r1,0x200 <== NOT EXECUTED 8004454: 44 20 00 0a be r1,r0,800447c <erase+0x1c8> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
8004458: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 800445c: 38 21 2a 18 ori r1,r1,0x2a18 <== NOT EXECUTED 8004460: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8004464: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8004468: fb ff fe b4 calli 8003f38 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
800446c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004470: 44 20 00 03 be r1,r0,800447c <erase+0x1c8> <== NOT EXECUTED
tty->column--;
8004474: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 8004478: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
} } } if (!lineFlag)
800447c: 5d c0 00 07 bne r14,r0,8004498 <erase+0x1e4> <== NOT EXECUTED 8004480: e0 00 00 08 bi 80044a0 <erase+0x1ec> <== NOT EXECUTED 8004484: 78 0d 08 02 mvhi r13,0x802 <== NOT EXECUTED 8004488: 39 ad 53 0c ori r13,r13,0x530c <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') {
800448c: 34 10 00 09 mvi r16,9 <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty);
8004490: 78 0f 08 02 mvhi r15,0x802 <== NOT EXECUTED
/* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty);
8004494: 78 11 08 02 mvhi r17,0x802 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) {
8004498: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED 800449c: 5c 60 ff a5 bne r3,r0,8004330 <erase+0x7c> <== NOT EXECUTED
} } if (!lineFlag) break; } }
80044a0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80044a4: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED 80044a8: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED 80044ac: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED 80044b0: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED 80044b4: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED 80044b8: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED 80044bc: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED 80044c0: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED 80044c4: c3 a0 00 00 ret <== NOT EXECUTED
0803c658 <fchdir>: #include <rtems/seterr.h> int fchdir( int fd ) {
803c658: 37 9c ff c0 addi sp,sp,-64 <== NOT EXECUTED 803c65c: 5b 8b 00 18 sw (sp+24),r11 <== NOT EXECUTED 803c660: 5b 8c 00 14 sw (sp+20),r12 <== NOT EXECUTED 803c664: 5b 8d 00 10 sw (sp+16),r13 <== NOT EXECUTED 803c668: 5b 8e 00 0c sw (sp+12),r14 <== NOT EXECUTED 803c66c: 5b 8f 00 08 sw (sp+8),r15 <== NOT EXECUTED 803c670: 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 );
803c674: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 803c678: 38 42 d0 10 ori r2,r2,0xd010 <== NOT EXECUTED 803c67c: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 803c680: 54 41 00 02 bgu r2,r1,803c688 <fchdir+0x30> <== NOT EXECUTED 803c684: e0 00 00 0e bi 803c6bc <fchdir+0x64> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
803c688: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 803c68c: fb ff 12 ab calli 8001138 <__ashlsi3> <== NOT EXECUTED 803c690: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 803c694: 78 0b 08 07 mvhi r11,0x807 <== NOT EXECUTED 803c698: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 803c69c: 39 6b 0f 10 ori r11,r11,0xf10 <== NOT EXECUTED 803c6a0: fb ff 12 a6 calli 8001138 <__ashlsi3> <== NOT EXECUTED 803c6a4: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 803c6a8: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 803c6ac: b4 41 10 00 add r2,r2,r1 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
803c6b0: 28 41 00 18 lw r1,(r2+24) <== NOT EXECUTED 803c6b4: 20 23 01 00 andi r3,r1,0x100 <== NOT EXECUTED 803c6b8: 5c 60 00 04 bne r3,r0,803c6c8 <fchdir+0x70> <== NOT EXECUTED 803c6bc: f8 00 1e 33 calli 8043f88 <__errno> <== NOT EXECUTED 803c6c0: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 803c6c4: e0 00 00 15 bi 803c718 <fchdir+0xc0> <== NOT EXECUTED
/* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
803c6c8: 20 21 00 02 andi r1,r1,0x2 <== NOT EXECUTED 803c6cc: 5c 20 00 04 bne r1,r0,803c6dc <fchdir+0x84> <== NOT EXECUTED 803c6d0: f8 00 1e 2e calli 8043f88 <__errno> <== NOT EXECUTED 803c6d4: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 803c6d8: e0 00 00 10 bi 803c718 <fchdir+0xc0> <== NOT EXECUTED
/* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) {
803c6dc: 28 41 00 28 lw r1,(r2+40) <== NOT EXECUTED 803c6e0: 44 20 00 03 be r1,r0,803c6ec <fchdir+0x94> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) {
803c6e4: 28 23 00 10 lw r3,(r1+16) <== NOT EXECUTED 803c6e8: 5c 60 00 04 bne r3,r0,803c6f8 <fchdir+0xa0> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
803c6ec: f8 00 1e 27 calli 8043f88 <__errno> <== NOT EXECUTED 803c6f0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 803c6f4: e0 00 00 09 bi 803c718 <fchdir+0xc0> <== NOT EXECUTED
} if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
803c6f8: 34 4e 00 1c addi r14,r2,28 <== NOT EXECUTED 803c6fc: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 803c700: d8 60 00 00 call r3 <== NOT EXECUTED 803c704: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 803c708: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 803c70c: 45 a1 00 05 be r13,r1,803c720 <fchdir+0xc8> <== NOT EXECUTED
RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR );
803c710: f8 00 1e 1e calli 8043f88 <__errno> <== NOT EXECUTED 803c714: 34 02 00 14 mvi r2,20 <== NOT EXECUTED 803c718: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 803c71c: e0 00 00 1b bi 803c788 <fchdir+0x130> <== NOT EXECUTED
* but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current;
803c720: 78 0b 08 06 mvhi r11,0x806 <== NOT EXECUTED 803c724: 39 6b d2 f0 ori r11,r11,0xd2f0 <== NOT EXECUTED 803c728: 29 6f 00 00 lw r15,(r11+0) <== NOT EXECUTED 803c72c: 37 8c 00 1c addi r12,sp,28 <== NOT EXECUTED 803c730: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 803c734: 35 ef 00 04 addi r15,r15,4 <== NOT EXECUTED 803c738: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 803c73c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 803c740: f8 00 2c b5 calli 8047a14 <memcpy> <== NOT EXECUTED
rtems_filesystem_current = iop->pathinfo;
803c744: b9 c0 10 00 mv r2,r14 <== NOT EXECUTED 803c748: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 803c74c: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 803c750: f8 00 2c b1 calli 8047a14 <memcpy> <== NOT EXECUTED
/* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
803c754: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 803c758: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 803c75c: 38 21 29 14 ori r1,r1,0x2914 <== NOT EXECUTED 803c760: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 803c764: 37 84 00 30 addi r4,sp,48 <== NOT EXECUTED 803c768: b8 60 28 00 mv r5,r3 <== NOT EXECUTED 803c76c: fb ff 26 aa calli 8006214 <rtems_filesystem_evaluate_path> <== NOT EXECUTED 803c770: 44 20 00 08 be r1,r0,803c790 <fchdir+0x138> <== NOT EXECUTED
/* cloning failed; restore original and bail out */ rtems_filesystem_current = saved;
803c774: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 803c778: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 803c77c: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 803c780: 34 21 00 04 addi r1,r1,4 <== NOT EXECUTED 803c784: f8 00 2c a4 calli 8047a14 <memcpy> <== NOT EXECUTED 803c788: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
return -1;
803c78c: e0 00 00 0f bi 803c7c8 <fchdir+0x170> <== NOT EXECUTED
} /* release the old one */ rtems_filesystem_freenode( &saved );
803c790: 2b 82 00 28 lw r2,(sp+40) <== NOT EXECUTED 803c794: 44 41 00 05 be r2,r1,803c7a8 <fchdir+0x150> <== NOT EXECUTED 803c798: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 803c79c: 44 40 00 03 be r2,r0,803c7a8 <fchdir+0x150> <== NOT EXECUTED 803c7a0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 803c7a4: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_filesystem_current = loc;
803c7a8: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 803c7ac: 38 21 d2 f0 ori r1,r1,0xd2f0 <== NOT EXECUTED 803c7b0: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 803c7b4: 37 82 00 30 addi r2,sp,48 <== NOT EXECUTED 803c7b8: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 803c7bc: 34 21 00 04 addi r1,r1,4 <== NOT EXECUTED 803c7c0: f8 00 2c 95 calli 8047a14 <memcpy> <== NOT EXECUTED 803c7c4: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return 0; }
803c7c8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 803c7cc: 2b 8b 00 18 lw r11,(sp+24) <== NOT EXECUTED 803c7d0: 2b 8c 00 14 lw r12,(sp+20) <== NOT EXECUTED 803c7d4: 2b 8d 00 10 lw r13,(sp+16) <== NOT EXECUTED 803c7d8: 2b 8e 00 0c lw r14,(sp+12) <== NOT EXECUTED 803c7dc: 2b 8f 00 08 lw r15,(sp+8) <== NOT EXECUTED 803c7e0: 37 9c 00 40 addi sp,sp,64 <== NOT EXECUTED 803c7e4: c3 a0 00 00 ret <== NOT EXECUTED
08026994 <fchmod>: int fchmod( int fd, mode_t mode ) {
8026994: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8026998: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 802699c: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 80269a0: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 80269a4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
rtems_libio_t *iop; rtems_libio_check_fd( fd );
80269a8: 78 03 08 06 mvhi r3,0x806 <== NOT EXECUTED 80269ac: 38 63 d0 10 ori r3,r3,0xd010 <== NOT EXECUTED 80269b0: 28 63 00 00 lw r3,(r3+0) <== NOT EXECUTED
int fchmod( int fd, mode_t mode ) {
80269b4: b8 40 60 00 mv r12,r2 <== NOT EXECUTED
rtems_libio_t *iop; rtems_libio_check_fd( fd );
80269b8: 54 61 00 02 bgu r3,r1,80269c0 <fchmod+0x2c> <== NOT EXECUTED 80269bc: e0 00 00 0e bi 80269f4 <fchmod+0x60> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
80269c0: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 80269c4: fb ff 69 dd calli 8001138 <__ashlsi3> <== NOT EXECUTED 80269c8: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 80269cc: 78 0b 08 07 mvhi r11,0x807 <== NOT EXECUTED 80269d0: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 80269d4: 39 6b 0f 10 ori r11,r11,0xf10 <== NOT EXECUTED 80269d8: fb ff 69 d8 calli 8001138 <__ashlsi3> <== NOT EXECUTED 80269dc: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 80269e0: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED 80269e4: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
80269e8: 28 23 00 18 lw r3,(r1+24) <== NOT EXECUTED 80269ec: 20 62 01 00 andi r2,r3,0x100 <== NOT EXECUTED 80269f0: 5c 40 00 04 bne r2,r0,8026a00 <fchmod+0x6c> <== NOT EXECUTED 80269f4: f8 00 75 65 calli 8043f88 <__errno> <== NOT EXECUTED 80269f8: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 80269fc: e0 00 00 0b bi 8026a28 <fchmod+0x94> <== NOT EXECUTED
/* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
8026a00: 20 63 00 04 andi r3,r3,0x4 <== NOT EXECUTED 8026a04: 5c 60 00 04 bne r3,r0,8026a14 <fchmod+0x80> <== NOT EXECUTED 8026a08: f8 00 75 60 calli 8043f88 <__errno> <== NOT EXECUTED 8026a0c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8026a10: e0 00 00 06 bi 8026a28 <fchmod+0x94> <== NOT EXECUTED
if ( !iop->handlers->fchmod_h )
8026a14: 28 22 00 40 lw r2,(r1+64) <== NOT EXECUTED 8026a18: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8026a1c: 5c 40 00 06 bne r2,r0,8026a34 <fchmod+0xa0> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8026a20: f8 00 75 5a calli 8043f88 <__errno> <== NOT EXECUTED 8026a24: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8026a28: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8026a2c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8026a30: e0 00 00 06 bi 8026a48 <fchmod+0xb4> <== NOT EXECUTED
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
8026a34: 28 23 00 24 lw r3,(r1+36) <== NOT EXECUTED 8026a38: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8026a3c: 34 21 00 1c addi r1,r1,28 <== NOT EXECUTED 8026a40: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED 8026a44: d8 60 00 00 call r3 <== NOT EXECUTED
}
8026a48: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8026a4c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8026a50: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8026a54: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8026a58: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8026a5c: c3 a0 00 00 ret <== NOT EXECUTED
08026a60 <fchown>: int fchown( int fd, uid_t owner, gid_t group ) {
8026a60: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 8026a64: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED 8026a68: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED 8026a6c: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED 8026a70: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED 8026a74: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
rtems_libio_t *iop; rtems_libio_check_fd( fd );
8026a78: 78 04 08 06 mvhi r4,0x806 <== NOT EXECUTED 8026a7c: 38 84 d0 10 ori r4,r4,0xd010 <== NOT EXECUTED 8026a80: 28 84 00 00 lw r4,(r4+0) <== NOT EXECUTED
int fchown( int fd, uid_t owner, gid_t group ) {
8026a84: 20 4d ff ff andi r13,r2,0xffff <== NOT EXECUTED 8026a88: 20 6c ff ff andi r12,r3,0xffff <== NOT EXECUTED
rtems_libio_t *iop; rtems_libio_check_fd( fd );
8026a8c: 54 81 00 02 bgu r4,r1,8026a94 <fchown+0x34> <== NOT EXECUTED 8026a90: e0 00 00 0e bi 8026ac8 <fchown+0x68> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
8026a94: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8026a98: fb ff 69 a8 calli 8001138 <__ashlsi3> <== NOT EXECUTED 8026a9c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8026aa0: 78 0b 08 07 mvhi r11,0x807 <== NOT EXECUTED 8026aa4: b8 20 70 00 mv r14,r1 <== NOT EXECUTED 8026aa8: 39 6b 0f 10 ori r11,r11,0xf10 <== NOT EXECUTED 8026aac: fb ff 69 a3 calli 8001138 <__ashlsi3> <== NOT EXECUTED 8026ab0: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8026ab4: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8026ab8: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
8026abc: 28 24 00 18 lw r4,(r1+24) <== NOT EXECUTED 8026ac0: 20 82 01 00 andi r2,r4,0x100 <== NOT EXECUTED 8026ac4: 5c 40 00 04 bne r2,r0,8026ad4 <fchown+0x74> <== NOT EXECUTED 8026ac8: f8 00 75 30 calli 8043f88 <__errno> <== NOT EXECUTED 8026acc: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8026ad0: e0 00 00 0b bi 8026afc <fchown+0x9c> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
8026ad4: 20 84 00 04 andi r4,r4,0x4 <== NOT EXECUTED 8026ad8: 5c 80 00 04 bne r4,r0,8026ae8 <fchown+0x88> <== NOT EXECUTED 8026adc: f8 00 75 2b calli 8043f88 <__errno> <== NOT EXECUTED 8026ae0: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8026ae4: e0 00 00 06 bi 8026afc <fchown+0x9c> <== NOT EXECUTED
if ( !iop->pathinfo.ops->chown_h )
8026ae8: 28 22 00 28 lw r2,(r1+40) <== NOT EXECUTED 8026aec: 28 44 00 18 lw r4,(r2+24) <== NOT EXECUTED 8026af0: 5c 80 00 06 bne r4,r0,8026b08 <fchown+0xa8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8026af4: f8 00 75 25 calli 8043f88 <__errno> <== NOT EXECUTED 8026af8: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8026afc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8026b00: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8026b04: e0 00 00 05 bi 8026b18 <fchown+0xb8> <== NOT EXECUTED
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
8026b08: 34 21 00 1c addi r1,r1,28 <== NOT EXECUTED 8026b0c: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8026b10: b9 80 18 00 mv r3,r12 <== NOT EXECUTED 8026b14: d8 80 00 00 call r4 <== NOT EXECUTED
}
8026b18: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8026b1c: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED 8026b20: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED 8026b24: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED 8026b28: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED 8026b2c: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 8026b30: c3 a0 00 00 ret <== NOT EXECUTED
0803c7e8 <fcntl>: int fcntl( int fd, int cmd, ... ) {
803c7e8: 37 9c ff c4 addi sp,sp,-60 803c7ec: 5b 8b 00 20 sw (sp+32),r11 803c7f0: 5b 8c 00 1c sw (sp+28),r12 803c7f4: 5b 8d 00 18 sw (sp+24),r13 803c7f8: 5b 8e 00 14 sw (sp+20),r14 803c7fc: 5b 8f 00 10 sw (sp+16),r15 803c800: 5b 90 00 0c sw (sp+12),r16 803c804: 5b 91 00 08 sw (sp+8),r17 803c808: 5b 9d 00 04 sw (sp+4),ra
int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd );
803c80c: 78 09 08 06 mvhi r9,0x806 803c810: 39 29 d0 10 ori r9,r9,0xd010 803c814: 29 2d 00 00 lw r13,(r9+0)
int fcntl( int fd, int cmd, ... ) {
803c818: 5b 83 00 28 sw (sp+40),r3 803c81c: 5b 84 00 2c sw (sp+44),r4 803c820: 5b 85 00 30 sw (sp+48),r5 803c824: 5b 86 00 34 sw (sp+52),r6 803c828: 5b 87 00 38 sw (sp+56),r7 803c82c: 5b 88 00 3c sw (sp+60),r8 803c830: 5b 82 00 24 sw (sp+36),r2 803c834: b8 40 78 00 mv r15,r2
#include <sys/types.h> #include <sys/stat.h> /* 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, ...));
803c838: 37 8b 00 28 addi r11,sp,40
int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd );
803c83c: 55 a1 00 02 bgu r13,r1,803c844 <fcntl+0x5c> <== ALWAYS TAKEN
803c840: e0 00 00 0e bi 803c878 <fcntl+0x90> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
803c844: 78 03 08 07 mvhi r3,0x807 803c848: 38 63 0f 10 ori r3,r3,0xf10 803c84c: 34 02 00 03 mvi r2,3 803c850: 28 71 00 00 lw r17,(r3+0) 803c854: fb ff 12 39 calli 8001138 <__ashlsi3> 803c858: 34 02 00 03 mvi r2,3 803c85c: b8 20 60 00 mv r12,r1 803c860: fb ff 12 36 calli 8001138 <__ashlsi3> 803c864: b5 81 08 00 add r1,r12,r1 803c868: b6 21 60 00 add r12,r17,r1
rtems_libio_check_is_open(iop);
803c86c: 29 8e 00 18 lw r14,(r12+24) 803c870: 21 c1 01 00 andi r1,r14,0x100
803c874: 5c 20 00 04 bne r1,r0,803c884 <fcntl+0x9c> <== ALWAYS TAKEN
803c878: f8 00 1d c4 calli 8043f88 <__errno> <== NOT EXECUTED 803c87c: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 803c880: e0 00 00 54 bi 803c9d0 <fcntl+0x1e8> <== NOT EXECUTED
/* * This switch should contain all the cases from POSIX. */ switch ( cmd ) {
803c884: 34 01 00 09 mvi r1,9
803c888: 55 e1 00 50 bgu r15,r1,803c9c8 <fcntl+0x1e0>
803c88c: 78 10 08 06 mvhi r16,0x806 803c890: b9 e0 08 00 mv r1,r15 803c894: 34 02 00 02 mvi r2,2 803c898: fb ff 12 28 calli 8001138 <__ashlsi3> 803c89c: 3a 10 9f b4 ori r16,r16,0x9fb4 803c8a0: b6 01 08 00 add r1,r16,r1 803c8a4: 28 21 00 00 lw r1,(r1+0) 803c8a8: c0 20 00 00 b r1
case F_DUPFD: /* dup */ fd2 = va_arg( ap, int );
803c8ac: 29 6e 00 00 lw r14,(r11+0)
if ( fd2 )
803c8b0: 45 c0 00 0d be r14,r0,803c8e4 <fcntl+0xfc> <== ALWAYS TAKEN
diop = rtems_libio_iop( fd2 );
803c8b4: 55 ae 00 03 bgu r13,r14,803c8c0 <fcntl+0xd8> <== NOT EXECUTED 803c8b8: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED 803c8bc: e0 00 00 0e bi 803c8f4 <fcntl+0x10c> <== NOT EXECUTED 803c8c0: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 803c8c4: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 803c8c8: fb ff 12 1c calli 8001138 <__ashlsi3> <== NOT EXECUTED 803c8cc: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 803c8d0: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 803c8d4: fb ff 12 19 calli 8001138 <__ashlsi3> <== NOT EXECUTED 803c8d8: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED 803c8dc: b6 21 68 00 add r13,r17,r1 <== NOT EXECUTED 803c8e0: e0 00 00 05 bi 803c8f4 <fcntl+0x10c> <== NOT EXECUTED
else { /* allocate a file control block */ diop = rtems_libio_allocate();
803c8e4: fb ff 27 a4 calli 8006774 <rtems_libio_allocate> 803c8e8: b8 20 68 00 mv r13,r1
if ( diop == 0 ) {
803c8ec: 34 0b ff ff mvi r11,-1
803c8f0: 44 2e 00 45 be r1,r14,803ca04 <fcntl+0x21c> <== NEVER TAKEN
ret = -1; break; } } diop->handlers = iop->handlers;
803c8f4: 29 81 00 40 lw r1,(r12+64)
diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo;
803c8f8: 34 03 00 14 mvi r3,20 803c8fc: 35 82 00 1c addi r2,r12,28
ret = -1; break; } } diop->handlers = iop->handlers;
803c900: 59 a1 00 40 sw (r13+64),r1
diop->file_info = iop->file_info;
803c904: 29 81 00 3c lw r1,(r12+60) 803c908: 59 a1 00 3c sw (r13+60),r1
diop->flags = iop->flags;
803c90c: 29 81 00 18 lw r1,(r12+24) 803c910: 59 a1 00 18 sw (r13+24),r1
diop->pathinfo = iop->pathinfo;
803c914: 35 a1 00 1c addi r1,r13,28 803c918: f8 00 2c 3f calli 8047a14 <memcpy>
ret = (int) (diop - rtems_libio_iops);
803c91c: 78 01 08 07 mvhi r1,0x807 803c920: 38 21 0f 10 ori r1,r1,0xf10 803c924: 28 21 00 00 lw r1,(r1+0) 803c928: 34 02 00 03 mvi r2,3 803c92c: c9 a1 08 00 sub r1,r13,r1 803c930: fb ff 12 52 calli 8001278 <__ashrsi3> 803c934: 78 02 38 e3 mvhi r2,0x38e3 803c938: 38 42 8e 39 ori r2,r2,0x8e39 803c93c: fb ff 1b 12 calli 8003584 <__mulsi3> 803c940: e0 00 00 12 bi 803c988 <fcntl+0x1a0>
break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
803c944: b9 c0 08 00 mv r1,r14 803c948: 34 02 00 0b mvi r2,11 803c94c: fb ff 12 23 calli 80011d8 <__lshrsi3> 803c950: 20 2b 00 01 andi r11,r1,0x1 803c954: e0 00 00 21 bi 803c9d8 <fcntl+0x1f0>
* 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 ) )
803c958: 29 6b 00 00 lw r11,(r11+0)
803c95c: 45 60 00 05 be r11,r0,803c970 <fcntl+0x188> <== NEVER TAKEN
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
803c960: 39 ce 08 00 ori r14,r14,0x800 803c964: 59 8e 00 18 sw (r12+24),r14 803c968: 34 0b 00 00 mvi r11,0 803c96c: e0 00 00 1b bi 803c9d8 <fcntl+0x1f0>
else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
803c970: 34 01 f7 ff mvi r1,-2049 <== NOT EXECUTED 803c974: a1 c1 70 00 and r14,r14,r1 <== NOT EXECUTED 803c978: 59 8e 00 18 sw (r12+24),r14 <== NOT EXECUTED 803c97c: e0 00 00 17 bi 803c9d8 <fcntl+0x1f0> <== NOT EXECUTED
break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags );
803c980: b9 c0 08 00 mv r1,r14 803c984: fb ff 26 f6 calli 800655c <rtems_libio_to_fcntl_flags> 803c988: b8 20 58 00 mv r11,r1
/* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) {
803c98c: 48 01 00 1e bg r0,r1,803ca04 <fcntl+0x21c> <== NEVER TAKEN
803c990: e0 00 00 12 bi 803c9d8 <fcntl+0x1f0>
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 ) );
803c994: 29 61 00 00 lw r1,(r11+0)
/* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask);
803c998: 34 0b 00 00 mvi r11,0
case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
803c99c: fb ff 27 af calli 8006858 <rtems_libio_fcntl_flags>
/* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask);
803c9a0: 29 83 00 18 lw r3,(r12+24) 803c9a4: 34 02 fd fe mvi r2,-514 803c9a8: 20 21 02 01 andi r1,r1,0x201 803c9ac: a0 62 10 00 and r2,r3,r2 803c9b0: b8 22 08 00 or r1,r1,r2 803c9b4: 59 81 00 18 sw (r12+24),r1 803c9b8: e0 00 00 08 bi 803c9d8 <fcntl+0x1f0>
errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP;
803c9bc: f8 00 1d 73 calli 8043f88 <__errno> 803c9c0: 34 02 00 86 mvi r2,134 803c9c4: e0 00 00 03 bi 803c9d0 <fcntl+0x1e8>
ret = -1; break; default: errno = EINVAL;
803c9c8: f8 00 1d 70 calli 8043f88 <__errno> 803c9cc: 34 02 00 16 mvi r2,22 803c9d0: 58 22 00 00 sw (r1+0),r2 803c9d4: e0 00 00 0b bi 803ca00 <fcntl+0x218>
* 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) {
803c9d8: 29 81 00 40 lw r1,(r12+64) 803c9dc: 28 23 00 30 lw r3,(r1+48)
803c9e0: 44 60 00 09 be r3,r0,803ca04 <fcntl+0x21c> <== NEVER TAKEN
int err = (*iop->handlers->fcntl_h)( cmd, iop );
803c9e4: b9 80 10 00 mv r2,r12 803c9e8: b9 e0 08 00 mv r1,r15 803c9ec: d8 60 00 00 call r3 803c9f0: b8 20 60 00 mv r12,r1
if (err) {
803c9f4: 44 20 00 04 be r1,r0,803ca04 <fcntl+0x21c> <== ALWAYS TAKEN
errno = err;
803c9f8: f8 00 1d 64 calli 8043f88 <__errno> <== NOT EXECUTED 803c9fc: 58 2c 00 00 sw (r1+0),r12 <== NOT EXECUTED
803ca00: 34 0b ff ff mvi r11,-1
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
803ca04: b9 60 08 00 mv r1,r11 803ca08: 2b 9d 00 04 lw ra,(sp+4) 803ca0c: 2b 8b 00 20 lw r11,(sp+32) 803ca10: 2b 8c 00 1c lw r12,(sp+28) 803ca14: 2b 8d 00 18 lw r13,(sp+24) 803ca18: 2b 8e 00 14 lw r14,(sp+20) 803ca1c: 2b 8f 00 10 lw r15,(sp+16) 803ca20: 2b 90 00 0c lw r16,(sp+12) 803ca24: 2b 91 00 08 lw r17,(sp+8) 803ca28: 37 9c 00 3c addi sp,sp,60 803ca2c: c3 a0 00 00 ret
08002334 <fdatasync>: #include <rtems/seterr.h> int fdatasync( int fd ) {
8002334: 37 9c ff f4 addi sp,sp,-12 8002338: 5b 8b 00 0c sw (sp+12),r11 800233c: 5b 8c 00 08 sw (sp+8),r12 8002340: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_t *iop; rtems_libio_check_fd( fd );
8002344: 78 02 08 02 mvhi r2,0x802 8002348: 38 42 10 10 ori r2,r2,0x1010 800234c: 28 42 00 00 lw r2,(r2+0)
8002350: 54 41 00 02 bgu r2,r1,8002358 <fdatasync+0x24>
8002354: e0 00 00 0e bi 800238c <fdatasync+0x58>
iop = rtems_libio_iop( fd );
8002358: 34 02 00 03 mvi r2,3 800235c: fb ff fa 0a calli 8000b84 <__ashlsi3> 8002360: 34 02 00 03 mvi r2,3 8002364: 78 0b 08 02 mvhi r11,0x802 8002368: b8 20 60 00 mv r12,r1 800236c: 39 6b 17 24 ori r11,r11,0x1724 8002370: fb ff fa 05 calli 8000b84 <__ashlsi3> 8002374: 29 62 00 00 lw r2,(r11+0) 8002378: b5 81 08 00 add r1,r12,r1 800237c: b4 41 08 00 add r1,r2,r1
rtems_libio_check_is_open(iop);
8002380: 28 22 00 18 lw r2,(r1+24) 8002384: 20 43 01 00 andi r3,r2,0x100
8002388: 5c 60 00 04 bne r3,r0,8002398 <fdatasync+0x64> <== ALWAYS TAKEN
800238c: f8 00 33 f0 calli 800f34c <__errno> 8002390: 34 02 00 09 mvi r2,9 8002394: e0 00 00 0b bi 80023c0 <fdatasync+0x8c>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
8002398: 20 42 00 04 andi r2,r2,0x4
800239c: 5c 40 00 04 bne r2,r0,80023ac <fdatasync+0x78>
80023a0: f8 00 33 eb calli 800f34c <__errno> 80023a4: 34 02 00 16 mvi r2,22 80023a8: e0 00 00 06 bi 80023c0 <fdatasync+0x8c>
/* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h )
80023ac: 28 22 00 40 lw r2,(r1+64) 80023b0: 28 42 00 2c lw r2,(r2+44)
80023b4: 5c 40 00 06 bne r2,r0,80023cc <fdatasync+0x98> rtems_set_errno_and_return_minus_one( ENOTSUP );
80023b8: f8 00 33 e5 calli 800f34c <__errno> 80023bc: 34 02 00 86 mvi r2,134 80023c0: 58 22 00 00 sw (r1+0),r2 80023c4: 34 01 ff ff mvi r1,-1 80023c8: e0 00 00 02 bi 80023d0 <fdatasync+0x9c>
return (*iop->handlers->fdatasync_h)( iop );
80023cc: d8 40 00 00 call r2
}
80023d0: 2b 9d 00 04 lw ra,(sp+4) 80023d4: 2b 8b 00 0c lw r11,(sp+12) 80023d8: 2b 8c 00 08 lw r12,(sp+8) 80023dc: 37 9c 00 0c addi sp,sp,12 80023e0: c3 a0 00 00 ret
0800a344 <fifo_open>: */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) {
800a344: 37 9c ff d8 addi sp,sp,-40 800a348: 5b 8b 00 20 sw (sp+32),r11 800a34c: 5b 8c 00 1c sw (sp+28),r12 800a350: 5b 8d 00 18 sw (sp+24),r13 800a354: 5b 8e 00 14 sw (sp+20),r14 800a358: 5b 8f 00 10 sw (sp+16),r15 800a35c: 5b 90 00 0c sw (sp+12),r16 800a360: 5b 91 00 08 sw (sp+8),r17 800a364: 5b 9d 00 04 sw (sp+4),ra
) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore,
800a368: 78 03 08 01 mvhi r3,0x801 800a36c: 38 63 d6 a8 ori r3,r3,0xd6a8
*/ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) {
800a370: b8 20 70 00 mv r14,r1
) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore,
800a374: 28 61 00 00 lw r1,(r3+0)
*/ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) {
800a378: b8 40 78 00 mv r15,r2
) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore,
800a37c: 34 02 00 00 mvi r2,0 800a380: b8 40 18 00 mv r3,r2 800a384: fb ff f8 18 calli 80083e4 <rtems_semaphore_obtain> 800a388: b8 20 80 00 mv r16,r1 800a38c: 34 0c ff fc mvi r12,-4
800a390: 5c 20 00 d1 bne r1,r0,800a6d4 <fifo_open+0x390> <== ALWAYS TAKEN
RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep;
800a394: 29 cb 00 00 lw r11,(r14+0) <== NOT EXECUTED
if (pipe == NULL) {
800a398: 5d 61 00 57 bne r11,r1,800a4f4 <fifo_open+0x1b0> <== NOT EXECUTED
{ static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t));
800a39c: 34 01 00 34 mvi r1,52 <== NOT EXECUTED 800a3a0: fb ff f4 f9 calli 8007784 <malloc> <== NOT EXECUTED 800a3a4: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 800a3a8: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if (pipe == NULL)
800a3ac: 34 0c ff f4 mvi r12,-12 <== NOT EXECUTED 800a3b0: 44 20 00 5f be r1,r0,800a52c <fifo_open+0x1e8> <== NOT EXECUTED
return err; memset(pipe, 0, sizeof(pipe_control_t));
800a3b4: ba 00 10 00 mv r2,r16 <== NOT EXECUTED 800a3b8: 34 03 00 34 mvi r3,52 <== NOT EXECUTED 800a3bc: f8 00 0b 64 calli 800d14c <memset> <== NOT EXECUTED
pipe->Size = PIPE_BUF;
800a3c0: 34 02 02 00 mvi r2,512 <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
800a3c4: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF;
800a3c8: 59 a2 00 04 sw (r13+4),r2 <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
800a3cc: fb ff f4 ee calli 8007784 <malloc> <== NOT EXECUTED 800a3d0: 59 a1 00 00 sw (r13+0),r1 <== NOT EXECUTED
if (! pipe->Buffer)
800a3d4: 44 20 00 45 be r1,r0,800a4e8 <fifo_open+0x1a4> <== NOT EXECUTED
goto err_buf; err = -EINTR; if (rtems_barrier_create(
800a3d8: 78 0c 08 01 mvhi r12,0x801 <== NOT EXECUTED 800a3dc: 39 8c d1 9c ori r12,r12,0xd19c <== NOT EXECUTED 800a3e0: 41 83 00 00 lbu r3,(r12+0) <== NOT EXECUTED 800a3e4: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED 800a3e8: 38 21 72 00 ori r1,r1,0x7200 <== NOT EXECUTED 800a3ec: ba 00 10 00 mv r2,r16 <== NOT EXECUTED 800a3f0: b8 61 08 00 or r1,r3,r1 <== NOT EXECUTED 800a3f4: 35 a4 00 2c addi r4,r13,44 <== NOT EXECUTED 800a3f8: ba 00 18 00 mv r3,r16 <== NOT EXECUTED 800a3fc: f8 00 02 ed calli 800afb0 <rtems_barrier_create> <== NOT EXECUTED 800a400: b8 20 80 00 mv r16,r1 <== NOT EXECUTED 800a404: 5c 20 00 36 bne r1,r0,800a4dc <fifo_open+0x198> <== 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(
800a408: 41 82 00 00 lbu r2,(r12+0) <== NOT EXECUTED 800a40c: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED 800a410: 38 21 77 00 ori r1,r1,0x7700 <== NOT EXECUTED 800a414: b8 41 08 00 or r1,r2,r1 <== NOT EXECUTED 800a418: ba 00 18 00 mv r3,r16 <== NOT EXECUTED 800a41c: ba 00 10 00 mv r2,r16 <== NOT EXECUTED 800a420: 35 a4 00 30 addi r4,r13,48 <== NOT EXECUTED 800a424: f8 00 02 e3 calli 800afb0 <rtems_barrier_create> <== NOT EXECUTED 800a428: b8 20 88 00 mv r17,r1 <== NOT EXECUTED 800a42c: 5c 30 00 2a bne r1,r16,800a4d4 <fifo_open+0x190> <== 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(
800a430: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED 800a434: 78 02 50 49 mvhi r2,0x5049 <== NOT EXECUTED 800a438: 38 42 73 00 ori r2,r2,0x7300 <== NOT EXECUTED 800a43c: b8 22 08 00 or r1,r1,r2 <== NOT EXECUTED 800a440: 34 03 00 10 mvi r3,16 <== NOT EXECUTED 800a444: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800a448: ba 20 20 00 mv r4,r17 <== NOT EXECUTED 800a44c: 35 a5 00 28 addi r5,r13,40 <== NOT EXECUTED 800a450: fb ff de c0 calli 8001f50 <rtems_semaphore_create> <== NOT EXECUTED 800a454: 5c 31 00 1e bne r1,r17,800a4cc <fifo_open+0x188> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *)
800a458: 29 a2 00 2c lw r2,(r13+44) <== NOT EXECUTED 800a45c: 37 90 00 24 addi r16,sp,36 <== NOT EXECUTED 800a460: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800a464: ba 00 18 00 mv r3,r16 <== NOT EXECUTED 800a468: 38 21 e1 98 ori r1,r1,0xe198 <== NOT EXECUTED 800a46c: fb ff fb 9e calli 80092e4 <_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
800a470: 28 22 00 4c lw r2,(r1+76) <== NOT EXECUTED 800a474: 78 0d 10 00 mvhi r13,0x1000 <== NOT EXECUTED 800a478: 39 ad 00 00 ori r13,r13,0x0 <== NOT EXECUTED 800a47c: b8 4d 10 00 or r2,r2,r13 <== NOT EXECUTED 800a480: 58 22 00 4c sw (r1+76),r2 <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch();
800a484: fb ff e7 9c calli 80042f4 <_Thread_Enable_dispatch> <== NOT EXECUTED 800a488: 29 62 00 30 lw r2,(r11+48) <== NOT EXECUTED 800a48c: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800a490: ba 00 18 00 mv r3,r16 <== NOT EXECUTED 800a494: 38 21 e1 98 ori r1,r1,0xe198 <== NOT EXECUTED 800a498: fb ff fb 93 calli 80092e4 <_Objects_Get> <== NOT EXECUTED
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
800a49c: 28 22 00 4c lw r2,(r1+76) <== NOT EXECUTED 800a4a0: b8 4d 68 00 or r13,r2,r13 <== NOT EXECUTED 800a4a4: 58 2d 00 4c sw (r1+76),r13 <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch();
800a4a8: fb ff e7 93 calli 80042f4 <_Thread_Enable_dispatch> <== NOT EXECUTED
#ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z')
800a4ac: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED 800a4b0: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED 800a4b4: 31 82 00 00 sb (r12+0),r2 <== NOT EXECUTED 800a4b8: 34 02 00 7a mvi r2,122 <== NOT EXECUTED 800a4bc: 5c 22 00 0e bne r1,r2,800a4f4 <fifo_open+0x1b0> <== NOT EXECUTED
c = 'a';
800a4c0: 34 01 00 61 mvi r1,97 <== NOT EXECUTED 800a4c4: 31 81 00 00 sb (r12+0),r1 <== NOT EXECUTED 800a4c8: e0 00 00 0b bi 800a4f4 <fifo_open+0x1b0> <== NOT EXECUTED
return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier);
800a4cc: 29 a1 00 30 lw r1,(r13+48) <== NOT EXECUTED 800a4d0: f8 00 02 f5 calli 800b0a4 <rtems_barrier_delete> <== NOT EXECUTED
err_wbar: rtems_barrier_delete(pipe->readBarrier);
800a4d4: 29 a1 00 2c lw r1,(r13+44) <== NOT EXECUTED 800a4d8: f8 00 02 f3 calli 800b0a4 <rtems_barrier_delete> <== NOT EXECUTED
err_rbar: free(pipe->Buffer);
800a4dc: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 800a4e0: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED 800a4e4: fb ff f3 00 calli 80070e4 <free> <== NOT EXECUTED
err_buf: free(pipe);
800a4e8: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 800a4ec: fb ff f2 fe calli 80070e4 <free> <== NOT EXECUTED 800a4f0: e0 00 00 0f bi 800a52c <fifo_open+0x1e8> <== NOT EXECUTED
err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe))
800a4f4: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a4f8: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800a4fc: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800a500: fb ff f7 b9 calli 80083e4 <rtems_semaphore_obtain> <== NOT EXECUTED 800a504: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 800a508: 44 20 00 02 be r1,r0,800a510 <fifo_open+0x1cc> <== NOT EXECUTED 800a50c: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED
err = -EINTR; if (*pipep == NULL) {
800a510: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED 800a514: 5c 20 00 06 bne r1,r0,800a52c <fifo_open+0x1e8> <== NOT EXECUTED
if (err)
800a518: 45 81 00 04 be r12,r1,800a528 <fifo_open+0x1e4> <== NOT EXECUTED
pipe_free(pipe);
800a51c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800a520: fb ff ff 2f calli 800a1dc <pipe_free> <== NOT EXECUTED 800a524: e0 00 00 02 bi 800a52c <fifo_open+0x1e8> <== NOT EXECUTED
else *pipep = pipe;
800a528: 59 cb 00 00 sw (r14+0),r11 <== NOT EXECUTED
} out: rtems_semaphore_release(rtems_pipe_semaphore);
800a52c: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800a530: 38 21 d6 a8 ori r1,r1,0xd6a8 <== NOT EXECUTED 800a534: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 800a538: fb ff f7 fb calli 8008524 <rtems_semaphore_release> <== NOT EXECUTED
pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err)
800a53c: 5d 80 00 66 bne r12,r0,800a6d4 <fifo_open+0x390> <== NOT EXECUTED
return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) {
800a540: 29 e2 00 18 lw r2,(r15+24) <== NOT EXECUTED 800a544: 34 03 00 04 mvi r3,4 <== NOT EXECUTED
int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep;
800a548: 29 cb 00 00 lw r11,(r14+0) <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
800a54c: 20 41 00 06 andi r1,r2,0x6 <== NOT EXECUTED 800a550: 44 23 00 24 be r1,r3,800a5e0 <fifo_open+0x29c> <== NOT EXECUTED 800a554: 34 02 00 06 mvi r2,6 <== NOT EXECUTED 800a558: 44 22 00 44 be r1,r2,800a668 <fifo_open+0x324> <== NOT EXECUTED 800a55c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 800a560: 5c 22 00 56 bne r1,r2,800a6b8 <fifo_open+0x374> <== NOT EXECUTED
case LIBIO_FLAGS_READ: pipe->readerCounter ++;
800a564: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED
if (pipe->Readers ++ == 0)
800a568: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++;
800a56c: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
800a570: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED
return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++;
800a574: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
800a578: 59 62 00 10 sw (r11+16),r2 <== NOT EXECUTED 800a57c: 5c 20 00 04 bne r1,r0,800a58c <fifo_open+0x248> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
800a580: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a584: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED 800a588: f8 00 02 e7 calli 800b124 <rtems_barrier_release> <== NOT EXECUTED
if (pipe->Writers == 0) {
800a58c: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 800a590: 5c 20 00 4a bne r1,r0,800a6b8 <fifo_open+0x374> <== NOT EXECUTED
/* Not an error */ if (LIBIO_NODELAY(iop))
800a594: 29 e2 00 18 lw r2,(r15+24) <== NOT EXECUTED 800a598: 20 42 00 01 andi r2,r2,0x1 <== NOT EXECUTED 800a59c: 5c 41 00 47 bne r2,r1,800a6b8 <fifo_open+0x374> <== NOT EXECUTED
break; prevCounter = pipe->writerCounter;
800a5a0: 29 70 00 24 lw r16,(r11+36) <== NOT EXECUTED
err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe);
800a5a4: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a5a8: fb ff f7 df calli 8008524 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
800a5ac: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800a5b0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800a5b4: f8 00 02 fb calli 800b1a0 <rtems_barrier_wait> <== NOT EXECUTED 800a5b8: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
goto out_error; if (! PIPE_LOCK(pipe))
800a5bc: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 800a5c0: 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))
800a5c4: 5c 20 00 40 bne r1,r0,800a6c4 <fifo_open+0x380> <== NOT EXECUTED
goto out_error; if (! PIPE_LOCK(pipe))
800a5c8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a5cc: fb ff f7 86 calli 80083e4 <rtems_semaphore_obtain> <== NOT EXECUTED 800a5d0: 5c 2d 00 3d bne r1,r13,800a6c4 <fifo_open+0x380> <== NOT EXECUTED
goto out_error; } while (prevCounter == pipe->writerCounter);
800a5d4: 29 61 00 24 lw r1,(r11+36) <== NOT EXECUTED 800a5d8: 46 01 ff f3 be r16,r1,800a5a4 <fifo_open+0x260> <== NOT EXECUTED 800a5dc: e0 00 00 37 bi 800a6b8 <fifo_open+0x374> <== NOT EXECUTED
} break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
800a5e0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800a5e4: 5c 20 00 05 bne r1,r0,800a5f8 <fifo_open+0x2b4> <== NOT EXECUTED 800a5e8: 20 42 00 01 andi r2,r2,0x1 <== NOT EXECUTED 800a5ec: 44 40 00 03 be r2,r0,800a5f8 <fifo_open+0x2b4> <== NOT EXECUTED 800a5f0: 34 0c ff fa mvi r12,-6 <== NOT EXECUTED 800a5f4: e0 00 00 35 bi 800a6c8 <fifo_open+0x384> <== NOT EXECUTED
err = -ENXIO; goto out_error; } pipe->writerCounter ++;
800a5f8: 29 63 00 24 lw r3,(r11+36) <== NOT EXECUTED
if (pipe->Writers ++ == 0)
800a5fc: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++;
800a600: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
800a604: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++;
800a608: 59 63 00 24 sw (r11+36),r3 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
800a60c: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED 800a610: 5c 20 00 04 bne r1,r0,800a620 <fifo_open+0x2dc> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
800a614: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800a618: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED 800a61c: f8 00 02 c2 calli 800b124 <rtems_barrier_release> <== NOT EXECUTED
if (pipe->Readers == 0) {
800a620: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800a624: 5c 20 00 25 bne r1,r0,800a6b8 <fifo_open+0x374> <== NOT EXECUTED
prevCounter = pipe->readerCounter;
800a628: 29 70 00 20 lw r16,(r11+32) <== NOT EXECUTED
err = -EINTR; do { PIPE_UNLOCK(pipe);
800a62c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a630: fb ff f7 bd calli 8008524 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
800a634: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a638: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800a63c: f8 00 02 d9 calli 800b1a0 <rtems_barrier_wait> <== NOT EXECUTED 800a640: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
goto out_error; if (! PIPE_LOCK(pipe))
800a644: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 800a648: 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))
800a64c: 5c 20 00 1e bne r1,r0,800a6c4 <fifo_open+0x380> <== NOT EXECUTED
goto out_error; if (! PIPE_LOCK(pipe))
800a650: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a654: fb ff f7 64 calli 80083e4 <rtems_semaphore_obtain> <== NOT EXECUTED 800a658: 5c 2d 00 1b bne r1,r13,800a6c4 <fifo_open+0x380> <== NOT EXECUTED
goto out_error; } while (prevCounter == pipe->readerCounter);
800a65c: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 800a660: 46 01 ff f3 be r16,r1,800a62c <fifo_open+0x2e8> <== NOT EXECUTED 800a664: e0 00 00 15 bi 800a6b8 <fifo_open+0x374> <== NOT EXECUTED
} break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++;
800a668: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED
if (pipe->Readers ++ == 0)
800a66c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++;
800a670: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
800a674: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++;
800a678: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
800a67c: 59 62 00 10 sw (r11+16),r2 <== NOT EXECUTED 800a680: 5c 20 00 04 bne r1,r0,800a690 <fifo_open+0x34c> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
800a684: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a688: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED 800a68c: f8 00 02 a6 calli 800b124 <rtems_barrier_release> <== NOT EXECUTED
pipe->writerCounter ++;
800a690: 29 63 00 24 lw r3,(r11+36) <== NOT EXECUTED
if (pipe->Writers ++ == 0)
800a694: 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 ++;
800a698: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
800a69c: 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 ++;
800a6a0: 59 63 00 24 sw (r11+36),r3 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
800a6a4: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED 800a6a8: 5c 20 00 04 bne r1,r0,800a6b8 <fifo_open+0x374> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
800a6ac: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800a6b0: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED 800a6b4: f8 00 02 9c calli 800b124 <rtems_barrier_release> <== NOT EXECUTED
break; } PIPE_UNLOCK(pipe);
800a6b8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a6bc: fb ff f7 9a calli 8008524 <rtems_semaphore_release> <== NOT EXECUTED
return 0;
800a6c0: e0 00 00 05 bi 800a6d4 <fifo_open+0x390> <== NOT EXECUTED 800a6c4: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED
out_error: pipe_release(pipep, iop);
800a6c8: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 800a6cc: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 800a6d0: fb ff fe d5 calli 800a224 <pipe_release> <== NOT EXECUTED
return err; }
800a6d4: b9 80 08 00 mv r1,r12 800a6d8: 2b 9d 00 04 lw ra,(sp+4) 800a6dc: 2b 8b 00 20 lw r11,(sp+32) 800a6e0: 2b 8c 00 1c lw r12,(sp+28) 800a6e4: 2b 8d 00 18 lw r13,(sp+24) 800a6e8: 2b 8e 00 14 lw r14,(sp+20) 800a6ec: 2b 8f 00 10 lw r15,(sp+16) 800a6f0: 2b 90 00 0c lw r16,(sp+12) 800a6f4: 2b 91 00 08 lw r17,(sp+8) 800a6f8: 37 9c 00 28 addi sp,sp,40 800a6fc: c3 a0 00 00 ret
08028c10 <file_systems_below_this_mountpoint>: /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first;
8028c10: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8028c14: 38 21 0f 58 ori r1,r1,0xf58 <== NOT EXECUTED 8028c18: 34 23 00 04 addi r3,r1,4 <== NOT EXECUTED 8028c1c: e0 00 00 06 bi 8028c34 <file_systems_below_this_mountpoint+0x24><== 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 ) {
8028c20: 28 25 00 18 lw r5,(r1+24) <== NOT EXECUTED 8028c24: 28 44 00 10 lw r4,(r2+16) <== NOT EXECUTED 8028c28: 5c a4 00 03 bne r5,r4,8028c34 <file_systems_below_this_mountpoint+0x24><== NOT EXECUTED 8028c2c: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8028c30: c3 a0 00 00 ret <== NOT EXECUTED
* mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) {
8028c34: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8028c38: 5c 23 ff fa bne r1,r3,8028c20 <file_systems_below_this_mountpoint+0x10><== NOT EXECUTED 8028c3c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return true; } } return false; }
8028c40: c3 a0 00 00 ret <== NOT EXECUTED
080023e4 <fpathconf>: long fpathconf( int fd, int name ) {
80023e4: 37 9c ff f0 addi sp,sp,-16 80023e8: 5b 8b 00 10 sw (sp+16),r11 80023ec: 5b 8c 00 0c sw (sp+12),r12 80023f0: 5b 8d 00 08 sw (sp+8),r13 80023f4: 5b 9d 00 04 sw (sp+4),ra
long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd);
80023f8: 78 03 08 02 mvhi r3,0x802 80023fc: 38 63 10 10 ori r3,r3,0x1010 8002400: 28 63 00 00 lw r3,(r3+0)
long fpathconf( int fd, int name ) {
8002404: b8 40 60 00 mv r12,r2
long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 8002408: 54 61 00 02 bgu r3,r1,8002410 <fpathconf+0x2c>
800240c: e0 00 00 0e bi 8002444 <fpathconf+0x60>
iop = rtems_libio_iop(fd);
8002410: 34 02 00 03 mvi r2,3 8002414: fb ff f9 dc calli 8000b84 <__ashlsi3> 8002418: 34 02 00 03 mvi r2,3 800241c: 78 0b 08 02 mvhi r11,0x802 8002420: b8 20 68 00 mv r13,r1 8002424: 39 6b 17 24 ori r11,r11,0x1724 8002428: fb ff f9 d7 calli 8000b84 <__ashlsi3> 800242c: 29 62 00 00 lw r2,(r11+0) 8002430: b5 a1 08 00 add r1,r13,r1 8002434: b4 41 08 00 add r1,r2,r1
rtems_libio_check_is_open(iop);
8002438: 28 22 00 18 lw r2,(r1+24) 800243c: 20 43 01 00 andi r3,r2,0x100
8002440: 5c 60 00 04 bne r3,r0,8002450 <fpathconf+0x6c> <== ALWAYS TAKEN
8002444: f8 00 33 c2 calli 800f34c <__errno> 8002448: 34 02 00 09 mvi r2,9 800244c: e0 00 00 28 bi 80024ec <fpathconf+0x108>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
8002450: 20 42 00 02 andi r2,r2,0x2
8002454: 44 40 00 24 be r2,r0,80024e4 <fpathconf+0x100> <== NEVER TAKEN
/* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
8002458: 28 2b 00 2c lw r11,(r1+44)
switch ( name ) {
800245c: 34 01 00 0b mvi r1,11
8002460: 55 81 00 21 bgu r12,r1,80024e4 <fpathconf+0x100>
8002464: b9 80 08 00 mv r1,r12 8002468: 34 02 00 02 mvi r2,2 800246c: 78 0c 08 01 mvhi r12,0x801 8002470: fb ff f9 c5 calli 8000b84 <__ashlsi3> 8002474: 39 8c fc 5c ori r12,r12,0xfc5c 8002478: b5 81 08 00 add r1,r12,r1 800247c: 28 21 00 00 lw r1,(r1+0) 8002480: c0 20 00 00 b r1
case _PC_LINK_MAX: return_value = the_limits->link_max;
8002484: 29 61 00 38 lw r1,(r11+56)
break;
8002488: e0 00 00 1b bi 80024f4 <fpathconf+0x110>
case _PC_MAX_CANON: return_value = the_limits->max_canon;
800248c: 29 61 00 3c lw r1,(r11+60)
break;
8002490: e0 00 00 19 bi 80024f4 <fpathconf+0x110>
case _PC_MAX_INPUT: return_value = the_limits->max_input;
8002494: 29 61 00 40 lw r1,(r11+64)
break;
8002498: e0 00 00 17 bi 80024f4 <fpathconf+0x110>
case _PC_NAME_MAX: return_value = the_limits->name_max;
800249c: 29 61 00 44 lw r1,(r11+68)
break;
80024a0: e0 00 00 15 bi 80024f4 <fpathconf+0x110>
case _PC_PATH_MAX: return_value = the_limits->path_max;
80024a4: 29 61 00 48 lw r1,(r11+72)
break;
80024a8: e0 00 00 13 bi 80024f4 <fpathconf+0x110>
case _PC_PIPE_BUF: return_value = the_limits->pipe_buf;
80024ac: 29 61 00 4c lw r1,(r11+76)
break;
80024b0: e0 00 00 11 bi 80024f4 <fpathconf+0x110>
case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions;
80024b4: 29 61 00 54 lw r1,(r11+84)
break;
80024b8: e0 00 00 0f bi 80024f4 <fpathconf+0x110>
case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc;
80024bc: 29 61 00 58 lw r1,(r11+88)
break;
80024c0: e0 00 00 0d bi 80024f4 <fpathconf+0x110>
case _PC_VDISABLE: return_value = the_limits->posix_vdisable;
80024c4: 29 61 00 64 lw r1,(r11+100)
break;
80024c8: e0 00 00 0b bi 80024f4 <fpathconf+0x110>
case _PC_ASYNC_IO: return_value = the_limits->posix_async_io;
80024cc: 29 61 00 50 lw r1,(r11+80)
break;
80024d0: e0 00 00 09 bi 80024f4 <fpathconf+0x110>
case _PC_PRIO_IO: return_value = the_limits->posix_prio_io;
80024d4: 29 61 00 5c lw r1,(r11+92)
break;
80024d8: e0 00 00 07 bi 80024f4 <fpathconf+0x110>
case _PC_SYNC_IO: return_value = the_limits->posix_sync_io;
80024dc: 29 61 00 60 lw r1,(r11+96)
break;
80024e0: e0 00 00 05 bi 80024f4 <fpathconf+0x110>
default: rtems_set_errno_and_return_minus_one( EINVAL );
80024e4: f8 00 33 9a calli 800f34c <__errno> 80024e8: 34 02 00 16 mvi r2,22 80024ec: 58 22 00 00 sw (r1+0),r2 80024f0: 34 01 ff ff mvi r1,-1
break; } return return_value; }
80024f4: 2b 9d 00 04 lw ra,(sp+4) 80024f8: 2b 8b 00 10 lw r11,(sp+16) 80024fc: 2b 8c 00 0c lw r12,(sp+12) 8002500: 2b 8d 00 08 lw r13,(sp+8) 8002504: 37 9c 00 10 addi sp,sp,16 8002508: c3 a0 00 00 ret
080070e4 <free>: void free( void *ptr ) { MSBUMP(free_calls, 1);
80070e4: 37 9c ff f4 addi sp,sp,-12 80070e8: 5b 8b 00 0c sw (sp+12),r11 80070ec: 5b 8c 00 08 sw (sp+8),r12 80070f0: 5b 9d 00 04 sw (sp+4),ra 80070f4: 78 02 08 01 mvhi r2,0x801 80070f8: 38 42 d7 28 ori r2,r2,0xd728 80070fc: 28 43 00 0c lw r3,(r2+12) 8007100: b8 20 58 00 mv r11,r1 8007104: 34 61 00 01 addi r1,r3,1 8007108: 58 41 00 0c sw (r2+12),r1
if ( !ptr ) 800710c: 45 60 00 1f be r11,r0,8007188 <free+0xa4> /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) &&
8007110: 78 01 08 01 mvhi r1,0x801 8007114: 38 21 da 40 ori r1,r1,0xda40 8007118: 28 22 00 00 lw r2,(r1+0) 800711c: 34 01 00 03 mvi r1,3
8007120: 5c 41 00 06 bne r2,r1,8007138 <free+0x54> <== NEVER TAKEN
8007124: f8 00 01 6f calli 80076e0 <malloc_is_system_state_OK>
8007128: 5c 20 00 04 bne r1,r0,8007138 <free+0x54> <== ALWAYS TAKEN
!malloc_is_system_state_OK() ) { malloc_deferred_free(ptr);
800712c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8007130: f8 00 01 7e calli 8007728 <malloc_deferred_free> <== NOT EXECUTED
return;
8007134: e0 00 00 15 bi 8007188 <free+0xa4> <== NOT EXECUTED
#endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers )
8007138: 78 01 08 01 mvhi r1,0x801 800713c: 38 21 d6 50 ori r1,r1,0xd650 8007140: 28 21 00 00 lw r1,(r1+0)
8007144: 44 20 00 04 be r1,r0,8007154 <free+0x70> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_free)(ptr);
8007148: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED 800714c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8007150: d8 40 00 00 call r2 <== NOT EXECUTED
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
8007154: 78 0c 08 01 mvhi r12,0x801 8007158: 39 8c d0 1c ori r12,r12,0xd01c 800715c: 29 81 00 00 lw r1,(r12+0) 8007160: b9 60 10 00 mv r2,r11 8007164: f8 00 08 b0 calli 8009424 <_Protected_heap_Free>
8007168: 5c 20 00 08 bne r1,r0,8007188 <free+0xa4> <== ALWAYS TAKEN
printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin,
800716c: 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",
8007170: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8007174: 38 21 bc b8 ori r1,r1,0xbcb8 <== NOT EXECUTED 8007178: 28 44 00 1c lw r4,(r2+28) <== NOT EXECUTED 800717c: 28 43 00 18 lw r3,(r2+24) <== NOT EXECUTED 8007180: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8007184: fb ff ea 6e calli 8001b3c <printk> <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } }
8007188: 2b 9d 00 04 lw ra,(sp+4) 800718c: 2b 8b 00 0c lw r11,(sp+12) 8007190: 2b 8c 00 08 lw r12,(sp+8) 8007194: 37 9c 00 0c addi sp,sp,12 8007198: c3 a0 00 00 ret
080282a4 <free_user_env>: * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) {
80282a4: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 80282a8: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 80282ac: 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
80282b0: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 80282b4: 38 42 0f 64 ori r2,r2,0xf64 <== NOT EXECUTED
* NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) {
80282b8: 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
80282bc: 44 22 00 0f be r1,r2,80282f8 <free_user_env+0x54> <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory);
80282c0: 28 21 00 10 lw r1,(r1+16) <== NOT EXECUTED 80282c4: 44 20 00 05 be r1,r0,80282d8 <free_user_env+0x34> <== NOT EXECUTED 80282c8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 80282cc: 44 40 00 03 be r2,r0,80282d8 <free_user_env+0x34> <== NOT EXECUTED 80282d0: 35 61 00 04 addi r1,r11,4 <== NOT EXECUTED 80282d4: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
80282d8: 29 61 00 24 lw r1,(r11+36) <== NOT EXECUTED 80282dc: 44 20 00 05 be r1,r0,80282f0 <free_user_env+0x4c> <== NOT EXECUTED 80282e0: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 80282e4: 44 40 00 03 be r2,r0,80282f0 <free_user_env+0x4c> <== NOT EXECUTED 80282e8: 35 61 00 18 addi r1,r11,24 <== NOT EXECUTED 80282ec: d8 40 00 00 call r2 <== NOT EXECUTED
free(env);
80282f0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80282f4: fb ff 78 05 calli 8006308 <free> <== NOT EXECUTED
} }
80282f8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80282fc: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8028300: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8028304: c3 a0 00 00 ret <== NOT EXECUTED
0801a8e8 <fstat>: int fstat( int fd, struct stat *sbuf ) {
801a8e8: 37 9c ff ec addi sp,sp,-20 801a8ec: 5b 8b 00 14 sw (sp+20),r11 801a8f0: 5b 8c 00 10 sw (sp+16),r12 801a8f4: 5b 8d 00 0c sw (sp+12),r13 801a8f8: 5b 8e 00 08 sw (sp+8),r14 801a8fc: 5b 9d 00 04 sw (sp+4),ra 801a900: b8 40 60 00 mv r12,r2
/* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 801a904: 5c 40 00 04 bne r2,r0,801a914 <fstat+0x2c> rtems_set_errno_and_return_minus_one( EFAULT );
801a908: fb ff c7 0d calli 800c53c <__errno> 801a90c: 34 02 00 0e mvi r2,14 801a910: e0 00 00 14 bi 801a960 <fstat+0x78>
/* * Now process the stat() request. */ iop = rtems_libio_iop( fd );
801a914: 78 02 08 01 mvhi r2,0x801 801a918: 38 42 d0 10 ori r2,r2,0xd010 801a91c: 28 42 00 00 lw r2,(r2+0)
801a920: 50 22 00 0e bgeu r1,r2,801a958 <fstat+0x70>
801a924: 34 02 00 03 mvi r2,3 801a928: fb ff 96 32 calli 80001f0 <__ashlsi3> 801a92c: 78 0d 08 01 mvhi r13,0x801 801a930: 39 ad d7 1c ori r13,r13,0xd71c 801a934: 34 02 00 03 mvi r2,3 801a938: b8 20 70 00 mv r14,r1 801a93c: fb ff 96 2d calli 80001f0 <__ashlsi3> 801a940: 29 ab 00 00 lw r11,(r13+0) 801a944: b5 c1 08 00 add r1,r14,r1 801a948: b5 61 58 00 add r11,r11,r1
rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop);
801a94c: 29 61 00 18 lw r1,(r11+24) 801a950: 20 21 01 00 andi r1,r1,0x100
801a954: 5c 20 00 06 bne r1,r0,801a96c <fstat+0x84> <== ALWAYS TAKEN
/* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd );
801a958: fb ff c6 f9 calli 800c53c <__errno> 801a95c: 34 02 00 09 mvi r2,9 801a960: 58 22 00 00 sw (r1+0),r2 801a964: 34 01 ff ff mvi r1,-1 801a968: e0 00 00 11 bi 801a9ac <fstat+0xc4>
rtems_libio_check_is_open(iop); if ( !iop->handlers )
801a96c: 29 61 00 40 lw r1,(r11+64)
801a970: 44 20 ff fa be r1,r0,801a958 <fstat+0x70> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h )
801a974: 28 21 00 18 lw r1,(r1+24)
801a978: 5c 20 00 04 bne r1,r0,801a988 <fstat+0xa0> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
801a97c: fb ff c6 f0 calli 800c53c <__errno> <== NOT EXECUTED 801a980: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 801a984: e3 ff ff f7 bi 801a960 <fstat+0x78> <== NOT EXECUTED
/* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) );
801a988: 34 02 00 00 mvi r2,0 801a98c: 34 03 00 48 mvi r3,72 801a990: b9 80 08 00 mv r1,r12 801a994: fb ff c9 ee calli 800d14c <memset>
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
801a998: 29 63 00 40 lw r3,(r11+64) 801a99c: 35 61 00 1c addi r1,r11,28 801a9a0: b9 80 10 00 mv r2,r12 801a9a4: 28 63 00 18 lw r3,(r3+24) 801a9a8: d8 60 00 00 call r3
}
801a9ac: 2b 9d 00 04 lw ra,(sp+4) 801a9b0: 2b 8b 00 14 lw r11,(sp+20) 801a9b4: 2b 8c 00 10 lw r12,(sp+16) 801a9b8: 2b 8d 00 0c lw r13,(sp+12) 801a9bc: 2b 8e 00 08 lw r14,(sp+8) 801a9c0: 37 9c 00 14 addi sp,sp,20 801a9c4: c3 a0 00 00 ret
08026c34 <fsync>: #include <rtems/seterr.h> int fsync( int fd ) {
8026c34: 37 9c ff f4 addi sp,sp,-12 8026c38: 5b 8b 00 0c sw (sp+12),r11 8026c3c: 5b 8c 00 08 sw (sp+8),r12 8026c40: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_t *iop; rtems_libio_check_fd( fd );
8026c44: 78 02 08 06 mvhi r2,0x806 8026c48: 38 42 d0 10 ori r2,r2,0xd010 8026c4c: 28 42 00 00 lw r2,(r2+0)
8026c50: 54 41 00 02 bgu r2,r1,8026c58 <fsync+0x24> <== ALWAYS TAKEN
8026c54: e0 00 00 15 bi 8026ca8 <fsync+0x74> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
8026c58: 34 02 00 03 mvi r2,3 8026c5c: fb ff 69 37 calli 8001138 <__ashlsi3> 8026c60: 34 02 00 03 mvi r2,3 8026c64: 78 0b 08 07 mvhi r11,0x807 8026c68: b8 20 60 00 mv r12,r1 8026c6c: 39 6b 0f 10 ori r11,r11,0xf10 8026c70: fb ff 69 32 calli 8001138 <__ashlsi3> 8026c74: 29 62 00 00 lw r2,(r11+0) 8026c78: b5 81 08 00 add r1,r12,r1 8026c7c: b4 41 08 00 add r1,r2,r1
rtems_libio_check_is_open(iop);
8026c80: 28 22 00 18 lw r2,(r1+24) 8026c84: 20 43 01 00 andi r3,r2,0x100
8026c88: 44 60 00 08 be r3,r0,8026ca8 <fsync+0x74> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
8026c8c: 20 42 00 04 andi r2,r2,0x4
8026c90: 5c 40 00 04 bne r2,r0,8026ca0 <fsync+0x6c>
8026c94: f8 00 74 bd calli 8043f88 <__errno> 8026c98: 34 02 00 16 mvi r2,22 8026c9c: e0 00 00 0a bi 8026cc4 <fsync+0x90>
/* * Now process the fsync(). */ if ( !iop->handlers )
8026ca0: 28 22 00 40 lw r2,(r1+64)
8026ca4: 5c 40 00 04 bne r2,r0,8026cb4 <fsync+0x80> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
8026ca8: f8 00 74 b8 calli 8043f88 <__errno> <== NOT EXECUTED 8026cac: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8026cb0: e0 00 00 05 bi 8026cc4 <fsync+0x90> <== NOT EXECUTED
if ( !iop->handlers->fsync_h )
8026cb4: 28 42 00 28 lw r2,(r2+40)
8026cb8: 5c 40 00 06 bne r2,r0,8026cd0 <fsync+0x9c> rtems_set_errno_and_return_minus_one( ENOTSUP );
8026cbc: f8 00 74 b3 calli 8043f88 <__errno> 8026cc0: 34 02 00 86 mvi r2,134 8026cc4: 58 22 00 00 sw (r1+0),r2 8026cc8: 34 01 ff ff mvi r1,-1 8026ccc: e0 00 00 02 bi 8026cd4 <fsync+0xa0>
return (*iop->handlers->fsync_h)( iop );
8026cd0: d8 40 00 00 call r2
}
8026cd4: 2b 9d 00 04 lw ra,(sp+4) 8026cd8: 2b 8b 00 0c lw r11,(sp+12) 8026cdc: 2b 8c 00 08 lw r12,(sp+8) 8026ce0: 37 9c 00 0c addi sp,sp,12 8026ce4: c3 a0 00 00 ret
0800719c <ftruncate>: int ftruncate( int fd, off_t length ) {
800719c: 37 9c ff d8 addi sp,sp,-40 80071a0: 5b 8b 00 14 sw (sp+20),r11 80071a4: 5b 8c 00 10 sw (sp+16),r12 80071a8: 5b 8d 00 0c sw (sp+12),r13 80071ac: 5b 8e 00 08 sw (sp+8),r14 80071b0: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd );
80071b4: 78 03 08 01 mvhi r3,0x801 80071b8: 38 63 d0 10 ori r3,r3,0xd010 80071bc: 28 63 00 00 lw r3,(r3+0)
int ftruncate( int fd, off_t length ) {
80071c0: b8 40 68 00 mv r13,r2
rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd );
80071c4: 54 61 00 02 bgu r3,r1,80071cc <ftruncate+0x30> <== ALWAYS TAKEN
80071c8: e0 00 00 0e bi 8007200 <ftruncate+0x64> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
80071cc: 34 02 00 03 mvi r2,3 80071d0: fb ff e4 08 calli 80001f0 <__ashlsi3> 80071d4: 78 0c 08 01 mvhi r12,0x801 80071d8: 39 8c d7 1c ori r12,r12,0xd71c 80071dc: 34 02 00 03 mvi r2,3 80071e0: b8 20 70 00 mv r14,r1 80071e4: fb ff e4 03 calli 80001f0 <__ashlsi3> 80071e8: 29 8b 00 00 lw r11,(r12+0) 80071ec: b5 c1 08 00 add r1,r14,r1 80071f0: b5 61 58 00 add r11,r11,r1
rtems_libio_check_is_open(iop);
80071f4: 29 61 00 18 lw r1,(r11+24) 80071f8: 20 21 01 00 andi r1,r1,0x100
80071fc: 5c 20 00 04 bne r1,r0,800720c <ftruncate+0x70> <== ALWAYS TAKEN
8007200: f8 00 14 cf calli 800c53c <__errno> <== NOT EXECUTED 8007204: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8007208: e0 00 00 1b bi 8007274 <ftruncate+0xd8> <== NOT EXECUTED
/* * Make sure we are not working on a directory */ loc = iop->pathinfo;
800720c: 37 8c 00 18 addi r12,sp,24 8007210: b9 80 08 00 mv r1,r12 8007214: 35 62 00 1c addi r2,r11,28 8007218: 34 03 00 14 mvi r3,20 800721c: f8 00 17 6e calli 800cfd4 <memcpy>
if ( !loc.ops->node_type_h )
8007220: 2b 81 00 24 lw r1,(sp+36) 8007224: 28 24 00 10 lw r4,(r1+16)
8007228: 44 80 00 11 be r4,r0,800726c <ftruncate+0xd0> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
800722c: b9 80 08 00 mv r1,r12 8007230: d8 80 00 00 call r4 8007234: 34 02 00 01 mvi r2,1
8007238: 5c 22 00 04 bne r1,r2,8007248 <ftruncate+0xac> rtems_set_errno_and_return_minus_one( EISDIR );
800723c: f8 00 14 c0 calli 800c53c <__errno> 8007240: 34 02 00 15 mvi r2,21 8007244: e0 00 00 0c bi 8007274 <ftruncate+0xd8>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
8007248: 29 61 00 18 lw r1,(r11+24) 800724c: 20 21 00 04 andi r1,r1,0x4
8007250: 5c 20 00 04 bne r1,r0,8007260 <ftruncate+0xc4> <== ALWAYS TAKEN
8007254: f8 00 14 ba calli 800c53c <__errno> <== NOT EXECUTED 8007258: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 800725c: e0 00 00 06 bi 8007274 <ftruncate+0xd8> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
8007260: 29 61 00 40 lw r1,(r11+64) 8007264: 28 2c 00 20 lw r12,(r1+32)
8007268: 5d 80 00 06 bne r12,r0,8007280 <ftruncate+0xe4> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
800726c: f8 00 14 b4 calli 800c53c <__errno> <== NOT EXECUTED 8007270: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8007274: 58 22 00 00 sw (r1+0),r2 8007278: 34 01 ff ff mvi r1,-1 800727c: e0 00 00 08 bi 800729c <ftruncate+0x100>
return (*iop->handlers->ftruncate_h)( iop, length );
8007280: 34 02 00 1f mvi r2,31 8007284: b9 a0 08 00 mv r1,r13 8007288: fb ff e4 2a calli 8000330 <__ashrsi3> 800728c: b8 20 10 00 mv r2,r1 8007290: b9 a0 18 00 mv r3,r13 8007294: b9 60 08 00 mv r1,r11 8007298: d9 80 00 00 call r12
}
800729c: 2b 9d 00 04 lw ra,(sp+4) 80072a0: 2b 8b 00 14 lw r11,(sp+20) 80072a4: 2b 8c 00 10 lw r12,(sp+16) 80072a8: 2b 8d 00 0c lw r13,(sp+12) 80072ac: 2b 8e 00 08 lw r14,(sp+8) 80072b0: 37 9c 00 28 addi sp,sp,40 80072b4: c3 a0 00 00 ret
08060720 <getdents>: int getdents( int dd_fd, char *dd_buf, int dd_len ) {
8060720: 37 9c ff d4 addi sp,sp,-44 8060724: 5b 8b 00 18 sw (sp+24),r11 8060728: 5b 8c 00 14 sw (sp+20),r12 806072c: 5b 8d 00 10 sw (sp+16),r13 8060730: 5b 8e 00 0c sw (sp+12),r14 8060734: 5b 8f 00 08 sw (sp+8),r15 8060738: 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 );
806073c: 78 04 08 06 mvhi r4,0x806 8060740: 38 84 d0 10 ori r4,r4,0xd010 8060744: 28 84 00 00 lw r4,(r4+0)
int getdents( int dd_fd, char *dd_buf, int dd_len ) {
8060748: b8 40 78 00 mv r15,r2 806074c: b8 60 70 00 mv r14,r3
/* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd );
8060750: 54 81 00 03 bgu r4,r1,806075c <getdents+0x3c> <== ALWAYS TAKEN
8060754: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 8060758: e0 00 00 0b bi 8060784 <getdents+0x64> <== NOT EXECUTED
806075c: 34 02 00 03 mvi r2,3 8060760: fb fe 82 76 calli 8001138 <__ashlsi3> 8060764: 78 0c 08 07 mvhi r12,0x807 8060768: 39 8c 0f 10 ori r12,r12,0xf10 806076c: 34 02 00 03 mvi r2,3 8060770: b8 20 68 00 mv r13,r1 8060774: fb fe 82 71 calli 8001138 <__ashlsi3> 8060778: 29 8b 00 00 lw r11,(r12+0) 806077c: b5 a1 08 00 add r1,r13,r1 8060780: b5 61 58 00 add r11,r11,r1
/* * Make sure we are working on a directory */ loc = iop->pathinfo;
8060784: 37 8d 00 1c addi r13,sp,28 8060788: 34 0c 00 14 mvi r12,20 806078c: b9 a0 08 00 mv r1,r13 8060790: 35 62 00 1c addi r2,r11,28 8060794: b9 80 18 00 mv r3,r12 8060798: fb ff 9c 9f calli 8047a14 <memcpy>
if ( !loc.ops->node_type_h )
806079c: 2b 81 00 28 lw r1,(sp+40) 80607a0: 28 24 00 10 lw r4,(r1+16)
80607a4: 44 80 00 0c be r4,r0,80607d4 <getdents+0xb4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
80607a8: b9 a0 08 00 mv r1,r13 80607ac: d8 80 00 00 call r4 80607b0: 34 02 00 01 mvi r2,1
80607b4: 44 22 00 05 be r1,r2,80607c8 <getdents+0xa8> rtems_set_errno_and_return_minus_one( ENOTDIR );
80607b8: fb ff 8d f4 calli 8043f88 <__errno> 80607bc: 58 2c 00 00 sw (r1+0),r12 80607c0: 34 01 ff ff mvi r1,-1 80607c4: e0 00 00 0c bi 80607f4 <getdents+0xd4>
/* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h )
80607c8: 29 61 00 40 lw r1,(r11+64) 80607cc: 28 24 00 08 lw r4,(r1+8)
80607d0: 5c 80 00 05 bne r4,r0,80607e4 <getdents+0xc4> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
80607d4: fb ff 8d ed calli 8043f88 <__errno> <== NOT EXECUTED 80607d8: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80607dc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80607e0: e3 ff ff f8 bi 80607c0 <getdents+0xa0> <== NOT EXECUTED
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
80607e4: b9 60 08 00 mv r1,r11 80607e8: b9 e0 10 00 mv r2,r15 80607ec: b9 c0 18 00 mv r3,r14 80607f0: d8 80 00 00 call r4
}
80607f4: 2b 9d 00 04 lw ra,(sp+4) 80607f8: 2b 8b 00 18 lw r11,(sp+24) 80607fc: 2b 8c 00 14 lw r12,(sp+20) 8060800: 2b 8d 00 10 lw r13,(sp+16) 8060804: 2b 8e 00 0c lw r14,(sp+12) 8060808: 2b 8f 00 08 lw r15,(sp+8) 806080c: 37 9c 00 2c addi sp,sp,44 8060810: c3 a0 00 00 ret
08026e2c <getgid>: * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) {
8026e2c: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8026e30: 38 21 d2 f0 ori r1,r1,0xd2f0 <== NOT EXECUTED 8026e34: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
return _POSIX_types_Gid; }
8026e38: 2c 21 00 34 lhu r1,(r1+52) <== NOT EXECUTED 8026e3c: c3 a0 00 00 ret <== NOT EXECUTED
080275c8 <getgr_r>: struct group *grp, char *buffer, size_t bufsize, struct group **result ) {
80275c8: 37 9c ff e0 addi sp,sp,-32 80275cc: 5b 8b 00 20 sw (sp+32),r11 80275d0: 5b 8c 00 1c sw (sp+28),r12 80275d4: 5b 8d 00 18 sw (sp+24),r13 80275d8: 5b 8e 00 14 sw (sp+20),r14 80275dc: 5b 8f 00 10 sw (sp+16),r15 80275e0: 5b 90 00 0c sw (sp+12),r16 80275e4: 5b 91 00 08 sw (sp+8),r17 80275e8: 5b 9d 00 04 sw (sp+4),ra 80275ec: b8 20 68 00 mv r13,r1 80275f0: b8 40 88 00 mv r17,r2 80275f4: b8 60 58 00 mv r11,r3 80275f8: b8 80 80 00 mv r16,r4 80275fc: b8 a0 78 00 mv r15,r5 8027600: b8 c0 70 00 mv r14,r6
FILE *fp; int match; init_etc_passwd_group();
8027604: fb ff ff a3 calli 8027490 <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL) {
8027608: 78 01 08 06 mvhi r1,0x806 802760c: 78 02 08 06 mvhi r2,0x806 8027610: 38 21 15 04 ori r1,r1,0x1504 8027614: 38 42 91 98 ori r2,r2,0x9198 8027618: f8 00 75 63 calli 8044ba4 <fopen> 802761c: b8 20 60 00 mv r12,r1
8027620: 5c 20 00 05 bne r1,r0,8027634 <getgr_r+0x6c> <== ALWAYS TAKEN
errno = EINVAL;
8027624: f8 00 72 59 calli 8043f88 <__errno> <== NOT EXECUTED 8027628: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 802762c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8027630: e0 00 00 0d bi 8027664 <getgr_r+0x9c> <== NOT EXECUTED
return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) {
8027634: b9 60 10 00 mv r2,r11 8027638: ba 00 18 00 mv r3,r16 802763c: b9 e0 20 00 mv r4,r15 8027640: b9 80 08 00 mv r1,r12 8027644: fb ff fe c1 calli 8027148 <scangr>
errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0);
8027648: 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)) { 802764c: 5c 20 00 08 bne r1,r0,802766c <getgr_r+0xa4> errno = EINVAL;
8027650: f8 00 72 4e calli 8043f88 <__errno> <== NOT EXECUTED 8027654: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8027658: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
fclose(fp);
802765c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8027660: f8 00 72 ac calli 8044110 <fclose> <== NOT EXECUTED 8027664: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
return -1;
8027668: e0 00 00 0d bi 802769c <getgr_r+0xd4> <== NOT EXECUTED
} if (name) {
802766c: 45 a0 00 05 be r13,r0,8027680 <getgr_r+0xb8> <== NEVER TAKEN
match = (strcmp(grp->gr_name, name) == 0);
8027670: 29 61 00 00 lw r1,(r11+0) 8027674: f8 00 8e ca calli 804b19c <strcmp> 8027678: 64 27 00 00 cmpei r7,r1,0 802767c: e0 00 00 03 bi 8027688 <getgr_r+0xc0>
} else { match = (grp->gr_gid == gid);
8027680: 2d 67 00 08 lhu r7,(r11+8) <== NOT EXECUTED 8027684: e4 f1 38 00 cmpe r7,r7,r17 <== NOT EXECUTED
} if (match) {
8027688: 44 e0 ff eb be r7,r0,8027634 <getgr_r+0x6c> <== NEVER TAKEN
fclose(fp);
802768c: b9 80 08 00 mv r1,r12 8027690: f8 00 72 a0 calli 8044110 <fclose>
*result = grp;
8027694: 34 01 00 00 mvi r1,0 8027698: 59 cb 00 00 sw (r14+0),r11
} } fclose(fp); errno = EINVAL; return -1; }
802769c: 2b 9d 00 04 lw ra,(sp+4) 80276a0: 2b 8b 00 20 lw r11,(sp+32) 80276a4: 2b 8c 00 1c lw r12,(sp+28) 80276a8: 2b 8d 00 18 lw r13,(sp+24) 80276ac: 2b 8e 00 14 lw r14,(sp+20) 80276b0: 2b 8f 00 10 lw r15,(sp+16) 80276b4: 2b 90 00 0c lw r16,(sp+12) 80276b8: 2b 91 00 08 lw r17,(sp+8) 80276bc: 37 9c 00 20 addi sp,sp,32 80276c0: c3 a0 00 00 ret
080272c8 <getgrent>: return NULL; return p; } struct group *getgrent(void) {
80272c8: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 80272cc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
if (group_fp == NULL)
80272d0: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 80272d4: 38 21 0d 20 ori r1,r1,0xd20 <== NOT EXECUTED 80272d8: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 80272dc: 44 20 00 0b be r1,r0,8027308 <getgrent+0x40> <== NOT EXECUTED
return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
80272e0: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 80272e4: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 80272e8: 38 42 0d ec ori r2,r2,0xdec <== NOT EXECUTED 80272ec: 38 63 0d 24 ori r3,r3,0xd24 <== NOT EXECUTED 80272f0: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 80272f4: fb ff ff 95 calli 8027148 <scangr> <== NOT EXECUTED 80272f8: 44 20 00 04 be r1,r0,8027308 <getgrent+0x40> <== NOT EXECUTED 80272fc: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8027300: 38 21 0d ec ori r1,r1,0xdec <== NOT EXECUTED 8027304: e0 00 00 02 bi 802730c <getgrent+0x44> <== NOT EXECUTED 8027308: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return NULL; return &grent; }
802730c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027310: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8027314: c3 a0 00 00 ret <== NOT EXECUTED
08027700 <getgrgid>: struct group *getgrgid( gid_t gid ) {
8027700: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8027704: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
8027708: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 802770c: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 8027710: 38 42 0d ec ori r2,r2,0xdec <== NOT EXECUTED 8027714: 20 21 ff ff andi r1,r1,0xffff <== NOT EXECUTED 8027718: 38 63 0d 24 ori r3,r3,0xd24 <== NOT EXECUTED 802771c: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 8027720: 37 85 00 08 addi r5,sp,8 <== NOT EXECUTED 8027724: fb ff ff e8 calli 80276c4 <getgrgid_r> <== NOT EXECUTED 8027728: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 802772c: 5c 22 00 02 bne r1,r2,8027734 <getgrgid+0x34> <== NOT EXECUTED
return NULL; return p;
8027730: 2b 82 00 08 lw r2,(sp+8) <== NOT EXECUTED
}
8027734: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8027738: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 802773c: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8027740: c3 a0 00 00 ret <== NOT EXECUTED
080276c4 <getgrgid_r>: struct group *grp, char *buffer, size_t bufsize, struct group **result ) {
80276c4: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 80276c8: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 80276cc: b8 40 48 00 mv r9,r2 <== NOT EXECUTED 80276d0: b8 60 40 00 mv r8,r3 <== NOT EXECUTED 80276d4: b8 80 38 00 mv r7,r4 <== NOT EXECUTED 80276d8: b8 a0 30 00 mv r6,r5 <== NOT EXECUTED 80276dc: 20 22 ff ff andi r2,r1,0xffff <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
80276e0: b9 20 18 00 mv r3,r9 <== NOT EXECUTED 80276e4: b9 00 20 00 mv r4,r8 <== NOT EXECUTED 80276e8: b8 e0 28 00 mv r5,r7 <== NOT EXECUTED 80276ec: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80276f0: fb ff ff b6 calli 80275c8 <getgr_r> <== NOT EXECUTED
}
80276f4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80276f8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 80276fc: c3 a0 00 00 ret <== NOT EXECUTED
08027778 <getgrnam>: struct group *getgrnam( const char *name ) {
8027778: 37 9c ff f8 addi sp,sp,-8 802777c: 5b 9d 00 04 sw (sp+4),ra
struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
8027780: 78 02 08 07 mvhi r2,0x807 8027784: 78 03 08 07 mvhi r3,0x807 8027788: 38 42 0d ec ori r2,r2,0xdec 802778c: 38 63 0d 24 ori r3,r3,0xd24 8027790: 34 04 00 c8 mvi r4,200 8027794: 37 85 00 08 addi r5,sp,8 8027798: fb ff ff eb calli 8027744 <getgrnam_r> 802779c: 34 02 00 00 mvi r2,0
80277a0: 5c 22 00 02 bne r1,r2,80277a8 <getgrnam+0x30> <== NEVER TAKEN
return NULL; return p;
80277a4: 2b 82 00 08 lw r2,(sp+8)
}
80277a8: b8 40 08 00 mv r1,r2 80277ac: 2b 9d 00 04 lw ra,(sp+4) 80277b0: 37 9c 00 08 addi sp,sp,8 80277b4: c3 a0 00 00 ret
08027804 <getpw_r>: struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) {
8027804: 37 9c ff e0 addi sp,sp,-32 8027808: 5b 8b 00 20 sw (sp+32),r11 802780c: 5b 8c 00 1c sw (sp+28),r12 8027810: 5b 8d 00 18 sw (sp+24),r13 8027814: 5b 8e 00 14 sw (sp+20),r14 8027818: 5b 8f 00 10 sw (sp+16),r15 802781c: 5b 90 00 0c sw (sp+12),r16 8027820: 5b 91 00 08 sw (sp+8),r17 8027824: 5b 9d 00 04 sw (sp+4),ra 8027828: b8 20 68 00 mv r13,r1 802782c: b8 40 88 00 mv r17,r2 8027830: b8 60 58 00 mv r11,r3 8027834: b8 80 80 00 mv r16,r4 8027838: b8 a0 78 00 mv r15,r5 802783c: b8 c0 70 00 mv r14,r6
FILE *fp; int match; init_etc_passwd_group();
8027840: fb ff ff 14 calli 8027490 <init_etc_passwd_group>
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
8027844: 78 01 08 06 mvhi r1,0x806 8027848: 78 02 08 06 mvhi r2,0x806 802784c: 38 21 14 54 ori r1,r1,0x1454 8027850: 38 42 91 98 ori r2,r2,0x9198 8027854: f8 00 74 d4 calli 8044ba4 <fopen> 8027858: b8 20 60 00 mv r12,r1
802785c: 5c 20 00 05 bne r1,r0,8027870 <getpw_r+0x6c> <== ALWAYS TAKEN
errno = EINVAL;
8027860: f8 00 71 ca calli 8043f88 <__errno> <== NOT EXECUTED 8027864: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8027868: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 802786c: e0 00 00 0d bi 80278a0 <getpw_r+0x9c> <== NOT EXECUTED
return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) {
8027870: b9 60 10 00 mv r2,r11 8027874: ba 00 18 00 mv r3,r16 8027878: b9 e0 20 00 mv r4,r15 802787c: b9 80 08 00 mv r1,r12 8027880: fb ff fe a6 calli 8027318 <scanpw>
errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0);
8027884: 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)) {
8027888: 5c 20 00 08 bne r1,r0,80278a8 <getpw_r+0xa4> <== ALWAYS TAKEN
errno = EINVAL;
802788c: f8 00 71 bf calli 8043f88 <__errno> <== NOT EXECUTED 8027890: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8027894: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
fclose(fp);
8027898: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 802789c: f8 00 72 1d calli 8044110 <fclose> <== NOT EXECUTED 80278a0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
return -1;
80278a4: e0 00 00 0d bi 80278d8 <getpw_r+0xd4> <== NOT EXECUTED
} if (name) {
80278a8: 45 a0 00 05 be r13,r0,80278bc <getpw_r+0xb8> <== NEVER TAKEN
match = (strcmp(pwd->pw_name, name) == 0);
80278ac: 29 61 00 00 lw r1,(r11+0) 80278b0: f8 00 8e 3b calli 804b19c <strcmp> 80278b4: 64 27 00 00 cmpei r7,r1,0 80278b8: e0 00 00 03 bi 80278c4 <getpw_r+0xc0>
} else { match = (pwd->pw_uid == uid);
80278bc: 2d 67 00 08 lhu r7,(r11+8) <== NOT EXECUTED 80278c0: e4 f1 38 00 cmpe r7,r7,r17 <== NOT EXECUTED
} if (match) { 80278c4: 44 e0 ff eb be r7,r0,8027870 <getpw_r+0x6c> fclose(fp);
80278c8: b9 80 08 00 mv r1,r12 80278cc: f8 00 72 11 calli 8044110 <fclose>
*result = pwd;
80278d0: 34 01 00 00 mvi r1,0 80278d4: 59 cb 00 00 sw (r14+0),r11
} } fclose(fp); errno = EINVAL; return -1; }
80278d8: 2b 9d 00 04 lw ra,(sp+4) 80278dc: 2b 8b 00 20 lw r11,(sp+32) 80278e0: 2b 8c 00 1c lw r12,(sp+28) 80278e4: 2b 8d 00 18 lw r13,(sp+24) 80278e8: 2b 8e 00 14 lw r14,(sp+20) 80278ec: 2b 8f 00 10 lw r15,(sp+16) 80278f0: 2b 90 00 0c lw r16,(sp+12) 80278f4: 2b 91 00 08 lw r17,(sp+8) 80278f8: 37 9c 00 20 addi sp,sp,32 80278fc: c3 a0 00 00 ret
08027440 <getpwent>: return NULL; return p; } struct passwd *getpwent(void) {
8027440: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8027444: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
if (passwd_fp == NULL)
8027448: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 802744c: 38 21 0c 38 ori r1,r1,0xc38 <== NOT EXECUTED 8027450: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8027454: 44 20 00 0b be r1,r0,8027480 <getpwent+0x40> <== NOT EXECUTED
return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
8027458: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 802745c: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 8027460: 38 42 0d 04 ori r2,r2,0xd04 <== NOT EXECUTED 8027464: 38 63 0c 3c ori r3,r3,0xc3c <== NOT EXECUTED 8027468: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 802746c: fb ff ff ab calli 8027318 <scanpw> <== NOT EXECUTED 8027470: 44 20 00 04 be r1,r0,8027480 <getpwent+0x40> <== NOT EXECUTED 8027474: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8027478: 38 21 0d 04 ori r1,r1,0xd04 <== NOT EXECUTED 802747c: e0 00 00 02 bi 8027484 <getpwent+0x44> <== NOT EXECUTED 8027480: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return NULL; return &pwent; }
8027484: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027488: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 802748c: c3 a0 00 00 ret <== NOT EXECUTED
080279b4 <getpwnam>: struct passwd *getpwnam( const char *name ) {
80279b4: 37 9c ff f8 addi sp,sp,-8 80279b8: 5b 9d 00 04 sw (sp+4),ra
struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
80279bc: 78 02 08 07 mvhi r2,0x807 80279c0: 78 03 08 07 mvhi r3,0x807 80279c4: 38 42 0d 04 ori r2,r2,0xd04 80279c8: 38 63 0c 3c ori r3,r3,0xc3c 80279cc: 34 04 00 c8 mvi r4,200 80279d0: 37 85 00 08 addi r5,sp,8 80279d4: fb ff ff eb calli 8027980 <getpwnam_r> 80279d8: 34 02 00 00 mvi r2,0
80279dc: 5c 22 00 02 bne r1,r2,80279e4 <getpwnam+0x30> <== NEVER TAKEN
return NULL; return p;
80279e0: 2b 82 00 08 lw r2,(sp+8)
}
80279e4: b8 40 08 00 mv r1,r2 80279e8: 2b 9d 00 04 lw ra,(sp+4) 80279ec: 37 9c 00 08 addi sp,sp,8 80279f0: c3 a0 00 00 ret
0802793c <getpwuid>: struct passwd *getpwuid( uid_t uid ) {
802793c: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8027940: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
8027944: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 8027948: 78 03 08 07 mvhi r3,0x807 <== NOT EXECUTED 802794c: 38 42 0d 04 ori r2,r2,0xd04 <== NOT EXECUTED 8027950: 20 21 ff ff andi r1,r1,0xffff <== NOT EXECUTED 8027954: 38 63 0c 3c ori r3,r3,0xc3c <== NOT EXECUTED 8027958: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED 802795c: 37 85 00 08 addi r5,sp,8 <== NOT EXECUTED 8027960: fb ff ff e8 calli 8027900 <getpwuid_r> <== NOT EXECUTED 8027964: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8027968: 5c 22 00 02 bne r1,r2,8027970 <getpwuid+0x34> <== NOT EXECUTED
return NULL; return p;
802796c: 2b 82 00 08 lw r2,(sp+8) <== NOT EXECUTED
}
8027970: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 8027974: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027978: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 802797c: c3 a0 00 00 ret <== NOT EXECUTED
08027900 <getpwuid_r>: struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) {
8027900: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8027904: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8027908: b8 40 48 00 mv r9,r2 <== NOT EXECUTED 802790c: b8 60 40 00 mv r8,r3 <== NOT EXECUTED 8027910: b8 80 38 00 mv r7,r4 <== NOT EXECUTED 8027914: b8 a0 30 00 mv r6,r5 <== NOT EXECUTED 8027918: 20 22 ff ff andi r2,r1,0xffff <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
802791c: b9 20 18 00 mv r3,r9 <== NOT EXECUTED 8027920: b9 00 20 00 mv r4,r8 <== NOT EXECUTED 8027924: b8 e0 28 00 mv r5,r7 <== NOT EXECUTED 8027928: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 802792c: fb ff ff b6 calli 8027804 <getpw_r> <== NOT EXECUTED
}
8027930: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027934: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8027938: c3 a0 00 00 ret <== NOT EXECUTED
080072e0 <gettimeofday>: */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) {
80072e0: 37 9c ff ec addi sp,sp,-20 80072e4: 5b 8b 00 0c sw (sp+12),r11 80072e8: 5b 8c 00 08 sw (sp+8),r12 80072ec: 5b 9d 00 04 sw (sp+4),ra 80072f0: b8 20 58 00 mv r11,r1
/* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) {
80072f4: 5c 20 00 06 bne r1,r0,800730c <gettimeofday+0x2c> <== ALWAYS TAKEN
errno = EFAULT;
80072f8: f8 00 14 91 calli 800c53c <__errno> <== NOT EXECUTED 80072fc: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8007300: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8007304: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
return -1;
8007308: e0 00 00 0f bi 8007344 <gettimeofday+0x64> <== NOT EXECUTED
{ ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level);
800730c: 90 00 60 00 rcsr r12,IE 8007310: 34 01 ff fe mvi r1,-2 8007314: a1 81 08 00 and r1,r12,r1 8007318: d0 01 00 00 wcsr IE,r1
_TOD_Get( &now );
800731c: 37 81 00 10 addi r1,sp,16 8007320: f8 00 06 4d calli 8008c54 <_TOD_Get>
_ISR_Enable(level);
8007324: 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;
8007328: 2b 82 00 10 lw r2,(sp+16)
_ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec;
800732c: 2b 81 00 14 lw r1,(sp+20)
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec;
8007330: 59 62 00 00 sw (r11+0),r2
time->tv_usec = useconds;
8007334: 34 02 03 e8 mvi r2,1000 8007338: f8 00 4c 8d calli 801a56c <__divsi3> 800733c: 59 61 00 04 sw (r11+4),r1 8007340: 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; }
8007344: 2b 9d 00 04 lw ra,(sp+4) 8007348: 2b 8b 00 0c lw r11,(sp+12) 800734c: 2b 8c 00 08 lw r12,(sp+8) 8007350: 37 9c 00 14 addi sp,sp,20 8007354: c3 a0 00 00 ret
08006470 <getuid>: * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) {
8006470: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 8006474: 38 21 d2 f0 ori r1,r1,0xd2f0 <== NOT EXECUTED 8006478: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
return _POSIX_types_Uid; }
800647c: 2c 21 00 32 lhu r1,(r1+50) <== NOT EXECUTED 8006480: c3 a0 00 00 ret <== NOT EXECUTED
0801158c <imfs_dir_open>: ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info;
801158c: 28 23 00 3c lw r3,(r1+60)
rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) {
8011590: 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;
8011594: 34 01 ff ff mvi r1,-1 8011598: 28 64 00 4c lw r4,(r3+76) 801159c: 34 03 00 01 mvi r3,1
80115a0: 5c 83 00 04 bne r4,r3,80115b0 <imfs_dir_open+0x24> <== NEVER TAKEN
if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0;
80115a4: 34 01 00 00 mvi r1,0 80115a8: 58 41 00 14 sw (r2+20),r1 80115ac: 58 41 00 10 sw (r2+16),r1
return 0; }
80115b0: c3 a0 00 00 ret
080116b4 <imfs_dir_rmnod>: int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) {
80116b4: 37 9c ff e8 addi sp,sp,-24 80116b8: 5b 8b 00 10 sw (sp+16),r11 80116bc: 5b 8c 00 0c sw (sp+12),r12 80116c0: 5b 8d 00 08 sw (sp+8),r13 80116c4: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access;
80116c8: 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 */ ) {
80116cc: b8 40 60 00 mv r12,r2 80116d0: 29 62 00 50 lw r2,(r11+80) 80116d4: 35 61 00 54 addi r1,r11,84
80116d8: 44 41 00 04 be r2,r1,80116e8 <imfs_dir_rmnod+0x34> /* * 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 );
80116dc: f8 00 05 23 calli 8012b68 <__errno> 80116e0: 34 02 00 5a mvi r2,90 80116e4: e0 00 00 08 bi 8011704 <imfs_dir_rmnod+0x50>
/* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
80116e8: 29 81 00 10 lw r1,(r12+16) 80116ec: 28 21 00 1c lw r1,(r1+28)
80116f0: 44 2b 00 03 be r1,r11,80116fc <imfs_dir_rmnod+0x48> /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL )
80116f4: 29 6d 00 5c lw r13,(r11+92)
80116f8: 45 a0 00 06 be r13,r0,8011710 <imfs_dir_rmnod+0x5c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EBUSY );
80116fc: f8 00 05 1b calli 8012b68 <__errno> 8011700: 34 02 00 10 mvi r2,16 8011704: 58 22 00 00 sw (r1+0),r2 8011708: 34 01 ff ff mvi r1,-1 801170c: e0 00 00 1d bi 8011780 <imfs_dir_rmnod+0xcc>
/* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) {
8011710: 29 61 00 08 lw r1,(r11+8)
8011714: 44 2d 00 04 be r1,r13,8011724 <imfs_dir_rmnod+0x70>
8011718: b9 60 08 00 mv r1,r11 801171c: fb ff cd 98 calli 8004d7c <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL;
8011720: 59 6d 00 08 sw (r11+8),r13
/* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--;
8011724: 2d 63 00 34 lhu r3,(r11+52)
IMFS_update_ctime( the_jnode );
8011728: 34 02 00 00 mvi r2,0 801172c: 37 81 00 14 addi r1,sp,20
/* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--;
8011730: 34 63 ff ff addi r3,r3,-1 8011734: 0d 63 00 34 sh (r11+52),r3
IMFS_update_ctime( the_jnode );
8011738: fb ff c4 c8 calli 8002a58 <gettimeofday> 801173c: 2b 81 00 14 lw r1,(sp+20) 8011740: 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) ) {
8011744: b9 60 08 00 mv r1,r11 8011748: fb ff ee 7b calli 800d134 <rtems_libio_is_file_open>
801174c: 5c 20 00 0c bne r1,r0,801177c <imfs_dir_rmnod+0xc8>
8011750: 2d 62 00 34 lhu r2,(r11+52)
8011754: 5c 41 00 0a bne r2,r1,801177c <imfs_dir_rmnod+0xc8> /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access )
8011758: 78 01 08 02 mvhi r1,0x802 801175c: 38 21 40 f8 ori r1,r1,0x40f8 8011760: 28 21 00 00 lw r1,(r1+0) 8011764: 29 83 00 00 lw r3,(r12+0) 8011768: 28 24 00 04 lw r4,(r1+4)
801176c: 5c 83 00 02 bne r4,r3,8011774 <imfs_dir_rmnod+0xc0> <== ALWAYS TAKEN
rtems_filesystem_current.node_access = NULL;
8011770: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED
/* * Free memory associated with a memory file. */ free( the_jnode );
8011774: b9 60 08 00 mv r1,r11 8011778: fb ff c4 8a calli 80029a0 <free> 801177c: 34 01 00 00 mvi r1,0
} return 0; }
8011780: 2b 9d 00 04 lw ra,(sp+4) 8011784: 2b 8b 00 10 lw r11,(sp+16) 8011788: 2b 8c 00 0c lw r12,(sp+12) 801178c: 2b 8d 00 08 lw r13,(sp+8) 8011790: 37 9c 00 18 addi sp,sp,24 8011794: c3 a0 00 00 ret
08027490 <init_etc_passwd_group>: /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) {
8027490: 37 9c ff f4 addi sp,sp,-12 8027494: 5b 8b 00 0c sw (sp+12),r11 8027498: 5b 8c 00 08 sw (sp+8),r12 802749c: 5b 9d 00 04 sw (sp+4),ra
FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted)
80274a0: 78 03 08 07 mvhi r3,0x807 80274a4: 38 63 0c 34 ori r3,r3,0xc34 80274a8: 40 6b 00 00 lbu r11,(r3+0)
80274ac: 5d 60 00 2f bne r11,r0,8027568 <init_etc_passwd_group+0xd8> return; etc_passwd_initted = 1;
80274b0: 34 04 00 01 mvi r4,1
mkdir("/etc", 0777);
80274b4: 78 01 08 06 mvhi r1,0x806 80274b8: 34 02 01 ff mvi r2,511
FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1;
80274bc: 30 64 00 00 sb (r3+0),r4
mkdir("/etc", 0777);
80274c0: 38 21 13 d4 ori r1,r1,0x13d4 80274c4: fb ff 7d f1 calli 8006c88 <mkdir>
/* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) {
80274c8: 78 01 08 06 mvhi r1,0x806 80274cc: 78 02 08 06 mvhi r2,0x806 80274d0: 38 21 14 54 ori r1,r1,0x1454 80274d4: 38 42 91 98 ori r2,r2,0x9198 80274d8: f8 00 75 b3 calli 8044ba4 <fopen> 80274dc: b8 20 60 00 mv r12,r1
80274e0: 5c 2b 00 0d bne r1,r11,8027514 <init_etc_passwd_group+0x84><== NEVER TAKEN
fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
80274e4: 78 01 08 06 mvhi r1,0x806 80274e8: 78 02 08 06 mvhi r2,0x806 80274ec: 38 21 14 54 ori r1,r1,0x1454 80274f0: 38 42 26 08 ori r2,r2,0x2608 80274f4: f8 00 75 ac calli 8044ba4 <fopen> 80274f8: b8 20 58 00 mv r11,r1
80274fc: 44 2c 00 07 be r1,r12,8027518 <init_etc_passwd_group+0x88> <== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
8027500: 78 01 08 06 mvhi r1,0x806 8027504: 38 21 63 c4 ori r1,r1,0x63c4 8027508: b9 60 10 00 mv r2,r11 802750c: f8 00 76 29 calli 8044db0 <fputs>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp);
8027510: b9 60 08 00 mv r1,r11 8027514: f8 00 72 ff calli 8044110 <fclose>
} /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) {
8027518: 78 01 08 06 mvhi r1,0x806 802751c: 78 02 08 06 mvhi r2,0x806 8027520: 38 21 15 04 ori r1,r1,0x1504 8027524: 38 42 91 98 ori r2,r2,0x9198 8027528: f8 00 75 9f calli 8044ba4 <fopen> 802752c: b8 20 60 00 mv r12,r1
8027530: 5c 20 00 0d bne r1,r0,8027564 <init_etc_passwd_group+0xd4> <== NEVER TAKEN
fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) {
8027534: 78 01 08 06 mvhi r1,0x806 8027538: 78 02 08 06 mvhi r2,0x806 802753c: 38 21 15 04 ori r1,r1,0x1504 8027540: 38 42 26 08 ori r2,r2,0x2608 8027544: f8 00 75 98 calli 8044ba4 <fopen> 8027548: b8 20 58 00 mv r11,r1
802754c: 44 2c 00 07 be r1,r12,8027568 <init_etc_passwd_group+0xd8> <== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
8027550: 78 01 08 06 mvhi r1,0x806 8027554: 38 21 64 2c ori r1,r1,0x642c 8027558: b9 60 10 00 mv r2,r11 802755c: f8 00 76 15 calli 8044db0 <fputs>
"rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp);
8027560: b9 60 08 00 mv r1,r11 8027564: f8 00 72 eb calli 8044110 <fclose>
} }
8027568: 2b 9d 00 04 lw ra,(sp+4) 802756c: 2b 8b 00 0c lw r11,(sp+12) 8027570: 2b 8c 00 08 lw r12,(sp+8) 8027574: 37 9c 00 0c addi sp,sp,12 8027578: c3 a0 00 00 ret
0800559c <ioctl>: int ioctl( int fd, ioctl_command_t command, ... ) {
800559c: 37 9c ff d4 addi sp,sp,-44 80055a0: 5b 8b 00 10 sw (sp+16),r11 80055a4: 5b 8c 00 0c sw (sp+12),r12 80055a8: 5b 8d 00 08 sw (sp+8),r13 80055ac: 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 );
80055b0: 78 09 08 02 mvhi r9,0x802 80055b4: 39 29 50 10 ori r9,r9,0x5010 80055b8: 29 29 00 00 lw r9,(r9+0)
int ioctl( int fd, ioctl_command_t command, ... ) {
80055bc: 5b 83 00 18 sw (sp+24),r3 80055c0: 5b 84 00 1c sw (sp+28),r4 80055c4: 5b 85 00 20 sw (sp+32),r5 80055c8: 5b 86 00 24 sw (sp+36),r6 80055cc: 5b 87 00 28 sw (sp+40),r7 80055d0: 5b 88 00 2c sw (sp+44),r8 80055d4: 5b 82 00 14 sw (sp+20),r2 80055d8: 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 ); 80055dc: 55 21 00 02 bgu r9,r1,80055e4 <ioctl+0x48>
80055e0: e0 00 00 11 bi 8005624 <ioctl+0x88>
iop = rtems_libio_iop( fd );
80055e4: 34 02 00 03 mvi r2,3 80055e8: fb ff ed 80 calli 8000be8 <__ashlsi3> 80055ec: 34 02 00 03 mvi r2,3 80055f0: 78 0b 08 02 mvhi r11,0x802 80055f4: b8 20 68 00 mv r13,r1 80055f8: 39 6b 57 f4 ori r11,r11,0x57f4 80055fc: fb ff ed 7b calli 8000be8 <__ashlsi3> 8005600: 29 62 00 00 lw r2,(r11+0) 8005604: b5 a1 08 00 add r1,r13,r1 8005608: b4 41 08 00 add r1,r2,r1
rtems_libio_check_is_open(iop);
800560c: 28 22 00 18 lw r2,(r1+24) 8005610: 20 42 01 00 andi r2,r2,0x100
8005614: 44 40 00 04 be r2,r0,8005624 <ioctl+0x88> <== NEVER TAKEN
/* * Now process the ioctl(). */ if ( !iop->handlers )
8005618: 28 24 00 40 lw r4,(r1+64)
iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *);
800561c: 2b 83 00 18 lw r3,(sp+24)
/* * Now process the ioctl(). */ if ( !iop->handlers )
8005620: 5c 80 00 04 bne r4,r0,8005630 <ioctl+0x94> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
8005624: f8 00 36 8a calli 801304c <__errno> 8005628: 34 02 00 09 mvi r2,9 800562c: e0 00 00 05 bi 8005640 <ioctl+0xa4>
if ( !iop->handlers->ioctl_h )
8005630: 28 84 00 10 lw r4,(r4+16)
8005634: 5c 80 00 06 bne r4,r0,800564c <ioctl+0xb0> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
8005638: f8 00 36 85 calli 801304c <__errno> <== NOT EXECUTED 800563c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8005640: 58 22 00 00 sw (r1+0),r2 8005644: 34 01 ff ff mvi r1,-1 8005648: e0 00 00 03 bi 8005654 <ioctl+0xb8>
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
800564c: b9 80 10 00 mv r2,r12 8005650: d8 80 00 00 call r4
return rc; }
8005654: 2b 9d 00 04 lw ra,(sp+4) 8005658: 2b 8b 00 10 lw r11,(sp+16) 800565c: 2b 8c 00 0c lw r12,(sp+12) 8005660: 2b 8d 00 08 lw r13,(sp+8) 8005664: 37 9c 00 2c addi sp,sp,44 8005668: c3 a0 00 00 ret
080044c8 <iproc>: /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) {
80044c8: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED 80044cc: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 80044d0: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 80044d4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 80044d8: b8 40 58 00 mv r11,r2 <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
80044dc: 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) {
80044e0: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
80044e4: 20 41 00 20 andi r1,r2,0x20 <== NOT EXECUTED 80044e8: 44 20 00 02 be r1,r0,80044f0 <iproc+0x28> <== NOT EXECUTED
c &= 0x7f;
80044ec: 21 8c 00 7f andi r12,r12,0x7f <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
80044f0: 20 41 02 00 andi r1,r2,0x200 <== NOT EXECUTED 80044f4: 44 20 00 0c be r1,r0,8004524 <iproc+0x5c> <== NOT EXECUTED
c = tolower (c);
80044f8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80044fc: 38 21 53 0c ori r1,r1,0x530c <== NOT EXECUTED 8004500: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 8004504: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004508: b4 6c 60 00 add r12,r3,r12 <== NOT EXECUTED 800450c: 41 84 00 01 lbu r4,(r12+1) <== NOT EXECUTED 8004510: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8004514: 20 84 00 03 andi r4,r4,0x3 <== NOT EXECUTED 8004518: 5c 83 00 02 bne r4,r3,8004520 <iproc+0x58> <== NOT EXECUTED 800451c: 34 21 00 20 addi r1,r1,32 <== NOT EXECUTED 8004520: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED
if (c == '\r') {
8004524: 34 01 00 0d mvi r1,13 <== NOT EXECUTED 8004528: 5d 81 00 07 bne r12,r1,8004544 <iproc+0x7c> <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
800452c: 20 41 00 80 andi r1,r2,0x80 <== NOT EXECUTED 8004530: 5c 20 00 4f bne r1,r0,800466c <iproc+0x1a4> <== NOT EXECUTED
return 0; if (tty->termios.c_iflag & ICRNL)
8004534: 20 42 01 00 andi r2,r2,0x100 <== NOT EXECUTED 8004538: 44 41 00 0a be r2,r1,8004560 <iproc+0x98> <== NOT EXECUTED 800453c: 34 0c 00 0a mvi r12,10 <== NOT EXECUTED 8004540: e0 00 00 08 bi 8004560 <iproc+0x98> <== NOT EXECUTED
c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
8004544: 34 03 00 0a mvi r3,10 <== NOT EXECUTED 8004548: 5d 83 00 05 bne r12,r3,800455c <iproc+0x94> <== NOT EXECUTED 800454c: 20 42 00 40 andi r2,r2,0x40 <== NOT EXECUTED 8004550: 44 40 00 04 be r2,r0,8004560 <iproc+0x98> <== NOT EXECUTED 8004554: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 8004558: e0 00 00 02 bi 8004560 <iproc+0x98> <== NOT EXECUTED
c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
800455c: 45 80 00 30 be r12,r0,800461c <iproc+0x154> <== NOT EXECUTED 8004560: 29 62 00 3c lw r2,(r11+60) <== NOT EXECUTED 8004564: 20 41 00 02 andi r1,r2,0x2 <== NOT EXECUTED 8004568: 44 20 00 2d be r1,r0,800461c <iproc+0x154> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
800456c: 41 61 00 43 lbu r1,(r11+67) <== NOT EXECUTED 8004570: 5c 2c 00 04 bne r1,r12,8004580 <iproc+0xb8> <== NOT EXECUTED
erase (tty, 0);
8004574: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8004578: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800457c: e0 00 00 05 bi 8004590 <iproc+0xc8> <== NOT EXECUTED
return 0; } else if (c == tty->termios.c_cc[VKILL]) {
8004580: 41 61 00 44 lbu r1,(r11+68) <== NOT EXECUTED 8004584: 5c 2c 00 05 bne r1,r12,8004598 <iproc+0xd0> <== NOT EXECUTED
erase (tty, 1);
8004588: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800458c: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8004590: fb ff ff 49 calli 80042b4 <erase> <== NOT EXECUTED 8004594: e0 00 00 36 bi 800466c <iproc+0x1a4> <== NOT EXECUTED
return 0; } else if (c == tty->termios.c_cc[VEOF]) {
8004598: 41 63 00 45 lbu r3,(r11+69) <== NOT EXECUTED 800459c: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 80045a0: 44 6c 00 34 be r3,r12,8004670 <iproc+0x1a8> <== NOT EXECUTED
return 1; } else if (c == '\n') {
80045a4: 34 01 00 0a mvi r1,10 <== NOT EXECUTED 80045a8: 5d 81 00 0f bne r12,r1,80045e4 <iproc+0x11c> <== NOT EXECUTED
if (tty->termios.c_lflag & (ECHO | ECHONL))
80045ac: 20 42 00 48 andi r2,r2,0x48 <== NOT EXECUTED 80045b0: 44 40 00 04 be r2,r0,80045c0 <iproc+0xf8> <== NOT EXECUTED
echo (c, tty);
80045b4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80045b8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80045bc: fb ff ff 15 calli 8004210 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
80045c0: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED 80045c4: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED 80045c8: 34 03 00 0a mvi r3,10 <== NOT EXECUTED 80045cc: 34 41 00 01 addi r1,r2,1 <== NOT EXECUTED 80045d0: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED 80045d4: 30 43 00 00 sb (r2+0),r3 <== NOT EXECUTED 80045d8: 59 61 00 20 sw (r11+32),r1 <== NOT EXECUTED 80045dc: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
return 1;
80045e0: e0 00 00 24 bi 8004670 <iproc+0x1a8> <== NOT EXECUTED
} else if ((c == tty->termios.c_cc[VEOL])
80045e4: 41 61 00 4c lbu r1,(r11+76) <== NOT EXECUTED 80045e8: 44 2c 00 03 be r1,r12,80045f4 <iproc+0x12c> <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
80045ec: 41 61 00 51 lbu r1,(r11+81) <== NOT EXECUTED 80045f0: 5c 2c 00 0b bne r1,r12,800461c <iproc+0x154> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
80045f4: 20 42 00 08 andi r2,r2,0x8 <== NOT EXECUTED 80045f8: 44 40 00 04 be r2,r0,8004608 <iproc+0x140> <== NOT EXECUTED
echo (c, tty);
80045fc: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004600: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004604: fb ff ff 03 calli 8004210 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
8004608: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED 800460c: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8004610: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED 8004614: b4 61 10 00 add r2,r3,r1 <== NOT EXECUTED 8004618: e0 00 00 11 bi 800465c <iproc+0x194> <== NOT EXECUTED
} /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) {
800461c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8004620: 38 21 52 34 ori r1,r1,0x5234 <== NOT EXECUTED 8004624: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8004628: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED 800462c: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 8004630: 4c 41 00 0f bge r2,r1,800466c <iproc+0x1a4> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
8004634: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 8004638: 20 21 00 08 andi r1,r1,0x8 <== NOT EXECUTED 800463c: 44 20 00 04 be r1,r0,800464c <iproc+0x184> <== NOT EXECUTED
echo (c, tty);
8004640: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8004644: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004648: fb ff fe f2 calli 8004210 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
800464c: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED 8004650: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED 8004654: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8004658: 34 62 00 01 addi r2,r3,1 <== NOT EXECUTED 800465c: b4 83 18 00 add r3,r4,r3 <== NOT EXECUTED 8004660: 30 6c 00 00 sb (r3+0),r12 <== NOT EXECUTED 8004664: 59 62 00 20 sw (r11+32),r2 <== NOT EXECUTED 8004668: e0 00 00 02 bi 8004670 <iproc+0x1a8> <== NOT EXECUTED 800466c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
} return 0; }
8004670: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004674: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 8004678: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 800467c: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 8004680: c3 a0 00 00 ret <== NOT EXECUTED
0800be04 <killinfo>: int killinfo( pid_t pid, int sig, const union sigval *value ) {
800be04: 37 9c ff dc addi sp,sp,-36 800be08: 5b 8b 00 18 sw (sp+24),r11 800be0c: 5b 8c 00 14 sw (sp+20),r12 800be10: 5b 8d 00 10 sw (sp+16),r13 800be14: 5b 8e 00 0c sw (sp+12),r14 800be18: 5b 8f 00 08 sw (sp+8),r15 800be1c: 5b 9d 00 04 sw (sp+4),ra 800be20: b8 20 60 00 mv r12,r1 800be24: b8 40 58 00 mv r11,r2 800be28: b8 60 68 00 mv r13,r3
POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() )
800be2c: fb ff fb 31 calli 800aaf0 <getpid>
800be30: 45 81 00 04 be r12,r1,800be40 <killinfo+0x3c> rtems_set_errno_and_return_minus_one( ESRCH );
800be34: f8 00 01 c2 calli 800c53c <__errno> 800be38: 34 02 00 03 mvi r2,3 800be3c: e0 00 00 04 bi 800be4c <killinfo+0x48>
/* * Validate the signal passed. */ if ( !sig ) 800be40: 5d 60 00 06 bne r11,r0,800be58 <killinfo+0x54> rtems_set_errno_and_return_minus_one( EINVAL );
800be44: f8 00 01 be calli 800c53c <__errno> 800be48: 34 02 00 16 mvi r2,22 800be4c: 58 22 00 00 sw (r1+0),r2 800be50: 34 01 ff ff mvi r1,-1 800be54: e0 00 00 96 bi 800c0ac <killinfo+0x2a8>
static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 );
800be58: 35 6f ff ff addi r15,r11,-1
if ( !is_valid_signo(sig) )
800be5c: 34 01 00 1f mvi r1,31
800be60: 50 2f 00 02 bgeu r1,r15,800be68 <killinfo+0x64>
800be64: e3 ff ff f8 bi 800be44 <killinfo+0x40>
rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
800be68: b5 6b 08 00 add r1,r11,r11 800be6c: 34 02 00 02 mvi r2,2 800be70: b4 2b 08 00 add r1,r1,r11 800be74: 78 0c 08 01 mvhi r12,0x801 800be78: fb ff d0 de calli 80001f0 <__ashlsi3> 800be7c: 39 8c dd b0 ori r12,r12,0xddb0 800be80: b5 81 08 00 add r1,r12,r1 800be84: 28 22 00 08 lw r2,(r1+8) 800be88: 34 0e 00 01 mvi r14,1 800be8c: 34 01 00 00 mvi r1,0
800be90: 44 4e 00 87 be r2,r14,800c0ac <killinfo+0x2a8> /* * 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 ) )
800be94: 65 62 00 04 cmpei r2,r11,4 800be98: 65 61 00 08 cmpei r1,r11,8 800be9c: b8 41 08 00 or r1,r2,r1
800bea0: 5c 20 00 03 bne r1,r0,800beac <killinfo+0xa8>
800bea4: 34 01 00 0b mvi r1,11
800bea8: 5d 61 00 05 bne r11,r1,800bebc <killinfo+0xb8> return pthread_kill( pthread_self(), sig );
800beac: f8 00 01 6c calli 800c45c <pthread_self> 800beb0: b9 60 10 00 mv r2,r11 800beb4: f8 00 01 1e calli 800c32c <pthread_kill> 800beb8: e0 00 00 7d bi 800c0ac <killinfo+0x2a8>
static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1);
800bebc: b9 e0 10 00 mv r2,r15 800bec0: b9 c0 08 00 mv r1,r14 800bec4: fb ff d0 cb calli 80001f0 <__ashlsi3>
/* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER;
800bec8: 5b 8e 00 20 sw (sp+32),r14
/* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig;
800becc: 5b 8b 00 1c sw (sp+28),r11 800bed0: b8 20 60 00 mv r12,r1
siginfo->si_code = SI_USER; if ( !value ) { 800bed4: 45 a0 00 02 be r13,r0,800bedc <killinfo+0xd8> siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value;
800bed8: 29 ad 00 00 lw r13,(r13+0) 800bedc: 78 01 08 01 mvhi r1,0x801 800bee0: 5b 8d 00 24 sw (sp+36),r13 800bee4: 38 21 d8 a4 ori r1,r1,0xd8a4 800bee8: 28 22 00 00 lw r2,(r1+0) 800beec: 34 42 00 01 addi r2,r2,1 800bef0: 58 22 00 00 sw (r1+0),r2
/* * 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;
800bef4: 78 01 08 01 mvhi r1,0x801 800bef8: 38 21 d9 60 ori r1,r1,0xd960 800befc: 28 22 00 00 lw r2,(r1+0)
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
800bf00: 28 41 01 2c lw r1,(r2+300) 800bf04: 28 21 00 cc lw r1,(r1+204) 800bf08: a4 20 08 00 not r1,r1 800bf0c: a1 81 08 00 and r1,r12,r1
800bf10: 5c 20 00 3f bne r1,r0,800c00c <killinfo+0x208> /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ;
800bf14: 78 01 08 01 mvhi r1,0x801 800bf18: 38 21 df 3c ori r1,r1,0xdf3c
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
800bf1c: 34 24 00 04 addi r4,r1,4 800bf20: 28 23 00 00 lw r3,(r1+0) 800bf24: e0 00 00 0b bi 800bf50 <killinfo+0x14c>
#endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask)
800bf28: 28 61 00 30 lw r1,(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; api = the_thread->API_Extensions[ THREAD_API_POSIX ];
800bf2c: 28 65 01 2c lw r5,(r3+300)
for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node;
800bf30: b8 60 10 00 mv r2,r3
#endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask)
800bf34: a1 81 08 00 and r1,r12,r1
800bf38: 5c 20 00 35 bne r1,r0,800c00c <killinfo+0x208> /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask)
800bf3c: 28 a5 00 cc lw r5,(r5+204) 800bf40: a4 a0 28 00 not r5,r5 800bf44: a1 85 28 00 and r5,r12,r5
800bf48: 5c a1 00 31 bne r5,r1,800c00c <killinfo+0x208> 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 ) {
800bf4c: 28 63 00 00 lw r3,(r3+0)
800bf50: 5c 64 ff f6 bne r3,r4,800bf28 <killinfo+0x124> * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1;
800bf54: 78 01 08 01 mvhi r1,0x801 800bf58: 38 21 d0 c0 ori r1,r1,0xd0c0 800bf5c: 40 25 00 00 lbu r5,(r1+0) 800bf60: 78 02 08 01 mvhi r2,0x801 800bf64: 38 42 d8 44 ori r2,r2,0xd844
continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
800bf68: 78 04 10 00 mvhi r4,0x1000
* NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1;
800bf6c: 34 a5 00 01 addi r5,r5,1
continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
800bf70: 38 84 00 00 ori r4,r4,0x0
*/ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo(
800bf74: 34 4d 00 0c addi r13,r2,12 800bf78: 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 ] )
800bf7c: 28 43 00 00 lw r3,(r2+0)
800bf80: 44 60 00 1f be r3,r0,800bffc <killinfo+0x1f8> continue; the_info = _Objects_Information_table[ the_api ][ 1 ];
800bf84: 28 63 00 04 lw r3,(r3+4)
*/ if ( !the_info ) continue; #endif maximum = the_info->maximum;
800bf88: 34 08 00 01 mvi r8,1 800bf8c: 28 67 00 1c lw r7,(r3+28) 800bf90: 2c 6e 00 10 lhu r14,(r3+16)
object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) {
800bf94: e0 00 00 19 bi 800bff8 <killinfo+0x1f4>
the_thread = (Thread_Control *) object_table[ index ];
800bf98: 28 e3 00 04 lw r3,(r7+4)
if ( !the_thread ) 800bf9c: 44 60 00 11 be r3,r0,800bfe0 <killinfo+0x1dc> /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority )
800bfa0: 28 66 00 14 lw r6,(r3+20)
800bfa4: 54 c5 00 0f bgu r6,r5,800bfe0 <killinfo+0x1dc> DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ];
800bfa8: 28 69 01 2c lw r9,(r3+300) 800bfac: 29 29 00 cc lw r9,(r9+204) 800bfb0: a5 20 48 00 not r9,r9 800bfb4: a1 89 48 00 and r9,r12,r9
800bfb8: 45 20 00 0a be r9,r0,800bfe0 <killinfo+0x1dc> * * 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 ) { 800bfbc: 54 a6 00 0b bgu r5,r6,800bfe8 <killinfo+0x1e4> * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) {
800bfc0: 28 29 00 10 lw r9,(r1+16)
800bfc4: 45 20 00 07 be r9,r0,800bfe0 <killinfo+0x1dc> <== NEVER TAKEN
/* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) {
800bfc8: 28 6a 00 10 lw r10,(r3+16)
800bfcc: 45 40 00 07 be r10,r0,800bfe8 <killinfo+0x1e4> continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
800bfd0: a1 24 48 00 and r9,r9,r4
800bfd4: 5d 20 00 03 bne r9,r0,800bfe0 <killinfo+0x1dc> DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
800bfd8: a1 44 50 00 and r10,r10,r4
800bfdc: 5d 49 00 03 bne r10,r9,800bfe8 <killinfo+0x1e4>
800bfe0: b8 a0 30 00 mv r6,r5 800bfe4: e0 00 00 02 bi 800bfec <killinfo+0x1e8> 800bfe8: b8 60 08 00 mv r1,r3
#endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) {
800bfec: 35 08 00 01 addi r8,r8,1 800bff0: 34 e7 00 04 addi r7,r7,4 800bff4: b8 c0 28 00 mv r5,r6
800bff8: 51 c8 ff e8 bgeu r14,r8,800bf98 <killinfo+0x194>
800bffc: 34 42 00 04 addi r2,r2,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++) { 800c000: 5c 4d ff df bne r2,r13,800bf7c <killinfo+0x178> } } } } if ( interested ) { 800c004: 44 20 00 09 be r1,r0,800c028 <killinfo+0x224>
800c008: b8 20 10 00 mv r2,r1
* 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;
800c00c: 34 01 00 01 mvi r1,1 800c010: 30 41 00 74 sb (r2+116),r1
/* * 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 ) ) {
800c014: 37 83 00 1c addi r3,sp,28 800c018: b8 40 08 00 mv r1,r2 800c01c: b9 60 10 00 mv r2,r11 800c020: f8 00 00 6e calli 800c1d8 <_POSIX_signals_Unblock_thread>
800c024: 5c 20 00 20 bne r1,r0,800c0a4 <killinfo+0x2a0> /* * 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 );
800c028: b9 80 08 00 mv r1,r12 800c02c: f8 00 00 58 calli 800c18c <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
800c030: b5 6b 08 00 add r1,r11,r11 800c034: b4 2b 08 00 add r1,r1,r11 800c038: 34 02 00 02 mvi r2,2 800c03c: 78 0b 08 01 mvhi r11,0x801 800c040: fb ff d0 6c calli 80001f0 <__ashlsi3> 800c044: 39 6b dd b0 ori r11,r11,0xddb0 800c048: b5 61 58 00 add r11,r11,r1 800c04c: 29 62 00 00 lw r2,(r11+0) 800c050: b8 20 60 00 mv r12,r1 800c054: 34 01 00 02 mvi r1,2
800c058: 5c 41 00 13 bne r2,r1,800c0a4 <killinfo+0x2a0> psiginfo = (POSIX_signals_Siginfo_node *)
800c05c: 78 01 08 01 mvhi r1,0x801 800c060: 38 21 df 30 ori r1,r1,0xdf30 800c064: fb ff f2 67 calli 8008a00 <_Chain_Get> 800c068: b8 20 58 00 mv r11,r1
_Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 800c06c: 5c 20 00 05 bne r1,r0,800c080 <killinfo+0x27c> _Thread_Enable_dispatch();
800c070: fb ff e0 a1 calli 80042f4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
800c074: f8 00 01 32 calli 800c53c <__errno> 800c078: 34 02 00 0b mvi r2,11 800c07c: e3 ff ff 74 bi 800be4c <killinfo+0x48>
} psiginfo->Info = *siginfo;
800c080: 37 82 00 1c addi r2,sp,28 800c084: 34 03 00 0c mvi r3,12 800c088: 34 21 00 08 addi r1,r1,8 800c08c: f8 00 03 d2 calli 800cfd4 <memcpy>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
800c090: 78 03 08 01 mvhi r3,0x801 800c094: 38 63 df a8 ori r3,r3,0xdfa8 800c098: b5 83 08 00 add r1,r12,r3 800c09c: b9 60 10 00 mv r2,r11 800c0a0: fb ff da 87 calli 8002abc <_Chain_Append>
} DEBUG_STEP("\n"); _Thread_Enable_dispatch();
800c0a4: fb ff e0 94 calli 80042f4 <_Thread_Enable_dispatch> 800c0a8: 34 01 00 00 mvi r1,0
return 0; }
800c0ac: 2b 9d 00 04 lw ra,(sp+4) 800c0b0: 2b 8b 00 18 lw r11,(sp+24) 800c0b4: 2b 8c 00 14 lw r12,(sp+20) 800c0b8: 2b 8d 00 10 lw r13,(sp+16) 800c0bc: 2b 8e 00 0c lw r14,(sp+12) 800c0c0: 2b 8f 00 08 lw r15,(sp+8) 800c0c4: 37 9c 00 24 addi sp,sp,36 800c0c8: c3 a0 00 00 ret
08027ac4 <link>: int link( const char *existing, const char *new ) {
8027ac4: 37 9c ff c4 addi sp,sp,-60 8027ac8: 5b 8b 00 10 sw (sp+16),r11 8027acc: 5b 8c 00 0c sw (sp+12),r12 8027ad0: 5b 8d 00 08 sw (sp+8),r13 8027ad4: 5b 9d 00 04 sw (sp+4),ra 8027ad8: b8 20 58 00 mv r11,r1 8027adc: b8 40 60 00 mv r12,r2
/* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
8027ae0: f8 00 8f 2b calli 804b78c <strlen> 8027ae4: b8 20 10 00 mv r2,r1 8027ae8: 34 03 00 00 mvi r3,0 8027aec: b9 60 08 00 mv r1,r11 8027af0: 37 84 00 28 addi r4,sp,40 8027af4: 34 05 00 01 mvi r5,1 8027af8: fb ff 79 c7 calli 8006214 <rtems_filesystem_evaluate_path>
0, &existing_loc, true ); if ( result != 0 )
8027afc: 34 0b ff ff mvi r11,-1
8027b00: 5c 20 00 68 bne r1,r0,8027ca0 <link+0x1dc> /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc );
8027b04: 41 83 00 00 lbu r3,(r12+0) 8027b08: 64 6b 00 5c cmpei r11,r3,92 8027b0c: 64 62 00 2f cmpei r2,r3,47 8027b10: b9 62 58 00 or r11,r11,r2
8027b14: 5d 61 00 02 bne r11,r1,8027b1c <link+0x58>
8027b18: 5c 6b 00 0a bne r3,r11,8027b40 <link+0x7c> <== ALWAYS TAKEN
8027b1c: 78 03 08 06 mvhi r3,0x806 8027b20: 38 63 d2 f0 ori r3,r3,0xd2f0 8027b24: 28 62 00 00 lw r2,(r3+0) 8027b28: 37 81 00 14 addi r1,sp,20 8027b2c: 34 03 00 14 mvi r3,20 8027b30: 34 42 00 18 addi r2,r2,24 8027b34: f8 00 7f b8 calli 8047a14 <memcpy> 8027b38: 34 0b 00 01 mvi r11,1 8027b3c: e0 00 00 08 bi 8027b5c <link+0x98> 8027b40: 78 03 08 06 mvhi r3,0x806 8027b44: 38 63 d2 f0 ori r3,r3,0xd2f0 8027b48: 28 62 00 00 lw r2,(r3+0) 8027b4c: 37 81 00 14 addi r1,sp,20 8027b50: 34 03 00 14 mvi r3,20 8027b54: 34 42 00 04 addi r2,r2,4 8027b58: f8 00 7f af calli 8047a14 <memcpy>
if ( !parent_loc.ops->evalformake_h ) {
8027b5c: 2b 81 00 20 lw r1,(sp+32) 8027b60: 28 24 00 04 lw r4,(r1+4)
8027b64: 5c 80 00 07 bne r4,r0,8027b80 <link+0xbc> <== ALWAYS TAKEN
rtems_filesystem_freenode( &existing_loc );
8027b68: 2b 81 00 34 lw r1,(sp+52) <== NOT EXECUTED 8027b6c: 44 24 00 37 be r1,r4,8027c48 <link+0x184> <== NOT EXECUTED 8027b70: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8027b74: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED 8027b78: 5c 40 00 33 bne r2,r0,8027c44 <link+0x180> <== NOT EXECUTED 8027b7c: e0 00 00 33 bi 8027c48 <link+0x184> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
8027b80: 37 8d 00 14 addi r13,sp,20 8027b84: b5 8b 08 00 add r1,r12,r11 8027b88: b9 a0 10 00 mv r2,r13 8027b8c: 37 83 00 3c addi r3,sp,60 8027b90: d8 80 00 00 call r4 8027b94: b8 20 58 00 mv r11,r1
if ( result != 0 ) { 8027b98: 44 20 00 0b be r1,r0,8027bc4 <link+0x100> rtems_filesystem_freenode( &existing_loc );
8027b9c: 2b 81 00 34 lw r1,(sp+52)
8027ba0: 44 20 00 05 be r1,r0,8027bb4 <link+0xf0> <== NEVER TAKEN
8027ba4: 28 22 00 1c lw r2,(r1+28)
8027ba8: 44 40 00 03 be r2,r0,8027bb4 <link+0xf0> <== NEVER TAKEN
8027bac: 37 81 00 28 addi r1,sp,40 8027bb0: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( result );
8027bb4: f8 00 70 f5 calli 8043f88 <__errno> 8027bb8: 58 2b 00 00 sw (r1+0),r11 8027bbc: 34 0b ff ff mvi r11,-1 8027bc0: e0 00 00 38 bi 8027ca0 <link+0x1dc>
/* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
8027bc4: 2b 81 00 38 lw r1,(sp+56) 8027bc8: 2b 82 00 24 lw r2,(sp+36)
8027bcc: 44 41 00 10 be r2,r1,8027c0c <link+0x148> rtems_filesystem_freenode( &existing_loc );
8027bd0: 2b 81 00 34 lw r1,(sp+52)
8027bd4: 44 20 00 05 be r1,r0,8027be8 <link+0x124> <== NEVER TAKEN
8027bd8: 28 22 00 1c lw r2,(r1+28)
8027bdc: 44 40 00 03 be r2,r0,8027be8 <link+0x124> <== NEVER TAKEN
8027be0: 37 81 00 28 addi r1,sp,40 8027be4: d8 40 00 00 call r2
rtems_filesystem_freenode( &parent_loc );
8027be8: 2b 81 00 20 lw r1,(sp+32)
8027bec: 44 20 00 05 be r1,r0,8027c00 <link+0x13c> <== NEVER TAKEN
8027bf0: 28 22 00 1c lw r2,(r1+28)
8027bf4: 44 40 00 03 be r2,r0,8027c00 <link+0x13c> <== NEVER TAKEN
8027bf8: 37 81 00 14 addi r1,sp,20 8027bfc: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( EXDEV );
8027c00: f8 00 70 e2 calli 8043f88 <__errno> 8027c04: 34 02 00 12 mvi r2,18 8027c08: e0 00 00 12 bi 8027c50 <link+0x18c>
} if ( !parent_loc.ops->link_h ) {
8027c0c: 2b 81 00 20 lw r1,(sp+32) 8027c10: 28 24 00 08 lw r4,(r1+8)
8027c14: 5c 80 00 11 bne r4,r0,8027c58 <link+0x194> <== ALWAYS TAKEN
rtems_filesystem_freenode( &existing_loc );
8027c18: 2b 81 00 34 lw r1,(sp+52) <== NOT EXECUTED 8027c1c: 44 24 00 05 be r1,r4,8027c30 <link+0x16c> <== NOT EXECUTED 8027c20: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8027c24: 44 44 00 03 be r2,r4,8027c30 <link+0x16c> <== NOT EXECUTED 8027c28: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED 8027c2c: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
8027c30: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8027c34: 44 20 00 05 be r1,r0,8027c48 <link+0x184> <== NOT EXECUTED 8027c38: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8027c3c: 44 40 00 03 be r2,r0,8027c48 <link+0x184> <== NOT EXECUTED 8027c40: 37 81 00 14 addi r1,sp,20 <== NOT EXECUTED 8027c44: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8027c48: f8 00 70 d0 calli 8043f88 <__errno> <== NOT EXECUTED 8027c4c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8027c50: 58 22 00 00 sw (r1+0),r2 8027c54: e3 ff ff da bi 8027bbc <link+0xf8>
} result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
8027c58: 2b 83 00 3c lw r3,(sp+60) 8027c5c: 37 8c 00 28 addi r12,sp,40 8027c60: b9 a0 10 00 mv r2,r13 8027c64: b9 80 08 00 mv r1,r12 8027c68: d8 80 00 00 call r4 8027c6c: b8 20 58 00 mv r11,r1
rtems_filesystem_freenode( &existing_loc );
8027c70: 2b 81 00 34 lw r1,(sp+52)
8027c74: 44 20 00 05 be r1,r0,8027c88 <link+0x1c4> <== NEVER TAKEN
8027c78: 28 22 00 1c lw r2,(r1+28)
8027c7c: 44 40 00 03 be r2,r0,8027c88 <link+0x1c4> <== NEVER TAKEN
8027c80: b9 80 08 00 mv r1,r12 8027c84: d8 40 00 00 call r2
rtems_filesystem_freenode( &parent_loc );
8027c88: 2b 81 00 20 lw r1,(sp+32)
8027c8c: 44 20 00 05 be r1,r0,8027ca0 <link+0x1dc> <== NEVER TAKEN
8027c90: 28 22 00 1c lw r2,(r1+28)
8027c94: 44 40 00 03 be r2,r0,8027ca0 <link+0x1dc> <== NEVER TAKEN
8027c98: 37 81 00 14 addi r1,sp,20 8027c9c: d8 40 00 00 call r2
return result; }
8027ca0: b9 60 08 00 mv r1,r11 8027ca4: 2b 9d 00 04 lw ra,(sp+4) 8027ca8: 2b 8b 00 10 lw r11,(sp+16) 8027cac: 2b 8c 00 0c lw r12,(sp+12) 8027cb0: 2b 8d 00 08 lw r13,(sp+8) 8027cb4: 37 9c 00 3c addi sp,sp,60 8027cb8: c3 a0 00 00 ret
0801aa04 <lseek>: off_t lseek( int fd, off_t offset, int whence ) {
801aa04: 37 9c ff e8 addi sp,sp,-24 801aa08: 5b 8b 00 18 sw (sp+24),r11 801aa0c: 5b 8c 00 14 sw (sp+20),r12 801aa10: 5b 8d 00 10 sw (sp+16),r13 801aa14: 5b 8e 00 0c sw (sp+12),r14 801aa18: 5b 8f 00 08 sw (sp+8),r15 801aa1c: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd );
801aa20: 78 04 08 01 mvhi r4,0x801 801aa24: 38 84 d0 10 ori r4,r4,0xd010 801aa28: 28 84 00 00 lw r4,(r4+0)
off_t lseek( int fd, off_t offset, int whence ) {
801aa2c: b8 40 60 00 mv r12,r2 801aa30: b8 60 68 00 mv r13,r3
rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd );
801aa34: 54 81 00 02 bgu r4,r1,801aa3c <lseek+0x38> <== ALWAYS TAKEN
801aa38: e0 00 00 0e bi 801aa70 <lseek+0x6c> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
801aa3c: 34 02 00 03 mvi r2,3 801aa40: fb ff 95 ec calli 80001f0 <__ashlsi3> 801aa44: 78 0e 08 01 mvhi r14,0x801 801aa48: 39 ce d7 1c ori r14,r14,0xd71c 801aa4c: 34 02 00 03 mvi r2,3 801aa50: b8 20 78 00 mv r15,r1 801aa54: fb ff 95 e7 calli 80001f0 <__ashlsi3> 801aa58: 29 cb 00 00 lw r11,(r14+0) 801aa5c: b5 e1 08 00 add r1,r15,r1 801aa60: b5 61 58 00 add r11,r11,r1
rtems_libio_check_is_open(iop);
801aa64: 29 61 00 18 lw r1,(r11+24) 801aa68: 20 21 01 00 andi r1,r1,0x100
801aa6c: 5c 20 00 04 bne r1,r0,801aa7c <lseek+0x78> <== ALWAYS TAKEN
801aa70: fb ff c6 b3 calli 800c53c <__errno> <== NOT EXECUTED 801aa74: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 801aa78: e0 00 00 29 bi 801ab1c <lseek+0x118> <== NOT EXECUTED
/* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h )
801aa7c: 29 61 00 40 lw r1,(r11+64) 801aa80: 28 21 00 14 lw r1,(r1+20)
801aa84: 5c 20 00 04 bne r1,r0,801aa94 <lseek+0x90> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
801aa88: fb ff c6 ad calli 800c53c <__errno> <== NOT EXECUTED 801aa8c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 801aa90: e0 00 00 23 bi 801ab1c <lseek+0x118> <== NOT EXECUTED
/* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) {
801aa94: 34 01 00 01 mvi r1,1
/* * Now process the lseek(). */ old_offset = iop->offset;
801aa98: 29 6f 00 10 lw r15,(r11+16) 801aa9c: 29 6e 00 14 lw r14,(r11+20)
switch ( whence ) { 801aaa0: 45 a1 00 0a be r13,r1,801aac8 <lseek+0xc4>
801aaa4: 34 01 00 02 mvi r1,2
801aaa8: 45 a1 00 0f be r13,r1,801aae4 <lseek+0xe0> 801aaac: 5d a0 00 1a bne r13,r0,801ab14 <lseek+0x110> case SEEK_SET: iop->offset = offset;
801aab0: b9 80 08 00 mv r1,r12 801aab4: 34 02 00 1f mvi r2,31 801aab8: fb ff 96 1e calli 8000330 <__ashrsi3> 801aabc: 59 61 00 10 sw (r11+16),r1 801aac0: 59 6c 00 14 sw (r11+20),r12
break;
801aac4: e0 00 00 19 bi 801ab28 <lseek+0x124>
case SEEK_CUR: iop->offset += offset;
801aac8: 34 02 00 1f mvi r2,31 801aacc: b9 80 08 00 mv r1,r12 801aad0: fb ff 96 18 calli 8000330 <__ashrsi3> 801aad4: b5 8e 10 00 add r2,r12,r14 801aad8: f5 82 18 00 cmpgu r3,r12,r2 801aadc: b4 2f 08 00 add r1,r1,r15 801aae0: e0 00 00 09 bi 801ab04 <lseek+0x100>
break; case SEEK_END: iop->offset = iop->size + offset;
801aae4: 34 02 00 1f mvi r2,31 801aae8: b9 80 08 00 mv r1,r12 801aaec: fb ff 96 11 calli 8000330 <__ashrsi3> 801aaf0: 29 62 00 0c lw r2,(r11+12) 801aaf4: 29 64 00 08 lw r4,(r11+8) 801aaf8: b5 82 10 00 add r2,r12,r2 801aafc: f5 82 18 00 cmpgu r3,r12,r2 801ab00: b4 24 08 00 add r1,r1,r4 801ab04: b4 61 08 00 add r1,r3,r1 801ab08: 59 61 00 10 sw (r11+16),r1 801ab0c: 59 62 00 14 sw (r11+20),r2
break;
801ab10: e0 00 00 06 bi 801ab28 <lseek+0x124>
default: rtems_set_errno_and_return_minus_one( EINVAL );
801ab14: fb ff c6 8a calli 800c53c <__errno> 801ab18: 34 02 00 16 mvi r2,22 801ab1c: 58 22 00 00 sw (r1+0),r2 801ab20: 34 0c ff ff mvi r12,-1 801ab24: e0 00 00 13 bi 801ab70 <lseek+0x16c>
/* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence );
801ab28: 29 6f 00 40 lw r15,(r11+64) 801ab2c: 34 02 00 1f mvi r2,31 801ab30: b9 80 08 00 mv r1,r12 801ab34: fb ff 95 ff calli 8000330 <__ashrsi3> 801ab38: 29 e5 00 14 lw r5,(r15+20) 801ab3c: b8 20 10 00 mv r2,r1 801ab40: b9 80 18 00 mv r3,r12 801ab44: b9 a0 20 00 mv r4,r13 801ab48: b9 60 08 00 mv r1,r11 801ab4c: d8 a0 00 00 call r5
if ( status == (off_t) -1 )
801ab50: 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 );
801ab54: b8 40 60 00 mv r12,r2
if ( status == (off_t) -1 ) 801ab58: 5c 41 00 06 bne r2,r1,801ab70 <lseek+0x16c> iop->offset = old_offset;
801ab5c: b9 c0 08 00 mv r1,r14 801ab60: 34 02 00 1f mvi r2,31 801ab64: fb ff 95 f3 calli 8000330 <__ashrsi3> 801ab68: 59 61 00 10 sw (r11+16),r1 801ab6c: 59 6e 00 14 sw (r11+20),r14
/* * So if the operation failed, we have to restore iop->offset. */ return status; }
801ab70: b9 80 08 00 mv r1,r12 801ab74: 2b 9d 00 04 lw ra,(sp+4) 801ab78: 2b 8b 00 18 lw r11,(sp+24) 801ab7c: 2b 8c 00 14 lw r12,(sp+20) 801ab80: 2b 8d 00 10 lw r13,(sp+16) 801ab84: 2b 8e 00 0c lw r14,(sp+12) 801ab88: 2b 8f 00 08 lw r15,(sp+8) 801ab8c: 37 9c 00 18 addi sp,sp,24 801ab90: c3 a0 00 00 ret
08027e90 <lstat>: int _STAT_NAME( const char *path, struct stat *buf ) {
8027e90: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8027e94: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8027e98: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8027e9c: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8027ea0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8027ea4: b8 40 68 00 mv r13,r2 <== NOT EXECUTED 8027ea8: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
/* * Check to see if we were passed a valid pointer. */ if ( !buf )
8027eac: 5c 40 00 04 bne r2,r0,8027ebc <lstat+0x2c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EFAULT );
8027eb0: f8 00 70 36 calli 8043f88 <__errno> <== NOT EXECUTED 8027eb4: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8027eb8: e0 00 00 16 bi 8027f10 <lstat+0x80> <== NOT EXECUTED
status = rtems_filesystem_evaluate_path( path, strlen( path ),
8027ebc: f8 00 8e 34 calli 804b78c <strlen> <== NOT EXECUTED 8027ec0: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8027ec4: 37 8c 00 14 addi r12,sp,20 <== NOT EXECUTED 8027ec8: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8027ecc: b9 80 20 00 mv r4,r12 <== NOT EXECUTED 8027ed0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8027ed4: b8 60 28 00 mv r5,r3 <== NOT EXECUTED 8027ed8: fb ff 78 cf calli 8006214 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 )
8027edc: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8027ee0: 5c 20 00 1f bne r1,r0,8027f5c <lstat+0xcc> <== NOT EXECUTED
return -1; if ( !loc.handlers->fstat_h ){
8027ee4: 2b 82 00 1c lw r2,(sp+28) <== NOT EXECUTED 8027ee8: 28 42 00 18 lw r2,(r2+24) <== NOT EXECUTED 8027eec: 5c 41 00 0c bne r2,r1,8027f1c <lstat+0x8c> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
8027ef0: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8027ef4: 44 22 00 05 be r1,r2,8027f08 <lstat+0x78> <== NOT EXECUTED 8027ef8: 28 23 00 1c lw r3,(r1+28) <== NOT EXECUTED 8027efc: 44 62 00 03 be r3,r2,8027f08 <lstat+0x78> <== NOT EXECUTED 8027f00: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8027f04: d8 60 00 00 call r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8027f08: f8 00 70 20 calli 8043f88 <__errno> <== NOT EXECUTED 8027f0c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8027f10: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8027f14: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8027f18: e0 00 00 11 bi 8027f5c <lstat+0xcc> <== NOT EXECUTED
/* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) );
8027f1c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8027f20: 34 03 00 48 mvi r3,72 <== NOT EXECUTED 8027f24: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8027f28: f8 00 7f 85 calli 8047d3c <memset> <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf );
8027f2c: 2b 83 00 1c lw r3,(sp+28) <== NOT EXECUTED 8027f30: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8027f34: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8027f38: 28 63 00 18 lw r3,(r3+24) <== NOT EXECUTED 8027f3c: d8 60 00 00 call r3 <== NOT EXECUTED 8027f40: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
8027f44: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8027f48: 44 20 00 05 be r1,r0,8027f5c <lstat+0xcc> <== NOT EXECUTED 8027f4c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8027f50: 44 40 00 03 be r2,r0,8027f5c <lstat+0xcc> <== NOT EXECUTED 8027f54: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8027f58: d8 40 00 00 call r2 <== NOT EXECUTED
return status; }
8027f5c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8027f60: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8027f64: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8027f68: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8027f6c: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8027f70: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8027f74: c3 a0 00 00 ret <== NOT EXECUTED
08007784 <malloc>: size_t size ) { void *return_this; MSBUMP(malloc_calls, 1);
8007784: 37 9c ff f0 addi sp,sp,-16 8007788: 5b 8b 00 10 sw (sp+16),r11 800778c: 5b 8c 00 0c sw (sp+12),r12 8007790: 5b 8d 00 08 sw (sp+8),r13 8007794: 5b 9d 00 04 sw (sp+4),ra 8007798: 78 03 08 01 mvhi r3,0x801 800779c: 38 63 d7 28 ori r3,r3,0xd728 80077a0: 28 62 00 04 lw r2,(r3+4) 80077a4: b8 20 68 00 mv r13,r1 80077a8: 34 41 00 01 addi r1,r2,1 80077ac: 58 61 00 04 sw (r3+4),r1
/* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process();
80077b0: fb ff ff e7 calli 800774c <malloc_deferred_frees_process>
/* * Validate the parameters */ if ( !size )
80077b4: 45 a0 00 30 be r13,r0,8007874 <malloc+0xf0> <== NEVER TAKEN
return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) &&
80077b8: 78 01 08 01 mvhi r1,0x801 80077bc: 38 21 da 40 ori r1,r1,0xda40 80077c0: 28 22 00 00 lw r2,(r1+0) 80077c4: 34 01 00 03 mvi r1,3
80077c8: 5c 41 00 03 bne r2,r1,80077d4 <malloc+0x50>
80077cc: fb ff ff c5 calli 80076e0 <malloc_is_system_state_OK>
80077d0: 44 20 00 29 be r1,r0,8007874 <malloc+0xf0> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
80077d4: 78 01 08 01 mvhi r1,0x801 80077d8: 38 21 d0 1c ori r1,r1,0xd01c 80077dc: 28 21 00 00 lw r1,(r1+0) 80077e0: 34 03 00 00 mvi r3,0 80077e4: b9 a0 10 00 mv r2,r13 80077e8: b8 60 20 00 mv r4,r3 80077ec: f8 00 06 f4 calli 80093bc <_Protected_heap_Allocate_aligned_with_boundary> 80077f0: 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;
80077f4: b8 20 60 00 mv r12,r1
* If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 80077f8: 5c 20 00 0e bne r1,r0,8007830 <malloc+0xac> if (rtems_malloc_sbrk_helpers)
80077fc: 78 01 08 01 mvhi r1,0x801 8007800: 38 21 d6 54 ori r1,r1,0xd654 8007804: 28 21 00 00 lw r1,(r1+0)
8007808: 44 2b 00 06 be r1,r11,8007820 <malloc+0x9c> <== ALWAYS TAKEN
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
800780c: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 8007810: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8007814: d8 40 00 00 call r2 <== NOT EXECUTED 8007818: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
if ( !return_this ) {
800781c: 5c 20 00 05 bne r1,r0,8007830 <malloc+0xac> <== NOT EXECUTED
errno = ENOMEM;
8007820: f8 00 13 47 calli 800c53c <__errno> 8007824: 34 02 00 0c mvi r2,12 8007828: 58 22 00 00 sw (r1+0),r2
return (void *) 0;
800782c: e0 00 00 13 bi 8007878 <malloc+0xf4>
} /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper )
8007830: 78 01 08 01 mvhi r1,0x801 8007834: 38 21 d6 58 ori r1,r1,0xd658 8007838: 28 21 00 00 lw r1,(r1+0)
800783c: 44 20 00 05 be r1,r0,8007850 <malloc+0xcc> <== ALWAYS TAKEN
(*rtems_malloc_dirty_helper)( return_this, size );
8007840: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 8007844: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8007848: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 800784c: d8 60 00 00 call r3 <== NOT EXECUTED
/* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers )
8007850: 78 01 08 01 mvhi r1,0x801 8007854: 38 21 d6 50 ori r1,r1,0xd650 8007858: 28 21 00 00 lw r1,(r1+0) 800785c: b9 80 58 00 mv r11,r12
8007860: 44 20 00 06 be r1,r0,8007878 <malloc+0xf4> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
8007864: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 8007868: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 800786c: d8 40 00 00 call r2 <== NOT EXECUTED 8007870: e0 00 00 02 bi 8007878 <malloc+0xf4> <== NOT EXECUTED 8007874: 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; }
8007878: b9 60 08 00 mv r1,r11 800787c: 2b 9d 00 04 lw ra,(sp+4) 8007880: 2b 8b 00 10 lw r11,(sp+16) 8007884: 2b 8c 00 0c lw r12,(sp+12) 8007888: 2b 8d 00 08 lw r13,(sp+8) 800788c: 37 9c 00 10 addi sp,sp,16 8007890: c3 a0 00 00 ret
08007728 <malloc_deferred_free>: } void malloc_deferred_free( void *pointer ) {
8007728: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 800772c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8007730: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8007734: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8007738: 38 21 dd a4 ori r1,r1,0xdda4 <== NOT EXECUTED 800773c: fb ff ec e0 calli 8002abc <_Chain_Append> <== NOT EXECUTED
rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); }
8007740: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8007744: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8007748: c3 a0 00 00 ret <== NOT EXECUTED
0800774c <malloc_deferred_frees_process>: { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) {
800774c: 37 9c ff f8 addi sp,sp,-8 8007750: 5b 8b 00 08 sw (sp+8),r11 8007754: 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 );
8007758: 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)
800775c: e0 00 00 02 bi 8007764 <malloc_deferred_frees_process+0x18>
free(to_be_freed);
8007760: fb ff fe 61 calli 80070e4 <free> <== NOT EXECUTED
8007764: b9 60 08 00 mv r1,r11 8007768: 38 21 dd a4 ori r1,r1,0xdda4 800776c: f8 00 04 a5 calli 8008a00 <_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)
8007770: 5c 20 ff fc bne r1,r0,8007760 <malloc_deferred_frees_process+0x14><== NEVER TAKEN
free(to_be_freed); }
8007774: 2b 9d 00 04 lw ra,(sp+4) 8007778: 2b 8b 00 08 lw r11,(sp+8) 800777c: 37 9c 00 08 addi sp,sp,8 8007780: c3 a0 00 00 ret
080076e0 <malloc_is_system_state_OK>: rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { if ( _Thread_Dispatch_disable_level > 0 )
80076e0: 78 01 08 01 mvhi r1,0x801 80076e4: 38 21 d8 a4 ori r1,r1,0xd8a4 80076e8: 28 22 00 00 lw r2,(r1+0) 80076ec: 34 01 00 00 mvi r1,0
80076f0: 5c 41 00 05 bne r2,r1,8007704 <malloc_is_system_state_OK+0x24><== NEVER TAKEN
return false; if ( _ISR_Nest_level > 0 )
80076f4: 78 01 08 01 mvhi r1,0x801 80076f8: 38 21 d9 3c ori r1,r1,0xd93c 80076fc: 28 21 00 00 lw r1,(r1+0)
#include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void)
8007700: 64 21 00 00 cmpei r1,r1,0
if ( _ISR_Nest_level > 0 ) return false; return true; }
8007704: c3 a0 00 00 ret
080100fc <memfile_alloc_block>: */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) {
80100fc: 37 9c ff fc addi sp,sp,-4 8010100: 5b 9d 00 04 sw (sp+4),ra
void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
8010104: 78 01 08 02 mvhi r1,0x802 8010108: 38 21 46 d8 ori r1,r1,0x46d8 801010c: 28 22 00 00 lw r2,(r1+0) 8010110: 34 01 00 01 mvi r1,1 8010114: fb ff c9 6a calli 80026bc <calloc>
if ( memory )
8010118: 44 20 00 06 be r1,r0,8010130 <memfile_alloc_block+0x34> <== NEVER TAKEN
memfile_blocks_allocated++;
801011c: 78 02 08 02 mvhi r2,0x802 8010120: 38 42 47 7c ori r2,r2,0x477c 8010124: 28 43 00 00 lw r3,(r2+0) 8010128: 34 63 00 01 addi r3,r3,1 801012c: 58 43 00 00 sw (r2+0),r3
return memory; }
8010130: 2b 9d 00 04 lw ra,(sp+4) 8010134: 37 9c 00 04 addi sp,sp,4 8010138: c3 a0 00 00 ret
080106bc <memfile_check_rmnod>: return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){
80106bc: 37 9c ff f8 addi sp,sp,-8 80106c0: 5b 8b 00 08 sw (sp+8),r11 80106c4: 5b 9d 00 04 sw (sp+4),ra 80106c8: 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) ) {
80106cc: fb ff f2 9a calli 800d134 <rtems_libio_is_file_open>
80106d0: 5c 20 00 10 bne r1,r0,8010710 <memfile_check_rmnod+0x54>
80106d4: 2d 62 00 34 lhu r2,(r11+52)
80106d8: 5c 41 00 0e bne r2,r1,8010710 <memfile_check_rmnod+0x54> <== NEVER TAKEN
/* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode )
80106dc: 78 01 08 02 mvhi r1,0x802 80106e0: 38 21 40 f8 ori r1,r1,0x40f8 80106e4: 28 21 00 00 lw r1,(r1+0) 80106e8: 28 23 00 04 lw r3,(r1+4)
80106ec: 5c 6b 00 02 bne r3,r11,80106f4 <memfile_check_rmnod+0x38> <== ALWAYS TAKEN
rtems_filesystem_current.node_access = NULL;
80106f0: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED
/* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE)
80106f4: 29 62 00 4c lw r2,(r11+76) 80106f8: 34 01 00 06 mvi r1,6
80106fc: 44 41 00 03 be r2,r1,8010708 <memfile_check_rmnod+0x4c> <== NEVER TAKEN
IMFS_memfile_remove( the_jnode );
8010700: b9 60 08 00 mv r1,r11 8010704: fb ff ff 7f calli 8010500 <IMFS_memfile_remove>
free( the_jnode );
8010708: b9 60 08 00 mv r1,r11 801070c: fb ff c8 a5 calli 80029a0 <free>
} return 0; }
8010710: 34 01 00 00 mvi r1,0 8010714: 2b 9d 00 04 lw ra,(sp+4) 8010718: 2b 8b 00 08 lw r11,(sp+8) 801071c: 37 9c 00 08 addi sp,sp,8 8010720: c3 a0 00 00 ret
08010404 <memfile_free_blocks_in_table>: void memfile_free_blocks_in_table( block_p **block_table, int entries ) {
8010404: 37 9c ff e8 addi sp,sp,-24 8010408: 5b 8b 00 18 sw (sp+24),r11 801040c: 5b 8c 00 14 sw (sp+20),r12 8010410: 5b 8d 00 10 sw (sp+16),r13 8010414: 5b 8e 00 0c sw (sp+12),r14 8010418: 5b 8f 00 08 sw (sp+8),r15 801041c: 5b 9d 00 04 sw (sp+4),ra 8010420: b8 20 58 00 mv r11,r1 8010424: b8 40 78 00 mv r15,r2
/* * Perform internal consistency checks */ assert( block_table );
8010428: 5c 20 00 09 bne r1,r0,801044c <memfile_free_blocks_in_table+0x48><== ALWAYS TAKEN
801042c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8010430: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8010434: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8010438: 38 21 33 ac ori r1,r1,0x33ac <== NOT EXECUTED 801043c: 38 63 35 20 ori r3,r3,0x3520 <== NOT EXECUTED 8010440: 38 84 34 24 ori r4,r4,0x3424 <== NOT EXECUTED 8010444: 34 02 01 b3 mvi r2,435 <== NOT EXECUTED 8010448: fb ff f2 7e calli 800ce40 <__assert_func> <== NOT EXECUTED
801044c: 34 0c 00 00 mvi r12,0 8010450: 28 2d 00 00 lw r13,(r1+0)
*/ b = *block_table; for ( i=0 ; i<entries ; i++ ) { if ( b[i] ) {
8010454: b9 80 70 00 mv r14,r12
* Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i<entries ; i++ ) {
8010458: e0 00 00 07 bi 8010474 <memfile_free_blocks_in_table+0x70>
if ( b[i] ) {
801045c: 29 a1 00 00 lw r1,(r13+0)
8010460: 44 20 00 03 be r1,r0,801046c <memfile_free_blocks_in_table+0x68> memfile_free_block( b[i] );
8010464: fb ff ff 1b calli 80100d0 <memfile_free_block>
b[i] = 0;
8010468: 59 ae 00 00 sw (r13+0),r14
* Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i<entries ; i++ ) {
801046c: 35 8c 00 01 addi r12,r12,1 8010470: 35 ad 00 04 addi r13,r13,4
8010474: 49 ec ff fa bg r15,r12,801045c <memfile_free_blocks_in_table+0x58> /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table );
8010478: 29 61 00 00 lw r1,(r11+0) 801047c: fb ff ff 15 calli 80100d0 <memfile_free_block>
*block_table = 0;
8010480: 34 01 00 00 mvi r1,0 8010484: 59 61 00 00 sw (r11+0),r1
}
8010488: 2b 9d 00 04 lw ra,(sp+4) 801048c: 2b 8b 00 18 lw r11,(sp+24) 8010490: 2b 8c 00 14 lw r12,(sp+20) 8010494: 2b 8d 00 10 lw r13,(sp+16) 8010498: 2b 8e 00 0c lw r14,(sp+12) 801049c: 2b 8f 00 08 lw r15,(sp+8) 80104a0: 37 9c 00 18 addi sp,sp,24 80104a4: c3 a0 00 00 ret
08010a10 <memfile_ftruncate>: int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) {
8010a10: 37 9c ff f0 addi sp,sp,-16 8010a14: 5b 8b 00 08 sw (sp+8),r11 8010a18: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info;
8010a1c: 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 )
8010a20: 29 64 00 50 lw r4,(r11+80)
8010a24: 48 44 00 05 bg r2,r4,8010a38 <memfile_ftruncate+0x28> <== NEVER TAKEN 8010a28: 5c 82 00 08 bne r4,r2,8010a48 <memfile_ftruncate+0x38> <== NEVER TAKEN
8010a2c: 29 64 00 54 lw r4,(r11+84)
8010a30: 54 64 00 02 bgu r3,r4,8010a38 <memfile_ftruncate+0x28> <== NEVER TAKEN
8010a34: e0 00 00 05 bi 8010a48 <memfile_ftruncate+0x38>
return IMFS_memfile_extend( the_jnode, length );
8010a38: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8010a3c: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8010a40: fb ff ff 8a calli 8010868 <IMFS_memfile_extend> <== NOT EXECUTED 8010a44: e0 00 00 0b bi 8010a70 <memfile_ftruncate+0x60> <== NOT EXECUTED
* The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length;
8010a48: 59 62 00 50 sw (r11+80),r2 8010a4c: 59 63 00 54 sw (r11+84),r3
iop->size = the_jnode->info.file.size;
8010a50: 58 22 00 08 sw (r1+8),r2 8010a54: 58 23 00 0c sw (r1+12),r3
IMFS_update_atime( the_jnode );
8010a58: 34 02 00 00 mvi r2,0 8010a5c: 37 81 00 0c addi r1,sp,12 8010a60: fb ff c7 fe calli 8002a58 <gettimeofday> 8010a64: 2b 81 00 0c lw r1,(sp+12) 8010a68: 59 61 00 40 sw (r11+64),r1 8010a6c: 34 01 00 00 mvi r1,0
return 0; }
8010a70: 2b 9d 00 04 lw ra,(sp+4) 8010a74: 2b 8b 00 08 lw r11,(sp+8) 8010a78: 37 9c 00 10 addi sp,sp,16 8010a7c: c3 a0 00 00 ret
08010a80 <memfile_lseek>: rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) {
8010a80: 37 9c ff f4 addi sp,sp,-12 8010a84: 5b 8b 00 0c sw (sp+12),r11 8010a88: 5b 8c 00 08 sw (sp+8),r12 8010a8c: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info;
8010a90: 28 2c 00 3c lw r12,(r1+60)
rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) {
8010a94: b8 20 58 00 mv r11,r1
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) {
8010a98: 34 01 00 06 mvi r1,6 8010a9c: 29 82 00 4c lw r2,(r12+76)
8010aa0: 5c 41 00 0c bne r2,r1,8010ad0 <memfile_lseek+0x50> <== ALWAYS TAKEN
if (iop->offset > the_jnode->info.linearfile.size)
8010aa4: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED 8010aa8: 29 63 00 10 lw r3,(r11+16) <== NOT EXECUTED 8010aac: 29 82 00 54 lw r2,(r12+84) <== NOT EXECUTED 8010ab0: 48 61 00 05 bg r3,r1,8010ac4 <memfile_lseek+0x44> <== NOT EXECUTED 8010ab4: 5c 61 00 15 bne r3,r1,8010b08 <memfile_lseek+0x88> <== NOT EXECUTED 8010ab8: 29 63 00 14 lw r3,(r11+20) <== NOT EXECUTED 8010abc: 54 62 00 02 bgu r3,r2,8010ac4 <memfile_lseek+0x44> <== NOT EXECUTED 8010ac0: e0 00 00 12 bi 8010b08 <memfile_lseek+0x88> <== NOT EXECUTED
iop->offset = the_jnode->info.linearfile.size;
8010ac4: 59 61 00 10 sw (r11+16),r1 <== NOT EXECUTED 8010ac8: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED 8010acc: e0 00 00 0f bi 8010b08 <memfile_lseek+0x88> <== NOT EXECUTED
} else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset ))
8010ad0: 29 62 00 14 lw r2,(r11+20) 8010ad4: b9 80 08 00 mv r1,r12 8010ad8: fb ff ff 64 calli 8010868 <IMFS_memfile_extend>
8010adc: 44 20 00 07 be r1,r0,8010af8 <memfile_lseek+0x78> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
8010ae0: f8 00 08 22 calli 8012b68 <__errno> <== NOT EXECUTED 8010ae4: 34 02 00 1c mvi r2,28 <== NOT EXECUTED 8010ae8: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 8010aec: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8010af0: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8010af4: e0 00 00 07 bi 8010b10 <memfile_lseek+0x90> <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
8010af8: 29 81 00 50 lw r1,(r12+80) 8010afc: 59 61 00 08 sw (r11+8),r1 8010b00: 29 8c 00 54 lw r12,(r12+84) 8010b04: 59 6c 00 0c sw (r11+12),r12
} return iop->offset;
8010b08: 29 62 00 14 lw r2,(r11+20) 8010b0c: 29 63 00 10 lw r3,(r11+16)
}
8010b10: b8 60 08 00 mv r1,r3 8010b14: 2b 9d 00 04 lw ra,(sp+4) 8010b18: 2b 8b 00 0c lw r11,(sp+12) 8010b1c: 2b 8c 00 08 lw r12,(sp+8) 8010b20: 37 9c 00 0c addi sp,sp,12 8010b24: c3 a0 00 00 ret
08010e40 <memfile_open>: rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) {
8010e40: 37 9c ff f4 addi sp,sp,-12 8010e44: 5b 8b 00 0c sw (sp+12),r11 8010e48: 5b 8c 00 08 sw (sp+8),r12 8010e4c: 5b 9d 00 04 sw (sp+4),ra 8010e50: b8 20 60 00 mv r12,r1
the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
8010e54: 28 21 00 18 lw r1,(r1+24) 8010e58: 34 02 00 00 mvi r2,0
uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info;
8010e5c: 29 8b 00 3c lw r11,(r12+60)
/* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
8010e60: 20 21 02 04 andi r1,r1,0x204
8010e64: 44 22 00 13 be r1,r2,8010eb0 <memfile_open+0x70> && (the_jnode->type == IMFS_LINEAR_FILE)) {
8010e68: 29 63 00 4c lw r3,(r11+76) 8010e6c: 34 01 00 06 mvi r1,6
8010e70: 5c 61 00 10 bne r3,r1,8010eb0 <memfile_open+0x70> <== ALWAYS TAKEN
uint32_t count = the_jnode->info.linearfile.size;
8010e74: 29 64 00 54 lw r4,(r11+84) <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE;
8010e78: 34 01 00 05 mvi r1,5 <== NOT EXECUTED
* Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct;
8010e7c: 29 63 00 58 lw r3,(r11+88) <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
8010e80: 59 61 00 4c sw (r11+76),r1 <== NOT EXECUTED
the_jnode->info.file.size = 0;
8010e84: 59 62 00 50 sw (r11+80),r2 <== NOT EXECUTED 8010e88: 59 62 00 54 sw (r11+84),r2 <== NOT EXECUTED
the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0;
8010e8c: 59 62 00 5c sw (r11+92),r2 <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
8010e90: 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;
8010e94: 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)
8010e98: 44 82 00 06 be r4,r2,8010eb0 <memfile_open+0x70> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
8010e9c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8010ea0: fb ff ff 22 calli 8010b28 <IMFS_memfile_write> <== NOT EXECUTED 8010ea4: 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)
8010ea8: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED 8010eac: 44 43 00 0d be r2,r3,8010ee0 <memfile_open+0xa0> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND)
8010eb0: 29 81 00 18 lw r1,(r12+24) 8010eb4: 20 21 02 00 andi r1,r1,0x200
8010eb8: 44 20 00 05 be r1,r0,8010ecc <memfile_open+0x8c> iop->offset = the_jnode->info.file.size;
8010ebc: 29 61 00 50 lw r1,(r11+80) 8010ec0: 59 81 00 10 sw (r12+16),r1 8010ec4: 29 61 00 54 lw r1,(r11+84) 8010ec8: 59 81 00 14 sw (r12+20),r1
iop->size = the_jnode->info.file.size;
8010ecc: 29 61 00 50 lw r1,(r11+80) 8010ed0: 59 81 00 08 sw (r12+8),r1 8010ed4: 29 6b 00 54 lw r11,(r11+84) 8010ed8: 34 01 00 00 mvi r1,0 8010edc: 59 8b 00 0c sw (r12+12),r11
return 0; }
8010ee0: 2b 9d 00 04 lw ra,(sp+4) 8010ee4: 2b 8b 00 0c lw r11,(sp+12) 8010ee8: 2b 8c 00 08 lw r12,(sp+8) 8010eec: 37 9c 00 0c addi sp,sp,12 8010ef0: c3 a0 00 00 ret
08010724 <memfile_rmnod>: int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) {
8010724: 37 9c ff f0 addi sp,sp,-16 8010728: 5b 8b 00 08 sw (sp+8),r11 801072c: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access;
8010730: 28 4b 00 00 lw r11,(r2+0)
/* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) {
8010734: 29 61 00 08 lw r1,(r11+8)
8010738: 44 20 00 05 be r1,r0,801074c <memfile_rmnod+0x28> <== NEVER TAKEN
801073c: b9 60 08 00 mv r1,r11 8010740: fb ff d1 8f calli 8004d7c <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL;
8010744: 34 01 00 00 mvi r1,0 8010748: 59 61 00 08 sw (r11+8),r1
/* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--;
801074c: 2d 63 00 34 lhu r3,(r11+52)
IMFS_update_ctime( the_jnode );
8010750: 34 02 00 00 mvi r2,0 8010754: 37 81 00 0c addi r1,sp,12
/* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--;
8010758: 34 63 ff ff addi r3,r3,-1 801075c: 0d 63 00 34 sh (r11+52),r3
IMFS_update_ctime( the_jnode );
8010760: fb ff c8 be calli 8002a58 <gettimeofday> 8010764: 2b 81 00 0c lw r1,(sp+12) 8010768: 59 61 00 48 sw (r11+72),r1
return memfile_check_rmnod( the_jnode );
801076c: b9 60 08 00 mv r1,r11 8010770: fb ff ff d3 calli 80106bc <memfile_check_rmnod>
}
8010774: 2b 9d 00 04 lw ra,(sp+4) 8010778: 2b 8b 00 08 lw r11,(sp+8) 801077c: 37 9c 00 10 addi sp,sp,16 8010780: c3 a0 00 00 ret
08001108 <mknod>: int mknod( const char *pathname, mode_t mode, dev_t dev ) {
8001108: 37 9c ff cc addi sp,sp,-52 800110c: 5b 8b 00 1c sw (sp+28),r11 8001110: 5b 8c 00 18 sw (sp+24),r12 8001114: 5b 8d 00 14 sw (sp+20),r13 8001118: 5b 8e 00 10 sw (sp+16),r14 800111c: 5b 8f 00 0c sw (sp+12),r15 8001120: 5b 90 00 08 sw (sp+8),r16 8001124: 5b 9d 00 04 sw (sp+4),ra 8001128: 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) ) )
800112c: 20 42 f0 00 andi r2,r2,0xf000
int mknod( const char *pathname, mode_t mode, dev_t dev ) {
8001130: b8 20 70 00 mv r14,r1 8001134: b8 60 80 00 mv r16,r3 8001138: b8 80 78 00 mv r15,r4
rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
800113c: 5c 40 00 04 bne r2,r0,800114c <mknod+0x44> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
8001140: f8 00 2c ff calli 800c53c <__errno> <== NOT EXECUTED 8001144: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 8001148: e0 00 00 1c bi 80011b8 <mknod+0xb0> <== NOT EXECUTED
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
800114c: 40 25 00 00 lbu r5,(r1+0) 8001150: 64 ab 00 5c cmpei r11,r5,92 8001154: 64 a1 00 2f cmpei r1,r5,47 8001158: b9 61 58 00 or r11,r11,r1
800115c: 5d 60 00 02 bne r11,r0,8001164 <mknod+0x5c>
8001160: 5c ab 00 0a bne r5,r11,8001188 <mknod+0x80> <== ALWAYS TAKEN
8001164: 78 05 08 01 mvhi r5,0x801 8001168: 38 a5 d1 10 ori r5,r5,0xd110 800116c: 28 a2 00 00 lw r2,(r5+0) 8001170: 37 81 00 20 addi r1,sp,32 8001174: 34 03 00 14 mvi r3,20 8001178: 34 42 00 18 addi r2,r2,24 800117c: f8 00 2f 96 calli 800cfd4 <memcpy> 8001180: 34 0b 00 01 mvi r11,1 8001184: e0 00 00 08 bi 80011a4 <mknod+0x9c> 8001188: 78 05 08 01 mvhi r5,0x801 800118c: 38 a5 d1 10 ori r5,r5,0xd110 8001190: 28 a2 00 00 lw r2,(r5+0) 8001194: 37 81 00 20 addi r1,sp,32 8001198: 34 03 00 14 mvi r3,20 800119c: 34 42 00 04 addi r2,r2,4 80011a0: f8 00 2f 8d calli 800cfd4 <memcpy>
if ( !temp_loc.ops->evalformake_h ) {
80011a4: 2b 81 00 2c lw r1,(sp+44) 80011a8: 28 25 00 04 lw r5,(r1+4)
80011ac: 5c a0 00 06 bne r5,r0,80011c4 <mknod+0xbc> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
80011b0: f8 00 2c e3 calli 800c53c <__errno> <== NOT EXECUTED 80011b4: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80011b8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80011bc: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 80011c0: e0 00 00 1d bi 8001234 <mknod+0x12c> <== NOT EXECUTED
} result = (*temp_loc.ops->evalformake_h)(
80011c4: 37 8c 00 20 addi r12,sp,32 80011c8: b5 cb 08 00 add r1,r14,r11 80011cc: b9 80 10 00 mv r2,r12 80011d0: 37 83 00 34 addi r3,sp,52 80011d4: d8 a0 00 00 call r5
&pathname[i], &temp_loc, &name_start ); if ( result != 0 )
80011d8: 34 0b ff ff mvi r11,-1
80011dc: 5c 20 00 16 bne r1,r0,8001234 <mknod+0x12c> return -1; if ( !temp_loc.ops->mknod_h ) {
80011e0: 2b 82 00 2c lw r2,(sp+44) 80011e4: 28 46 00 14 lw r6,(r2+20)
80011e8: 5c c1 00 06 bne r6,r1,8001200 <mknod+0xf8> <== ALWAYS TAKEN
rtems_filesystem_freenode( &temp_loc );
80011ec: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 80011f0: 44 46 ff f0 be r2,r6,80011b0 <mknod+0xa8> <== NOT EXECUTED 80011f4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80011f8: d8 40 00 00 call r2 <== NOT EXECUTED 80011fc: e3 ff ff ed bi 80011b0 <mknod+0xa8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
8001200: 2b 81 00 34 lw r1,(sp+52) 8001204: b9 a0 10 00 mv r2,r13 8001208: ba 00 18 00 mv r3,r16 800120c: b9 e0 20 00 mv r4,r15 8001210: b9 80 28 00 mv r5,r12 8001214: d8 c0 00 00 call r6 8001218: b8 20 58 00 mv r11,r1
rtems_filesystem_freenode( &temp_loc );
800121c: 2b 81 00 2c lw r1,(sp+44)
8001220: 44 20 00 05 be r1,r0,8001234 <mknod+0x12c> <== NEVER TAKEN
8001224: 28 22 00 1c lw r2,(r1+28)
8001228: 44 40 00 03 be r2,r0,8001234 <mknod+0x12c>
800122c: b9 80 08 00 mv r1,r12 8001230: d8 40 00 00 call r2
return result; }
8001234: b9 60 08 00 mv r1,r11 8001238: 2b 9d 00 04 lw ra,(sp+4) 800123c: 2b 8b 00 1c lw r11,(sp+28) 8001240: 2b 8c 00 18 lw r12,(sp+24) 8001244: 2b 8d 00 14 lw r13,(sp+20) 8001248: 2b 8e 00 10 lw r14,(sp+16) 800124c: 2b 8f 00 0c lw r15,(sp+12) 8001250: 2b 90 00 08 lw r16,(sp+8) 8001254: 37 9c 00 34 addi sp,sp,52 8001258: c3 a0 00 00 ret
0800127c <mount>: const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) {
800127c: 37 9c ff c8 addi sp,sp,-56 8001280: 5b 8b 00 24 sw (sp+36),r11 8001284: 5b 8c 00 20 sw (sp+32),r12 8001288: 5b 8d 00 1c sw (sp+28),r13 800128c: 5b 8e 00 18 sw (sp+24),r14 8001290: 5b 8f 00 14 sw (sp+20),r15 8001294: 5b 90 00 10 sw (sp+16),r16 8001298: 5b 91 00 0c sw (sp+12),r17 800129c: 5b 92 00 08 sw (sp+8),r18 80012a0: 5b 9d 00 04 sw (sp+4),ra 80012a4: b8 40 80 00 mv r16,r2 80012a8: b8 20 78 00 mv r15,r1 80012ac: b8 60 90 00 mv r18,r3 80012b0: b8 80 70 00 mv r14,r4 80012b4: b8 a0 68 00 mv r13,r5
/* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 80012b8: 44 40 00 03 be r2,r0,80012c4 <mount+0x48> /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
80012bc: 34 01 00 01 mvi r1,1
80012c0: 50 23 00 04 bgeu r1,r3,80012d0 <mount+0x54> options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL;
80012c4: f8 00 2c 9e calli 800c53c <__errno> 80012c8: 34 02 00 16 mvi r2,22 80012cc: e0 00 00 13 bi 8001318 <mount+0x9c>
return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) {
80012d0: 28 4c 00 24 lw r12,(r2+36)
80012d4: 5d 80 00 06 bne r12,r0,80012ec <mount+0x70> <== ALWAYS TAKEN
errno = ENOTSUP;
80012d8: f8 00 2c 99 calli 800c53c <__errno> <== NOT EXECUTED 80012dc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80012e0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80012e4: b9 80 88 00 mv r17,r12 <== NOT EXECUTED
goto cleanup_and_bail;
80012e8: e0 00 00 67 bi 8001484 <mount+0x208> <== NOT EXECUTED
/* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device )
80012ec: 34 01 00 6c mvi r1,108
80012f0: 44 80 00 04 be r4,r0,8001300 <mount+0x84> <== ALWAYS TAKEN
size += strlen( device ) + 1;
80012f4: b8 80 08 00 mv r1,r4 <== NOT EXECUTED 80012f8: f8 00 31 61 calli 800d87c <strlen> <== NOT EXECUTED 80012fc: 34 21 00 6d addi r1,r1,109 <== NOT EXECUTED
temp_mt_entry = malloc( size );
8001300: f8 00 19 21 calli 8007784 <malloc> 8001304: b8 20 58 00 mv r11,r1 8001308: b8 20 88 00 mv r17,r1
if ( !temp_mt_entry ) {
800130c: 5c 20 00 05 bne r1,r0,8001320 <mount+0xa4> <== ALWAYS TAKEN
errno = ENOMEM;
8001310: f8 00 2c 8b calli 800c53c <__errno> <== NOT EXECUTED 8001314: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
8001318: 58 22 00 00 sw (r1+0),r2 800131c: e0 00 00 63 bi 80014a8 <mount+0x22c>
return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options;
8001320: 58 32 00 30 sw (r1+48),r18
if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
8001324: 59 61 00 2c sw (r11+44),r1
temp_mt_entry->options = options; if ( device ) {
8001328: 45 c0 00 07 be r14,r0,8001344 <mount+0xc8> <== ALWAYS TAKEN
temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
800132c: 34 23 00 6c addi r3,r1,108 <== NOT EXECUTED
strcpy( temp_mt_entry->dev, device );
8001330: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 8001334: b9 c0 10 00 mv r2,r14 <== NOT EXECUTED
} temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev =
8001338: 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 );
800133c: f8 00 31 2e calli 800d7f4 <strcpy> <== NOT EXECUTED 8001340: e0 00 00 02 bi 8001348 <mount+0xcc> <== NOT EXECUTED
} else temp_mt_entry->dev = 0;
8001344: 58 2e 00 68 sw (r1+104),r14
/* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 8001348: 45 a0 00 32 be r13,r0,8001410 <mount+0x194> if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
800134c: b9 a0 08 00 mv r1,r13 8001350: f8 00 31 4b calli 800d87c <strlen>
* permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path(
8001354: 37 8c 00 28 addi r12,sp,40 8001358: b8 20 10 00 mv r2,r1 800135c: 34 03 00 07 mvi r3,7 8001360: b9 a0 08 00 mv r1,r13 8001364: b9 80 20 00 mv r4,r12 8001368: 34 05 00 01 mvi r5,1 800136c: fb ff fe af calli 8000e28 <rtems_filesystem_evaluate_path> 8001370: 34 02 ff ff mvi r2,-1
8001374: 44 22 00 43 be r1,r2,8001480 <mount+0x204> <== NEVER TAKEN
/* * Test for node_type_h */ if (!loc.ops->node_type_h) {
8001378: 2b 81 00 34 lw r1,(sp+52) 800137c: 28 22 00 10 lw r2,(r1+16)
8001380: 5c 40 00 04 bne r2,r0,8001390 <mount+0x114> <== ALWAYS TAKEN
errno = ENOTSUP;
8001384: f8 00 2c 6e calli 800c53c <__errno> <== NOT EXECUTED 8001388: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 800138c: e0 00 00 07 bi 80013a8 <mount+0x12c> <== NOT EXECUTED
/* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
8001390: b9 80 08 00 mv r1,r12 8001394: d8 40 00 00 call r2 8001398: 34 02 00 01 mvi r2,1
800139c: 44 22 00 05 be r1,r2,80013b0 <mount+0x134> errno = ENOTDIR;
80013a0: f8 00 2c 67 calli 800c53c <__errno> 80013a4: 34 02 00 14 mvi r2,20 80013a8: 58 22 00 00 sw (r1+0),r2
goto cleanup_and_bail;
80013ac: e0 00 00 36 bi 8001484 <mount+0x208>
/* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first;
80013b0: 78 03 08 01 mvhi r3,0x801 80013b4: 38 63 d7 58 ori r3,r3,0xd758
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
80013b8: 34 62 00 04 addi r2,r3,4
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access )
80013bc: 2b 81 00 28 lw r1,(sp+40)
/* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first;
80013c0: 28 63 00 00 lw r3,(r3+0) 80013c4: e0 00 00 04 bi 80013d4 <mount+0x158>
!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 )
80013c8: 28 64 00 1c lw r4,(r3+28)
80013cc: 44 81 00 04 be r4,r1,80013dc <mount+0x160> * 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 ) {
80013d0: 28 63 00 00 lw r3,(r3+0)
80013d4: 5c 62 ff fd bne r3,r2,80013c8 <mount+0x14c>
80013d8: e0 00 00 41 bi 80014dc <mount+0x260>
/* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY;
80013dc: f8 00 2c 58 calli 800c53c <__errno> 80013e0: 34 02 00 10 mvi r2,16 80013e4: e0 00 00 03 bi 80013f0 <mount+0x174>
* 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;
80013e8: f8 00 2c 55 calli 800c53c <__errno> <== NOT EXECUTED 80013ec: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
80013f0: 58 22 00 00 sw (r1+0),r2 80013f4: 37 8c 00 28 addi r12,sp,40
goto cleanup_and_bail;
80013f8: e0 00 00 23 bi 8001484 <mount+0x208>
} if ( loc.ops->mount_h( temp_mt_entry ) ) {
80013fc: b9 60 08 00 mv r1,r11 8001400: d8 40 00 00 call r2 8001404: 37 8c 00 28 addi r12,sp,40
8001408: 44 20 00 0a be r1,r0,8001430 <mount+0x1b4> <== ALWAYS TAKEN
800140c: e0 00 00 1e bi 8001484 <mount+0x208> <== NOT EXECUTED
* This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL;
8001410: 59 6d 00 1c sw (r11+28),r13
temp_mt_entry->mt_fs_root.handlers = NULL;
8001414: 59 6d 00 24 sw (r11+36),r13
temp_mt_entry->mt_fs_root.ops = NULL;
8001418: 59 6d 00 28 sw (r11+40),r13
temp_mt_entry->mt_point_node.node_access = NULL;
800141c: 59 6d 00 08 sw (r11+8),r13
temp_mt_entry->mt_point_node.handlers = NULL;
8001420: 59 6d 00 10 sw (r11+16),r13
temp_mt_entry->mt_point_node.ops = NULL;
8001424: 59 6d 00 14 sw (r11+20),r13
temp_mt_entry->mt_point_node.mt_entry = NULL;
8001428: 59 6d 00 18 sw (r11+24),r13 800142c: b9 a0 60 00 mv r12,r13
} if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) {
8001430: 2a 02 00 24 lw r2,(r16+36) 8001434: b9 60 08 00 mv r1,r11 8001438: d8 40 00 00 call r2 800143c: b8 20 68 00 mv r13,r1
8001440: 44 20 00 07 be r1,r0,800145c <mount+0x1e0> <== ALWAYS TAKEN
/* try to undo the mount operation */ if ( loc.ops->unmount_h ) {
8001444: 2b 81 00 34 lw r1,(sp+52) <== NOT EXECUTED 8001448: 28 22 00 28 lw r2,(r1+40) <== NOT EXECUTED 800144c: 44 40 00 0e be r2,r0,8001484 <mount+0x208> <== NOT EXECUTED
loc.ops->unmount_h( temp_mt_entry );
8001450: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8001454: d8 40 00 00 call r2 <== NOT EXECUTED 8001458: e0 00 00 0b bi 8001484 <mount+0x208> <== 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 );
800145c: 78 01 08 01 mvhi r1,0x801 8001460: b9 60 10 00 mv r2,r11 8001464: 38 21 d7 58 ori r1,r1,0xd758 8001468: f8 00 05 95 calli 8002abc <_Chain_Append>
*/ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry )
800146c: b9 e0 10 00 mv r2,r15
8001470: 45 ed 00 0f be r15,r13,80014ac <mount+0x230> <== NEVER TAKEN
*mt_entry = temp_mt_entry;
8001474: 59 eb 00 00 sw (r15+0),r11 8001478: b9 a0 10 00 mv r2,r13 800147c: e0 00 00 0c bi 80014ac <mount+0x230>
8001480: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
return 0; cleanup_and_bail: free( temp_mt_entry );
8001484: ba 20 08 00 mv r1,r17 8001488: f8 00 17 17 calli 80070e4 <free>
if ( loc_to_free )
800148c: 45 80 00 07 be r12,r0,80014a8 <mount+0x22c> <== NEVER TAKEN
rtems_filesystem_freenode( loc_to_free );
8001490: 29 81 00 0c lw r1,(r12+12)
8001494: 44 20 00 05 be r1,r0,80014a8 <mount+0x22c> <== NEVER TAKEN
8001498: 28 22 00 1c lw r2,(r1+28)
800149c: 44 40 00 03 be r2,r0,80014a8 <mount+0x22c> <== NEVER TAKEN
80014a0: b9 80 08 00 mv r1,r12 80014a4: d8 40 00 00 call r2 80014a8: 34 02 ff ff mvi r2,-1
return -1; }
80014ac: b8 40 08 00 mv r1,r2 80014b0: 2b 9d 00 04 lw ra,(sp+4) 80014b4: 2b 8b 00 24 lw r11,(sp+36) 80014b8: 2b 8c 00 20 lw r12,(sp+32) 80014bc: 2b 8d 00 1c lw r13,(sp+28) 80014c0: 2b 8e 00 18 lw r14,(sp+24) 80014c4: 2b 8f 00 14 lw r15,(sp+20) 80014c8: 2b 90 00 10 lw r16,(sp+16) 80014cc: 2b 91 00 0c lw r17,(sp+12) 80014d0: 2b 92 00 08 lw r18,(sp+8) 80014d4: 37 9c 00 38 addi sp,sp,56 80014d8: c3 a0 00 00 ret
* until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers;
80014dc: 2b 82 00 30 lw r2,(sp+48)
temp_mt_entry->mt_point_node.ops = loc.ops;
80014e0: 2b 83 00 34 lw r3,(sp+52)
* may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access;
80014e4: 59 61 00 08 sw (r11+8),r1
temp_mt_entry->mt_point_node.handlers = loc.handlers;
80014e8: 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;
80014ec: 2b 82 00 38 lw r2,(sp+56)
* traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops;
80014f0: 59 63 00 14 sw (r11+20),r3
temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
80014f4: 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 ){
80014f8: 28 62 00 20 lw r2,(r3+32)
80014fc: 5c 40 ff c0 bne r2,r0,80013fc <mount+0x180> <== ALWAYS TAKEN
8001500: e3 ff ff ba bi 80013e8 <mount+0x16c> <== NOT EXECUTED
0802974c <nanosleep>: int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) {
802974c: 37 9c ff ec addi sp,sp,-20 8029750: 5b 8b 00 14 sw (sp+20),r11 8029754: 5b 8c 00 10 sw (sp+16),r12 8029758: 5b 8d 00 0c sw (sp+12),r13 802975c: 5b 8e 00 08 sw (sp+8),r14 8029760: 5b 9d 00 04 sw (sp+4),ra
Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) )
8029764: 34 0e 00 00 mvi r14,0
int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) {
8029768: b8 40 68 00 mv r13,r2 802976c: b8 20 58 00 mv r11,r1
Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) )
8029770: f8 00 00 61 calli 80298f4 <_Timespec_Is_valid>
8029774: 44 2e 00 05 be r1,r14,8029788 <nanosleep+0x3c> * Return EINVAL if the delay interval is negative. * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 )
8029778: 29 61 00 00 lw r1,(r11+0)
802977c: 48 01 00 03 bg r0,r1,8029788 <nanosleep+0x3c> <== NEVER TAKEN
8029780: 29 61 00 04 lw r1,(r11+4)
8029784: 4c 20 00 04 bge r1,r0,8029794 <nanosleep+0x48> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
8029788: fb ff b4 39 calli 801686c <__errno> 802978c: 34 02 00 16 mvi r2,22 8029790: e0 00 00 34 bi 8029860 <nanosleep+0x114>
ticks = _Timespec_To_ticks( rqtp );
8029794: b9 60 08 00 mv r1,r11 8029798: fb ff a5 5e calli 8012d10 <_Timespec_To_ticks> 802979c: b8 20 58 00 mv r11,r1 80297a0: 78 01 08 03 mvhi r1,0x803 80297a4: 38 21 01 c4 ori r1,r1,0x1c4
* A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { 80297a8: 5d 60 00 0b bne r11,r0,80297d4 <nanosleep+0x88> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
80297ac: 28 22 00 00 lw r2,(r1+0) 80297b0: 34 42 00 01 addi r2,r2,1 80297b4: 58 22 00 00 sw (r1+0),r2
_Thread_Disable_dispatch(); _Thread_Yield_processor();
80297b8: fb ff 86 9d calli 800b22c <_Thread_Yield_processor>
_Thread_Enable_dispatch();
80297bc: fb ff 82 ab calli 800a268 <_Thread_Enable_dispatch>
if ( rmtp ) { 80297c0: 45 ab 00 2b be r13,r11,802986c <nanosleep+0x120> rmtp->tv_sec = 0; rmtp->tv_nsec = 0;
80297c4: 59 ab 00 04 sw (r13+4),r11
if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0;
80297c8: 59 ab 00 00 sw (r13+0),r11
rmtp->tv_nsec = 0;
80297cc: b9 60 08 00 mv r1,r11 80297d0: e0 00 00 28 bi 8029870 <nanosleep+0x124> 80297d4: 28 22 00 00 lw r2,(r1+0) 80297d8: 34 42 00 01 addi r2,r2,1 80297dc: 58 22 00 00 sw (r1+0),r2
/* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state(
80297e0: 78 0c 08 03 mvhi r12,0x803 80297e4: 39 8c 02 80 ori r12,r12,0x280 80297e8: 29 81 00 00 lw r1,(r12+0) 80297ec: 78 02 10 00 mvhi r2,0x1000 80297f0: 38 42 00 08 ori r2,r2,0x8 80297f4: fb ff 85 73 calli 800adc0 <_Thread_Set_state>
_Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer,
80297f8: 29 83 00 00 lw r3,(r12+0)
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
80297fc: 78 02 08 00 mvhi r2,0x800 8029800: 38 42 a0 54 ori r2,r2,0xa054
_Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize(
8029804: 28 64 00 08 lw r4,(r3+8)
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8029808: 78 01 08 03 mvhi r1,0x803
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
802980c: 58 62 00 64 sw (r3+100),r2
the_watchdog->id = id;
8029810: 58 64 00 68 sw (r3+104),r4
the_watchdog->user_data = user_data;
8029814: 58 6e 00 6c sw (r3+108),r14
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8029818: 38 21 02 a0 ori r1,r1,0x2a0 802981c: 34 62 00 48 addi r2,r3,72
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
8029820: 58 6e 00 50 sw (r3+80),r14
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
8029824: 58 6b 00 54 sw (r3+84),r11
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8029828: fb ff 87 e2 calli 800b7b0 <_Watchdog_Insert>
_Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch();
802982c: fb ff 82 8f calli 800a268 <_Thread_Enable_dispatch>
/* calculate time remaining */ if ( rmtp ) { 8029830: 45 a0 00 0f be r13,r0,802986c <nanosleep+0x120> ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
8029834: 29 81 00 00 lw r1,(r12+0)
_Timespec_From_ticks( ticks, rmtp );
8029838: b9 a0 10 00 mv r2,r13
_Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -=
802983c: 28 23 00 60 lw r3,(r1+96) 8029840: 28 21 00 5c lw r1,(r1+92) 8029844: c8 23 08 00 sub r1,r1,r3 8029848: b4 2b 58 00 add r11,r1,r11
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp );
802984c: b9 60 08 00 mv r1,r11 8029850: f8 00 00 0f calli 802988c <_Timespec_From_ticks>
*/ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 8029854: 45 60 00 06 be r11,r0,802986c <nanosleep+0x120> rtems_set_errno_and_return_minus_one( EINTR );
8029858: fb ff b4 05 calli 801686c <__errno> 802985c: 34 02 00 04 mvi r2,4 8029860: 58 22 00 00 sw (r1+0),r2 8029864: 34 01 ff ff mvi r1,-1 8029868: e0 00 00 02 bi 8029870 <nanosleep+0x124> 802986c: 34 01 00 00 mvi r1,0
#endif } return 0; }
8029870: 2b 9d 00 04 lw ra,(sp+4) 8029874: 2b 8b 00 14 lw r11,(sp+20) 8029878: 2b 8c 00 10 lw r12,(sp+16) 802987c: 2b 8d 00 0c lw r13,(sp+12) 8029880: 2b 8e 00 08 lw r14,(sp+8) 8029884: 37 9c 00 14 addi sp,sp,20 8029888: c3 a0 00 00 ret
08001508 <newlib_delete_hook>: void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) {
8001508: 37 9c ff f0 addi sp,sp,-16 800150c: 5b 8b 00 10 sw (sp+16),r11 8001510: 5b 8c 00 0c sw (sp+12),r12 8001514: 5b 8d 00 08 sw (sp+8),r13 8001518: 5b 9d 00 04 sw (sp+4),ra 800151c: b8 20 68 00 mv r13,r1 8001520: b8 40 60 00 mv r12,r2
/* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 8001524: 5c 22 00 05 bne r1,r2,8001538 <newlib_delete_hook+0x30> ptr = _REENT;
8001528: 78 02 08 01 mvhi r2,0x801 800152c: 38 42 d1 b0 ori r2,r2,0xd1b0 8001530: 28 4b 00 00 lw r11,(r2+0) 8001534: e0 00 00 02 bi 800153c <newlib_delete_hook+0x34>
} else { ptr = deleted_task->libc_reent;
8001538: 28 4b 01 24 lw r11,(r2+292)
} if (ptr && ptr != _global_impure_ptr) {
800153c: 45 60 00 0b be r11,r0,8001568 <newlib_delete_hook+0x60> <== NEVER TAKEN
8001540: 78 02 08 01 mvhi r2,0x801 8001544: 38 42 c1 94 ori r2,r2,0xc194 8001548: 28 41 00 00 lw r1,(r2+0)
800154c: 45 61 00 07 be r11,r1,8001568 <newlib_delete_hook+0x60> _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers);
8001550: 78 02 08 00 mvhi r2,0x800 8001554: 38 42 15 98 ori r2,r2,0x1598 8001558: b9 60 08 00 mv r1,r11 800155c: f8 00 2e 6c calli 800cf0c <_fwalk>
#if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr);
8001560: b9 60 08 00 mv r1,r11 8001564: f8 00 11 24 calli 80059f4 <_Workspace_Free>
#endif } deleted_task->libc_reent = NULL;
8001568: 34 02 00 00 mvi r2,0 800156c: 59 82 01 24 sw (r12+292),r2
/* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 8001570: 5d ac 00 04 bne r13,r12,8001580 <newlib_delete_hook+0x78> _REENT = 0;
8001574: 78 01 08 01 mvhi r1,0x801 8001578: 38 21 d1 b0 ori r1,r1,0xd1b0 800157c: 58 22 00 00 sw (r1+0),r2
} }
8001580: 2b 9d 00 04 lw ra,(sp+4) 8001584: 2b 8b 00 10 lw r11,(sp+16) 8001588: 2b 8c 00 0c lw r12,(sp+12) 800158c: 2b 8d 00 08 lw r13,(sp+8) 8001590: 37 9c 00 10 addi sp,sp,16 8001594: c3 a0 00 00 ret
08001598 <newlib_free_buffers>: */ int newlib_free_buffers( FILE *fp ) {
8001598: 37 9c ff f4 addi sp,sp,-12 800159c: 5b 8b 00 0c sw (sp+12),r11 80015a0: 5b 8c 00 08 sw (sp+8),r12 80015a4: 5b 9d 00 04 sw (sp+4),ra 80015a8: b8 20 58 00 mv r11,r1
switch ( fileno(fp) ) {
80015ac: f8 00 2d 08 calli 800c9cc <fileno> 80015b0: 34 02 00 02 mvi r2,2
80015b4: 54 22 00 0d bgu r1,r2,80015e8 <newlib_free_buffers+0x50> <== NEVER TAKEN
case 0: case 1: case 2: if (fp->_flags & __SMBF) {
80015b8: 2d 61 00 0c lhu r1,(r11+12) 80015bc: 34 0c 00 00 mvi r12,0 80015c0: 20 21 00 80 andi r1,r1,0x80
80015c4: 44 2c 00 0b be r1,r12,80015f0 <newlib_free_buffers+0x58> <== ALWAYS TAKEN
free( fp->_bf._base );
80015c8: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 80015cc: f8 00 16 c6 calli 80070e4 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
80015d0: 2d 61 00 0c lhu r1,(r11+12) <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
80015d4: 59 6c 00 10 sw (r11+16),r12 <== NOT EXECUTED 80015d8: 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;
80015dc: 20 21 ff 7f andi r1,r1,0xff7f <== NOT EXECUTED 80015e0: 0d 61 00 0c sh (r11+12),r1 <== NOT EXECUTED 80015e4: e0 00 00 03 bi 80015f0 <newlib_free_buffers+0x58> <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp);
80015e8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80015ec: f8 00 2c 36 calli 800c6c4 <fclose> <== NOT EXECUTED
} return 0; }
80015f0: 34 01 00 00 mvi r1,0 80015f4: 2b 9d 00 04 lw ra,(sp+4) 80015f8: 2b 8b 00 0c lw r11,(sp+12) 80015fc: 2b 8c 00 08 lw r12,(sp+8) 8001600: 37 9c 00 0c addi sp,sp,12 8001604: c3 a0 00 00 ret
080018e4 <null_initialize>: rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) {
80018e4: 37 9c ff f4 addi sp,sp,-12 80018e8: 5b 8b 00 0c sw (sp+12),r11 80018ec: 5b 8c 00 08 sw (sp+8),r12 80018f0: 5b 9d 00 04 sw (sp+4),ra
rtems_device_driver status; if ( !initialized ) {
80018f4: 78 04 08 02 mvhi r4,0x802 80018f8: 38 84 27 20 ori r4,r4,0x2720 80018fc: 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)) ) {
8001900: b8 20 60 00 mv r12,r1
rtems_device_driver status; if ( !initialized ) { 8001904: 5d 60 00 0d bne r11,r0,8001938 <null_initialize+0x54> initialized = 1; status = rtems_io_register_name(
8001908: 78 01 08 01 mvhi r1,0x801
) { rtems_device_driver status; if ( !initialized ) { initialized = 1;
800190c: 34 05 00 01 mvi r5,1
status = rtems_io_register_name(
8001910: 38 21 f9 2c ori r1,r1,0xf92c 8001914: b9 80 10 00 mv r2,r12 8001918: b9 60 18 00 mv r3,r11
) { rtems_device_driver status; if ( !initialized ) { initialized = 1;
800191c: 30 85 00 00 sb (r4+0),r5
status = rtems_io_register_name(
8001920: f8 00 00 54 calli 8001a70 <rtems_io_register_name>
"/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL)
8001924: 44 2b 00 02 be r1,r11,800192c <null_initialize+0x48> <== ALWAYS TAKEN
rtems_fatal_error_occurred(status);
8001928: f8 00 07 f2 calli 80038f0 <rtems_fatal_error_occurred> <== NOT EXECUTED
NULL_major = major;
800192c: 78 03 08 02 mvhi r3,0x802 8001930: 38 63 27 c8 ori r3,r3,0x27c8 8001934: 58 6c 00 00 sw (r3+0),r12
} return RTEMS_SUCCESSFUL; }
8001938: 34 01 00 00 mvi r1,0 800193c: 2b 9d 00 04 lw ra,(sp+4) 8001940: 2b 8b 00 0c lw r11,(sp+12) 8001944: 2b 8c 00 08 lw r12,(sp+8) 8001948: 37 9c 00 0c addi sp,sp,12 800194c: c3 a0 00 00 ret
080018c8 <null_write>: void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args )
80018c8: 44 60 00 03 be r3,r0,80018d4 <null_write+0xc> <== ALWAYS TAKEN
rw_args->bytes_moved = rw_args->count;
80018cc: 28 61 00 14 lw r1,(r3+20) <== NOT EXECUTED 80018d0: 58 61 00 1c sw (r3+28),r1 <== NOT EXECUTED
return NULL_SUCCESSFUL; }
80018d4: 34 01 00 00 mvi r1,0 80018d8: c3 a0 00 00 ret
08001858 <open>: int open( const char *pathname, int flags, ... ) {
8001858: 37 9c ff ac addi sp,sp,-84 800185c: 5b 8b 00 24 sw (sp+36),r11 8001860: 5b 8c 00 20 sw (sp+32),r12 8001864: 5b 8d 00 1c sw (sp+28),r13 8001868: 5b 8e 00 18 sw (sp+24),r14 800186c: 5b 8f 00 14 sw (sp+20),r15 8001870: 5b 90 00 10 sw (sp+16),r16 8001874: 5b 91 00 0c sw (sp+12),r17 8001878: 5b 92 00 08 sw (sp+8),r18 800187c: 5b 9d 00 04 sw (sp+4),ra
/* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1;
8001880: 34 49 00 01 addi r9,r2,1
int open( const char *pathname, int flags, ... ) {
8001884: b8 40 70 00 mv r14,r2 8001888: 5b 82 00 3c sw (sp+60),r2 800188c: 5b 83 00 40 sw (sp+64),r3 8001890: 5b 84 00 44 sw (sp+68),r4 8001894: 5b 85 00 48 sw (sp+72),r5 8001898: 5b 86 00 4c sw (sp+76),r6 800189c: 5b 87 00 50 sw (sp+80),r7 80018a0: 5b 88 00 54 sw (sp+84),r8
* Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD )
80018a4: 21 22 00 01 andi r2,r9,0x1
int open( const char *pathname, int flags, ... ) {
80018a8: b8 20 78 00 mv r15,r1
* Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD )
80018ac: 34 0d 00 04 mvi r13,4
80018b0: 5c 40 00 02 bne r2,r0,80018b8 <open+0x60>
80018b4: b8 40 68 00 mv r13,r2
eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE )
80018b8: 21 29 00 02 andi r9,r9,0x2
80018bc: 45 20 00 02 be r9,r0,80018c4 <open+0x6c> eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
80018c0: 39 ad 00 02 ori r13,r13,0x2
va_start(ap, flags); mode = va_arg( ap, int );
80018c4: 2b 92 00 40 lw r18,(sp+64)
* code does not require changes here since network file * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate();
80018c8: f8 00 17 38 calli 80075a8 <rtems_libio_allocate> 80018cc: b8 20 58 00 mv r11,r1
if ( iop == 0 ) {
80018d0: 34 0c 00 17 mvi r12,23
80018d4: 44 20 00 76 be r1,r0,8001aac <open+0x254> /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true );
80018d8: b9 e0 08 00 mv r1,r15 80018dc: f8 00 2f e8 calli 800d87c <strlen>
/* * See if the file exists. */ status = rtems_filesystem_evaluate_path(
80018e0: 37 91 00 28 addi r17,sp,40 80018e4: b8 20 10 00 mv r2,r1 80018e8: b9 a0 18 00 mv r3,r13 80018ec: b9 e0 08 00 mv r1,r15 80018f0: ba 20 20 00 mv r4,r17 80018f4: 34 05 00 01 mvi r5,1 80018f8: fb ff fd 4c calli 8000e28 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) {
80018fc: 34 02 ff ff mvi r2,-1
8001900: 5c 22 00 1f bne r1,r2,800197c <open+0x124> if ( errno != ENOENT ) {
8001904: f8 00 2b 0e calli 800c53c <__errno> 8001908: 28 2c 00 00 lw r12,(r1+0) 800190c: 34 01 00 02 mvi r1,2
8001910: 5d 81 00 0b bne r12,r1,800193c <open+0xe4> rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) {
8001914: 21 c1 02 00 andi r1,r14,0x200 8001918: b8 20 68 00 mv r13,r1
800191c: 44 20 00 5a be r1,r0,8001a84 <open+0x22c> rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL );
8001920: 34 03 00 00 mvi r3,0 8001924: b9 e0 08 00 mv r1,r15 8001928: 3a 42 80 00 ori r2,r18,0x8000 800192c: b8 60 20 00 mv r4,r3 8001930: fb ff fd f6 calli 8001108 <mknod> 8001934: b8 20 80 00 mv r16,r1
if ( rc ) {
8001938: 44 20 00 05 be r1,r0,800194c <open+0xf4> <== ALWAYS TAKEN
rc = errno;
800193c: f8 00 2b 00 calli 800c53c <__errno> 8001940: 28 2c 00 00 lw r12,(r1+0) 8001944: 34 0d 00 00 mvi r13,0
goto done;
8001948: e0 00 00 4e bi 8001a80 <open+0x228>
} /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true );
800194c: b9 e0 08 00 mv r1,r15 8001950: f8 00 2f cb calli 800d87c <strlen> 8001954: b8 20 10 00 mv r2,r1 8001958: ba 00 18 00 mv r3,r16 800195c: b9 e0 08 00 mv r1,r15 8001960: ba 20 20 00 mv r4,r17 8001964: 34 05 00 01 mvi r5,1 8001968: fb ff fd 30 calli 8000e28 <rtems_filesystem_evaluate_path>
if ( status != 0 ) { /* The file did not exist */
800196c: ba 00 68 00 mv r13,r16 8001970: 34 0c 00 0d mvi r12,13
8001974: 5c 30 00 44 bne r1,r16,8001a84 <open+0x22c> <== NEVER TAKEN
8001978: e0 00 00 06 bi 8001990 <open+0x138>
rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
800197c: 21 c2 0a 00 andi r2,r14,0xa00 8001980: 34 01 0a 00 mvi r1,2560 8001984: ba 20 68 00 mv r13,r17 8001988: 34 0c 00 11 mvi r12,17
800198c: 44 41 00 3e be r2,r1,8001a84 <open+0x22c> /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers;
8001990: 2b 81 00 30 lw r1,(sp+48)
iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags );
8001994: 29 6c 00 18 lw r12,(r11+24)
iop->pathinfo = loc;
8001998: 37 8d 00 28 addi r13,sp,40
/* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers;
800199c: 59 61 00 40 sw (r11+64),r1
iop->file_info = loc.node_access;
80019a0: 2b 81 00 28 lw r1,(sp+40) 80019a4: 59 61 00 3c sw (r11+60),r1
iop->flags |= rtems_libio_fcntl_flags( flags );
80019a8: b9 c0 08 00 mv r1,r14 80019ac: f8 00 17 38 calli 800768c <rtems_libio_fcntl_flags> 80019b0: b8 2c 08 00 or r1,r1,r12 80019b4: 59 61 00 18 sw (r11+24),r1
iop->pathinfo = loc;
80019b8: b9 a0 10 00 mv r2,r13 80019bc: 35 61 00 1c addi r1,r11,28 80019c0: 34 03 00 14 mvi r3,20 80019c4: f8 00 2d 84 calli 800cfd4 <memcpy>
if ( !iop->handlers || !iop->handlers->open_h ) {
80019c8: 29 61 00 40 lw r1,(r11+64)
80019cc: 44 20 00 50 be r1,r0,8001b0c <open+0x2b4> <== NEVER TAKEN
80019d0: 28 25 00 00 lw r5,(r1+0)
80019d4: 44 a0 00 4e be r5,r0,8001b0c <open+0x2b4> <== NEVER TAKEN
rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
80019d8: b9 e0 10 00 mv r2,r15 80019dc: ba 40 20 00 mv r4,r18 80019e0: b9 60 08 00 mv r1,r11 80019e4: b9 c0 18 00 mv r3,r14 80019e8: d8 a0 00 00 call r5 80019ec: b8 20 60 00 mv r12,r1
if ( rc ) { 80019f0: 44 20 00 04 be r1,r0,8001a00 <open+0x1a8> rc = errno;
80019f4: f8 00 2a d2 calli 800c53c <__errno> 80019f8: 28 2c 00 00 lw r12,(r1+0)
goto done;
80019fc: e0 00 00 21 bi 8001a80 <open+0x228>
/* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) {
8001a00: 21 ce 04 00 andi r14,r14,0x400
8001a04: 45 c1 00 2e be r14,r1,8001abc <open+0x264> rc = ftruncate( iop - rtems_libio_iops, 0 );
8001a08: 78 01 08 01 mvhi r1,0x801 8001a0c: 38 21 d7 1c ori r1,r1,0xd71c 8001a10: 28 21 00 00 lw r1,(r1+0) 8001a14: 34 02 00 03 mvi r2,3 8001a18: c9 61 08 00 sub r1,r11,r1 8001a1c: fb ff fa 45 calli 8000330 <__ashrsi3> 8001a20: 78 02 38 e3 mvhi r2,0x38e3 8001a24: 38 42 8e 39 ori r2,r2,0x8e39 8001a28: f8 00 62 b1 calli 801a4ec <__mulsi3> 8001a2c: b9 80 10 00 mv r2,r12 8001a30: f8 00 15 db calli 800719c <ftruncate> 8001a34: b8 20 60 00 mv r12,r1
if ( rc ) {
8001a38: 44 20 00 21 be r1,r0,8001abc <open+0x264> <== ALWAYS TAKEN
if(errno) rc = errno;
8001a3c: f8 00 2a c0 calli 800c53c <__errno> <== NOT EXECUTED 8001a40: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8001a44: 44 20 00 03 be r1,r0,8001a50 <open+0x1f8> <== NOT EXECUTED 8001a48: f8 00 2a bd calli 800c53c <__errno> <== NOT EXECUTED 8001a4c: 28 2c 00 00 lw r12,(r1+0) <== NOT EXECUTED
close( iop - rtems_libio_iops );
8001a50: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 8001a54: 38 21 d7 1c ori r1,r1,0xd71c <== NOT EXECUTED 8001a58: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8001a5c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8001a60: c9 61 08 00 sub r1,r11,r1 <== NOT EXECUTED 8001a64: fb ff fa 33 calli 8000330 <__ashrsi3> <== NOT EXECUTED 8001a68: 78 02 38 e3 mvhi r2,0x38e3 <== NOT EXECUTED 8001a6c: 38 42 8e 39 ori r2,r2,0x8e39 <== NOT EXECUTED 8001a70: f8 00 62 9f calli 801a4ec <__mulsi3> <== NOT EXECUTED 8001a74: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 8001a78: f8 00 15 62 calli 8007000 <close> <== NOT EXECUTED 8001a7c: b9 60 68 00 mv r13,r11 <== NOT EXECUTED
*/ done: va_end(ap); if ( rc ) {
8001a80: 45 80 00 0f be r12,r0,8001abc <open+0x264> <== NEVER TAKEN
if ( iop )
8001a84: 45 60 00 03 be r11,r0,8001a90 <open+0x238> <== NEVER TAKEN
rtems_libio_free( iop );
8001a88: b9 60 08 00 mv r1,r11 8001a8c: f8 00 16 a9 calli 8007530 <rtems_libio_free>
if ( loc_to_free ) 8001a90: 45 a0 00 07 be r13,r0,8001aac <open+0x254> rtems_filesystem_freenode( loc_to_free );
8001a94: 29 a1 00 0c lw r1,(r13+12)
8001a98: 44 20 00 05 be r1,r0,8001aac <open+0x254> <== NEVER TAKEN
8001a9c: 28 22 00 1c lw r2,(r1+28)
8001aa0: 44 40 00 03 be r2,r0,8001aac <open+0x254> <== NEVER TAKEN
8001aa4: b9 a0 08 00 mv r1,r13 8001aa8: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( rc );
8001aac: f8 00 2a a4 calli 800c53c <__errno> 8001ab0: 58 2c 00 00 sw (r1+0),r12 8001ab4: 34 01 ff ff mvi r1,-1 8001ab8: e0 00 00 0a bi 8001ae0 <open+0x288>
} return iop - rtems_libio_iops;
8001abc: 78 01 08 01 mvhi r1,0x801 8001ac0: 38 21 d7 1c ori r1,r1,0xd71c 8001ac4: 28 21 00 00 lw r1,(r1+0) 8001ac8: 34 02 00 03 mvi r2,3 8001acc: c9 61 08 00 sub r1,r11,r1 8001ad0: fb ff fa 18 calli 8000330 <__ashrsi3> 8001ad4: 78 02 38 e3 mvhi r2,0x38e3 8001ad8: 38 42 8e 39 ori r2,r2,0x8e39 8001adc: f8 00 62 84 calli 801a4ec <__mulsi3>
}
8001ae0: 2b 9d 00 04 lw ra,(sp+4) 8001ae4: 2b 8b 00 24 lw r11,(sp+36) 8001ae8: 2b 8c 00 20 lw r12,(sp+32) 8001aec: 2b 8d 00 1c lw r13,(sp+28) 8001af0: 2b 8e 00 18 lw r14,(sp+24) 8001af4: 2b 8f 00 14 lw r15,(sp+20) 8001af8: 2b 90 00 10 lw r16,(sp+16) 8001afc: 2b 91 00 0c lw r17,(sp+12) 8001b00: 2b 92 00 08 lw r18,(sp+8) 8001b04: 37 9c 00 54 addi sp,sp,84 8001b08: c3 a0 00 00 ret
if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops;
8001b0c: 37 8d 00 28 addi r13,sp,40 <== NOT EXECUTED 8001b10: 34 0c 00 86 mvi r12,134 <== NOT EXECUTED 8001b14: e3 ff ff dc bi 8001a84 <open+0x22c> <== NOT EXECUTED
080017d8 <open_dev_console>: /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) {
80017d8: 37 9c ff f8 addi sp,sp,-8 80017dc: 5b 8b 00 08 sw (sp+8),r11 80017e0: 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) {
80017e4: 34 02 00 00 mvi r2,0 80017e8: 78 01 08 01 mvhi r1,0x801 80017ec: 38 21 b9 30 ori r1,r1,0xb930 80017f0: b8 40 18 00 mv r3,r2 80017f4: f8 00 00 19 calli 8001858 <open> 80017f8: 34 0b ff ff mvi r11,-1
80017fc: 44 2b 00 13 be r1,r11,8001848 <open_dev_console+0x70> /* * 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)
8001800: 78 01 08 01 mvhi r1,0x801 8001804: 38 21 b9 30 ori r1,r1,0xb930 8001808: 34 02 00 01 mvi r2,1 800180c: 34 03 00 00 mvi r3,0 8001810: f8 00 00 12 calli 8001858 <open>
8001814: 5c 2b 00 04 bne r1,r11,8001824 <open_dev_console+0x4c> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
8001818: 78 01 55 54 mvhi r1,0x5554 <== NOT EXECUTED 800181c: 38 21 44 31 ori r1,r1,0x4431 <== NOT EXECUTED 8001820: e0 00 00 09 bi 8001844 <open_dev_console+0x6c> <== NOT EXECUTED
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
8001824: 78 01 08 01 mvhi r1,0x801 8001828: 38 21 b9 30 ori r1,r1,0xb930 800182c: 34 02 00 01 mvi r2,1 8001830: 34 03 00 00 mvi r3,0 8001834: f8 00 00 09 calli 8001858 <open>
8001838: 5c 2b 00 04 bne r1,r11,8001848 <open_dev_console+0x70> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
800183c: 78 01 55 54 mvhi r1,0x5554 <== NOT EXECUTED 8001840: 38 21 44 32 ori r1,r1,0x4432 <== NOT EXECUTED 8001844: f8 00 03 98 calli 80026a4 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
8001848: 2b 9d 00 04 lw ra,(sp+4) 800184c: 2b 8b 00 08 lw r11,(sp+8) 8001850: 37 9c 00 08 addi sp,sp,8 8001854: c3 a0 00 00 ret
08004090 <oproc>: /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) {
8004090: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED 8004094: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 8004098: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800409c: b8 40 58 00 mv r11,r2 <== NOT EXECUTED
int i; if (tty->termios.c_oflag & OPOST) {
80040a0: 28 42 00 34 lw r2,(r2+52) <== NOT EXECUTED
/* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) {
80040a4: 33 81 00 0c sb (sp+12),r1 <== NOT EXECUTED
int i; if (tty->termios.c_oflag & OPOST) {
80040a8: 20 41 00 01 andi r1,r2,0x1 <== NOT EXECUTED 80040ac: 44 20 00 51 be r1,r0,80041f0 <oproc+0x160> <== NOT EXECUTED
switch (c) {
80040b0: 43 81 00 0c lbu r1,(sp+12) <== NOT EXECUTED 80040b4: 34 03 00 09 mvi r3,9 <== NOT EXECUTED 80040b8: 44 23 00 23 be r1,r3,8004144 <oproc+0xb4> <== NOT EXECUTED 80040bc: 54 23 00 04 bgu r1,r3,80040cc <oproc+0x3c> <== NOT EXECUTED 80040c0: 34 03 00 08 mvi r3,8 <== NOT EXECUTED 80040c4: 5c 23 00 33 bne r1,r3,8004190 <oproc+0x100> <== NOT EXECUTED 80040c8: e0 00 00 2e bi 8004180 <oproc+0xf0> <== NOT EXECUTED 80040cc: 34 03 00 0a mvi r3,10 <== NOT EXECUTED 80040d0: 44 23 00 04 be r1,r3,80040e0 <oproc+0x50> <== NOT EXECUTED 80040d4: 34 03 00 0d mvi r3,13 <== NOT EXECUTED 80040d8: 5c 23 00 2e bne r1,r3,8004190 <oproc+0x100> <== NOT EXECUTED 80040dc: e0 00 00 0e bi 8004114 <oproc+0x84> <== NOT EXECUTED
case '\n': if (tty->termios.c_oflag & ONLRET)
80040e0: 20 42 00 20 andi r2,r2,0x20 <== NOT EXECUTED 80040e4: 44 40 00 03 be r2,r0,80040f0 <oproc+0x60> <== NOT EXECUTED
tty->column = 0;
80040e8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 80040ec: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
80040f0: 29 61 00 34 lw r1,(r11+52) <== NOT EXECUTED 80040f4: 20 21 00 04 andi r1,r1,0x4 <== NOT EXECUTED 80040f8: 44 20 00 3e be r1,r0,80041f0 <oproc+0x160> <== NOT EXECUTED
rtems_termios_puts ("\r", 1, tty);
80040fc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8004100: 38 21 2a 04 ori r1,r1,0x2a04 <== NOT EXECUTED 8004104: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8004108: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 800410c: fb ff ff 8b calli 8003f38 <rtems_termios_puts> <== NOT EXECUTED 8004110: e0 00 00 0b bi 800413c <oproc+0xac> <== NOT EXECUTED
tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
8004114: 20 41 00 10 andi r1,r2,0x10 <== NOT EXECUTED 8004118: 44 20 00 03 be r1,r0,8004124 <oproc+0x94> <== NOT EXECUTED 800411c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004120: 44 20 00 38 be r1,r0,8004200 <oproc+0x170> <== NOT EXECUTED
return; if (tty->termios.c_oflag & OCRNL) {
8004124: 20 41 00 08 andi r1,r2,0x8 <== NOT EXECUTED 8004128: 44 20 00 31 be r1,r0,80041ec <oproc+0x15c> <== NOT EXECUTED
c = '\n';
800412c: 34 01 00 0a mvi r1,10 <== NOT EXECUTED 8004130: 33 81 00 0c sb (sp+12),r1 <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
8004134: 20 42 00 20 andi r2,r2,0x20 <== NOT EXECUTED 8004138: 44 40 00 2e be r2,r0,80041f0 <oproc+0x160> <== NOT EXECUTED
tty->column = 0;
800413c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8004140: e0 00 00 2b bi 80041ec <oproc+0x15c> <== NOT EXECUTED
} tty->column = 0; break; case '\t': i = 8 - (tty->column & 7);
8004144: 29 63 00 28 lw r3,(r11+40) <== NOT EXECUTED
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
8004148: 20 44 18 00 andi r4,r2,0x1800 <== NOT EXECUTED
} tty->column = 0; break; case '\t': i = 8 - (tty->column & 7);
800414c: 34 02 00 08 mvi r2,8 <== NOT EXECUTED 8004150: 20 61 00 07 andi r1,r3,0x7 <== NOT EXECUTED 8004154: c8 41 10 00 sub r2,r2,r1 <== NOT EXECUTED
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
8004158: 34 01 18 00 mvi r1,6144 <== NOT EXECUTED 800415c: b4 43 18 00 add r3,r2,r3 <== NOT EXECUTED 8004160: 5c 81 00 06 bne r4,r1,8004178 <oproc+0xe8> <== NOT EXECUTED
tty->column += i; rtems_termios_puts ( " ", i, tty);
8004164: 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;
8004168: 59 63 00 28 sw (r11+40),r3 <== NOT EXECUTED
rtems_termios_puts ( " ", i, tty);
800416c: 38 21 2a 08 ori r1,r1,0x2a08 <== NOT EXECUTED 8004170: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8004174: e0 00 00 22 bi 80041fc <oproc+0x16c> <== NOT EXECUTED
return; } tty->column += i;
8004178: 59 63 00 28 sw (r11+40),r3 <== NOT EXECUTED
break;
800417c: e0 00 00 1d bi 80041f0 <oproc+0x160> <== NOT EXECUTED
case '\b': if (tty->column > 0)
8004180: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8004184: 4c 01 00 1b bge r0,r1,80041f0 <oproc+0x160> <== NOT EXECUTED
tty->column--;
8004188: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 800418c: e0 00 00 18 bi 80041ec <oproc+0x15c> <== NOT EXECUTED
break; default: if (tty->termios.c_oflag & OLCUC)
8004190: 20 42 00 02 andi r2,r2,0x2 <== NOT EXECUTED 8004194: 44 40 00 0c be r2,r0,80041c4 <oproc+0x134> <== NOT EXECUTED
c = toupper(c);
8004198: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 800419c: 38 42 53 0c ori r2,r2,0x530c <== NOT EXECUTED 80041a0: 28 43 00 00 lw r3,(r2+0) <== NOT EXECUTED 80041a4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 80041a8: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 80041ac: 40 23 00 01 lbu r3,(r1+1) <== NOT EXECUTED 80041b0: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 80041b4: 20 63 00 03 andi r3,r3,0x3 <== NOT EXECUTED 80041b8: 5c 61 00 02 bne r3,r1,80041c0 <oproc+0x130> <== NOT EXECUTED 80041bc: 34 42 ff e0 addi r2,r2,-32 <== NOT EXECUTED 80041c0: 33 82 00 0c sb (sp+12),r2 <== NOT EXECUTED
if (!iscntrl(c))
80041c4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 80041c8: 38 21 53 0c ori r1,r1,0x530c <== NOT EXECUTED 80041cc: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 80041d0: 43 81 00 0c lbu r1,(sp+12) <== NOT EXECUTED 80041d4: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 80041d8: 40 21 00 01 lbu r1,(r1+1) <== NOT EXECUTED 80041dc: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 80041e0: 5c 20 00 04 bne r1,r0,80041f0 <oproc+0x160> <== NOT EXECUTED
tty->column++;
80041e4: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 80041e8: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 80041ec: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
break; } } rtems_termios_puts (&c, 1, tty);
80041f0: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 80041f4: 37 81 00 0c addi r1,sp,12 <== NOT EXECUTED 80041f8: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 80041fc: fb ff ff 4f calli 8003f38 <rtems_termios_puts> <== NOT EXECUTED
}
8004200: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004204: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 8004208: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 800420c: c3 a0 00 00 ret <== NOT EXECUTED
0800b978 <pipe_create>: * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) {
800b978: 37 9c ff cc addi sp,sp,-52 800b97c: 5b 8b 00 10 sw (sp+16),r11 800b980: 5b 8c 00 0c sw (sp+12),r12 800b984: 5b 8d 00 08 sw (sp+8),r13 800b988: 5b 9d 00 04 sw (sp+4),ra 800b98c: 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)
800b990: 37 8b 00 14 addi r11,sp,20 800b994: 78 01 08 01 mvhi r1,0x801 800b998: 38 21 c0 78 ori r1,r1,0xc078 800b99c: 34 02 00 03 mvi r2,3 800b9a0: 34 03 00 07 mvi r3,7 800b9a4: b9 60 20 00 mv r4,r11 800b9a8: 34 05 00 01 mvi r5,1 800b9ac: fb ff d5 1f calli 8000e28 <rtems_filesystem_evaluate_path>
800b9b0: 44 20 00 0b be r1,r0,800b9dc <pipe_create+0x64> <== NEVER TAKEN
!= 0) { if (errno != ENOENT)
800b9b4: f8 00 02 e2 calli 800c53c <__errno> 800b9b8: 28 22 00 00 lw r2,(r1+0) 800b9bc: 34 01 00 02 mvi r1,2
800b9c0: 5c 41 00 50 bne r2,r1,800bb00 <pipe_create+0x188> <== NEVER TAKEN
return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
800b9c4: 78 01 08 01 mvhi r1,0x801 800b9c8: 38 21 c0 78 ori r1,r1,0xc078 800b9cc: 34 02 03 ff mvi r2,1023 800b9d0: fb ff d5 c5 calli 80010e4 <mkdir>
800b9d4: 44 20 00 08 be r1,r0,800b9f4 <pipe_create+0x7c> <== ALWAYS TAKEN
800b9d8: e0 00 00 4a bi 800bb00 <pipe_create+0x188> <== NOT EXECUTED
return -1; } else rtems_filesystem_freenode(&loc);
800b9dc: 2b 82 00 20 lw r2,(sp+32) <== NOT EXECUTED 800b9e0: 44 41 00 05 be r2,r1,800b9f4 <pipe_create+0x7c> <== NOT EXECUTED 800b9e4: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 800b9e8: 44 40 00 03 be r2,r0,800b9f4 <pipe_create+0x7c> <== NOT EXECUTED 800b9ec: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800b9f0: d8 40 00 00 call r2 <== NOT EXECUTED
/* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10);
800b9f4: 37 8b 00 28 addi r11,sp,40 800b9f8: 78 02 08 01 mvhi r2,0x801 800b9fc: 38 42 c0 80 ori r2,r2,0xc080 800ba00: 34 03 00 0a mvi r3,10 800ba04: b9 60 08 00 mv r1,r11 800ba08: f8 00 05 73 calli 800cfd4 <memcpy>
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
800ba0c: 78 04 08 01 mvhi r4,0x801 800ba10: 38 84 d6 ae ori r4,r4,0xd6ae 800ba14: 2c 81 00 00 lhu r1,(r4+0) 800ba18: 78 02 08 01 mvhi r2,0x801 800ba1c: 38 42 c0 8c ori r2,r2,0xc08c 800ba20: 34 25 00 01 addi r5,r1,1 800ba24: b8 20 18 00 mv r3,r1 800ba28: 0c 85 00 00 sh (r4+0),r5 800ba2c: 37 81 00 32 addi r1,sp,50 800ba30: f8 00 06 69 calli 800d3d4 <sprintf>
/* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
800ba34: b9 60 08 00 mv r1,r11 800ba38: 34 02 01 80 mvi r2,384 800ba3c: f8 00 00 52 calli 800bb84 <mkfifo> 800ba40: b8 20 60 00 mv r12,r1
800ba44: 44 20 00 03 be r1,r0,800ba50 <pipe_create+0xd8> <== ALWAYS TAKEN
if (errno != EEXIST){
800ba48: f8 00 02 bd calli 800c53c <__errno> <== NOT EXECUTED 800ba4c: e0 00 00 2d bi 800bb00 <pipe_create+0x188> <== NOT EXECUTED
return -1; sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
800ba50: b9 60 08 00 mv r1,r11 800ba54: 34 02 40 00 mvi r2,16384 800ba58: fb ff d7 80 calli 8001858 <open> 800ba5c: 59 a1 00 00 sw (r13+0),r1
if (filsdes[0] < 0) {
800ba60: 4c 2c 00 05 bge r1,r12,800ba74 <pipe_create+0xfc> <== NEVER TAKEN
err = errno;
800ba64: f8 00 02 b6 calli 800c53c <__errno> 800ba68: 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);
800ba6c: b9 60 08 00 mv r1,r11 800ba70: e0 00 00 21 bi 800baf4 <pipe_create+0x17c>
} else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]);
800ba74: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 800ba78: 38 42 d0 10 ori r2,r2,0xd010 <== NOT EXECUTED 800ba7c: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 800ba80: 54 41 00 03 bgu r2,r1,800ba8c <pipe_create+0x114> <== NOT EXECUTED 800ba84: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 800ba88: e0 00 00 0b bi 800bab4 <pipe_create+0x13c> <== NOT EXECUTED 800ba8c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 800ba90: fb ff d1 d8 calli 80001f0 <__ashlsi3> <== NOT EXECUTED 800ba94: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 800ba98: 78 0b 08 01 mvhi r11,0x801 <== NOT EXECUTED 800ba9c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 800baa0: 39 6b d7 1c ori r11,r11,0xd71c <== NOT EXECUTED 800baa4: fb ff d1 d3 calli 80001f0 <__ashlsi3> <== NOT EXECUTED 800baa8: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 800baac: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 800bab0: b4 41 10 00 add r2,r2,r1 <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
800bab4: 28 44 00 18 lw r4,(r2+24) <== NOT EXECUTED 800bab8: 34 03 ff fe mvi r3,-2 <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
800babc: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED
unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
800bac0: a0 83 18 00 and r3,r4,r3 <== NOT EXECUTED 800bac4: 58 43 00 18 sw (r2+24),r3 <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
800bac8: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800bacc: fb ff d7 63 calli 8001858 <open> <== NOT EXECUTED 800bad0: 59 a1 00 04 sw (r13+4),r1 <== NOT EXECUTED
if (filsdes[1] < 0) {
800bad4: 48 01 00 03 bg r0,r1,800bae0 <pipe_create+0x168> <== NOT EXECUTED 800bad8: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 800badc: e0 00 00 05 bi 800baf0 <pipe_create+0x178> <== NOT EXECUTED
err = errno;
800bae0: f8 00 02 97 calli 800c53c <__errno> <== NOT EXECUTED 800bae4: 28 2c 00 00 lw r12,(r1+0) <== NOT EXECUTED
close(filsdes[0]);
800bae8: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 800baec: fb ff ed 45 calli 8007000 <close> <== NOT EXECUTED
} unlink(fifopath);
800baf0: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED
800baf4: f8 00 00 2d calli 800bba8 <unlink>
} rtems_set_errno_and_return_minus_one(err);
800baf8: f8 00 02 91 calli 800c53c <__errno> 800bafc: 58 2c 00 00 sw (r1+0),r12
}
800bb00: 34 01 ff ff mvi r1,-1 800bb04: 2b 9d 00 04 lw ra,(sp+4) 800bb08: 2b 8b 00 10 lw r11,(sp+16) 800bb0c: 2b 8c 00 0c lw r12,(sp+12) 800bb10: 2b 8d 00 08 lw r13,(sp+8) 800bb14: 37 9c 00 34 addi sp,sp,52 800bb18: c3 a0 00 00 ret
0800a1dc <pipe_free>: /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) {
800a1dc: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 800a1e0: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 800a1e4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800a1e8: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
rtems_barrier_delete(pipe->readBarrier);
800a1ec: 28 21 00 2c lw r1,(r1+44) <== NOT EXECUTED 800a1f0: f8 00 03 ad calli 800b0a4 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
800a1f4: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a1f8: f8 00 03 ab calli 800b0a4 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
800a1fc: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a200: fb ff f8 3d calli 80082f4 <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
800a204: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 800a208: fb ff f3 b7 calli 80070e4 <free> <== NOT EXECUTED
free(pipe);
800a20c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800a210: fb ff f3 b5 calli 80070e4 <free> <== NOT EXECUTED
}
800a214: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800a218: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 800a21c: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 800a220: c3 a0 00 00 ret <== NOT EXECUTED
08009dd0 <pipe_ioctl>: pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) {
8009dd0: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8009dd4: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8009dd8: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 8009ddc: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8009de0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
if (cmd == FIONREAD) {
8009de4: 78 05 40 04 mvhi r5,0x4004 <== NOT EXECUTED 8009de8: 38 a5 66 7f ori r5,r5,0x667f <== NOT EXECUTED
pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) {
8009dec: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 8009df0: b8 60 68 00 mv r13,r3 <== NOT EXECUTED
if (cmd == FIONREAD) {
8009df4: 34 04 ff ea mvi r4,-22 <== NOT EXECUTED 8009df8: 5c 45 00 0f bne r2,r5,8009e34 <pipe_ioctl+0x64> <== NOT EXECUTED
if (buffer == NULL)
8009dfc: 34 04 ff f2 mvi r4,-14 <== NOT EXECUTED 8009e00: 44 60 00 0d be r3,r0,8009e34 <pipe_ioctl+0x64> <== NOT EXECUTED
return -EFAULT; if (! PIPE_LOCK(pipe))
8009e04: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED 8009e08: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8009e0c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 8009e10: fb ff f9 75 calli 80083e4 <rtems_semaphore_obtain> <== NOT EXECUTED 8009e14: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 8009e18: 34 04 ff fc mvi r4,-4 <== NOT EXECUTED 8009e1c: 5c 20 00 06 bne r1,r0,8009e34 <pipe_ioctl+0x64> <== NOT EXECUTED
return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length;
8009e20: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED 8009e24: 59 a1 00 00 sw (r13+0),r1 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
8009e28: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8009e2c: fb ff f9 be calli 8008524 <rtems_semaphore_release> <== NOT EXECUTED 8009e30: b9 80 20 00 mv r4,r12 <== NOT EXECUTED
return 0; } return -EINVAL; }
8009e34: b8 80 08 00 mv r1,r4 <== NOT EXECUTED 8009e38: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8009e3c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8009e40: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8009e44: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8009e48: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8009e4c: c3 a0 00 00 ret <== NOT EXECUTED
08009d5c <pipe_lseek>: rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; }
8009d5c: 34 01 ff e3 mvi r1,-29 <== NOT EXECUTED 8009d60: c3 a0 00 00 ret <== NOT EXECUTED
08009e50 <pipe_read>: pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) {
8009e50: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8009e54: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED 8009e58: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED 8009e5c: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED 8009e60: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED 8009e64: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED 8009e68: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED 8009e6c: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED 8009e70: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8009e74: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
8009e78: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED
pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) {
8009e7c: b8 40 88 00 mv r17,r2 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
8009e80: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) {
8009e84: b8 60 80 00 mv r16,r3 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
8009e88: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) {
8009e8c: b8 80 78 00 mv r15,r4 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
8009e90: fb ff f9 55 calli 80083e4 <rtems_semaphore_obtain> <== NOT EXECUTED 8009e94: b8 20 60 00 mv r12,r1 <== NOT EXECUTED 8009e98: 44 20 00 46 be r1,r0,8009fb0 <pipe_read+0x160> <== NOT EXECUTED 8009e9c: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED 8009ea0: e0 00 00 4a bi 8009fc8 <pipe_read+0x178> <== NOT EXECUTED
return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0)
8009ea4: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 8009ea8: 44 2d 00 43 be r1,r13,8009fb4 <pipe_read+0x164> <== NOT EXECUTED
goto out_locked; if (LIBIO_NODELAY(iop)) {
8009eac: 29 ee 00 18 lw r14,(r15+24) <== NOT EXECUTED 8009eb0: 21 ce 00 01 andi r14,r14,0x1 <== NOT EXECUTED 8009eb4: 45 c0 00 03 be r14,r0,8009ec0 <pipe_read+0x70> <== NOT EXECUTED 8009eb8: 34 0d ff f5 mvi r13,-11 <== NOT EXECUTED 8009ebc: e0 00 00 3f bi 8009fb8 <pipe_read+0x168> <== NOT EXECUTED
ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++;
8009ec0: 29 62 00 18 lw r2,(r11+24) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
8009ec4: 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 ++;
8009ec8: 34 42 00 01 addi r2,r2,1 <== NOT EXECUTED 8009ecc: 59 62 00 18 sw (r11+24),r2 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
8009ed0: fb ff f9 95 calli 8008524 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
8009ed4: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 8009ed8: b9 c0 10 00 mv r2,r14 <== NOT EXECUTED 8009edc: f8 00 04 b1 calli 800b1a0 <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
8009ee0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
} /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe))
8009ee4: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
8009ee8: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
} /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe))
8009eec: 44 2e 00 02 be r1,r14,8009ef4 <pipe_read+0xa4> <== NOT EXECUTED 8009ef0: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
8009ef4: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8009ef8: fb ff f9 3b calli 80083e4 <rtems_semaphore_obtain> <== NOT EXECUTED 8009efc: 44 20 00 03 be r1,r0,8009f08 <pipe_read+0xb8> <== NOT EXECUTED 8009f00: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED 8009f04: e0 00 00 2f bi 8009fc0 <pipe_read+0x170> <== NOT EXECUTED
/* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --;
8009f08: 29 62 00 18 lw r2,(r11+24) <== NOT EXECUTED 8009f0c: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED 8009f10: 59 62 00 18 sw (r11+24),r2 <== NOT EXECUTED
if (ret != 0)
8009f14: 5d a1 00 29 bne r13,r1,8009fb8 <pipe_read+0x168> <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) {
8009f18: 29 6d 00 0c lw r13,(r11+12) <== NOT EXECUTED 8009f1c: 45 a0 ff e2 be r13,r0,8009ea4 <pipe_read+0x54> <== NOT EXECUTED
if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length);
8009f20: ca 0c 08 00 sub r1,r16,r12 <== NOT EXECUTED 8009f24: 50 2d 00 02 bgeu r1,r13,8009f2c <pipe_read+0xdc> <== NOT EXECUTED 8009f28: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
chunk1 = pipe->Size - pipe->Start;
8009f2c: 29 65 00 08 lw r5,(r11+8) <== NOT EXECUTED 8009f30: 29 6e 00 04 lw r14,(r11+4) <== NOT EXECUTED 8009f34: 29 66 00 00 lw r6,(r11+0) <== NOT EXECUTED 8009f38: b6 2c 08 00 add r1,r17,r12 <== NOT EXECUTED 8009f3c: c9 c5 70 00 sub r14,r14,r5 <== NOT EXECUTED
if (chunk > chunk1) { memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
8009f40: b4 c5 10 00 add r2,r6,r5 <== NOT EXECUTED 8009f44: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED
} /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) {
8009f48: 4d cd 00 08 bge r14,r13,8009f68 <pipe_read+0x118> <== NOT EXECUTED
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
8009f4c: b4 c5 10 00 add r2,r6,r5 <== NOT EXECUTED 8009f50: b9 c0 18 00 mv r3,r14 <== NOT EXECUTED 8009f54: f8 00 0c 20 calli 800cfd4 <memcpy> <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
8009f58: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED 8009f5c: b5 8e 08 00 add r1,r12,r14 <== NOT EXECUTED 8009f60: b6 21 08 00 add r1,r17,r1 <== NOT EXECUTED 8009f64: c9 ae 18 00 sub r3,r13,r14 <== NOT EXECUTED
} else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
8009f68: f8 00 0c 1b calli 800cfd4 <memcpy> <== NOT EXECUTED
pipe->Start += chunk;
8009f6c: 29 61 00 08 lw r1,(r11+8) <== NOT EXECUTED
pipe->Start %= pipe->Size;
8009f70: 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;
8009f74: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED 8009f78: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED
pipe->Start %= pipe->Size;
8009f7c: f8 00 41 eb calli 801a728 <__umodsi3> <== NOT EXECUTED
pipe->Length -= chunk;
8009f80: 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;
8009f84: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED
pipe->Length -= chunk;
8009f88: c8 4d 08 00 sub r1,r2,r13 <== NOT EXECUTED 8009f8c: 59 61 00 0c sw (r11+12),r1 <== NOT EXECUTED
/* For buffering optimization */ if (PIPE_EMPTY(pipe))
8009f90: 5c 20 00 02 bne r1,r0,8009f98 <pipe_read+0x148> <== NOT EXECUTED
pipe->Start = 0;
8009f94: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED
if (pipe->waitingWriters > 0)
8009f98: 29 61 00 1c lw r1,(r11+28) <== NOT EXECUTED 8009f9c: 44 20 00 04 be r1,r0,8009fac <pipe_read+0x15c> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
8009fa0: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 8009fa4: 37 82 00 24 addi r2,sp,36 <== NOT EXECUTED 8009fa8: f8 00 04 5f calli 800b124 <rtems_barrier_release> <== NOT EXECUTED
read += chunk;
8009fac: b5 8d 60 00 add r12,r12,r13 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) {
8009fb0: 56 0c ff da bgu r16,r12,8009f18 <pipe_read+0xc8> <== NOT EXECUTED 8009fb4: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe);
8009fb8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 8009fbc: fb ff f9 5a calli 8008524 <rtems_semaphore_release> <== NOT EXECUTED
out_nolock: if (read > 0)
8009fc0: 49 80 00 02 bg r12,r0,8009fc8 <pipe_read+0x178> <== NOT EXECUTED 8009fc4: b9 a0 60 00 mv r12,r13 <== NOT EXECUTED
return read; return ret; }
8009fc8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8009fcc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8009fd0: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED 8009fd4: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED 8009fd8: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED 8009fdc: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED 8009fe0: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED 8009fe4: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED 8009fe8: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED 8009fec: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8009ff0: c3 a0 00 00 ret <== NOT EXECUTED
0800a224 <pipe_release>: */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) {
800a224: 37 9c ff e8 addi sp,sp,-24 <== NOT EXECUTED 800a228: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED 800a22c: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED 800a230: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED 800a234: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED 800a238: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
800a23c: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED
*/ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) {
800a240: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 800a244: 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,
800a248: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a24c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800a250: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800a254: fb ff f8 64 calli 80083e4 <rtems_semaphore_obtain> <== NOT EXECUTED 800a258: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL)
800a25c: 5c 20 00 15 bne r1,r0,800a2b0 <pipe_release+0x8c> <== NOT EXECUTED
rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop);
800a260: 29 8c 00 18 lw r12,(r12+24) <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
800a264: 21 81 00 02 andi r1,r12,0x2 <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop);
800a268: 21 8c 00 06 andi r12,r12,0x6 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
800a26c: 44 23 00 04 be r1,r3,800a27c <pipe_release+0x58> <== NOT EXECUTED
pipe->Readers --;
800a270: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800a274: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 800a278: 59 61 00 10 sw (r11+16),r1 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_WRITE)
800a27c: 21 81 00 04 andi r1,r12,0x4 <== NOT EXECUTED 800a280: 44 20 00 04 be r1,r0,800a290 <pipe_release+0x6c> <== NOT EXECUTED
pipe->Writers --;
800a284: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 800a288: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 800a28c: 59 61 00 14 sw (r11+20),r1 <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
800a290: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 800a294: 38 42 d6 a8 ori r2,r2,0xd6a8 <== NOT EXECUTED 800a298: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED 800a29c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800a2a0: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800a2a4: fb ff f8 50 calli 80083e4 <rtems_semaphore_obtain> <== NOT EXECUTED 800a2a8: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL)
800a2ac: 44 20 00 02 be r1,r0,800a2b4 <pipe_release+0x90> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
800a2b0: fb ff e0 fd calli 80026a4 <rtems_fatal_error_occurred> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
800a2b4: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a2b8: fb ff f8 9b calli 8008524 <rtems_semaphore_release> <== NOT EXECUTED
if (pipe->Readers == 0 && pipe->Writers == 0) {
800a2bc: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED 800a2c0: 5c 4e 00 07 bne r2,r14,800a2dc <pipe_release+0xb8> <== NOT EXECUTED 800a2c4: 29 6e 00 14 lw r14,(r11+20) <== NOT EXECUTED 800a2c8: 5d c2 00 05 bne r14,r2,800a2dc <pipe_release+0xb8> <== NOT EXECUTED
#if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe);
800a2cc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800a2d0: fb ff ff c3 calli 800a1dc <pipe_free> <== NOT EXECUTED
*pipep = NULL;
800a2d4: 59 ae 00 00 sw (r13+0),r14 <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) {
800a2d8: e0 00 00 0f bi 800a314 <pipe_release+0xf0> <== NOT EXECUTED
delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
800a2dc: 64 42 00 00 cmpei r2,r2,0 <== NOT EXECUTED 800a2e0: 7d 81 00 04 cmpnei r1,r12,4 <== NOT EXECUTED 800a2e4: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 800a2e8: 44 40 00 03 be r2,r0,800a2f4 <pipe_release+0xd0> <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe);
800a2ec: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a2f0: e0 00 00 07 bi 800a30c <pipe_release+0xe8> <== NOT EXECUTED
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
800a2f4: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 800a2f8: 7d 8c 00 02 cmpnei r12,r12,2 <== NOT EXECUTED 800a2fc: 64 21 00 00 cmpei r1,r1,0 <== NOT EXECUTED 800a300: a1 81 60 00 and r12,r12,r1 <== NOT EXECUTED 800a304: 45 82 00 04 be r12,r2,800a314 <pipe_release+0xf0> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
800a308: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800a30c: 37 82 00 18 addi r2,sp,24 <== NOT EXECUTED 800a310: f8 00 03 85 calli 800b124 <rtems_barrier_release> <== NOT EXECUTED
rtems_semaphore_release(rtems_pipe_semaphore);
800a314: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800a318: 38 21 d6 a8 ori r1,r1,0xd6a8 <== NOT EXECUTED 800a31c: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 800a320: fb ff f8 81 calli 8008524 <rtems_semaphore_release> <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; }
800a324: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 800a328: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800a32c: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED 800a330: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED 800a334: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED 800a338: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED 800a33c: 37 9c 00 18 addi sp,sp,24 <== NOT EXECUTED 800a340: c3 a0 00 00 ret <== NOT EXECUTED
08009ff4 <pipe_write>: pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) {
8009ff4: 37 9c ff d8 addi sp,sp,-40 <== NOT EXECUTED 8009ff8: 5b 8b 00 24 sw (sp+36),r11 <== NOT EXECUTED 8009ffc: 5b 8c 00 20 sw (sp+32),r12 <== NOT EXECUTED 800a000: 5b 8d 00 1c sw (sp+28),r13 <== NOT EXECUTED 800a004: 5b 8e 00 18 sw (sp+24),r14 <== NOT EXECUTED 800a008: 5b 8f 00 14 sw (sp+20),r15 <== NOT EXECUTED 800a00c: 5b 90 00 10 sw (sp+16),r16 <== NOT EXECUTED 800a010: 5b 91 00 0c sw (sp+12),r17 <== NOT EXECUTED 800a014: 5b 92 00 08 sw (sp+8),r18 <== NOT EXECUTED 800a018: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800a01c: b8 60 70 00 mv r14,r3 <== NOT EXECUTED 800a020: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 800a024: b8 40 88 00 mv r17,r2 <== NOT EXECUTED 800a028: b8 80 90 00 mv r18,r4 <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0)
800a02c: b8 60 60 00 mv r12,r3 <== NOT EXECUTED 800a030: 44 60 00 5f be r3,r0,800a1ac <pipe_write+0x1b8> <== NOT EXECUTED
return 0; if (! PIPE_LOCK(pipe))
800a034: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED 800a038: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 800a03c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 800a040: fb ff f8 e9 calli 80083e4 <rtems_semaphore_obtain> <== NOT EXECUTED 800a044: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED 800a048: 5c 20 00 59 bne r1,r0,800a1ac <pipe_write+0x1b8> <== NOT EXECUTED
return -EINTR; if (pipe->Readers == 0) {
800a04c: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED 800a050: 34 0d ff e0 mvi r13,-32 <== NOT EXECUTED 800a054: b8 40 60 00 mv r12,r2 <== NOT EXECUTED 800a058: 44 41 00 4c be r2,r1,800a188 <pipe_write+0x194> <== NOT EXECUTED
ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1;
800a05c: 29 61 00 04 lw r1,(r11+4) <== NOT EXECUTED 800a060: b9 c0 80 00 mv r16,r14 <== NOT EXECUTED 800a064: 50 2e 00 02 bgeu r1,r14,800a06c <pipe_write+0x78> <== NOT EXECUTED 800a068: 34 10 00 01 mvi r16,1 <== NOT EXECUTED 800a06c: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 800a070: e0 00 00 44 bi 800a180 <pipe_write+0x18c> <== NOT EXECUTED
while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) {
800a074: 2a 4f 00 18 lw r15,(r18+24) <== NOT EXECUTED 800a078: 21 ef 00 01 andi r15,r15,0x1 <== NOT EXECUTED 800a07c: 45 e0 00 03 be r15,r0,800a088 <pipe_write+0x94> <== NOT EXECUTED 800a080: 34 0d ff f5 mvi r13,-11 <== NOT EXECUTED 800a084: e0 00 00 41 bi 800a188 <pipe_write+0x194> <== NOT EXECUTED
ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++;
800a088: 29 62 00 1c lw r2,(r11+28) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
800a08c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++;
800a090: 34 42 00 01 addi r2,r2,1 <== NOT EXECUTED 800a094: 59 62 00 1c sw (r11+28),r2 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
800a098: fb ff f9 23 calli 8008524 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
800a09c: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 800a0a0: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 800a0a4: f8 00 04 3f calli 800b1a0 <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
800a0a8: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
} /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe))
800a0ac: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
800a0b0: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
} /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe))
800a0b4: 44 2f 00 02 be r1,r15,800a0bc <pipe_write+0xc8> <== NOT EXECUTED 800a0b8: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
800a0bc: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a0c0: fb ff f8 c9 calli 80083e4 <rtems_semaphore_obtain> <== NOT EXECUTED 800a0c4: 44 20 00 03 be r1,r0,800a0d0 <pipe_write+0xdc> <== NOT EXECUTED 800a0c8: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED 800a0cc: e0 00 00 36 bi 800a1a4 <pipe_write+0x1b0> <== NOT EXECUTED
/* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --;
800a0d0: 29 62 00 1c lw r2,(r11+28) <== NOT EXECUTED 800a0d4: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED 800a0d8: 59 62 00 1c sw (r11+28),r2 <== NOT EXECUTED
if (ret != 0)
800a0dc: 5d a1 00 2b bne r13,r1,800a188 <pipe_write+0x194> <== NOT EXECUTED
goto out_locked; if (pipe->Readers == 0) {
800a0e0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800a0e4: 5c 2d 00 03 bne r1,r13,800a0f0 <pipe_write+0xfc> <== NOT EXECUTED 800a0e8: 34 0d ff e0 mvi r13,-32 <== NOT EXECUTED 800a0ec: e0 00 00 27 bi 800a188 <pipe_write+0x194> <== 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) {
800a0f0: 29 6f 00 04 lw r15,(r11+4) <== NOT EXECUTED 800a0f4: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED 800a0f8: c9 e1 68 00 sub r13,r15,r1 <== NOT EXECUTED 800a0fc: 56 0d ff de bgu r16,r13,800a074 <pipe_write+0x80> <== NOT EXECUTED
ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe));
800a100: c9 cc 10 00 sub r2,r14,r12 <== NOT EXECUTED 800a104: 50 4d 00 02 bgeu r2,r13,800a10c <pipe_write+0x118> <== NOT EXECUTED 800a108: b8 40 68 00 mv r13,r2 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
800a10c: 29 63 00 08 lw r3,(r11+8) <== NOT EXECUTED 800a110: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 800a114: b4 23 08 00 add r1,r1,r3 <== NOT EXECUTED 800a118: f8 00 41 84 calli 801a728 <__umodsi3> <== NOT EXECUTED 800a11c: c9 e1 78 00 sub r15,r15,r1 <== NOT EXECUTED 800a120: 29 63 00 00 lw r3,(r11+0) <== NOT EXECUTED 800a124: b6 2c 10 00 add r2,r17,r12 <== NOT EXECUTED
if (chunk > chunk1) {
800a128: 4d ed 00 09 bge r15,r13,800a14c <pipe_write+0x158> <== NOT EXECUTED
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
800a12c: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 800a130: b9 e0 18 00 mv r3,r15 <== NOT EXECUTED 800a134: f8 00 0b a8 calli 800cfd4 <memcpy> <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
800a138: b5 ec 10 00 add r2,r15,r12 <== NOT EXECUTED 800a13c: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED 800a140: b6 22 10 00 add r2,r17,r2 <== NOT EXECUTED 800a144: c9 af 18 00 sub r3,r13,r15 <== NOT EXECUTED 800a148: e0 00 00 03 bi 800a154 <pipe_write+0x160> <== NOT EXECUTED
} else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
800a14c: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 800a150: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 800a154: f8 00 0b a0 calli 800cfd4 <memcpy> <== NOT EXECUTED
pipe->Length += chunk;
800a158: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED
if (pipe->waitingReaders > 0)
800a15c: 29 62 00 18 lw r2,(r11+24) <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk;
800a160: b4 2d 08 00 add r1,r1,r13 <== NOT EXECUTED 800a164: 59 61 00 0c sw (r11+12),r1 <== NOT EXECUTED
if (pipe->waitingReaders > 0)
800a168: 44 40 00 04 be r2,r0,800a178 <pipe_write+0x184> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
800a16c: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED 800a170: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED 800a174: f8 00 03 ec calli 800b124 <rtems_barrier_release> <== NOT EXECUTED
written += chunk;
800a178: b5 8d 60 00 add r12,r12,r13 <== NOT EXECUTED 800a17c: 34 10 00 01 mvi r16,1 <== NOT EXECUTED
} /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) {
800a180: 55 cc ff dc bgu r14,r12,800a0f0 <pipe_write+0xfc> <== NOT EXECUTED 800a184: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe);
800a188: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 800a18c: fb ff f8 e6 calli 8008524 <rtems_semaphore_release> <== NOT EXECUTED
out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE)
800a190: 34 01 ff e0 mvi r1,-32 <== NOT EXECUTED 800a194: 5d a1 00 04 bne r13,r1,800a1a4 <pipe_write+0x1b0> <== NOT EXECUTED
kill(getpid(), SIGPIPE);
800a198: f8 00 02 56 calli 800aaf0 <getpid> <== NOT EXECUTED 800a19c: 34 02 00 0d mvi r2,13 <== NOT EXECUTED 800a1a0: f8 00 02 c3 calli 800acac <kill> <== NOT EXECUTED
#endif if (written > 0)
800a1a4: 49 80 00 02 bg r12,r0,800a1ac <pipe_write+0x1b8> <== NOT EXECUTED 800a1a8: b9 a0 60 00 mv r12,r13 <== NOT EXECUTED
return written; return ret; }
800a1ac: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 800a1b0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800a1b4: 2b 8b 00 24 lw r11,(sp+36) <== NOT EXECUTED 800a1b8: 2b 8c 00 20 lw r12,(sp+32) <== NOT EXECUTED 800a1bc: 2b 8d 00 1c lw r13,(sp+28) <== NOT EXECUTED 800a1c0: 2b 8e 00 18 lw r14,(sp+24) <== NOT EXECUTED 800a1c4: 2b 8f 00 14 lw r15,(sp+20) <== NOT EXECUTED 800a1c8: 2b 90 00 10 lw r16,(sp+16) <== NOT EXECUTED 800a1cc: 2b 91 00 0c lw r17,(sp+12) <== NOT EXECUTED 800a1d0: 2b 92 00 08 lw r18,(sp+8) <== NOT EXECUTED 800a1d4: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED 800a1d8: c3 a0 00 00 ret <== NOT EXECUTED
08006fe8 <pthread_attr_getstackaddr>: int pthread_attr_getstackaddr( const pthread_attr_t *attr, void **stackaddr ) { if ( !attr || !attr->is_initialized || !stackaddr )
8006fe8: 44 20 00 0a be r1,r0,8007010 <pthread_attr_getstackaddr+0x28><== NEVER TAKEN
8006fec: 28 23 00 00 lw r3,(r1+0) 8006ff0: 64 44 00 00 cmpei r4,r2,0 8006ff4: 64 63 00 00 cmpei r3,r3,0 8006ff8: b8 83 18 00 or r3,r4,r3
8006ffc: 5c 60 00 05 bne r3,r0,8007010 <pthread_attr_getstackaddr+0x28> return EINVAL; *stackaddr = attr->stackaddr;
8007000: 28 21 00 04 lw r1,(r1+4) 8007004: 58 41 00 00 sw (r2+0),r1 8007008: b8 60 08 00 mv r1,r3
return 0;
800700c: c3 a0 00 00 ret 8007010: 34 01 00 16 mvi r1,22
}
8007014: c3 a0 00 00 ret
08007124 <pthread_attr_setschedpolicy>: int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) 8007124: 44 20 00 0d be r1,r0,8007158 <pthread_attr_setschedpolicy+0x34>
8007128: 28 23 00 00 lw r3,(r1+0)
800712c: 44 60 00 0b be r3,r0,8007158 <pthread_attr_setschedpolicy+0x34> return EINVAL; switch ( policy ) { 8007130: 48 02 00 05 bg r0,r2,8007144 <pthread_attr_setschedpolicy+0x20>
8007134: 34 03 00 02 mvi r3,2
8007138: 4c 62 00 05 bge r3,r2,800714c <pthread_attr_setschedpolicy+0x28>
800713c: 34 03 00 04 mvi r3,4
8007140: 44 43 00 03 be r2,r3,800714c <pthread_attr_setschedpolicy+0x28><== ALWAYS TAKEN
8007144: 34 01 00 86 mvi r1,134 8007148: c3 a0 00 00 ret
case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy;
800714c: 58 22 00 14 sw (r1+20),r2 8007150: 34 01 00 00 mvi r1,0
return 0;
8007154: c3 a0 00 00 ret 8007158: 34 01 00 16 mvi r1,22
default: return ENOTSUP; } }
800715c: c3 a0 00 00 ret
08002d38 <pthread_barrier_init>: int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) {
8002d38: 37 9c ff d8 addi sp,sp,-40 8002d3c: 5b 8b 00 18 sw (sp+24),r11 8002d40: 5b 8c 00 14 sw (sp+20),r12 8002d44: 5b 8d 00 10 sw (sp+16),r13 8002d48: 5b 8e 00 0c sw (sp+12),r14 8002d4c: 5b 8f 00 08 sw (sp+8),r15 8002d50: 5b 9d 00 04 sw (sp+4),ra 8002d54: b8 20 68 00 mv r13,r1 8002d58: b8 60 60 00 mv r12,r3
const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 8002d5c: 44 20 00 2c be r1,r0,8002e0c <pthread_barrier_init+0xd4> return EINVAL; if ( count == 0 ) 8002d60: 44 60 00 2b be r3,r0,8002e0c <pthread_barrier_init+0xd4> return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) {
8002d64: b8 40 20 00 mv r4,r2
8002d68: 5c 40 00 05 bne r2,r0,8002d7c <pthread_barrier_init+0x44> the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr );
8002d6c: 37 8b 00 1c addi r11,sp,28 8002d70: b9 60 08 00 mv r1,r11 8002d74: fb ff ff bb calli 8002c60 <pthread_barrierattr_init> 8002d78: b9 60 20 00 mv r4,r11
} /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized )
8002d7c: 28 81 00 00 lw r1,(r4+0)
8002d80: 44 20 00 23 be r1,r0,8002e0c <pthread_barrier_init+0xd4> return EINVAL; switch ( the_attr->process_shared ) {
8002d84: 28 8b 00 04 lw r11,(r4+4)
8002d88: 5d 60 00 21 bne r11,r0,8002e0c <pthread_barrier_init+0xd4> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
8002d8c: 78 02 08 01 mvhi r2,0x801 8002d90: 38 42 f8 7c ori r2,r2,0xf87c 8002d94: 28 41 00 00 lw r1,(r2+0)
/* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; the_attributes.maximum_count = count;
8002d98: 5b 8c 00 28 sw (sp+40),r12
} /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
8002d9c: 5b 8b 00 24 sw (sp+36),r11 8002da0: 34 21 00 01 addi r1,r1,1 8002da4: 58 41 00 00 sw (r2+0),r1
* This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *)
8002da8: 78 01 08 01 mvhi r1,0x801 8002dac: 38 21 fb fc ori r1,r1,0xfbfc 8002db0: f8 00 06 c7 calli 80048cc <_Objects_Allocate> 8002db4: b8 20 60 00 mv r12,r1
*/ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 8002db8: 5c 2b 00 04 bne r1,r11,8002dc8 <pthread_barrier_init+0x90> _Thread_Enable_dispatch();
8002dbc: f8 00 0a 0f calli 80055f8 <_Thread_Enable_dispatch> 8002dc0: 34 01 00 0b mvi r1,11
return EAGAIN;
8002dc4: e0 00 00 13 bi 8002e10 <pthread_barrier_init+0xd8>
} _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
8002dc8: 34 21 00 10 addi r1,r1,16 8002dcc: 37 82 00 24 addi r2,sp,36 8002dd0: f8 00 04 0f calli 8003e0c <_CORE_barrier_Initialize>
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
8002dd4: 78 02 08 01 mvhi r2,0x801 8002dd8: 29 8e 00 08 lw r14,(r12+8) 8002ddc: 38 42 fb fc ori r2,r2,0xfbfc 8002de0: 28 4f 00 1c lw r15,(r2+28) 8002de4: 21 c1 ff ff andi r1,r14,0xffff 8002de8: 34 02 00 02 mvi r2,2 8002dec: fb ff f8 59 calli 8000f50 <__ashlsi3> 8002df0: b5 e1 08 00 add r1,r15,r1 8002df4: 58 2c 00 00 sw (r1+0),r12
_Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name;
8002df8: 59 8b 00 0c sw (r12+12),r11
); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id;
8002dfc: 59 ae 00 00 sw (r13+0),r14
_Thread_Enable_dispatch();
8002e00: f8 00 09 fe calli 80055f8 <_Thread_Enable_dispatch> 8002e04: b9 60 08 00 mv r1,r11
return 0;
8002e08: e0 00 00 02 bi 8002e10 <pthread_barrier_init+0xd8> 8002e0c: 34 01 00 16 mvi r1,22
}
8002e10: 2b 9d 00 04 lw ra,(sp+4) 8002e14: 2b 8b 00 18 lw r11,(sp+24) 8002e18: 2b 8c 00 14 lw r12,(sp+20) 8002e1c: 2b 8d 00 10 lw r13,(sp+16) 8002e20: 2b 8e 00 0c lw r14,(sp+12) 8002e24: 2b 8f 00 08 lw r15,(sp+8) 8002e28: 37 9c 00 28 addi sp,sp,40 8002e2c: c3 a0 00 00 ret
08002424 <pthread_cleanup_push>: void pthread_cleanup_push( void (*routine)( void * ), void *arg ) {
8002424: 37 9c ff f4 addi sp,sp,-12 8002428: 5b 8b 00 0c sw (sp+12),r11 800242c: 5b 8c 00 08 sw (sp+8),r12 8002430: 5b 9d 00 04 sw (sp+4),ra 8002434: b8 20 58 00 mv r11,r1 8002438: b8 40 60 00 mv r12,r2
/* * The POSIX standard does not address what to do when the routine * is NULL. It also does not address what happens when we cannot * allocate memory or anything else bad happens. */ if ( !routine ) 800243c: 44 20 00 14 be r1,r0,800248c <pthread_cleanup_push+0x68> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
8002440: 78 03 08 01 mvhi r3,0x801 8002444: 38 63 f8 64 ori r3,r3,0xf864 8002448: 28 61 00 00 lw r1,(r3+0) 800244c: 34 21 00 01 addi r1,r1,1 8002450: 58 61 00 00 sw (r3+0),r1
return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
8002454: 34 01 00 10 mvi r1,16 8002458: f8 00 0f 7e calli 8006250 <_Workspace_Allocate> 800245c: b8 20 18 00 mv r3,r1
if ( handler ) {
8002460: 44 20 00 0a be r1,r0,8002488 <pthread_cleanup_push+0x64> <== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers;
8002464: 78 04 08 01 mvhi r4,0x801 8002468: 38 84 f9 20 ori r4,r4,0xf920 800246c: 28 81 00 00 lw r1,(r4+0)
handler->routine = routine;
8002470: 58 6b 00 08 sw (r3+8),r11
handler->arg = arg; _Chain_Append( handler_stack, &handler->Node );
8002474: b8 60 10 00 mv r2,r3
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); if ( handler ) { thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers;
8002478: 28 21 01 2c lw r1,(r1+300)
handler->routine = routine; handler->arg = arg;
800247c: 58 6c 00 0c sw (r3+12),r12
_Chain_Append( handler_stack, &handler->Node );
8002480: 34 21 00 e0 addi r1,r1,224 8002484: f8 00 04 48 calli 80035a4 <_Chain_Append>
} _Thread_Enable_dispatch();
8002488: f8 00 09 f3 calli 8004c54 <_Thread_Enable_dispatch>
}
800248c: 2b 9d 00 04 lw ra,(sp+4) 8002490: 2b 8b 00 0c lw r11,(sp+12) 8002494: 2b 8c 00 08 lw r12,(sp+8) 8002498: 37 9c 00 0c addi sp,sp,12 800249c: c3 a0 00 00 ret
0800379c <pthread_cond_init>: int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) {
800379c: 37 9c ff e8 addi sp,sp,-24 80037a0: 5b 8b 00 18 sw (sp+24),r11 80037a4: 5b 8c 00 14 sw (sp+20),r12 80037a8: 5b 8d 00 10 sw (sp+16),r13 80037ac: 5b 8e 00 0c sw (sp+12),r14 80037b0: 5b 8f 00 08 sw (sp+8),r15 80037b4: 5b 9d 00 04 sw (sp+4),ra 80037b8: b8 20 70 00 mv r14,r1
POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr;
80037bc: b8 40 60 00 mv r12,r2
80037c0: 5c 40 00 03 bne r2,r0,80037cc <pthread_cond_init+0x30>
80037c4: 78 0c 08 01 mvhi r12,0x801 80037c8: 39 8c e7 70 ori r12,r12,0xe770
/* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
80037cc: 29 82 00 04 lw r2,(r12+4) 80037d0: 34 01 00 01 mvi r1,1
80037d4: 44 41 00 27 be r2,r1,8003870 <pthread_cond_init+0xd4> <== NEVER TAKEN
return EINVAL; if ( !the_attr->is_initialized )
80037d8: 29 81 00 00 lw r1,(r12+0) 80037dc: 34 0d 00 00 mvi r13,0
80037e0: 44 2d 00 24 be r1,r13,8003870 <pthread_cond_init+0xd4> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
80037e4: 78 02 08 02 mvhi r2,0x802 80037e8: 38 42 08 74 ori r2,r2,0x874 80037ec: 28 41 00 00 lw r1,(r2+0) 80037f0: 34 21 00 01 addi r1,r1,1 80037f4: 58 41 00 00 sw (r2+0),r1
*/ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *)
80037f8: 78 01 08 02 mvhi r1,0x802 80037fc: 38 21 0c 8c ori r1,r1,0xc8c 8003800: f8 00 08 93 calli 8005a4c <_Objects_Allocate> 8003804: b8 20 58 00 mv r11,r1
_Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 8003808: 5c 2d 00 04 bne r1,r13,8003818 <pthread_cond_init+0x7c> _Thread_Enable_dispatch();
800380c: f8 00 0c 6f calli 80069c8 <_Thread_Enable_dispatch> 8003810: 34 01 00 0c mvi r1,12
return ENOMEM;
8003814: e0 00 00 18 bi 8003874 <pthread_cond_init+0xd8>
} the_cond->process_shared = the_attr->process_shared;
8003818: 29 8c 00 04 lw r12,(r12+4)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; /* XXX some more initialization might need to go here */ _Thread_queue_Initialize(
800381c: 34 03 08 00 mvi r3,2048 8003820: 34 04 00 74 mvi r4,116
if ( !the_cond ) { _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared;
8003824: 58 2c 00 10 sw (r1+16),r12
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
8003828: 58 2d 00 14 sw (r1+20),r13
/* XXX some more initialization might need to go here */ _Thread_queue_Initialize(
800382c: b9 a0 10 00 mv r2,r13 8003830: 34 21 00 18 addi r1,r1,24 8003834: f8 00 0e 9f calli 80072b0 <_Thread_queue_Initialize>
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
8003838: 78 02 08 02 mvhi r2,0x802 800383c: 29 6c 00 08 lw r12,(r11+8) 8003840: 38 42 0c 8c ori r2,r2,0xc8c 8003844: 28 4f 00 1c lw r15,(r2+28) 8003848: 21 81 ff ff andi r1,r12,0xffff 800384c: 34 02 00 02 mvi r2,2 8003850: fb ff f8 1a calli 80018b8 <__ashlsi3> 8003854: b5 e1 10 00 add r2,r15,r1 8003858: 58 4b 00 00 sw (r2+0),r11
_Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name;
800385c: 59 6d 00 0c sw (r11+12),r13
&_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id;
8003860: 59 cc 00 00 sw (r14+0),r12
_Thread_Enable_dispatch();
8003864: f8 00 0c 59 calli 80069c8 <_Thread_Enable_dispatch> 8003868: b9 a0 08 00 mv r1,r13
return 0;
800386c: e0 00 00 02 bi 8003874 <pthread_cond_init+0xd8> 8003870: 34 01 00 16 mvi r1,22
}
8003874: 2b 9d 00 04 lw ra,(sp+4) 8003878: 2b 8b 00 18 lw r11,(sp+24) 800387c: 2b 8c 00 14 lw r12,(sp+20) 8003880: 2b 8d 00 10 lw r13,(sp+16) 8003884: 2b 8e 00 0c lw r14,(sp+12) 8003888: 2b 8f 00 08 lw r15,(sp+8) 800388c: 37 9c 00 18 addi sp,sp,24 8003890: c3 a0 00 00 ret
080035f0 <pthread_condattr_destroy>: int pthread_condattr_destroy( pthread_condattr_t *attr ) { if ( !attr || attr->is_initialized == false )
80035f0: 34 02 00 00 mvi r2,0
80035f4: 44 22 00 06 be r1,r2,800360c <pthread_condattr_destroy+0x1c>
80035f8: 28 23 00 00 lw r3,(r1+0)
80035fc: 44 62 00 04 be r3,r2,800360c <pthread_condattr_destroy+0x1c><== NEVER TAKEN
return EINVAL; attr->is_initialized = false;
8003600: 58 22 00 00 sw (r1+0),r2 8003604: b8 40 08 00 mv r1,r2
return 0;
8003608: c3 a0 00 00 ret 800360c: 34 01 00 16 mvi r1,22
}
8003610: c3 a0 00 00 ret
08002938 <pthread_create>: pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) {
8002938: 37 9c ff a4 addi sp,sp,-92 800293c: 5b 8b 00 38 sw (sp+56),r11 8002940: 5b 8c 00 34 sw (sp+52),r12 8002944: 5b 8d 00 30 sw (sp+48),r13 8002948: 5b 8e 00 2c sw (sp+44),r14 800294c: 5b 8f 00 28 sw (sp+40),r15 8002950: 5b 90 00 24 sw (sp+36),r16 8002954: 5b 91 00 20 sw (sp+32),r17 8002958: 5b 92 00 1c sw (sp+28),r18 800295c: 5b 93 00 18 sw (sp+24),r19 8002960: 5b 94 00 14 sw (sp+20),r20 8002964: 5b 9d 00 10 sw (sp+16),ra
int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine )
8002968: 34 0c 00 0e mvi r12,14
pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) {
800296c: b8 60 80 00 mv r16,r3 8002970: b8 20 88 00 mv r17,r1 8002974: b8 80 90 00 mv r18,r4
int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 8002978: 44 60 00 83 be r3,r0,8002b84 <pthread_create+0x24c> return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
800297c: b8 40 58 00 mv r11,r2
8002980: 5c 40 00 03 bne r2,r0,800298c <pthread_create+0x54>
8002984: 78 0b 08 01 mvhi r11,0x801 8002988: 39 6b cb 94 ori r11,r11,0xcb94
if ( !the_attr->is_initialized )
800298c: 29 61 00 00 lw r1,(r11+0)
8002990: 44 20 00 7c be r1,r0,8002b80 <pthread_create+0x248> * stack space if it is allowed to allocate it itself. * * NOTE: If the user provides the stack we will let it drop below * twice the minimum. */ if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) )
8002994: 29 61 00 04 lw r1,(r11+4)
8002998: 44 20 00 06 be r1,r0,80029b0 <pthread_create+0x78>
800299c: 78 02 08 01 mvhi r2,0x801 80029a0: 38 42 e0 e0 ori r2,r2,0xe0e0 80029a4: 28 41 00 00 lw r1,(r2+0) 80029a8: 29 62 00 08 lw r2,(r11+8)
80029ac: 54 22 00 75 bgu r1,r2,8002b80 <pthread_create+0x248> * If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread * inherits scheduling attributes from the creating thread. If it is * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) {
80029b0: 29 62 00 10 lw r2,(r11+16) 80029b4: 34 01 00 01 mvi r1,1
80029b8: 44 41 00 04 be r2,r1,80029c8 <pthread_create+0x90>
80029bc: 34 01 00 02 mvi r1,2
80029c0: 5c 41 00 70 bne r2,r1,8002b80 <pthread_create+0x248>
80029c4: e0 00 00 0a bi 80029ec <pthread_create+0xb4>
case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
80029c8: 78 02 08 01 mvhi r2,0x801 80029cc: 38 42 e9 20 ori r2,r2,0xe920 80029d0: 28 42 00 00 lw r2,(r2+0)
schedpolicy = api->schedpolicy; schedparam = api->schedparam;
80029d4: 37 81 00 3c addi r1,sp,60 80029d8: 34 03 00 1c mvi r3,28
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
80029dc: 28 45 01 2c lw r5,(r2+300)
schedpolicy = api->schedpolicy; schedparam = api->schedparam;
80029e0: 34 a2 00 84 addi r2,r5,132
* attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy;
80029e4: 28 af 00 80 lw r15,(r5+128) 80029e8: e0 00 00 05 bi 80029fc <pthread_create+0xc4>
schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy;
80029ec: 29 6f 00 14 lw r15,(r11+20)
schedparam = the_attr->schedparam;
80029f0: 37 81 00 3c addi r1,sp,60 80029f4: 35 62 00 18 addi r2,r11,24 80029f8: 34 03 00 1c mvi r3,28 80029fc: f8 00 2c e6 calli 800dd94 <memcpy>
/* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
8002a00: 29 6d 00 0c lw r13,(r11+12) 8002a04: 34 0c 00 86 mvi r12,134
8002a08: 5d a0 00 5f bne r13,r0,8002b84 <pthread_create+0x24c> return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
8002a0c: 2b 81 00 3c lw r1,(sp+60) 8002a10: f8 00 19 a6 calli 80090a8 <_POSIX_Priority_Is_valid>
8002a14: 44 2d 00 5b be r1,r13,8002b80 <pthread_create+0x248> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
8002a18: 78 05 08 01 mvhi r5,0x801 8002a1c: 38 a5 e0 e4 ori r5,r5,0xe0e4
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param(
8002a20: b9 e0 08 00 mv r1,r15 8002a24: 37 82 00 3c addi r2,sp,60 8002a28: 37 83 00 5c addi r3,sp,92 8002a2c: 37 84 00 58 addi r4,sp,88 8002a30: 40 b4 00 00 lbu r20,(r5+0)
* Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
8002a34: 2b 93 00 3c lw r19,(sp+60)
/* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param(
8002a38: f8 00 19 a4 calli 80090c8 <_POSIX_Thread_Translate_sched_param> 8002a3c: b8 20 60 00 mv r12,r1
schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 8002a40: 5c 20 00 51 bne r1,r0,8002b84 <pthread_create+0x24c> #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator();
8002a44: 78 0e 08 01 mvhi r14,0x801 8002a48: 39 ce e9 18 ori r14,r14,0xe918 8002a4c: 29 c1 00 00 lw r1,(r14+0) 8002a50: f8 00 04 4d calli 8003b84 <_API_Mutex_Lock>
* _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
8002a54: 78 01 08 01 mvhi r1,0x801 8002a58: 38 21 ea 64 ori r1,r1,0xea64 8002a5c: f8 00 06 fd calli 8004650 <_Objects_Allocate> 8002a60: b8 20 68 00 mv r13,r1
* Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 8002a64: 5c 2c 00 03 bne r1,r12,8002a70 <pthread_create+0x138> _RTEMS_Unlock_allocator();
8002a68: 29 c1 00 00 lw r1,(r14+0) 8002a6c: e0 00 00 1f bi 8002ae8 <pthread_create+0x1b0>
/* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize(
8002a70: 78 02 08 01 mvhi r2,0x801 8002a74: 38 42 e0 e0 ori r2,r2,0xe0e0 8002a78: 28 42 00 00 lw r2,(r2+0) 8002a7c: 29 65 00 08 lw r5,(r11+8) 8002a80: 29 63 00 04 lw r3,(r11+4) 8002a84: b4 42 10 00 add r2,r2,r2
8002a88: 50 45 00 02 bgeu r2,r5,8002a90 <pthread_create+0x158>
8002a8c: b8 a0 10 00 mv r2,r5 8002a90: 34 09 00 00 mvi r9,0 8002a94: 5b 89 00 08 sw (sp+8),r9 8002a98: 2b 88 00 5c lw r8,(sp+92) 8002a9c: 2b 89 00 58 lw r9,(sp+88) 8002aa0: 78 01 08 01 mvhi r1,0x801 8002aa4: b8 40 20 00 mv r4,r2 8002aa8: ca 93 30 00 sub r6,r20,r19 8002aac: 38 21 ea 64 ori r1,r1,0xea64 8002ab0: b9 a0 10 00 mv r2,r13 8002ab4: b9 80 28 00 mv r5,r12 8002ab8: 34 07 00 01 mvi r7,1 8002abc: 5b 89 00 04 sw (sp+4),r9 8002ac0: 5b 8c 00 0c sw (sp+12),r12 8002ac4: f8 00 0a 69 calli 8005468 <_Thread_Initialize>
budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 8002ac8: 5c 20 00 0a bne r1,r0,8002af0 <pthread_create+0x1b8> RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
8002acc: 78 01 08 01 mvhi r1,0x801 8002ad0: 38 21 ea 64 ori r1,r1,0xea64 8002ad4: b9 a0 10 00 mv r2,r13 8002ad8: f8 00 07 db calli 8004a44 <_Objects_Free>
_POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator();
8002adc: 78 01 08 01 mvhi r1,0x801 8002ae0: 38 21 e9 18 ori r1,r1,0xe918 8002ae4: 28 21 00 00 lw r1,(r1+0) 8002ae8: 34 0c 00 0b mvi r12,11 8002aec: e0 00 00 23 bi 8002b78 <pthread_create+0x240>
} /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ];
8002af0: 29 ae 01 2c lw r14,(r13+300)
api->Attributes = *the_attr;
8002af4: b9 60 10 00 mv r2,r11 8002af8: 34 03 00 3c mvi r3,60 8002afc: b9 c0 08 00 mv r1,r14 8002b00: f8 00 2c a5 calli 800dd94 <memcpy>
api->detachstate = the_attr->detachstate;
8002b04: 29 6b 00 38 lw r11,(r11+56)
api->schedpolicy = schedpolicy; api->schedparam = schedparam;
8002b08: 37 82 00 3c addi r2,sp,60 8002b0c: 34 03 00 1c mvi r3,28
* finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate;
8002b10: 59 cb 00 3c sw (r14+60),r11
api->schedpolicy = schedpolicy;
8002b14: 59 cf 00 80 sw (r14+128),r15
api->schedparam = schedparam;
8002b18: 35 c1 00 84 addi r1,r14,132 8002b1c: f8 00 2c 9e calli 800dd94 <memcpy>
* This insures we evaluate the process-wide signals pending when we * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true;
8002b20: 34 01 00 01 mvi r1,1 8002b24: 31 a1 00 74 sb (r13+116),r1
/* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start(
8002b28: ba 00 18 00 mv r3,r16 8002b2c: ba 40 20 00 mv r4,r18 8002b30: b9 a0 08 00 mv r1,r13 8002b34: 34 02 00 01 mvi r2,1 8002b38: b9 80 28 00 mv r5,r12 8002b3c: f8 00 0d 92 calli 8006184 <_Thread_Start>
_RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) {
8002b40: 34 01 00 04 mvi r1,4
8002b44: 5d e1 00 08 bne r15,r1,8002b64 <pthread_create+0x22c> _Watchdog_Insert_ticks(
8002b48: 35 c1 00 8c addi r1,r14,140 8002b4c: f8 00 0e 30 calli 800640c <_Timespec_To_ticks>
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
8002b50: 59 c1 00 b0 sw (r14+176),r1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8002b54: 78 01 08 01 mvhi r1,0x801 8002b58: 38 21 e9 40 ori r1,r1,0xe940 8002b5c: 35 c2 00 a4 addi r2,r14,164 8002b60: f8 00 0f 52 calli 80068a8 <_Watchdog_Insert>
/* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator();
8002b64: 78 02 08 01 mvhi r2,0x801 8002b68: 38 42 e9 18 ori r2,r2,0xe918
} /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id;
8002b6c: 29 ad 00 08 lw r13,(r13+8)
_RTEMS_Unlock_allocator();
8002b70: 28 41 00 00 lw r1,(r2+0)
} /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id;
8002b74: 5a 2d 00 00 sw (r17+0),r13
_RTEMS_Unlock_allocator();
8002b78: f8 00 04 1f calli 8003bf4 <_API_Mutex_Unlock>
return 0;
8002b7c: e0 00 00 02 bi 8002b84 <pthread_create+0x24c> 8002b80: 34 0c 00 16 mvi r12,22
}
8002b84: b9 80 08 00 mv r1,r12 8002b88: 2b 9d 00 10 lw ra,(sp+16) 8002b8c: 2b 8b 00 38 lw r11,(sp+56) 8002b90: 2b 8c 00 34 lw r12,(sp+52) 8002b94: 2b 8d 00 30 lw r13,(sp+48) 8002b98: 2b 8e 00 2c lw r14,(sp+44) 8002b9c: 2b 8f 00 28 lw r15,(sp+40) 8002ba0: 2b 90 00 24 lw r16,(sp+36) 8002ba4: 2b 91 00 20 lw r17,(sp+32) 8002ba8: 2b 92 00 1c lw r18,(sp+28) 8002bac: 2b 93 00 18 lw r19,(sp+24) 8002bb0: 2b 94 00 14 lw r20,(sp+20) 8002bb4: 37 9c 00 5c addi sp,sp,92 8002bb8: c3 a0 00 00 ret
0800af88 <pthread_exit>: void pthread_exit( void *value_ptr ) {
800af88: 37 9c ff fc addi sp,sp,-4 800af8c: 5b 9d 00 04 sw (sp+4),ra
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
800af90: 78 03 08 01 mvhi r3,0x801 800af94: 38 63 d9 60 ori r3,r3,0xd960
} void pthread_exit( void *value_ptr ) {
800af98: b8 20 10 00 mv r2,r1
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
800af9c: 28 61 00 00 lw r1,(r3+0) 800afa0: fb ff ff d4 calli 800aef0 <_POSIX_Thread_Exit>
}
800afa4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800afa8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800afac: c3 a0 00 00 ret <== NOT EXECUTED
08004fd0 <pthread_mutex_init>: int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) {
8004fd0: 37 9c ff ec addi sp,sp,-20 8004fd4: 5b 8b 00 14 sw (sp+20),r11 8004fd8: 5b 8c 00 10 sw (sp+16),r12 8004fdc: 5b 8d 00 0c sw (sp+12),r13 8004fe0: 5b 8e 00 08 sw (sp+8),r14 8004fe4: 5b 9d 00 04 sw (sp+4),ra 8004fe8: b8 20 70 00 mv r14,r1
POSIX_Mutex_Control *the_mutex; CORE_mutex_Attributes *the_mutex_attr; const pthread_mutexattr_t *the_attr; CORE_mutex_Disciplines the_discipline; if ( attr ) the_attr = attr;
8004fec: b8 40 58 00 mv r11,r2
8004ff0: 5c 40 00 03 bne r2,r0,8004ffc <pthread_mutex_init+0x2c>
8004ff4: 78 0b 08 02 mvhi r11,0x802 8004ff8: 39 6b 3c 84 ori r11,r11,0x3c84
else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex )
8004ffc: 45 c0 00 4a be r14,r0,8005124 <pthread_mutex_init+0x154> <== NEVER TAKEN
} } } #endif if ( !the_attr->is_initialized )
8005000: 29 61 00 00 lw r1,(r11+0)
8005004: 44 20 00 48 be r1,r0,8005124 <pthread_mutex_init+0x154> return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
8005008: 29 62 00 04 lw r2,(r11+4) 800500c: 34 03 00 01 mvi r3,1 8005010: 34 01 00 58 mvi r1,88
8005014: 44 43 00 45 be r2,r3,8005128 <pthread_mutex_init+0x158> return ENOSYS; if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE ) 8005018: 5c 40 00 43 bne r2,r0,8005124 <pthread_mutex_init+0x154> return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) {
800501c: 29 62 00 0c lw r2,(r11+12)
8005020: 44 43 00 05 be r2,r3,8005034 <pthread_mutex_init+0x64>
8005024: 34 01 00 02 mvi r1,2
8005028: 44 41 00 07 be r2,r1,8005044 <pthread_mutex_init+0x74> 800502c: 5c 40 00 3e bne r2,r0,8005124 <pthread_mutex_init+0x154>
8005030: e0 00 00 03 bi 800503c <pthread_mutex_init+0x6c> 8005034: 34 0d 00 02 mvi r13,2 8005038: e0 00 00 04 bi 8005048 <pthread_mutex_init+0x78> 800503c: b8 40 68 00 mv r13,r2 8005040: e0 00 00 02 bi 8005048 <pthread_mutex_init+0x78> 8005044: 34 0d 00 03 mvi r13,3
} /* * Validate the priority ceiling field -- should always be valid. */ if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
8005048: 29 61 00 08 lw r1,(r11+8) 800504c: f8 00 00 f2 calli 8005414 <_POSIX_Priority_Is_valid>
8005050: 44 20 00 35 be r1,r0,8005124 <pthread_mutex_init+0x154> #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) /* * Validate the mutex type and set appropriate SuperCore mutex * attributes. */ switch ( the_attr->type ) {
8005054: 29 62 00 10 lw r2,(r11+16) 8005058: 34 01 00 03 mvi r1,3
800505c: 54 41 00 32 bgu r2,r1,8005124 <pthread_mutex_init+0x154>
8005060: 78 02 08 02 mvhi r2,0x802 8005064: 38 42 38 c4 ori r2,r2,0x38c4 8005068: 28 41 00 00 lw r1,(r2+0) 800506c: 34 21 00 01 addi r1,r1,1 8005070: 58 41 00 00 sw (r2+0),r1
* _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information );
8005074: 78 01 08 02 mvhi r1,0x802 8005078: 38 21 3c 04 ori r1,r1,0x3c04 800507c: f8 00 08 41 calli 8007180 <_Objects_Allocate> 8005080: b8 20 60 00 mv r12,r1
*/ _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 8005084: 5c 20 00 04 bne r1,r0,8005094 <pthread_mutex_init+0xc4> _Thread_Enable_dispatch();
8005088: f8 00 0c 1d calli 80080fc <_Thread_Enable_dispatch> 800508c: 34 01 00 0b mvi r1,11
return EAGAIN;
8005090: e0 00 00 26 bi 8005128 <pthread_mutex_init+0x158>
} the_mutex->process_shared = the_attr->process_shared;
8005094: 29 61 00 04 lw r1,(r11+4) 8005098: 59 81 00 10 sw (r12+16),r1
the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive )
800509c: 29 61 00 14 lw r1,(r11+20)
80050a0: 44 20 00 03 be r1,r0,80050ac <pthread_mutex_init+0xdc> the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
80050a4: 34 01 00 00 mvi r1,0 80050a8: e0 00 00 02 bi 80050b0 <pthread_mutex_init+0xe0>
else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
80050ac: 34 01 00 01 mvi r1,1 80050b0: 59 81 00 54 sw (r12+84),r1
the_mutex_attr->only_owner_release = true; the_mutex_attr->priority_ceiling =
80050b4: 78 02 08 02 mvhi r2,0x802
if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = true;
80050b8: 34 01 00 01 mvi r1,1 80050bc: 31 81 00 58 sb (r12+88),r1
the_mutex_attr->priority_ceiling =
80050c0: 38 42 30 e4 ori r2,r2,0x30e4 80050c4: 40 42 00 00 lbu r2,(r2+0) 80050c8: 29 61 00 08 lw r1,(r11+8)
the_mutex_attr->discipline = the_discipline; /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize(
80050cc: 34 03 00 01 mvi r3,1
else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = true; the_mutex_attr->priority_ceiling = _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline;
80050d0: 59 8d 00 5c sw (r12+92),r13
if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = true; the_mutex_attr->priority_ceiling =
80050d4: c8 41 08 00 sub r1,r2,r1 80050d8: 59 81 00 60 sw (r12+96),r1
the_mutex_attr->discipline = the_discipline; /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize(
80050dc: 35 82 00 54 addi r2,r12,84 80050e0: 35 81 00 14 addi r1,r12,20 80050e4: f8 00 05 5e calli 800665c <_CORE_mutex_Initialize>
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
80050e8: 78 02 08 02 mvhi r2,0x802 80050ec: 29 8d 00 08 lw r13,(r12+8) 80050f0: 38 42 3c 04 ori r2,r2,0x3c04 80050f4: 28 4b 00 1c lw r11,(r2+28) 80050f8: 21 a1 ff ff andi r1,r13,0xffff 80050fc: 34 02 00 02 mvi r2,2 8005100: fb ff f7 34 calli 8002dd0 <__ashlsi3> 8005104: b5 61 08 00 add r1,r11,r1 8005108: 58 2c 00 00 sw (r1+0),r12
_Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name;
800510c: 34 0b 00 00 mvi r11,0 8005110: 59 8b 00 0c sw (r12+12),r11
CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id;
8005114: 59 cd 00 00 sw (r14+0),r13
_Thread_Enable_dispatch();
8005118: f8 00 0b f9 calli 80080fc <_Thread_Enable_dispatch> 800511c: b9 60 08 00 mv r1,r11
return 0;
8005120: e0 00 00 02 bi 8005128 <pthread_mutex_init+0x158> 8005124: 34 01 00 16 mvi r1,22
}
8005128: 2b 9d 00 04 lw ra,(sp+4) 800512c: 2b 8b 00 14 lw r11,(sp+20) 8005130: 2b 8c 00 10 lw r12,(sp+16) 8005134: 2b 8d 00 0c lw r13,(sp+12) 8005138: 2b 8e 00 08 lw r14,(sp+8) 800513c: 37 9c 00 14 addi sp,sp,20 8005140: c3 a0 00 00 ret
080020d0 <pthread_mutexattr_gettype>: int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { if ( !attr ) 80020d0: 44 20 00 08 be r1,r0,80020f0 <pthread_mutexattr_gettype+0x20> return EINVAL; if ( !attr->is_initialized )
80020d4: 28 23 00 00 lw r3,(r1+0)
80020d8: 44 60 00 06 be r3,r0,80020f0 <pthread_mutexattr_gettype+0x20> return EINVAL; if ( !type )
80020dc: 44 40 00 05 be r2,r0,80020f0 <pthread_mutexattr_gettype+0x20><== NEVER TAKEN
return EINVAL; *type = attr->type;
80020e0: 28 21 00 10 lw r1,(r1+16) 80020e4: 58 41 00 00 sw (r2+0),r1 80020e8: 34 01 00 00 mvi r1,0
return 0;
80020ec: c3 a0 00 00 ret 80020f0: 34 01 00 16 mvi r1,22
}
80020f4: c3 a0 00 00 ret
08004db4 <pthread_mutexattr_setpshared>: int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) 8004db4: 44 20 00 08 be r1,r0,8004dd4 <pthread_mutexattr_setpshared+0x20>
8004db8: 28 23 00 00 lw r3,(r1+0)
8004dbc: 44 60 00 06 be r3,r0,8004dd4 <pthread_mutexattr_setpshared+0x20> return EINVAL; switch ( pshared ) {
8004dc0: 34 03 00 01 mvi r3,1
8004dc4: 54 43 00 04 bgu r2,r3,8004dd4 <pthread_mutexattr_setpshared+0x20><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared;
8004dc8: 58 22 00 04 sw (r1+4),r2 8004dcc: 34 01 00 00 mvi r1,0
return 0;
8004dd0: c3 a0 00 00 ret 8004dd4: 34 01 00 16 mvi r1,22
default: return EINVAL; } }
8004dd8: c3 a0 00 00 ret
0800212c <pthread_mutexattr_settype>: int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { if ( !attr || !attr->is_initialized ) 800212c: 44 20 00 08 be r1,r0,800214c <pthread_mutexattr_settype+0x20>
8002130: 28 23 00 00 lw r3,(r1+0)
8002134: 44 60 00 06 be r3,r0,800214c <pthread_mutexattr_settype+0x20><== NEVER TAKEN
return EINVAL; switch ( type ) {
8002138: 34 03 00 03 mvi r3,3
800213c: 54 43 00 04 bgu r2,r3,800214c <pthread_mutexattr_settype+0x20> case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type;
8002140: 58 22 00 10 sw (r1+16),r2 8002144: 34 01 00 00 mvi r1,0
return 0;
8002148: c3 a0 00 00 ret 800214c: 34 01 00 16 mvi r1,22
default: return EINVAL; } }
8002150: c3 a0 00 00 ret
080030a0 <pthread_once>: int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) {
80030a0: 37 9c ff ec addi sp,sp,-20 80030a4: 5b 8b 00 10 sw (sp+16),r11 80030a8: 5b 8c 00 0c sw (sp+12),r12 80030ac: 5b 8d 00 08 sw (sp+8),r13 80030b0: 5b 9d 00 04 sw (sp+4),ra
if ( !once_control || !init_routine )
80030b4: 64 43 00 00 cmpei r3,r2,0
int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) {
80030b8: b8 40 60 00 mv r12,r2
if ( !once_control || !init_routine )
80030bc: 64 22 00 00 cmpei r2,r1,0
int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) {
80030c0: b8 20 58 00 mv r11,r1
if ( !once_control || !init_routine )
80030c4: b8 62 18 00 or r3,r3,r2 80030c8: 34 01 00 16 mvi r1,22
80030cc: 5c 60 00 13 bne r3,r0,8003118 <pthread_once+0x78> return EINVAL; if ( !once_control->init_executed ) {
80030d0: 29 6d 00 04 lw r13,(r11+4) 80030d4: b8 60 08 00 mv r1,r3
80030d8: 5d a3 00 10 bne r13,r3,8003118 <pthread_once+0x78> rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
80030dc: 34 01 01 00 mvi r1,256 80030e0: b8 20 10 00 mv r2,r1 80030e4: 37 83 00 14 addi r3,sp,20 80030e8: f8 00 01 0a calli 8003510 <rtems_task_mode>
if ( !once_control->init_executed ) {
80030ec: 29 61 00 04 lw r1,(r11+4)
80030f0: 5c 2d 00 05 bne r1,r13,8003104 <pthread_once+0x64> <== NEVER TAKEN
once_control->is_initialized = true;
80030f4: 34 01 00 01 mvi r1,1
once_control->init_executed = true;
80030f8: 59 61 00 04 sw (r11+4),r1
if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = true;
80030fc: 59 61 00 00 sw (r11+0),r1
once_control->init_executed = true; (*init_routine)();
8003100: d9 80 00 00 call r12
} rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
8003104: 2b 81 00 14 lw r1,(sp+20) 8003108: 34 02 01 00 mvi r2,256 800310c: 37 83 00 14 addi r3,sp,20 8003110: f8 00 01 00 calli 8003510 <rtems_task_mode> 8003114: 34 01 00 00 mvi r1,0
} return 0; }
8003118: 2b 9d 00 04 lw ra,(sp+4) 800311c: 2b 8b 00 10 lw r11,(sp+16) 8003120: 2b 8c 00 0c lw r12,(sp+12) 8003124: 2b 8d 00 08 lw r13,(sp+8) 8003128: 37 9c 00 14 addi sp,sp,20 800312c: c3 a0 00 00 ret
08003a98 <pthread_rwlock_init>: int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) {
8003a98: 37 9c ff dc addi sp,sp,-36 8003a9c: 5b 8b 00 18 sw (sp+24),r11 8003aa0: 5b 8c 00 14 sw (sp+20),r12 8003aa4: 5b 8d 00 10 sw (sp+16),r13 8003aa8: 5b 8e 00 0c sw (sp+12),r14 8003aac: 5b 8f 00 08 sw (sp+8),r15 8003ab0: 5b 9d 00 04 sw (sp+4),ra 8003ab4: b8 20 68 00 mv r13,r1
const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 8003ab8: 44 20 00 29 be r1,r0,8003b5c <pthread_rwlock_init+0xc4> return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) {
8003abc: b8 40 18 00 mv r3,r2
8003ac0: 5c 40 00 05 bne r2,r0,8003ad4 <pthread_rwlock_init+0x3c> the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr );
8003ac4: 37 8b 00 1c addi r11,sp,28 8003ac8: b9 60 08 00 mv r1,r11 8003acc: f8 00 02 b6 calli 80045a4 <pthread_rwlockattr_init> 8003ad0: b9 60 18 00 mv r3,r11
} /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized )
8003ad4: 28 61 00 00 lw r1,(r3+0)
8003ad8: 44 20 00 21 be r1,r0,8003b5c <pthread_rwlock_init+0xc4> <== NEVER TAKEN
return EINVAL; switch ( the_attr->process_shared ) {
8003adc: 28 6c 00 04 lw r12,(r3+4)
8003ae0: 5d 80 00 1f bne r12,r0,8003b5c <pthread_rwlock_init+0xc4> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
8003ae4: 78 02 08 02 mvhi r2,0x802 8003ae8: 38 42 18 7c ori r2,r2,0x187c 8003aec: 28 41 00 00 lw r1,(r2+0) 8003af0: 34 21 00 01 addi r1,r1,1 8003af4: 58 41 00 00 sw (r2+0),r1
* This function allocates a RWLock control block from * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *)
8003af8: 78 01 08 02 mvhi r1,0x802 8003afc: 38 21 1a 3c ori r1,r1,0x1a3c 8003b00: f8 00 08 90 calli 8005d40 <_Objects_Allocate> 8003b04: b8 20 58 00 mv r11,r1
*/ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 8003b08: 5c 2c 00 04 bne r1,r12,8003b18 <pthread_rwlock_init+0x80> _Thread_Enable_dispatch();
8003b0c: f8 00 0b d8 calli 8006a6c <_Thread_Enable_dispatch> 8003b10: 34 01 00 0b mvi r1,11
return EAGAIN;
8003b14: e0 00 00 13 bi 8003b60 <pthread_rwlock_init+0xc8>
} _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
8003b18: 34 21 00 10 addi r1,r1,16 8003b1c: 37 82 00 24 addi r2,sp,36 8003b20: f8 00 05 f5 calli 80052f4 <_CORE_RWLock_Initialize>
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
8003b24: 78 02 08 02 mvhi r2,0x802 8003b28: 29 6e 00 08 lw r14,(r11+8) 8003b2c: 38 42 1a 3c ori r2,r2,0x1a3c 8003b30: 28 4f 00 1c lw r15,(r2+28) 8003b34: 21 c1 ff ff andi r1,r14,0xffff 8003b38: 34 02 00 02 mvi r2,2 8003b3c: fb ff f8 62 calli 8001cc4 <__ashlsi3> 8003b40: b5 e1 08 00 add r1,r15,r1 8003b44: 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;
8003b48: 59 6c 00 0c sw (r11+12),r12
&_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id;
8003b4c: 59 ae 00 00 sw (r13+0),r14
_Thread_Enable_dispatch();
8003b50: f8 00 0b c7 calli 8006a6c <_Thread_Enable_dispatch> 8003b54: b9 80 08 00 mv r1,r12
return 0;
8003b58: e0 00 00 02 bi 8003b60 <pthread_rwlock_init+0xc8> 8003b5c: 34 01 00 16 mvi r1,22
}
8003b60: 2b 9d 00 04 lw ra,(sp+4) 8003b64: 2b 8b 00 18 lw r11,(sp+24) 8003b68: 2b 8c 00 14 lw r12,(sp+20) 8003b6c: 2b 8d 00 10 lw r13,(sp+16) 8003b70: 2b 8e 00 0c lw r14,(sp+12) 8003b74: 2b 8f 00 08 lw r15,(sp+8) 8003b78: 37 9c 00 24 addi sp,sp,36 8003b7c: c3 a0 00 00 ret
08003bf4 <pthread_rwlock_timedrdlock>: int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) {
8003bf4: 37 9c ff e8 addi sp,sp,-24 8003bf8: 5b 8b 00 10 sw (sp+16),r11 8003bfc: 5b 8c 00 0c sw (sp+12),r12 8003c00: 5b 8d 00 08 sw (sp+8),r13 8003c04: 5b 9d 00 04 sw (sp+4),ra 8003c08: b8 20 60 00 mv r12,r1 8003c0c: b8 40 08 00 mv r1,r2
Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 8003c10: 45 80 00 24 be r12,r0,8003ca0 <pthread_rwlock_timedrdlock+0xac> * * 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 );
8003c14: 37 82 00 14 addi r2,sp,20 8003c18: f8 00 1a 63 calli 800a5a4 <_POSIX_Absolute_timeout_to_ticks> 8003c1c: 29 82 00 00 lw r2,(r12+0) 8003c20: b8 20 58 00 mv r11,r1 8003c24: 78 01 08 02 mvhi r1,0x802 8003c28: 38 21 1a 3c ori r1,r1,0x1a3c 8003c2c: 37 83 00 18 addi r3,sp,24 8003c30: f8 00 09 84 calli 8006240 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) {
8003c34: 2b 8d 00 18 lw r13,(sp+24)
8003c38: 5d a0 00 1a bne r13,r0,8003ca0 <pthread_rwlock_timedrdlock+0xac> case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading(
8003c3c: 29 82 00 00 lw r2,(r12+0) 8003c40: 2b 84 00 14 lw r4,(sp+20)
int _EXFUN(pthread_rwlock_init, (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedrdlock,
8003c44: 65 6c 00 03 cmpei r12,r11,3 8003c48: 34 21 00 10 addi r1,r1,16 8003c4c: b9 80 18 00 mv r3,r12 8003c50: b9 a0 28 00 mv r5,r13 8003c54: f8 00 05 b6 calli 800532c <_CORE_RWLock_Obtain_for_reading>
do_wait, ticks, NULL ); _Thread_Enable_dispatch();
8003c58: f8 00 0b 85 calli 8006a6c <_Thread_Enable_dispatch>
if ( !do_wait ) { 8003c5c: 5d 8d 00 0b bne r12,r13,8003c88 <pthread_rwlock_timedrdlock+0x94> if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
8003c60: 78 01 08 02 mvhi r1,0x802 8003c64: 38 21 19 38 ori r1,r1,0x1938 8003c68: 28 21 00 00 lw r1,(r1+0) 8003c6c: 34 02 00 02 mvi r2,2 8003c70: 28 21 00 34 lw r1,(r1+52)
8003c74: 5c 22 00 05 bne r1,r2,8003c88 <pthread_rwlock_timedrdlock+0x94> switch (status) {
8003c78: 45 6c 00 0a be r11,r12,8003ca0 <pthread_rwlock_timedrdlock+0xac><== NEVER TAKEN 8003c7c: 55 61 00 03 bgu r11,r1,8003c88 <pthread_rwlock_timedrdlock+0x94><== NEVER TAKEN
8003c80: 34 01 00 74 mvi r1,116 8003c84: e0 00 00 08 bi 8003ca4 <pthread_rwlock_timedrdlock+0xb0>
break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code(
8003c88: 78 01 08 02 mvhi r1,0x802 8003c8c: 38 21 19 38 ori r1,r1,0x1938 8003c90: 28 21 00 00 lw r1,(r1+0) 8003c94: 28 21 00 34 lw r1,(r1+52) 8003c98: f8 00 00 3b calli 8003d84 <_POSIX_RWLock_Translate_core_RWLock_return_code> 8003c9c: e0 00 00 02 bi 8003ca4 <pthread_rwlock_timedrdlock+0xb0> 8003ca0: 34 01 00 16 mvi r1,22
case OBJECTS_ERROR: break; } return EINVAL; }
8003ca4: 2b 9d 00 04 lw ra,(sp+4) 8003ca8: 2b 8b 00 10 lw r11,(sp+16) 8003cac: 2b 8c 00 0c lw r12,(sp+12) 8003cb0: 2b 8d 00 08 lw r13,(sp+8) 8003cb4: 37 9c 00 18 addi sp,sp,24 8003cb8: c3 a0 00 00 ret
08003cbc <pthread_rwlock_timedwrlock>: int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) {
8003cbc: 37 9c ff e8 addi sp,sp,-24 8003cc0: 5b 8b 00 10 sw (sp+16),r11 8003cc4: 5b 8c 00 0c sw (sp+12),r12 8003cc8: 5b 8d 00 08 sw (sp+8),r13 8003ccc: 5b 9d 00 04 sw (sp+4),ra 8003cd0: b8 20 60 00 mv r12,r1 8003cd4: b8 40 08 00 mv r1,r2
Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 8003cd8: 45 80 00 24 be r12,r0,8003d68 <pthread_rwlock_timedwrlock+0xac> * * 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 );
8003cdc: 37 82 00 14 addi r2,sp,20 8003ce0: f8 00 1a 31 calli 800a5a4 <_POSIX_Absolute_timeout_to_ticks> 8003ce4: 29 82 00 00 lw r2,(r12+0) 8003ce8: b8 20 58 00 mv r11,r1 8003cec: 78 01 08 02 mvhi r1,0x802 8003cf0: 38 21 1a 3c ori r1,r1,0x1a3c 8003cf4: 37 83 00 18 addi r3,sp,24 8003cf8: f8 00 09 52 calli 8006240 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) {
8003cfc: 2b 8d 00 18 lw r13,(sp+24)
8003d00: 5d a0 00 1a bne r13,r0,8003d68 <pthread_rwlock_timedwrlock+0xac> case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing(
8003d04: 29 82 00 00 lw r2,(r12+0) 8003d08: 2b 84 00 14 lw r4,(sp+20)
(pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedwrlock,
8003d0c: 65 6c 00 03 cmpei r12,r11,3 8003d10: 34 21 00 10 addi r1,r1,16 8003d14: b9 80 18 00 mv r3,r12 8003d18: b9 a0 28 00 mv r5,r13 8003d1c: f8 00 05 c7 calli 8005438 <_CORE_RWLock_Obtain_for_writing>
do_wait, ticks, NULL ); _Thread_Enable_dispatch();
8003d20: f8 00 0b 53 calli 8006a6c <_Thread_Enable_dispatch>
if ( !do_wait && 8003d24: 5d 8d 00 0b bne r12,r13,8003d50 <pthread_rwlock_timedwrlock+0x94> (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
8003d28: 78 01 08 02 mvhi r1,0x802 8003d2c: 38 21 19 38 ori r1,r1,0x1938 8003d30: 28 21 00 00 lw r1,(r1+0) 8003d34: 34 02 00 02 mvi r2,2 8003d38: 28 21 00 34 lw r1,(r1+52)
8003d3c: 5c 22 00 05 bne r1,r2,8003d50 <pthread_rwlock_timedwrlock+0x94> switch (status) {
8003d40: 45 6c 00 0a be r11,r12,8003d68 <pthread_rwlock_timedwrlock+0xac><== NEVER TAKEN 8003d44: 55 61 00 03 bgu r11,r1,8003d50 <pthread_rwlock_timedwrlock+0x94><== NEVER TAKEN
8003d48: 34 01 00 74 mvi r1,116 8003d4c: e0 00 00 08 bi 8003d6c <pthread_rwlock_timedwrlock+0xb0>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code(
8003d50: 78 01 08 02 mvhi r1,0x802 8003d54: 38 21 19 38 ori r1,r1,0x1938 8003d58: 28 21 00 00 lw r1,(r1+0) 8003d5c: 28 21 00 34 lw r1,(r1+52) 8003d60: f8 00 00 09 calli 8003d84 <_POSIX_RWLock_Translate_core_RWLock_return_code> 8003d64: e0 00 00 02 bi 8003d6c <pthread_rwlock_timedwrlock+0xb0> 8003d68: 34 01 00 16 mvi r1,22
case OBJECTS_ERROR: break; } return EINVAL; }
8003d6c: 2b 9d 00 04 lw ra,(sp+4) 8003d70: 2b 8b 00 10 lw r11,(sp+16) 8003d74: 2b 8c 00 0c lw r12,(sp+12) 8003d78: 2b 8d 00 08 lw r13,(sp+8) 8003d7c: 37 9c 00 18 addi sp,sp,24 8003d80: c3 a0 00 00 ret
080045c8 <pthread_rwlockattr_setpshared>: int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) 80045c8: 44 20 00 08 be r1,r0,80045e8 <pthread_rwlockattr_setpshared+0x20> return EINVAL; if ( !attr->is_initialized )
80045cc: 28 23 00 00 lw r3,(r1+0)
80045d0: 44 60 00 06 be r3,r0,80045e8 <pthread_rwlockattr_setpshared+0x20> return EINVAL; switch ( pshared ) {
80045d4: 34 03 00 01 mvi r3,1
80045d8: 54 43 00 04 bgu r2,r3,80045e8 <pthread_rwlockattr_setpshared+0x20><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared;
80045dc: 58 22 00 04 sw (r1+4),r2 80045e0: 34 01 00 00 mvi r1,0
return 0;
80045e4: c3 a0 00 00 ret 80045e8: 34 01 00 16 mvi r1,22
default: return EINVAL; } }
80045ec: c3 a0 00 00 ret
08005c64 <pthread_setschedparam>: int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) {
8005c64: 37 9c ff dc addi sp,sp,-36 8005c68: 5b 8b 00 18 sw (sp+24),r11 8005c6c: 5b 8c 00 14 sw (sp+20),r12 8005c70: 5b 8d 00 10 sw (sp+16),r13 8005c74: 5b 8e 00 0c sw (sp+12),r14 8005c78: 5b 8f 00 08 sw (sp+8),r15 8005c7c: 5b 9d 00 04 sw (sp+4),ra
int rc; /* * Check all the parameters */ if ( !param )
8005c80: 34 0d 00 16 mvi r13,22
int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) {
8005c84: b8 60 70 00 mv r14,r3 8005c88: b8 20 58 00 mv r11,r1 8005c8c: b8 40 78 00 mv r15,r2
int rc; /* * Check all the parameters */ if ( !param ) 8005c90: 44 60 00 3e be r3,r0,8005d88 <pthread_setschedparam+0x124> return EINVAL; rc = _POSIX_Thread_Translate_sched_param(
8005c94: b8 40 08 00 mv r1,r2 8005c98: 37 84 00 20 addi r4,sp,32 8005c9c: b8 60 10 00 mv r2,r3 8005ca0: 37 83 00 24 addi r3,sp,36 8005ca4: f8 00 18 27 calli 800bd40 <_POSIX_Thread_Translate_sched_param> 8005ca8: b8 20 68 00 mv r13,r1
policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 8005cac: 5c 20 00 37 bne r1,r0,8005d88 <pthread_setschedparam+0x124>
8005cb0: 78 01 08 02 mvhi r1,0x802 8005cb4: 38 21 3a c4 ori r1,r1,0x3ac4 8005cb8: b9 60 10 00 mv r2,r11 8005cbc: 37 83 00 1c addi r3,sp,28 8005cc0: f8 00 06 ce calli 80077f8 <_Objects_Get> 8005cc4: b8 20 60 00 mv r12,r1
/* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) {
8005cc8: 2b 81 00 1c lw r1,(sp+28)
8005ccc: 44 2d 00 03 be r1,r13,8005cd8 <pthread_setschedparam+0x74>
8005cd0: 34 0d 00 03 mvi r13,3 8005cd4: e0 00 00 2d bi 8005d88 <pthread_setschedparam+0x124>
case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ];
8005cd8: 29 8b 01 2c lw r11,(r12+300)
if ( api->schedpolicy == SCHED_SPORADIC )
8005cdc: 34 01 00 04 mvi r1,4 8005ce0: 29 62 00 80 lw r2,(r11+128)
8005ce4: 5c 41 00 03 bne r2,r1,8005cf0 <pthread_setschedparam+0x8c> (void) _Watchdog_Remove( &api->Sporadic_timer );
8005ce8: 35 61 00 a4 addi r1,r11,164 8005cec: f8 00 0e a0 calli 800976c <_Watchdog_Remove>
api->schedpolicy = policy; api->schedparam = *param;
8005cf0: b9 c0 10 00 mv r2,r14
api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy;
8005cf4: 59 6f 00 80 sw (r11+128),r15
api->schedparam = *param;
8005cf8: 35 61 00 84 addi r1,r11,132 8005cfc: 34 03 00 1c mvi r3,28 8005d00: f8 00 2b 0d calli 8010934 <memcpy>
the_thread->budget_algorithm = budget_algorithm;
8005d04: 2b 82 00 24 lw r2,(sp+36)
the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) {
8005d08: 29 61 00 80 lw r1,(r11+128)
if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm;
8005d0c: 59 82 00 7c sw (r12+124),r2
the_thread->budget_callout = budget_callout;
8005d10: 2b 82 00 20 lw r2,(sp+32) 8005d14: 59 82 00 80 sw (r12+128),r2
switch ( api->schedpolicy ) {
8005d18: 48 01 00 1b bg r0,r1,8005d84 <pthread_setschedparam+0x120> <== NEVER TAKEN
8005d1c: 34 02 00 02 mvi r2,2
8005d20: 4c 41 00 04 bge r2,r1,8005d30 <pthread_setschedparam+0xcc>
8005d24: 34 02 00 04 mvi r2,4
8005d28: 5c 22 00 17 bne r1,r2,8005d84 <pthread_setschedparam+0x120><== NEVER TAKEN
8005d2c: e0 00 00 0f bi 8005d68 <pthread_setschedparam+0x104>
case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
8005d30: 78 01 08 02 mvhi r1,0x802 8005d34: 38 21 38 54 ori r1,r1,0x3854 8005d38: 28 21 00 00 lw r1,(r1+0) 8005d3c: 29 62 00 84 lw r2,(r11+132)
the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority(
8005d40: 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;
8005d44: 59 81 00 78 sw (r12+120),r1 8005d48: 78 01 08 02 mvhi r1,0x802 8005d4c: 38 21 30 e4 ori r1,r1,0x30e4 8005d50: 40 24 00 00 lbu r4,(r1+0)
the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority(
8005d54: b9 80 08 00 mv r1,r12 8005d58: 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 =
8005d5c: 59 82 00 18 sw (r12+24),r2
_POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority(
8005d60: f8 00 07 76 calli 8007b38 <_Thread_Change_priority>
the_thread, the_thread->real_priority, true ); break;
8005d64: e0 00 00 08 bi 8005d84 <pthread_setschedparam+0x120>
case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority;
8005d68: 29 61 00 84 lw r1,(r11+132) 8005d6c: 59 61 00 a0 sw (r11+160),r1
_Watchdog_Remove( &api->Sporadic_timer );
8005d70: 35 61 00 a4 addi r1,r11,164 8005d74: f8 00 0e 7e calli 800976c <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
8005d78: b9 80 10 00 mv r2,r12 8005d7c: 34 01 00 00 mvi r1,0 8005d80: fb ff ff 92 calli 8005bc8 <_POSIX_Threads_Sporadic_budget_TSR>
break; } _Thread_Enable_dispatch();
8005d84: f8 00 08 de calli 80080fc <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return ESRCH; }
8005d88: b9 a0 08 00 mv r1,r13 8005d8c: 2b 9d 00 04 lw ra,(sp+4) 8005d90: 2b 8b 00 18 lw r11,(sp+24) 8005d94: 2b 8c 00 14 lw r12,(sp+20) 8005d98: 2b 8d 00 10 lw r13,(sp+16) 8005d9c: 2b 8e 00 0c lw r14,(sp+12) 8005da0: 2b 8f 00 08 lw r15,(sp+8) 8005da4: 37 9c 00 24 addi sp,sp,36 8005da8: c3 a0 00 00 ret
08002d08 <pthread_testcancel>: * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) {
8002d08: 37 9c ff f8 addi sp,sp,-8 8002d0c: 5b 8b 00 08 sw (sp+8),r11 8002d10: 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() )
8002d14: 78 01 08 01 mvhi r1,0x801 8002d18: 38 21 f8 fc ori r1,r1,0xf8fc 8002d1c: 28 22 00 00 lw r2,(r1+0)
8002d20: 5c 40 00 16 bne r2,r0,8002d78 <pthread_testcancel+0x70> <== NEVER TAKEN
8002d24: 78 01 08 01 mvhi r1,0x801 8002d28: 38 21 f8 64 ori r1,r1,0xf864
return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
8002d2c: 78 03 08 01 mvhi r3,0x801 8002d30: 28 24 00 00 lw r4,(r1+0) 8002d34: 38 63 f9 20 ori r3,r3,0xf920 8002d38: 28 63 00 00 lw r3,(r3+0) 8002d3c: 34 84 00 01 addi r4,r4,1 8002d40: 58 24 00 00 sw (r1+0),r4 8002d44: 28 61 01 2c lw r1,(r3+300)
_Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
8002d48: 28 23 00 d4 lw r3,(r1+212) 8002d4c: b8 40 58 00 mv r11,r2
8002d50: 5c 62 00 03 bne r3,r2,8002d5c <pthread_testcancel+0x54> <== NEVER TAKEN
/* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate)); int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype)); void _EXFUN(pthread_testcancel, (void));
8002d54: 28 2b 00 dc lw r11,(r1+220) 8002d58: 7d 6b 00 00 cmpnei r11,r11,0
thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch();
8002d5c: f8 00 07 be calli 8004c54 <_Thread_Enable_dispatch>
if ( cancel ) 8002d60: 45 60 00 06 be r11,r0,8002d78 <pthread_testcancel+0x70> _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
8002d64: 78 01 08 01 mvhi r1,0x801 8002d68: 38 21 f9 20 ori r1,r1,0xf920 8002d6c: 28 21 00 00 lw r1,(r1+0) 8002d70: 34 02 ff ff mvi r2,-1 8002d74: f8 00 16 f1 calli 8008938 <_POSIX_Thread_Exit>
}
8002d78: 2b 9d 00 04 lw ra,(sp+4) 8002d7c: 2b 8b 00 08 lw r11,(sp+8) 8002d80: 37 9c 00 08 addi sp,sp,8 8002d84: c3 a0 00 00 ret
0801ac80 <read>: ssize_t read( int fd, void *buffer, size_t count ) {
801ac80: 37 9c ff e8 addi sp,sp,-24 801ac84: 5b 8b 00 14 sw (sp+20),r11 801ac88: 5b 8c 00 10 sw (sp+16),r12 801ac8c: 5b 8d 00 0c sw (sp+12),r13 801ac90: 5b 8e 00 08 sw (sp+8),r14 801ac94: 5b 9d 00 04 sw (sp+4),ra
ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd );
801ac98: 78 04 08 01 mvhi r4,0x801 801ac9c: 38 84 d0 10 ori r4,r4,0xd010 801aca0: 28 84 00 00 lw r4,(r4+0)
ssize_t read( int fd, void *buffer, size_t count ) {
801aca4: b8 40 68 00 mv r13,r2
ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd );
801aca8: 54 81 00 02 bgu r4,r1,801acb0 <read+0x30> <== ALWAYS TAKEN
801acac: e0 00 00 10 bi 801acec <read+0x6c> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
801acb0: 34 02 00 03 mvi r2,3 801acb4: 5b 83 00 18 sw (sp+24),r3 801acb8: 78 0b 08 01 mvhi r11,0x801 801acbc: fb ff 95 4d calli 80001f0 <__ashlsi3> 801acc0: 34 02 00 03 mvi r2,3 801acc4: 39 6b d7 1c ori r11,r11,0xd71c 801acc8: b8 20 70 00 mv r14,r1 801accc: fb ff 95 49 calli 80001f0 <__ashlsi3> 801acd0: 29 6c 00 00 lw r12,(r11+0) 801acd4: b5 c1 08 00 add r1,r14,r1
rtems_libio_check_is_open( iop );
801acd8: 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 );
801acdc: b5 81 60 00 add r12,r12,r1
rtems_libio_check_is_open( iop );
801ace0: 29 81 00 18 lw r1,(r12+24) 801ace4: 20 22 01 00 andi r2,r1,0x100
801ace8: 5c 40 00 04 bne r2,r0,801acf8 <read+0x78>
801acec: fb ff c6 14 calli 800c53c <__errno> 801acf0: 34 02 00 09 mvi r2,9 801acf4: e0 00 00 0e bi 801ad2c <read+0xac>
rtems_libio_check_buffer( buffer );
801acf8: 45 a0 00 05 be r13,r0,801ad0c <read+0x8c> <== NEVER TAKEN
rtems_libio_check_count( count );
801acfc: b8 60 58 00 mv r11,r3
801ad00: 44 60 00 1d be r3,r0,801ad74 <read+0xf4> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
801ad04: 20 21 00 02 andi r1,r1,0x2
801ad08: 5c 20 00 04 bne r1,r0,801ad18 <read+0x98> <== ALWAYS TAKEN
801ad0c: fb ff c6 0c calli 800c53c <__errno> <== NOT EXECUTED 801ad10: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 801ad14: e0 00 00 06 bi 801ad2c <read+0xac> <== NOT EXECUTED
/* * Now process the read(). */ if ( !iop->handlers->read_h )
801ad18: 29 81 00 40 lw r1,(r12+64) 801ad1c: 28 24 00 08 lw r4,(r1+8)
801ad20: 5c 80 00 06 bne r4,r0,801ad38 <read+0xb8> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
801ad24: fb ff c6 06 calli 800c53c <__errno> <== NOT EXECUTED 801ad28: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
801ad2c: 58 22 00 00 sw (r1+0),r2 801ad30: 34 0b ff ff mvi r11,-1 801ad34: e0 00 00 10 bi 801ad74 <read+0xf4>
rc = (*iop->handlers->read_h)( iop, buffer, count );
801ad38: b9 a0 10 00 mv r2,r13 801ad3c: b9 80 08 00 mv r1,r12 801ad40: d8 80 00 00 call r4 801ad44: b8 20 58 00 mv r11,r1
if ( rc > 0 ) 801ad48: 4c 01 00 0b bge r0,r1,801ad74 <read+0xf4> iop->offset += rc;
801ad4c: 34 02 00 1f mvi r2,31 801ad50: fb ff 95 78 calli 8000330 <__ashrsi3> 801ad54: 29 82 00 14 lw r2,(r12+20) 801ad58: 29 84 00 10 lw r4,(r12+16) 801ad5c: b5 62 10 00 add r2,r11,r2 801ad60: f5 62 18 00 cmpgu r3,r11,r2 801ad64: b4 24 08 00 add r1,r1,r4 801ad68: b4 61 08 00 add r1,r3,r1 801ad6c: 59 82 00 14 sw (r12+20),r2 801ad70: 59 81 00 10 sw (r12+16),r1
return rc; }
801ad74: b9 60 08 00 mv r1,r11 801ad78: 2b 9d 00 04 lw ra,(sp+4) 801ad7c: 2b 8b 00 14 lw r11,(sp+20) 801ad80: 2b 8c 00 10 lw r12,(sp+16) 801ad84: 2b 8d 00 0c lw r13,(sp+12) 801ad88: 2b 8e 00 08 lw r14,(sp+8) 801ad8c: 37 9c 00 18 addi sp,sp,24 801ad90: c3 a0 00 00 ret
08028528 <readlink>: ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) {
8028528: 37 9c ff d8 addi sp,sp,-40 802852c: 5b 8b 00 14 sw (sp+20),r11 8028530: 5b 8c 00 10 sw (sp+16),r12 8028534: 5b 8d 00 0c sw (sp+12),r13 8028538: 5b 8e 00 08 sw (sp+8),r14 802853c: 5b 9d 00 04 sw (sp+4),ra 8028540: b8 40 68 00 mv r13,r2 8028544: b8 60 70 00 mv r14,r3 8028548: b8 20 60 00 mv r12,r1
rtems_filesystem_location_info_t loc; int result; if (!buf)
802854c: 5c 40 00 04 bne r2,r0,802855c <readlink+0x34> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
8028550: f8 00 6e 8e calli 8043f88 <__errno> <== NOT EXECUTED 8028554: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8028558: e0 00 00 14 bi 80285a8 <readlink+0x80> <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
802855c: f8 00 8c 8c calli 804b78c <strlen> 8028560: 34 03 00 00 mvi r3,0 8028564: 37 8b 00 18 addi r11,sp,24 8028568: b8 20 10 00 mv r2,r1 802856c: b9 60 20 00 mv r4,r11 8028570: b9 80 08 00 mv r1,r12 8028574: b8 60 28 00 mv r5,r3 8028578: fb ff 77 27 calli 8006214 <rtems_filesystem_evaluate_path>
0, &loc, false ); if ( result != 0 )
802857c: 34 0c ff ff mvi r12,-1
8028580: 5c 20 00 2a bne r1,r0,8028628 <readlink+0x100> <== NEVER TAKEN
return -1; if ( !loc.ops->node_type_h ){
8028584: 2b 82 00 24 lw r2,(sp+36) 8028588: 28 44 00 10 lw r4,(r2+16)
802858c: 5c 81 00 0a bne r4,r1,80285b4 <readlink+0x8c> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
8028590: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8028594: 44 44 00 03 be r2,r4,80285a0 <readlink+0x78> <== NOT EXECUTED 8028598: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802859c: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
80285a0: f8 00 6e 7a calli 8043f88 <__errno> <== NOT EXECUTED 80285a4: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
80285a8: 58 22 00 00 sw (r1+0),r2 80285ac: 34 0c ff ff mvi r12,-1 80285b0: e0 00 00 1e bi 8028628 <readlink+0x100>
} if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
80285b4: b9 60 08 00 mv r1,r11 80285b8: d8 80 00 00 call r4 80285bc: 34 02 00 04 mvi r2,4 80285c0: 2b 84 00 24 lw r4,(sp+36)
80285c4: 44 22 00 09 be r1,r2,80285e8 <readlink+0xc0> rtems_filesystem_freenode( &loc );
80285c8: 44 80 00 05 be r4,r0,80285dc <readlink+0xb4> <== NEVER TAKEN
80285cc: 28 82 00 1c lw r2,(r4+28)
80285d0: 44 40 00 03 be r2,r0,80285dc <readlink+0xb4> <== NEVER TAKEN
80285d4: b9 60 08 00 mv r1,r11 80285d8: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( EINVAL );
80285dc: f8 00 6e 6b calli 8043f88 <__errno> 80285e0: 34 02 00 16 mvi r2,22 80285e4: e3 ff ff f1 bi 80285a8 <readlink+0x80>
} if ( !loc.ops->readlink_h ){
80285e8: 28 85 00 3c lw r5,(r4+60)
80285ec: 5c a0 00 04 bne r5,r0,80285fc <readlink+0xd4> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
80285f0: 28 82 00 1c lw r2,(r4+28) <== NOT EXECUTED 80285f4: 5c 45 ff e9 bne r2,r5,8028598 <readlink+0x70> <== NOT EXECUTED 80285f8: e3 ff ff ea bi 80285a0 <readlink+0x78> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
80285fc: b9 a0 10 00 mv r2,r13 8028600: b9 c0 18 00 mv r3,r14 8028604: b9 60 08 00 mv r1,r11 8028608: d8 a0 00 00 call r5 802860c: b8 20 60 00 mv r12,r1
rtems_filesystem_freenode( &loc );
8028610: 2b 81 00 24 lw r1,(sp+36)
8028614: 44 20 00 05 be r1,r0,8028628 <readlink+0x100> <== NEVER TAKEN
8028618: 28 22 00 1c lw r2,(r1+28)
802861c: 44 40 00 03 be r2,r0,8028628 <readlink+0x100> <== NEVER TAKEN
8028620: b9 60 08 00 mv r1,r11 8028624: d8 40 00 00 call r2
return result; }
8028628: b9 80 08 00 mv r1,r12 802862c: 2b 9d 00 04 lw ra,(sp+4) 8028630: 2b 8b 00 14 lw r11,(sp+20) 8028634: 2b 8c 00 10 lw r12,(sp+16) 8028638: 2b 8d 00 0c lw r13,(sp+12) 802863c: 2b 8e 00 08 lw r14,(sp+8) 8028640: 37 9c 00 28 addi sp,sp,40 8028644: c3 a0 00 00 ret
08003328 <readv>: ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) {
8003328: 37 9c ff e4 addi sp,sp,-28 800332c: 5b 8b 00 1c sw (sp+28),r11 8003330: 5b 8c 00 18 sw (sp+24),r12 8003334: 5b 8d 00 14 sw (sp+20),r13 8003338: 5b 8e 00 10 sw (sp+16),r14 800333c: 5b 8f 00 0c sw (sp+12),r15 8003340: 5b 90 00 08 sw (sp+8),r16 8003344: 5b 9d 00 04 sw (sp+4),ra
int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd );
8003348: 78 04 08 02 mvhi r4,0x802 800334c: 38 84 20 10 ori r4,r4,0x2010 8003350: 28 84 00 00 lw r4,(r4+0)
ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) {
8003354: b8 40 68 00 mv r13,r2 8003358: b8 60 80 00 mv r16,r3
int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd );
800335c: 54 81 00 02 bgu r4,r1,8003364 <readv+0x3c> <== ALWAYS TAKEN
8003360: e0 00 00 0e bi 8003398 <readv+0x70> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
8003364: 34 02 00 03 mvi r2,3 8003368: fb ff f6 d2 calli 8000eb0 <__ashlsi3> 800336c: 78 0b 08 02 mvhi r11,0x802 8003370: 34 02 00 03 mvi r2,3 8003374: 39 6b 2e f0 ori r11,r11,0x2ef0 8003378: b8 20 70 00 mv r14,r1 800337c: fb ff f6 cd calli 8000eb0 <__ashlsi3> 8003380: 29 6c 00 00 lw r12,(r11+0) 8003384: b5 c1 08 00 add r1,r14,r1 8003388: b5 81 60 00 add r12,r12,r1
rtems_libio_check_is_open( iop );
800338c: 29 81 00 18 lw r1,(r12+24) 8003390: 20 22 01 00 andi r2,r1,0x100
8003394: 5c 40 00 04 bne r2,r0,80033a4 <readv+0x7c> <== ALWAYS TAKEN
8003398: f8 00 2e da calli 800ef00 <__errno> <== NOT EXECUTED 800339c: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 80033a0: e0 00 00 1e bi 8003418 <readv+0xf0> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
80033a4: 20 21 00 02 andi r1,r1,0x2
80033a8: 44 20 00 1a be r1,r0,8003410 <readv+0xe8> <== NEVER TAKEN
/* * Argument validation on IO vector */ if ( !iov ) 80033ac: 45 a0 00 19 be r13,r0,8003410 <readv+0xe8> rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 80033b0: 4a 00 00 02 bg r16,r0,80033b8 <readv+0x90>
80033b4: e0 00 00 17 bi 8003410 <readv+0xe8>
rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX )
80033b8: 34 01 04 00 mvi r1,1024
80033bc: 4c 30 00 02 bge r1,r16,80033c4 <readv+0x9c> <== ALWAYS TAKEN
80033c0: e0 00 00 14 bi 8003410 <readv+0xe8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h )
80033c4: 29 81 00 40 lw r1,(r12+64) 80033c8: 28 21 00 08 lw r1,(r1+8)
80033cc: 5c 20 00 04 bne r1,r0,80033dc <readv+0xb4> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
80033d0: f8 00 2e cc calli 800ef00 <__errno> <== NOT EXECUTED 80033d4: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80033d8: e0 00 00 10 bi 8003418 <readv+0xf0> <== NOT EXECUTED
80033dc: 34 02 00 00 mvi r2,0 80033e0: b9 a0 08 00 mv r1,r13 80033e4: 34 0f 00 01 mvi r15,1 80033e8: b8 40 18 00 mv r3,r2
all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base )
80033ec: 28 24 00 00 lw r4,(r1+0)
* are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) {
80033f0: 34 42 00 01 addi r2,r2,1
ssize_t old; if ( !iov[v].iov_base ) 80033f4: 44 80 00 07 be r4,r0,8003410 <readv+0xe8> if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len;
80033f8: 28 24 00 04 lw r4,(r1+4)
* are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) {
80033fc: 34 21 00 08 addi r1,r1,8
old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len )
8003400: 64 85 00 00 cmpei r5,r4,0
if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len;
8003404: b4 64 20 00 add r4,r3,r4
if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len )
8003408: c8 05 28 00 sub r5,r0,r5
rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) 800340c: 4c 83 00 05 bge r4,r3,8003420 <readv+0xf8> rtems_set_errno_and_return_minus_one( EINVAL );
8003410: f8 00 2e bc calli 800ef00 <__errno> 8003414: 34 02 00 16 mvi r2,22 8003418: 58 22 00 00 sw (r1+0),r2 800341c: e0 00 00 13 bi 8003468 <readv+0x140>
if ( iov[v].iov_len )
8003420: a1 e5 78 00 and r15,r15,r5
* 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++ ) { 8003424: 4c 50 00 03 bge r2,r16,8003430 <readv+0x108>
8003428: b8 80 18 00 mv r3,r4 800342c: e3 ff ff f0 bi 80033ec <readv+0xc4>
/* * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) {
8003430: b9 e0 58 00 mv r11,r15
8003434: 45 e0 00 03 be r15,r0,8003440 <readv+0x118>
8003438: 34 0b 00 00 mvi r11,0 800343c: e0 00 00 1c bi 80034ac <readv+0x184>
/* * 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 );
8003440: 29 81 00 40 lw r1,(r12+64) 8003444: 29 a2 00 00 lw r2,(r13+0) 8003448: 29 a3 00 04 lw r3,(r13+4) 800344c: 28 24 00 08 lw r4,(r1+8) 8003450: b9 80 08 00 mv r1,r12
} /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
8003454: 35 ef 00 01 addi r15,r15,1
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
8003458: d8 80 00 00 call r4 800345c: b8 20 70 00 mv r14,r1
if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes;
8003460: 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 )
8003464: 4c 20 00 03 bge r1,r0,8003470 <readv+0x148> <== ALWAYS TAKEN
8003468: 34 0b ff ff mvi r11,-1 800346c: e0 00 00 10 bi 80034ac <readv+0x184>
return -1; if ( bytes > 0 ) {
8003470: 44 20 00 0b be r1,r0,800349c <readv+0x174> <== NEVER TAKEN
iop->offset += bytes;
8003474: fb ff f6 df calli 8000ff0 <__ashrsi3> 8003478: 29 82 00 14 lw r2,(r12+20) 800347c: 29 84 00 10 lw r4,(r12+16)
total += bytes;
8003480: b5 6e 58 00 add r11,r11,r14
if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes;
8003484: b5 c2 10 00 add r2,r14,r2 8003488: f5 c2 18 00 cmpgu r3,r14,r2 800348c: b4 24 08 00 add r1,r1,r4 8003490: b4 61 08 00 add r1,r3,r1 8003494: 59 81 00 10 sw (r12+16),r1 8003498: 59 82 00 14 sw (r12+20),r2
total += bytes; } if (bytes != iov[ v ].iov_len)
800349c: 29 a1 00 04 lw r1,(r13+4)
} /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
80034a0: 35 ad 00 08 addi r13,r13,8
if ( bytes > 0 ) { iop->offset += bytes; total += bytes; } if (bytes != iov[ v ].iov_len)
80034a4: 5d c1 00 02 bne r14,r1,80034ac <readv+0x184> <== NEVER TAKEN
} /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 80034a8: 4a 0f ff e6 bg r16,r15,8003440 <readv+0x118> if (bytes != iov[ v ].iov_len) break; } return total; }
80034ac: b9 60 08 00 mv r1,r11 80034b0: 2b 9d 00 04 lw ra,(sp+4) 80034b4: 2b 8b 00 1c lw r11,(sp+28) 80034b8: 2b 8c 00 18 lw r12,(sp+24) 80034bc: 2b 8d 00 14 lw r13,(sp+20) 80034c0: 2b 8e 00 10 lw r14,(sp+16) 80034c4: 2b 8f 00 0c lw r15,(sp+12) 80034c8: 2b 90 00 08 lw r16,(sp+8) 80034cc: 37 9c 00 1c addi sp,sp,28 80034d0: c3 a0 00 00 ret
0801ae34 <realloc>: { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1);
801ae34: 37 9c ff e8 addi sp,sp,-24 801ae38: 5b 8b 00 14 sw (sp+20),r11 801ae3c: 5b 8c 00 10 sw (sp+16),r12 801ae40: 5b 8d 00 0c sw (sp+12),r13 801ae44: 5b 8e 00 08 sw (sp+8),r14 801ae48: 5b 9d 00 04 sw (sp+4),ra 801ae4c: 78 03 08 01 mvhi r3,0x801 801ae50: 38 63 d7 28 ori r3,r3,0xd728 801ae54: 28 65 00 10 lw r5,(r3+16)
/* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) {
801ae58: 78 04 08 01 mvhi r4,0x801 801ae5c: 38 84 da 40 ori r4,r4,0xda40 801ae60: 28 84 00 00 lw r4,(r4+0)
{ uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1);
801ae64: 34 a5 00 01 addi r5,r5,1 801ae68: b8 20 58 00 mv r11,r1 801ae6c: 58 65 00 10 sw (r3+16),r5
/* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) {
801ae70: 34 01 00 03 mvi r1,3
{ uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1);
801ae74: b8 40 60 00 mv r12,r2
/* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) {
801ae78: 5c 81 00 09 bne r4,r1,801ae9c <realloc+0x68> <== NEVER TAKEN
if (_Thread_Dispatch_disable_level > 0)
801ae7c: 78 01 08 01 mvhi r1,0x801 801ae80: 38 21 d8 a4 ori r1,r1,0xd8a4 801ae84: 28 22 00 00 lw r2,(r1+0)
801ae88: 5c 40 00 36 bne r2,r0,801af60 <realloc+0x12c> <== NEVER TAKEN
return (void *) 0; if (_ISR_Nest_level > 0)
801ae8c: 78 01 08 01 mvhi r1,0x801 801ae90: 38 21 d9 3c ori r1,r1,0xd93c 801ae94: 28 21 00 00 lw r1,(r1+0)
801ae98: 5c 22 00 32 bne r1,r2,801af60 <realloc+0x12c> <== NEVER TAKEN
} /* * Continue with realloc(). */ if ( !ptr ) 801ae9c: 5d 60 00 05 bne r11,r0,801aeb0 <realloc+0x7c> return malloc( size );
801aea0: b9 80 08 00 mv r1,r12 801aea4: fb ff b2 38 calli 8007784 <malloc> 801aea8: b8 20 58 00 mv r11,r1 801aeac: e0 00 00 2e bi 801af64 <realloc+0x130>
if ( !size ) {
801aeb0: 5d 80 00 05 bne r12,r0,801aec4 <realloc+0x90> <== ALWAYS TAKEN
free( ptr );
801aeb4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 801aeb8: fb ff b0 8b calli 80070e4 <free> <== NOT EXECUTED 801aebc: b9 80 58 00 mv r11,r12 <== NOT EXECUTED
return (void *) 0;
801aec0: e0 00 00 29 bi 801af64 <realloc+0x130> <== NOT EXECUTED
} if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
801aec4: 78 0d 08 01 mvhi r13,0x801 801aec8: 39 ad d0 1c ori r13,r13,0xd01c 801aecc: 29 a1 00 00 lw r1,(r13+0) 801aed0: b9 60 10 00 mv r2,r11 801aed4: 37 83 00 18 addi r3,sp,24 801aed8: f8 00 00 70 calli 801b098 <_Protected_heap_Get_block_size> 801aedc: b8 20 70 00 mv r14,r1
801aee0: 5c 20 00 06 bne r1,r0,801aef8 <realloc+0xc4> errno = EINVAL;
801aee4: fb ff c5 96 calli 800c53c <__errno> 801aee8: 34 02 00 16 mvi r2,22 801aeec: 58 22 00 00 sw (r1+0),r2 801aef0: b9 c0 58 00 mv r11,r14
return (void *) 0;
801aef4: e0 00 00 1c bi 801af64 <realloc+0x130>
#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 ) ) {
801aef8: 29 a1 00 00 lw r1,(r13+0) 801aefc: b9 60 10 00 mv r2,r11 801af00: b9 80 18 00 mv r3,r12 801af04: f8 00 00 7d calli 801b0f8 <_Protected_heap_Resize_block> 801af08: b8 20 70 00 mv r14,r1
801af0c: 5c 20 00 16 bne r1,r0,801af64 <realloc+0x130> * 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 );
801af10: b9 80 08 00 mv r1,r12 801af14: fb ff b2 1c calli 8007784 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
801af18: 78 02 08 01 mvhi r2,0x801 801af1c: 38 42 d7 28 ori r2,r2,0xd728
* There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ new_area = malloc( size );
801af20: b8 20 68 00 mv r13,r1
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
801af24: 28 41 00 04 lw r1,(r2+4) 801af28: 34 21 ff ff addi r1,r1,-1 801af2c: 58 41 00 04 sw (r2+4),r1
if ( !new_area ) { 801af30: 45 ae 00 0c be r13,r14,801af60 <realloc+0x12c> return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size );
801af34: 2b 81 00 18 lw r1,(sp+24) 801af38: b9 80 18 00 mv r3,r12
801af3c: 50 2c 00 02 bgeu r1,r12,801af44 <realloc+0x110> <== NEVER TAKEN
801af40: b8 20 18 00 mv r3,r1 801af44: b9 60 10 00 mv r2,r11 801af48: b9 a0 08 00 mv r1,r13 801af4c: fb ff c8 22 calli 800cfd4 <memcpy>
free( ptr );
801af50: b9 60 08 00 mv r1,r11 801af54: fb ff b0 64 calli 80070e4 <free> 801af58: b9 a0 58 00 mv r11,r13
return new_area;
801af5c: e0 00 00 02 bi 801af64 <realloc+0x130> 801af60: 34 0b 00 00 mvi r11,0
}
801af64: b9 60 08 00 mv r1,r11 801af68: 2b 9d 00 04 lw ra,(sp+4) 801af6c: 2b 8b 00 14 lw r11,(sp+20) 801af70: 2b 8c 00 10 lw r12,(sp+16) 801af74: 2b 8d 00 0c lw r13,(sp+12) 801af78: 2b 8e 00 08 lw r14,(sp+8) 801af7c: 37 9c 00 18 addi sp,sp,24 801af80: c3 a0 00 00 ret
08028648 <rmdir>: #include <rtems/seterr.h> int rmdir( const char *pathname ) {
8028648: 37 9c ff c0 addi sp,sp,-64 802864c: 5b 8b 00 18 sw (sp+24),r11 8028650: 5b 8c 00 14 sw (sp+20),r12 8028654: 5b 8d 00 10 sw (sp+16),r13 8028658: 5b 8e 00 0c sw (sp+12),r14 802865c: 5b 8f 00 08 sw (sp+8),r15 8028660: 5b 9d 00 04 sw (sp+4),ra 8028664: b8 20 78 00 mv r15,r1
/* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname );
8028668: fb ff 76 9d calli 80060dc <rtems_filesystem_dirname> 802866c: b8 20 68 00 mv r13,r1
if ( parentpathlen == 0 ) 8028670: 5c 20 00 19 bne r1,r0,80286d4 <rmdir+0x8c> rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
8028674: 41 e1 00 00 lbu r1,(r15+0) 8028678: 64 23 00 5c cmpei r3,r1,92 802867c: 64 22 00 2f cmpei r2,r1,47 8028680: b8 62 10 00 or r2,r3,r2
8028684: 5c 4d 00 02 bne r2,r13,802868c <rmdir+0x44> <== ALWAYS TAKEN
8028688: 5c 20 00 0a bne r1,r0,80286b0 <rmdir+0x68> <== NOT EXECUTED
802868c: 78 01 08 06 mvhi r1,0x806 8028690: 38 21 d2 f0 ori r1,r1,0xd2f0 8028694: 28 22 00 00 lw r2,(r1+0) 8028698: 34 03 00 14 mvi r3,20 802869c: 37 81 00 30 addi r1,sp,48 80286a0: 34 42 00 18 addi r2,r2,24 80286a4: f8 00 7c dc calli 8047a14 <memcpy> 80286a8: 34 0c 00 00 mvi r12,0 80286ac: e0 00 00 12 bi 80286f4 <rmdir+0xac>
80286b0: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 80286b4: 38 21 d2 f0 ori r1,r1,0xd2f0 <== NOT EXECUTED 80286b8: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 80286bc: 34 03 00 14 mvi r3,20 <== NOT EXECUTED 80286c0: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 80286c4: 34 42 00 04 addi r2,r2,4 <== NOT EXECUTED 80286c8: f8 00 7c d3 calli 8047a14 <memcpy> <== NOT EXECUTED 80286cc: b9 a0 60 00 mv r12,r13 <== NOT EXECUTED 80286d0: e0 00 00 09 bi 80286f4 <rmdir+0xac> <== NOT EXECUTED
else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
80286d4: b9 e0 08 00 mv r1,r15 80286d8: b9 a0 10 00 mv r2,r13 80286dc: 34 03 00 02 mvi r3,2 80286e0: 37 84 00 30 addi r4,sp,48 80286e4: 34 05 00 00 mvi r5,0 80286e8: fb ff 76 cb calli 8006214 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 )
80286ec: 5c 20 00 60 bne r1,r0,802886c <rmdir+0x224> <== NEVER TAKEN
80286f0: 34 0c 00 01 mvi r12,1
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
80286f4: 37 8b 00 1c addi r11,sp,28 80286f8: 37 8e 00 30 addi r14,sp,48 80286fc: 34 03 00 14 mvi r3,20 8028700: b9 c0 10 00 mv r2,r14 8028704: b9 60 08 00 mv r1,r11 8028708: f8 00 7c c3 calli 8047a14 <memcpy>
name = pathname + parentpathlen;
802870c: b5 ed 68 00 add r13,r15,r13
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
8028710: b9 a0 08 00 mv r1,r13 8028714: f8 00 8c 1e calli 804b78c <strlen> 8028718: b8 20 10 00 mv r2,r1 802871c: b9 a0 08 00 mv r1,r13 8028720: fb ff 76 60 calli 80060a0 <rtems_filesystem_prefix_separators> 8028724: b5 a1 68 00 add r13,r13,r1
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
8028728: b9 a0 08 00 mv r1,r13 802872c: f8 00 8c 18 calli 804b78c <strlen> 8028730: 34 03 00 00 mvi r3,0 8028734: b8 20 10 00 mv r2,r1 8028738: b9 60 20 00 mv r4,r11 802873c: b9 a0 08 00 mv r1,r13 8028740: b8 60 28 00 mv r5,r3 8028744: fb ff 76 7a calli 800612c <rtems_filesystem_evaluate_relative_path>
0, &loc, false ); if ( result != 0 ) { 8028748: 44 20 00 09 be r1,r0,802876c <rmdir+0x124> if ( free_parentloc )
802874c: 45 80 00 48 be r12,r0,802886c <rmdir+0x224> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
8028750: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 8028754: 44 20 00 46 be r1,r0,802886c <rmdir+0x224> <== NOT EXECUTED 8028758: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 802875c: 44 40 00 44 be r2,r0,802886c <rmdir+0x224> <== NOT EXECUTED 8028760: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8028764: d8 40 00 00 call r2 <== NOT EXECUTED 8028768: e0 00 00 41 bi 802886c <rmdir+0x224> <== NOT EXECUTED
/* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){
802876c: 2b 82 00 28 lw r2,(sp+40) 8028770: 28 43 00 10 lw r3,(r2+16)
8028774: 5c 61 00 04 bne r3,r1,8028784 <rmdir+0x13c> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
8028778: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 802877c: 5c 43 00 1d bne r2,r3,80287f0 <rmdir+0x1a8> <== NOT EXECUTED 8028780: e0 00 00 1e bi 80287f8 <rmdir+0x1b0> <== NOT EXECUTED
if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
8028784: b9 60 08 00 mv r1,r11 8028788: d8 60 00 00 call r3 802878c: 34 02 00 01 mvi r2,1
8028790: 44 22 00 11 be r1,r2,80287d4 <rmdir+0x18c> rtems_filesystem_freenode( &loc );
8028794: 2b 81 00 28 lw r1,(sp+40)
8028798: 44 20 00 05 be r1,r0,80287ac <rmdir+0x164> <== NEVER TAKEN
802879c: 28 22 00 1c lw r2,(r1+28)
80287a0: 44 40 00 03 be r2,r0,80287ac <rmdir+0x164> <== NEVER TAKEN
80287a4: b9 60 08 00 mv r1,r11 80287a8: d8 40 00 00 call r2
if ( free_parentloc )
80287ac: 45 80 00 07 be r12,r0,80287c8 <rmdir+0x180> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
80287b0: 2b 81 00 3c lw r1,(sp+60)
80287b4: 44 20 00 05 be r1,r0,80287c8 <rmdir+0x180>
80287b8: 28 22 00 1c lw r2,(r1+28)
80287bc: 44 40 00 03 be r2,r0,80287c8 <rmdir+0x180> <== NEVER TAKEN
80287c0: 37 81 00 30 addi r1,sp,48 80287c4: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( ENOTDIR );
80287c8: f8 00 6d f0 calli 8043f88 <__errno> 80287cc: 34 02 00 14 mvi r2,20 80287d0: e0 00 00 13 bi 802881c <rmdir+0x1d4>
/* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){
80287d4: 2b 81 00 24 lw r1,(sp+36) 80287d8: 28 23 00 34 lw r3,(r1+52)
80287dc: 5c 60 00 12 bne r3,r0,8028824 <rmdir+0x1dc> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
80287e0: 2b 81 00 28 lw r1,(sp+40) <== NOT EXECUTED 80287e4: 44 23 00 05 be r1,r3,80287f8 <rmdir+0x1b0> <== NOT EXECUTED 80287e8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 80287ec: 44 40 00 03 be r2,r0,80287f8 <rmdir+0x1b0> <== NOT EXECUTED 80287f0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80287f4: d8 40 00 00 call r2 <== NOT EXECUTED
if ( free_parentloc )
80287f8: 45 80 00 07 be r12,r0,8028814 <rmdir+0x1cc> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
80287fc: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 8028800: 44 20 00 05 be r1,r0,8028814 <rmdir+0x1cc> <== NOT EXECUTED 8028804: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8028808: 44 40 00 03 be r2,r0,8028814 <rmdir+0x1cc> <== NOT EXECUTED 802880c: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 8028810: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8028814: f8 00 6d dd calli 8043f88 <__errno> <== NOT EXECUTED 8028818: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
802881c: 58 22 00 00 sw (r1+0),r2 8028820: e0 00 00 13 bi 802886c <rmdir+0x224>
} result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
8028824: b9 c0 08 00 mv r1,r14 8028828: b9 60 10 00 mv r2,r11 802882c: d8 60 00 00 call r3 8028830: b8 20 68 00 mv r13,r1
rtems_filesystem_freenode( &loc );
8028834: 2b 81 00 28 lw r1,(sp+40)
8028838: 44 20 00 05 be r1,r0,802884c <rmdir+0x204> <== NEVER TAKEN
802883c: 28 22 00 1c lw r2,(r1+28)
8028840: 44 40 00 03 be r2,r0,802884c <rmdir+0x204> <== NEVER TAKEN
8028844: b9 60 08 00 mv r1,r11 8028848: d8 40 00 00 call r2
if ( free_parentloc ) 802884c: 45 80 00 09 be r12,r0,8028870 <rmdir+0x228> rtems_filesystem_freenode( &parentloc );
8028850: 2b 81 00 3c lw r1,(sp+60)
8028854: 44 20 00 07 be r1,r0,8028870 <rmdir+0x228> <== NEVER TAKEN
8028858: 28 22 00 1c lw r2,(r1+28)
802885c: 44 40 00 05 be r2,r0,8028870 <rmdir+0x228> <== NEVER TAKEN
8028860: 37 81 00 30 addi r1,sp,48 8028864: d8 40 00 00 call r2 8028868: e0 00 00 02 bi 8028870 <rmdir+0x228> 802886c: 34 0d ff ff mvi r13,-1
return result; }
8028870: b9 a0 08 00 mv r1,r13 8028874: 2b 9d 00 04 lw ra,(sp+4) 8028878: 2b 8b 00 18 lw r11,(sp+24) 802887c: 2b 8c 00 14 lw r12,(sp+20) 8028880: 2b 8d 00 10 lw r13,(sp+16) 8028884: 2b 8e 00 0c lw r14,(sp+12) 8028888: 2b 8f 00 08 lw r15,(sp+8) 802888c: 37 9c 00 40 addi sp,sp,64 8028890: c3 a0 00 00 ret
08013598 <rtems_assoc_name_bad>: uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) {
8013598: 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] = "<assocnamebad.c: : BAD NAME>"; #endif return bad_buffer; }
801359c: 38 21 a1 f0 ori r1,r1,0xa1f0 <== NOT EXECUTED 80135a0: c3 a0 00 00 ret <== NOT EXECUTED
0800f5cc <rtems_assoc_name_by_local>: const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) {
800f5cc: 37 9c ff f8 addi sp,sp,-8 800f5d0: 5b 8b 00 08 sw (sp+8),r11 800f5d4: 5b 9d 00 04 sw (sp+4),ra 800f5d8: b8 40 58 00 mv r11,r2
const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value);
800f5dc: f8 00 00 0a calli 800f604 <rtems_assoc_ptr_by_local>
if (nap)
800f5e0: 44 20 00 03 be r1,r0,800f5ec <rtems_assoc_name_by_local+0x20><== NEVER TAKEN
return nap->name;
800f5e4: 28 21 00 00 lw r1,(r1+0) 800f5e8: e0 00 00 03 bi 800f5f4 <rtems_assoc_name_by_local+0x28>
return rtems_assoc_name_bad(local_value);
800f5ec: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800f5f0: f8 00 0f ea calli 8013598 <rtems_assoc_name_bad> <== NOT EXECUTED
}
800f5f4: 2b 9d 00 04 lw ra,(sp+4) 800f5f8: 2b 8b 00 08 lw r11,(sp+8) 800f5fc: 37 9c 00 08 addi sp,sp,8 800f600: c3 a0 00 00 ret
0800c4a4 <rtems_assoc_ptr_by_local>: const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) {
800c4a4: 37 9c ff f4 addi sp,sp,-12 800c4a8: 5b 8b 00 0c sw (sp+12),r11 800c4ac: 5b 8c 00 08 sw (sp+8),r12 800c4b0: 5b 9d 00 04 sw (sp+4),ra 800c4b4: b8 20 58 00 mv r11,r1
const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap))
800c4b8: 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 ) {
800c4bc: b8 40 60 00 mv r12,r2
const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap))
800c4c0: 44 20 00 07 be r1,r0,800c4dc <rtems_assoc_ptr_by_local+0x38><== NEVER TAKEN
800c4c4: 78 02 08 01 mvhi r2,0x801 800c4c8: 38 42 c0 6c ori r2,r2,0xc06c 800c4cc: f8 00 04 9c calli 800d73c <strcmp>
800c4d0: 5c 20 00 03 bne r1,r0,800c4dc <rtems_assoc_ptr_by_local+0x38><== ALWAYS TAKEN
default_ap = ap++;
800c4d4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800c4d8: e0 00 00 05 bi 800c4ec <rtems_assoc_ptr_by_local+0x48> <== NOT EXECUTED
800c4dc: 34 01 00 00 mvi r1,0 800c4e0: e0 00 00 04 bi 800c4f0 <rtems_assoc_ptr_by_local+0x4c>
for ( ; ap->name; ap++) if (ap->local_value == local_value)
800c4e4: 29 62 00 04 lw r2,(r11+4)
800c4e8: 44 4c 00 05 be r2,r12,800c4fc <rtems_assoc_ptr_by_local+0x58> const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++)
800c4ec: 35 6b 00 0c addi r11,r11,12 800c4f0: 29 62 00 00 lw r2,(r11+0)
800c4f4: 5c 40 ff fc bne r2,r0,800c4e4 <rtems_assoc_ptr_by_local+0x40>
800c4f8: b8 20 58 00 mv r11,r1
if (ap->local_value == local_value) return ap; return default_ap; }
800c4fc: b9 60 08 00 mv r1,r11 800c500: 2b 9d 00 04 lw ra,(sp+4) 800c504: 2b 8b 00 0c lw r11,(sp+12) 800c508: 2b 8c 00 08 lw r12,(sp+8) 800c50c: 37 9c 00 0c addi sp,sp,12 800c510: c3 a0 00 00 ret
0800aa80 <rtems_assoc_ptr_by_remote>: const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) {
800aa80: 37 9c ff f4 addi sp,sp,-12 800aa84: 5b 8b 00 0c sw (sp+12),r11 800aa88: 5b 8c 00 08 sw (sp+8),r12 800aa8c: 5b 9d 00 04 sw (sp+4),ra 800aa90: b8 20 58 00 mv r11,r1
const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap))
800aa94: 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 ) {
800aa98: b8 40 60 00 mv r12,r2
const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap))
800aa9c: 44 20 00 07 be r1,r0,800aab8 <rtems_assoc_ptr_by_remote+0x38><== NEVER TAKEN
800aaa0: 78 02 08 01 mvhi r2,0x801 800aaa4: 38 42 c0 6c ori r2,r2,0xc06c 800aaa8: f8 00 0b 25 calli 800d73c <strcmp>
800aaac: 5c 20 00 03 bne r1,r0,800aab8 <rtems_assoc_ptr_by_remote+0x38><== ALWAYS TAKEN
default_ap = ap++;
800aab0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800aab4: e0 00 00 05 bi 800aac8 <rtems_assoc_ptr_by_remote+0x48> <== NOT EXECUTED
800aab8: 34 01 00 00 mvi r1,0 800aabc: e0 00 00 04 bi 800aacc <rtems_assoc_ptr_by_remote+0x4c>
for ( ; ap->name; ap++) if (ap->remote_value == remote_value)
800aac0: 29 62 00 08 lw r2,(r11+8)
800aac4: 44 4c 00 05 be r2,r12,800aad8 <rtems_assoc_ptr_by_remote+0x58> const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++)
800aac8: 35 6b 00 0c addi r11,r11,12 800aacc: 29 62 00 00 lw r2,(r11+0)
800aad0: 5c 40 ff fc bne r2,r0,800aac0 <rtems_assoc_ptr_by_remote+0x40>
800aad4: b8 20 58 00 mv r11,r1
if (ap->remote_value == remote_value) return ap; return default_ap; }
800aad8: b9 60 08 00 mv r1,r11 800aadc: 2b 9d 00 04 lw ra,(sp+4) 800aae0: 2b 8b 00 0c lw r11,(sp+12) 800aae4: 2b 8c 00 08 lw r12,(sp+8) 800aae8: 37 9c 00 0c addi sp,sp,12 800aaec: c3 a0 00 00 ret
0800bb5c <rtems_assoc_remote_by_local>: uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) {
800bb5c: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 800bb60: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value);
800bb64: f8 00 02 50 calli 800c4a4 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if (nap)
800bb68: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 800bb6c: 44 20 00 02 be r1,r0,800bb74 <rtems_assoc_remote_by_local+0x18><== NOT EXECUTED
return nap->remote_value;
800bb70: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED
return 0; }
800bb74: b8 40 08 00 mv r1,r2 <== NOT EXECUTED 800bb78: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800bb7c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800bb80: c3 a0 00 00 ret <== NOT EXECUTED
08000ea0 <rtems_bsp_cmdline_get_param>: const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) {
8000ea0: 37 9c ff f0 addi sp,sp,-16 8000ea4: 5b 8b 00 10 sw (sp+16),r11 8000ea8: 5b 8c 00 0c sw (sp+12),r12 8000eac: 5b 8d 00 08 sw (sp+8),r13 8000eb0: 5b 9d 00 04 sw (sp+4),ra
const char *p; if ( !name )
8000eb4: 34 0d 00 00 mvi r13,0
const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) {
8000eb8: b8 40 58 00 mv r11,r2 8000ebc: b8 60 60 00 mv r12,r3
const char *p; if ( !name ) 8000ec0: 44 2d 00 1d be r1,r13,8000f34 <rtems_bsp_cmdline_get_param+0x94> return NULL; if ( !value ) 8000ec4: 44 4d 00 1d be r2,r13,8000f38 <rtems_bsp_cmdline_get_param+0x98> return NULL; if ( !length ) 8000ec8: 44 6d 00 1b be r3,r13,8000f34 <rtems_bsp_cmdline_get_param+0x94> return NULL; value[0] = '\0';
8000ecc: 30 4d 00 00 sb (r2+0),r13
p = rtems_bsp_cmdline_get_param_raw( name );
8000ed0: f8 00 00 21 calli 8000f54 <rtems_bsp_cmdline_get_param_raw>
if ( !p ) 8000ed4: 44 2d 00 18 be r1,r13,8000f34 <rtems_bsp_cmdline_get_param+0x94>
8000ed8: b9 a0 20 00 mv r4,r13
int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<length-1; ) {
8000edc: 35 8c ff ff addi r12,r12,-1
value[0] = '\0'; p = rtems_bsp_cmdline_get_param_raw( name ); if ( !p )
8000ee0: b9 60 28 00 mv r5,r11 8000ee4: b9 a0 10 00 mv r2,r13
int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<length-1; ) { if ( *p == '\"' ) {
8000ee8: 34 07 00 22 mvi r7,34
quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' )
8000eec: 34 03 00 20 mvi r3,32 8000ef0: e0 00 00 0b bi 8000f1c <rtems_bsp_cmdline_get_param+0x7c>
int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<length-1; ) { if ( *p == '\"' ) { 8000ef4: 5c c7 00 03 bne r6,r7,8000f00 <rtems_bsp_cmdline_get_param+0x60> quotes++;
8000ef8: 34 84 00 01 addi r4,r4,1 8000efc: e0 00 00 03 bi 8000f08 <rtems_bsp_cmdline_get_param+0x68>
} else if ( ((quotes % 2) == 0) && *p == ' ' ) 8000f00: 5d 00 00 02 bne r8,r0,8000f08 <rtems_bsp_cmdline_get_param+0x68> 8000f04: 44 c3 00 0d be r6,r3,8000f38 <rtems_bsp_cmdline_get_param+0x98> break; value[i++] = *p++; value[i] = '\0';
8000f08: 34 08 00 00 mvi r8,0
for (i=0 ; *p && i<length-1; ) { if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) break; value[i++] = *p++;
8000f0c: 30 a6 00 00 sb (r5+0),r6
value[i] = '\0';
8000f10: 30 a8 00 01 sb (r5+1),r8
for (i=0 ; *p && i<length-1; ) { if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) break; value[i++] = *p++;
8000f14: 34 42 00 01 addi r2,r2,1
value[i] = '\0';
8000f18: 34 a5 00 01 addi r5,r5,1
int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<length-1; ) {
8000f1c: b4 22 30 00 add r6,r1,r2 8000f20: 40 c6 00 00 lbu r6,(r6+0)
if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' )
8000f24: 20 88 00 01 andi r8,r4,0x1
int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<length-1; ) { 8000f28: 44 c0 00 04 be r6,r0,8000f38 <rtems_bsp_cmdline_get_param+0x98>
8000f2c: 55 82 ff f2 bgu r12,r2,8000ef4 <rtems_bsp_cmdline_get_param+0x54><== ALWAYS TAKEN
8000f30: e0 00 00 02 bi 8000f38 <rtems_bsp_cmdline_get_param+0x98> <== NOT EXECUTED
8000f34: 34 0b 00 00 mvi r11,0
return NULL; copy_string( p, value, length ); return value; }
8000f38: b9 60 08 00 mv r1,r11 8000f3c: 2b 9d 00 04 lw ra,(sp+4) 8000f40: 2b 8b 00 10 lw r11,(sp+16) 8000f44: 2b 8c 00 0c lw r12,(sp+12) 8000f48: 2b 8d 00 08 lw r13,(sp+8) 8000f4c: 37 9c 00 10 addi sp,sp,16 8000f50: c3 a0 00 00 ret
08000f8c <rtems_bsp_cmdline_get_param_rhs>: const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) {
8000f8c: 37 9c ff f0 addi sp,sp,-16 8000f90: 5b 8b 00 10 sw (sp+16),r11 8000f94: 5b 8c 00 0c sw (sp+12),r12 8000f98: 5b 8d 00 08 sw (sp+8),r13 8000f9c: 5b 9d 00 04 sw (sp+4),ra 8000fa0: b8 20 68 00 mv r13,r1 8000fa4: b8 40 58 00 mv r11,r2
const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length );
8000fa8: fb ff ff be calli 8000ea0 <rtems_bsp_cmdline_get_param> 8000fac: b8 20 60 00 mv r12,r1
if ( !p )
8000fb0: 44 20 00 1b be r1,r0,800101c <rtems_bsp_cmdline_get_param_rhs+0x90><== NEVER TAKEN
return NULL; rhs = &p[strlen(name)];
8000fb4: b9 a0 08 00 mv r1,r13 8000fb8: f8 00 32 3c calli 800d8a8 <strlen> 8000fbc: b5 81 18 00 add r3,r12,r1
if ( *rhs != '=' )
8000fc0: 40 62 00 00 lbu r2,(r3+0) 8000fc4: 34 01 00 3d mvi r1,61
8000fc8: 5c 41 00 15 bne r2,r1,800101c <rtems_bsp_cmdline_get_param_rhs+0x90><== NEVER TAKEN
return NULL; rhs++; if ( *rhs == '\"' )
8000fcc: 40 62 00 01 lbu r2,(r3+1) 8000fd0: 34 01 00 22 mvi r1,34
rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; rhs++;
8000fd4: 34 64 00 01 addi r4,r3,1
if ( *rhs == '\"' ) 8000fd8: 5c 41 00 02 bne r2,r1,8000fe0 <rtems_bsp_cmdline_get_param_rhs+0x54> rhs++;
8000fdc: 34 64 00 02 addi r4,r3,2 8000fe0: b9 60 18 00 mv r3,r11 8000fe4: e0 00 00 03 bi 8000ff0 <rtems_bsp_cmdline_get_param_rhs+0x64>
for ( d=value ; *rhs ; ) *d++ = *rhs++;
8000fe8: 30 61 00 00 sb (r3+0),r1 8000fec: 34 63 00 01 addi r3,r3,1
return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; )
8000ff0: 40 81 00 00 lbu r1,(r4+0)
*d++ = *rhs++;
8000ff4: 34 84 00 01 addi r4,r4,1
return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 8000ff8: 5c 20 ff fc bne r1,r0,8000fe8 <rtems_bsp_cmdline_get_param_rhs+0x5c> *d++ = *rhs++; if ( *(d-1) == '\"' )
8000ffc: 40 64 ff ff lbu r4,(r3+-1) 8001000: 34 02 00 22 mvi r2,34 8001004: 34 61 ff ff addi r1,r3,-1
8001008: 5c 82 00 02 bne r4,r2,8001010 <rtems_bsp_cmdline_get_param_rhs+0x84>
800100c: b8 20 18 00 mv r3,r1
d--; *d = '\0';
8001010: 34 01 00 00 mvi r1,0 8001014: 30 61 00 00 sb (r3+0),r1
return value;
8001018: e0 00 00 02 bi 8001020 <rtems_bsp_cmdline_get_param_rhs+0x94> 800101c: 34 0b 00 00 mvi r11,0
}
8001020: b9 60 08 00 mv r1,r11 8001024: 2b 9d 00 04 lw ra,(sp+4) 8001028: 2b 8b 00 10 lw r11,(sp+16) 800102c: 2b 8c 00 0c lw r12,(sp+12) 8001030: 2b 8d 00 08 lw r13,(sp+8) 8001034: 37 9c 00 10 addi sp,sp,16 8001038: c3 a0 00 00 ret
0800355c <rtems_clock_get_tod>: #include <rtems/score/watchdog.h> rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) {
800355c: 37 9c ff c0 addi sp,sp,-64 8003560: 5b 8b 00 0c sw (sp+12),r11 8003564: 5b 8c 00 08 sw (sp+8),r12 8003568: 5b 9d 00 04 sw (sp+4),ra 800356c: b8 20 58 00 mv r11,r1
rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer )
8003570: 34 01 00 09 mvi r1,9
8003574: 45 60 00 2b be r11,r0,8003620 <rtems_clock_get_tod+0xc4> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set )
8003578: 78 01 08 02 mvhi r1,0x802 800357c: 38 21 c6 c0 ori r1,r1,0xc6c0 8003580: 40 22 00 00 lbu r2,(r1+0) 8003584: 34 01 00 0b mvi r1,11
8003588: 44 40 00 26 be r2,r0,8003620 <rtems_clock_get_tod+0xc4> <== NEVER TAKEN
{ ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level);
800358c: 90 00 60 00 rcsr r12,IE 8003590: 34 01 ff fe mvi r1,-2 8003594: a1 81 08 00 and r1,r12,r1 8003598: d0 01 00 00 wcsr IE,r1
_TOD_Get( &now );
800359c: 37 81 00 34 addi r1,sp,52 80035a0: f8 00 05 50 calli 8004ae0 <_TOD_Get>
_ISR_Enable(level);
80035a4: 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;
80035a8: 2b 81 00 34 lw r1,(sp+52)
time->tv_usec = useconds;
80035ac: 34 02 03 e8 mvi r2,1000
_ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec;
80035b0: 5b 81 00 3c sw (sp+60),r1
time->tv_usec = useconds;
80035b4: 2b 81 00 38 lw r1,(sp+56) 80035b8: f8 00 70 66 calli 801f750 <__divsi3> 80035bc: 5b 81 00 40 sw (sp+64),r1
/* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time );
80035c0: 37 82 00 10 addi r2,sp,16 80035c4: 37 81 00 3c addi r1,sp,60 80035c8: f8 00 2f 16 calli 800f220 <gmtime_r>
/* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday;
80035cc: 2b 81 00 1c lw r1,(sp+28)
/* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900;
80035d0: 2b 83 00 24 lw r3,(sp+36)
tmbuf->month = time.tm_mon + 1;
80035d4: 2b 82 00 20 lw r2,(sp+32)
tmbuf->day = time.tm_mday;
80035d8: 59 61 00 08 sw (r11+8),r1
tmbuf->hour = time.tm_hour;
80035dc: 2b 81 00 18 lw r1,(sp+24)
/* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900;
80035e0: 34 63 07 6c addi r3,r3,1900
tmbuf->month = time.tm_mon + 1;
80035e4: 34 42 00 01 addi r2,r2,1
tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour;
80035e8: 59 61 00 0c sw (r11+12),r1
tmbuf->minute = time.tm_min;
80035ec: 2b 81 00 14 lw r1,(sp+20)
/* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900;
80035f0: 59 63 00 00 sw (r11+0),r3
tmbuf->month = time.tm_mon + 1;
80035f4: 59 62 00 04 sw (r11+4),r2
tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min;
80035f8: 59 61 00 10 sw (r11+16),r1
tmbuf->second = time.tm_sec;
80035fc: 2b 81 00 10 lw r1,(sp+16) 8003600: 59 61 00 14 sw (r11+20),r1
tmbuf->ticks = now.tv_usec /
8003604: 78 01 08 02 mvhi r1,0x802 8003608: 38 21 40 c4 ori r1,r1,0x40c4 800360c: 28 22 00 0c lw r2,(r1+12) 8003610: 2b 81 00 40 lw r1,(sp+64) 8003614: f8 00 70 ae calli 801f8cc <__udivsi3> 8003618: 59 61 00 18 sw (r11+24),r1 800361c: 34 01 00 00 mvi r1,0
rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; }
8003620: 2b 9d 00 04 lw ra,(sp+4) 8003624: 2b 8b 00 0c lw r11,(sp+12) 8003628: 2b 8c 00 08 lw r12,(sp+8) 800362c: 37 9c 00 40 addi sp,sp,64 8003630: c3 a0 00 00 ret
0801013c <rtems_clock_set_nanoseconds_extension>: * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) {
801013c: b8 20 18 00 mv r3,r1
if ( !routine )
8010140: 34 01 00 09 mvi r1,9
8010144: 44 60 00 05 be r3,r0,8010158 <rtems_clock_set_nanoseconds_extension+0x1c><== ALWAYS TAKEN
return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine;
8010148: 78 02 08 03 mvhi r2,0x803 <== NOT EXECUTED 801014c: 38 42 fe 4c ori r2,r2,0xfe4c <== NOT EXECUTED 8010150: 58 43 00 00 sw (r2+0),r3 <== NOT EXECUTED 8010154: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL; }
8010158: c3 a0 00 00 ret
08001a5c <rtems_cpu_usage_report_with_plugin>: void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) {
8001a5c: 37 9c ff 84 addi sp,sp,-124 8001a60: 5b 8b 00 44 sw (sp+68),r11 8001a64: 5b 8c 00 40 sw (sp+64),r12 8001a68: 5b 8d 00 3c sw (sp+60),r13 8001a6c: 5b 8e 00 38 sw (sp+56),r14 8001a70: 5b 8f 00 34 sw (sp+52),r15 8001a74: 5b 90 00 30 sw (sp+48),r16 8001a78: 5b 91 00 2c sw (sp+44),r17 8001a7c: 5b 92 00 28 sw (sp+40),r18 8001a80: 5b 93 00 24 sw (sp+36),r19 8001a84: 5b 94 00 20 sw (sp+32),r20 8001a88: 5b 95 00 1c sw (sp+28),r21 8001a8c: 5b 96 00 18 sw (sp+24),r22 8001a90: 5b 97 00 14 sw (sp+20),r23 8001a94: 5b 98 00 10 sw (sp+16),r24 8001a98: 5b 99 00 0c sw (sp+12),r25 8001a9c: 5b 9b 00 08 sw (sp+8),fp 8001aa0: 5b 9d 00 04 sw (sp+4),ra 8001aa4: b8 40 68 00 mv r13,r2 8001aa8: b8 20 70 00 mv r14,r1
Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print )
8001aac: 44 40 00 5e be r2,r0,8001c24 <rtems_cpu_usage_report_with_plugin+0x1c8><== NEVER TAKEN
* When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime );
8001ab0: 37 91 00 70 addi r17,sp,112 8001ab4: ba 20 08 00 mv r1,r17 8001ab8: f8 00 0c 30 calli 8004b78 <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
8001abc: 37 97 00 68 addi r23,sp,104 8001ac0: 78 01 08 02 mvhi r1,0x802 8001ac4: 38 21 cb ec ori r1,r1,0xcbec 8001ac8: ba 20 10 00 mv r2,r17 8001acc: ba e0 18 00 mv r3,r23 8001ad0: f8 00 16 ba calli 80075b8 <_Timespec_Subtract>
} } } #endif (*print)(
8001ad4: 78 02 08 02 mvhi r2,0x802 8001ad8: b9 c0 08 00 mv r1,r14 8001adc: 78 0b 08 02 mvhi r11,0x802 8001ae0: 38 42 0c 28 ori r2,r2,0xc28
/* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
8001ae4: 78 0f 08 02 mvhi r15,0x802
} } } #endif (*print)(
8001ae8: d9 a0 00 00 call r13 8001aec: 39 6b c6 48 ori r11,r11,0xc648
/* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
8001af0: 39 ef c7 68 ori r15,r15,0xc768
the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
8001af4: 37 96 00 48 addi r22,sp,72
_Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval );
8001af8: 37 95 00 60 addi r21,sp,96 8001afc: 37 9b 00 78 addi fp,sp,120
/* * Print the information */ (*print)( context,
8001b00: 78 19 08 02 mvhi r25,0x802
* since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract(
8001b04: 37 94 00 58 addi r20,sp,88 8001b08: 78 18 08 02 mvhi r24,0x802
); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] )
8001b0c: 29 61 00 00 lw r1,(r11+0)
8001b10: 44 20 00 38 be r1,r0,8001bf0 <rtems_cpu_usage_report_with_plugin+0x194> continue; information = _Objects_Information_table[ api_index ][ 1 ];
8001b14: 28 30 00 04 lw r16,(r1+4)
if ( information ) {
8001b18: 34 13 00 04 mvi r19,4 8001b1c: 34 12 00 01 mvi r18,1
8001b20: 5e 00 00 30 bne r16,r0,8001be0 <rtems_cpu_usage_report_with_plugin+0x184><== ALWAYS TAKEN
8001b24: e0 00 00 33 bi 8001bf0 <rtems_cpu_usage_report_with_plugin+0x194><== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ];
8001b28: 2a 01 00 1c lw r1,(r16+28)
api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) {
8001b2c: 36 52 00 01 addi r18,r18,1
the_thread = (Thread_Control *)information->local_table[ i ];
8001b30: b4 33 08 00 add r1,r1,r19 8001b34: 28 2c 00 00 lw r12,(r1+0)
api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) {
8001b38: 36 73 00 04 addi r19,r19,4
the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread )
8001b3c: 45 80 00 29 be r12,r0,8001be0 <rtems_cpu_usage_report_with_plugin+0x184><== NEVER TAKEN
continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
8001b40: 29 81 00 08 lw r1,(r12+8) 8001b44: f8 00 07 74 calli 8003914 <rtems_object_get_name>
(*print)(
8001b48: 29 83 00 08 lw r3,(r12+8) 8001b4c: 78 02 08 02 mvhi r2,0x802 8001b50: 38 42 0d 9c ori r2,r2,0xd9c 8001b54: b9 c0 08 00 mv r1,r14 8001b58: ba c0 20 00 mv r4,r22 8001b5c: d9 a0 00 00 call r13
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used;
8001b60: 29 81 00 84 lw r1,(r12+132) 8001b64: 5b 81 00 60 sw (sp+96),r1 8001b68: 29 82 00 88 lw r2,(r12+136)
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
8001b6c: 29 e1 00 00 lw r1,(r15+0)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used;
8001b70: 5b 82 00 64 sw (sp+100),r2
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
8001b74: 28 22 00 08 lw r2,(r1+8) 8001b78: 29 81 00 08 lw r1,(r12+8)
8001b7c: 5c 41 00 09 bne r2,r1,8001ba0 <rtems_cpu_usage_report_with_plugin+0x144> Timestamp_Control used; _Timestamp_Subtract(
8001b80: bb 00 08 00 mv r1,r24 8001b84: 38 21 c7 70 ori r1,r1,0xc770 8001b88: ba 20 10 00 mv r2,r17 8001b8c: ba 80 18 00 mv r3,r20 8001b90: f8 00 16 8a calli 80075b8 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used );
8001b94: ba a0 08 00 mv r1,r21 8001b98: ba 80 10 00 mv r2,r20 8001b9c: f8 00 16 1a calli 8007404 <_Timespec_Add_to>
}; _Timestamp_Divide( &ran, &total, &ival, &fval );
8001ba0: 37 83 00 7c addi r3,sp,124 8001ba4: bb 60 20 00 mv r4,fp 8001ba8: ba a0 08 00 mv r1,r21 8001bac: ba e0 10 00 mv r2,r23 8001bb0: f8 00 16 2c calli 8007460 <_Timespec_Divide>
/* * Print the information */ (*print)( context,
8001bb4: 2b 81 00 64 lw r1,(sp+100) 8001bb8: 34 02 03 e8 mvi r2,1000 8001bbc: f8 00 77 44 calli 801f8cc <__udivsi3> 8001bc0: 2b 85 00 7c lw r5,(sp+124) 8001bc4: 2b 86 00 78 lw r6,(sp+120) 8001bc8: 2b 83 00 60 lw r3,(sp+96) 8001bcc: bb 20 10 00 mv r2,r25 8001bd0: b8 20 20 00 mv r4,r1 8001bd4: 38 42 0d b0 ori r2,r2,0xdb0 8001bd8: b9 c0 08 00 mv r1,r14 8001bdc: d9 a0 00 00 call r13
api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) {
8001be0: 2e 01 00 10 lhu r1,(r16+16)
the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
8001be4: 34 02 00 0d mvi r2,13 8001be8: ba c0 18 00 mv r3,r22
api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 8001bec: 50 32 ff cf bgeu r1,r18,8001b28 <rtems_cpu_usage_report_with_plugin+0xcc> " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ;
8001bf0: 78 01 08 02 mvhi r1,0x802
api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) {
8001bf4: 35 6b 00 04 addi r11,r11,4
" ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ;
8001bf8: 38 21 c6 58 ori r1,r1,0xc658
8001bfc: 5d 61 ff c4 bne r11,r1,8001b0c <rtems_cpu_usage_report_with_plugin+0xb0> } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)(
8001c00: 2b 81 00 6c lw r1,(sp+108) 8001c04: 34 02 03 e8 mvi r2,1000 8001c08: f8 00 77 31 calli 801f8cc <__udivsi3> 8001c0c: 2b 83 00 68 lw r3,(sp+104) 8001c10: 78 02 08 02 mvhi r2,0x802 8001c14: b8 20 20 00 mv r4,r1 8001c18: 38 42 0d c8 ori r2,r2,0xdc8 8001c1c: b9 c0 08 00 mv r1,r14 8001c20: d9 a0 00 00 call r13
"-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif }
8001c24: 2b 9d 00 04 lw ra,(sp+4) 8001c28: 2b 8b 00 44 lw r11,(sp+68) 8001c2c: 2b 8c 00 40 lw r12,(sp+64) 8001c30: 2b 8d 00 3c lw r13,(sp+60) 8001c34: 2b 8e 00 38 lw r14,(sp+56) 8001c38: 2b 8f 00 34 lw r15,(sp+52) 8001c3c: 2b 90 00 30 lw r16,(sp+48) 8001c40: 2b 91 00 2c lw r17,(sp+44) 8001c44: 2b 92 00 28 lw r18,(sp+40) 8001c48: 2b 93 00 24 lw r19,(sp+36) 8001c4c: 2b 94 00 20 lw r20,(sp+32) 8001c50: 2b 95 00 1c lw r21,(sp+28) 8001c54: 2b 96 00 18 lw r22,(sp+24) 8001c58: 2b 97 00 14 lw r23,(sp+20) 8001c5c: 2b 98 00 10 lw r24,(sp+16) 8001c60: 2b 99 00 0c lw r25,(sp+12) 8001c64: 2b 9b 00 08 lw fp,(sp+8) 8001c68: 37 9c 00 7c addi sp,sp,124 8001c6c: c3 a0 00 00 ret
0800bb1c <rtems_deviceio_errno>: { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) {
800bb1c: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 800bb20: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED 800bb24: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 800bb28: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
800bb2c: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED 800bb30: 38 21 c1 10 ori r1,r1,0xc110 <== NOT EXECUTED 800bb34: f8 00 00 0a calli 800bb5c <rtems_assoc_remote_by_local> <== NOT EXECUTED 800bb38: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 800bb3c: 44 20 00 03 be r1,r0,800bb48 <rtems_deviceio_errno+0x2c> <== NOT EXECUTED
{ errno = rc;
800bb40: f8 00 02 7f calli 800c53c <__errno> <== NOT EXECUTED 800bb44: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
return -1; } return -1; }
800bb48: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 800bb4c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800bb50: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED 800bb54: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 800bb58: c3 a0 00 00 ret <== NOT EXECUTED
08006cb0 <rtems_error>: int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) {
8006cb0: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED 8006cb4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8006cb8: 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);
8006cbc: 37 83 00 0c addi r3,sp,12 <== NOT EXECUTED
int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) {
8006cc0: 5b 84 00 10 sw (sp+16),r4 <== NOT EXECUTED 8006cc4: 5b 85 00 14 sw (sp+20),r5 <== NOT EXECUTED 8006cc8: 5b 86 00 18 sw (sp+24),r6 <== NOT EXECUTED 8006ccc: 5b 87 00 1c sw (sp+28),r7 <== NOT EXECUTED 8006cd0: 5b 88 00 20 sw (sp+32),r8 <== NOT EXECUTED 8006cd4: 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);
8006cd8: fb ff ff 60 calli 8006a58 <rtems_verror> <== NOT EXECUTED
va_end(arglist); return chars_written; }
8006cdc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006ce0: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED 8006ce4: c3 a0 00 00 ret <== NOT EXECUTED
08000cf0 <rtems_filesystem_dirname>: } int rtems_filesystem_dirname( const char *pathname ) {
8000cf0: 37 9c ff f8 addi sp,sp,-8 8000cf4: 5b 8b 00 08 sw (sp+8),r11 8000cf8: 5b 9d 00 04 sw (sp+4),ra 8000cfc: b8 20 58 00 mv r11,r1
int len = strlen( pathname );
8000d00: f8 00 32 df calli 800d87c <strlen> 8000d04: b5 61 10 00 add r2,r11,r1
while ( len ) {
8000d08: e0 00 00 09 bi 8000d2c <rtems_filesystem_dirname+0x3c>
len--; if ( rtems_filesystem_is_separator( pathname[len] ) )
8000d0c: 40 43 ff ff lbu r3,(r2+-1)
) { int len = strlen( pathname ); while ( len ) { len--;
8000d10: 34 21 ff ff addi r1,r1,-1
if ( rtems_filesystem_is_separator( pathname[len] ) )
8000d14: 34 42 ff ff addi r2,r2,-1 8000d18: 64 65 00 5c cmpei r5,r3,92 8000d1c: 64 64 00 2f cmpei r4,r3,47 8000d20: b8 a4 20 00 or r4,r5,r4
8000d24: 5c 80 00 03 bne r4,r0,8000d30 <rtems_filesystem_dirname+0x40>
8000d28: 44 64 00 02 be r3,r4,8000d30 <rtems_filesystem_dirname+0x40><== NEVER TAKEN
const char *pathname ) { int len = strlen( pathname ); while ( len ) { 8000d2c: 5c 20 ff f8 bne r1,r0,8000d0c <rtems_filesystem_dirname+0x1c> if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; }
8000d30: 2b 9d 00 04 lw ra,(sp+4) 8000d34: 2b 8b 00 08 lw r11,(sp+8) 8000d38: 37 9c 00 08 addi sp,sp,8 8000d3c: c3 a0 00 00 ret
08000e28 <rtems_filesystem_evaluate_path>: int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) {
8000e28: 37 9c ff e4 addi sp,sp,-28 8000e2c: 5b 8b 00 1c sw (sp+28),r11 8000e30: 5b 8c 00 18 sw (sp+24),r12 8000e34: 5b 8d 00 14 sw (sp+20),r13 8000e38: 5b 8e 00 10 sw (sp+16),r14 8000e3c: 5b 8f 00 0c sw (sp+12),r15 8000e40: 5b 90 00 08 sw (sp+8),r16 8000e44: 5b 9d 00 04 sw (sp+4),ra 8000e48: b8 20 60 00 mv r12,r1 8000e4c: b8 40 80 00 mv r16,r2 8000e50: b8 60 78 00 mv r15,r3 8000e54: b8 80 58 00 mv r11,r4 8000e58: b8 a0 70 00 mv r14,r5
/* * Verify Input parameters. */ if ( !pathname )
8000e5c: 5c 20 00 04 bne r1,r0,8000e6c <rtems_filesystem_evaluate_path+0x44><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
8000e60: f8 00 2d b7 calli 800c53c <__errno> <== NOT EXECUTED 8000e64: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8000e68: e0 00 00 04 bi 8000e78 <rtems_filesystem_evaluate_path+0x50><== NOT EXECUTED
if ( !pathloc )
8000e6c: 5c 80 00 06 bne r4,r0,8000e84 <rtems_filesystem_evaluate_path+0x5c><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
8000e70: f8 00 2d b3 calli 800c53c <__errno> <== NOT EXECUTED 8000e74: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8000e78: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000e7c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000e80: e0 00 00 1e bi 8000ef8 <rtems_filesystem_evaluate_path+0xd0><== NOT EXECUTED
/* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc );
8000e84: 40 21 00 00 lbu r1,(r1+0) 8000e88: 64 2d 00 5c cmpei r13,r1,92 8000e8c: 64 22 00 2f cmpei r2,r1,47 8000e90: b9 a2 68 00 or r13,r13,r2
8000e94: 5d a0 00 02 bne r13,r0,8000e9c <rtems_filesystem_evaluate_path+0x74>
8000e98: 5c 2d 00 0a bne r1,r13,8000ec0 <rtems_filesystem_evaluate_path+0x98><== ALWAYS TAKEN
8000e9c: 78 01 08 01 mvhi r1,0x801 8000ea0: 38 21 d1 10 ori r1,r1,0xd110 8000ea4: 28 24 00 00 lw r4,(r1+0) 8000ea8: 34 03 00 14 mvi r3,20 8000eac: b9 60 08 00 mv r1,r11 8000eb0: 34 82 00 18 addi r2,r4,24 8000eb4: f8 00 30 48 calli 800cfd4 <memcpy> 8000eb8: 34 04 00 01 mvi r4,1 8000ebc: e0 00 00 09 bi 8000ee0 <rtems_filesystem_evaluate_path+0xb8> 8000ec0: 78 01 08 01 mvhi r1,0x801 8000ec4: 38 21 d1 10 ori r1,r1,0xd110 8000ec8: 28 24 00 00 lw r4,(r1+0) 8000ecc: 34 03 00 14 mvi r3,20 8000ed0: b9 60 08 00 mv r1,r11 8000ed4: 34 82 00 04 addi r2,r4,4 8000ed8: f8 00 30 3f calli 800cfd4 <memcpy> 8000edc: b9 a0 20 00 mv r4,r13
/* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i],
8000ee0: ca 04 10 00 sub r2,r16,r4 8000ee4: b5 84 08 00 add r1,r12,r4 8000ee8: b9 e0 18 00 mv r3,r15 8000eec: b9 60 20 00 mv r4,r11 8000ef0: b9 c0 28 00 mv r5,r14 8000ef4: fb ff ff 93 calli 8000d40 <rtems_filesystem_evaluate_relative_path>
pathnamelen - i, flags, pathloc, follow_link ); }
8000ef8: 2b 9d 00 04 lw ra,(sp+4) 8000efc: 2b 8b 00 1c lw r11,(sp+28) 8000f00: 2b 8c 00 18 lw r12,(sp+24) 8000f04: 2b 8d 00 14 lw r13,(sp+20) 8000f08: 2b 8e 00 10 lw r14,(sp+16) 8000f0c: 2b 8f 00 0c lw r15,(sp+12) 8000f10: 2b 90 00 08 lw r16,(sp+8) 8000f14: 37 9c 00 1c addi sp,sp,28 8000f18: c3 a0 00 00 ret
08000d40 <rtems_filesystem_evaluate_relative_path>: int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) {
8000d40: 37 9c ff f0 addi sp,sp,-16 8000d44: 5b 8b 00 10 sw (sp+16),r11 8000d48: 5b 8c 00 0c sw (sp+12),r12 8000d4c: 5b 8d 00 08 sw (sp+8),r13 8000d50: 5b 9d 00 04 sw (sp+4),ra 8000d54: b8 a0 68 00 mv r13,r5 8000d58: b8 60 60 00 mv r12,r3 8000d5c: b8 80 58 00 mv r11,r4
/* * Verify Input parameters. */ if ( !pathname )
8000d60: 5c 20 00 04 bne r1,r0,8000d70 <rtems_filesystem_evaluate_relative_path+0x30><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
8000d64: f8 00 2d f6 calli 800c53c <__errno> <== NOT EXECUTED 8000d68: 34 02 00 0e mvi r2,14 <== NOT EXECUTED 8000d6c: e0 00 00 04 bi 8000d7c <rtems_filesystem_evaluate_relative_path+0x3c><== NOT EXECUTED
if ( !pathloc )
8000d70: 5c 80 00 06 bne r4,r0,8000d88 <rtems_filesystem_evaluate_relative_path+0x48><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
8000d74: f8 00 2d f2 calli 800c53c <__errno> <== NOT EXECUTED 8000d78: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8000d7c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000d80: 34 06 ff ff mvi r6,-1 <== NOT EXECUTED 8000d84: e0 00 00 22 bi 8000e0c <rtems_filesystem_evaluate_relative_path+0xcc><== NOT EXECUTED
if ( !pathloc->ops->evalpath_h )
8000d88: 28 85 00 0c lw r5,(r4+12) 8000d8c: 28 a6 00 00 lw r6,(r5+0)
8000d90: 44 c0 00 18 be r6,r0,8000df0 <rtems_filesystem_evaluate_relative_path+0xb0><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
8000d94: d8 c0 00 00 call r6 8000d98: b8 20 30 00 mv r6,r1
/* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) {
8000d9c: 7d a5 00 00 cmpnei r5,r13,0 8000da0: 64 21 00 00 cmpei r1,r1,0 8000da4: a0 25 28 00 and r5,r1,r5
8000da8: 44 a0 00 19 be r5,r0,8000e0c <rtems_filesystem_evaluate_relative_path+0xcc> if ( !pathloc->ops->node_type_h ){
8000dac: 29 61 00 0c lw r1,(r11+12) 8000db0: 28 24 00 10 lw r4,(r1+16)
8000db4: 44 80 00 0b be r4,r0,8000de0 <rtems_filesystem_evaluate_relative_path+0xa0><== NEVER TAKEN
rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc );
8000db8: b9 60 08 00 mv r1,r11 8000dbc: d8 80 00 00 call r4
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
8000dc0: 34 21 ff fd addi r1,r1,-3 8000dc4: 34 02 00 01 mvi r2,1
8000dc8: 50 41 00 03 bgeu r2,r1,8000dd4 <rtems_filesystem_evaluate_relative_path+0x94>
8000dcc: 34 06 00 00 mvi r6,0 8000dd0: e0 00 00 0f bi 8000e0c <rtems_filesystem_evaluate_relative_path+0xcc>
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){
8000dd4: 29 61 00 0c lw r1,(r11+12) 8000dd8: 28 24 00 34 lw r4,(r1+52)
8000ddc: 5c 80 00 08 bne r4,r0,8000dfc <rtems_filesystem_evaluate_relative_path+0xbc><== ALWAYS TAKEN
rtems_filesystem_freenode( pathloc );
8000de0: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 8000de4: 44 44 00 03 be r2,r4,8000df0 <rtems_filesystem_evaluate_relative_path+0xb0><== NOT EXECUTED 8000de8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000dec: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8000df0: f8 00 2d d3 calli 800c53c <__errno> <== NOT EXECUTED 8000df4: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8000df8: e3 ff ff e1 bi 8000d7c <rtems_filesystem_evaluate_relative_path+0x3c><== NOT EXECUTED
* pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags );
8000dfc: b9 60 08 00 mv r1,r11 8000e00: b9 80 10 00 mv r2,r12 8000e04: d8 80 00 00 call r4 8000e08: b8 20 30 00 mv r6,r1
} } return result; }
8000e0c: b8 c0 08 00 mv r1,r6 8000e10: 2b 9d 00 04 lw ra,(sp+4) 8000e14: 2b 8b 00 10 lw r11,(sp+16) 8000e18: 2b 8c 00 0c lw r12,(sp+12) 8000e1c: 2b 8d 00 08 lw r13,(sp+8) 8000e20: 37 9c 00 10 addi sp,sp,16 8000e24: c3 a0 00 00 ret
08000b78 <rtems_filesystem_initialize>: * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) {
8000b78: 37 9c ff d8 addi sp,sp,-40 8000b7c: 5b 8b 00 10 sw (sp+16),r11 8000b80: 5b 8c 00 0c sw (sp+12),r12 8000b84: 5b 8d 00 08 sw (sp+8),r13 8000b88: 5b 9d 00 04 sw (sp+4),ra
/* * Set the default umask to "022". */ rtems_filesystem_umask = 022;
8000b8c: 78 0b 08 01 mvhi r11,0x801 8000b90: 39 6b d1 10 ori r11,r11,0xd110 8000b94: 29 62 00 00 lw r2,(r11+0) 8000b98: 34 01 00 12 mvi r1,18
/* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 )
8000b9c: 34 0d 00 00 mvi r13,0
/* * Set the default umask to "022". */ rtems_filesystem_umask = 022;
8000ba0: 58 41 00 2c sw (r2+44),r1
init_fs_mount_table();
8000ba4: f8 00 01 ae calli 800125c <init_fs_mount_table>
/* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 )
8000ba8: 78 01 08 01 mvhi r1,0x801 8000bac: 38 21 b6 e4 ori r1,r1,0xb6e4 8000bb0: 28 21 00 00 lw r1,(r1+0)
8000bb4: 5c 2d 00 04 bne r1,r13,8000bc4 <rtems_filesystem_initialize+0x4c><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0001 );
8000bb8: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8000bbc: 38 21 00 01 ori r1,r1,0x1 <== NOT EXECUTED 8000bc0: e0 00 00 0e bi 8000bf8 <rtems_filesystem_initialize+0x80> <== NOT EXECUTED
mt = &rtems_filesystem_mount_table[0];
8000bc4: 78 01 08 01 mvhi r1,0x801 8000bc8: 38 21 d0 18 ori r1,r1,0xd018 8000bcc: 28 24 00 00 lw r4,(r1+0)
status = mount(
8000bd0: 37 81 00 28 addi r1,sp,40 8000bd4: 28 82 00 00 lw r2,(r4+0) 8000bd8: 28 85 00 0c lw r5,(r4+12) 8000bdc: 28 83 00 04 lw r3,(r4+4) 8000be0: 28 84 00 08 lw r4,(r4+8) 8000be4: f8 00 01 a6 calli 800127c <mount>
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 )
8000be8: 34 02 ff ff mvi r2,-1
8000bec: 5c 22 00 04 bne r1,r2,8000bfc <rtems_filesystem_initialize+0x84><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0002 );
8000bf0: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8000bf4: 38 21 00 02 ori r1,r1,0x2 <== NOT EXECUTED 8000bf8: f8 00 06 ab calli 80026a4 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_filesystem_link_counts = 0;
8000bfc: 29 61 00 00 lw r1,(r11+0)
* set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root;
8000c00: 2b 82 00 28 lw r2,(sp+40) 8000c04: 34 03 00 14 mvi r3,20
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0;
8000c08: 0c 2d 00 30 sh (r1+48),r13
* set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root;
8000c0c: 34 42 00 1c addi r2,r2,28 8000c10: 34 21 00 18 addi r1,r1,24 8000c14: f8 00 30 f0 calli 800cfd4 <memcpy>
/* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8000c18: 37 8c 00 14 addi r12,sp,20 8000c1c: 78 01 08 01 mvhi r1,0x801 8000c20: b9 80 20 00 mv r4,r12 8000c24: b9 a0 28 00 mv r5,r13 8000c28: 34 02 00 01 mvi r2,1 8000c2c: b9 a0 18 00 mv r3,r13 8000c30: 38 21 b9 40 ori r1,r1,0xb940 8000c34: f8 00 00 7d calli 8000e28 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
8000c38: 29 61 00 00 lw r1,(r11+0) 8000c3c: b9 80 10 00 mv r2,r12 8000c40: 34 03 00 14 mvi r3,20 8000c44: 34 21 00 18 addi r1,r1,24 8000c48: f8 00 30 e3 calli 800cfd4 <memcpy>
/* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8000c4c: 78 01 08 01 mvhi r1,0x801 8000c50: b9 a0 18 00 mv r3,r13 8000c54: b9 a0 28 00 mv r5,r13 8000c58: 34 02 00 01 mvi r2,1 8000c5c: b9 80 20 00 mv r4,r12 8000c60: 38 21 b9 40 ori r1,r1,0xb940 8000c64: f8 00 00 71 calli 8000e28 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
8000c68: 29 61 00 00 lw r1,(r11+0) 8000c6c: b9 80 10 00 mv r2,r12 8000c70: 34 03 00 14 mvi r3,20 8000c74: 34 21 00 04 addi r1,r1,4 8000c78: f8 00 30 d7 calli 800cfd4 <memcpy>
* * 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);
8000c7c: 78 01 08 01 mvhi r1,0x801 8000c80: 38 21 b9 44 ori r1,r1,0xb944 8000c84: 34 02 01 ff mvi r2,511 8000c88: f8 00 01 17 calli 80010e4 <mkdir>
if ( status != 0 )
8000c8c: 44 20 00 04 be r1,r0,8000c9c <rtems_filesystem_initialize+0x124><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0003 );
8000c90: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED 8000c94: 38 21 00 03 ori r1,r1,0x3 <== NOT EXECUTED 8000c98: e3 ff ff d8 bi 8000bf8 <rtems_filesystem_initialize+0x80> <== NOT EXECUTED
* it will be mounted onto is created. Moreover, if it is going to * use a device, then it is REALLY unfair to attempt this * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ }
8000c9c: 2b 9d 00 04 lw ra,(sp+4) 8000ca0: 2b 8b 00 10 lw r11,(sp+16) 8000ca4: 2b 8c 00 0c lw r12,(sp+12) 8000ca8: 2b 8d 00 08 lw r13,(sp+8) 8000cac: 37 9c 00 28 addi sp,sp,40 8000cb0: c3 a0 00 00 ret
08028c00 <rtems_filesystem_nodes_equal>: ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){
8028c00: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 8028c04: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED
return ( loc1->node_access == loc2->node_access ); }
8028c08: e4 61 08 00 cmpe r1,r3,r1 <== NOT EXECUTED 8028c0c: c3 a0 00 00 ret <== NOT EXECUTED
08000cb4 <rtems_filesystem_prefix_separators>: int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) {
8000cb4: b8 20 20 00 mv r4,r1 8000cb8: 34 01 00 00 mvi r1,0
/* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
8000cbc: e0 00 00 02 bi 8000cc4 <rtems_filesystem_prefix_separators+0x10>
{ pathname++; pathnamelen--; stripped++;
8000cc0: 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 ) )
8000cc4: b4 81 18 00 add r3,r4,r1 8000cc8: 40 63 00 00 lbu r3,(r3+0) 8000ccc: fc 41 38 00 cmpne r7,r2,r1 8000cd0: 7c 65 00 00 cmpnei r5,r3,0 8000cd4: 64 66 00 2f cmpei r6,r3,47 8000cd8: 64 63 00 5c cmpei r3,r3,92 8000cdc: a0 e5 28 00 and r5,r7,r5 8000ce0: b8 66 18 00 or r3,r3,r6
8000ce4: 44 a0 00 02 be r5,r0,8000cec <rtems_filesystem_prefix_separators+0x38><== NEVER TAKEN
8000ce8: 5c 60 ff f6 bne r3,r0,8000cc0 <rtems_filesystem_prefix_separators+0xc> pathname++; pathnamelen--; stripped++; } return stripped; }
8000cec: c3 a0 00 00 ret
08000a24 <rtems_io_lookup_name>: rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) {
8000a24: 37 9c ff d0 addi sp,sp,-48 <== NOT EXECUTED 8000a28: 5b 8b 00 1c sw (sp+28),r11 <== NOT EXECUTED 8000a2c: 5b 8c 00 18 sw (sp+24),r12 <== NOT EXECUTED 8000a30: 5b 8d 00 14 sw (sp+20),r13 <== NOT EXECUTED 8000a34: 5b 8e 00 10 sw (sp+16),r14 <== NOT EXECUTED 8000a38: 5b 8f 00 0c sw (sp+12),r15 <== NOT EXECUTED 8000a3c: 5b 90 00 08 sw (sp+8),r16 <== NOT EXECUTED 8000a40: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8000a44: b8 40 68 00 mv r13,r2 <== NOT EXECUTED 8000a48: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
8000a4c: 37 8b 00 20 addi r11,sp,32 <== NOT EXECUTED 8000a50: f8 00 33 8b calli 800d87c <strlen> <== NOT EXECUTED 8000a54: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8000a58: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8000a5c: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8000a60: b9 60 20 00 mv r4,r11 <== NOT EXECUTED 8000a64: 34 05 00 01 mvi r5,1 <== NOT EXECUTED 8000a68: f8 00 00 f0 calli 8000e28 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) {
8000a6c: 2b 83 00 2c lw r3,(sp+44) <== NOT EXECUTED
IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
8000a70: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
the_jnode = loc.node_access;
8000a74: 2b 90 00 20 lw r16,(sp+32) <== NOT EXECUTED
if ( !loc.ops->node_type_h ) {
8000a78: 28 62 00 10 lw r2,(r3+16) <== NOT EXECUTED 8000a7c: 5c 40 00 0a bne r2,r0,8000aa4 <rtems_io_lookup_name+0x80> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
8000a80: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED 8000a84: 44 62 00 03 be r3,r2,8000a90 <rtems_io_lookup_name+0x6c> <== NOT EXECUTED 8000a88: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000a8c: d8 60 00 00 call r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8000a90: f8 00 2e ab calli 800c53c <__errno> <== NOT EXECUTED 8000a94: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8000a98: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8000a9c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 8000aa0: e0 00 00 20 bi 8000b20 <rtems_io_lookup_name+0xfc> <== NOT EXECUTED
} node_type = (*loc.ops->node_type_h)( &loc );
8000aa4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000aa8: d8 40 00 00 call r2 <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
8000aac: 7c 22 00 02 cmpnei r2,r1,2 <== NOT EXECUTED 8000ab0: 7d ce 00 00 cmpnei r14,r14,0 <== NOT EXECUTED 8000ab4: 2b 8c 00 2c lw r12,(sp+44) <== NOT EXECUTED 8000ab8: b8 4e 70 00 or r14,r2,r14 <== NOT EXECUTED 8000abc: 45 c0 00 07 be r14,r0,8000ad8 <rtems_io_lookup_name+0xb4> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
8000ac0: 45 80 00 15 be r12,r0,8000b14 <rtems_io_lookup_name+0xf0> <== NOT EXECUTED 8000ac4: 29 82 00 1c lw r2,(r12+28) <== NOT EXECUTED 8000ac8: 44 40 00 13 be r2,r0,8000b14 <rtems_io_lookup_name+0xf0> <== NOT EXECUTED 8000acc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000ad0: d8 40 00 00 call r2 <== NOT EXECUTED 8000ad4: e0 00 00 10 bi 8000b14 <rtems_io_lookup_name+0xf0> <== NOT EXECUTED
return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name;
8000ad8: 59 af 00 00 sw (r13+0),r15 <== NOT EXECUTED
device_info->device_name_length = strlen( name );
8000adc: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8000ae0: f8 00 33 67 calli 800d87c <strlen> <== NOT EXECUTED 8000ae4: 59 a1 00 04 sw (r13+4),r1 <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
8000ae8: 2a 01 00 50 lw r1,(r16+80) <== NOT EXECUTED 8000aec: 59 a1 00 08 sw (r13+8),r1 <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
8000af0: 2a 10 00 54 lw r16,(r16+84) <== NOT EXECUTED 8000af4: 59 b0 00 0c sw (r13+12),r16 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
8000af8: 45 8e 00 09 be r12,r14,8000b1c <rtems_io_lookup_name+0xf8> <== NOT EXECUTED 8000afc: 29 82 00 1c lw r2,(r12+28) <== NOT EXECUTED 8000b00: 44 40 00 07 be r2,r0,8000b1c <rtems_io_lookup_name+0xf8> <== NOT EXECUTED 8000b04: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8000b08: d8 40 00 00 call r2 <== NOT EXECUTED 8000b0c: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 8000b10: e0 00 00 04 bi 8000b20 <rtems_io_lookup_name+0xfc> <== NOT EXECUTED 8000b14: 34 01 00 0d mvi r1,13 <== NOT EXECUTED 8000b18: e0 00 00 02 bi 8000b20 <rtems_io_lookup_name+0xfc> <== NOT EXECUTED 8000b1c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL; }
8000b20: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8000b24: 2b 8b 00 1c lw r11,(sp+28) <== NOT EXECUTED 8000b28: 2b 8c 00 18 lw r12,(sp+24) <== NOT EXECUTED 8000b2c: 2b 8d 00 14 lw r13,(sp+20) <== NOT EXECUTED 8000b30: 2b 8e 00 10 lw r14,(sp+16) <== NOT EXECUTED 8000b34: 2b 8f 00 0c lw r15,(sp+12) <== NOT EXECUTED 8000b38: 2b 90 00 08 lw r16,(sp+8) <== NOT EXECUTED 8000b3c: 37 9c 00 30 addi sp,sp,48 <== NOT EXECUTED 8000b40: c3 a0 00 00 ret <== NOT EXECUTED
080052dc <rtems_iterate_over_all_threads>: #include <rtems/system.h> #include <rtems/score/thread.h> void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) {
80052dc: 37 9c ff e4 addi sp,sp,-28 80052e0: 5b 8b 00 1c sw (sp+28),r11 80052e4: 5b 8c 00 18 sw (sp+24),r12 80052e8: 5b 8d 00 14 sw (sp+20),r13 80052ec: 5b 8e 00 10 sw (sp+16),r14 80052f0: 5b 8f 00 0c sw (sp+12),r15 80052f4: 5b 90 00 08 sw (sp+8),r16 80052f8: 5b 9d 00 04 sw (sp+4),ra 80052fc: b8 20 78 00 mv r15,r1
uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine )
8005300: 44 20 00 17 be r1,r0,800535c <rtems_iterate_over_all_threads+0x80><== NEVER TAKEN
8005304: 78 0b 08 02 mvhi r11,0x802 8005308: 39 6b c6 48 ori r11,r11,0xc648
#endif #include <rtems/system.h> #include <rtems/score/thread.h> void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
800530c: 35 70 00 10 addi r16,r11,16
if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] )
8005310: 29 61 00 00 lw r1,(r11+0)
8005314: 44 20 00 10 be r1,r0,8005354 <rtems_iterate_over_all_threads+0x78> continue; information = _Objects_Information_table[ api_index ][ 1 ];
8005318: 28 2c 00 04 lw r12,(r1+4)
if ( !information )
800531c: 34 0e 00 04 mvi r14,4 8005320: 34 0d 00 01 mvi r13,1
8005324: 5d 80 00 0a bne r12,r0,800534c <rtems_iterate_over_all_threads+0x70>
8005328: e0 00 00 0b bi 8005354 <rtems_iterate_over_all_threads+0x78>
continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ];
800532c: 29 81 00 1c lw r1,(r12+28)
information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) {
8005330: 35 ad 00 01 addi r13,r13,1
the_thread = (Thread_Control *)information->local_table[ i ];
8005334: b4 2e 08 00 add r1,r1,r14 8005338: 28 22 00 00 lw r2,(r1+0)
information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) {
800533c: 35 ce 00 04 addi r14,r14,4
the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; (*routine)(the_thread);
8005340: b8 40 08 00 mv r1,r2
continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread )
8005344: 44 40 00 02 be r2,r0,800534c <rtems_iterate_over_all_threads+0x70><== NEVER TAKEN
continue; (*routine)(the_thread);
8005348: d9 e0 00 00 call r15
information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) {
800534c: 2d 81 00 10 lhu r1,(r12+16)
8005350: 50 2d ff f7 bgeu r1,r13,800532c <rtems_iterate_over_all_threads+0x50>
8005354: 35 6b 00 04 addi r11,r11,4
Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 8005358: 5d 70 ff ee bne r11,r16,8005310 <rtems_iterate_over_all_threads+0x34> (*routine)(the_thread); } } }
800535c: 2b 9d 00 04 lw ra,(sp+4) 8005360: 2b 8b 00 1c lw r11,(sp+28) 8005364: 2b 8c 00 18 lw r12,(sp+24) 8005368: 2b 8d 00 14 lw r13,(sp+20) 800536c: 2b 8e 00 10 lw r14,(sp+16) 8005370: 2b 8f 00 0c lw r15,(sp+12) 8005374: 2b 90 00 08 lw r16,(sp+8) 8005378: 37 9c 00 1c addi sp,sp,28 800537c: c3 a0 00 00 ret
080075a8 <rtems_libio_allocate>: * This routine searches the IOP Table for an unused entry. If it * finds one, it returns it. Otherwise, it returns NULL. */ rtems_libio_t *rtems_libio_allocate( void ) {
80075a8: 37 9c ff ec addi sp,sp,-20 80075ac: 5b 8b 00 10 sw (sp+16),r11 80075b0: 5b 8c 00 0c sw (sp+12),r12 80075b4: 5b 8d 00 08 sw (sp+8),r13 80075b8: 5b 9d 00 04 sw (sp+4),ra
rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
80075bc: 78 01 08 01 mvhi r1,0x801 80075c0: 38 21 d7 24 ori r1,r1,0xd724 80075c4: 28 21 00 00 lw r1,(r1+0) 80075c8: 34 02 00 00 mvi r2,0
rtems_status_code rc; rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) {
80075cc: 78 0c 08 01 mvhi r12,0x801 80075d0: b8 40 18 00 mv r3,r2 80075d4: 39 8c d7 20 ori r12,r12,0xd720 80075d8: f8 00 03 83 calli 80083e4 <rtems_semaphore_obtain> 80075dc: 29 81 00 00 lw r1,(r12+0)
80075e0: 44 20 00 1f be r1,r0,800765c <rtems_libio_allocate+0xb4> rc = rtems_semaphore_create(
80075e4: 78 02 08 01 mvhi r2,0x801 80075e8: 38 42 d7 1c ori r2,r2,0xd71c 80075ec: 28 43 00 00 lw r3,(r2+0) 80075f0: 34 02 00 03 mvi r2,3 80075f4: c8 23 08 00 sub r1,r1,r3 80075f8: fb ff e3 4e calli 8000330 <__ashrsi3> 80075fc: 78 02 38 e3 mvhi r2,0x38e3 8007600: 38 42 8e 39 ori r2,r2,0x8e39 8007604: f8 00 4b ba calli 801a4ec <__mulsi3> 8007608: 78 02 4c 42 mvhi r2,0x4c42 800760c: 38 42 49 00 ori r2,r2,0x4900 8007610: b8 22 08 00 or r1,r1,r2 8007614: 34 03 00 54 mvi r3,84 8007618: 34 02 00 01 mvi r2,1 800761c: 34 04 00 00 mvi r4,0 8007620: 37 85 00 14 addi r5,sp,20 8007624: fb ff ea 4b calli 8001f50 <rtems_semaphore_create>
1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 0, &sema ); if (rc != RTEMS_SUCCESSFUL)
8007628: 5c 20 00 0d bne r1,r0,800765c <rtems_libio_allocate+0xb4> <== NEVER TAKEN
goto failed; iop = rtems_libio_iop_freelist;
800762c: 29 8b 00 00 lw r11,(r12+0)
next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) );
8007630: b8 20 10 00 mv r2,r1 8007634: 34 03 00 48 mvi r3,72 8007638: b9 60 08 00 mv r1,r11
&sema ); if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1;
800763c: 29 6d 00 38 lw r13,(r11+56)
(void) memset( iop, 0, sizeof(rtems_libio_t) );
8007640: f8 00 16 c3 calli 800d14c <memset>
iop->flags = LIBIO_FLAGS_OPEN;
8007644: 34 01 01 00 mvi r1,256 8007648: 59 61 00 18 sw (r11+24),r1
iop->sem = sema;
800764c: 2b 81 00 14 lw r1,(sp+20)
rtems_libio_iop_freelist = next;
8007650: 59 8d 00 00 sw (r12+0),r13
goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema;
8007654: 59 61 00 30 sw (r11+48),r1
rtems_libio_iop_freelist = next; goto done;
8007658: e0 00 00 02 bi 8007660 <rtems_libio_allocate+0xb8> 800765c: 34 0b 00 00 mvi r11,0
} static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore );
8007660: 78 01 08 01 mvhi r1,0x801 8007664: 38 21 d7 24 ori r1,r1,0xd724 8007668: 28 21 00 00 lw r1,(r1+0) 800766c: f8 00 03 ae calli 8008524 <rtems_semaphore_release>
iop = 0; done: rtems_libio_unlock(); return iop; }
8007670: b9 60 08 00 mv r1,r11 8007674: 2b 9d 00 04 lw ra,(sp+4) 8007678: 2b 8b 00 10 lw r11,(sp+16) 800767c: 2b 8c 00 0c lw r12,(sp+12) 8007680: 2b 8d 00 08 lw r13,(sp+8) 8007684: 37 9c 00 14 addi sp,sp,20 8007688: c3 a0 00 00 ret
08007530 <rtems_libio_free>: */ void rtems_libio_free( rtems_libio_t *iop ) {
8007530: 37 9c ff f8 addi sp,sp,-8 8007534: 5b 8b 00 08 sw (sp+8),r11 8007538: 5b 9d 00 04 sw (sp+4),ra
rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
800753c: 78 02 08 01 mvhi r2,0x801 8007540: 38 42 d7 24 ori r2,r2,0xd724 8007544: b8 20 58 00 mv r11,r1 8007548: 28 41 00 00 lw r1,(r2+0) 800754c: 34 02 00 00 mvi r2,0 8007550: b8 40 18 00 mv r3,r2 8007554: f8 00 03 a4 calli 80083e4 <rtems_semaphore_obtain>
rtems_libio_lock(); if (iop->sem)
8007558: 29 61 00 30 lw r1,(r11+48)
800755c: 44 20 00 02 be r1,r0,8007564 <rtems_libio_free+0x34> <== NEVER TAKEN
rtems_semaphore_delete(iop->sem);
8007560: f8 00 03 65 calli 80082f4 <rtems_semaphore_delete>
iop->flags &= ~LIBIO_FLAGS_OPEN;
8007564: 29 63 00 18 lw r3,(r11+24) 8007568: 34 01 fe ff mvi r1,-257
iop->data1 = rtems_libio_iop_freelist;
800756c: 78 02 08 01 mvhi r2,0x801 8007570: 38 42 d7 20 ori r2,r2,0xd720
rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN;
8007574: a0 61 18 00 and r3,r3,r1
} static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore );
8007578: 78 01 08 01 mvhi r1,0x801 800757c: 59 63 00 18 sw (r11+24),r3 8007580: 38 21 d7 24 ori r1,r1,0xd724
iop->data1 = rtems_libio_iop_freelist;
8007584: 28 43 00 00 lw r3,(r2+0) 8007588: 28 21 00 00 lw r1,(r1+0)
rtems_libio_iop_freelist = iop;
800758c: 58 4b 00 00 sw (r2+0),r11
if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist;
8007590: 59 63 00 38 sw (r11+56),r3 8007594: f8 00 03 e4 calli 8008524 <rtems_semaphore_release>
rtems_libio_iop_freelist = iop; rtems_libio_unlock(); }
8007598: 2b 9d 00 04 lw ra,(sp+4) 800759c: 2b 8b 00 08 lw r11,(sp+8) 80075a0: 37 9c 00 08 addi sp,sp,8 80075a4: c3 a0 00 00 ret
08000f1c <rtems_libio_init>: * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) {
8000f1c: 37 9c ff f8 addi sp,sp,-8 8000f20: 5b 8b 00 08 sw (sp+8),r11 8000f24: 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)
8000f28: 78 0b 08 01 mvhi r11,0x801 8000f2c: 39 6b d0 10 ori r11,r11,0xd010 8000f30: 29 61 00 00 lw r1,(r11+0)
8000f34: 44 20 00 16 be r1,r0,8000f8c <rtems_libio_init+0x70> <== NEVER TAKEN
{ rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
8000f38: 34 02 00 48 mvi r2,72 8000f3c: f8 00 18 12 calli 8006f84 <calloc> 8000f40: 78 02 08 01 mvhi r2,0x801 8000f44: 38 42 d7 1c ori r2,r2,0xd71c 8000f48: 58 41 00 00 sw (r2+0),r1
sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL)
8000f4c: 5c 20 00 03 bne r1,r0,8000f58 <rtems_libio_init+0x3c> <== ALWAYS TAKEN
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
8000f50: 34 01 00 1a mvi r1,26 <== NOT EXECUTED 8000f54: e0 00 00 18 bi 8000fb4 <rtems_libio_init+0x98> <== NOT EXECUTED
iop = rtems_libio_iop_freelist = rtems_libio_iops;
8000f58: 78 02 08 01 mvhi r2,0x801 8000f5c: 38 42 d7 20 ori r2,r2,0xd720 8000f60: 58 41 00 00 sw (r2+0),r1
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
8000f64: 29 64 00 00 lw r4,(r11+0) 8000f68: 34 02 00 00 mvi r2,0 8000f6c: e0 00 00 02 bi 8000f74 <rtems_libio_init+0x58>
iop->data1 = iop + 1;
8000f70: 58 21 ff f0 sw (r1+-16),r1
sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
8000f74: 34 42 00 01 addi r2,r2,1
iop->data1 = iop + 1;
8000f78: b8 20 18 00 mv r3,r1
sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
8000f7c: 34 21 00 48 addi r1,r1,72
8000f80: 54 82 ff fc bgu r4,r2,8000f70 <rtems_libio_init+0x54> iop->data1 = iop + 1; iop->data1 = NULL;
8000f84: 34 01 00 00 mvi r1,0 8000f88: 58 61 00 38 sw (r3+56),r1
/* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create(
8000f8c: 78 01 4c 42 mvhi r1,0x4c42 8000f90: 78 05 08 01 mvhi r5,0x801 8000f94: 34 03 00 54 mvi r3,84 8000f98: 38 21 49 4f ori r1,r1,0x494f 8000f9c: 38 a5 d7 24 ori r5,r5,0xd724 8000fa0: 34 02 00 01 mvi r2,1 8000fa4: 34 04 00 00 mvi r4,0 8000fa8: f8 00 03 ea calli 8001f50 <rtems_semaphore_create> 8000fac: 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 )
8000fb0: 44 20 00 02 be r1,r0,8000fb8 <rtems_libio_init+0x9c> <== ALWAYS TAKEN
rtems_fatal_error_occurred( rc );
8000fb4: f8 00 05 bc calli 80026a4 <rtems_fatal_error_occurred> <== NOT EXECUTED
/* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper)
8000fb8: 78 02 08 01 mvhi r2,0x801 8000fbc: 38 42 d0 0c ori r2,r2,0xd00c 8000fc0: 28 41 00 00 lw r1,(r2+0)
8000fc4: 44 23 00 02 be r1,r3,8000fcc <rtems_libio_init+0xb0> <== NEVER TAKEN
(* rtems_fs_init_helper)();
8000fc8: d8 20 00 00 call r1
}
8000fcc: 2b 9d 00 04 lw ra,(sp+4) 8000fd0: 2b 8b 00 08 lw r11,(sp+8) 8000fd4: 37 9c 00 08 addi sp,sp,8 8000fd8: c3 a0 00 00 ret
080283d0 <rtems_libio_set_private_env>: rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) {
80283d0: 37 9c ff d4 addi sp,sp,-44 80283d4: 5b 8b 00 14 sw (sp+20),r11 80283d8: 5b 8c 00 10 sw (sp+16),r12 80283dc: 5b 8d 00 0c sw (sp+12),r13 80283e0: 5b 8e 00 08 sw (sp+8),r14 80283e4: 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);
80283e8: 34 01 00 00 mvi r1,0 80283ec: b8 20 10 00 mv r2,r1 80283f0: 37 83 00 2c addi r3,sp,44 80283f4: f8 00 08 f4 calli 802a7c4 <rtems_task_ident> 80283f8: b8 20 60 00 mv r12,r1
if (sc != RTEMS_SUCCESSFUL) return sc;
80283fc: 5c 20 00 43 bne r1,r0,8028508 <rtems_libio_set_private_env+0x138><== NEVER TAKEN
/* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) {
8028400: 78 0b 08 06 mvhi r11,0x806 8028404: 39 6b d2 f0 ori r11,r11,0xd2f0 8028408: 29 62 00 00 lw r2,(r11+0) 802840c: 78 01 08 07 mvhi r1,0x807 8028410: 38 21 0f 64 ori r1,r1,0xf64
8028414: 5c 41 00 13 bne r2,r1,8028460 <rtems_libio_set_private_env+0x90> rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
8028418: 34 01 00 48 mvi r1,72 802841c: fb ff 79 9a calli 8006a84 <malloc> 8028420: b8 20 68 00 mv r13,r1
if (!tmp)
8028424: 5c 20 00 03 bne r1,r0,8028430 <rtems_libio_set_private_env+0x60><== ALWAYS TAKEN
8028428: 34 0c 00 1a mvi r12,26 <== NOT EXECUTED 802842c: e0 00 00 37 bi 8028508 <rtems_libio_set_private_env+0x138> <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
8028430: 78 03 08 02 mvhi r3,0x802 8028434: 38 63 82 a4 ori r3,r3,0x82a4 8028438: b9 80 08 00 mv r1,r12 802843c: b9 60 10 00 mv r2,r11 8028440: f8 00 0a 08 calli 802ac60 <rtems_task_variable_add> 8028444: b8 20 70 00 mv r14,r1
if (sc != RTEMS_SUCCESSFUL) {
8028448: 44 20 00 05 be r1,r0,802845c <rtems_libio_set_private_env+0x8c><== ALWAYS TAKEN
/* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp);
802844c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8028450: fb ff 77 ae calli 8006308 <free> <== NOT EXECUTED 8028454: b9 c0 60 00 mv r12,r14 <== NOT EXECUTED
return sc;
8028458: e0 00 00 2c bi 8028508 <rtems_libio_set_private_env+0x138> <== NOT EXECUTED
} rtems_current_user_env = tmp;
802845c: 59 6d 00 00 sw (r11+0),r13
}; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/
8028460: 78 0b 08 06 mvhi r11,0x806 8028464: 39 6b d2 f0 ori r11,r11,0xd2f0 8028468: 29 6d 00 00 lw r13,(r11+0) 802846c: 78 02 08 07 mvhi r2,0x807 8028470: 38 42 0f 64 ori r2,r2,0xf64 8028474: 34 03 00 48 mvi r3,72 8028478: b9 a0 08 00 mv r1,r13 802847c: f8 00 7d 66 calli 8047a14 <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC;
8028480: 78 01 08 07 mvhi r1,0x807 8028484: 38 21 0f 58 ori r1,r1,0xf58 8028488: 28 22 00 00 lw r2,(r1+0)
} rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/
802848c: 2b 81 00 2c lw r1,(sp+44)
/* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC;
8028490: 34 03 00 14 mvi r3,20 8028494: 34 42 00 1c addi r2,r2,28
} rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/
8028498: 59 a1 00 00 sw (r13+0),r1
/* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC;
802849c: 35 a1 00 18 addi r1,r13,24 80284a0: f8 00 7d 5d calli 8047a14 <memcpy>
* 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);
80284a4: 37 8d 00 18 addi r13,sp,24 80284a8: 34 03 00 00 mvi r3,0 80284ac: 78 01 08 06 mvhi r1,0x806 80284b0: b8 60 28 00 mv r5,r3 80284b4: b9 a0 20 00 mv r4,r13 80284b8: 34 02 00 01 mvi r2,1 80284bc: 38 21 ba 00 ori r1,r1,0xba00 80284c0: fb ff 77 55 calli 8006214 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
80284c4: 29 61 00 00 lw r1,(r11+0) 80284c8: b9 a0 10 00 mv r2,r13 80284cc: 34 03 00 14 mvi r3,20 80284d0: 34 21 00 18 addi r1,r1,24 80284d4: f8 00 7d 50 calli 8047a14 <memcpy>
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
80284d8: 34 03 00 00 mvi r3,0 80284dc: 78 01 08 06 mvhi r1,0x806 80284e0: 34 02 00 01 mvi r2,1 80284e4: b8 60 28 00 mv r5,r3 80284e8: 38 21 ba 00 ori r1,r1,0xba00 80284ec: b9 a0 20 00 mv r4,r13 80284f0: fb ff 77 49 calli 8006214 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
80284f4: 29 61 00 00 lw r1,(r11+0) 80284f8: b9 a0 10 00 mv r2,r13 80284fc: 34 03 00 14 mvi r3,20 8028500: 34 21 00 04 addi r1,r1,4 8028504: f8 00 7d 44 calli 8047a14 <memcpy>
return RTEMS_SUCCESSFUL; }
8028508: b9 80 08 00 mv r1,r12 802850c: 2b 9d 00 04 lw ra,(sp+4) 8028510: 2b 8b 00 14 lw r11,(sp+20) 8028514: 2b 8c 00 10 lw r12,(sp+16) 8028518: 2b 8d 00 0c lw r13,(sp+12) 802851c: 2b 8e 00 08 lw r14,(sp+8) 8028520: 37 9c 00 2c addi sp,sp,44 8028524: c3 a0 00 00 ret
08028308 <rtems_libio_share_private_env>: * 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) {
8028308: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 802830c: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 8028310: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8028314: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8028318: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id);
802831c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8028320: 37 83 00 10 addi r3,sp,16 <== NOT EXECUTED 8028324: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8028328: f8 00 09 27 calli 802a7c4 <rtems_task_ident> <== NOT EXECUTED 802832c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
8028330: 5c 20 00 22 bne r1,r0,80283b8 <rtems_libio_share_private_env+0xb0><== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
8028334: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8028338: 38 42 d2 f0 ori r2,r2,0xd2f0 <== NOT EXECUTED 802833c: 28 4b 00 00 lw r11,(r2+0) <== NOT EXECUTED 8028340: 2b 83 00 10 lw r3,(sp+16) <== NOT EXECUTED 8028344: 29 64 00 00 lw r4,(r11+0) <== NOT EXECUTED 8028348: 5c 83 00 06 bne r4,r3,8028360 <rtems_libio_share_private_env+0x58><== NOT EXECUTED
/* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
802834c: f8 00 0a 75 calli 802ad20 <rtems_task_variable_delete> <== NOT EXECUTED 8028350: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
8028354: 5c 20 00 19 bne r1,r0,80283b8 <rtems_libio_share_private_env+0xb0><== NOT EXECUTED
free_user_env(tmp);
8028358: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 802835c: fb ff ff d2 calli 80282a4 <free_user_env> <== NOT EXECUTED
}; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
8028360: 78 0b 08 06 mvhi r11,0x806 <== NOT EXECUTED 8028364: 39 6b d2 f0 ori r11,r11,0xd2f0 <== NOT EXECUTED 8028368: 37 83 00 14 addi r3,sp,20 <== NOT EXECUTED 802836c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8028370: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8028374: f8 00 0a 8e calli 802adac <rtems_task_variable_get> <== NOT EXECUTED 8028378: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
(void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL)
802837c: 5c 20 00 0a bne r1,r0,80283a4 <rtems_libio_share_private_env+0x9c><== NOT EXECUTED
goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
8028380: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED 8028384: 38 63 82 a4 ori r3,r3,0x82a4 <== NOT EXECUTED 8028388: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 802838c: f8 00 0a 35 calli 802ac60 <rtems_task_variable_add> <== NOT EXECUTED 8028390: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
8028394: 5c 20 00 04 bne r1,r0,80283a4 <rtems_libio_share_private_env+0x9c><== NOT EXECUTED
goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env;
8028398: 2b 81 00 14 lw r1,(sp+20) <== NOT EXECUTED 802839c: 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;
80283a0: e0 00 00 06 bi 80283b8 <rtems_libio_share_private_env+0xb0><== NOT EXECUTED
bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env;
80283a4: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 80283a8: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 80283ac: 38 21 d2 f0 ori r1,r1,0xd2f0 <== NOT EXECUTED 80283b0: 38 42 0f 64 ori r2,r2,0xf64 <== NOT EXECUTED 80283b4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
return sc; }
80283b8: b8 60 08 00 mv r1,r3 <== NOT EXECUTED 80283bc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80283c0: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 80283c4: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 80283c8: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 80283cc: c3 a0 00 00 ret <== NOT EXECUTED
08007390 <rtems_libio_to_fcntl_flags>: */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) {
8007390: 37 9c ff f8 addi sp,sp,-8 8007394: 5b 8b 00 08 sw (sp+8),r11 8007398: 5b 9d 00 04 sw (sp+4),ra
uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
800739c: 34 03 00 06 mvi r3,6 80073a0: 20 24 00 06 andi r4,r1,0x6
*/ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) {
80073a4: b8 20 58 00 mv r11,r1
uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
80073a8: 34 02 00 02 mvi r2,2
80073ac: 44 83 00 07 be r4,r3,80073c8 <rtems_libio_to_fcntl_flags+0x38><== NEVER TAKEN
fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
80073b0: a0 22 18 00 and r3,r1,r2 80073b4: 34 02 00 00 mvi r2,0
80073b8: 5c 62 00 04 bne r3,r2,80073c8 <rtems_libio_to_fcntl_flags+0x38><== ALWAYS TAKEN
80073bc: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80073c0: fb ff e3 b4 calli 8000290 <__lshrsi3> <== NOT EXECUTED 80073c4: 20 22 00 01 andi r2,r1,0x1 <== NOT EXECUTED
fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
80073c8: 21 61 00 01 andi r1,r11,0x1
80073cc: 44 20 00 02 be r1,r0,80073d4 <rtems_libio_to_fcntl_flags+0x44> fcntl_flags |= O_NONBLOCK;
80073d0: 38 42 40 00 ori r2,r2,0x4000
} if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
80073d4: 21 61 02 00 andi r1,r11,0x200
80073d8: 44 20 00 02 be r1,r0,80073e0 <rtems_libio_to_fcntl_flags+0x50> fcntl_flags |= O_APPEND;
80073dc: 38 42 00 08 ori r2,r2,0x8
} if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
80073e0: 21 6b 04 00 andi r11,r11,0x400
80073e4: 45 60 00 02 be r11,r0,80073ec <rtems_libio_to_fcntl_flags+0x5c> fcntl_flags |= O_CREAT;
80073e8: 38 42 02 00 ori r2,r2,0x200
} return fcntl_flags; }
80073ec: b8 40 08 00 mv r1,r2 80073f0: 2b 9d 00 04 lw ra,(sp+4) 80073f4: 2b 8b 00 08 lw r11,(sp+8) 80073f8: 37 9c 00 08 addi sp,sp,8 80073fc: c3 a0 00 00 ret
08006b94 <rtems_malloc_statistics_at_free>: * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) {
8006b94: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8006b98: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
8006b9c: 78 03 08 06 mvhi r3,0x806 <== NOT EXECUTED 8006ba0: 38 63 d0 1c ori r3,r3,0xd01c <== NOT EXECUTED
* size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) {
8006ba4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
8006ba8: 28 61 00 00 lw r1,(r3+0) <== NOT EXECUTED 8006bac: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED 8006bb0: f8 00 0f b2 calli 800aa78 <_Protected_heap_Get_block_size> <== NOT EXECUTED 8006bb4: 44 20 00 0b be r1,r0,8006be0 <rtems_malloc_statistics_at_free+0x4c><== NOT EXECUTED
MSBUMP(lifetime_freed, size);
8006bb8: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8006bbc: 38 21 0f 28 ori r1,r1,0xf28 <== NOT EXECUTED 8006bc0: 2b 83 00 08 lw r3,(sp+8) <== NOT EXECUTED 8006bc4: 28 22 00 2c lw r2,(r1+44) <== NOT EXECUTED 8006bc8: 28 24 00 28 lw r4,(r1+40) <== NOT EXECUTED 8006bcc: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED 8006bd0: f4 62 18 00 cmpgu r3,r3,r2 <== NOT EXECUTED 8006bd4: 58 22 00 2c sw (r1+44),r2 <== NOT EXECUTED 8006bd8: b4 64 10 00 add r2,r3,r4 <== NOT EXECUTED 8006bdc: 58 22 00 28 sw (r1+40),r2 <== NOT EXECUTED
} }
8006be0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006be4: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8006be8: c3 a0 00 00 ret <== NOT EXECUTED
08006bec <rtems_malloc_statistics_at_malloc>: } static void rtems_malloc_statistics_at_malloc( void *pointer ) {
8006bec: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED 8006bf0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8006bf4: 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 )
8006bf8: 44 20 00 17 be r1,r0,8006c54 <rtems_malloc_statistics_at_malloc+0x68><== NOT EXECUTED
return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
8006bfc: 78 03 08 06 mvhi r3,0x806 <== NOT EXECUTED 8006c00: 38 63 d0 1c ori r3,r3,0xd01c <== NOT EXECUTED 8006c04: 28 61 00 00 lw r1,(r3+0) <== NOT EXECUTED
static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0;
8006c08: 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);
8006c0c: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED
static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0;
8006c10: 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);
8006c14: f8 00 0f 99 calli 800aa78 <_Protected_heap_Get_block_size> <== NOT EXECUTED
MSBUMP(lifetime_allocated, actual_size);
8006c18: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8006c1c: 38 21 0f 28 ori r1,r1,0xf28 <== NOT EXECUTED 8006c20: 2b 84 00 08 lw r4,(sp+8) <== NOT EXECUTED 8006c24: 28 22 00 24 lw r2,(r1+36) <== NOT EXECUTED 8006c28: 28 26 00 20 lw r6,(r1+32) <== NOT EXECUTED
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
8006c2c: 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);
8006c30: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED 8006c34: 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)
8006c38: 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);
8006c3c: b4 86 20 00 add r4,r4,r6 <== NOT EXECUTED 8006c40: 58 24 00 20 sw (r1+32),r4 <== NOT EXECUTED
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
8006c44: 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);
8006c48: 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)
8006c4c: 50 a3 00 02 bgeu r5,r3,8006c54 <rtems_malloc_statistics_at_malloc+0x68><== NOT EXECUTED
s->max_depth = current_depth;
8006c50: 58 23 00 18 sw (r1+24),r3 <== NOT EXECUTED
}
8006c54: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006c58: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED 8006c5c: c3 a0 00 00 ret <== NOT EXECUTED
08006c60 <rtems_malloc_statistics_initialize>: #include <sys/reent.h> #include <stdlib.h> static void rtems_malloc_statistics_initialize( void ) {
8006c60: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8006c64: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
/* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics));
8006c68: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8006c6c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8006c70: 34 03 00 30 mvi r3,48 <== NOT EXECUTED 8006c74: 38 21 0f 28 ori r1,r1,0xf28 <== NOT EXECUTED 8006c78: f8 01 04 31 calli 8047d3c <memset> <== NOT EXECUTED
}
8006c7c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006c80: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8006c84: c3 a0 00 00 ret <== NOT EXECUTED
0800d414 <rtems_memalign>: int rtems_memalign( void **pointer, size_t alignment, size_t size ) {
800d414: 37 9c ff f0 addi sp,sp,-16 800d418: 5b 8b 00 10 sw (sp+16),r11 800d41c: 5b 8c 00 0c sw (sp+12),r12 800d420: 5b 8d 00 08 sw (sp+8),r13 800d424: 5b 9d 00 04 sw (sp+4),ra 800d428: b8 20 58 00 mv r11,r1 800d42c: b8 40 60 00 mv r12,r2 800d430: b8 60 68 00 mv r13,r3
void *return_this; /* * Parameter error checks */ if ( !pointer ) 800d434: 44 20 00 1f be r1,r0,800d4b0 <rtems_memalign+0x9c> *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) &&
800d438: 78 01 08 02 mvhi r1,0x802 800d43c: 38 21 4a e0 ori r1,r1,0x4ae0 800d440: 28 22 00 00 lw r2,(r1+0)
* Parameter error checks */ if ( !pointer ) return EINVAL; *pointer = NULL;
800d444: 34 01 00 00 mvi r1,0 800d448: 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()) &&
800d44c: 34 01 00 03 mvi r1,3
800d450: 5c 41 00 03 bne r2,r1,800d45c <rtems_memalign+0x48> <== NEVER TAKEN
800d454: fb ff d5 dd calli 8002bc8 <malloc_is_system_state_OK>
800d458: 44 20 00 16 be r1,r0,800d4b0 <rtems_memalign+0x9c> <== NEVER TAKEN
/* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process();
800d45c: fb ff d5 f6 calli 8002c34 <malloc_deferred_frees_process>
uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 );
800d460: 78 01 08 02 mvhi r1,0x802 800d464: 38 21 40 1c ori r1,r1,0x401c 800d468: 28 21 00 00 lw r1,(r1+0) 800d46c: b9 a0 10 00 mv r2,r13 800d470: b9 80 18 00 mv r3,r12 800d474: 34 04 00 00 mvi r4,0 800d478: fb ff e3 33 calli 8006144 <_Protected_heap_Allocate_aligned_with_boundary> 800d47c: b8 20 60 00 mv r12,r1
return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this )
800d480: 34 02 00 0c mvi r2,12
800d484: 44 20 00 0c be r1,r0,800d4b4 <rtems_memalign+0xa0> return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers )
800d488: 78 02 08 02 mvhi r2,0x802 800d48c: 38 42 46 80 ori r2,r2,0x4680 800d490: 28 41 00 00 lw r1,(r2+0)
800d494: 44 20 00 04 be r1,r0,800d4a4 <rtems_memalign+0x90> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
800d498: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 800d49c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800d4a0: 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;
800d4a4: 59 6c 00 00 sw (r11+0),r12 800d4a8: 34 02 00 00 mvi r2,0
return 0;
800d4ac: e0 00 00 02 bi 800d4b4 <rtems_memalign+0xa0> 800d4b0: 34 02 00 16 mvi r2,22
}
800d4b4: b8 40 08 00 mv r1,r2 800d4b8: 2b 9d 00 04 lw ra,(sp+4) 800d4bc: 2b 8b 00 10 lw r11,(sp+16) 800d4c0: 2b 8c 00 0c lw r12,(sp+12) 800d4c4: 2b 8d 00 08 lw r13,(sp+8) 800d4c8: 37 9c 00 10 addi sp,sp,16 800d4cc: c3 a0 00 00 ret
08006c64 <rtems_panic>: void rtems_panic( const char *printf_format, ... ) {
8006c64: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8006c68: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8006c6c: b8 20 48 00 mv r9,r1 <== NOT EXECUTED 8006c70: 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);
8006c74: 78 01 20 00 mvhi r1,0x2000 <== NOT EXECUTED
void rtems_panic( const char *printf_format, ... ) {
8006c78: 5b 82 00 0c sw (sp+12),r2 <== NOT EXECUTED 8006c7c: 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);
8006c80: b9 20 10 00 mv r2,r9 <== NOT EXECUTED 8006c84: 37 83 00 0c addi r3,sp,12 <== NOT EXECUTED 8006c88: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED
void rtems_panic( const char *printf_format, ... ) {
8006c8c: 5b 84 00 14 sw (sp+20),r4 <== NOT EXECUTED 8006c90: 5b 85 00 18 sw (sp+24),r5 <== NOT EXECUTED 8006c94: 5b 86 00 1c sw (sp+28),r6 <== NOT EXECUTED 8006c98: 5b 87 00 20 sw (sp+32),r7 <== NOT EXECUTED 8006c9c: 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);
8006ca0: fb ff ff 6e calli 8006a58 <rtems_verror> <== NOT EXECUTED
va_end(arglist); }
8006ca4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006ca8: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8006cac: c3 a0 00 00 ret <== NOT EXECUTED
08011088 <rtems_partition_create>: uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) {
8011088: 37 9c ff dc addi sp,sp,-36 801108c: 5b 8b 00 24 sw (sp+36),r11 8011090: 5b 8c 00 20 sw (sp+32),r12 8011094: 5b 8d 00 1c sw (sp+28),r13 8011098: 5b 8e 00 18 sw (sp+24),r14 801109c: 5b 8f 00 14 sw (sp+20),r15 80110a0: 5b 90 00 10 sw (sp+16),r16 80110a4: 5b 91 00 0c sw (sp+12),r17 80110a8: 5b 92 00 08 sw (sp+8),r18 80110ac: 5b 9d 00 04 sw (sp+4),ra
register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) )
80110b0: 34 07 00 03 mvi r7,3
uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) {
80110b4: b8 20 88 00 mv r17,r1 80110b8: b8 40 70 00 mv r14,r2 80110bc: b8 60 78 00 mv r15,r3 80110c0: b8 80 60 00 mv r12,r4 80110c4: b8 a0 90 00 mv r18,r5 80110c8: b8 c0 80 00 mv r16,r6
register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 80110cc: 44 20 00 38 be r1,r0,80111ac <rtems_partition_create+0x124> return RTEMS_INVALID_NAME; if ( !starting_address ) 80110d0: 44 40 00 34 be r2,r0,80111a0 <rtems_partition_create+0x118> return RTEMS_INVALID_ADDRESS; if ( !id )
80110d4: 44 c0 00 33 be r6,r0,80111a0 <rtems_partition_create+0x118><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size ||
80110d8: 64 82 00 00 cmpei r2,r4,0 80110dc: 64 61 00 00 cmpei r1,r3,0 80110e0: b8 41 08 00 or r1,r2,r1
80110e4: 5c 20 00 31 bne r1,r0,80111a8 <rtems_partition_create+0x120> 80110e8: 54 83 00 30 bgu r4,r3,80111a8 <rtems_partition_create+0x120>
80110ec: 20 81 00 07 andi r1,r4,0x7
80110f0: 5c 20 00 2e bne r1,r0,80111a8 <rtems_partition_create+0x120> !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) )
80110f4: 21 cd 00 07 andi r13,r14,0x7
80110f8: 5d a1 00 2a bne r13,r1,80111a0 <rtems_partition_create+0x118>
80110fc: 78 02 08 03 mvhi r2,0x803 8011100: 38 42 fc ac ori r2,r2,0xfcac 8011104: 28 41 00 00 lw r1,(r2+0) 8011108: 34 21 00 01 addi r1,r1,1 801110c: 58 41 00 00 sw (r2+0),r1
* This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
8011110: 78 01 08 03 mvhi r1,0x803 8011114: 38 21 fa f4 ori r1,r1,0xfaf4 8011118: f8 00 15 d6 calli 8016870 <_Objects_Allocate> 801111c: b8 20 58 00 mv r11,r1
_Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 8011120: 5c 2d 00 04 bne r1,r13,8011130 <rtems_partition_create+0xa8> _Thread_Enable_dispatch();
8011124: f8 00 1a 80 calli 8017b24 <_Thread_Enable_dispatch> 8011128: 34 07 00 05 mvi r7,5
return RTEMS_TOO_MANY;
801112c: e0 00 00 20 bi 80111ac <rtems_partition_create+0x124>
_Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address;
8011130: 58 2e 00 10 sw (r1+16),r14
the_partition->length = length;
8011134: 58 2f 00 14 sw (r1+20),r15
the_partition->buffer_size = buffer_size;
8011138: 58 2c 00 18 sw (r1+24),r12
the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address,
801113c: b9 80 10 00 mv r2,r12
#endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set;
8011140: 58 32 00 1c sw (r1+28),r18
the_partition->number_of_used_blocks = 0;
8011144: 58 2d 00 20 sw (r1+32),r13
_Chain_Initialize( &the_partition->Memory, starting_address,
8011148: b9 e0 08 00 mv r1,r15 801114c: f8 00 7d 65 calli 80306e0 <__udivsi3> 8011150: 35 6f 00 24 addi r15,r11,36 8011154: b8 20 18 00 mv r3,r1 8011158: b9 80 20 00 mv r4,r12 801115c: b9 c0 10 00 mv r2,r14 8011160: b9 e0 08 00 mv r1,r15 8011164: f8 00 0f 4c calli 8014e94 <_Chain_Initialize> 8011168: 78 02 08 03 mvhi r2,0x803 801116c: 29 6c 00 08 lw r12,(r11+8) 8011170: 38 42 fa f4 ori r2,r2,0xfaf4 8011174: 28 4e 00 1c lw r14,(r2+28) 8011178: 21 81 ff ff andi r1,r12,0xffff 801117c: 34 02 00 02 mvi r2,2 8011180: fb ff f3 46 calli 800de98 <__ashlsi3> 8011184: b5 c1 08 00 add r1,r14,r1
information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name;
8011188: 59 71 00 0c sw (r11+12),r17
&_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id;
801118c: 5a 0c 00 00 sw (r16+0),r12
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
8011190: 58 2b 00 00 sw (r1+0),r11
name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch();
8011194: f8 00 1a 64 calli 8017b24 <_Thread_Enable_dispatch> 8011198: b9 a0 38 00 mv r7,r13
return RTEMS_SUCCESSFUL;
801119c: e0 00 00 04 bi 80111ac <rtems_partition_create+0x124> 80111a0: 34 07 00 09 mvi r7,9 80111a4: e0 00 00 02 bi 80111ac <rtems_partition_create+0x124> 80111a8: 34 07 00 08 mvi r7,8
}
80111ac: b8 e0 08 00 mv r1,r7 80111b0: 2b 9d 00 04 lw ra,(sp+4) 80111b4: 2b 8b 00 24 lw r11,(sp+36) 80111b8: 2b 8c 00 20 lw r12,(sp+32) 80111bc: 2b 8d 00 1c lw r13,(sp+28) 80111c0: 2b 8e 00 18 lw r14,(sp+24) 80111c4: 2b 8f 00 14 lw r15,(sp+20) 80111c8: 2b 90 00 10 lw r16,(sp+16) 80111cc: 2b 91 00 0c lw r17,(sp+12) 80111d0: 2b 92 00 08 lw r18,(sp+8) 80111d4: 37 9c 00 24 addi sp,sp,36 80111d8: c3 a0 00 00 ret
08009d64 <rtems_pipe_initialize>: /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) {
8009d64: 37 9c ff f8 addi sp,sp,-8 8009d68: 5b 8b 00 08 sw (sp+8),r11 8009d6c: 5b 9d 00 04 sw (sp+4),ra
if (!rtems_pipe_configured)
8009d70: 78 01 08 01 mvhi r1,0x801 8009d74: 38 21 d6 4c ori r1,r1,0xd64c 8009d78: 40 21 00 00 lbu r1,(r1+0)
8009d7c: 44 20 00 11 be r1,r0,8009dc0 <rtems_pipe_initialize+0x5c> <== ALWAYS TAKEN
return; if (rtems_pipe_semaphore)
8009d80: 78 05 08 01 mvhi r5,0x801 <== NOT EXECUTED 8009d84: 38 a5 d6 a8 ori r5,r5,0xd6a8 <== NOT EXECUTED 8009d88: 28 ab 00 00 lw r11,(r5+0) <== NOT EXECUTED 8009d8c: 5d 60 00 0d bne r11,r0,8009dc0 <rtems_pipe_initialize+0x5c><== NOT EXECUTED
return; rtems_status_code sc; sc = rtems_semaphore_create(
8009d90: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED 8009d94: 38 21 50 45 ori r1,r1,0x5045 <== NOT EXECUTED 8009d98: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8009d9c: 34 03 00 54 mvi r3,84 <== NOT EXECUTED 8009da0: b9 60 20 00 mv r4,r11 <== NOT EXECUTED 8009da4: fb ff e0 6b calli 8001f50 <rtems_semaphore_create> <== 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)
8009da8: 44 2b 00 02 be r1,r11,8009db0 <rtems_pipe_initialize+0x4c> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
8009dac: fb ff e2 3e calli 80026a4 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interval now; now = rtems_clock_get_ticks_since_boot();
8009db0: f8 00 05 1c calli 800b220 <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
rtems_pipe_no = now;
8009db4: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED 8009db8: 38 42 d6 ae ori r2,r2,0xd6ae <== NOT EXECUTED 8009dbc: 0c 41 00 00 sh (r2+0),r1 <== NOT EXECUTED
}
8009dc0: 2b 9d 00 04 lw ra,(sp+4) 8009dc4: 2b 8b 00 08 lw r11,(sp+8) 8009dc8: 37 9c 00 08 addi sp,sp,8 8009dcc: c3 a0 00 00 ret
0803db1c <rtems_rate_monotonic_period>: rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) {
803db1c: 37 9c ff e8 addi sp,sp,-24 803db20: 5b 8b 00 14 sw (sp+20),r11 803db24: 5b 8c 00 10 sw (sp+16),r12 803db28: 5b 8d 00 0c sw (sp+12),r13 803db2c: 5b 8e 00 08 sw (sp+8),r14 803db30: 5b 9d 00 04 sw (sp+4),ra 803db34: b8 20 70 00 mv r14,r1 803db38: 78 01 08 07 mvhi r1,0x807 803db3c: b8 40 60 00 mv r12,r2 803db40: 38 21 1b c8 ori r1,r1,0x1bc8 803db44: b9 c0 10 00 mv r2,r14 803db48: 37 83 00 18 addi r3,sp,24 803db4c: fb ff 32 cd calli 800a680 <_Objects_Get> 803db50: 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 ) {
803db54: 2b 81 00 18 lw r1,(sp+24)
803db58: 5c 20 00 61 bne r1,r0,803dcdc <rtems_rate_monotonic_period+0x1c0> case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) {
803db5c: 78 03 08 07 mvhi r3,0x807 803db60: 38 63 11 60 ori r3,r3,0x1160 803db64: 28 61 00 00 lw r1,(r3+0) 803db68: 29 62 00 40 lw r2,(r11+64)
803db6c: 44 41 00 04 be r2,r1,803db7c <rtems_rate_monotonic_period+0x60> _Thread_Enable_dispatch();
803db70: fb ff 35 7c calli 800b160 <_Thread_Enable_dispatch> 803db74: 34 0b 00 17 mvi r11,23
return RTEMS_NOT_OWNER_OF_RESOURCE;
803db78: e0 00 00 5a bi 803dce0 <rtems_rate_monotonic_period+0x1c4>
} if ( length == RTEMS_PERIOD_STATUS ) { 803db7c: 5d 80 00 0d bne r12,r0,803dbb0 <rtems_rate_monotonic_period+0x94> switch ( the_period->state ) {
803db80: 29 61 00 38 lw r1,(r11+56) 803db84: 34 02 00 04 mvi r2,4
803db88: 50 41 00 03 bgeu r2,r1,803db94 <rtems_rate_monotonic_period+0x78><== ALWAYS TAKEN
803db8c: b9 80 58 00 mv r11,r12 <== NOT EXECUTED 803db90: e0 00 00 51 bi 803dcd4 <rtems_rate_monotonic_period+0x1b8> <== NOT EXECUTED
803db94: 78 0b 08 06 mvhi r11,0x806 803db98: 34 02 00 02 mvi r2,2 803db9c: 39 6b 9f dc ori r11,r11,0x9fdc 803dba0: fb ff 0d 66 calli 8001138 <__ashlsi3> 803dba4: b5 61 08 00 add r1,r11,r1 803dba8: 28 2b 00 00 lw r11,(r1+0) 803dbac: e0 00 00 4a bi 803dcd4 <rtems_rate_monotonic_period+0x1b8>
} _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level );
803dbb0: 90 00 68 00 rcsr r13,IE 803dbb4: 34 01 ff fe mvi r1,-2 803dbb8: a1 a1 08 00 and r1,r13,r1 803dbbc: d0 01 00 00 wcsr IE,r1
switch ( the_period->state ) {
803dbc0: 29 63 00 38 lw r3,(r11+56) 803dbc4: 34 01 00 02 mvi r1,2
803dbc8: 44 61 00 18 be r3,r1,803dc28 <rtems_rate_monotonic_period+0x10c>
803dbcc: 34 01 00 04 mvi r1,4
803dbd0: 44 61 00 35 be r3,r1,803dca4 <rtems_rate_monotonic_period+0x188>
803dbd4: 5c 60 00 42 bne r3,r0,803dcdc <rtems_rate_monotonic_period+0x1c0><== NEVER TAKEN
case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level );
803dbd8: d0 0d 00 00 wcsr IE,r13
/* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period );
803dbdc: b9 60 08 00 mv r1,r11 803dbe0: fb ff ff 31 calli 803d8a4 <_Rate_monotonic_Initiate_statistics>
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
803dbe4: 78 03 08 03 mvhi r3,0x803
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
803dbe8: 34 0d 00 00 mvi r13,0
the_watchdog->routine = routine;
803dbec: 38 63 dd 00 ori r3,r3,0xdd00
the_period->state = RATE_MONOTONIC_ACTIVE;
803dbf0: 34 02 00 02 mvi r2,2
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
803dbf4: 78 01 08 07 mvhi r1,0x807 803dbf8: 59 62 00 38 sw (r11+56),r2
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
803dbfc: 59 63 00 2c sw (r11+44),r3
the_watchdog->id = id;
803dc00: 59 6e 00 30 sw (r11+48),r14
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
803dc04: 59 6c 00 1c sw (r11+28),r12
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
803dc08: 35 62 00 10 addi r2,r11,16
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
803dc0c: 59 6d 00 18 sw (r11+24),r13
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
803dc10: 59 6d 00 34 sw (r11+52),r13
_Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length;
803dc14: 59 6c 00 3c sw (r11+60),r12
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
803dc18: 38 21 11 80 ori r1,r1,0x1180 803dc1c: fb ff 3a 4a calli 800c544 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch();
803dc20: b9 a0 58 00 mv r11,r13 803dc24: e0 00 00 2c bi 803dcd4 <rtems_rate_monotonic_period+0x1b8>
case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period );
803dc28: b9 60 08 00 mv r1,r11 803dc2c: fb ff ff 7c calli 803da1c <_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;
803dc30: 34 01 00 01 mvi r1,1
the_period->next_length = length;
803dc34: 59 6c 00 3c sw (r11+60),r12
/* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
803dc38: 59 61 00 38 sw (r11+56),r1
the_period->next_length = length; _ISR_Enable( level );
803dc3c: d0 0d 00 00 wcsr IE,r13
_Thread_Executing->Wait.id = the_period->Object.id;
803dc40: 78 01 08 07 mvhi r1,0x807 803dc44: 38 21 11 60 ori r1,r1,0x1160 803dc48: 28 21 00 00 lw r1,(r1+0) 803dc4c: 29 63 00 08 lw r3,(r11+8)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
803dc50: 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;
803dc54: 58 23 00 20 sw (r1+32),r3
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
803dc58: fb ff 38 05 calli 800bc6c <_Thread_Set_state>
/* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level );
803dc5c: 90 00 08 00 rcsr r1,IE 803dc60: 34 02 ff fe mvi r2,-2 803dc64: a0 22 10 00 and r2,r1,r2 803dc68: d0 02 00 00 wcsr IE,r2
local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE;
803dc6c: 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;
803dc70: 29 62 00 38 lw r2,(r11+56)
the_period->state = RATE_MONOTONIC_ACTIVE;
803dc74: 59 63 00 38 sw (r11+56),r3
_ISR_Enable( level );
803dc78: 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 )
803dc7c: 34 01 00 03 mvi r1,3
803dc80: 5c 41 00 06 bne r2,r1,803dc98 <rtems_rate_monotonic_period+0x17c><== ALWAYS TAKEN
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
803dc84: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 803dc88: 38 21 11 60 ori r1,r1,0x1160 <== NOT EXECUTED 803dc8c: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 803dc90: 34 02 40 00 mvi r2,16384 <== NOT EXECUTED 803dc94: fb ff b7 d6 calli 802bbec <_Thread_Clear_state> <== NOT EXECUTED
_Thread_Enable_dispatch();
803dc98: fb ff 35 32 calli 800b160 <_Thread_Enable_dispatch> 803dc9c: 34 0b 00 00 mvi r11,0
return RTEMS_SUCCESSFUL;
803dca0: e0 00 00 10 bi 803dce0 <rtems_rate_monotonic_period+0x1c4>
case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period );
803dca4: b9 60 08 00 mv r1,r11 803dca8: fb ff ff 5d calli 803da1c <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
803dcac: d0 0d 00 00 wcsr IE,r13
the_period->state = RATE_MONOTONIC_ACTIVE;
803dcb0: 34 02 00 02 mvi r2,2 803dcb4: 78 01 08 07 mvhi r1,0x807 803dcb8: 59 62 00 38 sw (r11+56),r2
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
803dcbc: 59 6c 00 1c sw (r11+28),r12
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
803dcc0: 35 62 00 10 addi r2,r11,16
the_period->next_length = length;
803dcc4: 59 6c 00 3c sw (r11+60),r12 803dcc8: 38 21 11 80 ori r1,r1,0x1180 803dccc: fb ff 3a 1e calli 800c544 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch();
803dcd0: 34 0b 00 06 mvi r11,6 803dcd4: fb ff 35 23 calli 800b160 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
803dcd8: e0 00 00 02 bi 803dce0 <rtems_rate_monotonic_period+0x1c4> 803dcdc: 34 0b 00 04 mvi r11,4
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
803dce0: b9 60 08 00 mv r1,r11 803dce4: 2b 9d 00 04 lw ra,(sp+4) 803dce8: 2b 8b 00 14 lw r11,(sp+20) 803dcec: 2b 8c 00 10 lw r12,(sp+16) 803dcf0: 2b 8d 00 0c lw r13,(sp+12) 803dcf4: 2b 8e 00 08 lw r14,(sp+8) 803dcf8: 37 9c 00 18 addi sp,sp,24 803dcfc: c3 a0 00 00 ret
0802a320 <rtems_rate_monotonic_report_statistics_with_plugin>: */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) {
802a320: 37 9c ff 5c addi sp,sp,-164 802a324: 5b 8b 00 44 sw (sp+68),r11 802a328: 5b 8c 00 40 sw (sp+64),r12 802a32c: 5b 8d 00 3c sw (sp+60),r13 802a330: 5b 8e 00 38 sw (sp+56),r14 802a334: 5b 8f 00 34 sw (sp+52),r15 802a338: 5b 90 00 30 sw (sp+48),r16 802a33c: 5b 91 00 2c sw (sp+44),r17 802a340: 5b 92 00 28 sw (sp+40),r18 802a344: 5b 93 00 24 sw (sp+36),r19 802a348: 5b 94 00 20 sw (sp+32),r20 802a34c: 5b 95 00 1c sw (sp+28),r21 802a350: 5b 96 00 18 sw (sp+24),r22 802a354: 5b 97 00 14 sw (sp+20),r23 802a358: 5b 98 00 10 sw (sp+16),r24 802a35c: 5b 99 00 0c sw (sp+12),r25 802a360: 5b 9b 00 08 sw (sp+8),fp 802a364: 5b 9d 00 04 sw (sp+4),ra 802a368: b8 40 58 00 mv r11,r2 802a36c: b8 20 60 00 mv r12,r1
rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print )
802a370: 44 40 00 73 be r2,r0,802a53c <rtems_rate_monotonic_report_statistics_with_plugin+0x21c><== NEVER TAKEN
return; (*print)( context, "Period information by period\n" );
802a374: 78 02 08 06 mvhi r2,0x806 802a378: 38 42 67 70 ori r2,r2,0x6770 802a37c: d9 60 00 00 call r11
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" );
802a380: 78 02 08 06 mvhi r2,0x806 802a384: 38 42 67 90 ori r2,r2,0x6790 802a388: b9 80 08 00 mv r1,r12 802a38c: d9 60 00 00 call r11
(*print)( context, "--- Wall times are in seconds ---\n" );
802a390: 78 02 08 06 mvhi r2,0x806 802a394: 38 42 67 b4 ori r2,r2,0x67b4 802a398: b9 80 08 00 mv r1,r12 802a39c: d9 60 00 00 call r11
Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED "
802a3a0: 78 02 08 06 mvhi r2,0x806 802a3a4: 38 42 67 d8 ori r2,r2,0x67d8 802a3a8: b9 80 08 00 mv r1,r12 802a3ac: d9 60 00 00 call r11
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " "
802a3b0: 78 02 08 06 mvhi r2,0x806 802a3b4: b9 80 08 00 mv r1,r12 802a3b8: 38 42 68 24 ori r2,r2,0x6824 802a3bc: d9 60 00 00 call r11
/* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ;
802a3c0: 78 01 08 07 mvhi r1,0x807 802a3c4: 38 21 1b c8 ori r1,r1,0x1bc8 802a3c8: b8 20 80 00 mv r16,r1 802a3cc: 28 2d 00 08 lw r13,(r1+8)
id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats );
802a3d0: 37 99 00 48 addi r25,sp,72
if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status );
802a3d4: 37 98 00 80 addi r24,sp,128
#if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name );
802a3d8: 37 8f 00 a0 addi r15,sp,160
/* * Print part of report line that is not dependent on granularity */ (*print)( context,
802a3dc: 78 17 08 06 mvhi r23,0x806
struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
802a3e0: 37 96 00 60 addi r22,sp,96 802a3e4: 37 8e 00 98 addi r14,sp,152
(*print)( context,
802a3e8: 78 15 08 06 mvhi r21,0x806
struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
802a3ec: 37 94 00 78 addi r20,sp,120
(*print)( context,
802a3f0: 78 13 08 06 mvhi r19,0x806
/* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" );
802a3f4: 78 12 08 06 mvhi r18,0x806
/* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ;
802a3f8: e0 00 00 4d bi 802a52c <rtems_rate_monotonic_report_statistics_with_plugin+0x20c>
id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats );
802a3fc: f8 00 4c c8 calli 803d71c <rtems_rate_monotonic_get_statistics> 802a400: b8 20 88 00 mv r17,r1
if ( status != RTEMS_SUCCESSFUL ) 802a404: 5c 20 00 49 bne r1,r0,802a528 <rtems_rate_monotonic_report_statistics_with_plugin+0x208> continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status );
802a408: bb 00 10 00 mv r2,r24 802a40c: b9 a0 08 00 mv r1,r13 802a410: f8 00 4c f6 calli 803d7e8 <rtems_rate_monotonic_get_status>
#if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name );
802a414: 2b 81 00 80 lw r1,(sp+128) 802a418: b9 e0 18 00 mv r3,r15 802a41c: 34 02 00 05 mvi r2,5 802a420: fb ff 78 1a calli 8008488 <rtems_object_get_name>
/* * Print part of report line that is not dependent on granularity */ (*print)( context,
802a424: 2b 85 00 48 lw r5,(sp+72) 802a428: 2b 86 00 4c lw r6,(sp+76) 802a42c: ba e0 10 00 mv r2,r23 802a430: b9 a0 18 00 mv r3,r13 802a434: 38 42 68 70 ori r2,r2,0x6870 802a438: b9 80 08 00 mv r1,r12 802a43c: b9 e0 20 00 mv r4,r15 802a440: d9 60 00 00 call r11
); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) {
802a444: 2b 85 00 48 lw r5,(sp+72)
(*print)( context, "\n" );
802a448: ba 40 10 00 mv r2,r18
struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
802a44c: b9 c0 18 00 mv r3,r14 802a450: ba c0 08 00 mv r1,r22
/* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" );
802a454: 38 42 7f 20 ori r2,r2,0x7f20
); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 802a458: 5c b1 00 04 bne r5,r17,802a468 <rtems_rate_monotonic_report_statistics_with_plugin+0x148> (*print)( context, "\n" );
802a45c: b9 80 08 00 mv r1,r12 802a460: d9 60 00 00 call r11
continue;
802a464: e0 00 00 31 bi 802a528 <rtems_rate_monotonic_report_statistics_with_plugin+0x208>
struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
802a468: b8 a0 10 00 mv r2,r5 802a46c: f8 00 07 9a calli 802c2d4 <_Timespec_Divide_by_integer>
(*print)( context,
802a470: 2b 81 00 54 lw r1,(sp+84) 802a474: 34 02 03 e8 mvi r2,1000 802a478: f8 00 d8 3c calli 8060568 <__divsi3> 802a47c: b8 20 d8 00 mv fp,r1 802a480: 2b 81 00 5c lw r1,(sp+92) 802a484: 34 02 03 e8 mvi r2,1000 802a488: f8 00 d8 38 calli 8060568 <__divsi3> 802a48c: b8 20 88 00 mv r17,r1 802a490: 2b 81 00 9c lw r1,(sp+156) 802a494: 34 02 03 e8 mvi r2,1000 802a498: f8 00 d8 34 calli 8060568 <__divsi3> 802a49c: 2b 85 00 58 lw r5,(sp+88) 802a4a0: 2b 87 00 98 lw r7,(sp+152) 802a4a4: 2b 83 00 50 lw r3,(sp+80) 802a4a8: ba a0 10 00 mv r2,r21 802a4ac: b8 20 40 00 mv r8,r1 802a4b0: bb 60 20 00 mv r4,fp 802a4b4: ba 20 30 00 mv r6,r17 802a4b8: 38 42 68 88 ori r2,r2,0x6888 802a4bc: b9 80 08 00 mv r1,r12 802a4c0: d9 60 00 00 call r11
struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
802a4c4: 2b 82 00 48 lw r2,(sp+72) 802a4c8: b9 c0 18 00 mv r3,r14 802a4cc: ba 80 08 00 mv r1,r20 802a4d0: f8 00 07 81 calli 802c2d4 <_Timespec_Divide_by_integer>
(*print)( context,
802a4d4: 2b 81 00 6c lw r1,(sp+108) 802a4d8: 34 02 03 e8 mvi r2,1000 802a4dc: f8 00 d8 23 calli 8060568 <__divsi3> 802a4e0: b8 20 d8 00 mv fp,r1 802a4e4: 2b 81 00 74 lw r1,(sp+116) 802a4e8: 34 02 03 e8 mvi r2,1000 802a4ec: f8 00 d8 1f calli 8060568 <__divsi3> 802a4f0: b8 20 88 00 mv r17,r1 802a4f4: 2b 81 00 9c lw r1,(sp+156) 802a4f8: 34 02 03 e8 mvi r2,1000 802a4fc: f8 00 d8 1b calli 8060568 <__divsi3> 802a500: 2b 83 00 68 lw r3,(sp+104) 802a504: 2b 85 00 70 lw r5,(sp+112) 802a508: 2b 87 00 98 lw r7,(sp+152) 802a50c: ba 60 10 00 mv r2,r19 802a510: b8 20 40 00 mv r8,r1 802a514: bb 60 20 00 mv r4,fp 802a518: b9 80 08 00 mv r1,r12 802a51c: ba 20 30 00 mv r6,r17 802a520: 38 42 68 a8 ori r2,r2,0x68a8 802a524: d9 60 00 00 call r11
* Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) {
802a528: 35 ad 00 01 addi r13,r13,1
/* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ;
802a52c: 2a 03 00 0c lw r3,(r16+12)
id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats );
802a530: b9 a0 08 00 mv r1,r13 802a534: bb 20 10 00 mv r2,r25
/* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 802a538: 50 6d ff b1 bgeu r3,r13,802a3fc <rtems_rate_monotonic_report_statistics_with_plugin+0xdc> the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } }
802a53c: 2b 9d 00 04 lw ra,(sp+4) 802a540: 2b 8b 00 44 lw r11,(sp+68) 802a544: 2b 8c 00 40 lw r12,(sp+64) 802a548: 2b 8d 00 3c lw r13,(sp+60) 802a54c: 2b 8e 00 38 lw r14,(sp+56) 802a550: 2b 8f 00 34 lw r15,(sp+52) 802a554: 2b 90 00 30 lw r16,(sp+48) 802a558: 2b 91 00 2c lw r17,(sp+44) 802a55c: 2b 92 00 28 lw r18,(sp+40) 802a560: 2b 93 00 24 lw r19,(sp+36) 802a564: 2b 94 00 20 lw r20,(sp+32) 802a568: 2b 95 00 1c lw r21,(sp+28) 802a56c: 2b 96 00 18 lw r22,(sp+24) 802a570: 2b 97 00 14 lw r23,(sp+20) 802a574: 2b 98 00 10 lw r24,(sp+16) 802a578: 2b 99 00 0c lw r25,(sp+12) 802a57c: 2b 9b 00 08 lw fp,(sp+8) 802a580: 37 9c 00 a4 addi sp,sp,164 802a584: c3 a0 00 00 ret
08012b50 <rtems_signal_send>: rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) {
8012b50: 37 9c ff f4 addi sp,sp,-12 8012b54: 5b 8b 00 08 sw (sp+8),r11 8012b58: 5b 9d 00 04 sw (sp+4),ra
register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set )
8012b5c: 34 03 00 0a mvi r3,10
rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) {
8012b60: b8 40 58 00 mv r11,r2
register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 8012b64: 44 40 00 2e be r2,r0,8012c1c <rtems_signal_send+0xcc> return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location );
8012b68: 37 82 00 0c addi r2,sp,12 8012b6c: f8 00 14 0e calli 8017ba4 <_Thread_Get>
switch ( location ) {
8012b70: 2b 82 00 0c lw r2,(sp+12) 8012b74: 34 03 00 04 mvi r3,4
8012b78: 5c 40 00 29 bne r2,r0,8012c1c <rtems_signal_send+0xcc> case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
8012b7c: 28 23 01 28 lw r3,(r1+296)
asr = &api->Signal;
8012b80: 28 64 00 0c lw r4,(r3+12)
8012b84: 44 82 00 24 be r4,r2,8012c14 <rtems_signal_send+0xc4> if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) {
8012b88: 40 62 00 08 lbu r2,(r3+8)
8012b8c: 44 40 00 17 be r2,r0,8012be8 <rtems_signal_send+0x98> rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level );
8012b90: 90 00 10 00 rcsr r2,IE 8012b94: 34 04 ff fe mvi r4,-2 8012b98: a0 44 20 00 and r4,r2,r4 8012b9c: d0 04 00 00 wcsr IE,r4
*signal_set |= signals;
8012ba0: 28 64 00 14 lw r4,(r3+20) 8012ba4: b8 8b 58 00 or r11,r4,r11 8012ba8: 58 6b 00 14 sw (r3+20),r11
_ISR_Enable( _level );
8012bac: d0 02 00 00 wcsr IE,r2
_ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
8012bb0: 78 02 08 03 mvhi r2,0x803 8012bb4: 38 42 fd 44 ori r2,r2,0xfd44 8012bb8: 28 42 00 00 lw r2,(r2+0)
if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true;
8012bbc: 34 03 00 01 mvi r3,1 8012bc0: 30 23 00 74 sb (r1+116),r3
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 8012bc4: 44 40 00 11 be r2,r0,8012c08 <rtems_signal_send+0xb8>
8012bc8: 78 02 08 03 mvhi r2,0x803 8012bcc: 38 42 fd 68 ori r2,r2,0xfd68 8012bd0: 28 42 00 00 lw r2,(r2+0)
8012bd4: 5c 22 00 0d bne r1,r2,8012c08 <rtems_signal_send+0xb8> <== NEVER TAKEN
_ISR_Signals_to_thread_executing = true;
8012bd8: 78 01 08 03 mvhi r1,0x803 8012bdc: 38 21 fe 00 ori r1,r1,0xfe00 8012be0: 30 23 00 00 sb (r1+0),r3 8012be4: e0 00 00 09 bi 8012c08 <rtems_signal_send+0xb8>
rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level );
8012be8: 90 00 08 00 rcsr r1,IE 8012bec: 34 02 ff fe mvi r2,-2 8012bf0: a0 22 10 00 and r2,r1,r2 8012bf4: d0 02 00 00 wcsr IE,r2
*signal_set |= signals;
8012bf8: 28 62 00 18 lw r2,(r3+24) 8012bfc: b8 4b 58 00 or r11,r2,r11 8012c00: 58 6b 00 18 sw (r3+24),r11
_ISR_Enable( _level );
8012c04: d0 01 00 00 wcsr IE,r1
} else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch();
8012c08: f8 00 13 c7 calli 8017b24 <_Thread_Enable_dispatch> 8012c0c: 34 03 00 00 mvi r3,0
return RTEMS_SUCCESSFUL;
8012c10: e0 00 00 03 bi 8012c1c <rtems_signal_send+0xcc>
} _Thread_Enable_dispatch();
8012c14: f8 00 13 c4 calli 8017b24 <_Thread_Enable_dispatch> 8012c18: 34 03 00 0b mvi r3,11
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
8012c1c: b8 60 08 00 mv r1,r3 8012c20: 2b 9d 00 04 lw ra,(sp+4) 8012c24: 2b 8b 00 08 lw r11,(sp+8) 8012c28: 37 9c 00 0c addi sp,sp,12 8012c2c: c3 a0 00 00 ret
08004060 <rtems_stack_checker_begin_extension>: * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) {
8004060: 37 9c ff fc addi sp,sp,-4 8004064: 5b 9d 00 04 sw (sp+4),ra
Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */
8004068: 28 22 00 08 lw r2,(r1+8)
800406c: 44 40 00 07 be r2,r0,8004088 <rtems_stack_checker_begin_extension+0x28><== NEVER TAKEN
return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern;
8004070: 28 21 00 c8 lw r1,(r1+200) 8004074: 78 02 08 07 mvhi r2,0x807 8004078: 38 42 0e f8 ori r2,r2,0xef8 800407c: 34 21 00 08 addi r1,r1,8 8004080: 34 03 00 10 mvi r3,16 8004084: f8 01 0e 64 calli 8047a14 <memcpy>
}
8004088: 2b 9d 00 04 lw ra,(sp+4) 800408c: 37 9c 00 04 addi sp,sp,4 8004090: c3 a0 00 00 ret
080045d8 <rtems_stack_checker_create_extension>: */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) {
80045d8: 37 9c ff f8 addi sp,sp,-8 80045dc: 5b 8b 00 08 sw (sp+8),r11 80045e0: 5b 9d 00 04 sw (sp+4),ra 80045e4: b8 40 58 00 mv r11,r2
Stack_check_Initialize();
80045e8: fb ff ff c8 calli 8004508 <Stack_check_Initialize>
if (the_thread)
80045ec: 45 60 00 05 be r11,r0,8004600 <rtems_stack_checker_create_extension+0x28><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
80045f0: 29 63 00 c4 lw r3,(r11+196) 80045f4: 29 61 00 c8 lw r1,(r11+200) 80045f8: 34 02 00 a5 mvi r2,165 80045fc: f8 01 0d d0 calli 8047d3c <memset>
return true; }
8004600: 34 01 00 01 mvi r1,1 8004604: 2b 9d 00 04 lw ra,(sp+4) 8004608: 2b 8b 00 08 lw r11,(sp+8) 800460c: 37 9c 00 08 addi sp,sp,8 8004610: c3 a0 00 00 ret
080043ec <rtems_stack_checker_is_blown>: /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) {
80043ec: 37 9c ff f4 addi sp,sp,-12 80043f0: 5b 9b 00 08 sw (sp+8),fp 80043f4: 34 1b 00 0c mvi fp,12 80043f8: b7 7c d8 00 add fp,fp,sp 80043fc: 5b 8b 00 0c sw (sp+12),r11 8004400: 5b 9d 00 04 sw (sp+4),ra
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
8004404: 78 01 08 07 mvhi r1,0x807 8004408: 38 21 11 60 ori r1,r1,0x1160 800440c: 28 22 00 00 lw r2,(r1+0)
) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) {
8004410: 28 41 00 c8 lw r1,(r2+200)
8004414: 53 61 00 03 bgeu fp,r1,8004420 <rtems_stack_checker_is_blown+0x34><== ALWAYS TAKEN
8004418: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 800441c: e0 00 00 04 bi 800442c <rtems_stack_checker_is_blown+0x40> <== NOT EXECUTED
} /* * Check if blown */ bool rtems_stack_checker_is_blown( void )
8004420: 28 4b 00 c4 lw r11,(r2+196) 8004424: b4 2b 58 00 add r11,r1,r11 8004428: f1 7b 58 00 cmpgeu r11,r11,fp
/* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) {
800442c: 78 02 08 06 mvhi r2,0x806 8004430: 38 42 e5 24 ori r2,r2,0xe524 8004434: 28 43 00 00 lw r3,(r2+0) 8004438: 34 02 00 01 mvi r2,1
800443c: 44 60 00 07 be r3,r0,8004458 <rtems_stack_checker_is_blown+0x6c><== NEVER TAKEN
pattern_ok = (!memcmp(
8004440: 78 02 08 07 mvhi r2,0x807 8004444: 38 42 0e f8 ori r2,r2,0xef8 8004448: 34 21 00 08 addi r1,r1,8 800444c: 34 03 00 10 mvi r3,16 8004450: f8 01 0d 51 calli 8047994 <memcmp> 8004454: 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 )
8004458: 45 60 00 03 be r11,r0,8004464 <rtems_stack_checker_is_blown+0x78><== NEVER TAKEN
800445c: 34 01 00 00 mvi r1,0
8004460: 5c 41 00 06 bne r2,r1,8004478 <rtems_stack_checker_is_blown+0x8c><== ALWAYS TAKEN
return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
8004464: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 8004468: 38 21 11 60 ori r1,r1,0x1160 <== NOT EXECUTED 800446c: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8004470: fb ff ff b1 calli 8004334 <Stack_check_report_blown_task> <== NOT EXECUTED 8004474: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
return true; }
8004478: 2b 9d 00 04 lw ra,(sp+4) 800447c: 2b 8b 00 0c lw r11,(sp+12) 8004480: 2b 9b 00 08 lw fp,(sp+8) 8004484: 37 9c 00 0c addi sp,sp,12 8004488: c3 a0 00 00 ret
08004310 <rtems_stack_checker_report_usage>: void rtems_stack_checker_report_usage( void ) {
8004310: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8004314: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
8004318: 78 02 08 00 mvhi r2,0x800 <== NOT EXECUTED 800431c: 38 42 77 1c ori r2,r2,0x771c <== NOT EXECUTED 8004320: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8004324: fb ff ff d7 calli 8004280 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
}
8004328: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 800432c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8004330: c3 a0 00 00 ret <== NOT EXECUTED
08004280 <rtems_stack_checker_report_usage_with_plugin>: void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) {
8004280: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED 8004284: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED 8004288: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED 800428c: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED 8004290: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED 8004294: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
print_context = context;
8004298: 78 0b 08 06 mvhi r11,0x806 <== NOT EXECUTED
print_handler = print;
800429c: 78 0c 08 06 mvhi r12,0x806 <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) {
80042a0: b8 40 68 00 mv r13,r2 <== NOT EXECUTED
print_context = context;
80042a4: 39 6b e5 28 ori r11,r11,0xe528 <== NOT EXECUTED
print_handler = print;
80042a8: 39 8c e5 2c ori r12,r12,0xe52c <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
80042ac: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80042b0: 38 42 1c 08 ori r2,r2,0x1c08 <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context;
80042b4: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED
print_handler = print;
80042b8: 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 ) {
80042bc: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n");
80042c0: d9 a0 00 00 call r13 <== NOT EXECUTED
(*print)( context,
80042c4: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80042c8: 38 42 1c 20 ori r2,r2,0x1c20 <== NOT EXECUTED 80042cc: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED 80042d0: 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 );
80042d4: 78 01 08 00 mvhi r1,0x800 <== NOT EXECUTED 80042d8: 38 21 40 f4 ori r1,r1,0x40f4 <== NOT EXECUTED 80042dc: f8 00 16 d3 calli 8009e28 <rtems_iterate_over_all_threads> <== NOT EXECUTED
/* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1);
80042e0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80042e4: fb ff ff 84 calli 80040f4 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
print_context = NULL;
80042e8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
print_handler = NULL;
80042ec: 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;
80042f0: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED
print_handler = NULL; }
80042f4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80042f8: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED 80042fc: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED 8004300: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED 8004304: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED 8004308: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED 800430c: c3 a0 00 00 ret <== NOT EXECUTED
0800448c <rtems_stack_checker_switch_extension>: */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) {
800448c: 37 9c ff f0 addi sp,sp,-16 8004490: 5b 9b 00 08 sw (sp+8),fp 8004494: 34 1b 00 10 mvi fp,16 8004498: b7 7c d8 00 add fp,fp,sp 800449c: 5b 8b 00 10 sw (sp+16),r11 80044a0: 5b 8c 00 0c sw (sp+12),r12 80044a4: 5b 9d 00 04 sw (sp+4),ra 80044a8: 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;
80044ac: 28 21 00 c8 lw r1,(r1+200)
) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) {
80044b0: 53 61 00 03 bgeu fp,r1,80044bc <rtems_stack_checker_switch_extension+0x30><== ALWAYS TAKEN
80044b4: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 80044b8: e0 00 00 04 bi 80044c8 <rtems_stack_checker_switch_extension+0x3c><== NOT EXECUTED
} /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension(
80044bc: 29 6c 00 c4 lw r12,(r11+196) 80044c0: b4 2c 60 00 add r12,r1,r12 80044c4: f1 9b 60 00 cmpgeu r12,r12,fp
/* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern,
80044c8: 78 02 08 07 mvhi r2,0x807 80044cc: 38 42 0e f8 ori r2,r2,0xef8 80044d0: 34 21 00 08 addi r1,r1,8 80044d4: 34 03 00 10 mvi r3,16 80044d8: f8 01 0d 2f calli 8047994 <memcmp> 80044dc: 64 22 00 00 cmpei r2,r1,0
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) {
80044e0: 45 80 00 02 be r12,r0,80044e8 <rtems_stack_checker_switch_extension+0x5c><== NEVER TAKEN
80044e4: 5c 40 00 03 bne r2,r0,80044f0 <rtems_stack_checker_switch_extension+0x64> Stack_check_report_blown_task( running, pattern_ok );
80044e8: b9 60 08 00 mv r1,r11 80044ec: fb ff ff 92 calli 8004334 <Stack_check_report_blown_task>
} }
80044f0: 2b 9d 00 04 lw ra,(sp+4) 80044f4: 2b 8b 00 10 lw r11,(sp+16) 80044f8: 2b 8c 00 0c lw r12,(sp+12) 80044fc: 2b 9b 00 08 lw fp,(sp+8) 8004500: 37 9c 00 10 addi sp,sp,16 8004504: c3 a0 00 00 ret
08007e38 <rtems_string_to_double>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
8007e38: 37 9c ff e4 addi sp,sp,-28 8007e3c: 5b 8b 00 18 sw (sp+24),r11 8007e40: 5b 8c 00 14 sw (sp+20),r12 8007e44: 5b 8d 00 10 sw (sp+16),r13 8007e48: 5b 8e 00 0c sw (sp+12),r14 8007e4c: 5b 8f 00 08 sw (sp+8),r15 8007e50: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
8007e54: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
8007e58: b8 40 58 00 mv r11,r2 8007e5c: b8 20 70 00 mv r14,r1 8007e60: b8 60 78 00 mv r15,r3
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
8007e64: 34 04 00 09 mvi r4,9
8007e68: 44 4c 00 20 be r2,r12,8007ee8 <rtems_string_to_double+0xb0> return RTEMS_INVALID_ADDRESS; errno = 0;
8007e6c: f8 00 14 30 calli 800cf2c <__errno> 8007e70: 58 2c 00 00 sw (r1+0),r12
*n = 0;
8007e74: 59 6c 00 04 sw (r11+4),r12 8007e78: 59 6c 00 00 sw (r11+0),r12
#ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end );
8007e7c: b9 c0 08 00 mv r1,r14 8007e80: 37 82 00 1c addi r2,sp,28 8007e84: f8 00 20 4e calli 800ffbc <strtod> 8007e88: b8 20 60 00 mv r12,r1 8007e8c: b8 40 68 00 mv r13,r2
#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 ) 8007e90: 45 e0 00 03 be r15,r0,8007e9c <rtems_string_to_double+0x64> *endptr = end;
8007e94: 2b 81 00 1c lw r1,(sp+28) 8007e98: 59 e1 00 00 sw (r15+0),r1
/* nothing was converted */ if ( end == s )
8007e9c: 2b 81 00 1c lw r1,(sp+28) 8007ea0: 34 04 00 0b mvi r4,11
8007ea4: 44 2e 00 11 be r1,r14,8007ee8 <rtems_string_to_double+0xb0> return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE))
8007ea8: 78 03 7f ef mvhi r3,0x7fef 8007eac: 38 63 ff ff ori r3,r3,0xffff 8007eb0: b9 80 08 00 mv r1,r12 8007eb4: b9 a0 10 00 mv r2,r13 8007eb8: 34 04 ff ff mvi r4,-1 8007ebc: f8 00 4e 49 calli 801b7e0 <__gedf2>
8007ec0: 48 20 00 02 bg r1,r0,8007ec8 <rtems_string_to_double+0x90>
8007ec4: e0 00 00 06 bi 8007edc <rtems_string_to_double+0xa4> 8007ec8: f8 00 14 19 calli 800cf2c <__errno> 8007ecc: 28 22 00 00 lw r2,(r1+0) 8007ed0: 34 01 00 22 mvi r1,34 8007ed4: 34 04 00 0a mvi r4,10
8007ed8: 44 41 00 04 be r2,r1,8007ee8 <rtems_string_to_double+0xb0> <== ALWAYS TAKEN
#endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result;
8007edc: 59 6d 00 04 sw (r11+4),r13 8007ee0: 59 6c 00 00 sw (r11+0),r12 8007ee4: 34 04 00 00 mvi r4,0
#endif return RTEMS_SUCCESSFUL; }
8007ee8: b8 80 08 00 mv r1,r4 8007eec: 2b 9d 00 04 lw ra,(sp+4) 8007ef0: 2b 8b 00 18 lw r11,(sp+24) 8007ef4: 2b 8c 00 14 lw r12,(sp+20) 8007ef8: 2b 8d 00 10 lw r13,(sp+16) 8007efc: 2b 8e 00 0c lw r14,(sp+12) 8007f00: 2b 8f 00 08 lw r15,(sp+8) 8007f04: 37 9c 00 1c addi sp,sp,28 8007f08: c3 a0 00 00 ret
08007f0c <rtems_string_to_float>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
8007f0c: 37 9c ff e8 addi sp,sp,-24 8007f10: 5b 8b 00 14 sw (sp+20),r11 8007f14: 5b 8c 00 10 sw (sp+16),r12 8007f18: 5b 8d 00 0c sw (sp+12),r13 8007f1c: 5b 8e 00 08 sw (sp+8),r14 8007f20: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
8007f24: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
8007f28: b8 40 58 00 mv r11,r2 8007f2c: b8 20 68 00 mv r13,r1 8007f30: b8 60 70 00 mv r14,r3
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
8007f34: 34 04 00 09 mvi r4,9
8007f38: 44 4c 00 1b be r2,r12,8007fa4 <rtems_string_to_float+0x98> return RTEMS_INVALID_ADDRESS; errno = 0;
8007f3c: f8 00 13 fc calli 800cf2c <__errno> 8007f40: 58 2c 00 00 sw (r1+0),r12
*n = 0;
8007f44: 59 6c 00 00 sw (r11+0),r12
#ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end );
8007f48: b9 a0 08 00 mv r1,r13 8007f4c: 37 82 00 18 addi r2,sp,24 8007f50: f8 00 1f fe calli 800ff48 <strtof> 8007f54: 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 ) 8007f58: 45 c0 00 03 be r14,r0,8007f64 <rtems_string_to_float+0x58> *endptr = end;
8007f5c: 2b 81 00 18 lw r1,(sp+24) 8007f60: 59 c1 00 00 sw (r14+0),r1
/* nothing was converted */ if ( end == s )
8007f64: 2b 81 00 18 lw r1,(sp+24) 8007f68: 34 04 00 0b mvi r4,11
8007f6c: 44 2d 00 0e be r1,r13,8007fa4 <rtems_string_to_float+0x98> return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE))
8007f70: 78 02 7f 7f mvhi r2,0x7f7f 8007f74: 38 42 ff ff ori r2,r2,0xffff 8007f78: b9 80 08 00 mv r1,r12 8007f7c: f8 00 47 d8 calli 8019edc <__gesf2>
8007f80: 48 20 00 02 bg r1,r0,8007f88 <rtems_string_to_float+0x7c>
8007f84: e0 00 00 06 bi 8007f9c <rtems_string_to_float+0x90> 8007f88: f8 00 13 e9 calli 800cf2c <__errno> 8007f8c: 28 22 00 00 lw r2,(r1+0) 8007f90: 34 01 00 22 mvi r1,34 8007f94: 34 04 00 0a mvi r4,10
8007f98: 44 41 00 03 be r2,r1,8007fa4 <rtems_string_to_float+0x98> <== ALWAYS TAKEN
#endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result;
8007f9c: 59 6c 00 00 sw (r11+0),r12 8007fa0: 34 04 00 00 mvi r4,0
#endif return RTEMS_SUCCESSFUL; }
8007fa4: b8 80 08 00 mv r1,r4 8007fa8: 2b 9d 00 04 lw ra,(sp+4) 8007fac: 2b 8b 00 14 lw r11,(sp+20) 8007fb0: 2b 8c 00 10 lw r12,(sp+16) 8007fb4: 2b 8d 00 0c lw r13,(sp+12) 8007fb8: 2b 8e 00 08 lw r14,(sp+8) 8007fbc: 37 9c 00 18 addi sp,sp,24 8007fc0: c3 a0 00 00 ret
0801b958 <rtems_string_to_int>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
801b958: 37 9c ff e4 addi sp,sp,-28 801b95c: 5b 8b 00 18 sw (sp+24),r11 801b960: 5b 8c 00 14 sw (sp+20),r12 801b964: 5b 8d 00 10 sw (sp+16),r13 801b968: 5b 8e 00 0c sw (sp+12),r14 801b96c: 5b 8f 00 08 sw (sp+8),r15 801b970: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
801b974: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
801b978: b8 40 58 00 mv r11,r2 801b97c: b8 20 68 00 mv r13,r1 801b980: b8 60 70 00 mv r14,r3 801b984: b8 80 78 00 mv r15,r4
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
801b988: 34 05 00 09 mvi r5,9
801b98c: 44 4c 00 19 be r2,r12,801b9f0 <rtems_string_to_int+0x98> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS; errno = 0;
801b990: f8 00 a1 7e calli 8043f88 <__errno> 801b994: 58 2c 00 00 sw (r1+0),r12
*n = 0;
801b998: 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 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base );
801b99c: b9 e0 18 00 mv r3,r15 801b9a0: b9 a0 08 00 mv r1,r13 801b9a4: 37 82 00 1c addi r2,sp,28 801b9a8: f8 00 c3 3b calli 804c694 <strtol> 801b9ac: b8 20 60 00 mv r12,r1
#endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 801b9b0: 45 c0 00 03 be r14,r0,801b9bc <rtems_string_to_int+0x64> *endptr = end;
801b9b4: 2b 81 00 1c lw r1,(sp+28) 801b9b8: 59 c1 00 00 sw (r14+0),r1
/* nothing was converted */ if ( end == s )
801b9bc: 2b 81 00 1c lw r1,(sp+28) 801b9c0: 34 05 00 0b mvi r5,11
801b9c4: 44 2d 00 0b be r1,r13,801b9f0 <rtems_string_to_int+0x98> return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE))
801b9c8: 78 02 7f ff mvhi r2,0x7fff 801b9cc: 38 42 ff ff ori r2,r2,0xffff
801b9d0: 5d 82 00 06 bne r12,r2,801b9e8 <rtems_string_to_int+0x90>
801b9d4: f8 00 a1 6d calli 8043f88 <__errno> 801b9d8: 28 22 00 00 lw r2,(r1+0) 801b9dc: 34 01 00 22 mvi r1,34 801b9e0: 34 05 00 0a mvi r5,10
801b9e4: 44 41 00 03 be r2,r1,801b9f0 <rtems_string_to_int+0x98> <== ALWAYS TAKEN
#endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result;
801b9e8: 59 6c 00 00 sw (r11+0),r12 801b9ec: 34 05 00 00 mvi r5,0
#endif return RTEMS_SUCCESSFUL; }
801b9f0: b8 a0 08 00 mv r1,r5 801b9f4: 2b 9d 00 04 lw ra,(sp+4) 801b9f8: 2b 8b 00 18 lw r11,(sp+24) 801b9fc: 2b 8c 00 14 lw r12,(sp+20) 801ba00: 2b 8d 00 10 lw r13,(sp+16) 801ba04: 2b 8e 00 0c lw r14,(sp+12) 801ba08: 2b 8f 00 08 lw r15,(sp+8) 801ba0c: 37 9c 00 1c addi sp,sp,28 801ba10: c3 a0 00 00 ret
08008160 <rtems_string_to_long>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
8008160: 37 9c ff e4 addi sp,sp,-28 8008164: 5b 8b 00 18 sw (sp+24),r11 8008168: 5b 8c 00 14 sw (sp+20),r12 800816c: 5b 8d 00 10 sw (sp+16),r13 8008170: 5b 8e 00 0c sw (sp+12),r14 8008174: 5b 8f 00 08 sw (sp+8),r15 8008178: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
800817c: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
8008180: b8 40 58 00 mv r11,r2 8008184: b8 20 68 00 mv r13,r1 8008188: b8 60 70 00 mv r14,r3 800818c: b8 80 78 00 mv r15,r4
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
8008190: 34 05 00 09 mvi r5,9
8008194: 44 4c 00 1c be r2,r12,8008204 <rtems_string_to_long+0xa4> return RTEMS_INVALID_ADDRESS; errno = 0;
8008198: f8 00 13 65 calli 800cf2c <__errno> 800819c: 58 2c 00 00 sw (r1+0),r12
*n = 0;
80081a0: 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 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base );
80081a4: b9 e0 18 00 mv r3,r15 80081a8: b9 a0 08 00 mv r1,r13 80081ac: 37 82 00 1c addi r2,sp,28 80081b0: f8 00 20 26 calli 8010248 <strtol> 80081b4: b8 20 60 00 mv r12,r1
#endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 80081b8: 45 c0 00 03 be r14,r0,80081c4 <rtems_string_to_long+0x64> *endptr = end;
80081bc: 2b 81 00 1c lw r1,(sp+28) 80081c0: 59 c1 00 00 sw (r14+0),r1
/* nothing was converted */ if ( end == s )
80081c4: 2b 81 00 1c lw r1,(sp+28) 80081c8: 34 05 00 0b mvi r5,11
80081cc: 44 2d 00 0e be r1,r13,8008204 <rtems_string_to_long+0xa4> return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE))
80081d0: 78 01 7f ff mvhi r1,0x7fff 80081d4: 38 21 ff ff ori r1,r1,0xffff
80081d8: 45 81 00 04 be r12,r1,80081e8 <rtems_string_to_long+0x88> return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE))
80081dc: 78 01 80 00 mvhi r1,0x8000 80081e0: 38 21 00 00 ori r1,r1,0x0
80081e4: 5d 81 00 06 bne r12,r1,80081fc <rtems_string_to_long+0x9c>
80081e8: f8 00 13 51 calli 800cf2c <__errno> 80081ec: 28 22 00 00 lw r2,(r1+0) 80081f0: 34 01 00 22 mvi r1,34
#if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL;
80081f4: 34 05 00 0a mvi r5,10
return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE))
80081f8: 44 41 00 03 be r2,r1,8008204 <rtems_string_to_long+0xa4> <== ALWAYS TAKEN
#endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result;
80081fc: 59 6c 00 00 sw (r11+0),r12 8008200: 34 05 00 00 mvi r5,0
#endif return RTEMS_SUCCESSFUL; }
8008204: b8 a0 08 00 mv r1,r5 8008208: 2b 9d 00 04 lw ra,(sp+4) 800820c: 2b 8b 00 18 lw r11,(sp+24) 8008210: 2b 8c 00 14 lw r12,(sp+20) 8008214: 2b 8d 00 10 lw r13,(sp+16) 8008218: 2b 8e 00 0c lw r14,(sp+12) 800821c: 2b 8f 00 08 lw r15,(sp+8) 8008220: 37 9c 00 1c addi sp,sp,28 8008224: c3 a0 00 00 ret
08008080 <rtems_string_to_long_long>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
8008080: 37 9c ff e4 addi sp,sp,-28 8008084: 5b 8b 00 18 sw (sp+24),r11 8008088: 5b 8c 00 14 sw (sp+20),r12 800808c: 5b 8d 00 10 sw (sp+16),r13 8008090: 5b 8e 00 0c sw (sp+12),r14 8008094: 5b 8f 00 08 sw (sp+8),r15 8008098: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
800809c: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
80080a0: b8 40 58 00 mv r11,r2 80080a4: b8 20 70 00 mv r14,r1 80080a8: b8 60 78 00 mv r15,r3 80080ac: b8 80 68 00 mv r13,r4
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
80080b0: 34 05 00 09 mvi r5,9
80080b4: 44 4c 00 22 be r2,r12,800813c <rtems_string_to_long_long+0xbc> return RTEMS_INVALID_ADDRESS; errno = 0;
80080b8: f8 00 13 9d calli 800cf2c <__errno> 80080bc: 58 2c 00 00 sw (r1+0),r12
*n = 0;
80080c0: 59 6c 00 04 sw (r11+4),r12 80080c4: 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 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base );
80080c8: b9 a0 18 00 mv r3,r13 80080cc: b9 c0 08 00 mv r1,r14 80080d0: 37 82 00 1c addi r2,sp,28 80080d4: f8 00 20 6b calli 8010280 <strtoll> 80080d8: b8 20 60 00 mv r12,r1 80080dc: b8 40 68 00 mv r13,r2
#endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 80080e0: 45 e0 00 03 be r15,r0,80080ec <rtems_string_to_long_long+0x6c> *endptr = end;
80080e4: 2b 81 00 1c lw r1,(sp+28) 80080e8: 59 e1 00 00 sw (r15+0),r1
/* nothing was converted */ if ( end == s )
80080ec: 2b 81 00 1c lw r1,(sp+28) 80080f0: 34 05 00 0b mvi r5,11
80080f4: 44 2e 00 12 be r1,r14,800813c <rtems_string_to_long_long+0xbc> return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE))
80080f8: 78 01 7f ff mvhi r1,0x7fff 80080fc: 38 21 ff ff ori r1,r1,0xffff
8008100: 5d 81 00 03 bne r12,r1,800810c <rtems_string_to_long_long+0x8c>
8008104: 34 01 ff ff mvi r1,-1
8008108: 45 a1 00 05 be r13,r1,800811c <rtems_string_to_long_long+0x9c><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE))
800810c: 78 01 80 00 mvhi r1,0x8000 8008110: 38 21 00 00 ori r1,r1,0x0
8008114: 5d 81 00 07 bne r12,r1,8008130 <rtems_string_to_long_long+0xb0>
8008118: 5d a0 00 06 bne r13,r0,8008130 <rtems_string_to_long_long+0xb0><== NEVER TAKEN
800811c: f8 00 13 84 calli 800cf2c <__errno> 8008120: 28 22 00 00 lw r2,(r1+0) 8008124: 34 01 00 22 mvi r1,34
#if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL;
8008128: 34 05 00 0a mvi r5,10
return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE))
800812c: 44 41 00 04 be r2,r1,800813c <rtems_string_to_long_long+0xbc><== ALWAYS TAKEN
#endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result;
8008130: 59 6d 00 04 sw (r11+4),r13 8008134: 59 6c 00 00 sw (r11+0),r12 8008138: 34 05 00 00 mvi r5,0
#endif return RTEMS_SUCCESSFUL; }
800813c: b8 a0 08 00 mv r1,r5 8008140: 2b 9d 00 04 lw ra,(sp+4) 8008144: 2b 8b 00 18 lw r11,(sp+24) 8008148: 2b 8c 00 14 lw r12,(sp+20) 800814c: 2b 8d 00 10 lw r13,(sp+16) 8008150: 2b 8e 00 0c lw r14,(sp+12) 8008154: 2b 8f 00 08 lw r15,(sp+8) 8008158: 37 9c 00 1c addi sp,sp,28 800815c: c3 a0 00 00 ret
0801ba14 <rtems_string_to_pointer>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
801ba14: 37 9c ff e8 addi sp,sp,-24 801ba18: 5b 8b 00 14 sw (sp+20),r11 801ba1c: 5b 8c 00 10 sw (sp+16),r12 801ba20: 5b 8d 00 0c sw (sp+12),r13 801ba24: 5b 8e 00 08 sw (sp+8),r14 801ba28: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
801ba2c: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
801ba30: b8 40 58 00 mv r11,r2 801ba34: b8 20 68 00 mv r13,r1 801ba38: b8 60 70 00 mv r14,r3
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
801ba3c: 34 04 00 09 mvi r4,9
801ba40: 44 4c 00 18 be r2,r12,801baa0 <rtems_string_to_pointer+0x8c> return RTEMS_INVALID_ADDRESS; errno = 0;
801ba44: f8 00 a1 51 calli 8043f88 <__errno> 801ba48: 58 2c 00 00 sw (r1+0),r12
*n = 0;
801ba4c: 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 );
801ba50: b9 a0 08 00 mv r1,r13 801ba54: 37 82 00 18 addi r2,sp,24 801ba58: 34 03 00 10 mvi r3,16 801ba5c: f8 00 c4 7c calli 804cc4c <strtoul> 801ba60: 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 ) 801ba64: 45 c0 00 03 be r14,r0,801ba70 <rtems_string_to_pointer+0x5c> *endptr = end;
801ba68: 2b 81 00 18 lw r1,(sp+24) 801ba6c: 59 c1 00 00 sw (r14+0),r1
/* nothing was converted */ if ( end == s )
801ba70: 2b 81 00 18 lw r1,(sp+24) 801ba74: 34 04 00 0b mvi r4,11
801ba78: 44 2d 00 0a be r1,r13,801baa0 <rtems_string_to_pointer+0x8c> return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE))
801ba7c: 34 01 ff ff mvi r1,-1
801ba80: 5d 81 00 06 bne r12,r1,801ba98 <rtems_string_to_pointer+0x84><== ALWAYS TAKEN
801ba84: f8 00 a1 41 calli 8043f88 <__errno> <== NOT EXECUTED 801ba88: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 801ba8c: 34 01 00 22 mvi r1,34 <== NOT EXECUTED 801ba90: 34 04 00 0a mvi r4,10 <== NOT EXECUTED 801ba94: 44 41 00 03 be r2,r1,801baa0 <rtems_string_to_pointer+0x8c><== NOT EXECUTED
if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result;
801ba98: 59 6c 00 00 sw (r11+0),r12 801ba9c: 34 04 00 00 mvi r4,0
#else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
801baa0: b8 80 08 00 mv r1,r4 801baa4: 2b 9d 00 04 lw ra,(sp+4) 801baa8: 2b 8b 00 14 lw r11,(sp+20) 801baac: 2b 8c 00 10 lw r12,(sp+16) 801bab0: 2b 8d 00 0c lw r13,(sp+12) 801bab4: 2b 8e 00 08 lw r14,(sp+8) 801bab8: 37 9c 00 18 addi sp,sp,24 801babc: c3 a0 00 00 ret
08008370 <rtems_string_to_unsigned_int>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
8008370: 37 9c ff e4 addi sp,sp,-28 8008374: 5b 8b 00 18 sw (sp+24),r11 8008378: 5b 8c 00 14 sw (sp+20),r12 800837c: 5b 8d 00 10 sw (sp+16),r13 8008380: 5b 8e 00 0c sw (sp+12),r14 8008384: 5b 8f 00 08 sw (sp+8),r15 8008388: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
800838c: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
8008390: b8 40 58 00 mv r11,r2 8008394: b8 20 68 00 mv r13,r1 8008398: b8 60 70 00 mv r14,r3 800839c: b8 80 78 00 mv r15,r4
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
80083a0: 34 05 00 09 mvi r5,9
80083a4: 44 4c 00 18 be r2,r12,8008404 <rtems_string_to_unsigned_int+0x94> return RTEMS_INVALID_ADDRESS; errno = 0;
80083a8: f8 00 12 e1 calli 800cf2c <__errno> 80083ac: 58 2c 00 00 sw (r1+0),r12
*n = 0;
80083b0: 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 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base );
80083b4: b9 e0 18 00 mv r3,r15 80083b8: b9 a0 08 00 mv r1,r13 80083bc: 37 82 00 1c addi r2,sp,28 80083c0: f8 00 21 10 calli 8010800 <strtoul> 80083c4: b8 20 60 00 mv r12,r1
#endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 80083c8: 45 c0 00 03 be r14,r0,80083d4 <rtems_string_to_unsigned_int+0x64> *endptr = end;
80083cc: 2b 81 00 1c lw r1,(sp+28) 80083d0: 59 c1 00 00 sw (r14+0),r1
/* nothing was converted */ if ( end == s )
80083d4: 2b 81 00 1c lw r1,(sp+28) 80083d8: 34 05 00 0b mvi r5,11
80083dc: 44 2d 00 0a be r1,r13,8008404 <rtems_string_to_unsigned_int+0x94> return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE))
80083e0: 34 01 ff ff mvi r1,-1
80083e4: 5d 81 00 06 bne r12,r1,80083fc <rtems_string_to_unsigned_int+0x8c>
80083e8: f8 00 12 d1 calli 800cf2c <__errno> 80083ec: 28 22 00 00 lw r2,(r1+0) 80083f0: 34 01 00 22 mvi r1,34 80083f4: 34 05 00 0a mvi r5,10
80083f8: 44 41 00 03 be r2,r1,8008404 <rtems_string_to_unsigned_int+0x94><== ALWAYS TAKEN
#endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result;
80083fc: 59 6c 00 00 sw (r11+0),r12 8008400: 34 05 00 00 mvi r5,0
#endif return RTEMS_SUCCESSFUL; }
8008404: b8 a0 08 00 mv r1,r5 8008408: 2b 9d 00 04 lw ra,(sp+4) 800840c: 2b 8b 00 18 lw r11,(sp+24) 8008410: 2b 8c 00 14 lw r12,(sp+20) 8008414: 2b 8d 00 10 lw r13,(sp+16) 8008418: 2b 8e 00 0c lw r14,(sp+12) 800841c: 2b 8f 00 08 lw r15,(sp+8) 8008420: 37 9c 00 1c addi sp,sp,28 8008424: c3 a0 00 00 ret
0801bb5c <rtems_string_to_unsigned_long>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
801bb5c: 37 9c ff e4 addi sp,sp,-28 801bb60: 5b 8b 00 18 sw (sp+24),r11 801bb64: 5b 8c 00 14 sw (sp+20),r12 801bb68: 5b 8d 00 10 sw (sp+16),r13 801bb6c: 5b 8e 00 0c sw (sp+12),r14 801bb70: 5b 8f 00 08 sw (sp+8),r15 801bb74: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
801bb78: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
801bb7c: b8 40 58 00 mv r11,r2 801bb80: b8 20 68 00 mv r13,r1 801bb84: b8 60 70 00 mv r14,r3 801bb88: b8 80 78 00 mv r15,r4
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
801bb8c: 34 05 00 09 mvi r5,9
801bb90: 44 4c 00 18 be r2,r12,801bbf0 <rtems_string_to_unsigned_long+0x94> return RTEMS_INVALID_ADDRESS; errno = 0;
801bb94: f8 00 a0 fd calli 8043f88 <__errno> 801bb98: 58 2c 00 00 sw (r1+0),r12
*n = 0;
801bb9c: 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 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base );
801bba0: b9 e0 18 00 mv r3,r15 801bba4: b9 a0 08 00 mv r1,r13 801bba8: 37 82 00 1c addi r2,sp,28 801bbac: f8 00 c4 28 calli 804cc4c <strtoul> 801bbb0: b8 20 60 00 mv r12,r1
#endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 801bbb4: 45 c0 00 03 be r14,r0,801bbc0 <rtems_string_to_unsigned_long+0x64> *endptr = end;
801bbb8: 2b 81 00 1c lw r1,(sp+28) 801bbbc: 59 c1 00 00 sw (r14+0),r1
/* nothing was converted */ if ( end == s )
801bbc0: 2b 81 00 1c lw r1,(sp+28) 801bbc4: 34 05 00 0b mvi r5,11
801bbc8: 44 2d 00 0a be r1,r13,801bbf0 <rtems_string_to_unsigned_long+0x94> return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE))
801bbcc: 34 01 ff ff mvi r1,-1
801bbd0: 5d 81 00 06 bne r12,r1,801bbe8 <rtems_string_to_unsigned_long+0x8c>
801bbd4: f8 00 a0 ed calli 8043f88 <__errno> 801bbd8: 28 22 00 00 lw r2,(r1+0) 801bbdc: 34 01 00 22 mvi r1,34 801bbe0: 34 05 00 0a mvi r5,10
801bbe4: 44 41 00 03 be r2,r1,801bbf0 <rtems_string_to_unsigned_long+0x94><== ALWAYS TAKEN
#endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result;
801bbe8: 59 6c 00 00 sw (r11+0),r12 801bbec: 34 05 00 00 mvi r5,0
#endif return RTEMS_SUCCESSFUL; }
801bbf0: b8 a0 08 00 mv r1,r5 801bbf4: 2b 9d 00 04 lw ra,(sp+4) 801bbf8: 2b 8b 00 18 lw r11,(sp+24) 801bbfc: 2b 8c 00 14 lw r12,(sp+20) 801bc00: 2b 8d 00 10 lw r13,(sp+16) 801bc04: 2b 8e 00 0c lw r14,(sp+12) 801bc08: 2b 8f 00 08 lw r15,(sp+8) 801bc0c: 37 9c 00 1c addi sp,sp,28 801bc10: c3 a0 00 00 ret
08008428 <rtems_string_to_unsigned_long_long>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
8008428: 37 9c ff e4 addi sp,sp,-28 800842c: 5b 8b 00 18 sw (sp+24),r11 8008430: 5b 8c 00 14 sw (sp+20),r12 8008434: 5b 8d 00 10 sw (sp+16),r13 8008438: 5b 8e 00 0c sw (sp+12),r14 800843c: 5b 8f 00 08 sw (sp+8),r15 8008440: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
8008444: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
8008448: b8 40 58 00 mv r11,r2 800844c: b8 20 70 00 mv r14,r1 8008450: b8 60 78 00 mv r15,r3 8008454: b8 80 68 00 mv r13,r4
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
8008458: 34 05 00 09 mvi r5,9
800845c: 44 4c 00 1c be r2,r12,80084cc <rtems_string_to_unsigned_long_long+0xa4> return RTEMS_INVALID_ADDRESS; errno = 0;
8008460: f8 00 12 b3 calli 800cf2c <__errno> 8008464: 58 2c 00 00 sw (r1+0),r12
*n = 0;
8008468: 59 6c 00 04 sw (r11+4),r12 800846c: 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 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base );
8008470: b9 a0 18 00 mv r3,r13 8008474: b9 c0 08 00 mv r1,r14 8008478: 37 82 00 1c addi r2,sp,28 800847c: f8 00 20 ef calli 8010838 <strtoull> 8008480: b8 20 60 00 mv r12,r1 8008484: b8 40 68 00 mv r13,r2
#endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 8008488: 45 e0 00 03 be r15,r0,8008494 <rtems_string_to_unsigned_long_long+0x6c> *endptr = end;
800848c: 2b 81 00 1c lw r1,(sp+28) 8008490: 59 e1 00 00 sw (r15+0),r1
/* nothing was converted */ if ( end == s )
8008494: 2b 81 00 1c lw r1,(sp+28) 8008498: 34 05 00 0b mvi r5,11
800849c: 44 2e 00 0c be r1,r14,80084cc <rtems_string_to_unsigned_long_long+0xa4> return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE))
80084a0: 34 01 ff ff mvi r1,-1
80084a4: 5d 81 00 07 bne r12,r1,80084c0 <rtems_string_to_unsigned_long_long+0x98>
80084a8: 5d ac 00 06 bne r13,r12,80084c0 <rtems_string_to_unsigned_long_long+0x98><== NEVER TAKEN
80084ac: f8 00 12 a0 calli 800cf2c <__errno> 80084b0: 28 22 00 00 lw r2,(r1+0) 80084b4: 34 01 00 22 mvi r1,34 80084b8: 34 05 00 0a mvi r5,10
80084bc: 44 41 00 04 be r2,r1,80084cc <rtems_string_to_unsigned_long_long+0xa4><== ALWAYS TAKEN
#endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result;
80084c0: 59 6d 00 04 sw (r11+4),r13 80084c4: 59 6c 00 00 sw (r11+0),r12 80084c8: 34 05 00 00 mvi r5,0
#endif return RTEMS_SUCCESSFUL; }
80084cc: b8 a0 08 00 mv r1,r5 80084d0: 2b 9d 00 04 lw ra,(sp+4) 80084d4: 2b 8b 00 18 lw r11,(sp+24) 80084d8: 2b 8c 00 14 lw r12,(sp+20) 80084dc: 2b 8d 00 10 lw r13,(sp+16) 80084e0: 2b 8e 00 0c lw r14,(sp+12) 80084e4: 2b 8f 00 08 lw r15,(sp+8) 80084e8: 37 9c 00 1c addi sp,sp,28 80084ec: c3 a0 00 00 ret
0800b230 <rtems_task_mode>: rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) {
800b230: 37 9c ff e0 addi sp,sp,-32 800b234: 5b 8b 00 20 sw (sp+32),r11 800b238: 5b 8c 00 1c sw (sp+28),r12 800b23c: 5b 8d 00 18 sw (sp+24),r13 800b240: 5b 8e 00 14 sw (sp+20),r14 800b244: 5b 8f 00 10 sw (sp+16),r15 800b248: 5b 90 00 0c sw (sp+12),r16 800b24c: 5b 91 00 08 sw (sp+8),r17 800b250: 5b 9d 00 04 sw (sp+4),ra
ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set )
800b254: 34 04 00 09 mvi r4,9
rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) {
800b258: b8 60 80 00 mv r16,r3 800b25c: b8 20 68 00 mv r13,r1 800b260: b8 40 70 00 mv r14,r2
ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 800b264: 44 60 00 51 be r3,r0,800b3a8 <rtems_task_mode+0x178> return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing;
800b268: 78 01 08 01 mvhi r1,0x801 800b26c: 38 21 d9 60 ori r1,r1,0xd960 800b270: 28 2b 00 00 lw r11,(r1+0)
api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
800b274: 34 0f 00 00 mvi r15,0 800b278: 41 61 00 75 lbu r1,(r11+117)
if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ];
800b27c: 29 6c 01 28 lw r12,(r11+296)
asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 800b280: 5c 2f 00 02 bne r1,r15,800b288 <rtems_task_mode+0x58>
800b284: 34 0f 01 00 mvi r15,256
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
800b288: 29 61 00 7c lw r1,(r11+124)
800b28c: 44 20 00 02 be r1,r0,800b294 <rtems_task_mode+0x64> old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE;
800b290: 39 ef 02 00 ori r15,r15,0x200
if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal;
800b294: 41 81 00 08 lbu r1,(r12+8) 800b298: 34 11 00 00 mvi r17,0
800b29c: 5c 31 00 02 bne r1,r17,800b2a4 <rtems_task_mode+0x74>
800b2a0: 34 11 04 00 mvi r17,1024
old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level();
800b2a4: fb ff ea 5f calli 8005c20 <_CPU_ISR_Get_level>
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
800b2a8: ba 21 88 00 or r17,r17,r1
old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode;
800b2ac: ba 2f 88 00 or r17,r17,r15 800b2b0: 5a 11 00 00 sw (r16+0),r17
/* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK )
800b2b4: 21 c1 01 00 andi r1,r14,0x100
800b2b8: 44 20 00 07 be r1,r0,800b2d4 <rtems_task_mode+0xa4> executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
800b2bc: b9 a0 08 00 mv r1,r13 800b2c0: 34 02 00 08 mvi r2,8 800b2c4: fb ff d3 f3 calli 8000290 <__lshrsi3> 800b2c8: 18 21 00 01 xori r1,r1,0x1 800b2cc: 20 21 00 01 andi r1,r1,0x1 800b2d0: 31 61 00 75 sb (r11+117),r1
if ( mask & RTEMS_TIMESLICE_MASK ) {
800b2d4: 21 c1 02 00 andi r1,r14,0x200
800b2d8: 44 20 00 0b be r1,r0,800b304 <rtems_task_mode+0xd4> if ( _Modes_Is_timeslice(mode_set) ) {
800b2dc: 21 a1 02 00 andi r1,r13,0x200
800b2e0: 44 20 00 08 be r1,r0,800b300 <rtems_task_mode+0xd0> executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
800b2e4: 78 01 08 01 mvhi r1,0x801 800b2e8: 38 21 d8 34 ori r1,r1,0xd834 800b2ec: 28 21 00 00 lw r1,(r1+0)
if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
800b2f0: 34 02 00 01 mvi r2,1 800b2f4: 59 62 00 7c sw (r11+124),r2
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
800b2f8: 59 61 00 78 sw (r11+120),r1 800b2fc: e0 00 00 02 bi 800b304 <rtems_task_mode+0xd4>
} else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
800b300: 59 61 00 7c sw (r11+124),r1
/* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK )
800b304: 21 c1 00 01 andi r1,r14,0x1
800b308: 44 20 00 04 be r1,r0,800b318 <rtems_task_mode+0xe8> */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
800b30c: 19 a1 00 01 xori r1,r13,0x1 800b310: 20 21 00 01 andi r1,r1,0x1 800b314: d0 01 00 00 wcsr IE,r1
*/ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) {
800b318: 21 ce 04 00 andi r14,r14,0x400
800b31c: 45 c0 00 18 be r14,r0,800b37c <rtems_task_mode+0x14c> * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode(
800b320: 34 02 00 0a mvi r2,10 800b324: b9 a0 08 00 mv r1,r13 800b328: fb ff d3 da calli 8000290 <__lshrsi3>
if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal;
800b32c: 41 82 00 08 lbu r2,(r12+8)
* Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode(
800b330: 18 21 00 01 xori r1,r1,0x1 800b334: 20 21 00 01 andi r1,r1,0x1
if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 800b338: 44 41 00 11 be r2,r1,800b37c <rtems_task_mode+0x14c> needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled;
800b33c: 31 81 00 08 sb (r12+8),r1
) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level );
800b340: 90 00 08 00 rcsr r1,IE 800b344: 34 02 ff fe mvi r2,-2 800b348: a0 22 10 00 and r2,r1,r2 800b34c: d0 02 00 00 wcsr IE,r2
_signals = information->signals_pending;
800b350: 29 82 00 18 lw r2,(r12+24)
information->signals_pending = information->signals_posted;
800b354: 29 83 00 14 lw r3,(r12+20)
information->signals_posted = _signals;
800b358: 59 82 00 14 sw (r12+20),r2
rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted;
800b35c: 59 83 00 18 sw (r12+24),r3
information->signals_posted = _signals; _ISR_Enable( _level );
800b360: d0 01 00 00 wcsr IE,r1
if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal;
800b364: 29 81 00 14 lw r1,(r12+20)
800b368: 44 20 00 05 be r1,r0,800b37c <rtems_task_mode+0x14c> if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true;
800b36c: 34 01 00 01 mvi r1,1 800b370: 31 61 00 74 sb (r11+116),r1 800b374: b8 20 58 00 mv r11,r1 800b378: e0 00 00 02 bi 800b380 <rtems_task_mode+0x150> 800b37c: 34 0b 00 00 mvi r11,0
} } } if ( _System_state_Is_up( _System_state_Get() ) )
800b380: 78 01 08 01 mvhi r1,0x801 800b384: 38 21 da 40 ori r1,r1,0xda40 800b388: 28 22 00 00 lw r2,(r1+0) 800b38c: 34 01 00 03 mvi r1,3
800b390: 5c 41 00 05 bne r2,r1,800b3a4 <rtems_task_mode+0x174> <== NEVER TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
800b394: f8 00 01 1a calli 800b7fc <_Thread_Evaluate_mode>
800b398: 5c 20 00 02 bne r1,r0,800b3a0 <rtems_task_mode+0x170> 800b39c: 45 61 00 02 be r11,r1,800b3a4 <rtems_task_mode+0x174> _Thread_Dispatch();
800b3a0: fb ff e3 61 calli 8004124 <_Thread_Dispatch> 800b3a4: 34 04 00 00 mvi r4,0
return RTEMS_SUCCESSFUL; }
800b3a8: b8 80 08 00 mv r1,r4 800b3ac: 2b 9d 00 04 lw ra,(sp+4) 800b3b0: 2b 8b 00 20 lw r11,(sp+32) 800b3b4: 2b 8c 00 1c lw r12,(sp+28) 800b3b8: 2b 8d 00 18 lw r13,(sp+24) 800b3bc: 2b 8e 00 14 lw r14,(sp+20) 800b3c0: 2b 8f 00 10 lw r15,(sp+16) 800b3c4: 2b 90 00 0c lw r16,(sp+12) 800b3c8: 2b 91 00 08 lw r17,(sp+8) 800b3cc: 37 9c 00 20 addi sp,sp,32 800b3d0: c3 a0 00 00 ret
080086b8 <rtems_task_set_priority>: rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) {
80086b8: 37 9c ff f0 addi sp,sp,-16 80086bc: 5b 8b 00 0c sw (sp+12),r11 80086c0: 5b 8c 00 08 sw (sp+8),r12 80086c4: 5b 9d 00 04 sw (sp+4),ra 80086c8: b8 40 58 00 mv r11,r2 80086cc: b8 60 60 00 mv r12,r3
register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 80086d0: 44 40 00 07 be r2,r0,80086ec <rtems_task_set_priority+0x34>
80086d4: 78 02 08 02 mvhi r2,0x802 80086d8: 38 42 50 c0 ori r2,r2,0x50c0 80086dc: 40 42 00 00 lbu r2,(r2+0)
80086e0: 50 4b 00 03 bgeu r2,r11,80086ec <rtems_task_set_priority+0x34>
80086e4: 34 02 00 13 mvi r2,19 80086e8: e0 00 00 15 bi 800873c <rtems_task_set_priority+0x84>
!_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority )
80086ec: 34 02 00 09 mvi r2,9
80086f0: 45 80 00 13 be r12,r0,800873c <rtems_task_set_priority+0x84> return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location );
80086f4: 37 82 00 10 addi r2,sp,16 80086f8: f8 00 09 b0 calli 800adb8 <_Thread_Get>
switch ( location ) {
80086fc: 2b 84 00 10 lw r4,(sp+16) 8008700: 34 02 00 04 mvi r2,4
8008704: 5c 80 00 0e bne r4,r0,800873c <rtems_task_set_priority+0x84> case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority;
8008708: 28 22 00 14 lw r2,(r1+20) 800870c: 59 82 00 00 sw (r12+0),r2
if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 8008710: 45 64 00 09 be r11,r4,8008734 <rtems_task_set_priority+0x7c> the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 ||
8008714: 28 22 00 1c lw r2,(r1+28)
case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; if ( new_priority != RTEMS_CURRENT_PRIORITY ) { the_thread->real_priority = new_priority;
8008718: 58 2b 00 18 sw (r1+24),r11
if ( the_thread->resource_count == 0 || 800871c: 44 40 00 03 be r2,r0,8008728 <rtems_task_set_priority+0x70> the_thread->current_priority > new_priority )
8008720: 28 22 00 14 lw r2,(r1+20)
8008724: 51 62 00 04 bgeu r11,r2,8008734 <rtems_task_set_priority+0x7c><== ALWAYS TAKEN
_Thread_Change_priority( the_thread, new_priority, false );
8008728: b9 60 10 00 mv r2,r11 800872c: 34 03 00 00 mvi r3,0 8008730: f8 00 07 de calli 800a6a8 <_Thread_Change_priority>
} _Thread_Enable_dispatch();
8008734: f8 00 09 81 calli 800ad38 <_Thread_Enable_dispatch> 8008738: 34 02 00 00 mvi r2,0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
800873c: b8 40 08 00 mv r1,r2 8008740: 2b 9d 00 04 lw ra,(sp+4) 8008744: 2b 8b 00 0c lw r11,(sp+12) 8008748: 2b 8c 00 08 lw r12,(sp+8) 800874c: 37 9c 00 10 addi sp,sp,16 8008750: c3 a0 00 00 ret
080035a4 <rtems_termios_baud_to_index>: rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
80035a4: 34 03 00 09 mvi r3,9
#include <rtems/termiostypes.h> int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) {
80035a8: b8 20 10 00 mv r2,r1
int baud_index; switch (termios_baud) {
80035ac: 44 23 00 38 be r1,r3,800368c <rtems_termios_baud_to_index+0xe8><== NEVER TAKEN 80035b0: 48 23 00 18 bg r1,r3,8003610 <rtems_termios_baud_to_index+0x6c><== NEVER TAKEN
80035b4: 34 03 00 04 mvi r3,4
80035b8: 44 23 00 35 be r1,r3,800368c <rtems_termios_baud_to_index+0xe8><== NEVER TAKEN 80035bc: 48 23 00 0b bg r1,r3,80035e8 <rtems_termios_baud_to_index+0x44><== NEVER TAKEN
80035c0: 34 02 00 01 mvi r2,1
80035c4: 44 22 00 32 be r1,r2,800368c <rtems_termios_baud_to_index+0xe8><== NEVER TAKEN 80035c8: 48 22 00 03 bg r1,r2,80035d4 <rtems_termios_baud_to_index+0x30><== NEVER TAKEN
80035cc: 5c 20 00 2f bne r1,r0,8003688 <rtems_termios_baud_to_index+0xe4><== ALWAYS TAKEN
80035d0: c3 a0 00 00 ret <== NOT EXECUTED 80035d4: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80035d8: 44 22 00 2d be r1,r2,800368c <rtems_termios_baud_to_index+0xe8><== NOT EXECUTED 80035dc: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 80035e0: 5c 22 00 2a bne r1,r2,8003688 <rtems_termios_baud_to_index+0xe4><== NOT EXECUTED 80035e4: c3 a0 00 00 ret <== NOT EXECUTED 80035e8: 34 03 00 06 mvi r3,6 <== NOT EXECUTED 80035ec: 44 23 00 28 be r1,r3,800368c <rtems_termios_baud_to_index+0xe8><== 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;
80035f0: 34 01 00 05 mvi r1,5 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
80035f4: 48 62 00 26 bg r3,r2,800368c <rtems_termios_baud_to_index+0xe8><== 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;
80035f8: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
80035fc: 34 02 00 07 mvi r2,7 <== NOT EXECUTED 8003600: 44 22 00 23 be r1,r2,800368c <rtems_termios_baud_to_index+0xe8><== NOT EXECUTED 8003604: 34 02 00 08 mvi r2,8 <== NOT EXECUTED 8003608: 5c 22 00 20 bne r1,r2,8003688 <rtems_termios_baud_to_index+0xe4><== NOT EXECUTED 800360c: c3 a0 00 00 ret <== NOT EXECUTED 8003610: 34 03 00 0e mvi r3,14 <== NOT EXECUTED 8003614: 44 23 00 1e be r1,r3,800368c <rtems_termios_baud_to_index+0xe8><== NOT EXECUTED 8003618: 48 23 00 0b bg r1,r3,8003644 <rtems_termios_baud_to_index+0xa0><== NOT EXECUTED 800361c: 34 03 00 0b mvi r3,11 <== NOT EXECUTED 8003620: 44 23 00 1b be r1,r3,800368c <rtems_termios_baud_to_index+0xe8><== 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;
8003624: 34 01 00 0a mvi r1,10 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
8003628: 48 62 00 19 bg r3,r2,800368c <rtems_termios_baud_to_index+0xe8><== 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;
800362c: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
8003630: 34 02 00 0c mvi r2,12 <== NOT EXECUTED 8003634: 44 22 00 16 be r1,r2,800368c <rtems_termios_baud_to_index+0xe8><== NOT EXECUTED 8003638: 34 02 00 0d mvi r2,13 <== NOT EXECUTED 800363c: 5c 22 00 13 bne r1,r2,8003688 <rtems_termios_baud_to_index+0xe4><== NOT EXECUTED 8003640: c3 a0 00 00 ret <== NOT EXECUTED 8003644: 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;
8003648: 34 01 00 11 mvi r1,17 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
800364c: 44 43 00 10 be r2,r3,800368c <rtems_termios_baud_to_index+0xe8><== NOT EXECUTED 8003650: 48 43 00 08 bg r2,r3,8003670 <rtems_termios_baud_to_index+0xcc><== NOT EXECUTED 8003654: 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;
8003658: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
800365c: 44 43 00 0c be r2,r3,800368c <rtems_termios_baud_to_index+0xe8><== NOT EXECUTED 8003660: 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;
8003664: 34 01 00 10 mvi r1,16 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
8003668: 5c 43 00 08 bne r2,r3,8003688 <rtems_termios_baud_to_index+0xe4><== NOT EXECUTED 800366c: c3 a0 00 00 ret <== NOT EXECUTED 8003670: 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;
8003674: 34 01 00 12 mvi r1,18 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
8003678: 44 43 00 05 be r2,r3,800368c <rtems_termios_baud_to_index+0xe8><== NOT EXECUTED 800367c: 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;
8003680: 34 01 00 13 mvi r1,19 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
8003684: 44 43 00 02 be r2,r3,800368c <rtems_termios_baud_to_index+0xe8><== 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;
8003688: 34 01 ff ff mvi r1,-1
default: baud_index = -1; break; } return baud_index; }
800368c: c3 a0 00 00 ret
08003690 <rtems_termios_baud_to_number>: #include <rtems/termiostypes.h> int32_t rtems_termios_baud_to_number( int termios_baud ) {
8003690: b8 20 10 00 mv r2,r1
int32_t baud; switch (termios_baud) {
8003694: 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;
8003698: 34 01 04 b0 mvi r1,1200
int termios_baud ) { int32_t baud; switch (termios_baud) { 800369c: 44 43 00 49 be r2,r3,80037c0 <rtems_termios_baud_to_number+0x130> 80036a0: 48 43 00 1f bg r2,r3,800371c <rtems_termios_baud_to_number+0x8c>
80036a4: 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;
80036a8: 34 01 00 86 mvi r1,134
int termios_baud ) { int32_t baud; switch (termios_baud) { 80036ac: 44 43 00 45 be r2,r3,80037c0 <rtems_termios_baud_to_number+0x130> 80036b0: 48 43 00 0f bg r2,r3,80036ec <rtems_termios_baud_to_number+0x5c>
80036b4: 34 03 00 01 mvi r3,1 80036b8: 34 01 00 32 mvi r1,50
80036bc: 44 43 00 41 be r2,r3,80037c0 <rtems_termios_baud_to_number+0x130> 80036c0: 48 43 00 04 bg r2,r3,80036d0 <rtems_termios_baud_to_number+0x40>
80036c4: b8 40 08 00 mv r1,r2
80036c8: 5c 40 00 3d bne r2,r0,80037bc <rtems_termios_baud_to_number+0x12c>
80036cc: c3 a0 00 00 ret 80036d0: 34 03 00 02 mvi r3,2 80036d4: 34 01 00 4b mvi r1,75
80036d8: 44 43 00 3a be r2,r3,80037c0 <rtems_termios_baud_to_number+0x130>
80036dc: 34 03 00 03 mvi r3,3
case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break;
80036e0: 34 01 00 6e mvi r1,110
int termios_baud ) { int32_t baud; switch (termios_baud) {
80036e4: 5c 43 00 36 bne r2,r3,80037bc <rtems_termios_baud_to_number+0x12c><== NEVER TAKEN
80036e8: c3 a0 00 00 ret 80036ec: 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;
80036f0: 34 01 00 c8 mvi r1,200
int termios_baud ) { int32_t baud; switch (termios_baud) { 80036f4: 44 43 00 33 be r2,r3,80037c0 <rtems_termios_baud_to_number+0x130> 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;
80036f8: 34 01 00 96 mvi r1,150
int termios_baud ) { int32_t baud; switch (termios_baud) { 80036fc: 48 62 00 31 bg r3,r2,80037c0 <rtems_termios_baud_to_number+0x130>
8003700: 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;
8003704: 34 01 01 2c mvi r1,300
int termios_baud ) { int32_t baud; switch (termios_baud) { 8003708: 44 43 00 2e be r2,r3,80037c0 <rtems_termios_baud_to_number+0x130>
800370c: 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;
8003710: 34 01 02 58 mvi r1,600
int termios_baud ) { int32_t baud; switch (termios_baud) {
8003714: 5c 43 00 2a bne r2,r3,80037bc <rtems_termios_baud_to_number+0x12c><== NEVER TAKEN
8003718: c3 a0 00 00 ret 800371c: 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;
8003720: 34 01 4b 00 mvi r1,19200
int termios_baud ) { int32_t baud; switch (termios_baud) { 8003724: 44 43 00 27 be r2,r3,80037c0 <rtems_termios_baud_to_number+0x130> 8003728: 48 43 00 0d bg r2,r3,800375c <rtems_termios_baud_to_number+0xcc>
800372c: 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;
8003730: 34 01 09 60 mvi r1,2400
int termios_baud ) { int32_t baud; switch (termios_baud) { 8003734: 44 43 00 23 be r2,r3,80037c0 <rtems_termios_baud_to_number+0x130> 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;
8003738: 34 01 07 08 mvi r1,1800
int termios_baud ) { int32_t baud; switch (termios_baud) { 800373c: 48 62 00 21 bg r3,r2,80037c0 <rtems_termios_baud_to_number+0x130>
8003740: 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;
8003744: 34 01 12 c0 mvi r1,4800
int termios_baud ) { int32_t baud; switch (termios_baud) { 8003748: 44 43 00 1e be r2,r3,80037c0 <rtems_termios_baud_to_number+0x130>
800374c: 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;
8003750: 34 01 25 80 mvi r1,9600
int termios_baud ) { int32_t baud; switch (termios_baud) {
8003754: 5c 43 00 1a bne r2,r3,80037bc <rtems_termios_baud_to_number+0x12c><== NEVER TAKEN
8003758: c3 a0 00 00 ret 800375c: 34 01 10 02 mvi r1,4098
8003760: 44 41 00 0e be r2,r1,8003798 <rtems_termios_baud_to_number+0x108> 8003764: 48 41 00 08 bg r2,r1,8003784 <rtems_termios_baud_to_number+0xf4>
8003768: 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;
800376c: 38 01 96 00 mvu r1,0x9600
int termios_baud ) { int32_t baud; switch (termios_baud) { 8003770: 44 43 00 14 be r2,r3,80037c0 <rtems_termios_baud_to_number+0x130>
8003774: 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;
8003778: 38 01 e1 00 mvu r1,0xe100
int termios_baud ) { int32_t baud; switch (termios_baud) {
800377c: 5c 43 00 10 bne r2,r3,80037bc <rtems_termios_baud_to_number+0x12c><== NEVER TAKEN
8003780: c3 a0 00 00 ret 8003784: 34 01 10 03 mvi r1,4099
8003788: 44 41 00 07 be r2,r1,80037a4 <rtems_termios_baud_to_number+0x114>
800378c: 34 01 10 04 mvi r1,4100
8003790: 5c 41 00 0b bne r2,r1,80037bc <rtems_termios_baud_to_number+0x12c><== NEVER TAKEN
8003794: e0 00 00 07 bi 80037b0 <rtems_termios_baud_to_number+0x120>
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;
8003798: 78 01 00 01 mvhi r1,0x1 800379c: 38 21 c2 00 ori r1,r1,0xc200
case B115200: baud = 115200; break;
80037a0: c3 a0 00 00 ret 80037a4: 78 01 00 03 mvhi r1,0x3 80037a8: 38 21 84 00 ori r1,r1,0x8400
case B230400: baud = 230400; break;
80037ac: c3 a0 00 00 ret 80037b0: 78 01 00 07 mvhi r1,0x7 80037b4: 38 21 08 00 ori r1,r1,0x800
case B460800: baud = 460800; break;
80037b8: c3 a0 00 00 ret 80037bc: 34 01 ff ff mvi r1,-1
default: baud = -1; break; } return baud; }
80037c0: c3 a0 00 00 ret
08003934 <rtems_termios_bufsize>: int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize;
8003934: 78 06 08 02 mvhi r6,0x802 <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
8003938: 78 05 08 02 mvhi r5,0x802 <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
800393c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize;
8003940: 38 c6 52 34 ori r6,r6,0x5234 <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
8003944: 38 a5 52 38 ori r5,r5,0x5238 <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
8003948: 38 84 52 3c ori r4,r4,0x523c <== NOT EXECUTED
int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize;
800394c: 58 c1 00 00 sw (r6+0),r1 <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
8003950: 58 a2 00 00 sw (r5+0),r2 <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
8003954: 58 83 00 00 sw (r4+0),r3 <== NOT EXECUTED
return RTEMS_SUCCESSFUL; }
8003958: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 800395c: c3 a0 00 00 ret <== NOT EXECUTED
08004fdc <rtems_termios_close>: } } rtems_status_code rtems_termios_close (void *arg) {
8004fdc: 37 9c ff ec addi sp,sp,-20 8004fe0: 5b 8b 00 14 sw (sp+20),r11 8004fe4: 5b 8c 00 10 sw (sp+16),r12 8004fe8: 5b 8d 00 0c sw (sp+12),r13 8004fec: 5b 8e 00 08 sw (sp+8),r14 8004ff0: 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);
8004ff4: 78 02 08 02 mvhi r2,0x802
} } rtems_status_code rtems_termios_close (void *arg) {
8004ff8: b8 20 70 00 mv r14,r1
rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
8004ffc: 38 42 59 cc ori r2,r2,0x59cc 8005000: 28 41 00 00 lw r1,(r2+0)
rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
8005004: 29 c4 00 00 lw r4,(r14+0)
rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
8005008: 34 02 00 00 mvi r2,0 800500c: 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;
8005010: 28 8b 00 38 lw r11,(r4+56)
rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
8005014: f8 00 04 8c calli 8006244 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
8005018: 5c 20 00 23 bne r1,r0,80050a4 <rtems_termios_close+0xc8> <== NEVER TAKEN
rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) {
800501c: 29 6d 00 08 lw r13,(r11+8) 8005020: 35 ad ff ff addi r13,r13,-1 8005024: 59 6d 00 08 sw (r11+8),r13
8005028: 5d a1 00 4f bne r13,r1,8005164 <rtems_termios_close+0x188> <== NEVER TAKEN
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
800502c: 29 61 00 cc lw r1,(r11+204) 8005030: 78 0c 08 02 mvhi r12,0x802 8005034: 34 02 00 05 mvi r2,5 8005038: 39 8c 57 f8 ori r12,r12,0x57f8 800503c: fb ff f0 ef calli 80013f8 <__ashlsi3> 8005040: b5 81 08 00 add r1,r12,r1 8005044: 28 2c 00 04 lw r12,(r1+4)
8005048: 45 8d 00 04 be r12,r13,8005058 <rtems_termios_close+0x7c> <== ALWAYS TAKEN
/* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty);
800504c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8005050: d9 80 00 00 call r12 <== NOT EXECUTED 8005054: e0 00 00 08 bi 8005074 <rtems_termios_close+0x98> <== NOT EXECUTED
} else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
8005058: 29 61 00 18 lw r1,(r11+24) 800505c: b9 80 10 00 mv r2,r12 8005060: b9 80 18 00 mv r3,r12 8005064: f8 00 04 78 calli 8006244 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
8005068: 5d 81 00 0f bne r12,r1,80050a4 <rtems_termios_close+0xc8> <== NEVER TAKEN
rtems_fatal_error_occurred (sc); } drainOutput (tty);
800506c: b9 60 08 00 mv r1,r11 8005070: fb ff fd e0 calli 80047f0 <drainOutput>
} if (tty->device.outputUsesInterrupts
8005074: 29 62 00 b4 lw r2,(r11+180) 8005078: 34 01 00 02 mvi r1,2
800507c: 5c 41 00 0b bne r2,r1,80050a8 <rtems_termios_close+0xcc> <== ALWAYS TAKEN
== TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send(
8005080: 29 61 00 c4 lw r1,(r11+196) <== NOT EXECUTED 8005084: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 8005088: f8 00 03 1b calli 8005cf4 <rtems_event_send> <== NOT EXECUTED 800508c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL)
8005090: 5c 20 00 05 bne r1,r0,80050a4 <rtems_termios_close+0xc8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_event_send(
8005094: 29 61 00 c8 lw r1,(r11+200) <== NOT EXECUTED 8005098: 34 02 00 01 mvi r2,1 <== NOT EXECUTED 800509c: f8 00 03 16 calli 8005cf4 <rtems_event_send> <== NOT EXECUTED
tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL)
80050a0: 44 2c 00 02 be r1,r12,80050a8 <rtems_termios_close+0xcc> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
80050a4: f8 00 06 61 calli 8006a28 <rtems_fatal_error_occurred> <== NOT EXECUTED
} if (tty->device.lastClose)
80050a8: 29 64 00 9c lw r4,(r11+156)
80050ac: 44 80 00 05 be r4,r0,80050c0 <rtems_termios_close+0xe4> <== ALWAYS TAKEN
(*tty->device.lastClose)(tty->major, tty->minor, arg);
80050b0: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED 80050b4: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED 80050b8: b9 c0 18 00 mv r3,r14 <== NOT EXECUTED 80050bc: d8 80 00 00 call r4 <== NOT EXECUTED
if (tty->forw == NULL) {
80050c0: 29 61 00 00 lw r1,(r11+0) 80050c4: 29 62 00 04 lw r2,(r11+4)
80050c8: 5c 20 00 07 bne r1,r0,80050e4 <rtems_termios_close+0x108> <== NEVER TAKEN
rtems_termios_ttyTail = tty->back;
80050cc: 78 03 08 02 mvhi r3,0x802 80050d0: 38 63 59 d0 ori r3,r3,0x59d0 80050d4: 58 62 00 00 sw (r3+0),r2
if ( rtems_termios_ttyTail != NULL ) {
80050d8: 44 41 00 04 be r2,r1,80050e8 <rtems_termios_close+0x10c> <== ALWAYS TAKEN
rtems_termios_ttyTail->forw = NULL;
80050dc: 58 41 00 00 sw (r2+0),r1 <== NOT EXECUTED 80050e0: e0 00 00 02 bi 80050e8 <rtems_termios_close+0x10c> <== NOT EXECUTED
} } else { tty->forw->back = tty->back;
80050e4: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED
} if (tty->back == NULL) {
80050e8: 29 61 00 04 lw r1,(r11+4) 80050ec: 29 62 00 00 lw r2,(r11+0)
80050f0: 5c 20 00 07 bne r1,r0,800510c <rtems_termios_close+0x130> <== NEVER TAKEN
rtems_termios_ttyHead = tty->forw;
80050f4: 78 03 08 02 mvhi r3,0x802 80050f8: 38 63 59 d4 ori r3,r3,0x59d4 80050fc: 58 62 00 00 sw (r3+0),r2
if ( rtems_termios_ttyHead != NULL ) {
8005100: 44 41 00 04 be r2,r1,8005110 <rtems_termios_close+0x134> <== ALWAYS TAKEN
rtems_termios_ttyHead->back = NULL;
8005104: 58 41 00 04 sw (r2+4),r1 <== NOT EXECUTED 8005108: e0 00 00 02 bi 8005110 <rtems_termios_close+0x134> <== NOT EXECUTED
} } else { tty->back->forw = tty->forw;
800510c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
} rtems_semaphore_delete (tty->isem);
8005110: 29 61 00 14 lw r1,(r11+20) 8005114: f8 00 04 20 calli 8006194 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
8005118: 29 61 00 18 lw r1,(r11+24) 800511c: f8 00 04 1e calli 8006194 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
8005120: 29 61 00 8c lw r1,(r11+140) 8005124: f8 00 04 1c calli 8006194 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
8005128: 29 61 00 a0 lw r1,(r11+160)
800512c: 44 20 00 04 be r1,r0,800513c <rtems_termios_close+0x160> <== NEVER TAKEN
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
8005130: 29 62 00 b4 lw r2,(r11+180) 8005134: 34 01 00 02 mvi r1,2
8005138: 5c 41 00 03 bne r2,r1,8005144 <rtems_termios_close+0x168> <== ALWAYS TAKEN
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
800513c: 29 61 00 68 lw r1,(r11+104) <== NOT EXECUTED 8005140: f8 00 04 15 calli 8006194 <rtems_semaphore_delete> <== NOT EXECUTED
free (tty->rawInBuf.theBuf);
8005144: 29 61 00 58 lw r1,(r11+88) 8005148: f8 00 1a 72 calli 800bb10 <free>
free (tty->rawOutBuf.theBuf);
800514c: 29 61 00 7c lw r1,(r11+124) 8005150: f8 00 1a 70 calli 800bb10 <free>
free (tty->cbuf);
8005154: 29 61 00 1c lw r1,(r11+28) 8005158: f8 00 1a 6e calli 800bb10 <free>
free (tty);
800515c: b9 60 08 00 mv r1,r11 8005160: f8 00 1a 6c calli 800bb10 <free>
} rtems_semaphore_release (rtems_termios_ttyMutex);
8005164: 78 01 08 02 mvhi r1,0x802 8005168: 38 21 59 cc ori r1,r1,0x59cc 800516c: 28 21 00 00 lw r1,(r1+0) 8005170: f8 00 04 85 calli 8006384 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL; }
8005174: 34 01 00 00 mvi r1,0 8005178: 2b 9d 00 04 lw ra,(sp+4) 800517c: 2b 8b 00 14 lw r11,(sp+20) 8005180: 2b 8c 00 10 lw r12,(sp+16) 8005184: 2b 8d 00 0c lw r13,(sp+12) 8005188: 2b 8e 00 08 lw r14,(sp+8) 800518c: 37 9c 00 14 addi sp,sp,20 8005190: c3 a0 00 00 ret
08003b90 <rtems_termios_dequeue_characters>: * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) {
8003b90: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8003b94: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len;
8003b98: 28 25 00 90 lw r5,(r1+144) <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
8003b9c: 28 24 00 b4 lw r4,(r1+180) <== NOT EXECUTED
rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len;
8003ba0: b4 a2 10 00 add r2,r5,r2 <== NOT EXECUTED 8003ba4: 58 22 00 90 sw (r1+144),r2 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
8003ba8: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8003bac: 5c 82 00 06 bne r4,r2,8003bc4 <rtems_termios_dequeue_characters+0x34><== NOT EXECUTED
/* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId,
8003bb0: 28 21 00 c8 lw r1,(r1+200) <== NOT EXECUTED 8003bb4: b8 80 10 00 mv r2,r4 <== NOT EXECUTED 8003bb8: f8 00 08 4f calli 8005cf4 <rtems_event_send> <== NOT EXECUTED
TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL)
8003bbc: 44 20 00 0d be r1,r0,8003bf0 <rtems_termios_dequeue_characters+0x60><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
8003bc0: f8 00 0b 9a calli 8006a28 <rtems_fatal_error_occurred> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) {
8003bc4: 28 23 00 cc lw r3,(r1+204) <== NOT EXECUTED 8003bc8: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8003bcc: 5c 62 00 07 bne r3,r2,8003be8 <rtems_termios_dequeue_characters+0x58><== NOT EXECUTED
/* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
8003bd0: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8003bd4: 38 42 57 f8 ori r2,r2,0x57f8 <== NOT EXECUTED 8003bd8: 28 42 00 b4 lw r2,(r2+180) <== NOT EXECUTED 8003bdc: 44 40 00 05 be r2,r0,8003bf0 <rtems_termios_dequeue_characters+0x60><== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
8003be0: d8 40 00 00 call r2 <== NOT EXECUTED 8003be4: e0 00 00 03 bi 8003bf0 <rtems_termios_dequeue_characters+0x60><== NOT EXECUTED
} return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty);
8003be8: fb ff ff 66 calli 8003980 <rtems_termios_refill_transmitter><== NOT EXECUTED 8003bec: e0 00 00 02 bi 8003bf4 <rtems_termios_dequeue_characters+0x64><== NOT EXECUTED 8003bf0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
} }
8003bf4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003bf8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8003bfc: c3 a0 00 00 ret <== NOT EXECUTED
08003c00 <rtems_termios_enqueue_raw_characters>: * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) {
8003c00: 37 9c ff b8 addi sp,sp,-72 <== NOT EXECUTED 8003c04: 5b 8b 00 44 sw (sp+68),r11 <== NOT EXECUTED 8003c08: 5b 8c 00 40 sw (sp+64),r12 <== NOT EXECUTED 8003c0c: 5b 8d 00 3c sw (sp+60),r13 <== NOT EXECUTED 8003c10: 5b 8e 00 38 sw (sp+56),r14 <== NOT EXECUTED 8003c14: 5b 8f 00 34 sw (sp+52),r15 <== NOT EXECUTED 8003c18: 5b 90 00 30 sw (sp+48),r16 <== NOT EXECUTED 8003c1c: 5b 91 00 2c sw (sp+44),r17 <== NOT EXECUTED 8003c20: 5b 92 00 28 sw (sp+40),r18 <== NOT EXECUTED 8003c24: 5b 93 00 24 sw (sp+36),r19 <== NOT EXECUTED 8003c28: 5b 94 00 20 sw (sp+32),r20 <== NOT EXECUTED 8003c2c: 5b 95 00 1c sw (sp+28),r21 <== NOT EXECUTED 8003c30: 5b 96 00 18 sw (sp+24),r22 <== NOT EXECUTED 8003c34: 5b 97 00 14 sw (sp+20),r23 <== NOT EXECUTED 8003c38: 5b 98 00 10 sw (sp+16),r24 <== NOT EXECUTED 8003c3c: 5b 99 00 0c sw (sp+12),r25 <== NOT EXECUTED 8003c40: 5b 9b 00 08 sw (sp+8),fp <== NOT EXECUTED 8003c44: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8003c48: 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) {
8003c4c: 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) {
8003c50: 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) {
8003c54: 78 0c 08 02 mvhi r12,0x802 <== NOT EXECUTED 8003c58: b4 21 08 00 add r1,r1,r1 <== NOT EXECUTED 8003c5c: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 8003c60: 34 02 00 04 mvi r2,4 <== NOT EXECUTED 8003c64: 39 8c 57 f8 ori r12,r12,0x57f8 <== NOT EXECUTED
* device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) {
8003c68: b8 60 80 00 mv r16,r3 <== NOT EXECUTED
char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
8003c6c: fb ff f5 e3 calli 80013f8 <__ashlsi3> <== NOT EXECUTED 8003c70: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 8003c74: 28 2f 00 00 lw r15,(r1+0) <== NOT EXECUTED
while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty);
8003c78: b9 80 70 00 mv r14,r12 <== NOT EXECUTED
/* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
8003c7c: ba 00 60 00 mv r12,r16 <== NOT EXECUTED
char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
8003c80: 5d e0 00 19 bne r15,r0,8003ce4 <rtems_termios_enqueue_raw_characters+0xe4><== 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,
8003c84: 35 61 00 4a addi r1,r11,74 <== NOT EXECUTED 8003c88: 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);
8003c8c: 35 7b 00 30 addi fp,r11,48 <== NOT EXECUTED 8003c90: b9 e0 60 00 mv r12,r15 <== NOT EXECUTED
flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
8003c94: 34 19 00 20 mvi r25,32 <== NOT EXECUTED
/* disable interrupts */ rtems_interrupt_disable(level);
8003c98: 34 12 ff fe mvi r18,-2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
8003c9c: 34 18 ff df mvi r24,-33 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor,
8003ca0: 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))
8003ca4: 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))
8003ca8: 34 15 01 00 mvi r21,256 <== NOT EXECUTED
flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF;
8003cac: 34 14 ff ef mvi r20,-17 <== NOT EXECUTED 8003cb0: e0 00 00 86 bi 8003ec8 <rtems_termios_enqueue_raw_characters+0x2c8><== NOT EXECUTED
rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty);
8003cb4: 29 63 00 cc lw r3,(r11+204) <== NOT EXECUTED
bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++;
8003cb8: 41 af 00 00 lbu r15,(r13+0) <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
8003cbc: 35 8c ff ff addi r12,r12,-1 <== NOT EXECUTED 8003cc0: b4 63 18 00 add r3,r3,r3 <== NOT EXECUTED 8003cc4: 34 61 00 01 addi r1,r3,1 <== NOT EXECUTED 8003cc8: fb ff f5 cc calli 80013f8 <__ashlsi3> <== NOT EXECUTED 8003ccc: b5 c1 10 00 add r2,r14,r1 <== NOT EXECUTED 8003cd0: 28 43 00 00 lw r3,(r2+0) <== NOT EXECUTED 8003cd4: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8003cd8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8003cdc: d8 60 00 00 call r3 <== NOT EXECUTED
bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++;
8003ce0: 35 ad 00 01 addi r13,r13,1 <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
8003ce4: 34 02 00 04 mvi r2,4 <== NOT EXECUTED
int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) {
8003ce8: 5d 80 ff f3 bne r12,r0,8003cb4 <rtems_termios_enqueue_raw_characters+0xb4><== NOT EXECUTED
} /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
8003cec: 29 61 00 e4 lw r1,(r11+228) <== NOT EXECUTED 8003cf0: 5c 2c 00 7d bne r1,r12,8003ee4 <rtems_termios_enqueue_raw_characters+0x2e4><== NOT EXECUTED 8003cf4: 29 63 00 dc lw r3,(r11+220) <== NOT EXECUTED 8003cf8: 44 60 00 7b be r3,r0,8003ee4 <rtems_termios_enqueue_raw_characters+0x2e4><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
8003cfc: 29 62 00 e0 lw r2,(r11+224) <== NOT EXECUTED 8003d00: 35 61 00 30 addi r1,r11,48 <== NOT EXECUTED 8003d04: d8 60 00 00 call r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
8003d08: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8003d0c: 59 61 00 e4 sw (r11+228),r1 <== NOT EXECUTED 8003d10: e0 00 00 76 bi 8003ee8 <rtems_termios_enqueue_raw_characters+0x2e8><== NOT EXECUTED
while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) {
8003d14: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
} return 0; } while (len--) { c = *buf++;
8003d18: 41 b1 00 00 lbu r17,(r13+0) <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) {
8003d1c: 20 21 02 00 andi r1,r1,0x200 <== NOT EXECUTED 8003d20: 44 20 00 11 be r1,r0,8003d64 <rtems_termios_enqueue_raw_characters+0x164><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) {
8003d24: 41 64 00 4a lbu r4,(r11+74) <== NOT EXECUTED 8003d28: 41 63 00 49 lbu r3,(r11+73) <== NOT EXECUTED 8003d2c: 5c 91 00 0a bne r4,r17,8003d54 <rtems_termios_enqueue_raw_characters+0x154><== NOT EXECUTED
if (c == tty->termios.c_cc[VSTART]) {
8003d30: 5c 64 00 04 bne r3,r4,8003d40 <rtems_termios_enqueue_raw_characters+0x140><== NOT EXECUTED
/* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
8003d34: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8003d38: 18 21 00 10 xori r1,r1,0x10 <== NOT EXECUTED 8003d3c: e0 00 00 03 bi 8003d48 <rtems_termios_enqueue_raw_characters+0x148><== NOT EXECUTED
} else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF;
8003d40: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8003d44: 38 21 00 10 ori r1,r1,0x10 <== NOT EXECUTED 8003d48: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
8003d4c: 34 0f 00 01 mvi r15,1 <== NOT EXECUTED 8003d50: e0 00 00 06 bi 8003d68 <rtems_termios_enqueue_raw_characters+0x168><== NOT EXECUTED
/* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) {
8003d54: 5c 71 00 04 bne r3,r17,8003d64 <rtems_termios_enqueue_raw_characters+0x164><== NOT EXECUTED
/* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF;
8003d58: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8003d5c: a0 34 08 00 and r1,r1,r20 <== NOT EXECUTED 8003d60: e3 ff ff fa bi 8003d48 <rtems_termios_enqueue_raw_characters+0x148><== NOT EXECUTED
flow_rcv = true; } } if (flow_rcv) {
8003d64: 45 e0 00 15 be r15,r0,8003db8 <rtems_termios_enqueue_raw_characters+0x1b8><== NOT EXECUTED
/* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
8003d68: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8003d6c: 20 21 00 30 andi r1,r1,0x30 <== NOT EXECUTED 8003d70: 5c 39 00 54 bne r1,r25,8003ec0 <rtems_termios_enqueue_raw_characters+0x2c0><== NOT EXECUTED
/* disable interrupts */ rtems_interrupt_disable(level);
8003d74: 90 00 70 00 rcsr r14,IE <== NOT EXECUTED 8003d78: a1 d2 08 00 and r1,r14,r18 <== NOT EXECUTED 8003d7c: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
8003d80: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
8003d84: 29 62 00 94 lw r2,(r11+148) <== NOT EXECUTED
if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP;
8003d88: a0 38 08 00 and r1,r1,r24 <== NOT EXECUTED 8003d8c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
8003d90: 44 40 00 08 be r2,r0,8003db0 <rtems_termios_enqueue_raw_characters+0x1b0><== NOT EXECUTED
/* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
8003d94: 29 63 00 84 lw r3,(r11+132) <== NOT EXECUTED
rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor,
8003d98: 29 62 00 7c lw r2,(r11+124) <== NOT EXECUTED 8003d9c: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8003da0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8003da4: b4 43 10 00 add r2,r2,r3 <== NOT EXECUTED 8003da8: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003dac: d8 80 00 00 call r4 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level);
8003db0: d0 0e 00 00 wcsr IE,r14 <== NOT EXECUTED 8003db4: e0 00 00 43 bi 8003ec0 <rtems_termios_enqueue_raw_characters+0x2c0><== NOT EXECUTED
} } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
8003db8: 29 63 00 60 lw r3,(r11+96) <== NOT EXECUTED 8003dbc: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 8003dc0: 34 61 00 01 addi r1,r3,1 <== NOT EXECUTED 8003dc4: f8 00 73 f4 calli 8020d94 <__umodsi3> <== NOT EXECUTED 8003dc8: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
/* if chars_in_buffer > highwater */ rtems_interrupt_disable(level);
8003dcc: 90 00 98 00 rcsr r19,IE <== NOT EXECUTED 8003dd0: a2 72 08 00 and r1,r19,r18 <== NOT EXECUTED 8003dd4: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
8003dd8: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED 8003ddc: 29 63 00 64 lw r3,(r11+100) <== NOT EXECUTED 8003de0: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 8003de4: c8 61 18 00 sub r3,r3,r1 <== NOT EXECUTED 8003de8: b4 6e 08 00 add r1,r3,r14 <== NOT EXECUTED 8003dec: f8 00 73 ea calli 8020d94 <__umodsi3> <== NOT EXECUTED
% tty->rawInBuf.Size) > tty->highwater) &&
8003df0: 29 62 00 c0 lw r2,(r11+192) <== NOT EXECUTED 8003df4: 50 41 00 22 bgeu r2,r1,8003e7c <rtems_termios_enqueue_raw_characters+0x27c><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
8003df8: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
} else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
8003dfc: 20 21 00 01 andi r1,r1,0x1 <== NOT EXECUTED 8003e00: 5c 20 00 1f bne r1,r0,8003e7c <rtems_termios_enqueue_raw_characters+0x27c><== NOT EXECUTED
% tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF;
8003e04: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8003e08: 38 21 00 01 ori r1,r1,0x1 <== NOT EXECUTED 8003e0c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
8003e10: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8003e14: 20 21 04 02 andi r1,r1,0x402 <== NOT EXECUTED 8003e18: 5c 36 00 0f bne r1,r22,8003e54 <rtems_termios_enqueue_raw_characters+0x254><== NOT EXECUTED
== (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) ||
8003e1c: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED 8003e20: 20 63 00 20 andi r3,r3,0x20 <== NOT EXECUTED 8003e24: 5c 60 00 03 bne r3,r0,8003e30 <rtems_termios_enqueue_raw_characters+0x230><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
8003e28: 29 61 00 94 lw r1,(r11+148) <== NOT EXECUTED 8003e2c: 5c 23 00 14 bne r1,r3,8003e7c <rtems_termios_enqueue_raw_characters+0x27c><== NOT EXECUTED
/* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF;
8003e30: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
8003e34: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8003e38: 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;
8003e3c: 38 42 00 02 ori r2,r2,0x2 <== NOT EXECUTED 8003e40: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
8003e44: 2b 82 00 48 lw r2,(sp+72) <== NOT EXECUTED 8003e48: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003e4c: d8 80 00 00 call r4 <== NOT EXECUTED 8003e50: e0 00 00 0b bi 8003e7c <rtems_termios_enqueue_raw_characters+0x27c><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
8003e54: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8003e58: 20 21 01 04 andi r1,r1,0x104 <== NOT EXECUTED 8003e5c: 5c 35 00 08 bne r1,r21,8003e7c <rtems_termios_enqueue_raw_characters+0x27c><== NOT EXECUTED
== (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF;
8003e60: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
/* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) {
8003e64: 29 63 00 ac lw r3,(r11+172) <== NOT EXECUTED
1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF;
8003e68: 38 21 00 04 ori r1,r1,0x4 <== NOT EXECUTED 8003e6c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) {
8003e70: 44 60 00 03 be r3,r0,8003e7c <rtems_termios_enqueue_raw_characters+0x27c><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
8003e74: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8003e78: d8 60 00 00 call r3 <== NOT EXECUTED
} } } /* reenable interrupts */ rtems_interrupt_enable(level);
8003e7c: d0 13 00 00 wcsr IE,r19 <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
8003e80: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED 8003e84: 5d c1 00 03 bne r14,r1,8003e90 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
dropped++;
8003e88: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED 8003e8c: e0 00 00 0d bi 8003ec0 <rtems_termios_enqueue_raw_characters+0x2c0><== NOT EXECUTED
} else { tty->rawInBuf.theBuf[newTail] = c;
8003e90: 29 61 00 58 lw r1,(r11+88) <== NOT EXECUTED 8003e94: b4 2e 08 00 add r1,r1,r14 <== NOT EXECUTED 8003e98: 30 31 00 00 sb (r1+0),r17 <== NOT EXECUTED
tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
8003e9c: 29 64 00 e4 lw r4,(r11+228) <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail;
8003ea0: 59 6e 00 60 sw (r11+96),r14 <== NOT EXECUTED
/* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
8003ea4: 5c 80 00 07 bne r4,r0,8003ec0 <rtems_termios_enqueue_raw_characters+0x2c0><== NOT EXECUTED 8003ea8: 29 63 00 dc lw r3,(r11+220) <== NOT EXECUTED 8003eac: 44 64 00 05 be r3,r4,8003ec0 <rtems_termios_enqueue_raw_characters+0x2c0><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
8003eb0: 29 62 00 e0 lw r2,(r11+224) <== NOT EXECUTED 8003eb4: bb 60 08 00 mv r1,fp <== NOT EXECUTED 8003eb8: d8 60 00 00 call r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
8003ebc: 59 77 00 e4 sw (r11+228),r23 <== NOT EXECUTED
} return 0; } while (len--) { c = *buf++;
8003ec0: 35 ad 00 01 addi r13,r13,1 <== NOT EXECUTED 8003ec4: 36 10 ff ff addi r16,r16,-1 <== NOT EXECUTED
tty->tty_rcvwakeup = 1; } return 0; } while (len--) {
8003ec8: 5e 00 ff 93 bne r16,r0,8003d14 <rtems_termios_enqueue_raw_characters+0x114><== NOT EXECUTED
tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped;
8003ecc: 29 62 00 78 lw r2,(r11+120) <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
8003ed0: 29 61 00 68 lw r1,(r11+104) <== NOT EXECUTED
tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped;
8003ed4: b4 4c 10 00 add r2,r2,r12 <== NOT EXECUTED 8003ed8: 59 62 00 78 sw (r11+120),r2 <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
8003edc: f8 00 09 2a calli 8006384 <rtems_semaphore_release> <== NOT EXECUTED
return dropped;
8003ee0: e0 00 00 02 bi 8003ee8 <rtems_termios_enqueue_raw_characters+0x2e8><== NOT EXECUTED 8003ee4: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
}
8003ee8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8003eec: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003ef0: 2b 8b 00 44 lw r11,(sp+68) <== NOT EXECUTED 8003ef4: 2b 8c 00 40 lw r12,(sp+64) <== NOT EXECUTED 8003ef8: 2b 8d 00 3c lw r13,(sp+60) <== NOT EXECUTED 8003efc: 2b 8e 00 38 lw r14,(sp+56) <== NOT EXECUTED 8003f00: 2b 8f 00 34 lw r15,(sp+52) <== NOT EXECUTED 8003f04: 2b 90 00 30 lw r16,(sp+48) <== NOT EXECUTED 8003f08: 2b 91 00 2c lw r17,(sp+44) <== NOT EXECUTED 8003f0c: 2b 92 00 28 lw r18,(sp+40) <== NOT EXECUTED 8003f10: 2b 93 00 24 lw r19,(sp+36) <== NOT EXECUTED 8003f14: 2b 94 00 20 lw r20,(sp+32) <== NOT EXECUTED 8003f18: 2b 95 00 1c lw r21,(sp+28) <== NOT EXECUTED 8003f1c: 2b 96 00 18 lw r22,(sp+24) <== NOT EXECUTED 8003f20: 2b 97 00 14 lw r23,(sp+20) <== NOT EXECUTED 8003f24: 2b 98 00 10 lw r24,(sp+16) <== NOT EXECUTED 8003f28: 2b 99 00 0c lw r25,(sp+12) <== NOT EXECUTED 8003f2c: 2b 9b 00 08 lw fp,(sp+8) <== NOT EXECUTED 8003f30: 37 9c 00 48 addi sp,sp,72 <== NOT EXECUTED 8003f34: c3 a0 00 00 ret <== NOT EXECUTED
080037c4 <rtems_termios_initialize>: struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) {
80037c4: 37 9c ff f8 addi sp,sp,-8 80037c8: 5b 8b 00 08 sw (sp+8),r11 80037cc: 5b 9d 00 04 sw (sp+4),ra
rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) {
80037d0: 78 05 08 02 mvhi r5,0x802 80037d4: 38 a5 59 cc ori r5,r5,0x59cc 80037d8: 28 ab 00 00 lw r11,(r5+0)
80037dc: 5d 60 00 09 bne r11,r0,8003800 <rtems_termios_initialize+0x3c><== NEVER TAKEN
sc = rtems_semaphore_create (
80037e0: 78 01 54 52 mvhi r1,0x5452 80037e4: 38 21 6d 69 ori r1,r1,0x6d69 80037e8: 34 02 00 01 mvi r2,1 80037ec: 34 03 00 54 mvi r3,84 80037f0: b9 60 20 00 mv r4,r11 80037f4: f8 00 09 e6 calli 8005f8c <rtems_semaphore_create>
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)
80037f8: 44 2b 00 02 be r1,r11,8003800 <rtems_termios_initialize+0x3c><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
80037fc: f8 00 0c 8b calli 8006a28 <rtems_fatal_error_occurred> <== NOT EXECUTED
} }
8003800: 2b 9d 00 04 lw ra,(sp+4) 8003804: 2b 8b 00 08 lw r11,(sp+8) 8003808: 37 9c 00 08 addi sp,sp,8 800380c: c3 a0 00 00 ret
08004bf0 <rtems_termios_ioctl>: } } rtems_status_code rtems_termios_ioctl (void *arg) {
8004bf0: 37 9c ff e8 addi sp,sp,-24 8004bf4: 5b 8b 00 18 sw (sp+24),r11 8004bf8: 5b 8c 00 14 sw (sp+20),r12 8004bfc: 5b 8d 00 10 sw (sp+16),r13 8004c00: 5b 8e 00 0c sw (sp+12),r14 8004c04: 5b 8f 00 08 sw (sp+8),r15 8004c08: 5b 9d 00 04 sw (sp+4),ra 8004c0c: b8 20 60 00 mv r12,r1
rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
8004c10: 28 21 00 00 lw r1,(r1+0)
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0;
8004c14: 34 02 00 00 mvi r2,0 8004c18: 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;
8004c1c: 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);
8004c20: 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;
8004c24: 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);
8004c28: 29 61 00 18 lw r1,(r11+24) 8004c2c: f8 00 05 86 calli 8006244 <rtems_semaphore_obtain> 8004c30: b8 20 68 00 mv r13,r1
if (sc != RTEMS_SUCCESSFUL) {
8004c34: 5c 20 00 e0 bne r1,r0,8004fb4 <rtems_termios_ioctl+0x3c4> <== NEVER TAKEN
args->ioctl_return = sc; return sc; } switch (args->command) {
8004c38: 29 82 00 04 lw r2,(r12+4) 8004c3c: 34 01 00 04 mvi r1,4
8004c40: 44 41 00 ab be r2,r1,8004eec <rtems_termios_ioctl+0x2fc> <== NEVER TAKEN 8004c44: 54 41 00 07 bgu r2,r1,8004c60 <rtems_termios_ioctl+0x70> <== NEVER TAKEN
8004c48: 34 01 00 02 mvi r1,2
8004c4c: 44 41 00 24 be r2,r1,8004cdc <rtems_termios_ioctl+0xec>
8004c50: 54 41 00 9f bgu r2,r1,8004ecc <rtems_termios_ioctl+0x2dc> <== NEVER TAKEN
8004c54: 34 01 00 01 mvi r1,1
8004c58: 5c 41 00 0f bne r2,r1,8004c94 <rtems_termios_ioctl+0xa4> <== NEVER TAKEN
8004c5c: e0 00 00 1b bi 8004cc8 <rtems_termios_ioctl+0xd8>
8004c60: 78 01 40 04 mvhi r1,0x4004 <== NOT EXECUTED 8004c64: 38 21 66 7f ori r1,r1,0x667f <== NOT EXECUTED 8004c68: 44 41 00 c5 be r2,r1,8004f7c <rtems_termios_ioctl+0x38c> <== NOT EXECUTED 8004c6c: 54 41 00 04 bgu r2,r1,8004c7c <rtems_termios_ioctl+0x8c> <== NOT EXECUTED 8004c70: 34 01 00 05 mvi r1,5 <== NOT EXECUTED 8004c74: 5c 41 00 08 bne r2,r1,8004c94 <rtems_termios_ioctl+0xa4> <== NOT EXECUTED 8004c78: e0 00 00 98 bi 8004ed8 <rtems_termios_ioctl+0x2e8> <== NOT EXECUTED 8004c7c: 78 01 40 04 mvhi r1,0x4004 <== NOT EXECUTED 8004c80: 38 21 74 1a ori r1,r1,0x741a <== NOT EXECUTED 8004c84: 44 41 00 ba be r2,r1,8004f6c <rtems_termios_ioctl+0x37c> <== NOT EXECUTED 8004c88: 78 01 80 04 mvhi r1,0x8004 <== NOT EXECUTED 8004c8c: 38 21 74 1b ori r1,r1,0x741b <== NOT EXECUTED 8004c90: 44 41 00 9c be r2,r1,8004f00 <rtems_termios_ioctl+0x310> <== NOT EXECUTED
default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
8004c94: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 8004c98: 78 0d 08 02 mvhi r13,0x802 <== NOT EXECUTED 8004c9c: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8004ca0: 39 ad 57 f8 ori r13,r13,0x57f8 <== NOT EXECUTED 8004ca4: fb ff f1 d5 calli 80013f8 <__ashlsi3> <== NOT EXECUTED 8004ca8: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED 8004cac: 28 23 00 18 lw r3,(r1+24) <== NOT EXECUTED 8004cb0: 34 0d 00 0a mvi r13,10 <== NOT EXECUTED 8004cb4: 44 60 00 be be r3,r0,8004fac <rtems_termios_ioctl+0x3bc> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
8004cb8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8004cbc: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8004cc0: d8 60 00 00 call r3 <== NOT EXECUTED 8004cc4: e0 00 00 a8 bi 8004f64 <rtems_termios_ioctl+0x374> <== NOT EXECUTED
sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios;
8004cc8: 29 81 00 08 lw r1,(r12+8) 8004ccc: 35 62 00 30 addi r2,r11,48 8004cd0: 34 03 00 24 mvi r3,36 8004cd4: f8 00 30 bb calli 8010fc0 <memcpy>
break;
8004cd8: e0 00 00 b5 bi 8004fac <rtems_termios_ioctl+0x3bc>
case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer;
8004cdc: 29 82 00 08 lw r2,(r12+8) 8004ce0: 35 61 00 30 addi r1,r11,48 8004ce4: 34 03 00 24 mvi r3,36 8004ce8: f8 00 30 b6 calli 8010fc0 <memcpy>
/* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) &&
8004cec: 29 61 00 b8 lw r1,(r11+184) 8004cf0: 20 21 02 00 andi r1,r1,0x200
8004cf4: 44 20 00 1d be r1,r0,8004d68 <rtems_termios_ioctl+0x178>
8004cf8: 29 61 00 30 lw r1,(r11+48) 8004cfc: 20 21 04 00 andi r1,r1,0x400
8004d00: 5c 20 00 1a bne r1,r0,8004d68 <rtems_termios_ioctl+0x178> <== ALWAYS TAKEN
!(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
8004d04: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8004d08: 34 01 fd ef mvi r1,-529 <== NOT EXECUTED 8004d0c: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8004d10: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) {
8004d14: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004d18: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 8004d1c: 44 20 00 13 be r1,r0,8004d68 <rtems_termios_ioctl+0x178> <== NOT EXECUTED
/* disable interrupts */ rtems_interrupt_disable(level);
8004d20: 90 00 70 00 rcsr r14,IE <== NOT EXECUTED 8004d24: 34 01 ff fe mvi r1,-2 <== NOT EXECUTED 8004d28: a1 c1 08 00 and r1,r14,r1 <== NOT EXECUTED 8004d2c: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
8004d30: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8004d34: 34 01 ff df mvi r1,-33 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
8004d38: 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;
8004d3c: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8004d40: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
8004d44: 44 60 00 08 be r3,r0,8004d64 <rtems_termios_ioctl+0x174> <== NOT EXECUTED
/* if chars available, call write function... */ (*tty->device.write)(tty->minor,
8004d48: 29 63 00 7c lw r3,(r11+124) <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
8004d4c: 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,
8004d50: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8004d54: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004d58: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED 8004d5c: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8004d60: d8 80 00 00 call r4 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level);
8004d64: d0 0e 00 00 wcsr IE,r14 <== NOT EXECUTED
} } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) &&
8004d68: 29 61 00 b8 lw r1,(r11+184) 8004d6c: 20 21 04 00 andi r1,r1,0x400
8004d70: 44 20 00 0c be r1,r0,8004da0 <rtems_termios_ioctl+0x1b0> <== ALWAYS TAKEN
8004d74: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED 8004d78: 20 21 10 00 andi r1,r1,0x1000 <== NOT EXECUTED 8004d7c: 5c 20 00 09 bne r1,r0,8004da0 <rtems_termios_ioctl+0x1b0> <== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF);
8004d80: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8004d84: 34 01 fb ff mvi r1,-1025 <== NOT EXECUTED 8004d88: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8004d8c: 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);
8004d90: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8004d94: 34 01 ff fd mvi r1,-3 <== NOT EXECUTED 8004d98: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8004d9c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
} /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) &&
8004da0: 29 61 00 b8 lw r1,(r11+184) 8004da4: 20 21 01 00 andi r1,r1,0x100
8004da8: 44 20 00 12 be r1,r0,8004df0 <rtems_termios_ioctl+0x200> <== ALWAYS TAKEN
8004dac: 29 61 00 38 lw r1,(r11+56) <== NOT EXECUTED 8004db0: 48 01 00 10 bg r0,r1,8004df0 <rtems_termios_ioctl+0x200> <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS);
8004db4: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8004db8: 34 01 fe ff mvi r1,-257 <== NOT EXECUTED 8004dbc: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8004dc0: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) &&
8004dc4: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004dc8: 20 21 00 04 andi r1,r1,0x4 <== NOT EXECUTED 8004dcc: 44 20 00 05 be r1,r0,8004de0 <rtems_termios_ioctl+0x1f0> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
8004dd0: 29 62 00 b0 lw r2,(r11+176) <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) &&
8004dd4: 44 40 00 03 be r2,r0,8004de0 <rtems_termios_ioctl+0x1f0> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor);
8004dd8: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004ddc: d8 40 00 00 call r2 <== NOT EXECUTED
} tty->flow_ctrl &= ~(FL_IRTSOFF);
8004de0: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8004de4: 34 01 ff fb mvi r1,-5 <== NOT EXECUTED 8004de8: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8004dec: 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) {
8004df0: 29 61 00 38 lw r1,(r11+56)
8004df4: 4c 20 00 04 bge r1,r0,8004e04 <rtems_termios_ioctl+0x214> <== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDRTS;
8004df8: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004dfc: 38 21 01 00 ori r1,r1,0x100 <== NOT EXECUTED 8004e00: 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) {
8004e04: 29 61 00 30 lw r1,(r11+48) 8004e08: 20 21 10 00 andi r1,r1,0x1000
8004e0c: 44 20 00 04 be r1,r0,8004e1c <rtems_termios_ioctl+0x22c> <== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDXOF;
8004e10: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004e14: 38 21 04 00 ori r1,r1,0x400 <== NOT EXECUTED 8004e18: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
} /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) {
8004e1c: 29 61 00 30 lw r1,(r11+48) 8004e20: 20 21 04 00 andi r1,r1,0x400
8004e24: 44 20 00 04 be r1,r0,8004e34 <rtems_termios_ioctl+0x244> <== NEVER TAKEN
tty->flow_ctrl |= FL_MDXON;
8004e28: 29 61 00 b8 lw r1,(r11+184) 8004e2c: 38 21 02 00 ori r1,r1,0x200 8004e30: 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) {
8004e34: 29 6e 00 3c lw r14,(r11+60) 8004e38: 34 01 00 00 mvi r1,0 8004e3c: 21 ce 00 02 andi r14,r14,0x2
8004e40: 45 c1 00 05 be r14,r1,8004e54 <rtems_termios_ioctl+0x264> <== NEVER TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
8004e44: 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;
8004e48: 59 61 00 6c sw (r11+108),r1
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
8004e4c: 59 61 00 70 sw (r11+112),r1 8004e50: e0 00 00 19 bi 8004eb4 <rtems_termios_ioctl+0x2c4>
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10;
8004e54: 41 6f 00 46 lbu r15,(r11+70) <== NOT EXECUTED 8004e58: f8 00 03 1d calli 8005acc <rtems_clock_get_ticks_per_second><== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] *
8004e5c: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED 8004e60: f8 00 6f 3e calli 8020b58 <__mulsi3> <== NOT EXECUTED 8004e64: 34 02 00 0a mvi r2,10 <== NOT EXECUTED 8004e68: f8 00 6f bb calli 8020d54 <__udivsi3> <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) {
8004e6c: 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] *
8004e70: 59 61 00 54 sw (r11+84),r1 <== NOT EXECUTED 8004e74: 41 63 00 47 lbu r3,(r11+71) <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) {
8004e78: 44 4e 00 08 be r2,r14,8004e98 <rtems_termios_ioctl+0x2a8> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
8004e7c: 59 6e 00 6c sw (r11+108),r14 <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
8004e80: 59 61 00 70 sw (r11+112),r1 <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
8004e84: 44 60 00 03 be r3,r0,8004e90 <rtems_termios_ioctl+0x2a0> <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
8004e88: 59 6e 00 74 sw (r11+116),r14 <== NOT EXECUTED 8004e8c: e0 00 00 0a bi 8004eb4 <rtems_termios_ioctl+0x2c4> <== NOT EXECUTED
else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
8004e90: 59 61 00 74 sw (r11+116),r1 <== NOT EXECUTED 8004e94: e0 00 00 08 bi 8004eb4 <rtems_termios_ioctl+0x2c4> <== NOT EXECUTED
} else { if (tty->termios.c_cc[VMIN]) {
8004e98: 44 62 00 05 be r3,r2,8004eac <rtems_termios_ioctl+0x2bc> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
8004e9c: 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;
8004ea0: 59 62 00 6c sw (r11+108),r2 <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
8004ea4: 59 62 00 70 sw (r11+112),r2 <== NOT EXECUTED 8004ea8: e0 00 00 03 bi 8004eb4 <rtems_termios_ioctl+0x2c4> <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
8004eac: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8004eb0: 59 61 00 6c sw (r11+108),r1 <== NOT EXECUTED
} } } if (tty->device.setAttributes)
8004eb4: 29 63 00 a8 lw r3,(r11+168)
8004eb8: 44 60 00 3d be r3,r0,8004fac <rtems_termios_ioctl+0x3bc> <== NEVER TAKEN
(*tty->device.setAttributes)(tty->minor, &tty->termios);
8004ebc: 29 61 00 10 lw r1,(r11+16) 8004ec0: 35 62 00 30 addi r2,r11,48 8004ec4: d8 60 00 00 call r3 8004ec8: e0 00 00 39 bi 8004fac <rtems_termios_ioctl+0x3bc>
break; case RTEMS_IO_TCDRAIN: drainOutput (tty);
8004ecc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8004ed0: fb ff fe 48 calli 80047f0 <drainOutput> <== NOT EXECUTED
break;
8004ed4: e0 00 00 36 bi 8004fac <rtems_termios_ioctl+0x3bc> <== NOT EXECUTED
case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup;
8004ed8: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED 8004edc: 59 61 00 d4 sw (r11+212),r1 <== NOT EXECUTED 8004ee0: 29 ce 00 04 lw r14,(r14+4) <== NOT EXECUTED 8004ee4: 59 6e 00 d8 sw (r11+216),r14 <== NOT EXECUTED
break;
8004ee8: e0 00 00 31 bi 8004fac <rtems_termios_ioctl+0x3bc> <== NOT EXECUTED
case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup;
8004eec: 29 c2 00 00 lw r2,(r14+0) <== NOT EXECUTED 8004ef0: 59 62 00 dc sw (r11+220),r2 <== NOT EXECUTED 8004ef4: 29 ce 00 04 lw r14,(r14+4) <== NOT EXECUTED 8004ef8: 59 6e 00 e0 sw (r11+224),r14 <== NOT EXECUTED
break;
8004efc: e0 00 00 2c bi 8004fac <rtems_termios_ioctl+0x3bc> <== NOT EXECUTED
#if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
8004f00: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 8004f04: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8004f08: 78 0e 08 02 mvhi r14,0x802 <== NOT EXECUTED 8004f0c: fb ff f1 3b calli 80013f8 <__ashlsi3> <== NOT EXECUTED 8004f10: 39 ce 57 f8 ori r14,r14,0x57f8 <== NOT EXECUTED 8004f14: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8004f18: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED 8004f1c: 44 40 00 04 be r2,r0,8004f2c <rtems_termios_ioctl+0x33c> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
8004f20: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8004f24: d8 40 00 00 call r2 <== NOT EXECUTED 8004f28: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
} tty->t_line=*(int*)(args->buffer);
8004f2c: 29 81 00 08 lw r1,(r12+8) <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
8004f30: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8004f34: 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);
8004f38: 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) {
8004f3c: 34 02 00 05 mvi r2,5 <== NOT EXECUTED 8004f40: 78 0e 08 02 mvhi r14,0x802 <== NOT EXECUTED
* close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer);
8004f44: 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) {
8004f48: fb ff f1 2c calli 80013f8 <__ashlsi3> <== NOT EXECUTED 8004f4c: 39 ce 57 f8 ori r14,r14,0x57f8 <== NOT EXECUTED 8004f50: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 8004f54: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 8004f58: 44 40 00 15 be r2,r0,8004fac <rtems_termios_ioctl+0x3bc> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
8004f5c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8004f60: d8 40 00 00 call r2 <== NOT EXECUTED 8004f64: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 8004f68: e0 00 00 11 bi 8004fac <rtems_termios_ioctl+0x3bc> <== NOT EXECUTED
} break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line;
8004f6c: 29 81 00 08 lw r1,(r12+8) <== NOT EXECUTED 8004f70: 29 62 00 cc lw r2,(r11+204) <== NOT EXECUTED 8004f74: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
break;
8004f78: e0 00 00 0d bi 8004fac <rtems_termios_ioctl+0x3bc> <== NOT EXECUTED
#endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
8004f7c: 29 62 00 60 lw r2,(r11+96) <== NOT EXECUTED 8004f80: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED 8004f84: c8 41 08 00 sub r1,r2,r1 <== NOT EXECUTED
if ( rawnc < 0 )
8004f88: 4c 20 00 03 bge r1,r0,8004f94 <rtems_termios_ioctl+0x3a4> <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
8004f8c: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 8004f90: 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;
8004f94: 29 64 00 20 lw r4,(r11+32) <== NOT EXECUTED 8004f98: 29 62 00 24 lw r2,(r11+36) <== NOT EXECUTED 8004f9c: 29 83 00 08 lw r3,(r12+8) <== NOT EXECUTED 8004fa0: c8 82 10 00 sub r2,r4,r2 <== NOT EXECUTED 8004fa4: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 8004fa8: 58 61 00 00 sw (r3+0),r1 <== NOT EXECUTED
} break; } rtems_semaphore_release (tty->osem);
8004fac: 29 61 00 18 lw r1,(r11+24) 8004fb0: f8 00 04 f5 calli 8006384 <rtems_semaphore_release>
args->ioctl_return = sc; return sc; }
8004fb4: 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;
8004fb8: 59 8d 00 0c sw (r12+12),r13
return sc; }
8004fbc: 2b 9d 00 04 lw ra,(sp+4) 8004fc0: 2b 8b 00 18 lw r11,(sp+24) 8004fc4: 2b 8c 00 14 lw r12,(sp+20) 8004fc8: 2b 8d 00 10 lw r13,(sp+16) 8004fcc: 2b 8e 00 0c lw r14,(sp+12) 8004fd0: 2b 8f 00 08 lw r15,(sp+8) 8004fd4: 37 9c 00 18 addi sp,sp,24 8004fd8: c3 a0 00 00 ret
08005194 <rtems_termios_open>: rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) {
8005194: 37 9c ff d0 addi sp,sp,-48 8005198: 5b 8b 00 30 sw (sp+48),r11 800519c: 5b 8c 00 2c sw (sp+44),r12 80051a0: 5b 8d 00 28 sw (sp+40),r13 80051a4: 5b 8e 00 24 sw (sp+36),r14 80051a8: 5b 8f 00 20 sw (sp+32),r15 80051ac: 5b 90 00 1c sw (sp+28),r16 80051b0: 5b 91 00 18 sw (sp+24),r17 80051b4: 5b 92 00 14 sw (sp+20),r18 80051b8: 5b 93 00 10 sw (sp+16),r19 80051bc: 5b 94 00 0c sw (sp+12),r20 80051c0: 5b 95 00 08 sw (sp+8),r21 80051c4: 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,
80051c8: 78 05 08 02 mvhi r5,0x802 80051cc: 38 a5 59 cc ori r5,r5,0x59cc
rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) {
80051d0: b8 20 88 00 mv r17,r1
struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
80051d4: 28 a1 00 00 lw r1,(r5+0)
rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) {
80051d8: b8 40 90 00 mv r18,r2
struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
80051dc: 34 02 00 00 mvi r2,0
rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) {
80051e0: b8 60 98 00 mv r19,r3
struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
80051e4: b8 40 18 00 mv r3,r2
rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) {
80051e8: b8 80 a0 00 mv r20,r4
struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
80051ec: f8 00 04 16 calli 8006244 <rtems_semaphore_obtain> 80051f0: b8 20 70 00 mv r14,r1
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
80051f4: 5c 20 00 f7 bne r1,r0,80055d0 <rtems_termios_open+0x43c> <== NEVER TAKEN
return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
80051f8: 78 01 08 02 mvhi r1,0x802 80051fc: 38 21 59 d4 ori r1,r1,0x59d4 8005200: 28 2b 00 00 lw r11,(r1+0) 8005204: e0 00 00 06 bi 800521c <rtems_termios_open+0x88>
if ((tty->major == major) && (tty->minor == minor))
8005208: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED 800520c: 5c 31 00 03 bne r1,r17,8005218 <rtems_termios_open+0x84> <== NOT EXECUTED 8005210: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8005214: 44 32 00 ce be r1,r18,800554c <rtems_termios_open+0x3b8> <== NOT EXECUTED
*/ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
8005218: 29 6b 00 00 lw r11,(r11+0) <== NOT EXECUTED
800521c: 34 0d 00 00 mvi r13,0
8005220: 5d 6d ff fa bne r11,r13,8005208 <rtems_termios_open+0x74> <== NEVER TAKEN
8005224: e0 00 00 fa bi 800560c <rtems_termios_open+0x478>
return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
8005228: 78 01 08 02 mvhi r1,0x802 800522c: 38 21 52 38 ori r1,r1,0x5238 8005230: 28 21 00 00 lw r1,(r1+0) 8005234: 59 61 00 64 sw (r11+100),r1
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
8005238: 29 61 00 64 lw r1,(r11+100) 800523c: f8 00 1b 3d calli 800bf30 <malloc> 8005240: 59 61 00 58 sw (r11+88),r1
if (tty->rawInBuf.theBuf == NULL) {
8005244: 5c 20 00 08 bne r1,r0,8005264 <rtems_termios_open+0xd0> <== ALWAYS TAKEN
free(tty);
8005248: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800524c: f8 00 1a 31 calli 800bb10 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
8005250: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8005254: 38 21 59 cc ori r1,r1,0x59cc <== NOT EXECUTED 8005258: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 800525c: 34 0e 00 1a mvi r14,26 <== NOT EXECUTED 8005260: e0 00 00 db bi 80055cc <rtems_termios_open+0x438> <== NOT EXECUTED
return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
8005264: 78 01 08 02 mvhi r1,0x802 8005268: 38 21 52 3c ori r1,r1,0x523c 800526c: 28 21 00 00 lw r1,(r1+0) 8005270: 59 61 00 88 sw (r11+136),r1
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
8005274: 29 61 00 88 lw r1,(r11+136) 8005278: f8 00 1b 2e calli 800bf30 <malloc> 800527c: 59 61 00 7c sw (r11+124),r1
if (tty->rawOutBuf.theBuf == NULL) {
8005280: 5c 20 00 04 bne r1,r0,8005290 <rtems_termios_open+0xfc> <== ALWAYS TAKEN
free((void *)(tty->rawInBuf.theBuf));
8005284: 29 61 00 58 lw r1,(r11+88) <== NOT EXECUTED
free(tty); rtems_semaphore_release (rtems_termios_ttyMutex);
8005288: 34 0e 00 1a mvi r14,26 <== NOT EXECUTED 800528c: e0 00 00 0b bi 80052b8 <rtems_termios_open+0x124> <== NOT EXECUTED
return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE);
8005290: 78 01 08 02 mvhi r1,0x802 8005294: 38 21 52 34 ori r1,r1,0x5234 8005298: 28 21 00 00 lw r1,(r1+0) 800529c: f8 00 1b 25 calli 800bf30 <malloc> 80052a0: 59 61 00 1c sw (r11+28),r1
if (tty->cbuf == NULL) {
80052a4: 5c 20 00 09 bne r1,r0,80052c8 <rtems_termios_open+0x134> <== ALWAYS TAKEN
free((void *)(tty->rawOutBuf.theBuf));
80052a8: 29 61 00 7c lw r1,(r11+124) <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf)); free(tty); rtems_semaphore_release (rtems_termios_ttyMutex);
80052ac: 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));
80052b0: f8 00 1a 18 calli 800bb10 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
80052b4: 29 61 00 58 lw r1,(r11+88) <== NOT EXECUTED 80052b8: f8 00 1a 16 calli 800bb10 <free> <== NOT EXECUTED
free(tty);
80052bc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80052c0: f8 00 1a 14 calli 800bb10 <free> <== NOT EXECUTED 80052c4: e0 00 00 bf bi 80055c0 <rtems_termios_open+0x42c> <== NOT EXECUTED
tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead;
80052c8: 78 01 08 02 mvhi r1,0x802 80052cc: 38 21 59 d4 ori r1,r1,0x59d4 80052d0: 28 21 00 00 lw r1,(r1+0)
return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL;
80052d4: 59 6d 00 d4 sw (r11+212),r13
/* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL;
80052d8: 59 6d 00 04 sw (r11+4),r13
} /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; tty->tty_snd.sw_arg = NULL;
80052dc: 59 6d 00 d8 sw (r11+216),r13
tty->tty_rcv.sw_pfn = NULL;
80052e0: 59 6d 00 dc sw (r11+220),r13
tty->tty_rcv.sw_arg = NULL;
80052e4: 59 6d 00 e0 sw (r11+224),r13
tty->tty_rcvwakeup = 0;
80052e8: 59 6d 00 e4 sw (r11+228),r13
/* * link tty */ tty->forw = rtems_termios_ttyHead;
80052ec: 59 61 00 00 sw (r11+0),r1
tty->back = NULL; if (rtems_termios_ttyHead != NULL)
80052f0: 44 20 00 02 be r1,r0,80052f8 <rtems_termios_open+0x164> <== ALWAYS TAKEN
rtems_termios_ttyHead->back = tty;
80052f4: 58 2b 00 04 sw (r1+4),r11 <== NOT EXECUTED
rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL)
80052f8: 78 05 08 02 mvhi r5,0x802 80052fc: 38 a5 59 d0 ori r5,r5,0x59d0
*/ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty;
8005300: 78 01 08 02 mvhi r1,0x802
if (rtems_termios_ttyTail == NULL)
8005304: 28 a2 00 00 lw r2,(r5+0)
*/ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty;
8005308: 38 21 59 d4 ori r1,r1,0x59d4 800530c: 58 2c 00 00 sw (r1+0),r12
if (rtems_termios_ttyTail == NULL)
8005310: 5c 40 00 02 bne r2,r0,8005318 <rtems_termios_open+0x184> <== NEVER TAKEN
rtems_termios_ttyTail = tty;
8005314: 58 ac 00 00 sw (r5+0),r12
tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create (
8005318: 78 0d 08 02 mvhi r13,0x802
rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor;
800531c: 59 92 00 10 sw (r12+16),r18
tty->major = major;
8005320: 59 91 00 0c sw (r12+12),r17
/* * Set up mutex semaphores */ sc = rtems_semaphore_create (
8005324: 39 ad 52 40 ori r13,r13,0x5240 8005328: 41 a1 00 00 lbu r1,(r13+0) 800532c: 78 05 54 52 mvhi r5,0x5452 8005330: 38 a5 69 00 ori r5,r5,0x6900 8005334: b8 25 08 00 or r1,r1,r5 8005338: 34 02 00 01 mvi r2,1 800533c: 34 03 00 54 mvi r3,84 8005340: 34 04 00 00 mvi r4,0 8005344: 35 85 00 14 addi r5,r12,20 8005348: f8 00 03 11 calli 8005f8c <rtems_semaphore_create> 800534c: b8 20 78 00 mv r15,r1
rtems_build_name ('T', 'R', 'i', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL)
8005350: 5c 20 00 9b bne r1,r0,80055bc <rtems_termios_open+0x428> <== NEVER TAKEN
rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create (
8005354: 41 a1 00 00 lbu r1,(r13+0) 8005358: 78 05 54 52 mvhi r5,0x5452 800535c: 38 a5 6f 00 ori r5,r5,0x6f00 8005360: b8 25 08 00 or r1,r1,r5 8005364: 34 02 00 01 mvi r2,1 8005368: 34 03 00 54 mvi r3,84 800536c: b9 e0 20 00 mv r4,r15 8005370: 35 85 00 18 addi r5,r12,24 8005374: f8 00 03 06 calli 8005f8c <rtems_semaphore_create> 8005378: b8 20 80 00 mv r16,r1
rtems_build_name ('T', 'R', 'o', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL)
800537c: 5c 2f 00 90 bne r1,r15,80055bc <rtems_termios_open+0x428> <== NEVER TAKEN
rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create (
8005380: 41 a1 00 00 lbu r1,(r13+0) 8005384: 78 05 54 52 mvhi r5,0x5452 8005388: 38 a5 78 00 ori r5,r5,0x7800 800538c: b8 25 08 00 or r1,r1,r5 8005390: ba 00 10 00 mv r2,r16 8005394: 34 03 00 20 mvi r3,32 8005398: ba 00 20 00 mv r4,r16 800539c: 35 85 00 8c addi r5,r12,140 80053a0: f8 00 02 fb calli 8005f8c <rtems_semaphore_create> 80053a4: b8 20 78 00 mv r15,r1
rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL)
80053a8: 5c 30 00 85 bne r1,r16,80055bc <rtems_termios_open+0x428> <== NEVER TAKEN
rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle;
80053ac: 59 81 00 94 sw (r12+148),r1
/* * Set callbacks */ tty->device = *callbacks;
80053b0: ba 80 10 00 mv r2,r20 80053b4: 35 81 00 98 addi r1,r12,152 80053b8: 34 03 00 20 mvi r3,32 80053bc: f8 00 2f 01 calli 8010fc0 <memcpy>
/* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
80053c0: 29 82 00 b4 lw r2,(r12+180) 80053c4: 34 01 00 02 mvi r1,2
80053c8: 5c 41 00 18 bne r2,r1,8005428 <rtems_termios_open+0x294> <== ALWAYS TAKEN
sc = rtems_task_create (
80053cc: 41 a1 00 00 lbu r1,(r13+0) <== NOT EXECUTED 80053d0: 78 04 54 78 mvhi r4,0x5478 <== NOT EXECUTED 80053d4: 38 84 54 00 ori r4,r4,0x5400 <== NOT EXECUTED 80053d8: b8 24 08 00 or r1,r1,r4 <== NOT EXECUTED 80053dc: 34 02 00 0a mvi r2,10 <== NOT EXECUTED 80053e0: 34 03 04 00 mvi r3,1024 <== NOT EXECUTED 80053e4: 34 04 05 00 mvi r4,1280 <== NOT EXECUTED 80053e8: b9 e0 28 00 mv r5,r15 <== NOT EXECUTED 80053ec: 35 86 00 c8 addi r6,r12,200 <== NOT EXECUTED 80053f0: f8 00 04 22 calli 8006478 <rtems_task_create> <== NOT EXECUTED 80053f4: b8 20 80 00 mv r16,r1 <== NOT EXECUTED
TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL)
80053f8: 5c 2f 00 71 bne r1,r15,80055bc <rtems_termios_open+0x428> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_task_create (
80053fc: 41 a1 00 00 lbu r1,(r13+0) <== NOT EXECUTED 8005400: 78 04 52 78 mvhi r4,0x5278 <== NOT EXECUTED 8005404: 38 84 54 00 ori r4,r4,0x5400 <== NOT EXECUTED 8005408: b8 24 08 00 or r1,r1,r4 <== NOT EXECUTED 800540c: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 8005410: 34 03 04 00 mvi r3,1024 <== NOT EXECUTED 8005414: 34 04 05 00 mvi r4,1280 <== NOT EXECUTED 8005418: ba 00 28 00 mv r5,r16 <== NOT EXECUTED 800541c: 35 86 00 c4 addi r6,r12,196 <== NOT EXECUTED 8005420: f8 00 04 16 calli 8006478 <rtems_task_create> <== 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)
8005424: 5c 30 00 66 bne r1,r16,80055bc <rtems_termios_open+0x428> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) ||
8005428: 29 81 00 a0 lw r1,(r12+160)
800542c: 44 20 00 04 be r1,r0,800543c <rtems_termios_open+0x2a8> <== NEVER TAKEN
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
8005430: 29 82 00 b4 lw r2,(r12+180) 8005434: 34 01 00 02 mvi r1,2
8005438: 5c 41 00 0d bne r2,r1,800546c <rtems_termios_open+0x2d8> <== ALWAYS TAKEN
sc = rtems_semaphore_create (
800543c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8005440: 38 21 52 40 ori r1,r1,0x5240 <== NOT EXECUTED 8005444: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED 8005448: 78 04 54 52 mvhi r4,0x5452 <== NOT EXECUTED 800544c: 38 84 72 00 ori r4,r4,0x7200 <== NOT EXECUTED 8005450: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8005454: b8 24 08 00 or r1,r1,r4 <== NOT EXECUTED 8005458: 34 03 00 24 mvi r3,36 <== NOT EXECUTED 800545c: b8 40 20 00 mv r4,r2 <== NOT EXECUTED 8005460: 35 85 00 68 addi r5,r12,104 <== NOT EXECUTED 8005464: f8 00 02 ca calli 8005f8c <rtems_semaphore_create> <== 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)
8005468: 5c 20 00 55 bne r1,r0,80055bc <rtems_termios_open+0x428> <== NOT EXECUTED
tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0;
800546c: 34 01 00 00 mvi r1,0
} /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
8005470: 34 15 25 02 mvi r21,9474
tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0;
8005474: 59 81 00 b8 sw (r12+184),r1
} /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
8005478: 59 95 00 30 sw (r12+48),r21
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
800547c: 34 15 18 05 mvi r21,6149
/* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2;
8005480: 29 81 00 64 lw r1,(r12+100)
/* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS;
8005484: 59 95 00 34 sw (r12+52),r21
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
8005488: 34 15 08 bd mvi r21,2237
tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000';
800548c: 34 02 00 00 mvi r2,0
tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004';
8005490: 34 0a 00 04 mvi r10,4
tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021';
8005494: 34 09 00 11 mvi r9,17
tty->termios.c_cc[VSTOP] = '\023';
8005498: 34 08 00 13 mvi r8,19
tty->termios.c_cc[VSUSP] = '\032';
800549c: 34 07 00 1a mvi r7,26
tty->termios.c_cc[VREPRINT] = '\022';
80054a0: 34 06 00 12 mvi r6,18
tty->termios.c_cc[VDISCARD] = '\017';
80054a4: 34 05 00 0f mvi r5,15
tty->termios.c_cc[VWERASE] = '\027';
80054a8: 34 04 00 17 mvi r4,23
tty->termios.c_cc[VLNEXT] = '\026';
80054ac: 34 03 00 16 mvi r3,22
/* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
80054b0: 59 95 00 38 sw (r12+56),r21
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003';
80054b4: 34 14 00 03 mvi r20,3
tty->termios.c_cc[VQUIT] = '\034';
80054b8: 34 10 00 1c mvi r16,28
tty->termios.c_cc[VERASE] = '\177';
80054bc: 34 0f 00 7f mvi r15,127
tty->termios.c_cc[VKILL] = '\025';
80054c0: 34 0d 00 15 mvi r13,21
* Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
80054c4: 38 15 82 3b mvu r21,0x823b
tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004';
80054c8: 31 8a 00 45 sb (r12+69),r10
tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000';
80054cc: 31 82 00 51 sb (r12+81),r2
tty->termios.c_cc[VSTART] = '\021';
80054d0: 31 89 00 49 sb (r12+73),r9
tty->termios.c_cc[VSTOP] = '\023';
80054d4: 31 88 00 4a sb (r12+74),r8
tty->termios.c_cc[VSUSP] = '\032';
80054d8: 31 87 00 4b sb (r12+75),r7
tty->termios.c_cc[VREPRINT] = '\022';
80054dc: 31 86 00 4d sb (r12+77),r6
tty->termios.c_cc[VDISCARD] = '\017';
80054e0: 31 85 00 4e sb (r12+78),r5
tty->termios.c_cc[VWERASE] = '\027';
80054e4: 31 84 00 4f sb (r12+79),r4
tty->termios.c_cc[VLNEXT] = '\026';
80054e8: 31 83 00 50 sb (r12+80),r3
tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000';
80054ec: 31 82 00 4c sb (r12+76),r2
* Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
80054f0: 59 95 00 3c sw (r12+60),r21
/* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2;
80054f4: 34 02 00 01 mvi r2,1
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003';
80054f8: 31 94 00 41 sb (r12+65),r20
tty->termios.c_cc[VQUIT] = '\034';
80054fc: 31 90 00 42 sb (r12+66),r16
tty->termios.c_cc[VERASE] = '\177';
8005500: 31 8f 00 43 sb (r12+67),r15
tty->termios.c_cc[VKILL] = '\025';
8005504: 31 8d 00 44 sb (r12+68),r13
/* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2;
8005508: fb ff ef e4 calli 8001498 <__lshrsi3>
tty->highwater = tty->rawInBuf.Size * 3/4;
800550c: 29 84 00 64 lw r4,(r12+100)
/* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2;
8005510: 59 81 00 bc sw (r12+188),r1
tty->highwater = tty->rawInBuf.Size * 3/4;
8005514: 34 02 00 02 mvi r2,2 8005518: b4 84 08 00 add r1,r4,r4 800551c: b4 24 08 00 add r1,r1,r4 8005520: fb ff ef de calli 8001498 <__lshrsi3>
/* * Bump name characer */ if (c++ == 'z')
8005524: 78 04 08 02 mvhi r4,0x802
tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4;
8005528: 59 81 00 c0 sw (r12+192),r1
/* * Bump name characer */ if (c++ == 'z')
800552c: 38 84 52 40 ori r4,r4,0x5240 8005530: 40 81 00 00 lbu r1,(r4+0) 8005534: 34 22 00 01 addi r2,r1,1 8005538: 30 82 00 00 sb (r4+0),r2 800553c: 34 02 00 7a mvi r2,122
8005540: 5c 22 00 03 bne r1,r2,800554c <rtems_termios_open+0x3b8> <== ALWAYS TAKEN
c = 'a';
8005544: 34 01 00 61 mvi r1,97 <== NOT EXECUTED 8005548: 30 81 00 00 sb (r4+0),r1 <== NOT EXECUTED
} args->iop->data1 = tty; if (!tty->refcount++) {
800554c: 29 62 00 08 lw r2,(r11+8)
*/ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty;
8005550: 2a 63 00 00 lw r3,(r19+0)
if (!tty->refcount++) {
8005554: 34 41 00 01 addi r1,r2,1
*/ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty;
8005558: 58 6b 00 38 sw (r3+56),r11
if (!tty->refcount++) {
800555c: 59 61 00 08 sw (r11+8),r1
8005560: 5c 40 00 18 bne r2,r0,80055c0 <rtems_termios_open+0x42c> <== NEVER TAKEN
if (tty->device.firstOpen)
8005564: 29 64 00 98 lw r4,(r11+152)
8005568: 44 82 00 05 be r4,r2,800557c <rtems_termios_open+0x3e8> <== ALWAYS TAKEN
(*tty->device.firstOpen)(major, minor, arg);
800556c: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8005570: ba 40 10 00 mv r2,r18 <== NOT EXECUTED 8005574: ba 60 18 00 mv r3,r19 <== NOT EXECUTED 8005578: d8 80 00 00 call r4 <== NOT EXECUTED
/* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
800557c: 29 62 00 b4 lw r2,(r11+180) 8005580: 34 01 00 02 mvi r1,2
8005584: 5c 41 00 0f bne r2,r1,80055c0 <rtems_termios_open+0x42c> <== ALWAYS TAKEN
sc = rtems_task_start(tty->rxTaskId,
8005588: 29 61 00 c4 lw r1,(r11+196) <== NOT EXECUTED 800558c: 78 02 08 00 mvhi r2,0x800 <== NOT EXECUTED 8005590: 38 42 56 b4 ori r2,r2,0x56b4 <== NOT EXECUTED 8005594: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8005598: f8 00 04 74 calli 8006768 <rtems_task_start> <== NOT EXECUTED 800559c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL)
80055a0: 5c 20 00 07 bne r1,r0,80055bc <rtems_termios_open+0x428> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId,
80055a4: 29 61 00 c8 lw r1,(r11+200) <== NOT EXECUTED 80055a8: 78 02 08 00 mvhi r2,0x800 <== NOT EXECUTED 80055ac: 38 42 56 28 ori r2,r2,0x5628 <== NOT EXECUTED 80055b0: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 80055b4: f8 00 04 6d calli 8006768 <rtems_task_start> <== NOT EXECUTED
rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL)
80055b8: 44 2c 00 02 be r1,r12,80055c0 <rtems_termios_open+0x42c> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
80055bc: f8 00 05 1b calli 8006a28 <rtems_fatal_error_occurred> <== NOT EXECUTED
} } rtems_semaphore_release (rtems_termios_ttyMutex);
80055c0: 78 01 08 02 mvhi r1,0x802 80055c4: 38 21 59 cc ori r1,r1,0x59cc 80055c8: 28 21 00 00 lw r1,(r1+0) 80055cc: f8 00 03 6e calli 8006384 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL; }
80055d0: b9 c0 08 00 mv r1,r14 80055d4: 2b 9d 00 04 lw ra,(sp+4) 80055d8: 2b 8b 00 30 lw r11,(sp+48) 80055dc: 2b 8c 00 2c lw r12,(sp+44) 80055e0: 2b 8d 00 28 lw r13,(sp+40) 80055e4: 2b 8e 00 24 lw r14,(sp+36) 80055e8: 2b 8f 00 20 lw r15,(sp+32) 80055ec: 2b 90 00 1c lw r16,(sp+28) 80055f0: 2b 91 00 18 lw r17,(sp+24) 80055f4: 2b 92 00 14 lw r18,(sp+20) 80055f8: 2b 93 00 10 lw r19,(sp+16) 80055fc: 2b 94 00 0c lw r20,(sp+12) 8005600: 2b 95 00 08 lw r21,(sp+8) 8005604: 37 9c 00 30 addi sp,sp,48 8005608: c3 a0 00 00 ret
static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty));
800560c: 34 01 00 01 mvi r1,1 8005610: 34 02 00 e8 mvi r2,232 8005614: f8 00 19 20 calli 800ba94 <calloc> 8005618: b8 20 58 00 mv r11,r1 800561c: b8 20 60 00 mv r12,r1
if (tty == NULL) {
8005620: 5c 20 ff 02 bne r1,r0,8005228 <rtems_termios_open+0x94> <== ALWAYS TAKEN
8005624: e3 ff ff 0b bi 8005250 <rtems_termios_open+0xbc> <== NOT EXECUTED
08003f38 <rtems_termios_puts>: * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) {
8003f38: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8003f3c: 5b 8b 00 24 sw (sp+36),r11 <== NOT EXECUTED 8003f40: 5b 8c 00 20 sw (sp+32),r12 <== NOT EXECUTED 8003f44: 5b 8d 00 1c sw (sp+28),r13 <== NOT EXECUTED 8003f48: 5b 8e 00 18 sw (sp+24),r14 <== NOT EXECUTED 8003f4c: 5b 8f 00 14 sw (sp+20),r15 <== NOT EXECUTED 8003f50: 5b 90 00 10 sw (sp+16),r16 <== NOT EXECUTED 8003f54: 5b 91 00 0c sw (sp+12),r17 <== NOT EXECUTED 8003f58: 5b 92 00 08 sw (sp+8),r18 <== NOT EXECUTED 8003f5c: 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) {
8003f60: 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) {
8003f64: b8 60 58 00 mv r11,r3 <== NOT EXECUTED 8003f68: b8 40 68 00 mv r13,r2 <== NOT EXECUTED 8003f6c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
const unsigned char *buf = _buf;
8003f70: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
8003f74: 5c 80 00 07 bne r4,r0,8003f90 <rtems_termios_puts+0x58> <== NOT EXECUTED
(*tty->device.write)(tty->minor, (void *)buf, len);
8003f78: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8003f7c: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8003f80: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 8003f84: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED 8003f88: d8 80 00 00 call r4 <== NOT EXECUTED
return;
8003f8c: e0 00 00 36 bi 8004064 <rtems_termios_puts+0x12c> <== NOT EXECUTED
} newHead = tty->rawOutBuf.Head;
8003f90: 29 6c 00 80 lw r12,(r11+128) <== NOT EXECUTED
* * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level);
8003f94: 34 10 ff fe mvi r16,-2 <== NOT EXECUTED
while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait;
8003f98: 34 12 00 02 mvi r18,2 <== NOT EXECUTED
} else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy;
8003f9c: 34 11 00 01 mvi r17,1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) {
8003fa0: e0 00 00 30 bi 8004060 <rtems_termios_puts+0x128> <== NOT EXECUTED
* len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size;
8003fa4: 29 62 00 88 lw r2,(r11+136) <== NOT EXECUTED 8003fa8: 35 81 00 01 addi r1,r12,1 <== NOT EXECUTED 8003fac: f8 00 73 7a calli 8020d94 <__umodsi3> <== NOT EXECUTED 8003fb0: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
rtems_interrupt_disable (level);
8003fb4: 90 00 78 00 rcsr r15,IE <== NOT EXECUTED 8003fb8: a1 f0 08 00 and r1,r15,r16 <== NOT EXECUTED 8003fbc: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
while (newHead == tty->rawOutBuf.Tail) {
8003fc0: e0 00 00 0c bi 8003ff0 <rtems_termios_puts+0xb8> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
8003fc4: 59 72 00 94 sw (r11+148),r18 <== NOT EXECUTED
rtems_interrupt_enable (level);
8003fc8: d0 0f 00 00 wcsr IE,r15 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
8003fcc: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED 8003fd0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8003fd4: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 8003fd8: f8 00 08 9b calli 8006244 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
8003fdc: 44 20 00 02 be r1,r0,8003fe4 <rtems_termios_puts+0xac> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
8003fe0: f8 00 0a 92 calli 8006a28 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
8003fe4: 90 00 78 00 rcsr r15,IE <== NOT EXECUTED 8003fe8: a1 f0 08 00 and r1,r15,r16 <== NOT EXECUTED 8003fec: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
* To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) {
8003ff0: 29 61 00 84 lw r1,(r11+132) <== NOT EXECUTED 8003ff4: 45 81 ff f4 be r12,r1,8003fc4 <rtems_termios_puts+0x8c> <== 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++;
8003ff8: 29 61 00 80 lw r1,(r11+128) <== NOT EXECUTED 8003ffc: 29 62 00 7c lw r2,(r11+124) <== NOT EXECUTED 8004000: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED 8004004: 41 c2 00 00 lbu r2,(r14+0) <== NOT EXECUTED 8004008: 30 22 00 00 sb (r1+0),r2 <== NOT EXECUTED
tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) {
800400c: 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;
8004010: 59 6c 00 80 sw (r11+128),r12 <== NOT EXECUTED
if (tty->rawOutBufState == rob_idle) {
8004014: 5c 20 00 10 bne r1,r0,8004054 <rtems_termios_puts+0x11c> <== NOT EXECUTED
/* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) {
8004018: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 800401c: 20 42 00 10 andi r2,r2,0x10 <== NOT EXECUTED 8004020: 5c 41 00 09 bne r2,r1,8004044 <rtems_termios_puts+0x10c> <== NOT EXECUTED
(*tty->device.write)(tty->minor,
8004024: 29 63 00 7c lw r3,(r11+124) <== NOT EXECUTED
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
8004028: 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,
800402c: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8004030: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004034: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED 8004038: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 800403c: d8 80 00 00 call r4 <== NOT EXECUTED 8004040: e0 00 00 04 bi 8004050 <rtems_termios_puts+0x118> <== NOT EXECUTED
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP;
8004044: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004048: 38 21 00 20 ori r1,r1,0x20 <== NOT EXECUTED 800404c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
} tty->rawOutBufState = rob_busy;
8004050: 59 71 00 94 sw (r11+148),r17 <== NOT EXECUTED
RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
8004054: 35 ce 00 01 addi r14,r14,1 <== NOT EXECUTED
/* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level);
8004058: d0 0f 00 00 wcsr IE,r15 <== NOT EXECUTED
len--;
800405c: 35 ad ff ff addi r13,r13,-1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) {
8004060: 5d a0 ff d1 bne r13,r0,8003fa4 <rtems_termios_puts+0x6c> <== NOT EXECUTED
tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } }
8004064: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004068: 2b 8b 00 24 lw r11,(sp+36) <== NOT EXECUTED 800406c: 2b 8c 00 20 lw r12,(sp+32) <== NOT EXECUTED 8004070: 2b 8d 00 1c lw r13,(sp+28) <== NOT EXECUTED 8004074: 2b 8e 00 18 lw r14,(sp+24) <== NOT EXECUTED 8004078: 2b 8f 00 14 lw r15,(sp+20) <== NOT EXECUTED 800407c: 2b 90 00 10 lw r16,(sp+16) <== NOT EXECUTED 8004080: 2b 91 00 0c lw r17,(sp+12) <== NOT EXECUTED 8004084: 2b 92 00 08 lw r18,(sp+8) <== NOT EXECUTED 8004088: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 800408c: c3 a0 00 00 ret <== NOT EXECUTED
08004880 <rtems_termios_read>: return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) {
8004880: 37 9c ff cc addi sp,sp,-52 <== NOT EXECUTED 8004884: 5b 8b 00 34 sw (sp+52),r11 <== NOT EXECUTED 8004888: 5b 8c 00 30 sw (sp+48),r12 <== NOT EXECUTED 800488c: 5b 8d 00 2c sw (sp+44),r13 <== NOT EXECUTED 8004890: 5b 8e 00 28 sw (sp+40),r14 <== NOT EXECUTED 8004894: 5b 8f 00 24 sw (sp+36),r15 <== NOT EXECUTED 8004898: 5b 90 00 20 sw (sp+32),r16 <== NOT EXECUTED 800489c: 5b 91 00 1c sw (sp+28),r17 <== NOT EXECUTED 80048a0: 5b 92 00 18 sw (sp+24),r18 <== NOT EXECUTED 80048a4: 5b 93 00 14 sw (sp+20),r19 <== NOT EXECUTED 80048a8: 5b 94 00 10 sw (sp+16),r20 <== NOT EXECUTED 80048ac: 5b 95 00 0c sw (sp+12),r21 <== NOT EXECUTED 80048b0: 5b 96 00 08 sw (sp+8),r22 <== NOT EXECUTED 80048b4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 80048b8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
80048bc: 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);
80048c0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 80048c4: 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;
80048c8: 28 2b 00 38 lw r11,(r1+56) <== NOT EXECUTED
uint32_t count = args->count;
80048cc: 29 8e 00 14 lw r14,(r12+20) <== NOT EXECUTED
char *buffer = args->buffer;
80048d0: 29 92 00 10 lw r18,(r12+16) <== NOT EXECUTED
rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
80048d4: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 80048d8: f8 00 06 5b calli 8006244 <rtems_semaphore_obtain> <== NOT EXECUTED 80048dc: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
80048e0: 5c 20 00 b4 bne r1,r0,8004bb0 <rtems_termios_read+0x330> <== NOT EXECUTED
return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
80048e4: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 80048e8: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80048ec: 78 0f 08 02 mvhi r15,0x802 <== NOT EXECUTED 80048f0: fb ff f2 c2 calli 80013f8 <__ashlsi3> <== NOT EXECUTED 80048f4: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 80048f8: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 80048fc: fb ff f2 bf calli 80013f8 <__ashlsi3> <== NOT EXECUTED 8004900: 39 ef 57 f8 ori r15,r15,0x57f8 <== NOT EXECUTED 8004904: b5 e1 08 00 add r1,r15,r1 <== NOT EXECUTED 8004908: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED 800490c: 44 6d 00 09 be r3,r13,8004930 <rtems_termios_read+0xb0> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
8004910: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8004914: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8004918: d8 60 00 00 call r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
800491c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
8004920: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
8004924: 59 62 00 e4 sw (r11+228),r2 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
8004928: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 800492c: e0 00 00 a0 bi 8004bac <rtems_termios_read+0x32c> <== NOT EXECUTED
return sc; } if (tty->cindex == tty->ccount) {
8004930: 29 62 00 24 lw r2,(r11+36) <== NOT EXECUTED 8004934: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 8004938: 5c 41 00 92 bne r2,r1,8004b80 <rtems_termios_read+0x300> <== NOT EXECUTED
tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column;
800493c: 29 62 00 28 lw r2,(r11+40) <== NOT EXECUTED
if (tty->device.pollRead != NULL
8004940: 29 61 00 a0 lw r1,(r11+160) <== NOT EXECUTED
tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0;
8004944: 59 6d 00 20 sw (r11+32),r13 <== NOT EXECUTED
tty->read_start_column = tty->column;
8004948: 59 62 00 2c sw (r11+44),r2 <== NOT EXECUTED
tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0;
800494c: 59 6d 00 24 sw (r11+36),r13 <== NOT EXECUTED
tty->read_start_column = tty->column; if (tty->device.pollRead != NULL
8004950: 44 20 00 32 be r1,r0,8004a18 <rtems_termios_read+0x198> <== NOT EXECUTED
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
8004954: 29 61 00 b4 lw r1,(r11+180) <== NOT EXECUTED 8004958: 5c 20 00 30 bne r1,r0,8004a18 <rtems_termios_read+0x198> <== NOT EXECUTED
static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) {
800495c: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 8004960: 20 21 00 02 andi r1,r1,0x2 <== NOT EXECUTED 8004964: 44 20 00 0e be r1,r0,800499c <rtems_termios_read+0x11c> <== NOT EXECUTED
for (;;) { n = (*tty->device.pollRead)(tty->minor);
8004968: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED 800496c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004970: d8 40 00 00 call r2 <== NOT EXECUTED 8004974: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty))
8004978: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 800497c: 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) {
8004980: 4c 60 00 04 bge r3,r0,8004990 <rtems_termios_read+0x110> <== NOT EXECUTED
rtems_task_wake_after (1);
8004984: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 8004988: f8 00 07 98 calli 80067e8 <rtems_task_wake_after> <== NOT EXECUTED 800498c: e3 ff ff f7 bi 8004968 <rtems_termios_read+0xe8> <== NOT EXECUTED
} else { if (siproc (n, tty))
8004990: fb ff ff 3d calli 8004684 <siproc> <== NOT EXECUTED 8004994: 44 20 ff f5 be r1,r0,8004968 <rtems_termios_read+0xe8> <== NOT EXECUTED 8004998: e0 00 00 7a bi 8004b80 <rtems_termios_read+0x300> <== NOT EXECUTED
} } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot();
800499c: f8 00 04 57 calli 8005af8 <rtems_clock_get_ticks_since_boot><== NOT EXECUTED 80049a0: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
for (;;) { n = (*tty->device.pollRead)(tty->minor);
80049a4: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED 80049a8: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 80049ac: d8 40 00 00 call r2 <== NOT EXECUTED
if (n < 0) {
80049b0: 4c 20 00 10 bge r1,r0,80049f0 <rtems_termios_read+0x170> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
80049b4: 41 61 00 47 lbu r1,(r11+71) <== NOT EXECUTED 80049b8: 41 62 00 46 lbu r2,(r11+70) <== NOT EXECUTED 80049bc: 44 20 00 05 be r1,r0,80049d0 <rtems_termios_read+0x150> <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
80049c0: 44 40 00 09 be r2,r0,80049e4 <rtems_termios_read+0x164> <== NOT EXECUTED 80049c4: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED 80049c8: 44 20 00 07 be r1,r0,80049e4 <rtems_termios_read+0x164> <== NOT EXECUTED 80049cc: e0 00 00 02 bi 80049d4 <rtems_termios_read+0x154> <== NOT EXECUTED
break; } } } else { if (!tty->termios.c_cc[VTIME])
80049d0: 44 41 00 6c be r2,r1,8004b80 <rtems_termios_read+0x300> <== NOT EXECUTED
break; now = rtems_clock_get_ticks_since_boot();
80049d4: f8 00 04 49 calli 8005af8 <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
80049d8: 29 62 00 54 lw r2,(r11+84) <== NOT EXECUTED 80049dc: c8 2f 08 00 sub r1,r1,r15 <== NOT EXECUTED 80049e0: 54 22 00 68 bgu r1,r2,8004b80 <rtems_termios_read+0x300> <== NOT EXECUTED
break; } } rtems_task_wake_after (1);
80049e4: 34 01 00 01 mvi r1,1 <== NOT EXECUTED 80049e8: f8 00 07 80 calli 80067e8 <rtems_task_wake_after> <== NOT EXECUTED 80049ec: e3 ff ff ee bi 80049a4 <rtems_termios_read+0x124> <== NOT EXECUTED
} else { siproc (n, tty);
80049f0: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80049f4: 20 21 00 ff andi r1,r1,0xff <== NOT EXECUTED 80049f8: fb ff ff 23 calli 8004684 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
80049fc: 41 61 00 47 lbu r1,(r11+71) <== NOT EXECUTED 8004a00: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED 8004a04: 4c 41 00 5f bge r2,r1,8004b80 <rtems_termios_read+0x300> <== NOT EXECUTED
break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
8004a08: 44 20 ff e7 be r1,r0,80049a4 <rtems_termios_read+0x124> <== NOT EXECUTED 8004a0c: 41 61 00 46 lbu r1,(r11+70) <== NOT EXECUTED 8004a10: 44 20 ff e5 be r1,r0,80049a4 <rtems_termios_read+0x124> <== NOT EXECUTED 8004a14: e3 ff ff e2 bi 800499c <rtems_termios_read+0x11c> <== NOT EXECUTED
while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
8004a18: 78 0f 08 02 mvhi r15,0x802 <== NOT EXECUTED 8004a1c: 39 ef 52 34 ori r15,r15,0x5234 <== NOT EXECUTED
* Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
8004a20: 29 71 00 74 lw r17,(r11+116) <== NOT EXECUTED
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor,
8004a24: 35 76 00 49 addi r22,r11,73 <== NOT EXECUTED 8004a28: 34 10 00 01 mvi r16,1 <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF;
8004a2c: 34 15 ff fe mvi r21,-2 <== NOT EXECUTED
/* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
8004a30: 34 14 02 02 mvi r20,514 <== NOT EXECUTED
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF;
8004a34: 34 13 ff fb mvi r19,-5 <== NOT EXECUTED 8004a38: e0 00 00 3d bi 8004b2c <rtems_termios_read+0x2ac> <== 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;
8004a3c: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED 8004a40: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 8004a44: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 8004a48: f8 00 70 d3 calli 8020d94 <__umodsi3> <== NOT EXECUTED 8004a4c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
8004a50: 29 61 00 58 lw r1,(r11+88) <== NOT EXECUTED 8004a54: b4 23 08 00 add r1,r1,r3 <== NOT EXECUTED 8004a58: 40 31 00 00 lbu r17,(r1+0) <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
8004a5c: 59 63 00 5c sw (r11+92),r3 <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
8004a60: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED 8004a64: 29 64 00 64 lw r4,(r11+100) <== NOT EXECUTED 8004a68: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED 8004a6c: b4 81 08 00 add r1,r4,r1 <== NOT EXECUTED 8004a70: c8 23 08 00 sub r1,r1,r3 <== NOT EXECUTED 8004a74: f8 00 70 c8 calli 8020d94 <__umodsi3> <== NOT EXECUTED 8004a78: 29 62 00 bc lw r2,(r11+188) <== NOT EXECUTED 8004a7c: 50 22 00 1c bgeu r1,r2,8004aec <rtems_termios_read+0x26c> <== NOT EXECUTED
% tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF;
8004a80: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004a84: a0 35 08 00 and r1,r1,r21 <== NOT EXECUTED 8004a88: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
8004a8c: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004a90: 20 21 02 02 andi r1,r1,0x202 <== NOT EXECUTED 8004a94: 5c 34 00 0c bne r1,r20,8004ac4 <rtems_termios_read+0x244> <== NOT EXECUTED 8004a98: 29 61 00 94 lw r1,(r11+148) <== NOT EXECUTED 8004a9c: 44 20 00 04 be r1,r0,8004aac <rtems_termios_read+0x22c> <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) {
8004aa0: 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))
8004aa4: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED 8004aa8: 44 20 00 07 be r1,r0,8004ac4 <rtems_termios_read+0x244> <== 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,
8004aac: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8004ab0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004ab4: ba c0 10 00 mv r2,r22 <== NOT EXECUTED 8004ab8: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8004abc: d8 80 00 00 call r4 <== NOT EXECUTED 8004ac0: e0 00 00 0b bi 8004aec <rtems_termios_read+0x26c> <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) {
8004ac4: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED 8004ac8: 20 21 01 00 andi r1,r1,0x100 <== NOT EXECUTED 8004acc: 44 20 00 08 be r1,r0,8004aec <rtems_termios_read+0x26c> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
8004ad0: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
/* activate RTS line */ if (tty->device.startRemoteTx != NULL) {
8004ad4: 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;
8004ad8: a0 33 08 00 and r1,r1,r19 <== NOT EXECUTED 8004adc: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* activate RTS line */ if (tty->device.startRemoteTx != NULL) {
8004ae0: 44 60 00 03 be r3,r0,8004aec <rtems_termios_read+0x26c> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
8004ae4: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8004ae8: d8 60 00 00 call r3 <== NOT EXECUTED
} } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) {
8004aec: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED 8004af0: 20 21 00 02 andi r1,r1,0x2 <== NOT EXECUTED 8004af4: 44 20 00 06 be r1,r0,8004b0c <rtems_termios_read+0x28c> <== NOT EXECUTED
if (siproc (c, tty))
8004af8: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8004afc: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004b00: fb ff fe e1 calli 8004684 <siproc> <== NOT EXECUTED 8004b04: 5c 20 00 08 bne r1,r0,8004b24 <rtems_termios_read+0x2a4> <== NOT EXECUTED 8004b08: e0 00 00 08 bi 8004b28 <rtems_termios_read+0x2a8> <== NOT EXECUTED
wait = 0; } else { siproc (c, tty);
8004b0c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 8004b10: ba 20 08 00 mv r1,r17 <== NOT EXECUTED 8004b14: fb ff fe dc calli 8004684 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
8004b18: 41 61 00 47 lbu r1,(r11+71) <== NOT EXECUTED 8004b1c: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED 8004b20: 48 22 00 02 bg r1,r2,8004b28 <rtems_termios_read+0x2a8> <== NOT EXECUTED 8004b24: 34 10 00 00 mvi r16,0 <== NOT EXECUTED
wait = 0; } timeout = tty->rawInBufSemaphoreTimeout;
8004b28: 29 71 00 70 lw r17,(r11+112) <== NOT EXECUTED
while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
8004b2c: 29 62 00 5c lw r2,(r11+92) <== NOT EXECUTED 8004b30: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED 8004b34: 44 41 00 05 be r2,r1,8004b48 <rtems_termios_read+0x2c8> <== NOT EXECUTED 8004b38: 29 e1 00 00 lw r1,(r15+0) <== NOT EXECUTED 8004b3c: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED 8004b40: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED 8004b44: 48 22 ff be bg r1,r2,8004a3c <rtems_termios_read+0x1bc> <== NOT EXECUTED
} /* * Wait for characters */ if ( wait ) {
8004b48: 46 00 00 0e be r16,r0,8004b80 <rtems_termios_read+0x300> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
8004b4c: 29 61 00 68 lw r1,(r11+104) <== NOT EXECUTED 8004b50: 29 62 00 6c lw r2,(r11+108) <== NOT EXECUTED 8004b54: ba 20 18 00 mv r3,r17 <== NOT EXECUTED 8004b58: f8 00 05 bb calli 8006244 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL)
8004b5c: 44 20 ff f4 be r1,r0,8004b2c <rtems_termios_read+0x2ac> <== NOT EXECUTED 8004b60: e0 00 00 08 bi 8004b80 <rtems_termios_read+0x300> <== 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++];
8004b64: 29 63 00 1c lw r3,(r11+28) <== NOT EXECUTED
count--;
8004b68: 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++];
8004b6c: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 8004b70: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED 8004b74: 32 41 00 00 sb (r18+0),r1 <== NOT EXECUTED 8004b78: 59 62 00 24 sw (r11+36),r2 <== NOT EXECUTED 8004b7c: 36 52 00 01 addi r18,r18,1 <== NOT EXECUTED
else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) {
8004b80: 45 c0 00 05 be r14,r0,8004b94 <rtems_termios_read+0x314> <== NOT EXECUTED 8004b84: 29 61 00 24 lw r1,(r11+36) <== NOT EXECUTED 8004b88: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
8004b8c: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED
else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) {
8004b90: 48 61 ff f5 bg r3,r1,8004b64 <rtems_termios_read+0x2e4> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count;
8004b94: 29 82 00 14 lw r2,(r12+20) <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
8004b98: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8004b9c: 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;
8004ba0: c8 4e 70 00 sub r14,r2,r14 <== NOT EXECUTED 8004ba4: 59 8e 00 1c sw (r12+28),r14 <== NOT EXECUTED
tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem);
8004ba8: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED 8004bac: f8 00 05 f6 calli 8006384 <rtems_semaphore_release> <== NOT EXECUTED
return sc; }
8004bb0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8004bb4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8004bb8: 2b 8b 00 34 lw r11,(sp+52) <== NOT EXECUTED 8004bbc: 2b 8c 00 30 lw r12,(sp+48) <== NOT EXECUTED 8004bc0: 2b 8d 00 2c lw r13,(sp+44) <== NOT EXECUTED 8004bc4: 2b 8e 00 28 lw r14,(sp+40) <== NOT EXECUTED 8004bc8: 2b 8f 00 24 lw r15,(sp+36) <== NOT EXECUTED 8004bcc: 2b 90 00 20 lw r16,(sp+32) <== NOT EXECUTED 8004bd0: 2b 91 00 1c lw r17,(sp+28) <== NOT EXECUTED 8004bd4: 2b 92 00 18 lw r18,(sp+24) <== NOT EXECUTED 8004bd8: 2b 93 00 14 lw r19,(sp+20) <== NOT EXECUTED 8004bdc: 2b 94 00 10 lw r20,(sp+16) <== NOT EXECUTED 8004be0: 2b 95 00 0c lw r21,(sp+12) <== NOT EXECUTED 8004be4: 2b 96 00 08 lw r22,(sp+8) <== NOT EXECUTED 8004be8: 37 9c 00 34 addi sp,sp,52 <== NOT EXECUTED 8004bec: c3 a0 00 00 ret <== NOT EXECUTED
08003980 <rtems_termios_refill_transmitter>: * 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) {
8003980: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED 8003984: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8003988: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 800398c: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8003990: 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))
8003994: 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) {
8003998: 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))
800399c: 34 01 04 01 mvi r1,1025 <== NOT EXECUTED 80039a0: 20 42 04 03 andi r2,r2,0x403 <== NOT EXECUTED 80039a4: 5c 41 00 12 bne r2,r1,80039ec <rtems_termios_refill_transmitter+0x6c><== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor,
80039a8: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 80039ac: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 80039b0: 35 62 00 4a addi r2,r11,74 <== NOT EXECUTED 80039b4: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 80039b8: d8 80 00 00 call r4 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level);
80039bc: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 80039c0: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 80039c4: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 80039c8: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
tty->t_dqlen--;
80039cc: 29 62 00 90 lw r2,(r11+144) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
80039d0: 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--;
80039d4: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
80039d8: 38 63 00 02 ori r3,r3,0x2 <== NOT EXECUTED 80039dc: 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--;
80039e0: 59 62 00 90 sw (r11+144),r2 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level);
80039e4: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED 80039e8: e0 00 00 16 bi 8003a40 <rtems_termios_refill_transmitter+0xc0><== NOT EXECUTED
nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
80039ec: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 80039f0: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 80039f4: 20 42 00 03 andi r2,r2,0x3 <== NOT EXECUTED 80039f8: 5c 41 00 14 bne r2,r1,8003a48 <rtems_termios_refill_transmitter+0xc8><== 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,
80039fc: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8003a00: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 8003a04: 35 62 00 49 addi r2,r11,73 <== NOT EXECUTED 8003a08: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003a0c: d8 80 00 00 call r4 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level);
8003a10: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8003a14: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 8003a18: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 8003a1c: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
tty->t_dqlen--;
8003a20: 29 62 00 90 lw r2,(r11+144) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
8003a24: 29 64 00 b8 lw r4,(r11+184) <== NOT EXECUTED 8003a28: 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--;
8003a2c: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
8003a30: a0 83 18 00 and r3,r4,r3 <== NOT EXECUTED 8003a34: 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--;
8003a38: 59 62 00 90 sw (r11+144),r2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level);
8003a3c: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED 8003a40: 34 0c 00 01 mvi r12,1 <== NOT EXECUTED 8003a44: e0 00 00 4c bi 8003b74 <rtems_termios_refill_transmitter+0x1f4><== NOT EXECUTED
nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
8003a48: 29 63 00 80 lw r3,(r11+128) <== NOT EXECUTED 8003a4c: 29 62 00 84 lw r2,(r11+132) <== NOT EXECUTED 8003a50: 5c 62 00 07 bne r3,r2,8003a6c <rtems_termios_refill_transmitter+0xec><== NOT EXECUTED
/* * buffer was empty */ if (tty->rawOutBufState == rob_wait) {
8003a54: 29 62 00 94 lw r2,(r11+148) <== NOT EXECUTED 8003a58: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 8003a5c: 5c 41 00 46 bne r2,r1,8003b74 <rtems_termios_refill_transmitter+0x1f4><== NOT EXECUTED
/* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore);
8003a60: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED 8003a64: f8 00 0a 48 calli 8006384 <rtems_semaphore_release> <== NOT EXECUTED 8003a68: e0 00 00 43 bi 8003b74 <rtems_termios_refill_transmitter+0x1f4><== NOT EXECUTED
} return 0; } rtems_interrupt_disable(level);
8003a6c: 90 00 10 00 rcsr r2,IE <== NOT EXECUTED 8003a70: 34 01 ff fe mvi r1,-2 <== NOT EXECUTED 8003a74: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED 8003a78: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
len = tty->t_dqlen; tty->t_dqlen = 0;
8003a7c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
} return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen;
8003a80: 29 63 00 90 lw r3,(r11+144) <== NOT EXECUTED
tty->t_dqlen = 0;
8003a84: 59 61 00 90 sw (r11+144),r1 <== NOT EXECUTED
rtems_interrupt_enable(level);
8003a88: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
8003a8c: 29 61 00 84 lw r1,(r11+132) <== NOT EXECUTED 8003a90: 29 62 00 88 lw r2,(r11+136) <== NOT EXECUTED 8003a94: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED 8003a98: f8 00 74 bf calli 8020d94 <__umodsi3> <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) {
8003a9c: 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;
8003aa0: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
8003aa4: 59 61 00 84 sw (r11+132),r1 <== NOT EXECUTED
if (tty->rawOutBufState == rob_wait) {
8003aa8: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8003aac: 5c 41 00 03 bne r2,r1,8003ab8 <rtems_termios_refill_transmitter+0x138><== NOT EXECUTED
/* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore);
8003ab0: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED 8003ab4: f8 00 0a 34 calli 8006384 <rtems_semaphore_release> <== NOT EXECUTED
} if (newTail == tty->rawOutBuf.Head) {
8003ab8: 29 61 00 80 lw r1,(r11+128) <== NOT EXECUTED 8003abc: 5d a1 00 0b bne r13,r1,8003ae8 <rtems_termios_refill_transmitter+0x168><== NOT EXECUTED
nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) {
8003ac0: 29 63 00 d4 lw r3,(r11+212) <== NOT EXECUTED
} if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle;
8003ac4: 34 04 00 00 mvi r4,0 <== NOT EXECUTED 8003ac8: 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) {
8003acc: b8 60 60 00 mv r12,r3 <== NOT EXECUTED 8003ad0: 44 64 00 28 be r3,r4,8003b70 <rtems_termios_refill_transmitter+0x1f0><== NOT EXECUTED
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
8003ad4: 29 62 00 d8 lw r2,(r11+216) <== NOT EXECUTED 8003ad8: 35 61 00 30 addi r1,r11,48 <== NOT EXECUTED 8003adc: b8 80 60 00 mv r12,r4 <== NOT EXECUTED 8003ae0: d8 60 00 00 call r3 <== NOT EXECUTED 8003ae4: e0 00 00 23 bi 8003b70 <rtems_termios_refill_transmitter+0x1f0><== NOT EXECUTED
} } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
8003ae8: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED 8003aec: 34 01 02 10 mvi r1,528 <== NOT EXECUTED 8003af0: 20 42 02 10 andi r2,r2,0x210 <== NOT EXECUTED 8003af4: 5c 41 00 0d bne r2,r1,8003b28 <rtems_termios_refill_transmitter+0x1a8><== NOT EXECUTED
== (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level);
8003af8: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED 8003afc: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED 8003b00: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED 8003b04: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
8003b08: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
8003b0c: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003b10: 59 63 00 94 sw (r11+148),r3 <== NOT EXECUTED
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;
8003b14: 38 42 00 20 ori r2,r2,0x20 <== NOT EXECUTED 8003b18: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level);
8003b1c: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED 8003b20: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED 8003b24: e0 00 00 13 bi 8003b70 <rtems_termios_refill_transmitter+0x1f0><== NOT EXECUTED
} else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head)
8003b28: 29 61 00 80 lw r1,(r11+128) <== NOT EXECUTED 8003b2c: 50 2d 00 03 bgeu r1,r13,8003b38 <rtems_termios_refill_transmitter+0x1b8><== NOT EXECUTED
nToSend = tty->rawOutBuf.Size - newTail;
8003b30: 29 6c 00 88 lw r12,(r11+136) <== NOT EXECUTED 8003b34: e0 00 00 02 bi 8003b3c <rtems_termios_refill_transmitter+0x1bc><== NOT EXECUTED
else nToSend = tty->rawOutBuf.Head - newTail;
8003b38: 29 6c 00 80 lw r12,(r11+128) <== NOT EXECUTED
/* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
8003b3c: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
* Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail;
8003b40: c9 8d 60 00 sub r12,r12,r13 <== NOT EXECUTED
/* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
8003b44: 20 21 06 00 andi r1,r1,0x600 <== NOT EXECUTED 8003b48: 44 20 00 02 be r1,r0,8003b50 <rtems_termios_refill_transmitter+0x1d0><== NOT EXECUTED 8003b4c: 34 0c 00 01 mvi r12,1 <== NOT EXECUTED
nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor,
8003b50: 29 62 00 7c lw r2,(r11+124) <== NOT EXECUTED 8003b54: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED 8003b58: 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*/
8003b5c: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 8003b60: 59 63 00 94 sw (r11+148),r3 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
8003b64: b4 4d 10 00 add r2,r2,r13 <== NOT EXECUTED 8003b68: b9 80 18 00 mv r3,r12 <== NOT EXECUTED 8003b6c: d8 80 00 00 call r4 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/
8003b70: 59 6d 00 84 sw (r11+132),r13 <== NOT EXECUTED
} return nToSend; }
8003b74: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8003b78: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003b7c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8003b80: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8003b84: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8003b88: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED 8003b8c: c3 a0 00 00 ret <== NOT EXECUTED
080056b4 <rtems_termios_rxdaemon>: /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) {
80056b4: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED 80056b8: 5b 8b 00 18 sw (sp+24),r11 <== NOT EXECUTED 80056bc: 5b 8c 00 14 sw (sp+20),r12 <== NOT EXECUTED 80056c0: 5b 8d 00 10 sw (sp+16),r13 <== NOT EXECUTED 80056c4: 5b 8e 00 0c sw (sp+12),r14 <== NOT EXECUTED 80056c8: 5b 8f 00 08 sw (sp+8),r15 <== NOT EXECUTED 80056cc: 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 |
80056d0: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
/* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) {
80056d4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT |
80056d8: 37 8f 00 1c addi r15,sp,28 <== NOT EXECUTED
else { /* * do something */ c = tty->device.pollRead(tty->minor); if (c != EOF) {
80056dc: 34 0e ff ff mvi r14,-1 <== NOT EXECUTED
/* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters (
80056e0: 37 8d 00 23 addi r13,sp,35 <== NOT EXECUTED
char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT |
80056e4: b9 e0 20 00 mv r4,r15 <== NOT EXECUTED 80056e8: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 80056ec: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 80056f0: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 80056f4: f8 00 01 19 calli 8005b58 <rtems_event_receive> <== NOT EXECUTED
TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
80056f8: 2b 81 00 1c lw r1,(sp+28) <== NOT EXECUTED 80056fc: 20 21 00 01 andi r1,r1,0x1 <== NOT EXECUTED 8005700: 44 20 00 05 be r1,r0,8005714 <rtems_termios_rxdaemon+0x60> <== NOT EXECUTED
tty->rxTaskId = 0;
8005704: 59 6c 00 c4 sw (r11+196),r12 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
8005708: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 800570c: f8 00 03 c4 calli 800661c <rtems_task_delete> <== NOT EXECUTED 8005710: e3 ff ff f5 bi 80056e4 <rtems_termios_rxdaemon+0x30> <== NOT EXECUTED
} else { /* * do something */ c = tty->device.pollRead(tty->minor);
8005714: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED 8005718: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED 800571c: d8 40 00 00 call r2 <== NOT EXECUTED 8005720: 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 (
8005724: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 8005728: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800572c: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
else { /* * do something */ c = tty->device.pollRead(tty->minor); if (c != EOF) {
8005730: 44 ae ff ed be r5,r14,80056e4 <rtems_termios_rxdaemon+0x30><== NOT EXECUTED
/* * pollRead did call enqueue on its own */ c_buf = c;
8005734: 33 85 00 23 sb (sp+35),r5 <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
8005738: fb ff f9 32 calli 8003c00 <rtems_termios_enqueue_raw_characters><== NOT EXECUTED 800573c: e3 ff ff ea bi 80056e4 <rtems_termios_rxdaemon+0x30> <== NOT EXECUTED
08003960 <rtems_termios_rxirq_occured>: * 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) {
8003960: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8003964: 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);
8003968: 28 21 00 c4 lw r1,(r1+196) <== NOT EXECUTED 800396c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8003970: f8 00 08 e1 calli 8005cf4 <rtems_event_send> <== NOT EXECUTED
}
8003974: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8003978: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 800397c: c3 a0 00 00 ret <== NOT EXECUTED
08005628 <rtems_termios_txdaemon>: /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) {
8005628: 37 9c ff e8 addi sp,sp,-24 <== NOT EXECUTED 800562c: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED 8005630: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED 8005634: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED 8005638: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED 800563c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
} else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
8005640: 78 0c 08 02 mvhi r12,0x802 <== NOT EXECUTED
/* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) {
8005644: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
} else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
8005648: 39 8c 57 f8 ori r12,r12,0x57f8 <== NOT EXECUTED
while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT |
800564c: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED 8005650: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8005654: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 8005658: 37 84 00 18 addi r4,sp,24 <== NOT EXECUTED 800565c: 34 01 00 03 mvi r1,3 <== NOT EXECUTED 8005660: f8 00 01 3e calli 8005b58 <rtems_event_receive> <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
8005664: 2b 8e 00 18 lw r14,(sp+24) <== NOT EXECUTED
} else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
8005668: 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) {
800566c: 21 ce 00 01 andi r14,r14,0x1 <== NOT EXECUTED 8005670: 45 c0 00 05 be r14,r0,8005684 <rtems_termios_txdaemon+0x5c><== NOT EXECUTED
tty->txTaskId = 0;
8005674: 59 6d 00 c8 sw (r11+200),r13 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
8005678: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 800567c: f8 00 03 e8 calli 800661c <rtems_task_delete> <== NOT EXECUTED 8005680: e3 ff ff f4 bi 8005650 <rtems_termios_txdaemon+0x28> <== NOT EXECUTED
} else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
8005684: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 8005688: b4 21 08 00 add r1,r1,r1 <== NOT EXECUTED 800568c: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 8005690: fb ff ef 5a calli 80013f8 <__ashlsi3> <== NOT EXECUTED 8005694: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED 8005698: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
800569c: 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) {
80056a0: 44 4e 00 02 be r2,r14,80056a8 <rtems_termios_txdaemon+0x80><== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
80056a4: d8 40 00 00 call r2 <== NOT EXECUTED
} /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty);
80056a8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 80056ac: fb ff f8 b5 calli 8003980 <rtems_termios_refill_transmitter><== NOT EXECUTED 80056b0: e3 ff ff e8 bi 8005650 <rtems_termios_txdaemon+0x28> <== NOT EXECUTED
080046f8 <rtems_termios_write>: rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) {
80046f8: 37 9c ff e8 addi sp,sp,-24 <== NOT EXECUTED 80046fc: 5b 8b 00 18 sw (sp+24),r11 <== NOT EXECUTED 8004700: 5b 8c 00 14 sw (sp+20),r12 <== NOT EXECUTED 8004704: 5b 8d 00 10 sw (sp+16),r13 <== NOT EXECUTED 8004708: 5b 8e 00 0c sw (sp+12),r14 <== NOT EXECUTED 800470c: 5b 8f 00 08 sw (sp+8),r15 <== NOT EXECUTED 8004710: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8004714: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
8004718: 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);
800471c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 8004720: 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;
8004724: 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);
8004728: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED 800472c: f8 00 06 c6 calli 8006244 <rtems_semaphore_obtain> <== NOT EXECUTED 8004730: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
8004734: 5c 20 00 26 bne r1,r0,80047cc <rtems_termios_write+0xd4> <== NOT EXECUTED
return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
8004738: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED 800473c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8004740: 78 0e 08 02 mvhi r14,0x802 <== NOT EXECUTED 8004744: fb ff f3 2d calli 80013f8 <__ashlsi3> <== NOT EXECUTED 8004748: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 800474c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 8004750: fb ff f3 2a calli 80013f8 <__ashlsi3> <== NOT EXECUTED 8004754: 39 ce 57 f8 ori r14,r14,0x57f8 <== NOT EXECUTED 8004758: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 800475c: 28 23 00 04 lw r3,(r1+4) <== NOT EXECUTED 8004760: 44 6d 00 06 be r3,r13,8004778 <rtems_termios_write+0x80> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
8004764: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8004768: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800476c: d8 60 00 00 call r3 <== NOT EXECUTED 8004770: b8 20 68 00 mv r13,r1 <== NOT EXECUTED 8004774: e0 00 00 14 bi 80047c4 <rtems_termios_write+0xcc> <== NOT EXECUTED
rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) {
8004778: 29 63 00 34 lw r3,(r11+52) <== NOT EXECUTED 800477c: 29 82 00 14 lw r2,(r12+20) <== NOT EXECUTED 8004780: 29 81 00 10 lw r1,(r12+16) <== NOT EXECUTED 8004784: 20 63 00 01 andi r3,r3,0x1 <== NOT EXECUTED
uint32_t count = args->count;
8004788: b8 40 78 00 mv r15,r2 <== NOT EXECUTED
char *buffer = args->buffer;
800478c: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) {
8004790: 5c 60 00 06 bne r3,r0,80047a8 <rtems_termios_write+0xb0> <== NOT EXECUTED 8004794: e0 00 00 08 bi 80047b4 <rtems_termios_write+0xbc> <== NOT EXECUTED
uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty);
8004798: 41 c1 00 00 lbu r1,(r14+0) <== NOT EXECUTED 800479c: 35 ef ff ff addi r15,r15,-1 <== NOT EXECUTED 80047a0: 35 ce 00 01 addi r14,r14,1 <== NOT EXECUTED 80047a4: fb ff fe 3b calli 8004090 <oproc> <== NOT EXECUTED 80047a8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--)
80047ac: 5d e0 ff fb bne r15,r0,8004798 <rtems_termios_write+0xa0> <== NOT EXECUTED 80047b0: e0 00 00 03 bi 80047bc <rtems_termios_write+0xc4> <== NOT EXECUTED
oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty);
80047b4: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 80047b8: fb ff fd e0 calli 8003f38 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
80047bc: 29 81 00 14 lw r1,(r12+20) <== NOT EXECUTED 80047c0: 59 81 00 1c sw (r12+28),r1 <== NOT EXECUTED
} rtems_semaphore_release (tty->osem);
80047c4: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED 80047c8: f8 00 06 ef calli 8006384 <rtems_semaphore_release> <== NOT EXECUTED
return sc; }
80047cc: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80047d0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80047d4: 2b 8b 00 18 lw r11,(sp+24) <== NOT EXECUTED 80047d8: 2b 8c 00 14 lw r12,(sp+20) <== NOT EXECUTED 80047dc: 2b 8d 00 10 lw r13,(sp+16) <== NOT EXECUTED 80047e0: 2b 8e 00 0c lw r14,(sp+12) <== NOT EXECUTED 80047e4: 2b 8f 00 08 lw r15,(sp+8) <== NOT EXECUTED 80047e8: 37 9c 00 18 addi sp,sp,24 <== NOT EXECUTED 80047ec: c3 a0 00 00 ret <== NOT EXECUTED
08013728 <rtems_timer_cancel>: */ rtems_status_code rtems_timer_cancel( rtems_id id ) {
8013728: 37 9c ff f8 addi sp,sp,-8 801372c: 5b 9d 00 04 sw (sp+4),ra 8013730: b8 20 10 00 mv r2,r1
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *)
8013734: 78 01 08 04 mvhi r1,0x804 8013738: 37 83 00 08 addi r3,sp,8 801373c: 38 21 05 a4 ori r1,r1,0x5a4 8013740: f8 00 0e 06 calli 8016f58 <_Objects_Get>
Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) {
8013744: 2b 83 00 08 lw r3,(sp+8) 8013748: 34 02 00 04 mvi r2,4
801374c: 5c 60 00 07 bne r3,r0,8013768 <rtems_timer_cancel+0x40> case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
8013750: 28 23 00 38 lw r3,(r1+56)
8013754: 44 62 00 03 be r3,r2,8013760 <rtems_timer_cancel+0x38> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
8013758: 34 21 00 10 addi r1,r1,16 801375c: f8 00 17 e6 calli 80196f4 <_Watchdog_Remove>
_Thread_Enable_dispatch();
8013760: f8 00 10 f1 calli 8017b24 <_Thread_Enable_dispatch> 8013764: 34 02 00 00 mvi r2,0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
8013768: b8 40 08 00 mv r1,r2 801376c: 2b 9d 00 04 lw ra,(sp+4) 8013770: 37 9c 00 08 addi sp,sp,8 8013774: c3 a0 00 00 ret
08013d68 <rtems_timer_server_fire_when>: rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) {
8013d68: 37 9c ff d8 addi sp,sp,-40 8013d6c: 5b 8b 00 24 sw (sp+36),r11 8013d70: 5b 8c 00 20 sw (sp+32),r12 8013d74: 5b 8d 00 1c sw (sp+28),r13 8013d78: 5b 8e 00 18 sw (sp+24),r14 8013d7c: 5b 8f 00 14 sw (sp+20),r15 8013d80: 5b 90 00 10 sw (sp+16),r16 8013d84: 5b 91 00 0c sw (sp+12),r17 8013d88: 5b 92 00 08 sw (sp+8),r18 8013d8c: 5b 9d 00 04 sw (sp+4),ra
Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server;
8013d90: 78 05 08 04 mvhi r5,0x804 8013d94: 38 a5 05 e4 ori r5,r5,0x5e4 8013d98: 28 ae 00 00 lw r14,(r5+0)
rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) {
8013d9c: b8 20 88 00 mv r17,r1 8013da0: b8 40 58 00 mv r11,r2 8013da4: b8 60 78 00 mv r15,r3 8013da8: b8 80 90 00 mv r18,r4
Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server )
8013dac: 34 05 00 0e mvi r5,14
8013db0: 45 c0 00 2e be r14,r0,8013e68 <rtems_timer_server_fire_when+0x100> return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set )
8013db4: 78 05 08 03 mvhi r5,0x803 8013db8: 38 a5 fc c0 ori r5,r5,0xfcc0 8013dbc: 40 a1 00 00 lbu r1,(r5+0) 8013dc0: 34 05 00 0b mvi r5,11
8013dc4: 44 20 00 29 be r1,r0,8013e68 <rtems_timer_server_fire_when+0x100><== NEVER TAKEN
return RTEMS_NOT_DEFINED; if ( !routine )
8013dc8: 34 05 00 09 mvi r5,9
8013dcc: 44 60 00 27 be r3,r0,8013e68 <rtems_timer_server_fire_when+0x100> return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) )
8013dd0: b8 40 08 00 mv r1,r2 8013dd4: fb ff f1 58 calli 8010334 <_TOD_Validate>
8013dd8: 44 20 00 23 be r1,r0,8013e64 <rtems_timer_server_fire_when+0xfc> return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() )
8013ddc: 78 0c 08 03 mvhi r12,0x803
return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time );
8013de0: b9 60 08 00 mv r1,r11 8013de4: fb ff f1 14 calli 8010234 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
8013de8: 39 8c fd 3c ori r12,r12,0xfd3c
return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time );
8013dec: b8 20 80 00 mv r16,r1
if ( seconds <= _TOD_Seconds_since_epoch() )
8013df0: 29 81 00 00 lw r1,(r12+0)
8013df4: 50 30 00 1c bgeu r1,r16,8013e64 <rtems_timer_server_fire_when+0xfc>
8013df8: 78 01 08 04 mvhi r1,0x804 8013dfc: 38 21 05 a4 ori r1,r1,0x5a4 8013e00: ba 20 10 00 mv r2,r17 8013e04: 37 83 00 28 addi r3,sp,40 8013e08: f8 00 0c 54 calli 8016f58 <_Objects_Get>
return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) {
8013e0c: 2b 8d 00 28 lw r13,(sp+40) 8013e10: b8 20 58 00 mv r11,r1 8013e14: 34 05 00 04 mvi r5,4
8013e18: 5d a0 00 14 bne r13,r0,8013e68 <rtems_timer_server_fire_when+0x100> case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker );
8013e1c: 34 21 00 10 addi r1,r1,16 8013e20: f8 00 16 35 calli 80196f4 <_Watchdog_Remove>
void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id;
8013e24: 59 71 00 30 sw (r11+48),r17
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
8013e28: 29 81 00 00 lw r1,(r12+0)
(*timer_server->schedule_operation)( timer_server, the_timer );
8013e2c: 29 c3 00 04 lw r3,(r14+4) 8013e30: b9 60 10 00 mv r2,r11
case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
8013e34: ca 01 80 00 sub r16,r16,r1
the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
8013e38: 34 01 00 03 mvi r1,3 8013e3c: 59 61 00 38 sw (r11+56),r1
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
8013e40: 59 6f 00 2c sw (r11+44),r15
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer );
8013e44: b9 c0 08 00 mv r1,r14
the_watchdog->id = id; the_watchdog->user_data = user_data;
8013e48: 59 72 00 34 sw (r11+52),r18
case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
8013e4c: 59 70 00 1c sw (r11+28),r16
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
8013e50: 59 6d 00 18 sw (r11+24),r13
(*timer_server->schedule_operation)( timer_server, the_timer );
8013e54: d8 60 00 00 call r3
_Thread_Enable_dispatch();
8013e58: f8 00 0f 33 calli 8017b24 <_Thread_Enable_dispatch> 8013e5c: b9 a0 28 00 mv r5,r13
return RTEMS_SUCCESSFUL;
8013e60: e0 00 00 02 bi 8013e68 <rtems_timer_server_fire_when+0x100> 8013e64: 34 05 00 14 mvi r5,20
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
8013e68: b8 a0 08 00 mv r1,r5 8013e6c: 2b 9d 00 04 lw ra,(sp+4) 8013e70: 2b 8b 00 24 lw r11,(sp+36) 8013e74: 2b 8c 00 20 lw r12,(sp+32) 8013e78: 2b 8d 00 1c lw r13,(sp+28) 8013e7c: 2b 8e 00 18 lw r14,(sp+24) 8013e80: 2b 8f 00 14 lw r15,(sp+20) 8013e84: 2b 90 00 10 lw r16,(sp+16) 8013e88: 2b 91 00 0c lw r17,(sp+12) 8013e8c: 2b 92 00 08 lw r18,(sp+8) 8013e90: 37 9c 00 28 addi sp,sp,40 8013e94: c3 a0 00 00 ret
08006a58 <rtems_verror>: static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) {
8006a58: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED 8006a5c: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED 8006a60: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED 8006a64: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED 8006a68: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED 8006a6c: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED 8006a70: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED 8006a74: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED 8006a78: 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)
8006a7c: 78 0f 20 00 mvhi r15,0x2000 <== NOT EXECUTED 8006a80: 39 ef 00 00 ori r15,r15,0x0 <== NOT EXECUTED 8006a84: a0 2f 78 00 and r15,r1,r15 <== NOT EXECUTED
static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) {
8006a88: b8 20 70 00 mv r14,r1 <== NOT EXECUTED 8006a8c: b8 40 88 00 mv r17,r2 <== NOT EXECUTED 8006a90: b8 60 60 00 mv r12,r3 <== NOT EXECUTED
int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC)
8006a94: 45 e0 00 11 be r15,r0,8006ad8 <rtems_verror+0x80> <== NOT EXECUTED
{ if (rtems_panic_in_progress++)
8006a98: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8006a9c: 38 84 a8 98 ori r4,r4,0xa898 <== NOT EXECUTED 8006aa0: 28 81 00 00 lw r1,(r4+0) <== NOT EXECUTED 8006aa4: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED 8006aa8: 58 82 00 00 sw (r4+0),r2 <== NOT EXECUTED 8006aac: 44 20 00 06 be r1,r0,8006ac4 <rtems_verror+0x6c> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
8006ab0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED 8006ab4: 38 84 aa 34 ori r4,r4,0xaa34 <== NOT EXECUTED 8006ab8: 28 81 00 00 lw r1,(r4+0) <== NOT EXECUTED 8006abc: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED 8006ac0: 58 81 00 00 sw (r4+0),r1 <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2)
8006ac4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8006ac8: 38 21 a8 98 ori r1,r1,0xa898 <== NOT EXECUTED 8006acc: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 8006ad0: 34 01 00 02 mvi r1,2 <== NOT EXECUTED 8006ad4: 48 41 00 59 bg r2,r1,8006c38 <rtems_verror+0x1e0> <== NOT EXECUTED
return 0; } (void) fflush(stdout); /* in case stdout/stderr same */
8006ad8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8006adc: 38 21 a2 28 ori r1,r1,0xa228 <== NOT EXECUTED 8006ae0: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8006ae4: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED 8006ae8: f8 00 37 eb calli 8014a94 <fflush> <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
8006aec: 78 04 40 00 mvhi r4,0x4000 <== NOT EXECUTED 8006af0: 38 84 00 00 ori r4,r4,0x0 <== NOT EXECUTED
return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK;
8006af4: 78 01 8f ff mvhi r1,0x8fff <== NOT EXECUTED 8006af8: 38 21 ff ff ori r1,r1,0xffff <== NOT EXECUTED
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
8006afc: a1 c4 20 00 and r4,r14,r4 <== NOT EXECUTED
return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK;
8006b00: a1 c1 80 00 and r16,r14,r1 <== NOT EXECUTED
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
8006b04: b8 80 58 00 mv r11,r4 <== NOT EXECUTED 8006b08: 44 80 00 03 be r4,r0,8006b14 <rtems_verror+0xbc> <== NOT EXECUTED
local_errno = errno;
8006b0c: f8 00 36 d2 calli 8014654 <__errno> <== NOT EXECUTED 8006b10: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist);
8006b14: 78 0d 08 02 mvhi r13,0x802 <== NOT EXECUTED 8006b18: 39 ad a2 28 ori r13,r13,0xa228 <== NOT EXECUTED 8006b1c: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 8006b20: b9 80 18 00 mv r3,r12 <== NOT EXECUTED 8006b24: ba 20 10 00 mv r2,r17 <== NOT EXECUTED 8006b28: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED 8006b2c: f8 00 4e 35 calli 801a400 <vfprintf> <== NOT EXECUTED 8006b30: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
if (status)
8006b34: 46 00 00 0b be r16,r0,8006b60 <rtems_verror+0x108> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
8006b38: 29 a2 00 00 lw r2,(r13+0) <== NOT EXECUTED 8006b3c: ba 00 08 00 mv r1,r16 <== NOT EXECUTED 8006b40: 28 4d 00 0c lw r13,(r2+12) <== NOT EXECUTED 8006b44: fb ff ff bc calli 8006a34 <rtems_status_text> <== NOT EXECUTED 8006b48: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8006b4c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 8006b50: 38 42 76 e0 ori r2,r2,0x76e0 <== NOT EXECUTED 8006b54: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8006b58: f8 00 38 dc calli 8014ec8 <fprintf> <== NOT EXECUTED 8006b5c: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED
if (local_errno)
8006b60: 45 60 00 1a be r11,r0,8006bc8 <rtems_verror+0x170> <== NOT EXECUTED
{ if ((local_errno > 0) && *strerror(local_errno))
8006b64: 4c 0b 00 10 bge r0,r11,8006ba4 <rtems_verror+0x14c> <== NOT EXECUTED 8006b68: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8006b6c: f8 00 3c aa calli 8015e14 <strerror> <== NOT EXECUTED 8006b70: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED 8006b74: 44 20 00 0c be r1,r0,8006ba4 <rtems_verror+0x14c> <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
8006b78: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8006b7c: 38 21 a2 28 ori r1,r1,0xa228 <== NOT EXECUTED 8006b80: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED 8006b84: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8006b88: 28 4d 00 0c lw r13,(r2+12) <== NOT EXECUTED 8006b8c: f8 00 3c a2 calli 8015e14 <strerror> <== NOT EXECUTED 8006b90: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8006b94: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 8006b98: 38 42 76 f0 ori r2,r2,0x76f0 <== NOT EXECUTED 8006b9c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8006ba0: e0 00 00 08 bi 8006bc0 <rtems_verror+0x168> <== NOT EXECUTED
else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
8006ba4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED 8006ba8: 38 21 a2 28 ori r1,r1,0xa228 <== NOT EXECUTED 8006bac: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8006bb0: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8006bb4: 38 42 77 00 ori r2,r2,0x7700 <== NOT EXECUTED 8006bb8: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED 8006bbc: b9 60 18 00 mv r3,r11 <== NOT EXECUTED 8006bc0: f8 00 38 c2 calli 8014ec8 <fprintf> <== NOT EXECUTED 8006bc4: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED
} chars_written += fprintf(stderr, "\n");
8006bc8: 78 0d 08 02 mvhi r13,0x802 <== NOT EXECUTED 8006bcc: 39 ad a2 28 ori r13,r13,0xa228 <== NOT EXECUTED 8006bd0: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 8006bd4: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8006bd8: 38 42 6f 24 ori r2,r2,0x6f24 <== NOT EXECUTED 8006bdc: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED 8006be0: f8 00 38 ba calli 8014ec8 <fprintf> <== NOT EXECUTED 8006be4: b8 20 80 00 mv r16,r1 <== NOT EXECUTED
(void) fflush(stderr);
8006be8: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED 8006bec: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED 8006bf0: f8 00 37 a9 calli 8014a94 <fflush> <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
8006bf4: 78 02 30 00 mvhi r2,0x3000 <== NOT EXECUTED 8006bf8: 38 42 00 00 ori r2,r2,0x0 <== NOT EXECUTED 8006bfc: a1 c2 70 00 and r14,r14,r2 <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n");
8006c00: b6 0c 08 00 add r1,r16,r12 <== NOT EXECUTED
(void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
8006c04: 45 c0 00 0e be r14,r0,8006c3c <rtems_verror+0x1e4> <== NOT EXECUTED
{ if (error_flag & RTEMS_ERROR_PANIC)
8006c08: 45 e0 00 07 be r15,r0,8006c24 <rtems_verror+0x1cc> <== NOT EXECUTED
{ rtems_error(0, "fatal error, exiting");
8006c0c: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8006c10: 38 42 77 14 ori r2,r2,0x7714 <== NOT EXECUTED 8006c14: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8006c18: f8 00 00 26 calli 8006cb0 <rtems_error> <== NOT EXECUTED
_exit(local_errno);
8006c1c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8006c20: f8 00 03 30 calli 80078e0 <_exit> <== NOT EXECUTED
} else { rtems_error(0, "fatal error, aborting");
8006c24: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED 8006c28: 38 42 77 2c ori r2,r2,0x772c <== NOT EXECUTED 8006c2c: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED 8006c30: f8 00 00 20 calli 8006cb0 <rtems_error> <== NOT EXECUTED
abort();
8006c34: f8 00 36 78 calli 8014614 <abort> <== NOT EXECUTED 8006c38: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
} } return chars_written; }
8006c3c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8006c40: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED 8006c44: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED 8006c48: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED 8006c4c: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED 8006c50: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED 8006c54: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED 8006c58: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED 8006c5c: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED 8006c60: c3 a0 00 00 ret <== NOT EXECUTED
08026eb8 <scanInt>: /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) {
8026eb8: 37 9c ff d4 addi sp,sp,-44 8026ebc: 5b 8b 00 2c sw (sp+44),r11 8026ec0: 5b 8c 00 28 sw (sp+40),r12 8026ec4: 5b 8d 00 24 sw (sp+36),r13 8026ec8: 5b 8e 00 20 sw (sp+32),r14 8026ecc: 5b 8f 00 1c sw (sp+28),r15 8026ed0: 5b 90 00 18 sw (sp+24),r16 8026ed4: 5b 91 00 14 sw (sp+20),r17 8026ed8: 5b 92 00 10 sw (sp+16),r18 8026edc: 5b 93 00 0c sw (sp+12),r19 8026ee0: 5b 94 00 08 sw (sp+8),r20 8026ee4: 5b 9d 00 04 sw (sp+4),ra 8026ee8: 78 0d 7f ff mvhi r13,0x7fff 8026eec: 34 0b 00 00 mvi r11,0
unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp);
8026ef0: 78 11 08 06 mvhi r17,0x806
limit++; continue; } sign = 1; } if (!isdigit(c))
8026ef4: 78 10 08 06 mvhi r16,0x806
/* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) {
8026ef8: b8 20 60 00 mv r12,r1 8026efc: b8 40 90 00 mv r18,r2 8026f00: 39 ad ff ff ori r13,r13,0xffff
unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp);
8026f04: 3a 31 db 08 ori r17,r17,0xdb08
limit++; continue; } sign = 1; } if (!isdigit(c))
8026f08: 3a 10 da fc ori r16,r16,0xdafc
/* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) {
8026f0c: b9 60 70 00 mv r14,r11
int sign = 0; int d; for (;;) { c = getc(fp); if (c == ':')
8026f10: 34 14 00 3a mvi r20,58
break; if (sign == 0) { if (c == '-') {
8026f14: 34 13 00 2d mvi r19,45
unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp);
8026f18: 29 81 00 04 lw r1,(r12+4) 8026f1c: 34 21 ff ff addi r1,r1,-1 8026f20: 59 81 00 04 sw (r12+4),r1
8026f24: 4c 20 00 06 bge r1,r0,8026f3c <scanInt+0x84> <== ALWAYS TAKEN
8026f28: 2a 21 00 00 lw r1,(r17+0) <== NOT EXECUTED 8026f2c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED 8026f30: f8 00 8c 58 calli 804a090 <__srget_r> <== NOT EXECUTED 8026f34: b8 20 78 00 mv r15,r1 <== NOT EXECUTED 8026f38: e0 00 00 05 bi 8026f4c <scanInt+0x94> <== NOT EXECUTED
8026f3c: 29 82 00 00 lw r2,(r12+0) 8026f40: 34 41 00 01 addi r1,r2,1 8026f44: 40 4f 00 00 lbu r15,(r2+0) 8026f48: 59 81 00 00 sw (r12+0),r1
if (c == ':') 8026f4c: 45 f4 00 1d be r15,r20,8026fc0 <scanInt+0x108> break; if (sign == 0) {
8026f50: 5d c0 00 06 bne r14,r0,8026f68 <scanInt+0xb0> <== NEVER TAKEN
if (c == '-') { sign = -1; limit++; continue;
8026f54: 34 0e 00 01 mvi r14,1
for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') {
8026f58: 5d f3 00 04 bne r15,r19,8026f68 <scanInt+0xb0> <== ALWAYS TAKEN
sign = -1; limit++;
8026f5c: b5 ae 68 00 add r13,r13,r14 <== NOT EXECUTED 8026f60: 34 0e ff ff mvi r14,-1 <== NOT EXECUTED
continue;
8026f64: e3 ff ff ed bi 8026f18 <scanInt+0x60> <== NOT EXECUTED
} sign = 1; } if (!isdigit(c))
8026f68: 2a 01 00 00 lw r1,(r16+0) 8026f6c: b4 2f 08 00 add r1,r1,r15 8026f70: 40 21 00 01 lbu r1,(r1+1) 8026f74: 20 21 00 04 andi r1,r1,0x4
8026f78: 44 20 00 19 be r1,r0,8026fdc <scanInt+0x124> <== NEVER TAKEN
return 0; d = c - '0'; if ((i > (limit / 10))
8026f7c: b9 a0 08 00 mv r1,r13 8026f80: 34 02 00 0a mvi r2,10 8026f84: fb ff 71 a0 calli 8003604 <__udivsi3>
8026f88: 55 61 00 15 bgu r11,r1,8026fdc <scanInt+0x124> <== NEVER TAKEN
} sign = 1; } if (!isdigit(c)) return 0; d = c - '0';
8026f8c: 35 ef ff d0 addi r15,r15,-48
if ((i > (limit / 10))
8026f90: 5d 61 00 05 bne r11,r1,8026fa4 <scanInt+0xec> <== ALWAYS TAKEN
8026f94: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8026f98: 34 02 00 0a mvi r2,10 <== NOT EXECUTED 8026f9c: fb ff 71 aa calli 8003644 <__umodsi3> <== NOT EXECUTED 8026fa0: 55 e1 00 0f bgu r15,r1,8026fdc <scanInt+0x124> <== NOT EXECUTED
|| ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d;
8026fa4: b5 6b 58 00 add r11,r11,r11 8026fa8: b9 60 08 00 mv r1,r11 8026fac: 34 02 00 02 mvi r2,2 8026fb0: fb ff 68 62 calli 8001138 <__ashlsi3> 8026fb4: b5 61 58 00 add r11,r11,r1 8026fb8: b5 eb 58 00 add r11,r15,r11 8026fbc: e3 ff ff d7 bi 8026f18 <scanInt+0x60>
} if (sign == 0)
8026fc0: 45 c0 00 07 be r14,r0,8026fdc <scanInt+0x124> <== NEVER TAKEN
return 0; *val = i * sign;
8026fc4: b9 c0 08 00 mv r1,r14 8026fc8: b9 60 10 00 mv r2,r11 8026fcc: fb ff 71 6e calli 8003584 <__mulsi3> 8026fd0: 5a 41 00 00 sw (r18+0),r1 8026fd4: 34 01 00 01 mvi r1,1
return 1;
8026fd8: e0 00 00 02 bi 8026fe0 <scanInt+0x128>
8026fdc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
8026fe0: 2b 9d 00 04 lw ra,(sp+4) 8026fe4: 2b 8b 00 2c lw r11,(sp+44) 8026fe8: 2b 8c 00 28 lw r12,(sp+40) 8026fec: 2b 8d 00 24 lw r13,(sp+36) 8026ff0: 2b 8e 00 20 lw r14,(sp+32) 8026ff4: 2b 8f 00 1c lw r15,(sp+28) 8026ff8: 2b 90 00 18 lw r16,(sp+24) 8026ffc: 2b 91 00 14 lw r17,(sp+20) 8027000: 2b 92 00 10 lw r18,(sp+16) 8027004: 2b 93 00 0c lw r19,(sp+12) 8027008: 2b 94 00 08 lw r20,(sp+8) 802700c: 37 9c 00 2c addi sp,sp,44 8027010: c3 a0 00 00 ret
08027014 <scanString>: /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) {
8027014: 37 9c ff d8 addi sp,sp,-40 8027018: 5b 8b 00 28 sw (sp+40),r11 802701c: 5b 8c 00 24 sw (sp+36),r12 8027020: 5b 8d 00 20 sw (sp+32),r13 8027024: 5b 8e 00 1c sw (sp+28),r14 8027028: 5b 8f 00 18 sw (sp+24),r15 802702c: 5b 90 00 14 sw (sp+20),r16 8027030: 5b 91 00 10 sw (sp+16),r17 8027034: 5b 92 00 0c sw (sp+12),r18 8027038: 5b 93 00 08 sw (sp+8),r19 802703c: 5b 9d 00 04 sw (sp+4),ra 8027040: b8 60 58 00 mv r11,r3
int c; *name = *bufp;
8027044: 28 63 00 00 lw r3,(r3+0)
for (;;) { c = getc(fp);
8027048: 78 0e 08 06 mvhi r14,0x806
/* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) {
802704c: b8 20 68 00 mv r13,r1
int c; *name = *bufp;
8027050: 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) {
8027054: b8 80 60 00 mv r12,r4 8027058: b8 a0 78 00 mv r15,r5
int c; *name = *bufp; for (;;) { c = getc(fp);
802705c: 39 ce db 08 ori r14,r14,0xdb08
if (c == ':') {
8027060: 34 13 00 3a mvi r19,58
if (nlFlag) return 0; break; } if (c == '\n') {
8027064: 34 12 00 0a mvi r18,10
if (!nlFlag) return 0; break; } if (c == EOF)
8027068: 34 11 ff ff mvi r17,-1
return 0; if (*nleft < 2)
802706c: 34 10 00 01 mvi r16,1
{ int c; *name = *bufp; for (;;) { c = getc(fp);
8027070: 29 a1 00 04 lw r1,(r13+4) 8027074: 34 21 ff ff addi r1,r1,-1 8027078: 59 a1 00 04 sw (r13+4),r1
802707c: 4c 20 00 05 bge r1,r0,8027090 <scanString+0x7c>
8027080: 29 c1 00 00 lw r1,(r14+0) 8027084: b9 a0 10 00 mv r2,r13 8027088: f8 00 8c 02 calli 804a090 <__srget_r> 802708c: e0 00 00 05 bi 80270a0 <scanString+0x8c> 8027090: 29 a1 00 00 lw r1,(r13+0) 8027094: 34 22 00 01 addi r2,r1,1 8027098: 40 21 00 00 lbu r1,(r1+0) 802709c: 59 a2 00 00 sw (r13+0),r2
if (c == ':') { 80270a0: 5c 33 00 03 bne r1,r19,80270ac <scanString+0x98> if (nlFlag)
80270a4: 45 e0 00 11 be r15,r0,80270e8 <scanString+0xd4> <== ALWAYS TAKEN
80270a8: e0 00 00 1b bi 8027114 <scanString+0x100> <== NOT EXECUTED
return 0; break; } if (c == '\n') { 80270ac: 5c 32 00 03 bne r1,r18,80270b8 <scanString+0xa4> if (!nlFlag)
80270b0: 5d e0 00 0e bne r15,r0,80270e8 <scanString+0xd4> <== ALWAYS TAKEN
80270b4: e0 00 00 18 bi 8027114 <scanString+0x100> <== NOT EXECUTED
return 0; break; } if (c == EOF)
80270b8: 44 31 00 17 be r1,r17,8027114 <scanString+0x100> <== NEVER TAKEN
return 0; if (*nleft < 2)
80270bc: 29 82 00 00 lw r2,(r12+0)
80270c0: 52 02 00 15 bgeu r16,r2,8027114 <scanString+0x100> <== NEVER TAKEN
return 0; **bufp = c;
80270c4: 29 62 00 00 lw r2,(r11+0) 80270c8: 30 41 00 00 sb (r2+0),r1
++(*bufp);
80270cc: 29 62 00 00 lw r2,(r11+0)
--(*nleft);
80270d0: 29 81 00 00 lw r1,(r12+0)
if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp);
80270d4: 34 42 00 01 addi r2,r2,1
--(*nleft);
80270d8: 34 21 ff ff addi r1,r1,-1
if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp);
80270dc: 59 62 00 00 sw (r11+0),r2
--(*nleft);
80270e0: 59 81 00 00 sw (r12+0),r1
}
80270e4: e3 ff ff e3 bi 8027070 <scanString+0x5c>
**bufp = '\0';
80270e8: 29 63 00 00 lw r3,(r11+0) 80270ec: 34 02 00 00 mvi r2,0
++(*bufp); --(*nleft);
80270f0: 34 01 00 01 mvi r1,1
return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0';
80270f4: 30 62 00 00 sb (r3+0),r2
++(*bufp);
80270f8: 29 63 00 00 lw r3,(r11+0)
--(*nleft);
80270fc: 29 82 00 00 lw r2,(r12+0)
**bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp);
8027100: b4 61 18 00 add r3,r3,r1
--(*nleft);
8027104: 34 42 ff ff addi r2,r2,-1
**bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp);
8027108: 59 63 00 00 sw (r11+0),r3
--(*nleft);
802710c: 59 82 00 00 sw (r12+0),r2
return 1;
8027110: e0 00 00 02 bi 8027118 <scanString+0x104>
8027114: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
8027118: 2b 9d 00 04 lw ra,(sp+4) 802711c: 2b 8b 00 28 lw r11,(sp+40) 8027120: 2b 8c 00 24 lw r12,(sp+36) 8027124: 2b 8d 00 20 lw r13,(sp+32) 8027128: 2b 8e 00 1c lw r14,(sp+28) 802712c: 2b 8f 00 18 lw r15,(sp+24) 8027130: 2b 90 00 14 lw r16,(sp+20) 8027134: 2b 91 00 10 lw r17,(sp+16) 8027138: 2b 92 00 0c lw r18,(sp+12) 802713c: 2b 93 00 08 lw r19,(sp+8) 8027140: 37 9c 00 28 addi sp,sp,40 8027144: c3 a0 00 00 ret
08027148 <scangr>: FILE *fp, struct group *grp, char *buffer, size_t bufsize ) {
8027148: 37 9c ff d4 addi sp,sp,-44 802714c: 5b 8b 00 1c sw (sp+28),r11 8027150: 5b 8c 00 18 sw (sp+24),r12 8027154: 5b 8d 00 14 sw (sp+20),r13 8027158: 5b 8e 00 10 sw (sp+16),r14 802715c: 5b 8f 00 0c sw (sp+12),r15 8027160: 5b 90 00 08 sw (sp+8),r16 8027164: 5b 9d 00 04 sw (sp+4),ra
int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
8027168: 37 8d 00 24 addi r13,sp,36 802716c: 37 8c 00 20 addi r12,sp,32
FILE *fp, struct group *grp, char *buffer, size_t bufsize ) {
8027170: 5b 83 00 24 sw (sp+36),r3 8027174: 5b 84 00 20 sw (sp+32),r4
int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
8027178: b9 a0 18 00 mv r3,r13 802717c: b9 80 20 00 mv r4,r12 8027180: 34 05 00 00 mvi r5,0
FILE *fp, struct group *grp, char *buffer, size_t bufsize ) {
8027184: b8 20 70 00 mv r14,r1 8027188: b8 40 58 00 mv r11,r2
int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
802718c: fb ff ff a2 calli 8027014 <scanString>
8027190: 44 20 00 44 be r1,r0,80272a0 <scangr+0x158> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
8027194: b9 c0 08 00 mv r1,r14 8027198: 35 62 00 04 addi r2,r11,4 802719c: b9 a0 18 00 mv r3,r13 80271a0: b9 80 20 00 mv r4,r12 80271a4: 34 05 00 00 mvi r5,0 80271a8: fb ff ff 9b calli 8027014 <scanString>
{ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
80271ac: 44 20 00 3d be r1,r0,80272a0 <scangr+0x158> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid)
80271b0: b9 c0 08 00 mv r1,r14 80271b4: 37 82 00 2c addi r2,sp,44 80271b8: fb ff ff 40 calli 8026eb8 <scanInt>
{ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
80271bc: 44 20 00 39 be r1,r0,80272a0 <scangr+0x158> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1))
80271c0: b9 c0 08 00 mv r1,r14 80271c4: b9 a0 18 00 mv r3,r13 80271c8: b9 80 20 00 mv r4,r12 80271cc: 37 82 00 28 addi r2,sp,40 80271d0: 34 05 00 01 mvi r5,1 80271d4: fb ff ff 90 calli 8027014 <scanString>
{ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
80271d8: 44 20 00 32 be r1,r0,80272a0 <scangr+0x158> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid;
80271dc: 2f 82 00 2e lhu r2,(sp+46)
/* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
80271e0: 2b 8d 00 28 lw r13,(sp+40) 80271e4: 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;
80271e8: 0d 62 00 08 sh (r11+8),r2
/* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
80271ec: b9 a0 10 00 mv r2,r13 80271f0: e0 00 00 02 bi 80271f8 <scangr+0xb0>
if(*cp == ',') memcount++;
80271f4: b4 23 08 00 add r1,r1,r3
grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
80271f8: 40 4c 00 00 lbu r12,(r2+0) 80271fc: 34 42 00 01 addi r2,r2,1
if(*cp == ',') memcount++;
8027200: 65 83 00 2c cmpei r3,r12,44
grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 8027204: 5d 80 ff fc bne r12,r0,80271f4 <scangr+0xac> } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
8027208: 34 02 00 02 mvi r2,2 802720c: 34 21 00 01 addi r1,r1,1 8027210: fb ff 67 ca calli 8001138 <__ashlsi3> 8027214: 2b 82 00 20 lw r2,(sp+32) 8027218: 34 21 00 0f addi r1,r1,15
802721c: 54 22 00 21 bgu r1,r2,80272a0 <scangr+0x158> <== NEVER TAKEN
return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
8027220: 2b 81 00 24 lw r1,(sp+36) 8027224: 34 02 ff f0 mvi r2,-16
/* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
8027228: b9 80 80 00 mv r16,r12
/* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
802722c: 34 21 00 0f addi r1,r1,15 8027230: a0 22 08 00 and r1,r1,r2
/* * Fill in pointer array */ grp->gr_mem[0] = grmem;
8027234: 58 2d 00 00 sw (r1+0),r13 8027238: 2b 8c 00 28 lw r12,(sp+40) 802723c: 34 0d 00 01 mvi r13,1
/* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
8027240: 59 61 00 0c sw (r11+12),r1
/* * Fill in pointer array */ grp->gr_mem[0] = grmem;
8027244: b5 8d 60 00 add r12,r12,r13
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') {
8027248: 34 0f 00 2c mvi r15,44
/* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
802724c: e0 00 00 0b bi 8027278 <scangr+0x130>
if(*cp == ',') {
8027250: 5d cf 00 09 bne r14,r15,8027274 <scangr+0x12c> <== ALWAYS TAKEN
*cp = '\0';
8027254: 31 90 ff ff sb (r12+-1),r16 <== NOT EXECUTED
grp->gr_mem[memcount++] = cp + 1;
8027258: 29 6e 00 0c lw r14,(r11+12) <== NOT EXECUTED 802725c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8027260: 34 02 00 02 mvi r2,2 <== NOT EXECUTED 8027264: fb ff 67 b5 calli 8001138 <__ashlsi3> <== NOT EXECUTED 8027268: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED 802726c: 58 2c 00 00 sw (r1+0),r12 <== NOT EXECUTED 8027270: 35 ad 00 01 addi r13,r13,1 <== NOT EXECUTED
8027274: 35 8c 00 01 addi r12,r12,1
/* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
8027278: 41 8e ff ff lbu r14,(r12+-1)
802727c: 5d c0 ff f5 bne r14,r0,8027250 <scangr+0x108> if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL;
8027280: 29 6b 00 0c lw r11,(r11+12) 8027284: b9 a0 08 00 mv r1,r13 8027288: 34 02 00 02 mvi r2,2 802728c: fb ff 67 ab calli 8001138 <__ashlsi3> 8027290: b5 61 08 00 add r1,r11,r1 8027294: 58 2e 00 00 sw (r1+0),r14 8027298: 34 01 00 01 mvi r1,1
return 1;
802729c: e0 00 00 02 bi 80272a4 <scangr+0x15c>
80272a0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
80272a4: 2b 9d 00 04 lw ra,(sp+4) 80272a8: 2b 8b 00 1c lw r11,(sp+28) 80272ac: 2b 8c 00 18 lw r12,(sp+24) 80272b0: 2b 8d 00 14 lw r13,(sp+20) 80272b4: 2b 8e 00 10 lw r14,(sp+16) 80272b8: 2b 8f 00 0c lw r15,(sp+12) 80272bc: 2b 90 00 08 lw r16,(sp+8) 80272c0: 37 9c 00 2c addi sp,sp,44 80272c4: c3 a0 00 00 ret
08027318 <scanpw>: FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) {
8027318: 37 9c ff dc addi sp,sp,-36 802731c: 5b 8b 00 14 sw (sp+20),r11 8027320: 5b 8c 00 10 sw (sp+16),r12 8027324: 5b 8d 00 0c sw (sp+12),r13 8027328: 5b 8e 00 08 sw (sp+8),r14 802732c: 5b 9d 00 04 sw (sp+4),ra
int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8027330: 37 8e 00 1c addi r14,sp,28 8027334: 37 8d 00 18 addi r13,sp,24
FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) {
8027338: 5b 83 00 1c sw (sp+28),r3 802733c: 5b 84 00 18 sw (sp+24),r4
int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8027340: b9 c0 18 00 mv r3,r14 8027344: b9 a0 20 00 mv r4,r13 8027348: 34 05 00 00 mvi r5,0
FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) {
802734c: b8 20 60 00 mv r12,r1 8027350: b8 40 58 00 mv r11,r2
int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8027354: fb ff ff 30 calli 8027014 <scanString>
8027358: 44 20 00 32 be r1,r0,8027420 <scanpw+0x108> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
802735c: b9 80 08 00 mv r1,r12 8027360: 35 62 00 04 addi r2,r11,4 8027364: b9 c0 18 00 mv r3,r14 8027368: b9 a0 20 00 mv r4,r13 802736c: 34 05 00 00 mvi r5,0 8027370: fb ff ff 29 calli 8027014 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8027374: 44 20 00 2b be r1,r0,8027420 <scanpw+0x108> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid)
8027378: b9 80 08 00 mv r1,r12 802737c: 37 82 00 24 addi r2,sp,36 8027380: fb ff fe ce calli 8026eb8 <scanInt>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8027384: 44 20 00 27 be r1,r0,8027420 <scanpw+0x108> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid)
8027388: b9 80 08 00 mv r1,r12 802738c: 37 82 00 20 addi r2,sp,32 8027390: fb ff fe ca calli 8026eb8 <scanInt>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8027394: 44 20 00 23 be r1,r0,8027420 <scanpw+0x108> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
8027398: b9 80 08 00 mv r1,r12 802739c: 35 62 00 0c addi r2,r11,12 80273a0: b9 c0 18 00 mv r3,r14 80273a4: b9 a0 20 00 mv r4,r13 80273a8: 34 05 00 00 mvi r5,0 80273ac: fb ff ff 1a calli 8027014 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
80273b0: 44 20 00 1c be r1,r0,8027420 <scanpw+0x108> <== NEVER TAKEN
|| !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)
80273b4: b9 80 08 00 mv r1,r12 80273b8: 35 62 00 10 addi r2,r11,16 80273bc: b9 c0 18 00 mv r3,r14 80273c0: b9 a0 20 00 mv r4,r13 80273c4: 34 05 00 00 mvi r5,0 80273c8: fb ff ff 13 calli 8027014 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
80273cc: 44 20 00 15 be r1,r0,8027420 <scanpw+0x108> <== NEVER TAKEN
|| !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)
80273d0: b9 80 08 00 mv r1,r12 80273d4: 35 62 00 14 addi r2,r11,20 80273d8: b9 c0 18 00 mv r3,r14 80273dc: b9 a0 20 00 mv r4,r13 80273e0: 34 05 00 00 mvi r5,0 80273e4: fb ff ff 0c calli 8027014 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
80273e8: 44 20 00 0e be r1,r0,8027420 <scanpw+0x108> <== NEVER TAKEN
|| !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))
80273ec: b9 80 08 00 mv r1,r12 80273f0: b9 c0 18 00 mv r3,r14 80273f4: b9 a0 20 00 mv r4,r13 80273f8: 35 62 00 18 addi r2,r11,24 80273fc: 34 05 00 01 mvi r5,1 8027400: fb ff ff 05 calli 8027014 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8027404: 44 20 00 07 be r1,r0,8027420 <scanpw+0x108> <== NEVER TAKEN
|| !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;
8027408: 2f 82 00 26 lhu r2,(sp+38)
pwd->pw_gid = pwgid;
802740c: 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;
8027410: 0d 62 00 08 sh (r11+8),r2
pwd->pw_gid = pwgid;
8027414: 2b 82 00 20 lw r2,(sp+32) 8027418: 0d 62 00 0a sh (r11+10),r2
return 1;
802741c: e0 00 00 02 bi 8027424 <scanpw+0x10c>
8027420: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
8027424: 2b 9d 00 04 lw ra,(sp+4) 8027428: 2b 8b 00 14 lw r11,(sp+20) 802742c: 2b 8c 00 10 lw r12,(sp+16) 8027430: 2b 8d 00 0c lw r13,(sp+12) 8027434: 2b 8e 00 08 lw r14,(sp+8) 8027438: 37 9c 00 24 addi sp,sp,36 802743c: c3 a0 00 00 ret
08003144 <sched_get_priority_max>: #include <rtems/posix/priority.h> int sched_get_priority_max( int policy ) {
8003144: 37 9c ff fc addi sp,sp,-4 8003148: 5b 9d 00 04 sw (sp+4),ra
switch ( policy ) { 800314c: 48 01 00 05 bg r0,r1,8003160 <sched_get_priority_max+0x1c>
8003150: 34 02 00 02 mvi r2,2
8003154: 4c 41 00 08 bge r2,r1,8003174 <sched_get_priority_max+0x30>
8003158: 34 02 00 04 mvi r2,4
800315c: 44 22 00 06 be r1,r2,8003174 <sched_get_priority_max+0x30> <== ALWAYS TAKEN
case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL );
8003160: f8 00 28 67 calli 800d2fc <__errno> 8003164: 34 02 00 16 mvi r2,22 8003168: 58 22 00 00 sw (r1+0),r2 800316c: 34 01 ff ff mvi r1,-1 8003170: e0 00 00 05 bi 8003184 <sched_get_priority_max+0x40>
} return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
8003174: 78 01 08 01 mvhi r1,0x801 8003178: 38 21 e0 e4 ori r1,r1,0xe0e4 800317c: 40 21 00 00 lbu r1,(r1+0) 8003180: 34 21 ff ff addi r1,r1,-1
}
8003184: 2b 9d 00 04 lw ra,(sp+4) 8003188: 37 9c 00 04 addi sp,sp,4 800318c: c3 a0 00 00 ret
08003190 <sched_get_priority_min>: #include <rtems/posix/priority.h> int sched_get_priority_min( int policy ) {
8003190: 37 9c ff fc addi sp,sp,-4 8003194: 5b 9d 00 04 sw (sp+4),ra
switch ( policy ) { 8003198: 48 01 00 07 bg r0,r1,80031b4 <sched_get_priority_min+0x24>
800319c: 34 02 00 02 mvi r2,2
80031a0: 4c 41 00 03 bge r2,r1,80031ac <sched_get_priority_min+0x1c><== ALWAYS TAKEN
80031a4: 34 02 00 04 mvi r2,4 <== NOT EXECUTED 80031a8: 5c 22 00 03 bne r1,r2,80031b4 <sched_get_priority_min+0x24><== NOT EXECUTED
80031ac: 34 01 00 01 mvi r1,1 80031b0: e0 00 00 05 bi 80031c4 <sched_get_priority_min+0x34>
case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL );
80031b4: f8 00 28 52 calli 800d2fc <__errno> 80031b8: 34 02 00 16 mvi r2,22 80031bc: 58 22 00 00 sw (r1+0),r2 80031c0: 34 01 ff ff mvi r1,-1
} return POSIX_SCHEDULER_MINIMUM_PRIORITY; }
80031c4: 2b 9d 00 04 lw ra,(sp+4) 80031c8: 37 9c 00 04 addi sp,sp,4 80031cc: c3 a0 00 00 ret
080031d0 <sched_rr_get_interval>: int sched_rr_get_interval( pid_t pid, struct timespec *interval ) {
80031d0: 37 9c ff f4 addi sp,sp,-12 80031d4: 5b 8b 00 08 sw (sp+8),r11 80031d8: 5b 9d 00 04 sw (sp+4),ra 80031dc: b8 20 58 00 mv r11,r1
/* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() )
80031e0: 44 20 00 08 be r1,r0,8003200 <sched_rr_get_interval+0x30> <== NEVER TAKEN
80031e4: 5b 82 00 0c sw (sp+12),r2 80031e8: fb ff f9 c2 calli 80018f0 <getpid> 80031ec: 2b 82 00 0c lw r2,(sp+12)
80031f0: 45 61 00 04 be r11,r1,8003200 <sched_rr_get_interval+0x30> rtems_set_errno_and_return_minus_one( ESRCH );
80031f4: f8 00 28 42 calli 800d2fc <__errno> 80031f8: 34 02 00 03 mvi r2,3 80031fc: e0 00 00 04 bi 800320c <sched_rr_get_interval+0x3c>
if ( !interval ) 8003200: 5c 40 00 06 bne r2,r0,8003218 <sched_rr_get_interval+0x48> rtems_set_errno_and_return_minus_one( EINVAL );
8003204: f8 00 28 3e calli 800d2fc <__errno> 8003208: 34 02 00 16 mvi r2,22 800320c: 58 22 00 00 sw (r1+0),r2 8003210: 34 01 ff ff mvi r1,-1 8003214: e0 00 00 06 bi 800322c <sched_rr_get_interval+0x5c>
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
8003218: 78 01 08 01 mvhi r1,0x801 800321c: 38 21 e7 f4 ori r1,r1,0xe7f4 8003220: 28 21 00 00 lw r1,(r1+0) 8003224: f8 00 0c 52 calli 800636c <_Timespec_From_ticks> 8003228: 34 01 00 00 mvi r1,0
return 0; }
800322c: 2b 9d 00 04 lw ra,(sp+4) 8003230: 2b 8b 00 08 lw r11,(sp+8) 8003234: 37 9c 00 0c addi sp,sp,12 8003238: c3 a0 00 00 ret
080057b0 <sem_open>: int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) {
80057b0: 37 9c ff c0 addi sp,sp,-64 80057b4: 5b 8b 00 18 sw (sp+24),r11 80057b8: 5b 8c 00 14 sw (sp+20),r12 80057bc: 5b 8d 00 10 sw (sp+16),r13 80057c0: 5b 8e 00 0c sw (sp+12),r14 80057c4: 5b 8f 00 08 sw (sp+8),r15 80057c8: 5b 9d 00 04 sw (sp+4),ra
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
80057cc: 78 09 08 02 mvhi r9,0x802 80057d0: 39 29 3a 64 ori r9,r9,0x3a64 80057d4: 29 2a 00 00 lw r10,(r9+0) 80057d8: 5b 83 00 2c sw (sp+44),r3 80057dc: 5b 84 00 30 sw (sp+48),r4 80057e0: 35 43 00 01 addi r3,r10,1 80057e4: 59 23 00 00 sw (r9+0),r3 80057e8: 5b 85 00 34 sw (sp+52),r5 80057ec: 5b 86 00 38 sw (sp+56),r6 80057f0: 5b 87 00 3c sw (sp+60),r7 80057f4: 5b 88 00 40 sw (sp+64),r8 80057f8: b8 20 68 00 mv r13,r1 80057fc: 5b 82 00 28 sw (sp+40),r2 8005800: b8 40 78 00 mv r15,r2
POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) {
8005804: 20 4c 02 00 andi r12,r2,0x200 8005808: b9 80 70 00 mv r14,r12
800580c: 45 80 00 02 be r12,r0,8005814 <sem_open+0x64> va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int );
8005810: 2b 8e 00 30 lw r14,(sp+48)
va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
8005814: b9 a0 08 00 mv r1,r13 8005818: 37 82 00 24 addi r2,sp,36 800581c: f8 00 16 32 calli 800b0e4 <_POSIX_Semaphore_Name_to_id> 8005820: b8 20 58 00 mv r11,r1
* and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 8005824: 44 20 00 08 be r1,r0,8005844 <sem_open+0x94> /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
8005828: 34 01 00 02 mvi r1,2
800582c: 5d 61 00 02 bne r11,r1,8005834 <sem_open+0x84> <== NEVER TAKEN
8005830: 5d 80 00 1a bne r12,r0,8005898 <sem_open+0xe8> _Thread_Enable_dispatch();
8005834: f8 00 07 8b calli 8007660 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
8005838: f8 00 2b d9 calli 801079c <__errno> 800583c: 58 2b 00 00 sw (r1+0),r11 8005840: e0 00 00 08 bi 8005860 <sem_open+0xb0>
/* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
8005844: 21 ef 0a 00 andi r15,r15,0xa00 8005848: 34 01 0a 00 mvi r1,2560
800584c: 5d e1 00 07 bne r15,r1,8005868 <sem_open+0xb8> _Thread_Enable_dispatch();
8005850: f8 00 07 84 calli 8007660 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
8005854: f8 00 2b d2 calli 801079c <__errno> 8005858: 34 02 00 11 mvi r2,17 800585c: 58 22 00 00 sw (r1+0),r2 8005860: 34 01 ff ff mvi r1,-1 8005864: e0 00 00 19 bi 80058c8 <sem_open+0x118> 8005868: 2b 82 00 24 lw r2,(sp+36) 800586c: 78 01 08 02 mvhi r1,0x802 8005870: 37 83 00 1c addi r3,sp,28 8005874: 38 21 3c e4 ori r1,r1,0x3ce4 8005878: f8 00 05 ac calli 8006f28 <_Objects_Get>
} the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1;
800587c: 28 22 00 18 lw r2,(r1+24)
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
8005880: 5b 81 00 20 sw (sp+32),r1
the_semaphore->open_count += 1;
8005884: 34 42 00 01 addi r2,r2,1 8005888: 58 22 00 18 sw (r1+24),r2
_Thread_Enable_dispatch();
800588c: f8 00 07 75 calli 8007660 <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
8005890: f8 00 07 74 calli 8007660 <_Thread_Enable_dispatch>
goto return_id;
8005894: e0 00 00 0b bi 80058c0 <sem_open+0x110>
/* * At this point, the semaphore does not exist and everything has been * checked. We should go ahead and create a semaphore. */ status =_POSIX_Semaphore_Create_support(
8005898: 34 02 00 00 mvi r2,0 800589c: b9 c0 18 00 mv r3,r14 80058a0: 37 84 00 20 addi r4,sp,32 80058a4: b9 a0 08 00 mv r1,r13 80058a8: f8 00 15 a7 calli 800af44 <_POSIX_Semaphore_Create_support> 80058ac: b8 20 58 00 mv r11,r1
/* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch();
80058b0: f8 00 07 6c calli 8007660 <_Thread_Enable_dispatch>
if ( status == -1 )
80058b4: 34 02 ff ff mvi r2,-1 80058b8: b9 60 08 00 mv r1,r11
80058bc: 45 62 00 03 be r11,r2,80058c8 <sem_open+0x118> return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id;
80058c0: 2b 81 00 20 lw r1,(sp+32) 80058c4: 34 21 00 08 addi r1,r1,8
#endif return id; }
80058c8: 2b 9d 00 04 lw ra,(sp+4) 80058cc: 2b 8b 00 18 lw r11,(sp+24) 80058d0: 2b 8c 00 14 lw r12,(sp+20) 80058d4: 2b 8d 00 10 lw r13,(sp+16) 80058d8: 2b 8e 00 0c lw r14,(sp+12) 80058dc: 2b 8f 00 08 lw r15,(sp+8) 80058e0: 37 9c 00 40 addi sp,sp,64 80058e4: c3 a0 00 00 ret
08026e40 <setgid>: int setgid( gid_t gid ) { _POSIX_types_Gid = gid;
8026e40: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8026e44: 38 42 d2 f0 ori r2,r2,0xd2f0 <== NOT EXECUTED 8026e48: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 8026e4c: 0c 41 00 34 sh (r2+52),r1 <== NOT EXECUTED
return 0; }
8026e50: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8026e54: c3 a0 00 00 ret <== NOT EXECUTED
0802757c <setgrent>: return NULL; return &grent; } void setgrent(void) {
802757c: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 8027580: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
init_etc_passwd_group();
8027584: fb ff ff c3 calli 8027490 <init_etc_passwd_group> <== NOT EXECUTED
if (group_fp != NULL)
8027588: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 802758c: 38 21 0d 20 ori r1,r1,0xd20 <== NOT EXECUTED 8027590: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 8027594: 44 20 00 02 be r1,r0,802759c <setgrent+0x20> <== NOT EXECUTED
fclose(group_fp);
8027598: f8 00 72 de calli 8044110 <fclose> <== NOT EXECUTED
group_fp = fopen("/etc/group", "r");
802759c: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 80275a0: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80275a4: 38 42 91 98 ori r2,r2,0x9198 <== NOT EXECUTED 80275a8: 38 21 15 04 ori r1,r1,0x1504 <== NOT EXECUTED 80275ac: f8 00 75 7e calli 8044ba4 <fopen> <== NOT EXECUTED 80275b0: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 80275b4: 38 42 0d 20 ori r2,r2,0xd20 <== NOT EXECUTED 80275b8: 58 41 00 00 sw (r2+0),r1 <== NOT EXECUTED
}
80275bc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80275c0: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 80275c4: c3 a0 00 00 ret <== NOT EXECUTED
080277b8 <setpwent>: return NULL; return &pwent; } void setpwent(void) {
80277b8: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED 80277bc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
init_etc_passwd_group();
80277c0: fb ff ff 34 calli 8027490 <init_etc_passwd_group> <== NOT EXECUTED
if (passwd_fp != NULL)
80277c4: 78 01 08 07 mvhi r1,0x807 <== NOT EXECUTED 80277c8: 38 21 0c 38 ori r1,r1,0xc38 <== NOT EXECUTED 80277cc: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED 80277d0: 44 20 00 02 be r1,r0,80277d8 <setpwent+0x20> <== NOT EXECUTED
fclose(passwd_fp);
80277d4: f8 00 72 4f calli 8044110 <fclose> <== NOT EXECUTED
passwd_fp = fopen("/etc/passwd", "r");
80277d8: 78 01 08 06 mvhi r1,0x806 <== NOT EXECUTED 80277dc: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 80277e0: 38 42 91 98 ori r2,r2,0x9198 <== NOT EXECUTED 80277e4: 38 21 14 54 ori r1,r1,0x1454 <== NOT EXECUTED 80277e8: f8 00 74 ef calli 8044ba4 <fopen> <== NOT EXECUTED 80277ec: 78 02 08 07 mvhi r2,0x807 <== NOT EXECUTED 80277f0: 38 42 0c 38 ori r2,r2,0xc38 <== NOT EXECUTED 80277f4: 58 41 00 00 sw (r2+0),r1 <== NOT EXECUTED
}
80277f8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80277fc: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED 8027800: c3 a0 00 00 ret <== NOT EXECUTED
08006484 <setuid>: int setuid( uid_t uid ) { _POSIX_types_Uid = uid;
8006484: 78 02 08 06 mvhi r2,0x806 <== NOT EXECUTED 8006488: 38 42 d2 f0 ori r2,r2,0xd2f0 <== NOT EXECUTED 800648c: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED 8006490: 0c 41 00 32 sh (r2+50),r1 <== NOT EXECUTED
return 0; }
8006494: 34 01 00 00 mvi r1,0 <== NOT EXECUTED 8006498: c3 a0 00 00 ret <== NOT EXECUTED
0800300c <sigaction>: int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) {
800300c: 37 9c ff e8 addi sp,sp,-24 8003010: 5b 8b 00 18 sw (sp+24),r11 8003014: 5b 8c 00 14 sw (sp+20),r12 8003018: 5b 8d 00 10 sw (sp+16),r13 800301c: 5b 8e 00 0c sw (sp+12),r14 8003020: 5b 8f 00 08 sw (sp+8),r15 8003024: 5b 9d 00 04 sw (sp+4),ra 8003028: b8 60 70 00 mv r14,r3 800302c: b8 20 58 00 mv r11,r1 8003030: b8 40 60 00 mv r12,r2
ISR_Level level; if ( oact ) 8003034: 44 60 00 0b be r3,r0,8003060 <sigaction+0x54> *oact = _POSIX_signals_Vectors[ sig ];
8003038: b4 21 08 00 add r1,r1,r1 800303c: 34 02 00 02 mvi r2,2 8003040: b4 2b 08 00 add r1,r1,r11 8003044: 78 0d 08 01 mvhi r13,0x801 8003048: fb ff f6 38 calli 8000928 <__ashlsi3> 800304c: 39 ad fd c0 ori r13,r13,0xfdc0 8003050: b5 a1 10 00 add r2,r13,r1 8003054: 34 03 00 0c mvi r3,12 8003058: b9 c0 08 00 mv r1,r14 800305c: f8 00 2b ec calli 800e00c <memcpy>
if ( !sig ) 8003060: 45 60 00 07 be r11,r0,800307c <sigaction+0x70> rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) )
8003064: 35 61 ff ff addi r1,r11,-1 8003068: 34 02 00 1f mvi r2,31
800306c: 50 41 00 02 bgeu r2,r1,8003074 <sigaction+0x68>
8003070: e0 00 00 03 bi 800307c <sigaction+0x70>
* * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL )
8003074: 34 01 00 09 mvi r1,9
8003078: 5d 61 00 06 bne r11,r1,8003090 <sigaction+0x84> rtems_set_errno_and_return_minus_one( EINVAL );
800307c: f8 00 29 37 calli 800d558 <__errno> 8003080: 34 02 00 16 mvi r2,22 8003084: 58 22 00 00 sw (r1+0),r2 8003088: 34 01 ff ff mvi r1,-1 800308c: e0 00 00 1f bi 8003108 <sigaction+0xfc>
/* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) {
8003090: b9 80 08 00 mv r1,r12
8003094: 45 80 00 1d be r12,r0,8003108 <sigaction+0xfc> <== NEVER TAKEN
/* * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level );
8003098: 90 00 70 00 rcsr r14,IE 800309c: 34 01 ff fe mvi r1,-2 80030a0: a1 c1 08 00 and r1,r14,r1 80030a4: d0 01 00 00 wcsr IE,r1
if ( act->sa_handler == SIG_DFL ) {
80030a8: 29 81 00 08 lw r1,(r12+8) 80030ac: 78 0d 08 01 mvhi r13,0x801 80030b0: 39 ad fd c0 ori r13,r13,0xfdc0 80030b4: b5 6b 78 00 add r15,r11,r11
80030b8: 5c 20 00 09 bne r1,r0,80030dc <sigaction+0xd0> _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
80030bc: 34 02 00 02 mvi r2,2 80030c0: b5 eb 08 00 add r1,r15,r11 80030c4: fb ff f6 19 calli 8000928 <__ashlsi3> 80030c8: 78 02 08 01 mvhi r2,0x801 80030cc: 38 42 de 0c ori r2,r2,0xde0c 80030d0: b4 41 10 00 add r2,r2,r1 80030d4: b5 a1 08 00 add r1,r13,r1 80030d8: e0 00 00 08 bi 80030f8 <sigaction+0xec>
} else { _POSIX_signals_Clear_process_signals( sig );
80030dc: b9 60 08 00 mv r1,r11 80030e0: f8 00 17 4f calli 8008e1c <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
80030e4: 34 02 00 02 mvi r2,2 80030e8: b5 eb 08 00 add r1,r15,r11 80030ec: fb ff f6 0f calli 8000928 <__ashlsi3> 80030f0: b5 a1 08 00 add r1,r13,r1 80030f4: b9 80 10 00 mv r2,r12 80030f8: 34 03 00 0c mvi r3,12 80030fc: f8 00 2b c4 calli 800e00c <memcpy>
} _ISR_Enable( level );
8003100: d0 0e 00 00 wcsr IE,r14 8003104: 34 01 00 00 mvi r1,0
* + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; }
8003108: 2b 9d 00 04 lw ra,(sp+4) 800310c: 2b 8b 00 18 lw r11,(sp+24) 8003110: 2b 8c 00 14 lw r12,(sp+20) 8003114: 2b 8d 00 10 lw r13,(sp+16) 8003118: 2b 8e 00 0c lw r14,(sp+12) 800311c: 2b 8f 00 08 lw r15,(sp+8) 8003120: 37 9c 00 18 addi sp,sp,24 8003124: c3 a0 00 00 ret
0800588c <sigsuspend>: #include <rtems/seterr.h> int sigsuspend( const sigset_t *sigmask ) {
800588c: 37 9c ff f0 addi sp,sp,-16 8005890: 5b 8b 00 08 sw (sp+8),r11 8005894: 5b 9d 00 04 sw (sp+4),ra
int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
8005898: b8 20 10 00 mv r2,r1 800589c: 37 83 00 10 addi r3,sp,16 80058a0: 34 01 00 01 mvi r1,1 80058a4: fb ff ff ec calli 8005854 <sigprocmask>
(void) sigfillset( &all_signals );
80058a8: 37 8b 00 0c addi r11,sp,12 80058ac: b9 60 08 00 mv r1,r11 80058b0: fb ff ff ac calli 8005760 <sigfillset>
status = sigtimedwait( &all_signals, NULL, NULL );
80058b4: 34 02 00 00 mvi r2,0 80058b8: b8 40 18 00 mv r3,r2 80058bc: b9 60 08 00 mv r1,r11 80058c0: f8 00 00 2f calli 800597c <sigtimedwait> 80058c4: b8 20 58 00 mv r11,r1
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
80058c8: 34 01 00 00 mvi r1,0 80058cc: 37 82 00 10 addi r2,sp,16 80058d0: b8 20 18 00 mv r3,r1 80058d4: fb ff ff e0 calli 8005854 <sigprocmask>
/* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 )
80058d8: 34 02 ff ff mvi r2,-1
80058dc: 45 62 00 04 be r11,r2,80058ec <sigsuspend+0x60> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINTR );
80058e0: f8 00 28 20 calli 800f960 <__errno> 80058e4: 34 02 00 04 mvi r2,4 80058e8: 58 22 00 00 sw (r1+0),r2
return status; }
80058ec: 34 01 ff ff mvi r1,-1 80058f0: 2b 9d 00 04 lw ra,(sp+4) 80058f4: 2b 8b 00 08 lw r11,(sp+8) 80058f8: 37 9c 00 10 addi sp,sp,16 80058fc: c3 a0 00 00 ret
080035f8 <sigtimedwait>: int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) {
80035f8: 37 9c ff dc addi sp,sp,-36 80035fc: 5b 8b 00 18 sw (sp+24),r11 8003600: 5b 8c 00 14 sw (sp+20),r12 8003604: 5b 8d 00 10 sw (sp+16),r13 8003608: 5b 8e 00 0c sw (sp+12),r14 800360c: 5b 8f 00 08 sw (sp+8),r15 8003610: 5b 9d 00 04 sw (sp+4),ra 8003614: b8 20 60 00 mv r12,r1 8003618: b8 40 68 00 mv r13,r2 800361c: b8 60 58 00 mv r11,r3
ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 8003620: 44 20 00 09 be r1,r0,8003644 <sigtimedwait+0x4c> /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 8003624: 44 60 00 0d be r3,r0,8003658 <sigtimedwait+0x60> if ( !_Timespec_Is_valid( timeout ) )
8003628: b8 60 08 00 mv r1,r3 800362c: f8 00 0c 8a calli 8006854 <_Timespec_Is_valid>
8003630: 44 20 00 05 be r1,r0,8003644 <sigtimedwait+0x4c> rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout );
8003634: b9 60 08 00 mv r1,r11 8003638: f8 00 0c a0 calli 80068b8 <_Timespec_To_ticks> 800363c: b8 20 10 00 mv r2,r1
if ( !interval )
8003640: 5c 20 00 07 bne r1,r0,800365c <sigtimedwait+0x64> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
8003644: f8 00 28 a1 calli 800d8c8 <__errno> 8003648: 34 02 00 16 mvi r2,22 800364c: 58 22 00 00 sw (r1+0),r2 8003650: 34 0c ff ff mvi r12,-1 8003654: e0 00 00 58 bi 80037b4 <sigtimedwait+0x1bc> 8003658: b8 60 10 00 mv r2,r3
/* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information;
800365c: 37 8b 00 1c addi r11,sp,28
8003660: 45 a0 00 02 be r13,r0,8003668 <sigtimedwait+0x70>
8003664: b9 a0 58 00 mv r11,r13
the_thread = _Thread_Executing;
8003668: 78 01 08 01 mvhi r1,0x801 800366c: 38 21 f9 70 ori r1,r1,0xf970 8003670: 28 24 00 00 lw r4,(r1+0)
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
8003674: 28 8d 01 2c lw r13,(r4+300)
* What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level );
8003678: 90 00 70 00 rcsr r14,IE 800367c: 34 01 ff fe mvi r1,-2 8003680: a1 c1 08 00 and r1,r14,r1 8003684: d0 01 00 00 wcsr IE,r1
if ( *set & api->signals_pending ) {
8003688: 29 83 00 00 lw r3,(r12+0) 800368c: 29 a1 00 d0 lw r1,(r13+208) 8003690: a0 61 78 00 and r15,r3,r1
8003694: 45 e0 00 0f be r15,r0,80036d0 <sigtimedwait+0xd8> /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending );
8003698: fb ff ff b9 calli 800357c <_POSIX_signals_Get_highest>
_POSIX_signals_Clear_signals(
800369c: 34 04 00 00 mvi r4,0
/* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending );
80036a0: b8 20 10 00 mv r2,r1 80036a4: 59 61 00 00 sw (r11+0),r1
_POSIX_signals_Clear_signals(
80036a8: b9 60 18 00 mv r3,r11 80036ac: b9 a0 08 00 mv r1,r13 80036b0: b8 80 28 00 mv r5,r4 80036b4: f8 00 18 2b calli 8009760 <_POSIX_signals_Clear_signals>
the_info->si_signo, the_info, false, false ); _ISR_Enable( level );
80036b8: d0 0e 00 00 wcsr IE,r14
the_info->si_code = SI_USER;
80036bc: 34 01 00 01 mvi r1,1 80036c0: 59 61 00 04 sw (r11+4),r1
the_info->si_value.sival_int = 0;
80036c4: 34 01 00 00 mvi r1,0 80036c8: 59 61 00 08 sw (r11+8),r1 80036cc: e0 00 00 39 bi 80037b0 <sigtimedwait+0x1b8>
return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) {
80036d0: 78 01 08 01 mvhi r1,0x801 80036d4: 38 21 ff b4 ori r1,r1,0xffb4 80036d8: 28 21 00 00 lw r1,(r1+0) 80036dc: a0 61 18 00 and r3,r3,r1
80036e0: 44 6f 00 10 be r3,r15,8003720 <sigtimedwait+0x128> signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
80036e4: fb ff ff a6 calli 800357c <_POSIX_signals_Get_highest> 80036e8: b8 20 60 00 mv r12,r1
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
80036ec: b9 80 10 00 mv r2,r12 80036f0: b9 a0 08 00 mv r1,r13 80036f4: b9 60 18 00 mv r3,r11 80036f8: b9 e0 28 00 mv r5,r15 80036fc: 34 04 00 01 mvi r4,1 8003700: f8 00 18 18 calli 8009760 <_POSIX_signals_Clear_signals>
_ISR_Enable( level );
8003704: d0 0e 00 00 wcsr IE,r14
the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0;
8003708: 34 01 00 00 mvi r1,0 800370c: 59 61 00 08 sw (r11+8),r1
signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); _ISR_Enable( level ); the_info->si_signo = signo; the_info->si_code = SI_USER;
8003710: 34 01 00 01 mvi r1,1 8003714: 59 61 00 04 sw (r11+4),r1
if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); _ISR_Enable( level ); the_info->si_signo = signo;
8003718: 59 6c 00 00 sw (r11+0),r12
the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo;
800371c: e0 00 00 26 bi 80037b4 <sigtimedwait+0x1bc> 8003720: 78 03 08 01 mvhi r3,0x801 8003724: 38 63 f8 b4 ori r3,r3,0xf8b4 8003728: 28 61 00 00 lw r1,(r3+0)
} the_info->si_signo = -1;
800372c: 34 05 ff ff mvi r5,-1 8003730: 59 65 00 00 sw (r11+0),r5 8003734: 34 21 00 01 addi r1,r1,1 8003738: 58 61 00 00 sw (r3+0),r1
_Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; the_thread->Wait.return_code = EINTR;
800373c: 34 01 00 04 mvi r1,4 8003740: 58 81 00 34 sw (r4+52),r1
the_thread->Wait.option = *set;
8003744: 29 8c 00 00 lw r12,(r12+0)
} the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
8003748: 78 03 08 01 mvhi r3,0x801 800374c: 38 63 ff 4c ori r3,r3,0xff4c
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;
8003750: 34 01 00 01 mvi r1,1
the_thread->Wait.return_code = EINTR; the_thread->Wait.option = *set;
8003754: 58 8c 00 30 sw (r4+48),r12 8003758: 58 61 00 30 sw (r3+48),r1
the_thread->Wait.return_argument = the_info;
800375c: 58 8b 00 28 sw (r4+40),r11
} the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
8003760: 58 83 00 44 sw (r4+68),r3
the_thread->Wait.return_code = EINTR; the_thread->Wait.option = *set; the_thread->Wait.return_argument = the_info; _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level );
8003764: d0 0e 00 00 wcsr IE,r14
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
8003768: 78 01 08 01 mvhi r1,0x801 800376c: 78 03 08 00 mvhi r3,0x800 8003770: 38 63 62 9c ori r3,r3,0x629c 8003774: 38 21 ff 4c ori r1,r1,0xff4c 8003778: f8 00 09 da calli 8005ee0 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
800377c: f8 00 08 8e calli 80059b4 <_Thread_Enable_dispatch>
/* * When the thread is set free by a signal, it is need to eliminate * the signal. */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
8003780: 29 62 00 00 lw r2,(r11+0) 8003784: 34 04 00 00 mvi r4,0 8003788: b9 60 18 00 mv r3,r11 800378c: b8 80 28 00 mv r5,r4 8003790: b9 a0 08 00 mv r1,r13 8003794: f8 00 17 f3 calli 8009760 <_POSIX_signals_Clear_signals>
errno = _Thread_Executing->Wait.return_code;
8003798: f8 00 28 4c calli 800d8c8 <__errno> 800379c: 78 02 08 01 mvhi r2,0x801 80037a0: 38 42 f9 70 ori r2,r2,0xf970 80037a4: 28 42 00 00 lw r2,(r2+0) 80037a8: 28 42 00 34 lw r2,(r2+52) 80037ac: 58 22 00 00 sw (r1+0),r2
return the_info->si_signo;
80037b0: 29 6c 00 00 lw r12,(r11+0)
}
80037b4: b9 80 08 00 mv r1,r12 80037b8: 2b 9d 00 04 lw ra,(sp+4) 80037bc: 2b 8b 00 18 lw r11,(sp+24) 80037c0: 2b 8c 00 14 lw r12,(sp+20) 80037c4: 2b 8d 00 10 lw r13,(sp+16) 80037c8: 2b 8e 00 0c lw r14,(sp+12) 80037cc: 2b 8f 00 08 lw r15,(sp+8) 80037d0: 37 9c 00 24 addi sp,sp,36 80037d4: c3 a0 00 00 ret
08005b78 <sigwait>: int sigwait( const sigset_t *set, int *sig ) {
8005b78: 37 9c ff f8 addi sp,sp,-8 8005b7c: 5b 8b 00 08 sw (sp+8),r11 8005b80: 5b 9d 00 04 sw (sp+4),ra 8005b84: b8 40 58 00 mv r11,r2
int status; status = sigtimedwait( set, NULL, NULL );
8005b88: 34 02 00 00 mvi r2,0 8005b8c: b8 40 18 00 mv r3,r2 8005b90: fb ff ff 7b calli 800597c <sigtimedwait> 8005b94: b8 20 10 00 mv r2,r1
if ( status != -1 ) {
8005b98: 34 01 ff ff mvi r1,-1
8005b9c: 44 41 00 06 be r2,r1,8005bb4 <sigwait+0x3c> if ( sig )
8005ba0: b9 60 08 00 mv r1,r11
8005ba4: 45 60 00 06 be r11,r0,8005bbc <sigwait+0x44> <== NEVER TAKEN
*sig = status;
8005ba8: 59 62 00 00 sw (r11+0),r2 8005bac: 34 01 00 00 mvi r1,0 8005bb0: e0 00 00 03 bi 8005bbc <sigwait+0x44>
return 0; } return errno;
8005bb4: f8 00 27 6b calli 800f960 <__errno> 8005bb8: 28 21 00 00 lw r1,(r1+0)
}
8005bbc: 2b 9d 00 04 lw ra,(sp+4) 8005bc0: 2b 8b 00 08 lw r11,(sp+8) 8005bc4: 37 9c 00 08 addi sp,sp,8 8005bc8: c3 a0 00 00 ret
08004684 <siproc>: /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) {
8004684: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED 8004688: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED 800468c: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED 8004690: 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)) {
8004694: 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) {
8004698: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED 800469c: 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)) {
80046a0: 20 61 0e 78 andi r1,r3,0xe78 <== NOT EXECUTED 80046a4: 44 20 00 0c be r1,r0,80046d4 <siproc+0x50> <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
80046a8: 28 41 00 18 lw r1,(r2+24) <== NOT EXECUTED 80046ac: 34 02 00 00 mvi r2,0 <== NOT EXECUTED 80046b0: b8 40 18 00 mv r3,r2 <== NOT EXECUTED 80046b4: f8 00 06 e4 calli 8006244 <rtems_semaphore_obtain> <== NOT EXECUTED
i = iproc (c, tty);
80046b8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80046bc: b9 60 10 00 mv r2,r11 <== NOT EXECUTED 80046c0: fb ff ff 82 calli 80044c8 <iproc> <== NOT EXECUTED 80046c4: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
80046c8: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED 80046cc: f8 00 07 2e calli 8006384 <rtems_semaphore_release> <== NOT EXECUTED 80046d0: e0 00 00 04 bi 80046e0 <siproc+0x5c> <== NOT EXECUTED
} else { i = iproc (c, tty);
80046d4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80046d8: fb ff ff 7c calli 80044c8 <iproc> <== NOT EXECUTED 80046dc: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
} return i; }
80046e0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80046e4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 80046e8: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED 80046ec: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED 80046f0: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED 80046f4: c3 a0 00 00 ret <== NOT EXECUTED
080079e4 <stat>: int _STAT_NAME( const char *path, struct stat *buf ) {
80079e4: 37 9c ff dc addi sp,sp,-36 80079e8: 5b 8b 00 10 sw (sp+16),r11 80079ec: 5b 8c 00 0c sw (sp+12),r12 80079f0: 5b 8d 00 08 sw (sp+8),r13 80079f4: 5b 9d 00 04 sw (sp+4),ra 80079f8: b8 40 68 00 mv r13,r2 80079fc: b8 20 58 00 mv r11,r1
/* * Check to see if we were passed a valid pointer. */ if ( !buf ) 8007a00: 5c 40 00 04 bne r2,r0,8007a10 <stat+0x2c> rtems_set_errno_and_return_minus_one( EFAULT );
8007a04: f8 00 f1 61 calli 8043f88 <__errno> 8007a08: 34 02 00 0e mvi r2,14 8007a0c: e0 00 00 16 bi 8007a64 <stat+0x80>
status = rtems_filesystem_evaluate_path( path, strlen( path ),
8007a10: f8 01 0f 5f calli 804b78c <strlen> 8007a14: 37 8c 00 14 addi r12,sp,20 8007a18: b8 20 10 00 mv r2,r1 8007a1c: 34 03 00 00 mvi r3,0 8007a20: b9 60 08 00 mv r1,r11 8007a24: b9 80 20 00 mv r4,r12 8007a28: 34 05 00 01 mvi r5,1 8007a2c: fb ff f9 fa calli 8006214 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 )
8007a30: 34 0b ff ff mvi r11,-1
8007a34: 5c 20 00 1f bne r1,r0,8007ab0 <stat+0xcc> return -1; if ( !loc.handlers->fstat_h ){
8007a38: 2b 82 00 1c lw r2,(sp+28) 8007a3c: 28 42 00 18 lw r2,(r2+24)
8007a40: 5c 41 00 0c bne r2,r1,8007a70 <stat+0x8c> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
8007a44: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 8007a48: 44 22 00 05 be r1,r2,8007a5c <stat+0x78> <== NOT EXECUTED 8007a4c: 28 23 00 1c lw r3,(r1+28) <== NOT EXECUTED 8007a50: 44 62 00 03 be r3,r2,8007a5c <stat+0x78> <== NOT EXECUTED 8007a54: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8007a58: d8 60 00 00 call r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8007a5c: f8 00 f1 4b calli 8043f88 <__errno> <== NOT EXECUTED 8007a60: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8007a64: 58 22 00 00 sw (r1+0),r2 8007a68: 34 0b ff ff mvi r11,-1 8007a6c: e0 00 00 11 bi 8007ab0 <stat+0xcc>
/* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) );
8007a70: b8 20 10 00 mv r2,r1 8007a74: 34 03 00 48 mvi r3,72 8007a78: b9 a0 08 00 mv r1,r13 8007a7c: f8 01 00 b0 calli 8047d3c <memset>
status = (*loc.handlers->fstat_h)( &loc, buf );
8007a80: 2b 83 00 1c lw r3,(sp+28) 8007a84: b9 a0 10 00 mv r2,r13 8007a88: b9 80 08 00 mv r1,r12 8007a8c: 28 63 00 18 lw r3,(r3+24) 8007a90: d8 60 00 00 call r3 8007a94: b8 20 58 00 mv r11,r1
rtems_filesystem_freenode( &loc );
8007a98: 2b 81 00 20 lw r1,(sp+32)
8007a9c: 44 20 00 05 be r1,r0,8007ab0 <stat+0xcc> <== NEVER TAKEN
8007aa0: 28 22 00 1c lw r2,(r1+28)
8007aa4: 44 40 00 03 be r2,r0,8007ab0 <stat+0xcc> <== NEVER TAKEN
8007aa8: b9 80 08 00 mv r1,r12 8007aac: d8 40 00 00 call r2
return status; }
8007ab0: b9 60 08 00 mv r1,r11 8007ab4: 2b 9d 00 04 lw ra,(sp+4) 8007ab8: 2b 8b 00 10 lw r11,(sp+16) 8007abc: 2b 8c 00 0c lw r12,(sp+12) 8007ac0: 2b 8d 00 08 lw r13,(sp+8) 8007ac4: 37 9c 00 24 addi sp,sp,36 8007ac8: c3 a0 00 00 ret
08028950 <statvfs>: */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) {
8028950: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED 8028954: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED 8028958: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED 802895c: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED 8028960: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED 8028964: b8 20 58 00 mv r11,r1 <== NOT EXECUTED 8028968: b8 40 68 00 mv r13,r2 <== NOT EXECUTED
* The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
802896c: 37 8c 00 14 addi r12,sp,20 <== NOT EXECUTED 8028970: f8 00 8b 87 calli 804b78c <strlen> <== NOT EXECUTED 8028974: b8 20 10 00 mv r2,r1 <== NOT EXECUTED 8028978: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 802897c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8028980: b9 80 20 00 mv r4,r12 <== NOT EXECUTED 8028984: 34 05 00 01 mvi r5,1 <== NOT EXECUTED 8028988: fb ff 76 23 calli 8006214 <rtems_filesystem_evaluate_path> <== NOT EXECUTED 802898c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED 8028990: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8028994: 5c 20 00 1a bne r1,r0,80289fc <statvfs+0xac> <== NOT EXECUTED
return -1; mt_entry = loc.mt_entry;
8028998: 2b 8b 00 24 lw r11,(sp+36) <== NOT EXECUTED
fs_mount_root = &mt_entry->mt_fs_root;
802899c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED 80289a0: 28 21 00 44 lw r1,(r1+68) <== NOT EXECUTED 80289a4: 5c 23 00 06 bne r1,r3,80289bc <statvfs+0x6c> <== NOT EXECUTED
if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
80289a8: f8 00 6d 78 calli 8043f88 <__errno> <== NOT EXECUTED 80289ac: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80289b0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80289b4: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 80289b8: e0 00 00 11 bi 80289fc <statvfs+0xac> <== NOT EXECUTED
memset (sb, 0, sizeof (struct statvfs));
80289bc: b8 60 10 00 mv r2,r3 <== NOT EXECUTED 80289c0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 80289c4: 34 03 00 38 mvi r3,56 <== NOT EXECUTED 80289c8: f8 00 7c dd calli 8047d3c <memset> <== NOT EXECUTED
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
80289cc: 29 63 00 28 lw r3,(r11+40) <== NOT EXECUTED 80289d0: 35 61 00 1c addi r1,r11,28 <== NOT EXECUTED 80289d4: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED 80289d8: 28 63 00 44 lw r3,(r3+68) <== NOT EXECUTED 80289dc: d8 60 00 00 call r3 <== NOT EXECUTED 80289e0: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
80289e4: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED 80289e8: 44 20 00 05 be r1,r0,80289fc <statvfs+0xac> <== NOT EXECUTED 80289ec: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 80289f0: 44 40 00 03 be r2,r0,80289fc <statvfs+0xac> <== NOT EXECUTED 80289f4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 80289f8: d8 40 00 00 call r2 <== NOT EXECUTED
return result; }
80289fc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8028a00: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED 8028a04: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED 8028a08: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED 8028a0c: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED 8028a10: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED 8028a14: c3 a0 00 00 ret <== NOT EXECUTED
08028a18 <symlink>: int symlink( const char *actualpath, const char *sympath ) {
8028a18: 37 9c ff d4 addi sp,sp,-44 8028a1c: 5b 8b 00 14 sw (sp+20),r11 8028a20: 5b 8c 00 10 sw (sp+16),r12 8028a24: 5b 8d 00 0c sw (sp+12),r13 8028a28: 5b 8e 00 08 sw (sp+8),r14 8028a2c: 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 );
8028a30: 40 43 00 00 lbu r3,(r2+0)
int symlink( const char *actualpath, const char *sympath ) {
8028a34: b8 20 70 00 mv r14,r1 8028a38: b8 40 68 00 mv r13,r2
rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc );
8028a3c: 64 6b 00 5c cmpei r11,r3,92 8028a40: 64 61 00 2f cmpei r1,r3,47 8028a44: b9 61 58 00 or r11,r11,r1
8028a48: 5d 60 00 02 bne r11,r0,8028a50 <symlink+0x38>
8028a4c: 5c 6b 00 0a bne r3,r11,8028a74 <symlink+0x5c> <== ALWAYS TAKEN
8028a50: 78 03 08 06 mvhi r3,0x806 8028a54: 38 63 d2 f0 ori r3,r3,0xd2f0 8028a58: 28 64 00 00 lw r4,(r3+0) 8028a5c: 37 81 00 18 addi r1,sp,24 8028a60: 34 03 00 14 mvi r3,20 8028a64: 34 82 00 18 addi r2,r4,24 8028a68: f8 00 7b eb calli 8047a14 <memcpy> 8028a6c: 34 0b 00 01 mvi r11,1 8028a70: e0 00 00 08 bi 8028a90 <symlink+0x78> 8028a74: 78 03 08 06 mvhi r3,0x806 8028a78: 38 63 d2 f0 ori r3,r3,0xd2f0 8028a7c: 28 64 00 00 lw r4,(r3+0) 8028a80: 37 81 00 18 addi r1,sp,24 8028a84: 34 03 00 14 mvi r3,20 8028a88: 34 82 00 04 addi r2,r4,4 8028a8c: f8 00 7b e2 calli 8047a14 <memcpy>
if ( !loc.ops->evalformake_h ) {
8028a90: 2b 81 00 24 lw r1,(sp+36) 8028a94: 28 24 00 04 lw r4,(r1+4)
8028a98: 44 80 00 0f be r4,r0,8028ad4 <symlink+0xbc> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
8028a9c: 37 8c 00 18 addi r12,sp,24 8028aa0: b5 ab 08 00 add r1,r13,r11 8028aa4: b9 80 10 00 mv r2,r12 8028aa8: 37 83 00 2c addi r3,sp,44 8028aac: d8 80 00 00 call r4
if ( result != 0 )
8028ab0: 34 0b ff ff mvi r11,-1
8028ab4: 5c 20 00 18 bne r1,r0,8028b14 <symlink+0xfc> return -1; if ( !loc.ops->symlink_h ) {
8028ab8: 2b 83 00 24 lw r3,(sp+36) 8028abc: 28 64 00 38 lw r4,(r3+56)
8028ac0: 5c 81 00 0a bne r4,r1,8028ae8 <symlink+0xd0> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
8028ac4: 28 62 00 1c lw r2,(r3+28) <== NOT EXECUTED 8028ac8: 44 44 00 03 be r2,r4,8028ad4 <symlink+0xbc> <== NOT EXECUTED 8028acc: b9 80 08 00 mv r1,r12 <== NOT EXECUTED 8028ad0: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8028ad4: f8 00 6d 2d calli 8043f88 <__errno> <== NOT EXECUTED 8028ad8: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8028adc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8028ae0: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 8028ae4: e0 00 00 0c bi 8028b14 <symlink+0xfc> <== NOT EXECUTED
} result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
8028ae8: 2b 83 00 2c lw r3,(sp+44) 8028aec: b9 c0 10 00 mv r2,r14 8028af0: b9 80 08 00 mv r1,r12 8028af4: d8 80 00 00 call r4 8028af8: b8 20 58 00 mv r11,r1
rtems_filesystem_freenode( &loc );
8028afc: 2b 81 00 24 lw r1,(sp+36)
8028b00: 44 20 00 05 be r1,r0,8028b14 <symlink+0xfc> <== NEVER TAKEN
8028b04: 28 22 00 1c lw r2,(r1+28)
8028b08: 44 40 00 03 be r2,r0,8028b14 <symlink+0xfc> <== NEVER TAKEN
8028b0c: b9 80 08 00 mv r1,r12 8028b10: d8 40 00 00 call r2
return result; }
8028b14: b9 60 08 00 mv r1,r11 8028b18: 2b 9d 00 04 lw ra,(sp+4) 8028b1c: 2b 8b 00 14 lw r11,(sp+20) 8028b20: 2b 8c 00 10 lw r12,(sp+16) 8028b24: 2b 8d 00 0c lw r13,(sp+12) 8028b28: 2b 8e 00 08 lw r14,(sp+8) 8028b2c: 37 9c 00 2c addi sp,sp,44 8028b30: c3 a0 00 00 ret
08003cd4 <sync_per_thread>: fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) {
8003cd4: 37 9c ff f4 addi sp,sp,-12 8003cd8: 5b 8b 00 0c sw (sp+12),r11 8003cdc: 5b 8c 00 08 sw (sp+8),r12 8003ce0: 5b 9d 00 04 sw (sp+4),ra
/* * The sync_wrapper() function will operate on the current thread's * reent structure so we will temporarily use that. */ this_reent = t->libc_reent;
8003ce4: 28 23 01 24 lw r3,(r1+292)
if ( this_reent ) {
8003ce8: 44 60 00 0c be r3,r0,8003d18 <sync_per_thread+0x44> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
8003cec: 78 0b 08 02 mvhi r11,0x802 8003cf0: 39 6b 19 38 ori r11,r11,0x1938 8003cf4: 29 64 00 00 lw r4,(r11+0)
_Thread_Executing->libc_reent = this_reent; _fwalk (t->libc_reent, sync_wrapper);
8003cf8: 78 02 08 00 mvhi r2,0x800 8003cfc: 38 42 3d 64 ori r2,r2,0x3d64
* The sync_wrapper() function will operate on the current thread's * reent structure so we will temporarily use that. */ this_reent = t->libc_reent; if ( this_reent ) { current_reent = _Thread_Executing->libc_reent;
8003d00: 28 8c 01 24 lw r12,(r4+292)
_Thread_Executing->libc_reent = this_reent;
8003d04: 58 83 01 24 sw (r4+292),r3
_fwalk (t->libc_reent, sync_wrapper);
8003d08: 28 21 01 24 lw r1,(r1+292) 8003d0c: f8 00 31 c6 calli 8010424 <_fwalk>
_Thread_Executing->libc_reent = current_reent;
8003d10: 29 61 00 00 lw r1,(r11+0) 8003d14: 58 2c 01 24 sw (r1+292),r12
} }
8003d18: 2b 9d 00 04 lw ra,(sp+4) 8003d1c: 2b 8b 00 0c lw r11,(sp+12) 8003d20: 2b 8c 00 08 lw r12,(sp+8) 8003d24: 37 9c 00 0c addi sp,sp,12 8003d28: c3 a0 00 00 ret
08010890 <tcsetattr>: int tcsetattr( int fd, int opt, struct termios *tp ) {
8010890: 37 9c ff f4 addi sp,sp,-12 8010894: 5b 8b 00 0c sw (sp+12),r11 8010898: 5b 8c 00 08 sw (sp+8),r12 801089c: 5b 9d 00 04 sw (sp+4),ra 80108a0: b8 60 58 00 mv r11,r3 80108a4: b8 20 60 00 mv r12,r1
switch (opt) {
80108a8: 44 40 00 0d be r2,r0,80108dc <tcsetattr+0x4c> <== ALWAYS TAKEN
80108ac: 34 03 00 01 mvi r3,1 <== NOT EXECUTED 80108b0: 44 43 00 05 be r2,r3,80108c4 <tcsetattr+0x34> <== NOT EXECUTED
default: rtems_set_errno_and_return_minus_one( ENOTSUP );
80108b4: f8 00 17 ee calli 801686c <__errno> <== NOT EXECUTED 80108b8: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 80108bc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 80108c0: e0 00 00 05 bi 80108d4 <tcsetattr+0x44> <== NOT EXECUTED
case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
80108c4: 34 02 00 03 mvi r2,3 <== NOT EXECUTED 80108c8: 34 03 00 00 mvi r3,0 <== NOT EXECUTED 80108cc: f8 00 10 c5 calli 8014be0 <ioctl> <== NOT EXECUTED 80108d0: 4c 20 00 03 bge r1,r0,80108dc <tcsetattr+0x4c> <== NOT EXECUTED 80108d4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED 80108d8: e0 00 00 05 bi 80108ec <tcsetattr+0x5c> <== NOT EXECUTED
return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
80108dc: b9 80 08 00 mv r1,r12 80108e0: b9 60 18 00 mv r3,r11 80108e4: 34 02 00 02 mvi r2,2 80108e8: f8 00 10 be calli 8014be0 <ioctl>
} }
80108ec: 2b 9d 00 04 lw ra,(sp+4) 80108f0: 2b 8b 00 0c lw r11,(sp+12) 80108f4: 2b 8c 00 08 lw r12,(sp+8) 80108f8: 37 9c 00 0c addi sp,sp,12 80108fc: c3 a0 00 00 ret
080025e4 <timer_create>: int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) {
80025e4: 37 9c ff e8 addi sp,sp,-24 80025e8: 5b 8b 00 18 sw (sp+24),r11 80025ec: 5b 8c 00 14 sw (sp+20),r12 80025f0: 5b 8d 00 10 sw (sp+16),r13 80025f4: 5b 8e 00 0c sw (sp+12),r14 80025f8: 5b 8f 00 08 sw (sp+8),r15 80025fc: 5b 9d 00 04 sw (sp+4),ra 8002600: b8 40 60 00 mv r12,r2
POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME )
8002604: 34 02 00 01 mvi r2,1
int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) {
8002608: b8 60 68 00 mv r13,r3
POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 800260c: 5c 22 00 0c bne r1,r2,800263c <timer_create+0x58> rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 8002610: 44 60 00 0b be r3,r0,800263c <timer_create+0x58> /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 8002614: 45 80 00 0d be r12,r0,8002648 <timer_create+0x64> /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) &&
8002618: 29 82 00 00 lw r2,(r12+0) 800261c: 34 42 ff ff addi r2,r2,-1
8002620: 50 22 00 02 bgeu r1,r2,8002628 <timer_create+0x44> <== ALWAYS TAKEN
8002624: e0 00 00 06 bi 800263c <timer_create+0x58> <== NOT EXECUTED
( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo )
8002628: 29 81 00 04 lw r1,(r12+4)
800262c: 44 20 00 04 be r1,r0,800263c <timer_create+0x58> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) )
8002630: 34 21 ff ff addi r1,r1,-1 8002634: 34 02 00 1f mvi r2,31
8002638: 50 41 00 04 bgeu r2,r1,8002648 <timer_create+0x64> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
800263c: f8 00 2a e2 calli 800d1c4 <__errno> 8002640: 34 02 00 16 mvi r2,22 8002644: e0 00 00 0e bi 800267c <timer_create+0x98>
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
8002648: 78 01 08 02 mvhi r1,0x802 800264c: 38 21 18 bc ori r1,r1,0x18bc 8002650: 28 22 00 00 lw r2,(r1+0) 8002654: 34 42 00 01 addi r2,r2,1 8002658: 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 );
800265c: 78 01 08 02 mvhi r1,0x802 8002660: 38 21 1b 7c ori r1,r1,0x1b7c 8002664: f8 00 05 8a calli 8003c8c <_Objects_Allocate> 8002668: b8 20 58 00 mv r11,r1
/* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 800266c: 5c 20 00 07 bne r1,r0,8002688 <timer_create+0xa4> _Thread_Enable_dispatch();
8002670: f8 00 08 25 calli 8004704 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
8002674: f8 00 2a d4 calli 800d1c4 <__errno> 8002678: 34 02 00 0b mvi r2,11 800267c: 58 22 00 00 sw (r1+0),r2 8002680: 34 01 ff ff mvi r1,-1 8002684: e0 00 00 26 bi 800271c <timer_create+0x138>
} /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
8002688: 34 02 00 02 mvi r2,2
ptimer->thread_id = _Thread_Executing->Object.id;
800268c: 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;
8002690: 31 62 00 3c sb (r11+60),r2
ptimer->thread_id = _Thread_Executing->Object.id;
8002694: 38 21 19 78 ori r1,r1,0x1978 8002698: 28 21 00 00 lw r1,(r1+0) 800269c: 28 21 00 08 lw r1,(r1+8) 80026a0: 59 61 00 38 sw (r11+56),r1
if ( evp != NULL ) { 80026a4: 45 80 00 07 be r12,r0,80026c0 <timer_create+0xdc> ptimer->inf.sigev_notify = evp->sigev_notify; ptimer->inf.sigev_signo = evp->sigev_signo; ptimer->inf.sigev_value = evp->sigev_value;
80026a8: 29 81 00 08 lw r1,(r12+8) 80026ac: 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;
80026b0: 29 81 00 00 lw r1,(r12+0)
ptimer->inf.sigev_signo = evp->sigev_signo;
80026b4: 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;
80026b8: 59 61 00 40 sw (r11+64),r1
ptimer->inf.sigev_signo = evp->sigev_signo;
80026bc: 59 6c 00 44 sw (r11+68),r12
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
80026c0: 29 6e 00 08 lw r14,(r11+8) 80026c4: 78 01 08 02 mvhi r1,0x802 80026c8: 38 21 1b 7c ori r1,r1,0x1b7c
ptimer->inf.sigev_value = evp->sigev_value; } ptimer->overrun = 0;
80026cc: 34 0c 00 00 mvi r12,0 80026d0: 28 2f 00 1c lw r15,(r1+28) 80026d4: 34 02 00 02 mvi r2,2 80026d8: 59 6c 00 68 sw (r11+104),r12
ptimer->timer_data.it_value.tv_sec = 0;
80026dc: 59 6c 00 5c sw (r11+92),r12
ptimer->timer_data.it_value.tv_nsec = 0;
80026e0: 59 6c 00 60 sw (r11+96),r12
ptimer->timer_data.it_interval.tv_sec = 0;
80026e4: 59 6c 00 54 sw (r11+84),r12
ptimer->timer_data.it_interval.tv_nsec = 0;
80026e8: 59 6c 00 58 sw (r11+88),r12
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
80026ec: 59 6c 00 18 sw (r11+24),r12
the_watchdog->routine = routine;
80026f0: 59 6c 00 2c sw (r11+44),r12
the_watchdog->id = id;
80026f4: 59 6c 00 30 sw (r11+48),r12
the_watchdog->user_data = user_data;
80026f8: 59 6c 00 34 sw (r11+52),r12 80026fc: 21 c1 ff ff andi r1,r14,0xffff 8002700: fb ff f7 af calli 80005bc <__ashlsi3> 8002704: b5 e1 08 00 add r1,r15,r1 8002708: 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;
800270c: 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;
8002710: 59 ae 00 00 sw (r13+0),r14
_Thread_Enable_dispatch();
8002714: f8 00 07 fc calli 8004704 <_Thread_Enable_dispatch> 8002718: b9 80 08 00 mv r1,r12
return 0; }
800271c: 2b 9d 00 04 lw ra,(sp+4) 8002720: 2b 8b 00 18 lw r11,(sp+24) 8002724: 2b 8c 00 14 lw r12,(sp+20) 8002728: 2b 8d 00 10 lw r13,(sp+16) 800272c: 2b 8e 00 0c lw r14,(sp+12) 8002730: 2b 8f 00 08 lw r15,(sp+8) 8002734: 37 9c 00 18 addi sp,sp,24 8002738: c3 a0 00 00 ret
0800273c <timer_settime>: timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) {
800273c: 37 9c ff cc addi sp,sp,-52 8002740: 5b 8b 00 18 sw (sp+24),r11 8002744: 5b 8c 00 14 sw (sp+20),r12 8002748: 5b 8d 00 10 sw (sp+16),r13 800274c: 5b 8e 00 0c sw (sp+12),r14 8002750: 5b 8f 00 08 sw (sp+8),r15 8002754: 5b 9d 00 04 sw (sp+4),ra 8002758: b8 60 60 00 mv r12,r3 800275c: b8 20 78 00 mv r15,r1 8002760: b8 40 58 00 mv r11,r2 8002764: b8 80 68 00 mv r13,r4
Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value )
8002768: 44 60 00 59 be r3,r0,80028cc <timer_settime+0x190> <== NEVER TAKEN
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 ) ||
800276c: 28 61 00 0c lw r1,(r3+12) 8002770: 78 03 3b 9a mvhi r3,0x3b9a 8002774: 38 63 c9 ff ori r3,r3,0xc9ff
8002778: 54 23 00 55 bgu r1,r3,80028cc <timer_settime+0x190> <== NEVER TAKEN
( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) ||
800277c: 29 81 00 04 lw r1,(r12+4)
8002780: 50 61 00 02 bgeu r3,r1,8002788 <timer_settime+0x4c> <== ALWAYS TAKEN
8002784: e0 00 00 52 bi 80028cc <timer_settime+0x190> <== 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 ) {
8002788: 7c 42 00 00 cmpnei r2,r2,0 800278c: 7d 61 00 04 cmpnei r1,r11,4 8002790: a0 41 08 00 and r1,r2,r1
8002794: 5c 20 00 4e bne r1,r0,80028cc <timer_settime+0x190> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value;
8002798: 37 81 00 1c addi r1,sp,28 800279c: b9 80 10 00 mv r2,r12 80027a0: 34 03 00 10 mvi r3,16 80027a4: f8 00 2d 4f calli 800dce0 <memcpy>
/* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) {
80027a8: 34 01 00 04 mvi r1,4
80027ac: 5d 61 00 0d bne r11,r1,80027e0 <timer_settime+0xa4> struct timespec now; _TOD_Get( &now );
80027b0: 37 8b 00 2c addi r11,sp,44 80027b4: b9 60 08 00 mv r1,r11 80027b8: f8 00 03 83 calli 80035c4 <_TOD_Get>
/* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
80027bc: 37 8e 00 24 addi r14,sp,36 80027c0: b9 60 08 00 mv r1,r11 80027c4: b9 c0 10 00 mv r2,r14 80027c8: f8 00 09 c1 calli 8004ecc <_Timespec_Greater_than>
80027cc: 5c 20 00 40 bne r1,r0,80028cc <timer_settime+0x190> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
80027d0: b9 c0 10 00 mv r2,r14 80027d4: b9 60 08 00 mv r1,r11 80027d8: b9 c0 18 00 mv r3,r14 80027dc: f8 00 09 c8 calli 8004efc <_Timespec_Subtract>
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *)
80027e0: 78 01 08 02 mvhi r1,0x802 80027e4: b9 e0 10 00 mv r2,r15 80027e8: 38 21 1b 7c ori r1,r1,0x1b7c 80027ec: 37 83 00 34 addi r3,sp,52 80027f0: f8 00 06 4f calli 800412c <_Objects_Get>
* something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) {
80027f4: 2b 82 00 34 lw r2,(sp+52) 80027f8: b8 20 58 00 mv r11,r1
80027fc: 5c 40 00 34 bne r2,r0,80028cc <timer_settime+0x190> <== NEVER TAKEN
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 ) {
8002800: 2b 81 00 24 lw r1,(sp+36)
8002804: 5c 22 00 11 bne r1,r2,8002848 <timer_settime+0x10c>
8002808: 2b 8e 00 28 lw r14,(sp+40)
800280c: 5d c1 00 0f bne r14,r1,8002848 <timer_settime+0x10c> /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer );
8002810: 35 61 00 10 addi r1,r11,16 8002814: f8 00 0b 1f calli 8005490 <_Watchdog_Remove>
/* The old data of the timer are returned */ if ( ovalue ) 8002818: 45 ae 00 05 be r13,r14,800282c <timer_settime+0xf0> *ovalue = ptimer->timer_data;
800281c: b9 a0 08 00 mv r1,r13 8002820: 35 62 00 54 addi r2,r11,84 8002824: 34 03 00 10 mvi r3,16 8002828: f8 00 2d 2e calli 800dce0 <memcpy>
/* The new data are set */ ptimer->timer_data = normalize;
800282c: 37 82 00 1c addi r2,sp,28 8002830: 34 03 00 10 mvi r3,16 8002834: 35 61 00 54 addi r1,r11,84 8002838: f8 00 2d 2a calli 800dce0 <memcpy>
/* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
800283c: 34 01 00 04 mvi r1,4 8002840: 31 61 00 3c sb (r11+60),r1 8002844: e0 00 00 1f bi 80028c0 <timer_settime+0x184>
_Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
8002848: b9 80 08 00 mv r1,r12 800284c: f8 00 09 ba calli 8004f34 <_Timespec_To_ticks> 8002850: 59 61 00 64 sw (r11+100),r1
initial_period = _Timespec_To_ticks( &normalize.it_value );
8002854: 37 81 00 24 addi r1,sp,36 8002858: f8 00 09 b7 calli 8004f34 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
800285c: 29 63 00 08 lw r3,(r11+8) 8002860: 78 04 08 00 mvhi r4,0x800 8002864: b8 20 10 00 mv r2,r1 8002868: 38 84 28 fc ori r4,r4,0x28fc 800286c: 35 61 00 10 addi r1,r11,16 8002870: b9 60 28 00 mv r5,r11 8002874: f8 00 15 bd calli 8007f68 <_POSIX_Timer_Insert_helper> 8002878: b8 20 60 00 mv r12,r1
initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 800287c: 5c 20 00 04 bne r1,r0,800288c <timer_settime+0x150> _Thread_Enable_dispatch();
8002880: f8 00 07 a1 calli 8004704 <_Thread_Enable_dispatch> 8002884: b9 80 08 00 mv r1,r12
return 0;
8002888: e0 00 00 15 bi 80028dc <timer_settime+0x1a0>
/* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 800288c: 45 a0 00 05 be r13,r0,80028a0 <timer_settime+0x164> *ovalue = ptimer->timer_data;
8002890: b9 a0 08 00 mv r1,r13 8002894: 35 62 00 54 addi r2,r11,84 8002898: 34 03 00 10 mvi r3,16 800289c: f8 00 2d 11 calli 800dce0 <memcpy>
ptimer->timer_data = normalize;
80028a0: 37 82 00 1c addi r2,sp,28 80028a4: 34 03 00 10 mvi r3,16 80028a8: 35 61 00 54 addi r1,r11,84 80028ac: f8 00 2d 0d calli 800dce0 <memcpy>
/* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
80028b0: 34 01 00 03 mvi r1,3 80028b4: 31 61 00 3c sb (r11+60),r1
_TOD_Get( &ptimer->time );
80028b8: 35 61 00 6c addi r1,r11,108 80028bc: f8 00 03 42 calli 80035c4 <_TOD_Get>
_Thread_Enable_dispatch();
80028c0: f8 00 07 91 calli 8004704 <_Thread_Enable_dispatch> 80028c4: 34 01 00 00 mvi r1,0
return 0;
80028c8: e0 00 00 05 bi 80028dc <timer_settime+0x1a0>
#endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL );
80028cc: f8 00 2a 3e calli 800d1c4 <__errno> 80028d0: 34 02 00 16 mvi r2,22 80028d4: 58 22 00 00 sw (r1+0),r2 80028d8: 34 01 ff ff mvi r1,-1
}
80028dc: 2b 9d 00 04 lw ra,(sp+4) 80028e0: 2b 8b 00 18 lw r11,(sp+24) 80028e4: 2b 8c 00 14 lw r12,(sp+20) 80028e8: 2b 8d 00 10 lw r13,(sp+16) 80028ec: 2b 8e 00 0c lw r14,(sp+12) 80028f0: 2b 8f 00 08 lw r15,(sp+8) 80028f4: 37 9c 00 34 addi sp,sp,52 80028f8: c3 a0 00 00 ret
08002498 <ualarm>: useconds_t ualarm( useconds_t useconds, useconds_t interval ) {
8002498: 37 9c ff ec addi sp,sp,-20 800249c: 5b 8b 00 0c sw (sp+12),r11 80024a0: 5b 8c 00 08 sw (sp+8),r12 80024a4: 5b 9d 00 04 sw (sp+4),ra
/* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) {
80024a8: 78 0b 08 02 mvhi r11,0x802 80024ac: 39 6b 01 48 ori r11,r11,0x148 80024b0: 29 62 00 1c lw r2,(r11+28)
useconds_t ualarm( useconds_t useconds, useconds_t interval ) {
80024b4: b8 20 60 00 mv r12,r1
/* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 80024b8: 5c 40 00 09 bne r2,r0,80024dc <ualarm+0x44> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
80024bc: 78 01 08 00 mvhi r1,0x800 80024c0: 38 21 25 b0 ori r1,r1,0x25b0 80024c4: 59 61 00 1c sw (r11+28),r1
the_watchdog->id = id; the_watchdog->user_data = user_data;
80024c8: 59 62 00 24 sw (r11+36),r2
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
80024cc: 59 62 00 08 sw (r11+8),r2
the_watchdog->routine = routine; the_watchdog->id = id;
80024d0: 59 62 00 20 sw (r11+32),r2
the_watchdog->user_data = user_data;
80024d4: b8 40 58 00 mv r11,r2 80024d8: e0 00 00 18 bi 8002538 <ualarm+0xa0>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer );
80024dc: b9 60 08 00 mv r1,r11 80024e0: f8 00 0a 15 calli 8004d34 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
80024e4: 34 21 ff fe addi r1,r1,-2 80024e8: 34 02 00 01 mvi r2,1
80024ec: 50 41 00 03 bgeu r2,r1,80024f8 <ualarm+0x60> <== ALWAYS TAKEN
80024f0: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED 80024f4: e0 00 00 11 bi 8002538 <ualarm+0xa0> <== NOT EXECUTED
* boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time);
80024f8: 29 64 00 14 lw r4,(r11+20) 80024fc: 29 61 00 0c lw r1,(r11+12)
/* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp );
8002500: 29 63 00 18 lw r3,(r11+24) 8002504: 37 82 00 10 addi r2,sp,16
* boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time);
8002508: b4 81 08 00 add r1,r4,r1
/* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp );
800250c: c8 23 08 00 sub r1,r1,r3 8002510: f8 00 08 52 calli 8004658 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
8002514: 2b 81 00 10 lw r1,(sp+16) 8002518: 78 02 00 0f mvhi r2,0xf 800251c: 38 42 42 40 ori r2,r2,0x4240 8002520: f8 00 65 c8 calli 801bc40 <__mulsi3> 8002524: b8 20 58 00 mv r11,r1
remaining += tp.tv_nsec / 1000;
8002528: 2b 81 00 14 lw r1,(sp+20) 800252c: 34 02 03 e8 mvi r2,1000 8002530: f8 00 65 e4 calli 801bcc0 <__divsi3> 8002534: b4 2b 58 00 add r11,r1,r11
/* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 8002538: 45 80 00 18 be r12,r0,8002598 <ualarm+0x100> Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
800253c: 78 02 00 0f mvhi r2,0xf 8002540: 38 42 42 40 ori r2,r2,0x4240 8002544: b9 80 08 00 mv r1,r12 8002548: f8 00 66 3d calli 801be3c <__udivsi3>
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
800254c: 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;
8002550: 5b 81 00 10 sw (sp+16),r1
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
8002554: 38 42 42 40 ori r2,r2,0x4240 8002558: b9 80 08 00 mv r1,r12 800255c: f8 00 66 48 calli 801be7c <__umodsi3> 8002560: 34 02 03 e8 mvi r2,1000 8002564: f8 00 65 b7 calli 801bc40 <__mulsi3>
ticks = _Timespec_To_ticks( &tp );
8002568: 37 8c 00 10 addi r12,sp,16
*/ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
800256c: 5b 81 00 14 sw (sp+20),r1
ticks = _Timespec_To_ticks( &tp );
8002570: b9 80 08 00 mv r1,r12 8002574: f8 00 08 61 calli 80046f8 <_Timespec_To_ticks>
if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
8002578: b9 80 08 00 mv r1,r12 800257c: f8 00 08 5f calli 80046f8 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
8002580: 78 02 08 02 mvhi r2,0x802 8002584: 38 42 01 48 ori r2,r2,0x148 8002588: 58 41 00 0c sw (r2+12),r1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
800258c: 78 01 08 01 mvhi r1,0x801 8002590: 38 21 f9 a0 ori r1,r1,0xf9a0 8002594: f8 00 09 89 calli 8004bb8 <_Watchdog_Insert>
} return remaining; }
8002598: b9 60 08 00 mv r1,r11 800259c: 2b 9d 00 04 lw ra,(sp+4) 80025a0: 2b 8b 00 0c lw r11,(sp+12) 80025a4: 2b 8c 00 08 lw r12,(sp+8) 80025a8: 37 9c 00 14 addi sp,sp,20 80025ac: c3 a0 00 00 ret
0800bba8 <unlink>: #include <rtems/seterr.h> int unlink( const char *path ) {
800bba8: 37 9c ff c0 addi sp,sp,-64 800bbac: 5b 8b 00 18 sw (sp+24),r11 800bbb0: 5b 8c 00 14 sw (sp+20),r12 800bbb4: 5b 8d 00 10 sw (sp+16),r13 800bbb8: 5b 8e 00 0c sw (sp+12),r14 800bbbc: 5b 8f 00 08 sw (sp+8),r15 800bbc0: 5b 9d 00 04 sw (sp+4),ra 800bbc4: b8 20 78 00 mv r15,r1
/* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path );
800bbc8: fb ff d4 4a calli 8000cf0 <rtems_filesystem_dirname> 800bbcc: b8 20 68 00 mv r13,r1
if ( parentpathlen == 0 ) 800bbd0: 5c 20 00 19 bne r1,r0,800bc34 <unlink+0x8c> rtems_filesystem_get_start_loc( path, &i, &parentloc );
800bbd4: 41 e1 00 00 lbu r1,(r15+0) 800bbd8: 64 23 00 5c cmpei r3,r1,92 800bbdc: 64 22 00 2f cmpei r2,r1,47 800bbe0: b8 62 10 00 or r2,r3,r2
800bbe4: 5c 4d 00 02 bne r2,r13,800bbec <unlink+0x44>
800bbe8: 5c 20 00 0a bne r1,r0,800bc10 <unlink+0x68> <== ALWAYS TAKEN
800bbec: 78 01 08 01 mvhi r1,0x801 800bbf0: 38 21 d1 10 ori r1,r1,0xd110 800bbf4: 28 22 00 00 lw r2,(r1+0) 800bbf8: 34 03 00 14 mvi r3,20 800bbfc: 37 81 00 30 addi r1,sp,48 800bc00: 34 42 00 18 addi r2,r2,24 800bc04: f8 00 04 f4 calli 800cfd4 <memcpy> 800bc08: 34 0c 00 00 mvi r12,0 800bc0c: e0 00 00 12 bi 800bc54 <unlink+0xac> 800bc10: 78 01 08 01 mvhi r1,0x801 800bc14: 38 21 d1 10 ori r1,r1,0xd110 800bc18: 28 22 00 00 lw r2,(r1+0) 800bc1c: 34 03 00 14 mvi r3,20 800bc20: 37 81 00 30 addi r1,sp,48 800bc24: 34 42 00 04 addi r2,r2,4 800bc28: f8 00 04 eb calli 800cfd4 <memcpy> 800bc2c: b9 a0 60 00 mv r12,r13 800bc30: e0 00 00 09 bi 800bc54 <unlink+0xac>
else { result = rtems_filesystem_evaluate_path( path, parentpathlen,
800bc34: b9 e0 08 00 mv r1,r15 800bc38: b9 a0 10 00 mv r2,r13 800bc3c: 34 03 00 02 mvi r3,2 800bc40: 37 84 00 30 addi r4,sp,48 800bc44: 34 05 00 00 mvi r5,0 800bc48: fb ff d4 78 calli 8000e28 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 )
800bc4c: 5c 20 00 5d bne r1,r0,800bdc0 <unlink+0x218> <== NEVER TAKEN
800bc50: 34 0c 00 01 mvi r12,1
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
800bc54: 37 8b 00 1c addi r11,sp,28 800bc58: 37 8e 00 30 addi r14,sp,48 800bc5c: 34 03 00 14 mvi r3,20 800bc60: b9 c0 10 00 mv r2,r14 800bc64: b9 60 08 00 mv r1,r11 800bc68: f8 00 04 db calli 800cfd4 <memcpy>
name = path + parentpathlen;
800bc6c: b5 ed 68 00 add r13,r15,r13
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
800bc70: b9 a0 08 00 mv r1,r13 800bc74: f8 00 07 02 calli 800d87c <strlen> 800bc78: b8 20 10 00 mv r2,r1 800bc7c: b9 a0 08 00 mv r1,r13 800bc80: fb ff d4 0d calli 8000cb4 <rtems_filesystem_prefix_separators> 800bc84: b5 a1 68 00 add r13,r13,r1
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
800bc88: b9 a0 08 00 mv r1,r13 800bc8c: f8 00 06 fc calli 800d87c <strlen> 800bc90: 34 03 00 00 mvi r3,0 800bc94: b8 20 10 00 mv r2,r1 800bc98: b9 60 20 00 mv r4,r11 800bc9c: b9 a0 08 00 mv r1,r13 800bca0: b8 60 28 00 mv r5,r3 800bca4: fb ff d4 27 calli 8000d40 <rtems_filesystem_evaluate_relative_path>
0, &loc, false ); if ( result != 0 ) { 800bca8: 44 20 00 09 be r1,r0,800bccc <unlink+0x124> if ( free_parentloc )
800bcac: 45 80 00 45 be r12,r0,800bdc0 <unlink+0x218> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
800bcb0: 2b 81 00 3c lw r1,(sp+60)
800bcb4: 44 20 00 43 be r1,r0,800bdc0 <unlink+0x218> <== NEVER TAKEN
800bcb8: 28 22 00 1c lw r2,(r1+28)
800bcbc: 44 40 00 41 be r2,r0,800bdc0 <unlink+0x218> <== NEVER TAKEN
800bcc0: b9 c0 08 00 mv r1,r14 800bcc4: d8 40 00 00 call r2 800bcc8: e0 00 00 3e bi 800bdc0 <unlink+0x218>
return -1; } if ( !loc.ops->node_type_h ) {
800bccc: 2b 82 00 28 lw r2,(sp+40) 800bcd0: 28 43 00 10 lw r3,(r2+16)
800bcd4: 5c 61 00 04 bne r3,r1,800bce4 <unlink+0x13c> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
800bcd8: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 800bcdc: 5c 43 00 1a bne r2,r3,800bd44 <unlink+0x19c> <== NOT EXECUTED 800bce0: e0 00 00 1b bi 800bd4c <unlink+0x1a4> <== NOT EXECUTED
if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
800bce4: b9 60 08 00 mv r1,r11 800bce8: d8 60 00 00 call r3 800bcec: 34 02 00 01 mvi r2,1 800bcf0: 2b 83 00 28 lw r3,(sp+40)
800bcf4: 5c 22 00 10 bne r1,r2,800bd34 <unlink+0x18c> rtems_filesystem_freenode( &loc );
800bcf8: 44 60 00 05 be r3,r0,800bd0c <unlink+0x164> <== NEVER TAKEN
800bcfc: 28 62 00 1c lw r2,(r3+28)
800bd00: 44 40 00 03 be r2,r0,800bd0c <unlink+0x164> <== NEVER TAKEN
800bd04: b9 60 08 00 mv r1,r11 800bd08: d8 40 00 00 call r2
if ( free_parentloc )
800bd0c: 45 80 00 07 be r12,r0,800bd28 <unlink+0x180> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
800bd10: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 800bd14: 44 20 00 05 be r1,r0,800bd28 <unlink+0x180> <== NOT EXECUTED 800bd18: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800bd1c: 44 40 00 03 be r2,r0,800bd28 <unlink+0x180> <== NOT EXECUTED 800bd20: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 800bd24: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
800bd28: f8 00 02 05 calli 800c53c <__errno> 800bd2c: 34 02 00 15 mvi r2,21 800bd30: e0 00 00 10 bi 800bd70 <unlink+0x1c8>
} if ( !loc.ops->unlink_h ) {
800bd34: 28 64 00 0c lw r4,(r3+12)
800bd38: 5c 80 00 10 bne r4,r0,800bd78 <unlink+0x1d0> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
800bd3c: 28 62 00 1c lw r2,(r3+28) <== NOT EXECUTED 800bd40: 44 44 00 03 be r2,r4,800bd4c <unlink+0x1a4> <== NOT EXECUTED 800bd44: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 800bd48: d8 40 00 00 call r2 <== NOT EXECUTED
if ( free_parentloc )
800bd4c: 45 80 00 07 be r12,r0,800bd68 <unlink+0x1c0> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
800bd50: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED 800bd54: 44 20 00 05 be r1,r0,800bd68 <unlink+0x1c0> <== NOT EXECUTED 800bd58: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED 800bd5c: 44 40 00 03 be r2,r0,800bd68 <unlink+0x1c0> <== NOT EXECUTED 800bd60: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED 800bd64: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
800bd68: f8 00 01 f5 calli 800c53c <__errno> <== NOT EXECUTED 800bd6c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
800bd70: 58 22 00 00 sw (r1+0),r2 800bd74: e0 00 00 13 bi 800bdc0 <unlink+0x218>
} result = (*loc.ops->unlink_h)( &parentloc, &loc );
800bd78: b9 c0 08 00 mv r1,r14 800bd7c: b9 60 10 00 mv r2,r11 800bd80: d8 80 00 00 call r4 800bd84: b8 20 68 00 mv r13,r1
rtems_filesystem_freenode( &loc );
800bd88: 2b 81 00 28 lw r1,(sp+40)
800bd8c: 44 20 00 05 be r1,r0,800bda0 <unlink+0x1f8> <== NEVER TAKEN
800bd90: 28 22 00 1c lw r2,(r1+28)
800bd94: 44 40 00 03 be r2,r0,800bda0 <unlink+0x1f8> <== NEVER TAKEN
800bd98: b9 60 08 00 mv r1,r11 800bd9c: d8 40 00 00 call r2
if ( free_parentloc ) 800bda0: 45 80 00 09 be r12,r0,800bdc4 <unlink+0x21c> rtems_filesystem_freenode( &parentloc );
800bda4: 2b 81 00 3c lw r1,(sp+60)
800bda8: 44 20 00 07 be r1,r0,800bdc4 <unlink+0x21c> <== NEVER TAKEN
800bdac: 28 22 00 1c lw r2,(r1+28)
800bdb0: 44 40 00 05 be r2,r0,800bdc4 <unlink+0x21c> <== NEVER TAKEN
800bdb4: 37 81 00 30 addi r1,sp,48 800bdb8: d8 40 00 00 call r2 800bdbc: e0 00 00 02 bi 800bdc4 <unlink+0x21c> 800bdc0: 34 0d ff ff mvi r13,-1
return result; }
800bdc4: b9 a0 08 00 mv r1,r13 800bdc8: 2b 9d 00 04 lw ra,(sp+4) 800bdcc: 2b 8b 00 18 lw r11,(sp+24) 800bdd0: 2b 8c 00 14 lw r12,(sp+20) 800bdd4: 2b 8d 00 10 lw r13,(sp+16) 800bdd8: 2b 8e 00 0c lw r14,(sp+12) 800bddc: 2b 8f 00 08 lw r15,(sp+8) 800bde0: 37 9c 00 40 addi sp,sp,64 800bde4: c3 a0 00 00 ret
08028c44 <unmount>: */ int unmount( const char *path ) {
8028c44: 37 9c ff dc addi sp,sp,-36 8028c48: 5b 8b 00 10 sw (sp+16),r11 8028c4c: 5b 8c 00 0c sw (sp+12),r12 8028c50: 5b 8d 00 08 sw (sp+8),r13 8028c54: 5b 9d 00 04 sw (sp+4),ra 8028c58: 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 ) )
8028c5c: 37 8c 00 14 addi r12,sp,20 8028c60: f8 00 8a cb calli 804b78c <strlen> 8028c64: b8 20 10 00 mv r2,r1 8028c68: 34 03 00 00 mvi r3,0 8028c6c: b9 60 08 00 mv r1,r11 8028c70: b9 80 20 00 mv r4,r12 8028c74: 34 05 00 01 mvi r5,1 8028c78: fb ff 75 67 calli 8006214 <rtems_filesystem_evaluate_path>
8028c7c: 5c 20 00 4e bne r1,r0,8028db4 <unmount+0x170> return -1; mt_entry = loc.mt_entry;
8028c80: 2b 8b 00 24 lw r11,(sp+36)
fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root;
8028c84: 2b 81 00 14 lw r1,(sp+20) 8028c88: 2b 82 00 20 lw r2,(sp+32) 8028c8c: 29 63 00 1c lw r3,(r11+28)
8028c90: 44 61 00 09 be r3,r1,8028cb4 <unmount+0x70> /* * 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 );
8028c94: 44 40 00 05 be r2,r0,8028ca8 <unmount+0x64> <== NEVER TAKEN
8028c98: 28 42 00 1c lw r2,(r2+28)
8028c9c: 44 40 00 03 be r2,r0,8028ca8 <unmount+0x64> <== NEVER TAKEN
8028ca0: b9 80 08 00 mv r1,r12 8028ca4: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( EACCES );
8028ca8: f8 00 6c b8 calli 8043f88 <__errno> 8028cac: 34 02 00 0d mvi r2,13 8028cb0: e0 00 00 20 bi 8028d30 <unmount+0xec>
/* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc );
8028cb4: 44 40 00 05 be r2,r0,8028cc8 <unmount+0x84> <== NEVER TAKEN
8028cb8: 28 42 00 1c lw r2,(r2+28)
8028cbc: 44 40 00 03 be r2,r0,8028cc8 <unmount+0x84> <== NEVER TAKEN
8028cc0: b9 80 08 00 mv r1,r12 8028cc4: 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;
8028cc8: 29 61 00 14 lw r1,(r11+20) 8028ccc: 28 21 00 28 lw r1,(r1+40)
8028cd0: 44 20 00 04 be r1,r0,8028ce0 <unmount+0x9c> <== NEVER TAKEN
fs_root_loc = &mt_entry->mt_fs_root;
8028cd4: 29 61 00 28 lw r1,(r11+40) 8028cd8: 28 21 00 2c lw r1,(r1+44)
8028cdc: 5c 20 00 04 bne r1,r0,8028cec <unmount+0xa8> <== ALWAYS TAKEN
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 );
8028ce0: f8 00 6c aa calli 8043f88 <__errno> <== NOT EXECUTED 8028ce4: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8028ce8: e0 00 00 12 bi 8028d30 <unmount+0xec> <== NOT EXECUTED
* that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry )
8028cec: 78 01 08 06 mvhi r1,0x806 8028cf0: 38 21 d2 f0 ori r1,r1,0xd2f0 8028cf4: 28 21 00 00 lw r1,(r1+0) 8028cf8: 28 21 00 14 lw r1,(r1+20)
8028cfc: 44 2b 00 0b be r1,r11,8028d28 <unmount+0xe4> /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first;
8028d00: 78 01 08 07 mvhi r1,0x807 8028d04: 38 21 0f 58 ori r1,r1,0xf58 8028d08: 34 22 00 04 addi r2,r1,4 8028d0c: e0 00 00 04 bi 8028d1c <unmount+0xd8>
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root;
8028d10: 28 24 00 18 lw r4,(r1+24) 8028d14: 29 63 00 2c lw r3,(r11+44)
8028d18: 44 83 00 04 be r4,r3,8028d28 <unmount+0xe4> * 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 ) {
8028d1c: 28 21 00 00 lw r1,(r1+0)
8028d20: 5c 22 ff fc bne r1,r2,8028d10 <unmount+0xcc>
8028d24: e0 00 00 2b bi 8028dd0 <unmount+0x18c>
* 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 );
8028d28: f8 00 6c 98 calli 8043f88 <__errno> 8028d2c: 34 02 00 10 mvi r2,16 8028d30: 58 22 00 00 sw (r1+0),r2 8028d34: e0 00 00 20 bi 8028db4 <unmount+0x170>
* 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 )
8028d38: 29 62 00 14 lw r2,(r11+20) 8028d3c: b9 60 08 00 mv r1,r11 8028d40: 28 42 00 28 lw r2,(r2+40) 8028d44: d8 40 00 00 call r2 8028d48: b8 20 68 00 mv r13,r1
8028d4c: 5c 20 00 1a bne r1,r0,8028db4 <unmount+0x170> <== NEVER TAKEN
* 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){
8028d50: 29 62 00 28 lw r2,(r11+40) 8028d54: b9 60 08 00 mv r1,r11 8028d58: 28 42 00 2c lw r2,(r2+44) 8028d5c: d8 40 00 00 call r2 8028d60: b8 20 60 00 mv r12,r1
8028d64: 44 2d 00 08 be r1,r13,8028d84 <unmount+0x140> <== ALWAYS TAKEN
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
8028d68: 29 62 00 14 lw r2,(r11+20) <== NOT EXECUTED 8028d6c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8028d70: 28 42 00 20 lw r2,(r2+32) <== NOT EXECUTED 8028d74: d8 40 00 00 call r2 <== NOT EXECUTED 8028d78: 44 20 00 0f be r1,r0,8028db4 <unmount+0x170> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
8028d7c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED 8028d80: fb ff 80 38 calli 8008e60 <rtems_fatal_error_occurred> <== NOT EXECUTED
*/ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node );
8028d84: b9 60 08 00 mv r1,r11 8028d88: fb ff 81 48 calli 80092a8 <_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 );
8028d8c: 29 61 00 14 lw r1,(r11+20)
8028d90: 44 2c 00 05 be r1,r12,8028da4 <unmount+0x160> <== NEVER TAKEN
8028d94: 28 22 00 1c lw r2,(r1+28)
8028d98: 44 4c 00 03 be r2,r12,8028da4 <unmount+0x160> <== NEVER TAKEN
8028d9c: 35 61 00 08 addi r1,r11,8 8028da0: d8 40 00 00 call r2
free( mt_entry );
8028da4: b9 60 08 00 mv r1,r11 8028da8: fb ff 75 58 calli 8006308 <free> 8028dac: 34 01 00 00 mvi r1,0
return 0;
8028db0: e0 00 00 02 bi 8028db8 <unmount+0x174> 8028db4: 34 01 ff ff mvi r1,-1
}
8028db8: 2b 9d 00 04 lw ra,(sp+4) 8028dbc: 2b 8b 00 10 lw r11,(sp+16) 8028dc0: 2b 8c 00 0c lw r12,(sp+12) 8028dc4: 2b 8d 00 08 lw r13,(sp+8) 8028dc8: 37 9c 00 24 addi sp,sp,36 8028dcc: c3 a0 00 00 ret
* Run the file descriptor table to determine if there are any file * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
8028dd0: b9 60 08 00 mv r1,r11 8028dd4: fb ff 76 24 calli 8006664 <rtems_libio_is_open_files_in_fs> 8028dd8: 34 02 00 01 mvi r2,1
8028ddc: 5c 22 ff d7 bne r1,r2,8028d38 <unmount+0xf4>
8028de0: e3 ff ff d2 bi 8028d28 <unmount+0xe4>
08028de4 <utime>: int utime( const char *path, const struct utimbuf *times ) {
8028de4: 37 9c ff dc addi sp,sp,-36 8028de8: 5b 8b 00 10 sw (sp+16),r11 8028dec: 5b 8c 00 0c sw (sp+12),r12 8028df0: 5b 8d 00 08 sw (sp+8),r13 8028df4: 5b 9d 00 04 sw (sp+4),ra 8028df8: b8 20 60 00 mv r12,r1 8028dfc: 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 ) )
8028e00: 37 8b 00 14 addi r11,sp,20 8028e04: f8 00 8a 62 calli 804b78c <strlen> 8028e08: b8 20 10 00 mv r2,r1 8028e0c: 34 03 00 00 mvi r3,0 8028e10: b9 80 08 00 mv r1,r12 8028e14: b9 60 20 00 mv r4,r11 8028e18: 34 05 00 01 mvi r5,1 8028e1c: fb ff 74 fe calli 8006214 <rtems_filesystem_evaluate_path> 8028e20: 34 0c ff ff mvi r12,-1
8028e24: 5c 20 00 18 bne r1,r0,8028e84 <utime+0xa0> return -1; if ( !temp_loc.ops->utime_h ){
8028e28: 2b 82 00 20 lw r2,(sp+32) 8028e2c: 28 44 00 30 lw r4,(r2+48)
8028e30: 5c 81 00 0a bne r4,r1,8028e58 <utime+0x74> <== ALWAYS TAKEN
rtems_filesystem_freenode( &temp_loc );
8028e34: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED 8028e38: 44 44 00 03 be r2,r4,8028e44 <utime+0x60> <== NOT EXECUTED 8028e3c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED 8028e40: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8028e44: f8 00 6c 51 calli 8043f88 <__errno> <== NOT EXECUTED 8028e48: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8028e4c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 8028e50: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED 8028e54: e0 00 00 0c bi 8028e84 <utime+0xa0> <== NOT EXECUTED
} result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
8028e58: 29 a3 00 04 lw r3,(r13+4) 8028e5c: 29 a2 00 00 lw r2,(r13+0) 8028e60: b9 60 08 00 mv r1,r11 8028e64: d8 80 00 00 call r4 8028e68: b8 20 60 00 mv r12,r1
rtems_filesystem_freenode( &temp_loc );
8028e6c: 2b 81 00 20 lw r1,(sp+32)
8028e70: 44 20 00 05 be r1,r0,8028e84 <utime+0xa0> <== NEVER TAKEN
8028e74: 28 22 00 1c lw r2,(r1+28)
8028e78: 44 40 00 03 be r2,r0,8028e84 <utime+0xa0> <== NEVER TAKEN
8028e7c: b9 60 08 00 mv r1,r11 8028e80: d8 40 00 00 call r2
return result; }
8028e84: b9 80 08 00 mv r1,r12 8028e88: 2b 9d 00 04 lw ra,(sp+4) 8028e8c: 2b 8b 00 10 lw r11,(sp+16) 8028e90: 2b 8c 00 0c lw r12,(sp+12) 8028e94: 2b 8d 00 08 lw r13,(sp+8) 8028e98: 37 9c 00 24 addi sp,sp,36 8028e9c: c3 a0 00 00 ret
0801af84 <write>: ssize_t write( int fd, const void *buffer, size_t count ) {
801af84: 37 9c ff e8 addi sp,sp,-24 801af88: 5b 8b 00 14 sw (sp+20),r11 801af8c: 5b 8c 00 10 sw (sp+16),r12 801af90: 5b 8d 00 0c sw (sp+12),r13 801af94: 5b 8e 00 08 sw (sp+8),r14 801af98: 5b 9d 00 04 sw (sp+4),ra
ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd );
801af9c: 78 04 08 01 mvhi r4,0x801 801afa0: 38 84 d0 10 ori r4,r4,0xd010 801afa4: 28 84 00 00 lw r4,(r4+0)
ssize_t write( int fd, const void *buffer, size_t count ) {
801afa8: b8 40 68 00 mv r13,r2
ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd );
801afac: 54 81 00 02 bgu r4,r1,801afb4 <write+0x30> <== ALWAYS TAKEN
801afb0: e0 00 00 10 bi 801aff0 <write+0x6c> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
801afb4: 34 02 00 03 mvi r2,3 801afb8: 5b 83 00 18 sw (sp+24),r3 801afbc: 78 0b 08 01 mvhi r11,0x801 801afc0: fb ff 94 8c calli 80001f0 <__ashlsi3> 801afc4: 34 02 00 03 mvi r2,3 801afc8: 39 6b d7 1c ori r11,r11,0xd71c 801afcc: b8 20 70 00 mv r14,r1 801afd0: fb ff 94 88 calli 80001f0 <__ashlsi3> 801afd4: 29 6c 00 00 lw r12,(r11+0) 801afd8: b5 c1 08 00 add r1,r14,r1
rtems_libio_check_is_open( iop );
801afdc: 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 );
801afe0: b5 81 60 00 add r12,r12,r1
rtems_libio_check_is_open( iop );
801afe4: 29 81 00 18 lw r1,(r12+24) 801afe8: 20 22 01 00 andi r2,r1,0x100
801afec: 5c 40 00 04 bne r2,r0,801affc <write+0x78> <== ALWAYS TAKEN
801aff0: fb ff c5 53 calli 800c53c <__errno> <== NOT EXECUTED 801aff4: 34 02 00 09 mvi r2,9 <== NOT EXECUTED 801aff8: e0 00 00 0e bi 801b030 <write+0xac> <== NOT EXECUTED
rtems_libio_check_buffer( buffer );
801affc: 45 a0 00 05 be r13,r0,801b010 <write+0x8c> <== NEVER TAKEN
rtems_libio_check_count( count );
801b000: b8 60 58 00 mv r11,r3
801b004: 44 60 00 1d be r3,r0,801b078 <write+0xf4> rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
801b008: 20 21 00 04 andi r1,r1,0x4
801b00c: 5c 20 00 04 bne r1,r0,801b01c <write+0x98> <== ALWAYS TAKEN
801b010: fb ff c5 4b calli 800c53c <__errno> <== NOT EXECUTED 801b014: 34 02 00 16 mvi r2,22 <== NOT EXECUTED 801b018: e0 00 00 06 bi 801b030 <write+0xac> <== NOT EXECUTED
/* * Now process the write() request. */ if ( !iop->handlers->write_h )
801b01c: 29 81 00 40 lw r1,(r12+64) 801b020: 28 24 00 0c lw r4,(r1+12)
801b024: 5c 80 00 06 bne r4,r0,801b03c <write+0xb8> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
801b028: fb ff c5 45 calli 800c53c <__errno> <== NOT EXECUTED 801b02c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 801b030: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED 801b034: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED 801b038: e0 00 00 10 bi 801b078 <write+0xf4> <== NOT EXECUTED
rc = (*iop->handlers->write_h)( iop, buffer, count );
801b03c: b9 a0 10 00 mv r2,r13 801b040: b9 80 08 00 mv r1,r12 801b044: d8 80 00 00 call r4 801b048: b8 20 58 00 mv r11,r1
if ( rc > 0 )
801b04c: 4c 01 00 0b bge r0,r1,801b078 <write+0xf4> <== NEVER TAKEN
iop->offset += rc;
801b050: 34 02 00 1f mvi r2,31 801b054: fb ff 94 b7 calli 8000330 <__ashrsi3> 801b058: 29 82 00 14 lw r2,(r12+20) 801b05c: 29 84 00 10 lw r4,(r12+16) 801b060: b5 62 10 00 add r2,r11,r2 801b064: f5 62 18 00 cmpgu r3,r11,r2 801b068: b4 24 08 00 add r1,r1,r4 801b06c: b4 61 08 00 add r1,r3,r1 801b070: 59 82 00 14 sw (r12+20),r2 801b074: 59 81 00 10 sw (r12+16),r1
return rc; }
801b078: b9 60 08 00 mv r1,r11 801b07c: 2b 9d 00 04 lw ra,(sp+4) 801b080: 2b 8b 00 14 lw r11,(sp+20) 801b084: 2b 8c 00 10 lw r12,(sp+16) 801b088: 2b 8d 00 0c lw r13,(sp+12) 801b08c: 2b 8e 00 08 lw r14,(sp+8) 801b090: 37 9c 00 18 addi sp,sp,24 801b094: c3 a0 00 00 ret
08003a70 <writev>: ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) {
8003a70: 37 9c ff e4 addi sp,sp,-28 8003a74: 5b 8b 00 1c sw (sp+28),r11 8003a78: 5b 8c 00 18 sw (sp+24),r12 8003a7c: 5b 8d 00 14 sw (sp+20),r13 8003a80: 5b 8e 00 10 sw (sp+16),r14 8003a84: 5b 8f 00 0c sw (sp+12),r15 8003a88: 5b 90 00 08 sw (sp+8),r16 8003a8c: 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 );
8003a90: 78 04 08 02 mvhi r4,0x802 8003a94: 38 84 20 10 ori r4,r4,0x2010 8003a98: 28 84 00 00 lw r4,(r4+0)
ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) {
8003a9c: b8 40 68 00 mv r13,r2 8003aa0: b8 60 80 00 mv r16,r3
int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd );
8003aa4: 54 81 00 02 bgu r4,r1,8003aac <writev+0x3c> <== ALWAYS TAKEN
8003aa8: e0 00 00 0e bi 8003ae0 <writev+0x70> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
8003aac: 34 02 00 03 mvi r2,3 8003ab0: fb ff f5 00 calli 8000eb0 <__ashlsi3> 8003ab4: 78 0b 08 02 mvhi r11,0x802 8003ab8: 34 02 00 03 mvi r2,3 8003abc: 39 6b 2e f0 ori r11,r11,0x2ef0 8003ac0: b8 20 70 00 mv r14,r1 8003ac4: fb ff f4 fb calli 8000eb0 <__ashlsi3> 8003ac8: 29 6c 00 00 lw r12,(r11+0) 8003acc: b5 c1 08 00 add r1,r14,r1 8003ad0: b5 81 60 00 add r12,r12,r1
rtems_libio_check_is_open( iop );
8003ad4: 29 81 00 18 lw r1,(r12+24) 8003ad8: 20 22 01 00 andi r2,r1,0x100
8003adc: 5c 40 00 04 bne r2,r0,8003aec <writev+0x7c>
8003ae0: f8 00 2d 08 calli 800ef00 <__errno> 8003ae4: 34 02 00 09 mvi r2,9 8003ae8: e0 00 00 22 bi 8003b70 <writev+0x100>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
8003aec: 20 21 00 04 andi r1,r1,0x4
8003af0: 44 20 00 1e be r1,r0,8003b68 <writev+0xf8> <== NEVER TAKEN
/* * Argument validation on IO vector */ if ( !iov ) 8003af4: 45 a0 00 1d be r13,r0,8003b68 <writev+0xf8> rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 8003af8: 4a 00 00 02 bg r16,r0,8003b00 <writev+0x90>
8003afc: e0 00 00 1b bi 8003b68 <writev+0xf8>
rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX )
8003b00: 34 01 04 00 mvi r1,1024
8003b04: 4c 30 00 02 bge r1,r16,8003b0c <writev+0x9c> <== ALWAYS TAKEN
8003b08: e0 00 00 18 bi 8003b68 <writev+0xf8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h )
8003b0c: 29 81 00 40 lw r1,(r12+64) 8003b10: 28 21 00 0c lw r1,(r1+12)
8003b14: 5c 20 00 04 bne r1,r0,8003b24 <writev+0xb4> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
8003b18: f8 00 2c fa calli 800ef00 <__errno> <== NOT EXECUTED 8003b1c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED 8003b20: e0 00 00 14 bi 8003b70 <writev+0x100> <== NOT EXECUTED
8003b24: 34 02 00 00 mvi r2,0 8003b28: b9 a0 08 00 mv r1,r13 8003b2c: 34 0f 00 01 mvi r15,1 8003b30: b8 40 18 00 mv r3,r2
* entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { if ( !iov[v].iov_base )
8003b34: 28 24 00 00 lw r4,(r1+0)
* this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
8003b38: 34 42 00 01 addi r2,r2,1
if ( !iov[v].iov_base ) 8003b3c: 44 80 00 0b be r4,r0,8003b68 <writev+0xf8> 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 )
8003b40: 28 25 00 04 lw r5,(r1+4)
* this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
8003b44: 34 21 00 08 addi r1,r1,8
if ( iov[v].iov_len ) all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len;
8003b48: b4 65 20 00 add r4,r3,r5
if ( total < old || total > SSIZE_MAX )
8003b4c: e8 64 18 00 cmpg r3,r3,r4
rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len )
8003b50: 64 a5 00 00 cmpei r5,r5,0
all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX )
8003b54: 68 86 7f ff cmpgi r6,r4,32767
rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len )
8003b58: c8 05 28 00 sub r5,r0,r5
all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX )
8003b5c: b8 c3 18 00 or r3,r6,r3
rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len )
8003b60: a1 e5 78 00 and r15,r15,r5
all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 8003b64: 44 60 00 05 be r3,r0,8003b78 <writev+0x108> rtems_set_errno_and_return_minus_one( EINVAL );
8003b68: f8 00 2c e6 calli 800ef00 <__errno> 8003b6c: 34 02 00 16 mvi r2,22 8003b70: 58 22 00 00 sw (r1+0),r2 8003b74: e0 00 00 13 bi 8003bc0 <writev+0x150>
* 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++ ) { 8003b78: 4c 50 00 03 bge r2,r16,8003b84 <writev+0x114>
8003b7c: b8 80 18 00 mv r3,r4 8003b80: e3 ff ff ed bi 8003b34 <writev+0xc4>
} /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) {
8003b84: b9 e0 58 00 mv r11,r15
8003b88: 45 e0 00 03 be r15,r0,8003b94 <writev+0x124>
8003b8c: b8 60 58 00 mv r11,r3 8003b90: e0 00 00 1d bi 8003c04 <writev+0x194>
/* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 )
8003b94: 29 a3 00 04 lw r3,(r13+4)
} /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
8003b98: 35 ef 00 01 addi r15,r15,1
/* all zero lengths has no effect */ if ( iov[v].iov_len == 0 )
8003b9c: 44 60 00 18 be r3,r0,8003bfc <writev+0x18c> <== NEVER TAKEN
continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
8003ba0: 29 81 00 40 lw r1,(r12+64) 8003ba4: 29 a2 00 00 lw r2,(r13+0) 8003ba8: 28 24 00 0c lw r4,(r1+12) 8003bac: b9 80 08 00 mv r1,r12 8003bb0: d8 80 00 00 call r4 8003bb4: b8 20 70 00 mv r14,r1
if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes;
8003bb8: 34 02 00 1f mvi r2,31
if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 )
8003bbc: 4c 20 00 03 bge r1,r0,8003bc8 <writev+0x158> <== ALWAYS TAKEN
8003bc0: 34 0b ff ff mvi r11,-1 8003bc4: e0 00 00 10 bi 8003c04 <writev+0x194>
return -1; if ( bytes > 0 ) {
8003bc8: 44 20 00 0b be r1,r0,8003bf4 <writev+0x184> <== NEVER TAKEN
iop->offset += bytes;
8003bcc: fb ff f5 09 calli 8000ff0 <__ashrsi3> 8003bd0: 29 82 00 14 lw r2,(r12+20) 8003bd4: 29 84 00 10 lw r4,(r12+16)
total += bytes;
8003bd8: b5 6e 58 00 add r11,r11,r14
if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes;
8003bdc: b5 c2 10 00 add r2,r14,r2 8003be0: f5 c2 18 00 cmpgu r3,r14,r2 8003be4: b4 24 08 00 add r1,r1,r4 8003be8: b4 61 08 00 add r1,r3,r1 8003bec: 59 81 00 10 sw (r12+16),r1 8003bf0: 59 82 00 14 sw (r12+20),r2
total += bytes; } if (bytes != iov[ v ].iov_len)
8003bf4: 29 a1 00 04 lw r1,(r13+4)
8003bf8: 5d c1 00 03 bne r14,r1,8003c04 <writev+0x194> <== NEVER TAKEN
} /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
8003bfc: 35 ad 00 08 addi r13,r13,8
8003c00: 4a 0f ff e5 bg r16,r15,8003b94 <writev+0x124> if (bytes != iov[ v ].iov_len) break; } return total; }
8003c04: b9 60 08 00 mv r1,r11 8003c08: 2b 9d 00 04 lw ra,(sp+4) 8003c0c: 2b 8b 00 1c lw r11,(sp+28) 8003c10: 2b 8c 00 18 lw r12,(sp+24) 8003c14: 2b 8d 00 14 lw r13,(sp+20) 8003c18: 2b 8e 00 10 lw r14,(sp+16) 8003c1c: 2b 8f 00 0c lw r15,(sp+12) 8003c20: 2b 90 00 08 lw r16,(sp+8) 8003c24: 37 9c 00 1c addi sp,sp,28 8003c28: c3 a0 00 00 ret