RTEMS 4.10Annotated Report
Sat May 22 07:50:55 2010
08005d8c <IMFS_Set_handlers>:
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
8005d8c: 37 9c ff f0 addi sp,sp,-16
8005d90: 5b 8b 00 10 sw (sp+16),r11
8005d94: 5b 8c 00 0c sw (sp+12),r12
8005d98: 5b 8d 00 08 sw (sp+8),r13
8005d9c: 5b 9d 00 04 sw (sp+4),ra
8005da0: 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 ) {
8005da4: 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;
8005da8: 29 62 00 10 lw r2,(r11+16)
switch( node->type ) {
8005dac: 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;
8005db0: 28 4c 00 34 lw r12,(r2+52)
switch( node->type ) {
8005db4: 34 02 00 06 mvi r2,6
8005db8: 34 21 ff ff addi r1,r1,-1
8005dbc: 54 22 00 16 bgu r1,r2,8005e14 <IMFS_Set_handlers+0x88> <== NEVER TAKEN
8005dc0: 78 0d 08 01 mvhi r13,0x801
8005dc4: 34 02 00 02 mvi r2,2
8005dc8: fb ff e9 0a calli 80001f0 <__ashlsi3>
8005dcc: 39 ad a5 5c ori r13,r13,0xa55c
8005dd0: b5 a1 08 00 add r1,r13,r1
8005dd4: 28 21 00 00 lw r1,(r1+0)
8005dd8: c0 20 00 00 b r1
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
8005ddc: 29 8c 00 0c lw r12,(r12+12)
8005de0: e0 00 00 08 bi 8005e00 <IMFS_Set_handlers+0x74>
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
8005de4: 78 01 08 01 mvhi r1,0x801
8005de8: 38 21 a6 30 ori r1,r1,0xa630
8005dec: e0 00 00 09 bi 8005e10 <IMFS_Set_handlers+0x84>
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
8005df0: 78 01 08 01 mvhi r1,0x801
8005df4: 38 21 a6 68 ori r1,r1,0xa668
8005df8: e0 00 00 06 bi 8005e10 <IMFS_Set_handlers+0x84>
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
8005dfc: 29 8c 00 08 lw r12,(r12+8)
8005e00: 59 6c 00 08 sw (r11+8),r12
break;
8005e04: e0 00 00 04 bi 8005e14 <IMFS_Set_handlers+0x88>
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = &IMFS_fifo_handlers;
8005e08: 78 01 08 01 mvhi r1,0x801
8005e0c: 38 21 a5 78 ori r1,r1,0xa578
8005e10: 59 61 00 08 sw (r11+8),r1
break;
}
return 0;
}
8005e14: 34 01 00 00 mvi r1,0
8005e18: 2b 9d 00 04 lw ra,(sp+4)
8005e1c: 2b 8b 00 10 lw r11,(sp+16)
8005e20: 2b 8c 00 0c lw r12,(sp+12)
8005e24: 2b 8d 00 08 lw r13,(sp+8)
8005e28: 37 9c 00 10 addi sp,sp,16
8005e2c: c3 a0 00 00 ret
08009ce8 <IMFS_allocate_node>:
IMFS_jnode_t *IMFS_allocate_node(
IMFS_jnode_types_t type,
const char *name,
mode_t mode
)
{
8009ce8: 37 9c ff e0 addi sp,sp,-32
8009cec: 5b 8b 00 18 sw (sp+24),r11
8009cf0: 5b 8c 00 14 sw (sp+20),r12
8009cf4: 5b 8d 00 10 sw (sp+16),r13
8009cf8: 5b 8e 00 0c sw (sp+12),r14
8009cfc: 5b 8f 00 08 sw (sp+8),r15
8009d00: 5b 9d 00 04 sw (sp+4),ra
8009d04: b8 20 70 00 mv r14,r1
8009d08: b8 40 78 00 mv r15,r2
struct timeval tv;
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
8009d0c: 34 01 00 01 mvi r1,1
8009d10: 34 02 00 68 mvi r2,104
IMFS_jnode_t *IMFS_allocate_node(
IMFS_jnode_types_t type,
const char *name,
mode_t mode
)
{
8009d14: b8 60 68 00 mv r13,r3
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
if ( !node )
8009d18: 34 0c 00 00 mvi r12,0
struct timeval tv;
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
8009d1c: fb ff f4 81 calli 8006f20 <calloc>
8009d20: b8 20 58 00 mv r11,r1
if ( !node )
8009d24: 44 2c 00 12 be r1,r12,8009d6c <IMFS_allocate_node+0x84> <== NEVER TAKEN
return NULL;
/*
* Fill in the basic information
*/
node->st_nlink = 1;
8009d28: 34 04 00 01 mvi r4,1
node->type = type;
strncpy( node->name, name, IMFS_NAME_MAX );
8009d2c: b9 e0 10 00 mv r2,r15
8009d30: 34 03 00 20 mvi r3,32
8009d34: 34 21 00 0c addi r1,r1,12
return NULL;
/*
* Fill in the basic information
*/
node->st_nlink = 1;
8009d38: 0d 64 00 34 sh (r11+52),r4
node->type = type;
8009d3c: 59 6e 00 4c sw (r11+76),r14
strncpy( node->name, name, IMFS_NAME_MAX );
8009d40: f8 00 09 8a calli 800c368 <strncpy>
#endif
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
8009d44: b9 80 10 00 mv r2,r12
8009d48: 37 81 00 1c addi r1,sp,28
strncpy( node->name, name, IMFS_NAME_MAX );
/*
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode;
8009d4c: 59 6d 00 30 sw (r11+48),r13
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
node->st_gid = getegid();
#else
node->st_uid = 0;
8009d50: 0d 6c 00 3c sh (r11+60),r12
node->st_gid = 0;
8009d54: 0d 6c 00 3e sh (r11+62),r12
#endif
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
8009d58: fb ff f5 3f calli 8007254 <gettimeofday>
node->stat_atime = (time_t) tv.tv_sec;
8009d5c: 2b 81 00 1c lw r1,(sp+28)
node->stat_mtime = (time_t) tv.tv_sec;
node->stat_ctime = (time_t) tv.tv_sec;
8009d60: 59 61 00 48 sw (r11+72),r1
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
node->stat_atime = (time_t) tv.tv_sec;
8009d64: 59 61 00 40 sw (r11+64),r1
node->stat_mtime = (time_t) tv.tv_sec;
8009d68: 59 61 00 44 sw (r11+68),r1
node->stat_ctime = (time_t) tv.tv_sec;
return node;
}
8009d6c: b9 60 08 00 mv r1,r11
8009d70: 2b 9d 00 04 lw ra,(sp+4)
8009d74: 2b 8b 00 18 lw r11,(sp+24)
8009d78: 2b 8c 00 14 lw r12,(sp+20)
8009d7c: 2b 8d 00 10 lw r13,(sp+16)
8009d80: 2b 8e 00 0c lw r14,(sp+12)
8009d84: 2b 8f 00 08 lw r15,(sp+8)
8009d88: 37 9c 00 20 addi sp,sp,32
8009d8c: c3 a0 00 00 ret
08009dd4 <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
8009dd4: 37 9c ff ec addi sp,sp,-20
8009dd8: 5b 8b 00 14 sw (sp+20),r11
8009ddc: 5b 8c 00 10 sw (sp+16),r12
8009de0: 5b 8d 00 0c sw (sp+12),r13
8009de4: 5b 8e 00 08 sw (sp+8),r14
8009de8: 5b 9d 00 04 sw (sp+4),ra
8009dec: b8 40 70 00 mv r14,r2
8009df0: b8 20 60 00 mv r12,r1
8009df4: b8 60 10 00 mv r2,r3
8009df8: 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 )
8009dfc: b8 20 58 00 mv r11,r1
8009e00: 44 20 00 42 be r1,r0,8009f08 <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 );
8009e04: 78 05 08 01 mvhi r5,0x801
8009e08: 38 a5 c1 10 ori r5,r5,0xc110
8009e0c: 28 a3 00 00 lw r3,(r5+0)
8009e10: b9 c0 08 00 mv r1,r14
8009e14: 28 63 00 2c lw r3,(r3+44)
8009e18: a4 60 18 00 not r3,r3
8009e1c: a0 83 18 00 and r3,r4,r3
8009e20: fb ff ff b2 calli 8009ce8 <IMFS_allocate_node>
8009e24: b8 20 58 00 mv r11,r1
if ( !node )
8009e28: 44 20 00 38 be r1,r0,8009f08 <IMFS_create_node+0x134> <== NEVER TAKEN
return NULL;
/*
* Set the type specific information
*/
switch (type) {
8009e2c: 35 c1 ff ff addi r1,r14,-1
8009e30: 34 02 00 06 mvi r2,6
8009e34: 54 22 00 22 bgu r1,r2,8009ebc <IMFS_create_node+0xe8> <== NEVER TAKEN
8009e38: 78 0e 08 01 mvhi r14,0x801
8009e3c: 34 02 00 02 mvi r2,2
8009e40: fb ff d8 ec calli 80001f0 <__ashlsi3>
8009e44: 39 ce a8 c0 ori r14,r14,0xa8c0
8009e48: b5 c1 08 00 add r1,r14,r1
8009e4c: 28 21 00 00 lw r1,(r1+0)
8009e50: c0 20 00 00 b r1
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
8009e54: 35 62 00 54 addi r2,r11,84
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
8009e58: 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);
8009e5c: 59 62 00 50 sw (r11+80),r2
the_chain->permanent_null = NULL;
8009e60: 34 02 00 00 mvi r2,0
8009e64: 59 62 00 54 sw (r11+84),r2
the_chain->last = _Chain_Head(the_chain);
8009e68: 59 61 00 58 sw (r11+88),r1
8009e6c: e0 00 00 1c bi 8009edc <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;
8009e70: 29 a1 00 04 lw r1,(r13+4)
8009e74: 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;
8009e78: 29 ad 00 00 lw r13,(r13+0)
8009e7c: 59 6d 00 50 sw (r11+80),r13
node->info.device.minor = info->device.minor;
break;
8009e80: e0 00 00 17 bi 8009edc <IMFS_create_node+0x108>
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
8009e84: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
node->info.linearfile.direct = 0;
8009e88: 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;
8009e8c: 59 61 00 50 sw (r11+80),r1 <== NOT EXECUTED
8009e90: 59 61 00 54 sw (r11+84),r1 <== NOT EXECUTED
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
8009e94: 34 02 00 00 mvi r2,0
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
8009e98: 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;
8009e9c: 59 62 00 50 sw (r11+80),r2
8009ea0: 59 62 00 54 sw (r11+84),r2
node->info.file.indirect = 0;
8009ea4: 59 62 00 58 sw (r11+88),r2
node->info.file.doubly_indirect = 0;
8009ea8: 59 62 00 5c sw (r11+92),r2
node->info.file.triply_indirect = 0;
break;
8009eac: e0 00 00 0c bi 8009edc <IMFS_create_node+0x108>
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
8009eb0: 34 01 00 00 mvi r1,0
8009eb4: 59 61 00 50 sw (r11+80),r1
break;
8009eb8: e0 00 00 09 bi 8009edc <IMFS_create_node+0x108>
default:
assert(0);
8009ebc: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8009ec0: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED
8009ec4: 78 04 08 01 mvhi r4,0x801 <== NOT EXECUTED
8009ec8: 38 21 a8 70 ori r1,r1,0xa870 <== NOT EXECUTED
8009ecc: 38 63 a8 dc ori r3,r3,0xa8dc <== NOT EXECUTED
8009ed0: 38 84 a8 bc ori r4,r4,0xa8bc <== NOT EXECUTED
8009ed4: 34 02 00 5c mvi r2,92 <== NOT EXECUTED
8009ed8: fb ff f3 ff calli 8006ed4 <__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;
8009edc: 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;
8009ee0: 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 );
8009ee4: b9 60 10 00 mv r2,r11
fs_info = parent_loc->mt_entry->fs_info;
8009ee8: 28 63 00 34 lw r3,(r3+52)
node->Parent = parent;
8009eec: 59 61 00 08 sw (r11+8),r1
8009ef0: 34 21 00 50 addi r1,r1,80
node->st_ino = ++fs_info->ino_count;
8009ef4: 28 64 00 04 lw r4,(r3+4)
8009ef8: 34 84 00 01 addi r4,r4,1
8009efc: 58 64 00 04 sw (r3+4),r4
8009f00: 59 64 00 38 sw (r11+56),r4
8009f04: fb ff e2 d8 calli 8002a64 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
8009f08: b9 60 08 00 mv r1,r11
8009f0c: 2b 9d 00 04 lw ra,(sp+4)
8009f10: 2b 8b 00 14 lw r11,(sp+20)
8009f14: 2b 8c 00 10 lw r12,(sp+16)
8009f18: 2b 8d 00 0c lw r13,(sp+12)
8009f1c: 2b 8e 00 08 lw r14,(sp+8)
8009f20: 37 9c 00 14 addi sp,sp,20
8009f24: c3 a0 00 00 ret
08009d90 <IMFS_create_root_node>:
IMFS_jnode_t *IMFS_create_root_node(void)
{
8009d90: 37 9c ff fc addi sp,sp,-4
8009d94: 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) );
8009d98: 78 02 08 01 mvhi r2,0x801
8009d9c: 38 42 a3 58 ori r2,r2,0xa358
8009da0: 34 01 00 01 mvi r1,1
8009da4: 34 03 41 ed mvi r3,16877
8009da8: fb ff ff d0 calli 8009ce8 <IMFS_allocate_node>
if ( !node )
8009dac: 44 20 00 07 be r1,r0,8009dc8 <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);
8009db0: 34 23 00 54 addi r3,r1,84
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
8009db4: 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);
8009db8: 58 23 00 50 sw (r1+80),r3
the_chain->permanent_null = NULL;
8009dbc: 34 03 00 00 mvi r3,0
8009dc0: 58 23 00 54 sw (r1+84),r3
the_chain->last = _Chain_Head(the_chain);
8009dc4: 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;
}
8009dc8: 2b 9d 00 04 lw ra,(sp+4)
8009dcc: 37 9c 00 04 addi sp,sp,4
8009dd0: c3 a0 00 00 ret
080038c8 <IMFS_dump_directory>:
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
80038c8: 37 9c ff dc addi sp,sp,-36
80038cc: 5b 8b 00 24 sw (sp+36),r11
80038d0: 5b 8c 00 20 sw (sp+32),r12
80038d4: 5b 8d 00 1c sw (sp+28),r13
80038d8: 5b 8e 00 18 sw (sp+24),r14
80038dc: 5b 8f 00 14 sw (sp+20),r15
80038e0: 5b 90 00 10 sw (sp+16),r16
80038e4: 5b 91 00 0c sw (sp+12),r17
80038e8: 5b 92 00 08 sw (sp+8),r18
80038ec: 5b 9d 00 04 sw (sp+4),ra
80038f0: 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 );
80038f4: 5c 20 00 09 bne r1,r0,8003918 <IMFS_dump_directory+0x50> <== ALWAYS TAKEN
80038f8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80038fc: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8003900: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8003904: 38 21 50 8c ori r1,r1,0x508c <== NOT EXECUTED
8003908: 38 63 52 50 ori r3,r3,0x5250 <== NOT EXECUTED
800390c: 38 84 51 50 ori r4,r4,0x5150 <== NOT EXECUTED
8003910: 34 02 00 84 mvi r2,132 <== NOT EXECUTED
8003914: e0 00 00 09 bi 8003938 <IMFS_dump_directory+0x70> <== NOT EXECUTED
assert( level >= 0 );
8003918: 4c 40 00 09 bge r2,r0,800393c <IMFS_dump_directory+0x74> <== ALWAYS TAKEN
800391c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003920: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8003924: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8003928: 38 21 50 8c ori r1,r1,0x508c <== NOT EXECUTED
800392c: 38 63 52 50 ori r3,r3,0x5250 <== NOT EXECUTED
8003930: 38 84 51 60 ori r4,r4,0x5160 <== NOT EXECUTED
8003934: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8003938: f8 00 02 6c calli 80042e8 <__assert_func> <== NOT EXECUTED
assert( the_directory->type == IMFS_DIRECTORY );
800393c: 28 22 00 4c lw r2,(r1+76)
8003940: 34 03 00 01 mvi r3,1
8003944: 44 43 00 09 be r2,r3,8003968 <IMFS_dump_directory+0xa0> <== ALWAYS TAKEN
8003948: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800394c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8003950: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8003954: 38 21 50 8c ori r1,r1,0x508c <== NOT EXECUTED
8003958: 38 63 52 50 ori r3,r3,0x5250 <== NOT EXECUTED
800395c: 38 84 51 6c ori r4,r4,0x516c <== NOT EXECUTED
8003960: 34 02 00 88 mvi r2,136 <== NOT EXECUTED
8003964: e3 ff ff f5 bi 8003938 <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, "...." );
8003968: 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;
800396c: 34 32 00 54 addi r18,r1,84
8003970: 39 8c 81 90 ori r12,r12,0x8190
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
8003974: 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;
8003978: 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, "...." );
800397c: 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 );
8003980: 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;
8003984: e0 00 00 11 bi 80039c8 <IMFS_dump_directory+0x100>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
8003988: 34 0e 00 00 mvi r14,0
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
800398c: 29 82 00 00 lw r2,(r12+0)
8003990: 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++ )
8003994: 35 ce 00 01 addi r14,r14,1
fprintf(stdout, "...." );
8003998: 28 42 00 08 lw r2,(r2+8)
800399c: 38 21 51 94 ori r1,r1,0x5194
80039a0: f8 00 37 be calli 8011898 <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++ )
80039a4: 4d ae ff fa bge r13,r14,800398c <IMFS_dump_directory+0xc4>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
80039a8: b9 60 08 00 mv r1,r11
80039ac: fb ff ff 4f calli 80036e8 <IMFS_print_jnode>
if ( the_jnode->type == IMFS_DIRECTORY )
80039b0: 29 61 00 4c lw r1,(r11+76)
80039b4: 5c 31 00 04 bne r1,r17,80039c4 <IMFS_dump_directory+0xfc>
IMFS_dump_directory( the_jnode, level + 1 );
80039b8: b9 60 08 00 mv r1,r11
80039bc: b9 e0 10 00 mv r2,r15
80039c0: fb ff ff c2 calli 80038c8 <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 ) {
80039c4: 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;
80039c8: 5d 72 ff f0 bne r11,r18,8003988 <IMFS_dump_directory+0xc0>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
80039cc: 2b 9d 00 04 lw ra,(sp+4)
80039d0: 2b 8b 00 24 lw r11,(sp+36)
80039d4: 2b 8c 00 20 lw r12,(sp+32)
80039d8: 2b 8d 00 1c lw r13,(sp+28)
80039dc: 2b 8e 00 18 lw r14,(sp+24)
80039e0: 2b 8f 00 14 lw r15,(sp+20)
80039e4: 2b 90 00 10 lw r16,(sp+16)
80039e8: 2b 91 00 0c lw r17,(sp+12)
80039ec: 2b 92 00 08 lw r18,(sp+8)
80039f0: 37 9c 00 24 addi sp,sp,36
80039f4: c3 a0 00 00 ret
08006000 <IMFS_eval_path>:
const char *pathname, /* IN */
int pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
8006000: 37 9c ff 80 addi sp,sp,-128
8006004: 5b 8b 00 44 sw (sp+68),r11
8006008: 5b 8c 00 40 sw (sp+64),r12
800600c: 5b 8d 00 3c sw (sp+60),r13
8006010: 5b 8e 00 38 sw (sp+56),r14
8006014: 5b 8f 00 34 sw (sp+52),r15
8006018: 5b 90 00 30 sw (sp+48),r16
800601c: 5b 91 00 2c sw (sp+44),r17
8006020: 5b 92 00 28 sw (sp+40),r18
8006024: 5b 93 00 24 sw (sp+36),r19
8006028: 5b 94 00 20 sw (sp+32),r20
800602c: 5b 95 00 1c sw (sp+28),r21
8006030: 5b 96 00 18 sw (sp+24),r22
8006034: 5b 97 00 14 sw (sp+20),r23
8006038: 5b 98 00 10 sw (sp+16),r24
800603c: 5b 99 00 0c sw (sp+12),r25
8006040: 5b 9b 00 08 sw (sp+8),fp
8006044: 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;
8006048: 34 0d 00 01 mvi r13,1
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
800604c: 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 */
)
{
8006050: b8 80 58 00 mv r11,r4
8006054: b8 20 88 00 mv r17,r1
8006058: b8 40 70 00 mv r14,r2
800605c: b8 60 80 00 mv r16,r3
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
8006060: 3a 73 c1 10 ori r19,r19,0xc110
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
8006064: 28 8c 00 00 lw r12,(r4+0)
8006068: 34 0f 00 00 mvi r15,0
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
800606c: 37 96 00 48 addi r22,sp,72
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
8006070: b9 a0 a8 00 mv r21,r13
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
8006074: 34 1b 00 40 mvi fp,64
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
8006078: 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 ) {
800607c: 34 14 00 04 mvi r20,4
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
if ( result == -1 )
8006080: 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 ) {
8006084: 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) ) {
8006088: e0 00 00 58 bi 80061e8 <IMFS_eval_path+0x1e8>
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
800608c: 37 84 00 80 addi r4,sp,128
8006090: b6 2f 08 00 add r1,r17,r15
8006094: b9 c0 10 00 mv r2,r14
8006098: ba c0 18 00 mv r3,r22
800609c: f8 00 02 60 calli 8006a1c <IMFS_get_token>
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
80060a0: 29 64 00 00 lw r4,(r11+0)
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
80060a4: b8 20 68 00 mv r13,r1
pathnamelen -= len;
80060a8: 2b 92 00 80 lw r18,(sp+128)
i += len;
if ( !pathloc->node_access )
80060ac: 44 80 00 47 be r4,r0,80061c8 <IMFS_eval_path+0x1c8> <== 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 )
80060b0: 44 20 00 06 be r1,r0,80060c8 <IMFS_eval_path+0xc8>
if ( node->type == IMFS_DIRECTORY )
80060b4: 29 81 00 4c lw r1,(r12+76)
80060b8: 5c 35 00 04 bne r1,r21,80060c8 <IMFS_eval_path+0xc8>
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
80060bc: 28 81 00 30 lw r1,(r4+48)
80060c0: 20 21 00 40 andi r1,r1,0x40
80060c4: 5c 3b 00 84 bne r1,fp,80062d4 <IMFS_eval_path+0x2d4> <== NEVER TAKEN
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
80060c8: c9 d2 70 00 sub r14,r14,r18
i += len;
80060cc: b5 f2 78 00 add r15,r15,r18
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
80060d0: b8 80 60 00 mv r12,r4
switch( type ) {
80060d4: 45 b9 00 1e be r13,r25,800614c <IMFS_eval_path+0x14c>
80060d8: 45 b4 00 41 be r13,r20,80061dc <IMFS_eval_path+0x1dc>
80060dc: 5d b7 00 43 bne r13,r23,80061e8 <IMFS_eval_path+0x1e8>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
80060e0: 2a 61 00 00 lw r1,(r19+0)
80060e4: 28 21 00 18 lw r1,(r1+24)
80060e8: 44 81 00 40 be r4,r1,80061e8 <IMFS_eval_path+0x1e8> <== NEVER TAKEN
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
80060ec: 29 65 00 10 lw r5,(r11+16)
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
80060f0: 28 a1 00 1c lw r1,(r5+28)
80060f4: 5c 81 00 11 bne r4,r1,8006138 <IMFS_eval_path+0x138>
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
80060f8: 37 8c 00 6c addi r12,sp,108
80060fc: 34 a2 00 08 addi r2,r5,8
8006100: 34 03 00 14 mvi r3,20
8006104: b9 80 08 00 mv r1,r12
8006108: f8 00 16 43 calli 800ba14 <memcpy>
*pathloc = newloc;
800610c: b9 80 10 00 mv r2,r12
8006110: 34 03 00 14 mvi r3,20
8006114: b9 60 08 00 mv r1,r11
8006118: f8 00 16 3f calli 800ba14 <memcpy>
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
800611c: 29 62 00 0c lw r2,(r11+12)
8006120: c9 f2 08 00 sub r1,r15,r18
8006124: b6 21 08 00 add r1,r17,r1
8006128: 28 45 00 00 lw r5,(r2+0)
800612c: ba 00 18 00 mv r3,r16
8006130: b6 4e 10 00 add r2,r18,r14
8006134: e0 00 00 46 bi 800624c <IMFS_eval_path+0x24c>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
8006138: 28 8c 00 08 lw r12,(r4+8)
800613c: 5d 80 00 26 bne r12,r0,80061d4 <IMFS_eval_path+0x1d4>
rtems_set_errno_and_return_minus_one( ENOENT );
8006140: f8 00 13 8f calli 800af7c <__errno>
8006144: 58 2d 00 00 sw (r1+0),r13
8006148: e0 00 00 66 bi 80062e0 <IMFS_eval_path+0x2e0>
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
800614c: 28 81 00 4c lw r1,(r4+76)
8006150: 5c 2d 00 07 bne r1,r13,800616c <IMFS_eval_path+0x16c>
IMFS_evaluate_hard_link( pathloc, 0 );
8006154: b9 60 08 00 mv r1,r11
8006158: 34 02 00 00 mvi r2,0
800615c: fb ff ff 44 calli 8005e6c <IMFS_evaluate_hard_link>
node = pathloc->node_access;
8006160: 29 6c 00 00 lw r12,(r11+0)
if ( !node )
8006164: 5d 80 00 0a bne r12,r0,800618c <IMFS_eval_path+0x18c> <== ALWAYS TAKEN
8006168: e0 00 00 0b bi 8006194 <IMFS_eval_path+0x194> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
800616c: 5c 34 00 08 bne r1,r20,800618c <IMFS_eval_path+0x18c>
result = IMFS_evaluate_sym_link( pathloc, 0 );
8006170: b9 60 08 00 mv r1,r11
8006174: 34 02 00 00 mvi r2,0
8006178: fb ff ff 5f calli 8005ef4 <IMFS_evaluate_sym_link>
800617c: b8 20 60 00 mv r12,r1
node = pathloc->node_access;
8006180: 29 61 00 00 lw r1,(r11+0)
if ( result == -1 )
8006184: 45 98 00 40 be r12,r24,8006284 <IMFS_eval_path+0x284> <== NEVER TAKEN
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
8006188: b8 20 60 00 mv r12,r1
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
800618c: 29 81 00 4c lw r1,(r12+76)
8006190: 44 35 00 04 be r1,r21,80061a0 <IMFS_eval_path+0x1a0>
rtems_set_errno_and_return_minus_one( ENOTDIR );
8006194: f8 00 13 7a calli 800af7c <__errno>
8006198: 34 02 00 14 mvi r2,20
800619c: e0 00 00 50 bi 80062dc <IMFS_eval_path+0x2dc>
/*
* 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 ) {
80061a0: 29 92 00 5c lw r18,(r12+92)
80061a4: 46 40 00 04 be r18,r0,80061b4 <IMFS_eval_path+0x1b4>
newloc = node->info.directory.mt_fs->mt_fs_root;
80061a8: 37 8c 00 6c addi r12,sp,108
80061ac: 36 42 00 1c addi r2,r18,28
80061b0: e0 00 00 19 bi 8006214 <IMFS_eval_path+0x214>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
80061b4: b9 80 08 00 mv r1,r12
80061b8: ba c0 10 00 mv r2,r22
80061bc: f8 00 01 ea calli 8006964 <IMFS_find_match_in_dir>
80061c0: b8 20 60 00 mv r12,r1
if ( !node )
80061c4: 5c 32 00 04 bne r1,r18,80061d4 <IMFS_eval_path+0x1d4>
rtems_set_errno_and_return_minus_one( ENOENT );
80061c8: f8 00 13 6d calli 800af7c <__errno>
80061cc: 34 02 00 02 mvi r2,2
80061d0: e0 00 00 43 bi 80062dc <IMFS_eval_path+0x2dc>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
80061d4: 59 6c 00 00 sw (r11+0),r12
80061d8: e0 00 00 04 bi 80061e8 <IMFS_eval_path+0x1e8>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
80061dc: f8 00 13 68 calli 800af7c <__errno>
80061e0: 34 02 00 5b mvi r2,91
80061e4: e0 00 00 3e bi 80062dc <IMFS_eval_path+0x2dc>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
80061e8: 7d a1 00 00 cmpnei r1,r13,0
80061ec: 7d ad 00 04 cmpnei r13,r13,4
80061f0: a1 a1 68 00 and r13,r13,r1
80061f4: 5d a0 ff a6 bne r13,r0,800608c <IMFS_eval_path+0x8c>
* 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 ) {
80061f8: 29 82 00 4c lw r2,(r12+76)
80061fc: 34 01 00 01 mvi r1,1
8006200: 5c 41 00 17 bne r2,r1,800625c <IMFS_eval_path+0x25c>
if ( node->info.directory.mt_fs != NULL ) {
8006204: 29 83 00 5c lw r3,(r12+92)
8006208: 44 60 00 15 be r3,r0,800625c <IMFS_eval_path+0x25c>
newloc = node->info.directory.mt_fs->mt_fs_root;
800620c: 37 8c 00 6c addi r12,sp,108
8006210: 34 62 00 1c addi r2,r3,28
8006214: 34 03 00 14 mvi r3,20
8006218: b9 80 08 00 mv r1,r12
800621c: f8 00 15 fe calli 800ba14 <memcpy>
*pathloc = newloc;
8006220: b9 80 10 00 mv r2,r12
8006224: 34 03 00 14 mvi r3,20
8006228: b9 60 08 00 mv r1,r11
800622c: f8 00 15 fa calli 800ba14 <memcpy>
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
8006230: 29 61 00 0c lw r1,(r11+12)
8006234: 2b 82 00 80 lw r2,(sp+128)
8006238: ba 00 18 00 mv r3,r16
800623c: 28 25 00 00 lw r5,(r1+0)
8006240: c9 e2 08 00 sub r1,r15,r2
8006244: b6 21 08 00 add r1,r17,r1
8006248: b5 c2 10 00 add r2,r14,r2
800624c: b9 60 20 00 mv r4,r11
8006250: d8 a0 00 00 call r5
8006254: b8 20 60 00 mv r12,r1
8006258: e0 00 00 0b bi 8006284 <IMFS_eval_path+0x284>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
800625c: b9 60 08 00 mv r1,r11
8006260: fb ff fe cb calli 8005d8c <IMFS_Set_handlers>
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
8006264: 34 02 00 06 mvi r2,6
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
8006268: b8 20 60 00 mv r12,r1
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
800626c: ba 00 08 00 mv r1,r16
8006270: fb ff e7 e0 calli 80001f0 <__ashlsi3>
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
8006274: 29 62 00 00 lw r2,(r11+0)
8006278: 28 42 00 30 lw r2,(r2+48)
800627c: a0 22 10 00 and r2,r1,r2
8006280: 5c 41 00 15 bne r2,r1,80062d4 <IMFS_eval_path+0x2d4>
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
8006284: b9 80 08 00 mv r1,r12
8006288: 2b 9d 00 04 lw ra,(sp+4)
800628c: 2b 8b 00 44 lw r11,(sp+68)
8006290: 2b 8c 00 40 lw r12,(sp+64)
8006294: 2b 8d 00 3c lw r13,(sp+60)
8006298: 2b 8e 00 38 lw r14,(sp+56)
800629c: 2b 8f 00 34 lw r15,(sp+52)
80062a0: 2b 90 00 30 lw r16,(sp+48)
80062a4: 2b 91 00 2c lw r17,(sp+44)
80062a8: 2b 92 00 28 lw r18,(sp+40)
80062ac: 2b 93 00 24 lw r19,(sp+36)
80062b0: 2b 94 00 20 lw r20,(sp+32)
80062b4: 2b 95 00 1c lw r21,(sp+28)
80062b8: 2b 96 00 18 lw r22,(sp+24)
80062bc: 2b 97 00 14 lw r23,(sp+20)
80062c0: 2b 98 00 10 lw r24,(sp+16)
80062c4: 2b 99 00 0c lw r25,(sp+12)
80062c8: 2b 9b 00 08 lw fp,(sp+8)
80062cc: 37 9c 00 80 addi sp,sp,128
80062d0: c3 a0 00 00 ret
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
80062d4: f8 00 13 2a calli 800af7c <__errno>
80062d8: 34 02 00 0d mvi r2,13
80062dc: 58 22 00 00 sw (r1+0),r2
80062e0: 34 0c ff ff mvi r12,-1
80062e4: e3 ff ff e8 bi 8006284 <IMFS_eval_path+0x284>
080063e4 <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 */
)
{
80063e4: 37 9c ff 80 addi sp,sp,-128
80063e8: 5b 8b 00 44 sw (sp+68),r11
80063ec: 5b 8c 00 40 sw (sp+64),r12
80063f0: 5b 8d 00 3c sw (sp+60),r13
80063f4: 5b 8e 00 38 sw (sp+56),r14
80063f8: 5b 8f 00 34 sw (sp+52),r15
80063fc: 5b 90 00 30 sw (sp+48),r16
8006400: 5b 91 00 2c sw (sp+44),r17
8006404: 5b 92 00 28 sw (sp+40),r18
8006408: 5b 93 00 24 sw (sp+36),r19
800640c: 5b 94 00 20 sw (sp+32),r20
8006410: 5b 95 00 1c sw (sp+28),r21
8006414: 5b 96 00 18 sw (sp+24),r22
8006418: 5b 97 00 14 sw (sp+20),r23
800641c: 5b 98 00 10 sw (sp+16),r24
8006420: 5b 99 00 0c sw (sp+12),r25
8006424: 5b 9b 00 08 sw (sp+8),fp
8006428: 5b 9d 00 04 sw (sp+4),ra
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
800642c: 34 1b 00 40 mvi fp,64
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
8006430: b8 40 58 00 mv r11,r2
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
8006434: 28 4c 00 00 lw r12,(r2+0)
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
8006438: 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 */
)
{
800643c: b8 60 88 00 mv r17,r3
8006440: b8 20 78 00 mv r15,r1
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
8006444: f8 00 17 9e calli 800c2bc <strlen>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
8006448: 3a 10 c1 10 ori r16,r16,0xc110
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
800644c: 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 );
8006450: 37 99 00 48 addi r25,sp,72
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
8006454: 34 18 00 01 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 ) {
8006458: 34 17 00 02 mvi r23,2
800645c: 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 ) {
8006460: 34 15 00 04 mvi r21,4
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
8006464: 34 14 ff ff mvi r20,-1
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
8006468: b8 20 98 00 mv r19,r1
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
800646c: ba 60 10 00 mv r2,r19
8006470: 37 84 00 80 addi r4,sp,128
8006474: b5 ed 08 00 add r1,r15,r13
8006478: bb 20 18 00 mv r3,r25
800647c: f8 00 01 68 calli 8006a1c <IMFS_get_token>
pathlen -= len;
i += len;
if ( !pathloc->node_access )
8006480: 29 64 00 00 lw r4,(r11+0)
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
8006484: 2b 92 00 80 lw r18,(sp+128)
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
8006488: b8 20 70 00 mv r14,r1
pathlen -= len;
800648c: ca 72 98 00 sub r19,r19,r18
i += len;
if ( !pathloc->node_access )
8006490: 44 80 00 5e be r4,r0,8006608 <IMFS_evaluate_for_make+0x224><== NEVER TAKEN
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
8006494: 44 20 00 06 be r1,r0,80064ac <IMFS_evaluate_for_make+0xc8>
if ( node->type == IMFS_DIRECTORY )
8006498: 29 81 00 4c lw r1,(r12+76)
800649c: 5c 38 00 04 bne r1,r24,80064ac <IMFS_evaluate_for_make+0xc8>
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
80064a0: 28 81 00 30 lw r1,(r4+48)
80064a4: 20 21 00 40 andi r1,r1,0x40
80064a8: 5c 3b 00 80 bne r1,fp,80066a8 <IMFS_evaluate_for_make+0x2c4>
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
80064ac: b5 b2 68 00 add r13,r13,r18
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
80064b0: b8 80 60 00 mv r12,r4
switch( type ) {
80064b4: 45 d7 00 07 be r14,r23,80064d0 <IMFS_evaluate_for_make+0xec>
80064b8: 55 d7 00 03 bgu r14,r23,80064c4 <IMFS_evaluate_for_make+0xe0>
80064bc: 5d c0 ff ec bne r14,r0,800646c <IMFS_evaluate_for_make+0x88>
80064c0: e0 00 00 44 bi 80065d0 <IMFS_evaluate_for_make+0x1ec>
80064c4: 45 d6 00 1d be r14,r22,8006538 <IMFS_evaluate_for_make+0x154>
80064c8: 5d d5 ff e9 bne r14,r21,800646c <IMFS_evaluate_for_make+0x88><== NEVER TAKEN
80064cc: e0 00 00 44 bi 80065dc <IMFS_evaluate_for_make+0x1f8>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
80064d0: 2a 01 00 00 lw r1,(r16+0)
80064d4: 28 21 00 18 lw r1,(r1+24)
80064d8: 44 81 ff e5 be r4,r1,800646c <IMFS_evaluate_for_make+0x88>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
80064dc: 29 65 00 10 lw r5,(r11+16)
80064e0: 28 a1 00 1c lw r1,(r5+28)
80064e4: 5c 81 00 10 bne r4,r1,8006524 <IMFS_evaluate_for_make+0x140>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
80064e8: 37 8c 00 6c addi r12,sp,108
80064ec: 34 a2 00 08 addi r2,r5,8
80064f0: 34 03 00 14 mvi r3,20
80064f4: b9 80 08 00 mv r1,r12
80064f8: f8 00 15 47 calli 800ba14 <memcpy>
*pathloc = newloc;
80064fc: b9 80 10 00 mv r2,r12
8006500: b9 60 08 00 mv r1,r11
8006504: 34 03 00 14 mvi r3,20
8006508: f8 00 15 43 calli 800ba14 <memcpy>
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
800650c: 29 62 00 0c lw r2,(r11+12)
8006510: c9 b2 68 00 sub r13,r13,r18
8006514: b5 ed 08 00 add r1,r15,r13
8006518: 28 44 00 04 lw r4,(r2+4)
800651c: b9 60 10 00 mv r2,r11
8006520: e0 00 00 22 bi 80065a8 <IMFS_evaluate_for_make+0x1c4>
}
} else {
if ( !node->Parent )
8006524: 28 8c 00 08 lw r12,(r4+8)
8006528: 5d 80 00 28 bne r12,r0,80065c8 <IMFS_evaluate_for_make+0x1e4>
rtems_set_errno_and_return_minus_one( ENOENT );
800652c: f8 00 12 94 calli 800af7c <__errno>
8006530: 58 2e 00 00 sw (r1+0),r14
8006534: e0 00 00 60 bi 80066b4 <IMFS_evaluate_for_make+0x2d0>
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
8006538: 28 81 00 4c lw r1,(r4+76)
800653c: 44 36 00 02 be r1,r22,8006544 <IMFS_evaluate_for_make+0x160>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
8006540: 5c 35 00 05 bne r1,r21,8006554 <IMFS_evaluate_for_make+0x170>
result = IMFS_evaluate_link( pathloc, 0 );
8006544: b9 60 08 00 mv r1,r11
8006548: 34 02 00 00 mvi r2,0
800654c: fb ff ff 67 calli 80062e8 <IMFS_evaluate_link>
if ( result == -1 )
8006550: 44 34 00 43 be r1,r20,800665c <IMFS_evaluate_for_make+0x278><== NEVER TAKEN
return -1;
}
node = pathloc->node_access;
8006554: 29 64 00 00 lw r4,(r11+0)
if ( !node )
8006558: 44 80 00 3a be r4,r0,8006640 <IMFS_evaluate_for_make+0x25c><== NEVER TAKEN
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
800655c: 28 81 00 4c lw r1,(r4+76)
8006560: 5c 38 00 38 bne r1,r24,8006640 <IMFS_evaluate_for_make+0x25c>
/*
* 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 ) {
8006564: 28 8e 00 5c lw r14,(r4+92)
8006568: 45 c0 00 13 be r14,r0,80065b4 <IMFS_evaluate_for_make+0x1d0>
newloc = node->info.directory.mt_fs->mt_fs_root;
800656c: 37 8c 00 6c addi r12,sp,108
8006570: 35 c2 00 1c addi r2,r14,28
8006574: 34 03 00 14 mvi r3,20
8006578: b9 80 08 00 mv r1,r12
800657c: f8 00 15 26 calli 800ba14 <memcpy>
*pathloc = newloc;
8006580: b9 80 10 00 mv r2,r12
8006584: b9 60 08 00 mv r1,r11
8006588: 34 03 00 14 mvi r3,20
800658c: f8 00 15 22 calli 800ba14 <memcpy>
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
8006590: 29 61 00 0c lw r1,(r11+12)
8006594: b9 60 10 00 mv r2,r11
8006598: 28 24 00 04 lw r4,(r1+4)
800659c: 2b 81 00 80 lw r1,(sp+128)
80065a0: c9 a1 68 00 sub r13,r13,r1
80065a4: b5 ed 08 00 add r1,r15,r13
80065a8: ba 20 18 00 mv r3,r17
80065ac: d8 80 00 00 call r4
80065b0: e0 00 00 2b bi 800665c <IMFS_evaluate_for_make+0x278>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
80065b4: b8 80 08 00 mv r1,r4
80065b8: bb 20 10 00 mv r2,r25
80065bc: f8 00 00 ea calli 8006964 <IMFS_find_match_in_dir>
80065c0: b8 20 60 00 mv r12,r1
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
80065c4: 44 2e 00 09 be r1,r14,80065e8 <IMFS_evaluate_for_make+0x204>
done = true;
else
pathloc->node_access = node;
80065c8: 59 6c 00 00 sw (r11+0),r12
80065cc: e3 ff ff a8 bi 800646c <IMFS_evaluate_for_make+0x88>
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
80065d0: f8 00 12 6b calli 800af7c <__errno>
80065d4: 34 02 00 11 mvi r2,17
80065d8: e0 00 00 36 bi 80066b0 <IMFS_evaluate_for_make+0x2cc>
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
80065dc: f8 00 12 68 calli 800af7c <__errno>
80065e0: 34 02 00 5b mvi r2,91
80065e4: e0 00 00 33 bi 80066b0 <IMFS_evaluate_for_make+0x2cc>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
80065e8: 2b 82 00 80 lw r2,(sp+128)
80065ec: b5 ed 08 00 add r1,r15,r13
80065f0: c9 a2 68 00 sub r13,r13,r2
80065f4: b5 ed 78 00 add r15,r15,r13
80065f8: 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++) {
80065fc: e0 00 00 06 bi 8006614 <IMFS_evaluate_for_make+0x230>
if ( !IMFS_is_separator( path[ i ] ) )
8006600: a0 64 18 00 and r3,r3,r4
8006604: 44 60 00 04 be r3,r0,8006614 <IMFS_evaluate_for_make+0x230>
rtems_set_errno_and_return_minus_one( ENOENT );
8006608: f8 00 12 5d calli 800af7c <__errno>
800660c: 34 02 00 02 mvi r2,2
8006610: e0 00 00 28 bi 80066b0 <IMFS_evaluate_for_make+0x2cc>
/*
* 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++) {
8006614: 40 22 00 00 lbu r2,(r1+0)
8006618: 34 21 00 01 addi r1,r1,1
if ( !IMFS_is_separator( path[ i ] ) )
800661c: 7c 44 00 2f cmpnei r4,r2,47
8006620: 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++) {
8006624: 5c 40 ff f7 bne r2,r0,8006600 <IMFS_evaluate_for_make+0x21c>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
8006628: b9 60 08 00 mv r1,r11
800662c: fb ff fd d8 calli 8005d8c <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
8006630: 29 62 00 00 lw r2,(r11+0)
if ( node->type != IMFS_DIRECTORY )
8006634: 34 03 00 01 mvi r3,1
8006638: 28 44 00 4c lw r4,(r2+76)
800663c: 44 83 00 04 be r4,r3,800664c <IMFS_evaluate_for_make+0x268><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
8006640: f8 00 12 4f calli 800af7c <__errno>
8006644: 34 02 00 14 mvi r2,20
8006648: e0 00 00 1a bi 80066b0 <IMFS_evaluate_for_make+0x2cc>
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
800664c: 28 43 00 30 lw r3,(r2+48)
8006650: 34 02 00 c0 mvi r2,192
8006654: 20 63 00 c0 andi r3,r3,0xc0
8006658: 5c 62 00 14 bne r3,r2,80066a8 <IMFS_evaluate_for_make+0x2c4>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
800665c: 2b 9d 00 04 lw ra,(sp+4)
8006660: 2b 8b 00 44 lw r11,(sp+68)
8006664: 2b 8c 00 40 lw r12,(sp+64)
8006668: 2b 8d 00 3c lw r13,(sp+60)
800666c: 2b 8e 00 38 lw r14,(sp+56)
8006670: 2b 8f 00 34 lw r15,(sp+52)
8006674: 2b 90 00 30 lw r16,(sp+48)
8006678: 2b 91 00 2c lw r17,(sp+44)
800667c: 2b 92 00 28 lw r18,(sp+40)
8006680: 2b 93 00 24 lw r19,(sp+36)
8006684: 2b 94 00 20 lw r20,(sp+32)
8006688: 2b 95 00 1c lw r21,(sp+28)
800668c: 2b 96 00 18 lw r22,(sp+24)
8006690: 2b 97 00 14 lw r23,(sp+20)
8006694: 2b 98 00 10 lw r24,(sp+16)
8006698: 2b 99 00 0c lw r25,(sp+12)
800669c: 2b 9b 00 08 lw fp,(sp+8)
80066a0: 37 9c 00 80 addi sp,sp,128
80066a4: c3 a0 00 00 ret
*/
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 );
80066a8: f8 00 12 35 calli 800af7c <__errno>
80066ac: 34 02 00 0d mvi r2,13
80066b0: 58 22 00 00 sw (r1+0),r2
80066b4: 34 01 ff ff mvi r1,-1
80066b8: e3 ff ff e9 bi 800665c <IMFS_evaluate_for_make+0x278>
08005e6c <IMFS_evaluate_hard_link>:
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
8005e6c: 37 9c ff f4 addi sp,sp,-12
8005e70: 5b 8b 00 0c sw (sp+12),r11
8005e74: 5b 8c 00 08 sw (sp+8),r12
8005e78: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *jnode = node->node_access;
8005e7c: 28 23 00 00 lw r3,(r1+0)
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
8005e80: b8 40 60 00 mv r12,r2
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
8005e84: 34 02 00 03 mvi r2,3
8005e88: 28 64 00 4c lw r4,(r3+76)
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
8005e8c: b8 20 58 00 mv r11,r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
8005e90: 44 82 00 04 be r4,r2,8005ea0 <IMFS_evaluate_hard_link+0x34><== ALWAYS TAKEN
rtems_fatal_error_occurred (0xABCD0000);
8005e94: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED
8005e98: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED
8005e9c: fb ff f2 01 calli 80026a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
8005ea0: 28 63 00 50 lw r3,(r3+80)
8005ea4: 58 23 00 00 sw (r1+0),r3
IMFS_Set_handlers( node );
8005ea8: fb ff ff b9 calli 8005d8c <IMFS_Set_handlers>
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
8005eac: 34 02 00 06 mvi r2,6
8005eb0: b9 80 08 00 mv r1,r12
8005eb4: fb ff e8 cf calli 80001f0 <__ashlsi3>
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
8005eb8: 29 62 00 00 lw r2,(r11+0)
8005ebc: 28 42 00 30 lw r2,(r2+48)
8005ec0: a0 22 10 00 and r2,r1,r2
8005ec4: 5c 41 00 07 bne r2,r1,8005ee0 <IMFS_evaluate_hard_link+0x74><== NEVER TAKEN
8005ec8: 34 01 00 00 mvi r1,0
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
8005ecc: 2b 9d 00 04 lw ra,(sp+4)
8005ed0: 2b 8b 00 0c lw r11,(sp+12)
8005ed4: 2b 8c 00 08 lw r12,(sp+8)
8005ed8: 37 9c 00 0c addi sp,sp,12
8005edc: c3 a0 00 00 ret
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
8005ee0: f8 00 14 27 calli 800af7c <__errno> <== NOT EXECUTED
8005ee4: 34 02 00 0d mvi r2,13 <== NOT EXECUTED
8005ee8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8005eec: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8005ef0: e3 ff ff f7 bi 8005ecc <IMFS_evaluate_hard_link+0x60> <== NOT EXECUTED
08005e30 <IMFS_evaluate_permission>:
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
8005e30: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
8005e34: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
8005e38: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8005e3c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
8005e40: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
8005e44: 34 02 00 06 mvi r2,6 <== NOT EXECUTED
8005e48: fb ff e8 ea calli 80001f0 <__ashlsi3> <== NOT EXECUTED
8005e4c: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED
8005e50: 28 42 00 30 lw r2,(r2+48) <== NOT EXECUTED
8005e54: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED
return 1;
return 0;
}
8005e58: e4 41 08 00 cmpe r1,r2,r1 <== NOT EXECUTED
8005e5c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8005e60: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8005e64: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
8005e68: c3 a0 00 00 ret <== NOT EXECUTED
08005ef4 <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
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
IMFS_jnode_t *jnode = node->node_access;
8005f08: 28 2c 00 00 lw r12,(r1+0)
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
8005f0c: b8 40 68 00 mv r13,r2
8005f10: b8 20 58 00 mv r11,r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
8005f14: 29 82 00 4c lw r2,(r12+76)
8005f18: 34 01 00 04 mvi r1,4
8005f1c: 44 41 00 04 be r2,r1,8005f2c <IMFS_evaluate_sym_link+0x38> <== ALWAYS TAKEN
rtems_fatal_error_occurred (0xABCD0000);
8005f20: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED
8005f24: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED
8005f28: e0 00 00 05 bi 8005f3c <IMFS_evaluate_sym_link+0x48> <== NOT EXECUTED
if ( !jnode->Parent )
8005f2c: 29 81 00 08 lw r1,(r12+8)
8005f30: 5c 20 00 04 bne r1,r0,8005f40 <IMFS_evaluate_sym_link+0x4c><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xBAD00000 );
8005f34: 78 01 ba d0 mvhi r1,0xbad0 <== NOT EXECUTED
8005f38: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED
8005f3c: fb ff f1 d9 calli 80026a0 <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;
8005f40: 59 61 00 00 sw (r11+0),r1
rtems_filesystem_get_sym_start_loc(
8005f44: 29 81 00 50 lw r1,(r12+80)
8005f48: 40 25 00 00 lbu r5,(r1+0)
8005f4c: 64 a4 00 5c cmpei r4,r5,92
8005f50: 64 a1 00 2f cmpei r1,r5,47
8005f54: b8 81 20 00 or r4,r4,r1
8005f58: 5c 80 00 03 bne r4,r0,8005f64 <IMFS_evaluate_sym_link+0x70>
8005f5c: b8 80 08 00 mv r1,r4
8005f60: 5c a4 00 09 bne r5,r4,8005f84 <IMFS_evaluate_sym_link+0x90><== ALWAYS TAKEN
8005f64: 78 04 08 01 mvhi r4,0x801
8005f68: 38 84 c1 10 ori r4,r4,0xc110
8005f6c: 28 82 00 00 lw r2,(r4+0)
8005f70: b9 60 08 00 mv r1,r11
8005f74: 34 03 00 14 mvi r3,20
8005f78: 34 42 00 18 addi r2,r2,24
8005f7c: f8 00 16 a6 calli 800ba14 <memcpy>
8005f80: 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] ),
8005f84: 29 8c 00 50 lw r12,(r12+80)
8005f88: b5 81 60 00 add r12,r12,r1
8005f8c: b9 80 08 00 mv r1,r12
8005f90: f8 00 18 cb calli 800c2bc <strlen>
8005f94: b8 20 10 00 mv r2,r1
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
8005f98: b9 a0 18 00 mv r3,r13
8005f9c: b9 60 20 00 mv r4,r11
8005fa0: b9 80 08 00 mv r1,r12
8005fa4: f8 00 00 17 calli 8006000 <IMFS_eval_path>
8005fa8: b8 20 60 00 mv r12,r1
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
8005fac: b9 60 08 00 mv r1,r11
8005fb0: fb ff ff 77 calli 8005d8c <IMFS_Set_handlers>
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
8005fb4: 34 02 00 06 mvi r2,6
8005fb8: b9 a0 08 00 mv r1,r13
8005fbc: fb ff e8 8d calli 80001f0 <__ashlsi3>
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
8005fc0: 29 62 00 00 lw r2,(r11+0)
8005fc4: 28 42 00 30 lw r2,(r2+48)
8005fc8: a0 22 10 00 and r2,r1,r2
8005fcc: 5c 41 00 08 bne r2,r1,8005fec <IMFS_evaluate_sym_link+0xf8><== NEVER TAKEN
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
8005fd0: b9 80 08 00 mv r1,r12
8005fd4: 2b 9d 00 04 lw ra,(sp+4)
8005fd8: 2b 8b 00 10 lw r11,(sp+16)
8005fdc: 2b 8c 00 0c lw r12,(sp+12)
8005fe0: 2b 8d 00 08 lw r13,(sp+8)
8005fe4: 37 9c 00 10 addi sp,sp,16
8005fe8: c3 a0 00 00 ret
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
8005fec: f8 00 13 e4 calli 800af7c <__errno> <== NOT EXECUTED
8005ff0: 34 02 00 0d mvi r2,13 <== NOT EXECUTED
8005ff4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8005ff8: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
8005ffc: e3 ff ff f5 bi 8005fd0 <IMFS_evaluate_sym_link+0xdc> <== NOT EXECUTED
0800688c <IMFS_fifo_close>:
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
800688c: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED
8006890: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED
8006894: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED
8006898: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED
800689c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
80068a0: 28 2d 00 3c lw r13,(r1+60) <== NOT EXECUTED
int err = pipe_release(&JNODE2PIPE(jnode), iop);
80068a4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
80068a8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
80068ac: 35 a1 00 50 addi r1,r13,80 <== NOT EXECUTED
80068b0: f8 00 0b ec calli 8009860 <pipe_release> <== NOT EXECUTED
80068b4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if (! err) {
80068b8: 5c 20 00 0d bne r1,r0,80068ec <IMFS_fifo_close+0x60> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_OPEN;
80068bc: 29 83 00 18 lw r3,(r12+24) <== NOT EXECUTED
80068c0: 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)
80068c4: 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;
80068c8: a0 62 10 00 and r2,r3,r2 <== NOT EXECUTED
80068cc: 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)
80068d0: f8 00 02 a9 calli 8007374 <rtems_libio_is_file_open> <== NOT EXECUTED
80068d4: 5c 2b 00 0b bne r1,r11,8006900 <IMFS_fifo_close+0x74> <== NOT EXECUTED
80068d8: 2d a1 00 34 lhu r1,(r13+52) <== NOT EXECUTED
80068dc: 5c 20 00 09 bne r1,r0,8006900 <IMFS_fifo_close+0x74> <== NOT EXECUTED
free(jnode);
80068e0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
80068e4: f8 00 01 e7 calli 8007080 <free> <== NOT EXECUTED
80068e8: e0 00 00 06 bi 8006900 <IMFS_fifo_close+0x74> <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
80068ec: 4c 20 00 05 bge r1,r0,8006900 <IMFS_fifo_close+0x74> <== NOT EXECUTED
80068f0: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED
80068f4: f8 00 11 a2 calli 800af7c <__errno> <== NOT EXECUTED
80068f8: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
80068fc: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
}
8006900: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8006904: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8006908: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
800690c: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
8006910: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
8006914: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
8006918: c3 a0 00 00 ret <== NOT EXECUTED
08006728 <IMFS_fifo_ioctl>:
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
8006728: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
800672c: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
8006730: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
int err;
if (command == FIONBIO) {
8006734: 78 04 80 04 mvhi r4,0x8004 <== NOT EXECUTED
8006738: 38 84 66 7e ori r4,r4,0x667e <== NOT EXECUTED
800673c: 5c 44 00 0e bne r2,r4,8006774 <IMFS_fifo_ioctl+0x4c> <== NOT EXECUTED
if (buffer == NULL)
8006740: 34 0b ff f2 mvi r11,-14 <== NOT EXECUTED
8006744: 44 60 00 12 be r3,r0,800678c <IMFS_fifo_ioctl+0x64> <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
8006748: 28 6b 00 00 lw r11,(r3+0) <== NOT EXECUTED
800674c: 28 22 00 18 lw r2,(r1+24) <== NOT EXECUTED
8006750: 45 60 00 05 be r11,r0,8006764 <IMFS_fifo_ioctl+0x3c> <== NOT EXECUTED
iop->flags |= LIBIO_FLAGS_NO_DELAY;
8006754: 38 42 00 01 ori r2,r2,0x1 <== NOT EXECUTED
8006758: 58 22 00 18 sw (r1+24),r2 <== NOT EXECUTED
800675c: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED
8006760: e0 00 00 0f bi 800679c <IMFS_fifo_ioctl+0x74> <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
8006764: 34 03 ff fe mvi r3,-2 <== NOT EXECUTED
8006768: a0 43 10 00 and r2,r2,r3 <== NOT EXECUTED
800676c: 58 22 00 18 sw (r1+24),r2 <== NOT EXECUTED
8006770: e0 00 00 0b bi 800679c <IMFS_fifo_ioctl+0x74> <== NOT EXECUTED
return 0;
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
8006774: 28 25 00 3c lw r5,(r1+60) <== NOT EXECUTED
8006778: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
800677c: 28 a1 00 50 lw r1,(r5+80) <== NOT EXECUTED
8006780: f8 00 0b 28 calli 8009420 <pipe_ioctl> <== NOT EXECUTED
8006784: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
8006788: 4c 20 00 05 bge r1,r0,800679c <IMFS_fifo_ioctl+0x74> <== NOT EXECUTED
800678c: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED
8006790: f8 00 11 fb calli 800af7c <__errno> <== NOT EXECUTED
8006794: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
8006798: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
}
800679c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80067a0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80067a4: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
80067a8: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
80067ac: c3 a0 00 00 ret <== NOT EXECUTED
080066bc <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
80066bc: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
80066c0: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
80066c4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
80066c8: b8 20 28 00 mv r5,r1 <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
80066cc: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED
80066d0: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
80066d4: b8 80 18 00 mv r3,r4 <== NOT EXECUTED
80066d8: 28 21 00 50 lw r1,(r1+80) <== NOT EXECUTED
80066dc: b8 a0 20 00 mv r4,r5 <== NOT EXECUTED
80066e0: f8 00 0b 33 calli 80093ac <pipe_lseek> <== NOT EXECUTED
80066e4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
80066e8: 4c 20 00 07 bge r1,r0,8006704 <IMFS_fifo_lseek+0x48> <== NOT EXECUTED
80066ec: f8 00 12 24 calli 800af7c <__errno> <== NOT EXECUTED
80066f0: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED
80066f4: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED
80066f8: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
80066fc: b8 60 58 00 mv r11,r3 <== NOT EXECUTED
8006700: e0 00 00 04 bi 8006710 <IMFS_fifo_lseek+0x54> <== NOT EXECUTED
8006704: 34 02 00 1f mvi r2,31 <== NOT EXECUTED
8006708: fb ff e7 0a calli 8000330 <__ashrsi3> <== NOT EXECUTED
800670c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
}
8006710: b8 60 08 00 mv r1,r3 <== NOT EXECUTED
8006714: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8006718: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800671c: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8006720: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
8006724: c3 a0 00 00 ret <== NOT EXECUTED
0800691c <IMFS_fifo_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
800691c: 37 9c ff f8 addi sp,sp,-8
8006920: 5b 8b 00 08 sw (sp+8),r11
8006924: 5b 9d 00 04 sw (sp+4),ra
8006928: b8 20 10 00 mv r2,r1
IMFS_jnode_t *jnode = iop->file_info;
int err = fifo_open(&JNODE2PIPE(jnode), iop);
800692c: 28 21 00 3c lw r1,(r1+60)
8006930: 34 21 00 50 addi r1,r1,80
8006934: f8 00 0c 13 calli 8009980 <fifo_open>
8006938: b8 20 58 00 mv r11,r1
IMFS_FIFO_RETURN(err);
800693c: 4c 20 00 05 bge r1,r0,8006950 <IMFS_fifo_open+0x34> <== NEVER TAKEN
8006940: c8 0b 58 00 sub r11,r0,r11
8006944: f8 00 11 8e calli 800af7c <__errno>
8006948: 58 2b 00 00 sw (r1+0),r11
800694c: 34 0b ff ff mvi r11,-1
}
8006950: b9 60 08 00 mv r1,r11
8006954: 2b 9d 00 04 lw ra,(sp+4)
8006958: 2b 8b 00 08 lw r11,(sp+8)
800695c: 37 9c 00 08 addi sp,sp,8
8006960: c3 a0 00 00 ret
08006820 <IMFS_fifo_read>:
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
8006820: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED
8006824: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED
8006828: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED
800682c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
8006830: 28 2c 00 3c lw r12,(r1+60) <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
8006834: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
8006838: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED
800683c: f8 00 0b 8e calli 8009674 <pipe_read> <== NOT EXECUTED
8006840: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if (err > 0)
8006844: 4c 01 00 07 bge r0,r1,8006860 <IMFS_fifo_read+0x40> <== NOT EXECUTED
IMFS_update_atime(jnode);
8006848: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED
800684c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8006850: f8 00 02 81 calli 8007254 <gettimeofday> <== NOT EXECUTED
8006854: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED
8006858: 59 81 00 40 sw (r12+64),r1 <== NOT EXECUTED
800685c: e0 00 00 06 bi 8006874 <IMFS_fifo_read+0x54> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
8006860: 44 20 00 05 be r1,r0,8006874 <IMFS_fifo_read+0x54> <== NOT EXECUTED
8006864: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED
8006868: f8 00 11 c5 calli 800af7c <__errno> <== NOT EXECUTED
800686c: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
8006870: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
}
8006874: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8006878: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800687c: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8006880: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8006884: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
8006888: c3 a0 00 00 ret <== NOT EXECUTED
080067b0 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
80067b0: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED
80067b4: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED
80067b8: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED
80067bc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
80067c0: 28 2c 00 3c lw r12,(r1+60) <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
80067c4: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
80067c8: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED
80067cc: f8 00 0b 35 calli 80094a0 <pipe_write> <== NOT EXECUTED
80067d0: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if (err > 0) {
80067d4: 4c 01 00 08 bge r0,r1,80067f4 <IMFS_fifo_write+0x44> <== NOT EXECUTED
IMFS_mtime_ctime_update(jnode);
80067d8: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED
80067dc: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
80067e0: f8 00 02 9d calli 8007254 <gettimeofday> <== NOT EXECUTED
80067e4: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED
80067e8: 59 81 00 48 sw (r12+72),r1 <== NOT EXECUTED
80067ec: 59 81 00 44 sw (r12+68),r1 <== NOT EXECUTED
80067f0: e0 00 00 06 bi 8006808 <IMFS_fifo_write+0x58> <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
80067f4: 44 20 00 05 be r1,r0,8006808 <IMFS_fifo_write+0x58> <== NOT EXECUTED
80067f8: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED
80067fc: f8 00 11 e0 calli 800af7c <__errno> <== NOT EXECUTED
8006800: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
8006804: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
}
8006808: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800680c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8006810: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8006814: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8006818: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
800681c: c3 a0 00 00 ret <== NOT EXECUTED
08006964 <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
8006964: 37 9c ff f0 addi sp,sp,-16
8006968: 5b 8b 00 10 sw (sp+16),r11
800696c: 5b 8c 00 0c sw (sp+12),r12
8006970: 5b 8d 00 08 sw (sp+8),r13
8006974: 5b 9d 00 04 sw (sp+4),ra
8006978: b8 20 58 00 mv r11,r1
800697c: b8 40 60 00 mv r12,r2
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
8006980: 5c 20 00 09 bne r1,r0,80069a4 <IMFS_find_match_in_dir+0x40><== ALWAYS TAKEN
8006984: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8006988: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED
800698c: 78 04 08 01 mvhi r4,0x801 <== NOT EXECUTED
8006990: 38 21 a5 b0 ori r1,r1,0xa5b0 <== NOT EXECUTED
8006994: 38 63 a6 10 ori r3,r3,0xa610 <== NOT EXECUTED
8006998: 38 84 a5 fc ori r4,r4,0xa5fc <== NOT EXECUTED
800699c: 34 02 00 2a mvi r2,42 <== NOT EXECUTED
80069a0: f8 00 01 4d calli 8006ed4 <__assert_func> <== NOT EXECUTED
if ( !name )
80069a4: 44 40 00 16 be r2,r0,80069fc <IMFS_find_match_in_dir+0x98> <== NEVER TAKEN
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
80069a8: 78 02 08 01 mvhi r2,0x801
80069ac: 38 42 a6 08 ori r2,r2,0xa608
80069b0: b9 80 08 00 mv r1,r12
80069b4: f8 00 15 f2 calli 800c17c <strcmp>
80069b8: 44 20 00 12 be r1,r0,8006a00 <IMFS_find_match_in_dir+0x9c> <== NEVER TAKEN
return directory;
if ( !strcmp( name, dotdotname ) )
80069bc: 78 02 08 01 mvhi r2,0x801
80069c0: 38 42 a6 0c ori r2,r2,0xa60c
80069c4: b9 80 08 00 mv r1,r12
80069c8: f8 00 15 ed calli 800c17c <strcmp>
80069cc: 5c 20 00 03 bne r1,r0,80069d8 <IMFS_find_match_in_dir+0x74><== ALWAYS TAKEN
return directory->Parent;
80069d0: 29 6b 00 08 lw r11,(r11+8) <== NOT EXECUTED
80069d4: e0 00 00 0b bi 8006a00 <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;
80069d8: 35 6d 00 54 addi r13,r11,84
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
80069dc: 29 6b 00 50 lw r11,(r11+80)
80069e0: e0 00 00 06 bi 80069f8 <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 ) )
80069e4: b9 80 08 00 mv r1,r12
80069e8: 35 62 00 0c addi r2,r11,12
80069ec: f8 00 15 e4 calli 800c17c <strcmp>
80069f0: 44 20 00 04 be r1,r0,8006a00 <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 ) {
80069f4: 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;
80069f8: 5d 6d ff fb bne r11,r13,80069e4 <IMFS_find_match_in_dir+0x80>
80069fc: 34 0b 00 00 mvi r11,0
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
8006a00: b9 60 08 00 mv r1,r11
8006a04: 2b 9d 00 04 lw ra,(sp+4)
8006a08: 2b 8b 00 10 lw r11,(sp+16)
8006a0c: 2b 8c 00 0c lw r12,(sp+12)
8006a10: 2b 8d 00 08 lw r13,(sp+8)
8006a14: 37 9c 00 10 addi sp,sp,16
8006a18: c3 a0 00 00 ret
0800c9e8 <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
)
{
800c9e8: 37 9c ff d8 addi sp,sp,-40
800c9ec: 5b 8b 00 14 sw (sp+20),r11
800c9f0: 5b 8c 00 10 sw (sp+16),r12
800c9f4: 5b 8d 00 0c sw (sp+12),r13
800c9f8: 5b 8e 00 08 sw (sp+8),r14
800c9fc: 5b 9d 00 04 sw (sp+4),ra
800ca00: 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;
800ca04: 37 8c 00 18 addi r12,sp,24
800ca08: 35 a2 00 1c addi r2,r13,28
800ca0c: b9 80 08 00 mv r1,r12
800ca10: 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;
800ca14: 29 ab 00 1c lw r11,(r13+28)
loc = temp_mt_entry->mt_fs_root;
800ca18: f8 00 15 bf calli 8012114 <memcpy>
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
800ca1c: 34 01 00 00 mvi r1,0
800ca20: 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 ) {
800ca24: 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 );
800ca28: 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;
800ca2c: 5b 8b 00 18 sw (sp+24),r11
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
800ca30: 29 6e 00 08 lw r14,(r11+8)
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
800ca34: fb ff fc f5 calli 800be08 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
800ca38: 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;
800ca3c: 35 61 00 54 addi r1,r11,84
800ca40: 5c 4d 00 03 bne r2,r13,800ca4c <IMFS_fsunmount+0x64>
800ca44: 29 62 00 50 lw r2,(r11+80)
800ca48: 5c 41 00 06 bne r2,r1,800ca60 <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 );
800ca4c: 34 01 00 00 mvi r1,0
800ca50: b9 80 10 00 mv r2,r12
800ca54: fb ff d6 3a calli 800233c <IMFS_unlink>
if (result != 0)
800ca58: 5c 20 00 0b bne r1,r0,800ca84 <IMFS_fsunmount+0x9c> <== NEVER TAKEN
800ca5c: b9 c0 58 00 mv r11,r14
return -1;
jnode = next;
}
if ( jnode != NULL ) {
800ca60: 45 60 00 0b be r11,r0,800ca8c <IMFS_fsunmount+0xa4>
if ( jnode->type == IMFS_DIRECTORY ) {
800ca64: 29 61 00 4c lw r1,(r11+76)
800ca68: 5c 2d ff f0 bne r1,r13,800ca28 <IMFS_fsunmount+0x40> <== NEVER TAKEN
800ca6c: 29 61 00 50 lw r1,(r11+80)
800ca70: 35 62 00 54 addi r2,r11,84
800ca74: 44 22 ff ed be r1,r2,800ca28 <IMFS_fsunmount+0x40>
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
800ca78: b8 20 58 00 mv r11,r1
}
}
} while (jnode != NULL);
800ca7c: 5c 20 ff eb bne r1,r0,800ca28 <IMFS_fsunmount+0x40> <== ALWAYS TAKEN
800ca80: e0 00 00 03 bi 800ca8c <IMFS_fsunmount+0xa4> <== NOT EXECUTED
800ca84: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
800ca88: e0 00 00 02 bi 800ca90 <IMFS_fsunmount+0xa8> <== NOT EXECUTED
800ca8c: 34 01 00 00 mvi r1,0
return 0;
}
800ca90: 2b 9d 00 04 lw ra,(sp+4)
800ca94: 2b 8b 00 14 lw r11,(sp+20)
800ca98: 2b 8c 00 10 lw r12,(sp+16)
800ca9c: 2b 8d 00 0c lw r13,(sp+12)
800caa0: 2b 8e 00 08 lw r14,(sp+8)
800caa4: 37 9c 00 28 addi sp,sp,40
800caa8: c3 a0 00 00 ret
08006a1c <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
8006a1c: 37 9c ff f4 addi sp,sp,-12
8006a20: 5b 8b 00 0c sw (sp+12),r11
8006a24: 5b 8c 00 08 sw (sp+8),r12
8006a28: 5b 9d 00 04 sw (sp+4),ra
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
8006a2c: 34 05 00 00 mvi r5,0
const char *path,
int pathlen,
char *token,
int *token_len
)
{
8006a30: b8 60 60 00 mv r12,r3
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
8006a34: 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 )
8006a38: 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) ) {
8006a3c: e0 00 00 08 bi 8006a5c <IMFS_get_token+0x40>
token[i] = c;
8006a40: 31 06 00 00 sb (r8+0),r6
if ( i == IMFS_NAME_MAX )
8006a44: 5c a3 00 03 bne r5,r3,8006a50 <IMFS_get_token+0x34>
8006a48: 34 0b 00 04 mvi r11,4
8006a4c: e0 00 00 2d bi 8006b00 <IMFS_get_token+0xe4>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
8006a50: 34 a5 00 01 addi r5,r5,1
8006a54: b4 25 30 00 add r6,r1,r5
8006a58: 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) ) {
8006a5c: 7c cb 00 5c cmpnei r11,r6,92
8006a60: 7c c9 00 2f cmpnei r9,r6,47
8006a64: e8 45 50 00 cmpg r10,r2,r5
8006a68: 7c c7 00 00 cmpnei r7,r6,0
8006a6c: a1 69 48 00 and r9,r11,r9
token[i] = c;
8006a70: 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) ) {
8006a74: a1 47 38 00 and r7,r10,r7
8006a78: 45 20 00 02 be r9,r0,8006a80 <IMFS_get_token+0x64>
8006a7c: 5c e0 ff f1 bne r7,r0,8006a40 <IMFS_get_token+0x24>
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
8006a80: 5c a0 00 0a bne r5,r0,8006aa8 <IMFS_get_token+0x8c>
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
8006a84: 7c c1 00 00 cmpnei r1,r6,0
8006a88: 7c 42 00 00 cmpnei r2,r2,0
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
token[i] = c;
8006a8c: 31 86 00 00 sb (r12+0),r6
if ( (token[i] != '\0') && pathlen ) {
8006a90: a0 22 10 00 and r2,r1,r2
8006a94: b8 a0 58 00 mv r11,r5
8006a98: 44 45 00 0a be r2,r5,8006ac0 <IMFS_get_token+0xa4>
8006a9c: 34 05 00 01 mvi r5,1
8006aa0: b8 a0 58 00 mv r11,r5
8006aa4: e0 00 00 07 bi 8006ac0 <IMFS_get_token+0xa4>
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
8006aa8: b5 85 08 00 add r1,r12,r5
8006aac: 40 22 ff ff lbu r2,(r1+-1)
8006ab0: 34 0b 00 03 mvi r11,3
8006ab4: 44 40 00 03 be r2,r0,8006ac0 <IMFS_get_token+0xa4> <== NEVER TAKEN
token[i] = '\0';
8006ab8: 34 02 00 00 mvi r2,0
8006abc: 30 22 00 00 sb (r1+0),r2
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
8006ac0: 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 ) {
8006ac4: 34 01 00 03 mvi r1,3
8006ac8: 5d 61 00 0e bne r11,r1,8006b00 <IMFS_get_token+0xe4>
if ( strcmp( token, "..") == 0 )
8006acc: 78 02 08 01 mvhi r2,0x801
8006ad0: 38 42 a6 28 ori r2,r2,0xa628
8006ad4: b9 80 08 00 mv r1,r12
8006ad8: f8 00 15 a9 calli 800c17c <strcmp>
8006adc: 5c 20 00 03 bne r1,r0,8006ae8 <IMFS_get_token+0xcc>
8006ae0: 34 0b 00 02 mvi r11,2
8006ae4: e0 00 00 07 bi 8006b00 <IMFS_get_token+0xe4>
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
8006ae8: 78 02 08 01 mvhi r2,0x801
8006aec: b9 80 08 00 mv r1,r12
8006af0: 38 42 a6 2c ori r2,r2,0xa62c
8006af4: f8 00 15 a2 calli 800c17c <strcmp>
8006af8: 5c 20 00 02 bne r1,r0,8006b00 <IMFS_get_token+0xe4>
8006afc: 34 0b 00 01 mvi r11,1
type = IMFS_CURRENT_DIR;
}
return type;
}
8006b00: b9 60 08 00 mv r1,r11
8006b04: 2b 9d 00 04 lw ra,(sp+4)
8006b08: 2b 8b 00 0c lw r11,(sp+12)
8006b0c: 2b 8c 00 08 lw r12,(sp+8)
8006b10: 37 9c 00 0c addi sp,sp,12
8006b14: c3 a0 00 00 ret
08006b18 <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
)
{
8006b18: 37 9c ff ec addi sp,sp,-20
8006b1c: 5b 8b 00 14 sw (sp+20),r11
8006b20: 5b 8c 00 10 sw (sp+16),r12
8006b24: 5b 8d 00 0c sw (sp+12),r13
8006b28: 5b 8e 00 08 sw (sp+8),r14
8006b2c: 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,
8006b30: 78 05 08 01 mvhi r5,0x801
8006b34: 38 a5 c0 14 ori r5,r5,0xc014
8006b38: 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
)
{
8006b3c: b8 20 58 00 mv r11,r1
8006b40: b8 40 70 00 mv r14,r2
8006b44: b8 60 68 00 mv r13,r3
8006b48: 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,
8006b4c: 34 05 00 00 mvi r5,0
8006b50: 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) {
8006b54: 34 02 00 06 mvi r2,6
8006b58: 34 a5 00 01 addi r5,r5,1
8006b5c: 44 26 00 04 be r1,r6,8006b6c <IMFS_initialize_support+0x54>
8006b60: b4 21 08 00 add r1,r1,r1
8006b64: 5c a2 ff fd bne r5,r2,8006b58 <IMFS_initialize_support+0x40><== ALWAYS TAKEN
8006b68: 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)
8006b6c: 78 05 08 01 mvhi r5,0x801
8006b70: 38 a5 c6 24 ori r5,r5,0xc624
8006b74: 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();
8006b78: f8 00 0c 86 calli 8009d90 <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;
8006b7c: 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();
8006b80: 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;
8006b84: 38 42 a8 40 ori r2,r2,0xa840
8006b88: 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;
8006b8c: 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;
8006b90: 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;
8006b94: 35 61 00 38 addi r1,r11,56
8006b98: f8 00 13 9f calli 800ba14 <memcpy>
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
8006b9c: 34 02 00 10 mvi r2,16
8006ba0: 34 01 00 01 mvi r1,1
8006ba4: f8 00 00 df calli 8006f20 <calloc>
8006ba8: b8 20 10 00 mv r2,r1
8006bac: 29 61 00 1c lw r1,(r11+28)
if ( !fs_info ) {
8006bb0: 5c 40 00 07 bne r2,r0,8006bcc <IMFS_initialize_support+0xb4><== ALWAYS TAKEN
free(temp_mt_entry->mt_fs_root.node_access);
8006bb4: f8 00 01 33 calli 8007080 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
8006bb8: f8 00 10 f1 calli 800af7c <__errno> <== NOT EXECUTED
8006bbc: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
8006bc0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8006bc4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8006bc8: e0 00 00 0f bi 8006c04 <IMFS_initialize_support+0xec> <== NOT EXECUTED
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
8006bcc: 78 05 08 01 mvhi r5,0x801
8006bd0: 38 a5 c6 28 ori r5,r5,0xc628
8006bd4: 28 a6 00 00 lw r6,(r5+0)
fs_info->ino_count = 1;
8006bd8: 34 04 00 01 mvi r4,1
8006bdc: 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;
8006be0: 58 24 00 38 sw (r1+56),r4
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
8006be4: b4 c4 08 00 add r1,r6,r4
8006be8: 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;
8006bec: 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;
8006bf0: 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;
8006bf4: 58 4d 00 08 sw (r2+8),r13
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
8006bf8: 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();
8006bfc: f8 00 09 ee calli 80093b4 <rtems_pipe_initialize>
8006c00: 34 01 00 00 mvi r1,0
return 0;
}
8006c04: 2b 9d 00 04 lw ra,(sp+4)
8006c08: 2b 8b 00 14 lw r11,(sp+20)
8006c0c: 2b 8c 00 10 lw r12,(sp+16)
8006c10: 2b 8d 00 0c lw r13,(sp+12)
8006c14: 2b 8e 00 08 lw r14,(sp+8)
8006c18: 37 9c 00 14 addi sp,sp,20
8006c1c: c3 a0 00 00 ret
08001fb4 <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 */
)
{
8001fb4: 37 9c ff a8 addi sp,sp,-88
8001fb8: 5b 8b 00 10 sw (sp+16),r11
8001fbc: 5b 8c 00 0c sw (sp+12),r12
8001fc0: 5b 8d 00 08 sw (sp+8),r13
8001fc4: 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;
8001fc8: 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 */
)
{
8001fcc: 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 )
8001fd0: 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;
8001fd4: 5b 84 00 38 sw (sp+56),r4
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
8001fd8: 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 */
)
{
8001fdc: 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 )
8001fe0: 50 41 00 04 bgeu r2,r1,8001ff0 <IMFS_link+0x3c>
rtems_set_errno_and_return_minus_one( EMLINK );
8001fe4: f8 00 3d a6 calli 801167c <__errno>
8001fe8: 34 02 00 1f mvi r2,31
8001fec: e0 00 00 12 bi 8002034 <IMFS_link+0x80>
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, strlen( token ), new_name, &i );
8001ff0: b8 60 08 00 mv r1,r3
8001ff4: f8 00 42 53 calli 8012940 <strlen>
8001ff8: 37 8b 00 14 addi r11,sp,20
8001ffc: b8 20 10 00 mv r2,r1
8002000: b9 60 18 00 mv r3,r11
8002004: 37 84 00 58 addi r4,sp,88
8002008: b9 80 08 00 mv r1,r12
800200c: f8 00 2a d6 calli 800cb64 <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(
8002010: b9 a0 08 00 mv r1,r13
8002014: b9 60 18 00 mv r3,r11
8002018: 34 02 00 03 mvi r2,3
800201c: 38 04 a1 ff mvu r4,0xa1ff
8002020: 37 85 00 38 addi r5,sp,56
8002024: f8 00 27 24 calli 800bcb4 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
8002028: 5c 20 00 06 bne r1,r0,8002040 <IMFS_link+0x8c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
800202c: f8 00 3d 94 calli 801167c <__errno> <== NOT EXECUTED
8002030: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
8002034: 58 22 00 00 sw (r1+0),r2
8002038: 34 01 ff ff mvi r1,-1
800203c: e0 00 00 0c bi 800206c <IMFS_link+0xb8>
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
8002040: 2b 83 00 38 lw r3,(sp+56)
IMFS_update_ctime( info.hard_link.link_node );
8002044: 34 02 00 00 mvi r2,0
8002048: 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++;
800204c: 2c 64 00 34 lhu r4,(r3+52)
8002050: 34 84 00 01 addi r4,r4,1
8002054: 0c 64 00 34 sh (r3+52),r4
IMFS_update_ctime( info.hard_link.link_node );
8002058: f8 00 02 9c calli 8002ac8 <gettimeofday>
800205c: 2b 82 00 38 lw r2,(sp+56)
8002060: 2b 83 00 50 lw r3,(sp+80)
8002064: 34 01 00 00 mvi r1,0
8002068: 58 43 00 48 sw (r2+72),r3
return 0;
}
800206c: 2b 9d 00 04 lw ra,(sp+4)
8002070: 2b 8b 00 10 lw r11,(sp+16)
8002074: 2b 8c 00 0c lw r12,(sp+12)
8002078: 2b 8d 00 08 lw r13,(sp+8)
800207c: 37 9c 00 58 addi sp,sp,88
8002080: c3 a0 00 00 ret
0800fe58 <IMFS_memfile_addblock>:
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
800fe58: 37 9c ff f4 addi sp,sp,-12
800fe5c: 5b 8b 00 0c sw (sp+12),r11
800fe60: 5b 8c 00 08 sw (sp+8),r12
800fe64: 5b 9d 00 04 sw (sp+4),ra
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
800fe68: 5c 20 00 09 bne r1,r0,800fe8c <IMFS_memfile_addblock+0x34> <== ALWAYS TAKEN
800fe6c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800fe70: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
800fe74: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
800fe78: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
800fe7c: 38 63 1e c0 ori r3,r3,0x1ec0 <== NOT EXECUTED
800fe80: 38 84 1d 58 ori r4,r4,0x1d58 <== NOT EXECUTED
800fe84: 34 02 01 69 mvi r2,361 <== NOT EXECUTED
800fe88: e0 00 00 0b bi 800feb4 <IMFS_memfile_addblock+0x5c> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
800fe8c: 28 24 00 4c lw r4,(r1+76)
800fe90: 34 03 00 05 mvi r3,5
800fe94: 44 83 00 09 be r4,r3,800feb8 <IMFS_memfile_addblock+0x60> <== ALWAYS TAKEN
800fe98: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800fe9c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
800fea0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
800fea4: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
800fea8: 38 63 1e c0 ori r3,r3,0x1ec0 <== NOT EXECUTED
800feac: 38 84 1d 64 ori r4,r4,0x1d64 <== NOT EXECUTED
800feb0: 34 02 01 6d mvi r2,365 <== NOT EXECUTED
800feb4: fb ff f3 da calli 800ce1c <__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 );
800feb8: 34 03 00 01 mvi r3,1
800febc: fb ff fe 45 calli 800f7d0 <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
800fec0: 28 2b 00 00 lw r11,(r1+0)
800fec4: 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 );
800fec8: b8 20 60 00 mv r12,r1
if ( *block_entry_ptr )
800fecc: 5d 62 00 06 bne r11,r2,800fee4 <IMFS_memfile_addblock+0x8c>
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
800fed0: fb ff fe 30 calli 800f790 <memfile_alloc_block>
if ( !memory )
800fed4: 34 02 00 01 mvi r2,1
800fed8: 44 2b 00 03 be r1,r11,800fee4 <IMFS_memfile_addblock+0x8c> <== NEVER TAKEN
return 1;
*block_entry_ptr = memory;
800fedc: 59 81 00 00 sw (r12+0),r1
800fee0: b9 60 10 00 mv r2,r11
return 0;
}
800fee4: b8 40 08 00 mv r1,r2
800fee8: 2b 9d 00 04 lw ra,(sp+4)
800feec: 2b 8b 00 0c lw r11,(sp+12)
800fef0: 2b 8c 00 08 lw r12,(sp+8)
800fef4: 37 9c 00 0c addi sp,sp,12
800fef8: c3 a0 00 00 ret
0800fefc <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
800fefc: 37 9c ff e0 addi sp,sp,-32
800ff00: 5b 8b 00 20 sw (sp+32),r11
800ff04: 5b 8c 00 1c sw (sp+28),r12
800ff08: 5b 8d 00 18 sw (sp+24),r13
800ff0c: 5b 8e 00 14 sw (sp+20),r14
800ff10: 5b 8f 00 10 sw (sp+16),r15
800ff14: 5b 90 00 0c sw (sp+12),r16
800ff18: 5b 91 00 08 sw (sp+8),r17
800ff1c: 5b 9d 00 04 sw (sp+4),ra
800ff20: b8 20 58 00 mv r11,r1
800ff24: b8 40 68 00 mv r13,r2
/*
* Perform internal consistency checks
*/
assert( the_jnode );
800ff28: 5c 20 00 09 bne r1,r0,800ff4c <IMFS_memfile_extend+0x50> <== ALWAYS TAKEN
800ff2c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800ff30: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
800ff34: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
800ff38: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
800ff3c: 38 63 1e d8 ori r3,r3,0x1ed8 <== NOT EXECUTED
800ff40: 38 84 1d 58 ori r4,r4,0x1d58 <== NOT EXECUTED
800ff44: 34 02 01 31 mvi r2,305 <== NOT EXECUTED
800ff48: e0 00 00 0b bi 800ff74 <IMFS_memfile_extend+0x78> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
800ff4c: 28 22 00 4c lw r2,(r1+76)
800ff50: 34 01 00 05 mvi r1,5
800ff54: 44 41 00 09 be r2,r1,800ff78 <IMFS_memfile_extend+0x7c> <== ALWAYS TAKEN
800ff58: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800ff5c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
800ff60: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
800ff64: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
800ff68: 38 63 1e d8 ori r3,r3,0x1ed8 <== NOT EXECUTED
800ff6c: 38 84 1d 64 ori r4,r4,0x1d64 <== NOT EXECUTED
800ff70: 34 02 01 35 mvi r2,309 <== NOT EXECUTED
800ff74: fb ff f3 aa calli 800ce1c <__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 )
800ff78: 78 01 08 02 mvhi r1,0x802
800ff7c: 38 21 36 4c ori r1,r1,0x364c
800ff80: 28 2c 00 00 lw r12,(r1+0)
800ff84: 34 02 00 02 mvi r2,2
800ff88: b9 80 08 00 mv r1,r12
800ff8c: fb ff c3 38 calli 8000c6c <__lshrsi3>
800ff90: b8 20 10 00 mv r2,r1
800ff94: b8 20 70 00 mv r14,r1
800ff98: 34 21 00 01 addi r1,r1,1
800ff9c: f8 00 41 80 calli 802059c <__mulsi3>
800ffa0: b9 c0 10 00 mv r2,r14
800ffa4: 34 21 00 01 addi r1,r1,1
800ffa8: f8 00 41 7d calli 802059c <__mulsi3>
800ffac: 34 21 ff ff addi r1,r1,-1
800ffb0: b9 80 10 00 mv r2,r12
800ffb4: f8 00 41 7a calli 802059c <__mulsi3>
800ffb8: 54 2d 00 04 bgu r1,r13,800ffc8 <IMFS_memfile_extend+0xcc> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
800ffbc: f8 00 05 b0 calli 801167c <__errno> <== NOT EXECUTED
800ffc0: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
800ffc4: e0 00 00 26 bi 801005c <IMFS_memfile_extend+0x160> <== NOT EXECUTED
if ( new_length <= the_jnode->info.file.size )
800ffc8: b9 a0 08 00 mv r1,r13
800ffcc: 34 02 00 1f mvi r2,31
800ffd0: fb ff c3 4f calli 8000d0c <__ashrsi3>
800ffd4: 29 6f 00 50 lw r15,(r11+80)
800ffd8: b8 20 70 00 mv r14,r1
800ffdc: 29 70 00 54 lw r16,(r11+84)
800ffe0: 48 2f 00 04 bg r1,r15,800fff0 <IMFS_memfile_extend+0xf4> <== NEVER TAKEN
800ffe4: 5c 2f 00 25 bne r1,r15,8010078 <IMFS_memfile_extend+0x17c> <== NEVER TAKEN
800ffe8: 55 b0 00 02 bgu r13,r16,800fff0 <IMFS_memfile_extend+0xf4>
800ffec: e0 00 00 23 bi 8010078 <IMFS_memfile_extend+0x17c>
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
800fff0: b9 80 10 00 mv r2,r12
800fff4: b9 a0 08 00 mv r1,r13
800fff8: f8 00 41 89 calli 802061c <__divsi3>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
800fffc: 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;
8010000: b8 20 88 00 mv r17,r1
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
8010004: b9 80 08 00 mv r1,r12
8010008: fb ff c3 41 calli 8000d0c <__ashrsi3>
801000c: b8 20 18 00 mv r3,r1
8010010: b9 80 20 00 mv r4,r12
8010014: b9 e0 08 00 mv r1,r15
8010018: ba 00 10 00 mv r2,r16
801001c: f8 00 2c 22 calli 801b0a4 <__divdi3>
8010020: b8 40 78 00 mv r15,r2
8010024: b8 40 60 00 mv r12,r2
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
8010028: e0 00 00 11 bi 801006c <IMFS_memfile_extend+0x170>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
801002c: b9 60 08 00 mv r1,r11
8010030: b9 80 10 00 mv r2,r12
8010034: fb ff ff 89 calli 800fe58 <IMFS_memfile_addblock>
8010038: 44 20 00 0c be r1,r0,8010068 <IMFS_memfile_extend+0x16c> <== ALWAYS TAKEN
801003c: e0 00 00 05 bi 8010050 <IMFS_memfile_extend+0x154> <== NOT EXECUTED
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
8010040: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
8010044: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8010048: fb ff fe bd calli 800fb3c <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-- ) {
801004c: 35 8c ff ff addi r12,r12,-1 <== NOT EXECUTED
8010050: 51 8f ff fc bgeu r12,r15,8010040 <IMFS_memfile_extend+0x144><== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
8010054: f8 00 05 8a calli 801167c <__errno> <== NOT EXECUTED
8010058: 34 02 00 1c mvi r2,28 <== NOT EXECUTED
801005c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8010060: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8010064: e0 00 00 06 bi 801007c <IMFS_memfile_extend+0x180> <== NOT EXECUTED
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
8010068: 35 8c 00 01 addi r12,r12,1
801006c: 52 2c ff f0 bgeu r17,r12,801002c <IMFS_memfile_extend+0x130>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
8010070: 59 6d 00 54 sw (r11+84),r13
8010074: 59 6e 00 50 sw (r11+80),r14
8010078: 34 01 00 00 mvi r1,0
return 0;
}
801007c: 2b 9d 00 04 lw ra,(sp+4)
8010080: 2b 8b 00 20 lw r11,(sp+32)
8010084: 2b 8c 00 1c lw r12,(sp+28)
8010088: 2b 8d 00 18 lw r13,(sp+24)
801008c: 2b 8e 00 14 lw r14,(sp+20)
8010090: 2b 8f 00 10 lw r15,(sp+16)
8010094: 2b 90 00 0c lw r16,(sp+12)
8010098: 2b 91 00 08 lw r17,(sp+8)
801009c: 37 9c 00 20 addi sp,sp,32
80100a0: c3 a0 00 00 ret
0800f7d0 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
800f7d0: 37 9c ff e4 addi sp,sp,-28
800f7d4: 5b 8b 00 1c sw (sp+28),r11
800f7d8: 5b 8c 00 18 sw (sp+24),r12
800f7dc: 5b 8d 00 14 sw (sp+20),r13
800f7e0: 5b 8e 00 10 sw (sp+16),r14
800f7e4: 5b 8f 00 0c sw (sp+12),r15
800f7e8: 5b 90 00 08 sw (sp+8),r16
800f7ec: 5b 9d 00 04 sw (sp+4),ra
800f7f0: b8 20 60 00 mv r12,r1
800f7f4: b8 40 68 00 mv r13,r2
800f7f8: b8 60 70 00 mv r14,r3
/*
* Perform internal consistency checks
*/
assert( the_jnode );
800f7fc: 5c 20 00 09 bne r1,r0,800f820 <IMFS_memfile_get_block_pointer+0x50><== ALWAYS TAKEN
800f800: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800f804: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
800f808: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
800f80c: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
800f810: 38 63 1e 28 ori r3,r3,0x1e28 <== NOT EXECUTED
800f814: 38 84 1d 58 ori r4,r4,0x1d58 <== NOT EXECUTED
800f818: 34 02 03 88 mvi r2,904 <== NOT EXECUTED
800f81c: e0 00 00 0b bi 800f848 <IMFS_memfile_get_block_pointer+0x78><== NOT EXECUTED
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
800f820: 28 22 00 4c lw r2,(r1+76)
800f824: 34 01 00 05 mvi r1,5
800f828: 44 41 00 09 be r2,r1,800f84c <IMFS_memfile_get_block_pointer+0x7c><== ALWAYS TAKEN
800f82c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800f830: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
800f834: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
800f838: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
800f83c: 38 63 1e 28 ori r3,r3,0x1e28 <== NOT EXECUTED
800f840: 38 84 1d 64 ori r4,r4,0x1d64 <== NOT EXECUTED
800f844: 34 02 03 8c mvi r2,908 <== NOT EXECUTED
800f848: fb ff f5 75 calli 800ce1c <__assert_func> <== NOT EXECUTED
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
800f84c: 78 01 08 02 mvhi r1,0x802
800f850: 38 21 36 4c ori r1,r1,0x364c
800f854: 28 21 00 00 lw r1,(r1+0)
800f858: 34 02 00 02 mvi r2,2
800f85c: fb ff c5 04 calli 8000c6c <__lshrsi3>
800f860: b8 20 58 00 mv r11,r1
800f864: 34 21 ff ff addi r1,r1,-1
800f868: 55 a1 00 0f bgu r13,r1,800f8a4 <IMFS_memfile_get_block_pointer+0xd4><== NEVER TAKEN
#if 0
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
800f86c: 29 8b 00 58 lw r11,(r12+88)
if ( malloc_it ) {
800f870: 45 c0 00 0a be r14,r0,800f898 <IMFS_memfile_get_block_pointer+0xc8>
if ( !p ) {
800f874: 5d 60 00 04 bne r11,r0,800f884 <IMFS_memfile_get_block_pointer+0xb4>
p = memfile_alloc_block();
800f878: fb ff ff c6 calli 800f790 <memfile_alloc_block>
if ( !p )
800f87c: 44 2b 00 7d be r1,r11,800fa70 <IMFS_memfile_get_block_pointer+0x2a0><== NEVER TAKEN
return 0;
info->indirect = p;
800f880: 59 81 00 58 sw (r12+88),r1
}
return &info->indirect[ my_block ];
800f884: 34 02 00 02 mvi r2,2
800f888: b9 a0 08 00 mv r1,r13
800f88c: fb ff c4 d0 calli 8000bcc <__ashlsi3>
800f890: 29 82 00 58 lw r2,(r12+88)
800f894: e0 00 00 75 bi 800fa68 <IMFS_memfile_get_block_pointer+0x298>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
800f898: b9 a0 08 00 mv r1,r13
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
800f89c: 5d 6e 00 60 bne r11,r14,800fa1c <IMFS_memfile_get_block_pointer+0x24c><== ALWAYS TAKEN
800f8a0: e0 00 00 74 bi 800fa70 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
800f8a4: 35 61 00 01 addi r1,r11,1 <== NOT EXECUTED
800f8a8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
800f8ac: f8 00 43 3c calli 802059c <__mulsi3> <== NOT EXECUTED
800f8b0: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
800f8b4: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
800f8b8: 55 a1 00 28 bgu r13,r1,800f958 <IMFS_memfile_get_block_pointer+0x188><== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
800f8bc: c9 ab 68 00 sub r13,r13,r11 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
800f8c0: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
800f8c4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
800f8c8: f8 00 43 c4 calli 80207d8 <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
800f8cc: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
800f8d0: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
800f8d4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
800f8d8: f8 00 43 b0 calli 8020798 <__udivsi3> <== NOT EXECUTED
800f8dc: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
p = info->doubly_indirect;
800f8e0: 29 8b 00 5c lw r11,(r12+92) <== NOT EXECUTED
if ( malloc_it ) {
800f8e4: 45 c0 00 15 be r14,r0,800f938 <IMFS_memfile_get_block_pointer+0x168><== NOT EXECUTED
if ( !p ) {
800f8e8: 5d 60 00 05 bne r11,r0,800f8fc <IMFS_memfile_get_block_pointer+0x12c><== NOT EXECUTED
p = memfile_alloc_block();
800f8ec: fb ff ff a9 calli 800f790 <memfile_alloc_block> <== NOT EXECUTED
800f8f0: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if ( !p )
800f8f4: 44 20 00 5f be r1,r0,800fa70 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
return 0;
info->doubly_indirect = p;
800f8f8: 59 81 00 5c sw (r12+92),r1 <== NOT EXECUTED
}
p1 = (block_p *)p[ doubly ];
800f8fc: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
800f900: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
800f904: fb ff c4 b2 calli 8000bcc <__ashlsi3> <== NOT EXECUTED
800f908: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED
800f90c: 29 6c 00 00 lw r12,(r11+0) <== NOT EXECUTED
if ( !p1 ) {
800f910: 5d 80 00 05 bne r12,r0,800f924 <IMFS_memfile_get_block_pointer+0x154><== NOT EXECUTED
p1 = memfile_alloc_block();
800f914: fb ff ff 9f calli 800f790 <memfile_alloc_block> <== NOT EXECUTED
800f918: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
if ( !p1 )
800f91c: 44 20 00 55 be r1,r0,800fa70 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
return 0;
p[ doubly ] = (block_p) p1;
800f920: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED
}
return (block_p *)&p1[ singly ];
800f924: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
800f928: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
800f92c: fb ff c4 a8 calli 8000bcc <__ashlsi3> <== NOT EXECUTED
800f930: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED
800f934: e0 00 00 50 bi 800fa74 <IMFS_memfile_get_block_pointer+0x2a4><== NOT EXECUTED
}
if ( !p )
800f938: 45 6e 00 4e be r11,r14,800fa70 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
return 0;
p = (block_p *)p[ doubly ];
800f93c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
800f940: fb ff c4 a3 calli 8000bcc <__ashlsi3> <== NOT EXECUTED
800f944: b5 61 08 00 add r1,r11,r1 <== NOT EXECUTED
800f948: 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 ];
800f94c: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
if ( !p )
return 0;
p = (block_p *)p[ doubly ];
if ( !p )
800f950: 5d 60 00 33 bne r11,r0,800fa1c <IMFS_memfile_get_block_pointer+0x24c><== NOT EXECUTED
800f954: e0 00 00 47 bi 800fa70 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
800f958: 35 e1 00 01 addi r1,r15,1 <== NOT EXECUTED
800f95c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
800f960: f8 00 43 0f calli 802059c <__mulsi3> <== NOT EXECUTED
800f964: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
800f968: 55 a1 00 42 bgu r13,r1,800fa70 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
800f96c: c9 af 68 00 sub r13,r13,r15 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
800f970: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
800f974: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
800f978: f8 00 43 98 calli 80207d8 <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
800f97c: 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;
800f980: b8 20 80 00 mv r16,r1 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
800f984: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
800f988: f8 00 43 84 calli 8020798 <__udivsi3> <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
800f98c: 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;
800f990: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
800f994: f8 00 43 81 calli 8020798 <__udivsi3> <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
800f998: 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;
800f99c: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
800f9a0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
800f9a4: f8 00 43 8d calli 80207d8 <__umodsi3> <== NOT EXECUTED
800f9a8: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
p = info->triply_indirect;
800f9ac: 29 8b 00 60 lw r11,(r12+96) <== NOT EXECUTED
if ( malloc_it ) {
800f9b0: 45 c0 00 1f be r14,r0,800fa2c <IMFS_memfile_get_block_pointer+0x25c><== NOT EXECUTED
if ( !p ) {
800f9b4: 5d 60 00 05 bne r11,r0,800f9c8 <IMFS_memfile_get_block_pointer+0x1f8><== NOT EXECUTED
p = memfile_alloc_block();
800f9b8: fb ff ff 76 calli 800f790 <memfile_alloc_block> <== NOT EXECUTED
800f9bc: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if ( !p )
800f9c0: 44 20 00 2c be r1,r0,800fa70 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
return 0;
info->triply_indirect = p;
800f9c4: 59 81 00 60 sw (r12+96),r1 <== NOT EXECUTED
}
p1 = (block_p *) p[ triply ];
800f9c8: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
800f9cc: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
800f9d0: fb ff c4 7f calli 8000bcc <__ashlsi3> <== NOT EXECUTED
800f9d4: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED
800f9d8: 29 6c 00 00 lw r12,(r11+0) <== NOT EXECUTED
if ( !p1 ) {
800f9dc: 5d 80 00 05 bne r12,r0,800f9f0 <IMFS_memfile_get_block_pointer+0x220><== NOT EXECUTED
p1 = memfile_alloc_block();
800f9e0: fb ff ff 6c calli 800f790 <memfile_alloc_block> <== NOT EXECUTED
800f9e4: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
if ( !p1 )
800f9e8: 44 20 00 22 be r1,r0,800fa70 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
return 0;
p[ triply ] = (block_p) p1;
800f9ec: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED
}
p2 = (block_p *)p1[ doubly ];
800f9f0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
800f9f4: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
800f9f8: fb ff c4 75 calli 8000bcc <__ashlsi3> <== NOT EXECUTED
800f9fc: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED
800fa00: 29 8b 00 00 lw r11,(r12+0) <== NOT EXECUTED
if ( !p2 ) {
800fa04: 5d 60 00 05 bne r11,r0,800fa18 <IMFS_memfile_get_block_pointer+0x248><== NOT EXECUTED
p2 = memfile_alloc_block();
800fa08: fb ff ff 62 calli 800f790 <memfile_alloc_block> <== NOT EXECUTED
800fa0c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if ( !p2 )
800fa10: 44 20 00 18 be r1,r0,800fa70 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
return 0;
p1[ doubly ] = (block_p) p2;
800fa14: 59 81 00 00 sw (r12+0),r1 <== NOT EXECUTED
}
return (block_p *)&p2[ singly ];
800fa18: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
800fa1c: 34 02 00 02 mvi r2,2
800fa20: fb ff c4 6b calli 8000bcc <__ashlsi3>
800fa24: b5 61 08 00 add r1,r11,r1
800fa28: e0 00 00 13 bi 800fa74 <IMFS_memfile_get_block_pointer+0x2a4>
}
if ( !p )
800fa2c: 45 6e 00 11 be r11,r14,800fa70 <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 ];
800fa30: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
800fa34: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
800fa38: fb ff c4 65 calli 8000bcc <__ashlsi3> <== NOT EXECUTED
800fa3c: b5 61 08 00 add r1,r11,r1 <== NOT EXECUTED
800fa40: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED
if ( !p1 )
800fa44: 45 60 00 0b be r11,r0,800fa70 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
800fa48: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
800fa4c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
800fa50: fb ff c4 5f calli 8000bcc <__ashlsi3> <== NOT EXECUTED
800fa54: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED
800fa58: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
800fa5c: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
800fa60: fb ff c4 5b calli 8000bcc <__ashlsi3> <== NOT EXECUTED
800fa64: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED
800fa68: b4 41 08 00 add r1,r2,r1
800fa6c: e0 00 00 02 bi 800fa74 <IMFS_memfile_get_block_pointer+0x2a4>
800fa70: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
800fa74: 2b 9d 00 04 lw ra,(sp+4)
800fa78: 2b 8b 00 1c lw r11,(sp+28)
800fa7c: 2b 8c 00 18 lw r12,(sp+24)
800fa80: 2b 8d 00 14 lw r13,(sp+20)
800fa84: 2b 8e 00 10 lw r14,(sp+16)
800fa88: 2b 8f 00 0c lw r15,(sp+12)
800fa8c: 2b 90 00 08 lw r16,(sp+8)
800fa90: 37 9c 00 1c addi sp,sp,28
800fa94: c3 a0 00 00 ret
08010588 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
8010588: 37 9c ff d4 addi sp,sp,-44
801058c: 5b 8b 00 24 sw (sp+36),r11
8010590: 5b 8c 00 20 sw (sp+32),r12
8010594: 5b 8d 00 1c sw (sp+28),r13
8010598: 5b 8e 00 18 sw (sp+24),r14
801059c: 5b 8f 00 14 sw (sp+20),r15
80105a0: 5b 90 00 10 sw (sp+16),r16
80105a4: 5b 91 00 0c sw (sp+12),r17
80105a8: 5b 92 00 08 sw (sp+8),r18
80105ac: 5b 9d 00 04 sw (sp+4),ra
80105b0: b8 20 60 00 mv r12,r1
80105b4: b8 40 68 00 mv r13,r2
80105b8: b8 60 80 00 mv r16,r3
80105bc: b8 80 58 00 mv r11,r4
/*
* Perform internal consistency checks
*/
assert( the_jnode );
80105c0: 5c 20 00 09 bne r1,r0,80105e4 <IMFS_memfile_read+0x5c> <== ALWAYS TAKEN
80105c4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80105c8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80105cc: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
80105d0: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
80105d4: 38 63 1e 5c ori r3,r3,0x1e5c <== NOT EXECUTED
80105d8: 38 84 1d 58 ori r4,r4,0x1d58 <== NOT EXECUTED
80105dc: 34 02 02 4c mvi r2,588 <== NOT EXECUTED
80105e0: e0 00 00 0c bi 8010610 <IMFS_memfile_read+0x88> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
80105e4: 28 21 00 4c lw r1,(r1+76)
80105e8: 34 03 00 01 mvi r3,1
80105ec: 34 22 ff fb addi r2,r1,-5
80105f0: 50 62 00 09 bgeu r3,r2,8010614 <IMFS_memfile_read+0x8c> <== ALWAYS TAKEN
80105f4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80105f8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80105fc: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010600: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
8010604: 38 63 1e 5c ori r3,r3,0x1e5c <== NOT EXECUTED
8010608: 38 84 1d d4 ori r4,r4,0x1dd4 <== NOT EXECUTED
801060c: 34 02 02 51 mvi r2,593 <== NOT EXECUTED
8010610: fb ff f2 03 calli 800ce1c <__assert_func> <== NOT EXECUTED
/*
* Error checks on arguments
*/
assert( dest );
8010614: 5e 00 00 09 bne r16,r0,8010638 <IMFS_memfile_read+0xb0> <== ALWAYS TAKEN
8010618: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
801061c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010620: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010624: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
8010628: 38 63 1e 5c ori r3,r3,0x1e5c <== NOT EXECUTED
801062c: 38 84 1e 20 ori r4,r4,0x1e20 <== NOT EXECUTED
8010630: 34 02 02 5a mvi r2,602 <== NOT EXECUTED
8010634: e3 ff ff f7 bi 8010610 <IMFS_memfile_read+0x88> <== NOT EXECUTED
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
8010638: 5c 80 00 06 bne r4,r0,8010650 <IMFS_memfile_read+0xc8> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
801063c: f8 00 04 10 calli 801167c <__errno> <== NOT EXECUTED
8010640: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8010644: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8010648: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
801064c: e0 00 00 88 bi 801086c <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) {
8010650: 34 02 00 06 mvi r2,6
8010654: 29 8e 00 50 lw r14,(r12+80)
8010658: 29 8f 00 54 lw r15,(r12+84)
801065c: 5c 22 00 19 bne r1,r2,80106c0 <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))
8010660: 34 02 00 1f mvi r2,31 <== NOT EXECUTED
8010664: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8010668: fb ff c1 a9 calli 8000d0c <__ashrsi3> <== NOT EXECUTED
801066c: c9 ed 18 00 sub r3,r15,r13 <== NOT EXECUTED
8010670: f4 6f 10 00 cmpgu r2,r3,r15 <== NOT EXECUTED
8010674: c9 c1 08 00 sub r1,r14,r1 <== NOT EXECUTED
8010678: 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;
801067c: 29 82 00 58 lw r2,(r12+88) <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start))
8010680: 48 0e 00 04 bg r0,r14,8010690 <IMFS_memfile_read+0x108> <== NOT EXECUTED
8010684: 5c 0e 00 04 bne r0,r14,8010694 <IMFS_memfile_read+0x10c> <== NOT EXECUTED
8010688: 55 63 00 02 bgu r11,r3,8010690 <IMFS_memfile_read+0x108> <== NOT EXECUTED
801068c: e0 00 00 02 bi 8010694 <IMFS_memfile_read+0x10c> <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
8010690: c9 ed 58 00 sub r11,r15,r13 <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
8010694: b4 4d 10 00 add r2,r2,r13 <== NOT EXECUTED
8010698: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
801069c: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
80106a0: f8 00 06 9d calli 8012114 <memcpy> <== NOT EXECUTED
IMFS_update_atime( the_jnode );
80106a4: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED
80106a8: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
80106ac: fb ff c9 07 calli 8002ac8 <gettimeofday> <== NOT EXECUTED
80106b0: 2b 81 00 28 lw r1,(sp+40) <== NOT EXECUTED
80106b4: 59 81 00 40 sw (r12+64),r1 <== NOT EXECUTED
return my_length;
80106b8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80106bc: e0 00 00 6c bi 801086c <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 )
80106c0: b4 8d 08 00 add r1,r4,r13
80106c4: 48 0e 00 04 bg r0,r14,80106d4 <IMFS_memfile_read+0x14c> <== NEVER TAKEN
80106c8: 5c 0e 00 04 bne r0,r14,80106d8 <IMFS_memfile_read+0x150> <== NEVER TAKEN
80106cc: 54 2f 00 02 bgu r1,r15,80106d4 <IMFS_memfile_read+0x14c>
80106d0: e0 00 00 02 bi 80106d8 <IMFS_memfile_read+0x150>
my_length = the_jnode->info.file.size - start;
80106d4: 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;
80106d8: 78 01 08 02 mvhi r1,0x802
80106dc: 38 21 36 4c ori r1,r1,0x364c
80106e0: 28 32 00 00 lw r18,(r1+0)
80106e4: b9 a0 08 00 mv r1,r13
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
80106e8: ba 00 78 00 mv r15,r16
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
80106ec: ba 40 10 00 mv r2,r18
80106f0: f8 00 3f fe calli 80206e8 <__modsi3>
80106f4: b8 20 88 00 mv r17,r1
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
80106f8: ba 40 10 00 mv r2,r18
80106fc: b9 a0 08 00 mv r1,r13
8010700: f8 00 3f c7 calli 802061c <__divsi3>
8010704: b8 20 68 00 mv r13,r1
if ( start_offset ) {
8010708: ba 20 70 00 mv r14,r17
801070c: 46 20 00 1a be r17,r0,8010774 <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 );
8010710: b9 80 08 00 mv r1,r12
8010714: b9 a0 10 00 mv r2,r13
8010718: 34 03 00 00 mvi r3,0
801071c: fb ff fc 2d calli 800f7d0 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
8010720: 5c 20 00 09 bne r1,r0,8010744 <IMFS_memfile_read+0x1bc> <== ALWAYS TAKEN
8010724: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8010728: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
801072c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010730: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
8010734: 38 63 1e 5c ori r3,r3,0x1e5c <== NOT EXECUTED
8010738: 38 84 1d 94 ori r4,r4,0x1d94 <== NOT EXECUTED
801073c: 34 02 02 96 mvi r2,662 <== NOT EXECUTED
8010740: e3 ff ff b4 bi 8010610 <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;
8010744: ca 51 90 00 sub r18,r18,r17
8010748: b9 60 70 00 mv r14,r11
801074c: 52 4b 00 02 bgeu r18,r11,8010754 <IMFS_memfile_read+0x1cc>
8010750: 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 );
8010754: 28 22 00 00 lw r2,(r1+0)
8010758: b9 c0 18 00 mv r3,r14
801075c: ba 00 08 00 mv r1,r16
8010760: b4 51 10 00 add r2,r2,r17
8010764: f8 00 06 6c calli 8012114 <memcpy>
dest += to_copy;
8010768: b6 0e 78 00 add r15,r16,r14
block++;
801076c: 35 ad 00 01 addi r13,r13,1
my_length -= to_copy;
8010770: c9 6e 58 00 sub r11,r11,r14
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
8010774: 78 01 08 02 mvhi r1,0x802
8010778: 38 21 36 4c ori r1,r1,0x364c
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
801077c: b8 20 88 00 mv r17,r1
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
8010780: 28 30 00 00 lw r16,(r1+0)
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
8010784: e0 00 00 16 bi 80107dc <IMFS_memfile_read+0x254>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
8010788: b9 80 08 00 mv r1,r12
801078c: b9 a0 10 00 mv r2,r13
8010790: 34 03 00 00 mvi r3,0
8010794: fb ff fc 0f calli 800f7d0 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
8010798: 5c 20 00 09 bne r1,r0,80107bc <IMFS_memfile_read+0x234> <== ALWAYS TAKEN
801079c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80107a0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80107a4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
80107a8: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
80107ac: 38 63 1e 5c ori r3,r3,0x1e5c <== NOT EXECUTED
80107b0: 38 84 1d 94 ori r4,r4,0x1d94 <== NOT EXECUTED
80107b4: 34 02 02 a7 mvi r2,679 <== NOT EXECUTED
80107b8: e3 ff ff 96 bi 8010610 <IMFS_memfile_read+0x88> <== NOT EXECUTED
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
80107bc: 28 22 00 00 lw r2,(r1+0)
80107c0: ba 00 18 00 mv r3,r16
80107c4: b9 e0 08 00 mv r1,r15
80107c8: f8 00 06 53 calli 8012114 <memcpy>
dest += to_copy;
80107cc: b5 f0 78 00 add r15,r15,r16
block++;
80107d0: 35 ad 00 01 addi r13,r13,1
my_length -= to_copy;
80107d4: c9 70 58 00 sub r11,r11,r16
copied += to_copy;
80107d8: 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 ) {
80107dc: 2a 21 00 00 lw r1,(r17+0)
80107e0: 51 61 ff ea bgeu r11,r1,8010788 <IMFS_memfile_read+0x200>
/*
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
80107e4: 54 2b 00 09 bgu r1,r11,8010808 <IMFS_memfile_read+0x280> <== ALWAYS TAKEN
80107e8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80107ec: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80107f0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
80107f4: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
80107f8: 38 63 1e 5c ori r3,r3,0x1e5c <== NOT EXECUTED
80107fc: 38 84 1d a8 ori r4,r4,0x1da8 <== NOT EXECUTED
8010800: 34 02 02 b5 mvi r2,693 <== NOT EXECUTED
8010804: e3 ff ff 83 bi 8010610 <IMFS_memfile_read+0x88> <== NOT EXECUTED
if ( my_length ) {
8010808: 45 60 00 13 be r11,r0,8010854 <IMFS_memfile_read+0x2cc>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
801080c: b9 a0 10 00 mv r2,r13
8010810: b9 80 08 00 mv r1,r12
8010814: 34 03 00 00 mvi r3,0
8010818: fb ff fb ee calli 800f7d0 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
801081c: 5c 20 00 09 bne r1,r0,8010840 <IMFS_memfile_read+0x2b8> <== ALWAYS TAKEN
8010820: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8010824: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010828: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
801082c: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
8010830: 38 63 1e 5c ori r3,r3,0x1e5c <== NOT EXECUTED
8010834: 38 84 1d 94 ori r4,r4,0x1d94 <== NOT EXECUTED
8010838: 34 02 02 b9 mvi r2,697 <== NOT EXECUTED
801083c: e3 ff ff 75 bi 8010610 <IMFS_memfile_read+0x88> <== NOT EXECUTED
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
8010840: 28 22 00 00 lw r2,(r1+0)
8010844: b9 60 18 00 mv r3,r11
8010848: b9 e0 08 00 mv r1,r15
801084c: f8 00 06 32 calli 8012114 <memcpy>
copied += my_length;
8010850: b5 6e 70 00 add r14,r11,r14
}
IMFS_update_atime( the_jnode );
8010854: 37 81 00 28 addi r1,sp,40
8010858: 34 02 00 00 mvi r2,0
801085c: fb ff c8 9b calli 8002ac8 <gettimeofday>
8010860: 2b 81 00 28 lw r1,(sp+40)
8010864: 59 81 00 40 sw (r12+64),r1
return copied;
8010868: b9 c0 08 00 mv r1,r14
}
801086c: 2b 9d 00 04 lw ra,(sp+4)
8010870: 2b 8b 00 24 lw r11,(sp+36)
8010874: 2b 8c 00 20 lw r12,(sp+32)
8010878: 2b 8d 00 1c lw r13,(sp+28)
801087c: 2b 8e 00 18 lw r14,(sp+24)
8010880: 2b 8f 00 14 lw r15,(sp+20)
8010884: 2b 90 00 10 lw r16,(sp+16)
8010888: 2b 91 00 0c lw r17,(sp+12)
801088c: 2b 92 00 08 lw r18,(sp+8)
8010890: 37 9c 00 2c addi sp,sp,44
8010894: c3 a0 00 00 ret
0800fb94 <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
800fb94: 37 9c ff e0 addi sp,sp,-32
800fb98: 5b 8b 00 20 sw (sp+32),r11
800fb9c: 5b 8c 00 1c sw (sp+28),r12
800fba0: 5b 8d 00 18 sw (sp+24),r13
800fba4: 5b 8e 00 14 sw (sp+20),r14
800fba8: 5b 8f 00 10 sw (sp+16),r15
800fbac: 5b 90 00 0c sw (sp+12),r16
800fbb0: 5b 91 00 08 sw (sp+8),r17
800fbb4: 5b 9d 00 04 sw (sp+4),ra
800fbb8: b8 20 58 00 mv r11,r1
/*
* Perform internal consistency checks
*/
assert( the_jnode );
800fbbc: 5c 20 00 09 bne r1,r0,800fbe0 <IMFS_memfile_remove+0x4c> <== ALWAYS TAKEN
800fbc0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800fbc4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
800fbc8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
800fbcc: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
800fbd0: 38 63 1e 70 ori r3,r3,0x1e70 <== NOT EXECUTED
800fbd4: 38 84 1d 58 ori r4,r4,0x1d58 <== NOT EXECUTED
800fbd8: 34 02 01 ee mvi r2,494 <== NOT EXECUTED
800fbdc: e0 00 00 0b bi 800fc08 <IMFS_memfile_remove+0x74> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
800fbe0: 28 22 00 4c lw r2,(r1+76)
800fbe4: 34 01 00 05 mvi r1,5
800fbe8: 44 41 00 09 be r2,r1,800fc0c <IMFS_memfile_remove+0x78> <== ALWAYS TAKEN
800fbec: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800fbf0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
800fbf4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
800fbf8: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
800fbfc: 38 63 1e 70 ori r3,r3,0x1e70 <== NOT EXECUTED
800fc00: 38 84 1d 64 ori r4,r4,0x1d64 <== NOT EXECUTED
800fc04: 34 02 01 f2 mvi r2,498 <== NOT EXECUTED
800fc08: fb ff f4 85 calli 800ce1c <__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;
800fc0c: 78 01 08 02 mvhi r1,0x802
800fc10: 38 21 36 4c ori r1,r1,0x364c
800fc14: 28 21 00 00 lw r1,(r1+0)
800fc18: 34 02 00 02 mvi r2,2
800fc1c: fb ff c4 14 calli 8000c6c <__lshrsi3>
800fc20: b8 20 60 00 mv r12,r1
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
800fc24: 29 61 00 58 lw r1,(r11+88)
800fc28: 44 20 00 04 be r1,r0,800fc38 <IMFS_memfile_remove+0xa4>
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
800fc2c: 35 61 00 58 addi r1,r11,88
800fc30: b9 80 10 00 mv r2,r12
800fc34: fb ff ff 99 calli 800fa98 <memfile_free_blocks_in_table>
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
800fc38: 29 61 00 5c lw r1,(r11+92)
800fc3c: 44 20 00 15 be r1,r0,800fc90 <IMFS_memfile_remove+0xfc> <== ALWAYS TAKEN
800fc40: 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++ ) {
800fc44: 78 0f 08 02 mvhi r15,0x802 <== NOT EXECUTED
800fc48: 39 ef 36 4c ori r15,r15,0x364c <== NOT EXECUTED
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
800fc4c: b9 a0 70 00 mv r14,r13 <== NOT EXECUTED
800fc50: e0 00 00 09 bi 800fc74 <IMFS_memfile_remove+0xe0> <== NOT EXECUTED
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
800fc54: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED
800fc58: b4 2d 08 00 add r1,r1,r13 <== NOT EXECUTED
800fc5c: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED
800fc60: 44 40 00 03 be r2,r0,800fc6c <IMFS_memfile_remove+0xd8> <== NOT EXECUTED
memfile_free_blocks_in_table(
800fc64: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
800fc68: fb ff ff 8c calli 800fa98 <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++ ) {
800fc6c: 35 ce 00 01 addi r14,r14,1 <== NOT EXECUTED
800fc70: 35 ad 00 04 addi r13,r13,4 <== NOT EXECUTED
800fc74: 29 e1 00 00 lw r1,(r15+0) <== NOT EXECUTED
800fc78: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
800fc7c: fb ff c3 fc calli 8000c6c <__lshrsi3> <== NOT EXECUTED
800fc80: 54 2e ff f5 bgu r1,r14,800fc54 <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 );
800fc84: 35 61 00 5c addi r1,r11,92 <== NOT EXECUTED
800fc88: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
800fc8c: fb ff ff 83 calli 800fa98 <memfile_free_blocks_in_table> <== NOT EXECUTED
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
800fc90: 29 61 00 60 lw r1,(r11+96)
800fc94: 44 20 00 24 be r1,r0,800fd24 <IMFS_memfile_remove+0x190> <== ALWAYS TAKEN
800fc98: 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++ ) {
800fc9c: 78 0f 08 02 mvhi r15,0x802 <== NOT EXECUTED
800fca0: 39 ef 36 4c ori r15,r15,0x364c <== NOT EXECUTED
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
800fca4: b9 a0 80 00 mv r16,r13 <== NOT EXECUTED
800fca8: e0 00 00 18 bi 800fd08 <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];
800fcac: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED
800fcb0: b4 2d 08 00 add r1,r1,r13 <== NOT EXECUTED
800fcb4: 28 2e 00 00 lw r14,(r1+0) <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
800fcb8: 45 c0 00 18 be r14,r0,800fd18 <IMFS_memfile_remove+0x184> <== NOT EXECUTED
800fcbc: 34 11 00 00 mvi r17,0 <== NOT EXECUTED
800fcc0: e0 00 00 08 bi 800fce0 <IMFS_memfile_remove+0x14c> <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
800fcc4: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED
800fcc8: 44 20 00 04 be r1,r0,800fcd8 <IMFS_memfile_remove+0x144> <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
800fccc: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
800fcd0: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
800fcd4: fb ff ff 71 calli 800fa98 <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++ ) {
800fcd8: 36 31 00 01 addi r17,r17,1 <== NOT EXECUTED
800fcdc: 35 ce 00 04 addi r14,r14,4 <== NOT EXECUTED
800fce0: 29 e1 00 00 lw r1,(r15+0) <== NOT EXECUTED
800fce4: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
800fce8: fb ff c3 e1 calli 8000c6c <__lshrsi3> <== NOT EXECUTED
800fcec: 54 31 ff f6 bgu r1,r17,800fcc4 <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(
800fcf0: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED
800fcf4: 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++ ) {
800fcf8: 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(
800fcfc: b4 2d 08 00 add r1,r1,r13 <== NOT EXECUTED
800fd00: fb ff ff 66 calli 800fa98 <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++ ) {
800fd04: 35 ad 00 04 addi r13,r13,4 <== NOT EXECUTED
800fd08: 29 e1 00 00 lw r1,(r15+0) <== NOT EXECUTED
800fd0c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
800fd10: fb ff c3 d7 calli 8000c6c <__lshrsi3> <== NOT EXECUTED
800fd14: 54 30 ff e6 bgu r1,r16,800fcac <IMFS_memfile_remove+0x118> <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
800fd18: 35 61 00 60 addi r1,r11,96 <== NOT EXECUTED
800fd1c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
800fd20: fb ff ff 5e calli 800fa98 <memfile_free_blocks_in_table> <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
800fd24: 34 01 00 00 mvi r1,0
800fd28: 2b 9d 00 04 lw ra,(sp+4)
800fd2c: 2b 8b 00 20 lw r11,(sp+32)
800fd30: 2b 8c 00 1c lw r12,(sp+28)
800fd34: 2b 8d 00 18 lw r13,(sp+24)
800fd38: 2b 8e 00 14 lw r14,(sp+20)
800fd3c: 2b 8f 00 10 lw r15,(sp+16)
800fd40: 2b 90 00 0c lw r16,(sp+12)
800fd44: 2b 91 00 08 lw r17,(sp+8)
800fd48: 37 9c 00 20 addi sp,sp,32
800fd4c: c3 a0 00 00 ret
0800fb3c <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
800fb3c: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
800fb40: 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 );
800fb44: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
800fb48: fb ff ff 22 calli 800f7d0 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
assert( block_ptr );
800fb4c: 5c 20 00 09 bne r1,r0,800fb70 <IMFS_memfile_remove_block+0x34><== NOT EXECUTED
800fb50: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800fb54: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
800fb58: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
800fb5c: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
800fb60: 38 63 1e a4 ori r3,r3,0x1ea4 <== NOT EXECUTED
800fb64: 38 84 1d 94 ori r4,r4,0x1d94 <== NOT EXECUTED
800fb68: 34 02 01 96 mvi r2,406 <== NOT EXECUTED
800fb6c: fb ff f4 ac calli 800ce1c <__assert_func> <== NOT EXECUTED
if ( block_ptr ) {
ptr = *block_ptr;
800fb70: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED
*block_ptr = 0;
800fb74: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
800fb78: 58 23 00 00 sw (r1+0),r3 <== NOT EXECUTED
memfile_free_block( ptr );
800fb7c: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
800fb80: fb ff fe f9 calli 800f764 <memfile_free_block> <== NOT EXECUTED
}
return 1;
}
800fb84: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
800fb88: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800fb8c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
800fb90: c3 a0 00 00 ret <== NOT EXECUTED
080101bc <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
80101bc: 37 9c ff d0 addi sp,sp,-48
80101c0: 5b 8b 00 28 sw (sp+40),r11
80101c4: 5b 8c 00 24 sw (sp+36),r12
80101c8: 5b 8d 00 20 sw (sp+32),r13
80101cc: 5b 8e 00 1c sw (sp+28),r14
80101d0: 5b 8f 00 18 sw (sp+24),r15
80101d4: 5b 90 00 14 sw (sp+20),r16
80101d8: 5b 91 00 10 sw (sp+16),r17
80101dc: 5b 92 00 0c sw (sp+12),r18
80101e0: 5b 93 00 08 sw (sp+8),r19
80101e4: 5b 9d 00 04 sw (sp+4),ra
80101e8: b8 20 58 00 mv r11,r1
80101ec: b8 40 60 00 mv r12,r2
80101f0: b8 60 88 00 mv r17,r3
80101f4: b8 80 78 00 mv r15,r4
/*
* Perform internal consistency checks
*/
assert( the_jnode );
80101f8: 5c 20 00 09 bne r1,r0,801021c <IMFS_memfile_write+0x60> <== ALWAYS TAKEN
80101fc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8010200: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010204: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010208: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
801020c: 38 63 1e 48 ori r3,r3,0x1e48 <== NOT EXECUTED
8010210: 38 84 1d 58 ori r4,r4,0x1d58 <== NOT EXECUTED
8010214: 34 02 02 e3 mvi r2,739 <== NOT EXECUTED
8010218: e0 00 00 0b bi 8010244 <IMFS_memfile_write+0x88> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
801021c: 28 22 00 4c lw r2,(r1+76)
8010220: 34 01 00 05 mvi r1,5
8010224: 44 41 00 09 be r2,r1,8010248 <IMFS_memfile_write+0x8c> <== ALWAYS TAKEN
8010228: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
801022c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010230: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010234: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
8010238: 38 63 1e 48 ori r3,r3,0x1e48 <== NOT EXECUTED
801023c: 38 84 1d 64 ori r4,r4,0x1d64 <== NOT EXECUTED
8010240: 34 02 02 e7 mvi r2,743 <== NOT EXECUTED
8010244: fb ff f2 f6 calli 800ce1c <__assert_func> <== NOT EXECUTED
/*
* Error check arguments
*/
assert( source );
8010248: 5c 60 00 09 bne r3,r0,801026c <IMFS_memfile_write+0xb0> <== ALWAYS TAKEN
801024c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8010250: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010254: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010258: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
801025c: 38 63 1e 48 ori r3,r3,0x1e48 <== NOT EXECUTED
8010260: 38 84 1d a0 ori r4,r4,0x1da0 <== NOT EXECUTED
8010264: 34 02 02 ef mvi r2,751 <== NOT EXECUTED
8010268: e3 ff ff f7 bi 8010244 <IMFS_memfile_write+0x88> <== NOT EXECUTED
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
801026c: 5c 80 00 04 bne r4,r0,801027c <IMFS_memfile_write+0xc0> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
8010270: f8 00 05 03 calli 801167c <__errno> <== NOT EXECUTED
8010274: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8010278: e0 00 00 0d bi 80102ac <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 ) {
801027c: 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;
8010280: b4 8c 10 00 add r2,r4,r12
if ( last_byte > the_jnode->info.file.size ) {
8010284: 48 01 00 05 bg r0,r1,8010298 <IMFS_memfile_write+0xdc> <== NEVER TAKEN
8010288: 5c 20 00 0c bne r1,r0,80102b8 <IMFS_memfile_write+0xfc> <== NEVER TAKEN
801028c: 29 61 00 54 lw r1,(r11+84)
8010290: 54 41 00 02 bgu r2,r1,8010298 <IMFS_memfile_write+0xdc> <== ALWAYS TAKEN
8010294: e0 00 00 09 bi 80102b8 <IMFS_memfile_write+0xfc> <== NOT EXECUTED
status = IMFS_memfile_extend( the_jnode, last_byte );
8010298: b9 60 08 00 mv r1,r11
801029c: fb ff ff 18 calli 800fefc <IMFS_memfile_extend>
if ( status )
80102a0: 44 20 00 06 be r1,r0,80102b8 <IMFS_memfile_write+0xfc> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
80102a4: f8 00 04 f6 calli 801167c <__errno> <== NOT EXECUTED
80102a8: 34 02 00 1c mvi r2,28 <== NOT EXECUTED
80102ac: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80102b0: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
80102b4: e0 00 00 66 bi 801044c <IMFS_memfile_write+0x290> <== NOT EXECUTED
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
80102b8: 78 01 08 02 mvhi r1,0x802
80102bc: 38 21 36 4c ori r1,r1,0x364c
80102c0: 28 33 00 00 lw r19,(r1+0)
80102c4: b9 80 08 00 mv r1,r12
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
80102c8: ba 20 80 00 mv r16,r17
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
80102cc: ba 60 10 00 mv r2,r19
80102d0: f8 00 41 06 calli 80206e8 <__modsi3>
80102d4: b8 20 90 00 mv r18,r1
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
80102d8: ba 60 10 00 mv r2,r19
80102dc: b9 80 08 00 mv r1,r12
80102e0: f8 00 40 cf calli 802061c <__divsi3>
80102e4: b8 20 70 00 mv r14,r1
if ( start_offset ) {
80102e8: b9 e0 68 00 mv r13,r15
80102ec: ba 40 60 00 mv r12,r18
80102f0: 46 40 00 19 be r18,r0,8010354 <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 );
80102f4: b9 60 08 00 mv r1,r11
80102f8: b9 c0 10 00 mv r2,r14
80102fc: 34 03 00 00 mvi r3,0
8010300: fb ff fd 34 calli 800f7d0 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
8010304: 5c 20 00 09 bne r1,r0,8010328 <IMFS_memfile_write+0x16c> <== ALWAYS TAKEN
8010308: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
801030c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010310: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010314: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
8010318: 38 63 1e 48 ori r3,r3,0x1e48 <== NOT EXECUTED
801031c: 38 84 1d 94 ori r4,r4,0x1d94 <== NOT EXECUTED
8010320: 34 02 03 1c mvi r2,796 <== NOT EXECUTED
8010324: e3 ff ff c8 bi 8010244 <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;
8010328: ca 72 60 00 sub r12,r19,r18
801032c: 51 ec 00 02 bgeu r15,r12,8010334 <IMFS_memfile_write+0x178>
8010330: 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 );
8010334: 28 21 00 00 lw r1,(r1+0)
8010338: ba 20 10 00 mv r2,r17
801033c: b9 80 18 00 mv r3,r12
8010340: b4 32 08 00 add r1,r1,r18
8010344: f8 00 07 74 calli 8012114 <memcpy>
src += to_copy;
8010348: b6 2c 80 00 add r16,r17,r12
block++;
801034c: 35 ce 00 01 addi r14,r14,1
my_length -= to_copy;
8010350: c9 ec 68 00 sub r13,r15,r12
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
8010354: 78 01 08 02 mvhi r1,0x802
8010358: 38 21 36 4c ori r1,r1,0x364c
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
801035c: b8 20 88 00 mv r17,r1
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
8010360: 28 2f 00 00 lw r15,(r1+0)
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
8010364: e0 00 00 16 bi 80103bc <IMFS_memfile_write+0x200>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
8010368: b9 60 08 00 mv r1,r11
801036c: b9 c0 10 00 mv r2,r14
8010370: 34 03 00 00 mvi r3,0
8010374: fb ff fd 17 calli 800f7d0 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
8010378: 5c 20 00 09 bne r1,r0,801039c <IMFS_memfile_write+0x1e0> <== ALWAYS TAKEN
801037c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8010380: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010384: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010388: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
801038c: 38 63 1e 48 ori r3,r3,0x1e48 <== NOT EXECUTED
8010390: 38 84 1d 94 ori r4,r4,0x1d94 <== NOT EXECUTED
8010394: 34 02 03 30 mvi r2,816 <== NOT EXECUTED
8010398: e3 ff ff ab bi 8010244 <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 );
801039c: 28 21 00 00 lw r1,(r1+0)
80103a0: ba 00 10 00 mv r2,r16
80103a4: b9 e0 18 00 mv r3,r15
80103a8: f8 00 07 5b calli 8012114 <memcpy>
src += to_copy;
80103ac: b6 0f 80 00 add r16,r16,r15
block++;
80103b0: 35 ce 00 01 addi r14,r14,1
my_length -= to_copy;
80103b4: 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(
80103b8: 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 ) {
80103bc: 2a 21 00 00 lw r1,(r17+0)
80103c0: 51 a1 ff ea bgeu r13,r1,8010368 <IMFS_memfile_write+0x1ac>
/*
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
80103c4: 54 2d 00 09 bgu r1,r13,80103e8 <IMFS_memfile_write+0x22c> <== ALWAYS TAKEN
80103c8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80103cc: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80103d0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
80103d4: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
80103d8: 38 63 1e 48 ori r3,r3,0x1e48 <== NOT EXECUTED
80103dc: 38 84 1d a8 ori r4,r4,0x1da8 <== NOT EXECUTED
80103e0: 34 02 03 41 mvi r2,833 <== NOT EXECUTED
80103e4: e3 ff ff 98 bi 8010244 <IMFS_memfile_write+0x88> <== NOT EXECUTED
to_copy = my_length;
if ( my_length ) {
80103e8: 45 a0 00 13 be r13,r0,8010434 <IMFS_memfile_write+0x278>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
80103ec: b9 c0 10 00 mv r2,r14
80103f0: b9 60 08 00 mv r1,r11
80103f4: 34 03 00 00 mvi r3,0
80103f8: fb ff fc f6 calli 800f7d0 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
80103fc: 5c 20 00 09 bne r1,r0,8010420 <IMFS_memfile_write+0x264> <== ALWAYS TAKEN
8010400: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8010404: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010408: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
801040c: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
8010410: 38 63 1e 48 ori r3,r3,0x1e48 <== NOT EXECUTED
8010414: 38 84 1d 94 ori r4,r4,0x1d94 <== NOT EXECUTED
8010418: 34 02 03 46 mvi r2,838 <== NOT EXECUTED
801041c: e3 ff ff 8a bi 8010244 <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 );
8010420: 28 21 00 00 lw r1,(r1+0)
8010424: ba 00 10 00 mv r2,r16
8010428: b9 a0 18 00 mv r3,r13
801042c: f8 00 07 3a calli 8012114 <memcpy>
my_length = 0;
copied += to_copy;
8010430: b5 8d 60 00 add r12,r12,r13
}
IMFS_mtime_ctime_update( the_jnode );
8010434: 37 81 00 2c addi r1,sp,44
8010438: 34 02 00 00 mvi r2,0
801043c: fb ff c9 a3 calli 8002ac8 <gettimeofday>
8010440: 2b 81 00 2c lw r1,(sp+44)
8010444: 59 61 00 48 sw (r11+72),r1
8010448: 59 61 00 44 sw (r11+68),r1
return copied;
}
801044c: b9 80 08 00 mv r1,r12
8010450: 2b 9d 00 04 lw ra,(sp+4)
8010454: 2b 8b 00 28 lw r11,(sp+40)
8010458: 2b 8c 00 24 lw r12,(sp+36)
801045c: 2b 8d 00 20 lw r13,(sp+32)
8010460: 2b 8e 00 1c lw r14,(sp+28)
8010464: 2b 8f 00 18 lw r15,(sp+24)
8010468: 2b 90 00 14 lw r16,(sp+20)
801046c: 2b 91 00 10 lw r17,(sp+16)
8010470: 2b 92 00 0c lw r18,(sp+12)
8010474: 2b 93 00 08 lw r19,(sp+8)
8010478: 37 9c 00 30 addi sp,sp,48
801047c: c3 a0 00 00 ret
08006c20 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
8006c20: 37 9c ff a8 addi sp,sp,-88
8006c24: 5b 8b 00 18 sw (sp+24),r11
8006c28: 5b 8c 00 14 sw (sp+20),r12
8006c2c: 5b 8d 00 10 sw (sp+16),r13
8006c30: 5b 8e 00 0c sw (sp+12),r14
8006c34: 5b 8f 00 08 sw (sp+8),r15
8006c38: 5b 9d 00 04 sw (sp+4),ra
8006c3c: b8 40 58 00 mv r11,r2
8006c40: b8 20 78 00 mv r15,r1
8006c44: b8 60 70 00 mv r14,r3
8006c48: b8 80 68 00 mv r13,r4
8006c4c: 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 );
8006c50: f8 00 15 9b calli 800c2bc <strlen>
8006c54: b8 20 10 00 mv r2,r1
8006c58: 37 83 00 1c addi r3,sp,28
8006c5c: b9 e0 08 00 mv r1,r15
8006c60: 37 84 00 58 addi r4,sp,88
8006c64: fb ff ff 6e calli 8006a1c <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
8006c68: 21 66 f0 00 andi r6,r11,0xf000
8006c6c: 34 01 40 00 mvi r1,16384
8006c70: 44 c1 00 12 be r6,r1,8006cb8 <IMFS_mknod+0x98>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
8006c74: 38 01 80 00 mvu r1,0x8000
8006c78: 34 02 00 05 mvi r2,5
8006c7c: 44 c1 00 10 be r6,r1,8006cbc <IMFS_mknod+0x9c>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
8006c80: 64 c2 20 00 cmpei r2,r6,8192
8006c84: 64 c1 60 00 cmpei r1,r6,24576
8006c88: b8 41 08 00 or r1,r2,r1
8006c8c: 44 20 00 05 be r1,r0,8006ca0 <IMFS_mknod+0x80>
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
8006c90: 5b 8e 00 40 sw (sp+64),r14
8006c94: 5b 8d 00 44 sw (sp+68),r13
8006c98: 34 02 00 02 mvi r2,2
8006c9c: e0 00 00 08 bi 8006cbc <IMFS_mknod+0x9c>
}
else if (S_ISFIFO(mode))
8006ca0: 34 01 10 00 mvi r1,4096
8006ca4: 34 02 00 07 mvi r2,7
8006ca8: 44 c1 00 05 be r6,r1,8006cbc <IMFS_mknod+0x9c> <== ALWAYS TAKEN
type = IMFS_FIFO;
else {
rtems_set_errno_and_return_minus_one( EINVAL );
8006cac: f8 00 10 b4 calli 800af7c <__errno> <== NOT EXECUTED
8006cb0: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8006cb4: e0 00 00 0b bi 8006ce0 <IMFS_mknod+0xc0> <== NOT EXECUTED
8006cb8: 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(
8006cbc: b9 80 08 00 mv r1,r12
8006cc0: b9 60 20 00 mv r4,r11
8006cc4: 37 83 00 1c addi r3,sp,28
8006cc8: 37 85 00 40 addi r5,sp,64
8006ccc: f8 00 0c 42 calli 8009dd4 <IMFS_create_node>
new_name,
mode,
&info
);
if ( !new_node )
8006cd0: 34 02 00 00 mvi r2,0
8006cd4: 5c 22 00 05 bne r1,r2,8006ce8 <IMFS_mknod+0xc8> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
8006cd8: f8 00 10 a9 calli 800af7c <__errno> <== NOT EXECUTED
8006cdc: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
8006ce0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8006ce4: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
return 0;
}
8006ce8: b8 40 08 00 mv r1,r2
8006cec: 2b 9d 00 04 lw ra,(sp+4)
8006cf0: 2b 8b 00 18 lw r11,(sp+24)
8006cf4: 2b 8c 00 14 lw r12,(sp+20)
8006cf8: 2b 8d 00 10 lw r13,(sp+16)
8006cfc: 2b 8e 00 0c lw r14,(sp+12)
8006d00: 2b 8f 00 08 lw r15,(sp+8)
8006d04: 37 9c 00 58 addi sp,sp,88
8006d08: c3 a0 00 00 ret
08002170 <IMFS_mount>:
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
8002170: 37 9c ff fc addi sp,sp,-4
8002174: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
8002178: 28 22 00 08 lw r2,(r1+8)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
800217c: 34 03 00 01 mvi r3,1
8002180: 28 44 00 4c lw r4,(r2+76)
8002184: 44 83 00 06 be r4,r3,800219c <IMFS_mount+0x2c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
8002188: f8 00 3d 3d calli 801167c <__errno> <== NOT EXECUTED
800218c: 34 02 00 14 mvi r2,20 <== NOT EXECUTED
8002190: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8002194: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8002198: e0 00 00 03 bi 80021a4 <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;
800219c: 58 41 00 5c sw (r2+92),r1
80021a0: 34 01 00 00 mvi r1,0
return 0;
}
80021a4: 2b 9d 00 04 lw ra,(sp+4)
80021a8: 37 9c 00 04 addi sp,sp,4
80021ac: c3 a0 00 00 ret
080036e8 <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
80036e8: 37 9c ff f0 addi sp,sp,-16
80036ec: 5b 8b 00 10 sw (sp+16),r11
80036f0: 5b 8c 00 0c sw (sp+12),r12
80036f4: 5b 8d 00 08 sw (sp+8),r13
80036f8: 5b 9d 00 04 sw (sp+4),ra
80036fc: b8 20 58 00 mv r11,r1
assert( the_jnode );
8003700: 5c 20 00 09 bne r1,r0,8003724 <IMFS_print_jnode+0x3c> <== ALWAYS TAKEN
8003704: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003708: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
800370c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8003710: 38 21 50 8c ori r1,r1,0x508c <== NOT EXECUTED
8003714: 38 63 52 64 ori r3,r3,0x5264 <== NOT EXECUTED
8003718: 38 84 50 d8 ori r4,r4,0x50d8 <== NOT EXECUTED
800371c: 34 02 00 38 mvi r2,56 <== NOT EXECUTED
8003720: e0 00 00 39 bi 8003804 <IMFS_print_jnode+0x11c> <== NOT EXECUTED
fprintf(stdout, "%s", the_jnode->name );
8003724: 78 0c 08 02 mvhi r12,0x802
8003728: 39 8c 81 90 ori r12,r12,0x8190
800372c: 29 82 00 00 lw r2,(r12+0)
8003730: 34 21 00 0c addi r1,r1,12
8003734: 28 42 00 08 lw r2,(r2+8)
8003738: f8 00 38 58 calli 8011898 <fputs>
switch( the_jnode->type ) {
800373c: 29 63 00 4c lw r3,(r11+76)
8003740: 34 02 00 06 mvi r2,6
8003744: 34 61 ff ff addi r1,r3,-1
8003748: 54 22 00 4a bgu r1,r2,8003870 <IMFS_print_jnode+0x188> <== NEVER TAKEN
800374c: 34 02 00 02 mvi r2,2
8003750: 78 0d 08 02 mvhi r13,0x802
8003754: fb ff fd bf calli 8002e50 <__ashlsi3>
8003758: 39 ad 52 34 ori r13,r13,0x5234
800375c: b5 a1 08 00 add r1,r13,r1
8003760: 28 22 00 00 lw r2,(r1+0)
8003764: c0 40 00 00 b r2
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
8003768: 29 82 00 00 lw r2,(r12+0)
800376c: 34 01 00 2f mvi r1,47
8003770: 28 42 00 08 lw r2,(r2+8)
8003774: f8 00 37 f3 calli 8011740 <fputc>
break;
8003778: e0 00 00 4b bi 80038a4 <IMFS_print_jnode+0x1bc>
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
800377c: 29 81 00 00 lw r1,(r12+0)
8003780: 78 02 08 02 mvhi r2,0x802
8003784: 29 64 00 54 lw r4,(r11+84)
8003788: 29 63 00 50 lw r3,(r11+80)
800378c: 28 21 00 08 lw r1,(r1+8)
8003790: 38 42 50 e4 ori r2,r2,0x50e4
8003794: e0 00 00 07 bi 80037b0 <IMFS_print_jnode+0xc8>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
8003798: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED
800379c: 29 64 00 58 lw r4,(r11+88) <== NOT EXECUTED
80037a0: 29 63 00 54 lw r3,(r11+84) <== NOT EXECUTED
80037a4: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED
80037a8: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
80037ac: 38 42 50 f8 ori r2,r2,0x50f8 <== NOT EXECUTED
80037b0: f8 00 37 c3 calli 80116bc <fprintf>
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
80037b4: e0 00 00 3c bi 80038a4 <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 ")",
80037b8: 29 81 00 00 lw r1,(r12+0)
80037bc: 29 63 00 54 lw r3,(r11+84)
80037c0: 78 02 08 02 mvhi r2,0x802
80037c4: 28 21 00 08 lw r1,(r1+8)
80037c8: 38 42 51 08 ori r2,r2,0x5108
80037cc: f8 00 37 bc calli 80116bc <fprintf>
(uint32_t)the_jnode->info.file.size );
#endif
break;
80037d0: e0 00 00 35 bi 80038a4 <IMFS_print_jnode+0x1bc>
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
80037d4: 29 82 00 00 lw r2,(r12+0) <== NOT EXECUTED
80037d8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80037dc: 38 21 51 14 ori r1,r1,0x5114 <== NOT EXECUTED
80037e0: 28 42 00 08 lw r2,(r2+8) <== NOT EXECUTED
80037e4: f8 00 38 2d calli 8011898 <fputs> <== NOT EXECUTED
assert(0);
80037e8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80037ec: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80037f0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
80037f4: 38 21 50 8c ori r1,r1,0x508c <== NOT EXECUTED
80037f8: 38 63 52 64 ori r3,r3,0x5264 <== NOT EXECUTED
80037fc: 38 84 51 28 ori r4,r4,0x5128 <== NOT EXECUTED
8003800: 34 02 00 5d mvi r2,93 <== NOT EXECUTED
8003804: f8 00 02 b9 calli 80042e8 <__assert_func> <== NOT EXECUTED
break;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
8003808: 29 82 00 00 lw r2,(r12+0) <== NOT EXECUTED
800380c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003810: 38 21 51 14 ori r1,r1,0x5114 <== NOT EXECUTED
8003814: 28 42 00 08 lw r2,(r2+8) <== NOT EXECUTED
8003818: f8 00 38 20 calli 8011898 <fputs> <== NOT EXECUTED
assert(0);
800381c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003820: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8003824: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8003828: 38 21 50 8c ori r1,r1,0x508c <== NOT EXECUTED
800382c: 38 63 52 64 ori r3,r3,0x5264 <== NOT EXECUTED
8003830: 38 84 51 28 ori r4,r4,0x5128 <== NOT EXECUTED
8003834: 34 02 00 62 mvi r2,98 <== NOT EXECUTED
8003838: e3 ff ff f3 bi 8003804 <IMFS_print_jnode+0x11c> <== NOT EXECUTED
break;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
800383c: 29 82 00 00 lw r2,(r12+0) <== NOT EXECUTED
8003840: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003844: 38 21 51 2c ori r1,r1,0x512c <== NOT EXECUTED
8003848: 28 42 00 08 lw r2,(r2+8) <== NOT EXECUTED
800384c: f8 00 38 13 calli 8011898 <fputs> <== NOT EXECUTED
assert(0);
8003850: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003854: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8003858: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
800385c: 38 21 50 8c ori r1,r1,0x508c <== NOT EXECUTED
8003860: 38 63 52 64 ori r3,r3,0x5264 <== NOT EXECUTED
8003864: 38 84 51 28 ori r4,r4,0x5128 <== NOT EXECUTED
8003868: 34 02 00 67 mvi r2,103 <== NOT EXECUTED
800386c: e3 ff ff e6 bi 8003804 <IMFS_print_jnode+0x11c> <== NOT EXECUTED
break;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
8003870: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED
8003874: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8003878: 38 42 51 40 ori r2,r2,0x5140 <== NOT EXECUTED
800387c: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED
8003880: f8 00 37 8f calli 80116bc <fprintf> <== NOT EXECUTED
assert(0);
8003884: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003888: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
800388c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8003890: 38 21 50 8c ori r1,r1,0x508c <== NOT EXECUTED
8003894: 38 63 52 64 ori r3,r3,0x5264 <== NOT EXECUTED
8003898: 38 84 51 28 ori r4,r4,0x5128 <== NOT EXECUTED
800389c: 34 02 00 6c mvi r2,108 <== NOT EXECUTED
80038a0: e3 ff ff d9 bi 8003804 <IMFS_print_jnode+0x11c> <== NOT EXECUTED
break;
}
puts("");
80038a4: 78 01 08 02 mvhi r1,0x802
80038a8: 38 21 4a f8 ori r1,r1,0x4af8
80038ac: f8 00 3f aa calli 8013754 <puts>
}
80038b0: 2b 9d 00 04 lw ra,(sp+4)
80038b4: 2b 8b 00 10 lw r11,(sp+16)
80038b8: 2b 8c 00 0c lw r12,(sp+12)
80038bc: 2b 8d 00 08 lw r13,(sp+8)
80038c0: 37 9c 00 10 addi sp,sp,16
80038c4: c3 a0 00 00 ret
080021bc <IMFS_readlink>:
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
80021bc: 37 9c ff fc addi sp,sp,-4
80021c0: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *node;
int i;
node = loc->node_access;
80021c4: 28 24 00 00 lw r4,(r1+0)
if ( node->type != IMFS_SYM_LINK )
80021c8: 34 05 00 04 mvi r5,4
80021cc: 34 01 00 00 mvi r1,0
80021d0: 28 86 00 4c lw r6,(r4+76)
80021d4: 44 c5 00 08 be r6,r5,80021f4 <IMFS_readlink+0x38> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
80021d8: f8 00 3d 29 calli 801167c <__errno> <== NOT EXECUTED
80021dc: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
80021e0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80021e4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
80021e8: e0 00 00 09 bi 800220c <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];
80021ec: 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++ )
80021f0: 34 21 00 01 addi r1,r1,1
buf[i] = node->info.sym_link.name[i];
80021f4: 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++ )
80021f8: 50 23 00 05 bgeu r1,r3,800220c <IMFS_readlink+0x50>
80021fc: 28 85 00 50 lw r5,(r4+80)
8002200: b4 a1 28 00 add r5,r5,r1
8002204: 40 a5 00 00 lbu r5,(r5+0)
8002208: 5c a0 ff f9 bne r5,r0,80021ec <IMFS_readlink+0x30>
buf[i] = node->info.sym_link.name[i];
return i;
}
800220c: 2b 9d 00 04 lw ra,(sp+4)
8002210: 37 9c 00 04 addi sp,sp,4
8002214: c3 a0 00 00 ret
08002218 <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 */
)
{
8002218: 37 9c ff ec addi sp,sp,-20
800221c: 5b 8b 00 0c sw (sp+12),r11
8002220: 5b 8c 00 08 sw (sp+8),r12
8002224: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
8002228: 28 4b 00 00 lw r11,(r2+0)
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 */
)
{
800222c: b8 60 60 00 mv r12,r3
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 );
8002230: b8 80 10 00 mv r2,r4
8002234: 35 61 00 0c addi r1,r11,12
8002238: 34 03 00 20 mvi r3,32
800223c: f8 00 41 ec calli 80129ec <strncpy>
if ( the_jnode->Parent != NULL )
8002240: 29 61 00 08 lw r1,(r11+8)
8002244: 44 20 00 03 be r1,r0,8002250 <IMFS_rename+0x38> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
8002248: b9 60 08 00 mv r1,r11
800224c: f8 00 0a d2 calli 8004d94 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
8002250: 29 83 00 00 lw r3,(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 );
8002254: b9 60 10 00 mv r2,r11
8002258: 34 61 00 50 addi r1,r3,80
the_jnode->Parent = new_parent;
800225c: 59 63 00 08 sw (r11+8),r3
8002260: f8 00 0a c1 calli 8004d64 <_Chain_Append>
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
8002264: 37 81 00 10 addi r1,sp,16
8002268: 34 02 00 00 mvi r2,0
800226c: f8 00 02 17 calli 8002ac8 <gettimeofday>
8002270: 2b 81 00 10 lw r1,(sp+16)
8002274: 59 61 00 48 sw (r11+72),r1
return 0;
}
8002278: 34 01 00 00 mvi r1,0
800227c: 2b 9d 00 04 lw ra,(sp+4)
8002280: 2b 8b 00 0c lw r11,(sp+12)
8002284: 2b 8c 00 08 lw r12,(sp+8)
8002288: 37 9c 00 14 addi sp,sp,20
800228c: c3 a0 00 00 ret
08006d18 <IMFS_rmnod>:
int IMFS_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
8006d18: 37 9c ff ec addi sp,sp,-20
8006d1c: 5b 8b 00 0c sw (sp+12),r11
8006d20: 5b 8c 00 08 sw (sp+8),r12
8006d24: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
8006d28: 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 */
)
{
8006d2c: 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 ) {
8006d30: 29 61 00 08 lw r1,(r11+8)
8006d34: 44 20 00 05 be r1,r0,8006d48 <IMFS_rmnod+0x30> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
8006d38: b9 60 08 00 mv r1,r11
8006d3c: f8 00 04 e5 calli 80080d0 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
8006d40: 34 01 00 00 mvi r1,0
8006d44: 59 61 00 08 sw (r11+8),r1
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
8006d48: 2d 63 00 34 lhu r3,(r11+52)
IMFS_update_ctime( the_jnode );
8006d4c: 34 02 00 00 mvi r2,0
8006d50: 37 81 00 10 addi r1,sp,16
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
8006d54: 34 63 ff ff addi r3,r3,-1
8006d58: 0d 63 00 34 sh (r11+52),r3
IMFS_update_ctime( the_jnode );
8006d5c: f8 00 01 3e calli 8007254 <gettimeofday>
8006d60: 2b 81 00 10 lw r1,(sp+16)
8006d64: 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) ) {
8006d68: b9 60 08 00 mv r1,r11
8006d6c: f8 00 01 82 calli 8007374 <rtems_libio_is_file_open>
8006d70: 5c 20 00 12 bne r1,r0,8006db8 <IMFS_rmnod+0xa0> <== NEVER TAKEN
8006d74: 2d 63 00 34 lhu r3,(r11+52)
8006d78: 5c 61 00 10 bne r3,r1,8006db8 <IMFS_rmnod+0xa0> <== NEVER TAKEN
/*
* Is rtems_filesystem_current this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
8006d7c: 78 01 08 01 mvhi r1,0x801
8006d80: 38 21 c1 10 ori r1,r1,0xc110
8006d84: 28 21 00 00 lw r1,(r1+0)
8006d88: 29 82 00 00 lw r2,(r12+0)
8006d8c: 28 24 00 04 lw r4,(r1+4)
8006d90: 5c 82 00 02 bne r4,r2,8006d98 <IMFS_rmnod+0x80> <== ALWAYS TAKEN
rtems_filesystem_current.node_access = NULL;
8006d94: 58 23 00 04 sw (r1+4),r3 <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
8006d98: 29 62 00 4c lw r2,(r11+76)
8006d9c: 34 01 00 04 mvi r1,4
8006da0: 5c 41 00 04 bne r2,r1,8006db0 <IMFS_rmnod+0x98>
if ( the_jnode->info.sym_link.name )
8006da4: 29 61 00 50 lw r1,(r11+80)
8006da8: 44 20 00 02 be r1,r0,8006db0 <IMFS_rmnod+0x98> <== NEVER TAKEN
free( (void*) the_jnode->info.sym_link.name );
8006dac: f8 00 00 b5 calli 8007080 <free>
}
free( the_jnode );
8006db0: b9 60 08 00 mv r1,r11
8006db4: f8 00 00 b3 calli 8007080 <free>
}
return 0;
}
8006db8: 34 01 00 00 mvi r1,0
8006dbc: 2b 9d 00 04 lw ra,(sp+4)
8006dc0: 2b 8b 00 0c lw r11,(sp+12)
8006dc4: 2b 8c 00 08 lw r12,(sp+8)
8006dc8: 37 9c 00 14 addi sp,sp,20
8006dcc: c3 a0 00 00 ret
08006dd0 <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
8006dd0: 37 9c ff ec addi sp,sp,-20
8006dd4: 5b 8b 00 14 sw (sp+20),r11
8006dd8: 5b 8c 00 10 sw (sp+16),r12
8006ddc: 5b 8d 00 0c sw (sp+12),r13
8006de0: 5b 8e 00 08 sw (sp+8),r14
8006de4: 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;
8006de8: 28 2c 00 00 lw r12,(r1+0)
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
8006dec: b8 20 70 00 mv r14,r1
8006df0: b8 40 58 00 mv r11,r2
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
8006df4: 29 81 00 4c lw r1,(r12+76)
8006df8: 34 02 00 05 mvi r2,5
8006dfc: 34 21 ff fe addi r1,r1,-2
8006e00: 54 22 00 12 bgu r1,r2,8006e48 <IMFS_stat+0x78> <== NEVER TAKEN
8006e04: 78 0d 08 01 mvhi r13,0x801
8006e08: 34 02 00 02 mvi r2,2
8006e0c: fb ff e4 f9 calli 80001f0 <__ashlsi3>
8006e10: 39 ad a6 a0 ori r13,r13,0xa6a0
8006e14: b5 a1 08 00 add r1,r13,r1
8006e18: 28 21 00 00 lw r1,(r1+0)
8006e1c: c0 20 00 00 b r1
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
8006e20: 29 81 00 54 lw r1,(r12+84)
8006e24: 29 82 00 50 lw r2,(r12+80)
8006e28: 59 61 00 1c sw (r11+28),r1
8006e2c: 59 62 00 18 sw (r11+24),r2
break;
8006e30: e0 00 00 0b bi 8006e5c <IMFS_stat+0x8c>
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
8006e34: 29 81 00 54 lw r1,(r12+84)
8006e38: e0 00 00 02 bi 8006e40 <IMFS_stat+0x70>
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
8006e3c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8006e40: 59 61 00 20 sw (r11+32),r1
break;
8006e44: e0 00 00 06 bi 8006e5c <IMFS_stat+0x8c>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
8006e48: f8 00 10 4d calli 800af7c <__errno> <== NOT EXECUTED
8006e4c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8006e50: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8006e54: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8006e58: e0 00 00 18 bi 8006eb8 <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;
8006e5c: 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 );
8006e60: 29 c1 00 10 lw r1,(r14+16)
buf->st_mode = the_jnode->st_mode;
8006e64: 59 62 00 0c sw (r11+12),r2
buf->st_nlink = the_jnode->st_nlink;
8006e68: 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 );
8006e6c: 28 21 00 34 lw r1,(r1+52)
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
8006e70: 0d 62 00 10 sh (r11+16),r2
buf->st_ino = the_jnode->st_ino;
8006e74: 29 82 00 38 lw r2,(r12+56)
8006e78: 59 62 00 08 sw (r11+8),r2
buf->st_uid = the_jnode->st_uid;
8006e7c: 2d 82 00 3c lhu r2,(r12+60)
8006e80: 0d 62 00 12 sh (r11+18),r2
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
8006e84: 29 82 00 40 lw r2,(r12+64)
8006e88: 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 );
8006e8c: 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;
8006e90: 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 =
8006e94: 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;
8006e98: 0d 61 00 14 sh (r11+20),r1
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
8006e9c: 29 81 00 44 lw r1,(r12+68)
8006ea0: 59 61 00 2c sw (r11+44),r1
buf->st_ctime = the_jnode->stat_ctime;
8006ea4: 29 8c 00 48 lw r12,(r12+72)
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
8006ea8: 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 =
8006eac: 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;
8006eb0: 59 6c 00 34 sw (r11+52),r12
8006eb4: 34 01 00 00 mvi r1,0
return 0;
}
8006eb8: 2b 9d 00 04 lw ra,(sp+4)
8006ebc: 2b 8b 00 14 lw r11,(sp+20)
8006ec0: 2b 8c 00 10 lw r12,(sp+16)
8006ec4: 2b 8d 00 0c lw r13,(sp+12)
8006ec8: 2b 8e 00 08 lw r14,(sp+8)
8006ecc: 37 9c 00 14 addi sp,sp,20
8006ed0: c3 a0 00 00 ret
08002290 <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
8002290: 37 9c ff ac addi sp,sp,-84
8002294: 5b 8b 00 14 sw (sp+20),r11
8002298: 5b 8c 00 10 sw (sp+16),r12
800229c: 5b 8d 00 0c sw (sp+12),r13
80022a0: 5b 8e 00 08 sw (sp+8),r14
80022a4: 5b 9d 00 04 sw (sp+4),ra
80022a8: 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 );
80022ac: 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
)
{
80022b0: b8 60 60 00 mv r12,r3
80022b4: 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 );
80022b8: 37 8b 00 18 addi r11,sp,24
80022bc: f8 00 41 a1 calli 8012940 <strlen>
80022c0: b8 20 10 00 mv r2,r1
80022c4: b9 60 18 00 mv r3,r11
80022c8: 37 84 00 54 addi r4,sp,84
80022cc: b9 80 08 00 mv r1,r12
80022d0: f8 00 2a 25 calli 800cb64 <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
80022d4: b9 c0 08 00 mv r1,r14
80022d8: f8 00 41 77 calli 80128b4 <strdup>
80022dc: 5b 81 00 3c sw (sp+60),r1
if (info.sym_link.name == NULL) {
80022e0: 44 20 00 0b be r1,r0,800230c <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(
80022e4: 34 02 00 04 mvi r2,4
80022e8: b9 a0 08 00 mv r1,r13
80022ec: b9 60 18 00 mv r3,r11
80022f0: 38 04 a1 ff mvu r4,0xa1ff
80022f4: 37 85 00 3c addi r5,sp,60
80022f8: f8 00 26 6f calli 800bcb4 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
80022fc: 34 02 00 00 mvi r2,0
8002300: 5c 22 00 07 bne r1,r2,800231c <IMFS_symlink+0x8c> <== ALWAYS TAKEN
free(info.sym_link.name);
8002304: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED
8002308: f8 00 01 c2 calli 8002a10 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
800230c: f8 00 3c dc calli 801167c <__errno> <== NOT EXECUTED
8002310: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
8002314: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8002318: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
}
return 0;
}
800231c: b8 40 08 00 mv r1,r2
8002320: 2b 9d 00 04 lw ra,(sp+4)
8002324: 2b 8b 00 14 lw r11,(sp+20)
8002328: 2b 8c 00 10 lw r12,(sp+16)
800232c: 2b 8d 00 0c lw r13,(sp+12)
8002330: 2b 8e 00 08 lw r14,(sp+8)
8002334: 37 9c 00 54 addi sp,sp,84
8002338: c3 a0 00 00 ret
0800233c <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
800233c: 37 9c ff cc addi sp,sp,-52
8002340: 5b 8b 00 18 sw (sp+24),r11
8002344: 5b 8c 00 14 sw (sp+20),r12
8002348: 5b 8d 00 10 sw (sp+16),r13
800234c: 5b 8e 00 0c sw (sp+12),r14
8002350: 5b 8f 00 08 sw (sp+8),r15
8002354: 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;
8002358: 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 */
)
{
800235c: 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 ) {
8002360: 34 01 00 03 mvi r1,3
8002364: 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 */
)
{
8002368: 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 ) {
800236c: 5c 61 00 23 bne r3,r1,80023f8 <IMFS_unlink+0xbc>
if ( !node->info.hard_link.link_node )
8002370: 29 6f 00 50 lw r15,(r11+80)
8002374: 5d e0 00 06 bne r15,r0,800238c <IMFS_unlink+0x50> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
8002378: f8 00 3c c1 calli 801167c <__errno> <== NOT EXECUTED
800237c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8002380: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8002384: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED
8002388: e0 00 00 22 bi 8002410 <IMFS_unlink+0xd4> <== NOT EXECUTED
the_link = *loc;
800238c: 37 8d 00 1c addi r13,sp,28
8002390: 34 03 00 14 mvi r3,20
8002394: b9 a0 08 00 mv r1,r13
8002398: f8 00 3f 5f calli 8012114 <memcpy>
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
800239c: 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;
80023a0: 5b 8f 00 1c sw (sp+28),r15
IMFS_Set_handlers( &the_link );
80023a4: f8 00 26 99 calli 800be08 <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)
80023a8: 29 61 00 50 lw r1,(r11+80)
80023ac: 34 03 00 01 mvi r3,1
80023b0: 2c 22 00 34 lhu r2,(r1+52)
80023b4: 5c 43 00 09 bne r2,r3,80023d8 <IMFS_unlink+0x9c>
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
80023b8: 2b 83 00 24 lw r3,(sp+36)
80023bc: b9 a0 10 00 mv r2,r13
80023c0: b9 c0 08 00 mv r1,r14
80023c4: 28 63 00 34 lw r3,(r3+52)
80023c8: d8 60 00 00 call r3
if ( result != 0 )
80023cc: 34 03 ff ff mvi r3,-1
80023d0: 44 20 00 0a be r1,r0,80023f8 <IMFS_unlink+0xbc>
80023d4: e0 00 00 0f bi 8002410 <IMFS_unlink+0xd4>
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
80023d8: 34 42 ff ff addi r2,r2,-1
80023dc: 0c 22 00 34 sh (r1+52),r2
IMFS_update_ctime( node->info.hard_link.link_node );
80023e0: 34 02 00 00 mvi r2,0
80023e4: 37 81 00 30 addi r1,sp,48
80023e8: f8 00 01 b8 calli 8002ac8 <gettimeofday>
80023ec: 29 61 00 50 lw r1,(r11+80)
80023f0: 2b 82 00 30 lw r2,(sp+48)
80023f4: 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 );
80023f8: 29 83 00 08 lw r3,(r12+8)
80023fc: b9 c0 08 00 mv r1,r14
8002400: b9 80 10 00 mv r2,r12
8002404: 28 63 00 34 lw r3,(r3+52)
8002408: d8 60 00 00 call r3
800240c: b8 20 18 00 mv r3,r1
return result;
}
8002410: b8 60 08 00 mv r1,r3
8002414: 2b 9d 00 04 lw ra,(sp+4)
8002418: 2b 8b 00 18 lw r11,(sp+24)
800241c: 2b 8c 00 14 lw r12,(sp+20)
8002420: 2b 8d 00 10 lw r13,(sp+16)
8002424: 2b 8e 00 0c lw r14,(sp+12)
8002428: 2b 8f 00 08 lw r15,(sp+8)
800242c: 37 9c 00 34 addi sp,sp,52
8002430: c3 a0 00 00 ret
08002434 <IMFS_unmount>:
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
8002434: 37 9c ff fc addi sp,sp,-4
8002438: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
800243c: 28 22 00 08 lw r2,(r1+8)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
8002440: 34 01 00 01 mvi r1,1
8002444: 28 43 00 4c lw r3,(r2+76)
8002448: 44 61 00 04 be r3,r1,8002458 <IMFS_unmount+0x24> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
800244c: f8 00 3c 8c calli 801167c <__errno> <== NOT EXECUTED
8002450: 34 02 00 14 mvi r2,20 <== NOT EXECUTED
8002454: e0 00 00 06 bi 800246c <IMFS_unmount+0x38> <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
8002458: 28 43 00 5c lw r3,(r2+92)
800245c: 34 01 00 00 mvi r1,0
8002460: 5c 61 00 06 bne r3,r1,8002478 <IMFS_unmount+0x44> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
8002464: f8 00 3c 86 calli 801167c <__errno> <== NOT EXECUTED
8002468: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
800246c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8002470: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8002474: e0 00 00 02 bi 800247c <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;
8002478: 58 41 00 5c sw (r2+92),r1
return 0;
}
800247c: 2b 9d 00 04 lw ra,(sp+4)
8002480: 37 9c 00 04 addi sp,sp,4
8002484: 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 c6 10 ori r4,r4,0xc610
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 9a calli 800767c <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 c6 14 ori r1,r1,0xc614
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 c6 0d ori r1,r1,0xc60d
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 c0 c4 ori r1,r1,0xc0c4
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 2a c8 calli 800bb8c <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 c6 0d ori r1,r1,0xc60d
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 c0 1c ori r1,r1,0xc01c
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 a5 calli 8002f2c <_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 7f calli 80026a0 <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 c0 1c ori r1,r1,0xc01c
80010b0: 78 0b 08 01 mvhi r11,0x801
80010b4: 39 6b c6 b0 ori r11,r11,0xc6b0
80010b8: 28 21 00 00 lw r1,(r1+0)
80010bc: 29 6c 00 00 lw r12,(r11+0)
80010c0: f8 00 0b 03 calli 8003ccc <_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
080008f8 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
80008f8: 37 9c ff d8 addi sp,sp,-40 <== NOT EXECUTED
80008fc: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED
8000900: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED
8000904: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED
8000908: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED
800090c: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED
8000910: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED
8000914: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED
8000918: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
800091c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
void *high_water_mark;
void *current;
Stack_Control *stack;
char name[5];
if ( !the_thread )
8000920: 44 20 00 4f be r1,r0,8000a5c <Stack_check_Dump_threads_usage+0x164><== NOT EXECUTED
return;
if ( !print_handler )
8000924: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8000928: 38 21 c6 34 ori r1,r1,0xc634 <== NOT EXECUTED
800092c: 28 2e 00 00 lw r14,(r1+0) <== NOT EXECUTED
8000930: 45 c0 00 4b be r14,r0,8000a5c <Stack_check_Dump_threads_usage+0x164><== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
8000934: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000938: 5d 61 00 08 bne r11,r1,8000958 <Stack_check_Dump_threads_usage+0x60><== NOT EXECUTED
if (Stack_check_Interrupt_stack.area) {
800093c: 78 0c 08 01 mvhi r12,0x801 <== NOT EXECUTED
8000940: 39 8c c6 c8 ori r12,r12,0xc6c8 <== NOT EXECUTED
8000944: 29 81 00 04 lw r1,(r12+4) <== NOT EXECUTED
8000948: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED
800094c: b9 60 80 00 mv r16,r11 <== NOT EXECUTED
8000950: 5c 2b 00 04 bne r1,r11,8000960 <Stack_check_Dump_threads_usage+0x68><== NOT EXECUTED
8000954: e0 00 00 42 bi 8000a5c <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 );
8000958: 29 70 01 10 lw r16,(r11+272) <== NOT EXECUTED
current = 0;
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
800095c: 35 6c 00 c0 addi r12,r11,192 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
8000960: 29 8f 00 04 lw r15,(r12+4) <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
8000964: 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);
8000968: 35 ef 00 10 addi r15,r15,16 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
800096c: 35 ad ff f0 addi r13,r13,-16 <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
8000970: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
8000974: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED
8000978: fb ff ff c8 calli 8000898 <Stack_check_find_high_water_mark><== NOT EXECUTED
if ( high_water_mark )
used = Stack_check_Calculate_used( low, size, high_water_mark );
800097c: b5 ed 78 00 add r15,r15,r13 <== NOT EXECUTED
8000980: c9 e1 78 00 sub r15,r15,r1 <== NOT EXECUTED
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
8000984: 5c 20 00 02 bne r1,r0,800098c <Stack_check_Dump_threads_usage+0x94><== NOT EXECUTED
8000988: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
800098c: 78 04 08 01 mvhi r4,0x801 <== NOT EXECUTED
8000990: 38 84 c6 30 ori r4,r4,0xc630 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
8000994: 45 60 00 0e be r11,r0,80009cc <Stack_check_Dump_threads_usage+0xd4><== NOT EXECUTED
(*print_handler)(
8000998: 29 6b 00 08 lw r11,(r11+8) <== NOT EXECUTED
800099c: 28 91 00 00 lw r17,(r4+0) <== NOT EXECUTED
80009a0: 37 83 00 24 addi r3,sp,36 <== NOT EXECUTED
80009a4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80009a8: 34 02 00 05 mvi r2,5 <== NOT EXECUTED
80009ac: f8 00 06 50 calli 80022ec <rtems_object_get_name> <== NOT EXECUTED
80009b0: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
80009b4: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
80009b8: 38 42 a1 68 ori r2,r2,0xa168 <== NOT EXECUTED
80009bc: ba 20 08 00 mv r1,r17 <== NOT EXECUTED
80009c0: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
80009c4: d9 c0 00 00 call r14 <== NOT EXECUTED
80009c8: e0 00 00 06 bi 80009e0 <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 );
80009cc: 28 81 00 00 lw r1,(r4+0) <== NOT EXECUTED
80009d0: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
80009d4: 38 42 a1 78 ori r2,r2,0xa178 <== NOT EXECUTED
80009d8: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED
80009dc: d9 c0 00 00 call r14 <== NOT EXECUTED
}
(*print_handler)(
80009e0: 29 84 00 00 lw r4,(r12+0) <== NOT EXECUTED
80009e4: 29 83 00 04 lw r3,(r12+4) <== NOT EXECUTED
80009e8: 78 0b 08 01 mvhi r11,0x801 <== NOT EXECUTED
80009ec: 78 0c 08 01 mvhi r12,0x801 <== NOT EXECUTED
80009f0: 39 6b c6 34 ori r11,r11,0xc634 <== NOT EXECUTED
80009f4: 39 8c c6 30 ori r12,r12,0xc630 <== NOT EXECUTED
80009f8: 29 67 00 00 lw r7,(r11+0) <== NOT EXECUTED
80009fc: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED
8000a00: 34 84 ff ff addi r4,r4,-1 <== NOT EXECUTED
8000a04: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8000a08: 38 42 a1 88 ori r2,r2,0xa188 <== NOT EXECUTED
8000a0c: b4 64 20 00 add r4,r3,r4 <== NOT EXECUTED
8000a10: ba 00 28 00 mv r5,r16 <== NOT EXECUTED
8000a14: b9 a0 30 00 mv r6,r13 <== NOT EXECUTED
8000a18: d8 e0 00 00 call r7 <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
8000a1c: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8000a20: 38 42 c6 2c ori r2,r2,0xc62c <== NOT EXECUTED
8000a24: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED
8000a28: 5c 20 00 07 bne r1,r0,8000a44 <Stack_check_Dump_threads_usage+0x14c><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
8000a2c: 29 63 00 00 lw r3,(r11+0) <== NOT EXECUTED
8000a30: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED
8000a34: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8000a38: 38 42 a1 a8 ori r2,r2,0xa1a8 <== NOT EXECUTED
8000a3c: d8 60 00 00 call r3 <== NOT EXECUTED
8000a40: e0 00 00 07 bi 8000a5c <Stack_check_Dump_threads_usage+0x164><== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
8000a44: 29 64 00 00 lw r4,(r11+0) <== NOT EXECUTED
8000a48: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED
8000a4c: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8000a50: 38 42 a1 b8 ori r2,r2,0xa1b8 <== NOT EXECUTED
8000a54: b9 e0 18 00 mv r3,r15 <== NOT EXECUTED
8000a58: d8 80 00 00 call r4 <== NOT EXECUTED
}
}
8000a5c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8000a60: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED
8000a64: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED
8000a68: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED
8000a6c: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED
8000a70: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED
8000a74: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED
8000a78: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED
8000a7c: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED
8000a80: c3 a0 00 00 ret <== NOT EXECUTED
08000d0c <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
8000d0c: 37 9c ff ec addi sp,sp,-20
8000d10: 5b 8b 00 14 sw (sp+20),r11
8000d14: 5b 8c 00 10 sw (sp+16),r12
8000d18: 5b 8d 00 0c sw (sp+12),r13
8000d1c: 5b 8e 00 08 sw (sp+8),r14
8000d20: 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)
8000d24: 78 01 08 01 mvhi r1,0x801
8000d28: 38 21 c6 2c ori r1,r1,0xc62c
8000d2c: 28 2c 00 00 lw r12,(r1+0)
8000d30: 5d 80 00 24 bne r12,r0,8000dc0 <Stack_check_Initialize+0xb4>
8000d34: 78 0b 08 01 mvhi r11,0x801
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
8000d38: 78 0d 08 01 mvhi r13,0x801
static uint32_t pattern[ 4 ] = {
0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */
0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */
};
if (Stack_check_Initialized)
8000d3c: 39 6b c6 b8 ori r11,r11,0xc6b8
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
8000d40: 39 ad a3 00 ori r13,r13,0xa300
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
8000d44: 34 0e 00 04 mvi r14,4
p[i] = pattern[ i%4 ];
8000d48: 21 81 00 03 andi r1,r12,0x3
8000d4c: 34 02 00 02 mvi r2,2
8000d50: fb ff fd 21 calli 80001d4 <__ashlsi3>
8000d54: b5 a1 08 00 add r1,r13,r1
8000d58: 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++ ) {
8000d5c: 35 8c 00 01 addi r12,r12,1
p[i] = pattern[ i%4 ];
8000d60: 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++ ) {
8000d64: 35 6b 00 04 addi r11,r11,4
8000d68: 5d 8e ff f8 bne r12,r14,8000d48 <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) {
8000d6c: 78 01 08 01 mvhi r1,0x801
8000d70: 38 21 c8 2c ori r1,r1,0xc82c
8000d74: 28 24 00 00 lw r4,(r1+0)
8000d78: 44 80 00 0e be r4,r0,8000db0 <Stack_check_Initialize+0xa4> <== NEVER TAKEN
8000d7c: 78 01 08 01 mvhi r1,0x801
8000d80: 38 21 c7 b0 ori r1,r1,0xc7b0
8000d84: 28 26 00 00 lw r6,(r1+0)
8000d88: 44 c0 00 0a be r6,r0,8000db0 <Stack_check_Initialize+0xa4> <== NEVER TAKEN
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
8000d8c: 78 05 08 01 mvhi r5,0x801
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
8000d90: 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;
8000d94: 38 a5 c6 c8 ori r5,r5,0xc6c8
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
8000d98: b8 80 08 00 mv r1,r4
8000d9c: b8 c0 18 00 mv r3,r6
8000da0: 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 -
8000da4: 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;
8000da8: 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);
8000dac: f8 00 2b 8e calli 800bbe4 <memset>
}
#endif
Stack_check_Initialized = 1;
8000db0: 78 01 08 01 mvhi r1,0x801
8000db4: 38 21 c6 2c ori r1,r1,0xc62c
8000db8: 34 02 00 01 mvi r2,1
8000dbc: 58 22 00 00 sw (r1+0),r2
}
8000dc0: 2b 9d 00 04 lw ra,(sp+4)
8000dc4: 2b 8b 00 14 lw r11,(sp+20)
8000dc8: 2b 8c 00 10 lw r12,(sp+16)
8000dcc: 2b 8d 00 0c lw r13,(sp+12)
8000dd0: 2b 8e 00 08 lw r14,(sp+8)
8000dd4: 37 9c 00 14 addi sp,sp,20
8000dd8: c3 a0 00 00 ret
08000898 <Stack_check_find_high_water_mark>:
*/
void *Stack_check_find_high_water_mark(
const void *s,
size_t n
)
{
8000898: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
800089c: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
80008a0: 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;
80008a4: 34 2b 00 10 addi r11,r1,16 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
80008a8: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
80008ac: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
80008b0: fb ff fe 71 calli 8000274 <__lshrsi3> <== NOT EXECUTED
80008b4: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
80008b8: fb ff fe 47 calli 80001d4 <__ashlsi3> <== NOT EXECUTED
if (*base != U32_PATTERN)
80008bc: 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++)
80008c0: b5 61 08 00 add r1,r11,r1 <== NOT EXECUTED
if (*base != U32_PATTERN)
80008c4: 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++)
80008c8: e0 00 00 06 bi 80008e0 <Stack_check_find_high_water_mark+0x48><== NOT EXECUTED
if (*base != U32_PATTERN)
80008cc: 29 63 00 00 lw r3,(r11+0) <== NOT EXECUTED
80008d0: 44 62 00 03 be r3,r2,80008dc <Stack_check_find_high_water_mark+0x44><== NOT EXECUTED
return (void *) base;
80008d4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80008d8: e0 00 00 04 bi 80008e8 <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++)
80008dc: 35 6b 00 04 addi r11,r11,4 <== NOT EXECUTED
80008e0: 54 2b ff fb bgu r1,r11,80008cc <Stack_check_find_high_water_mark+0x34><== NOT EXECUTED
80008e4: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
if (*base != U32_PATTERN)
return (void *) base;
#endif
return (void *)0;
}
80008e8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80008ec: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
80008f0: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
80008f4: c3 a0 00 00 ret <== NOT EXECUTED
08000b38 <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)
{
8000b38: 37 9c ff d0 addi sp,sp,-48
8000b3c: 5b 8b 00 10 sw (sp+16),r11
8000b40: 5b 8c 00 0c sw (sp+12),r12
8000b44: 5b 8d 00 08 sw (sp+8),r13
8000b48: 5b 9d 00 04 sw (sp+4),ra
8000b4c: 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");
8000b50: 78 01 08 01 mvhi r1,0x801
8000b54: 38 21 a2 24 ori r1,r1,0xa224
*
* 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)
{
8000b58: 20 4d 00 ff andi r13,r2,0xff
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
8000b5c: 29 6c 00 c4 lw r12,(r11+196)
char name [32];
printk("BLOWN STACK!!!\n");
8000b60: f8 00 04 f4 calli 8001f30 <printk>
printk("task control block: 0x%08" PRIxPTR "\n", running);
8000b64: 78 01 08 01 mvhi r1,0x801
8000b68: 38 21 a2 34 ori r1,r1,0xa234
8000b6c: b9 60 10 00 mv r2,r11
8000b70: f8 00 04 f0 calli 8001f30 <printk>
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
8000b74: 29 62 00 08 lw r2,(r11+8)
8000b78: 78 01 08 01 mvhi r1,0x801
8000b7c: 38 21 a2 54 ori r1,r1,0xa254
8000b80: f8 00 04 ec calli 8001f30 <printk>
printk(
8000b84: 29 62 00 0c lw r2,(r11+12)
8000b88: 78 01 08 01 mvhi r1,0x801
8000b8c: 38 21 a2 68 ori r1,r1,0xa268
8000b90: f8 00 04 e8 calli 8001f30 <printk>
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
8000b94: 29 61 00 08 lw r1,(r11+8)
8000b98: 37 83 00 14 addi r3,sp,20
8000b9c: 34 02 00 20 mvi r2,32
8000ba0: f8 00 05 d3 calli 80022ec <rtems_object_get_name>
8000ba4: b8 20 10 00 mv r2,r1
8000ba8: 78 01 08 01 mvhi r1,0x801
8000bac: 38 21 a2 7c ori r1,r1,0xa27c
8000bb0: f8 00 04 e0 calli 8001f30 <printk>
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
8000bb4: 29 62 00 c0 lw r2,(r11+192)
8000bb8: 29 63 00 c4 lw r3,(r11+196)
8000bbc: 78 01 08 01 mvhi r1,0x801
8000bc0: 38 21 a2 94 ori r1,r1,0xa294
8000bc4: b4 62 20 00 add r4,r3,r2
8000bc8: f8 00 04 da calli 8001f30 <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) {
8000bcc: 5d a0 00 07 bne r13,r0,8000be8 <Stack_check_report_blown_task+0xb0><== NEVER TAKEN
printk(
8000bd0: 78 01 08 01 mvhi r1,0x801
8000bd4: 38 21 a2 c8 ori r1,r1,0xa2c8
8000bd8: 35 84 00 18 addi r4,r12,24
8000bdc: 34 02 00 10 mvi r2,16
8000be0: 35 83 00 08 addi r3,r12,8
8000be4: f8 00 04 d3 calli 8001f30 <printk>
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
8000be8: 34 01 00 81 mvi r1,129
8000bec: f8 00 06 ed calli 80027a0 <rtems_fatal_error_occurred>
08014e74 <_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
)
{
8014e74: 37 9c ff e4 addi sp,sp,-28
8014e78: 5b 8b 00 1c sw (sp+28),r11
8014e7c: 5b 8c 00 18 sw (sp+24),r12
8014e80: 5b 8d 00 14 sw (sp+20),r13
8014e84: 5b 8e 00 10 sw (sp+16),r14
8014e88: 5b 8f 00 0c sw (sp+12),r15
8014e8c: 5b 90 00 08 sw (sp+8),r16
8014e90: 5b 9d 00 04 sw (sp+4),ra
8014e94: 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 ) {
8014e98: 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
)
{
8014e9c: b8 60 70 00 mv r14,r3
8014ea0: b8 40 80 00 mv r16,r2
8014ea4: 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 ) {
8014ea8: 50 23 00 03 bgeu r1,r3,8014eb4 <_CORE_message_queue_Broadcast+0x40><== ALWAYS TAKEN
8014eac: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
8014eb0: e0 00 00 13 bi 8014efc <_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 ) {
8014eb4: 29 63 00 48 lw r3,(r11+72)
8014eb8: 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))) {
8014ebc: 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 ) {
8014ec0: 44 61 00 08 be r3,r1,8014ee0 <_CORE_message_queue_Broadcast+0x6c>
*count = 0;
8014ec4: 58 c1 00 00 sw (r6+0),r1
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
8014ec8: e0 00 00 0d bi 8014efc <_CORE_message_queue_Broadcast+0x88>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
8014ecc: 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;
8014ed0: 35 ad 00 01 addi r13,r13,1
8014ed4: f8 00 26 ae calli 801e98c <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
8014ed8: 29 81 00 28 lw r1,(r12+40)
8014edc: 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))) {
8014ee0: b9 60 08 00 mv r1,r11
8014ee4: f8 00 0b d2 calli 8017e2c <_Thread_queue_Dequeue>
8014ee8: b8 20 60 00 mv r12,r1
8014eec: ba 00 10 00 mv r2,r16
8014ef0: 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 =
8014ef4: 5c 20 ff f6 bne r1,r0,8014ecc <_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;
8014ef8: 59 ed 00 00 sw (r15+0),r13
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
8014efc: 2b 9d 00 04 lw ra,(sp+4)
8014f00: 2b 8b 00 1c lw r11,(sp+28)
8014f04: 2b 8c 00 18 lw r12,(sp+24)
8014f08: 2b 8d 00 14 lw r13,(sp+20)
8014f0c: 2b 8e 00 10 lw r14,(sp+16)
8014f10: 2b 8f 00 0c lw r15,(sp+12)
8014f14: 2b 90 00 08 lw r16,(sp+8)
8014f18: 37 9c 00 1c addi sp,sp,28
8014f1c: c3 a0 00 00 ret
0800d7d0 <_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
)
{
800d7d0: 37 9c ff e8 addi sp,sp,-24
800d7d4: 5b 8b 00 18 sw (sp+24),r11
800d7d8: 5b 8c 00 14 sw (sp+20),r12
800d7dc: 5b 8d 00 10 sw (sp+16),r13
800d7e0: 5b 8e 00 0c sw (sp+12),r14
800d7e4: 5b 8f 00 08 sw (sp+8),r15
800d7e8: 5b 9d 00 04 sw (sp+4),ra
800d7ec: 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;
800d7f0: 34 01 00 00 mvi r1,0
800d7f4: 59 61 00 48 sw (r11+72),r1
)
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
800d7f8: 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;
800d7fc: 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)) {
800d800: 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
)
{
800d804: b8 60 68 00 mv r13,r3
800d808: 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)) {
800d80c: b8 80 60 00 mv r12,r4
800d810: 44 20 00 05 be r1,r0,800d824 <_CORE_message_queue_Initialize+0x54>
allocated_message_size += sizeof(uint32_t);
800d814: 34 8c 00 04 addi r12,r4,4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
800d818: 34 01 ff fc mvi r1,-4
800d81c: a1 81 60 00 and r12,r12,r1
}
if (allocated_message_size < maximum_message_size)
800d820: 54 8c 00 1c bgu r4,r12,800d890 <_CORE_message_queue_Initialize+0xc0><== 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));
800d824: 35 8e 00 10 addi r14,r12,16
/*
* 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 *
800d828: b9 c0 08 00 mv r1,r14
800d82c: b9 a0 10 00 mv r2,r13
800d830: f8 00 64 d8 calli 8026b90 <__mulsi3>
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
800d834: 55 81 00 17 bgu r12,r1,800d890 <_CORE_message_queue_Initialize+0xc0><== NEVER TAKEN
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
800d838: f8 00 0d 98 calli 8010e98 <_Workspace_Allocate>
800d83c: 59 61 00 5c sw (r11+92),r1
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
800d840: 44 20 00 14 be r1,r0,800d890 <_CORE_message_queue_Initialize+0xc0>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
800d844: b8 20 10 00 mv r2,r1
800d848: b9 a0 18 00 mv r3,r13
800d84c: b9 c0 20 00 mv r4,r14
800d850: 35 61 00 60 addi r1,r11,96
800d854: f8 00 16 19 calli 80130b8 <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
800d858: 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);
800d85c: 35 63 00 54 addi r3,r11,84
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
800d860: 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);
800d864: 59 63 00 50 sw (r11+80),r3
800d868: 64 42 00 01 cmpei r2,r2,1
the_chain->permanent_null = NULL;
800d86c: 34 03 00 00 mvi r3,0
800d870: 59 63 00 54 sw (r11+84),r3
the_chain->last = _Chain_Head(the_chain);
800d874: 59 61 00 58 sw (r11+88),r1
800d878: 34 03 00 80 mvi r3,128
800d87c: b9 60 08 00 mv r1,r11
800d880: 34 04 00 06 mvi r4,6
800d884: f8 00 0a 1c calli 80100f4 <_Thread_queue_Initialize>
800d888: 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;
800d88c: e0 00 00 02 bi 800d894 <_CORE_message_queue_Initialize+0xc4>
800d890: 34 01 00 00 mvi r1,0
}
800d894: 2b 9d 00 04 lw ra,(sp+4)
800d898: 2b 8b 00 18 lw r11,(sp+24)
800d89c: 2b 8c 00 14 lw r12,(sp+20)
800d8a0: 2b 8d 00 10 lw r13,(sp+16)
800d8a4: 2b 8e 00 0c lw r14,(sp+12)
800d8a8: 2b 8f 00 08 lw r15,(sp+8)
800d8ac: 37 9c 00 18 addi sp,sp,24
800d8b0: c3 a0 00 00 ret
0800d8b4 <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
800d8b4: 37 9c ff f4 addi sp,sp,-12
800d8b8: 5b 8b 00 0c sw (sp+12),r11
800d8bc: 5b 8c 00 08 sw (sp+8),r12
800d8c0: 5b 9d 00 04 sw (sp+4),ra
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
800d8c4: 78 07 08 02 mvhi r7,0x802
800d8c8: 38 e7 aa 90 ori r7,r7,0xaa90
800d8cc: 28 e7 00 00 lw r7,(r7+0)
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
800d8d0: 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;
800d8d4: 34 01 00 00 mvi r1,0
800d8d8: 58 e1 00 34 sw (r7+52),r1
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
800d8dc: 20 a5 00 ff andi r5,r5,0xff
800d8e0: 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 );
800d8e4: 90 00 40 00 rcsr r8,IE
800d8e8: 34 03 ff fe mvi r3,-2
800d8ec: a1 03 18 00 and r3,r8,r3
800d8f0: 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));
800d8f4: 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;
800d8f8: 35 63 00 54 addi r3,r11,84
800d8fc: 5d 83 00 03 bne r12,r3,800d908 <_CORE_message_queue_Seize+0x54>
800d900: 34 0c 00 00 mvi r12,0
800d904: e0 00 00 17 bi 800d960 <_CORE_message_queue_Seize+0xac>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
800d908: 29 83 00 00 lw r3,(r12+0)
the_chain->first = new_first;
new_first->previous = _Chain_Head(the_chain);
800d90c: 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;
800d910: 59 63 00 50 sw (r11+80),r3
new_first->previous = _Chain_Head(the_chain);
800d914: 58 69 00 04 sw (r3+4),r9
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
800d918: 45 80 00 12 be r12,r0,800d960 <_CORE_message_queue_Seize+0xac><== NEVER TAKEN
the_message_queue->number_of_pending_messages -= 1;
800d91c: 29 62 00 48 lw r2,(r11+72)
800d920: 34 42 ff ff addi r2,r2,-1
800d924: 59 62 00 48 sw (r11+72),r2
_ISR_Enable( level );
800d928: d0 08 00 00 wcsr IE,r8
*size_p = the_message->Contents.size;
_Thread_Executing->Wait.count =
800d92c: 78 02 08 02 mvhi r2,0x802
800d930: 38 42 aa 90 ori r2,r2,0xaa90
800d934: 28 42 00 00 lw r2,(r2+0)
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;
800d938: 29 83 00 08 lw r3,(r12+8)
_Thread_Executing->Wait.count =
800d93c: 34 05 00 00 mvi r5,0
800d940: 58 45 00 24 sw (r2+36),r5
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;
800d944: 58 83 00 00 sw (r4+0),r3
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
800d948: 35 82 00 0c addi r2,r12,12
800d94c: f8 00 22 60 calli 80162cc <memcpy>
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 );
800d950: 35 61 00 60 addi r1,r11,96
800d954: b9 80 10 00 mv r2,r12
800d958: fb ff ff 6e calli 800d710 <_Chain_Append>
/*
* There is not an API with blocking sends enabled.
* So return immediately.
*/
_CORE_message_queue_Free_message_buffer(the_message_queue, the_message);
return;
800d95c: e0 00 00 12 bi 800d9a4 <_CORE_message_queue_Seize+0xf0>
return;
}
#endif
}
if ( !wait ) {
800d960: 5c ac 00 05 bne r5,r12,800d974 <_CORE_message_queue_Seize+0xc0>
_ISR_Enable( level );
800d964: d0 08 00 00 wcsr IE,r8
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
800d968: 34 01 00 04 mvi r1,4
800d96c: 58 e1 00 34 sw (r7+52),r1
return;
800d970: e0 00 00 0d bi 800d9a4 <_CORE_message_queue_Seize+0xf0>
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;
800d974: 34 03 00 01 mvi r3,1
800d978: 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;
800d97c: 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;
800d980: 58 e2 00 20 sw (r7+32),r2
executing->Wait.return_argument_second.mutable_object = buffer;
800d984: 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;
800d988: 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 );
800d98c: d0 08 00 00 wcsr IE,r8
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
800d990: 78 03 08 01 mvhi r3,0x801
800d994: b9 60 08 00 mv r1,r11
800d998: b8 c0 10 00 mv r2,r6
800d99c: 38 63 01 d4 ori r3,r3,0x1d4
800d9a0: f8 00 09 0d calli 800fdd4 <_Thread_queue_Enqueue_with_handler>
}
800d9a4: 2b 9d 00 04 lw ra,(sp+4)
800d9a8: 2b 8b 00 0c lw r11,(sp+12)
800d9ac: 2b 8c 00 08 lw r12,(sp+8)
800d9b0: 37 9c 00 0c addi sp,sp,12
800d9b4: c3 a0 00 00 ret
08002bec <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
8002bec: 37 9c ff e8 addi sp,sp,-24
8002bf0: 5b 8b 00 14 sw (sp+20),r11
8002bf4: 5b 8c 00 10 sw (sp+16),r12
8002bf8: 5b 8d 00 0c sw (sp+12),r13
8002bfc: 5b 8e 00 08 sw (sp+8),r14
8002c00: 5b 9d 00 04 sw (sp+4),ra
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
8002c04: 78 06 08 01 mvhi r6,0x801
8002c08: 38 c6 c8 2c ori r6,r6,0xc82c
8002c0c: 28 c6 00 00 lw r6,(r6+0)
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
8002c10: 5b 85 00 18 sw (sp+24),r5
8002c14: b8 20 58 00 mv r11,r1
8002c18: b8 40 70 00 mv r14,r2
8002c1c: b8 80 68 00 mv r13,r4
8002c20: 20 6c 00 ff andi r12,r3,0xff
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
8002c24: 44 c0 00 0b be r6,r0,8002c50 <_CORE_mutex_Seize+0x64>
8002c28: 45 80 00 0a be r12,r0,8002c50 <_CORE_mutex_Seize+0x64> <== NEVER TAKEN
8002c2c: 78 01 08 01 mvhi r1,0x801
8002c30: 38 21 c9 c8 ori r1,r1,0xc9c8
8002c34: 28 21 00 00 lw r1,(r1+0)
8002c38: 34 02 00 01 mvi r2,1
8002c3c: 50 41 00 05 bgeu r2,r1,8002c50 <_CORE_mutex_Seize+0x64>
8002c40: 34 01 00 00 mvi r1,0
8002c44: b8 20 10 00 mv r2,r1
8002c48: 34 03 00 13 mvi r3,19
8002c4c: f8 00 01 d4 calli 800339c <_Internal_error_Occurred>
8002c50: b9 60 08 00 mv r1,r11
8002c54: 37 82 00 18 addi r2,sp,24
8002c58: f8 00 15 4b calli 8008184 <_CORE_mutex_Seize_interrupt_trylock>
8002c5c: 44 20 00 19 be r1,r0,8002cc0 <_CORE_mutex_Seize+0xd4>
8002c60: 78 01 08 01 mvhi r1,0x801
8002c64: 38 21 c8 e8 ori r1,r1,0xc8e8
8002c68: 5d 80 00 07 bne r12,r0,8002c84 <_CORE_mutex_Seize+0x98>
8002c6c: 2b 82 00 18 lw r2,(sp+24)
8002c70: d0 02 00 00 wcsr IE,r2
8002c74: 28 21 00 00 lw r1,(r1+0)
8002c78: 34 02 00 01 mvi r2,1
8002c7c: 58 22 00 34 sw (r1+52),r2
8002c80: e0 00 00 10 bi 8002cc0 <_CORE_mutex_Seize+0xd4>
8002c84: 28 23 00 00 lw r3,(r1+0)
8002c88: 78 01 08 01 mvhi r1,0x801
8002c8c: 38 21 c8 2c ori r1,r1,0xc82c
8002c90: 58 6e 00 20 sw (r3+32),r14
8002c94: 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;
8002c98: 34 04 00 01 mvi r4,1
8002c9c: 59 64 00 30 sw (r11+48),r4
8002ca0: b4 44 10 00 add r2,r2,r4
8002ca4: 58 22 00 00 sw (r1+0),r2
8002ca8: 58 6b 00 44 sw (r3+68),r11
8002cac: 2b 81 00 18 lw r1,(sp+24)
8002cb0: d0 01 00 00 wcsr IE,r1
8002cb4: b9 60 08 00 mv r1,r11
8002cb8: b9 a0 10 00 mv r2,r13
8002cbc: fb ff ff ab calli 8002b68 <_CORE_mutex_Seize_interrupt_blocking>
}
8002cc0: 2b 9d 00 04 lw ra,(sp+4)
8002cc4: 2b 8b 00 14 lw r11,(sp+20)
8002cc8: 2b 8c 00 10 lw r12,(sp+16)
8002ccc: 2b 8d 00 0c lw r13,(sp+12)
8002cd0: 2b 8e 00 08 lw r14,(sp+8)
8002cd4: 37 9c 00 18 addi sp,sp,24
8002cd8: c3 a0 00 00 ret
08008184 <_CORE_mutex_Seize_interrupt_trylock>:
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
8008184: 37 9c ff fc addi sp,sp,-4
8008188: 5b 9d 00 04 sw (sp+4),ra
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
800818c: 78 03 08 01 mvhi r3,0x801
8008190: 38 63 c8 e8 ori r3,r3,0xc8e8
8008194: 28 63 00 00 lw r3,(r3+0)
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
8008198: 34 04 00 00 mvi r4,0
800819c: 58 64 00 34 sw (r3+52),r4
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
80081a0: 28 25 00 50 lw r5,(r1+80)
80081a4: 44 a4 00 34 be r5,r4,8008274 <_CORE_mutex_Seize_interrupt_trylock+0xf0>
the_mutex->lock = CORE_MUTEX_LOCKED;
80081a8: 58 24 00 50 sw (r1+80),r4
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
80081ac: 28 65 00 08 lw r5,(r3+8)
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
80081b0: 28 24 00 48 lw r4,(r1+72)
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
80081b4: 58 23 00 5c sw (r1+92),r3
the_mutex->holder_id = executing->Object.id;
80081b8: 58 25 00 60 sw (r1+96),r5
the_mutex->nest_count = 1;
80081bc: 34 05 00 01 mvi r5,1
80081c0: 58 25 00 54 sw (r1+84),r5
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
80081c4: 34 05 00 02 mvi r5,2
80081c8: 44 85 00 03 be r4,r5,80081d4 <_CORE_mutex_Seize_interrupt_trylock+0x50>
80081cc: 34 05 00 03 mvi r5,3
80081d0: 5c 85 00 06 bne r4,r5,80081e8 <_CORE_mutex_Seize_interrupt_trylock+0x64>
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
80081d4: 28 65 00 1c lw r5,(r3+28)
80081d8: 34 a5 00 01 addi r5,r5,1
80081dc: 58 65 00 1c sw (r3+28),r5
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
80081e0: 34 05 00 03 mvi r5,3
80081e4: 44 85 00 04 be r4,r5,80081f4 <_CORE_mutex_Seize_interrupt_trylock+0x70>
_ISR_Enable( *level_p );
80081e8: 28 41 00 00 lw r1,(r2+0)
80081ec: d0 01 00 00 wcsr IE,r1
80081f0: e0 00 00 2d bi 80082a4 <_CORE_mutex_Seize_interrupt_trylock+0x120>
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
80081f4: 28 25 00 4c lw r5,(r1+76)
current = executing->current_priority;
80081f8: 28 64 00 14 lw r4,(r3+20)
if ( current == ceiling ) {
80081fc: 5c 85 00 04 bne r4,r5,800820c <_CORE_mutex_Seize_interrupt_trylock+0x88>
_ISR_Enable( *level_p );
8008200: 28 41 00 00 lw r1,(r2+0)
8008204: d0 01 00 00 wcsr IE,r1
8008208: e0 00 00 27 bi 80082a4 <_CORE_mutex_Seize_interrupt_trylock+0x120>
return 0;
}
if ( current > ceiling ) {
800820c: 50 a4 00 0e bgeu r5,r4,8008244 <_CORE_mutex_Seize_interrupt_trylock+0xc0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8008210: 78 03 08 01 mvhi r3,0x801
8008214: 38 63 c8 2c ori r3,r3,0xc82c
8008218: 28 64 00 00 lw r4,(r3+0)
800821c: 34 84 00 01 addi r4,r4,1
8008220: 58 64 00 00 sw (r3+0),r4
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
8008224: 28 42 00 00 lw r2,(r2+0)
8008228: d0 02 00 00 wcsr IE,r2
_Thread_Change_priority(
800822c: 28 22 00 4c lw r2,(r1+76)
8008230: 28 21 00 5c lw r1,(r1+92)
8008234: 34 03 00 00 mvi r3,0
8008238: fb ff ee a7 calli 8003cd4 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
800823c: fb ff f0 17 calli 8004298 <_Thread_Enable_dispatch>
8008240: e0 00 00 19 bi 80082a4 <_CORE_mutex_Seize_interrupt_trylock+0x120>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
8008244: 34 04 00 06 mvi r4,6
8008248: 58 64 00 34 sw (r3+52),r4
the_mutex->lock = CORE_MUTEX_UNLOCKED;
the_mutex->nest_count = 0; /* undo locking above */
800824c: 34 04 00 00 mvi r4,0
8008250: 58 24 00 54 sw (r1+84),r4
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
the_mutex->lock = CORE_MUTEX_UNLOCKED;
8008254: 34 04 00 01 mvi r4,1
8008258: 58 24 00 50 sw (r1+80),r4
the_mutex->nest_count = 0; /* undo locking above */
executing->resource_count--; /* undo locking above */
800825c: 28 61 00 1c lw r1,(r3+28)
8008260: 34 21 ff ff addi r1,r1,-1
8008264: 58 61 00 1c sw (r3+28),r1
_ISR_Enable( *level_p );
8008268: 28 41 00 00 lw r1,(r2+0)
800826c: d0 01 00 00 wcsr IE,r1
8008270: e0 00 00 0d bi 80082a4 <_CORE_mutex_Seize_interrupt_trylock+0x120>
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
8008274: 28 24 00 5c lw r4,(r1+92)
8008278: 5c 83 00 12 bne r4,r3,80082c0 <_CORE_mutex_Seize_interrupt_trylock+0x13c>
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
800827c: 28 23 00 40 lw r3,(r1+64)
8008280: 44 60 00 04 be r3,r0,8008290 <_CORE_mutex_Seize_interrupt_trylock+0x10c>
8008284: 34 01 00 01 mvi r1,1
8008288: 5c 61 00 0e bne r3,r1,80082c0 <_CORE_mutex_Seize_interrupt_trylock+0x13c><== ALWAYS TAKEN
800828c: e0 00 00 08 bi 80082ac <_CORE_mutex_Seize_interrupt_trylock+0x128><== NOT EXECUTED
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
8008290: 28 23 00 54 lw r3,(r1+84)
8008294: 34 63 00 01 addi r3,r3,1
8008298: 58 23 00 54 sw (r1+84),r3
_ISR_Enable( *level_p );
800829c: 28 41 00 00 lw r1,(r2+0)
80082a0: d0 01 00 00 wcsr IE,r1
80082a4: 34 01 00 00 mvi r1,0
80082a8: e0 00 00 07 bi 80082c4 <_CORE_mutex_Seize_interrupt_trylock+0x140>
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
80082ac: 34 01 00 02 mvi r1,2 <== NOT EXECUTED
80082b0: 58 81 00 34 sw (r4+52),r1 <== NOT EXECUTED
_ISR_Enable( *level_p );
80082b4: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED
80082b8: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
80082bc: e3 ff ff fa bi 80082a4 <_CORE_mutex_Seize_interrupt_trylock+0x120><== NOT EXECUTED
80082c0: 34 01 00 01 mvi r1,1
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
80082c4: 2b 9d 00 04 lw ra,(sp+4)
80082c8: 37 9c 00 04 addi sp,sp,4
80082cc: c3 a0 00 00 ret
080082e8 <_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
)
{
80082e8: 37 9c ff f8 addi sp,sp,-8
80082ec: 5b 8b 00 08 sw (sp+8),r11
80082f0: 5b 9d 00 04 sw (sp+4),ra
80082f4: 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)) ) {
80082f8: fb ff f0 f6 calli 80046d0 <_Thread_queue_Dequeue>
80082fc: 34 02 00 00 mvi r2,0
8008300: 5c 22 00 0e bne r1,r2,8008338 <_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 );
8008304: 90 00 08 00 rcsr r1,IE
8008308: 34 02 ff fe mvi r2,-2
800830c: a0 22 10 00 and r2,r1,r2
8008310: d0 02 00 00 wcsr IE,r2
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
8008314: 29 62 00 48 lw r2,(r11+72)
8008318: 29 63 00 40 lw r3,(r11+64)
800831c: 54 62 00 03 bgu r3,r2,8008328 <_CORE_semaphore_Surrender+0x40><== ALWAYS TAKEN
8008320: 34 02 00 04 mvi r2,4 <== NOT EXECUTED
8008324: e0 00 00 04 bi 8008334 <_CORE_semaphore_Surrender+0x4c> <== NOT EXECUTED
the_semaphore->count += 1;
8008328: 34 42 00 01 addi r2,r2,1
800832c: 59 62 00 48 sw (r11+72),r2
8008330: 34 02 00 00 mvi r2,0
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
8008334: d0 01 00 00 wcsr IE,r1
}
return status;
}
8008338: b8 40 08 00 mv r1,r2
800833c: 2b 9d 00 04 lw ra,(sp+4)
8008340: 2b 8b 00 08 lw r11,(sp+8)
8008344: 37 9c 00 08 addi sp,sp,8
8008348: c3 a0 00 00 ret
0800d7f8 <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
800d7f8: 37 9c ff f8 addi sp,sp,-8
800d7fc: 5b 8b 00 08 sw (sp+8),r11
800d800: 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;
800d804: 78 05 08 02 mvhi r5,0x802
800d808: 38 a5 39 78 ori r5,r5,0x3978
800d80c: 28 ab 00 00 lw r11,(r5+0)
executing->Wait.return_code = RTEMS_SUCCESSFUL;
800d810: 34 05 00 00 mvi r5,0
800d814: 59 65 00 34 sw (r11+52),r5
api = executing->API_Extensions[ THREAD_API_RTEMS ];
800d818: 29 67 01 24 lw r7,(r11+292)
_ISR_Disable( level );
800d81c: 90 00 30 00 rcsr r6,IE
800d820: 34 05 ff fe mvi r5,-2
800d824: a0 c5 28 00 and r5,r6,r5
800d828: d0 05 00 00 wcsr IE,r5
pending_events = api->pending_events;
800d82c: 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 );
800d830: a0 28 28 00 and r5,r1,r8
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
800d834: 44 a0 00 09 be r5,r0,800d858 <_Event_Seize+0x60>
800d838: 44 a1 00 03 be r5,r1,800d844 <_Event_Seize+0x4c>
800d83c: 20 49 00 02 andi r9,r2,0x2
800d840: 45 20 00 06 be r9,r0,800d858 <_Event_Seize+0x60> <== NEVER TAKEN
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
800d844: a4 a0 08 00 not r1,r5
800d848: a0 28 40 00 and r8,r1,r8
800d84c: 58 e8 00 00 sw (r7+0),r8
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
800d850: d0 06 00 00 wcsr IE,r6
800d854: e0 00 00 06 bi 800d86c <_Event_Seize+0x74>
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
800d858: 20 47 00 01 andi r7,r2,0x1
800d85c: 44 e0 00 06 be r7,r0,800d874 <_Event_Seize+0x7c>
_ISR_Enable( level );
800d860: d0 06 00 00 wcsr IE,r6
executing->Wait.return_code = RTEMS_UNSATISFIED;
800d864: 34 01 00 0d mvi r1,13
800d868: 59 61 00 34 sw (r11+52),r1
*event_out = seized_events;
800d86c: 58 85 00 00 sw (r4+0),r5
return;
800d870: e0 00 00 29 bi 800d914 <_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;
800d874: 78 05 08 02 mvhi r5,0x802
800d878: 38 a5 3b b8 ori r5,r5,0x3bb8
800d87c: 34 07 00 01 mvi r7,1
800d880: 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;
800d884: 59 62 00 30 sw (r11+48),r2
executing->Wait.count = (uint32_t) event_in;
800d888: 59 61 00 24 sw (r11+36),r1
executing->Wait.return_argument = event_out;
800d88c: 59 64 00 28 sw (r11+40),r4
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
800d890: d0 06 00 00 wcsr IE,r6
if ( ticks ) {
800d894: 34 04 00 00 mvi r4,0
800d898: 44 64 00 0d be r3,r4,800d8cc <_Event_Seize+0xd4>
_Watchdog_Initialize(
800d89c: 29 65 00 08 lw r5,(r11+8)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
800d8a0: 78 02 08 00 mvhi r2,0x800
800d8a4: 38 42 da e0 ori r2,r2,0xdae0
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
800d8a8: 78 01 08 02 mvhi r1,0x802
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
800d8ac: 59 62 00 64 sw (r11+100),r2
the_watchdog->id = id;
800d8b0: 59 65 00 68 sw (r11+104),r5
the_watchdog->user_data = user_data;
800d8b4: 59 64 00 6c sw (r11+108),r4
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
800d8b8: 59 63 00 54 sw (r11+84),r3
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
800d8bc: 59 64 00 50 sw (r11+80),r4
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
800d8c0: 38 21 39 98 ori r1,r1,0x3998
800d8c4: 35 62 00 48 addi r2,r11,72
800d8c8: fb ff e8 51 calli 8007a0c <_Watchdog_Insert>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
800d8cc: b9 60 08 00 mv r1,r11
800d8d0: 34 02 01 00 mvi r2,256
800d8d4: fb ff e6 5c calli 8007244 <_Thread_Set_state>
_ISR_Disable( level );
800d8d8: 90 00 18 00 rcsr r3,IE
800d8dc: 34 01 ff fe mvi r1,-2
800d8e0: a0 61 08 00 and r1,r3,r1
800d8e4: d0 01 00 00 wcsr IE,r1
sync_state = _Event_Sync_state;
800d8e8: 78 02 08 02 mvhi r2,0x802
800d8ec: 38 42 3b b8 ori r2,r2,0x3bb8
800d8f0: 28 41 00 00 lw r1,(r2+0)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
800d8f4: 34 04 00 00 mvi r4,0
800d8f8: 58 44 00 00 sw (r2+0),r4
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
800d8fc: 34 02 00 01 mvi r2,1
800d900: 5c 22 00 03 bne r1,r2,800d90c <_Event_Seize+0x114>
_ISR_Enable( level );
800d904: d0 03 00 00 wcsr IE,r3
return;
800d908: e0 00 00 03 bi 800d914 <_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 );
800d90c: b9 60 10 00 mv r2,r11
800d910: f8 00 05 b5 calli 800efe4 <_Thread_blocking_operation_Cancel>
}
800d914: 2b 9d 00 04 lw ra,(sp+4)
800d918: 2b 8b 00 08 lw r11,(sp+8)
800d91c: 37 9c 00 08 addi sp,sp,8
800d920: c3 a0 00 00 ret
0800d98c <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
800d98c: 37 9c ff f8 addi sp,sp,-8
800d990: 5b 8b 00 08 sw (sp+8),r11
800d994: 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 ];
800d998: 28 24 01 24 lw r4,(r1+292)
option_set = (rtems_option) the_thread->Wait.option;
800d99c: 28 28 00 30 lw r8,(r1+48)
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
800d9a0: 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 );
800d9a4: 90 00 08 00 rcsr r1,IE
800d9a8: 34 07 ff fe mvi r7,-2
800d9ac: a0 27 38 00 and r7,r1,r7
800d9b0: d0 07 00 00 wcsr IE,r7
pending_events = api->pending_events;
800d9b4: 28 85 00 00 lw r5,(r4+0)
event_condition = (rtems_event_set) the_thread->Wait.count;
800d9b8: 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 );
800d9bc: 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 ) ) {
800d9c0: 5c 40 00 03 bne r2,r0,800d9cc <_Event_Surrender+0x40>
_ISR_Enable( level );
800d9c4: d0 01 00 00 wcsr IE,r1
return;
800d9c8: e0 00 00 42 bi 800dad0 <_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() &&
800d9cc: 78 03 08 02 mvhi r3,0x802
800d9d0: 38 63 39 54 ori r3,r3,0x3954
800d9d4: 28 63 00 00 lw r3,(r3+0)
800d9d8: 44 60 00 1d be r3,r0,800da4c <_Event_Surrender+0xc0>
800d9dc: 78 03 08 02 mvhi r3,0x802
800d9e0: 38 63 39 78 ori r3,r3,0x3978
800d9e4: 28 63 00 00 lw r3,(r3+0)
800d9e8: 5d 63 00 19 bne r11,r3,800da4c <_Event_Surrender+0xc0>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
800d9ec: 78 03 08 02 mvhi r3,0x802
800d9f0: 38 63 3b b8 ori r3,r3,0x3bb8
800d9f4: 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() &&
800d9f8: 34 09 00 02 mvi r9,2
800d9fc: 45 49 00 04 be r10,r9,800da0c <_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)) ) {
800da00: 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() &&
800da04: 34 03 00 01 mvi r3,1
800da08: 5d 23 00 11 bne r9,r3,800da4c <_Event_Surrender+0xc0>
_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) ) {
800da0c: 44 46 00 03 be r2,r6,800da18 <_Event_Surrender+0x8c> <== ALWAYS TAKEN
800da10: 21 08 00 02 andi r8,r8,0x2 <== NOT EXECUTED
800da14: 45 00 00 0c be r8,r0,800da44 <_Event_Surrender+0xb8> <== NOT EXECUTED
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
800da18: a4 40 18 00 not r3,r2
800da1c: a0 65 28 00 and r5,r3,r5
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800da20: 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 );
800da24: 58 85 00 00 sw (r4+0),r5
the_thread->Wait.count = 0;
800da28: 34 04 00 00 mvi r4,0
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
800da2c: 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;
800da30: 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;
800da34: 38 63 3b b8 ori r3,r3,0x3bb8
((_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;
800da38: 58 c2 00 00 sw (r6+0),r2
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
800da3c: 34 02 00 03 mvi r2,3
800da40: 58 62 00 00 sw (r3+0),r2
}
_ISR_Enable( level );
800da44: d0 01 00 00 wcsr IE,r1
return;
800da48: e0 00 00 22 bi 800dad0 <_Event_Surrender+0x144>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
800da4c: 29 63 00 10 lw r3,(r11+16)
800da50: 20 63 01 00 andi r3,r3,0x100
800da54: 44 60 00 1e be r3,r0,800dacc <_Event_Surrender+0x140>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
800da58: 44 46 00 03 be r2,r6,800da64 <_Event_Surrender+0xd8>
800da5c: 21 08 00 02 andi r8,r8,0x2
800da60: 45 00 00 1b be r8,r0,800dacc <_Event_Surrender+0x140> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
800da64: a4 40 18 00 not r3,r2
800da68: a0 65 28 00 and r5,r3,r5
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800da6c: 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 );
800da70: 58 85 00 00 sw (r4+0),r5
the_thread->Wait.count = 0;
800da74: 34 03 00 00 mvi r3,0
800da78: 59 63 00 24 sw (r11+36),r3
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800da7c: 58 c2 00 00 sw (r6+0),r2
_ISR_Flash( level );
800da80: d0 01 00 00 wcsr IE,r1
800da84: d0 07 00 00 wcsr IE,r7
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
800da88: 29 63 00 50 lw r3,(r11+80)
800da8c: 34 02 00 02 mvi r2,2
800da90: 44 62 00 05 be r3,r2,800daa4 <_Event_Surrender+0x118>
_ISR_Enable( level );
800da94: d0 01 00 00 wcsr IE,r1
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
800da98: 78 02 10 03 mvhi r2,0x1003
800da9c: b9 60 08 00 mv r1,r11
800daa0: e0 00 00 08 bi 800dac0 <_Event_Surrender+0x134>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
800daa4: 34 02 00 03 mvi r2,3
800daa8: 59 62 00 50 sw (r11+80),r2
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
800daac: d0 01 00 00 wcsr IE,r1
(void) _Watchdog_Remove( &the_thread->Timer );
800dab0: 35 61 00 48 addi r1,r11,72
800dab4: fb ff e8 35 calli 8007b88 <_Watchdog_Remove>
800dab8: b9 60 08 00 mv r1,r11
800dabc: 78 02 10 03 mvhi r2,0x1003
800dac0: 38 42 ff f8 ori r2,r2,0xfff8
800dac4: f8 00 05 60 calli 800f044 <_Thread_Clear_state>
800dac8: e0 00 00 02 bi 800dad0 <_Event_Surrender+0x144>
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
800dacc: d0 01 00 00 wcsr IE,r1
}
800dad0: 2b 9d 00 04 lw ra,(sp+4)
800dad4: 2b 8b 00 08 lw r11,(sp+8)
800dad8: 37 9c 00 08 addi sp,sp,8
800dadc: c3 a0 00 00 ret
0800dae0 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
800dae0: 37 9c ff f8 addi sp,sp,-8
800dae4: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
800dae8: 37 82 00 08 addi r2,sp,8
800daec: fb ff e3 3b calli 80067d8 <_Thread_Get>
switch ( location ) {
800daf0: 2b 82 00 08 lw r2,(sp+8)
800daf4: 5c 40 00 1d bne r2,r0,800db68 <_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 );
800daf8: 90 00 18 00 rcsr r3,IE
800dafc: 34 02 ff fe mvi r2,-2
800db00: a0 62 10 00 and r2,r3,r2
800db04: d0 02 00 00 wcsr IE,r2
return;
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
800db08: 78 02 08 02 mvhi r2,0x802
800db0c: 38 42 39 78 ori r2,r2,0x3978
800db10: 28 42 00 00 lw r2,(r2+0)
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
800db14: 34 04 00 00 mvi r4,0
800db18: 58 24 00 24 sw (r1+36),r4
if ( _Thread_Is_executing( the_thread ) ) {
800db1c: 5c 22 00 08 bne r1,r2,800db3c <_Event_Timeout+0x5c> <== ALWAYS TAKEN
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
800db20: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
800db24: 38 42 3b b8 ori r2,r2,0x3bb8 <== NOT EXECUTED
800db28: 28 45 00 00 lw r5,(r2+0) <== NOT EXECUTED
800db2c: 34 04 00 01 mvi r4,1 <== NOT EXECUTED
800db30: 5c a4 00 03 bne r5,r4,800db3c <_Event_Timeout+0x5c> <== NOT EXECUTED
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
800db34: 34 04 00 02 mvi r4,2 <== NOT EXECUTED
800db38: 58 44 00 00 sw (r2+0),r4 <== NOT EXECUTED
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
800db3c: 34 02 00 06 mvi r2,6
800db40: 58 22 00 34 sw (r1+52),r2
_ISR_Enable( level );
800db44: d0 03 00 00 wcsr IE,r3
800db48: 78 02 10 03 mvhi r2,0x1003
800db4c: 38 42 ff f8 ori r2,r2,0xfff8
800db50: f8 00 05 3d calli 800f044 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
800db54: 78 01 08 02 mvhi r1,0x802
800db58: 38 21 38 bc ori r1,r1,0x38bc
800db5c: 28 22 00 00 lw r2,(r1+0)
800db60: 34 42 ff ff addi r2,r2,-1
800db64: 58 22 00 00 sw (r1+0),r2
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
800db68: 2b 9d 00 04 lw ra,(sp+4)
800db6c: 37 9c 00 08 addi sp,sp,8
800db70: c3 a0 00 00 ret
0800847c <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
800847c: 37 9c ff b4 addi sp,sp,-76
8008480: 5b 8b 00 44 sw (sp+68),r11
8008484: 5b 8c 00 40 sw (sp+64),r12
8008488: 5b 8d 00 3c sw (sp+60),r13
800848c: 5b 8e 00 38 sw (sp+56),r14
8008490: 5b 8f 00 34 sw (sp+52),r15
8008494: 5b 90 00 30 sw (sp+48),r16
8008498: 5b 91 00 2c sw (sp+44),r17
800849c: 5b 92 00 28 sw (sp+40),r18
80084a0: 5b 93 00 24 sw (sp+36),r19
80084a4: 5b 94 00 20 sw (sp+32),r20
80084a8: 5b 95 00 1c sw (sp+28),r21
80084ac: 5b 96 00 18 sw (sp+24),r22
80084b0: 5b 97 00 14 sw (sp+20),r23
80084b4: 5b 98 00 10 sw (sp+16),r24
80084b8: 5b 99 00 0c sw (sp+12),r25
80084bc: 5b 9b 00 08 sw (sp+8),fp
80084c0: 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;
80084c4: 34 55 00 04 addi r21,r2,4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
80084c8: b8 40 68 00 mv r13,r2
80084cc: b8 20 60 00 mv r12,r1
80084d0: b8 60 78 00 mv r15,r3
80084d4: 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;
80084d8: 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;
80084dc: 28 33 00 10 lw r19,(r1+16)
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
80084e0: 54 55 00 59 bgu r2,r21,8008644 <_Heap_Allocate_aligned_with_boundary+0x1c8>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
80084e4: 44 80 00 04 be r4,r0,80084f4 <_Heap_Allocate_aligned_with_boundary+0x78>
if ( boundary < alloc_size ) {
80084e8: 54 44 00 57 bgu r2,r4,8008644 <_Heap_Allocate_aligned_with_boundary+0x1c8>
return NULL;
}
if ( alignment == 0 ) {
80084ec: 5c 60 00 02 bne r3,r0,80084f4 <_Heap_Allocate_aligned_with_boundary+0x78>
80084f0: 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;
80084f4: 34 01 00 04 mvi r1,4
80084f8: c8 2d 08 00 sub r1,r1,r13
80084fc: 5b 81 00 4c sw (sp+76),r1
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
8008500: 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;
8008504: 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;
8008508: 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;
800850c: 34 18 ff f8 mvi r24,-8
8008510: e0 00 00 3d bi 8008604 <_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 ) {
8008514: 29 d0 00 04 lw r16,(r14+4)
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
8008518: 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 ) {
800851c: 52 b0 00 39 bgeu r21,r16,8008600 <_Heap_Allocate_aligned_with_boundary+0x184>
8008520: 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;
8008524: ba 80 58 00 mv r11,r20
if ( alignment == 0 ) {
8008528: 45 e0 00 35 be r15,r0,80085fc <_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;
800852c: 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;
8008530: 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;
8008534: 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;
8008538: 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;
800853c: 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;
8008540: 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);
8008544: b9 60 08 00 mv r1,r11
8008548: b9 e0 10 00 mv r2,r15
800854c: b4 70 80 00 add r16,r3,r16
8008550: f8 00 43 06 calli 8019168 <__umodsi3>
8008554: 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 ) {
8008558: 52 0b 00 05 bgeu r16,r11,800856c <_Heap_Allocate_aligned_with_boundary+0xf0>
800855c: ba 00 08 00 mv r1,r16
8008560: b9 e0 10 00 mv r2,r15
8008564: f8 00 43 01 calli 8019168 <__umodsi3>
8008568: ca 01 58 00 sub r11,r16,r1
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
800856c: 46 40 00 19 be r18,r0,80085d0 <_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;
8008570: b5 6d 80 00 add r16,r11,r13
8008574: ba 00 08 00 mv r1,r16
8008578: ba 40 10 00 mv r2,r18
800857c: f8 00 42 fb calli 8019168 <__umodsi3>
8008580: ca 01 18 00 sub r3,r16,r1
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
8008584: b6 8d 20 00 add r4,r20,r13
8008588: e0 00 00 0b bi 80085b4 <_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 ) {
800858c: 54 83 00 1d bgu r4,r3,8008600 <_Heap_Allocate_aligned_with_boundary+0x184>
8008590: 5b 84 00 48 sw (sp+72),r4
8008594: f8 00 42 f5 calli 8019168 <__umodsi3>
8008598: 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;
800859c: b5 6d 80 00 add r16,r11,r13
80085a0: ba 00 08 00 mv r1,r16
80085a4: ba 40 10 00 mv r2,r18
80085a8: f8 00 42 f0 calli 8019168 <__umodsi3>
80085ac: 2b 84 00 48 lw r4,(sp+72)
80085b0: 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 ) {
80085b4: f6 03 80 00 cmpgu r16,r16,r3
80085b8: f4 6b 28 00 cmpgu r5,r3,r11
if ( boundary_line < boundary_floor ) {
return 0;
}
alloc_begin = boundary_line - alloc_size;
80085bc: 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 ) {
80085c0: a2 05 80 00 and r16,r16,r5
80085c4: b9 e0 10 00 mv r2,r15
80085c8: ba e0 08 00 mv r1,r23
80085cc: 5e 00 ff f0 bne r16,r0,800858c <_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 ) {
80085d0: 56 8b 00 0c bgu r20,r11,8008600 <_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;
80085d4: cb 0e 80 00 sub r16,r24,r14
80085d8: b9 60 08 00 mv r1,r11
80085dc: ba 60 10 00 mv r2,r19
80085e0: b6 0b 80 00 add r16,r16,r11
80085e4: f8 00 42 e1 calli 8019168 <__umodsi3>
80085e8: ca 01 08 00 sub r1,r16,r1
if ( free_size >= min_block_size || free_size == 0 ) {
80085ec: f0 36 b0 00 cmpgeu r22,r1,r22
80085f0: 64 21 00 00 cmpei r1,r1,0
80085f4: b8 36 08 00 or r1,r1,r22
80085f8: 44 20 00 02 be r1,r0,8008600 <_Heap_Allocate_aligned_with_boundary+0x184>
boundary
);
}
}
if ( alloc_begin != 0 ) {
80085fc: 5d 60 00 05 bne r11,r0,8008610 <_Heap_Allocate_aligned_with_boundary+0x194><== ALWAYS TAKEN
break;
}
block = block->next;
8008600: 29 ce 00 08 lw r14,(r14+8)
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
8008604: 5d cc ff c4 bne r14,r12,8008514 <_Heap_Allocate_aligned_with_boundary+0x98>
8008608: 34 0b 00 00 mvi r11,0
800860c: e0 00 00 09 bi 8008630 <_Heap_Allocate_aligned_with_boundary+0x1b4>
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
8008610: 29 81 00 4c lw r1,(r12+76)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
8008614: b9 c0 10 00 mv r2,r14
8008618: b9 a0 20 00 mv r4,r13
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
800861c: b4 31 08 00 add r1,r1,r17
8008620: 59 81 00 4c sw (r12+76),r1
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
8008624: b9 60 18 00 mv r3,r11
8008628: b9 80 08 00 mv r1,r12
800862c: fb ff ea fa calli 8003214 <_Heap_Block_allocate>
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
8008630: 29 81 00 44 lw r1,(r12+68)
8008634: 50 31 00 02 bgeu r1,r17,800863c <_Heap_Allocate_aligned_with_boundary+0x1c0>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
8008638: 59 91 00 44 sw (r12+68),r17
}
return (void *) alloc_begin;
800863c: b9 60 08 00 mv r1,r11
8008640: e0 00 00 02 bi 8008648 <_Heap_Allocate_aligned_with_boundary+0x1cc>
8008644: 34 01 00 00 mvi r1,0
}
8008648: 2b 9d 00 04 lw ra,(sp+4)
800864c: 2b 8b 00 44 lw r11,(sp+68)
8008650: 2b 8c 00 40 lw r12,(sp+64)
8008654: 2b 8d 00 3c lw r13,(sp+60)
8008658: 2b 8e 00 38 lw r14,(sp+56)
800865c: 2b 8f 00 34 lw r15,(sp+52)
8008660: 2b 90 00 30 lw r16,(sp+48)
8008664: 2b 91 00 2c lw r17,(sp+44)
8008668: 2b 92 00 28 lw r18,(sp+40)
800866c: 2b 93 00 24 lw r19,(sp+36)
8008670: 2b 94 00 20 lw r20,(sp+32)
8008674: 2b 95 00 1c lw r21,(sp+28)
8008678: 2b 96 00 18 lw r22,(sp+24)
800867c: 2b 97 00 14 lw r23,(sp+20)
8008680: 2b 98 00 10 lw r24,(sp+16)
8008684: 2b 99 00 0c lw r25,(sp+12)
8008688: 2b 9b 00 08 lw fp,(sp+8)
800868c: 37 9c 00 4c addi sp,sp,76
8008690: c3 a0 00 00 ret
0800e3d0 <_Heap_Extend>:
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
800e3d0: 37 9c ff e8 addi sp,sp,-24
800e3d4: 5b 8b 00 18 sw (sp+24),r11
800e3d8: 5b 8c 00 14 sw (sp+20),r12
800e3dc: 5b 8d 00 10 sw (sp+16),r13
800e3e0: 5b 8e 00 0c sw (sp+12),r14
800e3e4: 5b 8f 00 08 sw (sp+8),r15
800e3e8: 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;
800e3ec: 28 2d 00 18 lw r13,(r1+24)
uintptr_t const heap_area_end = heap->area_end;
800e3f0: 28 25 00 1c lw r5,(r1+28)
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
800e3f4: 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;
800e3f8: 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 ) {
800e3fc: f4 a2 08 00 cmpgu r1,r5,r2
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
800e400: 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;
800e404: 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;
800e408: 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;
800e40c: 34 01 00 01 mvi r1,1
800e410: 5d a0 00 26 bne r13,r0,800e4a8 <_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 ) {
800e414: 34 01 00 02 mvi r1,2
800e418: 5c 45 00 24 bne r2,r5,800e4a8 <_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;
800e41c: 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
800e420: 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);
800e424: 29 62 00 10 lw r2,(r11+16)
800e428: 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;
800e42c: 59 63 00 1c sw (r11+28),r3
800e430: b9 c0 08 00 mv r1,r14
800e434: fb ff d7 cd calli 8004368 <__umodsi3>
800e438: 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;
800e43c: 59 e1 00 00 sw (r15+0),r1
if( extend_size >= heap->min_block_size ) {
800e440: 29 62 00 14 lw r2,(r11+20)
800e444: 50 22 00 02 bgeu r1,r2,800e44c <_Heap_Extend+0x7c> <== ALWAYS TAKEN
800e448: e0 00 00 17 bi 800e4a4 <_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;
800e44c: 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 =
800e450: 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);
800e454: 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;
800e458: 20 84 00 01 andi r4,r4,0x1
800e45c: b8 24 20 00 or r4,r1,r4
800e460: c8 62 18 00 sub r3,r3,r2
800e464: 59 84 00 04 sw (r12+4),r4
800e468: 38 63 00 01 ori r3,r3,0x1
800e46c: 58 43 00 04 sw (r2+4),r3
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
800e470: 29 65 00 2c lw r5,(r11+44)
++stats->used_blocks;
800e474: 29 64 00 40 lw r4,(r11+64)
--stats->frees; /* Do not count subsequent call as actual free() */
800e478: 29 63 00 50 lw r3,(r11+80)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
800e47c: b4 a1 08 00 add r1,r5,r1
++stats->used_blocks;
800e480: 34 84 00 01 addi r4,r4,1
--stats->frees; /* Do not count subsequent call as actual free() */
800e484: 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;
800e488: 59 62 00 24 sw (r11+36),r2
/* Statistics */
stats->size += extend_size;
800e48c: 59 61 00 2c sw (r11+44),r1
++stats->used_blocks;
800e490: 59 64 00 40 sw (r11+64),r4
--stats->frees; /* Do not count subsequent call as actual free() */
800e494: 59 63 00 50 sw (r11+80),r3
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
800e498: b9 60 08 00 mv r1,r11
800e49c: 35 82 00 08 addi r2,r12,8
800e4a0: fb ff e7 a0 calli 8008320 <_Heap_Free>
800e4a4: b9 a0 08 00 mv r1,r13
}
return HEAP_EXTEND_SUCCESSFUL;
}
800e4a8: 2b 9d 00 04 lw ra,(sp+4)
800e4ac: 2b 8b 00 18 lw r11,(sp+24)
800e4b0: 2b 8c 00 14 lw r12,(sp+20)
800e4b4: 2b 8d 00 10 lw r13,(sp+16)
800e4b8: 2b 8e 00 0c lw r14,(sp+12)
800e4bc: 2b 8f 00 08 lw r15,(sp+8)
800e4c0: 37 9c 00 18 addi sp,sp,24
800e4c4: c3 a0 00 00 ret
08008694 <_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 )
{
8008694: 37 9c ff f4 addi sp,sp,-12
8008698: 5b 8b 00 0c sw (sp+12),r11
800869c: 5b 8c 00 08 sw (sp+8),r12
80086a0: 5b 9d 00 04 sw (sp+4),ra
80086a4: 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 )
80086a8: 28 22 00 10 lw r2,(r1+16)
80086ac: b8 20 58 00 mv r11,r1
80086b0: b8 60 08 00 mv r1,r3
80086b4: 34 6c ff f8 addi r12,r3,-8
80086b8: f8 00 42 ac calli 8019168 <__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;
80086bc: 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 )
80086c0: 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
80086c4: 50 26 00 03 bgeu r1,r6,80086d0 <_Heap_Free+0x3c>
80086c8: 34 02 00 00 mvi r2,0
80086cc: e0 00 00 03 bi 80086d8 <_Heap_Free+0x44>
80086d0: 29 62 00 24 lw r2,(r11+36)
80086d4: 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 ) ) {
80086d8: 44 40 00 66 be r2,r0,8008870 <_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;
80086dc: 28 25 00 04 lw r5,(r1+4)
80086e0: 34 02 ff fe mvi r2,-2
80086e4: 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);
80086e8: 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
80086ec: 50 66 00 03 bgeu r3,r6,80086f8 <_Heap_Free+0x64> <== ALWAYS TAKEN
80086f0: 34 04 00 00 mvi r4,0 <== NOT EXECUTED
80086f4: e0 00 00 03 bi 8008700 <_Heap_Free+0x6c> <== NOT EXECUTED
80086f8: 29 64 00 24 lw r4,(r11+36)
80086fc: 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 ) ) {
8008700: 44 80 00 5c be r4,r0,8008870 <_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;
8008704: 28 64 00 04 lw r4,(r3+4)
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
8008708: 20 87 00 01 andi r7,r4,0x1
800870c: 44 e0 00 59 be r7,r0,8008870 <_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 ));
8008710: 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;
8008714: 34 07 ff fe mvi r7,-2
8008718: 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
800871c: 34 07 00 00 mvi r7,0
8008720: 45 03 00 05 be r8,r3,8008734 <_Heap_Free+0xa0>
8008724: b4 64 38 00 add r7,r3,r4
8008728: 28 e7 00 04 lw r7,(r7+4)
800872c: 20 e7 00 01 andi r7,r7,0x1
8008730: 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 ) ) {
8008734: 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
8008738: 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 ) ) {
800873c: 5c a0 00 23 bne r5,r0,80087c8 <_Heap_Free+0x134>
uintptr_t const prev_size = block->prev_size;
8008740: 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);
8008744: 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
8008748: f0 26 30 00 cmpgeu r6,r1,r6
800874c: f1 01 40 00 cmpgeu r8,r8,r1
8008750: 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 ) ) {
8008754: a1 06 40 00 and r8,r8,r6
8008758: 45 00 00 46 be r8,r0,8008870 <_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) ) {
800875c: 28 26 00 04 lw r6,(r1+4)
8008760: 20 c6 00 01 andi r6,r6,0x1
8008764: 44 c0 00 43 be r6,r0,8008870 <_Heap_Free+0x1dc> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
8008768: 44 e0 00 0f be r7,r0,80087a4 <_Heap_Free+0x110>
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
800876c: 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;
8008770: 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;
8008774: 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;
8008778: b4 44 20 00 add r4,r2,r4
800877c: b4 85 28 00 add r5,r4,r5
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
8008780: 35 03 ff ff addi r3,r8,-1
8008784: 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;
8008788: 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;
800878c: 38 a3 00 01 ori r3,r5,0x1
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
8008790: 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;
8008794: 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;
8008798: 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;
800879c: 58 c7 00 08 sw (r6+8),r7
80087a0: e0 00 00 29 bi 8008844 <_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;
80087a4: b4 45 28 00 add r5,r2,r5
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
80087a8: 38 a4 00 01 ori r4,r5,0x1
80087ac: 58 24 00 04 sw (r1+4),r4
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
80087b0: 28 64 00 04 lw r4,(r3+4)
80087b4: 34 01 ff fe mvi r1,-2
next_block->prev_size = size;
80087b8: 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;
80087bc: a0 81 08 00 and r1,r4,r1
80087c0: 58 61 00 04 sw (r3+4),r1
80087c4: e0 00 00 20 bi 8008844 <_Heap_Free+0x1b0>
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
80087c8: 44 e0 00 0d be r7,r0,80087fc <_Heap_Free+0x168>
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
80087cc: 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;
80087d0: 28 66 00 08 lw r6,(r3+8)
uintptr_t const size = block_size + next_block_size;
80087d4: b4 82 18 00 add r3,r4,r2
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
80087d8: 58 25 00 0c sw (r1+12),r5
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
80087dc: 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;
80087e0: 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;
80087e4: 38 64 00 01 ori r4,r3,0x1
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
80087e8: 58 e3 00 00 sw (r7+0),r3
new_block->prev = prev;
next->prev = new_block;
80087ec: 58 c1 00 0c sw (r6+12),r1
prev->next = new_block;
80087f0: 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;
80087f4: 58 24 00 04 sw (r1+4),r4
80087f8: e0 00 00 13 bi 8008844 <_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;
80087fc: 38 44 00 01 ori r4,r2,0x1
8008800: 58 24 00 04 sw (r1+4),r4
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
8008804: 28 65 00 04 lw r5,(r3+4)
8008808: 34 04 ff fe mvi r4,-2
next_block->prev_size = block_size;
800880c: 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;
8008810: a0 a4 20 00 and r4,r5,r4
8008814: 58 64 00 04 sw (r3+4),r4
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
8008818: 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;
800881c: 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;
8008820: 29 65 00 3c lw r5,(r11+60)
new_block->next = next;
new_block->prev = block_before;
8008824: 58 2b 00 0c sw (r1+12),r11
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
8008828: 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;
800882c: 34 63 00 01 addi r3,r3,1
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
8008830: 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;
8008834: 59 61 00 08 sw (r11+8),r1
8008838: 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;
800883c: 50 a3 00 02 bgeu r5,r3,8008844 <_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;
8008840: 59 63 00 3c sw (r11+60),r3
}
}
/* Statistics */
--stats->used_blocks;
8008844: 29 63 00 40 lw r3,(r11+64)
++stats->frees;
8008848: 29 61 00 50 lw r1,(r11+80)
stats->free_size += block_size;
800884c: 29 64 00 30 lw r4,(r11+48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
8008850: 34 63 ff ff addi r3,r3,-1
++stats->frees;
8008854: 34 21 00 01 addi r1,r1,1
stats->free_size += block_size;
8008858: b4 82 10 00 add r2,r4,r2
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
800885c: 59 61 00 50 sw (r11+80),r1
stats->free_size += block_size;
8008860: 59 62 00 30 sw (r11+48),r2
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
8008864: 59 63 00 40 sw (r11+64),r3
++stats->frees;
stats->free_size += block_size;
8008868: 34 01 00 01 mvi r1,1
return( true );
800886c: e0 00 00 02 bi 8008874 <_Heap_Free+0x1e0>
8008870: 34 01 00 00 mvi r1,0
}
8008874: 2b 9d 00 04 lw ra,(sp+4)
8008878: 2b 8b 00 0c lw r11,(sp+12)
800887c: 2b 8c 00 08 lw r12,(sp+8)
8008880: 37 9c 00 0c addi sp,sp,12
8008884: c3 a0 00 00 ret
08019d04 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
8019d04: 37 9c ff f0 addi sp,sp,-16
8019d08: 5b 8b 00 10 sw (sp+16),r11
8019d0c: 5b 8c 00 0c sw (sp+12),r12
8019d10: 5b 8d 00 08 sw (sp+8),r13
8019d14: 5b 9d 00 04 sw (sp+4),ra
8019d18: 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 )
8019d1c: 28 22 00 10 lw r2,(r1+16)
8019d20: b8 20 58 00 mv r11,r1
8019d24: b9 80 08 00 mv r1,r12
8019d28: b8 60 68 00 mv r13,r3
8019d2c: fb ff fd 0f calli 8019168 <__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;
8019d30: 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 )
8019d34: 35 84 ff f8 addi r4,r12,-8
8019d38: 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
8019d3c: 50 82 00 03 bgeu r4,r2,8019d48 <_Heap_Size_of_alloc_area+0x44>
8019d40: 34 01 00 00 mvi r1,0
8019d44: e0 00 00 03 bi 8019d50 <_Heap_Size_of_alloc_area+0x4c>
8019d48: 29 61 00 24 lw r1,(r11+36)
8019d4c: 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 ) ) {
8019d50: 44 20 00 13 be r1,r0,8019d9c <_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);
8019d54: 28 83 00 04 lw r3,(r4+4)
8019d58: 34 01 ff fe mvi r1,-2
8019d5c: a0 61 08 00 and r1,r3,r1
8019d60: 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
8019d64: 50 82 00 03 bgeu r4,r2,8019d70 <_Heap_Size_of_alloc_area+0x6c><== ALWAYS TAKEN
8019d68: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8019d6c: e0 00 00 03 bi 8019d78 <_Heap_Size_of_alloc_area+0x74> <== NOT EXECUTED
8019d70: 29 61 00 24 lw r1,(r11+36)
8019d74: f0 24 08 00 cmpgeu r1,r1,r4
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
8019d78: 44 20 00 09 be r1,r0,8019d9c <_Heap_Size_of_alloc_area+0x98><== NEVER TAKEN
8019d7c: 28 81 00 04 lw r1,(r4+4)
8019d80: 20 21 00 01 andi r1,r1,0x1
8019d84: 44 20 00 06 be r1,r0,8019d9c <_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;
8019d88: c8 8c 20 00 sub r4,r4,r12
8019d8c: 34 84 00 04 addi r4,r4,4
8019d90: 59 a4 00 00 sw (r13+0),r4
8019d94: 34 01 00 01 mvi r1,1
return true;
8019d98: e0 00 00 02 bi 8019da0 <_Heap_Size_of_alloc_area+0x9c>
8019d9c: 34 01 00 00 mvi r1,0
}
8019da0: 2b 9d 00 04 lw ra,(sp+4)
8019da4: 2b 8b 00 10 lw r11,(sp+16)
8019da8: 2b 8c 00 0c lw r12,(sp+12)
8019dac: 2b 8d 00 08 lw r13,(sp+8)
8019db0: 37 9c 00 10 addi sp,sp,16
8019db4: c3 a0 00 00 ret
08003bec <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
8003bec: 37 9c ff ac addi sp,sp,-84
8003bf0: 5b 8b 00 50 sw (sp+80),r11
8003bf4: 5b 8c 00 4c sw (sp+76),r12
8003bf8: 5b 8d 00 48 sw (sp+72),r13
8003bfc: 5b 8e 00 44 sw (sp+68),r14
8003c00: 5b 8f 00 40 sw (sp+64),r15
8003c04: 5b 90 00 3c sw (sp+60),r16
8003c08: 5b 91 00 38 sw (sp+56),r17
8003c0c: 5b 92 00 34 sw (sp+52),r18
8003c10: 5b 93 00 30 sw (sp+48),r19
8003c14: 5b 94 00 2c sw (sp+44),r20
8003c18: 5b 95 00 28 sw (sp+40),r21
8003c1c: 5b 96 00 24 sw (sp+36),r22
8003c20: 5b 97 00 20 sw (sp+32),r23
8003c24: 5b 98 00 1c sw (sp+28),r24
8003c28: 5b 99 00 18 sw (sp+24),r25
8003c2c: 5b 9b 00 14 sw (sp+20),fp
8003c30: 5b 9d 00 10 sw (sp+16),ra
8003c34: 20 63 00 ff andi r3,r3,0xff
8003c38: b8 20 68 00 mv r13,r1
8003c3c: b8 40 70 00 mv r14,r2
uintptr_t const page_size = heap->page_size;
8003c40: 28 2f 00 10 lw r15,(r1+16)
uintptr_t const min_block_size = heap->min_block_size;
8003c44: 28 33 00 14 lw r19,(r1+20)
Heap_Block *const last_block = heap->last_block;
8003c48: 28 32 00 24 lw r18,(r1+36)
Heap_Block *block = heap->first_block;
8003c4c: 28 2b 00 20 lw r11,(r1+32)
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
8003c50: 5c 60 00 04 bne r3,r0,8003c60 <_Heap_Walk+0x74>
8003c54: 78 0c 08 00 mvhi r12,0x800
8003c58: 39 8c 3b c8 ori r12,r12,0x3bc8
8003c5c: e0 00 00 03 bi 8003c68 <_Heap_Walk+0x7c>
8003c60: 78 0c 08 00 mvhi r12,0x800
8003c64: 39 8c 41 18 ori r12,r12,0x4118
if ( !_System_state_Is_up( _System_state_Get() ) ) {
8003c68: 78 02 08 01 mvhi r2,0x801
8003c6c: 38 42 ea 10 ori r2,r2,0xea10
8003c70: 28 42 00 00 lw r2,(r2+0)
8003c74: 34 01 00 03 mvi r1,3
8003c78: 5c 41 01 0c bne r2,r1,80040a8 <_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)(
8003c7c: 29 a1 00 08 lw r1,(r13+8)
8003c80: 29 a6 00 18 lw r6,(r13+24)
8003c84: 29 a7 00 1c lw r7,(r13+28)
8003c88: 5b 81 00 08 sw (sp+8),r1
8003c8c: 29 a1 00 0c lw r1,(r13+12)
8003c90: 78 03 08 01 mvhi r3,0x801
8003c94: 5b 92 00 04 sw (sp+4),r18
8003c98: 5b 81 00 0c sw (sp+12),r1
8003c9c: 38 63 b5 74 ori r3,r3,0xb574
8003ca0: b9 c0 08 00 mv r1,r14
8003ca4: 34 02 00 00 mvi r2,0
8003ca8: b9 e0 20 00 mv r4,r15
8003cac: ba 60 28 00 mv r5,r19
8003cb0: b9 60 40 00 mv r8,r11
8003cb4: 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 ) {
8003cb8: 5d e0 00 05 bne r15,r0,8003ccc <_Heap_Walk+0xe0>
(*printer)( source, true, "page size is zero\n" );
8003cbc: 78 03 08 01 mvhi r3,0x801
8003cc0: b9 c0 08 00 mv r1,r14
8003cc4: 38 63 b6 08 ori r3,r3,0xb608
8003cc8: e0 00 00 3b bi 8003db4 <_Heap_Walk+0x1c8>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
8003ccc: 21 f0 00 07 andi r16,r15,0x7
8003cd0: 46 00 00 06 be r16,r0,8003ce8 <_Heap_Walk+0xfc>
(*printer)(
8003cd4: 78 03 08 01 mvhi r3,0x801
8003cd8: b9 c0 08 00 mv r1,r14
8003cdc: 38 63 b6 1c ori r3,r3,0xb61c
8003ce0: b9 e0 20 00 mv r4,r15
8003ce4: e0 00 01 09 bi 8004108 <_Heap_Walk+0x51c>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
8003ce8: ba 60 08 00 mv r1,r19
8003cec: b9 e0 10 00 mv r2,r15
8003cf0: fb ff f3 f4 calli 8000cc0 <__umodsi3>
8003cf4: b8 20 88 00 mv r17,r1
8003cf8: 44 30 00 08 be r1,r16,8003d18 <_Heap_Walk+0x12c>
(*printer)(
8003cfc: 78 03 08 01 mvhi r3,0x801
8003d00: b9 c0 08 00 mv r1,r14
8003d04: 38 63 b6 3c ori r3,r3,0xb63c
8003d08: ba 60 20 00 mv r4,r19
8003d0c: 34 02 00 01 mvi r2,1
8003d10: d9 80 00 00 call r12
8003d14: e0 00 00 5a bi 8003e7c <_Heap_Walk+0x290>
);
return false;
}
if (
8003d18: 35 61 00 08 addi r1,r11,8
8003d1c: b9 e0 10 00 mv r2,r15
8003d20: fb ff f3 e8 calli 8000cc0 <__umodsi3>
8003d24: b8 20 80 00 mv r16,r1
8003d28: 44 31 00 08 be r1,r17,8003d48 <_Heap_Walk+0x15c>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
8003d2c: 78 03 08 01 mvhi r3,0x801
8003d30: b9 c0 08 00 mv r1,r14
8003d34: 38 63 b6 60 ori r3,r3,0xb660
8003d38: b9 60 20 00 mv r4,r11
8003d3c: 34 02 00 01 mvi r2,1
8003d40: d9 80 00 00 call r12
8003d44: e0 00 00 92 bi 8003f8c <_Heap_Walk+0x3a0>
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
8003d48: 29 71 00 04 lw r17,(r11+4)
8003d4c: 22 31 00 01 andi r17,r17,0x1
8003d50: 5e 21 00 07 bne r17,r1,8003d6c <_Heap_Walk+0x180>
(*printer)(
8003d54: 78 03 08 01 mvhi r3,0x801
8003d58: b9 c0 08 00 mv r1,r14
8003d5c: 38 63 b6 94 ori r3,r3,0xb694
8003d60: 34 02 00 01 mvi r2,1
8003d64: d9 80 00 00 call r12
8003d68: e0 00 00 89 bi 8003f8c <_Heap_Walk+0x3a0>
);
return false;
}
if ( first_block->prev_size != page_size ) {
8003d6c: 29 79 00 00 lw r25,(r11+0)
8003d70: 47 2f 00 07 be r25,r15,8003d8c <_Heap_Walk+0x1a0>
(*printer)(
8003d74: 78 03 08 01 mvhi r3,0x801
8003d78: b9 c0 08 00 mv r1,r14
8003d7c: 38 63 b6 c4 ori r3,r3,0xb6c4
8003d80: bb 20 20 00 mv r4,r25
8003d84: b9 e0 28 00 mv r5,r15
8003d88: e0 00 00 3b bi 8003e74 <_Heap_Walk+0x288>
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
8003d8c: 2a 41 00 04 lw r1,(r18+4)
8003d90: 34 02 ff fe mvi r2,-2
8003d94: a0 22 08 00 and r1,r1,r2
8003d98: b6 41 08 00 add r1,r18,r1
8003d9c: 28 2f 00 04 lw r15,(r1+4)
8003da0: 21 ef 00 01 andi r15,r15,0x1
8003da4: 5d f0 00 07 bne r15,r16,8003dc0 <_Heap_Walk+0x1d4>
(*printer)(
8003da8: 78 03 08 01 mvhi r3,0x801
8003dac: b9 c0 08 00 mv r1,r14
8003db0: 38 63 b6 f0 ori r3,r3,0xb6f0
8003db4: 34 02 00 01 mvi r2,1
8003db8: d9 80 00 00 call r12
8003dbc: e0 00 00 a5 bi 8004050 <_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;
8003dc0: 29 a4 00 08 lw r4,(r13+8)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
8003dc4: b8 40 a8 00 mv r21,r2
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
8003dc8: 29 b4 00 10 lw r20,(r13+16)
8003dcc: b9 a0 88 00 mv r17,r13
8003dd0: b8 80 b0 00 mv r22,r4
8003dd4: e0 00 00 2e bi 8003e8c <_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
8003dd8: 29 a1 00 20 lw r1,(r13+32)
8003ddc: 34 0f 00 00 mvi r15,0
8003de0: 52 c1 00 02 bgeu r22,r1,8003de8 <_Heap_Walk+0x1fc>
8003de4: e0 00 00 03 bi 8003df0 <_Heap_Walk+0x204>
8003de8: 29 af 00 24 lw r15,(r13+36)
8003dec: f1 f6 78 00 cmpgeu r15,r15,r22
);
return false;
}
if (
8003df0: 36 c1 00 08 addi r1,r22,8
8003df4: 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 ) ) {
8003df8: 5d e0 00 06 bne r15,r0,8003e10 <_Heap_Walk+0x224>
(*printer)(
8003dfc: 78 03 08 01 mvhi r3,0x801
8003e00: ba c0 20 00 mv r4,r22
8003e04: b9 c0 08 00 mv r1,r14
8003e08: 38 63 b7 08 ori r3,r3,0xb708
8003e0c: e0 00 00 8f bi 8004048 <_Heap_Walk+0x45c>
);
return false;
}
if (
8003e10: fb ff f3 ac calli 8000cc0 <__umodsi3>
8003e14: 44 20 00 06 be r1,r0,8003e2c <_Heap_Walk+0x240>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
8003e18: 78 03 08 01 mvhi r3,0x801
8003e1c: ba c0 20 00 mv r4,r22
8003e20: b9 c0 08 00 mv r1,r14
8003e24: 38 63 b7 28 ori r3,r3,0xb728
8003e28: e0 00 00 b8 bi 8004108 <_Heap_Walk+0x51c>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
8003e2c: 2a c3 00 04 lw r3,(r22+4)
8003e30: a0 75 18 00 and r3,r3,r21
8003e34: b6 c3 18 00 add r3,r22,r3
8003e38: 28 70 00 04 lw r16,(r3+4)
8003e3c: 22 10 00 01 andi r16,r16,0x1
8003e40: 46 01 00 07 be r16,r1,8003e5c <_Heap_Walk+0x270>
(*printer)(
8003e44: 78 03 08 01 mvhi r3,0x801
8003e48: b8 20 78 00 mv r15,r1
8003e4c: ba c0 20 00 mv r4,r22
8003e50: b9 c0 08 00 mv r1,r14
8003e54: 38 63 b7 58 ori r3,r3,0xb758
8003e58: e0 00 00 7c bi 8004048 <_Heap_Walk+0x45c>
);
return false;
}
if ( free_block->prev != prev_block ) {
8003e5c: 2a c5 00 0c lw r5,(r22+12)
8003e60: 44 b1 00 09 be r5,r17,8003e84 <_Heap_Walk+0x298>
(*printer)(
8003e64: 78 03 08 01 mvhi r3,0x801
8003e68: ba c0 20 00 mv r4,r22
8003e6c: b9 c0 08 00 mv r1,r14
8003e70: 38 63 b7 74 ori r3,r3,0xb774
8003e74: 34 02 00 01 mvi r2,1
8003e78: d9 80 00 00 call r12
8003e7c: ba 00 08 00 mv r1,r16
8003e80: e0 00 00 8b bi 80040ac <_Heap_Walk+0x4c0>
return false;
}
prev_block = free_block;
free_block = free_block->next;
8003e84: ba c0 88 00 mv r17,r22
8003e88: 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 ) {
8003e8c: 5e cd ff d3 bne r22,r13,8003dd8 <_Heap_Walk+0x1ec>
8003e90: e0 00 00 7a bi 8004078 <_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;
8003e94: 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 ) {
8003e98: 21 e2 00 01 andi r2,r15,0x1
8003e9c: 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);
8003ea0: b5 6f 80 00 add r16,r11,r15
8003ea4: 44 40 00 09 be r2,r0,8003ec8 <_Heap_Walk+0x2dc>
(*printer)(
8003ea8: 78 03 08 01 mvhi r3,0x801
8003eac: b9 c0 08 00 mv r1,r14
8003eb0: 34 02 00 00 mvi r2,0
8003eb4: 38 63 b7 a8 ori r3,r3,0xb7a8
8003eb8: b9 60 20 00 mv r4,r11
8003ebc: b9 e0 28 00 mv r5,r15
8003ec0: d9 80 00 00 call r12
8003ec4: e0 00 00 08 bi 8003ee4 <_Heap_Walk+0x2f8>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
8003ec8: 29 66 00 00 lw r6,(r11+0)
8003ecc: 78 03 08 01 mvhi r3,0x801
8003ed0: b9 c0 08 00 mv r1,r14
8003ed4: 38 63 b7 c0 ori r3,r3,0xb7c0
8003ed8: b9 60 20 00 mv r4,r11
8003edc: b9 e0 28 00 mv r5,r15
8003ee0: 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
8003ee4: 29 a1 00 20 lw r1,(r13+32)
8003ee8: 52 01 00 03 bgeu r16,r1,8003ef4 <_Heap_Walk+0x308> <== ALWAYS TAKEN
8003eec: 34 11 00 00 mvi r17,0 <== NOT EXECUTED
8003ef0: e0 00 00 03 bi 8003efc <_Heap_Walk+0x310> <== NOT EXECUTED
8003ef4: 29 b1 00 24 lw r17,(r13+36)
8003ef8: f2 30 88 00 cmpgeu r17,r17,r16
block_size,
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
8003efc: 5e 20 00 05 bne r17,r0,8003f10 <_Heap_Walk+0x324>
(*printer)(
8003f00: 78 03 08 01 mvhi r3,0x801
8003f04: b9 c0 08 00 mv r1,r14
8003f08: 38 63 b7 e8 ori r3,r3,0xb7e8
8003f0c: e0 00 00 1c bi 8003f7c <_Heap_Walk+0x390>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
8003f10: b9 e0 08 00 mv r1,r15
8003f14: bb 20 10 00 mv r2,r25
8003f18: fb ff f3 6a calli 8000cc0 <__umodsi3>
8003f1c: b8 20 88 00 mv r17,r1
8003f20: 44 20 00 09 be r1,r0,8003f44 <_Heap_Walk+0x358>
(*printer)(
8003f24: 78 03 08 01 mvhi r3,0x801
8003f28: b9 c0 08 00 mv r1,r14
8003f2c: 38 63 b8 18 ori r3,r3,0xb818
8003f30: b9 60 20 00 mv r4,r11
8003f34: b9 e0 28 00 mv r5,r15
8003f38: 34 02 00 01 mvi r2,1
8003f3c: d9 80 00 00 call r12
8003f40: e0 00 00 74 bi 8004110 <_Heap_Walk+0x524>
);
return false;
}
if ( block_size < min_block_size ) {
8003f44: 51 f3 00 0a bgeu r15,r19,8003f6c <_Heap_Walk+0x380>
(*printer)(
8003f48: 78 03 08 01 mvhi r3,0x801
8003f4c: b9 c0 08 00 mv r1,r14
8003f50: 38 63 b8 48 ori r3,r3,0xb848
8003f54: b9 60 20 00 mv r4,r11
8003f58: b9 e0 28 00 mv r5,r15
8003f5c: ba 60 30 00 mv r6,r19
8003f60: 34 02 00 01 mvi r2,1
8003f64: d9 80 00 00 call r12
8003f68: e0 00 00 09 bi 8003f8c <_Heap_Walk+0x3a0>
);
return false;
}
if ( next_block_begin <= block_begin ) {
8003f6c: 56 0b 00 0a bgu r16,r11,8003f94 <_Heap_Walk+0x3a8>
(*printer)(
8003f70: 78 03 08 01 mvhi r3,0x801
8003f74: b9 c0 08 00 mv r1,r14
8003f78: 38 63 b8 74 ori r3,r3,0xb874
8003f7c: b9 60 20 00 mv r4,r11
8003f80: ba 00 28 00 mv r5,r16
8003f84: 34 02 00 01 mvi r2,1
8003f88: d9 80 00 00 call r12
8003f8c: ba 20 08 00 mv r1,r17
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
8003f90: e0 00 00 47 bi 80040ac <_Heap_Walk+0x4c0>
}
if ( !_Heap_Is_prev_used( next_block ) ) {
8003f94: 2a 03 00 04 lw r3,(r16+4)
8003f98: 20 63 00 01 andi r3,r3,0x1
8003f9c: 5c 60 00 35 bne r3,r0,8004070 <_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;
8003fa0: 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)(
8003fa4: 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;
8003fa8: 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;
8003fac: 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;
8003fb0: 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);
8003fb4: 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;
8003fb8: ba a0 30 00 mv r6,r21
8003fbc: 44 a1 00 04 be r5,r1,8003fcc <_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)" : ""),
8003fc0: ba 80 30 00 mv r6,r20
8003fc4: 5c ad 00 02 bne r5,r13,8003fcc <_Heap_Walk+0x3e0>
8003fc8: 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)(
8003fcc: 29 67 00 08 lw r7,(r11+8)
8003fd0: ba e0 40 00 mv r8,r23
8003fd4: 44 e3 00 04 be r7,r3,8003fe4 <_Heap_Walk+0x3f8>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
8003fd8: ba 80 40 00 mv r8,r20
8003fdc: 5c ed 00 02 bne r7,r13,8003fe4 <_Heap_Walk+0x3f8>
8003fe0: 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)(
8003fe4: 78 03 08 01 mvhi r3,0x801
8003fe8: 5b 8a 00 54 sw (sp+84),r10
8003fec: b9 c0 08 00 mv r1,r14
8003ff0: 34 02 00 00 mvi r2,0
8003ff4: 38 63 b8 d8 ori r3,r3,0xb8d8
8003ff8: b9 60 20 00 mv r4,r11
8003ffc: 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 ) {
8004000: 2b 8a 00 54 lw r10,(sp+84)
8004004: 29 46 00 00 lw r6,(r10+0)
8004008: 46 26 00 0a be r17,r6,8004030 <_Heap_Walk+0x444>
(*printer)(
800400c: 78 03 08 01 mvhi r3,0x801
8004010: b9 c0 08 00 mv r1,r14
8004014: 38 63 b9 04 ori r3,r3,0xb904
8004018: b9 60 20 00 mv r4,r11
800401c: ba 20 28 00 mv r5,r17
8004020: b9 40 38 00 mv r7,r10
8004024: 34 02 00 01 mvi r2,1
8004028: d9 80 00 00 call r12
800402c: e0 00 00 39 bi 8004110 <_Heap_Walk+0x524>
);
return false;
}
if ( !prev_used ) {
8004030: 21 ef 00 01 andi r15,r15,0x1
8004034: 5d e0 00 09 bne r15,r0,8004058 <_Heap_Walk+0x46c>
(*printer)(
8004038: 78 03 08 01 mvhi r3,0x801
800403c: b9 c0 08 00 mv r1,r14
8004040: 38 63 b9 40 ori r3,r3,0xb940
8004044: b9 60 20 00 mv r4,r11
8004048: 34 02 00 01 mvi r2,1
800404c: d9 80 00 00 call r12
8004050: b9 e0 08 00 mv r1,r15
8004054: e0 00 00 16 bi 80040ac <_Heap_Walk+0x4c0>
8004058: 29 a3 00 08 lw r3,(r13+8)
800405c: e0 00 00 03 bi 8004068 <_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 ) {
8004060: 44 6b 00 04 be r3,r11,8004070 <_Heap_Walk+0x484>
return true;
}
free_block = free_block->next;
8004064: 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 ) {
8004068: 5c 6d ff fe bne r3,r13,8004060 <_Heap_Walk+0x474>
800406c: e0 00 00 23 bi 80040f8 <_Heap_Walk+0x50c>
8004070: ba 00 58 00 mv r11,r16
8004074: e0 00 00 0c bi 80040a4 <_Heap_Walk+0x4b8>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
8004078: 78 18 08 01 mvhi r24,0x801
800407c: 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)(
8004080: 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)" : ""),
8004084: 78 16 08 01 mvhi r22,0x801
8004088: 78 15 08 01 mvhi r21,0x801
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
800408c: 3b 18 b8 cc ori r24,r24,0xb8cc
8004090: 3a 94 b9 3c ori r20,r20,0xb93c
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
8004094: 3a f7 b8 c0 ori r23,r23,0xb8c0
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
8004098: 3a d6 b8 b4 ori r22,r22,0xb8b4
800409c: 3a b5 b8 a8 ori r21,r21,0xb8a8
- 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;
80040a0: 34 1b ff fe mvi fp,-2
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
80040a4: 5d 72 ff 7c bne r11,r18,8003e94 <_Heap_Walk+0x2a8>
80040a8: 34 01 00 01 mvi r1,1
block = next_block;
}
return true;
}
80040ac: 2b 9d 00 10 lw ra,(sp+16)
80040b0: 2b 8b 00 50 lw r11,(sp+80)
80040b4: 2b 8c 00 4c lw r12,(sp+76)
80040b8: 2b 8d 00 48 lw r13,(sp+72)
80040bc: 2b 8e 00 44 lw r14,(sp+68)
80040c0: 2b 8f 00 40 lw r15,(sp+64)
80040c4: 2b 90 00 3c lw r16,(sp+60)
80040c8: 2b 91 00 38 lw r17,(sp+56)
80040cc: 2b 92 00 34 lw r18,(sp+52)
80040d0: 2b 93 00 30 lw r19,(sp+48)
80040d4: 2b 94 00 2c lw r20,(sp+44)
80040d8: 2b 95 00 28 lw r21,(sp+40)
80040dc: 2b 96 00 24 lw r22,(sp+36)
80040e0: 2b 97 00 20 lw r23,(sp+32)
80040e4: 2b 98 00 1c lw r24,(sp+28)
80040e8: 2b 99 00 18 lw r25,(sp+24)
80040ec: 2b 9b 00 14 lw fp,(sp+20)
80040f0: 37 9c 00 54 addi sp,sp,84
80040f4: c3 a0 00 00 ret
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
80040f8: 78 03 08 01 mvhi r3,0x801
80040fc: b9 c0 08 00 mv r1,r14
8004100: 38 63 b9 70 ori r3,r3,0xb970
8004104: b9 60 20 00 mv r4,r11
8004108: 34 02 00 01 mvi r2,1
800410c: d9 80 00 00 call r12
8004110: 34 01 00 00 mvi r1,0
8004114: e3 ff ff e6 bi 80040ac <_Heap_Walk+0x4c0>
08002708 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
8002708: 37 9c ff e8 addi sp,sp,-24
800270c: 5b 8b 00 18 sw (sp+24),r11
8002710: 5b 8c 00 14 sw (sp+20),r12
8002714: 5b 8d 00 10 sw (sp+16),r13
8002718: 5b 8e 00 0c sw (sp+12),r14
800271c: 5b 8f 00 08 sw (sp+8),r15
8002720: 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;
8002724: 78 01 08 01 mvhi r1,0x801
8002728: 38 21 c0 c4 ori r1,r1,0xc0c4
drivers_in_table = Configuration.number_of_device_drivers;
number_of_drivers = Configuration.maximum_drivers;
800272c: 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;
8002730: 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;
8002734: 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 )
8002738: 51 ab 00 02 bgeu r13,r11,8002740 <_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 ) {
800273c: 5d 6d 00 08 bne r11,r13,800275c <_IO_Manager_initialization+0x54><== ALWAYS TAKEN
_IO_Driver_address_table = driver_table;
8002740: 78 02 08 01 mvhi r2,0x801
_IO_Number_of_drivers = number_of_drivers;
8002744: 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;
8002748: 38 42 ca 70 ori r2,r2,0xca70
_IO_Number_of_drivers = number_of_drivers;
800274c: 38 21 ca 6c ori r1,r1,0xca6c
* 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;
8002750: 58 4f 00 00 sw (r2+0),r15
_IO_Number_of_drivers = number_of_drivers;
8002754: 58 2d 00 00 sw (r1+0),r13
return;
8002758: e0 00 00 1b bi 80027c4 <_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 )
800275c: b5 6b 08 00 add r1,r11,r11
8002760: 34 02 00 03 mvi r2,3
8002764: b4 2b 08 00 add r1,r1,r11
8002768: fb ff f6 a2 calli 80001f0 <__ashlsi3>
800276c: 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 *)
8002770: f8 00 0c 56 calli 80058c8 <_Workspace_Allocate_or_fatal_error>
8002774: 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;
8002778: 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 *)
800277c: 38 84 ca 70 ori r4,r4,0xca70
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
8002780: 38 a5 ca 6c ori r5,r5,0xca6c
memset(
8002784: 34 02 00 00 mvi r2,0
8002788: 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;
800278c: 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];
8002790: 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 *)
8002794: 58 81 00 00 sw (r4+0),r1
8002798: 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];
800279c: 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(
80027a0: f8 00 24 fb calli 800bb8c <memset>
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
80027a4: e0 00 00 04 bi 80027b4 <_IO_Manager_initialization+0xac>
_IO_Driver_address_table[index] = driver_table[index];
80027a8: f8 00 24 9b calli 800ba14 <memcpy>
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
80027ac: 35 6b 00 01 addi r11,r11,1
80027b0: 35 8c 00 18 addi r12,r12,24
_IO_Driver_address_table[index] = driver_table[index];
80027b4: b5 cc 08 00 add r1,r14,r12
80027b8: b5 ec 10 00 add r2,r15,r12
80027bc: 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++ )
80027c0: 55 ab ff fa bgu r13,r11,80027a8 <_IO_Manager_initialization+0xa0>
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
80027c4: 2b 9d 00 04 lw ra,(sp+4)
80027c8: 2b 8b 00 18 lw r11,(sp+24)
80027cc: 2b 8c 00 14 lw r12,(sp+20)
80027d0: 2b 8d 00 10 lw r13,(sp+16)
80027d4: 2b 8e 00 0c lw r14,(sp+12)
80027d8: 2b 8f 00 08 lw r15,(sp+8)
80027dc: 37 9c 00 18 addi sp,sp,24
80027e0: c3 a0 00 00 ret
080033d8 <_ISR_Handler_initialization>:
*
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
80033d8: 37 9c ff f4 addi sp,sp,-12
80033dc: 5b 8b 00 0c sw (sp+12),r11
80033e0: 5b 8c 00 08 sw (sp+8),r12
80033e4: 5b 9d 00 04 sw (sp+4),ra
_ISR_Signals_to_thread_executing = false;
80033e8: 78 03 08 01 mvhi r3,0x801
_ISR_Nest_level = 0;
80033ec: 78 02 08 01 mvhi r2,0x801
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
_ISR_Signals_to_thread_executing = false;
80033f0: 34 04 00 00 mvi r4,0
80033f4: 38 63 c9 80 ori r3,r3,0xc980
_ISR_Nest_level = 0;
80033f8: 38 42 c8 c4 ori r2,r2,0xc8c4
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
_ISR_Signals_to_thread_executing = false;
80033fc: 30 64 00 00 sb (r3+0),r4
_ISR_Nest_level = 0;
8003400: 58 44 00 00 sw (r2+0),r4
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
_ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
8003404: 34 01 00 80 mvi r1,128
void _ISR_Handler_initialization( void )
{
_ISR_Signals_to_thread_executing = false;
_ISR_Nest_level = 0;
8003408: b8 80 60 00 mv r12,r4
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
_ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
800340c: f8 00 09 2f calli 80058c8 <_Workspace_Allocate_or_fatal_error>
_CPU_Initialize_vectors();
#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) )
8003410: 78 0b 08 01 mvhi r11,0x801
8003414: 78 02 08 01 mvhi r2,0x801
8003418: 38 42 c0 bc ori r2,r2,0xc0bc
800341c: 39 6b c0 c4 ori r11,r11,0xc0c4
8003420: 28 44 00 00 lw r4,(r2+0)
8003424: 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(
8003428: 78 02 08 01 mvhi r2,0x801
800342c: 38 42 c8 a8 ori r2,r2,0xc8a8
8003430: 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) )
8003434: 50 64 00 05 bgeu r3,r4,8003448 <_ISR_Handler_initialization+0x70><== ALWAYS TAKEN
_Internal_error_Occurred(
8003438: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
800343c: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8003440: 34 03 00 05 mvi r3,5 <== NOT EXECUTED
8003444: fb ff ff d6 calli 800339c <_Internal_error_Occurred> <== NOT EXECUTED
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
);
_CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
8003448: b8 60 08 00 mv r1,r3
800344c: f8 00 09 1f calli 80058c8 <_Workspace_Allocate_or_fatal_error>
Configuration.interrupt_stack_size
);
_CPU_Interrupt_stack_high = _Addresses_Add_offset(
8003450: 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(
8003454: 78 02 08 01 mvhi r2,0x801
Configuration.interrupt_stack_size
);
_CPU_Interrupt_stack_high = _Addresses_Add_offset(
8003458: 78 03 08 01 mvhi r3,0x801
800345c: 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(
8003460: 38 42 c8 3c ori r2,r2,0xc83c
Configuration.interrupt_stack_size
);
_CPU_Interrupt_stack_high = _Addresses_Add_offset(
8003464: 38 63 c7 c0 ori r3,r3,0xc7c0
8003468: 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(
800346c: 58 41 00 00 sw (r2+0),r1
#if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE )
_CPU_Install_interrupt_stack();
#endif
}
8003470: 2b 9d 00 04 lw ra,(sp+4)
8003474: 2b 8b 00 0c lw r11,(sp+12)
8003478: 2b 8c 00 08 lw r12,(sp+8)
800347c: 37 9c 00 0c addi sp,sp,12
8003480: c3 a0 00 00 ret
08003484 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
8003484: 37 9c ff ec addi sp,sp,-20
8003488: 5b 8b 00 14 sw (sp+20),r11
800348c: 5b 8c 00 10 sw (sp+16),r12
8003490: 5b 8d 00 0c sw (sp+12),r13
8003494: 5b 8e 00 08 sw (sp+8),r14
8003498: 5b 9d 00 04 sw (sp+4),ra
800349c: 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 )
80034a0: 28 21 00 18 lw r1,(r1+24)
80034a4: b8 20 60 00 mv r12,r1
80034a8: 44 20 00 20 be r1,r0,8003528 <_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 );
80034ac: 35 6d 00 20 addi r13,r11,32
80034b0: b9 a0 08 00 mv r1,r13
80034b4: f8 00 13 11 calli 80080f8 <_Chain_Get>
80034b8: b8 20 60 00 mv r12,r1
if ( information->auto_extend ) {
80034bc: 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 );
80034c0: b9 80 70 00 mv r14,r12
if ( information->auto_extend ) {
80034c4: 44 20 00 19 be r1,r0,8003528 <_Objects_Allocate+0xa4>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
80034c8: 5d 80 00 07 bne r12,r0,80034e4 <_Objects_Allocate+0x60>
_Objects_Extend_information( information );
80034cc: b9 60 08 00 mv r1,r11
80034d0: f8 00 00 1e calli 8003548 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
80034d4: b9 a0 08 00 mv r1,r13
80034d8: f8 00 13 08 calli 80080f8 <_Chain_Get>
80034dc: b8 20 60 00 mv r12,r1
}
if ( the_object ) {
80034e0: 44 2e 00 12 be r1,r14,8003528 <_Objects_Allocate+0xa4>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
80034e4: 29 83 00 08 lw r3,(r12+8)
80034e8: 29 61 00 08 lw r1,(r11+8)
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
80034ec: 2d 62 00 14 lhu r2,(r11+20)
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
80034f0: 20 63 ff ff andi r3,r3,0xffff
80034f4: 20 21 ff ff andi r1,r1,0xffff
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
80034f8: c8 61 08 00 sub r1,r3,r1
80034fc: f8 00 57 0b calli 8019128 <__udivsi3>
8003500: 34 02 00 02 mvi r2,2
8003504: fb ff f3 3b calli 80001f0 <__ashlsi3>
8003508: 29 62 00 30 lw r2,(r11+48)
information->inactive--;
800350c: 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 ]--;
8003510: b4 41 08 00 add r1,r2,r1
8003514: 28 22 00 00 lw r2,(r1+0)
information->inactive--;
8003518: 34 63 ff ff addi r3,r3,-1
800351c: 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 ]--;
8003520: 34 42 ff ff addi r2,r2,-1
8003524: 58 22 00 00 sw (r1+0),r2
information->inactive--;
}
}
return the_object;
}
8003528: b9 80 08 00 mv r1,r12
800352c: 2b 9d 00 04 lw ra,(sp+4)
8003530: 2b 8b 00 14 lw r11,(sp+20)
8003534: 2b 8c 00 10 lw r12,(sp+16)
8003538: 2b 8d 00 0c lw r13,(sp+12)
800353c: 2b 8e 00 08 lw r14,(sp+8)
8003540: 37 9c 00 14 addi sp,sp,20
8003544: c3 a0 00 00 ret
08003548 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
8003548: 37 9c ff c4 addi sp,sp,-60
800354c: 5b 8b 00 30 sw (sp+48),r11
8003550: 5b 8c 00 2c sw (sp+44),r12
8003554: 5b 8d 00 28 sw (sp+40),r13
8003558: 5b 8e 00 24 sw (sp+36),r14
800355c: 5b 8f 00 20 sw (sp+32),r15
8003560: 5b 90 00 1c sw (sp+28),r16
8003564: 5b 91 00 18 sw (sp+24),r17
8003568: 5b 92 00 14 sw (sp+20),r18
800356c: 5b 93 00 10 sw (sp+16),r19
8003570: 5b 94 00 0c sw (sp+12),r20
8003574: 5b 95 00 08 sw (sp+8),r21
8003578: 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 );
800357c: 28 2e 00 08 lw r14,(r1+8)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
8003580: 28 2f 00 34 lw r15,(r1+52)
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
8003584: 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 );
8003588: 21 ce ff ff andi r14,r14,0xffff
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
800358c: b9 e0 68 00 mv r13,r15
8003590: b9 c0 60 00 mv r12,r14
8003594: b9 e0 88 00 mv r17,r15
8003598: 45 e0 00 0f be r15,r0,80035d4 <_Objects_Extend_information+0x8c>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
800359c: 2c 30 00 14 lhu r16,(r1+20)
80035a0: 2c 21 00 10 lhu r1,(r1+16)
80035a4: 34 0d 00 00 mvi r13,0
80035a8: ba 00 10 00 mv r2,r16
80035ac: f8 00 56 df calli 8019128 <__udivsi3>
80035b0: 20 31 ff ff andi r17,r1,0xffff
80035b4: b9 e0 08 00 mv r1,r15
for ( ; block < block_count; block++ ) {
80035b8: e0 00 00 06 bi 80035d0 <_Objects_Extend_information+0x88>
if ( information->object_blocks[ block ] == NULL )
80035bc: 28 22 00 00 lw r2,(r1+0)
80035c0: 34 21 00 04 addi r1,r1,4
80035c4: 44 40 00 04 be r2,r0,80035d4 <_Objects_Extend_information+0x8c>
80035c8: 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++ ) {
80035cc: 35 ad 00 01 addi r13,r13,1
80035d0: 56 2d ff fb bgu r17,r13,80035bc <_Objects_Extend_information+0x74>
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
80035d4: 2d 61 00 14 lhu r1,(r11+20)
80035d8: 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 ) {
80035dc: 38 02 ff ff mvu r2,0xffff
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
80035e0: 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 ) {
80035e4: 56 82 00 97 bgu r20,r2,8003840 <_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;
80035e8: 29 62 00 18 lw r2,(r11+24)
80035ec: f8 00 56 50 calli 8018f2c <__mulsi3>
if ( information->auto_extend ) {
80035f0: 41 62 00 12 lbu r2,(r11+18)
80035f4: 44 40 00 05 be r2,r0,8003608 <_Objects_Extend_information+0xc0>
new_object_block = _Workspace_Allocate( block_size );
80035f8: f8 00 08 c3 calli 8005904 <_Workspace_Allocate>
80035fc: b8 20 78 00 mv r15,r1
if ( !new_object_block )
8003600: 5c 20 00 04 bne r1,r0,8003610 <_Objects_Extend_information+0xc8>
8003604: e0 00 00 8f bi 8003840 <_Objects_Extend_information+0x2f8>
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
8003608: f8 00 08 b0 calli 80058c8 <_Workspace_Allocate_or_fatal_error>
800360c: 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 ) {
8003610: 2d 61 00 10 lhu r1,(r11+16)
8003614: 54 2c 00 60 bgu r1,r12,8003794 <_Objects_Extend_information+0x24c>
*/
/*
* Up the block count and maximum
*/
block_count++;
8003618: 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 );
800361c: b6 52 08 00 add r1,r18,r18
8003620: b6 8e 10 00 add r2,r20,r14
8003624: b4 32 08 00 add r1,r1,r18
8003628: b4 41 08 00 add r1,r2,r1
800362c: 34 02 00 02 mvi r2,2
8003630: fb ff f2 f0 calli 80001f0 <__ashlsi3>
8003634: f8 00 08 b4 calli 8005904 <_Workspace_Allocate>
8003638: b8 20 80 00 mv r16,r1
if ( !object_blocks ) {
800363c: 5c 20 00 04 bne r1,r0,800364c <_Objects_Extend_information+0x104>
_Workspace_Free( new_object_block );
8003640: b9 e0 08 00 mv r1,r15
8003644: f8 00 08 bb calli 8005930 <_Workspace_Free>
return;
8003648: e0 00 00 7e bi 8003840 <_Objects_Extend_information+0x2f8>
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
800364c: ba 40 08 00 mv r1,r18
8003650: 34 02 00 02 mvi r2,2
8003654: fb ff f2 e7 calli 80001f0 <__ashlsi3>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
8003658: 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);
800365c: b6 01 98 00 add r19,r16,r1
8003660: b6 61 90 00 add r18,r19,r1
8003664: 54 4e 00 05 bgu r2,r14,8003678 <_Objects_Extend_information+0x130>
8003668: 34 01 00 00 mvi r1,0
800366c: 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;
8003670: b8 20 18 00 mv r3,r1
8003674: e0 00 00 19 bi 80036d8 <_Objects_Extend_information+0x190>
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
information->object_blocks,
block_count * sizeof(void*) );
8003678: ba 20 08 00 mv r1,r17
800367c: 34 02 00 02 mvi r2,2
8003680: fb ff f2 dc 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,
8003684: 29 62 00 34 lw r2,(r11+52)
information->object_blocks,
block_count * sizeof(void*) );
8003688: 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,
800368c: ba a0 18 00 mv r3,r21
8003690: ba 00 08 00 mv r1,r16
8003694: f8 00 20 e0 calli 800ba14 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
8003698: 29 62 00 30 lw r2,(r11+48)
800369c: ba a0 18 00 mv r3,r21
80036a0: ba 60 08 00 mv r1,r19
80036a4: f8 00 20 dc calli 800ba14 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
80036a8: 2d 61 00 10 lhu r1,(r11+16)
80036ac: 34 02 00 02 mvi r2,2
80036b0: b5 c1 08 00 add r1,r14,r1
80036b4: fb ff f2 cf calli 80001f0 <__ashlsi3>
80036b8: 29 62 00 1c lw r2,(r11+28)
80036bc: b8 20 18 00 mv r3,r1
80036c0: ba 40 08 00 mv r1,r18
80036c4: f8 00 20 d4 calli 800ba14 <memcpy>
80036c8: e0 00 00 05 bi 80036dc <_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;
80036cc: 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++ ) {
80036d0: 34 21 00 01 addi r1,r1,1
80036d4: 34 42 00 04 addi r2,r2,4
80036d8: 55 c1 ff fd bgu r14,r1,80036cc <_Objects_Extend_information+0x184>
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
80036dc: ba 20 08 00 mv r1,r17
80036e0: 34 02 00 02 mvi r2,2
80036e4: fb ff f2 c3 calli 80001f0 <__ashlsi3>
inactive_per_block[block_count] = 0;
80036e8: b6 61 10 00 add r2,r19,r1
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
80036ec: 34 0e 00 00 mvi r14,0
80036f0: b6 01 08 00 add r1,r16,r1
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
80036f4: 2d 71 00 14 lhu r17,(r11+20)
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
80036f8: 58 2e 00 00 sw (r1+0),r14
inactive_per_block[block_count] = 0;
80036fc: 58 4e 00 00 sw (r2+0),r14
for ( index=index_base ;
index < ( information->allocation_size + index_base );
8003700: b9 80 08 00 mv r1,r12
8003704: 34 02 00 02 mvi r2,2
8003708: fb ff f2 ba calli 80001f0 <__ashlsi3>
800370c: b5 91 88 00 add r17,r12,r17
8003710: b6 41 08 00 add r1,r18,r1
8003714: 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 ;
8003718: e0 00 00 04 bi 8003728 <_Objects_Extend_information+0x1e0>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
800371c: 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++ ) {
8003720: 34 42 00 01 addi r2,r2,1
8003724: 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 ;
8003728: 56 22 ff fd bgu r17,r2,800371c <_Objects_Extend_information+0x1d4>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
800372c: 90 00 88 00 rcsr r17,IE
8003730: 34 01 ff fe mvi r1,-2
8003734: a2 21 08 00 and r1,r17,r1
8003738: 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(
800373c: 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;
8003740: 22 94 ff ff andi r20,r20,0xffff
8003744: 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;
8003748: 59 73 00 30 sw (r11+48),r19
information->local_table = local_table;
800374c: 59 72 00 1c sw (r11+28),r18
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
8003750: 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(
8003754: 34 02 00 18 mvi r2,24
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
8003758: 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(
800375c: fb ff f2 a5 calli 80001f0 <__ashlsi3>
8003760: 78 02 00 01 mvhi r2,0x1
8003764: 38 42 00 00 ori r2,r2,0x0
8003768: b8 22 80 00 or r16,r1,r2
800376c: 2d 61 00 04 lhu r1,(r11+4)
8003770: 34 02 00 1b mvi r2,27
8003774: fb ff f2 9f calli 80001f0 <__ashlsi3>
8003778: ba 01 08 00 or r1,r16,r1
800377c: b8 34 a0 00 or r20,r1,r20
8003780: 59 74 00 0c sw (r11+12),r20
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
8003784: d0 11 00 00 wcsr IE,r17
if ( old_tables )
8003788: 45 c0 00 03 be r14,r0,8003794 <_Objects_Extend_information+0x24c>
_Workspace_Free( old_tables );
800378c: b9 c0 08 00 mv r1,r14
8003790: f8 00 08 68 calli 8005930 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
8003794: b9 a0 08 00 mv r1,r13
8003798: 34 02 00 02 mvi r2,2
800379c: fb ff f2 95 calli 80001f0 <__ashlsi3>
80037a0: b8 20 80 00 mv r16,r1
80037a4: 29 61 00 34 lw r1,(r11+52)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
80037a8: 2d 63 00 14 lhu r3,(r11+20)
80037ac: 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;
80037b0: b4 30 08 00 add r1,r1,r16
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
80037b4: 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;
80037b8: 58 2f 00 00 sw (r1+0),r15
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
80037bc: b9 e0 10 00 mv r2,r15
80037c0: 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(
80037c4: 78 0d 00 01 mvhi r13,0x1
information->object_blocks[ block ] = new_object_block;
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
80037c8: f8 00 12 5b calli 8008134 <_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 ) {
80037cc: b9 c0 88 00 mv r17,r14
the_object->id = _Objects_Build_id(
80037d0: 39 ad 00 00 ori r13,r13,0x0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
80037d4: 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 ) {
80037d8: e0 00 00 0e bi 8003810 <_Objects_Extend_information+0x2c8>
the_object->id = _Objects_Build_id(
80037dc: 29 61 00 00 lw r1,(r11+0)
80037e0: fb ff f2 84 calli 80001f0 <__ashlsi3>
80037e4: b8 2d 90 00 or r18,r1,r13
80037e8: 2d 61 00 04 lhu r1,(r11+4)
80037ec: 34 02 00 1b mvi r2,27
80037f0: fb ff f2 80 calli 80001f0 <__ashlsi3>
80037f4: ba 41 10 00 or r2,r18,r1
80037f8: b8 4c 10 00 or r2,r2,r12
80037fc: 59 c2 00 08 sw (r14+8),r2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
8003800: b9 e0 08 00 mv r1,r15
8003804: b9 c0 10 00 mv r2,r14
8003808: fb ff fc 97 calli 8002a64 <_Chain_Append>
index++;
800380c: 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 ) {
8003810: ba 20 08 00 mv r1,r17
8003814: f8 00 12 39 calli 80080f8 <_Chain_Get>
8003818: b8 20 70 00 mv r14,r1
the_object->id = _Objects_Build_id(
800381c: 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 ) {
8003820: 5c 20 ff ef bne r1,r0,80037dc <_Objects_Extend_information+0x294>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
8003824: 2d 62 00 14 lhu r2,(r11+20)
information->inactive =
8003828: 2d 61 00 2c lhu r1,(r11+44)
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
800382c: 29 63 00 30 lw r3,(r11+48)
information->inactive =
8003830: b4 41 08 00 add r1,r2,r1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
8003834: b4 70 80 00 add r16,r3,r16
information->inactive =
8003838: 0d 61 00 2c sh (r11+44),r1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
800383c: 5a 02 00 00 sw (r16+0),r2
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
}
8003840: 2b 9d 00 04 lw ra,(sp+4)
8003844: 2b 8b 00 30 lw r11,(sp+48)
8003848: 2b 8c 00 2c lw r12,(sp+44)
800384c: 2b 8d 00 28 lw r13,(sp+40)
8003850: 2b 8e 00 24 lw r14,(sp+36)
8003854: 2b 8f 00 20 lw r15,(sp+32)
8003858: 2b 90 00 1c lw r16,(sp+28)
800385c: 2b 91 00 18 lw r17,(sp+24)
8003860: 2b 92 00 14 lw r18,(sp+20)
8003864: 2b 93 00 10 lw r19,(sp+16)
8003868: 2b 94 00 0c lw r20,(sp+12)
800386c: 2b 95 00 08 lw r21,(sp+8)
8003870: 37 9c 00 3c addi sp,sp,60
8003874: c3 a0 00 00 ret
08003970 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
8003970: 37 9c ff f4 addi sp,sp,-12
8003974: 5b 8b 00 0c sw (sp+12),r11
8003978: 5b 8c 00 08 sw (sp+8),r12
800397c: 5b 9d 00 04 sw (sp+4),ra
8003980: b8 40 58 00 mv r11,r2
8003984: b8 20 60 00 mv r12,r1
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
8003988: 44 40 00 14 be r2,r0,80039d8 <_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 );
800398c: f8 00 13 bf calli 8008888 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
8003990: 44 20 00 12 be r1,r0,80039d8 <_Objects_Get_information+0x68>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
8003994: 55 61 00 11 bgu r11,r1,80039d8 <_Objects_Get_information+0x68>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
8003998: b9 80 08 00 mv r1,r12
800399c: 34 02 00 02 mvi r2,2
80039a0: 78 0c 08 01 mvhi r12,0x801
80039a4: 39 8c c7 c4 ori r12,r12,0xc7c4
80039a8: fb ff f2 12 calli 80001f0 <__ashlsi3>
80039ac: b5 81 08 00 add r1,r12,r1
80039b0: 28 2c 00 00 lw r12,(r1+0)
80039b4: 45 80 00 09 be r12,r0,80039d8 <_Objects_Get_information+0x68><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
80039b8: b9 60 08 00 mv r1,r11
80039bc: 34 02 00 02 mvi r2,2
80039c0: fb ff f2 0c calli 80001f0 <__ashlsi3>
80039c4: b5 81 08 00 add r1,r12,r1
80039c8: 28 21 00 00 lw r1,(r1+0)
if ( !info )
80039cc: 44 20 00 04 be r1,r0,80039dc <_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 )
80039d0: 2c 22 00 10 lhu r2,(r1+16)
80039d4: 5c 40 00 02 bne r2,r0,80039dc <_Objects_Get_information+0x6c>
80039d8: 34 01 00 00 mvi r1,0
return NULL;
#endif
return info;
}
80039dc: 2b 9d 00 04 lw ra,(sp+4)
80039e0: 2b 8b 00 0c lw r11,(sp+12)
80039e4: 2b 8c 00 08 lw r12,(sp+8)
80039e8: 37 9c 00 0c addi sp,sp,12
80039ec: c3 a0 00 00 ret
08016da8 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
8016da8: 37 9c ff f4 addi sp,sp,-12
8016dac: 5b 8b 00 0c sw (sp+12),r11
8016db0: 5b 8c 00 08 sw (sp+8),r12
8016db4: 5b 9d 00 04 sw (sp+4),ra
8016db8: 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;
8016dbc: 28 21 00 08 lw r1,(r1+8)
if ( information->maximum >= index ) {
8016dc0: 2c 85 00 10 lhu r5,(r4+16)
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
8016dc4: 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;
8016dc8: c8 41 08 00 sub r1,r2,r1
8016dcc: 34 21 00 01 addi r1,r1,1
if ( information->maximum >= index ) {
8016dd0: 54 25 00 0a bgu r1,r5,8016df8 <_Objects_Get_no_protection+0x50>
if ( (the_object = information->local_table[ index ]) != NULL ) {
8016dd4: 28 8c 00 1c lw r12,(r4+28)
8016dd8: 34 02 00 02 mvi r2,2
8016ddc: fb ff dc 2f calli 800de98 <__ashlsi3>
8016de0: b5 81 08 00 add r1,r12,r1
8016de4: 28 21 00 00 lw r1,(r1+0)
8016de8: 44 20 00 04 be r1,r0,8016df8 <_Objects_Get_no_protection+0x50><== NEVER TAKEN
*location = OBJECTS_LOCAL;
8016dec: 34 02 00 00 mvi r2,0
8016df0: 59 62 00 00 sw (r11+0),r2
return the_object;
8016df4: e0 00 00 04 bi 8016e04 <_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;
8016df8: 34 01 00 01 mvi r1,1
8016dfc: 59 61 00 00 sw (r11+0),r1
8016e00: 34 01 00 00 mvi r1,0
return NULL;
}
8016e04: 2b 9d 00 04 lw ra,(sp+4)
8016e08: 2b 8b 00 0c lw r11,(sp+12)
8016e0c: 2b 8c 00 08 lw r12,(sp+8)
8016e10: 37 9c 00 0c addi sp,sp,12
8016e14: c3 a0 00 00 ret
0800538c <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
800538c: 37 9c ff ec addi sp,sp,-20
8005390: 5b 8b 00 10 sw (sp+16),r11
8005394: 5b 8c 00 0c sw (sp+12),r12
8005398: 5b 8d 00 08 sw (sp+8),r13
800539c: 5b 9d 00 04 sw (sp+4),ra
80053a0: b8 40 68 00 mv r13,r2
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
80053a4: b8 20 58 00 mv r11,r1
80053a8: 5c 20 00 05 bne r1,r0,80053bc <_Objects_Id_to_name+0x30>
80053ac: 78 01 08 02 mvhi r1,0x802
80053b0: 38 21 19 40 ori r1,r1,0x1940
80053b4: 28 21 00 00 lw r1,(r1+0)
80053b8: 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);
80053bc: 34 02 00 18 mvi r2,24
80053c0: b9 60 08 00 mv r1,r11
80053c4: fb ff f0 ae calli 800167c <__lshrsi3>
80053c8: 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 )
80053cc: 34 23 ff ff addi r3,r1,-1
80053d0: 34 02 00 03 mvi r2,3
80053d4: 54 62 00 13 bgu r3,r2,8005420 <_Objects_Id_to_name+0x94>
80053d8: e0 00 00 19 bi 800543c <_Objects_Id_to_name+0xb0>
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
80053dc: 34 02 00 1b mvi r2,27
80053e0: b9 60 08 00 mv r1,r11
80053e4: fb ff f0 a6 calli 800167c <__lshrsi3>
80053e8: 34 02 00 02 mvi r2,2
80053ec: fb ff f0 7c calli 80015dc <__ashlsi3>
80053f0: b5 81 08 00 add r1,r12,r1
80053f4: 28 21 00 00 lw r1,(r1+0)
if ( !information )
80053f8: 44 20 00 0a be r1,r0,8005420 <_Objects_Id_to_name+0x94> <== NEVER TAKEN
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
80053fc: b9 60 10 00 mv r2,r11
8005400: 37 83 00 14 addi r3,sp,20
8005404: f8 00 14 e9 calli 800a7a8 <_Objects_Get>
if ( !the_object )
8005408: 44 20 00 06 be r1,r0,8005420 <_Objects_Id_to_name+0x94>
return OBJECTS_INVALID_ID;
*name = the_object->name;
800540c: 28 21 00 0c lw r1,(r1+12)
8005410: 59 a1 00 00 sw (r13+0),r1
_Thread_Enable_dispatch();
8005414: f8 00 02 4d calli 8005d48 <_Thread_Enable_dispatch>
8005418: 34 01 00 00 mvi r1,0
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
800541c: e0 00 00 02 bi 8005424 <_Objects_Id_to_name+0x98>
8005420: 34 01 00 03 mvi r1,3
}
8005424: 2b 9d 00 04 lw ra,(sp+4)
8005428: 2b 8b 00 10 lw r11,(sp+16)
800542c: 2b 8c 00 0c lw r12,(sp+12)
8005430: 2b 8d 00 08 lw r13,(sp+8)
8005434: 37 9c 00 14 addi sp,sp,20
8005438: 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 ] )
800543c: 78 0c 08 02 mvhi r12,0x802
8005440: 34 02 00 02 mvi r2,2
8005444: 39 8c 18 1c ori r12,r12,0x181c
8005448: fb ff f0 65 calli 80015dc <__ashlsi3>
800544c: b5 81 08 00 add r1,r12,r1
8005450: 28 2c 00 00 lw r12,(r1+0)
8005454: 5d 80 ff e2 bne r12,r0,80053dc <_Objects_Id_to_name+0x50>
8005458: e3 ff ff f2 bi 8005420 <_Objects_Id_to_name+0x94>
080039f0 <_Objects_Initialize_information>:
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
80039f0: 37 9c ff e4 addi sp,sp,-28
80039f4: 5b 8b 00 1c sw (sp+28),r11
80039f8: 5b 8c 00 18 sw (sp+24),r12
80039fc: 5b 8d 00 14 sw (sp+20),r13
8003a00: 5b 8e 00 10 sw (sp+16),r14
8003a04: 5b 8f 00 0c sw (sp+12),r15
8003a08: 5b 90 00 08 sw (sp+8),r16
8003a0c: 5b 9d 00 04 sw (sp+4),ra
#endif
information->the_api = the_api;
information->the_class = the_class;
information->size = size;
information->local_table = 0;
8003a10: 34 06 00 00 mvi r6,0
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
8003a14: b8 20 58 00 mv r11,r1
8003a18: 20 a5 ff ff andi r5,r5,0xffff
8003a1c: b8 40 78 00 mv r15,r2
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
information->size = size;
8003a20: 58 25 00 18 sw (r1+24),r5
/*
* Set the maximum value to 0. It will be updated when objects are
* added to the inactive set from _Objects_Extend_information()
*/
information->maximum = 0;
8003a24: 0c 26 00 10 sh (r1+16),r6
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
8003a28: 0d 63 00 04 sh (r11+4),r3
information->size = size;
information->local_table = 0;
8003a2c: 58 26 00 1c sw (r1+28),r6
information->inactive_per_block = 0;
8003a30: 58 26 00 30 sw (r1+48),r6
information->object_blocks = 0;
8003a34: 58 26 00 34 sw (r1+52),r6
information->inactive = 0;
8003a38: 0c 26 00 2c sh (r1+44),r6
uint32_t maximum_per_allocation;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
8003a3c: 59 62 00 00 sw (r11+0),r2
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
8003a40: 78 10 08 01 mvhi r16,0x801
8003a44: 34 02 00 02 mvi r2,2
8003a48: b9 e0 08 00 mv r1,r15
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
8003a4c: b8 60 70 00 mv r14,r3
8003a50: b8 80 60 00 mv r12,r4
8003a54: b8 e0 68 00 mv r13,r7
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
8003a58: 3a 10 c7 c4 ori r16,r16,0xc7c4
8003a5c: fb ff f1 e5 calli 80001f0 <__ashlsi3>
8003a60: b6 01 08 00 add r1,r16,r1
8003a64: 28 30 00 00 lw r16,(r1+0)
8003a68: 34 02 00 02 mvi r2,2
8003a6c: b9 c0 08 00 mv r1,r14
8003a70: fb ff f1 e0 calli 80001f0 <__ashlsi3>
8003a74: b6 01 08 00 add r1,r16,r1
8003a78: 58 2b 00 00 sw (r1+0),r11
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
8003a7c: 34 02 00 1f mvi r2,31
8003a80: b9 80 08 00 mv r1,r12
8003a84: fb ff f2 03 calli 8000290 <__lshrsi3>
8003a88: 20 23 00 ff andi r3,r1,0xff
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
8003a8c: 78 02 7f ff mvhi r2,0x7fff
8003a90: 38 42 ff ff ori r2,r2,0xffff
_Objects_Information_table[ the_api ][ the_class ] = information;
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
8003a94: 31 63 00 12 sb (r11+18),r3
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
8003a98: a1 82 60 00 and r12,r12,r2
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
8003a9c: 44 60 00 06 be r3,r0,8003ab4 <_Objects_Initialize_information+0xc4>
8003aa0: 5d 80 00 05 bne r12,r0,8003ab4 <_Objects_Initialize_information+0xc4>
_Internal_error_Occurred(
8003aa4: b9 80 08 00 mv r1,r12
8003aa8: 34 02 00 01 mvi r2,1
8003aac: 34 03 00 14 mvi r3,20
8003ab0: fb ff fe 3b calli 800339c <_Internal_error_Occurred>
information->allocation_size = maximum_per_allocation;
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
8003ab4: 78 01 08 01 mvhi r1,0x801
8003ab8: 38 21 c6 20 ori r1,r1,0xc620
8003abc: 59 61 00 1c sw (r11+28),r1
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
8003ac0: 34 02 00 18 mvi r2,24
8003ac4: b9 e0 08 00 mv r1,r15
}
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum_per_allocation;
8003ac8: 0d 6c 00 14 sh (r11+20),r12
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
8003acc: fb ff f1 c9 calli 80001f0 <__ashlsi3>
8003ad0: 78 02 00 01 mvhi r2,0x1
8003ad4: 38 42 00 00 ori r2,r2,0x0
8003ad8: b8 22 78 00 or r15,r1,r2
8003adc: 34 02 00 1b mvi r2,27
8003ae0: b9 c0 08 00 mv r1,r14
8003ae4: fb ff f1 c3 calli 80001f0 <__ashlsi3>
8003ae8: 7d 83 00 00 cmpnei r3,r12,0
8003aec: b9 e1 08 00 or r1,r15,r1
8003af0: b8 23 08 00 or r1,r1,r3
8003af4: 59 61 00 08 sw (r11+8),r1
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
8003af8: 21 a2 00 03 andi r2,r13,0x3
8003afc: b9 a0 08 00 mv r1,r13
8003b00: 44 40 00 04 be r2,r0,8003b10 <_Objects_Initialize_information+0x120><== ALWAYS TAKEN
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
8003b04: 35 ad 00 04 addi r13,r13,4 <== NOT EXECUTED
8003b08: 34 01 ff fc mvi r1,-4 <== NOT EXECUTED
8003b0c: a1 a1 08 00 and r1,r13,r1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
8003b10: 35 63 00 24 addi r3,r11,36
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
8003b14: 35 62 00 20 addi r2,r11,32
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
8003b18: 0d 61 00 38 sh (r11+56),r1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
8003b1c: 34 01 00 00 mvi r1,0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
8003b20: 59 63 00 20 sw (r11+32),r3
the_chain->permanent_null = NULL;
8003b24: 59 61 00 24 sw (r11+36),r1
the_chain->last = _Chain_Head(the_chain);
8003b28: 59 62 00 28 sw (r11+40),r2
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
8003b2c: 45 81 00 03 be r12,r1,8003b38 <_Objects_Initialize_information+0x148>
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
8003b30: b9 60 08 00 mv r1,r11
8003b34: fb ff fe 85 calli 8003548 <_Objects_Extend_information>
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
8003b38: 2b 9d 00 04 lw ra,(sp+4)
8003b3c: 2b 8b 00 1c lw r11,(sp+28)
8003b40: 2b 8c 00 18 lw r12,(sp+24)
8003b44: 2b 8d 00 14 lw r13,(sp+20)
8003b48: 2b 8e 00 10 lw r14,(sp+16)
8003b4c: 2b 8f 00 0c lw r15,(sp+12)
8003b50: 2b 90 00 08 lw r16,(sp+8)
8003b54: 37 9c 00 1c addi sp,sp,28
8003b58: c3 a0 00 00 ret
08007df0 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
8007df0: 37 9c ff f0 addi sp,sp,-16
8007df4: 5b 8b 00 0c sw (sp+12),r11
8007df8: 5b 8c 00 08 sw (sp+8),r12
8007dfc: 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 ];
8007e00: 28 2b 01 24 lw r11,(r1+292)
if ( !api )
8007e04: 45 60 00 1b be r11,r0,8007e70 <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
8007e08: 90 00 08 00 rcsr r1,IE
8007e0c: 34 02 ff fe mvi r2,-2
8007e10: a0 22 10 00 and r2,r1,r2
8007e14: d0 02 00 00 wcsr IE,r2
signal_set = asr->signals_posted;
asr->signals_posted = 0;
8007e18: 34 02 00 00 mvi r2,0
*/
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
8007e1c: 29 6c 00 14 lw r12,(r11+20)
asr->signals_posted = 0;
8007e20: 59 62 00 14 sw (r11+20),r2
_ISR_Enable( level );
8007e24: d0 01 00 00 wcsr IE,r1
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
8007e28: 45 80 00 12 be r12,r0,8007e70 <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN
return;
asr->nest_level += 1;
8007e2c: 29 63 00 1c lw r3,(r11+28)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
8007e30: 29 61 00 10 lw r1,(r11+16)
8007e34: 38 02 ff ff mvu r2,0xffff
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
8007e38: 34 63 00 01 addi r3,r3,1
8007e3c: 59 63 00 1c sw (r11+28),r3
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
8007e40: 37 83 00 10 addi r3,sp,16
8007e44: f8 00 09 36 calli 800a31c <rtems_task_mode>
(*asr->handler)( signal_set );
8007e48: 29 62 00 0c lw r2,(r11+12)
8007e4c: b9 80 08 00 mv r1,r12
8007e50: d8 40 00 00 call r2
asr->nest_level -= 1;
8007e54: 29 63 00 1c lw r3,(r11+28)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
8007e58: 2b 81 00 10 lw r1,(sp+16)
8007e5c: 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;
8007e60: 34 63 ff ff addi r3,r3,-1
8007e64: 59 63 00 1c sw (r11+28),r3
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
8007e68: 37 83 00 10 addi r3,sp,16
8007e6c: f8 00 09 2c calli 800a31c <rtems_task_mode>
}
8007e70: 2b 9d 00 04 lw ra,(sp+4)
8007e74: 2b 8b 00 0c lw r11,(sp+12)
8007e78: 2b 8c 00 08 lw r12,(sp+8)
8007e7c: 37 9c 00 10 addi sp,sp,16
8007e80: c3 a0 00 00 ret
08003c38 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
8003c38: 37 9c ff f4 addi sp,sp,-12
8003c3c: 5b 8b 00 08 sw (sp+8),r11
8003c40: 5b 9d 00 04 sw (sp+4),ra
8003c44: b8 20 10 00 mv r2,r1
8003c48: 78 01 08 02 mvhi r1,0x802
8003c4c: 38 21 28 04 ori r1,r1,0x2804
8003c50: 37 83 00 0c addi r3,sp,12
8003c54: f8 00 07 b6 calli 8005b2c <_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 ) {
8003c58: 2b 82 00 0c lw r2,(sp+12)
8003c5c: b8 20 58 00 mv r11,r1
8003c60: 5c 40 00 21 bne r2,r0,8003ce4 <_Rate_monotonic_Timeout+0xac><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
8003c64: 28 21 00 40 lw r1,(r1+64)
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
8003c68: 28 23 00 10 lw r3,(r1+16)
8003c6c: 20 63 40 00 andi r3,r3,0x4000
8003c70: 44 62 00 08 be r3,r2,8003c90 <_Rate_monotonic_Timeout+0x58>
the_thread->Wait.id == the_period->Object.id ) {
8003c74: 28 23 00 20 lw r3,(r1+32)
8003c78: 29 62 00 08 lw r2,(r11+8)
8003c7c: 5c 62 00 05 bne r3,r2,8003c90 <_Rate_monotonic_Timeout+0x58>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
8003c80: 78 02 10 03 mvhi r2,0x1003
8003c84: 38 42 ff f8 ori r2,r2,0xfff8
8003c88: f8 00 09 0f calli 80060c4 <_Thread_Clear_state>
8003c8c: e0 00 00 06 bi 8003ca4 <_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 ) {
8003c90: 29 62 00 38 lw r2,(r11+56)
8003c94: 34 01 00 01 mvi r1,1
8003c98: 5c 41 00 0c bne r2,r1,8003cc8 <_Rate_monotonic_Timeout+0x90><== ALWAYS TAKEN
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
8003c9c: 34 01 00 03 mvi r1,3 <== NOT EXECUTED
8003ca0: 59 61 00 38 sw (r11+56),r1 <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
8003ca4: b9 60 08 00 mv r1,r11
8003ca8: fb ff fd f3 calli 8003474 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
8003cac: 29 61 00 3c lw r1,(r11+60)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8003cb0: 35 62 00 10 addi r2,r11,16
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
8003cb4: 59 61 00 1c sw (r11+28),r1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8003cb8: 78 01 08 02 mvhi r1,0x802
8003cbc: 38 21 2a 18 ori r1,r1,0x2a18
8003cc0: f8 00 0f 9f calli 8007b3c <_Watchdog_Insert>
8003cc4: e0 00 00 03 bi 8003cd0 <_Rate_monotonic_Timeout+0x98>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
8003cc8: 34 01 00 04 mvi r1,4
8003ccc: 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;
8003cd0: 78 01 08 02 mvhi r1,0x802
8003cd4: 38 21 29 3c ori r1,r1,0x293c
8003cd8: 28 22 00 00 lw r2,(r1+0)
8003cdc: 34 42 ff ff addi r2,r2,-1
8003ce0: 58 22 00 00 sw (r1+0),r2
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
8003ce4: 2b 9d 00 04 lw ra,(sp+4)
8003ce8: 2b 8b 00 08 lw r11,(sp+8)
8003cec: 37 9c 00 0c addi sp,sp,12
8003cf0: c3 a0 00 00 ret
080035ec <_Rate_monotonic_Update_statistics>:
}
void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
80035ec: 37 9c ff e4 addi sp,sp,-28
80035f0: 5b 8b 00 0c sw (sp+12),r11
80035f4: 5b 8c 00 08 sw (sp+8),r12
80035f8: 5b 9d 00 04 sw (sp+4),ra
80035fc: b8 20 58 00 mv r11,r1
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
8003600: 28 21 00 54 lw r1,(r1+84)
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
8003604: 29 62 00 38 lw r2,(r11+56)
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
8003608: 34 21 00 01 addi r1,r1,1
800360c: 59 61 00 54 sw (r11+84),r1
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
8003610: 34 01 00 04 mvi r1,4
8003614: 5c 41 00 04 bne r2,r1,8003624 <_Rate_monotonic_Update_statistics+0x38>
stats->missed_count++;
8003618: 29 61 00 58 lw r1,(r11+88)
800361c: 34 21 00 01 addi r1,r1,1
8003620: 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 );
8003624: 37 8c 00 18 addi r12,sp,24
8003628: b9 60 08 00 mv r1,r11
800362c: 37 82 00 10 addi r2,sp,16
8003630: b9 80 18 00 mv r3,r12
8003634: fb ff ff b5 calli 8003508 <_Rate_monotonic_Get_status>
if (!valid_status)
8003638: 44 20 00 28 be r1,r0,80036d8 <_Rate_monotonic_Update_statistics+0xec><== NEVER TAKEN
/*
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
800363c: b9 80 10 00 mv r2,r12
8003640: 35 61 00 6c addi r1,r11,108
8003644: f8 00 0f ed calli 80075f8 <_Timespec_Add_to>
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
8003648: b9 80 08 00 mv r1,r12
800364c: 35 62 00 5c addi r2,r11,92
8003650: f8 00 10 47 calli 800776c <_Timespec_Less_than>
8003654: 44 20 00 05 be r1,r0,8003668 <_Rate_monotonic_Update_statistics+0x7c>
stats->min_cpu_time = executed;
8003658: 2b 81 00 18 lw r1,(sp+24)
800365c: 59 61 00 5c sw (r11+92),r1
8003660: 2b 81 00 1c lw r1,(sp+28)
8003664: 59 61 00 60 sw (r11+96),r1
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
8003668: 37 81 00 18 addi r1,sp,24
800366c: 35 62 00 64 addi r2,r11,100
8003670: f8 00 10 33 calli 800773c <_Timespec_Greater_than>
8003674: 44 20 00 05 be r1,r0,8003688 <_Rate_monotonic_Update_statistics+0x9c>
stats->max_cpu_time = executed;
8003678: 2b 81 00 18 lw r1,(sp+24)
800367c: 59 61 00 64 sw (r11+100),r1
8003680: 2b 81 00 1c lw r1,(sp+28)
8003684: 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 );
8003688: 37 8c 00 10 addi r12,sp,16
800368c: b9 80 10 00 mv r2,r12
8003690: 35 61 00 84 addi r1,r11,132
8003694: f8 00 0f d9 calli 80075f8 <_Timespec_Add_to>
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
8003698: b9 80 08 00 mv r1,r12
800369c: 35 62 00 74 addi r2,r11,116
80036a0: f8 00 10 33 calli 800776c <_Timespec_Less_than>
80036a4: 44 20 00 05 be r1,r0,80036b8 <_Rate_monotonic_Update_statistics+0xcc>
stats->min_wall_time = since_last_period;
80036a8: 2b 81 00 10 lw r1,(sp+16)
80036ac: 59 61 00 74 sw (r11+116),r1
80036b0: 2b 81 00 14 lw r1,(sp+20)
80036b4: 59 61 00 78 sw (r11+120),r1
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
80036b8: 37 81 00 10 addi r1,sp,16
80036bc: 35 62 00 7c addi r2,r11,124
80036c0: f8 00 10 1f calli 800773c <_Timespec_Greater_than>
80036c4: 44 20 00 05 be r1,r0,80036d8 <_Rate_monotonic_Update_statistics+0xec>
stats->max_wall_time = since_last_period;
80036c8: 2b 81 00 14 lw r1,(sp+20)
80036cc: 59 61 00 80 sw (r11+128),r1
80036d0: 2b 81 00 10 lw r1,(sp+16)
80036d4: 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
}
80036d8: 2b 9d 00 04 lw ra,(sp+4)
80036dc: 2b 8b 00 0c lw r11,(sp+12)
80036e0: 2b 8c 00 08 lw r12,(sp+8)
80036e4: 37 9c 00 1c addi sp,sp,28
80036e8: c3 a0 00 00 ret
0800834c <_TOD_Get>:
*/
void _TOD_Get(
struct timespec *time
)
{
800834c: 37 9c ff e4 addi sp,sp,-28
8008350: 5b 8b 00 0c sw (sp+12),r11
8008354: 5b 8c 00 08 sw (sp+8),r12
8008358: 5b 9d 00 04 sw (sp+4),ra
800835c: 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 );
8008360: 90 00 60 00 rcsr r12,IE
8008364: 34 01 ff fe mvi r1,-2
8008368: a1 81 08 00 and r1,r12,r1
800836c: d0 01 00 00 wcsr IE,r1
now = _TOD_Now;
8008370: 78 02 08 01 mvhi r2,0x801
8008374: 38 42 c8 bc ori r2,r2,0xc8bc
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008378: 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;
800837c: 28 41 00 04 lw r1,(r2+4)
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008380: 38 63 c9 cc ori r3,r3,0xc9cc
/* assume time checked for NULL by caller */
/* _TOD_Now is the native current time */
nanoseconds = 0;
_ISR_Disable( level );
now = _TOD_Now;
8008384: 28 42 00 00 lw r2,(r2+0)
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008388: 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;
800838c: 5b 81 00 14 sw (sp+20),r1
8008390: 5b 82 00 10 sw (sp+16),r2
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008394: b8 60 20 00 mv r4,r3
8008398: 44 60 00 03 be r3,r0,80083a4 <_TOD_Get+0x58> <== ALWAYS TAKEN
nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)();
800839c: d8 60 00 00 call r3 <== NOT EXECUTED
80083a0: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
_ISR_Enable( level );
80083a4: d0 0c 00 00 wcsr IE,r12
_Timestamp_Set( &offset, 0, nanoseconds );
80083a8: 34 03 00 00 mvi r3,0
_Timestamp_Add_to( &now, &offset );
80083ac: 37 81 00 10 addi r1,sp,16
80083b0: 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 );
80083b4: 5b 83 00 18 sw (sp+24),r3
80083b8: 5b 84 00 1c sw (sp+28),r4
_Timestamp_Add_to( &now, &offset );
80083bc: fb ff f3 6a calli 8005164 <_Timespec_Add_to>
_Timestamp_To_timespec( &now, time );
80083c0: 2b 81 00 14 lw r1,(sp+20)
80083c4: 59 61 00 04 sw (r11+4),r1
80083c8: 2b 81 00 10 lw r1,(sp+16)
80083cc: 59 61 00 00 sw (r11+0),r1
}
80083d0: 2b 9d 00 04 lw ra,(sp+4)
80083d4: 2b 8b 00 0c lw r11,(sp+12)
80083d8: 2b 8c 00 08 lw r12,(sp+8)
80083dc: 37 9c 00 1c addi sp,sp,28
80083e0: c3 a0 00 00 ret
080083e4 <_TOD_Get_uptime>:
*/
void _TOD_Get_uptime(
Timestamp_Control *uptime
)
{
80083e4: 37 9c ff e4 addi sp,sp,-28
80083e8: 5b 8b 00 0c sw (sp+12),r11
80083ec: 5b 8c 00 08 sw (sp+8),r12
80083f0: 5b 9d 00 04 sw (sp+4),ra
80083f4: 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 );
80083f8: 90 00 60 00 rcsr r12,IE
80083fc: 34 01 ff fe mvi r1,-2
8008400: a1 81 08 00 and r1,r12,r1
8008404: d0 01 00 00 wcsr IE,r1
up = _TOD_Uptime;
8008408: 78 02 08 01 mvhi r2,0x801
800840c: 38 42 c8 ac ori r2,r2,0xc8ac
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008410: 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;
8008414: 28 41 00 04 lw r1,(r2+4)
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008418: 38 63 c9 cc ori r3,r3,0xc9cc
/* assume time checked for NULL by caller */
/* _TOD_Uptime is in native timestamp format */
nanoseconds = 0;
_ISR_Disable( level );
up = _TOD_Uptime;
800841c: 28 42 00 00 lw r2,(r2+0)
if ( _Watchdog_Nanoseconds_since_tick_handler )
8008420: 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;
8008424: 5b 81 00 14 sw (sp+20),r1
8008428: 5b 82 00 10 sw (sp+16),r2
if ( _Watchdog_Nanoseconds_since_tick_handler )
800842c: b8 60 20 00 mv r4,r3
8008430: 44 60 00 03 be r3,r0,800843c <_TOD_Get_uptime+0x58> <== ALWAYS TAKEN
nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)();
8008434: d8 60 00 00 call r3 <== NOT EXECUTED
8008438: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
_ISR_Enable( level );
800843c: d0 0c 00 00 wcsr IE,r12
_Timestamp_Set( &offset, 0, nanoseconds );
8008440: 34 03 00 00 mvi r3,0
_Timestamp_Add_to( &up, &offset );
8008444: 37 81 00 10 addi r1,sp,16
8008448: 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 );
800844c: 5b 83 00 18 sw (sp+24),r3
8008450: 5b 84 00 1c sw (sp+28),r4
_Timestamp_Add_to( &up, &offset );
8008454: fb ff f3 44 calli 8005164 <_Timespec_Add_to>
*uptime = up;
8008458: 2b 81 00 14 lw r1,(sp+20)
800845c: 59 61 00 04 sw (r11+4),r1
8008460: 2b 81 00 10 lw r1,(sp+16)
8008464: 59 61 00 00 sw (r11+0),r1
}
8008468: 2b 9d 00 04 lw ra,(sp+4)
800846c: 2b 8b 00 0c lw r11,(sp+12)
8008470: 2b 8c 00 08 lw r12,(sp+8)
8008474: 37 9c 00 1c addi sp,sp,28
8008478: 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 20 c4 ori r2,r2,0x20c4
*/
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 6a 4d calli 801e16c <__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 01 mvhi r11,0x801
(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 fc 60 ori r11,r11,0xfc60
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
08003cd4 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
8003cd4: 37 9c ff ec addi sp,sp,-20
8003cd8: 5b 8b 00 14 sw (sp+20),r11
8003cdc: 5b 8c 00 10 sw (sp+16),r12
8003ce0: 5b 8d 00 0c sw (sp+12),r13
8003ce4: 5b 8e 00 08 sw (sp+8),r14
8003ce8: 5b 9d 00 04 sw (sp+4),ra
8003cec: b8 20 58 00 mv r11,r1
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
8003cf0: 28 2e 00 10 lw r14,(r1+16)
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
8003cf4: b8 40 60 00 mv r12,r2
8003cf8: 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 );
8003cfc: f8 00 04 83 calli 8004f08 <_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 )
8003d00: 29 61 00 14 lw r1,(r11+20)
8003d04: 44 2c 00 04 be r1,r12,8003d14 <_Thread_Change_priority+0x40>
_Thread_Set_priority( the_thread, new_priority );
8003d08: b9 80 10 00 mv r2,r12
8003d0c: b9 60 08 00 mv r1,r11
8003d10: f8 00 03 db calli 8004c7c <_Thread_Set_priority>
_ISR_Disable( level );
8003d14: 90 00 60 00 rcsr r12,IE
8003d18: 34 05 ff fe mvi r5,-2
8003d1c: a1 85 28 00 and r5,r12,r5
8003d20: 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;
8003d24: 29 64 00 10 lw r4,(r11+16)
if ( state != STATES_TRANSIENT ) {
8003d28: 34 01 00 04 mvi r1,4
8003d2c: 21 c2 00 04 andi r2,r14,0x4
8003d30: 44 81 00 0e be r4,r1,8003d68 <_Thread_Change_priority+0x94>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
8003d34: 5c 40 00 04 bne r2,r0,8003d44 <_Thread_Change_priority+0x70><== NEVER TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
8003d38: 34 01 ff fb mvi r1,-5
8003d3c: a0 81 08 00 and r1,r4,r1
8003d40: 59 61 00 10 sw (r11+16),r1
_ISR_Enable( level );
8003d44: d0 0c 00 00 wcsr IE,r12
if ( _States_Is_waiting_on_thread_queue( state ) ) {
8003d48: 78 01 00 03 mvhi r1,0x3
8003d4c: 38 21 be e0 ori r1,r1,0xbee0
8003d50: a0 81 08 00 and r1,r4,r1
8003d54: 44 20 00 5f be r1,r0,8003ed0 <_Thread_Change_priority+0x1fc>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
8003d58: 29 61 00 44 lw r1,(r11+68)
8003d5c: b9 60 10 00 mv r2,r11
8003d60: f8 00 03 94 calli 8004bb0 <_Thread_queue_Requeue>
8003d64: e0 00 00 5b bi 8003ed0 <_Thread_Change_priority+0x1fc>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
8003d68: 5c 40 00 1c bne r2,r0,8003dd8 <_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;
8003d6c: 29 61 00 90 lw r1,(r11+144)
8003d70: 2d 63 00 96 lhu r3,(r11+150)
_Priority_Major_bit_map |= the_priority_map->ready_major;
8003d74: 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;
8003d78: 2c 26 00 00 lhu r6,(r1+0)
_Priority_Major_bit_map |= the_priority_map->ready_major;
8003d7c: 38 84 c8 dc ori r4,r4,0xc8dc
* 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 );
8003d80: 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;
8003d84: b8 c3 18 00 or r3,r6,r3
8003d88: 0c 23 00 00 sh (r1+0),r3
_Priority_Major_bit_map |= the_priority_map->ready_major;
8003d8c: 2c 83 00 00 lhu r3,(r4+0)
8003d90: 2d 66 00 94 lhu r6,(r11+148)
8003d94: 29 61 00 8c lw r1,(r11+140)
8003d98: b8 c3 18 00 or r3,r6,r3
8003d9c: 20 63 ff ff andi r3,r3,0xffff
8003da0: 0c 83 00 00 sh (r4+0),r3
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
8003da4: 45 a2 00 07 be r13,r2,8003dc0 <_Thread_Change_priority+0xec>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
8003da8: 28 22 00 00 lw r2,(r1+0)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
8003dac: 59 61 00 04 sw (r11+4),r1
before_node = after_node->next;
after_node->next = the_node;
8003db0: 58 2b 00 00 sw (r1+0),r11
the_node->next = before_node;
before_node->previous = the_node;
8003db4: 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;
8003db8: 59 62 00 00 sw (r11+0),r2
8003dbc: e0 00 00 07 bi 8003dd8 <_Thread_Change_priority+0x104>
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
8003dc0: 34 22 00 04 addi r2,r1,4
8003dc4: 59 62 00 00 sw (r11+0),r2
old_last_node = the_chain->last;
8003dc8: 28 22 00 08 lw r2,(r1+8)
the_chain->last = the_node;
8003dcc: 58 2b 00 08 sw (r1+8),r11
old_last_node->next = the_node;
the_node->previous = old_last_node;
8003dd0: 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;
8003dd4: 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 );
8003dd8: d0 0c 00 00 wcsr IE,r12
8003ddc: 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 );
8003de0: 78 01 08 01 mvhi r1,0x801
8003de4: 38 21 c8 dc ori r1,r1,0xc8dc
8003de8: 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;
8003dec: 78 02 08 01 mvhi r2,0x801
8003df0: 38 42 c7 b8 ori r2,r2,0xc7b8
8003df4: 78 0b 08 01 mvhi r11,0x801
8003df8: 28 4e 00 00 lw r14,(r2+0)
8003dfc: 20 21 ff ff andi r1,r1,0xffff
8003e00: 34 02 00 ff mvi r2,255
8003e04: 39 6b a3 a4 ori r11,r11,0xa3a4
8003e08: 54 22 00 05 bgu r1,r2,8003e1c <_Thread_Change_priority+0x148>
8003e0c: b5 61 58 00 add r11,r11,r1
8003e10: 41 6d 00 00 lbu r13,(r11+0)
8003e14: 35 ad 00 08 addi r13,r13,8
8003e18: e0 00 00 05 bi 8003e2c <_Thread_Change_priority+0x158>
8003e1c: 34 02 00 08 mvi r2,8
8003e20: fb ff f1 1c calli 8000290 <__lshrsi3>
8003e24: b5 61 58 00 add r11,r11,r1
8003e28: 41 6d 00 00 lbu r13,(r11+0)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
8003e2c: 78 02 08 01 mvhi r2,0x801
8003e30: b5 ad 08 00 add r1,r13,r13
8003e34: 38 42 c9 58 ori r2,r2,0xc958
8003e38: b4 41 10 00 add r2,r2,r1
8003e3c: 2c 41 00 00 lhu r1,(r2+0)
8003e40: 78 0b 08 01 mvhi r11,0x801
8003e44: 34 02 00 ff mvi r2,255
8003e48: 39 6b a3 a4 ori r11,r11,0xa3a4
8003e4c: 54 22 00 05 bgu r1,r2,8003e60 <_Thread_Change_priority+0x18c>
8003e50: b5 61 58 00 add r11,r11,r1
8003e54: 41 6b 00 00 lbu r11,(r11+0)
8003e58: 35 6b 00 08 addi r11,r11,8
8003e5c: e0 00 00 05 bi 8003e70 <_Thread_Change_priority+0x19c>
8003e60: 34 02 00 08 mvi r2,8
8003e64: fb ff f1 0b calli 8000290 <__lshrsi3>
8003e68: b5 61 58 00 add r11,r11,r1
8003e6c: 41 6b 00 00 lbu r11,(r11+0)
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
8003e70: 34 02 00 04 mvi r2,4
8003e74: b9 a0 08 00 mv r1,r13
8003e78: fb ff f0 de calli 80001f0 <__ashlsi3>
8003e7c: b5 61 08 00 add r1,r11,r1
8003e80: b4 21 10 00 add r2,r1,r1
8003e84: b4 41 08 00 add r1,r2,r1
8003e88: 34 02 00 02 mvi r2,2
8003e8c: fb ff f0 d9 calli 80001f0 <__ashlsi3>
8003e90: 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 );
8003e94: 78 02 08 01 mvhi r2,0x801
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
8003e98: 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 );
8003e9c: 38 42 c8 e8 ori r2,r2,0xc8e8
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
8003ea0: 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 );
8003ea4: 28 42 00 00 lw r2,(r2+0)
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
8003ea8: 38 21 c8 b8 ori r1,r1,0xc8b8
8003eac: 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() &&
8003eb0: 44 43 00 07 be r2,r3,8003ecc <_Thread_Change_priority+0x1f8>
_Thread_Executing->is_preemptible )
8003eb4: 40 41 00 75 lbu r1,(r2+117)
8003eb8: 44 20 00 05 be r1,r0,8003ecc <_Thread_Change_priority+0x1f8>
_Context_Switch_necessary = true;
8003ebc: 78 01 08 01 mvhi r1,0x801
8003ec0: 38 21 c8 f8 ori r1,r1,0xc8f8
8003ec4: 34 02 00 01 mvi r2,1
8003ec8: 30 22 00 00 sb (r1+0),r2
_ISR_Enable( level );
8003ecc: d0 0c 00 00 wcsr IE,r12
}
8003ed0: 2b 9d 00 04 lw ra,(sp+4)
8003ed4: 2b 8b 00 14 lw r11,(sp+20)
8003ed8: 2b 8c 00 10 lw r12,(sp+16)
8003edc: 2b 8d 00 0c lw r13,(sp+12)
8003ee0: 2b 8e 00 08 lw r14,(sp+8)
8003ee4: 37 9c 00 14 addi sp,sp,20
8003ee8: c3 a0 00 00 ret
08008ba4 <_Thread_Clear_state>:
)
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
8008ba4: 90 00 18 00 rcsr r3,IE
8008ba8: 34 05 ff fe mvi r5,-2
8008bac: a0 65 28 00 and r5,r3,r5
8008bb0: d0 05 00 00 wcsr IE,r5
current_state = the_thread->current_state;
8008bb4: 28 24 00 10 lw r4,(r1+16)
if ( current_state & state ) {
8008bb8: a0 44 30 00 and r6,r2,r4
8008bbc: 44 c0 00 2b be r6,r0,8008c68 <_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);
8008bc0: a4 40 10 00 not r2,r2
8008bc4: a0 44 10 00 and r2,r2,r4
current_state =
8008bc8: 58 22 00 10 sw (r1+16),r2
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
8008bcc: 5c 40 00 27 bne r2,r0,8008c68 <_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;
8008bd0: 28 26 00 90 lw r6,(r1+144)
8008bd4: 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);
8008bd8: 28 24 00 8c lw r4,(r1+140)
8008bdc: 2c c8 00 00 lhu r8,(r6+0)
_Priority_Major_bit_map |= the_priority_map->ready_major;
8008be0: 78 02 08 01 mvhi r2,0x801
8008be4: 38 42 c8 dc ori r2,r2,0xc8dc
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
8008be8: b9 07 38 00 or r7,r8,r7
8008bec: 0c c7 00 00 sh (r6+0),r7
_Priority_Major_bit_map |= the_priority_map->ready_major;
8008bf0: 2c 47 00 00 lhu r7,(r2+0)
8008bf4: 2c 28 00 94 lhu r8,(r1+148)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
8008bf8: 34 86 00 04 addi r6,r4,4
8008bfc: 58 26 00 00 sw (r1+0),r6
old_last_node = the_chain->last;
8008c00: 28 86 00 08 lw r6,(r4+8)
8008c04: b9 07 38 00 or r7,r8,r7
the_chain->last = the_node;
8008c08: 58 81 00 08 sw (r4+8),r1
8008c0c: 20 e4 ff ff andi r4,r7,0xffff
8008c10: 0c 44 00 00 sh (r2+0),r4
old_last_node->next = the_node;
the_node->previous = old_last_node;
8008c14: 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;
8008c18: 58 c1 00 00 sw (r6+0),r1
_ISR_Flash( level );
8008c1c: d0 03 00 00 wcsr IE,r3
8008c20: 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 ) {
8008c24: 78 02 08 01 mvhi r2,0x801
8008c28: 38 42 c8 b8 ori r2,r2,0xc8b8
8008c2c: 28 44 00 00 lw r4,(r2+0)
8008c30: 28 25 00 14 lw r5,(r1+20)
8008c34: 28 84 00 14 lw r4,(r4+20)
8008c38: 50 a4 00 0c bgeu r5,r4,8008c68 <_Thread_Clear_state+0xc4>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
8008c3c: 78 04 08 01 mvhi r4,0x801
8008c40: 38 84 c8 e8 ori r4,r4,0xc8e8
8008c44: 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;
8008c48: 58 41 00 00 sw (r2+0),r1
if ( _Thread_Executing->is_preemptible ||
8008c4c: 40 81 00 75 lbu r1,(r4+117)
8008c50: 5c 20 00 02 bne r1,r0,8008c58 <_Thread_Clear_state+0xb4>
8008c54: 5c a1 00 05 bne r5,r1,8008c68 <_Thread_Clear_state+0xc4> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
8008c58: 78 01 08 01 mvhi r1,0x801
8008c5c: 38 21 c8 f8 ori r1,r1,0xc8f8
8008c60: 34 02 00 01 mvi r2,1
8008c64: 30 22 00 00 sb (r1+0),r2
}
}
}
_ISR_Enable( level );
8008c68: d0 03 00 00 wcsr IE,r3
}
8008c6c: c3 a0 00 00 ret
0800bb58 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
800bb58: 37 9c ff f8 addi sp,sp,-8
800bb5c: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
800bb60: 37 82 00 08 addi r2,sp,8
800bb64: f8 00 00 a2 calli 800bdec <_Thread_Get>
switch ( location ) {
800bb68: 2b 82 00 08 lw r2,(sp+8)
800bb6c: 5c 40 00 09 bne r2,r0,800bb90 <_Thread_Delay_ended+0x38> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
800bb70: 78 02 10 00 mvhi r2,0x1000
800bb74: 38 42 00 18 ori r2,r2,0x18
800bb78: fb ff ff 4e calli 800b8b0 <_Thread_Clear_state>
800bb7c: 78 01 08 02 mvhi r1,0x802
800bb80: 38 21 99 bc ori r1,r1,0x99bc
800bb84: 28 22 00 00 lw r2,(r1+0)
800bb88: 34 42 ff ff addi r2,r2,-1
800bb8c: 58 22 00 00 sw (r1+0),r2
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
800bb90: 2b 9d 00 04 lw ra,(sp+4)
800bb94: 37 9c 00 08 addi sp,sp,8
800bb98: c3 a0 00 00 ret
080040c8 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
80040c8: 37 9c ff b0 addi sp,sp,-80
80040cc: 5b 8b 00 40 sw (sp+64),r11
80040d0: 5b 8c 00 3c sw (sp+60),r12
80040d4: 5b 8d 00 38 sw (sp+56),r13
80040d8: 5b 8e 00 34 sw (sp+52),r14
80040dc: 5b 8f 00 30 sw (sp+48),r15
80040e0: 5b 90 00 2c sw (sp+44),r16
80040e4: 5b 91 00 28 sw (sp+40),r17
80040e8: 5b 92 00 24 sw (sp+36),r18
80040ec: 5b 93 00 20 sw (sp+32),r19
80040f0: 5b 94 00 1c sw (sp+28),r20
80040f4: 5b 95 00 18 sw (sp+24),r21
80040f8: 5b 96 00 14 sw (sp+20),r22
80040fc: 5b 97 00 10 sw (sp+16),r23
8004100: 5b 98 00 0c sw (sp+12),r24
8004104: 5b 99 00 08 sw (sp+8),r25
8004108: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
800410c: 78 01 08 01 mvhi r1,0x801
8004110: 38 21 c8 e8 ori r1,r1,0xc8e8
8004114: 28 2b 00 00 lw r11,(r1+0)
_ISR_Disable( level );
8004118: 90 00 20 00 rcsr r4,IE
800411c: 34 01 ff fe mvi r1,-2
8004120: a0 81 08 00 and r1,r4,r1
8004124: d0 01 00 00 wcsr IE,r1
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
8004128: 78 14 08 01 mvhi r20,0x801
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
800412c: 78 0f 08 01 mvhi r15,0x801
8004130: 78 0d 08 01 mvhi r13,0x801
heir = _Thread_Heir;
8004134: 78 12 08 01 mvhi r18,0x801
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
_Thread_Executing = heir;
8004138: 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;
800413c: 78 11 08 01 mvhi r17,0x801
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
8004140: 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;
8004144: ba 80 98 00 mv r19,r20
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
8004148: 39 ef c8 f8 ori r15,r15,0xc8f8
800414c: 39 ad c8 2c ori r13,r13,0xc82c
heir = _Thread_Heir;
8004150: 3a 52 c8 b8 ori r18,r18,0xc8b8
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
_Thread_Executing = heir;
8004154: 39 ce c8 e8 ori r14,r14,0xc8e8
#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;
8004158: 3a 31 c7 bc ori r17,r17,0xc7bc
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
800415c: 3a 10 c8 b4 ori r16,r16,0xc8b4
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
8004160: 34 19 00 00 mvi r25,0
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
8004164: 34 17 00 01 mvi r23,1
_ISR_Enable( level );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
8004168: 37 96 00 4c addi r22,sp,76
_Timestamp_Subtract(
800416c: 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;
8004170: 3a 73 c8 f0 ori r19,r19,0xc8f0
#endif
#endif
executing = _Thread_Executing;
_ISR_Disable( level );
8004174: 34 18 ff fe mvi r24,-2
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
8004178: e0 00 00 28 bi 8004218 <_Thread_Dispatch+0x150>
heir = _Thread_Heir;
800417c: 2a 4c 00 00 lw r12,(r18+0)
_Thread_Dispatch_disable_level = 1;
8004180: 59 b7 00 00 sw (r13+0),r23
_Context_Switch_necessary = false;
8004184: 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 )
8004188: 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;
800418c: 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 )
8004190: 5c 37 00 03 bne r1,r23,800419c <_Thread_Dispatch+0xd4>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
8004194: 2a 21 00 00 lw r1,(r17+0)
8004198: 59 81 00 78 sw (r12+120),r1
_ISR_Enable( level );
800419c: d0 04 00 00 wcsr IE,r4
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
80041a0: ba c0 08 00 mv r1,r22
80041a4: f8 00 10 90 calli 80083e4 <_TOD_Get_uptime>
_Timestamp_Subtract(
80041a8: ba 80 08 00 mv r1,r20
80041ac: ba a0 18 00 mv r3,r21
80041b0: 38 21 c8 f0 ori r1,r1,0xc8f0
80041b4: ba c0 10 00 mv r2,r22
80041b8: f8 00 04 02 calli 80051c0 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
80041bc: ba a0 10 00 mv r2,r21
80041c0: 35 61 00 84 addi r1,r11,132
80041c4: f8 00 03 e8 calli 8005164 <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
80041c8: 2b 83 00 4c lw r3,(sp+76)
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
80041cc: 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 );
80041d0: 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;
80041d4: 5a 63 00 00 sw (r19+0),r3
80041d8: 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 );
80041dc: 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;
80041e0: 5a 63 00 04 sw (r19+4),r3
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
80041e4: 44 80 00 05 be r4,r0,80041f8 <_Thread_Dispatch+0x130> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
80041e8: 28 83 00 00 lw r3,(r4+0)
80041ec: 59 63 01 20 sw (r11+288),r3
*_Thread_libc_reent = heir->libc_reent;
80041f0: 29 83 01 20 lw r3,(r12+288)
80041f4: 58 83 00 00 sw (r4+0),r3
}
_User_extensions_Thread_switch( executing, heir );
80041f8: f8 00 04 dc calli 8005568 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
80041fc: 35 61 00 cc addi r1,r11,204
8004200: 35 82 00 cc addi r2,r12,204
8004204: f8 00 05 f1 calli 80059c8 <_CPU_Context_switch>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
8004208: 29 cb 00 00 lw r11,(r14+0)
_ISR_Disable( level );
800420c: 90 00 20 00 rcsr r4,IE
8004210: a0 98 08 00 and r1,r4,r24
8004214: d0 01 00 00 wcsr IE,r1
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
8004218: 41 e5 00 00 lbu r5,(r15+0)
800421c: 20 a5 00 ff andi r5,r5,0xff
8004220: 5c a0 ff d7 bne r5,r0,800417c <_Thread_Dispatch+0xb4>
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
8004224: 59 a5 00 00 sw (r13+0),r5
_ISR_Enable( level );
8004228: d0 04 00 00 wcsr IE,r4
if ( _Thread_Do_post_task_switch_extension ||
800422c: 78 01 08 01 mvhi r1,0x801
8004230: 38 21 c8 cc ori r1,r1,0xc8cc
8004234: 28 21 00 00 lw r1,(r1+0)
8004238: 5c 20 00 03 bne r1,r0,8004244 <_Thread_Dispatch+0x17c> <== NEVER TAKEN
executing->do_post_task_switch_extension ) {
800423c: 41 62 00 74 lbu r2,(r11+116)
8004240: 44 41 00 04 be r2,r1,8004250 <_Thread_Dispatch+0x188>
executing->do_post_task_switch_extension = false;
8004244: 34 01 00 00 mvi r1,0
8004248: 31 61 00 74 sb (r11+116),r1
_API_extensions_Run_postswitch();
800424c: fb ff f9 95 calli 80028a0 <_API_extensions_Run_postswitch>
}
}
8004250: 2b 9d 00 04 lw ra,(sp+4)
8004254: 2b 8b 00 40 lw r11,(sp+64)
8004258: 2b 8c 00 3c lw r12,(sp+60)
800425c: 2b 8d 00 38 lw r13,(sp+56)
8004260: 2b 8e 00 34 lw r14,(sp+52)
8004264: 2b 8f 00 30 lw r15,(sp+48)
8004268: 2b 90 00 2c lw r16,(sp+44)
800426c: 2b 91 00 28 lw r17,(sp+40)
8004270: 2b 92 00 24 lw r18,(sp+36)
8004274: 2b 93 00 20 lw r19,(sp+32)
8004278: 2b 94 00 1c lw r20,(sp+28)
800427c: 2b 95 00 18 lw r21,(sp+24)
8004280: 2b 96 00 14 lw r22,(sp+20)
8004284: 2b 97 00 10 lw r23,(sp+16)
8004288: 2b 98 00 0c lw r24,(sp+12)
800428c: 2b 99 00 08 lw r25,(sp+8)
8004290: 37 9c 00 50 addi sp,sp,80
8004294: c3 a0 00 00 ret
0800a8bc <_Thread_Evaluate_mode>:
bool _Thread_Evaluate_mode( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
800a8bc: 78 01 08 01 mvhi r1,0x801
800a8c0: 38 21 c8 e8 ori r1,r1,0xc8e8
800a8c4: 28 21 00 00 lw r1,(r1+0)
if ( !_States_Is_ready( executing->current_state ) ||
800a8c8: 28 22 00 10 lw r2,(r1+16)
800a8cc: 5c 40 00 07 bne r2,r0,800a8e8 <_Thread_Evaluate_mode+0x2c> <== NEVER TAKEN
800a8d0: 78 02 08 01 mvhi r2,0x801
800a8d4: 38 42 c8 b8 ori r2,r2,0xc8b8
800a8d8: 28 42 00 00 lw r2,(r2+0)
800a8dc: 44 22 00 09 be r1,r2,800a900 <_Thread_Evaluate_mode+0x44>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
800a8e0: 40 21 00 75 lbu r1,(r1+117)
800a8e4: 44 20 00 07 be r1,r0,800a900 <_Thread_Evaluate_mode+0x44> <== NEVER TAKEN
_Context_Switch_necessary = true;
800a8e8: 78 01 08 01 mvhi r1,0x801
800a8ec: 38 21 c8 f8 ori r1,r1,0xc8f8
800a8f0: 34 02 00 01 mvi r2,1
800a8f4: 30 22 00 00 sb (r1+0),r2
800a8f8: b8 40 08 00 mv r1,r2
return true;
800a8fc: c3 a0 00 00 ret
800a900: 34 01 00 00 mvi r1,0
}
return false;
}
800a904: c3 a0 00 00 ret
0800a908 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
800a908: 37 9c ff f4 addi sp,sp,-12
800a90c: 5b 8b 00 0c sw (sp+12),r11
800a910: 5b 8c 00 08 sw (sp+8),r12
800a914: 5b 9d 00 04 sw (sp+4),ra
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
800a918: 78 01 08 01 mvhi r1,0x801
800a91c: 38 21 c8 e8 ori r1,r1,0xc8e8
800a920: 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;
800a924: 29 61 00 b8 lw r1,(r11+184)
_ISR_Set_level(level);
800a928: 64 21 00 00 cmpei r1,r1,0
800a92c: d0 01 00 00 wcsr IE,r1
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
800a930: 78 02 08 01 mvhi r2,0x801
800a934: 38 42 c6 30 ori r2,r2,0xc630
800a938: 40 4c 00 00 lbu r12,(r2+0)
doneConstructors = 1;
800a93c: 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 );
800a940: 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;
800a944: 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 );
800a948: fb ff ea 65 calli 80052dc <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
800a94c: fb ff e6 53 calli 8004298 <_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) */ {
800a950: 5d 80 00 02 bne r12,r0,800a958 <_Thread_Handler+0x50>
INIT_NAME ();
800a954: fb ff d5 ab calli 8000000 <RamBase>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
800a958: 29 61 00 a0 lw r1,(r11+160)
800a95c: 5c 20 00 05 bne r1,r0,800a970 <_Thread_Handler+0x68> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
800a960: 29 62 00 9c lw r2,(r11+156)
800a964: 29 61 00 a8 lw r1,(r11+168)
800a968: d8 40 00 00 call r2
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
800a96c: 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 );
800a970: b9 60 08 00 mv r1,r11
800a974: fb ff ea 71 calli 8005338 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
800a978: 34 01 00 00 mvi r1,0
800a97c: 34 02 00 01 mvi r2,1
800a980: 34 03 00 06 mvi r3,6
800a984: fb ff e2 86 calli 800339c <_Internal_error_Occurred>
080045ac <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
80045ac: 37 9c ff f0 addi sp,sp,-16
80045b0: 5b 8b 00 10 sw (sp+16),r11
80045b4: 5b 8c 00 0c sw (sp+12),r12
80045b8: 5b 8d 00 08 sw (sp+8),r13
80045bc: 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;
80045c0: 78 01 08 01 mvhi r1,0x801
80045c4: 38 21 c0 c4 ori r1,r1,0xc0c4
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
80045c8: 28 22 00 20 lw r2,(r1+32)
80045cc: 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;
80045d0: 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)
80045d4: 64 42 00 00 cmpei r2,r2,0
80045d8: 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;
80045dc: 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)
80045e0: 99 22 48 00 xor r9,r9,r2
80045e4: b9 20 58 00 mv r11,r9
80045e8: 45 20 00 05 be r9,r0,80045fc <_Thread_Handler_initialization+0x50><== ALWAYS TAKEN
== (!Configuration.stack_free_hook) ) )
_Internal_error_Occurred(
80045ec: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
80045f0: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
80045f4: 34 03 00 0f mvi r3,15 <== NOT EXECUTED
80045f8: fb ff fb 69 calli 800339c <_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(
80045fc: 78 0c 08 01 mvhi r12,0x801
8004600: 39 8c c0 c0 ori r12,r12,0xc0c0
8004604: 41 81 00 00 lbu r1,(r12+0)
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
8004608: 78 08 08 01 mvhi r8,0x801
_Thread_Executing = NULL;
800460c: 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(
8004610: 34 21 00 01 addi r1,r1,1
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
_Thread_Executing = NULL;
_Thread_Heir = NULL;
8004614: 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;
8004618: 78 03 08 01 mvhi r3,0x801
_Thread_Maximum_extensions = maximum_extensions;
800461c: 78 07 08 01 mvhi r7,0x801
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
8004620: 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;
8004624: 38 63 c8 cc ori r3,r3,0xc8cc
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
8004628: 38 c6 c7 bc ori r6,r6,0xc7bc
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
800462c: 39 08 c8 f8 ori r8,r8,0xc8f8
_Thread_Executing = NULL;
8004630: 38 a5 c8 e8 ori r5,r5,0xc8e8
_Thread_Heir = NULL;
8004634: 38 84 c8 b8 ori r4,r4,0xc8b8
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
8004638: 38 e7 c8 c8 ori r7,r7,0xc8c8
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
800463c: 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;
8004640: 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;
8004644: 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(
8004648: b4 41 08 00 add r1,r2,r1
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
800464c: 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(
8004650: 34 02 00 02 mvi r2,2
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
8004654: 58 ed 00 00 sw (r7+0),r13
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
_Thread_Executing = NULL;
8004658: 58 a9 00 00 sw (r5+0),r9
_Thread_Heir = NULL;
800465c: 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(
8004660: fb ff ee e4 calli 80001f0 <__ashlsi3>
8004664: f8 00 04 99 calli 80058c8 <_Workspace_Allocate_or_fatal_error>
8004668: 78 02 08 01 mvhi r2,0x801
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
800466c: 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(
8004670: 38 42 c7 b8 ori r2,r2,0xc7b8
8004674: 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;
8004678: 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);
800467c: 34 22 00 04 addi r2,r1,4
8004680: 58 22 00 00 sw (r1+0),r2
the_chain->permanent_null = NULL;
8004684: 58 26 00 04 sw (r1+4),r6
the_chain->last = _Chain_Head(the_chain);
8004688: 58 21 00 08 sw (r1+8),r1
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
800468c: 35 6b 00 01 addi r11,r11,1
8004690: 34 21 00 0c addi r1,r1,12
8004694: 50 6b ff fa bgeu r3,r11,800467c <_Thread_Handler_initialization+0xd0>
/*
* Initialize this class of objects.
*/
_Objects_Initialize_information(
8004698: 34 02 00 01 mvi r2,1
800469c: 78 01 08 01 mvhi r1,0x801
80046a0: 38 21 c9 88 ori r1,r1,0xc988
80046a4: b8 40 18 00 mv r3,r2
80046a8: b8 40 20 00 mv r4,r2
80046ac: 34 05 01 38 mvi r5,312
80046b0: 34 07 00 08 mvi r7,8
80046b4: fb ff fc cf calli 80039f0 <_Objects_Initialize_information>
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
80046b8: 2b 9d 00 04 lw ra,(sp+4)
80046bc: 2b 8b 00 10 lw r11,(sp+16)
80046c0: 2b 8c 00 0c lw r12,(sp+12)
80046c4: 2b 8d 00 08 lw r13,(sp+8)
80046c8: 37 9c 00 10 addi sp,sp,16
80046cc: c3 a0 00 00 ret
080043bc <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
80043bc: 37 9c ff dc addi sp,sp,-36
80043c0: 5b 8b 00 24 sw (sp+36),r11
80043c4: 5b 8c 00 20 sw (sp+32),r12
80043c8: 5b 8d 00 1c sw (sp+28),r13
80043cc: 5b 8e 00 18 sw (sp+24),r14
80043d0: 5b 8f 00 14 sw (sp+20),r15
80043d4: 5b 90 00 10 sw (sp+16),r16
80043d8: 5b 91 00 0c sw (sp+12),r17
80043dc: 5b 92 00 08 sw (sp+8),r18
80043e0: 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;
80043e4: 34 0c 00 00 mvi r12,0
80043e8: 58 4c 01 24 sw (r2+292),r12
80043ec: 58 4c 01 28 sw (r2+296),r12
80043f0: 58 4c 01 2c sw (r2+300),r12
extensions_area = NULL;
the_thread->libc_reent = NULL;
80043f4: 58 4c 01 20 sw (r2+288),r12
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
80043f8: b8 40 58 00 mv r11,r2
80043fc: b8 20 80 00 mv r16,r1
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
8004400: b8 40 08 00 mv r1,r2
8004404: b8 80 10 00 mv r2,r4
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
8004408: b8 80 68 00 mv r13,r4
800440c: b8 c0 70 00 mv r14,r6
8004410: b9 00 88 00 mv r17,r8
8004414: 20 f2 00 ff andi r18,r7,0xff
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
8004418: f8 00 02 e1 calli 8004f9c <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
800441c: f5 a1 20 00 cmpgu r4,r13,r1
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
8004420: b8 20 28 00 mv r5,r1
if ( !actual_stack_size || actual_stack_size < stack_size )
8004424: e4 2c 08 00 cmpe r1,r1,r12
8004428: b9 80 18 00 mv r3,r12
800442c: b8 81 20 00 or r4,r4,r1
8004430: 5c 8c 00 53 bne r4,r12,800457c <_Thread_Initialize+0x1c0>
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
8004434: 78 02 08 01 mvhi r2,0x801
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
8004438: 59 64 00 68 sw (r11+104),r4
800443c: 38 42 c8 c8 ori r2,r2,0xc8c8
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
8004440: 29 61 00 c8 lw r1,(r11+200)
8004444: 28 43 00 00 lw r3,(r2+0)
the_stack->size = size;
8004448: 59 65 00 c0 sw (r11+192),r5
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
800444c: 59 61 00 c4 sw (r11+196),r1
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
8004450: 59 64 00 50 sw (r11+80),r4
the_watchdog->routine = routine;
8004454: 59 64 00 64 sw (r11+100),r4
the_watchdog->id = id;
the_watchdog->user_data = user_data;
8004458: 59 64 00 6c sw (r11+108),r4
800445c: b8 60 60 00 mv r12,r3
8004460: 44 64 00 07 be r3,r4,800447c <_Thread_Initialize+0xc0>
extensions_area = _Workspace_Allocate(
8004464: 34 61 00 01 addi r1,r3,1
8004468: 34 02 00 02 mvi r2,2
800446c: fb ff ef 61 calli 80001f0 <__ashlsi3>
8004470: f8 00 05 25 calli 8005904 <_Workspace_Allocate>
8004474: b8 20 60 00 mv r12,r1
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
8004478: 44 20 00 2f be r1,r0,8004534 <_Thread_Initialize+0x178>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
800447c: 59 6c 01 30 sw (r11+304),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 ) {
8004480: 45 80 00 0e be r12,r0,80044b8 <_Thread_Initialize+0xfc>
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
8004484: 78 02 08 01 mvhi r2,0x801
8004488: 38 42 c8 c8 ori r2,r2,0xc8c8
800448c: 34 03 00 00 mvi r3,0
8004490: 28 44 00 00 lw r4,(r2+0)
the_thread->extensions[i] = NULL;
8004494: 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++ )
8004498: b8 60 10 00 mv r2,r3
800449c: e0 00 00 06 bi 80044b4 <_Thread_Initialize+0xf8>
the_thread->extensions[i] = NULL;
80044a0: 29 65 01 30 lw r5,(r11+304)
* 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++ )
80044a4: 34 42 00 01 addi r2,r2,1
the_thread->extensions[i] = NULL;
80044a8: b4 a3 28 00 add r5,r5,r3
80044ac: 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++ )
80044b0: 34 63 00 04 addi r3,r3,4
80044b4: 50 82 ff fb bgeu r4,r2,80044a0 <_Thread_Initialize+0xe4>
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
80044b8: 2b 81 00 28 lw r1,(sp+40)
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
80044bc: 34 0d 00 00 mvi r13,0
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
80044c0: 34 0f 00 01 mvi r15,1
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
80044c4: 59 61 00 b4 sw (r11+180),r1
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
80044c8: 2b 81 00 2c lw r1,(sp+44)
#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 );
80044cc: b9 c0 10 00 mv r2,r14
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;
80044d0: 59 6e 00 18 sw (r11+24),r14
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
80044d4: 59 61 00 b8 sw (r11+184),r1
the_thread->resource_count = 0;
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
80044d8: 59 6e 00 bc sw (r11+188),r14
_Thread_Set_priority( the_thread, priority );
80044dc: b9 60 08 00 mv r1,r11
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
80044e0: 31 72 00 ac sb (r11+172),r18
the_thread->Start.budget_algorithm = budget_algorithm;
80044e4: 59 71 00 b0 sw (r11+176),r17
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
80044e8: 59 6f 00 10 sw (r11+16),r15
the_thread->Wait.queue = NULL;
80044ec: 59 6d 00 44 sw (r11+68),r13
the_thread->resource_count = 0;
80044f0: 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 );
80044f4: f8 00 01 e2 calli 8004c7c <_Thread_Set_priority>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
80044f8: 29 61 00 08 lw r1,(r11+8)
80044fc: 2a 0e 00 1c lw r14,(r16+28)
8004500: 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 );
8004504: 59 6d 00 88 sw (r11+136),r13
8004508: 59 6d 00 84 sw (r11+132),r13
800450c: 20 21 ff ff andi r1,r1,0xffff
8004510: fb ff ef 38 calli 80001f0 <__ashlsi3>
8004514: b5 c1 08 00 add r1,r14,r1
8004518: 58 2b 00 00 sw (r1+0),r11
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
800451c: 2b 81 00 30 lw r1,(sp+48)
8004520: 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 );
8004524: b9 60 08 00 mv r1,r11
8004528: f8 00 03 ba calli 8005410 <_User_extensions_Thread_create>
if ( extension_status )
800452c: b9 e0 18 00 mv r3,r15
8004530: 5c 2d 00 13 bne r1,r13,800457c <_Thread_Initialize+0x1c0>
return true;
failed:
if ( the_thread->libc_reent )
8004534: 29 61 01 20 lw r1,(r11+288)
8004538: 44 20 00 02 be r1,r0,8004540 <_Thread_Initialize+0x184>
_Workspace_Free( the_thread->libc_reent );
800453c: f8 00 04 fd calli 8005930 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
8004540: 29 61 01 24 lw r1,(r11+292)
8004544: 44 20 00 02 be r1,r0,800454c <_Thread_Initialize+0x190>
_Workspace_Free( the_thread->API_Extensions[i] );
8004548: f8 00 04 fa calli 8005930 <_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] )
800454c: 29 61 01 28 lw r1,(r11+296)
8004550: 44 20 00 02 be r1,r0,8004558 <_Thread_Initialize+0x19c> <== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
8004554: f8 00 04 f7 calli 8005930 <_Workspace_Free> <== NOT EXECUTED
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] )
8004558: 29 61 01 2c lw r1,(r11+300)
800455c: 44 20 00 02 be r1,r0,8004564 <_Thread_Initialize+0x1a8> <== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
8004560: f8 00 04 f4 calli 8005930 <_Workspace_Free> <== NOT EXECUTED
if ( extensions_area )
8004564: 45 80 00 03 be r12,r0,8004570 <_Thread_Initialize+0x1b4>
(void) _Workspace_Free( extensions_area );
8004568: b9 80 08 00 mv r1,r12
800456c: f8 00 04 f1 calli 8005930 <_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 );
8004570: b9 60 08 00 mv r1,r11
8004574: f8 00 02 a7 calli 8005010 <_Thread_Stack_Free>
8004578: 34 03 00 00 mvi r3,0
return false;
}
800457c: b8 60 08 00 mv r1,r3
8004580: 2b 9d 00 04 lw ra,(sp+4)
8004584: 2b 8b 00 24 lw r11,(sp+36)
8004588: 2b 8c 00 20 lw r12,(sp+32)
800458c: 2b 8d 00 1c lw r13,(sp+28)
8004590: 2b 8e 00 18 lw r14,(sp+24)
8004594: 2b 8f 00 14 lw r15,(sp+20)
8004598: 2b 90 00 10 lw r16,(sp+16)
800459c: 2b 91 00 0c lw r17,(sp+12)
80045a0: 2b 92 00 08 lw r18,(sp+8)
80045a4: 37 9c 00 24 addi sp,sp,36
80045a8: c3 a0 00 00 ret
08009114 <_Thread_Reset_timeslice>:
{
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
8009114: 78 01 08 01 mvhi r1,0x801
8009118: 38 21 c8 e8 ori r1,r1,0xc8e8
800911c: 28 21 00 00 lw r1,(r1+0)
ready = executing->ready;
8009120: 28 22 00 8c lw r2,(r1+140)
_ISR_Disable( level );
8009124: 90 00 20 00 rcsr r4,IE
8009128: 34 03 ff fe mvi r3,-2
800912c: a0 83 18 00 and r3,r4,r3
8009130: d0 03 00 00 wcsr IE,r3
if ( _Chain_Has_only_one_node( ready ) ) {
8009134: 28 46 00 00 lw r6,(r2+0)
8009138: 28 45 00 08 lw r5,(r2+8)
800913c: 5c c5 00 03 bne r6,r5,8009148 <_Thread_Reset_timeslice+0x34>
_ISR_Enable( level );
8009140: d0 04 00 00 wcsr IE,r4
return;
8009144: c3 a0 00 00 ret
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
8009148: 28 25 00 00 lw r5,(r1+0)
previous = the_node->previous;
800914c: 28 26 00 04 lw r6,(r1+4)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
8009150: 34 47 00 04 addi r7,r2,4
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
previous->next = next;
8009154: 58 c5 00 00 sw (r6+0),r5
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
8009158: 58 27 00 00 sw (r1+0),r7
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
800915c: 58 a6 00 04 sw (r5+4),r6
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
8009160: 28 45 00 08 lw r5,(r2+8)
the_chain->last = the_node;
8009164: 58 41 00 08 sw (r2+8),r1
old_last_node->next = the_node;
the_node->previous = old_last_node;
8009168: 58 25 00 04 sw (r1+4),r5
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
800916c: 58 a1 00 00 sw (r5+0),r1
}
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
8009170: d0 04 00 00 wcsr IE,r4
8009174: d0 03 00 00 wcsr IE,r3
if ( _Thread_Is_heir( executing ) )
8009178: 78 03 08 01 mvhi r3,0x801
800917c: 38 63 c8 b8 ori r3,r3,0xc8b8
8009180: 28 65 00 00 lw r5,(r3+0)
8009184: 5c 25 00 03 bne r1,r5,8009190 <_Thread_Reset_timeslice+0x7c><== NEVER TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
8009188: 28 42 00 00 lw r2,(r2+0)
800918c: 58 62 00 00 sw (r3+0),r2
_Context_Switch_necessary = true;
8009190: 78 01 08 01 mvhi r1,0x801
8009194: 38 21 c8 f8 ori r1,r1,0xc8f8
8009198: 34 02 00 01 mvi r2,1
800919c: 30 22 00 00 sb (r1+0),r2
_ISR_Enable( level );
80091a0: d0 04 00 00 wcsr IE,r4
80091a4: c3 a0 00 00 ret
08005c68 <_Thread_Restart>:
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
8005c68: 37 9c ff f0 addi sp,sp,-16
8005c6c: 5b 8b 00 08 sw (sp+8),r11
8005c70: 5b 9d 00 04 sw (sp+4),ra
if ( !_States_Is_dormant( the_thread->current_state ) ) {
8005c74: 28 25 00 10 lw r5,(r1+16)
8005c78: 34 04 00 00 mvi r4,0
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
8005c7c: b8 20 58 00 mv r11,r1
if ( !_States_Is_dormant( the_thread->current_state ) ) {
8005c80: 20 a5 00 01 andi r5,r5,0x1
8005c84: 5c a4 00 16 bne r5,r4,8005cdc <_Thread_Restart+0x74>
_Thread_Set_transient( the_thread );
8005c88: 5b 82 00 10 sw (sp+16),r2
8005c8c: 5b 83 00 0c sw (sp+12),r3
8005c90: f8 00 00 bb calli 8005f7c <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
8005c94: 2b 82 00 10 lw r2,(sp+16)
8005c98: 2b 83 00 0c lw r3,(sp+12)
8005c9c: b9 60 08 00 mv r1,r11
8005ca0: f8 00 11 a6 calli 800a338 <_Thread_Reset>
_Thread_Load_environment( the_thread );
8005ca4: b9 60 08 00 mv r1,r11
8005ca8: f8 00 10 7b calli 8009e94 <_Thread_Load_environment>
_Thread_Ready( the_thread );
8005cac: b9 60 08 00 mv r1,r11
8005cb0: f8 00 11 3e calli 800a1a8 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
8005cb4: b9 60 08 00 mv r1,r11
8005cb8: f8 00 02 53 calli 8006604 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
8005cbc: 78 01 08 02 mvhi r1,0x802
8005cc0: 38 21 09 40 ori r1,r1,0x940
8005cc4: 28 21 00 00 lw r1,(r1+0)
8005cc8: 34 04 00 01 mvi r4,1
8005ccc: 5d 61 00 04 bne r11,r1,8005cdc <_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 );
8005cd0: 35 61 00 cc addi r1,r11,204
8005cd4: f8 00 03 d1 calli 8006c18 <_CPU_Context_restore>
8005cd8: 34 04 00 01 mvi r4,1 <== NOT EXECUTED
return true;
}
return false;
}
8005cdc: b8 80 08 00 mv r1,r4
8005ce0: 2b 9d 00 04 lw ra,(sp+4)
8005ce4: 2b 8b 00 08 lw r11,(sp+8)
8005ce8: 37 9c 00 10 addi sp,sp,16
8005cec: c3 a0 00 00 ret
0800a198 <_Thread_Resume>:
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
800a198: 90 00 18 00 rcsr r3,IE
800a19c: 34 05 ff fe mvi r5,-2
800a1a0: a0 65 28 00 and r5,r3,r5
800a1a4: d0 05 00 00 wcsr IE,r5
_ISR_Enable( level );
return;
}
#endif
current_state = the_thread->current_state;
800a1a8: 28 22 00 10 lw r2,(r1+16)
if ( current_state & STATES_SUSPENDED ) {
800a1ac: 20 44 00 02 andi r4,r2,0x2
800a1b0: 44 80 00 2b be r4,r0,800a25c <_Thread_Resume+0xc4> <== NEVER TAKEN
800a1b4: 34 04 ff fd mvi r4,-3
800a1b8: a0 44 10 00 and r2,r2,r4
current_state =
800a1bc: 58 22 00 10 sw (r1+16),r2
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
800a1c0: 5c 40 00 27 bne r2,r0,800a25c <_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;
800a1c4: 28 26 00 90 lw r6,(r1+144)
800a1c8: 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);
800a1cc: 28 24 00 8c lw r4,(r1+140)
800a1d0: 2c c8 00 00 lhu r8,(r6+0)
_Priority_Major_bit_map |= the_priority_map->ready_major;
800a1d4: 78 02 08 02 mvhi r2,0x802
800a1d8: 38 42 39 bc ori r2,r2,0x39bc
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
800a1dc: b9 07 38 00 or r7,r8,r7
800a1e0: 0c c7 00 00 sh (r6+0),r7
_Priority_Major_bit_map |= the_priority_map->ready_major;
800a1e4: 2c 47 00 00 lhu r7,(r2+0)
800a1e8: 2c 28 00 94 lhu r8,(r1+148)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
800a1ec: 34 86 00 04 addi r6,r4,4
800a1f0: 58 26 00 00 sw (r1+0),r6
old_last_node = the_chain->last;
800a1f4: 28 86 00 08 lw r6,(r4+8)
800a1f8: b9 07 38 00 or r7,r8,r7
the_chain->last = the_node;
800a1fc: 58 81 00 08 sw (r4+8),r1
800a200: 20 e4 ff ff andi r4,r7,0xffff
800a204: 0c 44 00 00 sh (r2+0),r4
old_last_node->next = the_node;
the_node->previous = old_last_node;
800a208: 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;
800a20c: 58 c1 00 00 sw (r6+0),r1
_ISR_Flash( level );
800a210: d0 03 00 00 wcsr IE,r3
800a214: d0 05 00 00 wcsr IE,r5
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
800a218: 78 02 08 02 mvhi r2,0x802
800a21c: 38 42 39 98 ori r2,r2,0x3998
800a220: 28 44 00 00 lw r4,(r2+0)
800a224: 28 25 00 14 lw r5,(r1+20)
800a228: 28 84 00 14 lw r4,(r4+20)
800a22c: 50 a4 00 0c bgeu r5,r4,800a25c <_Thread_Resume+0xc4>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
800a230: 78 04 08 02 mvhi r4,0x802
800a234: 38 84 39 c8 ori r4,r4,0x39c8
800a238: 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;
800a23c: 58 41 00 00 sw (r2+0),r1
if ( _Thread_Executing->is_preemptible ||
800a240: 40 81 00 75 lbu r1,(r4+117)
800a244: 5c 20 00 02 bne r1,r0,800a24c <_Thread_Resume+0xb4>
800a248: 5c a1 00 05 bne r5,r1,800a25c <_Thread_Resume+0xc4> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
800a24c: 78 01 08 02 mvhi r1,0x802
800a250: 38 21 39 d8 ori r1,r1,0x39d8
800a254: 34 02 00 01 mvi r2,1
800a258: 30 22 00 00 sb (r1+0),r2
}
}
}
_ISR_Enable( level );
800a25c: d0 03 00 00 wcsr IE,r3
}
800a260: c3 a0 00 00 ret
0800ccc8 <_Thread_Yield_processor>:
{
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
800ccc8: 78 01 08 02 mvhi r1,0x802
800cccc: 38 21 9a 78 ori r1,r1,0x9a78
800ccd0: 28 21 00 00 lw r1,(r1+0)
ready = executing->ready;
800ccd4: 28 22 00 8c lw r2,(r1+140)
_ISR_Disable( level );
800ccd8: 90 00 20 00 rcsr r4,IE
800ccdc: 34 05 ff fe mvi r5,-2
800cce0: a0 85 28 00 and r5,r4,r5
800cce4: d0 05 00 00 wcsr IE,r5
if ( !_Chain_Has_only_one_node( ready ) ) {
800cce8: 28 47 00 00 lw r7,(r2+0)
800ccec: 28 46 00 08 lw r6,(r2+8)
800ccf0: 78 03 08 02 mvhi r3,0x802
800ccf4: 38 63 9a 48 ori r3,r3,0x9a48
800ccf8: 44 e6 00 12 be r7,r6,800cd40 <_Thread_Yield_processor+0x78>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
800ccfc: 28 26 00 00 lw r6,(r1+0)
previous = the_node->previous;
800cd00: 28 27 00 04 lw r7,(r1+4)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
800cd04: 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;
800cd08: 58 e6 00 00 sw (r7+0),r6
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
800cd0c: 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;
800cd10: 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;
800cd14: 28 46 00 08 lw r6,(r2+8)
the_chain->last = the_node;
800cd18: 58 41 00 08 sw (r2+8),r1
old_last_node->next = the_node;
the_node->previous = old_last_node;
800cd1c: 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;
800cd20: 58 c1 00 00 sw (r6+0),r1
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
800cd24: d0 04 00 00 wcsr IE,r4
800cd28: d0 05 00 00 wcsr IE,r5
if ( _Thread_Is_heir( executing ) )
800cd2c: 28 65 00 00 lw r5,(r3+0)
800cd30: 5c 25 00 06 bne r1,r5,800cd48 <_Thread_Yield_processor+0x80><== NEVER TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
800cd34: 28 42 00 00 lw r2,(r2+0)
800cd38: 58 62 00 00 sw (r3+0),r2
800cd3c: e0 00 00 03 bi 800cd48 <_Thread_Yield_processor+0x80>
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
800cd40: 28 62 00 00 lw r2,(r3+0)
800cd44: 44 22 00 05 be r1,r2,800cd58 <_Thread_Yield_processor+0x90><== ALWAYS TAKEN
_Context_Switch_necessary = true;
800cd48: 78 01 08 02 mvhi r1,0x802
800cd4c: 38 21 9a 88 ori r1,r1,0x9a88
800cd50: 34 02 00 01 mvi r2,1
800cd54: 30 22 00 00 sb (r1+0),r2
_ISR_Enable( level );
800cd58: d0 04 00 00 wcsr IE,r4
}
800cd5c: c3 a0 00 00 ret
08004950 <_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
)
{
8004950: 37 9c ff ec addi sp,sp,-20
8004954: 5b 8b 00 14 sw (sp+20),r11
8004958: 5b 8c 00 10 sw (sp+16),r12
800495c: 5b 8d 00 0c sw (sp+12),r13
8004960: 5b 8e 00 08 sw (sp+8),r14
8004964: 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;
8004968: 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
)
{
800496c: 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);
8004970: 34 44 00 3c addi r4,r2,60
8004974: 59 64 00 38 sw (r11+56),r4
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
8004978: 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;
800497c: 34 04 00 00 mvi r4,0
8004980: b8 20 60 00 mv r12,r1
8004984: 59 64 00 3c sw (r11+60),r4
the_chain->last = _Chain_Head(the_chain);
8004988: 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 ];
800498c: b9 a0 08 00 mv r1,r13
8004990: 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
)
{
8004994: 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 ];
8004998: fb ff ee 3e calli 8000290 <__lshrsi3>
800499c: b4 21 10 00 add r2,r1,r1
80049a0: b4 41 08 00 add r1,r2,r1
80049a4: 34 02 00 02 mvi r2,2
80049a8: fb ff ee 12 calli 80001f0 <__ashlsi3>
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
80049ac: 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 ];
80049b0: b5 81 08 00 add r1,r12,r1
block_state = the_thread_queue->state;
80049b4: 29 87 00 38 lw r7,(r12+56)
if ( _Thread_queue_Is_reverse_search( priority ) )
80049b8: 5c 40 00 23 bne r2,r0,8004a44 <_Thread_queue_Enqueue_priority+0xf4>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
80049bc: 34 28 00 04 addi r8,r1,4
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
80049c0: 34 03 ff fe mvi r3,-2
80049c4: 90 00 20 00 rcsr r4,IE
80049c8: a0 83 30 00 and r6,r4,r3
80049cc: d0 06 00 00 wcsr IE,r6
search_thread = (Thread_Control *) header->first;
80049d0: 34 05 ff ff mvi r5,-1
80049d4: 28 22 00 00 lw r2,(r1+0)
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
80049d8: e0 00 00 0b bi 8004a04 <_Thread_queue_Enqueue_priority+0xb4>
search_priority = search_thread->current_priority;
80049dc: 28 45 00 14 lw r5,(r2+20)
if ( priority <= search_priority )
80049e0: 50 ad 00 0a bgeu r5,r13,8004a08 <_Thread_queue_Enqueue_priority+0xb8>
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
80049e4: d0 04 00 00 wcsr IE,r4
80049e8: d0 06 00 00 wcsr IE,r6
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
80049ec: 28 49 00 10 lw r9,(r2+16)
80049f0: a0 e9 48 00 and r9,r7,r9
80049f4: 5d 20 00 03 bne r9,r0,8004a00 <_Thread_queue_Enqueue_priority+0xb0><== ALWAYS TAKEN
_ISR_Enable( level );
80049f8: d0 04 00 00 wcsr IE,r4 <== NOT EXECUTED
goto restart_forward_search;
80049fc: e3 ff ff f2 bi 80049c4 <_Thread_queue_Enqueue_priority+0x74><== NOT EXECUTED
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
8004a00: 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 ) ) {
8004a04: 5c 48 ff f6 bne r2,r8,80049dc <_Thread_queue_Enqueue_priority+0x8c>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
8004a08: 29 83 00 30 lw r3,(r12+48)
8004a0c: 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;
8004a10: b8 80 38 00 mv r7,r4
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
8004a14: 5c 61 00 3b bne r3,r1,8004b00 <_Thread_queue_Enqueue_priority+0x1b0><== NEVER TAKEN
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
8004a18: 34 01 00 00 mvi r1,0
8004a1c: 59 81 00 30 sw (r12+48),r1
if ( priority == search_priority )
8004a20: 45 a5 00 2f be r13,r5,8004adc <_Thread_queue_Enqueue_priority+0x18c>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
8004a24: 28 41 00 04 lw r1,(r2+4)
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
8004a28: 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;
8004a2c: 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;
8004a30: 59 61 00 04 sw (r11+4),r1
previous_node->next = the_node;
8004a34: 58 2b 00 00 sw (r1+0),r11
search_node->previous = the_node;
8004a38: 58 4b 00 04 sw (r2+4),r11
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
8004a3c: d0 04 00 00 wcsr IE,r4
8004a40: e0 00 00 25 bi 8004ad4 <_Thread_queue_Enqueue_priority+0x184>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
8004a44: 78 04 08 01 mvhi r4,0x801
8004a48: 38 84 c0 c0 ori r4,r4,0xc0c0
_ISR_Disable( level );
8004a4c: 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;
8004a50: 40 86 00 00 lbu r6,(r4+0)
8004a54: 34 c6 00 01 addi r6,r6,1
_ISR_Disable( level );
8004a58: 90 00 28 00 rcsr r5,IE
8004a5c: a0 a3 40 00 and r8,r5,r3
8004a60: d0 08 00 00 wcsr IE,r8
search_thread = (Thread_Control *) header->last;
8004a64: 28 22 00 08 lw r2,(r1+8)
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
8004a68: e0 00 00 0b bi 8004a94 <_Thread_queue_Enqueue_priority+0x144>
search_priority = search_thread->current_priority;
8004a6c: 28 46 00 14 lw r6,(r2+20)
if ( priority >= search_priority )
8004a70: 51 a6 00 0a bgeu r13,r6,8004a98 <_Thread_queue_Enqueue_priority+0x148>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
8004a74: d0 05 00 00 wcsr IE,r5
8004a78: d0 08 00 00 wcsr IE,r8
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
8004a7c: 28 49 00 10 lw r9,(r2+16)
8004a80: a0 e9 48 00 and r9,r7,r9
8004a84: 5d 20 00 03 bne r9,r0,8004a90 <_Thread_queue_Enqueue_priority+0x140><== ALWAYS TAKEN
_ISR_Enable( level );
8004a88: d0 05 00 00 wcsr IE,r5 <== NOT EXECUTED
goto restart_reverse_search;
8004a8c: e3 ff ff f1 bi 8004a50 <_Thread_queue_Enqueue_priority+0x100><== NOT EXECUTED
}
search_thread = (Thread_Control *)
8004a90: 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 ) ) {
8004a94: 5c 41 ff f6 bne r2,r1,8004a6c <_Thread_queue_Enqueue_priority+0x11c>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
8004a98: 29 83 00 30 lw r3,(r12+48)
8004a9c: 34 01 00 01 mvi r1,1
8004aa0: b8 a0 38 00 mv r7,r5
8004aa4: 5c 61 00 17 bne r3,r1,8004b00 <_Thread_queue_Enqueue_priority+0x1b0><== NEVER TAKEN
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
8004aa8: 34 01 00 00 mvi r1,0
8004aac: 59 81 00 30 sw (r12+48),r1
if ( priority == search_priority )
8004ab0: b8 a0 20 00 mv r4,r5
8004ab4: 45 a6 00 0a be r13,r6,8004adc <_Thread_queue_Enqueue_priority+0x18c>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
8004ab8: 28 41 00 00 lw r1,(r2+0)
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
8004abc: 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;
8004ac0: 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;
8004ac4: 59 61 00 00 sw (r11+0),r1
the_node->previous = search_node;
search_node->next = the_node;
8004ac8: 58 4b 00 00 sw (r2+0),r11
next_node->previous = the_node;
8004acc: 58 2b 00 04 sw (r1+4),r11
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
8004ad0: d0 05 00 00 wcsr IE,r5
8004ad4: 34 01 00 01 mvi r1,1
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
8004ad8: e0 00 00 0c bi 8004b08 <_Thread_queue_Enqueue_priority+0x1b8>
8004adc: 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;
8004ae0: 28 41 00 04 lw r1,(r2+4)
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
8004ae4: 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;
8004ae8: 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;
8004aec: 59 61 00 04 sw (r11+4),r1
previous_node->next = the_node;
8004af0: 58 2b 00 00 sw (r1+0),r11
search_node->previous = the_node;
8004af4: 58 4b 00 04 sw (r2+4),r11
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
8004af8: d0 04 00 00 wcsr IE,r4
8004afc: e3 ff ff f6 bi 8004ad4 <_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;
8004b00: 29 81 00 30 lw r1,(r12+48) <== NOT EXECUTED
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
8004b04: 59 c7 00 00 sw (r14+0),r7 <== NOT EXECUTED
return the_thread_queue->sync_state;
}
8004b08: 2b 9d 00 04 lw ra,(sp+4)
8004b0c: 2b 8b 00 14 lw r11,(sp+20)
8004b10: 2b 8c 00 10 lw r12,(sp+16)
8004b14: 2b 8d 00 0c lw r13,(sp+12)
8004b18: 2b 8e 00 08 lw r14,(sp+8)
8004b1c: 37 9c 00 14 addi sp,sp,20
8004b20: c3 a0 00 00 ret
08008f24 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
8008f24: 37 9c ff fc addi sp,sp,-4
8008f28: 5b 9d 00 04 sw (sp+4),ra
8008f2c: b8 20 10 00 mv r2,r1
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
8008f30: 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 &&
8008f34: 28 24 00 30 lw r4,(r1+48)
8008f38: 44 80 00 0c be r4,r0,8008f68 <_Thread_queue_Process_timeout+0x44>
8008f3c: 78 03 08 01 mvhi r3,0x801
8008f40: 38 63 c8 e8 ori r3,r3,0xc8e8
8008f44: 28 63 00 00 lw r3,(r3+0)
8008f48: 5c 43 00 08 bne r2,r3,8008f68 <_Thread_queue_Process_timeout+0x44><== NEVER TAKEN
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
8008f4c: 34 03 00 03 mvi r3,3
8008f50: 44 83 00 0a be r4,r3,8008f78 <_Thread_queue_Process_timeout+0x54>
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
8008f54: 34 03 00 02 mvi r3,2
8008f58: 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;
8008f5c: 28 21 00 3c lw r1,(r1+60)
8008f60: 58 41 00 34 sw (r2+52),r1
8008f64: e0 00 00 05 bi 8008f78 <_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;
8008f68: 28 21 00 3c lw r1,(r1+60)
8008f6c: 58 41 00 34 sw (r2+52),r1
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
8008f70: 28 41 00 44 lw r1,(r2+68)
8008f74: fb ff ff 93 calli 8008dc0 <_Thread_queue_Extract>
}
}
8008f78: 2b 9d 00 04 lw ra,(sp+4)
8008f7c: 37 9c 00 04 addi sp,sp,4
8008f80: c3 a0 00 00 ret
08004bb0 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
8004bb0: 37 9c ff ec addi sp,sp,-20
8004bb4: 5b 8b 00 10 sw (sp+16),r11
8004bb8: 5b 8c 00 0c sw (sp+12),r12
8004bbc: 5b 8d 00 08 sw (sp+8),r13
8004bc0: 5b 9d 00 04 sw (sp+4),ra
8004bc4: b8 20 58 00 mv r11,r1
8004bc8: 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 )
8004bcc: 44 20 00 17 be r1,r0,8004c28 <_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 ) {
8004bd0: 28 22 00 34 lw r2,(r1+52)
8004bd4: 34 01 00 01 mvi r1,1
8004bd8: 5c 41 00 14 bne r2,r1,8004c28 <_Thread_queue_Requeue+0x78> <== NEVER TAKEN
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
8004bdc: 90 00 68 00 rcsr r13,IE
8004be0: 34 01 ff fe mvi r1,-2
8004be4: a1 a1 08 00 and r1,r13,r1
8004be8: d0 01 00 00 wcsr IE,r1
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
8004bec: 29 82 00 10 lw r2,(r12+16)
8004bf0: 78 01 00 03 mvhi r1,0x3
8004bf4: 38 21 be e0 ori r1,r1,0xbee0
8004bf8: a0 41 08 00 and r1,r2,r1
8004bfc: 44 20 00 0a be r1,r0,8004c24 <_Thread_queue_Requeue+0x74> <== NEVER TAKEN
8004c00: 34 03 00 01 mvi r3,1
8004c04: 59 63 00 30 sw (r11+48),r3
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
8004c08: b9 60 08 00 mv r1,r11
8004c0c: b9 80 10 00 mv r2,r12
8004c10: f8 00 10 78 calli 8008df0 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
8004c14: b9 60 08 00 mv r1,r11
8004c18: b9 80 10 00 mv r2,r12
8004c1c: 37 83 00 14 addi r3,sp,20
8004c20: fb ff ff 4c calli 8004950 <_Thread_queue_Enqueue_priority>
}
_ISR_Enable( level );
8004c24: d0 0d 00 00 wcsr IE,r13
}
}
8004c28: 2b 9d 00 04 lw ra,(sp+4)
8004c2c: 2b 8b 00 10 lw r11,(sp+16)
8004c30: 2b 8c 00 0c lw r12,(sp+12)
8004c34: 2b 8d 00 08 lw r13,(sp+8)
8004c38: 37 9c 00 14 addi sp,sp,20
8004c3c: c3 a0 00 00 ret
08004c40 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
8004c40: 37 9c ff f8 addi sp,sp,-8
8004c44: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
8004c48: 37 82 00 08 addi r2,sp,8
8004c4c: fb ff fd a0 calli 80042cc <_Thread_Get>
switch ( location ) {
8004c50: 2b 82 00 08 lw r2,(sp+8)
8004c54: 5c 40 00 07 bne r2,r0,8004c70 <_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 );
8004c58: f8 00 10 b3 calli 8008f24 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
8004c5c: 78 01 08 01 mvhi r1,0x801
8004c60: 38 21 c8 2c ori r1,r1,0xc82c
8004c64: 28 22 00 00 lw r2,(r1+0)
8004c68: 34 42 ff ff addi r2,r2,-1
8004c6c: 58 22 00 00 sw (r1+0),r2
_Thread_Unnest_dispatch();
break;
}
}
8004c70: 2b 9d 00 04 lw ra,(sp+4)
8004c74: 37 9c 00 08 addi sp,sp,8
8004c78: 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 dd 84 ori r17,r17,0xdd84
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 dc c4 ori r16,r16,0xdcc4
*/
_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 dc 34 ori r13,r13,0xdc34
*/
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 36 calli 80192e8 <_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 2f calli 80192e8 <_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 13 f1 calli 8019208 <_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 02 ec calli 8014e00 <_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 47 calli 8019394 <_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 10 c2 calli 8018624 <_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 9e calli 80179a8 <_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 74 calli 8019510 <_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 72 calli 8019510 <_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 dc 34 ori r1,r1,0xdc34
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 dd 84 ori r2,r2,0xdd84
*/
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 13 ec calli 8019394 <_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 dc c4 ori r1,r1,0xdcc4
*/
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 13 cb calli 8019394 <_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 4b calli 80179a8 <_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 52 calli 8014dd0 <_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
0800773c <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
800773c: 28 24 00 00 lw r4,(r1+0)
8007740: 28 43 00 00 lw r3,(r2+0)
8007744: 4c 64 00 03 bge r3,r4,8007750 <_Timespec_Greater_than+0x14>
8007748: 34 01 00 01 mvi r1,1
800774c: c3 a0 00 00 ret
return true;
if ( lhs->tv_sec < rhs->tv_sec )
8007750: 4c 83 00 03 bge r4,r3,800775c <_Timespec_Greater_than+0x20><== ALWAYS TAKEN
8007754: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8007758: c3 a0 00 00 ret <== NOT EXECUTED
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
800775c: 28 23 00 04 lw r3,(r1+4)
8007760: 28 41 00 04 lw r1,(r2+4)
8007764: e8 61 08 00 cmpg r1,r3,r1
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
8007768: c3 a0 00 00 ret
080078c4 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
80078c4: 37 9c ff e4 addi sp,sp,-28
80078c8: 5b 8b 00 1c sw (sp+28),r11
80078cc: 5b 8c 00 18 sw (sp+24),r12
80078d0: 5b 8d 00 14 sw (sp+20),r13
80078d4: 5b 8e 00 10 sw (sp+16),r14
80078d8: 5b 8f 00 0c sw (sp+12),r15
80078dc: 5b 90 00 08 sw (sp+8),r16
80078e0: 5b 9d 00 04 sw (sp+4),ra
80078e4: b8 20 60 00 mv r12,r1
80078e8: b8 40 20 00 mv r4,r2
80078ec: b8 60 58 00 mv r11,r3
ISR_Level level;
_ISR_Disable( level );
80078f0: 90 00 10 00 rcsr r2,IE
80078f4: 34 01 ff fe mvi r1,-2
80078f8: a0 41 08 00 and r1,r2,r1
80078fc: 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));
8007900: 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;
8007904: 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 ) ) {
8007908: 44 2e 00 1d be r1,r14,800797c <_Watchdog_Adjust+0xb8>
switch ( direction ) {
800790c: 44 80 00 04 be r4,r0,800791c <_Watchdog_Adjust+0x58>
8007910: 34 03 00 01 mvi r3,1
8007914: 5c 83 00 1a bne r4,r3,800797c <_Watchdog_Adjust+0xb8> <== NEVER TAKEN
8007918: e0 00 00 04 bi 8007928 <_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;
800791c: 34 10 00 01 mvi r16,1
_ISR_Enable( level );
_Watchdog_Tickle( header );
_ISR_Disable( level );
8007920: 34 0f ff fe mvi r15,-2
8007924: e0 00 00 15 bi 8007978 <_Watchdog_Adjust+0xb4>
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
8007928: 28 23 00 10 lw r3,(r1+16)
800792c: b4 6b 58 00 add r11,r3,r11
8007930: e0 00 00 05 bi 8007944 <_Watchdog_Adjust+0x80>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
8007934: 29 81 00 00 lw r1,(r12+0)
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
8007938: 28 2d 00 10 lw r13,(r1+16)
800793c: 51 6d 00 04 bgeu r11,r13,800794c <_Watchdog_Adjust+0x88>
_Watchdog_First( header )->delta_interval -= units;
8007940: c9 ab 58 00 sub r11,r13,r11
8007944: 58 2b 00 10 sw (r1+16),r11
break;
8007948: e0 00 00 0d bi 800797c <_Watchdog_Adjust+0xb8>
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
800794c: 58 30 00 10 sw (r1+16),r16
_ISR_Enable( level );
8007950: d0 02 00 00 wcsr IE,r2
_Watchdog_Tickle( header );
8007954: b9 80 08 00 mv r1,r12
8007958: f8 00 00 9e calli 8007bd0 <_Watchdog_Tickle>
_ISR_Disable( level );
800795c: 90 00 08 00 rcsr r1,IE
8007960: a0 2f 10 00 and r2,r1,r15
8007964: d0 02 00 00 wcsr IE,r2
if ( _Chain_Is_empty( header ) )
8007968: 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;
800796c: c9 6d 58 00 sub r11,r11,r13
8007970: b8 20 10 00 mv r2,r1
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
8007974: 44 6e 00 02 be r3,r14,800797c <_Watchdog_Adjust+0xb8>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
8007978: 5d 60 ff ef bne r11,r0,8007934 <_Watchdog_Adjust+0x70> <== ALWAYS TAKEN
}
break;
}
}
_ISR_Enable( level );
800797c: d0 02 00 00 wcsr IE,r2
}
8007980: 2b 9d 00 04 lw ra,(sp+4)
8007984: 2b 8b 00 1c lw r11,(sp+28)
8007988: 2b 8c 00 18 lw r12,(sp+24)
800798c: 2b 8d 00 14 lw r13,(sp+20)
8007990: 2b 8e 00 10 lw r14,(sp+16)
8007994: 2b 8f 00 0c lw r15,(sp+12)
8007998: 2b 90 00 08 lw r16,(sp+8)
800799c: 37 9c 00 1c addi sp,sp,28
80079a0: c3 a0 00 00 ret
0800574c <_Watchdog_Remove>:
{
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
800574c: 90 00 20 00 rcsr r4,IE
8005750: 34 02 ff fe mvi r2,-2
8005754: a0 82 10 00 and r2,r4,r2
8005758: d0 02 00 00 wcsr IE,r2
previous_state = the_watchdog->state;
800575c: 28 22 00 08 lw r2,(r1+8)
switch ( previous_state ) {
8005760: 34 03 00 01 mvi r3,1
8005764: 44 43 00 05 be r2,r3,8005778 <_Watchdog_Remove+0x2c>
8005768: 44 40 00 1e be r2,r0,80057e0 <_Watchdog_Remove+0x94>
800576c: 34 03 00 03 mvi r3,3
8005770: 54 43 00 1c bgu r2,r3,80057e0 <_Watchdog_Remove+0x94> <== NEVER TAKEN
8005774: e0 00 00 04 bi 8005784 <_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;
8005778: 34 03 00 00 mvi r3,0
800577c: 58 23 00 08 sw (r1+8),r3
break;
8005780: e0 00 00 18 bi 80057e0 <_Watchdog_Remove+0x94>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
8005784: 28 23 00 00 lw r3,(r1+0)
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
8005788: 34 05 00 00 mvi r5,0
800578c: 58 25 00 08 sw (r1+8),r5
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
8005790: 28 65 00 00 lw r5,(r3+0)
8005794: 44 a0 00 05 be r5,r0,80057a8 <_Watchdog_Remove+0x5c>
next_watchdog->delta_interval += the_watchdog->delta_interval;
8005798: 28 66 00 10 lw r6,(r3+16)
800579c: 28 25 00 10 lw r5,(r1+16)
80057a0: b4 c5 28 00 add r5,r6,r5
80057a4: 58 65 00 10 sw (r3+16),r5
if ( _Watchdog_Sync_count )
80057a8: 78 03 08 01 mvhi r3,0x801
80057ac: 38 63 c9 78 ori r3,r3,0xc978
80057b0: 28 63 00 00 lw r3,(r3+0)
80057b4: 44 60 00 07 be r3,r0,80057d0 <_Watchdog_Remove+0x84>
_Watchdog_Sync_level = _ISR_Nest_level;
80057b8: 78 03 08 01 mvhi r3,0x801
80057bc: 38 63 c8 c4 ori r3,r3,0xc8c4
80057c0: 28 65 00 00 lw r5,(r3+0)
80057c4: 78 03 08 01 mvhi r3,0x801
80057c8: 38 63 c8 e4 ori r3,r3,0xc8e4
80057cc: 58 65 00 00 sw (r3+0),r5
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
80057d0: 28 23 00 00 lw r3,(r1+0)
previous = the_node->previous;
80057d4: 28 25 00 04 lw r5,(r1+4)
next->previous = previous;
previous->next = next;
80057d8: 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;
80057dc: 58 65 00 04 sw (r3+4),r5
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
80057e0: 78 03 08 01 mvhi r3,0x801
80057e4: 38 63 c9 7c ori r3,r3,0xc97c
80057e8: 28 63 00 00 lw r3,(r3+0)
80057ec: 58 23 00 18 sw (r1+24),r3
_ISR_Enable( level );
80057f0: d0 04 00 00 wcsr IE,r4
return( previous_state );
}
80057f4: b8 40 08 00 mv r1,r2
80057f8: c3 a0 00 00 ret
080075b4 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
80075b4: 37 9c ff ec addi sp,sp,-20
80075b8: 5b 8b 00 14 sw (sp+20),r11
80075bc: 5b 8c 00 10 sw (sp+16),r12
80075c0: 5b 8d 00 0c sw (sp+12),r13
80075c4: 5b 8e 00 08 sw (sp+8),r14
80075c8: 5b 9d 00 04 sw (sp+4),ra
80075cc: b8 20 70 00 mv r14,r1
80075d0: b8 40 60 00 mv r12,r2
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
80075d4: 90 00 68 00 rcsr r13,IE
80075d8: 34 01 ff fe mvi r1,-2
80075dc: a1 a1 08 00 and r1,r13,r1
80075e0: d0 01 00 00 wcsr IE,r1
printk( "Watchdog Chain: %s %p\n", name, header );
80075e4: 78 01 08 01 mvhi r1,0x801
80075e8: b9 80 18 00 mv r3,r12
80075ec: 38 21 f8 b8 ori r1,r1,0xf8b8
80075f0: b9 c0 10 00 mv r2,r14
80075f4: fb ff ed 2a calli 8002a9c <printk>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
80075f8: 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;
80075fc: 35 8c 00 04 addi r12,r12,4
if ( !_Chain_Is_empty( header ) ) {
8007600: 45 6c 00 0b be r11,r12,800762c <_Watchdog_Report_chain+0x78>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
8007604: b9 60 10 00 mv r2,r11
8007608: 34 01 00 00 mvi r1,0
800760c: f8 00 00 13 calli 8007658 <_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 )
8007610: 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 ;
8007614: 5d 6c ff fc bne r11,r12,8007604 <_Watchdog_Report_chain+0x50><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
8007618: 78 01 08 01 mvhi r1,0x801
800761c: 38 21 f8 d0 ori r1,r1,0xf8d0
8007620: b9 c0 10 00 mv r2,r14
8007624: fb ff ed 1e calli 8002a9c <printk>
8007628: e0 00 00 04 bi 8007638 <_Watchdog_Report_chain+0x84>
} else {
printk( "Chain is empty\n" );
800762c: 78 01 08 01 mvhi r1,0x801
8007630: 38 21 f8 e0 ori r1,r1,0xf8e0
8007634: fb ff ed 1a calli 8002a9c <printk>
}
_ISR_Enable( level );
8007638: d0 0d 00 00 wcsr IE,r13
}
800763c: 2b 9d 00 04 lw ra,(sp+4)
8007640: 2b 8b 00 14 lw r11,(sp+20)
8007644: 2b 8c 00 10 lw r12,(sp+16)
8007648: 2b 8d 00 0c lw r13,(sp+12)
800764c: 2b 8e 00 08 lw r14,(sp+8)
8007650: 37 9c 00 14 addi sp,sp,20
8007654: c3 a0 00 00 ret
080057fc <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
80057fc: 37 9c ff e4 addi sp,sp,-28
8005800: 5b 8b 00 1c sw (sp+28),r11
8005804: 5b 8c 00 18 sw (sp+24),r12
8005808: 5b 8d 00 14 sw (sp+20),r13
800580c: 5b 8e 00 10 sw (sp+16),r14
8005810: 5b 8f 00 0c sw (sp+12),r15
8005814: 5b 90 00 08 sw (sp+8),r16
8005818: 5b 9d 00 04 sw (sp+4),ra
800581c: 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 );
8005820: 90 00 08 00 rcsr r1,IE
8005824: 34 02 ff fe mvi r2,-2
8005828: a0 22 10 00 and r2,r1,r2
800582c: 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));
8005830: 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;
8005834: 35 8e 00 04 addi r14,r12,4
if ( _Chain_Is_empty( header ) )
8005838: 45 6e 00 1a be r11,r14,80058a0 <_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) {
800583c: 29 62 00 10 lw r2,(r11+16)
8005840: 44 40 00 04 be r2,r0,8005850 <_Watchdog_Tickle+0x54>
the_watchdog->delta_interval--;
8005844: 34 42 ff ff addi r2,r2,-1
8005848: 59 62 00 10 sw (r11+16),r2
if ( the_watchdog->delta_interval != 0 )
800584c: 5c 40 00 15 bne r2,r0,80058a0 <_Watchdog_Tickle+0xa4>
8005850: b8 20 68 00 mv r13,r1
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
_ISR_Enable( level );
switch( watchdog_state ) {
8005854: 34 10 00 02 mvi r16,2
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
8005858: 34 0f ff fe mvi r15,-2
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
800585c: b9 60 08 00 mv r1,r11
8005860: fb ff ff bb calli 800574c <_Watchdog_Remove>
_ISR_Enable( level );
8005864: d0 0d 00 00 wcsr IE,r13
switch( watchdog_state ) {
8005868: 5c 30 00 05 bne r1,r16,800587c <_Watchdog_Tickle+0x80> <== NEVER TAKEN
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
800586c: 29 62 00 24 lw r2,(r11+36)
8005870: 29 63 00 1c lw r3,(r11+28)
8005874: 29 61 00 20 lw r1,(r11+32)
8005878: d8 60 00 00 call r3
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
800587c: 90 00 08 00 rcsr r1,IE
8005880: a0 2f 10 00 and r2,r1,r15
8005884: d0 02 00 00 wcsr IE,r2
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
8005888: 29 82 00 00 lw r2,(r12+0)
800588c: b8 20 68 00 mv r13,r1
8005890: b8 40 58 00 mv r11,r2
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
8005894: 44 4e 00 03 be r2,r14,80058a0 <_Watchdog_Tickle+0xa4>
8005898: 28 42 00 10 lw r2,(r2+16)
800589c: 44 40 ff f0 be r2,r0,800585c <_Watchdog_Tickle+0x60>
leave:
_ISR_Enable(level);
80058a0: d0 01 00 00 wcsr IE,r1
}
80058a4: 2b 9d 00 04 lw ra,(sp+4)
80058a8: 2b 8b 00 1c lw r11,(sp+28)
80058ac: 2b 8c 00 18 lw r12,(sp+24)
80058b0: 2b 8d 00 14 lw r13,(sp+20)
80058b4: 2b 8e 00 10 lw r14,(sp+16)
80058b8: 2b 8f 00 0c lw r15,(sp+12)
80058bc: 2b 90 00 08 lw r16,(sp+8)
80058c0: 37 9c 00 1c addi sp,sp,28
80058c4: c3 a0 00 00 ret
080058c8 <_Workspace_Allocate_or_fatal_error>:
* _Workspace_Allocate_or_fatal_error
*/
void *_Workspace_Allocate_or_fatal_error(
size_t size
)
{
80058c8: 37 9c ff fc addi sp,sp,-4
80058cc: 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 );
80058d0: 34 03 00 00 mvi r3,0
80058d4: b8 20 10 00 mv r2,r1
80058d8: 78 01 08 01 mvhi r1,0x801
80058dc: 38 21 c8 50 ori r1,r1,0xc850
80058e0: b8 60 20 00 mv r4,r3
80058e4: f8 00 0a e6 calli 800847c <_Heap_Allocate_aligned_with_boundary>
__builtin_return_address( 1 ),
memory
);
#endif
if ( memory == NULL )
80058e8: 5c 20 00 04 bne r1,r0,80058f8 <_Workspace_Allocate_or_fatal_error+0x30><== ALWAYS TAKEN
_Internal_error_Occurred(
80058ec: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
80058f0: 34 03 00 04 mvi r3,4 <== NOT EXECUTED
80058f4: fb ff f6 aa calli 800339c <_Internal_error_Occurred> <== NOT EXECUTED
true,
INTERNAL_ERROR_WORKSPACE_ALLOCATION
);
return memory;
}
80058f8: 2b 9d 00 04 lw ra,(sp+4)
80058fc: 37 9c 00 04 addi sp,sp,4
8005900: c3 a0 00 00 ret
08025080 <__kill>:
#endif
int __kill( pid_t pid, int sig )
{
return 0;
}
8025080: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8025084: c3 a0 00 00 ret <== NOT EXECUTED
080196a0 <_exit>:
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
FINI_SYMBOL();
80196a0: 37 9c ff f8 addi sp,sp,-8
80196a4: 5b 9d 00 04 sw (sp+4),ra
80196a8: 5b 81 00 08 sw (sp+8),r1
80196ac: f8 00 02 7d calli 801a0a0 <__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();
80196b0: fb ff ff d9 calli 8019614 <libc_wrapup>
rtems_shutdown_executive(status);
80196b4: 2b 81 00 08 lw r1,(sp+8)
80196b8: f8 00 00 61 calli 801983c <rtems_shutdown_executive>
80196bc: e0 00 00 00 bi 80196bc <_exit+0x1c> <== NOT EXECUTED
08002310 <_fcntl_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
int cmd,
int arg
)
{
8002310: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8002314: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return fcntl( fd, cmd, arg );
8002318: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
800231c: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
8002320: b8 80 18 00 mv r3,r4 <== NOT EXECUTED
8002324: fb ff ff 69 calli 80020c8 <fcntl> <== NOT EXECUTED
}
8002328: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800232c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8002330: c3 a0 00 00 ret <== NOT EXECUTED
0802504c <_getpid_r>:
pid_t _getpid_r(
struct _reent *ptr __attribute__((unused))
)
{
return getpid();
}
802504c: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
8025050: c3 a0 00 00 ret <== NOT EXECUTED
080072cc <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
80072cc: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
80072d0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return gettimeofday( tp, tzp );
80072d4: fb ff ff e0 calli 8007254 <gettimeofday> <== NOT EXECUTED
}
80072d8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80072dc: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
80072e0: c3 a0 00 00 ret <== NOT EXECUTED
08025078 <_kill_r>:
#include <reent.h>
int _kill_r( struct _reent *ptr, pid_t pid, int sig )
{
return 0;
}
8025078: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
802507c: c3 a0 00 00 ret <== NOT EXECUTED
08002e48 <_link_r>:
int _link_r(
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
8002e48: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8002e4c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return link( existing, new );
8002e50: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
8002e54: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
8002e58: fb ff ff 7e calli 8002c50 <link> <== NOT EXECUTED
}
8002e5c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002e60: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8002e64: c3 a0 00 00 ret <== NOT EXECUTED
080197f8 <_realloc_r>:
void *_realloc_r(
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
80197f8: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
80197fc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return realloc( ptr, size );
8019800: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
8019804: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
8019808: f8 00 00 1b calli 8019874 <realloc> <== NOT EXECUTED
}
801980c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8019810: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8019814: c3 a0 00 00 ret <== NOT EXECUTED
08005f1c <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
8005f1c: 37 9c ff a4 addi sp,sp,-92
8005f20: 5b 8b 00 1c sw (sp+28),r11
8005f24: 5b 8c 00 18 sw (sp+24),r12
8005f28: 5b 8d 00 14 sw (sp+20),r13
8005f2c: 5b 8e 00 10 sw (sp+16),r14
8005f30: 5b 8f 00 0c sw (sp+12),r15
8005f34: 5b 90 00 08 sw (sp+8),r16
8005f38: 5b 9d 00 04 sw (sp+4),ra
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
8005f3c: b8 40 08 00 mv r1,r2
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
8005f40: b8 40 68 00 mv r13,r2
8005f44: b8 60 70 00 mv r14,r3
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
8005f48: fb ff f9 f4 calli 8004718 <rtems_filesystem_dirname>
8005f4c: b8 20 60 00 mv r12,r1
if ( old_parent_pathlen == 0 )
8005f50: 5c 20 00 19 bne r1,r0,8005fb4 <_rename_r+0x98>
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
8005f54: 41 a2 00 00 lbu r2,(r13+0)
8005f58: 64 43 00 5c cmpei r3,r2,92
8005f5c: 64 41 00 2f cmpei r1,r2,47
8005f60: b8 61 08 00 or r1,r3,r1
8005f64: 5c 2c 00 02 bne r1,r12,8005f6c <_rename_r+0x50> <== NEVER TAKEN
8005f68: 5c 40 00 0a bne r2,r0,8005f90 <_rename_r+0x74> <== ALWAYS TAKEN
8005f6c: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8005f70: 38 42 81 30 ori r2,r2,0x8130 <== NOT EXECUTED
8005f74: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED
8005f78: 37 81 00 34 addi r1,sp,52 <== NOT EXECUTED
8005f7c: 34 03 00 14 mvi r3,20 <== NOT EXECUTED
8005f80: 34 42 00 18 addi r2,r2,24 <== NOT EXECUTED
8005f84: f8 00 32 19 calli 80127e8 <memcpy> <== NOT EXECUTED
8005f88: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED
8005f8c: e0 00 00 12 bi 8005fd4 <_rename_r+0xb8> <== NOT EXECUTED
8005f90: 78 02 08 02 mvhi r2,0x802
8005f94: 38 42 81 30 ori r2,r2,0x8130
8005f98: 28 42 00 00 lw r2,(r2+0)
8005f9c: 37 81 00 34 addi r1,sp,52
8005fa0: 34 03 00 14 mvi r3,20
8005fa4: 34 42 00 04 addi r2,r2,4
8005fa8: f8 00 32 10 calli 80127e8 <memcpy>
8005fac: b9 80 58 00 mv r11,r12
8005fb0: e0 00 00 09 bi 8005fd4 <_rename_r+0xb8>
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
8005fb4: b9 a0 08 00 mv r1,r13
8005fb8: b9 80 10 00 mv r2,r12
8005fbc: 34 03 00 02 mvi r3,2
8005fc0: 37 84 00 34 addi r4,sp,52
8005fc4: 34 05 00 00 mvi r5,0
8005fc8: fb ff fa 22 calli 8004850 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
8005fcc: 5c 20 00 a2 bne r1,r0,8006254 <_rename_r+0x338> <== NEVER TAKEN
8005fd0: 34 0b 00 01 mvi r11,1
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
8005fd4: 37 90 00 48 addi r16,sp,72
8005fd8: 37 8f 00 34 addi r15,sp,52
8005fdc: 34 03 00 14 mvi r3,20
8005fe0: b9 e0 10 00 mv r2,r15
8005fe4: ba 00 08 00 mv r1,r16
8005fe8: f8 00 32 00 calli 80127e8 <memcpy>
name = old + old_parent_pathlen;
8005fec: b5 ac 60 00 add r12,r13,r12
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
8005ff0: b9 80 08 00 mv r1,r12
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
8005ff4: 5b 8c 00 5c sw (sp+92),r12
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
8005ff8: f8 00 38 d7 calli 8014354 <strlen>
8005ffc: b8 20 10 00 mv r2,r1
8006000: b9 80 08 00 mv r1,r12
8006004: fb ff f9 b6 calli 80046dc <rtems_filesystem_prefix_separators>
8006008: b5 81 60 00 add r12,r12,r1
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
800600c: b9 80 08 00 mv r1,r12
* 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 ) );
8006010: 5b 8c 00 5c sw (sp+92),r12
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
8006014: f8 00 38 d0 calli 8014354 <strlen>
8006018: 34 03 00 00 mvi r3,0
800601c: b8 20 10 00 mv r2,r1
8006020: ba 00 20 00 mv r4,r16
8006024: b9 80 08 00 mv r1,r12
8006028: b8 60 28 00 mv r5,r3
800602c: fb ff f9 cf calli 8004768 <rtems_filesystem_evaluate_relative_path>
8006030: b8 20 20 00 mv r4,r1
0, &old_loc, false );
if ( result != 0 ) {
8006034: 44 20 00 09 be r1,r0,8006058 <_rename_r+0x13c>
if ( free_old_parentloc )
8006038: 45 60 00 87 be r11,r0,8006254 <_rename_r+0x338> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
800603c: 2b 81 00 40 lw r1,(sp+64)
8006040: 44 20 00 85 be r1,r0,8006254 <_rename_r+0x338> <== NEVER TAKEN
8006044: 28 23 00 1c lw r3,(r1+28)
8006048: 44 60 00 83 be r3,r0,8006254 <_rename_r+0x338> <== NEVER TAKEN
800604c: b9 e0 08 00 mv r1,r15
8006050: d8 60 00 00 call r3
8006054: e0 00 00 80 bi 8006254 <_rename_r+0x338>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
8006058: 41 c2 00 00 lbu r2,(r14+0)
800605c: 64 4c 00 5c cmpei r12,r2,92
8006060: 64 41 00 2f cmpei r1,r2,47
8006064: b9 81 60 00 or r12,r12,r1
8006068: 5d 84 00 02 bne r12,r4,8006070 <_rename_r+0x154>
800606c: 5c 4c 00 0a bne r2,r12,8006094 <_rename_r+0x178> <== ALWAYS TAKEN
8006070: 78 02 08 02 mvhi r2,0x802
8006074: 38 42 81 30 ori r2,r2,0x8130
8006078: 28 42 00 00 lw r2,(r2+0)
800607c: 37 81 00 20 addi r1,sp,32
8006080: 34 03 00 14 mvi r3,20
8006084: 34 42 00 18 addi r2,r2,24
8006088: f8 00 31 d8 calli 80127e8 <memcpy>
800608c: 34 0c 00 01 mvi r12,1
8006090: e0 00 00 08 bi 80060b0 <_rename_r+0x194>
8006094: 78 02 08 02 mvhi r2,0x802
8006098: 38 42 81 30 ori r2,r2,0x8130
800609c: 28 42 00 00 lw r2,(r2+0)
80060a0: 37 81 00 20 addi r1,sp,32
80060a4: 34 03 00 14 mvi r3,20
80060a8: 34 42 00 04 addi r2,r2,4
80060ac: f8 00 31 cf calli 80127e8 <memcpy>
if ( !new_parent_loc.ops->evalformake_h ) {
80060b0: 2b 81 00 2c lw r1,(sp+44)
80060b4: 28 24 00 04 lw r4,(r1+4)
80060b8: 5c 80 00 03 bne r4,r0,80060c4 <_rename_r+0x1a8>
if ( free_old_parentloc )
80060bc: 45 64 00 42 be r11,r4,80061c4 <_rename_r+0x2a8> <== NEVER TAKEN
80060c0: e0 00 00 3b bi 80061ac <_rename_r+0x290>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
80060c4: 37 8d 00 20 addi r13,sp,32
80060c8: b5 cc 08 00 add r1,r14,r12
80060cc: b9 a0 10 00 mv r2,r13
80060d0: 37 83 00 5c addi r3,sp,92
80060d4: d8 80 00 00 call r4
if ( result != 0 ) {
80060d8: 44 20 00 15 be r1,r0,800612c <_rename_r+0x210>
rtems_filesystem_freenode( &new_parent_loc );
80060dc: 2b 81 00 2c lw r1,(sp+44)
80060e0: 44 20 00 05 be r1,r0,80060f4 <_rename_r+0x1d8> <== NEVER TAKEN
80060e4: 28 22 00 1c lw r2,(r1+28)
80060e8: 44 40 00 03 be r2,r0,80060f4 <_rename_r+0x1d8> <== NEVER TAKEN
80060ec: b9 a0 08 00 mv r1,r13
80060f0: d8 40 00 00 call r2
if ( free_old_parentloc )
80060f4: 45 60 00 07 be r11,r0,8006110 <_rename_r+0x1f4> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
80060f8: 2b 81 00 40 lw r1,(sp+64)
80060fc: 44 20 00 05 be r1,r0,8006110 <_rename_r+0x1f4> <== NEVER TAKEN
8006100: 28 22 00 1c lw r2,(r1+28)
8006104: 44 40 00 03 be r2,r0,8006110 <_rename_r+0x1f4> <== NEVER TAKEN
8006108: 37 81 00 34 addi r1,sp,52
800610c: d8 40 00 00 call r2
rtems_filesystem_freenode( &old_loc );
8006110: 2b 81 00 54 lw r1,(sp+84)
8006114: 44 20 00 50 be r1,r0,8006254 <_rename_r+0x338> <== NEVER TAKEN
8006118: 28 22 00 1c lw r2,(r1+28)
800611c: 44 40 00 4e be r2,r0,8006254 <_rename_r+0x338> <== NEVER TAKEN
8006120: 37 81 00 48 addi r1,sp,72
8006124: d8 40 00 00 call r2
8006128: e0 00 00 4b bi 8006254 <_rename_r+0x338>
/*
* 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 ) {
800612c: 2b 81 00 30 lw r1,(sp+48)
8006130: 2b 83 00 44 lw r3,(sp+68)
8006134: 2b 82 00 2c lw r2,(sp+44)
8006138: 44 61 00 16 be r3,r1,8006190 <_rename_r+0x274>
rtems_filesystem_freenode( &new_parent_loc );
800613c: 44 40 00 05 be r2,r0,8006150 <_rename_r+0x234> <== NEVER TAKEN
8006140: 28 42 00 1c lw r2,(r2+28)
8006144: 44 40 00 03 be r2,r0,8006150 <_rename_r+0x234> <== NEVER TAKEN
8006148: b9 a0 08 00 mv r1,r13
800614c: d8 40 00 00 call r2
if ( free_old_parentloc )
8006150: 45 60 00 07 be r11,r0,800616c <_rename_r+0x250>
rtems_filesystem_freenode( &old_parent_loc );
8006154: 2b 81 00 40 lw r1,(sp+64)
8006158: 44 20 00 05 be r1,r0,800616c <_rename_r+0x250> <== NEVER TAKEN
800615c: 28 22 00 1c lw r2,(r1+28)
8006160: 44 40 00 03 be r2,r0,800616c <_rename_r+0x250> <== NEVER TAKEN
8006164: 37 81 00 34 addi r1,sp,52
8006168: d8 40 00 00 call r2
rtems_filesystem_freenode( &old_loc );
800616c: 2b 81 00 54 lw r1,(sp+84)
8006170: 44 20 00 05 be r1,r0,8006184 <_rename_r+0x268> <== NEVER TAKEN
8006174: 28 22 00 1c lw r2,(r1+28)
8006178: 44 40 00 03 be r2,r0,8006184 <_rename_r+0x268> <== NEVER TAKEN
800617c: 37 81 00 48 addi r1,sp,72
8006180: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( EXDEV );
8006184: f8 00 2a 57 calli 8010ae0 <__errno>
8006188: 34 02 00 12 mvi r2,18
800618c: e0 00 00 16 bi 80061e4 <_rename_r+0x2c8>
}
if ( !new_parent_loc.ops->rename_h ) {
8006190: 28 45 00 40 lw r5,(r2+64)
8006194: 5c a0 00 16 bne r5,r0,80061ec <_rename_r+0x2d0>
rtems_filesystem_freenode( &new_parent_loc );
8006198: 28 42 00 1c lw r2,(r2+28)
800619c: 44 45 00 03 be r2,r5,80061a8 <_rename_r+0x28c> <== NEVER TAKEN
80061a0: b9 a0 08 00 mv r1,r13
80061a4: d8 40 00 00 call r2
if ( free_old_parentloc )
80061a8: 45 60 00 07 be r11,r0,80061c4 <_rename_r+0x2a8> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
80061ac: 2b 81 00 40 lw r1,(sp+64)
80061b0: 44 20 00 05 be r1,r0,80061c4 <_rename_r+0x2a8> <== NEVER TAKEN
80061b4: 28 22 00 1c lw r2,(r1+28)
80061b8: 44 40 00 03 be r2,r0,80061c4 <_rename_r+0x2a8> <== NEVER TAKEN
80061bc: 37 81 00 34 addi r1,sp,52
80061c0: d8 40 00 00 call r2
rtems_filesystem_freenode( &old_loc );
80061c4: 2b 81 00 54 lw r1,(sp+84)
80061c8: 44 20 00 05 be r1,r0,80061dc <_rename_r+0x2c0> <== NEVER TAKEN
80061cc: 28 22 00 1c lw r2,(r1+28)
80061d0: 44 40 00 03 be r2,r0,80061dc <_rename_r+0x2c0> <== NEVER TAKEN
80061d4: 37 81 00 48 addi r1,sp,72
80061d8: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( ENOTSUP );
80061dc: f8 00 2a 41 calli 8010ae0 <__errno>
80061e0: 34 02 00 86 mvi r2,134
80061e4: 58 22 00 00 sw (r1+0),r2
80061e8: e0 00 00 1b bi 8006254 <_rename_r+0x338>
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
80061ec: 2b 84 00 5c lw r4,(sp+92)
80061f0: 37 81 00 34 addi r1,sp,52
80061f4: 37 82 00 48 addi r2,sp,72
80061f8: b9 a0 18 00 mv r3,r13
80061fc: d8 a0 00 00 call r5
8006200: b8 20 60 00 mv r12,r1
rtems_filesystem_freenode( &new_parent_loc );
8006204: 2b 81 00 2c lw r1,(sp+44)
8006208: 44 20 00 05 be r1,r0,800621c <_rename_r+0x300> <== NEVER TAKEN
800620c: 28 22 00 1c lw r2,(r1+28)
8006210: 44 40 00 03 be r2,r0,800621c <_rename_r+0x300> <== NEVER TAKEN
8006214: b9 a0 08 00 mv r1,r13
8006218: d8 40 00 00 call r2
if ( free_old_parentloc )
800621c: 45 60 00 07 be r11,r0,8006238 <_rename_r+0x31c>
rtems_filesystem_freenode( &old_parent_loc );
8006220: 2b 81 00 40 lw r1,(sp+64)
8006224: 44 20 00 05 be r1,r0,8006238 <_rename_r+0x31c> <== NEVER TAKEN
8006228: 28 22 00 1c lw r2,(r1+28)
800622c: 44 40 00 03 be r2,r0,8006238 <_rename_r+0x31c> <== NEVER TAKEN
8006230: 37 81 00 34 addi r1,sp,52
8006234: d8 40 00 00 call r2
rtems_filesystem_freenode( &old_loc );
8006238: 2b 81 00 54 lw r1,(sp+84)
800623c: 44 20 00 07 be r1,r0,8006258 <_rename_r+0x33c> <== NEVER TAKEN
8006240: 28 22 00 1c lw r2,(r1+28)
8006244: 44 40 00 05 be r2,r0,8006258 <_rename_r+0x33c> <== NEVER TAKEN
8006248: 37 81 00 48 addi r1,sp,72
800624c: d8 40 00 00 call r2
8006250: e0 00 00 02 bi 8006258 <_rename_r+0x33c>
8006254: 34 0c ff ff mvi r12,-1
return result;
}
8006258: b9 80 08 00 mv r1,r12
800625c: 2b 9d 00 04 lw ra,(sp+4)
8006260: 2b 8b 00 1c lw r11,(sp+28)
8006264: 2b 8c 00 18 lw r12,(sp+24)
8006268: 2b 8d 00 14 lw r13,(sp+20)
800626c: 2b 8e 00 10 lw r14,(sp+16)
8006270: 2b 8f 00 0c lw r15,(sp+12)
8006274: 2b 90 00 08 lw r16,(sp+8)
8006278: 37 9c 00 5c addi sp,sp,92
800627c: c3 a0 00 00 ret
08003cb4 <_stat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
8003cb4: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8003cb8: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return _STAT_NAME( path, buf );
8003cbc: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
8003cc0: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
8003cc4: fb ff ff c2 calli 8003bcc <stat> <== NOT EXECUTED
}
8003cc8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003ccc: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8003cd0: c3 a0 00 00 ret <== NOT EXECUTED
0800ae94 <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
800ae94: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
800ae98: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return unlink( path );
800ae9c: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
800aea0: fb ff ff 6d calli 800ac54 <unlink> <== NOT EXECUTED
}
800aea4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800aea8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
800aeac: c3 a0 00 00 ret <== NOT EXECUTED
08006f20 <calloc>:
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
8006f20: 37 9c ff f4 addi sp,sp,-12
8006f24: 5b 8b 00 0c sw (sp+12),r11
8006f28: 5b 8c 00 08 sw (sp+8),r12
8006f2c: 5b 9d 00 04 sw (sp+4),ra
8006f30: 78 03 08 01 mvhi r3,0x801
8006f34: 38 63 c6 b0 ori r3,r3,0xc6b0
8006f38: 28 65 00 14 lw r5,(r3+20)
8006f3c: b8 20 20 00 mv r4,r1
length = nelem * elsize;
8006f40: b8 40 08 00 mv r1,r2
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
8006f44: 34 a5 00 01 addi r5,r5,1
length = nelem * elsize;
8006f48: b8 80 10 00 mv r2,r4
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
8006f4c: 58 65 00 14 sw (r3+20),r5
length = nelem * elsize;
8006f50: f8 00 47 f7 calli 8018f2c <__mulsi3>
8006f54: b8 20 60 00 mv r12,r1
cptr = malloc( length );
8006f58: f8 00 01 e8 calli 80076f8 <malloc>
8006f5c: b8 20 58 00 mv r11,r1
if ( cptr )
8006f60: 44 20 00 04 be r1,r0,8006f70 <calloc+0x50> <== NEVER TAKEN
memset( cptr, '\0', length );
8006f64: b9 80 18 00 mv r3,r12
8006f68: 34 02 00 00 mvi r2,0
8006f6c: f8 00 13 08 calli 800bb8c <memset>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
8006f70: 78 02 08 01 mvhi r2,0x801
8006f74: 38 42 c6 b0 ori r2,r2,0xc6b0
8006f78: 28 43 00 04 lw r3,(r2+4)
return cptr;
}
8006f7c: 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 */
8006f80: 34 63 ff ff addi r3,r3,-1
8006f84: 58 43 00 04 sw (r2+4),r3
return cptr;
}
8006f88: 2b 9d 00 04 lw ra,(sp+4)
8006f8c: 2b 8b 00 0c lw r11,(sp+12)
8006f90: 2b 8c 00 08 lw r12,(sp+8)
8006f94: 37 9c 00 0c addi sp,sp,12
8006f98: c3 a0 00 00 ret
08009050 <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
8009050: 37 9c ff e0 addi sp,sp,-32
8009054: 5b 8b 00 0c sw (sp+12),r11
8009058: 5b 8c 00 08 sw (sp+8),r12
800905c: 5b 9d 00 04 sw (sp+4),ra
8009060: b8 20 60 00 mv r12,r1
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
8009064: 5c 20 00 04 bne r1,r0,8009074 <chdir+0x24>
rtems_set_errno_and_return_minus_one( EFAULT );
8009068: f8 00 0f 0d calli 800cc9c <__errno>
800906c: 34 02 00 0e mvi r2,14
8009070: e0 00 00 14 bi 80090c0 <chdir+0x70>
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
8009074: f8 00 13 bb calli 800df60 <strlen>
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
8009078: 34 03 00 01 mvi r3,1
800907c: 37 8b 00 10 addi r11,sp,16
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
8009080: 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(
8009084: b9 60 20 00 mv r4,r11
8009088: b9 80 08 00 mv r1,r12
800908c: b8 60 28 00 mv r5,r3
8009090: fb ff e1 db calli 80017fc <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
8009094: 34 02 ff ff mvi r2,-1
8009098: 5c 20 00 2b bne r1,r0,8009144 <chdir+0xf4>
return -1;
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
800909c: 2b 83 00 1c lw r3,(sp+28)
80090a0: 28 62 00 10 lw r2,(r3+16)
80090a4: 5c 41 00 0a bne r2,r1,80090cc <chdir+0x7c> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
80090a8: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED
80090ac: 44 62 00 03 be r3,r2,80090b8 <chdir+0x68> <== NOT EXECUTED
80090b0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80090b4: d8 60 00 00 call r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
80090b8: f8 00 0e f9 calli 800cc9c <__errno> <== NOT EXECUTED
80090bc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
80090c0: 58 22 00 00 sw (r1+0),r2
80090c4: 34 02 ff ff mvi r2,-1
80090c8: e0 00 00 1f bi 8009144 <chdir+0xf4>
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
80090cc: b9 60 08 00 mv r1,r11
80090d0: d8 40 00 00 call r2
80090d4: 34 02 00 01 mvi r2,1
80090d8: 44 22 00 0a be r1,r2,8009100 <chdir+0xb0>
rtems_filesystem_freenode( &loc );
80090dc: 2b 81 00 1c lw r1,(sp+28)
80090e0: 44 20 00 05 be r1,r0,80090f4 <chdir+0xa4> <== NEVER TAKEN
80090e4: 28 22 00 1c lw r2,(r1+28)
80090e8: 44 40 00 03 be r2,r0,80090f4 <chdir+0xa4> <== NEVER TAKEN
80090ec: b9 60 08 00 mv r1,r11
80090f0: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( ENOTDIR );
80090f4: f8 00 0e ea calli 800cc9c <__errno>
80090f8: 34 02 00 14 mvi r2,20
80090fc: e3 ff ff f1 bi 80090c0 <chdir+0x70>
}
rtems_filesystem_freenode( &rtems_filesystem_current );
8009100: 78 01 08 01 mvhi r1,0x801
8009104: 38 21 e0 f8 ori r1,r1,0xe0f8
8009108: 28 21 00 00 lw r1,(r1+0)
800910c: 28 22 00 10 lw r2,(r1+16)
8009110: 44 40 00 05 be r2,r0,8009124 <chdir+0xd4> <== NEVER TAKEN
8009114: 28 42 00 1c lw r2,(r2+28)
8009118: 44 40 00 03 be r2,r0,8009124 <chdir+0xd4> <== NEVER TAKEN
800911c: 34 21 00 04 addi r1,r1,4
8009120: d8 40 00 00 call r2
rtems_filesystem_current = loc;
8009124: 78 01 08 01 mvhi r1,0x801
8009128: 38 21 e0 f8 ori r1,r1,0xe0f8
800912c: 28 21 00 00 lw r1,(r1+0)
8009130: 37 82 00 10 addi r2,sp,16
8009134: 34 03 00 14 mvi r3,20
8009138: 34 21 00 04 addi r1,r1,4
800913c: f8 00 11 7e calli 800d734 <memcpy>
8009140: 34 02 00 00 mvi r2,0
return 0;
}
8009144: b8 40 08 00 mv r1,r2
8009148: 2b 9d 00 04 lw ra,(sp+4)
800914c: 2b 8b 00 0c lw r11,(sp+12)
8009150: 2b 8c 00 08 lw r12,(sp+8)
8009154: 37 9c 00 20 addi sp,sp,32
8009158: c3 a0 00 00 ret
080036a0 <chmod>:
int chmod(
const char *path,
mode_t mode
)
{
80036a0: 37 9c ff dc addi sp,sp,-36
80036a4: 5b 8b 00 10 sw (sp+16),r11
80036a8: 5b 8c 00 0c sw (sp+12),r12
80036ac: 5b 8d 00 08 sw (sp+8),r13
80036b0: 5b 9d 00 04 sw (sp+4),ra
80036b4: b8 20 60 00 mv r12,r1
80036b8: 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 );
80036bc: 37 8b 00 14 addi r11,sp,20
80036c0: f8 00 39 24 calli 8011b50 <strlen>
80036c4: b8 20 10 00 mv r2,r1
80036c8: 34 03 00 00 mvi r3,0
80036cc: b9 80 08 00 mv r1,r12
80036d0: b9 60 20 00 mv r4,r11
80036d4: 34 05 00 01 mvi r5,1
80036d8: f8 00 00 bb calli 80039c4 <rtems_filesystem_evaluate_path>
if ( status != 0 )
80036dc: 34 0c ff ff mvi r12,-1
80036e0: 5c 20 00 23 bne r1,r0,800376c <chmod+0xcc>
return -1;
if ( !loc.handlers ){
80036e4: 2b 83 00 1c lw r3,(sp+28)
80036e8: 5c 61 00 0a bne r3,r1,8003710 <chmod+0x70> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
80036ec: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED
80036f0: 44 23 00 05 be r1,r3,8003704 <chmod+0x64> <== NOT EXECUTED
80036f4: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
80036f8: 44 43 00 03 be r2,r3,8003704 <chmod+0x64> <== NOT EXECUTED
80036fc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8003700: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
8003704: f8 00 31 49 calli 800fc28 <__errno> <== NOT EXECUTED
8003708: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
800370c: e0 00 00 0b bi 8003738 <chmod+0x98> <== NOT EXECUTED
}
if ( !loc.handlers->fchmod_h ){
8003710: 28 63 00 1c lw r3,(r3+28)
8003714: 5c 60 00 0c bne r3,r0,8003744 <chmod+0xa4> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
8003718: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED
800371c: 44 23 00 05 be r1,r3,8003730 <chmod+0x90> <== NOT EXECUTED
8003720: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8003724: 44 40 00 03 be r2,r0,8003730 <chmod+0x90> <== NOT EXECUTED
8003728: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800372c: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8003730: f8 00 31 3e calli 800fc28 <__errno> <== NOT EXECUTED
8003734: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8003738: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800373c: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
8003740: e0 00 00 0b bi 800376c <chmod+0xcc> <== NOT EXECUTED
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
8003744: b9 a0 10 00 mv r2,r13
8003748: b9 60 08 00 mv r1,r11
800374c: d8 60 00 00 call r3
8003750: b8 20 60 00 mv r12,r1
rtems_filesystem_freenode( &loc );
8003754: 2b 81 00 20 lw r1,(sp+32)
8003758: 44 20 00 05 be r1,r0,800376c <chmod+0xcc> <== NEVER TAKEN
800375c: 28 22 00 1c lw r2,(r1+28)
8003760: 44 40 00 03 be r2,r0,800376c <chmod+0xcc> <== NEVER TAKEN
8003764: b9 60 08 00 mv r1,r11
8003768: d8 40 00 00 call r2
return result;
}
800376c: b9 80 08 00 mv r1,r12
8003770: 2b 9d 00 04 lw ra,(sp+4)
8003774: 2b 8b 00 10 lw r11,(sp+16)
8003778: 2b 8c 00 0c lw r12,(sp+12)
800377c: 2b 8d 00 08 lw r13,(sp+8)
8003780: 37 9c 00 24 addi sp,sp,36
8003784: c3 a0 00 00 ret
08003788 <chown>:
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
8003788: 37 9c ff d8 addi sp,sp,-40
800378c: 5b 8b 00 14 sw (sp+20),r11
8003790: 5b 8c 00 10 sw (sp+16),r12
8003794: 5b 8d 00 0c sw (sp+12),r13
8003798: 5b 8e 00 08 sw (sp+8),r14
800379c: 5b 9d 00 04 sw (sp+4),ra
80037a0: b8 20 60 00 mv r12,r1
80037a4: 20 4e ff ff andi r14,r2,0xffff
80037a8: 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 ) )
80037ac: 37 8b 00 18 addi r11,sp,24
80037b0: f8 00 38 e8 calli 8011b50 <strlen>
80037b4: b8 20 10 00 mv r2,r1
80037b8: 34 03 00 00 mvi r3,0
80037bc: b9 80 08 00 mv r1,r12
80037c0: b9 60 20 00 mv r4,r11
80037c4: 34 05 00 01 mvi r5,1
80037c8: f8 00 00 7f calli 80039c4 <rtems_filesystem_evaluate_path>
80037cc: 34 0c ff ff mvi r12,-1
80037d0: 5c 20 00 18 bne r1,r0,8003830 <chown+0xa8>
return -1;
if ( !loc.ops->chown_h ) {
80037d4: 2b 85 00 24 lw r5,(sp+36)
80037d8: 28 a4 00 18 lw r4,(r5+24)
80037dc: 5c 81 00 0a bne r4,r1,8003804 <chown+0x7c> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
80037e0: 28 a2 00 1c lw r2,(r5+28) <== NOT EXECUTED
80037e4: 44 44 00 03 be r2,r4,80037f0 <chown+0x68> <== NOT EXECUTED
80037e8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80037ec: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
80037f0: f8 00 31 0e calli 800fc28 <__errno> <== NOT EXECUTED
80037f4: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
80037f8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80037fc: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
8003800: e0 00 00 0c bi 8003830 <chown+0xa8> <== NOT EXECUTED
}
result = (*loc.ops->chown_h)( &loc, owner, group );
8003804: b9 c0 10 00 mv r2,r14
8003808: b9 a0 18 00 mv r3,r13
800380c: b9 60 08 00 mv r1,r11
8003810: d8 80 00 00 call r4
8003814: b8 20 60 00 mv r12,r1
rtems_filesystem_freenode( &loc );
8003818: 2b 81 00 24 lw r1,(sp+36)
800381c: 44 20 00 05 be r1,r0,8003830 <chown+0xa8> <== NEVER TAKEN
8003820: 28 22 00 1c lw r2,(r1+28)
8003824: 44 40 00 03 be r2,r0,8003830 <chown+0xa8> <== NEVER TAKEN
8003828: b9 60 08 00 mv r1,r11
800382c: d8 40 00 00 call r2
return result;
}
8003830: b9 80 08 00 mv r1,r12
8003834: 2b 9d 00 04 lw ra,(sp+4)
8003838: 2b 8b 00 14 lw r11,(sp+20)
800383c: 2b 8c 00 10 lw r12,(sp+16)
8003840: 2b 8d 00 0c lw r13,(sp+12)
8003844: 2b 8e 00 08 lw r14,(sp+8)
8003848: 37 9c 00 28 addi sp,sp,40
800384c: c3 a0 00 00 ret
080014ac <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
80014ac: 37 9c ff dc addi sp,sp,-36
80014b0: 5b 8b 00 10 sw (sp+16),r11
80014b4: 5b 8c 00 0c sw (sp+12),r12
80014b8: 5b 8d 00 08 sw (sp+8),r13
80014bc: 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) {
80014c0: 78 0b 08 01 mvhi r11,0x801
80014c4: 39 6b e0 f8 ori r11,r11,0xe0f8
80014c8: 29 6c 00 00 lw r12,(r11+0)
80014cc: 78 02 08 01 mvhi r2,0x801
80014d0: 38 42 e6 e4 ori r2,r2,0xe6e4
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
80014d4: 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) {
80014d8: 5d 82 00 08 bne r12,r2,80014f8 <chroot+0x4c> <== NEVER TAKEN
rtems_libio_set_private_env(); /* try to set a new private env*/
80014dc: f8 00 06 02 calli 8002ce4 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
80014e0: 29 61 00 00 lw r1,(r11+0)
80014e4: 5c 2c 00 05 bne r1,r12,80014f8 <chroot+0x4c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
80014e8: f8 00 2d ed calli 800cc9c <__errno> <== NOT EXECUTED
80014ec: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
80014f0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80014f4: e0 00 00 0a bi 800151c <chroot+0x70> <== NOT EXECUTED
}
result = chdir(pathname);
80014f8: b9 a0 08 00 mv r1,r13
80014fc: f8 00 1e d5 calli 8009050 <chdir>
8001500: b8 20 58 00 mv r11,r1
if (result) {
8001504: 44 20 00 08 be r1,r0,8001524 <chroot+0x78> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( errno );
8001508: f8 00 2d e5 calli 800cc9c <__errno> <== NOT EXECUTED
800150c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
8001510: f8 00 2d e3 calli 800cc9c <__errno> <== NOT EXECUTED
8001514: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
8001518: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED
800151c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8001520: e0 00 00 1b bi 800158c <chroot+0xe0> <== NOT EXECUTED
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
8001524: 78 01 08 01 mvhi r1,0x801
8001528: 34 02 00 01 mvi r2,1
800152c: 38 21 c8 d4 ori r1,r1,0xc8d4
8001530: b9 60 18 00 mv r3,r11
8001534: 37 84 00 14 addi r4,sp,20
8001538: b9 60 28 00 mv r5,r11
800153c: f8 00 00 b0 calli 80017fc <rtems_filesystem_evaluate_path>
8001540: b8 20 10 00 mv r2,r1
8001544: 5c 2b ff f1 bne r1,r11,8001508 <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);
8001548: 78 01 08 01 mvhi r1,0x801
800154c: 38 21 e0 f8 ori r1,r1,0xe0f8
8001550: 28 21 00 00 lw r1,(r1+0)
8001554: 28 23 00 24 lw r3,(r1+36)
8001558: 44 62 00 05 be r3,r2,800156c <chroot+0xc0> <== NEVER TAKEN
800155c: 28 63 00 1c lw r3,(r3+28)
8001560: 44 62 00 03 be r3,r2,800156c <chroot+0xc0> <== NEVER TAKEN
8001564: 34 21 00 18 addi r1,r1,24
8001568: d8 60 00 00 call r3
rtems_filesystem_root = loc;
800156c: 78 01 08 01 mvhi r1,0x801
8001570: 38 21 e0 f8 ori r1,r1,0xe0f8
8001574: 28 21 00 00 lw r1,(r1+0)
8001578: 37 82 00 14 addi r2,sp,20
800157c: 34 03 00 14 mvi r3,20
8001580: 34 21 00 18 addi r1,r1,24
8001584: f8 00 30 6c calli 800d734 <memcpy>
8001588: 34 01 00 00 mvi r1,0
return 0;
}
800158c: 2b 9d 00 04 lw ra,(sp+4)
8001590: 2b 8b 00 10 lw r11,(sp+16)
8001594: 2b 8c 00 0c lw r12,(sp+12)
8001598: 2b 8d 00 08 lw r13,(sp+8)
800159c: 37 9c 00 24 addi sp,sp,36
80015a0: c3 a0 00 00 ret
08006f9c <close>:
#include <rtems/libio_.h>
int close(
int fd
)
{
8006f9c: 37 9c ff f0 addi sp,sp,-16
8006fa0: 5b 8b 00 10 sw (sp+16),r11
8006fa4: 5b 8c 00 0c sw (sp+12),r12
8006fa8: 5b 8d 00 08 sw (sp+8),r13
8006fac: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
8006fb0: 78 02 08 01 mvhi r2,0x801
8006fb4: 38 42 c0 10 ori r2,r2,0xc010
8006fb8: 28 42 00 00 lw r2,(r2+0)
8006fbc: 54 41 00 02 bgu r2,r1,8006fc4 <close+0x28>
8006fc0: e0 00 00 0e bi 8006ff8 <close+0x5c>
iop = rtems_libio_iop(fd);
8006fc4: 34 02 00 03 mvi r2,3
8006fc8: fb ff e4 8a calli 80001f0 <__ashlsi3>
8006fcc: 78 0c 08 01 mvhi r12,0x801
8006fd0: 39 8c c6 a0 ori r12,r12,0xc6a0
8006fd4: 34 02 00 03 mvi r2,3
8006fd8: b8 20 68 00 mv r13,r1
8006fdc: fb ff e4 85 calli 80001f0 <__ashlsi3>
8006fe0: 29 8b 00 00 lw r11,(r12+0)
8006fe4: b5 a1 08 00 add r1,r13,r1
8006fe8: b5 61 58 00 add r11,r11,r1
rtems_libio_check_is_open(iop);
8006fec: 29 61 00 18 lw r1,(r11+24)
8006ff0: 20 21 01 00 andi r1,r1,0x100
8006ff4: 5c 20 00 06 bne r1,r0,800700c <close+0x70>
8006ff8: f8 00 0f e1 calli 800af7c <__errno>
8006ffc: 34 02 00 09 mvi r2,9
8007000: 58 22 00 00 sw (r1+0),r2
8007004: 34 01 ff ff mvi r1,-1
8007008: e0 00 00 11 bi 800704c <close+0xb0>
rc = RTEMS_SUCCESSFUL;
if ( iop->handlers->close_h )
800700c: 29 61 00 40 lw r1,(r11+64)
8007010: 28 22 00 04 lw r2,(r1+4)
8007014: b8 40 60 00 mv r12,r2
8007018: 44 40 00 04 be r2,r0,8007028 <close+0x8c> <== NEVER TAKEN
rc = (*iop->handlers->close_h)( iop );
800701c: b9 60 08 00 mv r1,r11
8007020: d8 40 00 00 call r2
8007024: b8 20 60 00 mv r12,r1
rtems_filesystem_freenode( &iop->pathinfo );
8007028: 29 61 00 28 lw r1,(r11+40)
800702c: 44 20 00 05 be r1,r0,8007040 <close+0xa4> <== NEVER TAKEN
8007030: 28 22 00 1c lw r2,(r1+28)
8007034: 44 40 00 03 be r2,r0,8007040 <close+0xa4>
8007038: 35 61 00 1c addi r1,r11,28
800703c: d8 40 00 00 call r2
rtems_libio_free( iop );
8007040: b9 60 08 00 mv r1,r11
8007044: f8 00 01 18 calli 80074a4 <rtems_libio_free>
return rc;
8007048: b9 80 08 00 mv r1,r12
}
800704c: 2b 9d 00 04 lw ra,(sp+4)
8007050: 2b 8b 00 10 lw r11,(sp+16)
8007054: 2b 8c 00 0c lw r12,(sp+12)
8007058: 2b 8d 00 08 lw r13,(sp+8)
800705c: 37 9c 00 10 addi sp,sp,16
8007060: c3 a0 00 00 ret
08004afc <devFS_close>:
#include "devfs.h"
int devFS_close(
rtems_libio_t *iop
)
{
8004afc: 37 9c ff f0 addi sp,sp,-16
8004b00: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_open_close_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
8004b04: 28 23 00 3c lw r3,(r1+60)
#include "devfs.h"
int devFS_close(
rtems_libio_t *iop
)
{
8004b08: b8 20 20 00 mv r4,r1
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.flags = 0;
8004b0c: 34 01 00 00 mvi r1,0
args.mode = 0;
8004b10: 5b 81 00 10 sw (sp+16),r1
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.flags = 0;
8004b14: 5b 81 00 0c sw (sp+12),r1
args.mode = 0;
status = rtems_io_close(
8004b18: 28 62 00 0c lw r2,(r3+12)
8004b1c: 28 61 00 08 lw r1,(r3+8)
8004b20: 37 83 00 08 addi r3,sp,8
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
8004b24: 5b 84 00 08 sw (sp+8),r4
args.flags = 0;
args.mode = 0;
status = rtems_io_close(
8004b28: f8 00 04 e9 calli 8005ecc <rtems_io_close>
np->major,
np->minor,
(void *) &args
);
if ( status ) {
8004b2c: b8 20 10 00 mv r2,r1
8004b30: 44 20 00 03 be r1,r0,8004b3c <devFS_close+0x40> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8004b34: f8 00 00 48 calli 8004c54 <rtems_deviceio_errno> <== NOT EXECUTED
8004b38: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
}
return 0;
}
8004b3c: b8 40 08 00 mv r1,r2
8004b40: 2b 9d 00 04 lw ra,(sp+4)
8004b44: 37 9c 00 10 addi sp,sp,16
8004b48: c3 a0 00 00 ret
08004b58 <devFS_evaluate_path>:
const char *pathname,
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
8004b58: 37 9c ff e0 addi sp,sp,-32
8004b5c: 5b 8b 00 20 sw (sp+32),r11
8004b60: 5b 8c 00 1c sw (sp+28),r12
8004b64: 5b 8d 00 18 sw (sp+24),r13
8004b68: 5b 8e 00 14 sw (sp+20),r14
8004b6c: 5b 8f 00 10 sw (sp+16),r15
8004b70: 5b 90 00 0c sw (sp+12),r16
8004b74: 5b 91 00 08 sw (sp+8),r17
8004b78: 5b 9d 00 04 sw (sp+4),ra
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
8004b7c: 28 8c 00 00 lw r12,(r4+0)
const char *pathname,
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
8004b80: b8 80 58 00 mv r11,r4
8004b84: b8 20 88 00 mv r17,r1
8004b88: b8 40 80 00 mv r16,r2
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
8004b8c: 45 80 00 05 be r12,r0,8004ba0 <devFS_evaluate_path+0x48> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
8004b90: 78 0d 08 00 mvhi r13,0x800
8004b94: 39 ad c0 14 ori r13,r13,0xc014
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
8004b98: 34 0e 00 00 mvi r14,0
8004b9c: e0 00 00 1c bi 8004c0c <devFS_evaluate_path+0xb4>
rtems_set_errno_and_return_minus_one( EFAULT );
8004ba0: f8 00 0e 12 calli 80083e8 <__errno> <== NOT EXECUTED
8004ba4: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
8004ba8: e0 00 00 1f bi 8004c24 <devFS_evaluate_path+0xcc> <== NOT EXECUTED
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
8004bac: 29 8f 00 00 lw r15,(r12+0)
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
8004bb0: 35 ce 00 01 addi r14,r14,1
if (!device_name_table[i].device_name)
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8004bb4: b9 e0 10 00 mv r2,r15
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
8004bb8: 45 e0 00 14 be r15,r0,8004c08 <devFS_evaluate_path+0xb0>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8004bbc: f8 00 12 a0 calli 800963c <strncmp>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
8004bc0: b5 f0 78 00 add r15,r15,r16
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8004bc4: 5c 20 00 11 bne r1,r0,8004c08 <devFS_evaluate_path+0xb0> <== NEVER TAKEN
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
8004bc8: 41 e5 00 00 lbu r5,(r15+0)
8004bcc: 5c a1 00 0f bne r5,r1,8004c08 <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;
8004bd0: 78 02 08 00 mvhi r2,0x800
8004bd4: 38 42 c1 7c ori r2,r2,0xc17c
8004bd8: 28 41 00 00 lw r1,(r2+0)
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
8004bdc: 78 03 08 00 mvhi r3,0x800
pathloc->ops = &devFS_ops;
8004be0: 78 02 08 00 mvhi r2,0x800
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
8004be4: 28 21 00 28 lw r1,(r1+40)
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
8004be8: 38 63 c1 44 ori r3,r3,0xc144
pathloc->ops = &devFS_ops;
8004bec: 38 42 c0 fc ori r2,r2,0xc0fc
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
8004bf0: 59 61 00 10 sw (r11+16),r1
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
8004bf4: 59 6c 00 00 sw (r11+0),r12
pathloc->handlers = &devFS_file_handlers;
8004bf8: 59 63 00 08 sw (r11+8),r3
pathloc->ops = &devFS_ops;
8004bfc: 59 62 00 0c sw (r11+12),r2
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
8004c00: b8 a0 08 00 mv r1,r5
return 0;
8004c04: e0 00 00 0a bi 8004c2c <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++) {
8004c08: 35 8c 00 14 addi r12,r12,20
8004c0c: 29 a2 00 00 lw r2,(r13+0)
if (!device_name_table[i].device_name)
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8004c10: ba 20 08 00 mv r1,r17
8004c14: ba 00 18 00 mv r3,r16
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
8004c18: 54 4e ff e5 bgu r2,r14,8004bac <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 );
8004c1c: f8 00 0d f3 calli 80083e8 <__errno>
8004c20: 34 02 00 02 mvi r2,2
8004c24: 58 22 00 00 sw (r1+0),r2
8004c28: 34 01 ff ff mvi r1,-1
}
8004c2c: 2b 9d 00 04 lw ra,(sp+4)
8004c30: 2b 8b 00 20 lw r11,(sp+32)
8004c34: 2b 8c 00 1c lw r12,(sp+28)
8004c38: 2b 8d 00 18 lw r13,(sp+24)
8004c3c: 2b 8e 00 14 lw r14,(sp+20)
8004c40: 2b 8f 00 10 lw r15,(sp+16)
8004c44: 2b 90 00 0c lw r16,(sp+12)
8004c48: 2b 91 00 08 lw r17,(sp+8)
8004c4c: 37 9c 00 20 addi sp,sp,32
8004c50: c3 a0 00 00 ret
080007e8 <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 c0 14 ori r11,r11,0xc014
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
8000804: b8 20 60 00 mv r12,r1
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
8000808: 29 61 00 00 lw r1,(r11+0)
800080c: 34 02 00 02 mvi r2,2
8000810: fb ff fe 52 calli 8000158 <__ashlsi3>
8000814: 34 02 00 02 mvi r2,2
8000818: b8 20 68 00 mv r13,r1
800081c: fb ff fe 4f calli 8000158 <__ashlsi3>
8000820: b5 a1 08 00 add r1,r13,r1
8000824: f8 00 0f 9f calli 80046a0 <_Workspace_Allocate>
8000828: b8 20 68 00 mv r13,r1
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
800082c: 5c 20 00 06 bne r1,r0,8000844 <devFS_initialize+0x5c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
8000830: f8 00 1e ee calli 80083e8 <__errno> <== NOT EXECUTED
8000834: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
8000838: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800083c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000840: e0 00 00 13 bi 800088c <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 21 c3 calli 8008f74 <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 c1 44 ori r3,r3,0xc144
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
8000878: 38 42 c0 fc ori r2,r2,0xc0fc
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
800087c: 59 8d 00 1c sw (r12+28),r13
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
8000880: 59 83 00 24 sw (r12+36),r3
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
8000884: 59 82 00 28 sw (r12+40),r2
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
8000888: 34 01 00 00 mvi r1,0
return 0;
}
800088c: 2b 9d 00 04 lw ra,(sp+4)
8000890: 2b 8b 00 10 lw r11,(sp+16)
8000894: 2b 8c 00 0c lw r12,(sp+12)
8000898: 2b 8d 00 08 lw r13,(sp+8)
800089c: 37 9c 00 10 addi sp,sp,16
80008a0: c3 a0 00 00 ret
08000a40 <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 b5 calli 800253c <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 79 calli 8004c54 <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 1e b1 calli 80083e8 <__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 c0 14 ori r14,r14,0xc014
else
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
8000940: ba 00 60 00 mv r12,r16
8000944: 34 0d ff ff mvi r13,-1
8000948: e0 00 00 11 bi 800098c <devFS_mknod+0xe8>
rtems_set_errno_and_return_minus_one( EFAULT );
800094c: f8 00 1e a7 calli 80083e8 <__errno> <== NOT EXECUTED
8000950: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
8000954: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8000958: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
800095c: e0 00 00 2b bi 8000a08 <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 22 b8 calli 8009450 <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 1e 9c calli 80083e8 <__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 1e 92 calli 80083e8 <__errno> <== NOT EXECUTED
80009a4: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
80009a8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80009ac: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
80009b0: e0 00 00 16 bi 8000a08 <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 22 e9 calli 8009590 <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 12 calli 80026fc <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 65 calli 8004c54 <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 1c calli 8002790 <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 4b calli 8004c54 <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 1e 26 calli 80083e8 <__errno> <== NOT EXECUTED
8000b54: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
8000b58: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8000b5c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000b60: e0 00 00 08 bi 8000b80 <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 14 calli 8002824 <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 1e calli 8004c54 <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
08009314 <device_close>:
*/
int device_close(
rtems_libio_t *iop
)
{
8009314: 37 9c ff f0 addi sp,sp,-16
8009318: 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;
800931c: 28 23 00 3c lw r3,(r1+60)
args.iop = iop;
args.flags = 0;
8009320: 34 02 00 00 mvi r2,0
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
8009324: 5b 81 00 08 sw (sp+8),r1
args.flags = 0;
args.mode = 0;
8009328: 5b 82 00 10 sw (sp+16),r2
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.flags = 0;
800932c: 5b 82 00 0c sw (sp+12),r2
args.mode = 0;
status = rtems_io_close(
8009330: 28 62 00 54 lw r2,(r3+84)
8009334: 28 61 00 50 lw r1,(r3+80)
8009338: 37 83 00 08 addi r3,sp,8
800933c: f8 00 04 61 calli 800a4c0 <rtems_io_close>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status ) {
8009340: b8 20 10 00 mv r2,r1
8009344: 44 20 00 03 be r1,r0,8009350 <device_close+0x3c> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8009348: f8 00 06 20 calli 800abc8 <rtems_deviceio_errno> <== NOT EXECUTED
800934c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
}
return 0;
}
8009350: b8 40 08 00 mv r1,r2
8009354: 2b 9d 00 04 lw ra,(sp+4)
8009358: 37 9c 00 10 addi sp,sp,16
800935c: c3 a0 00 00 ret
08009208 <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
8009208: 37 9c ff ec addi sp,sp,-20
800920c: 5b 9d 00 04 sw (sp+4),ra
args.iop = iop;
args.command = command;
args.buffer = buffer;
the_jnode = iop->file_info;
8009210: 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;
8009214: 5b 82 00 0c sw (sp+12),r2
args.buffer = buffer;
8009218: 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;
800921c: 5b 81 00 08 sw (sp+8),r1
args.command = command;
args.buffer = buffer;
the_jnode = iop->file_info;
status = rtems_io_control(
8009220: 28 82 00 54 lw r2,(r4+84)
8009224: 28 81 00 50 lw r1,(r4+80)
8009228: 37 83 00 08 addi r3,sp,8
800922c: f8 00 04 ca calli 800a554 <rtems_io_control>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
8009230: 44 20 00 03 be r1,r0,800923c <device_ioctl+0x34> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8009234: f8 00 06 65 calli 800abc8 <rtems_deviceio_errno> <== NOT EXECUTED
8009238: e0 00 00 02 bi 8009240 <device_ioctl+0x38> <== NOT EXECUTED
return args.ioctl_return;
800923c: 2b 81 00 14 lw r1,(sp+20)
}
8009240: 2b 9d 00 04 lw ra,(sp+4)
8009244: 37 9c 00 14 addi sp,sp,20
8009248: c3 a0 00 00 ret
08009360 <device_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
8009360: 37 9c ff f0 addi sp,sp,-16
8009364: 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;
8009368: 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;
800936c: 28 23 00 3c lw r3,(r1+60)
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
8009370: 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;
8009374: 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;
8009378: 5b 81 00 08 sw (sp+8),r1
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open(
800937c: 28 62 00 54 lw r2,(r3+84)
8009380: 28 61 00 50 lw r1,(r3+80)
8009384: 37 83 00 08 addi r3,sp,8
8009388: f8 00 04 98 calli 800a5e8 <rtems_io_open>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
800938c: b8 20 10 00 mv r2,r1
8009390: 44 20 00 03 be r1,r0,800939c <device_open+0x3c> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8009394: f8 00 06 0d calli 800abc8 <rtems_deviceio_errno> <== NOT EXECUTED
8009398: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
return 0;
}
800939c: b8 40 08 00 mv r1,r2
80093a0: 2b 9d 00 04 lw ra,(sp+4)
80093a4: 37 9c 00 10 addi sp,sp,16
80093a8: c3 a0 00 00 ret
080092b0 <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
80092b0: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED
80092b4: 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;
80092b8: 28 24 00 18 lw r4,(r1+24) <== NOT EXECUTED
80092bc: 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;
80092c0: 28 24 00 14 lw r4,(r1+20) <== NOT EXECUTED
80092c4: 5b 84 00 14 sw (sp+20),r4 <== NOT EXECUTED
80092c8: 28 24 00 10 lw r4,(r1+16) <== NOT EXECUTED
args.buffer = buffer;
80092cc: 5b 82 00 18 sw (sp+24),r2 <== NOT EXECUTED
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
80092d0: 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;
80092d4: 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;
80092d8: 28 24 00 3c lw r4,(r1+60) <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
80092dc: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
80092e0: 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;
80092e4: 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(
80092e8: 28 82 00 54 lw r2,(r4+84) <== NOT EXECUTED
80092ec: 28 81 00 50 lw r1,(r4+80) <== NOT EXECUTED
80092f0: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED
80092f4: f8 00 04 e2 calli 800a67c <rtems_io_read> <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
80092f8: 44 20 00 03 be r1,r0,8009304 <device_read+0x54> <== NOT EXECUTED
return rtems_deviceio_errno(status);
80092fc: f8 00 06 33 calli 800abc8 <rtems_deviceio_errno> <== NOT EXECUTED
8009300: e0 00 00 02 bi 8009308 <device_read+0x58> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
8009304: 2b 81 00 24 lw r1,(sp+36) <== NOT EXECUTED
}
8009308: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800930c: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED
8009310: c3 a0 00 00 ret <== NOT EXECUTED
0800924c <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
800924c: 37 9c ff dc addi sp,sp,-36
8009250: 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;
8009254: 28 24 00 18 lw r4,(r1+24)
8009258: 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;
800925c: 28 24 00 14 lw r4,(r1+20)
8009260: 5b 84 00 14 sw (sp+20),r4
8009264: 28 24 00 10 lw r4,(r1+16)
args.buffer = (void *) buffer;
8009268: 5b 82 00 18 sw (sp+24),r2
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
800926c: 34 02 00 00 mvi r2,0
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
8009270: 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;
8009274: 28 24 00 3c lw r4,(r1+60)
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
8009278: 5b 83 00 1c sw (sp+28),r3
args.flags = iop->flags;
args.bytes_moved = 0;
800927c: 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;
8009280: 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(
8009284: 28 82 00 54 lw r2,(r4+84)
8009288: 28 81 00 50 lw r1,(r4+80)
800928c: 37 83 00 08 addi r3,sp,8
8009290: f8 00 05 20 calli 800a710 <rtems_io_write>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
8009294: 44 20 00 03 be r1,r0,80092a0 <device_write+0x54> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8009298: f8 00 06 4c calli 800abc8 <rtems_deviceio_errno> <== NOT EXECUTED
800929c: e0 00 00 02 bi 80092a4 <device_write+0x58> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
80092a0: 2b 81 00 24 lw r1,(sp+36)
}
80092a4: 2b 9d 00 04 lw ra,(sp+4)
80092a8: 37 9c 00 24 addi sp,sp,36
80092ac: 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 77 calli 8006a24 <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 32 c8 ori r1,r1,0x32c8 <== 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
08001808 <endgrent>:
fclose(group_fp);
group_fp = fopen("/etc/group", "r");
}
void endgrent(void)
{
8001808: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
800180c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
if (group_fp != NULL)
8001810: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8001814: 38 21 f7 10 ori r1,r1,0xf710 <== NOT EXECUTED
8001818: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
800181c: 44 20 00 02 be r1,r0,8001824 <endgrent+0x1c> <== NOT EXECUTED
fclose(group_fp);
8001820: f8 00 2f 27 calli 800d4bc <fclose> <== NOT EXECUTED
}
8001824: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8001828: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
800182c: c3 a0 00 00 ret <== NOT EXECUTED
08001830 <endpwent>:
fclose(passwd_fp);
passwd_fp = fopen("/etc/passwd", "r");
}
void endpwent(void)
{
8001830: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8001834: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
if (passwd_fp != NULL)
8001838: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
800183c: 38 21 f6 28 ori r1,r1,0xf628 <== NOT EXECUTED
8001840: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
8001844: 44 20 00 02 be r1,r0,800184c <endpwent+0x1c> <== NOT EXECUTED
fclose(passwd_fp);
8001848: f8 00 2f 1d calli 800d4bc <fclose> <== NOT EXECUTED
}
800184c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8001850: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8001854: 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 14 54 ori r1,r1,0x1454 <== 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 14 58 ori r1,r1,0x1458 <== 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 14 58 ori r1,r1,0x1458 <== 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 32 c8 ori r13,r13,0x32c8 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
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
080020c8 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
80020c8: 37 9c ff c4 addi sp,sp,-60
80020cc: 5b 8b 00 20 sw (sp+32),r11
80020d0: 5b 8c 00 1c sw (sp+28),r12
80020d4: 5b 8d 00 18 sw (sp+24),r13
80020d8: 5b 8e 00 14 sw (sp+20),r14
80020dc: 5b 8f 00 10 sw (sp+16),r15
80020e0: 5b 90 00 0c sw (sp+12),r16
80020e4: 5b 91 00 08 sw (sp+8),r17
80020e8: 5b 9d 00 04 sw (sp+4),ra
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
80020ec: 78 09 08 02 mvhi r9,0x802
80020f0: 39 29 00 10 ori r9,r9,0x10
80020f4: 29 2d 00 00 lw r13,(r9+0)
int fcntl(
int fd,
int cmd,
...
)
{
80020f8: 5b 83 00 28 sw (sp+40),r3
80020fc: 5b 84 00 2c sw (sp+44),r4
8002100: 5b 85 00 30 sw (sp+48),r5
8002104: 5b 86 00 34 sw (sp+52),r6
8002108: 5b 87 00 38 sw (sp+56),r7
800210c: 5b 88 00 3c sw (sp+60),r8
8002110: 5b 82 00 24 sw (sp+36),r2
8002114: 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, ...));
8002118: 37 8b 00 28 addi r11,sp,40
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
800211c: 55 a1 00 02 bgu r13,r1,8002124 <fcntl+0x5c> <== ALWAYS TAKEN
8002120: e0 00 00 0e bi 8002158 <fcntl+0x90> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
8002124: 78 03 08 02 mvhi r3,0x802
8002128: 38 63 06 a8 ori r3,r3,0x6a8
800212c: 34 02 00 03 mvi r2,3
8002130: 28 71 00 00 lw r17,(r3+0)
8002134: fb ff fa 94 calli 8000b84 <__ashlsi3>
8002138: 34 02 00 03 mvi r2,3
800213c: b8 20 60 00 mv r12,r1
8002140: fb ff fa 91 calli 8000b84 <__ashlsi3>
8002144: b5 81 08 00 add r1,r12,r1
8002148: b6 21 60 00 add r12,r17,r1
rtems_libio_check_is_open(iop);
800214c: 29 8e 00 18 lw r14,(r12+24)
8002150: 21 c1 01 00 andi r1,r14,0x100
8002154: 5c 20 00 04 bne r1,r0,8002164 <fcntl+0x9c> <== ALWAYS TAKEN
8002158: f8 00 2e 99 calli 800dbbc <__errno> <== NOT EXECUTED
800215c: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
8002160: e0 00 00 54 bi 80022b0 <fcntl+0x1e8> <== NOT EXECUTED
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
8002164: 34 01 00 09 mvi r1,9
8002168: 55 e1 00 50 bgu r15,r1,80022a8 <fcntl+0x1e0>
800216c: 78 10 08 01 mvhi r16,0x801
8002170: b9 e0 08 00 mv r1,r15
8002174: 34 02 00 02 mvi r2,2
8002178: fb ff fa 83 calli 8000b84 <__ashlsi3>
800217c: 3a 10 e4 a4 ori r16,r16,0xe4a4
8002180: b6 01 08 00 add r1,r16,r1
8002184: 28 21 00 00 lw r1,(r1+0)
8002188: c0 20 00 00 b r1
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
800218c: 29 6e 00 00 lw r14,(r11+0)
if ( fd2 )
8002190: 45 c0 00 0d be r14,r0,80021c4 <fcntl+0xfc> <== ALWAYS TAKEN
diop = rtems_libio_iop( fd2 );
8002194: 55 ae 00 03 bgu r13,r14,80021a0 <fcntl+0xd8> <== NOT EXECUTED
8002198: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED
800219c: e0 00 00 0e bi 80021d4 <fcntl+0x10c> <== NOT EXECUTED
80021a0: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
80021a4: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
80021a8: fb ff fa 77 calli 8000b84 <__ashlsi3> <== NOT EXECUTED
80021ac: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
80021b0: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
80021b4: fb ff fa 74 calli 8000b84 <__ashlsi3> <== NOT EXECUTED
80021b8: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED
80021bc: b6 21 68 00 add r13,r17,r1 <== NOT EXECUTED
80021c0: e0 00 00 05 bi 80021d4 <fcntl+0x10c> <== NOT EXECUTED
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
80021c4: f8 00 02 4f calli 8002b00 <rtems_libio_allocate>
80021c8: b8 20 68 00 mv r13,r1
if ( diop == 0 ) {
80021cc: 34 0b ff ff mvi r11,-1
80021d0: 44 2e 00 45 be r1,r14,80022e4 <fcntl+0x21c> <== NEVER TAKEN
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
80021d4: 29 81 00 40 lw r1,(r12+64)
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
80021d8: 34 03 00 14 mvi r3,20
80021dc: 35 82 00 1c addi r2,r12,28
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
80021e0: 59 a1 00 40 sw (r13+64),r1
diop->file_info = iop->file_info;
80021e4: 29 81 00 3c lw r1,(r12+60)
80021e8: 59 a1 00 3c sw (r13+60),r1
diop->flags = iop->flags;
80021ec: 29 81 00 18 lw r1,(r12+24)
80021f0: 59 a1 00 18 sw (r13+24),r1
diop->pathinfo = iop->pathinfo;
80021f4: 35 a1 00 1c addi r1,r13,28
80021f8: f8 00 33 af calli 800f0b4 <memcpy>
ret = (int) (diop - rtems_libio_iops);
80021fc: 78 01 08 02 mvhi r1,0x802
8002200: 38 21 06 a8 ori r1,r1,0x6a8
8002204: 28 21 00 00 lw r1,(r1+0)
8002208: 34 02 00 03 mvi r2,3
800220c: c9 a1 08 00 sub r1,r13,r1
8002210: fb ff fa ad calli 8000cc4 <__ashrsi3>
8002214: 78 02 38 e3 mvhi r2,0x38e3
8002218: 38 42 8e 39 ori r2,r2,0x8e39
800221c: f8 00 6b c2 calli 801d124 <__mulsi3>
8002220: e0 00 00 12 bi 8002268 <fcntl+0x1a0>
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
8002224: b9 c0 08 00 mv r1,r14
8002228: 34 02 00 0b mvi r2,11
800222c: fb ff fa 7e calli 8000c24 <__lshrsi3>
8002230: 20 2b 00 01 andi r11,r1,0x1
8002234: e0 00 00 21 bi 80022b8 <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 ) )
8002238: 29 6b 00 00 lw r11,(r11+0)
800223c: 45 60 00 05 be r11,r0,8002250 <fcntl+0x188> <== NEVER TAKEN
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
8002240: 39 ce 08 00 ori r14,r14,0x800
8002244: 59 8e 00 18 sw (r12+24),r14
8002248: 34 0b 00 00 mvi r11,0
800224c: e0 00 00 1b bi 80022b8 <fcntl+0x1f0>
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
8002250: 34 01 f7 ff mvi r1,-2049 <== NOT EXECUTED
8002254: a1 c1 70 00 and r14,r14,r1 <== NOT EXECUTED
8002258: 59 8e 00 18 sw (r12+24),r14 <== NOT EXECUTED
800225c: e0 00 00 17 bi 80022b8 <fcntl+0x1f0> <== NOT EXECUTED
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
8002260: b9 c0 08 00 mv r1,r14
8002264: f8 00 01 a1 calli 80028e8 <rtems_libio_to_fcntl_flags>
8002268: 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) {
800226c: 48 01 00 1e bg r0,r1,80022e4 <fcntl+0x21c> <== NEVER TAKEN
8002270: e0 00 00 12 bi 80022b8 <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 ) );
8002274: 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);
8002278: 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 ) );
800227c: f8 00 02 5a calli 8002be4 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
8002280: 29 83 00 18 lw r3,(r12+24)
8002284: 34 02 fd fe mvi r2,-514
8002288: 20 21 02 01 andi r1,r1,0x201
800228c: a0 62 10 00 and r2,r3,r2
8002290: b8 22 08 00 or r1,r1,r2
8002294: 59 81 00 18 sw (r12+24),r1
8002298: e0 00 00 08 bi 80022b8 <fcntl+0x1f0>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
800229c: f8 00 2e 48 calli 800dbbc <__errno>
80022a0: 34 02 00 86 mvi r2,134
80022a4: e0 00 00 03 bi 80022b0 <fcntl+0x1e8>
ret = -1;
break;
default:
errno = EINVAL;
80022a8: f8 00 2e 45 calli 800dbbc <__errno>
80022ac: 34 02 00 16 mvi r2,22
80022b0: 58 22 00 00 sw (r1+0),r2
80022b4: e0 00 00 0b bi 80022e0 <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) {
80022b8: 29 81 00 40 lw r1,(r12+64)
80022bc: 28 23 00 30 lw r3,(r1+48)
80022c0: 44 60 00 09 be r3,r0,80022e4 <fcntl+0x21c> <== NEVER TAKEN
int err = (*iop->handlers->fcntl_h)( cmd, iop );
80022c4: b9 80 10 00 mv r2,r12
80022c8: b9 e0 08 00 mv r1,r15
80022cc: d8 60 00 00 call r3
80022d0: b8 20 60 00 mv r12,r1
if (err) {
80022d4: 44 20 00 04 be r1,r0,80022e4 <fcntl+0x21c> <== ALWAYS TAKEN
errno = err;
80022d8: f8 00 2e 39 calli 800dbbc <__errno> <== NOT EXECUTED
80022dc: 58 2c 00 00 sw (r1+0),r12 <== NOT EXECUTED
80022e0: 34 0b ff ff mvi r11,-1
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
80022e4: b9 60 08 00 mv r1,r11
80022e8: 2b 9d 00 04 lw ra,(sp+4)
80022ec: 2b 8b 00 20 lw r11,(sp+32)
80022f0: 2b 8c 00 1c lw r12,(sp+28)
80022f4: 2b 8d 00 18 lw r13,(sp+24)
80022f8: 2b 8e 00 14 lw r14,(sp+20)
80022fc: 2b 8f 00 10 lw r15,(sp+16)
8002300: 2b 90 00 0c lw r16,(sp+12)
8002304: 2b 91 00 08 lw r17,(sp+8)
8002308: 37 9c 00 3c addi sp,sp,60
800230c: 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 00 10 ori r2,r2,0x10
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 06 a8 ori r11,r11,0x6a8
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 2e 0c calli 800dbbc <__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 2e 07 calli 800dbbc <__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 2e 01 calli 800dbbc <__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
08009980 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
8009980: 37 9c ff dc addi sp,sp,-36
8009984: 5b 8b 00 20 sw (sp+32),r11
8009988: 5b 8c 00 1c sw (sp+28),r12
800998c: 5b 8d 00 18 sw (sp+24),r13
8009990: 5b 8e 00 14 sw (sp+20),r14
8009994: 5b 8f 00 10 sw (sp+16),r15
8009998: 5b 90 00 0c sw (sp+12),r16
800999c: 5b 91 00 08 sw (sp+8),r17
80099a0: 5b 9d 00 04 sw (sp+4),ra
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
80099a4: 78 03 08 01 mvhi r3,0x801
80099a8: 38 63 c6 2c ori r3,r3,0xc62c
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
80099ac: b8 20 70 00 mv r14,r1
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
80099b0: 28 61 00 00 lw r1,(r3+0)
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
80099b4: b8 40 78 00 mv r15,r2
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
80099b8: 34 02 00 00 mvi r2,0
80099bc: b8 40 18 00 mv r3,r2
80099c0: fb ff f8 47 calli 8007adc <rtems_semaphore_obtain>
80099c4: b8 20 80 00 mv r16,r1
80099c8: 34 0c ff fc mvi r12,-4
80099cc: 5c 20 00 bc bne r1,r0,8009cbc <fifo_open+0x33c> <== ALWAYS TAKEN
RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL)
return -EINTR;
pipe = *pipep;
80099d0: 29 cb 00 00 lw r11,(r14+0) <== NOT EXECUTED
if (pipe == NULL) {
80099d4: 5d 61 00 42 bne r11,r1,8009adc <fifo_open+0x15c> <== NOT EXECUTED
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
80099d8: 34 01 00 34 mvi r1,52 <== NOT EXECUTED
80099dc: fb ff f7 47 calli 80076f8 <malloc> <== NOT EXECUTED
80099e0: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
80099e4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if (pipe == NULL)
80099e8: 34 0c ff f4 mvi r12,-12 <== NOT EXECUTED
80099ec: 44 20 00 4a be r1,r0,8009b14 <fifo_open+0x194> <== NOT EXECUTED
return err;
memset(pipe, 0, sizeof(pipe_control_t));
80099f0: ba 00 10 00 mv r2,r16 <== NOT EXECUTED
80099f4: 34 03 00 34 mvi r3,52 <== NOT EXECUTED
80099f8: f8 00 08 65 calli 800bb8c <memset> <== NOT EXECUTED
pipe->Size = PIPE_BUF;
80099fc: 34 02 02 00 mvi r2,512 <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
8009a00: 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;
8009a04: 59 a2 00 04 sw (r13+4),r2 <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
8009a08: fb ff f7 3c calli 80076f8 <malloc> <== NOT EXECUTED
8009a0c: 59 a1 00 00 sw (r13+0),r1 <== NOT EXECUTED
if (! pipe->Buffer)
8009a10: 44 20 00 30 be r1,r0,8009ad0 <fifo_open+0x150> <== NOT EXECUTED
goto err_buf;
err = -EINTR;
if (rtems_barrier_create(
8009a14: 78 0c 08 01 mvhi r12,0x801 <== NOT EXECUTED
8009a18: 39 8c c1 58 ori r12,r12,0xc158 <== NOT EXECUTED
8009a1c: 41 83 00 00 lbu r3,(r12+0) <== NOT EXECUTED
8009a20: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED
8009a24: 38 21 72 00 ori r1,r1,0x7200 <== NOT EXECUTED
8009a28: ba 00 10 00 mv r2,r16 <== NOT EXECUTED
8009a2c: b8 61 08 00 or r1,r3,r1 <== NOT EXECUTED
8009a30: 35 a4 00 2c addi r4,r13,44 <== NOT EXECUTED
8009a34: ba 00 18 00 mv r3,r16 <== NOT EXECUTED
8009a38: f8 00 01 99 calli 800a09c <rtems_barrier_create> <== NOT EXECUTED
8009a3c: b8 20 80 00 mv r16,r1 <== NOT EXECUTED
8009a40: 5c 20 00 21 bne r1,r0,8009ac4 <fifo_open+0x144> <== 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(
8009a44: 41 82 00 00 lbu r2,(r12+0) <== NOT EXECUTED
8009a48: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED
8009a4c: 38 21 77 00 ori r1,r1,0x7700 <== NOT EXECUTED
8009a50: b8 41 08 00 or r1,r2,r1 <== NOT EXECUTED
8009a54: ba 00 18 00 mv r3,r16 <== NOT EXECUTED
8009a58: ba 00 10 00 mv r2,r16 <== NOT EXECUTED
8009a5c: 35 a4 00 30 addi r4,r13,48 <== NOT EXECUTED
8009a60: f8 00 01 8f calli 800a09c <rtems_barrier_create> <== NOT EXECUTED
8009a64: b8 20 88 00 mv r17,r1 <== NOT EXECUTED
8009a68: 5c 30 00 15 bne r1,r16,8009abc <fifo_open+0x13c> <== 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(
8009a6c: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED
8009a70: 78 02 50 49 mvhi r2,0x5049 <== NOT EXECUTED
8009a74: 38 42 73 00 ori r2,r2,0x7300 <== NOT EXECUTED
8009a78: b8 22 08 00 or r1,r1,r2 <== NOT EXECUTED
8009a7c: 34 03 00 10 mvi r3,16 <== NOT EXECUTED
8009a80: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8009a84: ba 20 20 00 mv r4,r17 <== NOT EXECUTED
8009a88: 35 a5 00 28 addi r5,r13,40 <== NOT EXECUTED
8009a8c: fb ff e1 31 calli 8001f50 <rtems_semaphore_create> <== NOT EXECUTED
8009a90: 5c 31 00 09 bne r1,r17,8009ab4 <fifo_open+0x134> <== NOT EXECUTED
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
8009a94: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED
8009a98: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED
8009a9c: 31 82 00 00 sb (r12+0),r2 <== NOT EXECUTED
8009aa0: 34 02 00 7a mvi r2,122 <== NOT EXECUTED
8009aa4: 5c 22 00 0e bne r1,r2,8009adc <fifo_open+0x15c> <== NOT EXECUTED
c = 'a';
8009aa8: 34 01 00 61 mvi r1,97 <== NOT EXECUTED
8009aac: 31 81 00 00 sb (r12+0),r1 <== NOT EXECUTED
8009ab0: e0 00 00 0b bi 8009adc <fifo_open+0x15c> <== NOT EXECUTED
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
8009ab4: 29 a1 00 30 lw r1,(r13+48) <== NOT EXECUTED
8009ab8: f8 00 01 b6 calli 800a190 <rtems_barrier_delete> <== NOT EXECUTED
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
8009abc: 29 a1 00 2c lw r1,(r13+44) <== NOT EXECUTED
8009ac0: f8 00 01 b4 calli 800a190 <rtems_barrier_delete> <== NOT EXECUTED
err_rbar:
free(pipe->Buffer);
8009ac4: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED
8009ac8: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED
8009acc: fb ff f5 6d calli 8007080 <free> <== NOT EXECUTED
err_buf:
free(pipe);
8009ad0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8009ad4: fb ff f5 6b calli 8007080 <free> <== NOT EXECUTED
8009ad8: e0 00 00 0f bi 8009b14 <fifo_open+0x194> <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
8009adc: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8009ae0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8009ae4: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
8009ae8: fb ff f7 fd calli 8007adc <rtems_semaphore_obtain> <== NOT EXECUTED
8009aec: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
8009af0: 44 20 00 02 be r1,r0,8009af8 <fifo_open+0x178> <== NOT EXECUTED
8009af4: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
8009af8: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED
8009afc: 5c 20 00 06 bne r1,r0,8009b14 <fifo_open+0x194> <== NOT EXECUTED
if (err)
8009b00: 45 81 00 04 be r12,r1,8009b10 <fifo_open+0x190> <== NOT EXECUTED
pipe_free(pipe);
8009b04: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8009b08: fb ff ff 44 calli 8009818 <pipe_free> <== NOT EXECUTED
8009b0c: e0 00 00 02 bi 8009b14 <fifo_open+0x194> <== NOT EXECUTED
else
*pipep = pipe;
8009b10: 59 cb 00 00 sw (r14+0),r11 <== NOT EXECUTED
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
8009b14: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8009b18: 38 21 c6 2c ori r1,r1,0xc62c <== NOT EXECUTED
8009b1c: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
8009b20: fb ff f8 3f calli 8007c1c <rtems_semaphore_release> <== NOT EXECUTED
pipe_control_t *pipe;
uint prevCounter;
int err;
err = pipe_new(pipep);
if (err)
8009b24: 5d 80 00 66 bne r12,r0,8009cbc <fifo_open+0x33c> <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
8009b28: 29 e2 00 18 lw r2,(r15+24) <== NOT EXECUTED
8009b2c: 34 03 00 04 mvi r3,4 <== NOT EXECUTED
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
8009b30: 29 cb 00 00 lw r11,(r14+0) <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
8009b34: 20 41 00 06 andi r1,r2,0x6 <== NOT EXECUTED
8009b38: 44 23 00 24 be r1,r3,8009bc8 <fifo_open+0x248> <== NOT EXECUTED
8009b3c: 34 02 00 06 mvi r2,6 <== NOT EXECUTED
8009b40: 44 22 00 44 be r1,r2,8009c50 <fifo_open+0x2d0> <== NOT EXECUTED
8009b44: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8009b48: 5c 22 00 56 bne r1,r2,8009ca0 <fifo_open+0x320> <== NOT EXECUTED
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
8009b4c: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED
if (pipe->Readers ++ == 0)
8009b50: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
8009b54: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
8009b58: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
8009b5c: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
8009b60: 59 62 00 10 sw (r11+16),r2 <== NOT EXECUTED
8009b64: 5c 20 00 04 bne r1,r0,8009b74 <fifo_open+0x1f4> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
8009b68: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
8009b6c: 37 82 00 24 addi r2,sp,36 <== NOT EXECUTED
8009b70: f8 00 01 a8 calli 800a210 <rtems_barrier_release> <== NOT EXECUTED
if (pipe->Writers == 0) {
8009b74: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
8009b78: 5c 20 00 4a bne r1,r0,8009ca0 <fifo_open+0x320> <== NOT EXECUTED
/* Not an error */
if (LIBIO_NODELAY(iop))
8009b7c: 29 e2 00 18 lw r2,(r15+24) <== NOT EXECUTED
8009b80: 20 42 00 01 andi r2,r2,0x1 <== NOT EXECUTED
8009b84: 5c 41 00 47 bne r2,r1,8009ca0 <fifo_open+0x320> <== NOT EXECUTED
break;
prevCounter = pipe->writerCounter;
8009b88: 29 70 00 24 lw r16,(r11+36) <== NOT EXECUTED
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
8009b8c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8009b90: fb ff f8 23 calli 8007c1c <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
8009b94: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED
8009b98: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8009b9c: f8 00 01 bc calli 800a28c <rtems_barrier_wait> <== NOT EXECUTED
8009ba0: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
8009ba4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
8009ba8: 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))
8009bac: 5c 20 00 40 bne r1,r0,8009cac <fifo_open+0x32c> <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
8009bb0: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8009bb4: fb ff f7 ca calli 8007adc <rtems_semaphore_obtain> <== NOT EXECUTED
8009bb8: 5c 2d 00 3d bne r1,r13,8009cac <fifo_open+0x32c> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->writerCounter);
8009bbc: 29 61 00 24 lw r1,(r11+36) <== NOT EXECUTED
8009bc0: 46 01 ff f3 be r16,r1,8009b8c <fifo_open+0x20c> <== NOT EXECUTED
8009bc4: e0 00 00 37 bi 8009ca0 <fifo_open+0x320> <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_WRITE:
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
8009bc8: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8009bcc: 5c 20 00 05 bne r1,r0,8009be0 <fifo_open+0x260> <== NOT EXECUTED
8009bd0: 20 42 00 01 andi r2,r2,0x1 <== NOT EXECUTED
8009bd4: 44 40 00 03 be r2,r0,8009be0 <fifo_open+0x260> <== NOT EXECUTED
8009bd8: 34 0c ff fa mvi r12,-6 <== NOT EXECUTED
8009bdc: e0 00 00 35 bi 8009cb0 <fifo_open+0x330> <== NOT EXECUTED
err = -ENXIO;
goto out_error;
}
pipe->writerCounter ++;
8009be0: 29 63 00 24 lw r3,(r11+36) <== NOT EXECUTED
if (pipe->Writers ++ == 0)
8009be4: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
err = -ENXIO;
goto out_error;
}
pipe->writerCounter ++;
8009be8: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
8009bec: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
err = -ENXIO;
goto out_error;
}
pipe->writerCounter ++;
8009bf0: 59 63 00 24 sw (r11+36),r3 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
8009bf4: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED
8009bf8: 5c 20 00 04 bne r1,r0,8009c08 <fifo_open+0x288> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
8009bfc: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED
8009c00: 37 82 00 24 addi r2,sp,36 <== NOT EXECUTED
8009c04: f8 00 01 83 calli 800a210 <rtems_barrier_release> <== NOT EXECUTED
if (pipe->Readers == 0) {
8009c08: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8009c0c: 5c 20 00 25 bne r1,r0,8009ca0 <fifo_open+0x320> <== NOT EXECUTED
prevCounter = pipe->readerCounter;
8009c10: 29 70 00 20 lw r16,(r11+32) <== NOT EXECUTED
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
8009c14: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8009c18: fb ff f8 01 calli 8007c1c <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
8009c1c: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
8009c20: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8009c24: f8 00 01 9a calli 800a28c <rtems_barrier_wait> <== NOT EXECUTED
8009c28: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
8009c2c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
8009c30: 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))
8009c34: 5c 20 00 1e bne r1,r0,8009cac <fifo_open+0x32c> <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
8009c38: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8009c3c: fb ff f7 a8 calli 8007adc <rtems_semaphore_obtain> <== NOT EXECUTED
8009c40: 5c 2d 00 1b bne r1,r13,8009cac <fifo_open+0x32c> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->readerCounter);
8009c44: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED
8009c48: 46 01 ff f3 be r16,r1,8009c14 <fifo_open+0x294> <== NOT EXECUTED
8009c4c: e0 00 00 15 bi 8009ca0 <fifo_open+0x320> <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
8009c50: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED
if (pipe->Readers ++ == 0)
8009c54: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
8009c58: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
8009c5c: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
8009c60: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
8009c64: 59 62 00 10 sw (r11+16),r2 <== NOT EXECUTED
8009c68: 5c 20 00 04 bne r1,r0,8009c78 <fifo_open+0x2f8> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
8009c6c: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
8009c70: 37 82 00 24 addi r2,sp,36 <== NOT EXECUTED
8009c74: f8 00 01 67 calli 800a210 <rtems_barrier_release> <== NOT EXECUTED
pipe->writerCounter ++;
8009c78: 29 63 00 24 lw r3,(r11+36) <== NOT EXECUTED
if (pipe->Writers ++ == 0)
8009c7c: 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 ++;
8009c80: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
8009c84: 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 ++;
8009c88: 59 63 00 24 sw (r11+36),r3 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
8009c8c: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED
8009c90: 5c 20 00 04 bne r1,r0,8009ca0 <fifo_open+0x320> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
8009c94: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED
8009c98: 37 82 00 24 addi r2,sp,36 <== NOT EXECUTED
8009c9c: f8 00 01 5d calli 800a210 <rtems_barrier_release> <== NOT EXECUTED
break;
}
PIPE_UNLOCK(pipe);
8009ca0: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8009ca4: fb ff f7 de calli 8007c1c <rtems_semaphore_release> <== NOT EXECUTED
return 0;
8009ca8: e0 00 00 05 bi 8009cbc <fifo_open+0x33c> <== NOT EXECUTED
8009cac: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED
out_error:
pipe_release(pipep, iop);
8009cb0: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
8009cb4: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED
8009cb8: fb ff fe ea calli 8009860 <pipe_release> <== NOT EXECUTED
return err;
}
8009cbc: b9 80 08 00 mv r1,r12
8009cc0: 2b 9d 00 04 lw ra,(sp+4)
8009cc4: 2b 8b 00 20 lw r11,(sp+32)
8009cc8: 2b 8c 00 1c lw r12,(sp+28)
8009ccc: 2b 8d 00 18 lw r13,(sp+24)
8009cd0: 2b 8e 00 14 lw r14,(sp+20)
8009cd4: 2b 8f 00 10 lw r15,(sp+16)
8009cd8: 2b 90 00 0c lw r16,(sp+12)
8009cdc: 2b 91 00 08 lw r17,(sp+8)
8009ce0: 37 9c 00 24 addi sp,sp,36
8009ce4: c3 a0 00 00 ret
080068c0 <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;
80068c0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80068c4: 38 21 8f f8 ori r1,r1,0x8ff8 <== NOT EXECUTED
80068c8: 34 23 00 04 addi r3,r1,4 <== NOT EXECUTED
80068cc: e0 00 00 06 bi 80068e4 <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 ) {
80068d0: 28 25 00 18 lw r5,(r1+24) <== NOT EXECUTED
80068d4: 28 44 00 10 lw r4,(r2+16) <== NOT EXECUTED
80068d8: 5c a4 00 03 bne r5,r4,80068e4 <file_systems_below_this_mountpoint+0x24><== NOT EXECUTED
80068dc: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
80068e0: 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 ) {
80068e4: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
80068e8: 5c 23 ff fa bne r1,r3,80068d0 <file_systems_below_this_mountpoint+0x10><== NOT EXECUTED
80068ec: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return true;
}
}
return false;
}
80068f0: 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 00 10 ori r3,r3,0x10
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 06 a8 ori r11,r11,0x6a8
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 2d de calli 800dbbc <__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 e4 cc ori r12,r12,0xe4cc
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 2d b6 calli 800dbbc <__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
08007080 <free>:
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
8007080: 37 9c ff f4 addi sp,sp,-12
8007084: 5b 8b 00 0c sw (sp+12),r11
8007088: 5b 8c 00 08 sw (sp+8),r12
800708c: 5b 9d 00 04 sw (sp+4),ra
8007090: 78 02 08 01 mvhi r2,0x801
8007094: 38 42 c6 b0 ori r2,r2,0xc6b0
8007098: 28 43 00 0c lw r3,(r2+12)
800709c: b8 20 58 00 mv r11,r1
80070a0: 34 61 00 01 addi r1,r3,1
80070a4: 58 41 00 0c sw (r2+12),r1
if ( !ptr )
80070a8: 45 60 00 1f be r11,r0,8007124 <free+0xa4>
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
80070ac: 78 01 08 01 mvhi r1,0x801
80070b0: 38 21 c9 c8 ori r1,r1,0xc9c8
80070b4: 28 22 00 00 lw r2,(r1+0)
80070b8: 34 01 00 03 mvi r1,3
80070bc: 5c 41 00 06 bne r2,r1,80070d4 <free+0x54> <== NEVER TAKEN
80070c0: f8 00 01 65 calli 8007654 <malloc_is_system_state_OK>
80070c4: 5c 20 00 04 bne r1,r0,80070d4 <free+0x54> <== ALWAYS TAKEN
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
80070c8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80070cc: f8 00 01 74 calli 800769c <malloc_deferred_free> <== NOT EXECUTED
return;
80070d0: e0 00 00 15 bi 8007124 <free+0xa4> <== NOT EXECUTED
#endif
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
80070d4: 78 01 08 01 mvhi r1,0x801
80070d8: 38 21 c6 10 ori r1,r1,0xc610
80070dc: 28 21 00 00 lw r1,(r1+0)
80070e0: 44 20 00 04 be r1,r0,80070f0 <free+0x70> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_free)(ptr);
80070e4: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED
80070e8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80070ec: d8 40 00 00 call r2 <== NOT EXECUTED
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
80070f0: 78 0c 08 01 mvhi r12,0x801
80070f4: 39 8c c0 1c ori r12,r12,0xc01c
80070f8: 29 81 00 00 lw r1,(r12+0)
80070fc: b9 60 10 00 mv r2,r11
8007100: f8 00 06 7b calli 8008aec <_Protected_heap_Free>
8007104: 5c 20 00 08 bne r1,r0,8007124 <free+0xa4> <== ALWAYS TAKEN
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
8007108: 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",
800710c: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8007110: 38 21 a6 f8 ori r1,r1,0xa6f8 <== NOT EXECUTED
8007114: 28 44 00 1c lw r4,(r2+28) <== NOT EXECUTED
8007118: 28 43 00 18 lw r3,(r2+24) <== NOT EXECUTED
800711c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8007120: fb ff ea 87 calli 8001b3c <printk> <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
8007124: 2b 9d 00 04 lw ra,(sp+4)
8007128: 2b 8b 00 0c lw r11,(sp+12)
800712c: 2b 8c 00 08 lw r12,(sp+8)
8007130: 37 9c 00 0c addi sp,sp,12
8007134: c3 a0 00 00 ret
08002bb8 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
8002bb8: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
8002bbc: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
8002bc0: 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
8002bc4: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8002bc8: 38 42 e6 e4 ori r2,r2,0xe6e4 <== NOT EXECUTED
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
8002bcc: 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
8002bd0: 44 22 00 0f be r1,r2,8002c0c <free_user_env+0x54> <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
8002bd4: 28 21 00 10 lw r1,(r1+16) <== NOT EXECUTED
8002bd8: 44 20 00 05 be r1,r0,8002bec <free_user_env+0x34> <== NOT EXECUTED
8002bdc: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8002be0: 44 40 00 03 be r2,r0,8002bec <free_user_env+0x34> <== NOT EXECUTED
8002be4: 35 61 00 04 addi r1,r11,4 <== NOT EXECUTED
8002be8: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
8002bec: 29 61 00 24 lw r1,(r11+36) <== NOT EXECUTED
8002bf0: 44 20 00 05 be r1,r0,8002c04 <free_user_env+0x4c> <== NOT EXECUTED
8002bf4: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8002bf8: 44 40 00 03 be r2,r0,8002c04 <free_user_env+0x4c> <== NOT EXECUTED
8002bfc: 35 61 00 18 addi r1,r11,24 <== NOT EXECUTED
8002c00: d8 40 00 00 call r2 <== NOT EXECUTED
free(env);
8002c04: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8002c08: fb ff fb 3a calli 80018f0 <free> <== NOT EXECUTED
}
}
8002c0c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002c10: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8002c14: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
8002c18: c3 a0 00 00 ret <== NOT EXECUTED
08019328 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
8019328: 37 9c ff ec addi sp,sp,-20
801932c: 5b 8b 00 14 sw (sp+20),r11
8019330: 5b 8c 00 10 sw (sp+16),r12
8019334: 5b 8d 00 0c sw (sp+12),r13
8019338: 5b 8e 00 08 sw (sp+8),r14
801933c: 5b 9d 00 04 sw (sp+4),ra
8019340: b8 40 60 00 mv r12,r2
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
8019344: 5c 40 00 04 bne r2,r0,8019354 <fstat+0x2c>
rtems_set_errno_and_return_minus_one( EFAULT );
8019348: fb ff c7 0d calli 800af7c <__errno>
801934c: 34 02 00 0e mvi r2,14
8019350: e0 00 00 14 bi 80193a0 <fstat+0x78>
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
8019354: 78 02 08 01 mvhi r2,0x801
8019358: 38 42 c0 10 ori r2,r2,0xc010
801935c: 28 42 00 00 lw r2,(r2+0)
8019360: 50 22 00 0e bgeu r1,r2,8019398 <fstat+0x70>
8019364: 34 02 00 03 mvi r2,3
8019368: fb ff 9b a2 calli 80001f0 <__ashlsi3>
801936c: 78 0d 08 01 mvhi r13,0x801
8019370: 39 ad c6 a0 ori r13,r13,0xc6a0
8019374: 34 02 00 03 mvi r2,3
8019378: b8 20 70 00 mv r14,r1
801937c: fb ff 9b 9d calli 80001f0 <__ashlsi3>
8019380: 29 ab 00 00 lw r11,(r13+0)
8019384: b5 c1 08 00 add r1,r14,r1
8019388: b5 61 58 00 add r11,r11,r1
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
801938c: 29 61 00 18 lw r1,(r11+24)
8019390: 20 21 01 00 andi r1,r1,0x100
8019394: 5c 20 00 06 bne r1,r0,80193ac <fstat+0x84> <== ALWAYS TAKEN
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
8019398: fb ff c6 f9 calli 800af7c <__errno>
801939c: 34 02 00 09 mvi r2,9
80193a0: 58 22 00 00 sw (r1+0),r2
80193a4: 34 01 ff ff mvi r1,-1
80193a8: e0 00 00 11 bi 80193ec <fstat+0xc4>
rtems_libio_check_is_open(iop);
if ( !iop->handlers )
80193ac: 29 61 00 40 lw r1,(r11+64)
80193b0: 44 20 ff fa be r1,r0,8019398 <fstat+0x70> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
80193b4: 28 21 00 18 lw r1,(r1+24)
80193b8: 5c 20 00 04 bne r1,r0,80193c8 <fstat+0xa0> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
80193bc: fb ff c6 f0 calli 800af7c <__errno> <== NOT EXECUTED
80193c0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
80193c4: e3 ff ff f7 bi 80193a0 <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) );
80193c8: 34 02 00 00 mvi r2,0
80193cc: 34 03 00 48 mvi r3,72
80193d0: b9 80 08 00 mv r1,r12
80193d4: fb ff c9 ee calli 800bb8c <memset>
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
80193d8: 29 63 00 40 lw r3,(r11+64)
80193dc: 35 61 00 1c addi r1,r11,28
80193e0: b9 80 10 00 mv r2,r12
80193e4: 28 63 00 18 lw r3,(r3+24)
80193e8: d8 60 00 00 call r3
}
80193ec: 2b 9d 00 04 lw ra,(sp+4)
80193f0: 2b 8b 00 14 lw r11,(sp+20)
80193f4: 2b 8c 00 10 lw r12,(sp+16)
80193f8: 2b 8d 00 0c lw r13,(sp+12)
80193fc: 2b 8e 00 08 lw r14,(sp+8)
8019400: 37 9c 00 14 addi sp,sp,20
8019404: c3 a0 00 00 ret
080026c4 <fsync>:
#include <rtems/seterr.h>
int fsync(
int fd
)
{
80026c4: 37 9c ff f4 addi sp,sp,-12
80026c8: 5b 8b 00 0c sw (sp+12),r11
80026cc: 5b 8c 00 08 sw (sp+8),r12
80026d0: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
80026d4: 78 02 08 02 mvhi r2,0x802
80026d8: 38 42 00 10 ori r2,r2,0x10
80026dc: 28 42 00 00 lw r2,(r2+0)
80026e0: 54 41 00 02 bgu r2,r1,80026e8 <fsync+0x24> <== ALWAYS TAKEN
80026e4: e0 00 00 15 bi 8002738 <fsync+0x74> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
80026e8: 34 02 00 03 mvi r2,3
80026ec: fb ff f9 26 calli 8000b84 <__ashlsi3>
80026f0: 34 02 00 03 mvi r2,3
80026f4: 78 0b 08 02 mvhi r11,0x802
80026f8: b8 20 60 00 mv r12,r1
80026fc: 39 6b 06 a8 ori r11,r11,0x6a8
8002700: fb ff f9 21 calli 8000b84 <__ashlsi3>
8002704: 29 62 00 00 lw r2,(r11+0)
8002708: b5 81 08 00 add r1,r12,r1
800270c: b4 41 08 00 add r1,r2,r1
rtems_libio_check_is_open(iop);
8002710: 28 22 00 18 lw r2,(r1+24)
8002714: 20 43 01 00 andi r3,r2,0x100
8002718: 44 60 00 08 be r3,r0,8002738 <fsync+0x74> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
800271c: 20 42 00 04 andi r2,r2,0x4
8002720: 5c 40 00 04 bne r2,r0,8002730 <fsync+0x6c>
8002724: f8 00 2d 26 calli 800dbbc <__errno>
8002728: 34 02 00 16 mvi r2,22
800272c: e0 00 00 0a bi 8002754 <fsync+0x90>
/*
* Now process the fsync().
*/
if ( !iop->handlers )
8002730: 28 22 00 40 lw r2,(r1+64)
8002734: 5c 40 00 04 bne r2,r0,8002744 <fsync+0x80> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
8002738: f8 00 2d 21 calli 800dbbc <__errno> <== NOT EXECUTED
800273c: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
8002740: e0 00 00 05 bi 8002754 <fsync+0x90> <== NOT EXECUTED
if ( !iop->handlers->fsync_h )
8002744: 28 42 00 28 lw r2,(r2+40)
8002748: 5c 40 00 06 bne r2,r0,8002760 <fsync+0x9c>
rtems_set_errno_and_return_minus_one( ENOTSUP );
800274c: f8 00 2d 1c calli 800dbbc <__errno>
8002750: 34 02 00 86 mvi r2,134
8002754: 58 22 00 00 sw (r1+0),r2
8002758: 34 01 ff ff mvi r1,-1
800275c: e0 00 00 02 bi 8002764 <fsync+0xa0>
return (*iop->handlers->fsync_h)( iop );
8002760: d8 40 00 00 call r2
}
8002764: 2b 9d 00 04 lw ra,(sp+4)
8002768: 2b 8b 00 0c lw r11,(sp+12)
800276c: 2b 8c 00 08 lw r12,(sp+8)
8002770: 37 9c 00 0c addi sp,sp,12
8002774: c3 a0 00 00 ret
08007138 <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
8007138: 37 9c ff d8 addi sp,sp,-40
800713c: 5b 8b 00 14 sw (sp+20),r11
8007140: 5b 8c 00 10 sw (sp+16),r12
8007144: 5b 8d 00 0c sw (sp+12),r13
8007148: 5b 8e 00 08 sw (sp+8),r14
800714c: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
8007150: 78 03 08 01 mvhi r3,0x801
8007154: 38 63 c0 10 ori r3,r3,0xc010
8007158: 28 63 00 00 lw r3,(r3+0)
int ftruncate(
int fd,
off_t length
)
{
800715c: b8 40 68 00 mv r13,r2
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
8007160: 54 61 00 02 bgu r3,r1,8007168 <ftruncate+0x30> <== ALWAYS TAKEN
8007164: e0 00 00 0e bi 800719c <ftruncate+0x64> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
8007168: 34 02 00 03 mvi r2,3
800716c: fb ff e4 21 calli 80001f0 <__ashlsi3>
8007170: 78 0c 08 01 mvhi r12,0x801
8007174: 39 8c c6 a0 ori r12,r12,0xc6a0
8007178: 34 02 00 03 mvi r2,3
800717c: b8 20 70 00 mv r14,r1
8007180: fb ff e4 1c calli 80001f0 <__ashlsi3>
8007184: 29 8b 00 00 lw r11,(r12+0)
8007188: b5 c1 08 00 add r1,r14,r1
800718c: b5 61 58 00 add r11,r11,r1
rtems_libio_check_is_open(iop);
8007190: 29 61 00 18 lw r1,(r11+24)
8007194: 20 21 01 00 andi r1,r1,0x100
8007198: 5c 20 00 04 bne r1,r0,80071a8 <ftruncate+0x70> <== ALWAYS TAKEN
800719c: f8 00 0f 78 calli 800af7c <__errno> <== NOT EXECUTED
80071a0: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
80071a4: e0 00 00 1b bi 8007210 <ftruncate+0xd8> <== NOT EXECUTED
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
80071a8: 37 8c 00 18 addi r12,sp,24
80071ac: b9 80 08 00 mv r1,r12
80071b0: 35 62 00 1c addi r2,r11,28
80071b4: 34 03 00 14 mvi r3,20
80071b8: f8 00 12 17 calli 800ba14 <memcpy>
if ( !loc.ops->node_type_h )
80071bc: 2b 81 00 24 lw r1,(sp+36)
80071c0: 28 24 00 10 lw r4,(r1+16)
80071c4: 44 80 00 11 be r4,r0,8007208 <ftruncate+0xd0> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
80071c8: b9 80 08 00 mv r1,r12
80071cc: d8 80 00 00 call r4
80071d0: 34 02 00 01 mvi r2,1
80071d4: 5c 22 00 04 bne r1,r2,80071e4 <ftruncate+0xac>
rtems_set_errno_and_return_minus_one( EISDIR );
80071d8: f8 00 0f 69 calli 800af7c <__errno>
80071dc: 34 02 00 15 mvi r2,21
80071e0: e0 00 00 0c bi 8007210 <ftruncate+0xd8>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
80071e4: 29 61 00 18 lw r1,(r11+24)
80071e8: 20 21 00 04 andi r1,r1,0x4
80071ec: 5c 20 00 04 bne r1,r0,80071fc <ftruncate+0xc4> <== ALWAYS TAKEN
80071f0: f8 00 0f 63 calli 800af7c <__errno> <== NOT EXECUTED
80071f4: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
80071f8: e0 00 00 06 bi 8007210 <ftruncate+0xd8> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
80071fc: 29 61 00 40 lw r1,(r11+64)
8007200: 28 2c 00 20 lw r12,(r1+32)
8007204: 5d 80 00 06 bne r12,r0,800721c <ftruncate+0xe4> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
8007208: f8 00 0f 5d calli 800af7c <__errno> <== NOT EXECUTED
800720c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8007210: 58 22 00 00 sw (r1+0),r2
8007214: 34 01 ff ff mvi r1,-1
8007218: e0 00 00 08 bi 8007238 <ftruncate+0x100>
return (*iop->handlers->ftruncate_h)( iop, length );
800721c: 34 02 00 1f mvi r2,31
8007220: b9 a0 08 00 mv r1,r13
8007224: fb ff e4 43 calli 8000330 <__ashrsi3>
8007228: b8 20 10 00 mv r2,r1
800722c: b9 a0 18 00 mv r3,r13
8007230: b9 60 08 00 mv r1,r11
8007234: d9 80 00 00 call r12
}
8007238: 2b 9d 00 04 lw ra,(sp+4)
800723c: 2b 8b 00 14 lw r11,(sp+20)
8007240: 2b 8c 00 10 lw r12,(sp+16)
8007244: 2b 8d 00 0c lw r13,(sp+12)
8007248: 2b 8e 00 08 lw r14,(sp+8)
800724c: 37 9c 00 28 addi sp,sp,40
8007250: c3 a0 00 00 ret
0801d3a4 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
801d3a4: 37 9c ff d4 addi sp,sp,-44
801d3a8: 5b 8b 00 18 sw (sp+24),r11
801d3ac: 5b 8c 00 14 sw (sp+20),r12
801d3b0: 5b 8d 00 10 sw (sp+16),r13
801d3b4: 5b 8e 00 0c sw (sp+12),r14
801d3b8: 5b 8f 00 08 sw (sp+8),r15
801d3bc: 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 );
801d3c0: 78 04 08 02 mvhi r4,0x802
801d3c4: 38 84 10 10 ori r4,r4,0x1010
801d3c8: 28 84 00 00 lw r4,(r4+0)
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
801d3cc: b8 40 78 00 mv r15,r2
801d3d0: b8 60 70 00 mv r14,r3
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
801d3d4: 54 81 00 03 bgu r4,r1,801d3e0 <getdents+0x3c> <== ALWAYS TAKEN
801d3d8: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED
801d3dc: e0 00 00 0b bi 801d408 <getdents+0x64> <== NOT EXECUTED
801d3e0: 34 02 00 03 mvi r2,3
801d3e4: fb ff 8f b8 calli 80012c4 <__ashlsi3>
801d3e8: 78 0c 08 02 mvhi r12,0x802
801d3ec: 39 8c 17 c0 ori r12,r12,0x17c0
801d3f0: 34 02 00 03 mvi r2,3
801d3f4: b8 20 68 00 mv r13,r1
801d3f8: fb ff 8f b3 calli 80012c4 <__ashlsi3>
801d3fc: 29 8b 00 00 lw r11,(r12+0)
801d400: b5 a1 08 00 add r1,r13,r1
801d404: b5 61 58 00 add r11,r11,r1
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
801d408: 37 8d 00 1c addi r13,sp,28
801d40c: 34 0c 00 14 mvi r12,20
801d410: b9 a0 08 00 mv r1,r13
801d414: 35 62 00 1c addi r2,r11,28
801d418: b9 80 18 00 mv r3,r12
801d41c: fb ff c4 0d calli 800e450 <memcpy>
if ( !loc.ops->node_type_h )
801d420: 2b 81 00 28 lw r1,(sp+40)
801d424: 28 24 00 10 lw r4,(r1+16)
801d428: 44 80 00 0c be r4,r0,801d458 <getdents+0xb4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
801d42c: b9 a0 08 00 mv r1,r13
801d430: d8 80 00 00 call r4
801d434: 34 02 00 01 mvi r2,1
801d438: 44 22 00 05 be r1,r2,801d44c <getdents+0xa8>
rtems_set_errno_and_return_minus_one( ENOTDIR );
801d43c: fb ff c1 5f calli 800d9b8 <__errno>
801d440: 58 2c 00 00 sw (r1+0),r12
801d444: 34 01 ff ff mvi r1,-1
801d448: e0 00 00 0c bi 801d478 <getdents+0xd4>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
801d44c: 29 61 00 40 lw r1,(r11+64)
801d450: 28 24 00 08 lw r4,(r1+8)
801d454: 5c 80 00 05 bne r4,r0,801d468 <getdents+0xc4> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
801d458: fb ff c1 58 calli 800d9b8 <__errno> <== NOT EXECUTED
801d45c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
801d460: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
801d464: e3 ff ff f8 bi 801d444 <getdents+0xa0> <== NOT EXECUTED
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
801d468: b9 60 08 00 mv r1,r11
801d46c: b9 e0 10 00 mv r2,r15
801d470: b9 c0 18 00 mv r3,r14
801d474: d8 80 00 00 call r4
}
801d478: 2b 9d 00 04 lw ra,(sp+4)
801d47c: 2b 8b 00 18 lw r11,(sp+24)
801d480: 2b 8c 00 14 lw r12,(sp+20)
801d484: 2b 8d 00 10 lw r13,(sp+16)
801d488: 2b 8e 00 0c lw r14,(sp+12)
801d48c: 2b 8f 00 08 lw r15,(sp+8)
801d490: 37 9c 00 2c addi sp,sp,44
801d494: c3 a0 00 00 ret
08001f68 <getgr_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
8001f68: 37 9c ff e0 addi sp,sp,-32
8001f6c: 5b 8b 00 20 sw (sp+32),r11
8001f70: 5b 8c 00 1c sw (sp+28),r12
8001f74: 5b 8d 00 18 sw (sp+24),r13
8001f78: 5b 8e 00 14 sw (sp+20),r14
8001f7c: 5b 8f 00 10 sw (sp+16),r15
8001f80: 5b 90 00 0c sw (sp+12),r16
8001f84: 5b 91 00 08 sw (sp+8),r17
8001f88: 5b 9d 00 04 sw (sp+4),ra
8001f8c: b8 20 68 00 mv r13,r1
8001f90: b8 40 88 00 mv r17,r2
8001f94: b8 60 58 00 mv r11,r3
8001f98: b8 80 80 00 mv r16,r4
8001f9c: b8 a0 78 00 mv r15,r5
8001fa0: b8 c0 70 00 mv r14,r6
FILE *fp;
int match;
init_etc_passwd_group();
8001fa4: fb ff ff a3 calli 8001e30 <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL) {
8001fa8: 78 01 08 01 mvhi r1,0x801
8001fac: 78 02 08 01 mvhi r2,0x801
8001fb0: 38 21 dd 00 ori r1,r1,0xdd00
8001fb4: 38 42 e2 d0 ori r2,r2,0xe2d0
8001fb8: f8 00 2f 61 calli 800dd3c <fopen>
8001fbc: b8 20 60 00 mv r12,r1
8001fc0: 5c 20 00 05 bne r1,r0,8001fd4 <getgr_r+0x6c> <== ALWAYS TAKEN
errno = EINVAL;
8001fc4: f8 00 2c dc calli 800d334 <__errno> <== NOT EXECUTED
8001fc8: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8001fcc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8001fd0: e0 00 00 0d bi 8002004 <getgr_r+0x9c> <== NOT EXECUTED
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
8001fd4: b9 60 10 00 mv r2,r11
8001fd8: ba 00 18 00 mv r3,r16
8001fdc: b9 e0 20 00 mv r4,r15
8001fe0: b9 80 08 00 mv r1,r12
8001fe4: fb ff fe c1 calli 8001ae8 <scangr>
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
8001fe8: 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)) {
8001fec: 5c 20 00 08 bne r1,r0,800200c <getgr_r+0xa4>
errno = EINVAL;
8001ff0: f8 00 2c d1 calli 800d334 <__errno> <== NOT EXECUTED
8001ff4: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8001ff8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
fclose(fp);
8001ffc: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8002000: f8 00 2d 2f calli 800d4bc <fclose> <== NOT EXECUTED
8002004: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
return -1;
8002008: e0 00 00 0d bi 800203c <getgr_r+0xd4> <== NOT EXECUTED
}
if (name) {
800200c: 45 a0 00 05 be r13,r0,8002020 <getgr_r+0xb8> <== NEVER TAKEN
match = (strcmp(grp->gr_name, name) == 0);
8002010: 29 61 00 00 lw r1,(r11+0)
8002014: f8 00 36 0d calli 800f848 <strcmp>
8002018: 64 27 00 00 cmpei r7,r1,0
800201c: e0 00 00 03 bi 8002028 <getgr_r+0xc0>
}
else {
match = (grp->gr_gid == gid);
8002020: 2d 67 00 08 lhu r7,(r11+8) <== NOT EXECUTED
8002024: e4 f1 38 00 cmpe r7,r7,r17 <== NOT EXECUTED
}
if (match) {
8002028: 44 e0 ff eb be r7,r0,8001fd4 <getgr_r+0x6c> <== NEVER TAKEN
fclose(fp);
800202c: b9 80 08 00 mv r1,r12
8002030: f8 00 2d 23 calli 800d4bc <fclose>
*result = grp;
8002034: 34 01 00 00 mvi r1,0
8002038: 59 cb 00 00 sw (r14+0),r11
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
800203c: 2b 9d 00 04 lw ra,(sp+4)
8002040: 2b 8b 00 20 lw r11,(sp+32)
8002044: 2b 8c 00 1c lw r12,(sp+28)
8002048: 2b 8d 00 18 lw r13,(sp+24)
800204c: 2b 8e 00 14 lw r14,(sp+20)
8002050: 2b 8f 00 10 lw r15,(sp+16)
8002054: 2b 90 00 0c lw r16,(sp+12)
8002058: 2b 91 00 08 lw r17,(sp+8)
800205c: 37 9c 00 20 addi sp,sp,32
8002060: c3 a0 00 00 ret
08001c68 <getgrent>:
return NULL;
return p;
}
struct group *getgrent(void)
{
8001c68: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8001c6c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
if (group_fp == NULL)
8001c70: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8001c74: 38 21 f7 10 ori r1,r1,0xf710 <== NOT EXECUTED
8001c78: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
8001c7c: 44 20 00 0b be r1,r0,8001ca8 <getgrent+0x40> <== NOT EXECUTED
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
8001c80: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8001c84: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED
8001c88: 38 42 f7 dc ori r2,r2,0xf7dc <== NOT EXECUTED
8001c8c: 38 63 f7 14 ori r3,r3,0xf714 <== NOT EXECUTED
8001c90: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED
8001c94: fb ff ff 95 calli 8001ae8 <scangr> <== NOT EXECUTED
8001c98: 44 20 00 04 be r1,r0,8001ca8 <getgrent+0x40> <== NOT EXECUTED
8001c9c: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8001ca0: 38 21 f7 dc ori r1,r1,0xf7dc <== NOT EXECUTED
8001ca4: e0 00 00 02 bi 8001cac <getgrent+0x44> <== NOT EXECUTED
8001ca8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return NULL;
return &grent;
}
8001cac: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8001cb0: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8001cb4: c3 a0 00 00 ret <== NOT EXECUTED
080020a0 <getgrgid>:
struct group *getgrgid(
gid_t gid
)
{
80020a0: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
80020a4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
80020a8: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
80020ac: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED
80020b0: 38 42 f7 dc ori r2,r2,0xf7dc <== NOT EXECUTED
80020b4: 20 21 ff ff andi r1,r1,0xffff <== NOT EXECUTED
80020b8: 38 63 f7 14 ori r3,r3,0xf714 <== NOT EXECUTED
80020bc: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED
80020c0: 37 85 00 08 addi r5,sp,8 <== NOT EXECUTED
80020c4: fb ff ff e8 calli 8002064 <getgrgid_r> <== NOT EXECUTED
80020c8: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
80020cc: 5c 22 00 02 bne r1,r2,80020d4 <getgrgid+0x34> <== NOT EXECUTED
return NULL;
return p;
80020d0: 2b 82 00 08 lw r2,(sp+8) <== NOT EXECUTED
}
80020d4: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
80020d8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80020dc: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
80020e0: c3 a0 00 00 ret <== NOT EXECUTED
08002064 <getgrgid_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
8002064: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8002068: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
800206c: b8 40 48 00 mv r9,r2 <== NOT EXECUTED
8002070: b8 60 40 00 mv r8,r3 <== NOT EXECUTED
8002074: b8 80 38 00 mv r7,r4 <== NOT EXECUTED
8002078: b8 a0 30 00 mv r6,r5 <== NOT EXECUTED
800207c: 20 22 ff ff andi r2,r1,0xffff <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
8002080: b9 20 18 00 mv r3,r9 <== NOT EXECUTED
8002084: b9 00 20 00 mv r4,r8 <== NOT EXECUTED
8002088: b8 e0 28 00 mv r5,r7 <== NOT EXECUTED
800208c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8002090: fb ff ff b6 calli 8001f68 <getgr_r> <== NOT EXECUTED
}
8002094: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002098: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
800209c: c3 a0 00 00 ret <== NOT EXECUTED
08002118 <getgrnam>:
struct group *getgrnam(
const char *name
)
{
8002118: 37 9c ff f8 addi sp,sp,-8
800211c: 5b 9d 00 04 sw (sp+4),ra
struct group *p;
if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
8002120: 78 02 08 01 mvhi r2,0x801
8002124: 78 03 08 01 mvhi r3,0x801
8002128: 38 42 f7 dc ori r2,r2,0xf7dc
800212c: 38 63 f7 14 ori r3,r3,0xf714
8002130: 34 04 00 c8 mvi r4,200
8002134: 37 85 00 08 addi r5,sp,8
8002138: fb ff ff eb calli 80020e4 <getgrnam_r>
800213c: 34 02 00 00 mvi r2,0
8002140: 5c 22 00 02 bne r1,r2,8002148 <getgrnam+0x30> <== NEVER TAKEN
return NULL;
return p;
8002144: 2b 82 00 08 lw r2,(sp+8)
}
8002148: b8 40 08 00 mv r1,r2
800214c: 2b 9d 00 04 lw ra,(sp+4)
8002150: 37 9c 00 08 addi sp,sp,8
8002154: c3 a0 00 00 ret
08025044 <getpid>:
*/
pid_t getpid( void )
{
return _Objects_Local_node;
}
8025044: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
8025048: c3 a0 00 00 ret <== NOT EXECUTED
080021a4 <getpw_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
80021a4: 37 9c ff e0 addi sp,sp,-32
80021a8: 5b 8b 00 20 sw (sp+32),r11
80021ac: 5b 8c 00 1c sw (sp+28),r12
80021b0: 5b 8d 00 18 sw (sp+24),r13
80021b4: 5b 8e 00 14 sw (sp+20),r14
80021b8: 5b 8f 00 10 sw (sp+16),r15
80021bc: 5b 90 00 0c sw (sp+12),r16
80021c0: 5b 91 00 08 sw (sp+8),r17
80021c4: 5b 9d 00 04 sw (sp+4),ra
80021c8: b8 20 68 00 mv r13,r1
80021cc: b8 40 88 00 mv r17,r2
80021d0: b8 60 58 00 mv r11,r3
80021d4: b8 80 80 00 mv r16,r4
80021d8: b8 a0 78 00 mv r15,r5
80021dc: b8 c0 70 00 mv r14,r6
FILE *fp;
int match;
init_etc_passwd_group();
80021e0: fb ff ff 14 calli 8001e30 <init_etc_passwd_group>
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
80021e4: 78 01 08 01 mvhi r1,0x801
80021e8: 78 02 08 01 mvhi r2,0x801
80021ec: 38 21 dc 88 ori r1,r1,0xdc88
80021f0: 38 42 e2 d0 ori r2,r2,0xe2d0
80021f4: f8 00 2e d2 calli 800dd3c <fopen>
80021f8: b8 20 60 00 mv r12,r1
80021fc: 5c 20 00 05 bne r1,r0,8002210 <getpw_r+0x6c> <== ALWAYS TAKEN
errno = EINVAL;
8002200: f8 00 2c 4d calli 800d334 <__errno> <== NOT EXECUTED
8002204: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8002208: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800220c: e0 00 00 0d bi 8002240 <getpw_r+0x9c> <== NOT EXECUTED
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
8002210: b9 60 10 00 mv r2,r11
8002214: ba 00 18 00 mv r3,r16
8002218: b9 e0 20 00 mv r4,r15
800221c: b9 80 08 00 mv r1,r12
8002220: fb ff fe a6 calli 8001cb8 <scanpw>
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(pwd->pw_name, name) == 0);
8002224: 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)) {
8002228: 5c 20 00 08 bne r1,r0,8002248 <getpw_r+0xa4> <== ALWAYS TAKEN
errno = EINVAL;
800222c: f8 00 2c 42 calli 800d334 <__errno> <== NOT EXECUTED
8002230: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8002234: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
fclose(fp);
8002238: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
800223c: f8 00 2c a0 calli 800d4bc <fclose> <== NOT EXECUTED
8002240: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
return -1;
8002244: e0 00 00 0d bi 8002278 <getpw_r+0xd4> <== NOT EXECUTED
}
if (name) {
8002248: 45 a0 00 05 be r13,r0,800225c <getpw_r+0xb8> <== NEVER TAKEN
match = (strcmp(pwd->pw_name, name) == 0);
800224c: 29 61 00 00 lw r1,(r11+0)
8002250: f8 00 35 7e calli 800f848 <strcmp>
8002254: 64 27 00 00 cmpei r7,r1,0
8002258: e0 00 00 03 bi 8002264 <getpw_r+0xc0>
}
else {
match = (pwd->pw_uid == uid);
800225c: 2d 67 00 08 lhu r7,(r11+8) <== NOT EXECUTED
8002260: e4 f1 38 00 cmpe r7,r7,r17 <== NOT EXECUTED
}
if (match) {
8002264: 44 e0 ff eb be r7,r0,8002210 <getpw_r+0x6c>
fclose(fp);
8002268: b9 80 08 00 mv r1,r12
800226c: f8 00 2c 94 calli 800d4bc <fclose>
*result = pwd;
8002270: 34 01 00 00 mvi r1,0
8002274: 59 cb 00 00 sw (r14+0),r11
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
8002278: 2b 9d 00 04 lw ra,(sp+4)
800227c: 2b 8b 00 20 lw r11,(sp+32)
8002280: 2b 8c 00 1c lw r12,(sp+28)
8002284: 2b 8d 00 18 lw r13,(sp+24)
8002288: 2b 8e 00 14 lw r14,(sp+20)
800228c: 2b 8f 00 10 lw r15,(sp+16)
8002290: 2b 90 00 0c lw r16,(sp+12)
8002294: 2b 91 00 08 lw r17,(sp+8)
8002298: 37 9c 00 20 addi sp,sp,32
800229c: c3 a0 00 00 ret
08001de0 <getpwent>:
return NULL;
return p;
}
struct passwd *getpwent(void)
{
8001de0: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8001de4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
if (passwd_fp == NULL)
8001de8: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8001dec: 38 21 f6 28 ori r1,r1,0xf628 <== NOT EXECUTED
8001df0: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
8001df4: 44 20 00 0b be r1,r0,8001e20 <getpwent+0x40> <== NOT EXECUTED
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
8001df8: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8001dfc: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED
8001e00: 38 42 f6 f4 ori r2,r2,0xf6f4 <== NOT EXECUTED
8001e04: 38 63 f6 2c ori r3,r3,0xf62c <== NOT EXECUTED
8001e08: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED
8001e0c: fb ff ff ab calli 8001cb8 <scanpw> <== NOT EXECUTED
8001e10: 44 20 00 04 be r1,r0,8001e20 <getpwent+0x40> <== NOT EXECUTED
8001e14: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8001e18: 38 21 f6 f4 ori r1,r1,0xf6f4 <== NOT EXECUTED
8001e1c: e0 00 00 02 bi 8001e24 <getpwent+0x44> <== NOT EXECUTED
8001e20: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return NULL;
return &pwent;
}
8001e24: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8001e28: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8001e2c: c3 a0 00 00 ret <== NOT EXECUTED
08002354 <getpwnam>:
struct passwd *getpwnam(
const char *name
)
{
8002354: 37 9c ff f8 addi sp,sp,-8
8002358: 5b 9d 00 04 sw (sp+4),ra
struct passwd *p;
if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
800235c: 78 02 08 01 mvhi r2,0x801
8002360: 78 03 08 01 mvhi r3,0x801
8002364: 38 42 f6 f4 ori r2,r2,0xf6f4
8002368: 38 63 f6 2c ori r3,r3,0xf62c
800236c: 34 04 00 c8 mvi r4,200
8002370: 37 85 00 08 addi r5,sp,8
8002374: fb ff ff eb calli 8002320 <getpwnam_r>
8002378: 34 02 00 00 mvi r2,0
800237c: 5c 22 00 02 bne r1,r2,8002384 <getpwnam+0x30> <== NEVER TAKEN
return NULL;
return p;
8002380: 2b 82 00 08 lw r2,(sp+8)
}
8002384: b8 40 08 00 mv r1,r2
8002388: 2b 9d 00 04 lw ra,(sp+4)
800238c: 37 9c 00 08 addi sp,sp,8
8002390: c3 a0 00 00 ret
080022dc <getpwuid>:
struct passwd *getpwuid(
uid_t uid
)
{
80022dc: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
80022e0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
80022e4: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
80022e8: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED
80022ec: 38 42 f6 f4 ori r2,r2,0xf6f4 <== NOT EXECUTED
80022f0: 20 21 ff ff andi r1,r1,0xffff <== NOT EXECUTED
80022f4: 38 63 f6 2c ori r3,r3,0xf62c <== NOT EXECUTED
80022f8: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED
80022fc: 37 85 00 08 addi r5,sp,8 <== NOT EXECUTED
8002300: fb ff ff e8 calli 80022a0 <getpwuid_r> <== NOT EXECUTED
8002304: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8002308: 5c 22 00 02 bne r1,r2,8002310 <getpwuid+0x34> <== NOT EXECUTED
return NULL;
return p;
800230c: 2b 82 00 08 lw r2,(sp+8) <== NOT EXECUTED
}
8002310: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
8002314: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002318: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
800231c: c3 a0 00 00 ret <== NOT EXECUTED
080022a0 <getpwuid_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
80022a0: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
80022a4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
80022a8: b8 40 48 00 mv r9,r2 <== NOT EXECUTED
80022ac: b8 60 40 00 mv r8,r3 <== NOT EXECUTED
80022b0: b8 80 38 00 mv r7,r4 <== NOT EXECUTED
80022b4: b8 a0 30 00 mv r6,r5 <== NOT EXECUTED
80022b8: 20 22 ff ff andi r2,r1,0xffff <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
80022bc: b9 20 18 00 mv r3,r9 <== NOT EXECUTED
80022c0: b9 00 20 00 mv r4,r8 <== NOT EXECUTED
80022c4: b8 e0 28 00 mv r5,r7 <== NOT EXECUTED
80022c8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
80022cc: fb ff ff b6 calli 80021a4 <getpw_r> <== NOT EXECUTED
}
80022d0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80022d4: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
80022d8: c3 a0 00 00 ret <== NOT EXECUTED
08007254 <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
8007254: 37 9c ff ec addi sp,sp,-20
8007258: 5b 8b 00 0c sw (sp+12),r11
800725c: 5b 8c 00 08 sw (sp+8),r12
8007260: 5b 9d 00 04 sw (sp+4),ra
8007264: b8 20 58 00 mv r11,r1
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
8007268: 5c 20 00 06 bne r1,r0,8007280 <gettimeofday+0x2c> <== ALWAYS TAKEN
errno = EFAULT;
800726c: f8 00 0f 44 calli 800af7c <__errno> <== NOT EXECUTED
8007270: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
8007274: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8007278: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
return -1;
800727c: e0 00 00 0f bi 80072b8 <gettimeofday+0x64> <== NOT EXECUTED
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
8007280: 90 00 60 00 rcsr r12,IE
8007284: 34 01 ff fe mvi r1,-2
8007288: a1 81 08 00 and r1,r12,r1
800728c: d0 01 00 00 wcsr IE,r1
_TOD_Get( &now );
8007290: 37 81 00 10 addi r1,sp,16
8007294: f8 00 04 2e calli 800834c <_TOD_Get>
_ISR_Enable(level);
8007298: 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;
800729c: 2b 82 00 10 lw r2,(sp+16)
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
80072a0: 2b 81 00 14 lw r1,(sp+20)
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
80072a4: 59 62 00 00 sw (r11+0),r2
time->tv_usec = useconds;
80072a8: 34 02 03 e8 mvi r2,1000
80072ac: f8 00 47 40 calli 8018fac <__divsi3>
80072b0: 59 61 00 04 sw (r11+4),r1
80072b4: 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;
}
80072b8: 2b 9d 00 04 lw ra,(sp+4)
80072bc: 2b 8b 00 0c lw r11,(sp+12)
80072c0: 2b 8c 00 08 lw r12,(sp+8)
80072c4: 37 9c 00 14 addi sp,sp,20
80072c8: c3 a0 00 00 ret
08010c20 <imfs_dir_open>:
)
{
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->file_info;
8010c20: 28 23 00 3c lw r3,(r1+60)
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
8010c24: 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;
8010c28: 34 01 ff ff mvi r1,-1
8010c2c: 28 64 00 4c lw r4,(r3+76)
8010c30: 34 03 00 01 mvi r3,1
8010c34: 5c 83 00 04 bne r4,r3,8010c44 <imfs_dir_open+0x24> <== NEVER TAKEN
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
8010c38: 34 01 00 00 mvi r1,0
8010c3c: 58 41 00 14 sw (r2+20),r1
8010c40: 58 41 00 10 sw (r2+16),r1
return 0;
}
8010c44: c3 a0 00 00 ret
08010d48 <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
8010d48: 37 9c ff e8 addi sp,sp,-24
8010d4c: 5b 8b 00 10 sw (sp+16),r11
8010d50: 5b 8c 00 0c sw (sp+12),r12
8010d54: 5b 8d 00 08 sw (sp+8),r13
8010d58: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
8010d5c: 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 */
)
{
8010d60: b8 40 60 00 mv r12,r2
8010d64: 29 62 00 50 lw r2,(r11+80)
8010d68: 35 61 00 54 addi r1,r11,84
8010d6c: 44 41 00 04 be r2,r1,8010d7c <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 );
8010d70: f8 00 02 43 calli 801167c <__errno>
8010d74: 34 02 00 5a mvi r2,90
8010d78: e0 00 00 08 bi 8010d98 <imfs_dir_rmnod+0x50>
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
8010d7c: 29 81 00 10 lw r1,(r12+16)
8010d80: 28 21 00 1c lw r1,(r1+28)
8010d84: 44 2b 00 03 be r1,r11,8010d90 <imfs_dir_rmnod+0x48>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
8010d88: 29 6d 00 5c lw r13,(r11+92)
8010d8c: 45 a0 00 06 be r13,r0,8010da4 <imfs_dir_rmnod+0x5c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EBUSY );
8010d90: f8 00 02 3b calli 801167c <__errno>
8010d94: 34 02 00 10 mvi r2,16
8010d98: 58 22 00 00 sw (r1+0),r2
8010d9c: 34 01 ff ff mvi r1,-1
8010da0: e0 00 00 1d bi 8010e14 <imfs_dir_rmnod+0xcc>
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
8010da4: 29 61 00 08 lw r1,(r11+8)
8010da8: 44 2d 00 04 be r1,r13,8010db8 <imfs_dir_rmnod+0x70>
8010dac: b9 60 08 00 mv r1,r11
8010db0: fb ff cf f9 calli 8004d94 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
8010db4: 59 6d 00 08 sw (r11+8),r13
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
8010db8: 2d 63 00 34 lhu r3,(r11+52)
IMFS_update_ctime( the_jnode );
8010dbc: 34 02 00 00 mvi r2,0
8010dc0: 37 81 00 14 addi r1,sp,20
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
8010dc4: 34 63 ff ff addi r3,r3,-1
8010dc8: 0d 63 00 34 sh (r11+52),r3
IMFS_update_ctime( the_jnode );
8010dcc: fb ff c7 3f calli 8002ac8 <gettimeofday>
8010dd0: 2b 81 00 14 lw r1,(sp+20)
8010dd4: 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) ) {
8010dd8: b9 60 08 00 mv r1,r11
8010ddc: fb ff f0 bf calli 800d0d8 <rtems_libio_is_file_open>
8010de0: 5c 20 00 0c bne r1,r0,8010e10 <imfs_dir_rmnod+0xc8>
8010de4: 2d 62 00 34 lhu r2,(r11+52)
8010de8: 5c 41 00 0a bne r2,r1,8010e10 <imfs_dir_rmnod+0xc8>
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
8010dec: 78 01 08 02 mvhi r1,0x802
8010df0: 38 21 30 f8 ori r1,r1,0x30f8
8010df4: 28 21 00 00 lw r1,(r1+0)
8010df8: 29 83 00 00 lw r3,(r12+0)
8010dfc: 28 24 00 04 lw r4,(r1+4)
8010e00: 5c 83 00 02 bne r4,r3,8010e08 <imfs_dir_rmnod+0xc0> <== ALWAYS TAKEN
rtems_filesystem_current.node_access = NULL;
8010e04: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
free( the_jnode );
8010e08: b9 60 08 00 mv r1,r11
8010e0c: fb ff c7 01 calli 8002a10 <free>
8010e10: 34 01 00 00 mvi r1,0
}
return 0;
}
8010e14: 2b 9d 00 04 lw ra,(sp+4)
8010e18: 2b 8b 00 10 lw r11,(sp+16)
8010e1c: 2b 8c 00 0c lw r12,(sp+12)
8010e20: 2b 8d 00 08 lw r13,(sp+8)
8010e24: 37 9c 00 18 addi sp,sp,24
8010e28: c3 a0 00 00 ret
08001e30 <init_etc_passwd_group>:
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
8001e30: 37 9c ff f4 addi sp,sp,-12
8001e34: 5b 8b 00 0c sw (sp+12),r11
8001e38: 5b 8c 00 08 sw (sp+8),r12
8001e3c: 5b 9d 00 04 sw (sp+4),ra
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
8001e40: 78 03 08 01 mvhi r3,0x801
8001e44: 38 63 f6 24 ori r3,r3,0xf624
8001e48: 40 6b 00 00 lbu r11,(r3+0)
8001e4c: 5d 60 00 2f bne r11,r0,8001f08 <init_etc_passwd_group+0xd8>
return;
etc_passwd_initted = 1;
8001e50: 34 04 00 01 mvi r4,1
mkdir("/etc", 0777);
8001e54: 78 01 08 01 mvhi r1,0x801
8001e58: 34 02 01 ff mvi r2,511
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
8001e5c: 30 64 00 00 sb (r3+0),r4
mkdir("/etc", 0777);
8001e60: 38 21 dc 80 ori r1,r1,0xdc80
8001e64: f8 00 02 57 calli 80027c0 <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
8001e68: 78 01 08 01 mvhi r1,0x801
8001e6c: 78 02 08 01 mvhi r2,0x801
8001e70: 38 21 dc 88 ori r1,r1,0xdc88
8001e74: 38 42 e2 d0 ori r2,r2,0xe2d0
8001e78: f8 00 2f b1 calli 800dd3c <fopen>
8001e7c: b8 20 60 00 mv r12,r1
8001e80: 5c 2b 00 0d bne r1,r11,8001eb4 <init_etc_passwd_group+0x84><== NEVER TAKEN
fclose(fp);
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
8001e84: 78 01 08 01 mvhi r1,0x801
8001e88: 78 02 08 01 mvhi r2,0x801
8001e8c: 38 21 dc 88 ori r1,r1,0xdc88
8001e90: 38 42 dc 94 ori r2,r2,0xdc94
8001e94: f8 00 2f aa calli 800dd3c <fopen>
8001e98: b8 20 58 00 mv r11,r1
8001e9c: 44 2c 00 07 be r1,r12,8001eb8 <init_etc_passwd_group+0x88> <== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
8001ea0: 78 01 08 01 mvhi r1,0x801
8001ea4: 38 21 dc 98 ori r1,r1,0xdc98
8001ea8: b9 60 10 00 mv r2,r11
8001eac: f8 00 2f db calli 800de18 <fputs>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
8001eb0: b9 60 08 00 mv r1,r11
8001eb4: f8 00 2d 82 calli 800d4bc <fclose>
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
8001eb8: 78 01 08 01 mvhi r1,0x801
8001ebc: 78 02 08 01 mvhi r2,0x801
8001ec0: 38 21 dd 00 ori r1,r1,0xdd00
8001ec4: 38 42 e2 d0 ori r2,r2,0xe2d0
8001ec8: f8 00 2f 9d calli 800dd3c <fopen>
8001ecc: b8 20 60 00 mv r12,r1
8001ed0: 5c 20 00 0d bne r1,r0,8001f04 <init_etc_passwd_group+0xd4> <== NEVER TAKEN
fclose(fp);
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
8001ed4: 78 01 08 01 mvhi r1,0x801
8001ed8: 78 02 08 01 mvhi r2,0x801
8001edc: 38 21 dd 00 ori r1,r1,0xdd00
8001ee0: 38 42 dc 94 ori r2,r2,0xdc94
8001ee4: f8 00 2f 96 calli 800dd3c <fopen>
8001ee8: b8 20 58 00 mv r11,r1
8001eec: 44 2c 00 07 be r1,r12,8001f08 <init_etc_passwd_group+0xd8> <== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
8001ef0: 78 01 08 01 mvhi r1,0x801
8001ef4: 38 21 dd 0c ori r1,r1,0xdd0c
8001ef8: b9 60 10 00 mv r2,r11
8001efc: f8 00 2f c7 calli 800de18 <fputs>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
8001f00: b9 60 08 00 mv r1,r11
8001f04: f8 00 2d 6e calli 800d4bc <fclose>
}
}
8001f08: 2b 9d 00 04 lw ra,(sp+4)
8001f0c: 2b 8b 00 0c lw r11,(sp+12)
8001f10: 2b 8c 00 08 lw r12,(sp+8)
8001f14: 37 9c 00 0c addi sp,sp,12
8001f18: c3 a0 00 00 ret
0800568c <ioctl>:
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
800568c: 37 9c ff d4 addi sp,sp,-44
8005690: 5b 8b 00 10 sw (sp+16),r11
8005694: 5b 8c 00 0c sw (sp+12),r12
8005698: 5b 8d 00 08 sw (sp+8),r13
800569c: 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 );
80056a0: 78 09 08 02 mvhi r9,0x802
80056a4: 39 29 30 10 ori r9,r9,0x3010
80056a8: 29 29 00 00 lw r9,(r9+0)
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
80056ac: 5b 83 00 18 sw (sp+24),r3
80056b0: 5b 84 00 1c sw (sp+28),r4
80056b4: 5b 85 00 20 sw (sp+32),r5
80056b8: 5b 86 00 24 sw (sp+36),r6
80056bc: 5b 87 00 28 sw (sp+40),r7
80056c0: 5b 88 00 2c sw (sp+44),r8
80056c4: 5b 82 00 14 sw (sp+20),r2
80056c8: 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 );
80056cc: 55 21 00 02 bgu r9,r1,80056d4 <ioctl+0x48>
80056d0: e0 00 00 11 bi 8005714 <ioctl+0x88>
iop = rtems_libio_iop( fd );
80056d4: 34 02 00 03 mvi r2,3
80056d8: fb ff ed 44 calli 8000be8 <__ashlsi3>
80056dc: 34 02 00 03 mvi r2,3
80056e0: 78 0b 08 02 mvhi r11,0x802
80056e4: b8 20 68 00 mv r13,r1
80056e8: 39 6b 37 7c ori r11,r11,0x377c
80056ec: fb ff ed 3f calli 8000be8 <__ashlsi3>
80056f0: 29 62 00 00 lw r2,(r11+0)
80056f4: b5 a1 08 00 add r1,r13,r1
80056f8: b4 41 08 00 add r1,r2,r1
rtems_libio_check_is_open(iop);
80056fc: 28 22 00 18 lw r2,(r1+24)
8005700: 20 42 01 00 andi r2,r2,0x100
8005704: 44 40 00 04 be r2,r0,8005714 <ioctl+0x88> <== NEVER TAKEN
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
8005708: 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 *);
800570c: 2b 83 00 18 lw r3,(sp+24)
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
8005710: 5c 80 00 04 bne r4,r0,8005720 <ioctl+0x94> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
8005714: f8 00 31 13 calli 8011b60 <__errno>
8005718: 34 02 00 09 mvi r2,9
800571c: e0 00 00 05 bi 8005730 <ioctl+0xa4>
if ( !iop->handlers->ioctl_h )
8005720: 28 84 00 10 lw r4,(r4+16)
8005724: 5c 80 00 06 bne r4,r0,800573c <ioctl+0xb0> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
8005728: f8 00 31 0e calli 8011b60 <__errno> <== NOT EXECUTED
800572c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8005730: 58 22 00 00 sw (r1+0),r2
8005734: 34 01 ff ff mvi r1,-1
8005738: e0 00 00 03 bi 8005744 <ioctl+0xb8>
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
800573c: b9 80 10 00 mv r2,r12
8005740: d8 80 00 00 call r4
return rc;
}
8005744: 2b 9d 00 04 lw ra,(sp+4)
8005748: 2b 8b 00 10 lw r11,(sp+16)
800574c: 2b 8c 00 0c lw r12,(sp+12)
8005750: 2b 8d 00 08 lw r13,(sp+8)
8005754: 37 9c 00 2c addi sp,sp,44
8005758: 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 32 c8 ori r1,r1,0x32c8 <== 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 32 34 ori r1,r1,0x3234 <== 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
08025070 <kill>:
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
return 0;
}
8025070: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8025074: c3 a0 00 00 ret <== NOT EXECUTED
08002c50 <link>:
int link(
const char *existing,
const char *new
)
{
8002c50: 37 9c ff c4 addi sp,sp,-60
8002c54: 5b 8b 00 10 sw (sp+16),r11
8002c58: 5b 8c 00 0c sw (sp+12),r12
8002c5c: 5b 8d 00 08 sw (sp+8),r13
8002c60: 5b 9d 00 04 sw (sp+4),ra
8002c64: b8 20 58 00 mv r11,r1
8002c68: b8 40 60 00 mv r12,r2
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
8002c6c: f8 00 31 4a calli 800f194 <strlen>
8002c70: b8 20 10 00 mv r2,r1
8002c74: 34 03 00 00 mvi r3,0
8002c78: b9 60 08 00 mv r1,r11
8002c7c: 37 84 00 28 addi r4,sp,40
8002c80: 34 05 00 01 mvi r5,1
8002c84: fb ff fe 58 calli 80025e4 <rtems_filesystem_evaluate_path>
0, &existing_loc, true );
if ( result != 0 )
8002c88: 34 0b ff ff mvi r11,-1
8002c8c: 5c 20 00 68 bne r1,r0,8002e2c <link+0x1dc>
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
8002c90: 41 83 00 00 lbu r3,(r12+0)
8002c94: 64 6b 00 5c cmpei r11,r3,92
8002c98: 64 62 00 2f cmpei r2,r3,47
8002c9c: b9 62 58 00 or r11,r11,r2
8002ca0: 5d 61 00 02 bne r11,r1,8002ca8 <link+0x58>
8002ca4: 5c 6b 00 0a bne r3,r11,8002ccc <link+0x7c> <== ALWAYS TAKEN
8002ca8: 78 03 08 02 mvhi r3,0x802
8002cac: 38 63 11 94 ori r3,r3,0x1194
8002cb0: 28 62 00 00 lw r2,(r3+0)
8002cb4: 37 81 00 14 addi r1,sp,20
8002cb8: 34 03 00 14 mvi r3,20
8002cbc: 34 42 00 18 addi r2,r2,24
8002cc0: f8 00 2d e4 calli 800e450 <memcpy>
8002cc4: 34 0b 00 01 mvi r11,1
8002cc8: e0 00 00 08 bi 8002ce8 <link+0x98>
8002ccc: 78 03 08 02 mvhi r3,0x802
8002cd0: 38 63 11 94 ori r3,r3,0x1194
8002cd4: 28 62 00 00 lw r2,(r3+0)
8002cd8: 37 81 00 14 addi r1,sp,20
8002cdc: 34 03 00 14 mvi r3,20
8002ce0: 34 42 00 04 addi r2,r2,4
8002ce4: f8 00 2d db calli 800e450 <memcpy>
if ( !parent_loc.ops->evalformake_h ) {
8002ce8: 2b 81 00 20 lw r1,(sp+32)
8002cec: 28 24 00 04 lw r4,(r1+4)
8002cf0: 5c 80 00 07 bne r4,r0,8002d0c <link+0xbc> <== ALWAYS TAKEN
rtems_filesystem_freenode( &existing_loc );
8002cf4: 2b 81 00 34 lw r1,(sp+52) <== NOT EXECUTED
8002cf8: 44 24 00 37 be r1,r4,8002dd4 <link+0x184> <== NOT EXECUTED
8002cfc: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8002d00: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED
8002d04: 5c 40 00 33 bne r2,r0,8002dd0 <link+0x180> <== NOT EXECUTED
8002d08: e0 00 00 33 bi 8002dd4 <link+0x184> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
8002d0c: 37 8d 00 14 addi r13,sp,20
8002d10: b5 8b 08 00 add r1,r12,r11
8002d14: b9 a0 10 00 mv r2,r13
8002d18: 37 83 00 3c addi r3,sp,60
8002d1c: d8 80 00 00 call r4
8002d20: b8 20 58 00 mv r11,r1
if ( result != 0 ) {
8002d24: 44 20 00 0b be r1,r0,8002d50 <link+0x100>
rtems_filesystem_freenode( &existing_loc );
8002d28: 2b 81 00 34 lw r1,(sp+52)
8002d2c: 44 20 00 05 be r1,r0,8002d40 <link+0xf0> <== NEVER TAKEN
8002d30: 28 22 00 1c lw r2,(r1+28)
8002d34: 44 40 00 03 be r2,r0,8002d40 <link+0xf0> <== NEVER TAKEN
8002d38: 37 81 00 28 addi r1,sp,40
8002d3c: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( result );
8002d40: f8 00 2b 1e calli 800d9b8 <__errno>
8002d44: 58 2b 00 00 sw (r1+0),r11
8002d48: 34 0b ff ff mvi r11,-1
8002d4c: e0 00 00 38 bi 8002e2c <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 ) {
8002d50: 2b 81 00 38 lw r1,(sp+56)
8002d54: 2b 82 00 24 lw r2,(sp+36)
8002d58: 44 41 00 10 be r2,r1,8002d98 <link+0x148>
rtems_filesystem_freenode( &existing_loc );
8002d5c: 2b 81 00 34 lw r1,(sp+52)
8002d60: 44 20 00 05 be r1,r0,8002d74 <link+0x124> <== NEVER TAKEN
8002d64: 28 22 00 1c lw r2,(r1+28)
8002d68: 44 40 00 03 be r2,r0,8002d74 <link+0x124> <== NEVER TAKEN
8002d6c: 37 81 00 28 addi r1,sp,40
8002d70: d8 40 00 00 call r2
rtems_filesystem_freenode( &parent_loc );
8002d74: 2b 81 00 20 lw r1,(sp+32)
8002d78: 44 20 00 05 be r1,r0,8002d8c <link+0x13c> <== NEVER TAKEN
8002d7c: 28 22 00 1c lw r2,(r1+28)
8002d80: 44 40 00 03 be r2,r0,8002d8c <link+0x13c> <== NEVER TAKEN
8002d84: 37 81 00 14 addi r1,sp,20
8002d88: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( EXDEV );
8002d8c: f8 00 2b 0b calli 800d9b8 <__errno>
8002d90: 34 02 00 12 mvi r2,18
8002d94: e0 00 00 12 bi 8002ddc <link+0x18c>
}
if ( !parent_loc.ops->link_h ) {
8002d98: 2b 81 00 20 lw r1,(sp+32)
8002d9c: 28 24 00 08 lw r4,(r1+8)
8002da0: 5c 80 00 11 bne r4,r0,8002de4 <link+0x194> <== ALWAYS TAKEN
rtems_filesystem_freenode( &existing_loc );
8002da4: 2b 81 00 34 lw r1,(sp+52) <== NOT EXECUTED
8002da8: 44 24 00 05 be r1,r4,8002dbc <link+0x16c> <== NOT EXECUTED
8002dac: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8002db0: 44 44 00 03 be r2,r4,8002dbc <link+0x16c> <== NOT EXECUTED
8002db4: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED
8002db8: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
8002dbc: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED
8002dc0: 44 20 00 05 be r1,r0,8002dd4 <link+0x184> <== NOT EXECUTED
8002dc4: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8002dc8: 44 40 00 03 be r2,r0,8002dd4 <link+0x184> <== NOT EXECUTED
8002dcc: 37 81 00 14 addi r1,sp,20 <== NOT EXECUTED
8002dd0: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8002dd4: f8 00 2a f9 calli 800d9b8 <__errno> <== NOT EXECUTED
8002dd8: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8002ddc: 58 22 00 00 sw (r1+0),r2
8002de0: e3 ff ff da bi 8002d48 <link+0xf8>
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
8002de4: 2b 83 00 3c lw r3,(sp+60)
8002de8: 37 8c 00 28 addi r12,sp,40
8002dec: b9 a0 10 00 mv r2,r13
8002df0: b9 80 08 00 mv r1,r12
8002df4: d8 80 00 00 call r4
8002df8: b8 20 58 00 mv r11,r1
rtems_filesystem_freenode( &existing_loc );
8002dfc: 2b 81 00 34 lw r1,(sp+52)
8002e00: 44 20 00 05 be r1,r0,8002e14 <link+0x1c4> <== NEVER TAKEN
8002e04: 28 22 00 1c lw r2,(r1+28)
8002e08: 44 40 00 03 be r2,r0,8002e14 <link+0x1c4> <== NEVER TAKEN
8002e0c: b9 80 08 00 mv r1,r12
8002e10: d8 40 00 00 call r2
rtems_filesystem_freenode( &parent_loc );
8002e14: 2b 81 00 20 lw r1,(sp+32)
8002e18: 44 20 00 05 be r1,r0,8002e2c <link+0x1dc> <== NEVER TAKEN
8002e1c: 28 22 00 1c lw r2,(r1+28)
8002e20: 44 40 00 03 be r2,r0,8002e2c <link+0x1dc> <== NEVER TAKEN
8002e24: 37 81 00 14 addi r1,sp,20
8002e28: d8 40 00 00 call r2
return result;
}
8002e2c: b9 60 08 00 mv r1,r11
8002e30: 2b 9d 00 04 lw ra,(sp+4)
8002e34: 2b 8b 00 10 lw r11,(sp+16)
8002e38: 2b 8c 00 0c lw r12,(sp+12)
8002e3c: 2b 8d 00 08 lw r13,(sp+8)
8002e40: 37 9c 00 3c addi sp,sp,60
8002e44: c3 a0 00 00 ret
08019444 <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
8019444: 37 9c ff e8 addi sp,sp,-24
8019448: 5b 8b 00 18 sw (sp+24),r11
801944c: 5b 8c 00 14 sw (sp+20),r12
8019450: 5b 8d 00 10 sw (sp+16),r13
8019454: 5b 8e 00 0c sw (sp+12),r14
8019458: 5b 8f 00 08 sw (sp+8),r15
801945c: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
8019460: 78 04 08 01 mvhi r4,0x801
8019464: 38 84 c0 10 ori r4,r4,0xc010
8019468: 28 84 00 00 lw r4,(r4+0)
off_t lseek(
int fd,
off_t offset,
int whence
)
{
801946c: b8 40 60 00 mv r12,r2
8019470: b8 60 68 00 mv r13,r3
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
8019474: 54 81 00 02 bgu r4,r1,801947c <lseek+0x38> <== ALWAYS TAKEN
8019478: e0 00 00 0e bi 80194b0 <lseek+0x6c> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
801947c: 34 02 00 03 mvi r2,3
8019480: fb ff 9b 5c calli 80001f0 <__ashlsi3>
8019484: 78 0e 08 01 mvhi r14,0x801
8019488: 39 ce c6 a0 ori r14,r14,0xc6a0
801948c: 34 02 00 03 mvi r2,3
8019490: b8 20 78 00 mv r15,r1
8019494: fb ff 9b 57 calli 80001f0 <__ashlsi3>
8019498: 29 cb 00 00 lw r11,(r14+0)
801949c: b5 e1 08 00 add r1,r15,r1
80194a0: b5 61 58 00 add r11,r11,r1
rtems_libio_check_is_open(iop);
80194a4: 29 61 00 18 lw r1,(r11+24)
80194a8: 20 21 01 00 andi r1,r1,0x100
80194ac: 5c 20 00 04 bne r1,r0,80194bc <lseek+0x78> <== ALWAYS TAKEN
80194b0: fb ff c6 b3 calli 800af7c <__errno> <== NOT EXECUTED
80194b4: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
80194b8: e0 00 00 29 bi 801955c <lseek+0x118> <== NOT EXECUTED
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
80194bc: 29 61 00 40 lw r1,(r11+64)
80194c0: 28 21 00 14 lw r1,(r1+20)
80194c4: 5c 20 00 04 bne r1,r0,80194d4 <lseek+0x90> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
80194c8: fb ff c6 ad calli 800af7c <__errno> <== NOT EXECUTED
80194cc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
80194d0: e0 00 00 23 bi 801955c <lseek+0x118> <== NOT EXECUTED
/*
* Now process the lseek().
*/
old_offset = iop->offset;
switch ( whence ) {
80194d4: 34 01 00 01 mvi r1,1
/*
* Now process the lseek().
*/
old_offset = iop->offset;
80194d8: 29 6f 00 10 lw r15,(r11+16)
80194dc: 29 6e 00 14 lw r14,(r11+20)
switch ( whence ) {
80194e0: 45 a1 00 0a be r13,r1,8019508 <lseek+0xc4>
80194e4: 34 01 00 02 mvi r1,2
80194e8: 45 a1 00 0f be r13,r1,8019524 <lseek+0xe0>
80194ec: 5d a0 00 1a bne r13,r0,8019554 <lseek+0x110>
case SEEK_SET:
iop->offset = offset;
80194f0: b9 80 08 00 mv r1,r12
80194f4: 34 02 00 1f mvi r2,31
80194f8: fb ff 9b 8e calli 8000330 <__ashrsi3>
80194fc: 59 61 00 10 sw (r11+16),r1
8019500: 59 6c 00 14 sw (r11+20),r12
break;
8019504: e0 00 00 19 bi 8019568 <lseek+0x124>
case SEEK_CUR:
iop->offset += offset;
8019508: 34 02 00 1f mvi r2,31
801950c: b9 80 08 00 mv r1,r12
8019510: fb ff 9b 88 calli 8000330 <__ashrsi3>
8019514: b5 8e 10 00 add r2,r12,r14
8019518: f5 82 18 00 cmpgu r3,r12,r2
801951c: b4 2f 08 00 add r1,r1,r15
8019520: e0 00 00 09 bi 8019544 <lseek+0x100>
break;
case SEEK_END:
iop->offset = iop->size + offset;
8019524: 34 02 00 1f mvi r2,31
8019528: b9 80 08 00 mv r1,r12
801952c: fb ff 9b 81 calli 8000330 <__ashrsi3>
8019530: 29 62 00 0c lw r2,(r11+12)
8019534: 29 64 00 08 lw r4,(r11+8)
8019538: b5 82 10 00 add r2,r12,r2
801953c: f5 82 18 00 cmpgu r3,r12,r2
8019540: b4 24 08 00 add r1,r1,r4
8019544: b4 61 08 00 add r1,r3,r1
8019548: 59 61 00 10 sw (r11+16),r1
801954c: 59 62 00 14 sw (r11+20),r2
break;
8019550: e0 00 00 06 bi 8019568 <lseek+0x124>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
8019554: fb ff c6 8a calli 800af7c <__errno>
8019558: 34 02 00 16 mvi r2,22
801955c: 58 22 00 00 sw (r1+0),r2
8019560: 34 0c ff ff mvi r12,-1
8019564: e0 00 00 13 bi 80195b0 <lseek+0x16c>
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
8019568: 29 6f 00 40 lw r15,(r11+64)
801956c: 34 02 00 1f mvi r2,31
8019570: b9 80 08 00 mv r1,r12
8019574: fb ff 9b 6f calli 8000330 <__ashrsi3>
8019578: 29 e5 00 14 lw r5,(r15+20)
801957c: b8 20 10 00 mv r2,r1
8019580: b9 80 18 00 mv r3,r12
8019584: b9 a0 20 00 mv r4,r13
8019588: b9 60 08 00 mv r1,r11
801958c: d8 a0 00 00 call r5
if ( status == (off_t) -1 )
8019590: 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 );
8019594: b8 40 60 00 mv r12,r2
if ( status == (off_t) -1 )
8019598: 5c 41 00 06 bne r2,r1,80195b0 <lseek+0x16c>
iop->offset = old_offset;
801959c: b9 c0 08 00 mv r1,r14
80195a0: 34 02 00 1f mvi r2,31
80195a4: fb ff 9b 63 calli 8000330 <__ashrsi3>
80195a8: 59 61 00 10 sw (r11+16),r1
80195ac: 59 6e 00 14 sw (r11+20),r14
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
80195b0: b9 80 08 00 mv r1,r12
80195b4: 2b 9d 00 04 lw ra,(sp+4)
80195b8: 2b 8b 00 18 lw r11,(sp+24)
80195bc: 2b 8c 00 14 lw r12,(sp+20)
80195c0: 2b 8d 00 10 lw r13,(sp+16)
80195c4: 2b 8e 00 0c lw r14,(sp+12)
80195c8: 2b 8f 00 08 lw r15,(sp+8)
80195cc: 37 9c 00 18 addi sp,sp,24
80195d0: c3 a0 00 00 ret
080076f8 <malloc>:
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
80076f8: 37 9c ff f0 addi sp,sp,-16
80076fc: 5b 8b 00 10 sw (sp+16),r11
8007700: 5b 8c 00 0c sw (sp+12),r12
8007704: 5b 8d 00 08 sw (sp+8),r13
8007708: 5b 9d 00 04 sw (sp+4),ra
800770c: 78 03 08 01 mvhi r3,0x801
8007710: 38 63 c6 b0 ori r3,r3,0xc6b0
8007714: 28 62 00 04 lw r2,(r3+4)
8007718: b8 20 68 00 mv r13,r1
800771c: 34 41 00 01 addi r1,r2,1
8007720: 58 61 00 04 sw (r3+4),r1
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
8007724: fb ff ff e7 calli 80076c0 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
8007728: 45 a0 00 30 be r13,r0,80077e8 <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()) &&
800772c: 78 01 08 01 mvhi r1,0x801
8007730: 38 21 c9 c8 ori r1,r1,0xc9c8
8007734: 28 22 00 00 lw r2,(r1+0)
8007738: 34 01 00 03 mvi r1,3
800773c: 5c 41 00 03 bne r2,r1,8007748 <malloc+0x50>
8007740: fb ff ff c5 calli 8007654 <malloc_is_system_state_OK>
8007744: 44 20 00 29 be r1,r0,80077e8 <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 );
8007748: 78 01 08 01 mvhi r1,0x801
800774c: 38 21 c0 1c ori r1,r1,0xc01c
8007750: 28 21 00 00 lw r1,(r1+0)
8007754: 34 03 00 00 mvi r3,0
8007758: b9 a0 10 00 mv r2,r13
800775c: b8 60 20 00 mv r4,r3
8007760: f8 00 04 c9 calli 8008a84 <_Protected_heap_Allocate_aligned_with_boundary>
8007764: 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;
8007768: 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 ) {
800776c: 5c 20 00 0e bne r1,r0,80077a4 <malloc+0xac>
if (rtems_malloc_sbrk_helpers)
8007770: 78 01 08 01 mvhi r1,0x801
8007774: 38 21 c6 14 ori r1,r1,0xc614
8007778: 28 21 00 00 lw r1,(r1+0)
800777c: 44 2b 00 06 be r1,r11,8007794 <malloc+0x9c> <== ALWAYS TAKEN
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
8007780: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED
8007784: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8007788: d8 40 00 00 call r2 <== NOT EXECUTED
800778c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
if ( !return_this ) {
8007790: 5c 20 00 05 bne r1,r0,80077a4 <malloc+0xac> <== NOT EXECUTED
errno = ENOMEM;
8007794: f8 00 0d fa calli 800af7c <__errno>
8007798: 34 02 00 0c mvi r2,12
800779c: 58 22 00 00 sw (r1+0),r2
return (void *) 0;
80077a0: e0 00 00 13 bi 80077ec <malloc+0xf4>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
80077a4: 78 01 08 01 mvhi r1,0x801
80077a8: 38 21 c6 18 ori r1,r1,0xc618
80077ac: 28 21 00 00 lw r1,(r1+0)
80077b0: 44 20 00 05 be r1,r0,80077c4 <malloc+0xcc> <== ALWAYS TAKEN
(*rtems_malloc_dirty_helper)( return_this, size );
80077b4: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED
80077b8: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED
80077bc: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
80077c0: d8 60 00 00 call r3 <== NOT EXECUTED
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
80077c4: 78 01 08 01 mvhi r1,0x801
80077c8: 38 21 c6 10 ori r1,r1,0xc610
80077cc: 28 21 00 00 lw r1,(r1+0)
80077d0: b9 80 58 00 mv r11,r12
80077d4: 44 20 00 06 be r1,r0,80077ec <malloc+0xf4> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
80077d8: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED
80077dc: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
80077e0: d8 40 00 00 call r2 <== NOT EXECUTED
80077e4: e0 00 00 02 bi 80077ec <malloc+0xf4> <== NOT EXECUTED
80077e8: 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;
}
80077ec: b9 60 08 00 mv r1,r11
80077f0: 2b 9d 00 04 lw ra,(sp+4)
80077f4: 2b 8b 00 10 lw r11,(sp+16)
80077f8: 2b 8c 00 0c lw r12,(sp+12)
80077fc: 2b 8d 00 08 lw r13,(sp+8)
8007800: 37 9c 00 10 addi sp,sp,16
8007804: c3 a0 00 00 ret
0800769c <malloc_deferred_free>:
}
void malloc_deferred_free(
void *pointer
)
{
800769c: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
80076a0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
80076a4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
80076a8: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
80076ac: 38 21 ca 20 ori r1,r1,0xca20 <== NOT EXECUTED
80076b0: fb ff ec ed calli 8002a64 <_Chain_Append> <== NOT EXECUTED
rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer);
}
80076b4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80076b8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
80076bc: c3 a0 00 00 ret <== NOT EXECUTED
080076c0 <malloc_deferred_frees_process>:
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
80076c0: 37 9c ff f8 addi sp,sp,-8
80076c4: 5b 8b 00 08 sw (sp+8),r11
80076c8: 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 );
80076cc: 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)
80076d0: e0 00 00 02 bi 80076d8 <malloc_deferred_frees_process+0x18>
free(to_be_freed);
80076d4: fb ff fe 6b calli 8007080 <free> <== NOT EXECUTED
80076d8: b9 60 08 00 mv r1,r11
80076dc: 38 21 ca 20 ori r1,r1,0xca20
80076e0: f8 00 02 86 calli 80080f8 <_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)
80076e4: 5c 20 ff fc bne r1,r0,80076d4 <malloc_deferred_frees_process+0x14><== NEVER TAKEN
free(to_be_freed);
}
80076e8: 2b 9d 00 04 lw ra,(sp+4)
80076ec: 2b 8b 00 08 lw r11,(sp+8)
80076f0: 37 9c 00 08 addi sp,sp,8
80076f4: c3 a0 00 00 ret
08007654 <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 )
8007654: 78 01 08 01 mvhi r1,0x801
8007658: 38 21 c8 2c ori r1,r1,0xc82c
800765c: 28 22 00 00 lw r2,(r1+0)
8007660: 34 01 00 00 mvi r1,0
8007664: 5c 41 00 05 bne r2,r1,8007678 <malloc_is_system_state_OK+0x24><== NEVER TAKEN
return false;
if ( _ISR_Nest_level > 0 )
8007668: 78 01 08 01 mvhi r1,0x801
800766c: 38 21 c8 c4 ori r1,r1,0xc8c4
8007670: 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)
8007674: 64 21 00 00 cmpei r1,r1,0
if ( _ISR_Nest_level > 0 )
return false;
return true;
}
8007678: c3 a0 00 00 ret
0800f790 <memfile_alloc_block>:
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
800f790: 37 9c ff fc addi sp,sp,-4
800f794: 5b 9d 00 04 sw (sp+4),ra
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
800f798: 78 01 08 02 mvhi r1,0x802
800f79c: 38 21 36 4c ori r1,r1,0x364c
800f7a0: 28 22 00 00 lw r2,(r1+0)
800f7a4: 34 01 00 01 mvi r1,1
800f7a8: fb ff cb e1 calli 800272c <calloc>
if ( memory )
800f7ac: 44 20 00 06 be r1,r0,800f7c4 <memfile_alloc_block+0x34> <== NEVER TAKEN
memfile_blocks_allocated++;
800f7b0: 78 02 08 02 mvhi r2,0x802
800f7b4: 38 42 36 f4 ori r2,r2,0x36f4
800f7b8: 28 43 00 00 lw r3,(r2+0)
800f7bc: 34 63 00 01 addi r3,r3,1
800f7c0: 58 43 00 00 sw (r2+0),r3
return memory;
}
800f7c4: 2b 9d 00 04 lw ra,(sp+4)
800f7c8: 37 9c 00 04 addi sp,sp,4
800f7cc: c3 a0 00 00 ret
0800fd50 <memfile_check_rmnod>:
return memfile_check_rmnod( the_jnode );
}
int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){
800fd50: 37 9c ff f8 addi sp,sp,-8
800fd54: 5b 8b 00 08 sw (sp+8),r11
800fd58: 5b 9d 00 04 sw (sp+4),ra
800fd5c: 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) ) {
800fd60: fb ff f4 de calli 800d0d8 <rtems_libio_is_file_open>
800fd64: 5c 20 00 10 bne r1,r0,800fda4 <memfile_check_rmnod+0x54>
800fd68: 2d 62 00 34 lhu r2,(r11+52)
800fd6c: 5c 41 00 0e bne r2,r1,800fda4 <memfile_check_rmnod+0x54> <== NEVER TAKEN
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == the_jnode )
800fd70: 78 01 08 02 mvhi r1,0x802
800fd74: 38 21 30 f8 ori r1,r1,0x30f8
800fd78: 28 21 00 00 lw r1,(r1+0)
800fd7c: 28 23 00 04 lw r3,(r1+4)
800fd80: 5c 6b 00 02 bne r3,r11,800fd88 <memfile_check_rmnod+0x38> <== ALWAYS TAKEN
rtems_filesystem_current.node_access = NULL;
800fd84: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
if (the_jnode->type != IMFS_LINEAR_FILE)
800fd88: 29 62 00 4c lw r2,(r11+76)
800fd8c: 34 01 00 06 mvi r1,6
800fd90: 44 41 00 03 be r2,r1,800fd9c <memfile_check_rmnod+0x4c> <== NEVER TAKEN
IMFS_memfile_remove( the_jnode );
800fd94: b9 60 08 00 mv r1,r11
800fd98: fb ff ff 7f calli 800fb94 <IMFS_memfile_remove>
free( the_jnode );
800fd9c: b9 60 08 00 mv r1,r11
800fda0: fb ff cb 1c calli 8002a10 <free>
}
return 0;
}
800fda4: 34 01 00 00 mvi r1,0
800fda8: 2b 9d 00 04 lw ra,(sp+4)
800fdac: 2b 8b 00 08 lw r11,(sp+8)
800fdb0: 37 9c 00 08 addi sp,sp,8
800fdb4: c3 a0 00 00 ret
0800fa98 <memfile_free_blocks_in_table>:
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
800fa98: 37 9c ff e8 addi sp,sp,-24
800fa9c: 5b 8b 00 18 sw (sp+24),r11
800faa0: 5b 8c 00 14 sw (sp+20),r12
800faa4: 5b 8d 00 10 sw (sp+16),r13
800faa8: 5b 8e 00 0c sw (sp+12),r14
800faac: 5b 8f 00 08 sw (sp+8),r15
800fab0: 5b 9d 00 04 sw (sp+4),ra
800fab4: b8 20 58 00 mv r11,r1
800fab8: b8 40 78 00 mv r15,r2
/*
* Perform internal consistency checks
*/
assert( block_table );
800fabc: 5c 20 00 09 bne r1,r0,800fae0 <memfile_free_blocks_in_table+0x48><== ALWAYS TAKEN
800fac0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800fac4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
800fac8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
800facc: 38 21 1d 10 ori r1,r1,0x1d10 <== NOT EXECUTED
800fad0: 38 63 1e 84 ori r3,r3,0x1e84 <== NOT EXECUTED
800fad4: 38 84 1d 88 ori r4,r4,0x1d88 <== NOT EXECUTED
800fad8: 34 02 01 b3 mvi r2,435 <== NOT EXECUTED
800fadc: fb ff f4 d0 calli 800ce1c <__assert_func> <== NOT EXECUTED
800fae0: 34 0c 00 00 mvi r12,0
800fae4: 28 2d 00 00 lw r13,(r1+0)
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
if ( b[i] ) {
800fae8: 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++ ) {
800faec: e0 00 00 07 bi 800fb08 <memfile_free_blocks_in_table+0x70>
if ( b[i] ) {
800faf0: 29 a1 00 00 lw r1,(r13+0)
800faf4: 44 20 00 03 be r1,r0,800fb00 <memfile_free_blocks_in_table+0x68>
memfile_free_block( b[i] );
800faf8: fb ff ff 1b calli 800f764 <memfile_free_block>
b[i] = 0;
800fafc: 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++ ) {
800fb00: 35 8c 00 01 addi r12,r12,1
800fb04: 35 ad 00 04 addi r13,r13,4
800fb08: 49 ec ff fa bg r15,r12,800faf0 <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 );
800fb0c: 29 61 00 00 lw r1,(r11+0)
800fb10: fb ff ff 15 calli 800f764 <memfile_free_block>
*block_table = 0;
800fb14: 34 01 00 00 mvi r1,0
800fb18: 59 61 00 00 sw (r11+0),r1
}
800fb1c: 2b 9d 00 04 lw ra,(sp+4)
800fb20: 2b 8b 00 18 lw r11,(sp+24)
800fb24: 2b 8c 00 14 lw r12,(sp+20)
800fb28: 2b 8d 00 10 lw r13,(sp+16)
800fb2c: 2b 8e 00 0c lw r14,(sp+12)
800fb30: 2b 8f 00 08 lw r15,(sp+8)
800fb34: 37 9c 00 18 addi sp,sp,24
800fb38: c3 a0 00 00 ret
080100a4 <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
80100a4: 37 9c ff f0 addi sp,sp,-16
80100a8: 5b 8b 00 08 sw (sp+8),r11
80100ac: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
80100b0: 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 )
80100b4: 29 64 00 50 lw r4,(r11+80)
80100b8: 48 44 00 05 bg r2,r4,80100cc <memfile_ftruncate+0x28> <== NEVER TAKEN
80100bc: 5c 82 00 08 bne r4,r2,80100dc <memfile_ftruncate+0x38> <== NEVER TAKEN
80100c0: 29 64 00 54 lw r4,(r11+84)
80100c4: 54 64 00 02 bgu r3,r4,80100cc <memfile_ftruncate+0x28> <== NEVER TAKEN
80100c8: e0 00 00 05 bi 80100dc <memfile_ftruncate+0x38>
return IMFS_memfile_extend( the_jnode, length );
80100cc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80100d0: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
80100d4: fb ff ff 8a calli 800fefc <IMFS_memfile_extend> <== NOT EXECUTED
80100d8: e0 00 00 0b bi 8010104 <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;
80100dc: 59 62 00 50 sw (r11+80),r2
80100e0: 59 63 00 54 sw (r11+84),r3
iop->size = the_jnode->info.file.size;
80100e4: 58 22 00 08 sw (r1+8),r2
80100e8: 58 23 00 0c sw (r1+12),r3
IMFS_update_atime( the_jnode );
80100ec: 34 02 00 00 mvi r2,0
80100f0: 37 81 00 0c addi r1,sp,12
80100f4: fb ff ca 75 calli 8002ac8 <gettimeofday>
80100f8: 2b 81 00 0c lw r1,(sp+12)
80100fc: 59 61 00 40 sw (r11+64),r1
8010100: 34 01 00 00 mvi r1,0
return 0;
}
8010104: 2b 9d 00 04 lw ra,(sp+4)
8010108: 2b 8b 00 08 lw r11,(sp+8)
801010c: 37 9c 00 10 addi sp,sp,16
8010110: c3 a0 00 00 ret
08010114 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
8010114: 37 9c ff f4 addi sp,sp,-12
8010118: 5b 8b 00 0c sw (sp+12),r11
801011c: 5b 8c 00 08 sw (sp+8),r12
8010120: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
8010124: 28 2c 00 3c lw r12,(r1+60)
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
8010128: b8 20 58 00 mv r11,r1
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
801012c: 34 01 00 06 mvi r1,6
8010130: 29 82 00 4c lw r2,(r12+76)
8010134: 5c 41 00 0c bne r2,r1,8010164 <memfile_lseek+0x50> <== ALWAYS TAKEN
if (iop->offset > the_jnode->info.linearfile.size)
8010138: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED
801013c: 29 63 00 10 lw r3,(r11+16) <== NOT EXECUTED
8010140: 29 82 00 54 lw r2,(r12+84) <== NOT EXECUTED
8010144: 48 61 00 05 bg r3,r1,8010158 <memfile_lseek+0x44> <== NOT EXECUTED
8010148: 5c 61 00 15 bne r3,r1,801019c <memfile_lseek+0x88> <== NOT EXECUTED
801014c: 29 63 00 14 lw r3,(r11+20) <== NOT EXECUTED
8010150: 54 62 00 02 bgu r3,r2,8010158 <memfile_lseek+0x44> <== NOT EXECUTED
8010154: e0 00 00 12 bi 801019c <memfile_lseek+0x88> <== NOT EXECUTED
iop->offset = the_jnode->info.linearfile.size;
8010158: 59 61 00 10 sw (r11+16),r1 <== NOT EXECUTED
801015c: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED
8010160: e0 00 00 0f bi 801019c <memfile_lseek+0x88> <== NOT EXECUTED
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
8010164: 29 62 00 14 lw r2,(r11+20)
8010168: b9 80 08 00 mv r1,r12
801016c: fb ff ff 64 calli 800fefc <IMFS_memfile_extend>
8010170: 44 20 00 07 be r1,r0,801018c <memfile_lseek+0x78> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
8010174: f8 00 05 42 calli 801167c <__errno> <== NOT EXECUTED
8010178: 34 02 00 1c mvi r2,28 <== NOT EXECUTED
801017c: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED
8010180: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8010184: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
8010188: e0 00 00 07 bi 80101a4 <memfile_lseek+0x90> <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
801018c: 29 81 00 50 lw r1,(r12+80)
8010190: 59 61 00 08 sw (r11+8),r1
8010194: 29 8c 00 54 lw r12,(r12+84)
8010198: 59 6c 00 0c sw (r11+12),r12
}
return iop->offset;
801019c: 29 62 00 14 lw r2,(r11+20)
80101a0: 29 63 00 10 lw r3,(r11+16)
}
80101a4: b8 60 08 00 mv r1,r3
80101a8: 2b 9d 00 04 lw ra,(sp+4)
80101ac: 2b 8b 00 0c lw r11,(sp+12)
80101b0: 2b 8c 00 08 lw r12,(sp+8)
80101b4: 37 9c 00 0c addi sp,sp,12
80101b8: c3 a0 00 00 ret
080104d4 <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
80104d4: 37 9c ff f4 addi sp,sp,-12
80104d8: 5b 8b 00 0c sw (sp+12),r11
80104dc: 5b 8c 00 08 sw (sp+8),r12
80104e0: 5b 9d 00 04 sw (sp+4),ra
80104e4: 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))
80104e8: 28 21 00 18 lw r1,(r1+24)
80104ec: 34 02 00 00 mvi r2,0
uint32_t mode
)
{
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
80104f0: 29 8b 00 3c lw r11,(r12+60)
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
80104f4: 20 21 02 04 andi r1,r1,0x204
80104f8: 44 22 00 13 be r1,r2,8010544 <memfile_open+0x70>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
80104fc: 29 63 00 4c lw r3,(r11+76)
8010500: 34 01 00 06 mvi r1,6
8010504: 5c 61 00 10 bne r3,r1,8010544 <memfile_open+0x70> <== ALWAYS TAKEN
uint32_t count = the_jnode->info.linearfile.size;
8010508: 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;
801050c: 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;
8010510: 29 63 00 58 lw r3,(r11+88) <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
8010514: 59 61 00 4c sw (r11+76),r1 <== NOT EXECUTED
the_jnode->info.file.size = 0;
8010518: 59 62 00 50 sw (r11+80),r2 <== NOT EXECUTED
801051c: 59 62 00 54 sw (r11+84),r2 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
8010520: 59 62 00 5c sw (r11+92),r2 <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
8010524: 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;
8010528: 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)
801052c: 44 82 00 06 be r4,r2,8010544 <memfile_open+0x70> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
8010530: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8010534: fb ff ff 22 calli 80101bc <IMFS_memfile_write> <== NOT EXECUTED
8010538: 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)
801053c: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED
8010540: 44 43 00 0d be r2,r3,8010574 <memfile_open+0xa0> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
8010544: 29 81 00 18 lw r1,(r12+24)
8010548: 20 21 02 00 andi r1,r1,0x200
801054c: 44 20 00 05 be r1,r0,8010560 <memfile_open+0x8c>
iop->offset = the_jnode->info.file.size;
8010550: 29 61 00 50 lw r1,(r11+80)
8010554: 59 81 00 10 sw (r12+16),r1
8010558: 29 61 00 54 lw r1,(r11+84)
801055c: 59 81 00 14 sw (r12+20),r1
iop->size = the_jnode->info.file.size;
8010560: 29 61 00 50 lw r1,(r11+80)
8010564: 59 81 00 08 sw (r12+8),r1
8010568: 29 6b 00 54 lw r11,(r11+84)
801056c: 34 01 00 00 mvi r1,0
8010570: 59 8b 00 0c sw (r12+12),r11
return 0;
}
8010574: 2b 9d 00 04 lw ra,(sp+4)
8010578: 2b 8b 00 0c lw r11,(sp+12)
801057c: 2b 8c 00 08 lw r12,(sp+8)
8010580: 37 9c 00 0c addi sp,sp,12
8010584: c3 a0 00 00 ret
0800fdb8 <memfile_rmnod>:
int memfile_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
800fdb8: 37 9c ff f0 addi sp,sp,-16
800fdbc: 5b 8b 00 08 sw (sp+8),r11
800fdc0: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
800fdc4: 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 ) {
800fdc8: 29 61 00 08 lw r1,(r11+8)
800fdcc: 44 20 00 05 be r1,r0,800fde0 <memfile_rmnod+0x28> <== NEVER TAKEN
800fdd0: b9 60 08 00 mv r1,r11
800fdd4: fb ff d3 f0 calli 8004d94 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
800fdd8: 34 01 00 00 mvi r1,0
800fddc: 59 61 00 08 sw (r11+8),r1
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
800fde0: 2d 63 00 34 lhu r3,(r11+52)
IMFS_update_ctime( the_jnode );
800fde4: 34 02 00 00 mvi r2,0
800fde8: 37 81 00 0c addi r1,sp,12
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
800fdec: 34 63 ff ff addi r3,r3,-1
800fdf0: 0d 63 00 34 sh (r11+52),r3
IMFS_update_ctime( the_jnode );
800fdf4: fb ff cb 35 calli 8002ac8 <gettimeofday>
800fdf8: 2b 81 00 0c lw r1,(sp+12)
800fdfc: 59 61 00 48 sw (r11+72),r1
return memfile_check_rmnod( the_jnode );
800fe00: b9 60 08 00 mv r1,r11
800fe04: fb ff ff d3 calli 800fd50 <memfile_check_rmnod>
}
800fe08: 2b 9d 00 04 lw ra,(sp+4)
800fe0c: 2b 8b 00 08 lw r11,(sp+8)
800fe10: 37 9c 00 10 addi sp,sp,16
800fe14: 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 27 8f calli 800af7c <__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 c1 10 ori r5,r5,0xc110
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 2a 26 calli 800ba14 <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 c1 10 ori r5,r5,0xc110
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 2a 1d calli 800ba14 <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 27 73 calli 800af7c <__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 27 2e calli 800af7c <__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 27 29 calli 800af7c <__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 2b f1 calli 800c2bc <strlen> <== NOT EXECUTED
80012fc: 34 21 00 6d addi r1,r1,109 <== NOT EXECUTED
temp_mt_entry = malloc( size );
8001300: f8 00 18 fe calli 80076f8 <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 27 1b calli 800af7c <__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 2b be calli 800c234 <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 2b db calli 800c2bc <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 26 fe calli 800af7c <__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 26 f7 calli 800af7c <__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 c6 e0 ori r3,r3,0xc6e0
*/
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 26 e8 calli 800af7c <__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 26 e5 calli 800af7c <__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 c6 e0 ori r1,r1,0xc6e0
8001468: f8 00 05 7f calli 8002a64 <_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 16 fe calli 8007080 <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
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 c1 70 ori r2,r2,0xc170
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 20 lw r11,(r2+288)
}
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 aa 18 ori r2,r2,0xaa18
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 28 fc calli 800b94c <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
8001560: b9 60 08 00 mv r1,r11
8001564: f8 00 10 f3 calli 8005930 <_Workspace_Free>
#endif
}
deleted_task->libc_reent = NULL;
8001568: 34 02 00 00 mvi r2,0
800156c: 59 82 01 20 sw (r12+288),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 c1 70 ori r1,r1,0xc170
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 27 98 calli 800b40c <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 ad calli 8007080 <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 26 c6 calli 800b104 <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 16 a4 ori r4,r4,0x16a4
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 e3 6c ori r1,r1,0xe36c
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 f1 calli 80038ec <rtems_fatal_error_occurred> <== NOT EXECUTED
NULL_major = major;
800192c: 78 03 08 02 mvhi r3,0x802
8001930: 38 63 17 4c ori r3,r3,0x174c
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 15 calli 800751c <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 2a 78 calli 800c2bc <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 25 9e calli 800af7c <__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 25 90 calli 800af7c <__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 2a 5b calli 800c2bc <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 15 calli 8007600 <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 28 14 calli 800ba14 <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 25 62 calli 800af7c <__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 c6 a0 ori r1,r1,0xc6a0
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 5d 41 calli 8018f2c <__mulsi3>
8001a2c: b9 80 10 00 mv r2,r12
8001a30: f8 00 15 c2 calli 8007138 <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 25 50 calli 800af7c <__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 25 4d calli 800af7c <__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 c6 a0 ori r1,r1,0xc6a0 <== 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 5d 2f calli 8018f2c <__mulsi3> <== NOT EXECUTED
8001a74: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED
8001a78: f8 00 15 49 calli 8006f9c <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 86 calli 80074a4 <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 25 34 calli 800af7c <__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 c6 a0 ori r1,r1,0xc6a0
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 5d 14 calli 8018f2c <__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 a3 70 ori r1,r1,0xa370
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 a3 70 ori r1,r1,0xa370
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 a3 70 ori r1,r1,0xa370
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 97 calli 80026a0 <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 14 44 ori r1,r1,0x1444 <== 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 14 48 ori r1,r1,0x1448 <== 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 32 c8 ori r2,r2,0x32c8 <== 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 32 c8 ori r1,r1,0x32c8 <== 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
0800aa24 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
800aa24: 37 9c ff cc addi sp,sp,-52
800aa28: 5b 8b 00 10 sw (sp+16),r11
800aa2c: 5b 8c 00 0c sw (sp+12),r12
800aa30: 5b 8d 00 08 sw (sp+8),r13
800aa34: 5b 9d 00 04 sw (sp+4),ra
800aa38: 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)
800aa3c: 37 8b 00 14 addi r11,sp,20
800aa40: 78 01 08 01 mvhi r1,0x801
800aa44: 38 21 a8 fc ori r1,r1,0xa8fc
800aa48: 34 02 00 03 mvi r2,3
800aa4c: 34 03 00 07 mvi r3,7
800aa50: b9 60 20 00 mv r4,r11
800aa54: 34 05 00 01 mvi r5,1
800aa58: fb ff d8 f4 calli 8000e28 <rtems_filesystem_evaluate_path>
800aa5c: 44 20 00 0b be r1,r0,800aa88 <pipe_create+0x64> <== NEVER TAKEN
!= 0) {
if (errno != ENOENT)
800aa60: f8 00 01 47 calli 800af7c <__errno>
800aa64: 28 22 00 00 lw r2,(r1+0)
800aa68: 34 01 00 02 mvi r1,2
800aa6c: 5c 41 00 50 bne r2,r1,800abac <pipe_create+0x188> <== NEVER TAKEN
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
800aa70: 78 01 08 01 mvhi r1,0x801
800aa74: 38 21 a8 fc ori r1,r1,0xa8fc
800aa78: 34 02 03 ff mvi r2,1023
800aa7c: fb ff d9 9a calli 80010e4 <mkdir>
800aa80: 44 20 00 08 be r1,r0,800aaa0 <pipe_create+0x7c> <== ALWAYS TAKEN
800aa84: e0 00 00 4a bi 800abac <pipe_create+0x188> <== NOT EXECUTED
return -1;
}
else
rtems_filesystem_freenode(&loc);
800aa88: 2b 82 00 20 lw r2,(sp+32) <== NOT EXECUTED
800aa8c: 44 41 00 05 be r2,r1,800aaa0 <pipe_create+0x7c> <== NOT EXECUTED
800aa90: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED
800aa94: 44 40 00 03 be r2,r0,800aaa0 <pipe_create+0x7c> <== NOT EXECUTED
800aa98: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800aa9c: d8 40 00 00 call r2 <== NOT EXECUTED
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
800aaa0: 37 8b 00 28 addi r11,sp,40
800aaa4: 78 02 08 01 mvhi r2,0x801
800aaa8: 38 42 a9 04 ori r2,r2,0xa904
800aaac: 34 03 00 0a mvi r3,10
800aab0: b9 60 08 00 mv r1,r11
800aab4: f8 00 03 d8 calli 800ba14 <memcpy>
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
800aab8: 78 04 08 01 mvhi r4,0x801
800aabc: 38 84 c6 32 ori r4,r4,0xc632
800aac0: 2c 81 00 00 lhu r1,(r4+0)
800aac4: 78 02 08 01 mvhi r2,0x801
800aac8: 38 42 a9 10 ori r2,r2,0xa910
800aacc: 34 25 00 01 addi r5,r1,1
800aad0: b8 20 18 00 mv r3,r1
800aad4: 0c 85 00 00 sh (r4+0),r5
800aad8: 37 81 00 32 addi r1,sp,50
800aadc: f8 00 04 ce calli 800be14 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
800aae0: b9 60 08 00 mv r1,r11
800aae4: 34 02 01 80 mvi r2,384
800aae8: f8 00 00 52 calli 800ac30 <mkfifo>
800aaec: b8 20 60 00 mv r12,r1
800aaf0: 44 20 00 03 be r1,r0,800aafc <pipe_create+0xd8> <== ALWAYS TAKEN
if (errno != EEXIST){
800aaf4: f8 00 01 22 calli 800af7c <__errno> <== NOT EXECUTED
800aaf8: e0 00 00 2d bi 800abac <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);
800aafc: b9 60 08 00 mv r1,r11
800ab00: 34 02 40 00 mvi r2,16384
800ab04: fb ff db 55 calli 8001858 <open>
800ab08: 59 a1 00 00 sw (r13+0),r1
if (filsdes[0] < 0) {
800ab0c: 4c 2c 00 05 bge r1,r12,800ab20 <pipe_create+0xfc> <== NEVER TAKEN
err = errno;
800ab10: f8 00 01 1b calli 800af7c <__errno>
800ab14: 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);
800ab18: b9 60 08 00 mv r1,r11
800ab1c: e0 00 00 21 bi 800aba0 <pipe_create+0x17c>
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
800ab20: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
800ab24: 38 42 c0 10 ori r2,r2,0xc010 <== NOT EXECUTED
800ab28: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED
800ab2c: 54 41 00 03 bgu r2,r1,800ab38 <pipe_create+0x114> <== NOT EXECUTED
800ab30: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
800ab34: e0 00 00 0b bi 800ab60 <pipe_create+0x13c> <== NOT EXECUTED
800ab38: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
800ab3c: fb ff d5 ad calli 80001f0 <__ashlsi3> <== NOT EXECUTED
800ab40: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
800ab44: 78 0b 08 01 mvhi r11,0x801 <== NOT EXECUTED
800ab48: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
800ab4c: 39 6b c6 a0 ori r11,r11,0xc6a0 <== NOT EXECUTED
800ab50: fb ff d5 a8 calli 80001f0 <__ashlsi3> <== NOT EXECUTED
800ab54: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED
800ab58: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED
800ab5c: b4 41 10 00 add r2,r2,r1 <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
800ab60: 28 44 00 18 lw r4,(r2+24) <== NOT EXECUTED
800ab64: 34 03 ff fe mvi r3,-2 <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
800ab68: 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;
800ab6c: a0 83 18 00 and r3,r4,r3 <== NOT EXECUTED
800ab70: 58 43 00 18 sw (r2+24),r3 <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
800ab74: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
800ab78: fb ff db 38 calli 8001858 <open> <== NOT EXECUTED
800ab7c: 59 a1 00 04 sw (r13+4),r1 <== NOT EXECUTED
if (filsdes[1] < 0) {
800ab80: 48 01 00 03 bg r0,r1,800ab8c <pipe_create+0x168> <== NOT EXECUTED
800ab84: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
800ab88: e0 00 00 05 bi 800ab9c <pipe_create+0x178> <== NOT EXECUTED
err = errno;
800ab8c: f8 00 00 fc calli 800af7c <__errno> <== NOT EXECUTED
800ab90: 28 2c 00 00 lw r12,(r1+0) <== NOT EXECUTED
close(filsdes[0]);
800ab94: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED
800ab98: fb ff f1 01 calli 8006f9c <close> <== NOT EXECUTED
}
unlink(fifopath);
800ab9c: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED
800aba0: f8 00 00 2d calli 800ac54 <unlink>
}
rtems_set_errno_and_return_minus_one(err);
800aba4: f8 00 00 f6 calli 800af7c <__errno>
800aba8: 58 2c 00 00 sw (r1+0),r12
}
800abac: 34 01 ff ff mvi r1,-1
800abb0: 2b 9d 00 04 lw ra,(sp+4)
800abb4: 2b 8b 00 10 lw r11,(sp+16)
800abb8: 2b 8c 00 0c lw r12,(sp+12)
800abbc: 2b 8d 00 08 lw r13,(sp+8)
800abc0: 37 9c 00 34 addi sp,sp,52
800abc4: c3 a0 00 00 ret
08009818 <pipe_free>:
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
8009818: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
800981c: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
8009820: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8009824: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
rtems_barrier_delete(pipe->readBarrier);
8009828: 28 21 00 2c lw r1,(r1+44) <== NOT EXECUTED
800982c: f8 00 02 59 calli 800a190 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
8009830: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
8009834: f8 00 02 57 calli 800a190 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
8009838: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800983c: fb ff f8 6c calli 80079ec <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
8009840: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
8009844: fb ff f6 0f calli 8007080 <free> <== NOT EXECUTED
free(pipe);
8009848: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800984c: fb ff f6 0d calli 8007080 <free> <== NOT EXECUTED
}
8009850: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8009854: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8009858: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
800985c: c3 a0 00 00 ret <== NOT EXECUTED
08009420 <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
8009420: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED
8009424: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED
8009428: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED
800942c: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED
8009430: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
if (cmd == FIONREAD) {
8009434: 78 05 40 04 mvhi r5,0x4004 <== NOT EXECUTED
8009438: 38 a5 66 7f ori r5,r5,0x667f <== NOT EXECUTED
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
800943c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
8009440: b8 60 68 00 mv r13,r3 <== NOT EXECUTED
if (cmd == FIONREAD) {
8009444: 34 04 ff ea mvi r4,-22 <== NOT EXECUTED
8009448: 5c 45 00 0f bne r2,r5,8009484 <pipe_ioctl+0x64> <== NOT EXECUTED
if (buffer == NULL)
800944c: 34 04 ff f2 mvi r4,-14 <== NOT EXECUTED
8009450: 44 60 00 0d be r3,r0,8009484 <pipe_ioctl+0x64> <== NOT EXECUTED
return -EFAULT;
if (! PIPE_LOCK(pipe))
8009454: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED
8009458: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800945c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
8009460: fb ff f9 9f calli 8007adc <rtems_semaphore_obtain> <== NOT EXECUTED
8009464: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
8009468: 34 04 ff fc mvi r4,-4 <== NOT EXECUTED
800946c: 5c 20 00 06 bne r1,r0,8009484 <pipe_ioctl+0x64> <== NOT EXECUTED
return -EINTR;
/* Return length of pipe */
*(uint *)buffer = pipe->Length;
8009470: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED
8009474: 59 a1 00 00 sw (r13+0),r1 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
8009478: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800947c: fb ff f9 e8 calli 8007c1c <rtems_semaphore_release> <== NOT EXECUTED
8009480: b9 80 20 00 mv r4,r12 <== NOT EXECUTED
return 0;
}
return -EINVAL;
}
8009484: b8 80 08 00 mv r1,r4 <== NOT EXECUTED
8009488: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800948c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
8009490: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
8009494: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
8009498: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
800949c: c3 a0 00 00 ret <== NOT EXECUTED
080093ac <pipe_lseek>:
rtems_libio_t *iop
)
{
/* Seek on pipe is not supported */
return -ESPIPE;
}
80093ac: 34 01 ff e3 mvi r1,-29 <== NOT EXECUTED
80093b0: c3 a0 00 00 ret <== NOT EXECUTED
08009674 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
8009674: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED
8009678: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED
800967c: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED
8009680: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED
8009684: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED
8009688: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED
800968c: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED
8009690: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED
8009694: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8009698: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
800969c: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
80096a0: b8 40 88 00 mv r17,r2 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
80096a4: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
80096a8: b8 60 80 00 mv r16,r3 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
80096ac: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
80096b0: b8 80 78 00 mv r15,r4 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
80096b4: fb ff f9 0a calli 8007adc <rtems_semaphore_obtain> <== NOT EXECUTED
80096b8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
80096bc: 44 20 00 46 be r1,r0,80097d4 <pipe_read+0x160> <== NOT EXECUTED
80096c0: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED
80096c4: e0 00 00 4a bi 80097ec <pipe_read+0x178> <== NOT EXECUTED
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
80096c8: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
80096cc: 44 2d 00 43 be r1,r13,80097d8 <pipe_read+0x164> <== NOT EXECUTED
goto out_locked;
if (LIBIO_NODELAY(iop)) {
80096d0: 29 ee 00 18 lw r14,(r15+24) <== NOT EXECUTED
80096d4: 21 ce 00 01 andi r14,r14,0x1 <== NOT EXECUTED
80096d8: 45 c0 00 03 be r14,r0,80096e4 <pipe_read+0x70> <== NOT EXECUTED
80096dc: 34 0d ff f5 mvi r13,-11 <== NOT EXECUTED
80096e0: e0 00 00 3f bi 80097dc <pipe_read+0x168> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
80096e4: 29 62 00 18 lw r2,(r11+24) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
80096e8: 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 ++;
80096ec: 34 42 00 01 addi r2,r2,1 <== NOT EXECUTED
80096f0: 59 62 00 18 sw (r11+24),r2 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
80096f4: fb ff f9 4a calli 8007c1c <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
80096f8: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED
80096fc: b9 c0 10 00 mv r2,r14 <== NOT EXECUTED
8009700: f8 00 02 e3 calli 800a28c <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
8009704: 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))
8009708: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
800970c: 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))
8009710: 44 2e 00 02 be r1,r14,8009718 <pipe_read+0xa4> <== NOT EXECUTED
8009714: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
8009718: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800971c: fb ff f8 f0 calli 8007adc <rtems_semaphore_obtain> <== NOT EXECUTED
8009720: 44 20 00 03 be r1,r0,800972c <pipe_read+0xb8> <== NOT EXECUTED
8009724: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED
8009728: e0 00 00 2f bi 80097e4 <pipe_read+0x170> <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
800972c: 29 62 00 18 lw r2,(r11+24) <== NOT EXECUTED
8009730: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED
8009734: 59 62 00 18 sw (r11+24),r2 <== NOT EXECUTED
if (ret != 0)
8009738: 5d a1 00 29 bne r13,r1,80097dc <pipe_read+0x168> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
800973c: 29 6d 00 0c lw r13,(r11+12) <== NOT EXECUTED
8009740: 45 a0 ff e2 be r13,r0,80096c8 <pipe_read+0x54> <== NOT EXECUTED
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
8009744: ca 0c 08 00 sub r1,r16,r12 <== NOT EXECUTED
8009748: 50 2d 00 02 bgeu r1,r13,8009750 <pipe_read+0xdc> <== NOT EXECUTED
800974c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
chunk1 = pipe->Size - pipe->Start;
8009750: 29 65 00 08 lw r5,(r11+8) <== NOT EXECUTED
8009754: 29 6e 00 04 lw r14,(r11+4) <== NOT EXECUTED
8009758: 29 66 00 00 lw r6,(r11+0) <== NOT EXECUTED
800975c: b6 2c 08 00 add r1,r17,r12 <== NOT EXECUTED
8009760: 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);
8009764: b4 c5 10 00 add r2,r6,r5 <== NOT EXECUTED
8009768: 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) {
800976c: 4d cd 00 08 bge r14,r13,800978c <pipe_read+0x118> <== NOT EXECUTED
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
8009770: b4 c5 10 00 add r2,r6,r5 <== NOT EXECUTED
8009774: b9 c0 18 00 mv r3,r14 <== NOT EXECUTED
8009778: f8 00 08 a7 calli 800ba14 <memcpy> <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
800977c: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED
8009780: b5 8e 08 00 add r1,r12,r14 <== NOT EXECUTED
8009784: b6 21 08 00 add r1,r17,r1 <== NOT EXECUTED
8009788: c9 ae 18 00 sub r3,r13,r14 <== NOT EXECUTED
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
800978c: f8 00 08 a2 calli 800ba14 <memcpy> <== NOT EXECUTED
pipe->Start += chunk;
8009790: 29 61 00 08 lw r1,(r11+8) <== NOT EXECUTED
pipe->Start %= pipe->Size;
8009794: 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;
8009798: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED
800979c: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED
pipe->Start %= pipe->Size;
80097a0: f8 00 3e 72 calli 8019168 <__umodsi3> <== NOT EXECUTED
pipe->Length -= chunk;
80097a4: 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;
80097a8: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED
pipe->Length -= chunk;
80097ac: c8 4d 08 00 sub r1,r2,r13 <== NOT EXECUTED
80097b0: 59 61 00 0c sw (r11+12),r1 <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
80097b4: 5c 20 00 02 bne r1,r0,80097bc <pipe_read+0x148> <== NOT EXECUTED
pipe->Start = 0;
80097b8: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED
if (pipe->waitingWriters > 0)
80097bc: 29 61 00 1c lw r1,(r11+28) <== NOT EXECUTED
80097c0: 44 20 00 04 be r1,r0,80097d0 <pipe_read+0x15c> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
80097c4: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
80097c8: 37 82 00 24 addi r2,sp,36 <== NOT EXECUTED
80097cc: f8 00 02 91 calli 800a210 <rtems_barrier_release> <== NOT EXECUTED
read += chunk;
80097d0: 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) {
80097d4: 56 0c ff da bgu r16,r12,800973c <pipe_read+0xc8> <== NOT EXECUTED
80097d8: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
80097dc: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
80097e0: fb ff f9 0f calli 8007c1c <rtems_semaphore_release> <== NOT EXECUTED
out_nolock:
if (read > 0)
80097e4: 49 80 00 02 bg r12,r0,80097ec <pipe_read+0x178> <== NOT EXECUTED
80097e8: b9 a0 60 00 mv r12,r13 <== NOT EXECUTED
return read;
return ret;
}
80097ec: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
80097f0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80097f4: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED
80097f8: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED
80097fc: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED
8009800: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED
8009804: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED
8009808: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED
800980c: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED
8009810: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED
8009814: c3 a0 00 00 ret <== NOT EXECUTED
08009860 <pipe_release>:
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
8009860: 37 9c ff e8 addi sp,sp,-24 <== NOT EXECUTED
8009864: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED
8009868: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED
800986c: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED
8009870: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED
8009874: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
8009878: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
800987c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
8009880: 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,
8009884: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8009888: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800988c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
8009890: fb ff f8 93 calli 8007adc <rtems_semaphore_obtain> <== NOT EXECUTED
8009894: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not released! */
if(sc != RTEMS_SUCCESSFUL)
8009898: 5c 20 00 15 bne r1,r0,80098ec <pipe_release+0x8c> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
mode = LIBIO_ACCMODE(iop);
800989c: 29 8c 00 18 lw r12,(r12+24) <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
80098a0: 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);
80098a4: 21 8c 00 06 andi r12,r12,0x6 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
80098a8: 44 23 00 04 be r1,r3,80098b8 <pipe_release+0x58> <== NOT EXECUTED
pipe->Readers --;
80098ac: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
80098b0: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
80098b4: 59 61 00 10 sw (r11+16),r1 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_WRITE)
80098b8: 21 81 00 04 andi r1,r12,0x4 <== NOT EXECUTED
80098bc: 44 20 00 04 be r1,r0,80098cc <pipe_release+0x6c> <== NOT EXECUTED
pipe->Writers --;
80098c0: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
80098c4: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
80098c8: 59 61 00 14 sw (r11+20),r1 <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
80098cc: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
80098d0: 38 42 c6 2c ori r2,r2,0xc62c <== NOT EXECUTED
80098d4: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED
80098d8: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
80098dc: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
80098e0: fb ff f8 7f calli 8007adc <rtems_semaphore_obtain> <== NOT EXECUTED
80098e4: 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)
80098e8: 44 20 00 02 be r1,r0,80098f0 <pipe_release+0x90> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
80098ec: fb ff e3 6d calli 80026a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
80098f0: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
80098f4: fb ff f8 ca calli 8007c1c <rtems_semaphore_release> <== NOT EXECUTED
if (pipe->Readers == 0 && pipe->Writers == 0) {
80098f8: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED
80098fc: 5c 4e 00 07 bne r2,r14,8009918 <pipe_release+0xb8> <== NOT EXECUTED
8009900: 29 6e 00 14 lw r14,(r11+20) <== NOT EXECUTED
8009904: 5d c2 00 05 bne r14,r2,8009918 <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);
8009908: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800990c: fb ff ff c3 calli 8009818 <pipe_free> <== NOT EXECUTED
*pipep = NULL;
8009910: 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) {
8009914: e0 00 00 0f bi 8009950 <pipe_release+0xf0> <== NOT EXECUTED
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
8009918: 64 42 00 00 cmpei r2,r2,0 <== NOT EXECUTED
800991c: 7d 81 00 04 cmpnei r1,r12,4 <== NOT EXECUTED
8009920: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED
8009924: 44 40 00 03 be r2,r0,8009930 <pipe_release+0xd0> <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
8009928: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
800992c: e0 00 00 07 bi 8009948 <pipe_release+0xe8> <== NOT EXECUTED
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
8009930: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
8009934: 7d 8c 00 02 cmpnei r12,r12,2 <== NOT EXECUTED
8009938: 64 21 00 00 cmpei r1,r1,0 <== NOT EXECUTED
800993c: a1 81 60 00 and r12,r12,r1 <== NOT EXECUTED
8009940: 45 82 00 04 be r12,r2,8009950 <pipe_release+0xf0> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
8009944: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED
8009948: 37 82 00 18 addi r2,sp,24 <== NOT EXECUTED
800994c: f8 00 02 31 calli 800a210 <rtems_barrier_release> <== NOT EXECUTED
rtems_semaphore_release(rtems_pipe_semaphore);
8009950: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8009954: 38 21 c6 2c ori r1,r1,0xc62c <== NOT EXECUTED
8009958: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
800995c: fb ff f8 b0 calli 8007c1c <rtems_semaphore_release> <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
8009960: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8009964: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8009968: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED
800996c: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED
8009970: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED
8009974: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED
8009978: 37 9c 00 18 addi sp,sp,24 <== NOT EXECUTED
800997c: c3 a0 00 00 ret <== NOT EXECUTED
080094a0 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
80094a0: 37 9c ff d8 addi sp,sp,-40 <== NOT EXECUTED
80094a4: 5b 8b 00 24 sw (sp+36),r11 <== NOT EXECUTED
80094a8: 5b 8c 00 20 sw (sp+32),r12 <== NOT EXECUTED
80094ac: 5b 8d 00 1c sw (sp+28),r13 <== NOT EXECUTED
80094b0: 5b 8e 00 18 sw (sp+24),r14 <== NOT EXECUTED
80094b4: 5b 8f 00 14 sw (sp+20),r15 <== NOT EXECUTED
80094b8: 5b 90 00 10 sw (sp+16),r16 <== NOT EXECUTED
80094bc: 5b 91 00 0c sw (sp+12),r17 <== NOT EXECUTED
80094c0: 5b 92 00 08 sw (sp+8),r18 <== NOT EXECUTED
80094c4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
80094c8: b8 60 70 00 mv r14,r3 <== NOT EXECUTED
80094cc: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
80094d0: b8 40 88 00 mv r17,r2 <== NOT EXECUTED
80094d4: b8 80 90 00 mv r18,r4 <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
80094d8: b8 60 60 00 mv r12,r3 <== NOT EXECUTED
80094dc: 44 60 00 5a be r3,r0,8009644 <pipe_write+0x1a4> <== NOT EXECUTED
return 0;
if (! PIPE_LOCK(pipe))
80094e0: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED
80094e4: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
80094e8: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
80094ec: fb ff f9 7c calli 8007adc <rtems_semaphore_obtain> <== NOT EXECUTED
80094f0: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED
80094f4: 5c 20 00 54 bne r1,r0,8009644 <pipe_write+0x1a4> <== NOT EXECUTED
return -EINTR;
if (pipe->Readers == 0) {
80094f8: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED
80094fc: 34 0d ff e0 mvi r13,-32 <== NOT EXECUTED
8009500: b8 40 60 00 mv r12,r2 <== NOT EXECUTED
8009504: 44 41 00 4c be r2,r1,8009634 <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;
8009508: 29 61 00 04 lw r1,(r11+4) <== NOT EXECUTED
800950c: b9 c0 80 00 mv r16,r14 <== NOT EXECUTED
8009510: 50 2e 00 02 bgeu r1,r14,8009518 <pipe_write+0x78> <== NOT EXECUTED
8009514: 34 10 00 01 mvi r16,1 <== NOT EXECUTED
8009518: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
800951c: e0 00 00 44 bi 800962c <pipe_write+0x18c> <== NOT EXECUTED
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
8009520: 2a 4f 00 18 lw r15,(r18+24) <== NOT EXECUTED
8009524: 21 ef 00 01 andi r15,r15,0x1 <== NOT EXECUTED
8009528: 45 e0 00 03 be r15,r0,8009534 <pipe_write+0x94> <== NOT EXECUTED
800952c: 34 0d ff f5 mvi r13,-11 <== NOT EXECUTED
8009530: e0 00 00 41 bi 8009634 <pipe_write+0x194> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
8009534: 29 62 00 1c lw r2,(r11+28) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
8009538: 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 ++;
800953c: 34 42 00 01 addi r2,r2,1 <== NOT EXECUTED
8009540: 59 62 00 1c sw (r11+28),r2 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
8009544: fb ff f9 b6 calli 8007c1c <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
8009548: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
800954c: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED
8009550: f8 00 03 4f calli 800a28c <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
8009554: 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))
8009558: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
800955c: 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))
8009560: 44 2f 00 02 be r1,r15,8009568 <pipe_write+0xc8> <== NOT EXECUTED
8009564: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
8009568: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800956c: fb ff f9 5c calli 8007adc <rtems_semaphore_obtain> <== NOT EXECUTED
8009570: 44 20 00 03 be r1,r0,800957c <pipe_write+0xdc> <== NOT EXECUTED
8009574: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED
8009578: e0 00 00 31 bi 800963c <pipe_write+0x19c> <== NOT EXECUTED
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
800957c: 29 62 00 1c lw r2,(r11+28) <== NOT EXECUTED
8009580: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED
8009584: 59 62 00 1c sw (r11+28),r2 <== NOT EXECUTED
if (ret != 0)
8009588: 5d a1 00 2b bne r13,r1,8009634 <pipe_write+0x194> <== NOT EXECUTED
goto out_locked;
if (pipe->Readers == 0) {
800958c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8009590: 5c 2d 00 03 bne r1,r13,800959c <pipe_write+0xfc> <== NOT EXECUTED
8009594: 34 0d ff e0 mvi r13,-32 <== NOT EXECUTED
8009598: e0 00 00 27 bi 8009634 <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) {
800959c: 29 6f 00 04 lw r15,(r11+4) <== NOT EXECUTED
80095a0: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED
80095a4: c9 e1 68 00 sub r13,r15,r1 <== NOT EXECUTED
80095a8: 56 0d ff de bgu r16,r13,8009520 <pipe_write+0x80> <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
80095ac: c9 cc 10 00 sub r2,r14,r12 <== NOT EXECUTED
80095b0: 50 4d 00 02 bgeu r2,r13,80095b8 <pipe_write+0x118> <== NOT EXECUTED
80095b4: b8 40 68 00 mv r13,r2 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
80095b8: 29 63 00 08 lw r3,(r11+8) <== NOT EXECUTED
80095bc: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED
80095c0: b4 23 08 00 add r1,r1,r3 <== NOT EXECUTED
80095c4: f8 00 3e e9 calli 8019168 <__umodsi3> <== NOT EXECUTED
80095c8: c9 e1 78 00 sub r15,r15,r1 <== NOT EXECUTED
80095cc: 29 63 00 00 lw r3,(r11+0) <== NOT EXECUTED
80095d0: b6 2c 10 00 add r2,r17,r12 <== NOT EXECUTED
if (chunk > chunk1) {
80095d4: 4d ed 00 09 bge r15,r13,80095f8 <pipe_write+0x158> <== NOT EXECUTED
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
80095d8: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED
80095dc: b9 e0 18 00 mv r3,r15 <== NOT EXECUTED
80095e0: f8 00 09 0d calli 800ba14 <memcpy> <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
80095e4: b5 ec 10 00 add r2,r15,r12 <== NOT EXECUTED
80095e8: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
80095ec: b6 22 10 00 add r2,r17,r2 <== NOT EXECUTED
80095f0: c9 af 18 00 sub r3,r13,r15 <== NOT EXECUTED
80095f4: e0 00 00 03 bi 8009600 <pipe_write+0x160> <== NOT EXECUTED
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
80095f8: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED
80095fc: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED
8009600: f8 00 09 05 calli 800ba14 <memcpy> <== NOT EXECUTED
pipe->Length += chunk;
8009604: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED
if (pipe->waitingReaders > 0)
8009608: 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;
800960c: b4 2d 08 00 add r1,r1,r13 <== NOT EXECUTED
8009610: 59 61 00 0c sw (r11+12),r1 <== NOT EXECUTED
if (pipe->waitingReaders > 0)
8009614: 44 40 00 04 be r2,r0,8009624 <pipe_write+0x184> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
8009618: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED
800961c: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED
8009620: f8 00 02 fc calli 800a210 <rtems_barrier_release> <== NOT EXECUTED
written += chunk;
8009624: b5 8d 60 00 add r12,r12,r13 <== NOT EXECUTED
8009628: 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) {
800962c: 55 cc ff dc bgu r14,r12,800959c <pipe_write+0xfc> <== NOT EXECUTED
8009630: 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);
8009634: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8009638: fb ff f9 79 calli 8007c1c <rtems_semaphore_release> <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
800963c: 49 80 00 02 bg r12,r0,8009644 <pipe_write+0x1a4> <== NOT EXECUTED
8009640: b9 a0 60 00 mv r12,r13 <== NOT EXECUTED
return written;
return ret;
}
8009644: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8009648: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800964c: 2b 8b 00 24 lw r11,(sp+36) <== NOT EXECUTED
8009650: 2b 8c 00 20 lw r12,(sp+32) <== NOT EXECUTED
8009654: 2b 8d 00 1c lw r13,(sp+28) <== NOT EXECUTED
8009658: 2b 8e 00 18 lw r14,(sp+24) <== NOT EXECUTED
800965c: 2b 8f 00 14 lw r15,(sp+20) <== NOT EXECUTED
8009660: 2b 90 00 10 lw r16,(sp+16) <== NOT EXECUTED
8009664: 2b 91 00 0c lw r17,(sp+12) <== NOT EXECUTED
8009668: 2b 92 00 08 lw r18,(sp+8) <== NOT EXECUTED
800966c: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED
8009670: c3 a0 00 00 ret <== NOT EXECUTED
080196c0 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
80196c0: 37 9c ff e8 addi sp,sp,-24
80196c4: 5b 8b 00 14 sw (sp+20),r11
80196c8: 5b 8c 00 10 sw (sp+16),r12
80196cc: 5b 8d 00 0c sw (sp+12),r13
80196d0: 5b 8e 00 08 sw (sp+8),r14
80196d4: 5b 9d 00 04 sw (sp+4),ra
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
80196d8: 78 04 08 01 mvhi r4,0x801
80196dc: 38 84 c0 10 ori r4,r4,0xc010
80196e0: 28 84 00 00 lw r4,(r4+0)
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
80196e4: b8 40 68 00 mv r13,r2
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
80196e8: 54 81 00 02 bgu r4,r1,80196f0 <read+0x30> <== ALWAYS TAKEN
80196ec: e0 00 00 10 bi 801972c <read+0x6c> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
80196f0: 34 02 00 03 mvi r2,3
80196f4: 5b 83 00 18 sw (sp+24),r3
80196f8: 78 0b 08 01 mvhi r11,0x801
80196fc: fb ff 9a bd calli 80001f0 <__ashlsi3>
8019700: 34 02 00 03 mvi r2,3
8019704: 39 6b c6 a0 ori r11,r11,0xc6a0
8019708: b8 20 70 00 mv r14,r1
801970c: fb ff 9a b9 calli 80001f0 <__ashlsi3>
8019710: 29 6c 00 00 lw r12,(r11+0)
8019714: b5 c1 08 00 add r1,r14,r1
rtems_libio_check_is_open( iop );
8019718: 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 );
801971c: b5 81 60 00 add r12,r12,r1
rtems_libio_check_is_open( iop );
8019720: 29 81 00 18 lw r1,(r12+24)
8019724: 20 22 01 00 andi r2,r1,0x100
8019728: 5c 40 00 04 bne r2,r0,8019738 <read+0x78>
801972c: fb ff c6 14 calli 800af7c <__errno>
8019730: 34 02 00 09 mvi r2,9
8019734: e0 00 00 0e bi 801976c <read+0xac>
rtems_libio_check_buffer( buffer );
8019738: 45 a0 00 05 be r13,r0,801974c <read+0x8c> <== NEVER TAKEN
rtems_libio_check_count( count );
801973c: b8 60 58 00 mv r11,r3
8019740: 44 60 00 1d be r3,r0,80197b4 <read+0xf4> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
8019744: 20 21 00 02 andi r1,r1,0x2
8019748: 5c 20 00 04 bne r1,r0,8019758 <read+0x98> <== ALWAYS TAKEN
801974c: fb ff c6 0c calli 800af7c <__errno> <== NOT EXECUTED
8019750: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8019754: e0 00 00 06 bi 801976c <read+0xac> <== NOT EXECUTED
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
8019758: 29 81 00 40 lw r1,(r12+64)
801975c: 28 24 00 08 lw r4,(r1+8)
8019760: 5c 80 00 06 bne r4,r0,8019778 <read+0xb8> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
8019764: fb ff c6 06 calli 800af7c <__errno> <== NOT EXECUTED
8019768: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
801976c: 58 22 00 00 sw (r1+0),r2
8019770: 34 0b ff ff mvi r11,-1
8019774: e0 00 00 10 bi 80197b4 <read+0xf4>
rc = (*iop->handlers->read_h)( iop, buffer, count );
8019778: b9 a0 10 00 mv r2,r13
801977c: b9 80 08 00 mv r1,r12
8019780: d8 80 00 00 call r4
8019784: b8 20 58 00 mv r11,r1
if ( rc > 0 )
8019788: 4c 01 00 0b bge r0,r1,80197b4 <read+0xf4>
iop->offset += rc;
801978c: 34 02 00 1f mvi r2,31
8019790: fb ff 9a e8 calli 8000330 <__ashrsi3>
8019794: 29 82 00 14 lw r2,(r12+20)
8019798: 29 84 00 10 lw r4,(r12+16)
801979c: b5 62 10 00 add r2,r11,r2
80197a0: f5 62 18 00 cmpgu r3,r11,r2
80197a4: b4 24 08 00 add r1,r1,r4
80197a8: b4 61 08 00 add r1,r3,r1
80197ac: 59 82 00 14 sw (r12+20),r2
80197b0: 59 81 00 10 sw (r12+16),r1
return rc;
}
80197b4: b9 60 08 00 mv r1,r11
80197b8: 2b 9d 00 04 lw ra,(sp+4)
80197bc: 2b 8b 00 14 lw r11,(sp+20)
80197c0: 2b 8c 00 10 lw r12,(sp+16)
80197c4: 2b 8d 00 0c lw r13,(sp+12)
80197c8: 2b 8e 00 08 lw r14,(sp+8)
80197cc: 37 9c 00 18 addi sp,sp,24
80197d0: c3 a0 00 00 ret
08004d70 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
8004d70: 37 9c ff d8 addi sp,sp,-40
8004d74: 5b 8b 00 14 sw (sp+20),r11
8004d78: 5b 8c 00 10 sw (sp+16),r12
8004d7c: 5b 8d 00 0c sw (sp+12),r13
8004d80: 5b 8e 00 08 sw (sp+8),r14
8004d84: 5b 9d 00 04 sw (sp+4),ra
8004d88: b8 40 68 00 mv r13,r2
8004d8c: b8 60 70 00 mv r14,r3
8004d90: b8 20 60 00 mv r12,r1
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
8004d94: 5c 40 00 04 bne r2,r0,8004da4 <readlink+0x34> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
8004d98: f8 00 2b a4 calli 800fc28 <__errno> <== NOT EXECUTED
8004d9c: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
8004da0: e0 00 00 14 bi 8004df0 <readlink+0x80> <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
8004da4: f8 00 33 6b calli 8011b50 <strlen>
8004da8: 34 03 00 00 mvi r3,0
8004dac: 37 8b 00 18 addi r11,sp,24
8004db0: b8 20 10 00 mv r2,r1
8004db4: b9 60 20 00 mv r4,r11
8004db8: b9 80 08 00 mv r1,r12
8004dbc: b8 60 28 00 mv r5,r3
8004dc0: fb ff fb 01 calli 80039c4 <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
8004dc4: 34 0c ff ff mvi r12,-1
8004dc8: 5c 20 00 2a bne r1,r0,8004e70 <readlink+0x100> <== NEVER TAKEN
return -1;
if ( !loc.ops->node_type_h ){
8004dcc: 2b 82 00 24 lw r2,(sp+36)
8004dd0: 28 44 00 10 lw r4,(r2+16)
8004dd4: 5c 81 00 0a bne r4,r1,8004dfc <readlink+0x8c> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
8004dd8: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED
8004ddc: 44 44 00 03 be r2,r4,8004de8 <readlink+0x78> <== NOT EXECUTED
8004de0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8004de4: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8004de8: f8 00 2b 90 calli 800fc28 <__errno> <== NOT EXECUTED
8004dec: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8004df0: 58 22 00 00 sw (r1+0),r2
8004df4: 34 0c ff ff mvi r12,-1
8004df8: e0 00 00 1e bi 8004e70 <readlink+0x100>
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
8004dfc: b9 60 08 00 mv r1,r11
8004e00: d8 80 00 00 call r4
8004e04: 34 02 00 04 mvi r2,4
8004e08: 2b 84 00 24 lw r4,(sp+36)
8004e0c: 44 22 00 09 be r1,r2,8004e30 <readlink+0xc0>
rtems_filesystem_freenode( &loc );
8004e10: 44 80 00 05 be r4,r0,8004e24 <readlink+0xb4> <== NEVER TAKEN
8004e14: 28 82 00 1c lw r2,(r4+28)
8004e18: 44 40 00 03 be r2,r0,8004e24 <readlink+0xb4> <== NEVER TAKEN
8004e1c: b9 60 08 00 mv r1,r11
8004e20: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( EINVAL );
8004e24: f8 00 2b 81 calli 800fc28 <__errno>
8004e28: 34 02 00 16 mvi r2,22
8004e2c: e3 ff ff f1 bi 8004df0 <readlink+0x80>
}
if ( !loc.ops->readlink_h ){
8004e30: 28 85 00 3c lw r5,(r4+60)
8004e34: 5c a0 00 04 bne r5,r0,8004e44 <readlink+0xd4> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
8004e38: 28 82 00 1c lw r2,(r4+28) <== NOT EXECUTED
8004e3c: 5c 45 ff e9 bne r2,r5,8004de0 <readlink+0x70> <== NOT EXECUTED
8004e40: e3 ff ff ea bi 8004de8 <readlink+0x78> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
8004e44: b9 a0 10 00 mv r2,r13
8004e48: b9 c0 18 00 mv r3,r14
8004e4c: b9 60 08 00 mv r1,r11
8004e50: d8 a0 00 00 call r5
8004e54: b8 20 60 00 mv r12,r1
rtems_filesystem_freenode( &loc );
8004e58: 2b 81 00 24 lw r1,(sp+36)
8004e5c: 44 20 00 05 be r1,r0,8004e70 <readlink+0x100> <== NEVER TAKEN
8004e60: 28 22 00 1c lw r2,(r1+28)
8004e64: 44 40 00 03 be r2,r0,8004e70 <readlink+0x100> <== NEVER TAKEN
8004e68: b9 60 08 00 mv r1,r11
8004e6c: d8 40 00 00 call r2
return result;
}
8004e70: b9 80 08 00 mv r1,r12
8004e74: 2b 9d 00 04 lw ra,(sp+4)
8004e78: 2b 8b 00 14 lw r11,(sp+20)
8004e7c: 2b 8c 00 10 lw r12,(sp+16)
8004e80: 2b 8d 00 0c lw r13,(sp+12)
8004e84: 2b 8e 00 08 lw r14,(sp+8)
8004e88: 37 9c 00 28 addi sp,sp,40
8004e8c: 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 00 10 ori r4,r4,0x10
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 0e 74 ori r11,r11,0xe74
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 28 f6 calli 800d770 <__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 28 e8 calli 800d770 <__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 28 d8 calli 800d770 <__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
08019874 <realloc>:
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
8019874: 37 9c ff e8 addi sp,sp,-24
8019878: 5b 8b 00 14 sw (sp+20),r11
801987c: 5b 8c 00 10 sw (sp+16),r12
8019880: 5b 8d 00 0c sw (sp+12),r13
8019884: 5b 8e 00 08 sw (sp+8),r14
8019888: 5b 9d 00 04 sw (sp+4),ra
801988c: 78 03 08 01 mvhi r3,0x801
8019890: 38 63 c6 b0 ori r3,r3,0xc6b0
8019894: 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())) {
8019898: 78 04 08 01 mvhi r4,0x801
801989c: 38 84 c9 c8 ori r4,r4,0xc9c8
80198a0: 28 84 00 00 lw r4,(r4+0)
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
80198a4: 34 a5 00 01 addi r5,r5,1
80198a8: b8 20 58 00 mv r11,r1
80198ac: 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())) {
80198b0: 34 01 00 03 mvi r1,3
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
80198b4: 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())) {
80198b8: 5c 81 00 09 bne r4,r1,80198dc <realloc+0x68> <== NEVER TAKEN
if (_Thread_Dispatch_disable_level > 0)
80198bc: 78 01 08 01 mvhi r1,0x801
80198c0: 38 21 c8 2c ori r1,r1,0xc82c
80198c4: 28 22 00 00 lw r2,(r1+0)
80198c8: 5c 40 00 36 bne r2,r0,80199a0 <realloc+0x12c> <== NEVER TAKEN
return (void *) 0;
if (_ISR_Nest_level > 0)
80198cc: 78 01 08 01 mvhi r1,0x801
80198d0: 38 21 c8 c4 ori r1,r1,0xc8c4
80198d4: 28 21 00 00 lw r1,(r1+0)
80198d8: 5c 22 00 32 bne r1,r2,80199a0 <realloc+0x12c> <== NEVER TAKEN
}
/*
* Continue with realloc().
*/
if ( !ptr )
80198dc: 5d 60 00 05 bne r11,r0,80198f0 <realloc+0x7c>
return malloc( size );
80198e0: b9 80 08 00 mv r1,r12
80198e4: fb ff b7 85 calli 80076f8 <malloc>
80198e8: b8 20 58 00 mv r11,r1
80198ec: e0 00 00 2e bi 80199a4 <realloc+0x130>
if ( !size ) {
80198f0: 5d 80 00 05 bne r12,r0,8019904 <realloc+0x90> <== ALWAYS TAKEN
free( ptr );
80198f4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80198f8: fb ff b5 e2 calli 8007080 <free> <== NOT EXECUTED
80198fc: b9 80 58 00 mv r11,r12 <== NOT EXECUTED
return (void *) 0;
8019900: e0 00 00 29 bi 80199a4 <realloc+0x130> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
8019904: 78 0d 08 01 mvhi r13,0x801
8019908: 39 ad c0 1c ori r13,r13,0xc01c
801990c: 29 a1 00 00 lw r1,(r13+0)
8019910: b9 60 10 00 mv r2,r11
8019914: 37 83 00 18 addi r3,sp,24
8019918: f8 00 00 70 calli 8019ad8 <_Protected_heap_Get_block_size>
801991c: b8 20 70 00 mv r14,r1
8019920: 5c 20 00 06 bne r1,r0,8019938 <realloc+0xc4>
errno = EINVAL;
8019924: fb ff c5 96 calli 800af7c <__errno>
8019928: 34 02 00 16 mvi r2,22
801992c: 58 22 00 00 sw (r1+0),r2
8019930: b9 c0 58 00 mv r11,r14
return (void *) 0;
8019934: e0 00 00 1c bi 80199a4 <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 ) ) {
8019938: 29 a1 00 00 lw r1,(r13+0)
801993c: b9 60 10 00 mv r2,r11
8019940: b9 80 18 00 mv r3,r12
8019944: f8 00 00 7d calli 8019b38 <_Protected_heap_Resize_block>
8019948: b8 20 70 00 mv r14,r1
801994c: 5c 20 00 16 bne r1,r0,80199a4 <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 );
8019950: b9 80 08 00 mv r1,r12
8019954: fb ff b7 69 calli 80076f8 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
8019958: 78 02 08 01 mvhi r2,0x801
801995c: 38 42 c6 b0 ori r2,r2,0xc6b0
* 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 );
8019960: b8 20 68 00 mv r13,r1
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
8019964: 28 41 00 04 lw r1,(r2+4)
8019968: 34 21 ff ff addi r1,r1,-1
801996c: 58 41 00 04 sw (r2+4),r1
if ( !new_area ) {
8019970: 45 ae 00 0c be r13,r14,80199a0 <realloc+0x12c>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
8019974: 2b 81 00 18 lw r1,(sp+24)
8019978: b9 80 18 00 mv r3,r12
801997c: 50 2c 00 02 bgeu r1,r12,8019984 <realloc+0x110> <== NEVER TAKEN
8019980: b8 20 18 00 mv r3,r1
8019984: b9 60 10 00 mv r2,r11
8019988: b9 a0 08 00 mv r1,r13
801998c: fb ff c8 22 calli 800ba14 <memcpy>
free( ptr );
8019990: b9 60 08 00 mv r1,r11
8019994: fb ff b5 bb calli 8007080 <free>
8019998: b9 a0 58 00 mv r11,r13
return new_area;
801999c: e0 00 00 02 bi 80199a4 <realloc+0x130>
80199a0: 34 0b 00 00 mvi r11,0
}
80199a4: b9 60 08 00 mv r1,r11
80199a8: 2b 9d 00 04 lw ra,(sp+4)
80199ac: 2b 8b 00 14 lw r11,(sp+20)
80199b0: 2b 8c 00 10 lw r12,(sp+16)
80199b4: 2b 8d 00 0c lw r13,(sp+12)
80199b8: 2b 8e 00 08 lw r14,(sp+8)
80199bc: 37 9c 00 18 addi sp,sp,24
80199c0: c3 a0 00 00 ret
08006280 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
8006280: 37 9c ff c0 addi sp,sp,-64
8006284: 5b 8b 00 18 sw (sp+24),r11
8006288: 5b 8c 00 14 sw (sp+20),r12
800628c: 5b 8d 00 10 sw (sp+16),r13
8006290: 5b 8e 00 0c sw (sp+12),r14
8006294: 5b 8f 00 08 sw (sp+8),r15
8006298: 5b 9d 00 04 sw (sp+4),ra
800629c: 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 );
80062a0: fb ff f9 1e calli 8004718 <rtems_filesystem_dirname>
80062a4: b8 20 68 00 mv r13,r1
if ( parentpathlen == 0 )
80062a8: 5c 20 00 19 bne r1,r0,800630c <rmdir+0x8c>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
80062ac: 41 e1 00 00 lbu r1,(r15+0)
80062b0: 64 23 00 5c cmpei r3,r1,92
80062b4: 64 22 00 2f cmpei r2,r1,47
80062b8: b8 62 10 00 or r2,r3,r2
80062bc: 5c 4d 00 02 bne r2,r13,80062c4 <rmdir+0x44> <== ALWAYS TAKEN
80062c0: 5c 20 00 0a bne r1,r0,80062e8 <rmdir+0x68> <== NOT EXECUTED
80062c4: 78 01 08 02 mvhi r1,0x802
80062c8: 38 21 81 30 ori r1,r1,0x8130
80062cc: 28 22 00 00 lw r2,(r1+0)
80062d0: 34 03 00 14 mvi r3,20
80062d4: 37 81 00 30 addi r1,sp,48
80062d8: 34 42 00 18 addi r2,r2,24
80062dc: f8 00 31 43 calli 80127e8 <memcpy>
80062e0: 34 0c 00 00 mvi r12,0
80062e4: e0 00 00 12 bi 800632c <rmdir+0xac>
80062e8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80062ec: 38 21 81 30 ori r1,r1,0x8130 <== NOT EXECUTED
80062f0: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED
80062f4: 34 03 00 14 mvi r3,20 <== NOT EXECUTED
80062f8: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED
80062fc: 34 42 00 04 addi r2,r2,4 <== NOT EXECUTED
8006300: f8 00 31 3a calli 80127e8 <memcpy> <== NOT EXECUTED
8006304: b9 a0 60 00 mv r12,r13 <== NOT EXECUTED
8006308: e0 00 00 09 bi 800632c <rmdir+0xac> <== NOT EXECUTED
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
800630c: b9 e0 08 00 mv r1,r15
8006310: b9 a0 10 00 mv r2,r13
8006314: 34 03 00 02 mvi r3,2
8006318: 37 84 00 30 addi r4,sp,48
800631c: 34 05 00 00 mvi r5,0
8006320: fb ff f9 4c calli 8004850 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
8006324: 5c 20 00 60 bne r1,r0,80064a4 <rmdir+0x224> <== NEVER TAKEN
8006328: 34 0c 00 01 mvi r12,1
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
800632c: 37 8b 00 1c addi r11,sp,28
8006330: 37 8e 00 30 addi r14,sp,48
8006334: 34 03 00 14 mvi r3,20
8006338: b9 c0 10 00 mv r2,r14
800633c: b9 60 08 00 mv r1,r11
8006340: f8 00 31 2a calli 80127e8 <memcpy>
name = pathname + parentpathlen;
8006344: b5 ed 68 00 add r13,r15,r13
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
8006348: b9 a0 08 00 mv r1,r13
800634c: f8 00 38 02 calli 8014354 <strlen>
8006350: b8 20 10 00 mv r2,r1
8006354: b9 a0 08 00 mv r1,r13
8006358: fb ff f8 e1 calli 80046dc <rtems_filesystem_prefix_separators>
800635c: b5 a1 68 00 add r13,r13,r1
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
8006360: b9 a0 08 00 mv r1,r13
8006364: f8 00 37 fc calli 8014354 <strlen>
8006368: 34 03 00 00 mvi r3,0
800636c: b8 20 10 00 mv r2,r1
8006370: b9 60 20 00 mv r4,r11
8006374: b9 a0 08 00 mv r1,r13
8006378: b8 60 28 00 mv r5,r3
800637c: fb ff f8 fb calli 8004768 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
8006380: 44 20 00 09 be r1,r0,80063a4 <rmdir+0x124>
if ( free_parentloc )
8006384: 45 80 00 48 be r12,r0,80064a4 <rmdir+0x224> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
8006388: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED
800638c: 44 20 00 46 be r1,r0,80064a4 <rmdir+0x224> <== NOT EXECUTED
8006390: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8006394: 44 40 00 44 be r2,r0,80064a4 <rmdir+0x224> <== NOT EXECUTED
8006398: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
800639c: d8 40 00 00 call r2 <== NOT EXECUTED
80063a0: e0 00 00 41 bi 80064a4 <rmdir+0x224> <== NOT EXECUTED
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
80063a4: 2b 82 00 28 lw r2,(sp+40)
80063a8: 28 43 00 10 lw r3,(r2+16)
80063ac: 5c 61 00 04 bne r3,r1,80063bc <rmdir+0x13c> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
80063b0: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED
80063b4: 5c 43 00 1d bne r2,r3,8006428 <rmdir+0x1a8> <== NOT EXECUTED
80063b8: e0 00 00 1e bi 8006430 <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 ){
80063bc: b9 60 08 00 mv r1,r11
80063c0: d8 60 00 00 call r3
80063c4: 34 02 00 01 mvi r2,1
80063c8: 44 22 00 11 be r1,r2,800640c <rmdir+0x18c>
rtems_filesystem_freenode( &loc );
80063cc: 2b 81 00 28 lw r1,(sp+40)
80063d0: 44 20 00 05 be r1,r0,80063e4 <rmdir+0x164> <== NEVER TAKEN
80063d4: 28 22 00 1c lw r2,(r1+28)
80063d8: 44 40 00 03 be r2,r0,80063e4 <rmdir+0x164> <== NEVER TAKEN
80063dc: b9 60 08 00 mv r1,r11
80063e0: d8 40 00 00 call r2
if ( free_parentloc )
80063e4: 45 80 00 07 be r12,r0,8006400 <rmdir+0x180> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
80063e8: 2b 81 00 3c lw r1,(sp+60)
80063ec: 44 20 00 05 be r1,r0,8006400 <rmdir+0x180>
80063f0: 28 22 00 1c lw r2,(r1+28)
80063f4: 44 40 00 03 be r2,r0,8006400 <rmdir+0x180> <== NEVER TAKEN
80063f8: 37 81 00 30 addi r1,sp,48
80063fc: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( ENOTDIR );
8006400: f8 00 29 b8 calli 8010ae0 <__errno>
8006404: 34 02 00 14 mvi r2,20
8006408: e0 00 00 13 bi 8006454 <rmdir+0x1d4>
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
800640c: 2b 81 00 24 lw r1,(sp+36)
8006410: 28 23 00 34 lw r3,(r1+52)
8006414: 5c 60 00 12 bne r3,r0,800645c <rmdir+0x1dc> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
8006418: 2b 81 00 28 lw r1,(sp+40) <== NOT EXECUTED
800641c: 44 23 00 05 be r1,r3,8006430 <rmdir+0x1b0> <== NOT EXECUTED
8006420: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8006424: 44 40 00 03 be r2,r0,8006430 <rmdir+0x1b0> <== NOT EXECUTED
8006428: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800642c: d8 40 00 00 call r2 <== NOT EXECUTED
if ( free_parentloc )
8006430: 45 80 00 07 be r12,r0,800644c <rmdir+0x1cc> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
8006434: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED
8006438: 44 20 00 05 be r1,r0,800644c <rmdir+0x1cc> <== NOT EXECUTED
800643c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8006440: 44 40 00 03 be r2,r0,800644c <rmdir+0x1cc> <== NOT EXECUTED
8006444: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED
8006448: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
800644c: f8 00 29 a5 calli 8010ae0 <__errno> <== NOT EXECUTED
8006450: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8006454: 58 22 00 00 sw (r1+0),r2
8006458: e0 00 00 13 bi 80064a4 <rmdir+0x224>
}
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
800645c: b9 c0 08 00 mv r1,r14
8006460: b9 60 10 00 mv r2,r11
8006464: d8 60 00 00 call r3
8006468: b8 20 68 00 mv r13,r1
rtems_filesystem_freenode( &loc );
800646c: 2b 81 00 28 lw r1,(sp+40)
8006470: 44 20 00 05 be r1,r0,8006484 <rmdir+0x204> <== NEVER TAKEN
8006474: 28 22 00 1c lw r2,(r1+28)
8006478: 44 40 00 03 be r2,r0,8006484 <rmdir+0x204> <== NEVER TAKEN
800647c: b9 60 08 00 mv r1,r11
8006480: d8 40 00 00 call r2
if ( free_parentloc )
8006484: 45 80 00 09 be r12,r0,80064a8 <rmdir+0x228>
rtems_filesystem_freenode( &parentloc );
8006488: 2b 81 00 3c lw r1,(sp+60)
800648c: 44 20 00 07 be r1,r0,80064a8 <rmdir+0x228> <== NEVER TAKEN
8006490: 28 22 00 1c lw r2,(r1+28)
8006494: 44 40 00 05 be r2,r0,80064a8 <rmdir+0x228> <== NEVER TAKEN
8006498: 37 81 00 30 addi r1,sp,48
800649c: d8 40 00 00 call r2
80064a0: e0 00 00 02 bi 80064a8 <rmdir+0x228>
80064a4: 34 0d ff ff mvi r13,-1
return result;
}
80064a8: b9 a0 08 00 mv r1,r13
80064ac: 2b 9d 00 04 lw ra,(sp+4)
80064b0: 2b 8b 00 18 lw r11,(sp+24)
80064b4: 2b 8c 00 14 lw r12,(sp+20)
80064b8: 2b 8d 00 10 lw r13,(sp+16)
80064bc: 2b 8e 00 0c lw r14,(sp+12)
80064c0: 2b 8f 00 08 lw r15,(sp+8)
80064c4: 37 9c 00 40 addi sp,sp,64
80064c8: c3 a0 00 00 ret
08012bbc <rtems_assoc_name_bad>:
uint32_t bad_value
#else
uint32_t bad_value __attribute((unused))
#endif
)
{
8012bbc: 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;
}
8012bc0: 38 21 91 ac ori r1,r1,0x91ac <== NOT EXECUTED
8012bc4: c3 a0 00 00 ret <== NOT EXECUTED
0800f578 <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
800f578: 37 9c ff f8 addi sp,sp,-8
800f57c: 5b 8b 00 08 sw (sp+8),r11
800f580: 5b 9d 00 04 sw (sp+4),ra
800f584: b8 40 58 00 mv r11,r2
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
800f588: f8 00 00 0a calli 800f5b0 <rtems_assoc_ptr_by_local>
if (nap)
800f58c: 44 20 00 03 be r1,r0,800f598 <rtems_assoc_name_by_local+0x20><== NEVER TAKEN
return nap->name;
800f590: 28 21 00 00 lw r1,(r1+0)
800f594: e0 00 00 03 bi 800f5a0 <rtems_assoc_name_by_local+0x28>
return rtems_assoc_name_bad(local_value);
800f598: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800f59c: f8 00 0d 88 calli 8012bbc <rtems_assoc_name_bad> <== NOT EXECUTED
}
800f5a0: 2b 9d 00 04 lw ra,(sp+4)
800f5a4: 2b 8b 00 08 lw r11,(sp+8)
800f5a8: 37 9c 00 08 addi sp,sp,8
800f5ac: c3 a0 00 00 ret
0800aee4 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
800aee4: 37 9c ff f4 addi sp,sp,-12
800aee8: 5b 8b 00 0c sw (sp+12),r11
800aeec: 5b 8c 00 08 sw (sp+8),r12
800aef0: 5b 9d 00 04 sw (sp+4),ra
800aef4: b8 20 58 00 mv r11,r1
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
800aef8: 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
)
{
800aefc: b8 40 60 00 mv r12,r2
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
800af00: 44 20 00 07 be r1,r0,800af1c <rtems_assoc_ptr_by_local+0x38><== NEVER TAKEN
800af04: 78 02 08 01 mvhi r2,0x801
800af08: 38 42 a8 f0 ori r2,r2,0xa8f0
800af0c: f8 00 04 9c calli 800c17c <strcmp>
800af10: 5c 20 00 03 bne r1,r0,800af1c <rtems_assoc_ptr_by_local+0x38><== ALWAYS TAKEN
default_ap = ap++;
800af14: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800af18: e0 00 00 05 bi 800af2c <rtems_assoc_ptr_by_local+0x48> <== NOT EXECUTED
800af1c: 34 01 00 00 mvi r1,0
800af20: e0 00 00 04 bi 800af30 <rtems_assoc_ptr_by_local+0x4c>
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
800af24: 29 62 00 04 lw r2,(r11+4)
800af28: 44 4c 00 05 be r2,r12,800af3c <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++)
800af2c: 35 6b 00 0c addi r11,r11,12
800af30: 29 62 00 00 lw r2,(r11+0)
800af34: 5c 40 ff fc bne r2,r0,800af24 <rtems_assoc_ptr_by_local+0x40>
800af38: b8 20 58 00 mv r11,r1
if (ap->local_value == local_value)
return ap;
return default_ap;
}
800af3c: b9 60 08 00 mv r1,r11
800af40: 2b 9d 00 04 lw ra,(sp+4)
800af44: 2b 8b 00 0c lw r11,(sp+12)
800af48: 2b 8c 00 08 lw r12,(sp+8)
800af4c: 37 9c 00 0c addi sp,sp,12
800af50: c3 a0 00 00 ret
0800a02c <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
800a02c: 37 9c ff f4 addi sp,sp,-12
800a030: 5b 8b 00 0c sw (sp+12),r11
800a034: 5b 8c 00 08 sw (sp+8),r12
800a038: 5b 9d 00 04 sw (sp+4),ra
800a03c: b8 20 58 00 mv r11,r1
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
800a040: 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
)
{
800a044: b8 40 60 00 mv r12,r2
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
800a048: 44 20 00 07 be r1,r0,800a064 <rtems_assoc_ptr_by_remote+0x38><== NEVER TAKEN
800a04c: 78 02 08 01 mvhi r2,0x801
800a050: 38 42 a8 f0 ori r2,r2,0xa8f0
800a054: f8 00 08 4a calli 800c17c <strcmp>
800a058: 5c 20 00 03 bne r1,r0,800a064 <rtems_assoc_ptr_by_remote+0x38><== ALWAYS TAKEN
default_ap = ap++;
800a05c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800a060: e0 00 00 05 bi 800a074 <rtems_assoc_ptr_by_remote+0x48> <== NOT EXECUTED
800a064: 34 01 00 00 mvi r1,0
800a068: e0 00 00 04 bi 800a078 <rtems_assoc_ptr_by_remote+0x4c>
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
800a06c: 29 62 00 08 lw r2,(r11+8)
800a070: 44 4c 00 05 be r2,r12,800a084 <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++)
800a074: 35 6b 00 0c addi r11,r11,12
800a078: 29 62 00 00 lw r2,(r11+0)
800a07c: 5c 40 ff fc bne r2,r0,800a06c <rtems_assoc_ptr_by_remote+0x40>
800a080: b8 20 58 00 mv r11,r1
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
800a084: b9 60 08 00 mv r1,r11
800a088: 2b 9d 00 04 lw ra,(sp+4)
800a08c: 2b 8b 00 0c lw r11,(sp+12)
800a090: 2b 8c 00 08 lw r12,(sp+8)
800a094: 37 9c 00 0c addi sp,sp,12
800a098: c3 a0 00 00 ret
0800ac08 <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
800ac08: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
800ac0c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
800ac10: f8 00 00 b5 calli 800aee4 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if (nap)
800ac14: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
800ac18: 44 20 00 02 be r1,r0,800ac20 <rtems_assoc_remote_by_local+0x18><== NOT EXECUTED
return nap->remote_value;
800ac1c: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED
return 0;
}
800ac20: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
800ac24: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800ac28: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
800ac2c: 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 2c 77 calli 800c194 <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 a6 30 ori r1,r1,0xa630
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 3a calli 8004a88 <_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 6a 8e calli 801dff0 <__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 29 3e calli 800dac0 <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 20 c4 ori r1,r1,0x20c4
800360c: 28 22 00 0c lw r2,(r1+12)
8003610: 2b 81 00 40 lw r1,(sp+64)
8003614: f8 00 6a d6 calli 801e16c <__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 dd d4 ori r2,r2,0xddd4 <== 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 1a calli 8004b20 <_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 a8 50 ori r1,r1,0xa850
8001ac8: ba 20 10 00 mv r2,r17
8001acc: ba e0 18 00 mv r3,r23
8001ad0: f8 00 16 82 calli 80074d8 <_Timespec_Subtract>
}
}
}
#endif
(*print)(
8001ad4: 78 02 08 01 mvhi r2,0x801
8001ad8: b9 c0 08 00 mv r1,r14
8001adc: 78 0b 08 02 mvhi r11,0x802
8001ae0: 38 42 f4 c8 ori r2,r2,0xf4c8
/*
* 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 a5 b8 ori r11,r11,0xa5b8
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
8001af0: 39 ef a6 d8 ori r15,r15,0xa6d8
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
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 01 mvhi r25,0x801
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
_Timestamp_Subtract(
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 01 mvhi r2,0x801
8001b50: 38 42 f6 3c ori r2,r2,0xf63c
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 a6 e0 ori r1,r1,0xa6e0
8001b88: ba 20 10 00 mv r2,r17
8001b8c: ba 80 18 00 mv r3,r20
8001b90: f8 00 16 52 calli 80074d8 <_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 15 e2 calli 8007324 <_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 15 f4 calli 8007380 <_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 71 6c calli 801e16c <__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 f6 50 ori r2,r2,0xf650
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 a5 c8 ori r1,r1,0xa5c8
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 71 59 calli 801e16c <__udivsi3>
8001c0c: 2b 83 00 68 lw r3,(sp+104)
8001c10: 78 02 08 01 mvhi r2,0x801
8001c14: b8 20 20 00 mv r4,r1
8001c18: 38 42 f6 68 ori r2,r2,0xf668
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
0800abc8 <rtems_deviceio_errno>:
{ 0, 0, 0 },
};
int
rtems_deviceio_errno(rtems_status_code code)
{
800abc8: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
800abcc: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
800abd0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
800abd4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
800abd8: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
800abdc: 38 21 a9 94 ori r1,r1,0xa994 <== NOT EXECUTED
800abe0: f8 00 00 0a calli 800ac08 <rtems_assoc_remote_by_local> <== NOT EXECUTED
800abe4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
800abe8: 44 20 00 03 be r1,r0,800abf4 <rtems_deviceio_errno+0x2c> <== NOT EXECUTED
{
errno = rc;
800abec: f8 00 00 e4 calli 800af7c <__errno> <== NOT EXECUTED
800abf0: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
return -1;
}
return -1;
}
800abf4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
800abf8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800abfc: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
800ac00: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
800ac04: c3 a0 00 00 ret <== NOT EXECUTED
08006da0 <rtems_error>:
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
...
)
{
8006da0: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED
8006da4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8006da8: 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);
8006dac: 37 83 00 0c addi r3,sp,12 <== NOT EXECUTED
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
...
)
{
8006db0: 5b 84 00 10 sw (sp+16),r4 <== NOT EXECUTED
8006db4: 5b 85 00 14 sw (sp+20),r5 <== NOT EXECUTED
8006db8: 5b 86 00 18 sw (sp+24),r6 <== NOT EXECUTED
8006dbc: 5b 87 00 1c sw (sp+28),r7 <== NOT EXECUTED
8006dc0: 5b 88 00 20 sw (sp+32),r8 <== NOT EXECUTED
8006dc4: 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);
8006dc8: fb ff ff 60 calli 8006b48 <rtems_verror> <== NOT EXECUTED
va_end(arglist);
return chars_written;
}
8006dcc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8006dd0: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED
8006dd4: 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 2d 6f calli 800c2bc <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 28 47 calli 800af7c <__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 28 43 calli 800af7c <__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 c1 10 ori r1,r1,0xc110
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 2a d8 calli 800ba14 <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 c1 10 ori r1,r1,0xc110
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 2a cf calli 800ba14 <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 28 86 calli 800af7c <__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 28 82 calli 800af7c <__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 28 63 calli 800af7c <__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 c1 10 ori r11,r11,0xc110
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 a1 24 ori r1,r1,0xa124
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 c0 18 ori r1,r1,0xc018
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 aa calli 80026a0 <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 2b 80 calli 800ba14 <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 a3 80 ori r1,r1,0xa380
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 2b 73 calli 800ba14 <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 a3 80 ori r1,r1,0xa380
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 2b 67 calli 800ba14 <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 a3 84 ori r1,r1,0xa384
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
080068b0 <rtems_filesystem_nodes_equal>:
);
bool rtems_filesystem_nodes_equal(
const rtems_filesystem_location_info_t *loc1,
const rtems_filesystem_location_info_t *loc2
){
80068b0: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED
80068b4: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED
return ( loc1->node_access == loc2->node_access );
}
80068b8: e4 61 08 00 cmpe r1,r3,r1 <== NOT EXECUTED
80068bc: 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 2e 1b calli 800c2bc <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 29 3b calli 800af7c <__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 2d f7 calli 800c2bc <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
08005284 <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)
{
8005284: 37 9c ff e4 addi sp,sp,-28
8005288: 5b 8b 00 1c sw (sp+28),r11
800528c: 5b 8c 00 18 sw (sp+24),r12
8005290: 5b 8d 00 14 sw (sp+20),r13
8005294: 5b 8e 00 10 sw (sp+16),r14
8005298: 5b 8f 00 0c sw (sp+12),r15
800529c: 5b 90 00 08 sw (sp+8),r16
80052a0: 5b 9d 00 04 sw (sp+4),ra
80052a4: b8 20 78 00 mv r15,r1
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
80052a8: 44 20 00 17 be r1,r0,8005304 <rtems_iterate_over_all_threads+0x80><== NEVER TAKEN
80052ac: 78 0b 08 02 mvhi r11,0x802
80052b0: 39 6b a5 b8 ori r11,r11,0xa5b8
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
80052b4: 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 ] )
80052b8: 29 61 00 00 lw r1,(r11+0)
80052bc: 44 20 00 10 be r1,r0,80052fc <rtems_iterate_over_all_threads+0x78>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
80052c0: 28 2c 00 04 lw r12,(r1+4)
if ( !information )
80052c4: 34 0e 00 04 mvi r14,4
80052c8: 34 0d 00 01 mvi r13,1
80052cc: 5d 80 00 0a bne r12,r0,80052f4 <rtems_iterate_over_all_threads+0x70>
80052d0: e0 00 00 0b bi 80052fc <rtems_iterate_over_all_threads+0x78>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
80052d4: 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++ ) {
80052d8: 35 ad 00 01 addi r13,r13,1
the_thread = (Thread_Control *)information->local_table[ i ];
80052dc: b4 2e 08 00 add r1,r1,r14
80052e0: 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++ ) {
80052e4: 35 ce 00 04 addi r14,r14,4
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
(*routine)(the_thread);
80052e8: 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 )
80052ec: 44 40 00 02 be r2,r0,80052f4 <rtems_iterate_over_all_threads+0x70><== NEVER TAKEN
continue;
(*routine)(the_thread);
80052f0: d9 e0 00 00 call r15
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
80052f4: 2d 81 00 10 lhu r1,(r12+16)
80052f8: 50 2d ff f7 bgeu r1,r13,80052d4 <rtems_iterate_over_all_threads+0x50>
80052fc: 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++ ) {
8005300: 5d 70 ff ee bne r11,r16,80052b8 <rtems_iterate_over_all_threads+0x34>
(*routine)(the_thread);
}
}
}
8005304: 2b 9d 00 04 lw ra,(sp+4)
8005308: 2b 8b 00 1c lw r11,(sp+28)
800530c: 2b 8c 00 18 lw r12,(sp+24)
8005310: 2b 8d 00 14 lw r13,(sp+20)
8005314: 2b 8e 00 10 lw r14,(sp+16)
8005318: 2b 8f 00 0c lw r15,(sp+12)
800531c: 2b 90 00 08 lw r16,(sp+8)
8005320: 37 9c 00 1c addi sp,sp,28
8005324: c3 a0 00 00 ret
0800751c <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 )
{
800751c: 37 9c ff ec addi sp,sp,-20
8007520: 5b 8b 00 10 sw (sp+16),r11
8007524: 5b 8c 00 0c sw (sp+12),r12
8007528: 5b 8d 00 08 sw (sp+8),r13
800752c: 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 );
8007530: 78 01 08 01 mvhi r1,0x801
8007534: 38 21 c6 a8 ori r1,r1,0xc6a8
8007538: 28 21 00 00 lw r1,(r1+0)
800753c: 34 02 00 00 mvi r2,0
rtems_status_code rc;
rtems_id sema;
rtems_libio_lock();
if (rtems_libio_iop_freelist) {
8007540: 78 0c 08 01 mvhi r12,0x801
8007544: b8 40 18 00 mv r3,r2
8007548: 39 8c c6 a4 ori r12,r12,0xc6a4
800754c: f8 00 01 64 calli 8007adc <rtems_semaphore_obtain>
8007550: 29 81 00 00 lw r1,(r12+0)
8007554: 44 20 00 1f be r1,r0,80075d0 <rtems_libio_allocate+0xb4>
rc = rtems_semaphore_create(
8007558: 78 02 08 01 mvhi r2,0x801
800755c: 38 42 c6 a0 ori r2,r2,0xc6a0
8007560: 28 43 00 00 lw r3,(r2+0)
8007564: 34 02 00 03 mvi r2,3
8007568: c8 23 08 00 sub r1,r1,r3
800756c: fb ff e3 71 calli 8000330 <__ashrsi3>
8007570: 78 02 38 e3 mvhi r2,0x38e3
8007574: 38 42 8e 39 ori r2,r2,0x8e39
8007578: f8 00 46 6d calli 8018f2c <__mulsi3>
800757c: 78 02 4c 42 mvhi r2,0x4c42
8007580: 38 42 49 00 ori r2,r2,0x4900
8007584: b8 22 08 00 or r1,r1,r2
8007588: 34 03 00 54 mvi r3,84
800758c: 34 02 00 01 mvi r2,1
8007590: 34 04 00 00 mvi r4,0
8007594: 37 85 00 14 addi r5,sp,20
8007598: fb ff ea 6e calli 8001f50 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
0,
&sema
);
if (rc != RTEMS_SUCCESSFUL)
800759c: 5c 20 00 0d bne r1,r0,80075d0 <rtems_libio_allocate+0xb4> <== NEVER TAKEN
goto failed;
iop = rtems_libio_iop_freelist;
80075a0: 29 8b 00 00 lw r11,(r12+0)
next = iop->data1;
(void) memset( iop, 0, sizeof(rtems_libio_t) );
80075a4: b8 20 10 00 mv r2,r1
80075a8: 34 03 00 48 mvi r3,72
80075ac: b9 60 08 00 mv r1,r11
&sema
);
if (rc != RTEMS_SUCCESSFUL)
goto failed;
iop = rtems_libio_iop_freelist;
next = iop->data1;
80075b0: 29 6d 00 38 lw r13,(r11+56)
(void) memset( iop, 0, sizeof(rtems_libio_t) );
80075b4: f8 00 11 76 calli 800bb8c <memset>
iop->flags = LIBIO_FLAGS_OPEN;
80075b8: 34 01 01 00 mvi r1,256
80075bc: 59 61 00 18 sw (r11+24),r1
iop->sem = sema;
80075c0: 2b 81 00 14 lw r1,(sp+20)
rtems_libio_iop_freelist = next;
80075c4: 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;
80075c8: 59 61 00 30 sw (r11+48),r1
rtems_libio_iop_freelist = next;
goto done;
80075cc: e0 00 00 02 bi 80075d4 <rtems_libio_allocate+0xb8>
80075d0: 34 0b 00 00 mvi r11,0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
80075d4: 78 01 08 01 mvhi r1,0x801
80075d8: 38 21 c6 a8 ori r1,r1,0xc6a8
80075dc: 28 21 00 00 lw r1,(r1+0)
80075e0: f8 00 01 8f calli 8007c1c <rtems_semaphore_release>
iop = 0;
done:
rtems_libio_unlock();
return iop;
}
80075e4: b9 60 08 00 mv r1,r11
80075e8: 2b 9d 00 04 lw ra,(sp+4)
80075ec: 2b 8b 00 10 lw r11,(sp+16)
80075f0: 2b 8c 00 0c lw r12,(sp+12)
80075f4: 2b 8d 00 08 lw r13,(sp+8)
80075f8: 37 9c 00 14 addi sp,sp,20
80075fc: c3 a0 00 00 ret
080074a4 <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
80074a4: 37 9c ff f8 addi sp,sp,-8
80074a8: 5b 8b 00 08 sw (sp+8),r11
80074ac: 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 );
80074b0: 78 02 08 01 mvhi r2,0x801
80074b4: 38 42 c6 a8 ori r2,r2,0xc6a8
80074b8: b8 20 58 00 mv r11,r1
80074bc: 28 41 00 00 lw r1,(r2+0)
80074c0: 34 02 00 00 mvi r2,0
80074c4: b8 40 18 00 mv r3,r2
80074c8: f8 00 01 85 calli 8007adc <rtems_semaphore_obtain>
rtems_libio_lock();
if (iop->sem)
80074cc: 29 61 00 30 lw r1,(r11+48)
80074d0: 44 20 00 02 be r1,r0,80074d8 <rtems_libio_free+0x34> <== NEVER TAKEN
rtems_semaphore_delete(iop->sem);
80074d4: f8 00 01 46 calli 80079ec <rtems_semaphore_delete>
iop->flags &= ~LIBIO_FLAGS_OPEN;
80074d8: 29 63 00 18 lw r3,(r11+24)
80074dc: 34 01 fe ff mvi r1,-257
iop->data1 = rtems_libio_iop_freelist;
80074e0: 78 02 08 01 mvhi r2,0x801
80074e4: 38 42 c6 a4 ori r2,r2,0xc6a4
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
80074e8: a0 61 18 00 and r3,r3,r1
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
80074ec: 78 01 08 01 mvhi r1,0x801
80074f0: 59 63 00 18 sw (r11+24),r3
80074f4: 38 21 c6 a8 ori r1,r1,0xc6a8
iop->data1 = rtems_libio_iop_freelist;
80074f8: 28 43 00 00 lw r3,(r2+0)
80074fc: 28 21 00 00 lw r1,(r1+0)
rtems_libio_iop_freelist = iop;
8007500: 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;
8007504: 59 63 00 38 sw (r11+56),r3
8007508: f8 00 01 c5 calli 8007c1c <rtems_semaphore_release>
rtems_libio_iop_freelist = iop;
rtems_libio_unlock();
}
800750c: 2b 9d 00 04 lw ra,(sp+4)
8007510: 2b 8b 00 08 lw r11,(sp+8)
8007514: 37 9c 00 08 addi sp,sp,8
8007518: 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 c0 10 ori r11,r11,0xc010
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 17 f9 calli 8006f20 <calloc>
8000f40: 78 02 08 01 mvhi r2,0x801
8000f44: 38 42 c6 a0 ori r2,r2,0xc6a0
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 c6 a4 ori r2,r2,0xc6a4
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 c6 a8 ori r5,r5,0xc6a8
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 bb calli 80026a0 <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 c0 0c ori r2,r2,0xc00c
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
08002ce4 <rtems_libio_set_private_env>:
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
8002ce4: 37 9c ff d4 addi sp,sp,-44
8002ce8: 5b 8b 00 14 sw (sp+20),r11
8002cec: 5b 8c 00 10 sw (sp+16),r12
8002cf0: 5b 8d 00 0c sw (sp+12),r13
8002cf4: 5b 8e 00 08 sw (sp+8),r14
8002cf8: 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);
8002cfc: 34 01 00 00 mvi r1,0
8002d00: b8 20 10 00 mv r2,r1
8002d04: 37 83 00 2c addi r3,sp,44
8002d08: f8 00 02 9a calli 8003770 <rtems_task_ident>
8002d0c: b8 20 60 00 mv r12,r1
if (sc != RTEMS_SUCCESSFUL) return sc;
8002d10: 5c 20 00 43 bne r1,r0,8002e1c <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) {
8002d14: 78 0b 08 01 mvhi r11,0x801
8002d18: 39 6b e0 f8 ori r11,r11,0xe0f8
8002d1c: 29 62 00 00 lw r2,(r11+0)
8002d20: 78 01 08 01 mvhi r1,0x801
8002d24: 38 21 e6 e4 ori r1,r1,0xe6e4
8002d28: 5c 41 00 13 bne r2,r1,8002d74 <rtems_libio_set_private_env+0x90>
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
8002d2c: 34 01 00 48 mvi r1,72
8002d30: fb ff fc b9 calli 8002014 <malloc>
8002d34: b8 20 68 00 mv r13,r1
if (!tmp)
8002d38: 5c 20 00 03 bne r1,r0,8002d44 <rtems_libio_set_private_env+0x60><== ALWAYS TAKEN
8002d3c: 34 0c 00 1a mvi r12,26 <== NOT EXECUTED
8002d40: e0 00 00 37 bi 8002e1c <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);
8002d44: 78 03 08 00 mvhi r3,0x800
8002d48: 38 63 2b b8 ori r3,r3,0x2bb8
8002d4c: b9 80 08 00 mv r1,r12
8002d50: b9 60 10 00 mv r2,r11
8002d54: f8 00 02 f2 calli 800391c <rtems_task_variable_add>
8002d58: b8 20 70 00 mv r14,r1
if (sc != RTEMS_SUCCESSFUL) {
8002d5c: 44 20 00 05 be r1,r0,8002d70 <rtems_libio_set_private_env+0x8c><== ALWAYS TAKEN
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
8002d60: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8002d64: fb ff fa e3 calli 80018f0 <free> <== NOT EXECUTED
8002d68: b9 c0 60 00 mv r12,r14 <== NOT EXECUTED
return sc;
8002d6c: e0 00 00 2c bi 8002e1c <rtems_libio_set_private_env+0x138> <== NOT EXECUTED
}
rtems_current_user_env = tmp;
8002d70: 59 6d 00 00 sw (r11+0),r13
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
8002d74: 78 0b 08 01 mvhi r11,0x801
8002d78: 39 6b e0 f8 ori r11,r11,0xe0f8
8002d7c: 29 6d 00 00 lw r13,(r11+0)
8002d80: 78 02 08 01 mvhi r2,0x801
8002d84: 38 42 e6 e4 ori r2,r2,0xe6e4
8002d88: 34 03 00 48 mvi r3,72
8002d8c: b9 a0 08 00 mv r1,r13
8002d90: f8 00 2a 69 calli 800d734 <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
8002d94: 78 01 08 01 mvhi r1,0x801
8002d98: 38 21 e6 d8 ori r1,r1,0xe6d8
8002d9c: 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*/
8002da0: 2b 81 00 2c lw r1,(sp+44)
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
8002da4: 34 03 00 14 mvi r3,20
8002da8: 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*/
8002dac: 59 a1 00 00 sw (r13+0),r1
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
8002db0: 35 a1 00 18 addi r1,r13,24
8002db4: f8 00 2a 60 calli 800d734 <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);
8002db8: 37 8d 00 18 addi r13,sp,24
8002dbc: 34 03 00 00 mvi r3,0
8002dc0: 78 01 08 01 mvhi r1,0x801
8002dc4: b8 60 28 00 mv r5,r3
8002dc8: b9 a0 20 00 mv r4,r13
8002dcc: 34 02 00 01 mvi r2,1
8002dd0: 38 21 c8 c8 ori r1,r1,0xc8c8
8002dd4: fb ff fa 8a calli 80017fc <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
8002dd8: 29 61 00 00 lw r1,(r11+0)
8002ddc: b9 a0 10 00 mv r2,r13
8002de0: 34 03 00 14 mvi r3,20
8002de4: 34 21 00 18 addi r1,r1,24
8002de8: f8 00 2a 53 calli 800d734 <memcpy>
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8002dec: 34 03 00 00 mvi r3,0
8002df0: 78 01 08 01 mvhi r1,0x801
8002df4: 34 02 00 01 mvi r2,1
8002df8: b8 60 28 00 mv r5,r3
8002dfc: 38 21 c8 c8 ori r1,r1,0xc8c8
8002e00: b9 a0 20 00 mv r4,r13
8002e04: fb ff fa 7e calli 80017fc <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
8002e08: 29 61 00 00 lw r1,(r11+0)
8002e0c: b9 a0 10 00 mv r2,r13
8002e10: 34 03 00 14 mvi r3,20
8002e14: 34 21 00 04 addi r1,r1,4
8002e18: f8 00 2a 47 calli 800d734 <memcpy>
return RTEMS_SUCCESSFUL;
}
8002e1c: b9 80 08 00 mv r1,r12
8002e20: 2b 9d 00 04 lw ra,(sp+4)
8002e24: 2b 8b 00 14 lw r11,(sp+20)
8002e28: 2b 8c 00 10 lw r12,(sp+16)
8002e2c: 2b 8d 00 0c lw r13,(sp+12)
8002e30: 2b 8e 00 08 lw r14,(sp+8)
8002e34: 37 9c 00 2c addi sp,sp,44
8002e38: c3 a0 00 00 ret
08002c1c <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) {
8002c1c: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED
8002c20: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED
8002c24: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED
8002c28: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8002c2c: 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);
8002c30: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8002c34: 37 83 00 10 addi r3,sp,16 <== NOT EXECUTED
8002c38: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
8002c3c: f8 00 02 cd calli 8003770 <rtems_task_ident> <== NOT EXECUTED
8002c40: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
8002c44: 5c 20 00 22 bne r1,r0,8002ccc <rtems_libio_share_private_env+0xb0><== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
8002c48: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8002c4c: 38 42 e0 f8 ori r2,r2,0xe0f8 <== NOT EXECUTED
8002c50: 28 4b 00 00 lw r11,(r2+0) <== NOT EXECUTED
8002c54: 2b 83 00 10 lw r3,(sp+16) <== NOT EXECUTED
8002c58: 29 64 00 00 lw r4,(r11+0) <== NOT EXECUTED
8002c5c: 5c 83 00 06 bne r4,r3,8002c74 <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);
8002c60: f8 00 03 5f calli 80039dc <rtems_task_variable_delete> <== NOT EXECUTED
8002c64: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
8002c68: 5c 20 00 19 bne r1,r0,8002ccc <rtems_libio_share_private_env+0xb0><== NOT EXECUTED
free_user_env(tmp);
8002c6c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8002c70: fb ff ff d2 calli 8002bb8 <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,
8002c74: 78 0b 08 01 mvhi r11,0x801 <== NOT EXECUTED
8002c78: 39 6b e0 f8 ori r11,r11,0xe0f8 <== NOT EXECUTED
8002c7c: 37 83 00 14 addi r3,sp,20 <== NOT EXECUTED
8002c80: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8002c84: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8002c88: f8 00 03 78 calli 8003a68 <rtems_task_variable_get> <== NOT EXECUTED
8002c8c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
8002c90: 5c 20 00 0a bne r1,r0,8002cb8 <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);
8002c94: 78 03 08 00 mvhi r3,0x800 <== NOT EXECUTED
8002c98: 38 63 2b b8 ori r3,r3,0x2bb8 <== NOT EXECUTED
8002c9c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8002ca0: f8 00 03 1f calli 800391c <rtems_task_variable_add> <== NOT EXECUTED
8002ca4: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
8002ca8: 5c 20 00 04 bne r1,r0,8002cb8 <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;
8002cac: 2b 81 00 14 lw r1,(sp+20) <== NOT EXECUTED
8002cb0: 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;
8002cb4: e0 00 00 06 bi 8002ccc <rtems_libio_share_private_env+0xb0><== NOT EXECUTED
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
8002cb8: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8002cbc: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8002cc0: 38 21 e0 f8 ori r1,r1,0xe0f8 <== NOT EXECUTED
8002cc4: 38 42 e6 e4 ori r2,r2,0xe6e4 <== NOT EXECUTED
8002cc8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
return sc;
}
8002ccc: b8 60 08 00 mv r1,r3 <== NOT EXECUTED
8002cd0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002cd4: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8002cd8: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8002cdc: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
8002ce0: c3 a0 00 00 ret <== NOT EXECUTED
08007304 <rtems_libio_to_fcntl_flags>:
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
8007304: 37 9c ff f8 addi sp,sp,-8
8007308: 5b 8b 00 08 sw (sp+8),r11
800730c: 5b 9d 00 04 sw (sp+4),ra
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
8007310: 34 03 00 06 mvi r3,6
8007314: 20 24 00 06 andi r4,r1,0x6
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
8007318: b8 20 58 00 mv r11,r1
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
800731c: 34 02 00 02 mvi r2,2
8007320: 44 83 00 07 be r4,r3,800733c <rtems_libio_to_fcntl_flags+0x38><== NEVER TAKEN
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
8007324: a0 22 18 00 and r3,r1,r2
8007328: 34 02 00 00 mvi r2,0
800732c: 5c 62 00 04 bne r3,r2,800733c <rtems_libio_to_fcntl_flags+0x38><== ALWAYS TAKEN
8007330: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8007334: fb ff e3 d7 calli 8000290 <__lshrsi3> <== NOT EXECUTED
8007338: 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 ) {
800733c: 21 61 00 01 andi r1,r11,0x1
8007340: 44 20 00 02 be r1,r0,8007348 <rtems_libio_to_fcntl_flags+0x44>
fcntl_flags |= O_NONBLOCK;
8007344: 38 42 40 00 ori r2,r2,0x4000
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
8007348: 21 61 02 00 andi r1,r11,0x200
800734c: 44 20 00 02 be r1,r0,8007354 <rtems_libio_to_fcntl_flags+0x50>
fcntl_flags |= O_APPEND;
8007350: 38 42 00 08 ori r2,r2,0x8
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
8007354: 21 6b 04 00 andi r11,r11,0x400
8007358: 45 60 00 02 be r11,r0,8007360 <rtems_libio_to_fcntl_flags+0x5c>
fcntl_flags |= O_CREAT;
800735c: 38 42 02 00 ori r2,r2,0x200
}
return fcntl_flags;
}
8007360: b8 40 08 00 mv r1,r2
8007364: 2b 9d 00 04 lw ra,(sp+4)
8007368: 2b 8b 00 08 lw r11,(sp+8)
800736c: 37 9c 00 08 addi sp,sp,8
8007370: c3 a0 00 00 ret
0800d3b8 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
800d3b8: 37 9c ff f0 addi sp,sp,-16
800d3bc: 5b 8b 00 10 sw (sp+16),r11
800d3c0: 5b 8c 00 0c sw (sp+12),r12
800d3c4: 5b 8d 00 08 sw (sp+8),r13
800d3c8: 5b 9d 00 04 sw (sp+4),ra
800d3cc: b8 20 58 00 mv r11,r1
800d3d0: b8 40 60 00 mv r12,r2
800d3d4: b8 60 68 00 mv r13,r3
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
800d3d8: 44 20 00 1f be r1,r0,800d454 <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()) &&
800d3dc: 78 01 08 02 mvhi r1,0x802
800d3e0: 38 21 3a 58 ori r1,r1,0x3a58
800d3e4: 28 22 00 00 lw r2,(r1+0)
* Parameter error checks
*/
if ( !pointer )
return EINVAL;
*pointer = NULL;
800d3e8: 34 01 00 00 mvi r1,0
800d3ec: 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()) &&
800d3f0: 34 01 00 03 mvi r1,3
800d3f4: 5c 41 00 03 bne r2,r1,800d400 <rtems_memalign+0x48> <== NEVER TAKEN
800d3f8: fb ff d6 10 calli 8002c38 <malloc_is_system_state_OK>
800d3fc: 44 20 00 16 be r1,r0,800d454 <rtems_memalign+0x9c> <== NEVER TAKEN
/*
*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
800d400: fb ff d6 29 calli 8002ca4 <malloc_deferred_frees_process>
uintptr_t size,
uintptr_t alignment
)
{
return
_Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 );
800d404: 78 01 08 02 mvhi r1,0x802
800d408: 38 21 30 1c ori r1,r1,0x301c
800d40c: 28 21 00 00 lw r1,(r1+0)
800d410: b9 a0 10 00 mv r2,r13
800d414: b9 80 18 00 mv r3,r12
800d418: 34 04 00 00 mvi r4,0
800d41c: fb ff e3 43 calli 8006128 <_Protected_heap_Allocate_aligned_with_boundary>
800d420: b8 20 60 00 mv r12,r1
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
800d424: 34 02 00 0c mvi r2,12
800d428: 44 20 00 0c be r1,r0,800d458 <rtems_memalign+0xa0>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
800d42c: 78 02 08 02 mvhi r2,0x802
800d430: 38 42 36 30 ori r2,r2,0x3630
800d434: 28 41 00 00 lw r1,(r2+0)
800d438: 44 20 00 04 be r1,r0,800d448 <rtems_memalign+0x90> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
800d43c: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED
800d440: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800d444: 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;
800d448: 59 6c 00 00 sw (r11+0),r12
800d44c: 34 02 00 00 mvi r2,0
return 0;
800d450: e0 00 00 02 bi 800d458 <rtems_memalign+0xa0>
800d454: 34 02 00 16 mvi r2,22
}
800d458: b8 40 08 00 mv r1,r2
800d45c: 2b 9d 00 04 lw ra,(sp+4)
800d460: 2b 8b 00 10 lw r11,(sp+16)
800d464: 2b 8c 00 0c lw r12,(sp+12)
800d468: 2b 8d 00 08 lw r13,(sp+8)
800d46c: 37 9c 00 10 addi sp,sp,16
800d470: c3 a0 00 00 ret
08006d54 <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
8006d54: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED
8006d58: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8006d5c: b8 20 48 00 mv r9,r1 <== NOT EXECUTED
8006d60: 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);
8006d64: 78 01 20 00 mvhi r1,0x2000 <== NOT EXECUTED
void rtems_panic(
const char *printf_format,
...
)
{
8006d68: 5b 82 00 0c sw (sp+12),r2 <== NOT EXECUTED
8006d6c: 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);
8006d70: b9 20 10 00 mv r2,r9 <== NOT EXECUTED
8006d74: 37 83 00 0c addi r3,sp,12 <== NOT EXECUTED
8006d78: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED
void rtems_panic(
const char *printf_format,
...
)
{
8006d7c: 5b 84 00 14 sw (sp+20),r4 <== NOT EXECUTED
8006d80: 5b 85 00 18 sw (sp+24),r5 <== NOT EXECUTED
8006d84: 5b 86 00 1c sw (sp+28),r6 <== NOT EXECUTED
8006d88: 5b 87 00 20 sw (sp+32),r7 <== NOT EXECUTED
8006d8c: 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);
8006d90: fb ff ff 6e calli 8006b48 <rtems_verror> <== NOT EXECUTED
va_end(arglist);
}
8006d94: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8006d98: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED
8006d9c: 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 dc 34 ori r2,r2,0xdc34
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 da 7c ori r1,r1,0xda7c
8011118: f8 00 15 86 calli 8016730 <_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 21 calli 80179a8 <_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 77 8f calli 802ef88 <__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 36 calli 8014e3c <_Chain_Initialize>
8011168: 78 02 08 03 mvhi r2,0x803
801116c: 29 6c 00 08 lw r12,(r11+8)
8011170: 38 42 da 7c ori r2,r2,0xda7c
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 05 calli 80179a8 <_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
080093b4 <rtems_pipe_initialize>:
/*
* Initialization of FIFO/pipe module.
*/
void rtems_pipe_initialize (void)
{
80093b4: 37 9c ff f8 addi sp,sp,-8
80093b8: 5b 8b 00 08 sw (sp+8),r11
80093bc: 5b 9d 00 04 sw (sp+4),ra
if (!rtems_pipe_configured)
80093c0: 78 01 08 01 mvhi r1,0x801
80093c4: 38 21 c6 0c ori r1,r1,0xc60c
80093c8: 40 21 00 00 lbu r1,(r1+0)
80093cc: 44 20 00 11 be r1,r0,8009410 <rtems_pipe_initialize+0x5c> <== ALWAYS TAKEN
return;
if (rtems_pipe_semaphore)
80093d0: 78 05 08 01 mvhi r5,0x801 <== NOT EXECUTED
80093d4: 38 a5 c6 2c ori r5,r5,0xc62c <== NOT EXECUTED
80093d8: 28 ab 00 00 lw r11,(r5+0) <== NOT EXECUTED
80093dc: 5d 60 00 0d bne r11,r0,8009410 <rtems_pipe_initialize+0x5c><== NOT EXECUTED
return;
rtems_status_code sc;
sc = rtems_semaphore_create(
80093e0: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED
80093e4: 38 21 50 45 ori r1,r1,0x5045 <== NOT EXECUTED
80093e8: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
80093ec: 34 03 00 54 mvi r3,84 <== NOT EXECUTED
80093f0: b9 60 20 00 mv r4,r11 <== NOT EXECUTED
80093f4: fb ff e2 d7 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)
80093f8: 44 2b 00 02 be r1,r11,8009400 <rtems_pipe_initialize+0x4c> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
80093fc: fb ff e4 a9 calli 80026a0 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
8009400: f8 00 03 c3 calli 800a30c <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
rtems_pipe_no = now;
8009404: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8009408: 38 42 c6 32 ori r2,r2,0xc632 <== NOT EXECUTED
800940c: 0c 41 00 00 sh (r2+0),r1 <== NOT EXECUTED
}
8009410: 2b 9d 00 04 lw ra,(sp+4)
8009414: 2b 8b 00 08 lw r11,(sp+8)
8009418: 37 9c 00 08 addi sp,sp,8
800941c: c3 a0 00 00 ret
08009f70 <rtems_rate_monotonic_get_statistics>:
rtems_status_code rtems_rate_monotonic_get_statistics(
rtems_id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
8009f70: 37 9c ff f0 addi sp,sp,-16
8009f74: 5b 8b 00 0c sw (sp+12),r11
8009f78: 5b 8c 00 08 sw (sp+8),r12
8009f7c: 5b 9d 00 04 sw (sp+4),ra
8009f80: b8 40 58 00 mv r11,r2
Objects_Locations location;
Rate_monotonic_Control *the_period;
rtems_rate_monotonic_period_statistics *dst;
Rate_monotonic_Statistics *src;
if ( !statistics )
8009f84: 34 03 00 09 mvi r3,9
rtems_status_code rtems_rate_monotonic_get_statistics(
rtems_id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
8009f88: b8 20 10 00 mv r2,r1
Objects_Locations location;
Rate_monotonic_Control *the_period;
rtems_rate_monotonic_period_statistics *dst;
Rate_monotonic_Statistics *src;
if ( !statistics )
8009f8c: 45 60 00 26 be r11,r0,800a024 <rtems_rate_monotonic_get_statistics+0xb4>
8009f90: 78 01 08 02 mvhi r1,0x802
8009f94: 37 83 00 10 addi r3,sp,16
8009f98: 38 21 28 04 ori r1,r1,0x2804
8009f9c: fb ff ee e4 calli 8005b2c <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
8009fa0: 2b 8c 00 10 lw r12,(sp+16)
8009fa4: 34 03 00 04 mvi r3,4
8009fa8: 5d 80 00 1f bne r12,r0,800a024 <rtems_rate_monotonic_get_statistics+0xb4><== NEVER TAKEN
case OBJECTS_LOCAL:
dst = statistics;
src = &the_period->Statistics;
dst->count = src->count;
8009fac: 28 22 00 54 lw r2,(r1+84)
8009fb0: 59 62 00 00 sw (r11+0),r2
dst->missed_count = src->missed_count;
8009fb4: 28 22 00 58 lw r2,(r1+88)
8009fb8: 59 62 00 04 sw (r11+4),r2
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time );
8009fbc: 28 22 00 5c lw r2,(r1+92)
8009fc0: 59 62 00 08 sw (r11+8),r2
8009fc4: 28 22 00 60 lw r2,(r1+96)
8009fc8: 59 62 00 0c sw (r11+12),r2
_Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time );
8009fcc: 28 22 00 64 lw r2,(r1+100)
8009fd0: 59 62 00 10 sw (r11+16),r2
8009fd4: 28 22 00 68 lw r2,(r1+104)
8009fd8: 59 62 00 14 sw (r11+20),r2
_Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time );
8009fdc: 28 22 00 6c lw r2,(r1+108)
8009fe0: 59 62 00 18 sw (r11+24),r2
8009fe4: 28 22 00 70 lw r2,(r1+112)
8009fe8: 59 62 00 1c sw (r11+28),r2
_Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time );
8009fec: 28 22 00 74 lw r2,(r1+116)
8009ff0: 59 62 00 20 sw (r11+32),r2
8009ff4: 28 22 00 78 lw r2,(r1+120)
8009ff8: 59 62 00 24 sw (r11+36),r2
_Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time );
8009ffc: 28 22 00 7c lw r2,(r1+124)
800a000: 59 62 00 28 sw (r11+40),r2
800a004: 28 22 00 80 lw r2,(r1+128)
800a008: 59 62 00 2c sw (r11+44),r2
_Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time );
800a00c: 28 22 00 84 lw r2,(r1+132)
800a010: 59 62 00 30 sw (r11+48),r2
800a014: 28 21 00 88 lw r1,(r1+136)
800a018: 59 61 00 34 sw (r11+52),r1
dst->min_wall_time = src->min_wall_time;
dst->max_wall_time = src->max_wall_time;
dst->total_wall_time = src->total_wall_time;
#endif
_Thread_Enable_dispatch();
800a01c: fb ff f1 23 calli 80064a8 <_Thread_Enable_dispatch>
800a020: b9 80 18 00 mv r3,r12
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
800a024: b8 60 08 00 mv r1,r3
800a028: 2b 9d 00 04 lw ra,(sp+4)
800a02c: 2b 8b 00 0c lw r11,(sp+12)
800a030: 2b 8c 00 08 lw r12,(sp+8)
800a034: 37 9c 00 10 addi sp,sp,16
800a038: c3 a0 00 00 ret
080036ec <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
80036ec: 37 9c ff e8 addi sp,sp,-24
80036f0: 5b 8b 00 14 sw (sp+20),r11
80036f4: 5b 8c 00 10 sw (sp+16),r12
80036f8: 5b 8d 00 0c sw (sp+12),r13
80036fc: 5b 8e 00 08 sw (sp+8),r14
8003700: 5b 9d 00 04 sw (sp+4),ra
8003704: b8 20 70 00 mv r14,r1
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
8003708: 78 01 08 02 mvhi r1,0x802
800370c: b8 40 60 00 mv r12,r2
8003710: 38 21 28 04 ori r1,r1,0x2804
8003714: b9 c0 10 00 mv r2,r14
8003718: 37 83 00 18 addi r3,sp,24
800371c: f8 00 09 04 calli 8005b2c <_Objects_Get>
8003720: 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 ) {
8003724: 2b 81 00 18 lw r1,(sp+24)
8003728: 5c 20 00 61 bne r1,r0,80038ac <rtems_rate_monotonic_period+0x1c0>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
800372c: 78 03 08 02 mvhi r3,0x802
8003730: 38 63 29 f8 ori r3,r3,0x29f8
8003734: 28 61 00 00 lw r1,(r3+0)
8003738: 29 62 00 40 lw r2,(r11+64)
800373c: 44 41 00 04 be r2,r1,800374c <rtems_rate_monotonic_period+0x60>
_Thread_Enable_dispatch();
8003740: f8 00 0b 5a calli 80064a8 <_Thread_Enable_dispatch>
8003744: 34 0b 00 17 mvi r11,23
return RTEMS_NOT_OWNER_OF_RESOURCE;
8003748: e0 00 00 5a bi 80038b0 <rtems_rate_monotonic_period+0x1c4>
}
if ( length == RTEMS_PERIOD_STATUS ) {
800374c: 5d 80 00 0d bne r12,r0,8003780 <rtems_rate_monotonic_period+0x94>
switch ( the_period->state ) {
8003750: 29 61 00 38 lw r1,(r11+56)
8003754: 34 02 00 04 mvi r2,4
8003758: 50 41 00 03 bgeu r2,r1,8003764 <rtems_rate_monotonic_period+0x78><== ALWAYS TAKEN
800375c: b9 80 58 00 mv r11,r12 <== NOT EXECUTED
8003760: e0 00 00 51 bi 80038a4 <rtems_rate_monotonic_period+0x1b8> <== NOT EXECUTED
8003764: 78 0b 08 01 mvhi r11,0x801
8003768: 34 02 00 02 mvi r2,2
800376c: 39 6b f5 18 ori r11,r11,0xf518
8003770: fb ff f6 b7 calli 800124c <__ashlsi3>
8003774: b5 61 08 00 add r1,r11,r1
8003778: 28 2b 00 00 lw r11,(r1+0)
800377c: e0 00 00 4a bi 80038a4 <rtems_rate_monotonic_period+0x1b8>
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
8003780: 90 00 68 00 rcsr r13,IE
8003784: 34 01 ff fe mvi r1,-2
8003788: a1 a1 08 00 and r1,r13,r1
800378c: d0 01 00 00 wcsr IE,r1
switch ( the_period->state ) {
8003790: 29 63 00 38 lw r3,(r11+56)
8003794: 34 01 00 02 mvi r1,2
8003798: 44 61 00 18 be r3,r1,80037f8 <rtems_rate_monotonic_period+0x10c>
800379c: 34 01 00 04 mvi r1,4
80037a0: 44 61 00 35 be r3,r1,8003874 <rtems_rate_monotonic_period+0x188>
80037a4: 5c 60 00 42 bne r3,r0,80038ac <rtems_rate_monotonic_period+0x1c0><== NEVER TAKEN
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
80037a8: d0 0d 00 00 wcsr IE,r13
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
80037ac: b9 60 08 00 mv r1,r11
80037b0: fb ff ff 31 calli 8003474 <_Rate_monotonic_Initiate_statistics>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
80037b4: 78 03 08 00 mvhi r3,0x800
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
80037b8: 34 0d 00 00 mvi r13,0
the_watchdog->routine = routine;
80037bc: 38 63 3c 38 ori r3,r3,0x3c38
the_period->state = RATE_MONOTONIC_ACTIVE;
80037c0: 34 02 00 02 mvi r2,2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
80037c4: 78 01 08 02 mvhi r1,0x802
80037c8: 59 62 00 38 sw (r11+56),r2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
80037cc: 59 63 00 2c sw (r11+44),r3
the_watchdog->id = id;
80037d0: 59 6e 00 30 sw (r11+48),r14
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
80037d4: 59 6c 00 1c sw (r11+28),r12
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
80037d8: 35 62 00 10 addi r2,r11,16
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
80037dc: 59 6d 00 18 sw (r11+24),r13
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
80037e0: 59 6d 00 34 sw (r11+52),r13
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
80037e4: 59 6c 00 3c sw (r11+60),r12
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
80037e8: 38 21 2a 18 ori r1,r1,0x2a18
80037ec: f8 00 10 d4 calli 8007b3c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
80037f0: b9 a0 58 00 mv r11,r13
80037f4: e0 00 00 2c bi 80038a4 <rtems_rate_monotonic_period+0x1b8>
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
80037f8: b9 60 08 00 mv r1,r11
80037fc: fb ff ff 7c calli 80035ec <_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;
8003800: 34 01 00 01 mvi r1,1
the_period->next_length = length;
8003804: 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;
8003808: 59 61 00 38 sw (r11+56),r1
the_period->next_length = length;
_ISR_Enable( level );
800380c: d0 0d 00 00 wcsr IE,r13
_Thread_Executing->Wait.id = the_period->Object.id;
8003810: 78 01 08 02 mvhi r1,0x802
8003814: 38 21 29 f8 ori r1,r1,0x29f8
8003818: 28 21 00 00 lw r1,(r1+0)
800381c: 29 63 00 08 lw r3,(r11+8)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
8003820: 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;
8003824: 58 23 00 20 sw (r1+32),r3
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
8003828: f8 00 0d ca calli 8006f50 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
800382c: 90 00 08 00 rcsr r1,IE
8003830: 34 02 ff fe mvi r2,-2
8003834: a0 22 10 00 and r2,r1,r2
8003838: d0 02 00 00 wcsr IE,r2
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
800383c: 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;
8003840: 29 62 00 38 lw r2,(r11+56)
the_period->state = RATE_MONOTONIC_ACTIVE;
8003844: 59 63 00 38 sw (r11+56),r3
_ISR_Enable( level );
8003848: 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 )
800384c: 34 01 00 03 mvi r1,3
8003850: 5c 41 00 06 bne r2,r1,8003868 <rtems_rate_monotonic_period+0x17c><== ALWAYS TAKEN
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
8003854: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003858: 38 21 29 f8 ori r1,r1,0x29f8 <== NOT EXECUTED
800385c: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
8003860: 34 02 40 00 mvi r2,16384 <== NOT EXECUTED
8003864: f8 00 0a 18 calli 80060c4 <_Thread_Clear_state> <== NOT EXECUTED
_Thread_Enable_dispatch();
8003868: f8 00 0b 10 calli 80064a8 <_Thread_Enable_dispatch>
800386c: 34 0b 00 00 mvi r11,0
return RTEMS_SUCCESSFUL;
8003870: e0 00 00 10 bi 80038b0 <rtems_rate_monotonic_period+0x1c4>
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
8003874: b9 60 08 00 mv r1,r11
8003878: fb ff ff 5d calli 80035ec <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
800387c: d0 0d 00 00 wcsr IE,r13
the_period->state = RATE_MONOTONIC_ACTIVE;
8003880: 34 02 00 02 mvi r2,2
8003884: 78 01 08 02 mvhi r1,0x802
8003888: 59 62 00 38 sw (r11+56),r2
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
800388c: 59 6c 00 1c sw (r11+28),r12
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8003890: 35 62 00 10 addi r2,r11,16
the_period->next_length = length;
8003894: 59 6c 00 3c sw (r11+60),r12
8003898: 38 21 2a 18 ori r1,r1,0x2a18
800389c: f8 00 10 a8 calli 8007b3c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
80038a0: 34 0b 00 06 mvi r11,6
80038a4: f8 00 0b 01 calli 80064a8 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
80038a8: e0 00 00 02 bi 80038b0 <rtems_rate_monotonic_period+0x1c4>
80038ac: 34 0b 00 04 mvi r11,4
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80038b0: b9 60 08 00 mv r1,r11
80038b4: 2b 9d 00 04 lw ra,(sp+4)
80038b8: 2b 8b 00 14 lw r11,(sp+20)
80038bc: 2b 8c 00 10 lw r12,(sp+16)
80038c0: 2b 8d 00 0c lw r13,(sp+12)
80038c4: 2b 8e 00 08 lw r14,(sp+8)
80038c8: 37 9c 00 18 addi sp,sp,24
80038cc: c3 a0 00 00 ret
080038d0 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
80038d0: 37 9c ff 5c addi sp,sp,-164
80038d4: 5b 8b 00 44 sw (sp+68),r11
80038d8: 5b 8c 00 40 sw (sp+64),r12
80038dc: 5b 8d 00 3c sw (sp+60),r13
80038e0: 5b 8e 00 38 sw (sp+56),r14
80038e4: 5b 8f 00 34 sw (sp+52),r15
80038e8: 5b 90 00 30 sw (sp+48),r16
80038ec: 5b 91 00 2c sw (sp+44),r17
80038f0: 5b 92 00 28 sw (sp+40),r18
80038f4: 5b 93 00 24 sw (sp+36),r19
80038f8: 5b 94 00 20 sw (sp+32),r20
80038fc: 5b 95 00 1c sw (sp+28),r21
8003900: 5b 96 00 18 sw (sp+24),r22
8003904: 5b 97 00 14 sw (sp+20),r23
8003908: 5b 98 00 10 sw (sp+16),r24
800390c: 5b 99 00 0c sw (sp+12),r25
8003910: 5b 9b 00 08 sw (sp+8),fp
8003914: 5b 9d 00 04 sw (sp+4),ra
8003918: b8 40 58 00 mv r11,r2
800391c: 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 )
8003920: 44 40 00 73 be r2,r0,8003aec <rtems_rate_monotonic_report_statistics_with_plugin+0x21c><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
8003924: 78 02 08 01 mvhi r2,0x801
8003928: 38 42 f5 2c ori r2,r2,0xf52c
800392c: d9 60 00 00 call r11
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
8003930: 78 02 08 01 mvhi r2,0x801
8003934: 38 42 f5 4c ori r2,r2,0xf54c
8003938: b9 80 08 00 mv r1,r12
800393c: d9 60 00 00 call r11
(*print)( context, "--- Wall times are in seconds ---\n" );
8003940: 78 02 08 01 mvhi r2,0x801
8003944: 38 42 f5 70 ori r2,r2,0xf570
8003948: b9 80 08 00 mv r1,r12
800394c: d9 60 00 00 call r11
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
8003950: 78 02 08 01 mvhi r2,0x801
8003954: 38 42 f5 94 ori r2,r2,0xf594
8003958: b9 80 08 00 mv r1,r12
800395c: d9 60 00 00 call r11
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
8003960: 78 02 08 01 mvhi r2,0x801
8003964: b9 80 08 00 mv r1,r12
8003968: 38 42 f5 e0 ori r2,r2,0xf5e0
800396c: 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 ;
8003970: 78 01 08 02 mvhi r1,0x802
8003974: 38 21 28 04 ori r1,r1,0x2804
8003978: b8 20 80 00 mv r16,r1
800397c: 28 2d 00 08 lw r13,(r1+8)
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
8003980: 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 );
8003984: 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 );
8003988: 37 8f 00 a0 addi r15,sp,160
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
800398c: 78 17 08 01 mvhi r23,0x801
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 );
8003990: 37 96 00 60 addi r22,sp,96
8003994: 37 8e 00 98 addi r14,sp,152
(*print)( context,
8003998: 78 15 08 01 mvhi r21,0x801
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);
800399c: 37 94 00 78 addi r20,sp,120
(*print)( context,
80039a0: 78 13 08 01 mvhi r19,0x801
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
80039a4: 78 12 08 01 mvhi r18,0x801
/*
* 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 ;
80039a8: e0 00 00 4d bi 8003adc <rtems_rate_monotonic_report_statistics_with_plugin+0x20c>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
80039ac: f8 00 19 71 calli 8009f70 <rtems_rate_monotonic_get_statistics>
80039b0: b8 20 88 00 mv r17,r1
if ( status != RTEMS_SUCCESSFUL )
80039b4: 5c 20 00 49 bne r1,r0,8003ad8 <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 );
80039b8: bb 00 10 00 mv r2,r24
80039bc: b9 a0 08 00 mv r1,r13
80039c0: f8 00 19 9f calli 800a03c <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 );
80039c4: 2b 81 00 80 lw r1,(sp+128)
80039c8: b9 e0 18 00 mv r3,r15
80039cc: 34 02 00 05 mvi r2,5
80039d0: f8 00 00 c9 calli 8003cf4 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
80039d4: 2b 85 00 48 lw r5,(sp+72)
80039d8: 2b 86 00 4c lw r6,(sp+76)
80039dc: ba e0 10 00 mv r2,r23
80039e0: b9 a0 18 00 mv r3,r13
80039e4: 38 42 f6 2c ori r2,r2,0xf62c
80039e8: b9 80 08 00 mv r1,r12
80039ec: b9 e0 20 00 mv r4,r15
80039f0: d9 60 00 00 call r11
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
80039f4: 2b 85 00 48 lw r5,(sp+72)
(*print)( context, "\n" );
80039f8: 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 );
80039fc: b9 c0 18 00 mv r3,r14
8003a00: ba c0 08 00 mv r1,r22
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
8003a04: 38 42 eb 20 ori r2,r2,0xeb20
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
8003a08: 5c b1 00 04 bne r5,r17,8003a18 <rtems_rate_monotonic_report_statistics_with_plugin+0x148>
(*print)( context, "\n" );
8003a0c: b9 80 08 00 mv r1,r12
8003a10: d9 60 00 00 call r11
continue;
8003a14: e0 00 00 31 bi 8003ad8 <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 );
8003a18: b8 a0 10 00 mv r2,r5
8003a1c: f8 00 0f 0e calli 8007654 <_Timespec_Divide_by_integer>
(*print)( context,
8003a20: 2b 81 00 54 lw r1,(sp+84)
8003a24: 34 02 03 e8 mvi r2,1000
8003a28: f8 00 68 5b calli 801db94 <__divsi3>
8003a2c: b8 20 d8 00 mv fp,r1
8003a30: 2b 81 00 5c lw r1,(sp+92)
8003a34: 34 02 03 e8 mvi r2,1000
8003a38: f8 00 68 57 calli 801db94 <__divsi3>
8003a3c: b8 20 88 00 mv r17,r1
8003a40: 2b 81 00 9c lw r1,(sp+156)
8003a44: 34 02 03 e8 mvi r2,1000
8003a48: f8 00 68 53 calli 801db94 <__divsi3>
8003a4c: 2b 85 00 58 lw r5,(sp+88)
8003a50: 2b 87 00 98 lw r7,(sp+152)
8003a54: 2b 83 00 50 lw r3,(sp+80)
8003a58: ba a0 10 00 mv r2,r21
8003a5c: b8 20 40 00 mv r8,r1
8003a60: bb 60 20 00 mv r4,fp
8003a64: ba 20 30 00 mv r6,r17
8003a68: 38 42 f6 44 ori r2,r2,0xf644
8003a6c: b9 80 08 00 mv r1,r12
8003a70: 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);
8003a74: 2b 82 00 48 lw r2,(sp+72)
8003a78: b9 c0 18 00 mv r3,r14
8003a7c: ba 80 08 00 mv r1,r20
8003a80: f8 00 0e f5 calli 8007654 <_Timespec_Divide_by_integer>
(*print)( context,
8003a84: 2b 81 00 6c lw r1,(sp+108)
8003a88: 34 02 03 e8 mvi r2,1000
8003a8c: f8 00 68 42 calli 801db94 <__divsi3>
8003a90: b8 20 d8 00 mv fp,r1
8003a94: 2b 81 00 74 lw r1,(sp+116)
8003a98: 34 02 03 e8 mvi r2,1000
8003a9c: f8 00 68 3e calli 801db94 <__divsi3>
8003aa0: b8 20 88 00 mv r17,r1
8003aa4: 2b 81 00 9c lw r1,(sp+156)
8003aa8: 34 02 03 e8 mvi r2,1000
8003aac: f8 00 68 3a calli 801db94 <__divsi3>
8003ab0: 2b 83 00 68 lw r3,(sp+104)
8003ab4: 2b 85 00 70 lw r5,(sp+112)
8003ab8: 2b 87 00 98 lw r7,(sp+152)
8003abc: ba 60 10 00 mv r2,r19
8003ac0: b8 20 40 00 mv r8,r1
8003ac4: bb 60 20 00 mv r4,fp
8003ac8: b9 80 08 00 mv r1,r12
8003acc: ba 20 30 00 mv r6,r17
8003ad0: 38 42 f6 64 ori r2,r2,0xf664
8003ad4: 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++ ) {
8003ad8: 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 ;
8003adc: 2a 03 00 0c lw r3,(r16+12)
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
8003ae0: b9 a0 08 00 mv r1,r13
8003ae4: 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 ;
8003ae8: 50 6d ff b1 bgeu r3,r13,80039ac <rtems_rate_monotonic_report_statistics_with_plugin+0xdc>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
8003aec: 2b 9d 00 04 lw ra,(sp+4)
8003af0: 2b 8b 00 44 lw r11,(sp+68)
8003af4: 2b 8c 00 40 lw r12,(sp+64)
8003af8: 2b 8d 00 3c lw r13,(sp+60)
8003afc: 2b 8e 00 38 lw r14,(sp+56)
8003b00: 2b 8f 00 34 lw r15,(sp+52)
8003b04: 2b 90 00 30 lw r16,(sp+48)
8003b08: 2b 91 00 2c lw r17,(sp+44)
8003b0c: 2b 92 00 28 lw r18,(sp+40)
8003b10: 2b 93 00 24 lw r19,(sp+36)
8003b14: 2b 94 00 20 lw r20,(sp+32)
8003b18: 2b 95 00 1c lw r21,(sp+28)
8003b1c: 2b 96 00 18 lw r22,(sp+24)
8003b20: 2b 97 00 14 lw r23,(sp+20)
8003b24: 2b 98 00 10 lw r24,(sp+16)
8003b28: 2b 99 00 0c lw r25,(sp+12)
8003b2c: 2b 9b 00 08 lw fp,(sp+8)
8003b30: 37 9c 00 a4 addi sp,sp,164
8003b34: 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 13 af calli 8017a28 <_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 24 lw r3,(r1+292)
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 dc cc ori r2,r2,0xdccc
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 dc f0 ori r2,r2,0xdcf0
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 dd 88 ori r1,r1,0xdd88
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 68 calli 80179a8 <_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 65 calli 80179a8 <_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
08000864 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
8000864: 37 9c ff fc addi sp,sp,-4
8000868: 5b 9d 00 04 sw (sp+4),ra
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
800086c: 28 22 00 08 lw r2,(r1+8)
8000870: 44 40 00 07 be r2,r0,800088c <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;
8000874: 28 21 00 c4 lw r1,(r1+196)
8000878: 78 02 08 01 mvhi r2,0x801
800087c: 38 42 c6 b8 ori r2,r2,0xc6b8
8000880: 34 21 00 08 addi r1,r1,8
8000884: 34 03 00 10 mvi r3,16
8000888: f8 00 2c 79 calli 800ba6c <memcpy>
}
800088c: 2b 9d 00 04 lw ra,(sp+4)
8000890: 37 9c 00 04 addi sp,sp,4
8000894: c3 a0 00 00 ret
08000ddc <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
8000ddc: 37 9c ff f8 addi sp,sp,-8
8000de0: 5b 8b 00 08 sw (sp+8),r11
8000de4: 5b 9d 00 04 sw (sp+4),ra
8000de8: b8 40 58 00 mv r11,r2
Stack_check_Initialize();
8000dec: fb ff ff c8 calli 8000d0c <Stack_check_Initialize>
if (the_thread)
8000df0: 45 60 00 05 be r11,r0,8000e04 <rtems_stack_checker_create_extension+0x28><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
8000df4: 29 63 00 c0 lw r3,(r11+192)
8000df8: 29 61 00 c4 lw r1,(r11+196)
8000dfc: 34 02 00 a5 mvi r2,165
8000e00: f8 00 2b 79 calli 800bbe4 <memset>
return true;
}
8000e04: 34 01 00 01 mvi r1,1
8000e08: 2b 9d 00 04 lw ra,(sp+4)
8000e0c: 2b 8b 00 08 lw r11,(sp+8)
8000e10: 37 9c 00 08 addi sp,sp,8
8000e14: c3 a0 00 00 ret
08000bf0 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
8000bf0: 37 9c ff f4 addi sp,sp,-12
8000bf4: 5b 9b 00 08 sw (sp+8),fp
8000bf8: 34 1b 00 0c mvi fp,12
8000bfc: b7 7c d8 00 add fp,fp,sp
8000c00: 5b 8b 00 0c sw (sp+12),r11
8000c04: 5b 9d 00 04 sw (sp+4),ra
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
8000c08: 78 01 08 01 mvhi r1,0x801
8000c0c: 38 21 c8 d8 ori r1,r1,0xc8d8
8000c10: 28 22 00 00 lw r2,(r1+0)
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
8000c14: 28 41 00 c4 lw r1,(r2+196)
8000c18: 53 61 00 03 bgeu fp,r1,8000c24 <rtems_stack_checker_is_blown+0x34><== ALWAYS TAKEN
8000c1c: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED
8000c20: e0 00 00 04 bi 8000c30 <rtems_stack_checker_is_blown+0x40> <== NOT EXECUTED
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
8000c24: 28 4b 00 c0 lw r11,(r2+192)
8000c28: b4 2b 58 00 add r11,r1,r11
8000c2c: 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 ) {
8000c30: 78 02 08 01 mvhi r2,0x801
8000c34: 38 42 c6 2c ori r2,r2,0xc62c
8000c38: 28 43 00 00 lw r3,(r2+0)
8000c3c: 34 02 00 01 mvi r2,1
8000c40: 44 60 00 07 be r3,r0,8000c5c <rtems_stack_checker_is_blown+0x6c><== NEVER TAKEN
pattern_ok = (!memcmp(
8000c44: 78 02 08 01 mvhi r2,0x801
8000c48: 38 42 c6 b8 ori r2,r2,0xc6b8
8000c4c: 34 21 00 08 addi r1,r1,8
8000c50: 34 03 00 10 mvi r3,16
8000c54: f8 00 2b 66 calli 800b9ec <memcmp>
8000c58: 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 )
8000c5c: 45 60 00 03 be r11,r0,8000c68 <rtems_stack_checker_is_blown+0x78><== NEVER TAKEN
8000c60: 34 01 00 00 mvi r1,0
8000c64: 5c 41 00 06 bne r2,r1,8000c7c <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 );
8000c68: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8000c6c: 38 21 c8 d8 ori r1,r1,0xc8d8 <== NOT EXECUTED
8000c70: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
8000c74: fb ff ff b1 calli 8000b38 <Stack_check_report_blown_task> <== NOT EXECUTED
8000c78: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
return true;
}
8000c7c: 2b 9d 00 04 lw ra,(sp+4)
8000c80: 2b 8b 00 0c lw r11,(sp+12)
8000c84: 2b 9b 00 08 lw fp,(sp+8)
8000c88: 37 9c 00 0c addi sp,sp,12
8000c8c: c3 a0 00 00 ret
08000b14 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
8000b14: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8000b18: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
8000b1c: 78 02 08 00 mvhi r2,0x800 <== NOT EXECUTED
8000b20: 38 42 1f 6c ori r2,r2,0x1f6c <== NOT EXECUTED
8000b24: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8000b28: fb ff ff d7 calli 8000a84 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
}
8000b2c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8000b30: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8000b34: c3 a0 00 00 ret <== NOT EXECUTED
08000a84 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
8000a84: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED
8000a88: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED
8000a8c: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED
8000a90: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED
8000a94: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED
8000a98: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
print_context = context;
8000a9c: 78 0b 08 01 mvhi r11,0x801 <== NOT EXECUTED
print_handler = print;
8000aa0: 78 0c 08 01 mvhi r12,0x801 <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
8000aa4: b8 40 68 00 mv r13,r2 <== NOT EXECUTED
print_context = context;
8000aa8: 39 6b c6 30 ori r11,r11,0xc630 <== NOT EXECUTED
print_handler = print;
8000aac: 39 8c c6 34 ori r12,r12,0xc634 <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
8000ab0: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8000ab4: 38 42 a1 c0 ori r2,r2,0xa1c0 <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
print_context = context;
8000ab8: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED
print_handler = print;
8000abc: 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
)
{
8000ac0: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
print_context = context;
print_handler = print;
(*print)( context, "Stack usage by thread\n");
8000ac4: d9 a0 00 00 call r13 <== NOT EXECUTED
(*print)( context,
8000ac8: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8000acc: 38 42 a1 d8 ori r2,r2,0xa1d8 <== NOT EXECUTED
8000ad0: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
8000ad4: 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 );
8000ad8: 78 01 08 00 mvhi r1,0x800 <== NOT EXECUTED
8000adc: 38 21 08 f8 ori r1,r1,0x8f8 <== NOT EXECUTED
8000ae0: f8 00 09 b9 calli 80031c4 <rtems_iterate_over_all_threads> <== NOT EXECUTED
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
8000ae4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000ae8: fb ff ff 84 calli 80008f8 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
print_context = NULL;
8000aec: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
print_handler = NULL;
8000af0: 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;
8000af4: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED
print_handler = NULL;
}
8000af8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8000afc: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED
8000b00: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED
8000b04: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED
8000b08: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED
8000b0c: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
8000b10: c3 a0 00 00 ret <== NOT EXECUTED
08000c90 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
8000c90: 37 9c ff f0 addi sp,sp,-16
8000c94: 5b 9b 00 08 sw (sp+8),fp
8000c98: 34 1b 00 10 mvi fp,16
8000c9c: b7 7c d8 00 add fp,fp,sp
8000ca0: 5b 8b 00 10 sw (sp+16),r11
8000ca4: 5b 8c 00 0c sw (sp+12),r12
8000ca8: 5b 9d 00 04 sw (sp+4),ra
8000cac: 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;
8000cb0: 28 21 00 c4 lw r1,(r1+196)
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
8000cb4: 53 61 00 03 bgeu fp,r1,8000cc0 <rtems_stack_checker_switch_extension+0x30><== ALWAYS TAKEN
8000cb8: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
8000cbc: e0 00 00 04 bi 8000ccc <rtems_stack_checker_switch_extension+0x3c><== NOT EXECUTED
}
/*
* rtems_stack_checker_switch_extension
*/
void rtems_stack_checker_switch_extension(
8000cc0: 29 6c 00 c0 lw r12,(r11+192)
8000cc4: b4 2c 60 00 add r12,r1,r12
8000cc8: 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,
8000ccc: 78 02 08 01 mvhi r2,0x801
8000cd0: 38 42 c6 b8 ori r2,r2,0xc6b8
8000cd4: 34 21 00 08 addi r1,r1,8
8000cd8: 34 03 00 10 mvi r3,16
8000cdc: f8 00 2b 44 calli 800b9ec <memcmp>
8000ce0: 64 22 00 00 cmpei r2,r1,0
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
8000ce4: 45 80 00 02 be r12,r0,8000cec <rtems_stack_checker_switch_extension+0x5c><== NEVER TAKEN
8000ce8: 5c 40 00 03 bne r2,r0,8000cf4 <rtems_stack_checker_switch_extension+0x64>
Stack_check_report_blown_task( running, pattern_ok );
8000cec: b9 60 08 00 mv r1,r11
8000cf0: fb ff ff 92 calli 8000b38 <Stack_check_report_blown_task>
}
}
8000cf4: 2b 9d 00 04 lw ra,(sp+4)
8000cf8: 2b 8b 00 10 lw r11,(sp+16)
8000cfc: 2b 8c 00 0c lw r12,(sp+12)
8000d00: 2b 9b 00 08 lw fp,(sp+8)
8000d04: 37 9c 00 10 addi sp,sp,16
8000d08: c3 a0 00 00 ret
08007da4 <rtems_string_to_double>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8007da4: 37 9c ff e4 addi sp,sp,-28
8007da8: 5b 8b 00 18 sw (sp+24),r11
8007dac: 5b 8c 00 14 sw (sp+20),r12
8007db0: 5b 8d 00 10 sw (sp+16),r13
8007db4: 5b 8e 00 0c sw (sp+12),r14
8007db8: 5b 8f 00 08 sw (sp+8),r15
8007dbc: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8007dc0: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8007dc4: b8 40 58 00 mv r11,r2
8007dc8: b8 20 70 00 mv r14,r1
8007dcc: b8 60 78 00 mv r15,r3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8007dd0: 34 04 00 09 mvi r4,9
8007dd4: 44 4c 00 20 be r2,r12,8007e54 <rtems_string_to_double+0xb0>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8007dd8: f8 00 10 21 calli 800be5c <__errno>
8007ddc: 58 2c 00 00 sw (r1+0),r12
*n = 0;
8007de0: 59 6c 00 04 sw (r11+4),r12
8007de4: 59 6c 00 00 sw (r11+0),r12
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
8007de8: b9 c0 08 00 mv r1,r14
8007dec: 37 82 00 1c addi r2,sp,28
8007df0: f8 00 1c 3f calli 800eeec <strtod>
8007df4: b8 20 60 00 mv r12,r1
8007df8: 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 )
8007dfc: 45 e0 00 03 be r15,r0,8007e08 <rtems_string_to_double+0x64>
*endptr = end;
8007e00: 2b 81 00 1c lw r1,(sp+28)
8007e04: 59 e1 00 00 sw (r15+0),r1
/* nothing was converted */
if ( end == s )
8007e08: 2b 81 00 1c lw r1,(sp+28)
8007e0c: 34 04 00 0b mvi r4,11
8007e10: 44 2e 00 11 be r1,r14,8007e54 <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))
8007e14: 78 03 7f ef mvhi r3,0x7fef
8007e18: 38 63 ff ff ori r3,r3,0xffff
8007e1c: b9 80 08 00 mv r1,r12
8007e20: b9 a0 10 00 mv r2,r13
8007e24: 34 04 ff ff mvi r4,-1
8007e28: f8 00 4a 3a calli 801a710 <__gedf2>
8007e2c: 48 20 00 02 bg r1,r0,8007e34 <rtems_string_to_double+0x90>
8007e30: e0 00 00 06 bi 8007e48 <rtems_string_to_double+0xa4>
8007e34: f8 00 10 0a calli 800be5c <__errno>
8007e38: 28 22 00 00 lw r2,(r1+0)
8007e3c: 34 01 00 22 mvi r1,34
8007e40: 34 04 00 0a mvi r4,10
8007e44: 44 41 00 04 be r2,r1,8007e54 <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;
8007e48: 59 6d 00 04 sw (r11+4),r13
8007e4c: 59 6c 00 00 sw (r11+0),r12
8007e50: 34 04 00 00 mvi r4,0
#endif
return RTEMS_SUCCESSFUL;
}
8007e54: b8 80 08 00 mv r1,r4
8007e58: 2b 9d 00 04 lw ra,(sp+4)
8007e5c: 2b 8b 00 18 lw r11,(sp+24)
8007e60: 2b 8c 00 14 lw r12,(sp+20)
8007e64: 2b 8d 00 10 lw r13,(sp+16)
8007e68: 2b 8e 00 0c lw r14,(sp+12)
8007e6c: 2b 8f 00 08 lw r15,(sp+8)
8007e70: 37 9c 00 1c addi sp,sp,28
8007e74: c3 a0 00 00 ret
08007e78 <rtems_string_to_float>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8007e78: 37 9c ff e8 addi sp,sp,-24
8007e7c: 5b 8b 00 14 sw (sp+20),r11
8007e80: 5b 8c 00 10 sw (sp+16),r12
8007e84: 5b 8d 00 0c sw (sp+12),r13
8007e88: 5b 8e 00 08 sw (sp+8),r14
8007e8c: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8007e90: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8007e94: b8 40 58 00 mv r11,r2
8007e98: b8 20 68 00 mv r13,r1
8007e9c: b8 60 70 00 mv r14,r3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8007ea0: 34 04 00 09 mvi r4,9
8007ea4: 44 4c 00 1b be r2,r12,8007f10 <rtems_string_to_float+0x98>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8007ea8: f8 00 0f ed calli 800be5c <__errno>
8007eac: 58 2c 00 00 sw (r1+0),r12
*n = 0;
8007eb0: 59 6c 00 00 sw (r11+0),r12
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
8007eb4: b9 a0 08 00 mv r1,r13
8007eb8: 37 82 00 18 addi r2,sp,24
8007ebc: f8 00 1b ef calli 800ee78 <strtof>
8007ec0: 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 )
8007ec4: 45 c0 00 03 be r14,r0,8007ed0 <rtems_string_to_float+0x58>
*endptr = end;
8007ec8: 2b 81 00 18 lw r1,(sp+24)
8007ecc: 59 c1 00 00 sw (r14+0),r1
/* nothing was converted */
if ( end == s )
8007ed0: 2b 81 00 18 lw r1,(sp+24)
8007ed4: 34 04 00 0b mvi r4,11
8007ed8: 44 2d 00 0e be r1,r13,8007f10 <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))
8007edc: 78 02 7f 7f mvhi r2,0x7f7f
8007ee0: 38 42 ff ff ori r2,r2,0xffff
8007ee4: b9 80 08 00 mv r1,r12
8007ee8: f8 00 43 c9 calli 8018e0c <__gesf2>
8007eec: 48 20 00 02 bg r1,r0,8007ef4 <rtems_string_to_float+0x7c>
8007ef0: e0 00 00 06 bi 8007f08 <rtems_string_to_float+0x90>
8007ef4: f8 00 0f da calli 800be5c <__errno>
8007ef8: 28 22 00 00 lw r2,(r1+0)
8007efc: 34 01 00 22 mvi r1,34
8007f00: 34 04 00 0a mvi r4,10
8007f04: 44 41 00 03 be r2,r1,8007f10 <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;
8007f08: 59 6c 00 00 sw (r11+0),r12
8007f0c: 34 04 00 00 mvi r4,0
#endif
return RTEMS_SUCCESSFUL;
}
8007f10: b8 80 08 00 mv r1,r4
8007f14: 2b 9d 00 04 lw ra,(sp+4)
8007f18: 2b 8b 00 14 lw r11,(sp+20)
8007f1c: 2b 8c 00 10 lw r12,(sp+16)
8007f20: 2b 8d 00 0c lw r13,(sp+12)
8007f24: 2b 8e 00 08 lw r14,(sp+8)
8007f28: 37 9c 00 18 addi sp,sp,24
8007f2c: c3 a0 00 00 ret
08007f30 <rtems_string_to_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8007f30: 37 9c ff e4 addi sp,sp,-28
8007f34: 5b 8b 00 18 sw (sp+24),r11
8007f38: 5b 8c 00 14 sw (sp+20),r12
8007f3c: 5b 8d 00 10 sw (sp+16),r13
8007f40: 5b 8e 00 0c sw (sp+12),r14
8007f44: 5b 8f 00 08 sw (sp+8),r15
8007f48: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8007f4c: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8007f50: b8 40 58 00 mv r11,r2
8007f54: b8 20 68 00 mv r13,r1
8007f58: b8 60 70 00 mv r14,r3
8007f5c: b8 80 78 00 mv r15,r4
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8007f60: 34 05 00 09 mvi r5,9
8007f64: 44 4c 00 19 be r2,r12,8007fc8 <rtems_string_to_int+0x98>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8007f68: f8 00 0f bd calli 800be5c <__errno>
8007f6c: 58 2c 00 00 sw (r1+0),r12
*n = 0;
8007f70: 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 );
8007f74: b9 e0 18 00 mv r3,r15
8007f78: b9 a0 08 00 mv r1,r13
8007f7c: 37 82 00 1c addi r2,sp,28
8007f80: f8 00 1c 7e calli 800f178 <strtol>
8007f84: b8 20 60 00 mv r12,r1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
8007f88: 45 c0 00 03 be r14,r0,8007f94 <rtems_string_to_int+0x64>
*endptr = end;
8007f8c: 2b 81 00 1c lw r1,(sp+28)
8007f90: 59 c1 00 00 sw (r14+0),r1
/* nothing was converted */
if ( end == s )
8007f94: 2b 81 00 1c lw r1,(sp+28)
8007f98: 34 05 00 0b mvi r5,11
8007f9c: 44 2d 00 0b be r1,r13,8007fc8 <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))
8007fa0: 78 02 7f ff mvhi r2,0x7fff
8007fa4: 38 42 ff ff ori r2,r2,0xffff
8007fa8: 5d 82 00 06 bne r12,r2,8007fc0 <rtems_string_to_int+0x90>
8007fac: f8 00 0f ac calli 800be5c <__errno>
8007fb0: 28 22 00 00 lw r2,(r1+0)
8007fb4: 34 01 00 22 mvi r1,34
8007fb8: 34 05 00 0a mvi r5,10
8007fbc: 44 41 00 03 be r2,r1,8007fc8 <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;
8007fc0: 59 6c 00 00 sw (r11+0),r12
8007fc4: 34 05 00 00 mvi r5,0
#endif
return RTEMS_SUCCESSFUL;
}
8007fc8: b8 a0 08 00 mv r1,r5
8007fcc: 2b 9d 00 04 lw ra,(sp+4)
8007fd0: 2b 8b 00 18 lw r11,(sp+24)
8007fd4: 2b 8c 00 14 lw r12,(sp+20)
8007fd8: 2b 8d 00 10 lw r13,(sp+16)
8007fdc: 2b 8e 00 0c lw r14,(sp+12)
8007fe0: 2b 8f 00 08 lw r15,(sp+8)
8007fe4: 37 9c 00 1c addi sp,sp,28
8007fe8: c3 a0 00 00 ret
080080cc <rtems_string_to_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
80080cc: 37 9c ff e4 addi sp,sp,-28
80080d0: 5b 8b 00 18 sw (sp+24),r11
80080d4: 5b 8c 00 14 sw (sp+20),r12
80080d8: 5b 8d 00 10 sw (sp+16),r13
80080dc: 5b 8e 00 0c sw (sp+12),r14
80080e0: 5b 8f 00 08 sw (sp+8),r15
80080e4: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
80080e8: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
80080ec: b8 40 58 00 mv r11,r2
80080f0: b8 20 68 00 mv r13,r1
80080f4: b8 60 70 00 mv r14,r3
80080f8: b8 80 78 00 mv r15,r4
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
80080fc: 34 05 00 09 mvi r5,9
8008100: 44 4c 00 1c be r2,r12,8008170 <rtems_string_to_long+0xa4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8008104: f8 00 0f 56 calli 800be5c <__errno>
8008108: 58 2c 00 00 sw (r1+0),r12
*n = 0;
800810c: 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 );
8008110: b9 e0 18 00 mv r3,r15
8008114: b9 a0 08 00 mv r1,r13
8008118: 37 82 00 1c addi r2,sp,28
800811c: f8 00 1c 17 calli 800f178 <strtol>
8008120: b8 20 60 00 mv r12,r1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
8008124: 45 c0 00 03 be r14,r0,8008130 <rtems_string_to_long+0x64>
*endptr = end;
8008128: 2b 81 00 1c lw r1,(sp+28)
800812c: 59 c1 00 00 sw (r14+0),r1
/* nothing was converted */
if ( end == s )
8008130: 2b 81 00 1c lw r1,(sp+28)
8008134: 34 05 00 0b mvi r5,11
8008138: 44 2d 00 0e be r1,r13,8008170 <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))
800813c: 78 01 7f ff mvhi r1,0x7fff
8008140: 38 21 ff ff ori r1,r1,0xffff
8008144: 45 81 00 04 be r12,r1,8008154 <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))
8008148: 78 01 80 00 mvhi r1,0x8000
800814c: 38 21 00 00 ori r1,r1,0x0
8008150: 5d 81 00 06 bne r12,r1,8008168 <rtems_string_to_long+0x9c>
8008154: f8 00 0f 42 calli 800be5c <__errno>
8008158: 28 22 00 00 lw r2,(r1+0)
800815c: 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;
8008160: 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))
8008164: 44 41 00 03 be r2,r1,8008170 <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;
8008168: 59 6c 00 00 sw (r11+0),r12
800816c: 34 05 00 00 mvi r5,0
#endif
return RTEMS_SUCCESSFUL;
}
8008170: b8 a0 08 00 mv r1,r5
8008174: 2b 9d 00 04 lw ra,(sp+4)
8008178: 2b 8b 00 18 lw r11,(sp+24)
800817c: 2b 8c 00 14 lw r12,(sp+20)
8008180: 2b 8d 00 10 lw r13,(sp+16)
8008184: 2b 8e 00 0c lw r14,(sp+12)
8008188: 2b 8f 00 08 lw r15,(sp+8)
800818c: 37 9c 00 1c addi sp,sp,28
8008190: c3 a0 00 00 ret
08007fec <rtems_string_to_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8007fec: 37 9c ff e4 addi sp,sp,-28
8007ff0: 5b 8b 00 18 sw (sp+24),r11
8007ff4: 5b 8c 00 14 sw (sp+20),r12
8007ff8: 5b 8d 00 10 sw (sp+16),r13
8007ffc: 5b 8e 00 0c sw (sp+12),r14
8008000: 5b 8f 00 08 sw (sp+8),r15
8008004: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8008008: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
800800c: b8 40 58 00 mv r11,r2
8008010: b8 20 70 00 mv r14,r1
8008014: b8 60 78 00 mv r15,r3
8008018: b8 80 68 00 mv r13,r4
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
800801c: 34 05 00 09 mvi r5,9
8008020: 44 4c 00 22 be r2,r12,80080a8 <rtems_string_to_long_long+0xbc>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8008024: f8 00 0f 8e calli 800be5c <__errno>
8008028: 58 2c 00 00 sw (r1+0),r12
*n = 0;
800802c: 59 6c 00 04 sw (r11+4),r12
8008030: 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 );
8008034: b9 a0 18 00 mv r3,r13
8008038: b9 c0 08 00 mv r1,r14
800803c: 37 82 00 1c addi r2,sp,28
8008040: f8 00 1c 5c calli 800f1b0 <strtoll>
8008044: b8 20 60 00 mv r12,r1
8008048: b8 40 68 00 mv r13,r2
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
800804c: 45 e0 00 03 be r15,r0,8008058 <rtems_string_to_long_long+0x6c>
*endptr = end;
8008050: 2b 81 00 1c lw r1,(sp+28)
8008054: 59 e1 00 00 sw (r15+0),r1
/* nothing was converted */
if ( end == s )
8008058: 2b 81 00 1c lw r1,(sp+28)
800805c: 34 05 00 0b mvi r5,11
8008060: 44 2e 00 12 be r1,r14,80080a8 <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))
8008064: 78 01 7f ff mvhi r1,0x7fff
8008068: 38 21 ff ff ori r1,r1,0xffff
800806c: 5d 81 00 03 bne r12,r1,8008078 <rtems_string_to_long_long+0x8c>
8008070: 34 01 ff ff mvi r1,-1
8008074: 45 a1 00 05 be r13,r1,8008088 <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))
8008078: 78 01 80 00 mvhi r1,0x8000
800807c: 38 21 00 00 ori r1,r1,0x0
8008080: 5d 81 00 07 bne r12,r1,800809c <rtems_string_to_long_long+0xb0>
8008084: 5d a0 00 06 bne r13,r0,800809c <rtems_string_to_long_long+0xb0><== NEVER TAKEN
8008088: f8 00 0f 75 calli 800be5c <__errno>
800808c: 28 22 00 00 lw r2,(r1+0)
8008090: 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;
8008094: 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))
8008098: 44 41 00 04 be r2,r1,80080a8 <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;
800809c: 59 6d 00 04 sw (r11+4),r13
80080a0: 59 6c 00 00 sw (r11+0),r12
80080a4: 34 05 00 00 mvi r5,0
#endif
return RTEMS_SUCCESSFUL;
}
80080a8: b8 a0 08 00 mv r1,r5
80080ac: 2b 9d 00 04 lw ra,(sp+4)
80080b0: 2b 8b 00 18 lw r11,(sp+24)
80080b4: 2b 8c 00 14 lw r12,(sp+20)
80080b8: 2b 8d 00 10 lw r13,(sp+16)
80080bc: 2b 8e 00 0c lw r14,(sp+12)
80080c0: 2b 8f 00 08 lw r15,(sp+8)
80080c4: 37 9c 00 1c addi sp,sp,28
80080c8: c3 a0 00 00 ret
08008194 <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008194: 37 9c ff e8 addi sp,sp,-24
8008198: 5b 8b 00 14 sw (sp+20),r11
800819c: 5b 8c 00 10 sw (sp+16),r12
80081a0: 5b 8d 00 0c sw (sp+12),r13
80081a4: 5b 8e 00 08 sw (sp+8),r14
80081a8: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
80081ac: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
80081b0: b8 40 58 00 mv r11,r2
80081b4: b8 20 68 00 mv r13,r1
80081b8: b8 60 70 00 mv r14,r3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
80081bc: 34 04 00 09 mvi r4,9
80081c0: 44 4c 00 18 be r2,r12,8008220 <rtems_string_to_pointer+0x8c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
80081c4: f8 00 0f 26 calli 800be5c <__errno>
80081c8: 58 2c 00 00 sw (r1+0),r12
*n = 0;
80081cc: 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 );
80081d0: b9 a0 08 00 mv r1,r13
80081d4: 37 82 00 18 addi r2,sp,24
80081d8: 34 03 00 10 mvi r3,16
80081dc: f8 00 1d 55 calli 800f730 <strtoul>
80081e0: 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 )
80081e4: 45 c0 00 03 be r14,r0,80081f0 <rtems_string_to_pointer+0x5c>
*endptr = end;
80081e8: 2b 81 00 18 lw r1,(sp+24)
80081ec: 59 c1 00 00 sw (r14+0),r1
/* nothing was converted */
if ( end == s )
80081f0: 2b 81 00 18 lw r1,(sp+24)
80081f4: 34 04 00 0b mvi r4,11
80081f8: 44 2d 00 0a be r1,r13,8008220 <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))
80081fc: 34 01 ff ff mvi r1,-1
8008200: 5d 81 00 06 bne r12,r1,8008218 <rtems_string_to_pointer+0x84><== ALWAYS TAKEN
8008204: f8 00 0f 16 calli 800be5c <__errno> <== NOT EXECUTED
8008208: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED
800820c: 34 01 00 22 mvi r1,34 <== NOT EXECUTED
8008210: 34 04 00 0a mvi r4,10 <== NOT EXECUTED
8008214: 44 41 00 03 be r2,r1,8008220 <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;
8008218: 59 6c 00 00 sw (r11+0),r12
800821c: 34 04 00 00 mvi r4,0
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
8008220: b8 80 08 00 mv r1,r4
8008224: 2b 9d 00 04 lw ra,(sp+4)
8008228: 2b 8b 00 14 lw r11,(sp+20)
800822c: 2b 8c 00 10 lw r12,(sp+16)
8008230: 2b 8d 00 0c lw r13,(sp+12)
8008234: 2b 8e 00 08 lw r14,(sp+8)
8008238: 37 9c 00 18 addi sp,sp,24
800823c: c3 a0 00 00 ret
080082dc <rtems_string_to_unsigned_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
80082dc: 37 9c ff e4 addi sp,sp,-28
80082e0: 5b 8b 00 18 sw (sp+24),r11
80082e4: 5b 8c 00 14 sw (sp+20),r12
80082e8: 5b 8d 00 10 sw (sp+16),r13
80082ec: 5b 8e 00 0c sw (sp+12),r14
80082f0: 5b 8f 00 08 sw (sp+8),r15
80082f4: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
80082f8: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
80082fc: b8 40 58 00 mv r11,r2
8008300: b8 20 68 00 mv r13,r1
8008304: b8 60 70 00 mv r14,r3
8008308: b8 80 78 00 mv r15,r4
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
800830c: 34 05 00 09 mvi r5,9
8008310: 44 4c 00 18 be r2,r12,8008370 <rtems_string_to_unsigned_int+0x94>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8008314: f8 00 0e d2 calli 800be5c <__errno>
8008318: 58 2c 00 00 sw (r1+0),r12
*n = 0;
800831c: 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 );
8008320: b9 e0 18 00 mv r3,r15
8008324: b9 a0 08 00 mv r1,r13
8008328: 37 82 00 1c addi r2,sp,28
800832c: f8 00 1d 01 calli 800f730 <strtoul>
8008330: b8 20 60 00 mv r12,r1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
8008334: 45 c0 00 03 be r14,r0,8008340 <rtems_string_to_unsigned_int+0x64>
*endptr = end;
8008338: 2b 81 00 1c lw r1,(sp+28)
800833c: 59 c1 00 00 sw (r14+0),r1
/* nothing was converted */
if ( end == s )
8008340: 2b 81 00 1c lw r1,(sp+28)
8008344: 34 05 00 0b mvi r5,11
8008348: 44 2d 00 0a be r1,r13,8008370 <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))
800834c: 34 01 ff ff mvi r1,-1
8008350: 5d 81 00 06 bne r12,r1,8008368 <rtems_string_to_unsigned_int+0x8c>
8008354: f8 00 0e c2 calli 800be5c <__errno>
8008358: 28 22 00 00 lw r2,(r1+0)
800835c: 34 01 00 22 mvi r1,34
8008360: 34 05 00 0a mvi r5,10
8008364: 44 41 00 03 be r2,r1,8008370 <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;
8008368: 59 6c 00 00 sw (r11+0),r12
800836c: 34 05 00 00 mvi r5,0
#endif
return RTEMS_SUCCESSFUL;
}
8008370: b8 a0 08 00 mv r1,r5
8008374: 2b 9d 00 04 lw ra,(sp+4)
8008378: 2b 8b 00 18 lw r11,(sp+24)
800837c: 2b 8c 00 14 lw r12,(sp+20)
8008380: 2b 8d 00 10 lw r13,(sp+16)
8008384: 2b 8e 00 0c lw r14,(sp+12)
8008388: 2b 8f 00 08 lw r15,(sp+8)
800838c: 37 9c 00 1c addi sp,sp,28
8008390: c3 a0 00 00 ret
0800845c <rtems_string_to_unsigned_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
800845c: 37 9c ff e4 addi sp,sp,-28
8008460: 5b 8b 00 18 sw (sp+24),r11
8008464: 5b 8c 00 14 sw (sp+20),r12
8008468: 5b 8d 00 10 sw (sp+16),r13
800846c: 5b 8e 00 0c sw (sp+12),r14
8008470: 5b 8f 00 08 sw (sp+8),r15
8008474: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8008478: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
800847c: b8 40 58 00 mv r11,r2
8008480: b8 20 68 00 mv r13,r1
8008484: b8 60 70 00 mv r14,r3
8008488: b8 80 78 00 mv r15,r4
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
800848c: 34 05 00 09 mvi r5,9
8008490: 44 4c 00 18 be r2,r12,80084f0 <rtems_string_to_unsigned_long+0x94>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8008494: f8 00 0e 72 calli 800be5c <__errno>
8008498: 58 2c 00 00 sw (r1+0),r12
*n = 0;
800849c: 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 );
80084a0: b9 e0 18 00 mv r3,r15
80084a4: b9 a0 08 00 mv r1,r13
80084a8: 37 82 00 1c addi r2,sp,28
80084ac: f8 00 1c a1 calli 800f730 <strtoul>
80084b0: b8 20 60 00 mv r12,r1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
80084b4: 45 c0 00 03 be r14,r0,80084c0 <rtems_string_to_unsigned_long+0x64>
*endptr = end;
80084b8: 2b 81 00 1c lw r1,(sp+28)
80084bc: 59 c1 00 00 sw (r14+0),r1
/* nothing was converted */
if ( end == s )
80084c0: 2b 81 00 1c lw r1,(sp+28)
80084c4: 34 05 00 0b mvi r5,11
80084c8: 44 2d 00 0a be r1,r13,80084f0 <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))
80084cc: 34 01 ff ff mvi r1,-1
80084d0: 5d 81 00 06 bne r12,r1,80084e8 <rtems_string_to_unsigned_long+0x8c>
80084d4: f8 00 0e 62 calli 800be5c <__errno>
80084d8: 28 22 00 00 lw r2,(r1+0)
80084dc: 34 01 00 22 mvi r1,34
80084e0: 34 05 00 0a mvi r5,10
80084e4: 44 41 00 03 be r2,r1,80084f0 <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;
80084e8: 59 6c 00 00 sw (r11+0),r12
80084ec: 34 05 00 00 mvi r5,0
#endif
return RTEMS_SUCCESSFUL;
}
80084f0: b8 a0 08 00 mv r1,r5
80084f4: 2b 9d 00 04 lw ra,(sp+4)
80084f8: 2b 8b 00 18 lw r11,(sp+24)
80084fc: 2b 8c 00 14 lw r12,(sp+20)
8008500: 2b 8d 00 10 lw r13,(sp+16)
8008504: 2b 8e 00 0c lw r14,(sp+12)
8008508: 2b 8f 00 08 lw r15,(sp+8)
800850c: 37 9c 00 1c addi sp,sp,28
8008510: c3 a0 00 00 ret
08008394 <rtems_string_to_unsigned_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008394: 37 9c ff e4 addi sp,sp,-28
8008398: 5b 8b 00 18 sw (sp+24),r11
800839c: 5b 8c 00 14 sw (sp+20),r12
80083a0: 5b 8d 00 10 sw (sp+16),r13
80083a4: 5b 8e 00 0c sw (sp+12),r14
80083a8: 5b 8f 00 08 sw (sp+8),r15
80083ac: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
80083b0: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
80083b4: b8 40 58 00 mv r11,r2
80083b8: b8 20 70 00 mv r14,r1
80083bc: b8 60 78 00 mv r15,r3
80083c0: b8 80 68 00 mv r13,r4
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
80083c4: 34 05 00 09 mvi r5,9
80083c8: 44 4c 00 1c be r2,r12,8008438 <rtems_string_to_unsigned_long_long+0xa4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
80083cc: f8 00 0e a4 calli 800be5c <__errno>
80083d0: 58 2c 00 00 sw (r1+0),r12
*n = 0;
80083d4: 59 6c 00 04 sw (r11+4),r12
80083d8: 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 );
80083dc: b9 a0 18 00 mv r3,r13
80083e0: b9 c0 08 00 mv r1,r14
80083e4: 37 82 00 1c addi r2,sp,28
80083e8: f8 00 1c e0 calli 800f768 <strtoull>
80083ec: b8 20 60 00 mv r12,r1
80083f0: b8 40 68 00 mv r13,r2
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
80083f4: 45 e0 00 03 be r15,r0,8008400 <rtems_string_to_unsigned_long_long+0x6c>
*endptr = end;
80083f8: 2b 81 00 1c lw r1,(sp+28)
80083fc: 59 e1 00 00 sw (r15+0),r1
/* nothing was converted */
if ( end == s )
8008400: 2b 81 00 1c lw r1,(sp+28)
8008404: 34 05 00 0b mvi r5,11
8008408: 44 2e 00 0c be r1,r14,8008438 <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))
800840c: 34 01 ff ff mvi r1,-1
8008410: 5d 81 00 07 bne r12,r1,800842c <rtems_string_to_unsigned_long_long+0x98>
8008414: 5d ac 00 06 bne r13,r12,800842c <rtems_string_to_unsigned_long_long+0x98><== NEVER TAKEN
8008418: f8 00 0e 91 calli 800be5c <__errno>
800841c: 28 22 00 00 lw r2,(r1+0)
8008420: 34 01 00 22 mvi r1,34
8008424: 34 05 00 0a mvi r5,10
8008428: 44 41 00 04 be r2,r1,8008438 <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;
800842c: 59 6d 00 04 sw (r11+4),r13
8008430: 59 6c 00 00 sw (r11+0),r12
8008434: 34 05 00 00 mvi r5,0
#endif
return RTEMS_SUCCESSFUL;
}
8008438: b8 a0 08 00 mv r1,r5
800843c: 2b 9d 00 04 lw ra,(sp+4)
8008440: 2b 8b 00 18 lw r11,(sp+24)
8008444: 2b 8c 00 14 lw r12,(sp+20)
8008448: 2b 8d 00 10 lw r13,(sp+16)
800844c: 2b 8e 00 0c lw r14,(sp+12)
8008450: 2b 8f 00 08 lw r15,(sp+8)
8008454: 37 9c 00 1c addi sp,sp,28
8008458: c3 a0 00 00 ret
0800a31c <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
800a31c: 37 9c ff e0 addi sp,sp,-32
800a320: 5b 8b 00 20 sw (sp+32),r11
800a324: 5b 8c 00 1c sw (sp+28),r12
800a328: 5b 8d 00 18 sw (sp+24),r13
800a32c: 5b 8e 00 14 sw (sp+20),r14
800a330: 5b 8f 00 10 sw (sp+16),r15
800a334: 5b 90 00 0c sw (sp+12),r16
800a338: 5b 91 00 08 sw (sp+8),r17
800a33c: 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 )
800a340: 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
)
{
800a344: b8 60 80 00 mv r16,r3
800a348: b8 20 68 00 mv r13,r1
800a34c: 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 )
800a350: 44 60 00 51 be r3,r0,800a494 <rtems_task_mode+0x178>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
800a354: 78 01 08 01 mvhi r1,0x801
800a358: 38 21 c8 e8 ori r1,r1,0xc8e8
800a35c: 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;
800a360: 34 0f 00 00 mvi r15,0
800a364: 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 ];
800a368: 29 6c 01 24 lw r12,(r11+292)
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
800a36c: 5c 2f 00 02 bne r1,r15,800a374 <rtems_task_mode+0x58>
800a370: 34 0f 01 00 mvi r15,256
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
800a374: 29 61 00 7c lw r1,(r11+124)
800a378: 44 20 00 02 be r1,r0,800a380 <rtems_task_mode+0x64>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
800a37c: 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;
800a380: 41 81 00 08 lbu r1,(r12+8)
800a384: 34 11 00 00 mvi r17,0
800a388: 5c 31 00 02 bne r1,r17,800a390 <rtems_task_mode+0x74>
800a38c: 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();
800a390: fb ff ed f3 calli 8005b5c <_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;
800a394: ba 21 88 00 or r17,r17,r1
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
800a398: ba 2f 88 00 or r17,r17,r15
800a39c: 5a 11 00 00 sw (r16+0),r17
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
800a3a0: 21 c1 01 00 andi r1,r14,0x100
800a3a4: 44 20 00 07 be r1,r0,800a3c0 <rtems_task_mode+0xa4>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
800a3a8: b9 a0 08 00 mv r1,r13
800a3ac: 34 02 00 08 mvi r2,8
800a3b0: fb ff d7 b8 calli 8000290 <__lshrsi3>
800a3b4: 18 21 00 01 xori r1,r1,0x1
800a3b8: 20 21 00 01 andi r1,r1,0x1
800a3bc: 31 61 00 75 sb (r11+117),r1
if ( mask & RTEMS_TIMESLICE_MASK ) {
800a3c0: 21 c1 02 00 andi r1,r14,0x200
800a3c4: 44 20 00 0b be r1,r0,800a3f0 <rtems_task_mode+0xd4>
if ( _Modes_Is_timeslice(mode_set) ) {
800a3c8: 21 a1 02 00 andi r1,r13,0x200
800a3cc: 44 20 00 08 be r1,r0,800a3ec <rtems_task_mode+0xd0>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
800a3d0: 78 01 08 01 mvhi r1,0x801
800a3d4: 38 21 c7 bc ori r1,r1,0xc7bc
800a3d8: 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;
800a3dc: 34 02 00 01 mvi r2,1
800a3e0: 59 62 00 7c sw (r11+124),r2
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
800a3e4: 59 61 00 78 sw (r11+120),r1
800a3e8: e0 00 00 02 bi 800a3f0 <rtems_task_mode+0xd4>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
800a3ec: 59 61 00 7c sw (r11+124),r1
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
800a3f0: 21 c1 00 01 andi r1,r14,0x1
800a3f4: 44 20 00 04 be r1,r0,800a404 <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 ) );
800a3f8: 19 a1 00 01 xori r1,r13,0x1
800a3fc: 20 21 00 01 andi r1,r1,0x1
800a400: d0 01 00 00 wcsr IE,r1
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
800a404: 21 ce 04 00 andi r14,r14,0x400
800a408: 45 c0 00 18 be r14,r0,800a468 <rtems_task_mode+0x14c>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
800a40c: 34 02 00 0a mvi r2,10
800a410: b9 a0 08 00 mv r1,r13
800a414: fb ff d7 9f calli 8000290 <__lshrsi3>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
800a418: 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(
800a41c: 18 21 00 01 xori r1,r1,0x1
800a420: 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;
800a424: 44 41 00 11 be r2,r1,800a468 <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;
800a428: 31 81 00 08 sb (r12+8),r1
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
800a42c: 90 00 08 00 rcsr r1,IE
800a430: 34 02 ff fe mvi r2,-2
800a434: a0 22 10 00 and r2,r1,r2
800a438: d0 02 00 00 wcsr IE,r2
_signals = information->signals_pending;
800a43c: 29 82 00 18 lw r2,(r12+24)
information->signals_pending = information->signals_posted;
800a440: 29 83 00 14 lw r3,(r12+20)
information->signals_posted = _signals;
800a444: 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;
800a448: 59 83 00 18 sw (r12+24),r3
information->signals_posted = _signals;
_ISR_Enable( _level );
800a44c: 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;
800a450: 29 81 00 14 lw r1,(r12+20)
800a454: 44 20 00 05 be r1,r0,800a468 <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;
800a458: 34 01 00 01 mvi r1,1
800a45c: 31 61 00 74 sb (r11+116),r1
800a460: b8 20 58 00 mv r11,r1
800a464: e0 00 00 02 bi 800a46c <rtems_task_mode+0x150>
800a468: 34 0b 00 00 mvi r11,0
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
800a46c: 78 01 08 01 mvhi r1,0x801
800a470: 38 21 c9 c8 ori r1,r1,0xc9c8
800a474: 28 22 00 00 lw r2,(r1+0)
800a478: 34 01 00 03 mvi r1,3
800a47c: 5c 41 00 05 bne r2,r1,800a490 <rtems_task_mode+0x174> <== NEVER TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
800a480: f8 00 01 0f calli 800a8bc <_Thread_Evaluate_mode>
800a484: 5c 20 00 02 bne r1,r0,800a48c <rtems_task_mode+0x170>
800a488: 45 61 00 02 be r11,r1,800a490 <rtems_task_mode+0x174>
_Thread_Dispatch();
800a48c: fb ff e7 0f calli 80040c8 <_Thread_Dispatch>
800a490: 34 04 00 00 mvi r4,0
return RTEMS_SUCCESSFUL;
}
800a494: b8 80 08 00 mv r1,r4
800a498: 2b 9d 00 04 lw ra,(sp+4)
800a49c: 2b 8b 00 20 lw r11,(sp+32)
800a4a0: 2b 8c 00 1c lw r12,(sp+28)
800a4a4: 2b 8d 00 18 lw r13,(sp+24)
800a4a8: 2b 8e 00 14 lw r14,(sp+20)
800a4ac: 2b 8f 00 10 lw r15,(sp+16)
800a4b0: 2b 90 00 0c lw r16,(sp+12)
800a4b4: 2b 91 00 08 lw r17,(sp+8)
800a4b8: 37 9c 00 20 addi sp,sp,32
800a4bc: c3 a0 00 00 ret
080087a8 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
80087a8: 37 9c ff f0 addi sp,sp,-16
80087ac: 5b 8b 00 0c sw (sp+12),r11
80087b0: 5b 8c 00 08 sw (sp+8),r12
80087b4: 5b 9d 00 04 sw (sp+4),ra
80087b8: b8 40 58 00 mv r11,r2
80087bc: b8 60 60 00 mv r12,r3
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
80087c0: 44 40 00 07 be r2,r0,80087dc <rtems_task_set_priority+0x34>
80087c4: 78 02 08 02 mvhi r2,0x802
80087c8: 38 42 40 c0 ori r2,r2,0x40c0
80087cc: 40 42 00 00 lbu r2,(r2+0)
80087d0: 50 4b 00 03 bgeu r2,r11,80087dc <rtems_task_set_priority+0x34>
80087d4: 34 02 00 13 mvi r2,19
80087d8: e0 00 00 15 bi 800882c <rtems_task_set_priority+0x84>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
80087dc: 34 02 00 09 mvi r2,9
80087e0: 45 80 00 13 be r12,r0,800882c <rtems_task_set_priority+0x84>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
80087e4: 37 82 00 10 addi r2,sp,16
80087e8: f8 00 09 8d calli 800ae1c <_Thread_Get>
switch ( location ) {
80087ec: 2b 84 00 10 lw r4,(sp+16)
80087f0: 34 02 00 04 mvi r2,4
80087f4: 5c 80 00 0e bne r4,r0,800882c <rtems_task_set_priority+0x84>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
80087f8: 28 22 00 14 lw r2,(r1+20)
80087fc: 59 82 00 00 sw (r12+0),r2
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
8008800: 45 64 00 09 be r11,r4,8008824 <rtems_task_set_priority+0x7c>
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
8008804: 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;
8008808: 58 2b 00 18 sw (r1+24),r11
if ( the_thread->resource_count == 0 ||
800880c: 44 40 00 03 be r2,r0,8008818 <rtems_task_set_priority+0x70>
the_thread->current_priority > new_priority )
8008810: 28 22 00 14 lw r2,(r1+20)
8008814: 51 62 00 04 bgeu r11,r2,8008824 <rtems_task_set_priority+0x7c><== ALWAYS TAKEN
_Thread_Change_priority( the_thread, new_priority, false );
8008818: b9 60 10 00 mv r2,r11
800881c: 34 03 00 00 mvi r3,0
8008820: f8 00 07 bb calli 800a70c <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
8008824: f8 00 09 5e calli 800ad9c <_Thread_Enable_dispatch>
8008828: 34 02 00 00 mvi r2,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
800882c: b8 40 08 00 mv r1,r2
8008830: 2b 9d 00 04 lw ra,(sp+4)
8008834: 2b 8b 00 0c lw r11,(sp+12)
8008838: 2b 8c 00 08 lw r12,(sp+8)
800883c: 37 9c 00 10 addi sp,sp,16
8008840: 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 32 34 ori r6,r6,0x3234 <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
8003944: 38 a5 32 38 ori r5,r5,0x3238 <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
8003948: 38 84 32 3c ori r4,r4,0x323c <== 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 39 4c ori r2,r2,0x394c
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 37 7c ori r12,r12,0x377c
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 60 calli 8006a24 <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 39 50 ori r3,r3,0x3950
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 39 54 ori r3,r3,0x3954
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 4d calli 800ba7c <free>
free (tty->rawOutBuf.theBuf);
800514c: 29 61 00 7c lw r1,(r11+124)
8005150: f8 00 1a 4b calli 800ba7c <free>
free (tty->cbuf);
8005154: 29 61 00 1c lw r1,(r11+28)
8005158: f8 00 1a 49 calli 800ba7c <free>
free (tty);
800515c: b9 60 08 00 mv r1,r11
8005160: f8 00 1a 47 calli 800ba7c <free>
}
rtems_semaphore_release (rtems_termios_ttyMutex);
8005164: 78 01 08 02 mvhi r1,0x802
8005168: 38 21 39 4c ori r1,r1,0x394c
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 99 calli 8006a24 <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 37 7c ori r2,r2,0x377c <== 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 37 7c ori r12,r12,0x377c <== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
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 6e 84 calli 801f7d4 <__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 6e 7a calli 801f7d4 <__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 39 4c ori r5,r5,0x394c
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 8a calli 8006a24 <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 37 7c ori r13,r13,0x377c <== 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 2b 4b calli 800fa00 <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 2b 46 calli 800fa00 <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 69 ce calli 801f598 <__mulsi3> <== NOT EXECUTED
8004e64: 34 02 00 0a mvi r2,10 <== NOT EXECUTED
8004e68: f8 00 6a 4b calli 801f794 <__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 37 7c ori r14,r14,0x377c <== 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 37 7c ori r14,r14,0x377c <== 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 39 4c ori r5,r5,0x394c
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 39 54 ori r1,r1,0x3954
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 32 38 ori r1,r1,0x3238
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 0e calli 800be74 <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 0c calli 800ba7c <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
8005250: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8005254: 38 21 39 4c ori r1,r1,0x394c <== 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 32 3c ori r1,r1,0x323c
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 1a ff calli 800be74 <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 32 34 ori r1,r1,0x3234
8005298: 28 21 00 00 lw r1,(r1+0)
800529c: f8 00 1a f6 calli 800be74 <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 19 f3 calli 800ba7c <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
80052b4: 29 61 00 58 lw r1,(r11+88) <== NOT EXECUTED
80052b8: f8 00 19 f1 calli 800ba7c <free> <== NOT EXECUTED
free(tty);
80052bc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80052c0: f8 00 19 ef calli 800ba7c <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 39 54 ori r1,r1,0x3954
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 39 50 ori r5,r5,0x3950
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
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 39 54 ori r1,r1,0x3954
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 32 40 ori r13,r13,0x3240
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 29 91 calli 800fa00 <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 32 40 ori r1,r1,0x3240 <== 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 32 40 ori r4,r4,0x3240
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 1a calli 8006a24 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
80055c0: 78 01 08 02 mvhi r1,0x802
80055c4: 38 21 39 4c ori r1,r1,0x394c
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 18 fb calli 800ba00 <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 6e 0a calli 801f7d4 <__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 91 calli 8006a24 <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 37 7c ori r15,r15,0x377c <== 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 32 34 ori r15,r15,0x3234 <== NOT EXECUTED
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
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 6b 63 calli 801f7d4 <__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 6b 58 calli 801f7d4 <__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 6f 4f calli 801f7d4 <__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 37 7c ori r12,r12,0x377c <== 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 37 7c ori r14,r14,0x377c <== 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 03 mvhi r1,0x803
8013738: 37 83 00 08 addi r3,sp,8
801373c: 38 21 de 80 ori r1,r1,0xde80
8013740: f8 00 0d b6 calli 8016e18 <_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 6d calli 8019510 <_Watchdog_Remove>
_Thread_Enable_dispatch();
8013760: f8 00 10 92 calli 80179a8 <_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 03 mvhi r5,0x803
8013d94: 38 a5 de c0 ori r5,r5,0xdec0
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 dc 48 ori r5,r5,0xdc48
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 dc c4 ori r12,r12,0xdcc4
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 03 mvhi r1,0x803
8013dfc: 38 21 de 80 ori r1,r1,0xde80
8013e00: ba 20 10 00 mv r2,r17
8013e04: 37 83 00 28 addi r3,sp,40
8013e08: f8 00 0c 04 calli 8016e18 <_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 15 bc calli 8019510 <_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 0e d4 calli 80179a8 <_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
08006b48 <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
8006b48: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED
8006b4c: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED
8006b50: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED
8006b54: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED
8006b58: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED
8006b5c: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED
8006b60: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED
8006b64: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED
8006b68: 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)
8006b6c: 78 0f 20 00 mvhi r15,0x2000 <== NOT EXECUTED
8006b70: 39 ef 00 00 ori r15,r15,0x0 <== NOT EXECUTED
8006b74: 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
)
{
8006b78: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
8006b7c: b8 40 88 00 mv r17,r2 <== NOT EXECUTED
8006b80: 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)
8006b84: 45 e0 00 11 be r15,r0,8006bc8 <rtems_verror+0x80> <== NOT EXECUTED
{
if (rtems_panic_in_progress++)
8006b88: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8006b8c: 38 84 98 20 ori r4,r4,0x9820 <== NOT EXECUTED
8006b90: 28 81 00 00 lw r1,(r4+0) <== NOT EXECUTED
8006b94: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED
8006b98: 58 82 00 00 sw (r4+0),r2 <== NOT EXECUTED
8006b9c: 44 20 00 06 be r1,r0,8006bb4 <rtems_verror+0x6c> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8006ba0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8006ba4: 38 84 99 bc ori r4,r4,0x99bc <== NOT EXECUTED
8006ba8: 28 81 00 00 lw r1,(r4+0) <== NOT EXECUTED
8006bac: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED
8006bb0: 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)
8006bb4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8006bb8: 38 21 98 20 ori r1,r1,0x9820 <== NOT EXECUTED
8006bbc: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED
8006bc0: 34 01 00 02 mvi r1,2 <== NOT EXECUTED
8006bc4: 48 41 00 59 bg r2,r1,8006d28 <rtems_verror+0x1e0> <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
8006bc8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8006bcc: 38 21 91 e8 ori r1,r1,0x91e8 <== NOT EXECUTED
8006bd0: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
8006bd4: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED
8006bd8: f8 00 32 68 calli 8013578 <fflush> <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
8006bdc: 78 04 40 00 mvhi r4,0x4000 <== NOT EXECUTED
8006be0: 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;
8006be4: 78 01 8f ff mvhi r1,0x8fff <== NOT EXECUTED
8006be8: 38 21 ff ff ori r1,r1,0xffff <== NOT EXECUTED
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
8006bec: 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;
8006bf0: a1 c1 80 00 and r16,r14,r1 <== NOT EXECUTED
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
8006bf4: b8 80 58 00 mv r11,r4 <== NOT EXECUTED
8006bf8: 44 80 00 03 be r4,r0,8006c04 <rtems_verror+0xbc> <== NOT EXECUTED
local_errno = errno;
8006bfc: f8 00 31 4f calli 8013138 <__errno> <== NOT EXECUTED
8006c00: 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);
8006c04: 78 0d 08 02 mvhi r13,0x802 <== NOT EXECUTED
8006c08: 39 ad 91 e8 ori r13,r13,0x91e8 <== NOT EXECUTED
8006c0c: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED
8006c10: b9 80 18 00 mv r3,r12 <== NOT EXECUTED
8006c14: ba 20 10 00 mv r2,r17 <== NOT EXECUTED
8006c18: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED
8006c1c: f8 00 48 b2 calli 8018ee4 <vfprintf> <== NOT EXECUTED
8006c20: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
if (status)
8006c24: 46 00 00 0b be r16,r0,8006c50 <rtems_verror+0x108> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
8006c28: 29 a2 00 00 lw r2,(r13+0) <== NOT EXECUTED
8006c2c: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
8006c30: 28 4d 00 0c lw r13,(r2+12) <== NOT EXECUTED
8006c34: fb ff ff bc calli 8006b24 <rtems_status_text> <== NOT EXECUTED
8006c38: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8006c3c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
8006c40: 38 42 61 d0 ori r2,r2,0x61d0 <== NOT EXECUTED
8006c44: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8006c48: f8 00 33 59 calli 80139ac <fprintf> <== NOT EXECUTED
8006c4c: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED
if (local_errno)
8006c50: 45 60 00 1a be r11,r0,8006cb8 <rtems_verror+0x170> <== NOT EXECUTED
{
if ((local_errno > 0) && *strerror(local_errno))
8006c54: 4c 0b 00 10 bge r0,r11,8006c94 <rtems_verror+0x14c> <== NOT EXECUTED
8006c58: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8006c5c: f8 00 37 27 calli 80148f8 <strerror> <== NOT EXECUTED
8006c60: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED
8006c64: 44 20 00 0c be r1,r0,8006c94 <rtems_verror+0x14c> <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
8006c68: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8006c6c: 38 21 91 e8 ori r1,r1,0x91e8 <== NOT EXECUTED
8006c70: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED
8006c74: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8006c78: 28 4d 00 0c lw r13,(r2+12) <== NOT EXECUTED
8006c7c: f8 00 37 1f calli 80148f8 <strerror> <== NOT EXECUTED
8006c80: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8006c84: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
8006c88: 38 42 61 e0 ori r2,r2,0x61e0 <== NOT EXECUTED
8006c8c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8006c90: e0 00 00 08 bi 8006cb0 <rtems_verror+0x168> <== NOT EXECUTED
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
8006c94: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8006c98: 38 21 91 e8 ori r1,r1,0x91e8 <== NOT EXECUTED
8006c9c: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
8006ca0: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8006ca4: 38 42 61 f0 ori r2,r2,0x61f0 <== NOT EXECUTED
8006ca8: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED
8006cac: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
8006cb0: f8 00 33 3f calli 80139ac <fprintf> <== NOT EXECUTED
8006cb4: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED
}
chars_written += fprintf(stderr, "\n");
8006cb8: 78 0d 08 02 mvhi r13,0x802 <== NOT EXECUTED
8006cbc: 39 ad 91 e8 ori r13,r13,0x91e8 <== NOT EXECUTED
8006cc0: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED
8006cc4: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8006cc8: 38 42 5a 14 ori r2,r2,0x5a14 <== NOT EXECUTED
8006ccc: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED
8006cd0: f8 00 33 37 calli 80139ac <fprintf> <== NOT EXECUTED
8006cd4: b8 20 80 00 mv r16,r1 <== NOT EXECUTED
(void) fflush(stderr);
8006cd8: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED
8006cdc: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED
8006ce0: f8 00 32 26 calli 8013578 <fflush> <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
8006ce4: 78 02 30 00 mvhi r2,0x3000 <== NOT EXECUTED
8006ce8: 38 42 00 00 ori r2,r2,0x0 <== NOT EXECUTED
8006cec: 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");
8006cf0: b6 0c 08 00 add r1,r16,r12 <== NOT EXECUTED
(void) fflush(stderr);
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
8006cf4: 45 c0 00 0e be r14,r0,8006d2c <rtems_verror+0x1e4> <== NOT EXECUTED
{
if (error_flag & RTEMS_ERROR_PANIC)
8006cf8: 45 e0 00 07 be r15,r0,8006d14 <rtems_verror+0x1cc> <== NOT EXECUTED
{
rtems_error(0, "fatal error, exiting");
8006cfc: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8006d00: 38 42 62 04 ori r2,r2,0x6204 <== NOT EXECUTED
8006d04: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8006d08: f8 00 00 26 calli 8006da0 <rtems_error> <== NOT EXECUTED
_exit(local_errno);
8006d0c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8006d10: f8 00 03 30 calli 80079d0 <_exit> <== NOT EXECUTED
}
else
{
rtems_error(0, "fatal error, aborting");
8006d14: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8006d18: 38 42 62 1c ori r2,r2,0x621c <== NOT EXECUTED
8006d1c: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
8006d20: f8 00 00 20 calli 8006da0 <rtems_error> <== NOT EXECUTED
abort();
8006d24: f8 00 30 f5 calli 80130f8 <abort> <== NOT EXECUTED
8006d28: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
}
return chars_written;
}
8006d2c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8006d30: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED
8006d34: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED
8006d38: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED
8006d3c: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED
8006d40: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED
8006d44: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED
8006d48: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED
8006d4c: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED
8006d50: c3 a0 00 00 ret <== NOT EXECUTED
08001858 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
8001858: 37 9c ff d4 addi sp,sp,-44
800185c: 5b 8b 00 2c sw (sp+44),r11
8001860: 5b 8c 00 28 sw (sp+40),r12
8001864: 5b 8d 00 24 sw (sp+36),r13
8001868: 5b 8e 00 20 sw (sp+32),r14
800186c: 5b 8f 00 1c sw (sp+28),r15
8001870: 5b 90 00 18 sw (sp+24),r16
8001874: 5b 91 00 14 sw (sp+20),r17
8001878: 5b 92 00 10 sw (sp+16),r18
800187c: 5b 93 00 0c sw (sp+12),r19
8001880: 5b 94 00 08 sw (sp+8),r20
8001884: 5b 9d 00 04 sw (sp+4),ra
8001888: 34 0d 00 00 mvi r13,0
800188c: 78 0e 7f ff mvhi r14,0x7fff
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
8001890: 78 11 08 01 mvhi r17,0x801
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
8001894: 78 10 08 01 mvhi r16,0x801
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
8001898: b8 20 58 00 mv r11,r1
800189c: b8 40 90 00 mv r18,r2
80018a0: 39 ce ff ff ori r14,r14,0xffff
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
80018a4: 3a 31 f1 70 ori r17,r17,0xf170
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
80018a8: 3a 10 f1 6c ori r16,r16,0xf16c
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
80018ac: b9 a0 60 00 mv r12,r13
int sign = 0;
int d;
for (;;) {
c = getc(fp);
if (c == ':')
80018b0: 34 14 00 3a mvi r20,58
break;
if (sign == 0) {
if (c == '-') {
80018b4: 34 13 00 2d mvi r19,45
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
80018b8: 29 61 00 04 lw r1,(r11+4)
80018bc: 34 21 ff ff addi r1,r1,-1
80018c0: 59 61 00 04 sw (r11+4),r1
80018c4: 4c 20 00 06 bge r1,r0,80018dc <scanInt+0x84> <== ALWAYS TAKEN
80018c8: 2a 21 00 00 lw r1,(r17+0) <== NOT EXECUTED
80018cc: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
80018d0: f8 00 36 dd calli 800f444 <__srget_r> <== NOT EXECUTED
80018d4: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
80018d8: e0 00 00 05 bi 80018ec <scanInt+0x94> <== NOT EXECUTED
80018dc: 29 62 00 00 lw r2,(r11+0)
80018e0: 34 41 00 01 addi r1,r2,1
80018e4: 40 4f 00 00 lbu r15,(r2+0)
80018e8: 59 61 00 00 sw (r11+0),r1
if (c == ':')
80018ec: 45 f4 00 1d be r15,r20,8001960 <scanInt+0x108>
break;
if (sign == 0) {
80018f0: 5d a0 00 06 bne r13,r0,8001908 <scanInt+0xb0> <== NEVER TAKEN
if (c == '-') {
sign = -1;
limit++;
continue;
80018f4: 34 0d 00 01 mvi r13,1
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
80018f8: 5d f3 00 04 bne r15,r19,8001908 <scanInt+0xb0> <== ALWAYS TAKEN
sign = -1;
limit++;
80018fc: b5 cd 70 00 add r14,r14,r13 <== NOT EXECUTED
8001900: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED
continue;
8001904: e3 ff ff ed bi 80018b8 <scanInt+0x60> <== NOT EXECUTED
}
sign = 1;
}
if (!isdigit(c))
8001908: 2a 01 00 00 lw r1,(r16+0)
800190c: b4 2f 08 00 add r1,r1,r15
8001910: 40 21 00 01 lbu r1,(r1+1)
8001914: 20 21 00 04 andi r1,r1,0x4
8001918: 44 20 00 19 be r1,r0,800197c <scanInt+0x124> <== NEVER TAKEN
return 0;
d = c - '0';
if ((i > (limit / 10))
800191c: b9 c0 08 00 mv r1,r14
8001920: 34 02 00 0a mvi r2,10
8001924: f8 00 6b da calli 801c88c <__udivsi3>
8001928: 55 81 00 15 bgu r12,r1,800197c <scanInt+0x124> <== NEVER TAKEN
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
800192c: 35 ef ff d0 addi r15,r15,-48
if ((i > (limit / 10))
8001930: 5d 81 00 05 bne r12,r1,8001944 <scanInt+0xec> <== ALWAYS TAKEN
8001934: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
8001938: 34 02 00 0a mvi r2,10 <== NOT EXECUTED
800193c: f8 00 6b e4 calli 801c8cc <__umodsi3> <== NOT EXECUTED
8001940: 55 e1 00 0f bgu r15,r1,800197c <scanInt+0x124> <== NOT EXECUTED
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
8001944: b5 8c 60 00 add r12,r12,r12
8001948: b9 80 08 00 mv r1,r12
800194c: 34 02 00 02 mvi r2,2
8001950: fb ff fa 8e calli 8000388 <__ashlsi3>
8001954: b5 81 60 00 add r12,r12,r1
8001958: b5 ec 60 00 add r12,r15,r12
800195c: e3 ff ff d7 bi 80018b8 <scanInt+0x60>
}
if (sign == 0)
8001960: 45 a0 00 07 be r13,r0,800197c <scanInt+0x124> <== NEVER TAKEN
return 0;
*val = i * sign;
8001964: b9 a0 08 00 mv r1,r13
8001968: b9 80 10 00 mv r2,r12
800196c: f8 00 6b 49 calli 801c690 <__mulsi3>
8001970: 5a 41 00 00 sw (r18+0),r1
8001974: 34 01 00 01 mvi r1,1
return 1;
8001978: e0 00 00 02 bi 8001980 <scanInt+0x128>
800197c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
8001980: 2b 9d 00 04 lw ra,(sp+4)
8001984: 2b 8b 00 2c lw r11,(sp+44)
8001988: 2b 8c 00 28 lw r12,(sp+40)
800198c: 2b 8d 00 24 lw r13,(sp+36)
8001990: 2b 8e 00 20 lw r14,(sp+32)
8001994: 2b 8f 00 1c lw r15,(sp+28)
8001998: 2b 90 00 18 lw r16,(sp+24)
800199c: 2b 91 00 14 lw r17,(sp+20)
80019a0: 2b 92 00 10 lw r18,(sp+16)
80019a4: 2b 93 00 0c lw r19,(sp+12)
80019a8: 2b 94 00 08 lw r20,(sp+8)
80019ac: 37 9c 00 2c addi sp,sp,44
80019b0: c3 a0 00 00 ret
080019b4 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
80019b4: 37 9c ff d8 addi sp,sp,-40
80019b8: 5b 8b 00 28 sw (sp+40),r11
80019bc: 5b 8c 00 24 sw (sp+36),r12
80019c0: 5b 8d 00 20 sw (sp+32),r13
80019c4: 5b 8e 00 1c sw (sp+28),r14
80019c8: 5b 8f 00 18 sw (sp+24),r15
80019cc: 5b 90 00 14 sw (sp+20),r16
80019d0: 5b 91 00 10 sw (sp+16),r17
80019d4: 5b 92 00 0c sw (sp+12),r18
80019d8: 5b 93 00 08 sw (sp+8),r19
80019dc: 5b 9d 00 04 sw (sp+4),ra
80019e0: b8 60 58 00 mv r11,r3
int c;
*name = *bufp;
80019e4: 28 63 00 00 lw r3,(r3+0)
for (;;) {
c = getc(fp);
80019e8: 78 0e 08 01 mvhi r14,0x801
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
80019ec: b8 20 68 00 mv r13,r1
int c;
*name = *bufp;
80019f0: 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)
{
80019f4: b8 80 60 00 mv r12,r4
80019f8: b8 a0 78 00 mv r15,r5
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
80019fc: 39 ce f1 70 ori r14,r14,0xf170
if (c == ':') {
8001a00: 34 13 00 3a mvi r19,58
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
8001a04: 34 12 00 0a mvi r18,10
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
8001a08: 34 11 ff ff mvi r17,-1
return 0;
if (*nleft < 2)
8001a0c: 34 10 00 01 mvi r16,1
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
8001a10: 29 a1 00 04 lw r1,(r13+4)
8001a14: 34 21 ff ff addi r1,r1,-1
8001a18: 59 a1 00 04 sw (r13+4),r1
8001a1c: 4c 20 00 05 bge r1,r0,8001a30 <scanString+0x7c>
8001a20: 29 c1 00 00 lw r1,(r14+0)
8001a24: b9 a0 10 00 mv r2,r13
8001a28: f8 00 36 87 calli 800f444 <__srget_r>
8001a2c: e0 00 00 05 bi 8001a40 <scanString+0x8c>
8001a30: 29 a1 00 00 lw r1,(r13+0)
8001a34: 34 22 00 01 addi r2,r1,1
8001a38: 40 21 00 00 lbu r1,(r1+0)
8001a3c: 59 a2 00 00 sw (r13+0),r2
if (c == ':') {
8001a40: 5c 33 00 03 bne r1,r19,8001a4c <scanString+0x98>
if (nlFlag)
8001a44: 45 e0 00 11 be r15,r0,8001a88 <scanString+0xd4> <== ALWAYS TAKEN
8001a48: e0 00 00 1b bi 8001ab4 <scanString+0x100> <== NOT EXECUTED
return 0;
break;
}
if (c == '\n') {
8001a4c: 5c 32 00 03 bne r1,r18,8001a58 <scanString+0xa4>
if (!nlFlag)
8001a50: 5d e0 00 0e bne r15,r0,8001a88 <scanString+0xd4> <== ALWAYS TAKEN
8001a54: e0 00 00 18 bi 8001ab4 <scanString+0x100> <== NOT EXECUTED
return 0;
break;
}
if (c == EOF)
8001a58: 44 31 00 17 be r1,r17,8001ab4 <scanString+0x100> <== NEVER TAKEN
return 0;
if (*nleft < 2)
8001a5c: 29 82 00 00 lw r2,(r12+0)
8001a60: 52 02 00 15 bgeu r16,r2,8001ab4 <scanString+0x100> <== NEVER TAKEN
return 0;
**bufp = c;
8001a64: 29 62 00 00 lw r2,(r11+0)
8001a68: 30 41 00 00 sb (r2+0),r1
++(*bufp);
8001a6c: 29 62 00 00 lw r2,(r11+0)
--(*nleft);
8001a70: 29 81 00 00 lw r1,(r12+0)
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
8001a74: 34 42 00 01 addi r2,r2,1
--(*nleft);
8001a78: 34 21 ff ff addi r1,r1,-1
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
8001a7c: 59 62 00 00 sw (r11+0),r2
--(*nleft);
8001a80: 59 81 00 00 sw (r12+0),r1
}
8001a84: e3 ff ff e3 bi 8001a10 <scanString+0x5c>
**bufp = '\0';
8001a88: 29 63 00 00 lw r3,(r11+0)
8001a8c: 34 02 00 00 mvi r2,0
++(*bufp);
--(*nleft);
8001a90: 34 01 00 01 mvi r1,1
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
8001a94: 30 62 00 00 sb (r3+0),r2
++(*bufp);
8001a98: 29 63 00 00 lw r3,(r11+0)
--(*nleft);
8001a9c: 29 82 00 00 lw r2,(r12+0)
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
8001aa0: b4 61 18 00 add r3,r3,r1
--(*nleft);
8001aa4: 34 42 ff ff addi r2,r2,-1
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
8001aa8: 59 63 00 00 sw (r11+0),r3
--(*nleft);
8001aac: 59 82 00 00 sw (r12+0),r2
return 1;
8001ab0: e0 00 00 02 bi 8001ab8 <scanString+0x104>
8001ab4: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
8001ab8: 2b 9d 00 04 lw ra,(sp+4)
8001abc: 2b 8b 00 28 lw r11,(sp+40)
8001ac0: 2b 8c 00 24 lw r12,(sp+36)
8001ac4: 2b 8d 00 20 lw r13,(sp+32)
8001ac8: 2b 8e 00 1c lw r14,(sp+28)
8001acc: 2b 8f 00 18 lw r15,(sp+24)
8001ad0: 2b 90 00 14 lw r16,(sp+20)
8001ad4: 2b 91 00 10 lw r17,(sp+16)
8001ad8: 2b 92 00 0c lw r18,(sp+12)
8001adc: 2b 93 00 08 lw r19,(sp+8)
8001ae0: 37 9c 00 28 addi sp,sp,40
8001ae4: c3 a0 00 00 ret
08001ae8 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
8001ae8: 37 9c ff d4 addi sp,sp,-44
8001aec: 5b 8b 00 1c sw (sp+28),r11
8001af0: 5b 8c 00 18 sw (sp+24),r12
8001af4: 5b 8d 00 14 sw (sp+20),r13
8001af8: 5b 8e 00 10 sw (sp+16),r14
8001afc: 5b 8f 00 0c sw (sp+12),r15
8001b00: 5b 90 00 08 sw (sp+8),r16
8001b04: 5b 9d 00 04 sw (sp+4),ra
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
8001b08: 37 8d 00 24 addi r13,sp,36
8001b0c: 37 8c 00 20 addi r12,sp,32
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
8001b10: 5b 83 00 24 sw (sp+36),r3
8001b14: 5b 84 00 20 sw (sp+32),r4
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
8001b18: b9 a0 18 00 mv r3,r13
8001b1c: b9 80 20 00 mv r4,r12
8001b20: 34 05 00 00 mvi r5,0
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
8001b24: b8 20 70 00 mv r14,r1
8001b28: b8 40 58 00 mv r11,r2
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
8001b2c: fb ff ff a2 calli 80019b4 <scanString>
8001b30: 44 20 00 44 be r1,r0,8001c40 <scangr+0x158> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
8001b34: b9 c0 08 00 mv r1,r14
8001b38: 35 62 00 04 addi r2,r11,4
8001b3c: b9 a0 18 00 mv r3,r13
8001b40: b9 80 20 00 mv r4,r12
8001b44: 34 05 00 00 mvi r5,0
8001b48: fb ff ff 9b calli 80019b4 <scanString>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
8001b4c: 44 20 00 3d be r1,r0,8001c40 <scangr+0x158> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
8001b50: b9 c0 08 00 mv r1,r14
8001b54: 37 82 00 2c addi r2,sp,44
8001b58: fb ff ff 40 calli 8001858 <scanInt>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
8001b5c: 44 20 00 39 be r1,r0,8001c40 <scangr+0x158> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
8001b60: b9 c0 08 00 mv r1,r14
8001b64: b9 a0 18 00 mv r3,r13
8001b68: b9 80 20 00 mv r4,r12
8001b6c: 37 82 00 28 addi r2,sp,40
8001b70: 34 05 00 01 mvi r5,1
8001b74: fb ff ff 90 calli 80019b4 <scanString>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
8001b78: 44 20 00 32 be r1,r0,8001c40 <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;
8001b7c: 2f 82 00 2e lhu r2,(sp+46)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
8001b80: 2b 8d 00 28 lw r13,(sp+40)
8001b84: 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;
8001b88: 0d 62 00 08 sh (r11+8),r2
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
8001b8c: b9 a0 10 00 mv r2,r13
8001b90: e0 00 00 02 bi 8001b98 <scangr+0xb0>
if(*cp == ',')
memcount++;
8001b94: b4 23 08 00 add r1,r1,r3
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
8001b98: 40 4c 00 00 lbu r12,(r2+0)
8001b9c: 34 42 00 01 addi r2,r2,1
if(*cp == ',')
memcount++;
8001ba0: 65 83 00 2c cmpei r3,r12,44
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
8001ba4: 5d 80 ff fc bne r12,r0,8001b94 <scangr+0xac>
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
8001ba8: 34 02 00 02 mvi r2,2
8001bac: 34 21 00 01 addi r1,r1,1
8001bb0: fb ff f9 f6 calli 8000388 <__ashlsi3>
8001bb4: 2b 82 00 20 lw r2,(sp+32)
8001bb8: 34 21 00 0f addi r1,r1,15
8001bbc: 54 22 00 21 bgu r1,r2,8001c40 <scangr+0x158> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
8001bc0: 2b 81 00 24 lw r1,(sp+36)
8001bc4: 34 02 ff f0 mvi r2,-16
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
8001bc8: 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);
8001bcc: 34 21 00 0f addi r1,r1,15
8001bd0: a0 22 08 00 and r1,r1,r2
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
8001bd4: 58 2d 00 00 sw (r1+0),r13
8001bd8: 2b 8c 00 28 lw r12,(sp+40)
8001bdc: 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);
8001be0: 59 61 00 0c sw (r11+12),r1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
8001be4: b5 8d 60 00 add r12,r12,r13
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',') {
8001be8: 34 0f 00 2c mvi r15,44
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
8001bec: e0 00 00 0b bi 8001c18 <scangr+0x130>
if(*cp == ',') {
8001bf0: 5d cf 00 09 bne r14,r15,8001c14 <scangr+0x12c> <== ALWAYS TAKEN
*cp = '\0';
8001bf4: 31 90 ff ff sb (r12+-1),r16 <== NOT EXECUTED
grp->gr_mem[memcount++] = cp + 1;
8001bf8: 29 6e 00 0c lw r14,(r11+12) <== NOT EXECUTED
8001bfc: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8001c00: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8001c04: fb ff f9 e1 calli 8000388 <__ashlsi3> <== NOT EXECUTED
8001c08: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED
8001c0c: 58 2c 00 00 sw (r1+0),r12 <== NOT EXECUTED
8001c10: 35 ad 00 01 addi r13,r13,1 <== NOT EXECUTED
8001c14: 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++) {
8001c18: 41 8e ff ff lbu r14,(r12+-1)
8001c1c: 5d c0 ff f5 bne r14,r0,8001bf0 <scangr+0x108>
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
8001c20: 29 6b 00 0c lw r11,(r11+12)
8001c24: b9 a0 08 00 mv r1,r13
8001c28: 34 02 00 02 mvi r2,2
8001c2c: fb ff f9 d7 calli 8000388 <__ashlsi3>
8001c30: b5 61 08 00 add r1,r11,r1
8001c34: 58 2e 00 00 sw (r1+0),r14
8001c38: 34 01 00 01 mvi r1,1
return 1;
8001c3c: e0 00 00 02 bi 8001c44 <scangr+0x15c>
8001c40: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
8001c44: 2b 9d 00 04 lw ra,(sp+4)
8001c48: 2b 8b 00 1c lw r11,(sp+28)
8001c4c: 2b 8c 00 18 lw r12,(sp+24)
8001c50: 2b 8d 00 14 lw r13,(sp+20)
8001c54: 2b 8e 00 10 lw r14,(sp+16)
8001c58: 2b 8f 00 0c lw r15,(sp+12)
8001c5c: 2b 90 00 08 lw r16,(sp+8)
8001c60: 37 9c 00 2c addi sp,sp,44
8001c64: c3 a0 00 00 ret
08001cb8 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
8001cb8: 37 9c ff dc addi sp,sp,-36
8001cbc: 5b 8b 00 14 sw (sp+20),r11
8001cc0: 5b 8c 00 10 sw (sp+16),r12
8001cc4: 5b 8d 00 0c sw (sp+12),r13
8001cc8: 5b 8e 00 08 sw (sp+8),r14
8001ccc: 5b 9d 00 04 sw (sp+4),ra
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001cd0: 37 8e 00 1c addi r14,sp,28
8001cd4: 37 8d 00 18 addi r13,sp,24
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
8001cd8: 5b 83 00 1c sw (sp+28),r3
8001cdc: 5b 84 00 18 sw (sp+24),r4
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001ce0: b9 c0 18 00 mv r3,r14
8001ce4: b9 a0 20 00 mv r4,r13
8001ce8: 34 05 00 00 mvi r5,0
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
8001cec: b8 20 60 00 mv r12,r1
8001cf0: b8 40 58 00 mv r11,r2
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001cf4: fb ff ff 30 calli 80019b4 <scanString>
8001cf8: 44 20 00 32 be r1,r0,8001dc0 <scanpw+0x108> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
8001cfc: b9 80 08 00 mv r1,r12
8001d00: 35 62 00 04 addi r2,r11,4
8001d04: b9 c0 18 00 mv r3,r14
8001d08: b9 a0 20 00 mv r4,r13
8001d0c: 34 05 00 00 mvi r5,0
8001d10: fb ff ff 29 calli 80019b4 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001d14: 44 20 00 2b be r1,r0,8001dc0 <scanpw+0x108> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
8001d18: b9 80 08 00 mv r1,r12
8001d1c: 37 82 00 24 addi r2,sp,36
8001d20: fb ff fe ce calli 8001858 <scanInt>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001d24: 44 20 00 27 be r1,r0,8001dc0 <scanpw+0x108> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
8001d28: b9 80 08 00 mv r1,r12
8001d2c: 37 82 00 20 addi r2,sp,32
8001d30: fb ff fe ca calli 8001858 <scanInt>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001d34: 44 20 00 23 be r1,r0,8001dc0 <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)
8001d38: b9 80 08 00 mv r1,r12
8001d3c: 35 62 00 0c addi r2,r11,12
8001d40: b9 c0 18 00 mv r3,r14
8001d44: b9 a0 20 00 mv r4,r13
8001d48: 34 05 00 00 mvi r5,0
8001d4c: fb ff ff 1a calli 80019b4 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001d50: 44 20 00 1c be r1,r0,8001dc0 <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)
8001d54: b9 80 08 00 mv r1,r12
8001d58: 35 62 00 10 addi r2,r11,16
8001d5c: b9 c0 18 00 mv r3,r14
8001d60: b9 a0 20 00 mv r4,r13
8001d64: 34 05 00 00 mvi r5,0
8001d68: fb ff ff 13 calli 80019b4 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001d6c: 44 20 00 15 be r1,r0,8001dc0 <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)
8001d70: b9 80 08 00 mv r1,r12
8001d74: 35 62 00 14 addi r2,r11,20
8001d78: b9 c0 18 00 mv r3,r14
8001d7c: b9 a0 20 00 mv r4,r13
8001d80: 34 05 00 00 mvi r5,0
8001d84: fb ff ff 0c calli 80019b4 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001d88: 44 20 00 0e be r1,r0,8001dc0 <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))
8001d8c: b9 80 08 00 mv r1,r12
8001d90: b9 c0 18 00 mv r3,r14
8001d94: b9 a0 20 00 mv r4,r13
8001d98: 35 62 00 18 addi r2,r11,24
8001d9c: 34 05 00 01 mvi r5,1
8001da0: fb ff ff 05 calli 80019b4 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001da4: 44 20 00 07 be r1,r0,8001dc0 <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;
8001da8: 2f 82 00 26 lhu r2,(sp+38)
pwd->pw_gid = pwgid;
8001dac: 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;
8001db0: 0d 62 00 08 sh (r11+8),r2
pwd->pw_gid = pwgid;
8001db4: 2b 82 00 20 lw r2,(sp+32)
8001db8: 0d 62 00 0a sh (r11+10),r2
return 1;
8001dbc: e0 00 00 02 bi 8001dc4 <scanpw+0x10c>
8001dc0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
8001dc4: 2b 9d 00 04 lw ra,(sp+4)
8001dc8: 2b 8b 00 14 lw r11,(sp+20)
8001dcc: 2b 8c 00 10 lw r12,(sp+16)
8001dd0: 2b 8d 00 0c lw r13,(sp+12)
8001dd4: 2b 8e 00 08 lw r14,(sp+8)
8001dd8: 37 9c 00 24 addi sp,sp,36
8001ddc: c3 a0 00 00 ret
08001f1c <setgrent>:
return NULL;
return &grent;
}
void setgrent(void)
{
8001f1c: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8001f20: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
init_etc_passwd_group();
8001f24: fb ff ff c3 calli 8001e30 <init_etc_passwd_group> <== NOT EXECUTED
if (group_fp != NULL)
8001f28: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8001f2c: 38 21 f7 10 ori r1,r1,0xf710 <== NOT EXECUTED
8001f30: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
8001f34: 44 20 00 02 be r1,r0,8001f3c <setgrent+0x20> <== NOT EXECUTED
fclose(group_fp);
8001f38: f8 00 2d 61 calli 800d4bc <fclose> <== NOT EXECUTED
group_fp = fopen("/etc/group", "r");
8001f3c: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8001f40: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8001f44: 38 42 e2 d0 ori r2,r2,0xe2d0 <== NOT EXECUTED
8001f48: 38 21 dd 00 ori r1,r1,0xdd00 <== NOT EXECUTED
8001f4c: f8 00 2f 7c calli 800dd3c <fopen> <== NOT EXECUTED
8001f50: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8001f54: 38 42 f7 10 ori r2,r2,0xf710 <== NOT EXECUTED
8001f58: 58 41 00 00 sw (r2+0),r1 <== NOT EXECUTED
}
8001f5c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8001f60: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8001f64: c3 a0 00 00 ret <== NOT EXECUTED
08002158 <setpwent>:
return NULL;
return &pwent;
}
void setpwent(void)
{
8002158: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
800215c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
init_etc_passwd_group();
8002160: fb ff ff 34 calli 8001e30 <init_etc_passwd_group> <== NOT EXECUTED
if (passwd_fp != NULL)
8002164: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8002168: 38 21 f6 28 ori r1,r1,0xf628 <== NOT EXECUTED
800216c: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
8002170: 44 20 00 02 be r1,r0,8002178 <setpwent+0x20> <== NOT EXECUTED
fclose(passwd_fp);
8002174: f8 00 2c d2 calli 800d4bc <fclose> <== NOT EXECUTED
passwd_fp = fopen("/etc/passwd", "r");
8002178: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
800217c: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8002180: 38 42 e2 d0 ori r2,r2,0xe2d0 <== NOT EXECUTED
8002184: 38 21 dc 88 ori r1,r1,0xdc88 <== NOT EXECUTED
8002188: f8 00 2e ed calli 800dd3c <fopen> <== NOT EXECUTED
800218c: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8002190: 38 42 f6 28 ori r2,r2,0xf628 <== NOT EXECUTED
8002194: 58 41 00 00 sw (r2+0),r1 <== NOT EXECUTED
}
8002198: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800219c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
80021a0: c3 a0 00 00 ret <== NOT EXECUTED
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
08003bcc <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
8003bcc: 37 9c ff dc addi sp,sp,-36
8003bd0: 5b 8b 00 10 sw (sp+16),r11
8003bd4: 5b 8c 00 0c sw (sp+12),r12
8003bd8: 5b 8d 00 08 sw (sp+8),r13
8003bdc: 5b 9d 00 04 sw (sp+4),ra
8003be0: b8 40 68 00 mv r13,r2
8003be4: b8 20 58 00 mv r11,r1
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
8003be8: 5c 40 00 04 bne r2,r0,8003bf8 <stat+0x2c>
rtems_set_errno_and_return_minus_one( EFAULT );
8003bec: f8 00 27 f4 calli 800dbbc <__errno>
8003bf0: 34 02 00 0e mvi r2,14
8003bf4: e0 00 00 16 bi 8003c4c <stat+0x80>
status = rtems_filesystem_evaluate_path( path, strlen( path ),
8003bf8: f8 00 30 42 calli 800fd00 <strlen>
8003bfc: 37 8c 00 14 addi r12,sp,20
8003c00: b8 20 10 00 mv r2,r1
8003c04: 34 03 00 00 mvi r3,0
8003c08: b9 60 08 00 mv r1,r11
8003c0c: b9 80 20 00 mv r4,r12
8003c10: 34 05 00 01 mvi r5,1
8003c14: fb ff f8 f0 calli 8001fd4 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
8003c18: 34 0b ff ff mvi r11,-1
8003c1c: 5c 20 00 1f bne r1,r0,8003c98 <stat+0xcc>
return -1;
if ( !loc.handlers->fstat_h ){
8003c20: 2b 82 00 1c lw r2,(sp+28)
8003c24: 28 42 00 18 lw r2,(r2+24)
8003c28: 5c 41 00 0c bne r2,r1,8003c58 <stat+0x8c> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
8003c2c: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED
8003c30: 44 22 00 05 be r1,r2,8003c44 <stat+0x78> <== NOT EXECUTED
8003c34: 28 23 00 1c lw r3,(r1+28) <== NOT EXECUTED
8003c38: 44 62 00 03 be r3,r2,8003c44 <stat+0x78> <== NOT EXECUTED
8003c3c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8003c40: d8 60 00 00 call r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8003c44: f8 00 27 de calli 800dbbc <__errno> <== NOT EXECUTED
8003c48: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8003c4c: 58 22 00 00 sw (r1+0),r2
8003c50: 34 0b ff ff mvi r11,-1
8003c54: e0 00 00 11 bi 8003c98 <stat+0xcc>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
8003c58: b8 20 10 00 mv r2,r1
8003c5c: 34 03 00 48 mvi r3,72
8003c60: b9 a0 08 00 mv r1,r13
8003c64: f8 00 2d 72 calli 800f22c <memset>
status = (*loc.handlers->fstat_h)( &loc, buf );
8003c68: 2b 83 00 1c lw r3,(sp+28)
8003c6c: b9 a0 10 00 mv r2,r13
8003c70: b9 80 08 00 mv r1,r12
8003c74: 28 63 00 18 lw r3,(r3+24)
8003c78: d8 60 00 00 call r3
8003c7c: b8 20 58 00 mv r11,r1
rtems_filesystem_freenode( &loc );
8003c80: 2b 81 00 20 lw r1,(sp+32)
8003c84: 44 20 00 05 be r1,r0,8003c98 <stat+0xcc> <== NEVER TAKEN
8003c88: 28 22 00 1c lw r2,(r1+28)
8003c8c: 44 40 00 03 be r2,r0,8003c98 <stat+0xcc> <== NEVER TAKEN
8003c90: b9 80 08 00 mv r1,r12
8003c94: d8 40 00 00 call r2
return status;
}
8003c98: b9 60 08 00 mv r1,r11
8003c9c: 2b 9d 00 04 lw ra,(sp+4)
8003ca0: 2b 8b 00 10 lw r11,(sp+16)
8003ca4: 2b 8c 00 0c lw r12,(sp+12)
8003ca8: 2b 8d 00 08 lw r13,(sp+8)
8003cac: 37 9c 00 24 addi sp,sp,36
8003cb0: c3 a0 00 00 ret
08003cc0 <symlink>:
int symlink(
const char *actualpath,
const char *sympath
)
{
8003cc0: 37 9c ff d4 addi sp,sp,-44
8003cc4: 5b 8b 00 14 sw (sp+20),r11
8003cc8: 5b 8c 00 10 sw (sp+16),r12
8003ccc: 5b 8d 00 0c sw (sp+12),r13
8003cd0: 5b 8e 00 08 sw (sp+8),r14
8003cd4: 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 );
8003cd8: 40 43 00 00 lbu r3,(r2+0)
int symlink(
const char *actualpath,
const char *sympath
)
{
8003cdc: b8 20 70 00 mv r14,r1
8003ce0: 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 );
8003ce4: 64 6b 00 5c cmpei r11,r3,92
8003ce8: 64 61 00 2f cmpei r1,r3,47
8003cec: b9 61 58 00 or r11,r11,r1
8003cf0: 5d 60 00 02 bne r11,r0,8003cf8 <symlink+0x38>
8003cf4: 5c 6b 00 0a bne r3,r11,8003d1c <symlink+0x5c> <== ALWAYS TAKEN
8003cf8: 78 03 08 02 mvhi r3,0x802
8003cfc: 38 63 11 94 ori r3,r3,0x1194
8003d00: 28 64 00 00 lw r4,(r3+0)
8003d04: 37 81 00 18 addi r1,sp,24
8003d08: 34 03 00 14 mvi r3,20
8003d0c: 34 82 00 18 addi r2,r4,24
8003d10: f8 00 29 d0 calli 800e450 <memcpy>
8003d14: 34 0b 00 01 mvi r11,1
8003d18: e0 00 00 08 bi 8003d38 <symlink+0x78>
8003d1c: 78 03 08 02 mvhi r3,0x802
8003d20: 38 63 11 94 ori r3,r3,0x1194
8003d24: 28 64 00 00 lw r4,(r3+0)
8003d28: 37 81 00 18 addi r1,sp,24
8003d2c: 34 03 00 14 mvi r3,20
8003d30: 34 82 00 04 addi r2,r4,4
8003d34: f8 00 29 c7 calli 800e450 <memcpy>
if ( !loc.ops->evalformake_h ) {
8003d38: 2b 81 00 24 lw r1,(sp+36)
8003d3c: 28 24 00 04 lw r4,(r1+4)
8003d40: 44 80 00 0f be r4,r0,8003d7c <symlink+0xbc> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
8003d44: 37 8c 00 18 addi r12,sp,24
8003d48: b5 ab 08 00 add r1,r13,r11
8003d4c: b9 80 10 00 mv r2,r12
8003d50: 37 83 00 2c addi r3,sp,44
8003d54: d8 80 00 00 call r4
if ( result != 0 )
8003d58: 34 0b ff ff mvi r11,-1
8003d5c: 5c 20 00 18 bne r1,r0,8003dbc <symlink+0xfc>
return -1;
if ( !loc.ops->symlink_h ) {
8003d60: 2b 83 00 24 lw r3,(sp+36)
8003d64: 28 64 00 38 lw r4,(r3+56)
8003d68: 5c 81 00 0a bne r4,r1,8003d90 <symlink+0xd0> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
8003d6c: 28 62 00 1c lw r2,(r3+28) <== NOT EXECUTED
8003d70: 44 44 00 03 be r2,r4,8003d7c <symlink+0xbc> <== NOT EXECUTED
8003d74: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8003d78: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8003d7c: f8 00 27 0f calli 800d9b8 <__errno> <== NOT EXECUTED
8003d80: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8003d84: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8003d88: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
8003d8c: e0 00 00 0c bi 8003dbc <symlink+0xfc> <== NOT EXECUTED
}
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
8003d90: 2b 83 00 2c lw r3,(sp+44)
8003d94: b9 c0 10 00 mv r2,r14
8003d98: b9 80 08 00 mv r1,r12
8003d9c: d8 80 00 00 call r4
8003da0: b8 20 58 00 mv r11,r1
rtems_filesystem_freenode( &loc );
8003da4: 2b 81 00 24 lw r1,(sp+36)
8003da8: 44 20 00 05 be r1,r0,8003dbc <symlink+0xfc> <== NEVER TAKEN
8003dac: 28 22 00 1c lw r2,(r1+28)
8003db0: 44 40 00 03 be r2,r0,8003dbc <symlink+0xfc> <== NEVER TAKEN
8003db4: b9 80 08 00 mv r1,r12
8003db8: d8 40 00 00 call r2
return result;
}
8003dbc: b9 60 08 00 mv r1,r11
8003dc0: 2b 9d 00 04 lw ra,(sp+4)
8003dc4: 2b 8b 00 14 lw r11,(sp+20)
8003dc8: 2b 8c 00 10 lw r12,(sp+16)
8003dcc: 2b 8d 00 0c lw r13,(sp+12)
8003dd0: 2b 8e 00 08 lw r14,(sp+8)
8003dd4: 37 9c 00 2c addi sp,sp,44
8003dd8: 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 20 lw r3,(r1+288)
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 08 b8 ori r11,r11,0x8b8
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 20 lw r12,(r4+288)
_Thread_Executing->libc_reent = this_reent;
8003d04: 58 83 01 20 sw (r4+288),r3
_fwalk (t->libc_reent, sync_wrapper);
8003d08: 28 21 01 20 lw r1,(r1+288)
8003d0c: f8 00 2b e2 calli 800ec94 <_fwalk>
_Thread_Executing->libc_reent = current_reent;
8003d10: 29 61 00 00 lw r1,(r11+0)
8003d14: 58 2c 01 20 sw (r1+288),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
08003534 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
8003534: 37 9c ff f4 addi sp,sp,-12
8003538: 5b 8b 00 0c sw (sp+12),r11
800353c: 5b 8c 00 08 sw (sp+8),r12
8003540: 5b 9d 00 04 sw (sp+4),ra
8003544: b8 60 58 00 mv r11,r3
8003548: b8 20 60 00 mv r12,r1
switch (opt) {
800354c: 44 40 00 0d be r2,r0,8003580 <tcsetattr+0x4c> <== ALWAYS TAKEN
8003550: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
8003554: 44 43 00 05 be r2,r3,8003568 <tcsetattr+0x34> <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
8003558: f8 00 2e 63 calli 800eee4 <__errno> <== NOT EXECUTED
800355c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8003560: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8003564: e0 00 00 05 bi 8003578 <tcsetattr+0x44> <== NOT EXECUTED
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
8003568: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
800356c: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
8003570: f8 00 21 e4 calli 800bd00 <ioctl> <== NOT EXECUTED
8003574: 4c 20 00 03 bge r1,r0,8003580 <tcsetattr+0x4c> <== NOT EXECUTED
8003578: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
800357c: e0 00 00 05 bi 8003590 <tcsetattr+0x5c> <== NOT EXECUTED
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
8003580: b9 80 08 00 mv r1,r12
8003584: b9 60 18 00 mv r3,r11
8003588: 34 02 00 02 mvi r2,2
800358c: f8 00 21 dd calli 800bd00 <ioctl>
}
}
8003590: 2b 9d 00 04 lw ra,(sp+4)
8003594: 2b 8b 00 0c lw r11,(sp+12)
8003598: 2b 8c 00 08 lw r12,(sp+8)
800359c: 37 9c 00 0c addi sp,sp,12
80035a0: c3 a0 00 00 ret
0800ac54 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
800ac54: 37 9c ff c0 addi sp,sp,-64
800ac58: 5b 8b 00 18 sw (sp+24),r11
800ac5c: 5b 8c 00 14 sw (sp+20),r12
800ac60: 5b 8d 00 10 sw (sp+16),r13
800ac64: 5b 8e 00 0c sw (sp+12),r14
800ac68: 5b 8f 00 08 sw (sp+8),r15
800ac6c: 5b 9d 00 04 sw (sp+4),ra
800ac70: b8 20 78 00 mv r15,r1
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
800ac74: fb ff d8 1f calli 8000cf0 <rtems_filesystem_dirname>
800ac78: b8 20 68 00 mv r13,r1
if ( parentpathlen == 0 )
800ac7c: 5c 20 00 19 bne r1,r0,800ace0 <unlink+0x8c>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
800ac80: 41 e1 00 00 lbu r1,(r15+0)
800ac84: 64 23 00 5c cmpei r3,r1,92
800ac88: 64 22 00 2f cmpei r2,r1,47
800ac8c: b8 62 10 00 or r2,r3,r2
800ac90: 5c 4d 00 02 bne r2,r13,800ac98 <unlink+0x44>
800ac94: 5c 20 00 0a bne r1,r0,800acbc <unlink+0x68> <== ALWAYS TAKEN
800ac98: 78 01 08 01 mvhi r1,0x801
800ac9c: 38 21 c1 10 ori r1,r1,0xc110
800aca0: 28 22 00 00 lw r2,(r1+0)
800aca4: 34 03 00 14 mvi r3,20
800aca8: 37 81 00 30 addi r1,sp,48
800acac: 34 42 00 18 addi r2,r2,24
800acb0: f8 00 03 59 calli 800ba14 <memcpy>
800acb4: 34 0c 00 00 mvi r12,0
800acb8: e0 00 00 12 bi 800ad00 <unlink+0xac>
800acbc: 78 01 08 01 mvhi r1,0x801
800acc0: 38 21 c1 10 ori r1,r1,0xc110
800acc4: 28 22 00 00 lw r2,(r1+0)
800acc8: 34 03 00 14 mvi r3,20
800accc: 37 81 00 30 addi r1,sp,48
800acd0: 34 42 00 04 addi r2,r2,4
800acd4: f8 00 03 50 calli 800ba14 <memcpy>
800acd8: b9 a0 60 00 mv r12,r13
800acdc: e0 00 00 09 bi 800ad00 <unlink+0xac>
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
800ace0: b9 e0 08 00 mv r1,r15
800ace4: b9 a0 10 00 mv r2,r13
800ace8: 34 03 00 02 mvi r3,2
800acec: 37 84 00 30 addi r4,sp,48
800acf0: 34 05 00 00 mvi r5,0
800acf4: fb ff d8 4d calli 8000e28 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
800acf8: 5c 20 00 5d bne r1,r0,800ae6c <unlink+0x218> <== NEVER TAKEN
800acfc: 34 0c 00 01 mvi r12,1
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
800ad00: 37 8b 00 1c addi r11,sp,28
800ad04: 37 8e 00 30 addi r14,sp,48
800ad08: 34 03 00 14 mvi r3,20
800ad0c: b9 c0 10 00 mv r2,r14
800ad10: b9 60 08 00 mv r1,r11
800ad14: f8 00 03 40 calli 800ba14 <memcpy>
name = path + parentpathlen;
800ad18: b5 ed 68 00 add r13,r15,r13
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
800ad1c: b9 a0 08 00 mv r1,r13
800ad20: f8 00 05 67 calli 800c2bc <strlen>
800ad24: b8 20 10 00 mv r2,r1
800ad28: b9 a0 08 00 mv r1,r13
800ad2c: fb ff d7 e2 calli 8000cb4 <rtems_filesystem_prefix_separators>
800ad30: b5 a1 68 00 add r13,r13,r1
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
800ad34: b9 a0 08 00 mv r1,r13
800ad38: f8 00 05 61 calli 800c2bc <strlen>
800ad3c: 34 03 00 00 mvi r3,0
800ad40: b8 20 10 00 mv r2,r1
800ad44: b9 60 20 00 mv r4,r11
800ad48: b9 a0 08 00 mv r1,r13
800ad4c: b8 60 28 00 mv r5,r3
800ad50: fb ff d7 fc calli 8000d40 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
800ad54: 44 20 00 09 be r1,r0,800ad78 <unlink+0x124>
if ( free_parentloc )
800ad58: 45 80 00 45 be r12,r0,800ae6c <unlink+0x218> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
800ad5c: 2b 81 00 3c lw r1,(sp+60)
800ad60: 44 20 00 43 be r1,r0,800ae6c <unlink+0x218> <== NEVER TAKEN
800ad64: 28 22 00 1c lw r2,(r1+28)
800ad68: 44 40 00 41 be r2,r0,800ae6c <unlink+0x218> <== NEVER TAKEN
800ad6c: b9 c0 08 00 mv r1,r14
800ad70: d8 40 00 00 call r2
800ad74: e0 00 00 3e bi 800ae6c <unlink+0x218>
return -1;
}
if ( !loc.ops->node_type_h ) {
800ad78: 2b 82 00 28 lw r2,(sp+40)
800ad7c: 28 43 00 10 lw r3,(r2+16)
800ad80: 5c 61 00 04 bne r3,r1,800ad90 <unlink+0x13c> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
800ad84: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED
800ad88: 5c 43 00 1a bne r2,r3,800adf0 <unlink+0x19c> <== NOT EXECUTED
800ad8c: e0 00 00 1b bi 800adf8 <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 ) {
800ad90: b9 60 08 00 mv r1,r11
800ad94: d8 60 00 00 call r3
800ad98: 34 02 00 01 mvi r2,1
800ad9c: 2b 83 00 28 lw r3,(sp+40)
800ada0: 5c 22 00 10 bne r1,r2,800ade0 <unlink+0x18c>
rtems_filesystem_freenode( &loc );
800ada4: 44 60 00 05 be r3,r0,800adb8 <unlink+0x164> <== NEVER TAKEN
800ada8: 28 62 00 1c lw r2,(r3+28)
800adac: 44 40 00 03 be r2,r0,800adb8 <unlink+0x164> <== NEVER TAKEN
800adb0: b9 60 08 00 mv r1,r11
800adb4: d8 40 00 00 call r2
if ( free_parentloc )
800adb8: 45 80 00 07 be r12,r0,800add4 <unlink+0x180> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
800adbc: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED
800adc0: 44 20 00 05 be r1,r0,800add4 <unlink+0x180> <== NOT EXECUTED
800adc4: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
800adc8: 44 40 00 03 be r2,r0,800add4 <unlink+0x180> <== NOT EXECUTED
800adcc: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED
800add0: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
800add4: f8 00 00 6a calli 800af7c <__errno>
800add8: 34 02 00 15 mvi r2,21
800addc: e0 00 00 10 bi 800ae1c <unlink+0x1c8>
}
if ( !loc.ops->unlink_h ) {
800ade0: 28 64 00 0c lw r4,(r3+12)
800ade4: 5c 80 00 10 bne r4,r0,800ae24 <unlink+0x1d0> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
800ade8: 28 62 00 1c lw r2,(r3+28) <== NOT EXECUTED
800adec: 44 44 00 03 be r2,r4,800adf8 <unlink+0x1a4> <== NOT EXECUTED
800adf0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800adf4: d8 40 00 00 call r2 <== NOT EXECUTED
if ( free_parentloc )
800adf8: 45 80 00 07 be r12,r0,800ae14 <unlink+0x1c0> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
800adfc: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED
800ae00: 44 20 00 05 be r1,r0,800ae14 <unlink+0x1c0> <== NOT EXECUTED
800ae04: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
800ae08: 44 40 00 03 be r2,r0,800ae14 <unlink+0x1c0> <== NOT EXECUTED
800ae0c: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED
800ae10: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
800ae14: f8 00 00 5a calli 800af7c <__errno> <== NOT EXECUTED
800ae18: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
800ae1c: 58 22 00 00 sw (r1+0),r2
800ae20: e0 00 00 13 bi 800ae6c <unlink+0x218>
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
800ae24: b9 c0 08 00 mv r1,r14
800ae28: b9 60 10 00 mv r2,r11
800ae2c: d8 80 00 00 call r4
800ae30: b8 20 68 00 mv r13,r1
rtems_filesystem_freenode( &loc );
800ae34: 2b 81 00 28 lw r1,(sp+40)
800ae38: 44 20 00 05 be r1,r0,800ae4c <unlink+0x1f8> <== NEVER TAKEN
800ae3c: 28 22 00 1c lw r2,(r1+28)
800ae40: 44 40 00 03 be r2,r0,800ae4c <unlink+0x1f8> <== NEVER TAKEN
800ae44: b9 60 08 00 mv r1,r11
800ae48: d8 40 00 00 call r2
if ( free_parentloc )
800ae4c: 45 80 00 09 be r12,r0,800ae70 <unlink+0x21c>
rtems_filesystem_freenode( &parentloc );
800ae50: 2b 81 00 3c lw r1,(sp+60)
800ae54: 44 20 00 07 be r1,r0,800ae70 <unlink+0x21c> <== NEVER TAKEN
800ae58: 28 22 00 1c lw r2,(r1+28)
800ae5c: 44 40 00 05 be r2,r0,800ae70 <unlink+0x21c> <== NEVER TAKEN
800ae60: 37 81 00 30 addi r1,sp,48
800ae64: d8 40 00 00 call r2
800ae68: e0 00 00 02 bi 800ae70 <unlink+0x21c>
800ae6c: 34 0d ff ff mvi r13,-1
return result;
}
800ae70: b9 a0 08 00 mv r1,r13
800ae74: 2b 9d 00 04 lw ra,(sp+4)
800ae78: 2b 8b 00 18 lw r11,(sp+24)
800ae7c: 2b 8c 00 14 lw r12,(sp+20)
800ae80: 2b 8d 00 10 lw r13,(sp+16)
800ae84: 2b 8e 00 0c lw r14,(sp+12)
800ae88: 2b 8f 00 08 lw r15,(sp+8)
800ae8c: 37 9c 00 40 addi sp,sp,64
800ae90: c3 a0 00 00 ret
080068f4 <unmount>:
*/
int unmount(
const char *path
)
{
80068f4: 37 9c ff dc addi sp,sp,-36
80068f8: 5b 8b 00 10 sw (sp+16),r11
80068fc: 5b 8c 00 0c sw (sp+12),r12
8006900: 5b 8d 00 08 sw (sp+8),r13
8006904: 5b 9d 00 04 sw (sp+4),ra
8006908: 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 ) )
800690c: 37 8c 00 14 addi r12,sp,20
8006910: f8 00 36 91 calli 8014354 <strlen>
8006914: b8 20 10 00 mv r2,r1
8006918: 34 03 00 00 mvi r3,0
800691c: b9 60 08 00 mv r1,r11
8006920: b9 80 20 00 mv r4,r12
8006924: 34 05 00 01 mvi r5,1
8006928: fb ff f7 ca calli 8004850 <rtems_filesystem_evaluate_path>
800692c: 5c 20 00 4e bne r1,r0,8006a64 <unmount+0x170>
return -1;
mt_entry = loc.mt_entry;
8006930: 2b 8b 00 24 lw r11,(sp+36)
fs_mount_loc = &mt_entry->mt_point_node;
fs_root_loc = &mt_entry->mt_fs_root;
8006934: 2b 81 00 14 lw r1,(sp+20)
8006938: 2b 82 00 20 lw r2,(sp+32)
800693c: 29 63 00 1c lw r3,(r11+28)
8006940: 44 61 00 09 be r3,r1,8006964 <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 );
8006944: 44 40 00 05 be r2,r0,8006958 <unmount+0x64> <== NEVER TAKEN
8006948: 28 42 00 1c lw r2,(r2+28)
800694c: 44 40 00 03 be r2,r0,8006958 <unmount+0x64> <== NEVER TAKEN
8006950: b9 80 08 00 mv r1,r12
8006954: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( EACCES );
8006958: f8 00 28 62 calli 8010ae0 <__errno>
800695c: 34 02 00 0d mvi r2,13
8006960: e0 00 00 20 bi 80069e0 <unmount+0xec>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
8006964: 44 40 00 05 be r2,r0,8006978 <unmount+0x84> <== NEVER TAKEN
8006968: 28 42 00 1c lw r2,(r2+28)
800696c: 44 40 00 03 be r2,r0,8006978 <unmount+0x84> <== NEVER TAKEN
8006970: b9 80 08 00 mv r1,r12
8006974: 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;
8006978: 29 61 00 14 lw r1,(r11+20)
800697c: 28 21 00 28 lw r1,(r1+40)
8006980: 44 20 00 04 be r1,r0,8006990 <unmount+0x9c> <== NEVER TAKEN
fs_root_loc = &mt_entry->mt_fs_root;
8006984: 29 61 00 28 lw r1,(r11+40)
8006988: 28 21 00 2c lw r1,(r1+44)
800698c: 5c 20 00 04 bne r1,r0,800699c <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 );
8006990: f8 00 28 54 calli 8010ae0 <__errno> <== NOT EXECUTED
8006994: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8006998: e0 00 00 12 bi 80069e0 <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 )
800699c: 78 01 08 02 mvhi r1,0x802
80069a0: 38 21 81 30 ori r1,r1,0x8130
80069a4: 28 21 00 00 lw r1,(r1+0)
80069a8: 28 21 00 14 lw r1,(r1+20)
80069ac: 44 2b 00 0b be r1,r11,80069d8 <unmount+0xe4>
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
80069b0: 78 01 08 02 mvhi r1,0x802
80069b4: 38 21 8f f8 ori r1,r1,0x8ff8
80069b8: 34 22 00 04 addi r2,r1,4
80069bc: e0 00 00 04 bi 80069cc <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;
80069c0: 28 24 00 18 lw r4,(r1+24)
80069c4: 29 63 00 2c lw r3,(r11+44)
80069c8: 44 83 00 04 be r4,r3,80069d8 <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 ) {
80069cc: 28 21 00 00 lw r1,(r1+0)
80069d0: 5c 22 ff fc bne r1,r2,80069c0 <unmount+0xcc>
80069d4: e0 00 00 2b bi 8006a80 <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 );
80069d8: f8 00 28 42 calli 8010ae0 <__errno>
80069dc: 34 02 00 10 mvi r2,16
80069e0: 58 22 00 00 sw (r1+0),r2
80069e4: e0 00 00 20 bi 8006a64 <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 )
80069e8: 29 62 00 14 lw r2,(r11+20)
80069ec: b9 60 08 00 mv r1,r11
80069f0: 28 42 00 28 lw r2,(r2+40)
80069f4: d8 40 00 00 call r2
80069f8: b8 20 68 00 mv r13,r1
80069fc: 5c 20 00 1a bne r1,r0,8006a64 <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){
8006a00: 29 62 00 28 lw r2,(r11+40)
8006a04: b9 60 08 00 mv r1,r11
8006a08: 28 42 00 2c lw r2,(r2+44)
8006a0c: d8 40 00 00 call r2
8006a10: b8 20 60 00 mv r12,r1
8006a14: 44 2d 00 08 be r1,r13,8006a34 <unmount+0x140> <== ALWAYS TAKEN
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
8006a18: 29 62 00 14 lw r2,(r11+20) <== NOT EXECUTED
8006a1c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8006a20: 28 42 00 20 lw r2,(r2+32) <== NOT EXECUTED
8006a24: d8 40 00 00 call r2 <== NOT EXECUTED
8006a28: 44 20 00 0f be r1,r0,8006a64 <unmount+0x170> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
8006a2c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8006a30: f8 00 03 fa calli 8007a18 <rtems_fatal_error_occurred> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
8006a34: b9 60 08 00 mv r1,r11
8006a38: f8 00 04 d8 calli 8007d98 <_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 );
8006a3c: 29 61 00 14 lw r1,(r11+20)
8006a40: 44 2c 00 05 be r1,r12,8006a54 <unmount+0x160> <== NEVER TAKEN
8006a44: 28 22 00 1c lw r2,(r1+28)
8006a48: 44 4c 00 03 be r2,r12,8006a54 <unmount+0x160> <== NEVER TAKEN
8006a4c: 35 61 00 08 addi r1,r11,8
8006a50: d8 40 00 00 call r2
free( mt_entry );
8006a54: b9 60 08 00 mv r1,r11
8006a58: fb ff f7 bb calli 8004944 <free>
8006a5c: 34 01 00 00 mvi r1,0
return 0;
8006a60: e0 00 00 02 bi 8006a68 <unmount+0x174>
8006a64: 34 01 ff ff mvi r1,-1
}
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 24 addi sp,sp,36
8006a7c: 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 )
8006a80: b9 60 08 00 mv r1,r11
8006a84: fb ff f8 7c calli 8004c74 <rtems_libio_is_open_files_in_fs>
8006a88: 34 02 00 01 mvi r2,1
8006a8c: 5c 22 ff d7 bne r1,r2,80069e8 <unmount+0xf4>
8006a90: e3 ff ff d2 bi 80069d8 <unmount+0xe4>
08003db0 <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
8003db0: 37 9c ff dc addi sp,sp,-36
8003db4: 5b 8b 00 10 sw (sp+16),r11
8003db8: 5b 8c 00 0c sw (sp+12),r12
8003dbc: 5b 8d 00 08 sw (sp+8),r13
8003dc0: 5b 9d 00 04 sw (sp+4),ra
8003dc4: b8 20 60 00 mv r12,r1
8003dc8: 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 ) )
8003dcc: 37 8b 00 14 addi r11,sp,20
8003dd0: f8 00 2f cc calli 800fd00 <strlen>
8003dd4: b8 20 10 00 mv r2,r1
8003dd8: 34 03 00 00 mvi r3,0
8003ddc: b9 80 08 00 mv r1,r12
8003de0: b9 60 20 00 mv r4,r11
8003de4: 34 05 00 01 mvi r5,1
8003de8: fb ff f8 7b calli 8001fd4 <rtems_filesystem_evaluate_path>
8003dec: 34 0c ff ff mvi r12,-1
8003df0: 5c 20 00 18 bne r1,r0,8003e50 <utime+0xa0>
return -1;
if ( !temp_loc.ops->utime_h ){
8003df4: 2b 82 00 20 lw r2,(sp+32)
8003df8: 28 44 00 30 lw r4,(r2+48)
8003dfc: 5c 81 00 0a bne r4,r1,8003e24 <utime+0x74> <== ALWAYS TAKEN
rtems_filesystem_freenode( &temp_loc );
8003e00: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED
8003e04: 44 44 00 03 be r2,r4,8003e10 <utime+0x60> <== NOT EXECUTED
8003e08: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8003e0c: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8003e10: f8 00 27 6b calli 800dbbc <__errno> <== NOT EXECUTED
8003e14: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8003e18: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8003e1c: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
8003e20: e0 00 00 0c bi 8003e50 <utime+0xa0> <== NOT EXECUTED
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
8003e24: 29 a3 00 04 lw r3,(r13+4)
8003e28: 29 a2 00 00 lw r2,(r13+0)
8003e2c: b9 60 08 00 mv r1,r11
8003e30: d8 80 00 00 call r4
8003e34: b8 20 60 00 mv r12,r1
rtems_filesystem_freenode( &temp_loc );
8003e38: 2b 81 00 20 lw r1,(sp+32)
8003e3c: 44 20 00 05 be r1,r0,8003e50 <utime+0xa0> <== NEVER TAKEN
8003e40: 28 22 00 1c lw r2,(r1+28)
8003e44: 44 40 00 03 be r2,r0,8003e50 <utime+0xa0> <== NEVER TAKEN
8003e48: b9 60 08 00 mv r1,r11
8003e4c: d8 40 00 00 call r2
return result;
}
8003e50: b9 80 08 00 mv r1,r12
8003e54: 2b 9d 00 04 lw ra,(sp+4)
8003e58: 2b 8b 00 10 lw r11,(sp+16)
8003e5c: 2b 8c 00 0c lw r12,(sp+12)
8003e60: 2b 8d 00 08 lw r13,(sp+8)
8003e64: 37 9c 00 24 addi sp,sp,36
8003e68: c3 a0 00 00 ret
080199c4 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
80199c4: 37 9c ff e8 addi sp,sp,-24
80199c8: 5b 8b 00 14 sw (sp+20),r11
80199cc: 5b 8c 00 10 sw (sp+16),r12
80199d0: 5b 8d 00 0c sw (sp+12),r13
80199d4: 5b 8e 00 08 sw (sp+8),r14
80199d8: 5b 9d 00 04 sw (sp+4),ra
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
80199dc: 78 04 08 01 mvhi r4,0x801
80199e0: 38 84 c0 10 ori r4,r4,0xc010
80199e4: 28 84 00 00 lw r4,(r4+0)
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
80199e8: b8 40 68 00 mv r13,r2
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
80199ec: 54 81 00 02 bgu r4,r1,80199f4 <write+0x30> <== ALWAYS TAKEN
80199f0: e0 00 00 10 bi 8019a30 <write+0x6c> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
80199f4: 34 02 00 03 mvi r2,3
80199f8: 5b 83 00 18 sw (sp+24),r3
80199fc: 78 0b 08 01 mvhi r11,0x801
8019a00: fb ff 99 fc calli 80001f0 <__ashlsi3>
8019a04: 34 02 00 03 mvi r2,3
8019a08: 39 6b c6 a0 ori r11,r11,0xc6a0
8019a0c: b8 20 70 00 mv r14,r1
8019a10: fb ff 99 f8 calli 80001f0 <__ashlsi3>
8019a14: 29 6c 00 00 lw r12,(r11+0)
8019a18: b5 c1 08 00 add r1,r14,r1
rtems_libio_check_is_open( iop );
8019a1c: 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 );
8019a20: b5 81 60 00 add r12,r12,r1
rtems_libio_check_is_open( iop );
8019a24: 29 81 00 18 lw r1,(r12+24)
8019a28: 20 22 01 00 andi r2,r1,0x100
8019a2c: 5c 40 00 04 bne r2,r0,8019a3c <write+0x78> <== ALWAYS TAKEN
8019a30: fb ff c5 53 calli 800af7c <__errno> <== NOT EXECUTED
8019a34: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
8019a38: e0 00 00 0e bi 8019a70 <write+0xac> <== NOT EXECUTED
rtems_libio_check_buffer( buffer );
8019a3c: 45 a0 00 05 be r13,r0,8019a50 <write+0x8c> <== NEVER TAKEN
rtems_libio_check_count( count );
8019a40: b8 60 58 00 mv r11,r3
8019a44: 44 60 00 1d be r3,r0,8019ab8 <write+0xf4>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
8019a48: 20 21 00 04 andi r1,r1,0x4
8019a4c: 5c 20 00 04 bne r1,r0,8019a5c <write+0x98> <== ALWAYS TAKEN
8019a50: fb ff c5 4b calli 800af7c <__errno> <== NOT EXECUTED
8019a54: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8019a58: e0 00 00 06 bi 8019a70 <write+0xac> <== NOT EXECUTED
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
8019a5c: 29 81 00 40 lw r1,(r12+64)
8019a60: 28 24 00 0c lw r4,(r1+12)
8019a64: 5c 80 00 06 bne r4,r0,8019a7c <write+0xb8> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
8019a68: fb ff c5 45 calli 800af7c <__errno> <== NOT EXECUTED
8019a6c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8019a70: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8019a74: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
8019a78: e0 00 00 10 bi 8019ab8 <write+0xf4> <== NOT EXECUTED
rc = (*iop->handlers->write_h)( iop, buffer, count );
8019a7c: b9 a0 10 00 mv r2,r13
8019a80: b9 80 08 00 mv r1,r12
8019a84: d8 80 00 00 call r4
8019a88: b8 20 58 00 mv r11,r1
if ( rc > 0 )
8019a8c: 4c 01 00 0b bge r0,r1,8019ab8 <write+0xf4> <== NEVER TAKEN
iop->offset += rc;
8019a90: 34 02 00 1f mvi r2,31
8019a94: fb ff 9a 27 calli 8000330 <__ashrsi3>
8019a98: 29 82 00 14 lw r2,(r12+20)
8019a9c: 29 84 00 10 lw r4,(r12+16)
8019aa0: b5 62 10 00 add r2,r11,r2
8019aa4: f5 62 18 00 cmpgu r3,r11,r2
8019aa8: b4 24 08 00 add r1,r1,r4
8019aac: b4 61 08 00 add r1,r3,r1
8019ab0: 59 82 00 14 sw (r12+20),r2
8019ab4: 59 81 00 10 sw (r12+16),r1
return rc;
}
8019ab8: b9 60 08 00 mv r1,r11
8019abc: 2b 9d 00 04 lw ra,(sp+4)
8019ac0: 2b 8b 00 14 lw r11,(sp+20)
8019ac4: 2b 8c 00 10 lw r12,(sp+16)
8019ac8: 2b 8d 00 0c lw r13,(sp+12)
8019acc: 2b 8e 00 08 lw r14,(sp+8)
8019ad0: 37 9c 00 18 addi sp,sp,24
8019ad4: 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 00 10 ori r4,r4,0x10
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 0e 74 ori r11,r11,0xe74
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 27 24 calli 800d770 <__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 27 16 calli 800d770 <__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 27 02 calli 800d770 <__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