RTEMS 4.10Annotated Report
Sat May 22 07:25:05 2010
0800bf7c <IMFS_Set_handlers>:
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
800bf7c: 37 9c ff f0 addi sp,sp,-16
800bf80: 5b 8b 00 10 sw (sp+16),r11
800bf84: 5b 8c 00 0c sw (sp+12),r12
800bf88: 5b 8d 00 08 sw (sp+8),r13
800bf8c: 5b 9d 00 04 sw (sp+4),ra
800bf90: 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 ) {
800bf94: 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;
800bf98: 29 62 00 10 lw r2,(r11+16)
switch( node->type ) {
800bf9c: 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;
800bfa0: 28 4c 00 34 lw r12,(r2+52)
switch( node->type ) {
800bfa4: 34 02 00 06 mvi r2,6
800bfa8: 34 21 ff ff addi r1,r1,-1
800bfac: 54 22 00 16 bgu r1,r2,800c004 <IMFS_Set_handlers+0x88> <== NEVER TAKEN
800bfb0: 78 0d 08 02 mvhi r13,0x802
800bfb4: 34 02 00 02 mvi r2,2
800bfb8: fb ff d3 05 calli 8000bcc <__ashlsi3>
800bfbc: 39 ad 30 3c ori r13,r13,0x303c
800bfc0: b5 a1 08 00 add r1,r13,r1
800bfc4: 28 21 00 00 lw r1,(r1+0)
800bfc8: c0 20 00 00 b r1
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
800bfcc: 29 8c 00 0c lw r12,(r12+12)
800bfd0: e0 00 00 08 bi 800bff0 <IMFS_Set_handlers+0x74>
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
800bfd4: 78 01 08 02 mvhi r1,0x802
800bfd8: 38 21 31 10 ori r1,r1,0x3110
800bfdc: e0 00 00 09 bi 800c000 <IMFS_Set_handlers+0x84>
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
800bfe0: 78 01 08 02 mvhi r1,0x802
800bfe4: 38 21 31 80 ori r1,r1,0x3180
800bfe8: e0 00 00 06 bi 800c000 <IMFS_Set_handlers+0x84>
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
800bfec: 29 8c 00 08 lw r12,(r12+8)
800bff0: 59 6c 00 08 sw (r11+8),r12
break;
800bff4: e0 00 00 04 bi 800c004 <IMFS_Set_handlers+0x88>
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = &IMFS_fifo_handlers;
800bff8: 78 01 08 02 mvhi r1,0x802
800bffc: 38 21 30 58 ori r1,r1,0x3058
800c000: 59 61 00 08 sw (r11+8),r1
break;
}
return 0;
}
800c004: 34 01 00 00 mvi r1,0
800c008: 2b 9d 00 04 lw ra,(sp+4)
800c00c: 2b 8b 00 10 lw r11,(sp+16)
800c010: 2b 8c 00 0c lw r12,(sp+12)
800c014: 2b 8d 00 08 lw r13,(sp+8)
800c018: 37 9c 00 10 addi sp,sp,16
800c01c: c3 a0 00 00 ret
0800bd40 <IMFS_allocate_node>:
IMFS_jnode_t *IMFS_allocate_node(
IMFS_jnode_types_t type,
const char *name,
mode_t mode
)
{
800bd40: 37 9c ff e4 addi sp,sp,-28
800bd44: 5b 8b 00 14 sw (sp+20),r11
800bd48: 5b 8c 00 10 sw (sp+16),r12
800bd4c: 5b 8d 00 0c sw (sp+12),r13
800bd50: 5b 8e 00 08 sw (sp+8),r14
800bd54: 5b 9d 00 04 sw (sp+4),ra
800bd58: b8 20 68 00 mv r13,r1
800bd5c: b8 40 70 00 mv r14,r2
struct timeval tv;
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
800bd60: 34 01 00 01 mvi r1,1
800bd64: 34 02 00 68 mvi r2,104
IMFS_jnode_t *IMFS_allocate_node(
IMFS_jnode_types_t type,
const char *name,
mode_t mode
)
{
800bd68: b8 60 60 00 mv r12,r3
struct timeval tv;
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
800bd6c: fb ff da 70 calli 800272c <calloc>
800bd70: b8 20 58 00 mv r11,r1
if ( !node )
800bd74: 44 20 00 14 be r1,r0,800bdc4 <IMFS_allocate_node+0x84> <== NEVER TAKEN
return NULL;
/*
* Fill in the basic information
*/
node->st_nlink = 1;
800bd78: 34 04 00 01 mvi r4,1
node->type = type;
strncpy( node->name, name, IMFS_NAME_MAX );
800bd7c: b9 c0 10 00 mv r2,r14
800bd80: 34 03 00 20 mvi r3,32
800bd84: 34 21 00 0c addi r1,r1,12
return NULL;
/*
* Fill in the basic information
*/
node->st_nlink = 1;
800bd88: 0d 64 00 34 sh (r11+52),r4
node->type = type;
800bd8c: 59 6d 00 4c sw (r11+76),r13
strncpy( node->name, name, IMFS_NAME_MAX );
800bd90: f8 00 20 8e calli 8013fc8 <strncpy>
/*
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode;
800bd94: 59 6c 00 30 sw (r11+48),r12
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
800bd98: f8 00 04 fe calli 800d190 <geteuid>
800bd9c: 0d 61 00 3c sh (r11+60),r1
node->st_gid = getegid();
800bda0: f8 00 04 f7 calli 800d17c <getegid>
800bda4: 0d 61 00 3e sh (r11+62),r1
#endif
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
800bda8: 34 02 00 00 mvi r2,0
800bdac: 37 81 00 18 addi r1,sp,24
800bdb0: fb ff db 46 calli 8002ac8 <gettimeofday>
node->stat_atime = (time_t) tv.tv_sec;
800bdb4: 2b 81 00 18 lw r1,(sp+24)
node->stat_mtime = (time_t) tv.tv_sec;
node->stat_ctime = (time_t) tv.tv_sec;
800bdb8: 59 61 00 48 sw (r11+72),r1
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
node->stat_atime = (time_t) tv.tv_sec;
800bdbc: 59 61 00 40 sw (r11+64),r1
node->stat_mtime = (time_t) tv.tv_sec;
800bdc0: 59 61 00 44 sw (r11+68),r1
node->stat_ctime = (time_t) tv.tv_sec;
return node;
}
800bdc4: b9 60 08 00 mv r1,r11
800bdc8: 2b 9d 00 04 lw ra,(sp+4)
800bdcc: 2b 8b 00 14 lw r11,(sp+20)
800bdd0: 2b 8c 00 10 lw r12,(sp+16)
800bdd4: 2b 8d 00 0c lw r13,(sp+12)
800bdd8: 2b 8e 00 08 lw r14,(sp+8)
800bddc: 37 9c 00 1c addi sp,sp,28
800bde0: c3 a0 00 00 ret
0800bcb4 <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
800bcb4: 37 9c ff e4 addi sp,sp,-28
800bcb8: 5b 8b 00 14 sw (sp+20),r11
800bcbc: 5b 8c 00 10 sw (sp+16),r12
800bcc0: 5b 8d 00 0c sw (sp+12),r13
800bcc4: 5b 8e 00 08 sw (sp+8),r14
800bcc8: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = (IMFS_jnode_t *) pathloc->node_access;
800bccc: 28 2b 00 00 lw r11,(r1+0)
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
800bcd0: 20 4e ff ff andi r14,r2,0xffff
800bcd4: 20 6d ff ff andi r13,r3,0xffff
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
800bcd8: f8 00 05 2e calli 800d190 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
800bcdc: 2d 62 00 3c lhu r2,(r11+60)
800bce0: 7c 2c 00 00 cmpnei r12,r1,0
800bce4: fc 41 08 00 cmpne r1,r2,r1
800bce8: a1 81 60 00 and r12,r12,r1
800bcec: 45 80 00 06 be r12,r0,800bd04 <IMFS_chown+0x50> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
800bcf0: f8 00 1b da calli 8012c58 <__errno> <== NOT EXECUTED
800bcf4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
800bcf8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800bcfc: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
800bd00: e0 00 00 09 bi 800bd24 <IMFS_chown+0x70> <== NOT EXECUTED
#endif
jnode->st_uid = owner;
800bd04: 0d 6e 00 3c sh (r11+60),r14
jnode->st_gid = group;
800bd08: 0d 6d 00 3e sh (r11+62),r13
IMFS_update_ctime( jnode );
800bd0c: 37 81 00 18 addi r1,sp,24
800bd10: b9 80 10 00 mv r2,r12
800bd14: fb ff db 6d calli 8002ac8 <gettimeofday>
800bd18: 2b 81 00 18 lw r1,(sp+24)
800bd1c: 59 61 00 48 sw (r11+72),r1
800bd20: b9 80 08 00 mv r1,r12
return 0;
}
800bd24: 2b 9d 00 04 lw ra,(sp+4)
800bd28: 2b 8b 00 14 lw r11,(sp+20)
800bd2c: 2b 8c 00 10 lw r12,(sp+16)
800bd30: 2b 8d 00 0c lw r13,(sp+12)
800bd34: 2b 8e 00 08 lw r14,(sp+8)
800bd38: 37 9c 00 1c addi sp,sp,28
800bd3c: c3 a0 00 00 ret
0800be28 <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
800be28: 37 9c ff ec addi sp,sp,-20
800be2c: 5b 8b 00 14 sw (sp+20),r11
800be30: 5b 8c 00 10 sw (sp+16),r12
800be34: 5b 8d 00 0c sw (sp+12),r13
800be38: 5b 8e 00 08 sw (sp+8),r14
800be3c: 5b 9d 00 04 sw (sp+4),ra
800be40: b8 40 70 00 mv r14,r2
800be44: b8 20 60 00 mv r12,r1
800be48: b8 60 10 00 mv r2,r3
800be4c: 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 )
800be50: b8 20 58 00 mv r11,r1
800be54: 44 20 00 42 be r1,r0,800bf5c <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 );
800be58: 78 05 08 02 mvhi r5,0x802
800be5c: 38 a5 50 f8 ori r5,r5,0x50f8
800be60: 28 a3 00 00 lw r3,(r5+0)
800be64: b9 c0 08 00 mv r1,r14
800be68: 28 63 00 2c lw r3,(r3+44)
800be6c: a4 60 18 00 not r3,r3
800be70: a0 83 18 00 and r3,r4,r3
800be74: fb ff ff b3 calli 800bd40 <IMFS_allocate_node>
800be78: b8 20 58 00 mv r11,r1
if ( !node )
800be7c: 44 20 00 38 be r1,r0,800bf5c <IMFS_create_node+0x134> <== NEVER TAKEN
return NULL;
/*
* Set the type specific information
*/
switch (type) {
800be80: 35 c1 ff ff addi r1,r14,-1
800be84: 34 02 00 06 mvi r2,6
800be88: 54 22 00 22 bgu r1,r2,800bf10 <IMFS_create_node+0xe8> <== NEVER TAKEN
800be8c: 78 0e 08 02 mvhi r14,0x802
800be90: 34 02 00 02 mvi r2,2
800be94: fb ff d3 4e calli 8000bcc <__ashlsi3>
800be98: 39 ce 30 0c ori r14,r14,0x300c
800be9c: b5 c1 08 00 add r1,r14,r1
800bea0: 28 21 00 00 lw r1,(r1+0)
800bea4: c0 20 00 00 b r1
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
800bea8: 35 62 00 54 addi r2,r11,84
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
800beac: 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);
800beb0: 59 62 00 50 sw (r11+80),r2
the_chain->permanent_null = NULL;
800beb4: 34 02 00 00 mvi r2,0
800beb8: 59 62 00 54 sw (r11+84),r2
the_chain->last = _Chain_Head(the_chain);
800bebc: 59 61 00 58 sw (r11+88),r1
800bec0: e0 00 00 1c bi 800bf30 <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;
800bec4: 29 a1 00 04 lw r1,(r13+4)
800bec8: 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;
800becc: 29 ad 00 00 lw r13,(r13+0)
800bed0: 59 6d 00 50 sw (r11+80),r13
node->info.device.minor = info->device.minor;
break;
800bed4: e0 00 00 17 bi 800bf30 <IMFS_create_node+0x108>
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
800bed8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
node->info.linearfile.direct = 0;
800bedc: 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;
800bee0: 59 61 00 50 sw (r11+80),r1 <== NOT EXECUTED
800bee4: 59 61 00 54 sw (r11+84),r1 <== NOT EXECUTED
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
800bee8: 34 02 00 00 mvi r2,0
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
800beec: 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;
800bef0: 59 62 00 50 sw (r11+80),r2
800bef4: 59 62 00 54 sw (r11+84),r2
node->info.file.indirect = 0;
800bef8: 59 62 00 58 sw (r11+88),r2
node->info.file.doubly_indirect = 0;
800befc: 59 62 00 5c sw (r11+92),r2
node->info.file.triply_indirect = 0;
break;
800bf00: e0 00 00 0c bi 800bf30 <IMFS_create_node+0x108>
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
800bf04: 34 01 00 00 mvi r1,0
800bf08: 59 61 00 50 sw (r11+80),r1
break;
800bf0c: e0 00 00 09 bi 800bf30 <IMFS_create_node+0x108>
default:
assert(0);
800bf10: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800bf14: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
800bf18: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
800bf1c: 38 21 2f bc ori r1,r1,0x2fbc <== NOT EXECUTED
800bf20: 38 63 30 28 ori r3,r3,0x3028 <== NOT EXECUTED
800bf24: 38 84 30 08 ori r4,r4,0x3008 <== NOT EXECUTED
800bf28: 34 02 00 5c mvi r2,92 <== NOT EXECUTED
800bf2c: f8 00 04 01 calli 800cf30 <__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;
800bf30: 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;
800bf34: 29 81 00 00 lw r1,(r12+0)
800bf38: b9 60 10 00 mv r2,r11
fs_info = parent_loc->mt_entry->fs_info;
800bf3c: 28 63 00 34 lw r3,(r3+52)
node->Parent = parent;
800bf40: 59 61 00 08 sw (r11+8),r1
800bf44: 34 21 00 50 addi r1,r1,80
node->st_ino = ++fs_info->ino_count;
800bf48: 28 64 00 04 lw r4,(r3+4)
800bf4c: 34 84 00 01 addi r4,r4,1
800bf50: 58 64 00 04 sw (r3+4),r4
800bf54: 59 64 00 38 sw (r11+56),r4
800bf58: fb ff e3 99 calli 8004dbc <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
800bf5c: b9 60 08 00 mv r1,r11
800bf60: 2b 9d 00 04 lw ra,(sp+4)
800bf64: 2b 8b 00 14 lw r11,(sp+20)
800bf68: 2b 8c 00 10 lw r12,(sp+16)
800bf6c: 2b 8d 00 0c lw r13,(sp+12)
800bf70: 2b 8e 00 08 lw r14,(sp+8)
800bf74: 37 9c 00 14 addi sp,sp,20
800bf78: c3 a0 00 00 ret
0800bde4 <IMFS_create_root_node>:
IMFS_jnode_t *IMFS_create_root_node(void)
{
800bde4: 37 9c ff fc addi sp,sp,-4
800bde8: 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) );
800bdec: 78 02 08 02 mvhi r2,0x802
800bdf0: 38 42 2c 88 ori r2,r2,0x2c88
800bdf4: 34 01 00 01 mvi r1,1
800bdf8: 34 03 41 ed mvi r3,16877
800bdfc: fb ff ff d1 calli 800bd40 <IMFS_allocate_node>
if ( !node )
800be00: 44 20 00 07 be r1,r0,800be1c <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);
800be04: 34 23 00 54 addi r3,r1,84
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
800be08: 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);
800be0c: 58 23 00 50 sw (r1+80),r3
the_chain->permanent_null = NULL;
800be10: 34 03 00 00 mvi r3,0
800be14: 58 23 00 54 sw (r1+84),r3
the_chain->last = _Chain_Head(the_chain);
800be18: 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;
}
800be1c: 2b 9d 00 04 lw ra,(sp+4)
800be20: 37 9c 00 04 addi sp,sp,4
800be24: 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 68 1c ori r1,r1,0x681c <== NOT EXECUTED
8003908: 38 63 69 e0 ori r3,r3,0x69e0 <== NOT EXECUTED
800390c: 38 84 68 e0 ori r4,r4,0x68e0 <== 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 68 1c ori r1,r1,0x681c <== NOT EXECUTED
800392c: 38 63 69 e0 ori r3,r3,0x69e0 <== NOT EXECUTED
8003930: 38 84 68 f0 ori r4,r4,0x68f0 <== 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 68 1c ori r1,r1,0x681c <== NOT EXECUTED
8003958: 38 63 69 e0 ori r3,r3,0x69e0 <== NOT EXECUTED
800395c: 38 84 68 fc ori r4,r4,0x68fc <== 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 91 d8 ori r12,r12,0x91d8
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 69 24 ori r1,r1,0x6924
80039a0: f8 00 3d a2 calli 8013028 <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
0800c20c <IMFS_eval_path>:
const char *pathname, /* IN */
int pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
800c20c: 37 9c ff 84 addi sp,sp,-124
800c210: 5b 8b 00 40 sw (sp+64),r11
800c214: 5b 8c 00 3c sw (sp+60),r12
800c218: 5b 8d 00 38 sw (sp+56),r13
800c21c: 5b 8e 00 34 sw (sp+52),r14
800c220: 5b 8f 00 30 sw (sp+48),r15
800c224: 5b 90 00 2c sw (sp+44),r16
800c228: 5b 91 00 28 sw (sp+40),r17
800c22c: 5b 92 00 24 sw (sp+36),r18
800c230: 5b 93 00 20 sw (sp+32),r19
800c234: 5b 94 00 1c sw (sp+28),r20
800c238: 5b 95 00 18 sw (sp+24),r21
800c23c: 5b 96 00 14 sw (sp+20),r22
800c240: 5b 97 00 10 sw (sp+16),r23
800c244: 5b 98 00 0c sw (sp+12),r24
800c248: 5b 99 00 08 sw (sp+8),r25
800c24c: 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;
800c250: 34 0e 00 01 mvi r14,1
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
800c254: 78 13 08 02 mvhi r19,0x802
const char *pathname, /* IN */
int pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
800c258: b8 80 58 00 mv r11,r4
800c25c: b8 20 90 00 mv r18,r1
800c260: b8 40 78 00 mv r15,r2
800c264: b8 60 88 00 mv r17,r3
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
800c268: 3a 73 50 f8 ori r19,r19,0x50f8
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
800c26c: 28 8c 00 00 lw r12,(r4+0)
800c270: 34 10 00 00 mvi r16,0
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
800c274: 37 96 00 44 addi r22,sp,68
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
800c278: b9 c0 a0 00 mv r20,r14
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
800c27c: 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 ) {
800c280: 34 15 00 04 mvi r21,4
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
if ( result == -1 )
800c284: 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 ) {
800c288: 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) ) {
800c28c: e0 00 00 4b bi 800c3b8 <IMFS_eval_path+0x1ac>
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
800c290: b6 50 08 00 add r1,r18,r16
800c294: b9 e0 10 00 mv r2,r15
800c298: ba c0 18 00 mv r3,r22
800c29c: 37 84 00 7c addi r4,sp,124
800c2a0: f8 00 02 76 calli 800cc78 <IMFS_get_token>
800c2a4: b8 20 70 00 mv r14,r1
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
800c2a8: 29 61 00 00 lw r1,(r11+0)
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
800c2ac: 2b 8d 00 7c lw r13,(sp+124)
i += len;
if ( !pathloc->node_access )
800c2b0: 44 20 00 3a be r1,r0,800c398 <IMFS_eval_path+0x18c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
800c2b4: 45 c0 00 07 be r14,r0,800c2d0 <IMFS_eval_path+0xc4>
if ( node->type == IMFS_DIRECTORY )
800c2b8: 29 81 00 4c lw r1,(r12+76)
800c2bc: 5c 34 00 05 bne r1,r20,800c2d0 <IMFS_eval_path+0xc4>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
800c2c0: b9 60 08 00 mv r1,r11
800c2c4: ba 80 10 00 mv r2,r20
800c2c8: fb ff ff 56 calli 800c020 <IMFS_evaluate_permission>
800c2cc: 44 20 00 5f be r1,r0,800c448 <IMFS_eval_path+0x23c>
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
i += len;
800c2d0: b6 0d 80 00 add r16,r16,r13
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
800c2d4: c9 ed 78 00 sub r15,r15,r13
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
800c2d8: 29 6c 00 00 lw r12,(r11+0)
switch( type ) {
800c2dc: 45 d9 00 11 be r14,r25,800c320 <IMFS_eval_path+0x114>
800c2e0: 45 d5 00 33 be r14,r21,800c3ac <IMFS_eval_path+0x1a0>
800c2e4: 5d d7 00 35 bne r14,r23,800c3b8 <IMFS_eval_path+0x1ac>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
800c2e8: 2a 61 00 00 lw r1,(r19+0)
800c2ec: 28 21 00 18 lw r1,(r1+24)
800c2f0: 45 81 00 32 be r12,r1,800c3b8 <IMFS_eval_path+0x1ac>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
800c2f4: 29 64 00 10 lw r4,(r11+16)
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
800c2f8: 28 81 00 1c lw r1,(r4+28)
800c2fc: 5d 81 00 04 bne r12,r1,800c30c <IMFS_eval_path+0x100>
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
800c300: 37 8c 00 68 addi r12,sp,104
800c304: 34 82 00 08 addi r2,r4,8
800c308: e0 00 00 37 bi 800c3e4 <IMFS_eval_path+0x1d8>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
800c30c: 29 8c 00 08 lw r12,(r12+8)
800c310: 5d 80 00 25 bne r12,r0,800c3a4 <IMFS_eval_path+0x198>
rtems_set_errno_and_return_minus_one( ENOENT );
800c314: f8 00 1a 51 calli 8012c58 <__errno>
800c318: 58 2e 00 00 sw (r1+0),r14
800c31c: e0 00 00 4e bi 800c454 <IMFS_eval_path+0x248>
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
800c320: 29 81 00 4c lw r1,(r12+76)
800c324: 5c 2e 00 07 bne r1,r14,800c340 <IMFS_eval_path+0x134>
IMFS_evaluate_hard_link( pathloc, 0 );
800c328: b9 60 08 00 mv r1,r11
800c32c: 34 02 00 00 mvi r2,0
800c330: fb ff ff 5b calli 800c09c <IMFS_evaluate_hard_link>
node = pathloc->node_access;
800c334: 29 6c 00 00 lw r12,(r11+0)
if ( !node )
800c338: 5d 80 00 09 bne r12,r0,800c35c <IMFS_eval_path+0x150> <== ALWAYS TAKEN
800c33c: e0 00 00 0a bi 800c364 <IMFS_eval_path+0x158> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
800c340: 5c 35 00 07 bne r1,r21,800c35c <IMFS_eval_path+0x150>
result = IMFS_evaluate_sym_link( pathloc, 0 );
800c344: b9 60 08 00 mv r1,r11
800c348: 34 02 00 00 mvi r2,0
800c34c: fb ff ff 71 calli 800c110 <IMFS_evaluate_sym_link>
800c350: b8 20 68 00 mv r13,r1
node = pathloc->node_access;
800c354: 29 6c 00 00 lw r12,(r11+0)
if ( result == -1 )
800c358: 44 38 00 40 be r1,r24,800c458 <IMFS_eval_path+0x24c> <== NEVER TAKEN
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
800c35c: 29 81 00 4c lw r1,(r12+76)
800c360: 44 34 00 04 be r1,r20,800c370 <IMFS_eval_path+0x164>
rtems_set_errno_and_return_minus_one( ENOTDIR );
800c364: f8 00 1a 3d calli 8012c58 <__errno>
800c368: 34 02 00 14 mvi r2,20
800c36c: e0 00 00 39 bi 800c450 <IMFS_eval_path+0x244>
/*
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
800c370: 29 8d 00 5c lw r13,(r12+92)
800c374: 45 a0 00 04 be r13,r0,800c384 <IMFS_eval_path+0x178>
newloc = node->info.directory.mt_fs->mt_fs_root;
800c378: 37 8c 00 68 addi r12,sp,104
800c37c: 35 a2 00 1c addi r2,r13,28
800c380: e0 00 00 19 bi 800c3e4 <IMFS_eval_path+0x1d8>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
800c384: b9 80 08 00 mv r1,r12
800c388: ba c0 10 00 mv r2,r22
800c38c: f8 00 02 0d calli 800cbc0 <IMFS_find_match_in_dir>
800c390: b8 20 60 00 mv r12,r1
if ( !node )
800c394: 5c 2d 00 04 bne r1,r13,800c3a4 <IMFS_eval_path+0x198>
rtems_set_errno_and_return_minus_one( ENOENT );
800c398: f8 00 1a 30 calli 8012c58 <__errno>
800c39c: 34 02 00 02 mvi r2,2
800c3a0: e0 00 00 2c bi 800c450 <IMFS_eval_path+0x244>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
800c3a4: 59 6c 00 00 sw (r11+0),r12
800c3a8: e0 00 00 04 bi 800c3b8 <IMFS_eval_path+0x1ac>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
800c3ac: f8 00 1a 2b calli 8012c58 <__errno>
800c3b0: 34 02 00 5b mvi r2,91
800c3b4: e0 00 00 27 bi 800c450 <IMFS_eval_path+0x244>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
800c3b8: 7d c1 00 00 cmpnei r1,r14,0
800c3bc: 7d ce 00 04 cmpnei r14,r14,4
800c3c0: a1 c1 70 00 and r14,r14,r1
800c3c4: 5d c0 ff b3 bne r14,r0,800c290 <IMFS_eval_path+0x84>
* new fs root node and let let the mounted filesystem set the handlers.
*
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
800c3c8: 29 82 00 4c lw r2,(r12+76)
800c3cc: 34 01 00 01 mvi r1,1
800c3d0: 5c 41 00 17 bne r2,r1,800c42c <IMFS_eval_path+0x220>
if ( node->info.directory.mt_fs != NULL ) {
800c3d4: 29 83 00 5c lw r3,(r12+92)
800c3d8: 44 60 00 15 be r3,r0,800c42c <IMFS_eval_path+0x220>
newloc = node->info.directory.mt_fs->mt_fs_root;
800c3dc: 37 8c 00 68 addi r12,sp,104
800c3e0: 34 62 00 1c addi r2,r3,28
800c3e4: 34 03 00 14 mvi r3,20
800c3e8: b9 80 08 00 mv r1,r12
800c3ec: f8 00 1c c1 calli 80136f0 <memcpy>
*pathloc = newloc;
800c3f0: b9 80 10 00 mv r2,r12
800c3f4: 34 03 00 14 mvi r3,20
800c3f8: b9 60 08 00 mv r1,r11
800c3fc: f8 00 1c bd calli 80136f0 <memcpy>
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
800c400: 29 61 00 0c lw r1,(r11+12)
800c404: 2b 82 00 7c lw r2,(sp+124)
800c408: ba 20 18 00 mv r3,r17
800c40c: 28 25 00 00 lw r5,(r1+0)
800c410: ca 02 08 00 sub r1,r16,r2
800c414: b6 41 08 00 add r1,r18,r1
800c418: b5 e2 10 00 add r2,r15,r2
800c41c: b9 60 20 00 mv r4,r11
800c420: d8 a0 00 00 call r5
800c424: b8 20 68 00 mv r13,r1
800c428: e0 00 00 0c bi 800c458 <IMFS_eval_path+0x24c>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
800c42c: b9 60 08 00 mv r1,r11
800c430: fb ff fe d3 calli 800bf7c <IMFS_Set_handlers>
800c434: b8 20 68 00 mv r13,r1
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
800c438: ba 20 10 00 mv r2,r17
800c43c: b9 60 08 00 mv r1,r11
800c440: fb ff fe f8 calli 800c020 <IMFS_evaluate_permission>
800c444: 5c 20 00 05 bne r1,r0,800c458 <IMFS_eval_path+0x24c>
rtems_set_errno_and_return_minus_one( EACCES );
800c448: f8 00 1a 04 calli 8012c58 <__errno>
800c44c: 34 02 00 0d mvi r2,13
800c450: 58 22 00 00 sw (r1+0),r2
800c454: 34 0d ff ff mvi r13,-1
return result;
}
800c458: b9 a0 08 00 mv r1,r13
800c45c: 2b 9d 00 04 lw ra,(sp+4)
800c460: 2b 8b 00 40 lw r11,(sp+64)
800c464: 2b 8c 00 3c lw r12,(sp+60)
800c468: 2b 8d 00 38 lw r13,(sp+56)
800c46c: 2b 8e 00 34 lw r14,(sp+52)
800c470: 2b 8f 00 30 lw r15,(sp+48)
800c474: 2b 90 00 2c lw r16,(sp+44)
800c478: 2b 91 00 28 lw r17,(sp+40)
800c47c: 2b 92 00 24 lw r18,(sp+36)
800c480: 2b 93 00 20 lw r19,(sp+32)
800c484: 2b 94 00 1c lw r20,(sp+28)
800c488: 2b 95 00 18 lw r21,(sp+24)
800c48c: 2b 96 00 14 lw r22,(sp+20)
800c490: 2b 97 00 10 lw r23,(sp+16)
800c494: 2b 98 00 0c lw r24,(sp+12)
800c498: 2b 99 00 08 lw r25,(sp+8)
800c49c: 37 9c 00 7c addi sp,sp,124
800c4a0: c3 a0 00 00 ret
0800c5a0 <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 */
)
{
800c5a0: 37 9c ff 84 addi sp,sp,-124
800c5a4: 5b 8b 00 40 sw (sp+64),r11
800c5a8: 5b 8c 00 3c sw (sp+60),r12
800c5ac: 5b 8d 00 38 sw (sp+56),r13
800c5b0: 5b 8e 00 34 sw (sp+52),r14
800c5b4: 5b 8f 00 30 sw (sp+48),r15
800c5b8: 5b 90 00 2c sw (sp+44),r16
800c5bc: 5b 91 00 28 sw (sp+40),r17
800c5c0: 5b 92 00 24 sw (sp+36),r18
800c5c4: 5b 93 00 20 sw (sp+32),r19
800c5c8: 5b 94 00 1c sw (sp+28),r20
800c5cc: 5b 95 00 18 sw (sp+24),r21
800c5d0: 5b 96 00 14 sw (sp+20),r22
800c5d4: 5b 97 00 10 sw (sp+16),r23
800c5d8: 5b 98 00 0c sw (sp+12),r24
800c5dc: 5b 99 00 08 sw (sp+8),r25
800c5e0: 5b 9d 00 04 sw (sp+4),ra
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
800c5e4: 78 10 08 02 mvhi r16,0x802
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
800c5e8: b8 40 60 00 mv r12,r2
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
800c5ec: 28 4b 00 00 lw r11,(r2+0)
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
800c5f0: b8 60 88 00 mv r17,r3
800c5f4: b8 20 78 00 mv r15,r1
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
800c5f8: f8 00 1e 49 calli 8013f1c <strlen>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
800c5fc: 3a 10 50 f8 ori r16,r16,0x50f8
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
800c600: 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 );
800c604: 37 98 00 44 addi r24,sp,68
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
800c608: 34 13 00 01 mvi r19,1
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
800c60c: 34 17 00 02 mvi r23,2
800c610: 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 ) {
800c614: 34 15 00 04 mvi r21,4
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
800c618: 34 14 ff ff mvi r20,-1
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
800c61c: b8 20 90 00 mv r18,r1
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
800c620: ba 40 10 00 mv r2,r18
800c624: b5 ed 08 00 add r1,r15,r13
800c628: bb 00 18 00 mv r3,r24
800c62c: 37 84 00 7c addi r4,sp,124
800c630: f8 00 01 92 calli 800cc78 <IMFS_get_token>
800c634: b8 20 70 00 mv r14,r1
pathlen -= len;
800c638: 2b 99 00 7c lw r25,(sp+124)
i += len;
if ( !pathloc->node_access )
800c63c: 29 81 00 00 lw r1,(r12+0)
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
800c640: ca 59 90 00 sub r18,r18,r25
i += len;
if ( !pathloc->node_access )
800c644: 44 20 00 55 be r1,r0,800c798 <IMFS_evaluate_for_make+0x1f8><== NEVER TAKEN
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
800c648: 45 c0 00 07 be r14,r0,800c664 <IMFS_evaluate_for_make+0xc4>
if ( node->type == IMFS_DIRECTORY )
800c64c: 29 61 00 4c lw r1,(r11+76)
800c650: 5c 33 00 05 bne r1,r19,800c664 <IMFS_evaluate_for_make+0xc4>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
800c654: b9 80 08 00 mv r1,r12
800c658: ba 60 10 00 mv r2,r19
800c65c: fb ff fe 71 calli 800c020 <IMFS_evaluate_permission>
800c660: 44 20 00 64 be r1,r0,800c7f0 <IMFS_evaluate_for_make+0x250>
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
800c664: b5 b9 68 00 add r13,r13,r25
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
800c668: 29 8b 00 00 lw r11,(r12+0)
switch( type ) {
800c66c: 45 d7 00 07 be r14,r23,800c688 <IMFS_evaluate_for_make+0xe8>
800c670: 55 d7 00 03 bgu r14,r23,800c67c <IMFS_evaluate_for_make+0xdc>
800c674: 5d c0 ff eb bne r14,r0,800c620 <IMFS_evaluate_for_make+0x80>
800c678: e0 00 00 3a bi 800c760 <IMFS_evaluate_for_make+0x1c0>
800c67c: 45 d6 00 11 be r14,r22,800c6c0 <IMFS_evaluate_for_make+0x120>
800c680: 5d d5 ff e8 bne r14,r21,800c620 <IMFS_evaluate_for_make+0x80><== NEVER TAKEN
800c684: e0 00 00 3a bi 800c76c <IMFS_evaluate_for_make+0x1cc>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
800c688: 2a 01 00 00 lw r1,(r16+0)
800c68c: 28 21 00 18 lw r1,(r1+24)
800c690: 45 61 ff e4 be r11,r1,800c620 <IMFS_evaluate_for_make+0x80>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
800c694: 29 84 00 10 lw r4,(r12+16)
800c698: 28 81 00 1c lw r1,(r4+28)
800c69c: 5d 61 00 04 bne r11,r1,800c6ac <IMFS_evaluate_for_make+0x10c>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
800c6a0: 37 8b 00 68 addi r11,sp,104
800c6a4: 34 82 00 08 addi r2,r4,8
800c6a8: e0 00 00 16 bi 800c700 <IMFS_evaluate_for_make+0x160>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
800c6ac: 29 6b 00 08 lw r11,(r11+8)
800c6b0: 5d 60 00 2a bne r11,r0,800c758 <IMFS_evaluate_for_make+0x1b8>
rtems_set_errno_and_return_minus_one( ENOENT );
800c6b4: f8 00 19 69 calli 8012c58 <__errno>
800c6b8: 58 2e 00 00 sw (r1+0),r14
800c6bc: e0 00 00 50 bi 800c7fc <IMFS_evaluate_for_make+0x25c>
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
800c6c0: 29 61 00 4c lw r1,(r11+76)
800c6c4: 44 36 00 02 be r1,r22,800c6cc <IMFS_evaluate_for_make+0x12c>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
800c6c8: 5c 35 00 06 bne r1,r21,800c6e0 <IMFS_evaluate_for_make+0x140>
result = IMFS_evaluate_link( pathloc, 0 );
800c6cc: b9 80 08 00 mv r1,r12
800c6d0: 34 02 00 00 mvi r2,0
800c6d4: fb ff ff 74 calli 800c4a4 <IMFS_evaluate_link>
800c6d8: b8 20 58 00 mv r11,r1
if ( result == -1 )
800c6dc: 44 34 00 49 be r1,r20,800c800 <IMFS_evaluate_for_make+0x260><== NEVER TAKEN
return -1;
}
node = pathloc->node_access;
800c6e0: 29 84 00 00 lw r4,(r12+0)
if ( !node )
800c6e4: 44 80 00 3c be r4,r0,800c7d4 <IMFS_evaluate_for_make+0x234><== NEVER TAKEN
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
800c6e8: 28 81 00 4c lw r1,(r4+76)
800c6ec: 5c 33 00 3a bne r1,r19,800c7d4 <IMFS_evaluate_for_make+0x234>
/*
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
800c6f0: 28 8e 00 5c lw r14,(r4+92)
800c6f4: 45 c0 00 14 be r14,r0,800c744 <IMFS_evaluate_for_make+0x1a4>
newloc = node->info.directory.mt_fs->mt_fs_root;
800c6f8: 37 8b 00 68 addi r11,sp,104
800c6fc: 35 c2 00 1c addi r2,r14,28
800c700: 34 03 00 14 mvi r3,20
800c704: b9 60 08 00 mv r1,r11
800c708: f8 00 1b fa calli 80136f0 <memcpy>
*pathloc = newloc;
800c70c: b9 60 10 00 mv r2,r11
800c710: 34 03 00 14 mvi r3,20
800c714: b9 80 08 00 mv r1,r12
800c718: f8 00 1b f6 calli 80136f0 <memcpy>
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
800c71c: 29 81 00 0c lw r1,(r12+12)
800c720: b9 80 10 00 mv r2,r12
800c724: ba 20 18 00 mv r3,r17
800c728: 28 24 00 04 lw r4,(r1+4)
800c72c: 2b 81 00 7c lw r1,(sp+124)
800c730: c9 a1 68 00 sub r13,r13,r1
800c734: b5 ed 08 00 add r1,r15,r13
800c738: d8 80 00 00 call r4
800c73c: b8 20 58 00 mv r11,r1
800c740: e0 00 00 30 bi 800c800 <IMFS_evaluate_for_make+0x260>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
800c744: b8 80 08 00 mv r1,r4
800c748: bb 00 10 00 mv r2,r24
800c74c: f8 00 01 1d calli 800cbc0 <IMFS_find_match_in_dir>
800c750: b8 20 58 00 mv r11,r1
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
800c754: 44 2e 00 09 be r1,r14,800c778 <IMFS_evaluate_for_make+0x1d8>
done = true;
else
pathloc->node_access = node;
800c758: 59 8b 00 00 sw (r12+0),r11
800c75c: e3 ff ff b1 bi 800c620 <IMFS_evaluate_for_make+0x80>
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
800c760: f8 00 19 3e calli 8012c58 <__errno>
800c764: 34 02 00 11 mvi r2,17
800c768: e0 00 00 24 bi 800c7f8 <IMFS_evaluate_for_make+0x258>
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
800c76c: f8 00 19 3b calli 8012c58 <__errno>
800c770: 34 02 00 5b mvi r2,91
800c774: e0 00 00 21 bi 800c7f8 <IMFS_evaluate_for_make+0x258>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
800c778: 2b 82 00 7c lw r2,(sp+124)
800c77c: b5 ed 08 00 add r1,r15,r13
800c780: c9 a2 68 00 sub r13,r13,r2
800c784: b5 ed 78 00 add r15,r15,r13
800c788: 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++) {
800c78c: e0 00 00 06 bi 800c7a4 <IMFS_evaluate_for_make+0x204>
if ( !IMFS_is_separator( path[ i ] ) )
800c790: a0 64 18 00 and r3,r3,r4
800c794: 44 60 00 04 be r3,r0,800c7a4 <IMFS_evaluate_for_make+0x204>
rtems_set_errno_and_return_minus_one( ENOENT );
800c798: f8 00 19 30 calli 8012c58 <__errno>
800c79c: 34 02 00 02 mvi r2,2
800c7a0: e0 00 00 16 bi 800c7f8 <IMFS_evaluate_for_make+0x258>
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
800c7a4: 40 22 00 00 lbu r2,(r1+0)
800c7a8: 34 21 00 01 addi r1,r1,1
if ( !IMFS_is_separator( path[ i ] ) )
800c7ac: 7c 44 00 2f cmpnei r4,r2,47
800c7b0: 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++) {
800c7b4: 5c 40 ff f7 bne r2,r0,800c790 <IMFS_evaluate_for_make+0x1f0>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
800c7b8: b9 80 08 00 mv r1,r12
800c7bc: fb ff fd f0 calli 800bf7c <IMFS_Set_handlers>
800c7c0: b8 20 58 00 mv r11,r1
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
800c7c4: 29 81 00 00 lw r1,(r12+0)
800c7c8: 28 22 00 4c lw r2,(r1+76)
800c7cc: 34 01 00 01 mvi r1,1
800c7d0: 44 41 00 04 be r2,r1,800c7e0 <IMFS_evaluate_for_make+0x240><== ALWAYS TAKEN
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
800c7d4: f8 00 19 21 calli 8012c58 <__errno>
800c7d8: 34 02 00 14 mvi r2,20
800c7dc: e0 00 00 07 bi 800c7f8 <IMFS_evaluate_for_make+0x258>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
800c7e0: b9 80 08 00 mv r1,r12
800c7e4: 34 02 00 03 mvi r2,3
800c7e8: fb ff fe 0e calli 800c020 <IMFS_evaluate_permission>
800c7ec: 5c 20 00 05 bne r1,r0,800c800 <IMFS_evaluate_for_make+0x260>
rtems_set_errno_and_return_minus_one( EACCES );
800c7f0: f8 00 19 1a calli 8012c58 <__errno>
800c7f4: 34 02 00 0d mvi r2,13
800c7f8: 58 22 00 00 sw (r1+0),r2
800c7fc: 34 0b ff ff mvi r11,-1
return result;
}
800c800: b9 60 08 00 mv r1,r11
800c804: 2b 9d 00 04 lw ra,(sp+4)
800c808: 2b 8b 00 40 lw r11,(sp+64)
800c80c: 2b 8c 00 3c lw r12,(sp+60)
800c810: 2b 8d 00 38 lw r13,(sp+56)
800c814: 2b 8e 00 34 lw r14,(sp+52)
800c818: 2b 8f 00 30 lw r15,(sp+48)
800c81c: 2b 90 00 2c lw r16,(sp+44)
800c820: 2b 91 00 28 lw r17,(sp+40)
800c824: 2b 92 00 24 lw r18,(sp+36)
800c828: 2b 93 00 20 lw r19,(sp+32)
800c82c: 2b 94 00 1c lw r20,(sp+28)
800c830: 2b 95 00 18 lw r21,(sp+24)
800c834: 2b 96 00 14 lw r22,(sp+20)
800c838: 2b 97 00 10 lw r23,(sp+16)
800c83c: 2b 98 00 0c lw r24,(sp+12)
800c840: 2b 99 00 08 lw r25,(sp+8)
800c844: 37 9c 00 7c addi sp,sp,124
800c848: c3 a0 00 00 ret
0800c09c <IMFS_evaluate_hard_link>:
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
800c09c: 37 9c ff f4 addi sp,sp,-12
800c0a0: 5b 8b 00 08 sw (sp+8),r11
800c0a4: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *jnode = node->node_access;
800c0a8: 28 23 00 00 lw r3,(r1+0)
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
800c0ac: 34 04 00 03 mvi r4,3
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
800c0b0: b8 20 58 00 mv r11,r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
800c0b4: 28 65 00 4c lw r5,(r3+76)
800c0b8: 44 a4 00 04 be r5,r4,800c0c8 <IMFS_evaluate_hard_link+0x2c><== ALWAYS TAKEN
rtems_fatal_error_occurred (0xABCD0000);
800c0bc: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED
800c0c0: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED
800c0c4: fb ff e1 cd calli 80047f8 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
800c0c8: 28 63 00 50 lw r3,(r3+80)
IMFS_Set_handlers( node );
800c0cc: 5b 82 00 0c sw (sp+12),r2
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
800c0d0: 58 23 00 00 sw (r1+0),r3
IMFS_Set_handlers( node );
800c0d4: fb ff ff aa calli 800bf7c <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
800c0d8: 2b 82 00 0c lw r2,(sp+12)
800c0dc: b9 60 08 00 mv r1,r11
800c0e0: fb ff ff d0 calli 800c020 <IMFS_evaluate_permission>
800c0e4: 34 02 00 00 mvi r2,0
800c0e8: 5c 22 00 05 bne r1,r2,800c0fc <IMFS_evaluate_hard_link+0x60><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EACCES );
800c0ec: f8 00 1a db calli 8012c58 <__errno> <== NOT EXECUTED
800c0f0: 34 02 00 0d mvi r2,13 <== NOT EXECUTED
800c0f4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800c0f8: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
return result;
}
800c0fc: b8 40 08 00 mv r1,r2
800c100: 2b 9d 00 04 lw ra,(sp+4)
800c104: 2b 8b 00 08 lw r11,(sp+8)
800c108: 37 9c 00 0c addi sp,sp,12
800c10c: c3 a0 00 00 ret
0800c020 <IMFS_evaluate_permission>:
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
800c020: 37 9c ff f0 addi sp,sp,-16
800c024: 5b 8b 00 10 sw (sp+16),r11
800c028: 5b 8c 00 0c sw (sp+12),r12
800c02c: 5b 8d 00 08 sw (sp+8),r13
800c030: 5b 9d 00 04 sw (sp+4),ra
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
800c034: 28 2b 00 00 lw r11,(r1+0)
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
800c038: b8 40 60 00 mv r12,r2
}
jnode = node->node_access;
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
800c03c: f8 00 04 55 calli 800d190 <geteuid>
800c040: b8 20 68 00 mv r13,r1
st_gid = getegid();
800c044: f8 00 04 4e calli 800d17c <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
800c048: 2d 62 00 3c lhu r2,(r11+60)
800c04c: 5c 4d 00 04 bne r2,r13,800c05c <IMFS_evaluate_permission+0x3c>
flags_to_test <<= 6;
800c050: b9 80 08 00 mv r1,r12
800c054: 34 02 00 06 mvi r2,6
800c058: e0 00 00 06 bi 800c070 <IMFS_evaluate_permission+0x50>
else if ( st_gid == jnode->st_gid )
800c05c: 2d 62 00 3e lhu r2,(r11+62)
800c060: b9 80 18 00 mv r3,r12
800c064: 5c 41 00 05 bne r2,r1,800c078 <IMFS_evaluate_permission+0x58><== NEVER TAKEN
flags_to_test <<= 3;
800c068: b9 80 08 00 mv r1,r12
800c06c: 34 02 00 03 mvi r2,3
800c070: fb ff d2 d7 calli 8000bcc <__ashlsi3>
800c074: b8 20 18 00 mv r3,r1
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
800c078: 29 61 00 30 lw r1,(r11+48)
800c07c: a0 61 08 00 and r1,r3,r1
return 1;
return 0;
}
800c080: e4 23 08 00 cmpe r1,r1,r3
800c084: 2b 9d 00 04 lw ra,(sp+4)
800c088: 2b 8b 00 10 lw r11,(sp+16)
800c08c: 2b 8c 00 0c lw r12,(sp+12)
800c090: 2b 8d 00 08 lw r13,(sp+8)
800c094: 37 9c 00 10 addi sp,sp,16
800c098: c3 a0 00 00 ret
0800c110 <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
800c110: 37 9c ff f0 addi sp,sp,-16
800c114: 5b 8b 00 10 sw (sp+16),r11
800c118: 5b 8c 00 0c sw (sp+12),r12
800c11c: 5b 8d 00 08 sw (sp+8),r13
800c120: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *jnode = node->node_access;
800c124: 28 2c 00 00 lw r12,(r1+0)
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
800c128: b8 40 68 00 mv r13,r2
800c12c: b8 20 58 00 mv r11,r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
800c130: 29 82 00 4c lw r2,(r12+76)
800c134: 34 01 00 04 mvi r1,4
800c138: 44 41 00 04 be r2,r1,800c148 <IMFS_evaluate_sym_link+0x38> <== ALWAYS TAKEN
rtems_fatal_error_occurred (0xABCD0000);
800c13c: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED
800c140: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED
800c144: e0 00 00 05 bi 800c158 <IMFS_evaluate_sym_link+0x48> <== NOT EXECUTED
if ( !jnode->Parent )
800c148: 29 81 00 08 lw r1,(r12+8)
800c14c: 5c 20 00 04 bne r1,r0,800c15c <IMFS_evaluate_sym_link+0x4c><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xBAD00000 );
800c150: 78 01 ba d0 mvhi r1,0xbad0 <== NOT EXECUTED
800c154: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED
800c158: fb ff e1 a8 calli 80047f8 <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;
800c15c: 59 61 00 00 sw (r11+0),r1
rtems_filesystem_get_sym_start_loc(
800c160: 29 81 00 50 lw r1,(r12+80)
800c164: 40 25 00 00 lbu r5,(r1+0)
800c168: 64 a4 00 5c cmpei r4,r5,92
800c16c: 64 a1 00 2f cmpei r1,r5,47
800c170: b8 81 20 00 or r4,r4,r1
800c174: 5c 80 00 03 bne r4,r0,800c180 <IMFS_evaluate_sym_link+0x70>
800c178: b8 80 08 00 mv r1,r4
800c17c: 5c a4 00 09 bne r5,r4,800c1a0 <IMFS_evaluate_sym_link+0x90><== ALWAYS TAKEN
800c180: 78 01 08 02 mvhi r1,0x802
800c184: 38 21 50 f8 ori r1,r1,0x50f8
800c188: 28 22 00 00 lw r2,(r1+0)
800c18c: 34 03 00 14 mvi r3,20
800c190: b9 60 08 00 mv r1,r11
800c194: 34 42 00 18 addi r2,r2,24
800c198: f8 00 1d 56 calli 80136f0 <memcpy>
800c19c: 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] ),
800c1a0: 29 8c 00 50 lw r12,(r12+80)
800c1a4: b5 81 60 00 add r12,r12,r1
800c1a8: b9 80 08 00 mv r1,r12
800c1ac: f8 00 1f 5c calli 8013f1c <strlen>
800c1b0: b8 20 10 00 mv r2,r1
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
800c1b4: b9 a0 18 00 mv r3,r13
800c1b8: b9 80 08 00 mv r1,r12
800c1bc: b9 60 20 00 mv r4,r11
800c1c0: f8 00 00 13 calli 800c20c <IMFS_eval_path>
800c1c4: b8 20 60 00 mv r12,r1
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
800c1c8: b9 60 08 00 mv r1,r11
800c1cc: fb ff ff 6c calli 800bf7c <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
800c1d0: b9 60 08 00 mv r1,r11
800c1d4: b9 a0 10 00 mv r2,r13
800c1d8: fb ff ff 92 calli 800c020 <IMFS_evaluate_permission>
800c1dc: 5c 20 00 05 bne r1,r0,800c1f0 <IMFS_evaluate_sym_link+0xe0><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EACCES );
800c1e0: f8 00 1a 9e calli 8012c58 <__errno> <== NOT EXECUTED
800c1e4: 34 02 00 0d mvi r2,13 <== NOT EXECUTED
800c1e8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800c1ec: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
return result;
}
800c1f0: b9 80 08 00 mv r1,r12
800c1f4: 2b 9d 00 04 lw ra,(sp+4)
800c1f8: 2b 8b 00 10 lw r11,(sp+16)
800c1fc: 2b 8c 00 0c lw r12,(sp+12)
800c200: 2b 8d 00 08 lw r13,(sp+8)
800c204: 37 9c 00 10 addi sp,sp,16
800c208: c3 a0 00 00 ret
080119b4 <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
80119b4: 37 9c ff e8 addi sp,sp,-24
80119b8: 5b 8b 00 10 sw (sp+16),r11
80119bc: 5b 8c 00 0c sw (sp+12),r12
80119c0: 5b 8d 00 08 sw (sp+8),r13
80119c4: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
80119c8: 28 2b 00 00 lw r11,(r1+0)
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
80119cc: b8 40 68 00 mv r13,r2
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
80119d0: fb ff ed f0 calli 800d190 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
80119d4: 2d 62 00 3c lhu r2,(r11+60)
80119d8: 7c 2c 00 00 cmpnei r12,r1,0
80119dc: fc 41 08 00 cmpne r1,r2,r1
80119e0: a1 81 60 00 and r12,r12,r1
80119e4: 45 80 00 06 be r12,r0,80119fc <IMFS_fchmod+0x48> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
80119e8: f8 00 04 9c calli 8012c58 <__errno> <== NOT EXECUTED
80119ec: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
80119f0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80119f4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
80119f8: e0 00 00 0d bi 8011a2c <IMFS_fchmod+0x78> <== NOT EXECUTED
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
80119fc: 29 63 00 30 lw r3,(r11+48)
8011a00: 34 01 f0 00 mvi r1,-4096
8011a04: 21 a2 0f ff andi r2,r13,0xfff
8011a08: a0 61 08 00 and r1,r3,r1
8011a0c: b8 41 10 00 or r2,r2,r1
8011a10: 59 62 00 30 sw (r11+48),r2
IMFS_update_ctime( jnode );
8011a14: 37 81 00 14 addi r1,sp,20
8011a18: b9 80 10 00 mv r2,r12
8011a1c: fb ff c4 2b calli 8002ac8 <gettimeofday>
8011a20: 2b 81 00 14 lw r1,(sp+20)
8011a24: 59 61 00 48 sw (r11+72),r1
8011a28: b9 80 08 00 mv r1,r12
return 0;
}
8011a2c: 2b 9d 00 04 lw ra,(sp+4)
8011a30: 2b 8b 00 10 lw r11,(sp+16)
8011a34: 2b 8c 00 0c lw r12,(sp+12)
8011a38: 2b 8d 00 08 lw r13,(sp+8)
8011a3c: 37 9c 00 18 addi sp,sp,24
8011a40: c3 a0 00 00 ret
0800ca1c <IMFS_fifo_close>:
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
800ca1c: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED
800ca20: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED
800ca24: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED
800ca28: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED
800ca2c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
800ca30: 28 2d 00 3c lw r13,(r1+60) <== NOT EXECUTED
int err = pipe_release(&JNODE2PIPE(jnode), iop);
800ca34: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
800ca38: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
800ca3c: 35 a1 00 50 addi r1,r13,80 <== NOT EXECUTED
800ca40: fb ff fb 66 calli 800b7d8 <pipe_release> <== NOT EXECUTED
800ca44: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if (! err) {
800ca48: 5c 20 00 0d bne r1,r0,800ca7c <IMFS_fifo_close+0x60> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_OPEN;
800ca4c: 29 83 00 18 lw r3,(r12+24) <== NOT EXECUTED
800ca50: 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)
800ca54: 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;
800ca58: a0 62 10 00 and r2,r3,r2 <== NOT EXECUTED
800ca5c: 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)
800ca60: f8 00 01 f1 calli 800d224 <rtems_libio_is_file_open> <== NOT EXECUTED
800ca64: 5c 2b 00 0b bne r1,r11,800ca90 <IMFS_fifo_close+0x74> <== NOT EXECUTED
800ca68: 2d a1 00 34 lhu r1,(r13+52) <== NOT EXECUTED
800ca6c: 5c 20 00 09 bne r1,r0,800ca90 <IMFS_fifo_close+0x74> <== NOT EXECUTED
free(jnode);
800ca70: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
800ca74: fb ff d7 e7 calli 8002a10 <free> <== NOT EXECUTED
800ca78: e0 00 00 06 bi 800ca90 <IMFS_fifo_close+0x74> <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
800ca7c: 4c 20 00 05 bge r1,r0,800ca90 <IMFS_fifo_close+0x74> <== NOT EXECUTED
800ca80: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED
800ca84: f8 00 18 75 calli 8012c58 <__errno> <== NOT EXECUTED
800ca88: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
800ca8c: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
}
800ca90: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800ca94: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800ca98: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
800ca9c: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
800caa0: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
800caa4: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
800caa8: c3 a0 00 00 ret <== NOT EXECUTED
0800c8b8 <IMFS_fifo_ioctl>:
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
800c8b8: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
800c8bc: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
800c8c0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
int err;
if (command == FIONBIO) {
800c8c4: 78 04 80 04 mvhi r4,0x8004 <== NOT EXECUTED
800c8c8: 38 84 66 7e ori r4,r4,0x667e <== NOT EXECUTED
800c8cc: 5c 44 00 0e bne r2,r4,800c904 <IMFS_fifo_ioctl+0x4c> <== NOT EXECUTED
if (buffer == NULL)
800c8d0: 34 0b ff f2 mvi r11,-14 <== NOT EXECUTED
800c8d4: 44 60 00 12 be r3,r0,800c91c <IMFS_fifo_ioctl+0x64> <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
800c8d8: 28 6b 00 00 lw r11,(r3+0) <== NOT EXECUTED
800c8dc: 28 22 00 18 lw r2,(r1+24) <== NOT EXECUTED
800c8e0: 45 60 00 05 be r11,r0,800c8f4 <IMFS_fifo_ioctl+0x3c> <== NOT EXECUTED
iop->flags |= LIBIO_FLAGS_NO_DELAY;
800c8e4: 38 42 00 01 ori r2,r2,0x1 <== NOT EXECUTED
800c8e8: 58 22 00 18 sw (r1+24),r2 <== NOT EXECUTED
800c8ec: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED
800c8f0: e0 00 00 0f bi 800c92c <IMFS_fifo_ioctl+0x74> <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
800c8f4: 34 03 ff fe mvi r3,-2 <== NOT EXECUTED
800c8f8: a0 43 10 00 and r2,r2,r3 <== NOT EXECUTED
800c8fc: 58 22 00 18 sw (r1+24),r2 <== NOT EXECUTED
800c900: e0 00 00 0b bi 800c92c <IMFS_fifo_ioctl+0x74> <== NOT EXECUTED
return 0;
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
800c904: 28 25 00 3c lw r5,(r1+60) <== NOT EXECUTED
800c908: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
800c90c: 28 a1 00 50 lw r1,(r5+80) <== NOT EXECUTED
800c910: fb ff fa 9d calli 800b384 <pipe_ioctl> <== NOT EXECUTED
800c914: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
800c918: 4c 20 00 05 bge r1,r0,800c92c <IMFS_fifo_ioctl+0x74> <== NOT EXECUTED
800c91c: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED
800c920: f8 00 18 ce calli 8012c58 <__errno> <== NOT EXECUTED
800c924: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
800c928: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
}
800c92c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800c930: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800c934: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
800c938: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
800c93c: c3 a0 00 00 ret <== NOT EXECUTED
0800c84c <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
800c84c: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
800c850: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
800c854: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
800c858: b8 20 28 00 mv r5,r1 <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
800c85c: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED
800c860: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
800c864: b8 80 18 00 mv r3,r4 <== NOT EXECUTED
800c868: 28 21 00 50 lw r1,(r1+80) <== NOT EXECUTED
800c86c: b8 a0 20 00 mv r4,r5 <== NOT EXECUTED
800c870: fb ff fa a8 calli 800b310 <pipe_lseek> <== NOT EXECUTED
800c874: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
800c878: 4c 20 00 07 bge r1,r0,800c894 <IMFS_fifo_lseek+0x48> <== NOT EXECUTED
800c87c: f8 00 18 f7 calli 8012c58 <__errno> <== NOT EXECUTED
800c880: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED
800c884: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED
800c888: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
800c88c: b8 60 58 00 mv r11,r3 <== NOT EXECUTED
800c890: e0 00 00 04 bi 800c8a0 <IMFS_fifo_lseek+0x54> <== NOT EXECUTED
800c894: 34 02 00 1f mvi r2,31 <== NOT EXECUTED
800c898: fb ff d1 1d calli 8000d0c <__ashrsi3> <== NOT EXECUTED
800c89c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
}
800c8a0: b8 60 08 00 mv r1,r3 <== NOT EXECUTED
800c8a4: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
800c8a8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800c8ac: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
800c8b0: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
800c8b4: c3 a0 00 00 ret <== NOT EXECUTED
0800caac <IMFS_fifo_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
800caac: 37 9c ff f8 addi sp,sp,-8
800cab0: 5b 8b 00 08 sw (sp+8),r11
800cab4: 5b 9d 00 04 sw (sp+4),ra
800cab8: b8 20 10 00 mv r2,r1
IMFS_jnode_t *jnode = iop->file_info;
int err = fifo_open(&JNODE2PIPE(jnode), iop);
800cabc: 28 21 00 3c lw r1,(r1+60)
800cac0: 34 21 00 50 addi r1,r1,80
800cac4: fb ff fb 8d calli 800b8f8 <fifo_open>
800cac8: b8 20 58 00 mv r11,r1
IMFS_FIFO_RETURN(err);
800cacc: 4c 20 00 05 bge r1,r0,800cae0 <IMFS_fifo_open+0x34> <== NEVER TAKEN
800cad0: c8 0b 58 00 sub r11,r0,r11
800cad4: f8 00 18 61 calli 8012c58 <__errno>
800cad8: 58 2b 00 00 sw (r1+0),r11
800cadc: 34 0b ff ff mvi r11,-1
}
800cae0: b9 60 08 00 mv r1,r11
800cae4: 2b 9d 00 04 lw ra,(sp+4)
800cae8: 2b 8b 00 08 lw r11,(sp+8)
800caec: 37 9c 00 08 addi sp,sp,8
800caf0: c3 a0 00 00 ret
0800c9b0 <IMFS_fifo_read>:
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
800c9b0: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED
800c9b4: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED
800c9b8: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED
800c9bc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
800c9c0: 28 2c 00 3c lw r12,(r1+60) <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
800c9c4: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
800c9c8: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED
800c9cc: fb ff fa 8e calli 800b404 <pipe_read> <== NOT EXECUTED
800c9d0: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if (err > 0)
800c9d4: 4c 01 00 07 bge r0,r1,800c9f0 <IMFS_fifo_read+0x40> <== NOT EXECUTED
IMFS_update_atime(jnode);
800c9d8: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED
800c9dc: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800c9e0: fb ff d8 3a calli 8002ac8 <gettimeofday> <== NOT EXECUTED
800c9e4: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED
800c9e8: 59 81 00 40 sw (r12+64),r1 <== NOT EXECUTED
800c9ec: e0 00 00 06 bi 800ca04 <IMFS_fifo_read+0x54> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
800c9f0: 44 20 00 05 be r1,r0,800ca04 <IMFS_fifo_read+0x54> <== NOT EXECUTED
800c9f4: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED
800c9f8: f8 00 18 98 calli 8012c58 <__errno> <== NOT EXECUTED
800c9fc: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
800ca00: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
}
800ca04: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800ca08: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800ca0c: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
800ca10: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
800ca14: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
800ca18: c3 a0 00 00 ret <== NOT EXECUTED
0800c940 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
800c940: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED
800c944: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED
800c948: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED
800c94c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
800c950: 28 2c 00 3c lw r12,(r1+60) <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
800c954: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
800c958: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED
800c95c: fb ff fb 13 calli 800b5a8 <pipe_write> <== NOT EXECUTED
800c960: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if (err > 0) {
800c964: 4c 01 00 08 bge r0,r1,800c984 <IMFS_fifo_write+0x44> <== NOT EXECUTED
IMFS_mtime_ctime_update(jnode);
800c968: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED
800c96c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800c970: fb ff d8 56 calli 8002ac8 <gettimeofday> <== NOT EXECUTED
800c974: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED
800c978: 59 81 00 48 sw (r12+72),r1 <== NOT EXECUTED
800c97c: 59 81 00 44 sw (r12+68),r1 <== NOT EXECUTED
800c980: e0 00 00 06 bi 800c998 <IMFS_fifo_write+0x58> <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
800c984: 44 20 00 05 be r1,r0,800c998 <IMFS_fifo_write+0x58> <== NOT EXECUTED
800c988: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED
800c98c: f8 00 18 b3 calli 8012c58 <__errno> <== NOT EXECUTED
800c990: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
800c994: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
}
800c998: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800c99c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800c9a0: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
800c9a4: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
800c9a8: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
800c9ac: c3 a0 00 00 ret <== NOT EXECUTED
0800cbc0 <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
800cbc0: 37 9c ff f0 addi sp,sp,-16
800cbc4: 5b 8b 00 10 sw (sp+16),r11
800cbc8: 5b 8c 00 0c sw (sp+12),r12
800cbcc: 5b 8d 00 08 sw (sp+8),r13
800cbd0: 5b 9d 00 04 sw (sp+4),ra
800cbd4: b8 20 58 00 mv r11,r1
800cbd8: b8 40 60 00 mv r12,r2
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
800cbdc: 5c 20 00 09 bne r1,r0,800cc00 <IMFS_find_match_in_dir+0x40><== ALWAYS TAKEN
800cbe0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800cbe4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
800cbe8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
800cbec: 38 21 30 90 ori r1,r1,0x3090 <== NOT EXECUTED
800cbf0: 38 63 30 f0 ori r3,r3,0x30f0 <== NOT EXECUTED
800cbf4: 38 84 30 dc ori r4,r4,0x30dc <== NOT EXECUTED
800cbf8: 34 02 00 2a mvi r2,42 <== NOT EXECUTED
800cbfc: f8 00 00 cd calli 800cf30 <__assert_func> <== NOT EXECUTED
if ( !name )
800cc00: 44 40 00 16 be r2,r0,800cc58 <IMFS_find_match_in_dir+0x98> <== NEVER TAKEN
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
800cc04: 78 02 08 02 mvhi r2,0x802
800cc08: 38 42 30 e8 ori r2,r2,0x30e8
800cc0c: b9 80 08 00 mv r1,r12
800cc10: f8 00 1c 50 calli 8013d50 <strcmp>
800cc14: 44 20 00 12 be r1,r0,800cc5c <IMFS_find_match_in_dir+0x9c> <== NEVER TAKEN
return directory;
if ( !strcmp( name, dotdotname ) )
800cc18: 78 02 08 02 mvhi r2,0x802
800cc1c: 38 42 30 ec ori r2,r2,0x30ec
800cc20: b9 80 08 00 mv r1,r12
800cc24: f8 00 1c 4b calli 8013d50 <strcmp>
800cc28: 5c 20 00 03 bne r1,r0,800cc34 <IMFS_find_match_in_dir+0x74><== ALWAYS TAKEN
return directory->Parent;
800cc2c: 29 6b 00 08 lw r11,(r11+8) <== NOT EXECUTED
800cc30: e0 00 00 0b bi 800cc5c <IMFS_find_match_in_dir+0x9c> <== NOT EXECUTED
800cc34: 35 6d 00 54 addi r13,r11,84
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
800cc38: 29 6b 00 50 lw r11,(r11+80)
800cc3c: e0 00 00 06 bi 800cc54 <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 ) )
800cc40: b9 80 08 00 mv r1,r12
800cc44: 35 62 00 0c addi r2,r11,12
800cc48: f8 00 1c 42 calli 8013d50 <strcmp>
800cc4c: 44 20 00 04 be r1,r0,800cc5c <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 ) {
800cc50: 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;
800cc54: 5d 6d ff fb bne r11,r13,800cc40 <IMFS_find_match_in_dir+0x80>
800cc58: 34 0b 00 00 mvi r11,0
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
800cc5c: b9 60 08 00 mv r1,r11
800cc60: 2b 9d 00 04 lw ra,(sp+4)
800cc64: 2b 8b 00 10 lw r11,(sp+16)
800cc68: 2b 8c 00 0c lw r12,(sp+12)
800cc6c: 2b 8d 00 08 lw r13,(sp+8)
800cc70: 37 9c 00 10 addi sp,sp,16
800cc74: c3 a0 00 00 ret
0800cafc <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
)
{
800cafc: 37 9c ff d8 addi sp,sp,-40
800cb00: 5b 8b 00 14 sw (sp+20),r11
800cb04: 5b 8c 00 10 sw (sp+16),r12
800cb08: 5b 8d 00 0c sw (sp+12),r13
800cb0c: 5b 8e 00 08 sw (sp+8),r14
800cb10: 5b 9d 00 04 sw (sp+4),ra
800cb14: 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;
800cb18: 37 8c 00 18 addi r12,sp,24
800cb1c: 35 a2 00 1c addi r2,r13,28
800cb20: b9 80 08 00 mv r1,r12
800cb24: 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;
800cb28: 29 ab 00 1c lw r11,(r13+28)
loc = temp_mt_entry->mt_fs_root;
800cb2c: f8 00 1a f1 calli 80136f0 <memcpy>
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
800cb30: 34 01 00 00 mvi r1,0
800cb34: 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 ) {
800cb38: 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 );
800cb3c: 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;
800cb40: 5b 8b 00 18 sw (sp+24),r11
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
800cb44: 29 6e 00 08 lw r14,(r11+8)
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
800cb48: fb ff fd 0d calli 800bf7c <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
800cb4c: 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;
800cb50: 35 61 00 54 addi r1,r11,84
800cb54: 5c 4d 00 03 bne r2,r13,800cb60 <IMFS_fsunmount+0x64>
800cb58: 29 62 00 50 lw r2,(r11+80)
800cb5c: 5c 41 00 06 bne r2,r1,800cb74 <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 );
800cb60: 34 01 00 00 mvi r1,0
800cb64: b9 80 10 00 mv r2,r12
800cb68: fb ff d5 f5 calli 800233c <IMFS_unlink>
if (result != 0)
800cb6c: 5c 20 00 0b bne r1,r0,800cb98 <IMFS_fsunmount+0x9c> <== NEVER TAKEN
800cb70: b9 c0 58 00 mv r11,r14
return -1;
jnode = next;
}
if ( jnode != NULL ) {
800cb74: 45 60 00 0b be r11,r0,800cba0 <IMFS_fsunmount+0xa4>
if ( jnode->type == IMFS_DIRECTORY ) {
800cb78: 29 61 00 4c lw r1,(r11+76)
800cb7c: 5c 2d ff f0 bne r1,r13,800cb3c <IMFS_fsunmount+0x40> <== NEVER TAKEN
800cb80: 29 61 00 50 lw r1,(r11+80)
800cb84: 35 62 00 54 addi r2,r11,84
800cb88: 44 22 ff ed be r1,r2,800cb3c <IMFS_fsunmount+0x40>
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
800cb8c: b8 20 58 00 mv r11,r1
}
}
} while (jnode != NULL);
800cb90: 5c 20 ff eb bne r1,r0,800cb3c <IMFS_fsunmount+0x40> <== ALWAYS TAKEN
800cb94: e0 00 00 03 bi 800cba0 <IMFS_fsunmount+0xa4> <== NOT EXECUTED
800cb98: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
800cb9c: e0 00 00 02 bi 800cba4 <IMFS_fsunmount+0xa8> <== NOT EXECUTED
800cba0: 34 01 00 00 mvi r1,0
return 0;
}
800cba4: 2b 9d 00 04 lw ra,(sp+4)
800cba8: 2b 8b 00 14 lw r11,(sp+20)
800cbac: 2b 8c 00 10 lw r12,(sp+16)
800cbb0: 2b 8d 00 0c lw r13,(sp+12)
800cbb4: 2b 8e 00 08 lw r14,(sp+8)
800cbb8: 37 9c 00 28 addi sp,sp,40
800cbbc: c3 a0 00 00 ret
0800cc78 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
800cc78: 37 9c ff f4 addi sp,sp,-12
800cc7c: 5b 8b 00 0c sw (sp+12),r11
800cc80: 5b 8c 00 08 sw (sp+8),r12
800cc84: 5b 9d 00 04 sw (sp+4),ra
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
800cc88: 34 05 00 00 mvi r5,0
const char *path,
int pathlen,
char *token,
int *token_len
)
{
800cc8c: b8 60 60 00 mv r12,r3
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
800cc90: 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 )
800cc94: 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) ) {
800cc98: e0 00 00 08 bi 800ccb8 <IMFS_get_token+0x40>
token[i] = c;
800cc9c: 31 06 00 00 sb (r8+0),r6
if ( i == IMFS_NAME_MAX )
800cca0: 5c a3 00 03 bne r5,r3,800ccac <IMFS_get_token+0x34>
800cca4: 34 0b 00 04 mvi r11,4
800cca8: e0 00 00 2d bi 800cd5c <IMFS_get_token+0xe4>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
800ccac: 34 a5 00 01 addi r5,r5,1
800ccb0: b4 25 30 00 add r6,r1,r5
800ccb4: 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) ) {
800ccb8: 7c cb 00 5c cmpnei r11,r6,92
800ccbc: 7c c9 00 2f cmpnei r9,r6,47
800ccc0: e8 45 50 00 cmpg r10,r2,r5
800ccc4: 7c c7 00 00 cmpnei r7,r6,0
800ccc8: a1 69 48 00 and r9,r11,r9
token[i] = c;
800cccc: 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) ) {
800ccd0: a1 47 38 00 and r7,r10,r7
800ccd4: 45 20 00 02 be r9,r0,800ccdc <IMFS_get_token+0x64>
800ccd8: 5c e0 ff f1 bne r7,r0,800cc9c <IMFS_get_token+0x24>
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
800ccdc: 5c a0 00 0a bne r5,r0,800cd04 <IMFS_get_token+0x8c>
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
800cce0: 7c c1 00 00 cmpnei r1,r6,0
800cce4: 7c 42 00 00 cmpnei r2,r2,0
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
token[i] = c;
800cce8: 31 86 00 00 sb (r12+0),r6
if ( (token[i] != '\0') && pathlen ) {
800ccec: a0 22 10 00 and r2,r1,r2
800ccf0: b8 a0 58 00 mv r11,r5
800ccf4: 44 45 00 0a be r2,r5,800cd1c <IMFS_get_token+0xa4>
800ccf8: 34 05 00 01 mvi r5,1
800ccfc: b8 a0 58 00 mv r11,r5
800cd00: e0 00 00 07 bi 800cd1c <IMFS_get_token+0xa4>
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
800cd04: b5 85 08 00 add r1,r12,r5
800cd08: 40 22 ff ff lbu r2,(r1+-1)
800cd0c: 34 0b 00 03 mvi r11,3
800cd10: 44 40 00 03 be r2,r0,800cd1c <IMFS_get_token+0xa4> <== NEVER TAKEN
token[i] = '\0';
800cd14: 34 02 00 00 mvi r2,0
800cd18: 30 22 00 00 sb (r1+0),r2
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
800cd1c: 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 ) {
800cd20: 34 01 00 03 mvi r1,3
800cd24: 5d 61 00 0e bne r11,r1,800cd5c <IMFS_get_token+0xe4>
if ( strcmp( token, "..") == 0 )
800cd28: 78 02 08 02 mvhi r2,0x802
800cd2c: 38 42 31 08 ori r2,r2,0x3108
800cd30: b9 80 08 00 mv r1,r12
800cd34: f8 00 1c 07 calli 8013d50 <strcmp>
800cd38: 5c 20 00 03 bne r1,r0,800cd44 <IMFS_get_token+0xcc>
800cd3c: 34 0b 00 02 mvi r11,2
800cd40: e0 00 00 07 bi 800cd5c <IMFS_get_token+0xe4>
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
800cd44: 78 02 08 02 mvhi r2,0x802
800cd48: b9 80 08 00 mv r1,r12
800cd4c: 38 42 31 0c ori r2,r2,0x310c
800cd50: f8 00 1c 00 calli 8013d50 <strcmp>
800cd54: 5c 20 00 02 bne r1,r0,800cd5c <IMFS_get_token+0xe4>
800cd58: 34 0b 00 01 mvi r11,1
type = IMFS_CURRENT_DIR;
}
return type;
}
800cd5c: b9 60 08 00 mv r1,r11
800cd60: 2b 9d 00 04 lw ra,(sp+4)
800cd64: 2b 8b 00 0c lw r11,(sp+12)
800cd68: 2b 8c 00 08 lw r12,(sp+8)
800cd6c: 37 9c 00 0c addi sp,sp,12
800cd70: c3 a0 00 00 ret
08001eac <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
)
{
8001eac: 37 9c ff ec addi sp,sp,-20
8001eb0: 5b 8b 00 14 sw (sp+20),r11
8001eb4: 5b 8c 00 10 sw (sp+16),r12
8001eb8: 5b 8d 00 0c sw (sp+12),r13
8001ebc: 5b 8e 00 08 sw (sp+8),r14
8001ec0: 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,
8001ec4: 78 05 08 02 mvhi r5,0x802
8001ec8: 38 a5 50 14 ori r5,r5,0x5014
8001ecc: 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
)
{
8001ed0: b8 20 58 00 mv r11,r1
8001ed4: b8 40 70 00 mv r14,r2
8001ed8: b8 60 68 00 mv r13,r3
8001edc: 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,
8001ee0: 34 05 00 00 mvi r5,0
8001ee4: 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) {
8001ee8: 34 02 00 06 mvi r2,6
8001eec: 34 a5 00 01 addi r5,r5,1
8001ef0: 44 26 00 04 be r1,r6,8001f00 <IMFS_initialize_support+0x54>
8001ef4: b4 21 08 00 add r1,r1,r1
8001ef8: 5c a2 ff fd bne r5,r2,8001eec <IMFS_initialize_support+0x40><== ALWAYS TAKEN
8001efc: 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)
8001f00: 78 05 08 02 mvhi r5,0x802
8001f04: 38 a5 56 d8 ori r5,r5,0x56d8
8001f08: 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();
8001f0c: f8 00 27 b6 calli 800bde4 <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;
8001f10: 78 02 08 02 mvhi r2,0x802
/*
* 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();
8001f14: 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;
8001f18: 38 42 2f 8c ori r2,r2,0x2f8c
8001f1c: 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;
8001f20: 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;
8001f24: 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;
8001f28: 35 61 00 38 addi r1,r11,56
8001f2c: f8 00 45 f1 calli 80136f0 <memcpy>
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
8001f30: 34 02 00 10 mvi r2,16
8001f34: 34 01 00 01 mvi r1,1
8001f38: f8 00 01 fd calli 800272c <calloc>
8001f3c: b8 20 10 00 mv r2,r1
8001f40: 29 61 00 1c lw r1,(r11+28)
if ( !fs_info ) {
8001f44: 5c 40 00 07 bne r2,r0,8001f60 <IMFS_initialize_support+0xb4><== ALWAYS TAKEN
free(temp_mt_entry->mt_fs_root.node_access);
8001f48: f8 00 02 b2 calli 8002a10 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
8001f4c: f8 00 43 43 calli 8012c58 <__errno> <== NOT EXECUTED
8001f50: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
8001f54: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8001f58: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8001f5c: e0 00 00 0f bi 8001f98 <IMFS_initialize_support+0xec> <== NOT EXECUTED
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
8001f60: 78 05 08 02 mvhi r5,0x802
8001f64: 38 a5 56 dc ori r5,r5,0x56dc
8001f68: 28 a6 00 00 lw r6,(r5+0)
fs_info->ino_count = 1;
8001f6c: 34 04 00 01 mvi r4,1
8001f70: 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;
8001f74: 58 24 00 38 sw (r1+56),r4
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
8001f78: b4 c4 08 00 add r1,r6,r4
8001f7c: 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;
8001f80: 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;
8001f84: 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;
8001f88: 58 4d 00 08 sw (r2+8),r13
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
8001f8c: 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();
8001f90: f8 00 24 e2 calli 800b318 <rtems_pipe_initialize>
8001f94: 34 01 00 00 mvi r1,0
return 0;
}
8001f98: 2b 9d 00 04 lw ra,(sp+4)
8001f9c: 2b 8b 00 14 lw r11,(sp+20)
8001fa0: 2b 8c 00 10 lw r12,(sp+16)
8001fa4: 2b 8d 00 0c lw r13,(sp+12)
8001fa8: 2b 8e 00 08 lw r14,(sp+8)
8001fac: 37 9c 00 14 addi sp,sp,20
8001fb0: 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 43 1d calli 8012c58 <__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 47 ca calli 8013f1c <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 2b 1b calli 800cc78 <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 81 calli 800be28 <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 43 0b calli 8012c58 <__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
080108b4 <IMFS_memfile_addblock>:
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
80108b4: 37 9c ff f4 addi sp,sp,-12
80108b8: 5b 8b 00 0c sw (sp+12),r11
80108bc: 5b 8c 00 08 sw (sp+8),r12
80108c0: 5b 9d 00 04 sw (sp+4),ra
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
80108c4: 5c 20 00 09 bne r1,r0,80108e8 <IMFS_memfile_addblock+0x34> <== ALWAYS TAKEN
80108c8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80108cc: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80108d0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
80108d4: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
80108d8: 38 63 36 4c ori r3,r3,0x364c <== NOT EXECUTED
80108dc: 38 84 34 e4 ori r4,r4,0x34e4 <== NOT EXECUTED
80108e0: 34 02 01 69 mvi r2,361 <== NOT EXECUTED
80108e4: e0 00 00 0b bi 8010910 <IMFS_memfile_addblock+0x5c> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
80108e8: 28 24 00 4c lw r4,(r1+76)
80108ec: 34 03 00 05 mvi r3,5
80108f0: 44 83 00 09 be r4,r3,8010914 <IMFS_memfile_addblock+0x60> <== ALWAYS TAKEN
80108f4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80108f8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80108fc: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010900: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
8010904: 38 63 36 4c ori r3,r3,0x364c <== NOT EXECUTED
8010908: 38 84 34 f0 ori r4,r4,0x34f0 <== NOT EXECUTED
801090c: 34 02 01 6d mvi r2,365 <== NOT EXECUTED
8010910: fb ff f1 88 calli 800cf30 <__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 );
8010914: 34 03 00 01 mvi r3,1
8010918: fb ff fe 45 calli 801022c <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
801091c: 28 2b 00 00 lw r11,(r1+0)
8010920: 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 );
8010924: b8 20 60 00 mv r12,r1
if ( *block_entry_ptr )
8010928: 5d 62 00 06 bne r11,r2,8010940 <IMFS_memfile_addblock+0x8c>
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
801092c: fb ff fe 30 calli 80101ec <memfile_alloc_block>
if ( !memory )
8010930: 34 02 00 01 mvi r2,1
8010934: 44 2b 00 03 be r1,r11,8010940 <IMFS_memfile_addblock+0x8c> <== NEVER TAKEN
return 1;
*block_entry_ptr = memory;
8010938: 59 81 00 00 sw (r12+0),r1
801093c: b9 60 10 00 mv r2,r11
return 0;
}
8010940: b8 40 08 00 mv r1,r2
8010944: 2b 9d 00 04 lw ra,(sp+4)
8010948: 2b 8b 00 0c lw r11,(sp+12)
801094c: 2b 8c 00 08 lw r12,(sp+8)
8010950: 37 9c 00 0c addi sp,sp,12
8010954: c3 a0 00 00 ret
08010958 <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
8010958: 37 9c ff e0 addi sp,sp,-32
801095c: 5b 8b 00 20 sw (sp+32),r11
8010960: 5b 8c 00 1c sw (sp+28),r12
8010964: 5b 8d 00 18 sw (sp+24),r13
8010968: 5b 8e 00 14 sw (sp+20),r14
801096c: 5b 8f 00 10 sw (sp+16),r15
8010970: 5b 90 00 0c sw (sp+12),r16
8010974: 5b 91 00 08 sw (sp+8),r17
8010978: 5b 9d 00 04 sw (sp+4),ra
801097c: b8 20 58 00 mv r11,r1
8010980: b8 40 68 00 mv r13,r2
/*
* Perform internal consistency checks
*/
assert( the_jnode );
8010984: 5c 20 00 09 bne r1,r0,80109a8 <IMFS_memfile_extend+0x50> <== ALWAYS TAKEN
8010988: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
801098c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010990: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010994: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
8010998: 38 63 36 64 ori r3,r3,0x3664 <== NOT EXECUTED
801099c: 38 84 34 e4 ori r4,r4,0x34e4 <== NOT EXECUTED
80109a0: 34 02 01 31 mvi r2,305 <== NOT EXECUTED
80109a4: e0 00 00 0b bi 80109d0 <IMFS_memfile_extend+0x78> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
80109a8: 28 22 00 4c lw r2,(r1+76)
80109ac: 34 01 00 05 mvi r1,5
80109b0: 44 41 00 09 be r2,r1,80109d4 <IMFS_memfile_extend+0x7c> <== ALWAYS TAKEN
80109b4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80109b8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80109bc: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
80109c0: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
80109c4: 38 63 36 64 ori r3,r3,0x3664 <== NOT EXECUTED
80109c8: 38 84 34 f0 ori r4,r4,0x34f0 <== NOT EXECUTED
80109cc: 34 02 01 35 mvi r2,309 <== NOT EXECUTED
80109d0: fb ff f1 58 calli 800cf30 <__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 )
80109d4: 78 01 08 02 mvhi r1,0x802
80109d8: 38 21 56 d8 ori r1,r1,0x56d8
80109dc: 28 2c 00 00 lw r12,(r1+0)
80109e0: 34 02 00 02 mvi r2,2
80109e4: b9 80 08 00 mv r1,r12
80109e8: fb ff c0 a1 calli 8000c6c <__lshrsi3>
80109ec: b8 20 10 00 mv r2,r1
80109f0: b8 20 70 00 mv r14,r1
80109f4: 34 21 00 01 addi r1,r1,1
80109f8: f8 00 44 60 calli 8021b78 <__mulsi3>
80109fc: b9 c0 10 00 mv r2,r14
8010a00: 34 21 00 01 addi r1,r1,1
8010a04: f8 00 44 5d calli 8021b78 <__mulsi3>
8010a08: 34 21 ff ff addi r1,r1,-1
8010a0c: b9 80 10 00 mv r2,r12
8010a10: f8 00 44 5a calli 8021b78 <__mulsi3>
8010a14: 54 2d 00 04 bgu r1,r13,8010a24 <IMFS_memfile_extend+0xcc> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
8010a18: f8 00 08 90 calli 8012c58 <__errno> <== NOT EXECUTED
8010a1c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8010a20: e0 00 00 26 bi 8010ab8 <IMFS_memfile_extend+0x160> <== NOT EXECUTED
if ( new_length <= the_jnode->info.file.size )
8010a24: b9 a0 08 00 mv r1,r13
8010a28: 34 02 00 1f mvi r2,31
8010a2c: fb ff c0 b8 calli 8000d0c <__ashrsi3>
8010a30: 29 6f 00 50 lw r15,(r11+80)
8010a34: b8 20 70 00 mv r14,r1
8010a38: 29 70 00 54 lw r16,(r11+84)
8010a3c: 48 2f 00 04 bg r1,r15,8010a4c <IMFS_memfile_extend+0xf4> <== NEVER TAKEN
8010a40: 5c 2f 00 25 bne r1,r15,8010ad4 <IMFS_memfile_extend+0x17c> <== NEVER TAKEN
8010a44: 55 b0 00 02 bgu r13,r16,8010a4c <IMFS_memfile_extend+0xf4>
8010a48: e0 00 00 23 bi 8010ad4 <IMFS_memfile_extend+0x17c>
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
8010a4c: b9 80 10 00 mv r2,r12
8010a50: b9 a0 08 00 mv r1,r13
8010a54: f8 00 44 69 calli 8021bf8 <__divsi3>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
8010a58: 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;
8010a5c: b8 20 88 00 mv r17,r1
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
8010a60: b9 80 08 00 mv r1,r12
8010a64: fb ff c0 aa calli 8000d0c <__ashrsi3>
8010a68: b8 20 18 00 mv r3,r1
8010a6c: b9 80 20 00 mv r4,r12
8010a70: b9 e0 08 00 mv r1,r15
8010a74: ba 00 10 00 mv r2,r16
8010a78: f8 00 2f 02 calli 801c680 <__divdi3>
8010a7c: b8 40 78 00 mv r15,r2
8010a80: b8 40 60 00 mv r12,r2
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
8010a84: e0 00 00 11 bi 8010ac8 <IMFS_memfile_extend+0x170>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
8010a88: b9 60 08 00 mv r1,r11
8010a8c: b9 80 10 00 mv r2,r12
8010a90: fb ff ff 89 calli 80108b4 <IMFS_memfile_addblock>
8010a94: 44 20 00 0c be r1,r0,8010ac4 <IMFS_memfile_extend+0x16c> <== ALWAYS TAKEN
8010a98: e0 00 00 05 bi 8010aac <IMFS_memfile_extend+0x154> <== NOT EXECUTED
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
8010a9c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
8010aa0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8010aa4: fb ff fe bd calli 8010598 <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-- ) {
8010aa8: 35 8c ff ff addi r12,r12,-1 <== NOT EXECUTED
8010aac: 51 8f ff fc bgeu r12,r15,8010a9c <IMFS_memfile_extend+0x144><== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
8010ab0: f8 00 08 6a calli 8012c58 <__errno> <== NOT EXECUTED
8010ab4: 34 02 00 1c mvi r2,28 <== NOT EXECUTED
8010ab8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8010abc: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8010ac0: e0 00 00 06 bi 8010ad8 <IMFS_memfile_extend+0x180> <== NOT EXECUTED
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
8010ac4: 35 8c 00 01 addi r12,r12,1
8010ac8: 52 2c ff f0 bgeu r17,r12,8010a88 <IMFS_memfile_extend+0x130>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
8010acc: 59 6d 00 54 sw (r11+84),r13
8010ad0: 59 6e 00 50 sw (r11+80),r14
8010ad4: 34 01 00 00 mvi r1,0
return 0;
}
8010ad8: 2b 9d 00 04 lw ra,(sp+4)
8010adc: 2b 8b 00 20 lw r11,(sp+32)
8010ae0: 2b 8c 00 1c lw r12,(sp+28)
8010ae4: 2b 8d 00 18 lw r13,(sp+24)
8010ae8: 2b 8e 00 14 lw r14,(sp+20)
8010aec: 2b 8f 00 10 lw r15,(sp+16)
8010af0: 2b 90 00 0c lw r16,(sp+12)
8010af4: 2b 91 00 08 lw r17,(sp+8)
8010af8: 37 9c 00 20 addi sp,sp,32
8010afc: c3 a0 00 00 ret
0801022c <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
801022c: 37 9c ff e4 addi sp,sp,-28
8010230: 5b 8b 00 1c sw (sp+28),r11
8010234: 5b 8c 00 18 sw (sp+24),r12
8010238: 5b 8d 00 14 sw (sp+20),r13
801023c: 5b 8e 00 10 sw (sp+16),r14
8010240: 5b 8f 00 0c sw (sp+12),r15
8010244: 5b 90 00 08 sw (sp+8),r16
8010248: 5b 9d 00 04 sw (sp+4),ra
801024c: b8 20 60 00 mv r12,r1
8010250: b8 40 68 00 mv r13,r2
8010254: b8 60 70 00 mv r14,r3
/*
* Perform internal consistency checks
*/
assert( the_jnode );
8010258: 5c 20 00 09 bne r1,r0,801027c <IMFS_memfile_get_block_pointer+0x50><== ALWAYS TAKEN
801025c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8010260: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010264: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010268: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
801026c: 38 63 35 b4 ori r3,r3,0x35b4 <== NOT EXECUTED
8010270: 38 84 34 e4 ori r4,r4,0x34e4 <== NOT EXECUTED
8010274: 34 02 03 88 mvi r2,904 <== NOT EXECUTED
8010278: e0 00 00 0b bi 80102a4 <IMFS_memfile_get_block_pointer+0x78><== NOT EXECUTED
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
801027c: 28 22 00 4c lw r2,(r1+76)
8010280: 34 01 00 05 mvi r1,5
8010284: 44 41 00 09 be r2,r1,80102a8 <IMFS_memfile_get_block_pointer+0x7c><== ALWAYS TAKEN
8010288: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
801028c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010290: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010294: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
8010298: 38 63 35 b4 ori r3,r3,0x35b4 <== NOT EXECUTED
801029c: 38 84 34 f0 ori r4,r4,0x34f0 <== NOT EXECUTED
80102a0: 34 02 03 8c mvi r2,908 <== NOT EXECUTED
80102a4: fb ff f3 23 calli 800cf30 <__assert_func> <== NOT EXECUTED
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
80102a8: 78 01 08 02 mvhi r1,0x802
80102ac: 38 21 56 d8 ori r1,r1,0x56d8
80102b0: 28 21 00 00 lw r1,(r1+0)
80102b4: 34 02 00 02 mvi r2,2
80102b8: fb ff c2 6d calli 8000c6c <__lshrsi3>
80102bc: b8 20 58 00 mv r11,r1
80102c0: 34 21 ff ff addi r1,r1,-1
80102c4: 55 a1 00 0f bgu r13,r1,8010300 <IMFS_memfile_get_block_pointer+0xd4><== NEVER TAKEN
#if 0
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
80102c8: 29 8b 00 58 lw r11,(r12+88)
if ( malloc_it ) {
80102cc: 45 c0 00 0a be r14,r0,80102f4 <IMFS_memfile_get_block_pointer+0xc8>
if ( !p ) {
80102d0: 5d 60 00 04 bne r11,r0,80102e0 <IMFS_memfile_get_block_pointer+0xb4>
p = memfile_alloc_block();
80102d4: fb ff ff c6 calli 80101ec <memfile_alloc_block>
if ( !p )
80102d8: 44 2b 00 7d be r1,r11,80104cc <IMFS_memfile_get_block_pointer+0x2a0><== NEVER TAKEN
return 0;
info->indirect = p;
80102dc: 59 81 00 58 sw (r12+88),r1
}
return &info->indirect[ my_block ];
80102e0: 34 02 00 02 mvi r2,2
80102e4: b9 a0 08 00 mv r1,r13
80102e8: fb ff c2 39 calli 8000bcc <__ashlsi3>
80102ec: 29 82 00 58 lw r2,(r12+88)
80102f0: e0 00 00 75 bi 80104c4 <IMFS_memfile_get_block_pointer+0x298>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
80102f4: b9 a0 08 00 mv r1,r13
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
80102f8: 5d 6e 00 60 bne r11,r14,8010478 <IMFS_memfile_get_block_pointer+0x24c><== ALWAYS TAKEN
80102fc: e0 00 00 74 bi 80104cc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
8010300: 35 61 00 01 addi r1,r11,1 <== NOT EXECUTED
8010304: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8010308: f8 00 46 1c calli 8021b78 <__mulsi3> <== NOT EXECUTED
801030c: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
8010310: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
8010314: 55 a1 00 28 bgu r13,r1,80103b4 <IMFS_memfile_get_block_pointer+0x188><== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
8010318: c9 ab 68 00 sub r13,r13,r11 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
801031c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8010320: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8010324: f8 00 46 a4 calli 8021db4 <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
8010328: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
801032c: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
8010330: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8010334: f8 00 46 90 calli 8021d74 <__udivsi3> <== NOT EXECUTED
8010338: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
p = info->doubly_indirect;
801033c: 29 8b 00 5c lw r11,(r12+92) <== NOT EXECUTED
if ( malloc_it ) {
8010340: 45 c0 00 15 be r14,r0,8010394 <IMFS_memfile_get_block_pointer+0x168><== NOT EXECUTED
if ( !p ) {
8010344: 5d 60 00 05 bne r11,r0,8010358 <IMFS_memfile_get_block_pointer+0x12c><== NOT EXECUTED
p = memfile_alloc_block();
8010348: fb ff ff a9 calli 80101ec <memfile_alloc_block> <== NOT EXECUTED
801034c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if ( !p )
8010350: 44 20 00 5f be r1,r0,80104cc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
return 0;
info->doubly_indirect = p;
8010354: 59 81 00 5c sw (r12+92),r1 <== NOT EXECUTED
}
p1 = (block_p *)p[ doubly ];
8010358: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
801035c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8010360: fb ff c2 1b calli 8000bcc <__ashlsi3> <== NOT EXECUTED
8010364: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED
8010368: 29 6c 00 00 lw r12,(r11+0) <== NOT EXECUTED
if ( !p1 ) {
801036c: 5d 80 00 05 bne r12,r0,8010380 <IMFS_memfile_get_block_pointer+0x154><== NOT EXECUTED
p1 = memfile_alloc_block();
8010370: fb ff ff 9f calli 80101ec <memfile_alloc_block> <== NOT EXECUTED
8010374: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
if ( !p1 )
8010378: 44 20 00 55 be r1,r0,80104cc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
return 0;
p[ doubly ] = (block_p) p1;
801037c: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED
}
return (block_p *)&p1[ singly ];
8010380: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
8010384: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8010388: fb ff c2 11 calli 8000bcc <__ashlsi3> <== NOT EXECUTED
801038c: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED
8010390: e0 00 00 50 bi 80104d0 <IMFS_memfile_get_block_pointer+0x2a4><== NOT EXECUTED
}
if ( !p )
8010394: 45 6e 00 4e be r11,r14,80104cc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
return 0;
p = (block_p *)p[ doubly ];
8010398: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
801039c: fb ff c2 0c calli 8000bcc <__ashlsi3> <== NOT EXECUTED
80103a0: b5 61 08 00 add r1,r11,r1 <== NOT EXECUTED
80103a4: 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 ];
80103a8: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
if ( !p )
return 0;
p = (block_p *)p[ doubly ];
if ( !p )
80103ac: 5d 60 00 33 bne r11,r0,8010478 <IMFS_memfile_get_block_pointer+0x24c><== NOT EXECUTED
80103b0: e0 00 00 47 bi 80104cc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
80103b4: 35 e1 00 01 addi r1,r15,1 <== NOT EXECUTED
80103b8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
80103bc: f8 00 45 ef calli 8021b78 <__mulsi3> <== NOT EXECUTED
80103c0: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
80103c4: 55 a1 00 42 bgu r13,r1,80104cc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
80103c8: c9 af 68 00 sub r13,r13,r15 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
80103cc: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
80103d0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
80103d4: f8 00 46 78 calli 8021db4 <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
80103d8: 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;
80103dc: b8 20 80 00 mv r16,r1 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
80103e0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
80103e4: f8 00 46 64 calli 8021d74 <__udivsi3> <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
80103e8: 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;
80103ec: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
80103f0: f8 00 46 61 calli 8021d74 <__udivsi3> <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
80103f4: 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;
80103f8: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
80103fc: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8010400: f8 00 46 6d calli 8021db4 <__umodsi3> <== NOT EXECUTED
8010404: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
p = info->triply_indirect;
8010408: 29 8b 00 60 lw r11,(r12+96) <== NOT EXECUTED
if ( malloc_it ) {
801040c: 45 c0 00 1f be r14,r0,8010488 <IMFS_memfile_get_block_pointer+0x25c><== NOT EXECUTED
if ( !p ) {
8010410: 5d 60 00 05 bne r11,r0,8010424 <IMFS_memfile_get_block_pointer+0x1f8><== NOT EXECUTED
p = memfile_alloc_block();
8010414: fb ff ff 76 calli 80101ec <memfile_alloc_block> <== NOT EXECUTED
8010418: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if ( !p )
801041c: 44 20 00 2c be r1,r0,80104cc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
return 0;
info->triply_indirect = p;
8010420: 59 81 00 60 sw (r12+96),r1 <== NOT EXECUTED
}
p1 = (block_p *) p[ triply ];
8010424: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
8010428: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
801042c: fb ff c1 e8 calli 8000bcc <__ashlsi3> <== NOT EXECUTED
8010430: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED
8010434: 29 6c 00 00 lw r12,(r11+0) <== NOT EXECUTED
if ( !p1 ) {
8010438: 5d 80 00 05 bne r12,r0,801044c <IMFS_memfile_get_block_pointer+0x220><== NOT EXECUTED
p1 = memfile_alloc_block();
801043c: fb ff ff 6c calli 80101ec <memfile_alloc_block> <== NOT EXECUTED
8010440: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
if ( !p1 )
8010444: 44 20 00 22 be r1,r0,80104cc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
return 0;
p[ triply ] = (block_p) p1;
8010448: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED
}
p2 = (block_p *)p1[ doubly ];
801044c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8010450: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8010454: fb ff c1 de calli 8000bcc <__ashlsi3> <== NOT EXECUTED
8010458: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED
801045c: 29 8b 00 00 lw r11,(r12+0) <== NOT EXECUTED
if ( !p2 ) {
8010460: 5d 60 00 05 bne r11,r0,8010474 <IMFS_memfile_get_block_pointer+0x248><== NOT EXECUTED
p2 = memfile_alloc_block();
8010464: fb ff ff 62 calli 80101ec <memfile_alloc_block> <== NOT EXECUTED
8010468: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if ( !p2 )
801046c: 44 20 00 18 be r1,r0,80104cc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
return 0;
p1[ doubly ] = (block_p) p2;
8010470: 59 81 00 00 sw (r12+0),r1 <== NOT EXECUTED
}
return (block_p *)&p2[ singly ];
8010474: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
8010478: 34 02 00 02 mvi r2,2
801047c: fb ff c1 d4 calli 8000bcc <__ashlsi3>
8010480: b5 61 08 00 add r1,r11,r1
8010484: e0 00 00 13 bi 80104d0 <IMFS_memfile_get_block_pointer+0x2a4>
}
if ( !p )
8010488: 45 6e 00 11 be r11,r14,80104cc <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 ];
801048c: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
8010490: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8010494: fb ff c1 ce calli 8000bcc <__ashlsi3> <== NOT EXECUTED
8010498: b5 61 08 00 add r1,r11,r1 <== NOT EXECUTED
801049c: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED
if ( !p1 )
80104a0: 45 60 00 0b be r11,r0,80104cc <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
80104a4: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
80104a8: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
80104ac: fb ff c1 c8 calli 8000bcc <__ashlsi3> <== NOT EXECUTED
80104b0: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED
80104b4: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
80104b8: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
80104bc: fb ff c1 c4 calli 8000bcc <__ashlsi3> <== NOT EXECUTED
80104c0: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED
80104c4: b4 41 08 00 add r1,r2,r1
80104c8: e0 00 00 02 bi 80104d0 <IMFS_memfile_get_block_pointer+0x2a4>
80104cc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
80104d0: 2b 9d 00 04 lw ra,(sp+4)
80104d4: 2b 8b 00 1c lw r11,(sp+28)
80104d8: 2b 8c 00 18 lw r12,(sp+24)
80104dc: 2b 8d 00 14 lw r13,(sp+20)
80104e0: 2b 8e 00 10 lw r14,(sp+16)
80104e4: 2b 8f 00 0c lw r15,(sp+12)
80104e8: 2b 90 00 08 lw r16,(sp+8)
80104ec: 37 9c 00 1c addi sp,sp,28
80104f0: c3 a0 00 00 ret
08010fe4 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
8010fe4: 37 9c ff d4 addi sp,sp,-44
8010fe8: 5b 8b 00 24 sw (sp+36),r11
8010fec: 5b 8c 00 20 sw (sp+32),r12
8010ff0: 5b 8d 00 1c sw (sp+28),r13
8010ff4: 5b 8e 00 18 sw (sp+24),r14
8010ff8: 5b 8f 00 14 sw (sp+20),r15
8010ffc: 5b 90 00 10 sw (sp+16),r16
8011000: 5b 91 00 0c sw (sp+12),r17
8011004: 5b 92 00 08 sw (sp+8),r18
8011008: 5b 9d 00 04 sw (sp+4),ra
801100c: b8 20 60 00 mv r12,r1
8011010: b8 40 68 00 mv r13,r2
8011014: b8 60 80 00 mv r16,r3
8011018: b8 80 58 00 mv r11,r4
/*
* Perform internal consistency checks
*/
assert( the_jnode );
801101c: 5c 20 00 09 bne r1,r0,8011040 <IMFS_memfile_read+0x5c> <== ALWAYS TAKEN
8011020: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8011024: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8011028: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
801102c: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
8011030: 38 63 35 e8 ori r3,r3,0x35e8 <== NOT EXECUTED
8011034: 38 84 34 e4 ori r4,r4,0x34e4 <== NOT EXECUTED
8011038: 34 02 02 4c mvi r2,588 <== NOT EXECUTED
801103c: e0 00 00 0c bi 801106c <IMFS_memfile_read+0x88> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
8011040: 28 21 00 4c lw r1,(r1+76)
8011044: 34 03 00 01 mvi r3,1
8011048: 34 22 ff fb addi r2,r1,-5
801104c: 50 62 00 09 bgeu r3,r2,8011070 <IMFS_memfile_read+0x8c> <== ALWAYS TAKEN
8011050: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8011054: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8011058: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
801105c: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
8011060: 38 63 35 e8 ori r3,r3,0x35e8 <== NOT EXECUTED
8011064: 38 84 35 60 ori r4,r4,0x3560 <== NOT EXECUTED
8011068: 34 02 02 51 mvi r2,593 <== NOT EXECUTED
801106c: fb ff ef b1 calli 800cf30 <__assert_func> <== NOT EXECUTED
/*
* Error checks on arguments
*/
assert( dest );
8011070: 5e 00 00 09 bne r16,r0,8011094 <IMFS_memfile_read+0xb0> <== ALWAYS TAKEN
8011074: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8011078: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
801107c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8011080: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
8011084: 38 63 35 e8 ori r3,r3,0x35e8 <== NOT EXECUTED
8011088: 38 84 35 ac ori r4,r4,0x35ac <== NOT EXECUTED
801108c: 34 02 02 5a mvi r2,602 <== NOT EXECUTED
8011090: e3 ff ff f7 bi 801106c <IMFS_memfile_read+0x88> <== NOT EXECUTED
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
8011094: 5c 80 00 06 bne r4,r0,80110ac <IMFS_memfile_read+0xc8> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
8011098: f8 00 06 f0 calli 8012c58 <__errno> <== NOT EXECUTED
801109c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
80110a0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80110a4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
80110a8: e0 00 00 88 bi 80112c8 <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) {
80110ac: 34 02 00 06 mvi r2,6
80110b0: 29 8e 00 50 lw r14,(r12+80)
80110b4: 29 8f 00 54 lw r15,(r12+84)
80110b8: 5c 22 00 19 bne r1,r2,801111c <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))
80110bc: 34 02 00 1f mvi r2,31 <== NOT EXECUTED
80110c0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
80110c4: fb ff bf 12 calli 8000d0c <__ashrsi3> <== NOT EXECUTED
80110c8: c9 ed 18 00 sub r3,r15,r13 <== NOT EXECUTED
80110cc: f4 6f 10 00 cmpgu r2,r3,r15 <== NOT EXECUTED
80110d0: c9 c1 08 00 sub r1,r14,r1 <== NOT EXECUTED
80110d4: 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;
80110d8: 29 82 00 58 lw r2,(r12+88) <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start))
80110dc: 48 0e 00 04 bg r0,r14,80110ec <IMFS_memfile_read+0x108> <== NOT EXECUTED
80110e0: 5c 0e 00 04 bne r0,r14,80110f0 <IMFS_memfile_read+0x10c> <== NOT EXECUTED
80110e4: 55 63 00 02 bgu r11,r3,80110ec <IMFS_memfile_read+0x108> <== NOT EXECUTED
80110e8: e0 00 00 02 bi 80110f0 <IMFS_memfile_read+0x10c> <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
80110ec: c9 ed 58 00 sub r11,r15,r13 <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
80110f0: b4 4d 10 00 add r2,r2,r13 <== NOT EXECUTED
80110f4: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
80110f8: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
80110fc: f8 00 09 7d calli 80136f0 <memcpy> <== NOT EXECUTED
IMFS_update_atime( the_jnode );
8011100: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED
8011104: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8011108: fb ff c6 70 calli 8002ac8 <gettimeofday> <== NOT EXECUTED
801110c: 2b 81 00 28 lw r1,(sp+40) <== NOT EXECUTED
8011110: 59 81 00 40 sw (r12+64),r1 <== NOT EXECUTED
return my_length;
8011114: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8011118: e0 00 00 6c bi 80112c8 <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 )
801111c: b4 8d 08 00 add r1,r4,r13
8011120: 48 0e 00 04 bg r0,r14,8011130 <IMFS_memfile_read+0x14c> <== NEVER TAKEN
8011124: 5c 0e 00 04 bne r0,r14,8011134 <IMFS_memfile_read+0x150> <== NEVER TAKEN
8011128: 54 2f 00 02 bgu r1,r15,8011130 <IMFS_memfile_read+0x14c>
801112c: e0 00 00 02 bi 8011134 <IMFS_memfile_read+0x150>
my_length = the_jnode->info.file.size - start;
8011130: 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;
8011134: 78 01 08 02 mvhi r1,0x802
8011138: 38 21 56 d8 ori r1,r1,0x56d8
801113c: 28 32 00 00 lw r18,(r1+0)
8011140: b9 a0 08 00 mv r1,r13
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
8011144: ba 00 78 00 mv r15,r16
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
8011148: ba 40 10 00 mv r2,r18
801114c: f8 00 42 de calli 8021cc4 <__modsi3>
8011150: b8 20 88 00 mv r17,r1
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
8011154: ba 40 10 00 mv r2,r18
8011158: b9 a0 08 00 mv r1,r13
801115c: f8 00 42 a7 calli 8021bf8 <__divsi3>
8011160: b8 20 68 00 mv r13,r1
if ( start_offset ) {
8011164: ba 20 70 00 mv r14,r17
8011168: 46 20 00 1a be r17,r0,80111d0 <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 );
801116c: b9 80 08 00 mv r1,r12
8011170: b9 a0 10 00 mv r2,r13
8011174: 34 03 00 00 mvi r3,0
8011178: fb ff fc 2d calli 801022c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
801117c: 5c 20 00 09 bne r1,r0,80111a0 <IMFS_memfile_read+0x1bc> <== ALWAYS TAKEN
8011180: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8011184: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8011188: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
801118c: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
8011190: 38 63 35 e8 ori r3,r3,0x35e8 <== NOT EXECUTED
8011194: 38 84 35 20 ori r4,r4,0x3520 <== NOT EXECUTED
8011198: 34 02 02 96 mvi r2,662 <== NOT EXECUTED
801119c: e3 ff ff b4 bi 801106c <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;
80111a0: ca 51 90 00 sub r18,r18,r17
80111a4: b9 60 70 00 mv r14,r11
80111a8: 52 4b 00 02 bgeu r18,r11,80111b0 <IMFS_memfile_read+0x1cc>
80111ac: 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 );
80111b0: 28 22 00 00 lw r2,(r1+0)
80111b4: b9 c0 18 00 mv r3,r14
80111b8: ba 00 08 00 mv r1,r16
80111bc: b4 51 10 00 add r2,r2,r17
80111c0: f8 00 09 4c calli 80136f0 <memcpy>
dest += to_copy;
80111c4: b6 0e 78 00 add r15,r16,r14
block++;
80111c8: 35 ad 00 01 addi r13,r13,1
my_length -= to_copy;
80111cc: c9 6e 58 00 sub r11,r11,r14
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
80111d0: 78 01 08 02 mvhi r1,0x802
80111d4: 38 21 56 d8 ori r1,r1,0x56d8
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
80111d8: b8 20 88 00 mv r17,r1
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
80111dc: 28 30 00 00 lw r16,(r1+0)
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
80111e0: e0 00 00 16 bi 8011238 <IMFS_memfile_read+0x254>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
80111e4: b9 80 08 00 mv r1,r12
80111e8: b9 a0 10 00 mv r2,r13
80111ec: 34 03 00 00 mvi r3,0
80111f0: fb ff fc 0f calli 801022c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
80111f4: 5c 20 00 09 bne r1,r0,8011218 <IMFS_memfile_read+0x234> <== ALWAYS TAKEN
80111f8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80111fc: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8011200: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8011204: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
8011208: 38 63 35 e8 ori r3,r3,0x35e8 <== NOT EXECUTED
801120c: 38 84 35 20 ori r4,r4,0x3520 <== NOT EXECUTED
8011210: 34 02 02 a7 mvi r2,679 <== NOT EXECUTED
8011214: e3 ff ff 96 bi 801106c <IMFS_memfile_read+0x88> <== NOT EXECUTED
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
8011218: 28 22 00 00 lw r2,(r1+0)
801121c: ba 00 18 00 mv r3,r16
8011220: b9 e0 08 00 mv r1,r15
8011224: f8 00 09 33 calli 80136f0 <memcpy>
dest += to_copy;
8011228: b5 f0 78 00 add r15,r15,r16
block++;
801122c: 35 ad 00 01 addi r13,r13,1
my_length -= to_copy;
8011230: c9 70 58 00 sub r11,r11,r16
copied += to_copy;
8011234: 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 ) {
8011238: 2a 21 00 00 lw r1,(r17+0)
801123c: 51 61 ff ea bgeu r11,r1,80111e4 <IMFS_memfile_read+0x200>
/*
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
8011240: 54 2b 00 09 bgu r1,r11,8011264 <IMFS_memfile_read+0x280> <== ALWAYS TAKEN
8011244: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8011248: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
801124c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8011250: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
8011254: 38 63 35 e8 ori r3,r3,0x35e8 <== NOT EXECUTED
8011258: 38 84 35 34 ori r4,r4,0x3534 <== NOT EXECUTED
801125c: 34 02 02 b5 mvi r2,693 <== NOT EXECUTED
8011260: e3 ff ff 83 bi 801106c <IMFS_memfile_read+0x88> <== NOT EXECUTED
if ( my_length ) {
8011264: 45 60 00 13 be r11,r0,80112b0 <IMFS_memfile_read+0x2cc>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
8011268: b9 a0 10 00 mv r2,r13
801126c: b9 80 08 00 mv r1,r12
8011270: 34 03 00 00 mvi r3,0
8011274: fb ff fb ee calli 801022c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
8011278: 5c 20 00 09 bne r1,r0,801129c <IMFS_memfile_read+0x2b8> <== ALWAYS TAKEN
801127c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8011280: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8011284: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8011288: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
801128c: 38 63 35 e8 ori r3,r3,0x35e8 <== NOT EXECUTED
8011290: 38 84 35 20 ori r4,r4,0x3520 <== NOT EXECUTED
8011294: 34 02 02 b9 mvi r2,697 <== NOT EXECUTED
8011298: e3 ff ff 75 bi 801106c <IMFS_memfile_read+0x88> <== NOT EXECUTED
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
801129c: 28 22 00 00 lw r2,(r1+0)
80112a0: b9 60 18 00 mv r3,r11
80112a4: b9 e0 08 00 mv r1,r15
80112a8: f8 00 09 12 calli 80136f0 <memcpy>
copied += my_length;
80112ac: b5 6e 70 00 add r14,r11,r14
}
IMFS_update_atime( the_jnode );
80112b0: 37 81 00 28 addi r1,sp,40
80112b4: 34 02 00 00 mvi r2,0
80112b8: fb ff c6 04 calli 8002ac8 <gettimeofday>
80112bc: 2b 81 00 28 lw r1,(sp+40)
80112c0: 59 81 00 40 sw (r12+64),r1
return copied;
80112c4: b9 c0 08 00 mv r1,r14
}
80112c8: 2b 9d 00 04 lw ra,(sp+4)
80112cc: 2b 8b 00 24 lw r11,(sp+36)
80112d0: 2b 8c 00 20 lw r12,(sp+32)
80112d4: 2b 8d 00 1c lw r13,(sp+28)
80112d8: 2b 8e 00 18 lw r14,(sp+24)
80112dc: 2b 8f 00 14 lw r15,(sp+20)
80112e0: 2b 90 00 10 lw r16,(sp+16)
80112e4: 2b 91 00 0c lw r17,(sp+12)
80112e8: 2b 92 00 08 lw r18,(sp+8)
80112ec: 37 9c 00 2c addi sp,sp,44
80112f0: c3 a0 00 00 ret
080105f0 <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
80105f0: 37 9c ff e0 addi sp,sp,-32
80105f4: 5b 8b 00 20 sw (sp+32),r11
80105f8: 5b 8c 00 1c sw (sp+28),r12
80105fc: 5b 8d 00 18 sw (sp+24),r13
8010600: 5b 8e 00 14 sw (sp+20),r14
8010604: 5b 8f 00 10 sw (sp+16),r15
8010608: 5b 90 00 0c sw (sp+12),r16
801060c: 5b 91 00 08 sw (sp+8),r17
8010610: 5b 9d 00 04 sw (sp+4),ra
8010614: b8 20 58 00 mv r11,r1
/*
* Perform internal consistency checks
*/
assert( the_jnode );
8010618: 5c 20 00 09 bne r1,r0,801063c <IMFS_memfile_remove+0x4c> <== ALWAYS TAKEN
801061c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8010620: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010624: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010628: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
801062c: 38 63 35 fc ori r3,r3,0x35fc <== NOT EXECUTED
8010630: 38 84 34 e4 ori r4,r4,0x34e4 <== NOT EXECUTED
8010634: 34 02 01 ee mvi r2,494 <== NOT EXECUTED
8010638: e0 00 00 0b bi 8010664 <IMFS_memfile_remove+0x74> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
801063c: 28 22 00 4c lw r2,(r1+76)
8010640: 34 01 00 05 mvi r1,5
8010644: 44 41 00 09 be r2,r1,8010668 <IMFS_memfile_remove+0x78> <== ALWAYS TAKEN
8010648: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
801064c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010650: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010654: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
8010658: 38 63 35 fc ori r3,r3,0x35fc <== NOT EXECUTED
801065c: 38 84 34 f0 ori r4,r4,0x34f0 <== NOT EXECUTED
8010660: 34 02 01 f2 mvi r2,498 <== NOT EXECUTED
8010664: fb ff f2 33 calli 800cf30 <__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;
8010668: 78 01 08 02 mvhi r1,0x802
801066c: 38 21 56 d8 ori r1,r1,0x56d8
8010670: 28 21 00 00 lw r1,(r1+0)
8010674: 34 02 00 02 mvi r2,2
8010678: fb ff c1 7d calli 8000c6c <__lshrsi3>
801067c: b8 20 60 00 mv r12,r1
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
8010680: 29 61 00 58 lw r1,(r11+88)
8010684: 44 20 00 04 be r1,r0,8010694 <IMFS_memfile_remove+0xa4>
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
8010688: 35 61 00 58 addi r1,r11,88
801068c: b9 80 10 00 mv r2,r12
8010690: fb ff ff 99 calli 80104f4 <memfile_free_blocks_in_table>
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
8010694: 29 61 00 5c lw r1,(r11+92)
8010698: 44 20 00 15 be r1,r0,80106ec <IMFS_memfile_remove+0xfc> <== ALWAYS TAKEN
801069c: 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++ ) {
80106a0: 78 0f 08 02 mvhi r15,0x802 <== NOT EXECUTED
80106a4: 39 ef 56 d8 ori r15,r15,0x56d8 <== NOT EXECUTED
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
80106a8: b9 a0 70 00 mv r14,r13 <== NOT EXECUTED
80106ac: e0 00 00 09 bi 80106d0 <IMFS_memfile_remove+0xe0> <== NOT EXECUTED
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
80106b0: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED
80106b4: b4 2d 08 00 add r1,r1,r13 <== NOT EXECUTED
80106b8: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED
80106bc: 44 40 00 03 be r2,r0,80106c8 <IMFS_memfile_remove+0xd8> <== NOT EXECUTED
memfile_free_blocks_in_table(
80106c0: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
80106c4: fb ff ff 8c calli 80104f4 <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++ ) {
80106c8: 35 ce 00 01 addi r14,r14,1 <== NOT EXECUTED
80106cc: 35 ad 00 04 addi r13,r13,4 <== NOT EXECUTED
80106d0: 29 e1 00 00 lw r1,(r15+0) <== NOT EXECUTED
80106d4: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
80106d8: fb ff c1 65 calli 8000c6c <__lshrsi3> <== NOT EXECUTED
80106dc: 54 2e ff f5 bgu r1,r14,80106b0 <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 );
80106e0: 35 61 00 5c addi r1,r11,92 <== NOT EXECUTED
80106e4: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
80106e8: fb ff ff 83 calli 80104f4 <memfile_free_blocks_in_table> <== NOT EXECUTED
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
80106ec: 29 61 00 60 lw r1,(r11+96)
80106f0: 44 20 00 24 be r1,r0,8010780 <IMFS_memfile_remove+0x190> <== ALWAYS TAKEN
80106f4: 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++ ) {
80106f8: 78 0f 08 02 mvhi r15,0x802 <== NOT EXECUTED
80106fc: 39 ef 56 d8 ori r15,r15,0x56d8 <== NOT EXECUTED
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
8010700: b9 a0 80 00 mv r16,r13 <== NOT EXECUTED
8010704: e0 00 00 18 bi 8010764 <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];
8010708: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED
801070c: b4 2d 08 00 add r1,r1,r13 <== NOT EXECUTED
8010710: 28 2e 00 00 lw r14,(r1+0) <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
8010714: 45 c0 00 18 be r14,r0,8010774 <IMFS_memfile_remove+0x184> <== NOT EXECUTED
8010718: 34 11 00 00 mvi r17,0 <== NOT EXECUTED
801071c: e0 00 00 08 bi 801073c <IMFS_memfile_remove+0x14c> <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
8010720: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED
8010724: 44 20 00 04 be r1,r0,8010734 <IMFS_memfile_remove+0x144> <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
8010728: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
801072c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
8010730: fb ff ff 71 calli 80104f4 <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++ ) {
8010734: 36 31 00 01 addi r17,r17,1 <== NOT EXECUTED
8010738: 35 ce 00 04 addi r14,r14,4 <== NOT EXECUTED
801073c: 29 e1 00 00 lw r1,(r15+0) <== NOT EXECUTED
8010740: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8010744: fb ff c1 4a calli 8000c6c <__lshrsi3> <== NOT EXECUTED
8010748: 54 31 ff f6 bgu r1,r17,8010720 <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(
801074c: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED
8010750: 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++ ) {
8010754: 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(
8010758: b4 2d 08 00 add r1,r1,r13 <== NOT EXECUTED
801075c: fb ff ff 66 calli 80104f4 <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++ ) {
8010760: 35 ad 00 04 addi r13,r13,4 <== NOT EXECUTED
8010764: 29 e1 00 00 lw r1,(r15+0) <== NOT EXECUTED
8010768: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
801076c: fb ff c1 40 calli 8000c6c <__lshrsi3> <== NOT EXECUTED
8010770: 54 30 ff e6 bgu r1,r16,8010708 <IMFS_memfile_remove+0x118> <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
8010774: 35 61 00 60 addi r1,r11,96 <== NOT EXECUTED
8010778: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
801077c: fb ff ff 5e calli 80104f4 <memfile_free_blocks_in_table> <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
8010780: 34 01 00 00 mvi r1,0
8010784: 2b 9d 00 04 lw ra,(sp+4)
8010788: 2b 8b 00 20 lw r11,(sp+32)
801078c: 2b 8c 00 1c lw r12,(sp+28)
8010790: 2b 8d 00 18 lw r13,(sp+24)
8010794: 2b 8e 00 14 lw r14,(sp+20)
8010798: 2b 8f 00 10 lw r15,(sp+16)
801079c: 2b 90 00 0c lw r16,(sp+12)
80107a0: 2b 91 00 08 lw r17,(sp+8)
80107a4: 37 9c 00 20 addi sp,sp,32
80107a8: c3 a0 00 00 ret
08010598 <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
8010598: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
801059c: 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 );
80105a0: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
80105a4: fb ff ff 22 calli 801022c <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
assert( block_ptr );
80105a8: 5c 20 00 09 bne r1,r0,80105cc <IMFS_memfile_remove_block+0x34><== NOT EXECUTED
80105ac: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80105b0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80105b4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
80105b8: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
80105bc: 38 63 36 30 ori r3,r3,0x3630 <== NOT EXECUTED
80105c0: 38 84 35 20 ori r4,r4,0x3520 <== NOT EXECUTED
80105c4: 34 02 01 96 mvi r2,406 <== NOT EXECUTED
80105c8: fb ff f2 5a calli 800cf30 <__assert_func> <== NOT EXECUTED
if ( block_ptr ) {
ptr = *block_ptr;
80105cc: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED
*block_ptr = 0;
80105d0: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
80105d4: 58 23 00 00 sw (r1+0),r3 <== NOT EXECUTED
memfile_free_block( ptr );
80105d8: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
80105dc: fb ff fe f9 calli 80101c0 <memfile_free_block> <== NOT EXECUTED
}
return 1;
}
80105e0: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
80105e4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80105e8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
80105ec: c3 a0 00 00 ret <== NOT EXECUTED
08010c18 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
8010c18: 37 9c ff d0 addi sp,sp,-48
8010c1c: 5b 8b 00 28 sw (sp+40),r11
8010c20: 5b 8c 00 24 sw (sp+36),r12
8010c24: 5b 8d 00 20 sw (sp+32),r13
8010c28: 5b 8e 00 1c sw (sp+28),r14
8010c2c: 5b 8f 00 18 sw (sp+24),r15
8010c30: 5b 90 00 14 sw (sp+20),r16
8010c34: 5b 91 00 10 sw (sp+16),r17
8010c38: 5b 92 00 0c sw (sp+12),r18
8010c3c: 5b 93 00 08 sw (sp+8),r19
8010c40: 5b 9d 00 04 sw (sp+4),ra
8010c44: b8 20 58 00 mv r11,r1
8010c48: b8 40 60 00 mv r12,r2
8010c4c: b8 60 88 00 mv r17,r3
8010c50: b8 80 78 00 mv r15,r4
/*
* Perform internal consistency checks
*/
assert( the_jnode );
8010c54: 5c 20 00 09 bne r1,r0,8010c78 <IMFS_memfile_write+0x60> <== ALWAYS TAKEN
8010c58: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8010c5c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010c60: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010c64: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
8010c68: 38 63 35 d4 ori r3,r3,0x35d4 <== NOT EXECUTED
8010c6c: 38 84 34 e4 ori r4,r4,0x34e4 <== NOT EXECUTED
8010c70: 34 02 02 e3 mvi r2,739 <== NOT EXECUTED
8010c74: e0 00 00 0b bi 8010ca0 <IMFS_memfile_write+0x88> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
8010c78: 28 22 00 4c lw r2,(r1+76)
8010c7c: 34 01 00 05 mvi r1,5
8010c80: 44 41 00 09 be r2,r1,8010ca4 <IMFS_memfile_write+0x8c> <== ALWAYS TAKEN
8010c84: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8010c88: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010c8c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010c90: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
8010c94: 38 63 35 d4 ori r3,r3,0x35d4 <== NOT EXECUTED
8010c98: 38 84 34 f0 ori r4,r4,0x34f0 <== NOT EXECUTED
8010c9c: 34 02 02 e7 mvi r2,743 <== NOT EXECUTED
8010ca0: fb ff f0 a4 calli 800cf30 <__assert_func> <== NOT EXECUTED
/*
* Error check arguments
*/
assert( source );
8010ca4: 5c 60 00 09 bne r3,r0,8010cc8 <IMFS_memfile_write+0xb0> <== ALWAYS TAKEN
8010ca8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8010cac: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010cb0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010cb4: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
8010cb8: 38 63 35 d4 ori r3,r3,0x35d4 <== NOT EXECUTED
8010cbc: 38 84 35 2c ori r4,r4,0x352c <== NOT EXECUTED
8010cc0: 34 02 02 ef mvi r2,751 <== NOT EXECUTED
8010cc4: e3 ff ff f7 bi 8010ca0 <IMFS_memfile_write+0x88> <== NOT EXECUTED
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
8010cc8: 5c 80 00 04 bne r4,r0,8010cd8 <IMFS_memfile_write+0xc0> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
8010ccc: f8 00 07 e3 calli 8012c58 <__errno> <== NOT EXECUTED
8010cd0: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8010cd4: e0 00 00 0d bi 8010d08 <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 ) {
8010cd8: 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;
8010cdc: b4 8c 10 00 add r2,r4,r12
if ( last_byte > the_jnode->info.file.size ) {
8010ce0: 48 01 00 05 bg r0,r1,8010cf4 <IMFS_memfile_write+0xdc> <== NEVER TAKEN
8010ce4: 5c 20 00 0c bne r1,r0,8010d14 <IMFS_memfile_write+0xfc> <== NEVER TAKEN
8010ce8: 29 61 00 54 lw r1,(r11+84)
8010cec: 54 41 00 02 bgu r2,r1,8010cf4 <IMFS_memfile_write+0xdc> <== ALWAYS TAKEN
8010cf0: e0 00 00 09 bi 8010d14 <IMFS_memfile_write+0xfc> <== NOT EXECUTED
status = IMFS_memfile_extend( the_jnode, last_byte );
8010cf4: b9 60 08 00 mv r1,r11
8010cf8: fb ff ff 18 calli 8010958 <IMFS_memfile_extend>
if ( status )
8010cfc: 44 20 00 06 be r1,r0,8010d14 <IMFS_memfile_write+0xfc> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
8010d00: f8 00 07 d6 calli 8012c58 <__errno> <== NOT EXECUTED
8010d04: 34 02 00 1c mvi r2,28 <== NOT EXECUTED
8010d08: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8010d0c: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
8010d10: e0 00 00 66 bi 8010ea8 <IMFS_memfile_write+0x290> <== NOT EXECUTED
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
8010d14: 78 01 08 02 mvhi r1,0x802
8010d18: 38 21 56 d8 ori r1,r1,0x56d8
8010d1c: 28 33 00 00 lw r19,(r1+0)
8010d20: b9 80 08 00 mv r1,r12
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
8010d24: b9 e0 68 00 mv r13,r15
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
8010d28: ba 60 10 00 mv r2,r19
8010d2c: f8 00 43 e6 calli 8021cc4 <__modsi3>
8010d30: b8 20 90 00 mv r18,r1
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
8010d34: ba 60 10 00 mv r2,r19
8010d38: b9 80 08 00 mv r1,r12
8010d3c: f8 00 43 af calli 8021bf8 <__divsi3>
8010d40: b8 20 70 00 mv r14,r1
if ( start_offset ) {
8010d44: ba 20 80 00 mv r16,r17
8010d48: ba 40 60 00 mv r12,r18
8010d4c: 46 40 00 19 be r18,r0,8010db0 <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 );
8010d50: b9 60 08 00 mv r1,r11
8010d54: b9 c0 10 00 mv r2,r14
8010d58: 34 03 00 00 mvi r3,0
8010d5c: fb ff fd 34 calli 801022c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
8010d60: 5c 20 00 09 bne r1,r0,8010d84 <IMFS_memfile_write+0x16c> <== ALWAYS TAKEN
8010d64: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8010d68: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010d6c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010d70: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
8010d74: 38 63 35 d4 ori r3,r3,0x35d4 <== NOT EXECUTED
8010d78: 38 84 35 20 ori r4,r4,0x3520 <== NOT EXECUTED
8010d7c: 34 02 03 1c mvi r2,796 <== NOT EXECUTED
8010d80: e3 ff ff c8 bi 8010ca0 <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;
8010d84: ca 72 60 00 sub r12,r19,r18
8010d88: 51 ec 00 02 bgeu r15,r12,8010d90 <IMFS_memfile_write+0x178>
8010d8c: 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 );
8010d90: 28 21 00 00 lw r1,(r1+0)
8010d94: ba 20 10 00 mv r2,r17
8010d98: b9 80 18 00 mv r3,r12
8010d9c: b4 32 08 00 add r1,r1,r18
8010da0: f8 00 0a 54 calli 80136f0 <memcpy>
src += to_copy;
8010da4: b6 2c 80 00 add r16,r17,r12
block++;
8010da8: 35 ce 00 01 addi r14,r14,1
my_length -= to_copy;
8010dac: c9 ec 68 00 sub r13,r15,r12
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
8010db0: 78 01 08 02 mvhi r1,0x802
8010db4: 38 21 56 d8 ori r1,r1,0x56d8
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
8010db8: b8 20 88 00 mv r17,r1
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
8010dbc: 28 2f 00 00 lw r15,(r1+0)
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
8010dc0: e0 00 00 16 bi 8010e18 <IMFS_memfile_write+0x200>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
8010dc4: b9 60 08 00 mv r1,r11
8010dc8: b9 c0 10 00 mv r2,r14
8010dcc: 34 03 00 00 mvi r3,0
8010dd0: fb ff fd 17 calli 801022c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
8010dd4: 5c 20 00 09 bne r1,r0,8010df8 <IMFS_memfile_write+0x1e0> <== ALWAYS TAKEN
8010dd8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8010ddc: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010de0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010de4: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
8010de8: 38 63 35 d4 ori r3,r3,0x35d4 <== NOT EXECUTED
8010dec: 38 84 35 20 ori r4,r4,0x3520 <== NOT EXECUTED
8010df0: 34 02 03 30 mvi r2,816 <== NOT EXECUTED
8010df4: e3 ff ff ab bi 8010ca0 <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 );
8010df8: 28 21 00 00 lw r1,(r1+0)
8010dfc: ba 00 10 00 mv r2,r16
8010e00: b9 e0 18 00 mv r3,r15
8010e04: f8 00 0a 3b calli 80136f0 <memcpy>
src += to_copy;
8010e08: b6 0f 80 00 add r16,r16,r15
block++;
8010e0c: 35 ce 00 01 addi r14,r14,1
my_length -= to_copy;
8010e10: 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(
8010e14: 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 ) {
8010e18: 2a 21 00 00 lw r1,(r17+0)
8010e1c: 51 a1 ff ea bgeu r13,r1,8010dc4 <IMFS_memfile_write+0x1ac>
/*
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
8010e20: 54 2d 00 09 bgu r1,r13,8010e44 <IMFS_memfile_write+0x22c> <== ALWAYS TAKEN
8010e24: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8010e28: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010e2c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010e30: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
8010e34: 38 63 35 d4 ori r3,r3,0x35d4 <== NOT EXECUTED
8010e38: 38 84 35 34 ori r4,r4,0x3534 <== NOT EXECUTED
8010e3c: 34 02 03 41 mvi r2,833 <== NOT EXECUTED
8010e40: e3 ff ff 98 bi 8010ca0 <IMFS_memfile_write+0x88> <== NOT EXECUTED
to_copy = my_length;
if ( my_length ) {
8010e44: 45 a0 00 13 be r13,r0,8010e90 <IMFS_memfile_write+0x278>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
8010e48: b9 c0 10 00 mv r2,r14
8010e4c: b9 60 08 00 mv r1,r11
8010e50: 34 03 00 00 mvi r3,0
8010e54: fb ff fc f6 calli 801022c <IMFS_memfile_get_block_pointer>
assert( block_ptr );
8010e58: 5c 20 00 09 bne r1,r0,8010e7c <IMFS_memfile_write+0x264> <== ALWAYS TAKEN
8010e5c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8010e60: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010e64: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010e68: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
8010e6c: 38 63 35 d4 ori r3,r3,0x35d4 <== NOT EXECUTED
8010e70: 38 84 35 20 ori r4,r4,0x3520 <== NOT EXECUTED
8010e74: 34 02 03 46 mvi r2,838 <== NOT EXECUTED
8010e78: e3 ff ff 8a bi 8010ca0 <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 );
8010e7c: 28 21 00 00 lw r1,(r1+0)
8010e80: ba 00 10 00 mv r2,r16
8010e84: b9 a0 18 00 mv r3,r13
8010e88: f8 00 0a 1a calli 80136f0 <memcpy>
my_length = 0;
copied += to_copy;
8010e8c: b5 8d 60 00 add r12,r12,r13
}
IMFS_mtime_ctime_update( the_jnode );
8010e90: 37 81 00 2c addi r1,sp,44
8010e94: 34 02 00 00 mvi r2,0
8010e98: fb ff c7 0c calli 8002ac8 <gettimeofday>
8010e9c: 2b 81 00 2c lw r1,(sp+44)
8010ea0: 59 61 00 48 sw (r11+72),r1
8010ea4: 59 61 00 44 sw (r11+68),r1
return copied;
}
8010ea8: b9 80 08 00 mv r1,r12
8010eac: 2b 9d 00 04 lw ra,(sp+4)
8010eb0: 2b 8b 00 28 lw r11,(sp+40)
8010eb4: 2b 8c 00 24 lw r12,(sp+36)
8010eb8: 2b 8d 00 20 lw r13,(sp+32)
8010ebc: 2b 8e 00 1c lw r14,(sp+28)
8010ec0: 2b 8f 00 18 lw r15,(sp+24)
8010ec4: 2b 90 00 14 lw r16,(sp+20)
8010ec8: 2b 91 00 10 lw r17,(sp+16)
8010ecc: 2b 92 00 0c lw r18,(sp+12)
8010ed0: 2b 93 00 08 lw r19,(sp+8)
8010ed4: 37 9c 00 30 addi sp,sp,48
8010ed8: c3 a0 00 00 ret
08002084 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
8002084: 37 9c ff a8 addi sp,sp,-88
8002088: 5b 8b 00 18 sw (sp+24),r11
800208c: 5b 8c 00 14 sw (sp+20),r12
8002090: 5b 8d 00 10 sw (sp+16),r13
8002094: 5b 8e 00 0c sw (sp+12),r14
8002098: 5b 8f 00 08 sw (sp+8),r15
800209c: 5b 9d 00 04 sw (sp+4),ra
80020a0: b8 40 58 00 mv r11,r2
80020a4: b8 20 78 00 mv r15,r1
80020a8: b8 60 70 00 mv r14,r3
80020ac: b8 80 68 00 mv r13,r4
80020b0: 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 );
80020b4: f8 00 47 9a calli 8013f1c <strlen>
80020b8: b8 20 10 00 mv r2,r1
80020bc: 37 83 00 1c addi r3,sp,28
80020c0: b9 e0 08 00 mv r1,r15
80020c4: 37 84 00 58 addi r4,sp,88
80020c8: f8 00 2a ec calli 800cc78 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
80020cc: 21 66 f0 00 andi r6,r11,0xf000
80020d0: 34 01 40 00 mvi r1,16384
80020d4: 44 c1 00 12 be r6,r1,800211c <IMFS_mknod+0x98>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
80020d8: 38 01 80 00 mvu r1,0x8000
80020dc: 34 02 00 05 mvi r2,5
80020e0: 44 c1 00 10 be r6,r1,8002120 <IMFS_mknod+0x9c>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
80020e4: 64 c2 20 00 cmpei r2,r6,8192
80020e8: 64 c1 60 00 cmpei r1,r6,24576
80020ec: b8 41 08 00 or r1,r2,r1
80020f0: 44 20 00 05 be r1,r0,8002104 <IMFS_mknod+0x80>
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
80020f4: 5b 8e 00 40 sw (sp+64),r14
80020f8: 5b 8d 00 44 sw (sp+68),r13
80020fc: 34 02 00 02 mvi r2,2
8002100: e0 00 00 08 bi 8002120 <IMFS_mknod+0x9c>
}
else if (S_ISFIFO(mode))
8002104: 34 01 10 00 mvi r1,4096
8002108: 34 02 00 07 mvi r2,7
800210c: 44 c1 00 05 be r6,r1,8002120 <IMFS_mknod+0x9c> <== ALWAYS TAKEN
type = IMFS_FIFO;
else {
rtems_set_errno_and_return_minus_one( EINVAL );
8002110: f8 00 42 d2 calli 8012c58 <__errno> <== NOT EXECUTED
8002114: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8002118: e0 00 00 0b bi 8002144 <IMFS_mknod+0xc0> <== NOT EXECUTED
800211c: 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(
8002120: b9 80 08 00 mv r1,r12
8002124: b9 60 20 00 mv r4,r11
8002128: 37 83 00 1c addi r3,sp,28
800212c: 37 85 00 40 addi r5,sp,64
8002130: f8 00 27 3e calli 800be28 <IMFS_create_node>
new_name,
mode,
&info
);
if ( !new_node )
8002134: 34 02 00 00 mvi r2,0
8002138: 5c 22 00 05 bne r1,r2,800214c <IMFS_mknod+0xc8> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
800213c: f8 00 42 c7 calli 8012c58 <__errno> <== NOT EXECUTED
8002140: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
8002144: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8002148: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
return 0;
}
800214c: b8 40 08 00 mv r1,r2
8002150: 2b 9d 00 04 lw ra,(sp+4)
8002154: 2b 8b 00 18 lw r11,(sp+24)
8002158: 2b 8c 00 14 lw r12,(sp+20)
800215c: 2b 8d 00 10 lw r13,(sp+16)
8002160: 2b 8e 00 0c lw r14,(sp+12)
8002164: 2b 8f 00 08 lw r15,(sp+8)
8002168: 37 9c 00 58 addi sp,sp,88
800216c: 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 42 b4 calli 8012c58 <__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 68 1c ori r1,r1,0x681c <== NOT EXECUTED
8003714: 38 63 69 f4 ori r3,r3,0x69f4 <== NOT EXECUTED
8003718: 38 84 68 68 ori r4,r4,0x6868 <== 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 91 d8 ori r12,r12,0x91d8
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 3e 3c calli 8013028 <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 69 c4 ori r13,r13,0x69c4
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 3d d7 calli 8012ed0 <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 68 74 ori r2,r2,0x6874
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 68 88 ori r2,r2,0x6888 <== NOT EXECUTED
80037b0: f8 00 3d a7 calli 8012e4c <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 68 98 ori r2,r2,0x6898
80037cc: f8 00 3d a0 calli 8012e4c <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 68 a4 ori r1,r1,0x68a4 <== NOT EXECUTED
80037e0: 28 42 00 08 lw r2,(r2+8) <== NOT EXECUTED
80037e4: f8 00 3e 11 calli 8013028 <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 68 1c ori r1,r1,0x681c <== NOT EXECUTED
80037f8: 38 63 69 f4 ori r3,r3,0x69f4 <== NOT EXECUTED
80037fc: 38 84 68 b8 ori r4,r4,0x68b8 <== 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 68 a4 ori r1,r1,0x68a4 <== NOT EXECUTED
8003814: 28 42 00 08 lw r2,(r2+8) <== NOT EXECUTED
8003818: f8 00 3e 04 calli 8013028 <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 68 1c ori r1,r1,0x681c <== NOT EXECUTED
800382c: 38 63 69 f4 ori r3,r3,0x69f4 <== NOT EXECUTED
8003830: 38 84 68 b8 ori r4,r4,0x68b8 <== 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 68 bc ori r1,r1,0x68bc <== NOT EXECUTED
8003848: 28 42 00 08 lw r2,(r2+8) <== NOT EXECUTED
800384c: f8 00 3d f7 calli 8013028 <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 68 1c ori r1,r1,0x681c <== NOT EXECUTED
8003860: 38 63 69 f4 ori r3,r3,0x69f4 <== NOT EXECUTED
8003864: 38 84 68 b8 ori r4,r4,0x68b8 <== 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 68 d0 ori r2,r2,0x68d0 <== NOT EXECUTED
800387c: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED
8003880: f8 00 3d 73 calli 8012e4c <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 68 1c ori r1,r1,0x681c <== NOT EXECUTED
8003894: 38 63 69 f4 ori r3,r3,0x69f4 <== NOT EXECUTED
8003898: 38 84 68 b8 ori r4,r4,0x68b8 <== 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 62 88 ori r1,r1,0x6288
80038ac: f8 00 45 8e calli 8014ee4 <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 42 a0 calli 8012c58 <__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 47 63 calli 8013fc8 <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 e8 calli 8004dec <_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 d7 calli 8004dbc <_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
0800cd74 <IMFS_rmnod>:
int IMFS_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
800cd74: 37 9c ff ec addi sp,sp,-20
800cd78: 5b 8b 00 0c sw (sp+12),r11
800cd7c: 5b 8c 00 08 sw (sp+8),r12
800cd80: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
800cd84: 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 */
)
{
800cd88: 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 ) {
800cd8c: 29 61 00 08 lw r1,(r11+8)
800cd90: 44 20 00 05 be r1,r0,800cda4 <IMFS_rmnod+0x30> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
800cd94: b9 60 08 00 mv r1,r11
800cd98: fb ff e0 15 calli 8004dec <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
800cd9c: 34 01 00 00 mvi r1,0
800cda0: 59 61 00 08 sw (r11+8),r1
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
800cda4: 2d 63 00 34 lhu r3,(r11+52)
IMFS_update_ctime( the_jnode );
800cda8: 34 02 00 00 mvi r2,0
800cdac: 37 81 00 10 addi r1,sp,16
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
800cdb0: 34 63 ff ff addi r3,r3,-1
800cdb4: 0d 63 00 34 sh (r11+52),r3
IMFS_update_ctime( the_jnode );
800cdb8: fb ff d7 44 calli 8002ac8 <gettimeofday>
800cdbc: 2b 81 00 10 lw r1,(sp+16)
800cdc0: 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) ) {
800cdc4: b9 60 08 00 mv r1,r11
800cdc8: f8 00 01 17 calli 800d224 <rtems_libio_is_file_open>
800cdcc: 5c 20 00 12 bne r1,r0,800ce14 <IMFS_rmnod+0xa0> <== NEVER TAKEN
800cdd0: 2d 63 00 34 lhu r3,(r11+52)
800cdd4: 5c 61 00 10 bne r3,r1,800ce14 <IMFS_rmnod+0xa0> <== NEVER TAKEN
/*
* Is rtems_filesystem_current this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
800cdd8: 78 01 08 02 mvhi r1,0x802
800cddc: 38 21 50 f8 ori r1,r1,0x50f8
800cde0: 28 21 00 00 lw r1,(r1+0)
800cde4: 29 82 00 00 lw r2,(r12+0)
800cde8: 28 24 00 04 lw r4,(r1+4)
800cdec: 5c 82 00 02 bne r4,r2,800cdf4 <IMFS_rmnod+0x80> <== ALWAYS TAKEN
rtems_filesystem_current.node_access = NULL;
800cdf0: 58 23 00 04 sw (r1+4),r3 <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
800cdf4: 29 62 00 4c lw r2,(r11+76)
800cdf8: 34 01 00 04 mvi r1,4
800cdfc: 5c 41 00 04 bne r2,r1,800ce0c <IMFS_rmnod+0x98>
if ( the_jnode->info.sym_link.name )
800ce00: 29 61 00 50 lw r1,(r11+80)
800ce04: 44 20 00 02 be r1,r0,800ce0c <IMFS_rmnod+0x98> <== NEVER TAKEN
free( (void*) the_jnode->info.sym_link.name );
800ce08: fb ff d7 02 calli 8002a10 <free>
}
free( the_jnode );
800ce0c: b9 60 08 00 mv r1,r11
800ce10: fb ff d7 00 calli 8002a10 <free>
}
return 0;
}
800ce14: 34 01 00 00 mvi r1,0
800ce18: 2b 9d 00 04 lw ra,(sp+4)
800ce1c: 2b 8b 00 0c lw r11,(sp+12)
800ce20: 2b 8c 00 08 lw r12,(sp+8)
800ce24: 37 9c 00 14 addi sp,sp,20
800ce28: c3 a0 00 00 ret
0800ce2c <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
800ce2c: 37 9c ff ec addi sp,sp,-20
800ce30: 5b 8b 00 14 sw (sp+20),r11
800ce34: 5b 8c 00 10 sw (sp+16),r12
800ce38: 5b 8d 00 0c sw (sp+12),r13
800ce3c: 5b 8e 00 08 sw (sp+8),r14
800ce40: 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;
800ce44: 28 2c 00 00 lw r12,(r1+0)
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
800ce48: b8 20 70 00 mv r14,r1
800ce4c: b8 40 58 00 mv r11,r2
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
800ce50: 29 81 00 4c lw r1,(r12+76)
800ce54: 34 02 00 05 mvi r2,5
800ce58: 34 21 ff fe addi r1,r1,-2
800ce5c: 54 22 00 12 bgu r1,r2,800cea4 <IMFS_stat+0x78> <== NEVER TAKEN
800ce60: 78 0d 08 02 mvhi r13,0x802
800ce64: 34 02 00 02 mvi r2,2
800ce68: fb ff cf 59 calli 8000bcc <__ashlsi3>
800ce6c: 39 ad 31 f0 ori r13,r13,0x31f0
800ce70: b5 a1 08 00 add r1,r13,r1
800ce74: 28 21 00 00 lw r1,(r1+0)
800ce78: 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 );
800ce7c: 29 81 00 54 lw r1,(r12+84)
800ce80: 29 82 00 50 lw r2,(r12+80)
800ce84: 59 61 00 1c sw (r11+28),r1
800ce88: 59 62 00 18 sw (r11+24),r2
break;
800ce8c: e0 00 00 0b bi 800ceb8 <IMFS_stat+0x8c>
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
800ce90: 29 81 00 54 lw r1,(r12+84)
800ce94: e0 00 00 02 bi 800ce9c <IMFS_stat+0x70>
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
800ce98: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
800ce9c: 59 61 00 20 sw (r11+32),r1
break;
800cea0: e0 00 00 06 bi 800ceb8 <IMFS_stat+0x8c>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
800cea4: f8 00 17 6d calli 8012c58 <__errno> <== NOT EXECUTED
800cea8: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
800ceac: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800ceb0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
800ceb4: e0 00 00 18 bi 800cf14 <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;
800ceb8: 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 );
800cebc: 29 c1 00 10 lw r1,(r14+16)
buf->st_mode = the_jnode->st_mode;
800cec0: 59 62 00 0c sw (r11+12),r2
buf->st_nlink = the_jnode->st_nlink;
800cec4: 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 );
800cec8: 28 21 00 34 lw r1,(r1+52)
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
800cecc: 0d 62 00 10 sh (r11+16),r2
buf->st_ino = the_jnode->st_ino;
800ced0: 29 82 00 38 lw r2,(r12+56)
800ced4: 59 62 00 08 sw (r11+8),r2
buf->st_uid = the_jnode->st_uid;
800ced8: 2d 82 00 3c lhu r2,(r12+60)
800cedc: 0d 62 00 12 sh (r11+18),r2
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
800cee0: 29 82 00 40 lw r2,(r12+64)
800cee4: 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 );
800cee8: 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;
800ceec: 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 =
800cef0: 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;
800cef4: 0d 61 00 14 sh (r11+20),r1
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
800cef8: 29 81 00 44 lw r1,(r12+68)
800cefc: 59 61 00 2c sw (r11+44),r1
buf->st_ctime = the_jnode->stat_ctime;
800cf00: 29 8c 00 48 lw r12,(r12+72)
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
800cf04: 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 =
800cf08: 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;
800cf0c: 59 6c 00 34 sw (r11+52),r12
800cf10: 34 01 00 00 mvi r1,0
return 0;
}
800cf14: 2b 9d 00 04 lw ra,(sp+4)
800cf18: 2b 8b 00 14 lw r11,(sp+20)
800cf1c: 2b 8c 00 10 lw r12,(sp+16)
800cf20: 2b 8d 00 0c lw r13,(sp+12)
800cf24: 2b 8e 00 08 lw r14,(sp+8)
800cf28: 37 9c 00 14 addi sp,sp,20
800cf2c: 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 47 18 calli 8013f1c <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 6a calli 800cc78 <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
80022d4: b9 c0 08 00 mv r1,r14
80022d8: f8 00 46 ee calli 8013e90 <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 cc calli 800be28 <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 42 53 calli 8012c58 <__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 42 38 calli 8012c58 <__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 44 d6 calli 80136f0 <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 f6 calli 800bf7c <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 42 03 calli 8012c58 <__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 41 fd calli 8012c58 <__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
08002cdc <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
8002cdc: 37 9c ff f0 addi sp,sp,-16
8002ce0: 5b 8b 00 10 sw (sp+16),r11
8002ce4: 5b 8c 00 0c sw (sp+12),r12
8002ce8: 5b 8d 00 08 sw (sp+8),r13
8002cec: 5b 9d 00 04 sw (sp+4),ra
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
8002cf0: 78 04 08 02 mvhi r4,0x802
8002cf4: 38 84 56 80 ori r4,r4,0x5680
8002cf8: 28 84 00 00 lw r4,(r4+0)
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
8002cfc: b8 20 58 00 mv r11,r1
8002d00: b8 40 60 00 mv r12,r2
8002d04: b8 60 68 00 mv r13,r3
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
8002d08: 44 80 00 03 be r4,r0,8002d14 <RTEMS_Malloc_Initialize+0x38><== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->initialize)();
8002d0c: 28 81 00 00 lw r1,(r4+0) <== NOT EXECUTED
8002d10: d8 20 00 00 call r1 <== NOT EXECUTED
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
8002d14: fb ff ff d3 calli 8002c60 <malloc_deferred_frees_initialize>
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
8002d18: 78 01 08 02 mvhi r1,0x802
8002d1c: 38 21 56 84 ori r1,r1,0x5684
8002d20: 28 21 00 00 lw r1,(r1+0)
8002d24: 44 20 00 08 be r1,r0,8002d44 <RTEMS_Malloc_Initialize+0x68><== ALWAYS TAKEN
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
8002d28: 28 24 00 00 lw r4,(r1+0) <== NOT EXECUTED
8002d2c: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED
8002d30: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8002d34: d8 80 00 00 call r4 <== NOT EXECUTED
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
8002d38: b5 6c 60 00 add r12,r11,r12 <== NOT EXECUTED
8002d3c: c9 81 60 00 sub r12,r12,r1 <== NOT EXECUTED
8002d40: 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 (
8002d44: 78 01 08 02 mvhi r1,0x802
8002d48: 38 21 56 7d ori r1,r1,0x567d
8002d4c: 40 22 00 00 lbu r2,(r1+0)
8002d50: 5c 40 00 08 bne r2,r0,8002d70 <RTEMS_Malloc_Initialize+0x94>
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
8002d54: 78 01 08 02 mvhi r1,0x802
8002d58: 38 21 50 ac ori r1,r1,0x50ac
8002d5c: 40 21 00 28 lbu r1,(r1+40)
8002d60: 44 22 00 04 be r1,r2,8002d70 <RTEMS_Malloc_Initialize+0x94>
) {
memset( heap_begin, 0, heap_size );
8002d64: b9 60 08 00 mv r1,r11
8002d68: b9 80 18 00 mv r3,r12
8002d6c: f8 00 42 bf calli 8013868 <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 ) {
8002d70: 78 01 08 02 mvhi r1,0x802
8002d74: 38 21 56 7d ori r1,r1,0x567d
8002d78: 40 2d 00 00 lbu r13,(r1+0)
8002d7c: 5d a0 00 0b bne r13,r0,8002da8 <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 );
8002d80: 78 01 08 02 mvhi r1,0x802
8002d84: 38 21 50 1c ori r1,r1,0x501c
8002d88: 28 21 00 00 lw r1,(r1+0)
8002d8c: b9 60 10 00 mv r2,r11
8002d90: b9 80 18 00 mv r3,r12
8002d94: 34 04 00 08 mvi r4,8
8002d98: f8 00 09 78 calli 8005378 <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
8002d9c: 5c 2d 00 03 bne r1,r13,8002da8 <RTEMS_Malloc_Initialize+0xcc><== ALWAYS TAKEN
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
8002da0: 34 01 00 1a mvi r1,26 <== NOT EXECUTED
8002da4: f8 00 06 95 calli 80047f8 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
8002da8: 78 01 08 02 mvhi r1,0x802
8002dac: 38 21 50 1c ori r1,r1,0x501c
8002db0: 78 0b 08 02 mvhi r11,0x802
8002db4: 39 6b 58 08 ori r11,r11,0x5808
8002db8: 28 21 00 00 lw r1,(r1+0)
8002dbc: 29 6c 00 00 lw r12,(r11+0)
8002dc0: f8 00 0d 45 calli 80062d4 <_Protected_heap_Get_size>
8002dc4: b4 2c 08 00 add r1,r1,r12
8002dc8: 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
}
8002dcc: 2b 9d 00 04 lw ra,(sp+4)
8002dd0: 2b 8b 00 10 lw r11,(sp+16)
8002dd4: 2b 8c 00 0c lw r12,(sp+12)
8002dd8: 2b 8d 00 08 lw r13,(sp+8)
8002ddc: 37 9c 00 10 addi sp,sp,16
8002de0: 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 d6 b0 ori r1,r1,0xd6b0 <== NOT EXECUTED
800092c: 28 2f 00 00 lw r15,(r1+0) <== NOT EXECUTED
8000930: 45 e0 00 4b be r15,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 d7 44 ori r12,r12,0xd744 <== NOT EXECUTED
8000944: 29 81 00 04 lw r1,(r12+4) <== NOT EXECUTED
8000948: 34 0e 00 00 mvi r14,0 <== NOT EXECUTED
800094c: b9 c0 58 00 mv r11,r14 <== NOT EXECUTED
8000950: 5c 2e 00 04 bne r1,r14,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 6e 01 14 lw r14,(r11+276) <== NOT EXECUTED
current = 0;
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
800095c: 35 6c 00 c4 addi r12,r11,196 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
8000960: 29 90 00 04 lw r16,(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: 36 10 00 10 addi r16,r16,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: ba 00 08 00 mv r1,r16 <== 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: b6 0d 80 00 add r16,r16,r13 <== NOT EXECUTED
8000980: ca 01 80 00 sub r16,r16,r1 <== NOT EXECUTED
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
8000984: 5c 20 00 02 bne r1,r0,800098c <Stack_check_Dump_threads_usage+0x94><== NOT EXECUTED
8000988: b8 20 80 00 mv r16,r1 <== NOT EXECUTED
800098c: 78 04 08 01 mvhi r4,0x801 <== NOT EXECUTED
8000990: 38 84 d6 ac ori r4,r4,0xd6ac <== 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 b8 98 ori r2,r2,0xb898 <== NOT EXECUTED
80009bc: ba 20 08 00 mv r1,r17 <== NOT EXECUTED
80009c0: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
80009c4: d9 e0 00 00 call r15 <== 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 b8 a8 ori r2,r2,0xb8a8 <== NOT EXECUTED
80009d8: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED
80009dc: d9 e0 00 00 call r15 <== 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 d6 b0 ori r11,r11,0xd6b0 <== NOT EXECUTED
80009f4: 39 8c d6 ac ori r12,r12,0xd6ac <== 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 b8 b8 ori r2,r2,0xb8b8 <== NOT EXECUTED
8000a0c: b4 64 20 00 add r4,r3,r4 <== NOT EXECUTED
8000a10: b9 c0 28 00 mv r5,r14 <== 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 d6 a8 ori r2,r2,0xd6a8 <== 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 b8 d8 ori r2,r2,0xb8d8 <== 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 b8 e8 ori r2,r2,0xb8e8 <== NOT EXECUTED
8000a54: ba 00 18 00 mv r3,r16 <== 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 d6 a8 ori r1,r1,0xd6a8
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 d7 34 ori r11,r11,0xd734
/*
* 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 ba 30 ori r13,r13,0xba30
/*
* 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 d8 a4 ori r1,r1,0xd8a4
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 d8 28 ori r1,r1,0xd828
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 d7 44 ori r5,r5,0xd744
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 31 5a calli 800d314 <memset>
}
#endif
Stack_check_Initialized = 1;
8000db0: 78 01 08 01 mvhi r1,0x801
8000db4: 38 21 d6 a8 ori r1,r1,0xd6a8
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 b9 54 ori r1,r1,0xb954
*
* 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 c8 lw r12,(r11+200)
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 b9 64 ori r1,r1,0xb964
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 b9 84 ori r1,r1,0xb984
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 b9 98 ori r1,r1,0xb998
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 b9 ac ori r1,r1,0xb9ac
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 c4 lw r2,(r11+196)
8000bb8: 29 63 00 c8 lw r3,(r11+200)
8000bbc: 78 01 08 01 mvhi r1,0x801
8000bc0: 38 21 b9 c4 ori r1,r1,0xb9c4
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 b9 f8 ori r1,r1,0xb9f8
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 ee calli 80027a4 <rtems_fatal_error_occurred>
0800532c <_CORE_RWLock_Obtain_for_reading>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
800532c: 37 9c ff e4 addi sp,sp,-28
8005330: 5b 8b 00 1c sw (sp+28),r11
8005334: 5b 8c 00 18 sw (sp+24),r12
8005338: 5b 8d 00 14 sw (sp+20),r13
800533c: 5b 8e 00 10 sw (sp+16),r14
8005340: 5b 8f 00 0c sw (sp+12),r15
8005344: 5b 90 00 08 sw (sp+8),r16
8005348: 5b 9d 00 04 sw (sp+4),ra
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
800534c: 78 05 08 02 mvhi r5,0x802
8005350: 38 a5 19 38 ori r5,r5,0x1938
8005354: 28 ac 00 00 lw r12,(r5+0)
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
8005358: b8 20 58 00 mv r11,r1
800535c: b8 40 78 00 mv r15,r2
8005360: b8 80 70 00 mv r14,r4
8005364: 20 70 00 ff andi r16,r3,0xff
* If unlocked, then OK to read.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
8005368: 90 00 68 00 rcsr r13,IE
800536c: 34 01 ff fe mvi r1,-2
8005370: a1 a1 08 00 and r1,r13,r1
8005374: d0 01 00 00 wcsr IE,r1
switch ( the_rwlock->current_state ) {
8005378: 29 61 00 44 lw r1,(r11+68)
800537c: 44 20 00 04 be r1,r0,800538c <_CORE_RWLock_Obtain_for_reading+0x60>
8005380: 34 02 00 01 mvi r2,1
8005384: 5c 22 00 12 bne r1,r2,80053cc <_CORE_RWLock_Obtain_for_reading+0xa0>
8005388: e0 00 00 08 bi 80053a8 <_CORE_RWLock_Obtain_for_reading+0x7c>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
the_rwlock->number_of_readers += 1;
800538c: 29 61 00 48 lw r1,(r11+72)
*/
_ISR_Disable( level );
switch ( the_rwlock->current_state ) {
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
8005390: 34 02 00 01 mvi r2,1
8005394: 59 62 00 44 sw (r11+68),r2
the_rwlock->number_of_readers += 1;
8005398: b4 22 08 00 add r1,r1,r2
800539c: 59 61 00 48 sw (r11+72),r1
_ISR_Enable( level );
80053a0: d0 0d 00 00 wcsr IE,r13
80053a4: e0 00 00 08 bi 80053c4 <_CORE_RWLock_Obtain_for_reading+0x98>
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
return;
case CORE_RWLOCK_LOCKED_FOR_READING: {
Thread_Control *waiter;
waiter = _Thread_queue_First( &the_rwlock->Wait_queue );
80053a8: b9 60 08 00 mv r1,r11
80053ac: f8 00 08 27 calli 8007448 <_Thread_queue_First>
if ( !waiter ) {
80053b0: 5c 20 00 07 bne r1,r0,80053cc <_CORE_RWLock_Obtain_for_reading+0xa0><== NEVER TAKEN
the_rwlock->number_of_readers += 1;
80053b4: 29 61 00 48 lw r1,(r11+72)
80053b8: 34 21 00 01 addi r1,r1,1
80053bc: 59 61 00 48 sw (r11+72),r1
_ISR_Enable( level );
80053c0: d0 0d 00 00 wcsr IE,r13
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
80053c4: 34 01 00 00 mvi r1,0
80053c8: e0 00 00 05 bi 80053dc <_CORE_RWLock_Obtain_for_reading+0xb0>
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
80053cc: 34 01 00 00 mvi r1,0
80053d0: 5e 01 00 05 bne r16,r1,80053e4 <_CORE_RWLock_Obtain_for_reading+0xb8>
_ISR_Enable( level );
80053d4: d0 0d 00 00 wcsr IE,r13
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
80053d8: 34 01 00 02 mvi r1,2
80053dc: 59 81 00 34 sw (r12+52),r1
return;
80053e0: e0 00 00 0d bi 8005414 <_CORE_RWLock_Obtain_for_reading+0xe8>
80053e4: 34 02 00 01 mvi r2,1
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
80053e8: 59 81 00 34 sw (r12+52),r1
80053ec: 59 62 00 30 sw (r11+48),r2
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
executing->Wait.id = id;
80053f0: 59 8f 00 20 sw (r12+32),r15
/*
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
80053f4: 59 8b 00 44 sw (r12+68),r11
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
80053f8: 59 81 00 30 sw (r12+48),r1
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
80053fc: d0 0d 00 00 wcsr IE,r13
_Thread_queue_Enqueue_with_handler(
8005400: 78 03 08 00 mvhi r3,0x800
8005404: b9 60 08 00 mv r1,r11
8005408: b9 c0 10 00 mv r2,r14
800540c: 38 63 55 c8 ori r3,r3,0x55c8
8005410: f8 00 07 1e calli 8007088 <_Thread_queue_Enqueue_with_handler>
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
8005414: 2b 9d 00 04 lw ra,(sp+4)
8005418: 2b 8b 00 1c lw r11,(sp+28)
800541c: 2b 8c 00 18 lw r12,(sp+24)
8005420: 2b 8d 00 14 lw r13,(sp+20)
8005424: 2b 8e 00 10 lw r14,(sp+16)
8005428: 2b 8f 00 0c lw r15,(sp+12)
800542c: 2b 90 00 08 lw r16,(sp+8)
8005430: 37 9c 00 1c addi sp,sp,28
8005434: c3 a0 00 00 ret
080054cc <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
80054cc: 37 9c ff f4 addi sp,sp,-12
80054d0: 5b 8b 00 0c sw (sp+12),r11
80054d4: 5b 8c 00 08 sw (sp+8),r12
80054d8: 5b 9d 00 04 sw (sp+4),ra
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
80054dc: 78 02 08 02 mvhi r2,0x802
80054e0: 38 42 19 38 ori r2,r2,0x1938
80054e4: 28 43 00 00 lw r3,(r2+0)
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
80054e8: b8 20 58 00 mv r11,r1
* Otherwise, we have to block.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
80054ec: 90 00 08 00 rcsr r1,IE
80054f0: 34 02 ff fe mvi r2,-2
80054f4: a0 22 10 00 and r2,r1,r2
80054f8: d0 02 00 00 wcsr IE,r2
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
80054fc: 29 62 00 44 lw r2,(r11+68)
8005500: 5c 40 00 05 bne r2,r0,8005514 <_CORE_RWLock_Release+0x48>
_ISR_Enable( level );
8005504: d0 01 00 00 wcsr IE,r1
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
8005508: 34 01 00 02 mvi r1,2
800550c: 58 61 00 34 sw (r3+52),r1
return CORE_RWLOCK_SUCCESSFUL;
8005510: e0 00 00 28 bi 80055b0 <_CORE_RWLock_Release+0xe4>
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
8005514: 34 04 00 01 mvi r4,1
8005518: 5c 44 00 07 bne r2,r4,8005534 <_CORE_RWLock_Release+0x68>
the_rwlock->number_of_readers -= 1;
800551c: 29 62 00 48 lw r2,(r11+72)
8005520: 34 42 ff ff addi r2,r2,-1
8005524: 59 62 00 48 sw (r11+72),r2
if ( the_rwlock->number_of_readers != 0 ) {
8005528: 44 40 00 03 be r2,r0,8005534 <_CORE_RWLock_Release+0x68>
/* must be unlocked again */
_ISR_Enable( level );
800552c: d0 01 00 00 wcsr IE,r1
return CORE_RWLOCK_SUCCESSFUL;
8005530: e0 00 00 20 bi 80055b0 <_CORE_RWLock_Release+0xe4>
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
8005534: 34 02 00 00 mvi r2,0
8005538: 58 62 00 34 sw (r3+52),r2
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
800553c: 59 62 00 44 sw (r11+68),r2
_ISR_Enable( level );
8005540: d0 01 00 00 wcsr IE,r1
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
8005544: b9 60 08 00 mv r1,r11
8005548: f8 00 06 63 calli 8006ed4 <_Thread_queue_Dequeue>
if ( next ) {
800554c: 44 20 00 19 be r1,r0,80055b0 <_CORE_RWLock_Release+0xe4>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
8005550: 28 22 00 30 lw r2,(r1+48)
8005554: 34 01 00 01 mvi r1,1
8005558: 5c 41 00 04 bne r2,r1,8005568 <_CORE_RWLock_Release+0x9c>
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
800555c: 34 01 00 02 mvi r1,2
8005560: 59 61 00 44 sw (r11+68),r1
return CORE_RWLOCK_SUCCESSFUL;
8005564: e0 00 00 13 bi 80055b0 <_CORE_RWLock_Release+0xe4>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
8005568: 29 62 00 48 lw r2,(r11+72)
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
800556c: 59 61 00 44 sw (r11+68),r1
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
8005570: b8 20 60 00 mv r12,r1
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
8005574: 34 42 00 01 addi r2,r2,1
8005578: 59 62 00 48 sw (r11+72),r2
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
800557c: b9 60 08 00 mv r1,r11
8005580: f8 00 07 b2 calli 8007448 <_Thread_queue_First>
8005584: b8 20 18 00 mv r3,r1
if ( !next ||
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
8005588: b8 20 10 00 mv r2,r1
800558c: b9 60 08 00 mv r1,r11
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
8005590: 44 60 00 08 be r3,r0,80055b0 <_CORE_RWLock_Release+0xe4>
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
8005594: 28 63 00 30 lw r3,(r3+48)
8005598: 44 6c 00 06 be r3,r12,80055b0 <_CORE_RWLock_Release+0xe4> <== NEVER TAKEN
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
800559c: 29 63 00 48 lw r3,(r11+72)
80055a0: 34 63 00 01 addi r3,r3,1
80055a4: 59 63 00 48 sw (r11+72),r3
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
80055a8: f8 00 07 60 calli 8007328 <_Thread_queue_Extract>
}
80055ac: e3 ff ff f4 bi 800557c <_CORE_RWLock_Release+0xb0>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
80055b0: 34 01 00 00 mvi r1,0
80055b4: 2b 9d 00 04 lw ra,(sp+4)
80055b8: 2b 8b 00 0c lw r11,(sp+12)
80055bc: 2b 8c 00 08 lw r12,(sp+8)
80055c0: 37 9c 00 0c addi sp,sp,12
80055c4: c3 a0 00 00 ret
080055c8 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
80055c8: 37 9c ff f8 addi sp,sp,-8
80055cc: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
80055d0: 37 82 00 08 addi r2,sp,8
80055d4: f8 00 05 33 calli 8006aa0 <_Thread_Get>
switch ( location ) {
80055d8: 2b 82 00 08 lw r2,(sp+8)
80055dc: 5c 40 00 07 bne r2,r0,80055f8 <_CORE_RWLock_Timeout+0x30> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
80055e0: f8 00 07 d5 calli 8007534 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
80055e4: 78 01 08 02 mvhi r1,0x802
80055e8: 38 21 18 7c ori r1,r1,0x187c
80055ec: 28 22 00 00 lw r2,(r1+0)
80055f0: 34 42 ff ff addi r2,r2,-1
80055f4: 58 22 00 00 sw (r1+0),r2
_Thread_Unnest_dispatch();
break;
}
}
80055f8: 2b 9d 00 04 lw ra,(sp+4)
80055fc: 37 9c 00 08 addi sp,sp,8
8005600: c3 a0 00 00 ret
08014ecc <_CORE_message_queue_Broadcast>:
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
8014ecc: 37 9c ff e4 addi sp,sp,-28
8014ed0: 5b 8b 00 1c sw (sp+28),r11
8014ed4: 5b 8c 00 18 sw (sp+24),r12
8014ed8: 5b 8d 00 14 sw (sp+20),r13
8014edc: 5b 8e 00 10 sw (sp+16),r14
8014ee0: 5b 8f 00 0c sw (sp+12),r15
8014ee4: 5b 90 00 08 sw (sp+8),r16
8014ee8: 5b 9d 00 04 sw (sp+4),ra
8014eec: b8 20 58 00 mv r11,r1
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
8014ef0: 28 21 00 4c lw r1,(r1+76)
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
8014ef4: b8 60 70 00 mv r14,r3
8014ef8: b8 40 80 00 mv r16,r2
8014efc: b8 c0 78 00 mv r15,r6
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
8014f00: 50 23 00 03 bgeu r1,r3,8014f0c <_CORE_message_queue_Broadcast+0x40><== ALWAYS TAKEN
8014f04: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
8014f08: e0 00 00 13 bi 8014f54 <_CORE_message_queue_Broadcast+0x88><== NOT EXECUTED
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
8014f0c: 29 63 00 48 lw r3,(r11+72)
8014f10: 34 01 00 00 mvi r1,0
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
8014f14: b8 60 68 00 mv r13,r3
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
8014f18: 44 61 00 08 be r3,r1,8014f38 <_CORE_message_queue_Broadcast+0x6c>
*count = 0;
8014f1c: 58 c1 00 00 sw (r6+0),r1
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
8014f20: e0 00 00 0d bi 8014f54 <_CORE_message_queue_Broadcast+0x88>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
8014f24: 29 81 00 2c lw r1,(r12+44)
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
8014f28: 35 ad 00 01 addi r13,r13,1
8014f2c: f8 00 2c 6e calli 80200e4 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
8014f30: 29 81 00 28 lw r1,(r12+40)
8014f34: 58 2e 00 00 sw (r1+0),r14
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
8014f38: b9 60 08 00 mv r1,r11
8014f3c: f8 00 0c 27 calli 8017fd8 <_Thread_queue_Dequeue>
8014f40: b8 20 60 00 mv r12,r1
8014f44: ba 00 10 00 mv r2,r16
8014f48: b9 c0 18 00 mv r3,r14
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
8014f4c: 5c 20 ff f6 bne r1,r0,8014f24 <_CORE_message_queue_Broadcast+0x58>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
8014f50: 59 ed 00 00 sw (r15+0),r13
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
8014f54: 2b 9d 00 04 lw ra,(sp+4)
8014f58: 2b 8b 00 1c lw r11,(sp+28)
8014f5c: 2b 8c 00 18 lw r12,(sp+24)
8014f60: 2b 8d 00 14 lw r13,(sp+20)
8014f64: 2b 8e 00 10 lw r14,(sp+16)
8014f68: 2b 8f 00 0c lw r15,(sp+12)
8014f6c: 2b 90 00 08 lw r16,(sp+8)
8014f70: 37 9c 00 1c addi sp,sp,28
8014f74: c3 a0 00 00 ret
0800d828 <_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
)
{
800d828: 37 9c ff e8 addi sp,sp,-24
800d82c: 5b 8b 00 18 sw (sp+24),r11
800d830: 5b 8c 00 14 sw (sp+20),r12
800d834: 5b 8d 00 10 sw (sp+16),r13
800d838: 5b 8e 00 0c sw (sp+12),r14
800d83c: 5b 8f 00 08 sw (sp+8),r15
800d840: 5b 9d 00 04 sw (sp+4),ra
800d844: 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;
800d848: 34 01 00 00 mvi r1,0
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
the_message_queue->notify_argument = the_argument;
800d84c: 59 61 00 64 sw (r11+100),r1
800d850: 59 61 00 48 sw (r11+72),r1
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
800d854: 59 61 00 60 sw (r11+96),r1
)
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
800d858: 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;
800d85c: 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)) {
800d860: 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
)
{
800d864: b8 60 68 00 mv r13,r3
800d868: 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)) {
800d86c: b8 80 60 00 mv r12,r4
800d870: 44 20 00 05 be r1,r0,800d884 <_CORE_message_queue_Initialize+0x5c>
allocated_message_size += sizeof(uint32_t);
800d874: 34 8c 00 04 addi r12,r4,4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
800d878: 34 01 ff fc mvi r1,-4
800d87c: a1 81 60 00 and r12,r12,r1
}
if (allocated_message_size < maximum_message_size)
800d880: 54 8c 00 1c bgu r4,r12,800d8f0 <_CORE_message_queue_Initialize+0xc8><== NEVER TAKEN
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
800d884: 35 8e 00 14 addi r14,r12,20
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
800d888: b9 c0 08 00 mv r1,r14
800d88c: b9 a0 10 00 mv r2,r13
800d890: f8 00 6a 94 calli 80282e0 <__mulsi3>
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
800d894: 55 81 00 17 bgu r12,r1,800d8f0 <_CORE_message_queue_Initialize+0xc8><== NEVER TAKEN
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
800d898: f8 00 0d f7 calli 8011074 <_Workspace_Allocate>
800d89c: 59 61 00 5c sw (r11+92),r1
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
800d8a0: 44 20 00 14 be r1,r0,800d8f0 <_CORE_message_queue_Initialize+0xc8>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
800d8a4: b8 20 10 00 mv r2,r1
800d8a8: b9 a0 18 00 mv r3,r13
800d8ac: b9 c0 20 00 mv r4,r14
800d8b0: 35 61 00 68 addi r1,r11,104
800d8b4: f8 00 18 89 calli 8013ad8 <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
800d8b8: 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);
800d8bc: 35 63 00 54 addi r3,r11,84
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
800d8c0: 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);
800d8c4: 59 63 00 50 sw (r11+80),r3
800d8c8: 64 42 00 01 cmpei r2,r2,1
the_chain->permanent_null = NULL;
800d8cc: 34 03 00 00 mvi r3,0
800d8d0: 59 63 00 54 sw (r11+84),r3
the_chain->last = _Chain_Head(the_chain);
800d8d4: 59 61 00 58 sw (r11+88),r1
800d8d8: 34 03 00 80 mvi r3,128
800d8dc: b9 60 08 00 mv r1,r11
800d8e0: 34 04 00 06 mvi r4,6
800d8e4: f8 00 0a 6d calli 8010298 <_Thread_queue_Initialize>
800d8e8: 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;
800d8ec: e0 00 00 02 bi 800d8f4 <_CORE_message_queue_Initialize+0xcc>
800d8f0: 34 01 00 00 mvi r1,0
}
800d8f4: 2b 9d 00 04 lw ra,(sp+4)
800d8f8: 2b 8b 00 18 lw r11,(sp+24)
800d8fc: 2b 8c 00 14 lw r12,(sp+20)
800d900: 2b 8d 00 10 lw r13,(sp+16)
800d904: 2b 8e 00 0c lw r14,(sp+12)
800d908: 2b 8f 00 08 lw r15,(sp+8)
800d90c: 37 9c 00 18 addi sp,sp,24
800d910: c3 a0 00 00 ret
0800d914 <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
800d914: 37 9c ff f0 addi sp,sp,-16
800d918: 5b 8b 00 10 sw (sp+16),r11
800d91c: 5b 8c 00 0c sw (sp+12),r12
800d920: 5b 8d 00 08 sw (sp+8),r13
800d924: 5b 9d 00 04 sw (sp+4),ra
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
800d928: 78 07 08 02 mvhi r7,0x802
800d92c: 38 e7 cb 08 ori r7,r7,0xcb08
800d930: 28 e7 00 00 lw r7,(r7+0)
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
800d934: 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;
800d938: 34 01 00 00 mvi r1,0
800d93c: 58 e1 00 34 sw (r7+52),r1
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
800d940: 20 a5 00 ff andi r5,r5,0xff
800d944: 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 );
800d948: 90 00 40 00 rcsr r8,IE
800d94c: 34 03 ff fe mvi r3,-2
800d950: a1 03 18 00 and r3,r8,r3
800d954: 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));
800d958: 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;
800d95c: 35 63 00 54 addi r3,r11,84
800d960: 5d 83 00 03 bne r12,r3,800d96c <_CORE_message_queue_Seize+0x58>
800d964: 34 0c 00 00 mvi r12,0
800d968: e0 00 00 28 bi 800da08 <_CORE_message_queue_Seize+0xf4>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
800d96c: 29 83 00 00 lw r3,(r12+0)
the_chain->first = new_first;
new_first->previous = _Chain_Head(the_chain);
800d970: 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;
800d974: 59 63 00 50 sw (r11+80),r3
new_first->previous = _Chain_Head(the_chain);
800d978: 58 69 00 04 sw (r3+4),r9
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
800d97c: 45 80 00 23 be r12,r0,800da08 <_CORE_message_queue_Seize+0xf4><== NEVER TAKEN
the_message_queue->number_of_pending_messages -= 1;
800d980: 29 62 00 48 lw r2,(r11+72)
800d984: 34 42 ff ff addi r2,r2,-1
800d988: 59 62 00 48 sw (r11+72),r2
_ISR_Enable( level );
800d98c: d0 08 00 00 wcsr IE,r8
*size_p = the_message->Contents.size;
800d990: 29 83 00 0c lw r3,(r12+12)
_Thread_Executing->Wait.count =
800d994: 78 02 08 02 mvhi r2,0x802
800d998: 38 42 cb 08 ori r2,r2,0xcb08
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;
800d99c: 58 83 00 00 sw (r4+0),r3
_Thread_Executing->Wait.count =
800d9a0: 29 84 00 08 lw r4,(r12+8)
800d9a4: 28 42 00 00 lw r2,(r2+0)
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
800d9a8: 35 8d 00 10 addi r13,r12,16
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
_ISR_Enable( level );
*size_p = the_message->Contents.size;
_Thread_Executing->Wait.count =
800d9ac: 58 44 00 24 sw (r2+36),r4
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
800d9b0: b9 a0 10 00 mv r2,r13
800d9b4: f8 00 28 1a calli 8017a1c <memcpy>
* is not, then we can go ahead and free the buffer.
*
* NOTE: If we note that the queue was not full before this receive,
* then we can avoid this dequeue.
*/
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
800d9b8: b9 60 08 00 mv r1,r11
800d9bc: f8 00 09 02 calli 800fdc4 <_Thread_queue_Dequeue>
800d9c0: b8 20 20 00 mv r4,r1
if ( !the_thread ) {
800d9c4: 5c 20 00 05 bne r1,r0,800d9d8 <_CORE_message_queue_Seize+0xc4>
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message
)
{
_Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
800d9c8: 35 61 00 68 addi r1,r11,104
800d9cc: b9 80 10 00 mv r2,r12
800d9d0: fb ff ff 66 calli 800d768 <_Chain_Append>
_CORE_message_queue_Free_message_buffer(
the_message_queue,
the_message
);
return;
800d9d4: e0 00 00 1e bi 800da4c <_CORE_message_queue_Seize+0x138>
*/
_CORE_message_queue_Set_message_priority(
the_message,
the_thread->Wait.count
);
the_message->Contents.size = (size_t) the_thread->Wait.option;
800d9d8: 28 23 00 30 lw r3,(r1+48)
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
800d9dc: 28 21 00 24 lw r1,(r1+36)
800d9e0: 59 83 00 0c sw (r12+12),r3
800d9e4: 59 81 00 08 sw (r12+8),r1
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
800d9e8: 28 82 00 2c lw r2,(r4+44)
800d9ec: b9 a0 08 00 mv r1,r13
800d9f0: f8 00 28 0b calli 8017a1c <memcpy>
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
800d9f4: 29 83 00 08 lw r3,(r12+8)
800d9f8: b9 60 08 00 mv r1,r11
800d9fc: b9 80 10 00 mv r2,r12
800da00: f8 00 18 44 calli 8013b10 <_CORE_message_queue_Insert_message>
the_message_queue,
the_message,
_CORE_message_queue_Get_message_priority( the_message )
);
return;
800da04: e0 00 00 12 bi 800da4c <_CORE_message_queue_Seize+0x138>
}
#endif
}
if ( !wait ) {
800da08: 5c ac 00 05 bne r5,r12,800da1c <_CORE_message_queue_Seize+0x108>
_ISR_Enable( level );
800da0c: d0 08 00 00 wcsr IE,r8
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
800da10: 34 01 00 04 mvi r1,4
800da14: 58 e1 00 34 sw (r7+52),r1
return;
800da18: e0 00 00 0d bi 800da4c <_CORE_message_queue_Seize+0x138>
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
800da1c: 34 03 00 01 mvi r3,1
800da20: 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;
800da24: 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;
800da28: 58 e2 00 20 sw (r7+32),r2
executing->Wait.return_argument_second.mutable_object = buffer;
800da2c: 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;
800da30: 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 );
800da34: d0 08 00 00 wcsr IE,r8
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
800da38: 78 03 08 01 mvhi r3,0x801
800da3c: b9 60 08 00 mv r1,r11
800da40: b8 c0 10 00 mv r2,r6
800da44: 38 63 03 78 ori r3,r3,0x378
800da48: f8 00 09 4c calli 800ff78 <_Thread_queue_Enqueue_with_handler>
}
800da4c: 2b 9d 00 04 lw ra,(sp+4)
800da50: 2b 8b 00 10 lw r11,(sp+16)
800da54: 2b 8c 00 0c lw r12,(sp+12)
800da58: 2b 8d 00 08 lw r13,(sp+8)
800da5c: 37 9c 00 10 addi sp,sp,16
800da60: c3 a0 00 00 ret
08004fc0 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
8004fc0: 37 9c ff e8 addi sp,sp,-24
8004fc4: 5b 8b 00 14 sw (sp+20),r11
8004fc8: 5b 8c 00 10 sw (sp+16),r12
8004fcc: 5b 8d 00 0c sw (sp+12),r13
8004fd0: 5b 8e 00 08 sw (sp+8),r14
8004fd4: 5b 9d 00 04 sw (sp+4),ra
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
8004fd8: 78 06 08 02 mvhi r6,0x802
8004fdc: 38 c6 59 44 ori r6,r6,0x5944
8004fe0: 28 c6 00 00 lw r6,(r6+0)
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
8004fe4: 5b 85 00 18 sw (sp+24),r5
8004fe8: b8 20 58 00 mv r11,r1
8004fec: b8 40 70 00 mv r14,r2
8004ff0: b8 80 68 00 mv r13,r4
8004ff4: 20 6c 00 ff andi r12,r3,0xff
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
8004ff8: 44 c0 00 0b be r6,r0,8005024 <_CORE_mutex_Seize+0x64>
8004ffc: 45 80 00 0a be r12,r0,8005024 <_CORE_mutex_Seize+0x64> <== NEVER TAKEN
8005000: 78 01 08 02 mvhi r1,0x802
8005004: 38 21 5a e0 ori r1,r1,0x5ae0
8005008: 28 21 00 00 lw r1,(r1+0)
800500c: 34 02 00 01 mvi r2,1
8005010: 50 41 00 05 bgeu r2,r1,8005024 <_CORE_mutex_Seize+0x64>
8005014: 34 01 00 00 mvi r1,0
8005018: b8 20 10 00 mv r2,r1
800501c: 34 03 00 13 mvi r3,19
8005020: f8 00 01 f2 calli 80057e8 <_Internal_error_Occurred>
8005024: b9 60 08 00 mv r1,r11
8005028: 37 82 00 18 addi r2,sp,24
800502c: f8 00 28 32 calli 800f0f4 <_CORE_mutex_Seize_interrupt_trylock>
8005030: 44 20 00 19 be r1,r0,8005094 <_CORE_mutex_Seize+0xd4>
8005034: 78 01 08 02 mvhi r1,0x802
8005038: 38 21 5a 00 ori r1,r1,0x5a00
800503c: 5d 80 00 07 bne r12,r0,8005058 <_CORE_mutex_Seize+0x98>
8005040: 2b 82 00 18 lw r2,(sp+24)
8005044: d0 02 00 00 wcsr IE,r2
8005048: 28 21 00 00 lw r1,(r1+0)
800504c: 34 02 00 01 mvi r2,1
8005050: 58 22 00 34 sw (r1+52),r2
8005054: e0 00 00 10 bi 8005094 <_CORE_mutex_Seize+0xd4>
8005058: 28 23 00 00 lw r3,(r1+0)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
800505c: 78 01 08 02 mvhi r1,0x802
8005060: 38 21 59 44 ori r1,r1,0x5944
8005064: 58 6e 00 20 sw (r3+32),r14
8005068: 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;
800506c: 34 04 00 01 mvi r4,1
8005070: 59 64 00 30 sw (r11+48),r4
8005074: b4 44 10 00 add r2,r2,r4
8005078: 58 22 00 00 sw (r1+0),r2
800507c: 58 6b 00 44 sw (r3+68),r11
8005080: 2b 81 00 18 lw r1,(sp+24)
8005084: d0 01 00 00 wcsr IE,r1
8005088: b9 60 08 00 mv r1,r11
800508c: b9 a0 10 00 mv r2,r13
8005090: fb ff ff ab calli 8004f3c <_CORE_mutex_Seize_interrupt_blocking>
}
8005094: 2b 9d 00 04 lw ra,(sp+4)
8005098: 2b 8b 00 14 lw r11,(sp+20)
800509c: 2b 8c 00 10 lw r12,(sp+16)
80050a0: 2b 8d 00 0c lw r13,(sp+12)
80050a4: 2b 8e 00 08 lw r14,(sp+8)
80050a8: 37 9c 00 18 addi sp,sp,24
80050ac: c3 a0 00 00 ret
08005240 <_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
)
{
8005240: 37 9c ff f8 addi sp,sp,-8
8005244: 5b 8b 00 08 sw (sp+8),r11
8005248: 5b 9d 00 04 sw (sp+4),ra
800524c: 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)) ) {
8005250: f8 00 06 92 calli 8006c98 <_Thread_queue_Dequeue>
8005254: 34 02 00 00 mvi r2,0
8005258: 5c 22 00 0e bne r1,r2,8005290 <_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 );
800525c: 90 00 08 00 rcsr r1,IE
8005260: 34 02 ff fe mvi r2,-2
8005264: a0 22 10 00 and r2,r1,r2
8005268: d0 02 00 00 wcsr IE,r2
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
800526c: 29 62 00 48 lw r2,(r11+72)
8005270: 29 63 00 40 lw r3,(r11+64)
8005274: 54 62 00 03 bgu r3,r2,8005280 <_CORE_semaphore_Surrender+0x40><== ALWAYS TAKEN
8005278: 34 02 00 04 mvi r2,4 <== NOT EXECUTED
800527c: e0 00 00 04 bi 800528c <_CORE_semaphore_Surrender+0x4c> <== NOT EXECUTED
the_semaphore->count += 1;
8005280: 34 42 00 01 addi r2,r2,1
8005284: 59 62 00 48 sw (r11+72),r2
8005288: 34 02 00 00 mvi r2,0
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
800528c: d0 01 00 00 wcsr IE,r1
}
return status;
}
8005290: b8 40 08 00 mv r1,r2
8005294: 2b 9d 00 04 lw ra,(sp+4)
8005298: 2b 8b 00 08 lw r11,(sp+8)
800529c: 37 9c 00 08 addi sp,sp,8
80052a0: c3 a0 00 00 ret
0800e1dc <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
800e1dc: 37 9c ff f8 addi sp,sp,-8
800e1e0: 5b 8b 00 08 sw (sp+8),r11
800e1e4: 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;
800e1e8: 78 05 08 02 mvhi r5,0x802
800e1ec: 38 a5 5a 00 ori r5,r5,0x5a00
800e1f0: 28 ab 00 00 lw r11,(r5+0)
executing->Wait.return_code = RTEMS_SUCCESSFUL;
800e1f4: 34 05 00 00 mvi r5,0
800e1f8: 59 65 00 34 sw (r11+52),r5
api = executing->API_Extensions[ THREAD_API_RTEMS ];
800e1fc: 29 67 01 28 lw r7,(r11+296)
_ISR_Disable( level );
800e200: 90 00 30 00 rcsr r6,IE
800e204: 34 05 ff fe mvi r5,-2
800e208: a0 c5 28 00 and r5,r6,r5
800e20c: d0 05 00 00 wcsr IE,r5
pending_events = api->pending_events;
800e210: 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 );
800e214: a0 28 28 00 and r5,r1,r8
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
800e218: 44 a0 00 09 be r5,r0,800e23c <_Event_Seize+0x60>
800e21c: 44 a1 00 03 be r5,r1,800e228 <_Event_Seize+0x4c>
800e220: 20 49 00 02 andi r9,r2,0x2
800e224: 45 20 00 06 be r9,r0,800e23c <_Event_Seize+0x60> <== NEVER TAKEN
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
800e228: a4 a0 08 00 not r1,r5
800e22c: a0 28 40 00 and r8,r1,r8
800e230: 58 e8 00 00 sw (r7+0),r8
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
800e234: d0 06 00 00 wcsr IE,r6
800e238: e0 00 00 06 bi 800e250 <_Event_Seize+0x74>
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
800e23c: 20 47 00 01 andi r7,r2,0x1
800e240: 44 e0 00 06 be r7,r0,800e258 <_Event_Seize+0x7c>
_ISR_Enable( level );
800e244: d0 06 00 00 wcsr IE,r6
executing->Wait.return_code = RTEMS_UNSATISFIED;
800e248: 34 01 00 0d mvi r1,13
800e24c: 59 61 00 34 sw (r11+52),r1
*event_out = seized_events;
800e250: 58 85 00 00 sw (r4+0),r5
return;
800e254: e0 00 00 29 bi 800e2f8 <_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;
800e258: 78 05 08 02 mvhi r5,0x802
800e25c: 38 a5 62 ec ori r5,r5,0x62ec
800e260: 34 07 00 01 mvi r7,1
800e264: 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;
800e268: 59 62 00 30 sw (r11+48),r2
executing->Wait.count = (uint32_t) event_in;
800e26c: 59 61 00 24 sw (r11+36),r1
executing->Wait.return_argument = event_out;
800e270: 59 64 00 28 sw (r11+40),r4
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
800e274: d0 06 00 00 wcsr IE,r6
if ( ticks ) {
800e278: 34 04 00 00 mvi r4,0
800e27c: 44 64 00 0d be r3,r4,800e2b0 <_Event_Seize+0xd4>
_Watchdog_Initialize(
800e280: 29 65 00 08 lw r5,(r11+8)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
800e284: 78 02 08 00 mvhi r2,0x800
800e288: 38 42 e4 c4 ori r2,r2,0xe4c4
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
800e28c: 78 01 08 02 mvhi r1,0x802
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
800e290: 59 62 00 64 sw (r11+100),r2
the_watchdog->id = id;
800e294: 59 65 00 68 sw (r11+104),r5
the_watchdog->user_data = user_data;
800e298: 59 64 00 6c sw (r11+108),r4
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
800e29c: 59 63 00 54 sw (r11+84),r3
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
800e2a0: 59 64 00 50 sw (r11+80),r4
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
800e2a4: 38 21 5a 20 ori r1,r1,0x5a20
800e2a8: 35 62 00 48 addi r2,r11,72
800e2ac: fb ff e6 09 calli 8007ad0 <_Watchdog_Insert>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
800e2b0: b9 60 08 00 mv r1,r11
800e2b4: 34 02 01 00 mvi r2,256
800e2b8: fb ff e4 12 calli 8007300 <_Thread_Set_state>
_ISR_Disable( level );
800e2bc: 90 00 18 00 rcsr r3,IE
800e2c0: 34 01 ff fe mvi r1,-2
800e2c4: a0 61 08 00 and r1,r3,r1
800e2c8: d0 01 00 00 wcsr IE,r1
sync_state = _Event_Sync_state;
800e2cc: 78 02 08 02 mvhi r2,0x802
800e2d0: 38 42 62 ec ori r2,r2,0x62ec
800e2d4: 28 41 00 00 lw r1,(r2+0)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
800e2d8: 34 04 00 00 mvi r4,0
800e2dc: 58 44 00 00 sw (r2+0),r4
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
800e2e0: 34 02 00 01 mvi r2,1
800e2e4: 5c 22 00 03 bne r1,r2,800e2f0 <_Event_Seize+0x114>
_ISR_Enable( level );
800e2e8: d0 03 00 00 wcsr IE,r3
return;
800e2ec: e0 00 00 03 bi 800e2f8 <_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 );
800e2f0: b9 60 10 00 mv r2,r11
800e2f4: f8 00 05 b5 calli 800f9c8 <_Thread_blocking_operation_Cancel>
}
800e2f8: 2b 9d 00 04 lw ra,(sp+4)
800e2fc: 2b 8b 00 08 lw r11,(sp+8)
800e300: 37 9c 00 08 addi sp,sp,8
800e304: c3 a0 00 00 ret
0800e370 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
800e370: 37 9c ff f8 addi sp,sp,-8
800e374: 5b 8b 00 08 sw (sp+8),r11
800e378: 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 ];
800e37c: 28 24 01 28 lw r4,(r1+296)
option_set = (rtems_option) the_thread->Wait.option;
800e380: 28 28 00 30 lw r8,(r1+48)
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
800e384: 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 );
800e388: 90 00 08 00 rcsr r1,IE
800e38c: 34 07 ff fe mvi r7,-2
800e390: a0 27 38 00 and r7,r1,r7
800e394: d0 07 00 00 wcsr IE,r7
pending_events = api->pending_events;
800e398: 28 85 00 00 lw r5,(r4+0)
event_condition = (rtems_event_set) the_thread->Wait.count;
800e39c: 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 );
800e3a0: 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 ) ) {
800e3a4: 5c 40 00 03 bne r2,r0,800e3b0 <_Event_Surrender+0x40>
_ISR_Enable( level );
800e3a8: d0 01 00 00 wcsr IE,r1
return;
800e3ac: e0 00 00 42 bi 800e4b4 <_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() &&
800e3b0: 78 03 08 02 mvhi r3,0x802
800e3b4: 38 63 59 dc ori r3,r3,0x59dc
800e3b8: 28 63 00 00 lw r3,(r3+0)
800e3bc: 44 60 00 1d be r3,r0,800e430 <_Event_Surrender+0xc0>
800e3c0: 78 03 08 02 mvhi r3,0x802
800e3c4: 38 63 5a 00 ori r3,r3,0x5a00
800e3c8: 28 63 00 00 lw r3,(r3+0)
800e3cc: 5d 63 00 19 bne r11,r3,800e430 <_Event_Surrender+0xc0>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
800e3d0: 78 03 08 02 mvhi r3,0x802
800e3d4: 38 63 62 ec ori r3,r3,0x62ec
800e3d8: 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() &&
800e3dc: 34 09 00 02 mvi r9,2
800e3e0: 45 49 00 04 be r10,r9,800e3f0 <_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)) ) {
800e3e4: 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() &&
800e3e8: 34 03 00 01 mvi r3,1
800e3ec: 5d 23 00 11 bne r9,r3,800e430 <_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) ) {
800e3f0: 44 46 00 03 be r2,r6,800e3fc <_Event_Surrender+0x8c> <== ALWAYS TAKEN
800e3f4: 21 08 00 02 andi r8,r8,0x2 <== NOT EXECUTED
800e3f8: 45 00 00 0c be r8,r0,800e428 <_Event_Surrender+0xb8> <== NOT EXECUTED
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
800e3fc: a4 40 18 00 not r3,r2
800e400: a0 65 28 00 and r5,r3,r5
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800e404: 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 );
800e408: 58 85 00 00 sw (r4+0),r5
the_thread->Wait.count = 0;
800e40c: 34 04 00 00 mvi r4,0
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
800e410: 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;
800e414: 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;
800e418: 38 63 62 ec ori r3,r3,0x62ec
((_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;
800e41c: 58 c2 00 00 sw (r6+0),r2
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
800e420: 34 02 00 03 mvi r2,3
800e424: 58 62 00 00 sw (r3+0),r2
}
_ISR_Enable( level );
800e428: d0 01 00 00 wcsr IE,r1
return;
800e42c: e0 00 00 22 bi 800e4b4 <_Event_Surrender+0x144>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
800e430: 29 63 00 10 lw r3,(r11+16)
800e434: 20 63 01 00 andi r3,r3,0x100
800e438: 44 60 00 1e be r3,r0,800e4b0 <_Event_Surrender+0x140>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
800e43c: 44 46 00 03 be r2,r6,800e448 <_Event_Surrender+0xd8>
800e440: 21 08 00 02 andi r8,r8,0x2
800e444: 45 00 00 1b be r8,r0,800e4b0 <_Event_Surrender+0x140> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
800e448: a4 40 18 00 not r3,r2
800e44c: a0 65 28 00 and r5,r3,r5
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800e450: 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 );
800e454: 58 85 00 00 sw (r4+0),r5
the_thread->Wait.count = 0;
800e458: 34 03 00 00 mvi r3,0
800e45c: 59 63 00 24 sw (r11+36),r3
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800e460: 58 c2 00 00 sw (r6+0),r2
_ISR_Flash( level );
800e464: d0 01 00 00 wcsr IE,r1
800e468: d0 07 00 00 wcsr IE,r7
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
800e46c: 29 63 00 50 lw r3,(r11+80)
800e470: 34 02 00 02 mvi r2,2
800e474: 44 62 00 05 be r3,r2,800e488 <_Event_Surrender+0x118>
_ISR_Enable( level );
800e478: d0 01 00 00 wcsr IE,r1
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
800e47c: 78 02 10 03 mvhi r2,0x1003
800e480: b9 60 08 00 mv r1,r11
800e484: e0 00 00 08 bi 800e4a4 <_Event_Surrender+0x134>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
800e488: 34 02 00 03 mvi r2,3
800e48c: 59 62 00 50 sw (r11+80),r2
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
800e490: d0 01 00 00 wcsr IE,r1
(void) _Watchdog_Remove( &the_thread->Timer );
800e494: 35 61 00 48 addi r1,r11,72
800e498: fb ff e5 ed calli 8007c4c <_Watchdog_Remove>
800e49c: b9 60 08 00 mv r1,r11
800e4a0: 78 02 10 03 mvhi r2,0x1003
800e4a4: 38 42 ff f8 ori r2,r2,0xfff8
800e4a8: f8 00 05 60 calli 800fa28 <_Thread_Clear_state>
800e4ac: e0 00 00 02 bi 800e4b4 <_Event_Surrender+0x144>
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
800e4b0: d0 01 00 00 wcsr IE,r1
}
800e4b4: 2b 9d 00 04 lw ra,(sp+4)
800e4b8: 2b 8b 00 08 lw r11,(sp+8)
800e4bc: 37 9c 00 08 addi sp,sp,8
800e4c0: c3 a0 00 00 ret
0800e4c4 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
800e4c4: 37 9c ff f8 addi sp,sp,-8
800e4c8: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
800e4cc: 37 82 00 08 addi r2,sp,8
800e4d0: fb ff e0 e5 calli 8006864 <_Thread_Get>
switch ( location ) {
800e4d4: 2b 82 00 08 lw r2,(sp+8)
800e4d8: 5c 40 00 1d bne r2,r0,800e54c <_Event_Timeout+0x88> <== 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 );
800e4dc: 90 00 18 00 rcsr r3,IE
800e4e0: 34 02 ff fe mvi r2,-2
800e4e4: a0 62 10 00 and r2,r3,r2
800e4e8: d0 02 00 00 wcsr IE,r2
return;
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
800e4ec: 78 02 08 02 mvhi r2,0x802
800e4f0: 38 42 5a 00 ori r2,r2,0x5a00
800e4f4: 28 42 00 00 lw r2,(r2+0)
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
800e4f8: 34 04 00 00 mvi r4,0
800e4fc: 58 24 00 24 sw (r1+36),r4
if ( _Thread_Is_executing( the_thread ) ) {
800e500: 5c 22 00 08 bne r1,r2,800e520 <_Event_Timeout+0x5c> <== ALWAYS TAKEN
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
800e504: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
800e508: 38 42 62 ec ori r2,r2,0x62ec <== NOT EXECUTED
800e50c: 28 45 00 00 lw r5,(r2+0) <== NOT EXECUTED
800e510: 34 04 00 01 mvi r4,1 <== NOT EXECUTED
800e514: 5c a4 00 03 bne r5,r4,800e520 <_Event_Timeout+0x5c> <== NOT EXECUTED
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
800e518: 34 04 00 02 mvi r4,2 <== NOT EXECUTED
800e51c: 58 44 00 00 sw (r2+0),r4 <== NOT EXECUTED
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
800e520: 34 02 00 06 mvi r2,6
800e524: 58 22 00 34 sw (r1+52),r2
_ISR_Enable( level );
800e528: d0 03 00 00 wcsr IE,r3
800e52c: 78 02 10 03 mvhi r2,0x1003
800e530: 38 42 ff f8 ori r2,r2,0xfff8
800e534: f8 00 05 3d calli 800fa28 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
800e538: 78 01 08 02 mvhi r1,0x802
800e53c: 38 21 59 44 ori r1,r1,0x5944
800e540: 28 22 00 00 lw r2,(r1+0)
800e544: 34 42 ff ff addi r2,r2,-1
800e548: 58 22 00 00 sw (r1+0),r2
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
800e54c: 2b 9d 00 04 lw ra,(sp+4)
800e550: 37 9c 00 08 addi sp,sp,8
800e554: c3 a0 00 00 ret
0800f2d8 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
800f2d8: 37 9c ff b4 addi sp,sp,-76
800f2dc: 5b 8b 00 44 sw (sp+68),r11
800f2e0: 5b 8c 00 40 sw (sp+64),r12
800f2e4: 5b 8d 00 3c sw (sp+60),r13
800f2e8: 5b 8e 00 38 sw (sp+56),r14
800f2ec: 5b 8f 00 34 sw (sp+52),r15
800f2f0: 5b 90 00 30 sw (sp+48),r16
800f2f4: 5b 91 00 2c sw (sp+44),r17
800f2f8: 5b 92 00 28 sw (sp+40),r18
800f2fc: 5b 93 00 24 sw (sp+36),r19
800f300: 5b 94 00 20 sw (sp+32),r20
800f304: 5b 95 00 1c sw (sp+28),r21
800f308: 5b 96 00 18 sw (sp+24),r22
800f30c: 5b 97 00 14 sw (sp+20),r23
800f310: 5b 98 00 10 sw (sp+16),r24
800f314: 5b 99 00 0c sw (sp+12),r25
800f318: 5b 9b 00 08 sw (sp+8),fp
800f31c: 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;
800f320: 34 55 00 04 addi r21,r2,4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
800f324: b8 40 68 00 mv r13,r2
800f328: b8 20 60 00 mv r12,r1
800f32c: b8 60 78 00 mv r15,r3
800f330: 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;
800f334: 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;
800f338: 28 33 00 10 lw r19,(r1+16)
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
800f33c: 54 55 00 59 bgu r2,r21,800f4a0 <_Heap_Allocate_aligned_with_boundary+0x1c8>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
800f340: 44 80 00 04 be r4,r0,800f350 <_Heap_Allocate_aligned_with_boundary+0x78>
if ( boundary < alloc_size ) {
800f344: 54 44 00 57 bgu r2,r4,800f4a0 <_Heap_Allocate_aligned_with_boundary+0x1c8>
return NULL;
}
if ( alignment == 0 ) {
800f348: 5c 60 00 02 bne r3,r0,800f350 <_Heap_Allocate_aligned_with_boundary+0x78>
800f34c: 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;
800f350: 34 01 00 04 mvi r1,4
800f354: c8 2d 08 00 sub r1,r1,r13
800f358: 5b 81 00 4c sw (sp+76),r1
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
800f35c: 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;
800f360: 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;
800f364: 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;
800f368: 34 18 ff f8 mvi r24,-8
800f36c: e0 00 00 3d bi 800f460 <_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 ) {
800f370: 29 d0 00 04 lw r16,(r14+4)
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
800f374: 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 ) {
800f378: 52 b0 00 39 bgeu r21,r16,800f45c <_Heap_Allocate_aligned_with_boundary+0x184>
800f37c: 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;
800f380: ba 80 58 00 mv r11,r20
if ( alignment == 0 ) {
800f384: 45 e0 00 35 be r15,r0,800f458 <_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;
800f388: 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;
800f38c: 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;
800f390: 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;
800f394: 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;
800f398: 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;
800f39c: 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);
800f3a0: b9 60 08 00 mv r1,r11
800f3a4: b9 e0 10 00 mv r2,r15
800f3a8: b4 70 80 00 add r16,r3,r16
800f3ac: f8 00 4a 82 calli 8021db4 <__umodsi3>
800f3b0: 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 ) {
800f3b4: 52 0b 00 05 bgeu r16,r11,800f3c8 <_Heap_Allocate_aligned_with_boundary+0xf0>
800f3b8: ba 00 08 00 mv r1,r16
800f3bc: b9 e0 10 00 mv r2,r15
800f3c0: f8 00 4a 7d calli 8021db4 <__umodsi3>
800f3c4: ca 01 58 00 sub r11,r16,r1
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
800f3c8: 46 40 00 19 be r18,r0,800f42c <_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;
800f3cc: b5 6d 80 00 add r16,r11,r13
800f3d0: ba 00 08 00 mv r1,r16
800f3d4: ba 40 10 00 mv r2,r18
800f3d8: f8 00 4a 77 calli 8021db4 <__umodsi3>
800f3dc: ca 01 18 00 sub r3,r16,r1
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
800f3e0: b6 8d 20 00 add r4,r20,r13
800f3e4: e0 00 00 0b bi 800f410 <_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 ) {
800f3e8: 54 83 00 1d bgu r4,r3,800f45c <_Heap_Allocate_aligned_with_boundary+0x184>
800f3ec: 5b 84 00 48 sw (sp+72),r4
800f3f0: f8 00 4a 71 calli 8021db4 <__umodsi3>
800f3f4: 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;
800f3f8: b5 6d 80 00 add r16,r11,r13
800f3fc: ba 00 08 00 mv r1,r16
800f400: ba 40 10 00 mv r2,r18
800f404: f8 00 4a 6c calli 8021db4 <__umodsi3>
800f408: 2b 84 00 48 lw r4,(sp+72)
800f40c: 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 ) {
800f410: f6 03 80 00 cmpgu r16,r16,r3
800f414: f4 6b 28 00 cmpgu r5,r3,r11
if ( boundary_line < boundary_floor ) {
return 0;
}
alloc_begin = boundary_line - alloc_size;
800f418: 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 ) {
800f41c: a2 05 80 00 and r16,r16,r5
800f420: b9 e0 10 00 mv r2,r15
800f424: ba e0 08 00 mv r1,r23
800f428: 5e 00 ff f0 bne r16,r0,800f3e8 <_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 ) {
800f42c: 56 8b 00 0c bgu r20,r11,800f45c <_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;
800f430: cb 0e 80 00 sub r16,r24,r14
800f434: b9 60 08 00 mv r1,r11
800f438: ba 60 10 00 mv r2,r19
800f43c: b6 0b 80 00 add r16,r16,r11
800f440: f8 00 4a 5d calli 8021db4 <__umodsi3>
800f444: ca 01 08 00 sub r1,r16,r1
if ( free_size >= min_block_size || free_size == 0 ) {
800f448: f0 36 b0 00 cmpgeu r22,r1,r22
800f44c: 64 21 00 00 cmpei r1,r1,0
800f450: b8 36 08 00 or r1,r1,r22
800f454: 44 20 00 02 be r1,r0,800f45c <_Heap_Allocate_aligned_with_boundary+0x184>
boundary
);
}
}
if ( alloc_begin != 0 ) {
800f458: 5d 60 00 05 bne r11,r0,800f46c <_Heap_Allocate_aligned_with_boundary+0x194><== ALWAYS TAKEN
break;
}
block = block->next;
800f45c: 29 ce 00 08 lw r14,(r14+8)
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
800f460: 5d cc ff c4 bne r14,r12,800f370 <_Heap_Allocate_aligned_with_boundary+0x98>
800f464: 34 0b 00 00 mvi r11,0
800f468: e0 00 00 09 bi 800f48c <_Heap_Allocate_aligned_with_boundary+0x1b4>
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
800f46c: 29 81 00 4c lw r1,(r12+76)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
800f470: b9 c0 10 00 mv r2,r14
800f474: b9 a0 20 00 mv r4,r13
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
800f478: b4 31 08 00 add r1,r1,r17
800f47c: 59 81 00 4c sw (r12+76),r1
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
800f480: b9 60 18 00 mv r3,r11
800f484: b9 80 08 00 mv r1,r12
800f488: fb ff d8 76 calli 8005660 <_Heap_Block_allocate>
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
800f48c: 29 81 00 44 lw r1,(r12+68)
800f490: 50 31 00 02 bgeu r1,r17,800f498 <_Heap_Allocate_aligned_with_boundary+0x1c0>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
800f494: 59 91 00 44 sw (r12+68),r17
}
return (void *) alloc_begin;
800f498: b9 60 08 00 mv r1,r11
800f49c: e0 00 00 02 bi 800f4a4 <_Heap_Allocate_aligned_with_boundary+0x1cc>
800f4a0: 34 01 00 00 mvi r1,0
}
800f4a4: 2b 9d 00 04 lw ra,(sp+4)
800f4a8: 2b 8b 00 44 lw r11,(sp+68)
800f4ac: 2b 8c 00 40 lw r12,(sp+64)
800f4b0: 2b 8d 00 3c lw r13,(sp+60)
800f4b4: 2b 8e 00 38 lw r14,(sp+56)
800f4b8: 2b 8f 00 34 lw r15,(sp+52)
800f4bc: 2b 90 00 30 lw r16,(sp+48)
800f4c0: 2b 91 00 2c lw r17,(sp+44)
800f4c4: 2b 92 00 28 lw r18,(sp+40)
800f4c8: 2b 93 00 24 lw r19,(sp+36)
800f4cc: 2b 94 00 20 lw r20,(sp+32)
800f4d0: 2b 95 00 1c lw r21,(sp+28)
800f4d4: 2b 96 00 18 lw r22,(sp+24)
800f4d8: 2b 97 00 14 lw r23,(sp+20)
800f4dc: 2b 98 00 10 lw r24,(sp+16)
800f4e0: 2b 99 00 0c lw r25,(sp+12)
800f4e4: 2b 9b 00 08 lw fp,(sp+8)
800f4e8: 37 9c 00 4c addi sp,sp,76
800f4ec: c3 a0 00 00 ret
0800ecd8 <_Heap_Extend>:
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
800ecd8: 37 9c ff e8 addi sp,sp,-24
800ecdc: 5b 8b 00 18 sw (sp+24),r11
800ece0: 5b 8c 00 14 sw (sp+20),r12
800ece4: 5b 8d 00 10 sw (sp+16),r13
800ece8: 5b 8e 00 0c sw (sp+12),r14
800ecec: 5b 8f 00 08 sw (sp+8),r15
800ecf0: 5b 9d 00 04 sw (sp+4),ra
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
800ecf4: 28 2d 00 18 lw r13,(r1+24)
uintptr_t const heap_area_end = heap->area_end;
800ecf8: 28 25 00 1c lw r5,(r1+28)
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
800ecfc: b8 20 58 00 mv r11,r1
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
800ed00: f0 4d 68 00 cmpgeu r13,r2,r13
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
800ed04: f4 a2 08 00 cmpgu r1,r5,r2
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
800ed08: b8 80 78 00 mv r15,r4
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
800ed0c: a0 2d 68 00 and r13,r1,r13
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
uintptr_t extend_size = 0;
Heap_Block *const last_block = heap->last_block;
800ed10: 29 6c 00 24 lw r12,(r11+36)
uintptr_t *amount_extended
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
800ed14: 34 01 00 01 mvi r1,1
800ed18: 5d a0 00 26 bne r13,r0,800edb0 <_Heap_Extend+0xd8>
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
return HEAP_EXTEND_ERROR; /* case 3 */
} else if ( area_begin != heap_area_end ) {
800ed1c: 34 01 00 02 mvi r1,2
800ed20: 5c 45 00 24 bne r2,r5,800edb0 <_Heap_Extend+0xd8>
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
800ed24: b4 62 18 00 add r3,r3,r2
* block and free it.
*/
heap->area_end = new_heap_area_end;
extend_size = new_heap_area_end
800ed28: c8 6c 70 00 sub r14,r3,r12
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
800ed2c: 29 62 00 10 lw r2,(r11+16)
800ed30: 35 ce ff f8 addi r14,r14,-8
* Currently only case 4 should make it to this point.
* The basic trick is to make the extend area look like a used
* block and free it.
*/
heap->area_end = new_heap_area_end;
800ed34: 59 63 00 1c sw (r11+28),r3
800ed38: b9 c0 08 00 mv r1,r14
800ed3c: fb ff d5 8b calli 8004368 <__umodsi3>
800ed40: c9 c1 08 00 sub r1,r14,r1
extend_size = new_heap_area_end
- (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE;
extend_size = _Heap_Align_down( extend_size, heap->page_size );
*amount_extended = extend_size;
800ed44: 59 e1 00 00 sw (r15+0),r1
if( extend_size >= heap->min_block_size ) {
800ed48: 29 62 00 14 lw r2,(r11+20)
800ed4c: 50 22 00 02 bgeu r1,r2,800ed54 <_Heap_Extend+0x7c> <== ALWAYS TAKEN
800ed50: e0 00 00 17 bi 800edac <_Heap_Extend+0xd4> <== NOT EXECUTED
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
800ed54: 29 84 00 04 lw r4,(r12+4)
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
800ed58: 29 63 00 20 lw r3,(r11+32)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
800ed5c: b4 2c 10 00 add r2,r1,r12
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
800ed60: 20 84 00 01 andi r4,r4,0x1
800ed64: b8 24 20 00 or r4,r1,r4
800ed68: c8 62 18 00 sub r3,r3,r2
800ed6c: 59 84 00 04 sw (r12+4),r4
800ed70: 38 63 00 01 ori r3,r3,0x1
800ed74: 58 43 00 04 sw (r2+4),r3
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
800ed78: 29 65 00 2c lw r5,(r11+44)
++stats->used_blocks;
800ed7c: 29 64 00 40 lw r4,(r11+64)
--stats->frees; /* Do not count subsequent call as actual free() */
800ed80: 29 63 00 50 lw r3,(r11+80)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
800ed84: b4 a1 08 00 add r1,r5,r1
++stats->used_blocks;
800ed88: 34 84 00 01 addi r4,r4,1
--stats->frees; /* Do not count subsequent call as actual free() */
800ed8c: 34 63 ff ff addi r3,r3,-1
new_last_block->size_and_flag =
((uintptr_t) heap->first_block - (uintptr_t) new_last_block)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
800ed90: 59 62 00 24 sw (r11+36),r2
/* Statistics */
stats->size += extend_size;
800ed94: 59 61 00 2c sw (r11+44),r1
++stats->used_blocks;
800ed98: 59 64 00 40 sw (r11+64),r4
--stats->frees; /* Do not count subsequent call as actual free() */
800ed9c: 59 63 00 50 sw (r11+80),r3
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
800eda0: b9 60 08 00 mv r1,r11
800eda4: 35 82 00 08 addi r2,r12,8
800eda8: fb ff e5 74 calli 8008378 <_Heap_Free>
800edac: b9 a0 08 00 mv r1,r13
}
return HEAP_EXTEND_SUCCESSFUL;
}
800edb0: 2b 9d 00 04 lw ra,(sp+4)
800edb4: 2b 8b 00 18 lw r11,(sp+24)
800edb8: 2b 8c 00 14 lw r12,(sp+20)
800edbc: 2b 8d 00 10 lw r13,(sp+16)
800edc0: 2b 8e 00 0c lw r14,(sp+12)
800edc4: 2b 8f 00 08 lw r15,(sp+8)
800edc8: 37 9c 00 18 addi sp,sp,24
800edcc: c3 a0 00 00 ret
0800f4f0 <_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 )
{
800f4f0: 37 9c ff f4 addi sp,sp,-12
800f4f4: 5b 8b 00 0c sw (sp+12),r11
800f4f8: 5b 8c 00 08 sw (sp+8),r12
800f4fc: 5b 9d 00 04 sw (sp+4),ra
800f500: 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 )
800f504: 28 22 00 10 lw r2,(r1+16)
800f508: b8 20 58 00 mv r11,r1
800f50c: b8 60 08 00 mv r1,r3
800f510: 34 6c ff f8 addi r12,r3,-8
800f514: f8 00 4a 28 calli 8021db4 <__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;
800f518: 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 )
800f51c: 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
800f520: 50 26 00 03 bgeu r1,r6,800f52c <_Heap_Free+0x3c>
800f524: 34 02 00 00 mvi r2,0
800f528: e0 00 00 03 bi 800f534 <_Heap_Free+0x44>
800f52c: 29 62 00 24 lw r2,(r11+36)
800f530: 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 ) ) {
800f534: 44 40 00 66 be r2,r0,800f6cc <_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;
800f538: 28 25 00 04 lw r5,(r1+4)
800f53c: 34 02 ff fe mvi r2,-2
800f540: 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);
800f544: 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
800f548: 50 66 00 03 bgeu r3,r6,800f554 <_Heap_Free+0x64> <== ALWAYS TAKEN
800f54c: 34 04 00 00 mvi r4,0 <== NOT EXECUTED
800f550: e0 00 00 03 bi 800f55c <_Heap_Free+0x6c> <== NOT EXECUTED
800f554: 29 64 00 24 lw r4,(r11+36)
800f558: 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 ) ) {
800f55c: 44 80 00 5c be r4,r0,800f6cc <_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;
800f560: 28 64 00 04 lw r4,(r3+4)
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
800f564: 20 87 00 01 andi r7,r4,0x1
800f568: 44 e0 00 59 be r7,r0,800f6cc <_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 ));
800f56c: 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;
800f570: 34 07 ff fe mvi r7,-2
800f574: 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
800f578: 34 07 00 00 mvi r7,0
800f57c: 45 03 00 05 be r8,r3,800f590 <_Heap_Free+0xa0>
800f580: b4 64 38 00 add r7,r3,r4
800f584: 28 e7 00 04 lw r7,(r7+4)
800f588: 20 e7 00 01 andi r7,r7,0x1
800f58c: 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 ) ) {
800f590: 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
800f594: 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 ) ) {
800f598: 5c a0 00 23 bne r5,r0,800f624 <_Heap_Free+0x134>
uintptr_t const prev_size = block->prev_size;
800f59c: 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);
800f5a0: 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
800f5a4: f0 26 30 00 cmpgeu r6,r1,r6
800f5a8: f1 01 40 00 cmpgeu r8,r8,r1
800f5ac: 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 ) ) {
800f5b0: a1 06 40 00 and r8,r8,r6
800f5b4: 45 00 00 46 be r8,r0,800f6cc <_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) ) {
800f5b8: 28 26 00 04 lw r6,(r1+4)
800f5bc: 20 c6 00 01 andi r6,r6,0x1
800f5c0: 44 c0 00 43 be r6,r0,800f6cc <_Heap_Free+0x1dc> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
800f5c4: 44 e0 00 0f be r7,r0,800f600 <_Heap_Free+0x110>
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
800f5c8: 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;
800f5cc: 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;
800f5d0: 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;
800f5d4: b4 44 20 00 add r4,r2,r4
800f5d8: b4 85 28 00 add r5,r4,r5
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
800f5dc: 35 03 ff ff addi r3,r8,-1
800f5e0: 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;
800f5e4: 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;
800f5e8: 38 a3 00 01 ori r3,r5,0x1
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
800f5ec: 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;
800f5f0: 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;
800f5f4: 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;
800f5f8: 58 c7 00 08 sw (r6+8),r7
800f5fc: e0 00 00 29 bi 800f6a0 <_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;
800f600: b4 45 28 00 add r5,r2,r5
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
800f604: 38 a4 00 01 ori r4,r5,0x1
800f608: 58 24 00 04 sw (r1+4),r4
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
800f60c: 28 64 00 04 lw r4,(r3+4)
800f610: 34 01 ff fe mvi r1,-2
next_block->prev_size = size;
800f614: 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;
800f618: a0 81 08 00 and r1,r4,r1
800f61c: 58 61 00 04 sw (r3+4),r1
800f620: e0 00 00 20 bi 800f6a0 <_Heap_Free+0x1b0>
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
800f624: 44 e0 00 0d be r7,r0,800f658 <_Heap_Free+0x168>
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
800f628: 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;
800f62c: 28 66 00 08 lw r6,(r3+8)
uintptr_t const size = block_size + next_block_size;
800f630: b4 82 18 00 add r3,r4,r2
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
800f634: 58 25 00 0c sw (r1+12),r5
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
800f638: 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;
800f63c: 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;
800f640: 38 64 00 01 ori r4,r3,0x1
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
800f644: 58 e3 00 00 sw (r7+0),r3
new_block->prev = prev;
next->prev = new_block;
800f648: 58 c1 00 0c sw (r6+12),r1
prev->next = new_block;
800f64c: 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;
800f650: 58 24 00 04 sw (r1+4),r4
800f654: e0 00 00 13 bi 800f6a0 <_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;
800f658: 38 44 00 01 ori r4,r2,0x1
800f65c: 58 24 00 04 sw (r1+4),r4
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
800f660: 28 65 00 04 lw r5,(r3+4)
800f664: 34 04 ff fe mvi r4,-2
next_block->prev_size = block_size;
800f668: 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;
800f66c: a0 a4 20 00 and r4,r5,r4
800f670: 58 64 00 04 sw (r3+4),r4
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
800f674: 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;
800f678: 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;
800f67c: 29 65 00 3c lw r5,(r11+60)
new_block->next = next;
new_block->prev = block_before;
800f680: 58 2b 00 0c sw (r1+12),r11
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
800f684: 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;
800f688: 34 63 00 01 addi r3,r3,1
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
800f68c: 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;
800f690: 59 61 00 08 sw (r11+8),r1
800f694: 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;
800f698: 50 a3 00 02 bgeu r5,r3,800f6a0 <_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;
800f69c: 59 63 00 3c sw (r11+60),r3
}
}
/* Statistics */
--stats->used_blocks;
800f6a0: 29 63 00 40 lw r3,(r11+64)
++stats->frees;
800f6a4: 29 61 00 50 lw r1,(r11+80)
stats->free_size += block_size;
800f6a8: 29 64 00 30 lw r4,(r11+48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
800f6ac: 34 63 ff ff addi r3,r3,-1
++stats->frees;
800f6b0: 34 21 00 01 addi r1,r1,1
stats->free_size += block_size;
800f6b4: b4 82 10 00 add r2,r4,r2
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
800f6b8: 59 61 00 50 sw (r11+80),r1
stats->free_size += block_size;
800f6bc: 59 62 00 30 sw (r11+48),r2
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
800f6c0: 59 63 00 40 sw (r11+64),r3
++stats->frees;
stats->free_size += block_size;
800f6c4: 34 01 00 01 mvi r1,1
return( true );
800f6c8: e0 00 00 02 bi 800f6d0 <_Heap_Free+0x1e0>
800f6cc: 34 01 00 00 mvi r1,0
}
800f6d0: 2b 9d 00 04 lw ra,(sp+4)
800f6d4: 2b 8b 00 0c lw r11,(sp+12)
800f6d8: 2b 8c 00 08 lw r12,(sp+8)
800f6dc: 37 9c 00 0c addi sp,sp,12
800f6e0: c3 a0 00 00 ret
0800f848 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
800f848: 37 9c ff f0 addi sp,sp,-16
800f84c: 5b 8b 00 10 sw (sp+16),r11
800f850: 5b 8c 00 0c sw (sp+12),r12
800f854: 5b 8d 00 08 sw (sp+8),r13
800f858: 5b 9d 00 04 sw (sp+4),ra
800f85c: 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 )
800f860: 28 22 00 10 lw r2,(r1+16)
800f864: b8 20 58 00 mv r11,r1
800f868: b9 80 08 00 mv r1,r12
800f86c: b8 60 68 00 mv r13,r3
800f870: f8 00 49 51 calli 8021db4 <__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;
800f874: 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 )
800f878: 35 84 ff f8 addi r4,r12,-8
800f87c: 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
800f880: 50 82 00 03 bgeu r4,r2,800f88c <_Heap_Size_of_alloc_area+0x44>
800f884: 34 01 00 00 mvi r1,0
800f888: e0 00 00 03 bi 800f894 <_Heap_Size_of_alloc_area+0x4c>
800f88c: 29 61 00 24 lw r1,(r11+36)
800f890: 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 ) ) {
800f894: 44 20 00 13 be r1,r0,800f8e0 <_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);
800f898: 28 83 00 04 lw r3,(r4+4)
800f89c: 34 01 ff fe mvi r1,-2
800f8a0: a0 61 08 00 and r1,r3,r1
800f8a4: 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
800f8a8: 50 82 00 03 bgeu r4,r2,800f8b4 <_Heap_Size_of_alloc_area+0x6c><== ALWAYS TAKEN
800f8ac: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
800f8b0: e0 00 00 03 bi 800f8bc <_Heap_Size_of_alloc_area+0x74> <== NOT EXECUTED
800f8b4: 29 61 00 24 lw r1,(r11+36)
800f8b8: f0 24 08 00 cmpgeu r1,r1,r4
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
800f8bc: 44 20 00 09 be r1,r0,800f8e0 <_Heap_Size_of_alloc_area+0x98><== NEVER TAKEN
800f8c0: 28 81 00 04 lw r1,(r4+4)
800f8c4: 20 21 00 01 andi r1,r1,0x1
800f8c8: 44 20 00 06 be r1,r0,800f8e0 <_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;
800f8cc: c8 8c 20 00 sub r4,r4,r12
800f8d0: 34 84 00 04 addi r4,r4,4
800f8d4: 59 a4 00 00 sw (r13+0),r4
800f8d8: 34 01 00 01 mvi r1,1
return true;
800f8dc: e0 00 00 02 bi 800f8e4 <_Heap_Size_of_alloc_area+0x9c>
800f8e0: 34 01 00 00 mvi r1,0
}
800f8e4: 2b 9d 00 04 lw ra,(sp+4)
800f8e8: 2b 8b 00 10 lw r11,(sp+16)
800f8ec: 2b 8c 00 0c lw r12,(sp+12)
800f8f0: 2b 8d 00 08 lw r13,(sp+8)
800f8f4: 37 9c 00 10 addi sp,sp,16
800f8f8: c3 a0 00 00 ret
08003c44 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
8003c44: 37 9c ff ac addi sp,sp,-84
8003c48: 5b 8b 00 50 sw (sp+80),r11
8003c4c: 5b 8c 00 4c sw (sp+76),r12
8003c50: 5b 8d 00 48 sw (sp+72),r13
8003c54: 5b 8e 00 44 sw (sp+68),r14
8003c58: 5b 8f 00 40 sw (sp+64),r15
8003c5c: 5b 90 00 3c sw (sp+60),r16
8003c60: 5b 91 00 38 sw (sp+56),r17
8003c64: 5b 92 00 34 sw (sp+52),r18
8003c68: 5b 93 00 30 sw (sp+48),r19
8003c6c: 5b 94 00 2c sw (sp+44),r20
8003c70: 5b 95 00 28 sw (sp+40),r21
8003c74: 5b 96 00 24 sw (sp+36),r22
8003c78: 5b 97 00 20 sw (sp+32),r23
8003c7c: 5b 98 00 1c sw (sp+28),r24
8003c80: 5b 99 00 18 sw (sp+24),r25
8003c84: 5b 9b 00 14 sw (sp+20),fp
8003c88: 5b 9d 00 10 sw (sp+16),ra
8003c8c: 20 63 00 ff andi r3,r3,0xff
8003c90: b8 20 68 00 mv r13,r1
8003c94: b8 40 70 00 mv r14,r2
uintptr_t const page_size = heap->page_size;
8003c98: 28 2f 00 10 lw r15,(r1+16)
uintptr_t const min_block_size = heap->min_block_size;
8003c9c: 28 33 00 14 lw r19,(r1+20)
Heap_Block *const last_block = heap->last_block;
8003ca0: 28 32 00 24 lw r18,(r1+36)
Heap_Block *block = heap->first_block;
8003ca4: 28 2b 00 20 lw r11,(r1+32)
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
8003ca8: 5c 60 00 04 bne r3,r0,8003cb8 <_Heap_Walk+0x74>
8003cac: 78 0c 08 00 mvhi r12,0x800
8003cb0: 39 8c 3c 20 ori r12,r12,0x3c20
8003cb4: e0 00 00 03 bi 8003cc0 <_Heap_Walk+0x7c>
8003cb8: 78 0c 08 00 mvhi r12,0x800
8003cbc: 39 8c 41 70 ori r12,r12,0x4170
if ( !_System_state_Is_up( _System_state_Get() ) ) {
8003cc0: 78 02 08 02 mvhi r2,0x802
8003cc4: 38 42 0a 88 ori r2,r2,0xa88
8003cc8: 28 42 00 00 lw r2,(r2+0)
8003ccc: 34 01 00 03 mvi r1,3
8003cd0: 5c 41 01 0c bne r2,r1,8004100 <_Heap_Walk+0x4bc> <== NEVER TAKEN
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
8003cd4: 29 a1 00 08 lw r1,(r13+8)
8003cd8: 29 a6 00 18 lw r6,(r13+24)
8003cdc: 29 a7 00 1c lw r7,(r13+28)
8003ce0: 5b 81 00 08 sw (sp+8),r1
8003ce4: 29 a1 00 0c lw r1,(r13+12)
8003ce8: 78 03 08 01 mvhi r3,0x801
8003cec: 5b 92 00 04 sw (sp+4),r18
8003cf0: 5b 81 00 0c sw (sp+12),r1
8003cf4: 38 63 cc c4 ori r3,r3,0xccc4
8003cf8: b9 c0 08 00 mv r1,r14
8003cfc: 34 02 00 00 mvi r2,0
8003d00: b9 e0 20 00 mv r4,r15
8003d04: ba 60 28 00 mv r5,r19
8003d08: b9 60 40 00 mv r8,r11
8003d0c: d9 80 00 00 call r12
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
8003d10: 5d e0 00 05 bne r15,r0,8003d24 <_Heap_Walk+0xe0>
(*printer)( source, true, "page size is zero\n" );
8003d14: 78 03 08 01 mvhi r3,0x801
8003d18: b9 c0 08 00 mv r1,r14
8003d1c: 38 63 cd 58 ori r3,r3,0xcd58
8003d20: e0 00 00 3b bi 8003e0c <_Heap_Walk+0x1c8>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
8003d24: 21 f0 00 07 andi r16,r15,0x7
8003d28: 46 00 00 06 be r16,r0,8003d40 <_Heap_Walk+0xfc>
(*printer)(
8003d2c: 78 03 08 01 mvhi r3,0x801
8003d30: b9 c0 08 00 mv r1,r14
8003d34: 38 63 cd 6c ori r3,r3,0xcd6c
8003d38: b9 e0 20 00 mv r4,r15
8003d3c: e0 00 01 09 bi 8004160 <_Heap_Walk+0x51c>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
8003d40: ba 60 08 00 mv r1,r19
8003d44: b9 e0 10 00 mv r2,r15
8003d48: fb ff f3 de calli 8000cc0 <__umodsi3>
8003d4c: b8 20 88 00 mv r17,r1
8003d50: 44 30 00 08 be r1,r16,8003d70 <_Heap_Walk+0x12c>
(*printer)(
8003d54: 78 03 08 01 mvhi r3,0x801
8003d58: b9 c0 08 00 mv r1,r14
8003d5c: 38 63 cd 8c ori r3,r3,0xcd8c
8003d60: ba 60 20 00 mv r4,r19
8003d64: 34 02 00 01 mvi r2,1
8003d68: d9 80 00 00 call r12
8003d6c: e0 00 00 5a bi 8003ed4 <_Heap_Walk+0x290>
);
return false;
}
if (
8003d70: 35 61 00 08 addi r1,r11,8
8003d74: b9 e0 10 00 mv r2,r15
8003d78: fb ff f3 d2 calli 8000cc0 <__umodsi3>
8003d7c: b8 20 80 00 mv r16,r1
8003d80: 44 31 00 08 be r1,r17,8003da0 <_Heap_Walk+0x15c>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
8003d84: 78 03 08 01 mvhi r3,0x801
8003d88: b9 c0 08 00 mv r1,r14
8003d8c: 38 63 cd b0 ori r3,r3,0xcdb0
8003d90: b9 60 20 00 mv r4,r11
8003d94: 34 02 00 01 mvi r2,1
8003d98: d9 80 00 00 call r12
8003d9c: e0 00 00 92 bi 8003fe4 <_Heap_Walk+0x3a0>
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
8003da0: 29 71 00 04 lw r17,(r11+4)
8003da4: 22 31 00 01 andi r17,r17,0x1
8003da8: 5e 21 00 07 bne r17,r1,8003dc4 <_Heap_Walk+0x180>
(*printer)(
8003dac: 78 03 08 01 mvhi r3,0x801
8003db0: b9 c0 08 00 mv r1,r14
8003db4: 38 63 cd e4 ori r3,r3,0xcde4
8003db8: 34 02 00 01 mvi r2,1
8003dbc: d9 80 00 00 call r12
8003dc0: e0 00 00 89 bi 8003fe4 <_Heap_Walk+0x3a0>
);
return false;
}
if ( first_block->prev_size != page_size ) {
8003dc4: 29 79 00 00 lw r25,(r11+0)
8003dc8: 47 2f 00 07 be r25,r15,8003de4 <_Heap_Walk+0x1a0>
(*printer)(
8003dcc: 78 03 08 01 mvhi r3,0x801
8003dd0: b9 c0 08 00 mv r1,r14
8003dd4: 38 63 ce 14 ori r3,r3,0xce14
8003dd8: bb 20 20 00 mv r4,r25
8003ddc: b9 e0 28 00 mv r5,r15
8003de0: e0 00 00 3b bi 8003ecc <_Heap_Walk+0x288>
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
8003de4: 2a 41 00 04 lw r1,(r18+4)
8003de8: 34 02 ff fe mvi r2,-2
8003dec: a0 22 08 00 and r1,r1,r2
8003df0: b6 41 08 00 add r1,r18,r1
8003df4: 28 2f 00 04 lw r15,(r1+4)
8003df8: 21 ef 00 01 andi r15,r15,0x1
8003dfc: 5d f0 00 07 bne r15,r16,8003e18 <_Heap_Walk+0x1d4>
(*printer)(
8003e00: 78 03 08 01 mvhi r3,0x801
8003e04: b9 c0 08 00 mv r1,r14
8003e08: 38 63 ce 40 ori r3,r3,0xce40
8003e0c: 34 02 00 01 mvi r2,1
8003e10: d9 80 00 00 call r12
8003e14: e0 00 00 a5 bi 80040a8 <_Heap_Walk+0x464>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
8003e18: 29 a4 00 08 lw r4,(r13+8)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
8003e1c: b8 40 a8 00 mv r21,r2
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
8003e20: 29 b4 00 10 lw r20,(r13+16)
8003e24: b9 a0 88 00 mv r17,r13
8003e28: b8 80 b0 00 mv r22,r4
8003e2c: e0 00 00 2e bi 8003ee4 <_Heap_Walk+0x2a0>
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
8003e30: 29 a1 00 20 lw r1,(r13+32)
8003e34: 34 0f 00 00 mvi r15,0
8003e38: 52 c1 00 02 bgeu r22,r1,8003e40 <_Heap_Walk+0x1fc>
8003e3c: e0 00 00 03 bi 8003e48 <_Heap_Walk+0x204>
8003e40: 29 af 00 24 lw r15,(r13+36)
8003e44: f1 f6 78 00 cmpgeu r15,r15,r22
);
return false;
}
if (
8003e48: 36 c1 00 08 addi r1,r22,8
8003e4c: ba 80 10 00 mv r2,r20
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
8003e50: 5d e0 00 06 bne r15,r0,8003e68 <_Heap_Walk+0x224>
(*printer)(
8003e54: 78 03 08 01 mvhi r3,0x801
8003e58: ba c0 20 00 mv r4,r22
8003e5c: b9 c0 08 00 mv r1,r14
8003e60: 38 63 ce 58 ori r3,r3,0xce58
8003e64: e0 00 00 8f bi 80040a0 <_Heap_Walk+0x45c>
);
return false;
}
if (
8003e68: fb ff f3 96 calli 8000cc0 <__umodsi3>
8003e6c: 44 20 00 06 be r1,r0,8003e84 <_Heap_Walk+0x240>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
8003e70: 78 03 08 01 mvhi r3,0x801
8003e74: ba c0 20 00 mv r4,r22
8003e78: b9 c0 08 00 mv r1,r14
8003e7c: 38 63 ce 78 ori r3,r3,0xce78
8003e80: e0 00 00 b8 bi 8004160 <_Heap_Walk+0x51c>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
8003e84: 2a c3 00 04 lw r3,(r22+4)
8003e88: a0 75 18 00 and r3,r3,r21
8003e8c: b6 c3 18 00 add r3,r22,r3
8003e90: 28 70 00 04 lw r16,(r3+4)
8003e94: 22 10 00 01 andi r16,r16,0x1
8003e98: 46 01 00 07 be r16,r1,8003eb4 <_Heap_Walk+0x270>
(*printer)(
8003e9c: 78 03 08 01 mvhi r3,0x801
8003ea0: b8 20 78 00 mv r15,r1
8003ea4: ba c0 20 00 mv r4,r22
8003ea8: b9 c0 08 00 mv r1,r14
8003eac: 38 63 ce a8 ori r3,r3,0xcea8
8003eb0: e0 00 00 7c bi 80040a0 <_Heap_Walk+0x45c>
);
return false;
}
if ( free_block->prev != prev_block ) {
8003eb4: 2a c5 00 0c lw r5,(r22+12)
8003eb8: 44 b1 00 09 be r5,r17,8003edc <_Heap_Walk+0x298>
(*printer)(
8003ebc: 78 03 08 01 mvhi r3,0x801
8003ec0: ba c0 20 00 mv r4,r22
8003ec4: b9 c0 08 00 mv r1,r14
8003ec8: 38 63 ce c4 ori r3,r3,0xcec4
8003ecc: 34 02 00 01 mvi r2,1
8003ed0: d9 80 00 00 call r12
8003ed4: ba 00 08 00 mv r1,r16
8003ed8: e0 00 00 8b bi 8004104 <_Heap_Walk+0x4c0>
return false;
}
prev_block = free_block;
free_block = free_block->next;
8003edc: ba c0 88 00 mv r17,r22
8003ee0: 2a d6 00 08 lw r22,(r22+8)
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
8003ee4: 5e cd ff d3 bne r22,r13,8003e30 <_Heap_Walk+0x1ec>
8003ee8: e0 00 00 7a bi 80040d0 <_Heap_Walk+0x48c>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
8003eec: 29 6f 00 04 lw r15,(r11+4)
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
8003ef0: 21 e2 00 01 andi r2,r15,0x1
8003ef4: a1 fb 78 00 and r15,r15,fp
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
8003ef8: b5 6f 80 00 add r16,r11,r15
8003efc: 44 40 00 09 be r2,r0,8003f20 <_Heap_Walk+0x2dc>
(*printer)(
8003f00: 78 03 08 01 mvhi r3,0x801
8003f04: b9 c0 08 00 mv r1,r14
8003f08: 34 02 00 00 mvi r2,0
8003f0c: 38 63 ce f8 ori r3,r3,0xcef8
8003f10: b9 60 20 00 mv r4,r11
8003f14: b9 e0 28 00 mv r5,r15
8003f18: d9 80 00 00 call r12
8003f1c: e0 00 00 08 bi 8003f3c <_Heap_Walk+0x2f8>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
8003f20: 29 66 00 00 lw r6,(r11+0)
8003f24: 78 03 08 01 mvhi r3,0x801
8003f28: b9 c0 08 00 mv r1,r14
8003f2c: 38 63 cf 10 ori r3,r3,0xcf10
8003f30: b9 60 20 00 mv r4,r11
8003f34: b9 e0 28 00 mv r5,r15
8003f38: d9 80 00 00 call r12
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
8003f3c: 29 a1 00 20 lw r1,(r13+32)
8003f40: 52 01 00 03 bgeu r16,r1,8003f4c <_Heap_Walk+0x308> <== ALWAYS TAKEN
8003f44: 34 11 00 00 mvi r17,0 <== NOT EXECUTED
8003f48: e0 00 00 03 bi 8003f54 <_Heap_Walk+0x310> <== NOT EXECUTED
8003f4c: 29 b1 00 24 lw r17,(r13+36)
8003f50: f2 30 88 00 cmpgeu r17,r17,r16
block_size,
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
8003f54: 5e 20 00 05 bne r17,r0,8003f68 <_Heap_Walk+0x324>
(*printer)(
8003f58: 78 03 08 01 mvhi r3,0x801
8003f5c: b9 c0 08 00 mv r1,r14
8003f60: 38 63 cf 38 ori r3,r3,0xcf38
8003f64: e0 00 00 1c bi 8003fd4 <_Heap_Walk+0x390>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
8003f68: b9 e0 08 00 mv r1,r15
8003f6c: bb 20 10 00 mv r2,r25
8003f70: fb ff f3 54 calli 8000cc0 <__umodsi3>
8003f74: b8 20 88 00 mv r17,r1
8003f78: 44 20 00 09 be r1,r0,8003f9c <_Heap_Walk+0x358>
(*printer)(
8003f7c: 78 03 08 01 mvhi r3,0x801
8003f80: b9 c0 08 00 mv r1,r14
8003f84: 38 63 cf 68 ori r3,r3,0xcf68
8003f88: b9 60 20 00 mv r4,r11
8003f8c: b9 e0 28 00 mv r5,r15
8003f90: 34 02 00 01 mvi r2,1
8003f94: d9 80 00 00 call r12
8003f98: e0 00 00 74 bi 8004168 <_Heap_Walk+0x524>
);
return false;
}
if ( block_size < min_block_size ) {
8003f9c: 51 f3 00 0a bgeu r15,r19,8003fc4 <_Heap_Walk+0x380>
(*printer)(
8003fa0: 78 03 08 01 mvhi r3,0x801
8003fa4: b9 c0 08 00 mv r1,r14
8003fa8: 38 63 cf 98 ori r3,r3,0xcf98
8003fac: b9 60 20 00 mv r4,r11
8003fb0: b9 e0 28 00 mv r5,r15
8003fb4: ba 60 30 00 mv r6,r19
8003fb8: 34 02 00 01 mvi r2,1
8003fbc: d9 80 00 00 call r12
8003fc0: e0 00 00 09 bi 8003fe4 <_Heap_Walk+0x3a0>
);
return false;
}
if ( next_block_begin <= block_begin ) {
8003fc4: 56 0b 00 0a bgu r16,r11,8003fec <_Heap_Walk+0x3a8>
(*printer)(
8003fc8: 78 03 08 01 mvhi r3,0x801
8003fcc: b9 c0 08 00 mv r1,r14
8003fd0: 38 63 cf c4 ori r3,r3,0xcfc4
8003fd4: b9 60 20 00 mv r4,r11
8003fd8: ba 00 28 00 mv r5,r16
8003fdc: 34 02 00 01 mvi r2,1
8003fe0: d9 80 00 00 call r12
8003fe4: ba 20 08 00 mv r1,r17
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
8003fe8: e0 00 00 47 bi 8004104 <_Heap_Walk+0x4c0>
}
if ( !_Heap_Is_prev_used( next_block ) ) {
8003fec: 2a 03 00 04 lw r3,(r16+4)
8003ff0: 20 63 00 01 andi r3,r3,0x1
8003ff4: 5c 60 00 35 bne r3,r0,80040c8 <_Heap_Walk+0x484>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
8003ff8: 29 6f 00 04 lw r15,(r11+4)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
8003ffc: 29 65 00 0c lw r5,(r11+12)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
8004000: 29 a1 00 08 lw r1,(r13+8)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
8004004: a1 fb 88 00 and r17,r15,fp
return _Heap_Free_list_head(heap)->next;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
8004008: 29 a3 00 0c lw r3,(r13+12)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
800400c: b5 71 50 00 add r10,r11,r17
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
8004010: ba a0 30 00 mv r6,r21
8004014: 44 a1 00 04 be r5,r1,8004024 <_Heap_Walk+0x3e0>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
8004018: ba 80 30 00 mv r6,r20
800401c: 5c ad 00 02 bne r5,r13,8004024 <_Heap_Walk+0x3e0>
8004020: ba c0 30 00 mv r6,r22
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
8004024: 29 67 00 08 lw r7,(r11+8)
8004028: ba e0 40 00 mv r8,r23
800402c: 44 e3 00 04 be r7,r3,800403c <_Heap_Walk+0x3f8>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
8004030: ba 80 40 00 mv r8,r20
8004034: 5c ed 00 02 bne r7,r13,800403c <_Heap_Walk+0x3f8>
8004038: bb 00 40 00 mv r8,r24
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
800403c: 78 03 08 01 mvhi r3,0x801
8004040: 5b 8a 00 54 sw (sp+84),r10
8004044: b9 c0 08 00 mv r1,r14
8004048: 34 02 00 00 mvi r2,0
800404c: 38 63 d0 28 ori r3,r3,0xd028
8004050: b9 60 20 00 mv r4,r11
8004054: d9 80 00 00 call r12
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
8004058: 2b 8a 00 54 lw r10,(sp+84)
800405c: 29 46 00 00 lw r6,(r10+0)
8004060: 46 26 00 0a be r17,r6,8004088 <_Heap_Walk+0x444>
(*printer)(
8004064: 78 03 08 01 mvhi r3,0x801
8004068: b9 c0 08 00 mv r1,r14
800406c: 38 63 d0 54 ori r3,r3,0xd054
8004070: b9 60 20 00 mv r4,r11
8004074: ba 20 28 00 mv r5,r17
8004078: b9 40 38 00 mv r7,r10
800407c: 34 02 00 01 mvi r2,1
8004080: d9 80 00 00 call r12
8004084: e0 00 00 39 bi 8004168 <_Heap_Walk+0x524>
);
return false;
}
if ( !prev_used ) {
8004088: 21 ef 00 01 andi r15,r15,0x1
800408c: 5d e0 00 09 bne r15,r0,80040b0 <_Heap_Walk+0x46c>
(*printer)(
8004090: 78 03 08 01 mvhi r3,0x801
8004094: b9 c0 08 00 mv r1,r14
8004098: 38 63 d0 90 ori r3,r3,0xd090
800409c: b9 60 20 00 mv r4,r11
80040a0: 34 02 00 01 mvi r2,1
80040a4: d9 80 00 00 call r12
80040a8: b9 e0 08 00 mv r1,r15
80040ac: e0 00 00 16 bi 8004104 <_Heap_Walk+0x4c0>
80040b0: 29 a3 00 08 lw r3,(r13+8)
80040b4: e0 00 00 03 bi 80040c0 <_Heap_Walk+0x47c>
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
if ( free_block == block ) {
80040b8: 44 6b 00 04 be r3,r11,80040c8 <_Heap_Walk+0x484>
return true;
}
free_block = free_block->next;
80040bc: 28 63 00 08 lw r3,(r3+8)
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
80040c0: 5c 6d ff fe bne r3,r13,80040b8 <_Heap_Walk+0x474>
80040c4: e0 00 00 23 bi 8004150 <_Heap_Walk+0x50c>
80040c8: ba 00 58 00 mv r11,r16
80040cc: e0 00 00 0c bi 80040fc <_Heap_Walk+0x4b8>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
80040d0: 78 18 08 01 mvhi r24,0x801
80040d4: 78 14 08 01 mvhi r20,0x801
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
80040d8: 78 17 08 01 mvhi r23,0x801
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
80040dc: 78 16 08 01 mvhi r22,0x801
80040e0: 78 15 08 01 mvhi r21,0x801
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
80040e4: 3b 18 d0 1c ori r24,r24,0xd01c
80040e8: 3a 94 d0 8c ori r20,r20,0xd08c
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
80040ec: 3a f7 d0 10 ori r23,r23,0xd010
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
80040f0: 3a d6 d0 04 ori r22,r22,0xd004
80040f4: 3a b5 cf f8 ori r21,r21,0xcff8
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
80040f8: 34 1b ff fe mvi fp,-2
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
80040fc: 5d 72 ff 7c bne r11,r18,8003eec <_Heap_Walk+0x2a8> <== NEVER TAKEN
8004100: 34 01 00 01 mvi r1,1
block = next_block;
}
return true;
}
8004104: 2b 9d 00 10 lw ra,(sp+16)
8004108: 2b 8b 00 50 lw r11,(sp+80)
800410c: 2b 8c 00 4c lw r12,(sp+76)
8004110: 2b 8d 00 48 lw r13,(sp+72)
8004114: 2b 8e 00 44 lw r14,(sp+68)
8004118: 2b 8f 00 40 lw r15,(sp+64)
800411c: 2b 90 00 3c lw r16,(sp+60)
8004120: 2b 91 00 38 lw r17,(sp+56)
8004124: 2b 92 00 34 lw r18,(sp+52)
8004128: 2b 93 00 30 lw r19,(sp+48)
800412c: 2b 94 00 2c lw r20,(sp+44)
8004130: 2b 95 00 28 lw r21,(sp+40)
8004134: 2b 96 00 24 lw r22,(sp+36)
8004138: 2b 97 00 20 lw r23,(sp+32)
800413c: 2b 98 00 1c lw r24,(sp+28)
8004140: 2b 99 00 18 lw r25,(sp+24)
8004144: 2b 9b 00 14 lw fp,(sp+20)
8004148: 37 9c 00 54 addi sp,sp,84
800414c: c3 a0 00 00 ret
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
8004150: 78 03 08 01 mvhi r3,0x801
8004154: b9 c0 08 00 mv r1,r14
8004158: 38 63 d0 c0 ori r3,r3,0xd0c0
800415c: b9 60 20 00 mv r4,r11
8004160: 34 02 00 01 mvi r2,1
8004164: d9 80 00 00 call r12
8004168: 34 01 00 00 mvi r1,0
800416c: e3 ff ff e6 bi 8004104 <_Heap_Walk+0x4c0>
08004860 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
8004860: 37 9c ff e8 addi sp,sp,-24
8004864: 5b 8b 00 18 sw (sp+24),r11
8004868: 5b 8c 00 14 sw (sp+20),r12
800486c: 5b 8d 00 10 sw (sp+16),r13
8004870: 5b 8e 00 0c sw (sp+12),r14
8004874: 5b 8f 00 08 sw (sp+8),r15
8004878: 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;
800487c: 78 01 08 02 mvhi r1,0x802
8004880: 38 21 50 ac ori r1,r1,0x50ac
drivers_in_table = Configuration.number_of_device_drivers;
number_of_drivers = Configuration.maximum_drivers;
8004884: 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;
8004888: 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;
800488c: 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 )
8004890: 51 ab 00 02 bgeu r13,r11,8004898 <_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 ) {
8004894: 5d 6d 00 08 bne r11,r13,80048b4 <_IO_Manager_initialization+0x54><== ALWAYS TAKEN
_IO_Driver_address_table = driver_table;
8004898: 78 02 08 02 mvhi r2,0x802
_IO_Number_of_drivers = number_of_drivers;
800489c: 78 01 08 02 mvhi r1,0x802
* 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;
80048a0: 38 42 62 a8 ori r2,r2,0x62a8
_IO_Number_of_drivers = number_of_drivers;
80048a4: 38 21 62 a4 ori r1,r1,0x62a4
* 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;
80048a8: 58 4f 00 00 sw (r2+0),r15
_IO_Number_of_drivers = number_of_drivers;
80048ac: 58 2d 00 00 sw (r1+0),r13
return;
80048b0: e0 00 00 1b bi 800491c <_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 )
80048b4: b5 6b 08 00 add r1,r11,r11
80048b8: 34 02 00 03 mvi r2,3
80048bc: b4 2b 08 00 add r1,r1,r11
80048c0: fb ff f0 c3 calli 8000bcc <__ashlsi3>
80048c4: 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 *)
80048c8: f8 00 0d 0d calli 8007cfc <_Workspace_Allocate_or_fatal_error>
80048cc: 78 04 08 02 mvhi r4,0x802
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
80048d0: 78 05 08 02 mvhi r5,0x802
/*
* 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 *)
80048d4: 38 84 62 a8 ori r4,r4,0x62a8
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
80048d8: 38 a5 62 a4 ori r5,r5,0x62a4
memset(
80048dc: 34 02 00 00 mvi r2,0
80048e0: 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;
80048e4: 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];
80048e8: 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 *)
80048ec: 58 81 00 00 sw (r4+0),r1
80048f0: 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];
80048f4: 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(
80048f8: f8 00 3b dc calli 8013868 <memset>
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
80048fc: e0 00 00 04 bi 800490c <_IO_Manager_initialization+0xac>
_IO_Driver_address_table[index] = driver_table[index];
8004900: f8 00 3b 7c calli 80136f0 <memcpy>
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
8004904: 35 6b 00 01 addi r11,r11,1
8004908: 35 8c 00 18 addi r12,r12,24
_IO_Driver_address_table[index] = driver_table[index];
800490c: b5 cc 08 00 add r1,r14,r12
8004910: b5 ec 10 00 add r2,r15,r12
8004914: 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++ )
8004918: 55 ab ff fa bgu r13,r11,8004900 <_IO_Manager_initialization+0xa0>
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
800491c: 2b 9d 00 04 lw ra,(sp+4)
8004920: 2b 8b 00 18 lw r11,(sp+24)
8004924: 2b 8c 00 14 lw r12,(sp+20)
8004928: 2b 8d 00 10 lw r13,(sp+16)
800492c: 2b 8e 00 0c lw r14,(sp+12)
8004930: 2b 8f 00 08 lw r15,(sp+8)
8004934: 37 9c 00 18 addi sp,sp,24
8004938: c3 a0 00 00 ret
08005824 <_ISR_Handler_initialization>:
*
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
8005824: 37 9c ff f4 addi sp,sp,-12
8005828: 5b 8b 00 0c sw (sp+12),r11
800582c: 5b 8c 00 08 sw (sp+8),r12
8005830: 5b 9d 00 04 sw (sp+4),ra
_ISR_Signals_to_thread_executing = false;
8005834: 78 03 08 02 mvhi r3,0x802
_ISR_Nest_level = 0;
8005838: 78 02 08 02 mvhi r2,0x802
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
_ISR_Signals_to_thread_executing = false;
800583c: 34 04 00 00 mvi r4,0
8005840: 38 63 5a 98 ori r3,r3,0x5a98
_ISR_Nest_level = 0;
8005844: 38 42 59 dc ori r2,r2,0x59dc
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
_ISR_Signals_to_thread_executing = false;
8005848: 30 64 00 00 sb (r3+0),r4
_ISR_Nest_level = 0;
800584c: 58 44 00 00 sw (r2+0),r4
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
_ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
8005850: 34 01 00 80 mvi r1,128
void _ISR_Handler_initialization( void )
{
_ISR_Signals_to_thread_executing = false;
_ISR_Nest_level = 0;
8005854: b8 80 60 00 mv r12,r4
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
_ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
8005858: f8 00 09 29 calli 8007cfc <_Workspace_Allocate_or_fatal_error>
_CPU_Initialize_vectors();
#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) )
800585c: 78 0b 08 02 mvhi r11,0x802
8005860: 78 02 08 02 mvhi r2,0x802
8005864: 38 42 50 a4 ori r2,r2,0x50a4
8005868: 39 6b 50 ac ori r11,r11,0x50ac
800586c: 28 44 00 00 lw r4,(r2+0)
8005870: 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(
8005874: 78 02 08 02 mvhi r2,0x802
8005878: 38 42 59 c0 ori r2,r2,0x59c0
800587c: 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) )
8005880: 50 64 00 05 bgeu r3,r4,8005894 <_ISR_Handler_initialization+0x70><== ALWAYS TAKEN
_Internal_error_Occurred(
8005884: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8005888: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
800588c: 34 03 00 05 mvi r3,5 <== NOT EXECUTED
8005890: fb ff ff d6 calli 80057e8 <_Internal_error_Occurred> <== NOT EXECUTED
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
);
_CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
8005894: b8 60 08 00 mv r1,r3
8005898: f8 00 09 19 calli 8007cfc <_Workspace_Allocate_or_fatal_error>
Configuration.interrupt_stack_size
);
_CPU_Interrupt_stack_high = _Addresses_Add_offset(
800589c: 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(
80058a0: 78 02 08 02 mvhi r2,0x802
Configuration.interrupt_stack_size
);
_CPU_Interrupt_stack_high = _Addresses_Add_offset(
80058a4: 78 03 08 02 mvhi r3,0x802
80058a8: 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(
80058ac: 38 42 59 54 ori r2,r2,0x5954
Configuration.interrupt_stack_size
);
_CPU_Interrupt_stack_high = _Addresses_Add_offset(
80058b0: 38 63 58 d8 ori r3,r3,0x58d8
80058b4: 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(
80058b8: 58 41 00 00 sw (r2+0),r1
#if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE )
_CPU_Install_interrupt_stack();
#endif
}
80058bc: 2b 9d 00 04 lw ra,(sp+4)
80058c0: 2b 8b 00 0c lw r11,(sp+12)
80058c4: 2b 8c 00 08 lw r12,(sp+8)
80058c8: 37 9c 00 0c addi sp,sp,12
80058cc: c3 a0 00 00 ret
080058d0 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
80058d0: 37 9c ff ec addi sp,sp,-20
80058d4: 5b 8b 00 14 sw (sp+20),r11
80058d8: 5b 8c 00 10 sw (sp+16),r12
80058dc: 5b 8d 00 0c sw (sp+12),r13
80058e0: 5b 8e 00 08 sw (sp+8),r14
80058e4: 5b 9d 00 04 sw (sp+4),ra
80058e8: 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 )
80058ec: 28 21 00 18 lw r1,(r1+24)
80058f0: b8 20 60 00 mv r12,r1
80058f4: 44 20 00 20 be r1,r0,8005974 <_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 );
80058f8: 35 6d 00 20 addi r13,r11,32
80058fc: b9 a0 08 00 mv r1,r13
8005900: fb ff fd 45 calli 8004e14 <_Chain_Get>
8005904: b8 20 60 00 mv r12,r1
if ( information->auto_extend ) {
8005908: 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 );
800590c: b9 80 70 00 mv r14,r12
if ( information->auto_extend ) {
8005910: 44 20 00 19 be r1,r0,8005974 <_Objects_Allocate+0xa4>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
8005914: 5d 80 00 07 bne r12,r0,8005930 <_Objects_Allocate+0x60>
_Objects_Extend_information( information );
8005918: b9 60 08 00 mv r1,r11
800591c: f8 00 00 36 calli 80059f4 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
8005920: b9 a0 08 00 mv r1,r13
8005924: fb ff fd 3c calli 8004e14 <_Chain_Get>
8005928: b8 20 60 00 mv r12,r1
}
if ( the_object ) {
800592c: 44 2e 00 12 be r1,r14,8005974 <_Objects_Allocate+0xa4>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
8005930: 29 83 00 08 lw r3,(r12+8)
8005934: 29 61 00 08 lw r1,(r11+8)
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
8005938: 2d 62 00 14 lhu r2,(r11+20)
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
800593c: 20 63 ff ff andi r3,r3,0xffff
8005940: 20 21 ff ff andi r1,r1,0xffff
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
8005944: c8 61 08 00 sub r1,r3,r1
8005948: f8 00 71 0b calli 8021d74 <__udivsi3>
800594c: 34 02 00 02 mvi r2,2
8005950: fb ff ec 9f calli 8000bcc <__ashlsi3>
8005954: 29 62 00 30 lw r2,(r11+48)
information->inactive--;
8005958: 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 ]--;
800595c: b4 41 08 00 add r1,r2,r1
8005960: 28 22 00 00 lw r2,(r1+0)
information->inactive--;
8005964: 34 63 ff ff addi r3,r3,-1
8005968: 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 ]--;
800596c: 34 42 ff ff addi r2,r2,-1
8005970: 58 22 00 00 sw (r1+0),r2
information->inactive--;
}
}
return the_object;
}
8005974: b9 80 08 00 mv r1,r12
8005978: 2b 9d 00 04 lw ra,(sp+4)
800597c: 2b 8b 00 14 lw r11,(sp+20)
8005980: 2b 8c 00 10 lw r12,(sp+16)
8005984: 2b 8d 00 0c lw r13,(sp+12)
8005988: 2b 8e 00 08 lw r14,(sp+8)
800598c: 37 9c 00 14 addi sp,sp,20
8005990: c3 a0 00 00 ret
080059f4 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
80059f4: 37 9c ff c4 addi sp,sp,-60
80059f8: 5b 8b 00 30 sw (sp+48),r11
80059fc: 5b 8c 00 2c sw (sp+44),r12
8005a00: 5b 8d 00 28 sw (sp+40),r13
8005a04: 5b 8e 00 24 sw (sp+36),r14
8005a08: 5b 8f 00 20 sw (sp+32),r15
8005a0c: 5b 90 00 1c sw (sp+28),r16
8005a10: 5b 91 00 18 sw (sp+24),r17
8005a14: 5b 92 00 14 sw (sp+20),r18
8005a18: 5b 93 00 10 sw (sp+16),r19
8005a1c: 5b 94 00 0c sw (sp+12),r20
8005a20: 5b 95 00 08 sw (sp+8),r21
8005a24: 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 );
8005a28: 28 2e 00 08 lw r14,(r1+8)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
8005a2c: 28 2f 00 34 lw r15,(r1+52)
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
8005a30: 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 );
8005a34: 21 ce ff ff andi r14,r14,0xffff
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
8005a38: b9 e0 68 00 mv r13,r15
8005a3c: b9 c0 60 00 mv r12,r14
8005a40: b9 e0 88 00 mv r17,r15
8005a44: 45 e0 00 0f be r15,r0,8005a80 <_Objects_Extend_information+0x8c>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
8005a48: 2c 30 00 14 lhu r16,(r1+20)
8005a4c: 2c 21 00 10 lhu r1,(r1+16)
8005a50: 34 0d 00 00 mvi r13,0
8005a54: ba 00 10 00 mv r2,r16
8005a58: f8 00 70 c7 calli 8021d74 <__udivsi3>
8005a5c: 20 31 ff ff andi r17,r1,0xffff
8005a60: b9 e0 08 00 mv r1,r15
for ( ; block < block_count; block++ ) {
8005a64: e0 00 00 06 bi 8005a7c <_Objects_Extend_information+0x88>
if ( information->object_blocks[ block ] == NULL )
8005a68: 28 22 00 00 lw r2,(r1+0)
8005a6c: 34 21 00 04 addi r1,r1,4
8005a70: 44 40 00 04 be r2,r0,8005a80 <_Objects_Extend_information+0x8c>
8005a74: 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++ ) {
8005a78: 35 ad 00 01 addi r13,r13,1
8005a7c: 56 2d ff fb bgu r17,r13,8005a68 <_Objects_Extend_information+0x74>
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
8005a80: 2d 61 00 14 lhu r1,(r11+20)
8005a84: 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 ) {
8005a88: 38 02 ff ff mvu r2,0xffff
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
8005a8c: 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 ) {
8005a90: 56 82 00 97 bgu r20,r2,8005cec <_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;
8005a94: 29 62 00 18 lw r2,(r11+24)
8005a98: f8 00 70 38 calli 8021b78 <__mulsi3>
if ( information->auto_extend ) {
8005a9c: 41 62 00 12 lbu r2,(r11+18)
8005aa0: 44 40 00 05 be r2,r0,8005ab4 <_Objects_Extend_information+0xc0>
new_object_block = _Workspace_Allocate( block_size );
8005aa4: f8 00 08 a5 calli 8007d38 <_Workspace_Allocate>
8005aa8: b8 20 78 00 mv r15,r1
if ( !new_object_block )
8005aac: 5c 20 00 04 bne r1,r0,8005abc <_Objects_Extend_information+0xc8>
8005ab0: e0 00 00 8f bi 8005cec <_Objects_Extend_information+0x2f8>
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
8005ab4: f8 00 08 92 calli 8007cfc <_Workspace_Allocate_or_fatal_error>
8005ab8: 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 ) {
8005abc: 2d 61 00 10 lhu r1,(r11+16)
8005ac0: 54 2c 00 60 bgu r1,r12,8005c40 <_Objects_Extend_information+0x24c>
*/
/*
* Up the block count and maximum
*/
block_count++;
8005ac4: 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 );
8005ac8: b6 52 08 00 add r1,r18,r18
8005acc: b6 8e 10 00 add r2,r20,r14
8005ad0: b4 32 08 00 add r1,r1,r18
8005ad4: b4 41 08 00 add r1,r2,r1
8005ad8: 34 02 00 02 mvi r2,2
8005adc: fb ff ec 3c calli 8000bcc <__ashlsi3>
8005ae0: f8 00 08 96 calli 8007d38 <_Workspace_Allocate>
8005ae4: b8 20 80 00 mv r16,r1
if ( !object_blocks ) {
8005ae8: 5c 20 00 04 bne r1,r0,8005af8 <_Objects_Extend_information+0x104>
_Workspace_Free( new_object_block );
8005aec: b9 e0 08 00 mv r1,r15
8005af0: f8 00 08 9d calli 8007d64 <_Workspace_Free>
return;
8005af4: e0 00 00 7e bi 8005cec <_Objects_Extend_information+0x2f8>
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
8005af8: ba 40 08 00 mv r1,r18
8005afc: 34 02 00 02 mvi r2,2
8005b00: fb ff ec 33 calli 8000bcc <__ashlsi3>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
8005b04: 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);
8005b08: b6 01 98 00 add r19,r16,r1
8005b0c: b6 61 90 00 add r18,r19,r1
8005b10: 54 4e 00 05 bgu r2,r14,8005b24 <_Objects_Extend_information+0x130>
8005b14: 34 01 00 00 mvi r1,0
8005b18: 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;
8005b1c: b8 20 18 00 mv r3,r1
8005b20: e0 00 00 19 bi 8005b84 <_Objects_Extend_information+0x190>
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
information->object_blocks,
block_count * sizeof(void*) );
8005b24: ba 20 08 00 mv r1,r17
8005b28: 34 02 00 02 mvi r2,2
8005b2c: fb ff ec 28 calli 8000bcc <__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,
8005b30: 29 62 00 34 lw r2,(r11+52)
information->object_blocks,
block_count * sizeof(void*) );
8005b34: 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,
8005b38: ba a0 18 00 mv r3,r21
8005b3c: ba 00 08 00 mv r1,r16
8005b40: f8 00 36 ec calli 80136f0 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
8005b44: 29 62 00 30 lw r2,(r11+48)
8005b48: ba a0 18 00 mv r3,r21
8005b4c: ba 60 08 00 mv r1,r19
8005b50: f8 00 36 e8 calli 80136f0 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
8005b54: 2d 61 00 10 lhu r1,(r11+16)
8005b58: 34 02 00 02 mvi r2,2
8005b5c: b5 c1 08 00 add r1,r14,r1
8005b60: fb ff ec 1b calli 8000bcc <__ashlsi3>
8005b64: 29 62 00 1c lw r2,(r11+28)
8005b68: b8 20 18 00 mv r3,r1
8005b6c: ba 40 08 00 mv r1,r18
8005b70: f8 00 36 e0 calli 80136f0 <memcpy>
8005b74: e0 00 00 05 bi 8005b88 <_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;
8005b78: 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++ ) {
8005b7c: 34 21 00 01 addi r1,r1,1
8005b80: 34 42 00 04 addi r2,r2,4
8005b84: 55 c1 ff fd bgu r14,r1,8005b78 <_Objects_Extend_information+0x184>
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
8005b88: ba 20 08 00 mv r1,r17
8005b8c: 34 02 00 02 mvi r2,2
8005b90: fb ff ec 0f calli 8000bcc <__ashlsi3>
inactive_per_block[block_count] = 0;
8005b94: b6 61 10 00 add r2,r19,r1
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
8005b98: 34 0e 00 00 mvi r14,0
8005b9c: b6 01 08 00 add r1,r16,r1
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
8005ba0: 2d 71 00 14 lhu r17,(r11+20)
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
8005ba4: 58 2e 00 00 sw (r1+0),r14
inactive_per_block[block_count] = 0;
8005ba8: 58 4e 00 00 sw (r2+0),r14
for ( index=index_base ;
index < ( information->allocation_size + index_base );
8005bac: b9 80 08 00 mv r1,r12
8005bb0: 34 02 00 02 mvi r2,2
8005bb4: fb ff ec 06 calli 8000bcc <__ashlsi3>
8005bb8: b5 91 88 00 add r17,r12,r17
8005bbc: b6 41 08 00 add r1,r18,r1
8005bc0: 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 ;
8005bc4: e0 00 00 04 bi 8005bd4 <_Objects_Extend_information+0x1e0>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
8005bc8: 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++ ) {
8005bcc: 34 42 00 01 addi r2,r2,1
8005bd0: 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 ;
8005bd4: 56 22 ff fd bgu r17,r2,8005bc8 <_Objects_Extend_information+0x1d4>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
8005bd8: 90 00 88 00 rcsr r17,IE
8005bdc: 34 01 ff fe mvi r1,-2
8005be0: a2 21 08 00 and r1,r17,r1
8005be4: 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(
8005be8: 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;
8005bec: 22 94 ff ff andi r20,r20,0xffff
8005bf0: 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;
8005bf4: 59 73 00 30 sw (r11+48),r19
information->local_table = local_table;
8005bf8: 59 72 00 1c sw (r11+28),r18
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
8005bfc: 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(
8005c00: 34 02 00 18 mvi r2,24
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
8005c04: 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(
8005c08: fb ff eb f1 calli 8000bcc <__ashlsi3>
8005c0c: 78 02 00 01 mvhi r2,0x1
8005c10: 38 42 00 00 ori r2,r2,0x0
8005c14: b8 22 80 00 or r16,r1,r2
8005c18: 2d 61 00 04 lhu r1,(r11+4)
8005c1c: 34 02 00 1b mvi r2,27
8005c20: fb ff eb eb calli 8000bcc <__ashlsi3>
8005c24: ba 01 08 00 or r1,r16,r1
8005c28: b8 34 a0 00 or r20,r1,r20
8005c2c: 59 74 00 0c sw (r11+12),r20
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
8005c30: d0 11 00 00 wcsr IE,r17
if ( old_tables )
8005c34: 45 c0 00 03 be r14,r0,8005c40 <_Objects_Extend_information+0x24c>
_Workspace_Free( old_tables );
8005c38: b9 c0 08 00 mv r1,r14
8005c3c: f8 00 08 4a calli 8007d64 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
8005c40: b9 a0 08 00 mv r1,r13
8005c44: 34 02 00 02 mvi r2,2
8005c48: fb ff eb e1 calli 8000bcc <__ashlsi3>
8005c4c: b8 20 80 00 mv r16,r1
8005c50: 29 61 00 34 lw r1,(r11+52)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
8005c54: 2d 63 00 14 lhu r3,(r11+20)
8005c58: 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;
8005c5c: b4 30 08 00 add r1,r1,r16
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
8005c60: 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;
8005c64: 58 2f 00 00 sw (r1+0),r15
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
8005c68: b9 e0 10 00 mv r2,r15
8005c6c: 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(
8005c70: 78 0d 00 01 mvhi r13,0x1
information->object_blocks[ block ] = new_object_block;
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
8005c74: f8 00 24 cc calli 800efa4 <_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 ) {
8005c78: b9 c0 88 00 mv r17,r14
the_object->id = _Objects_Build_id(
8005c7c: 39 ad 00 00 ori r13,r13,0x0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
8005c80: 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 ) {
8005c84: e0 00 00 0e bi 8005cbc <_Objects_Extend_information+0x2c8>
the_object->id = _Objects_Build_id(
8005c88: 29 61 00 00 lw r1,(r11+0)
8005c8c: fb ff eb d0 calli 8000bcc <__ashlsi3>
8005c90: b8 2d 90 00 or r18,r1,r13
8005c94: 2d 61 00 04 lhu r1,(r11+4)
8005c98: 34 02 00 1b mvi r2,27
8005c9c: fb ff eb cc calli 8000bcc <__ashlsi3>
8005ca0: ba 41 10 00 or r2,r18,r1
8005ca4: b8 4c 10 00 or r2,r2,r12
8005ca8: 59 c2 00 08 sw (r14+8),r2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
8005cac: b9 e0 08 00 mv r1,r15
8005cb0: b9 c0 10 00 mv r2,r14
8005cb4: fb ff fc 42 calli 8004dbc <_Chain_Append>
index++;
8005cb8: 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 ) {
8005cbc: ba 20 08 00 mv r1,r17
8005cc0: fb ff fc 55 calli 8004e14 <_Chain_Get>
8005cc4: b8 20 70 00 mv r14,r1
the_object->id = _Objects_Build_id(
8005cc8: 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 ) {
8005ccc: 5c 20 ff ef bne r1,r0,8005c88 <_Objects_Extend_information+0x294>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
8005cd0: 2d 62 00 14 lhu r2,(r11+20)
information->inactive =
8005cd4: 2d 61 00 2c lhu r1,(r11+44)
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
8005cd8: 29 63 00 30 lw r3,(r11+48)
information->inactive =
8005cdc: b4 41 08 00 add r1,r2,r1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
8005ce0: b4 70 80 00 add r16,r3,r16
information->inactive =
8005ce4: 0d 61 00 2c sh (r11+44),r1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
8005ce8: 5a 02 00 00 sw (r16+0),r2
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
}
8005cec: 2b 9d 00 04 lw ra,(sp+4)
8005cf0: 2b 8b 00 30 lw r11,(sp+48)
8005cf4: 2b 8c 00 2c lw r12,(sp+44)
8005cf8: 2b 8d 00 28 lw r13,(sp+40)
8005cfc: 2b 8e 00 24 lw r14,(sp+36)
8005d00: 2b 8f 00 20 lw r15,(sp+32)
8005d04: 2b 90 00 1c lw r16,(sp+28)
8005d08: 2b 91 00 18 lw r17,(sp+24)
8005d0c: 2b 92 00 14 lw r18,(sp+20)
8005d10: 2b 93 00 10 lw r19,(sp+16)
8005d14: 2b 94 00 0c lw r20,(sp+12)
8005d18: 2b 95 00 08 lw r21,(sp+8)
8005d1c: 37 9c 00 3c addi sp,sp,60
8005d20: c3 a0 00 00 ret
0800f948 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
800f948: 37 9c ff f4 addi sp,sp,-12
800f94c: 5b 8b 00 0c sw (sp+12),r11
800f950: 5b 8c 00 08 sw (sp+8),r12
800f954: 5b 9d 00 04 sw (sp+4),ra
800f958: b8 40 58 00 mv r11,r2
800f95c: b8 20 60 00 mv r12,r1
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
800f960: 44 40 00 14 be r2,r0,800f9b0 <_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 );
800f964: f8 00 0b ed calli 8012918 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
800f968: 44 20 00 12 be r1,r0,800f9b0 <_Objects_Get_information+0x68>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
800f96c: 55 61 00 11 bgu r11,r1,800f9b0 <_Objects_Get_information+0x68>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
800f970: b9 80 08 00 mv r1,r12
800f974: 34 02 00 02 mvi r2,2
800f978: 78 0c 08 02 mvhi r12,0x802
800f97c: 39 8c 58 dc ori r12,r12,0x58dc
800f980: fb ff c4 93 calli 8000bcc <__ashlsi3>
800f984: b5 81 08 00 add r1,r12,r1
800f988: 28 2c 00 00 lw r12,(r1+0)
800f98c: 45 80 00 09 be r12,r0,800f9b0 <_Objects_Get_information+0x68><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
800f990: b9 60 08 00 mv r1,r11
800f994: 34 02 00 02 mvi r2,2
800f998: fb ff c4 8d calli 8000bcc <__ashlsi3>
800f99c: b5 81 08 00 add r1,r12,r1
800f9a0: 28 21 00 00 lw r1,(r1+0)
if ( !info )
800f9a4: 44 20 00 04 be r1,r0,800f9b4 <_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 )
800f9a8: 2c 22 00 10 lhu r2,(r1+16)
800f9ac: 5c 40 00 02 bne r2,r0,800f9b4 <_Objects_Get_information+0x6c>
800f9b0: 34 01 00 00 mvi r1,0
return NULL;
#endif
return info;
}
800f9b4: 2b 9d 00 04 lw ra,(sp+4)
800f9b8: 2b 8b 00 0c lw r11,(sp+12)
800f9bc: 2b 8c 00 08 lw r12,(sp+8)
800f9c0: 37 9c 00 0c addi sp,sp,12
800f9c4: c3 a0 00 00 ret
080058ec <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
80058ec: 37 9c ff e0 addi sp,sp,-32
80058f0: 5b 8b 00 14 sw (sp+20),r11
80058f4: 5b 8c 00 10 sw (sp+16),r12
80058f8: 5b 8d 00 0c sw (sp+12),r13
80058fc: 5b 8e 00 08 sw (sp+8),r14
8005900: 5b 9d 00 04 sw (sp+4),ra
8005904: b8 40 68 00 mv r13,r2
8005908: b8 60 58 00 mv r11,r3
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
800590c: 44 40 00 3e be r2,r0,8005a04 <_Objects_Get_name_as_string+0x118><== NEVER TAKEN
return NULL;
if ( name == NULL )
8005910: 44 60 00 3e be r3,r0,8005a08 <_Objects_Get_name_as_string+0x11c><== NEVER TAKEN
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
8005914: b8 20 60 00 mv r12,r1
8005918: 5c 20 00 05 bne r1,r0,800592c <_Objects_Get_name_as_string+0x40>
800591c: 78 01 08 02 mvhi r1,0x802
8005920: 38 21 c7 68 ori r1,r1,0xc768
8005924: 28 21 00 00 lw r1,(r1+0)
8005928: 28 2c 00 08 lw r12,(r1+8)
information = _Objects_Get_information_id( tmpId );
800592c: b9 80 08 00 mv r1,r12
8005930: fb ff ff bc calli 8005820 <_Objects_Get_information_id>
8005934: b8 20 70 00 mv r14,r1
if ( !information )
8005938: 44 20 00 33 be r1,r0,8005a04 <_Objects_Get_name_as_string+0x118><== NEVER TAKEN
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
800593c: b9 80 10 00 mv r2,r12
8005940: 37 83 00 20 addi r3,sp,32
8005944: f8 00 00 39 calli 8005a28 <_Objects_Get>
switch ( location ) {
8005948: 2b 82 00 20 lw r2,(sp+32)
800594c: 5c 40 00 2e bne r2,r0,8005a04 <_Objects_Get_name_as_string+0x118><== NEVER TAKEN
return NULL;
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
8005950: 41 ce 00 38 lbu r14,(r14+56)
8005954: 45 c2 00 05 be r14,r2,8005968 <_Objects_Get_name_as_string+0x7c>
s = the_object->name.name_p;
8005958: 28 26 00 0c lw r6,(r1+12)
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
800595c: b9 60 08 00 mv r1,r11
8005960: 5c c0 00 12 bne r6,r0,80059a8 <_Objects_Get_name_as_string+0xbc>
8005964: e0 00 00 24 bi 80059f4 <_Objects_Get_name_as_string+0x108>
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
8005968: 28 2c 00 0c lw r12,(r1+12)
lname[ 0 ] = (u32_name >> 24) & 0xff;
800596c: 34 02 00 18 mvi r2,24
8005970: b9 80 08 00 mv r1,r12
8005974: fb ff ee 55 calli 80012c8 <__lshrsi3>
8005978: 33 81 00 18 sb (sp+24),r1
lname[ 1 ] = (u32_name >> 16) & 0xff;
800597c: 34 02 00 10 mvi r2,16
8005980: b9 80 08 00 mv r1,r12
8005984: fb ff ee 51 calli 80012c8 <__lshrsi3>
8005988: 33 81 00 19 sb (sp+25),r1
lname[ 2 ] = (u32_name >> 8) & 0xff;
800598c: 34 02 00 08 mvi r2,8
8005990: b9 80 08 00 mv r1,r12
8005994: fb ff ee 4d calli 80012c8 <__lshrsi3>
8005998: 33 81 00 1a sb (sp+26),r1
lname[ 3 ] = (u32_name >> 0) & 0xff;
800599c: 33 8c 00 1b sb (sp+27),r12
lname[ 4 ] = '\0';
80059a0: 33 8e 00 1c sb (sp+28),r14
80059a4: 37 86 00 18 addi r6,sp,24
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
*d = (isprint((unsigned char)*s)) ? *s : '*';
80059a8: 78 04 08 02 mvhi r4,0x802
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
80059ac: 35 ad ff ff addi r13,r13,-1
*d = (isprint((unsigned char)*s)) ? *s : '*';
80059b0: 38 84 41 f8 ori r4,r4,0x41f8
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
80059b4: b9 60 08 00 mv r1,r11
80059b8: 34 03 00 00 mvi r3,0
80059bc: e0 00 00 09 bi 80059e0 <_Objects_Get_name_as_string+0xf4>
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
*d = (isprint((unsigned char)*s)) ? *s : '*';
80059c0: 28 82 00 00 lw r2,(r4+0)
80059c4: b4 45 10 00 add r2,r2,r5
80059c8: 40 42 00 01 lbu r2,(r2+1)
80059cc: 20 42 00 97 andi r2,r2,0x97
80059d0: 5c 40 00 02 bne r2,r0,80059d8 <_Objects_Get_name_as_string+0xec>
80059d4: 34 05 00 2a mvi r5,42
80059d8: 30 25 00 00 sb (r1+0),r5
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
80059dc: 34 21 00 01 addi r1,r1,1
80059e0: b4 c3 10 00 add r2,r6,r3
80059e4: 50 6d 00 04 bgeu r3,r13,80059f4 <_Objects_Get_name_as_string+0x108>
80059e8: 40 45 00 00 lbu r5,(r2+0)
80059ec: 34 63 00 01 addi r3,r3,1
80059f0: 5c a0 ff f4 bne r5,r0,80059c0 <_Objects_Get_name_as_string+0xd4>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
80059f4: 34 02 00 00 mvi r2,0
80059f8: 30 22 00 00 sb (r1+0),r2
_Thread_Enable_dispatch();
80059fc: f8 00 02 07 calli 8006218 <_Thread_Enable_dispatch>
return name;
8005a00: e0 00 00 02 bi 8005a08 <_Objects_Get_name_as_string+0x11c>
8005a04: 34 0b 00 00 mvi r11,0
}
return NULL; /* unreachable path */
}
8005a08: b9 60 08 00 mv r1,r11
8005a0c: 2b 9d 00 04 lw ra,(sp+4)
8005a10: 2b 8b 00 14 lw r11,(sp+20)
8005a14: 2b 8c 00 10 lw r12,(sp+16)
8005a18: 2b 8d 00 0c lw r13,(sp+12)
8005a1c: 2b 8e 00 08 lw r14,(sp+8)
8005a20: 37 9c 00 20 addi sp,sp,32
8005a24: c3 a0 00 00 ret
08016ee8 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
8016ee8: 37 9c ff f4 addi sp,sp,-12
8016eec: 5b 8b 00 0c sw (sp+12),r11
8016ef0: 5b 8c 00 08 sw (sp+8),r12
8016ef4: 5b 9d 00 04 sw (sp+4),ra
8016ef8: b8 20 20 00 mv r4,r1
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
8016efc: 28 21 00 08 lw r1,(r1+8)
if ( information->maximum >= index ) {
8016f00: 2c 85 00 10 lhu r5,(r4+16)
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
8016f04: b8 60 58 00 mv r11,r3
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
8016f08: c8 41 08 00 sub r1,r2,r1
8016f0c: 34 21 00 01 addi r1,r1,1
if ( information->maximum >= index ) {
8016f10: 54 25 00 0a bgu r1,r5,8016f38 <_Objects_Get_no_protection+0x50>
if ( (the_object = information->local_table[ index ]) != NULL ) {
8016f14: 28 8c 00 1c lw r12,(r4+28)
8016f18: 34 02 00 02 mvi r2,2
8016f1c: fb ff db df calli 800de98 <__ashlsi3>
8016f20: b5 81 08 00 add r1,r12,r1
8016f24: 28 21 00 00 lw r1,(r1+0)
8016f28: 44 20 00 04 be r1,r0,8016f38 <_Objects_Get_no_protection+0x50><== NEVER TAKEN
*location = OBJECTS_LOCAL;
8016f2c: 34 02 00 00 mvi r2,0
8016f30: 59 62 00 00 sw (r11+0),r2
return the_object;
8016f34: e0 00 00 04 bi 8016f44 <_Objects_Get_no_protection+0x5c>
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
8016f38: 34 01 00 01 mvi r1,1
8016f3c: 59 61 00 00 sw (r11+0),r1
8016f40: 34 01 00 00 mvi r1,0
return NULL;
}
8016f44: 2b 9d 00 04 lw ra,(sp+4)
8016f48: 2b 8b 00 0c lw r11,(sp+12)
8016f4c: 2b 8c 00 08 lw r12,(sp+8)
8016f50: 37 9c 00 0c addi sp,sp,12
8016f54: c3 a0 00 00 ret
080053e4 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
80053e4: 37 9c ff ec addi sp,sp,-20
80053e8: 5b 8b 00 10 sw (sp+16),r11
80053ec: 5b 8c 00 0c sw (sp+12),r12
80053f0: 5b 8d 00 08 sw (sp+8),r13
80053f4: 5b 9d 00 04 sw (sp+4),ra
80053f8: b8 40 68 00 mv r13,r2
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
80053fc: b8 20 58 00 mv r11,r1
8005400: 5c 20 00 05 bne r1,r0,8005414 <_Objects_Id_to_name+0x30>
8005404: 78 01 08 02 mvhi r1,0x802
8005408: 38 21 39 c0 ori r1,r1,0x39c0
800540c: 28 21 00 00 lw r1,(r1+0)
8005410: 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);
8005414: 34 02 00 18 mvi r2,24
8005418: b9 60 08 00 mv r1,r11
800541c: fb ff f0 98 calli 800167c <__lshrsi3>
8005420: 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 )
8005424: 34 23 ff ff addi r3,r1,-1
8005428: 34 02 00 03 mvi r2,3
800542c: 54 62 00 15 bgu r3,r2,8005480 <_Objects_Id_to_name+0x9c>
8005430: e0 00 00 1b bi 800549c <_Objects_Id_to_name+0xb8>
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
8005434: 34 02 00 1b mvi r2,27
8005438: b9 60 08 00 mv r1,r11
800543c: fb ff f0 90 calli 800167c <__lshrsi3>
8005440: 34 02 00 02 mvi r2,2
8005444: fb ff f0 66 calli 80015dc <__ashlsi3>
8005448: b5 81 08 00 add r1,r12,r1
800544c: 28 21 00 00 lw r1,(r1+0)
if ( !information )
8005450: 44 20 00 0c be r1,r0,8005480 <_Objects_Id_to_name+0x9c> <== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
8005454: 40 2c 00 38 lbu r12,(r1+56)
8005458: 5d 80 00 0a bne r12,r0,8005480 <_Objects_Id_to_name+0x9c> <== NEVER TAKEN
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
800545c: b9 60 10 00 mv r2,r11
8005460: 37 83 00 14 addi r3,sp,20
8005464: f8 00 17 15 calli 800b0b8 <_Objects_Get>
if ( !the_object )
8005468: 44 2c 00 06 be r1,r12,8005480 <_Objects_Id_to_name+0x9c>
return OBJECTS_INVALID_ID;
*name = the_object->name;
800546c: 28 21 00 0c lw r1,(r1+12)
8005470: 59 a1 00 00 sw (r13+0),r1
_Thread_Enable_dispatch();
8005474: f8 00 02 4e calli 8005dac <_Thread_Enable_dispatch>
8005478: b9 80 08 00 mv r1,r12
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
800547c: e0 00 00 02 bi 8005484 <_Objects_Id_to_name+0xa0>
8005480: 34 01 00 03 mvi r1,3
}
8005484: 2b 9d 00 04 lw ra,(sp+4)
8005488: 2b 8b 00 10 lw r11,(sp+16)
800548c: 2b 8c 00 0c lw r12,(sp+12)
8005490: 2b 8d 00 08 lw r13,(sp+8)
8005494: 37 9c 00 14 addi sp,sp,20
8005498: 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 ] )
800549c: 78 0c 08 02 mvhi r12,0x802
80054a0: 34 02 00 02 mvi r2,2
80054a4: 39 8c 38 9c ori r12,r12,0x389c
80054a8: fb ff f0 4d calli 80015dc <__ashlsi3>
80054ac: b5 81 08 00 add r1,r12,r1
80054b0: 28 2c 00 00 lw r12,(r1+0)
80054b4: 5d 80 ff e0 bne r12,r0,8005434 <_Objects_Id_to_name+0x50>
80054b8: e3 ff ff f2 bi 8005480 <_Objects_Id_to_name+0x9c>
08003ec0 <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
8003ec0: 37 9c ff e4 addi sp,sp,-28
8003ec4: 5b 8b 00 1c sw (sp+28),r11
8003ec8: 5b 8c 00 18 sw (sp+24),r12
8003ecc: 5b 8d 00 14 sw (sp+20),r13
8003ed0: 5b 8e 00 10 sw (sp+16),r14
8003ed4: 5b 8f 00 0c sw (sp+12),r15
8003ed8: 5b 90 00 08 sw (sp+8),r16
8003edc: 5b 9d 00 04 sw (sp+4),ra
8003ee0: b8 40 70 00 mv r14,r2
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
8003ee4: 2c 22 00 3a lhu r2,(r1+58)
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
8003ee8: b8 20 68 00 mv r13,r1
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
8003eec: b8 60 08 00 mv r1,r3
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
8003ef0: b8 60 58 00 mv r11,r3
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
8003ef4: f8 00 2a ce calli 800ea2c <strnlen>
8003ef8: b8 20 60 00 mv r12,r1
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
8003efc: 41 a1 00 38 lbu r1,(r13+56)
8003f00: 44 20 00 13 be r1,r0,8003f4c <_Objects_Set_name+0x8c>
char *d;
d = _Workspace_Allocate( length + 1 );
8003f04: 35 81 00 01 addi r1,r12,1
8003f08: f8 00 04 22 calli 8004f90 <_Workspace_Allocate>
8003f0c: b8 20 68 00 mv r13,r1
if ( !d )
8003f10: 45 a0 00 28 be r13,r0,8003fb0 <_Objects_Set_name+0xf0> <== NEVER TAKEN
return false;
if ( the_object->name.name_p ) {
8003f14: 29 c1 00 0c lw r1,(r14+12)
8003f18: 44 20 00 04 be r1,r0,8003f28 <_Objects_Set_name+0x68>
_Workspace_Free( (void *)the_object->name.name_p );
8003f1c: f8 00 04 28 calli 8004fbc <_Workspace_Free>
the_object->name.name_p = NULL;
8003f20: 34 01 00 00 mvi r1,0
8003f24: 59 c1 00 0c sw (r14+12),r1
}
strncpy( d, name, length );
8003f28: b9 80 18 00 mv r3,r12
8003f2c: b9 60 10 00 mv r2,r11
8003f30: b9 a0 08 00 mv r1,r13
8003f34: f8 00 2a 8c calli 800e964 <strncpy>
d[length] = '\0';
8003f38: b5 ac 60 00 add r12,r13,r12
8003f3c: 34 01 00 00 mvi r1,0
8003f40: 31 81 00 00 sb (r12+0),r1
the_object->name.name_p = d;
8003f44: 59 cd 00 0c sw (r14+12),r13
8003f48: e0 00 00 19 bi 8003fac <_Objects_Set_name+0xec>
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
8003f4c: 34 01 00 01 mvi r1,1
8003f50: 41 70 00 00 lbu r16,(r11+0)
8003f54: 50 2c 00 20 bgeu r1,r12,8003fd4 <_Objects_Set_name+0x114>
8003f58: 41 61 00 01 lbu r1,(r11+1)
8003f5c: 34 02 00 10 mvi r2,16
8003f60: fb ff f1 2a calli 8000408 <__ashlsi3>
8003f64: b8 20 68 00 mv r13,r1
8003f68: 34 01 00 02 mvi r1,2
8003f6c: 50 2c 00 1c bgeu r1,r12,8003fdc <_Objects_Set_name+0x11c>
8003f70: 41 61 00 02 lbu r1,(r11+2)
8003f74: 34 02 00 08 mvi r2,8
8003f78: fb ff f1 24 calli 8000408 <__ashlsi3>
8003f7c: b8 20 78 00 mv r15,r1
8003f80: 34 01 00 03 mvi r1,3
8003f84: 55 81 00 02 bgu r12,r1,8003f8c <_Objects_Set_name+0xcc>
8003f88: e0 00 00 16 bi 8003fe0 <_Objects_Set_name+0x120>
8003f8c: 41 6b 00 03 lbu r11,(r11+3)
8003f90: ba 00 08 00 mv r1,r16
8003f94: 34 02 00 18 mvi r2,24
8003f98: fb ff f1 1c calli 8000408 <__ashlsi3>
8003f9c: b9 a1 68 00 or r13,r13,r1
8003fa0: b9 af 68 00 or r13,r13,r15
8003fa4: b9 ab 58 00 or r11,r13,r11
8003fa8: 59 cb 00 0c sw (r14+12),r11
8003fac: 34 01 00 01 mvi r1,1
);
}
return true;
}
8003fb0: 2b 9d 00 04 lw ra,(sp+4)
8003fb4: 2b 8b 00 1c lw r11,(sp+28)
8003fb8: 2b 8c 00 18 lw r12,(sp+24)
8003fbc: 2b 8d 00 14 lw r13,(sp+20)
8003fc0: 2b 8e 00 10 lw r14,(sp+16)
8003fc4: 2b 8f 00 0c lw r15,(sp+12)
8003fc8: 2b 90 00 08 lw r16,(sp+8)
8003fcc: 37 9c 00 1c addi sp,sp,28
8003fd0: c3 a0 00 00 ret
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
8003fd4: 78 0d 00 20 mvhi r13,0x20
8003fd8: 39 ad 00 00 ori r13,r13,0x0
8003fdc: 34 0f 20 00 mvi r15,8192
8003fe0: 34 0b 00 20 mvi r11,32
8003fe4: e3 ff ff eb bi 8003f90 <_Objects_Set_name+0xd0>
080039a0 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
80039a0: 37 9c ff e0 addi sp,sp,-32
80039a4: 5b 8b 00 1c sw (sp+28),r11
80039a8: 5b 8c 00 18 sw (sp+24),r12
80039ac: 5b 8d 00 14 sw (sp+20),r13
80039b0: 5b 8e 00 10 sw (sp+16),r14
80039b4: 5b 8f 00 0c sw (sp+12),r15
80039b8: 5b 90 00 08 sw (sp+8),r16
80039bc: 5b 9d 00 04 sw (sp+4),ra
80039c0: b8 40 60 00 mv r12,r2
80039c4: b8 20 78 00 mv r15,r1
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
80039c8: 37 82 00 20 addi r2,sp,32
80039cc: b9 80 08 00 mv r1,r12
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
80039d0: b8 60 80 00 mv r16,r3
80039d4: 20 8e 00 ff andi r14,r4,0xff
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
80039d8: f8 00 00 84 calli 8003be8 <_POSIX_Mutex_Get>
80039dc: 44 20 00 33 be r1,r0,8003aa8 <_POSIX_Condition_variables_Wait_support+0x108>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
80039e0: 78 05 08 02 mvhi r5,0x802
80039e4: 38 a5 08 74 ori r5,r5,0x874
80039e8: 28 a3 00 00 lw r3,(r5+0)
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
80039ec: b9 e0 08 00 mv r1,r15
80039f0: 37 82 00 20 addi r2,sp,32
80039f4: 34 63 ff ff addi r3,r3,-1
80039f8: 58 a3 00 00 sw (r5+0),r3
80039fc: fb ff ff 49 calli 8003720 <_POSIX_Condition_variables_Get>
switch ( location ) {
8003a00: 2b 84 00 20 lw r4,(sp+32)
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
8003a04: b8 20 68 00 mv r13,r1
switch ( location ) {
8003a08: 5c 80 00 28 bne r4,r0,8003aa8 <_POSIX_Condition_variables_Wait_support+0x108>
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
8003a0c: 28 21 00 14 lw r1,(r1+20)
8003a10: 44 24 00 05 be r1,r4,8003a24 <_POSIX_Condition_variables_Wait_support+0x84>
8003a14: 29 82 00 00 lw r2,(r12+0)
8003a18: 44 22 00 03 be r1,r2,8003a24 <_POSIX_Condition_variables_Wait_support+0x84>
_Thread_Enable_dispatch();
8003a1c: f8 00 0b eb calli 80069c8 <_Thread_Enable_dispatch>
8003a20: e0 00 00 22 bi 8003aa8 <_POSIX_Condition_variables_Wait_support+0x108>
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
8003a24: b9 80 08 00 mv r1,r12
8003a28: f8 00 01 1e calli 8003ea0 <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
8003a2c: 5d c0 00 1a bne r14,r0,8003a94 <_POSIX_Condition_variables_Wait_support+0xf4>
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
8003a30: 78 0b 08 02 mvhi r11,0x802
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
8003a34: 29 81 00 00 lw r1,(r12+0)
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
8003a38: 39 6b 09 30 ori r11,r11,0x930
8003a3c: 29 64 00 00 lw r4,(r11+0)
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
8003a40: 59 a1 00 14 sw (r13+20),r1
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
8003a44: 35 a5 00 18 addi r5,r13,24
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
8003a48: 58 8e 00 34 sw (r4+52),r14
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
8003a4c: 29 ef 00 00 lw r15,(r15+0)
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
8003a50: 34 01 00 01 mvi r1,1
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
8003a54: 78 03 08 00 mvhi r3,0x800
8003a58: ba 00 10 00 mv r2,r16
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
8003a5c: 58 8f 00 20 sw (r4+32),r15
8003a60: 59 a1 00 48 sw (r13+72),r1
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
8003a64: 38 63 73 90 ori r3,r3,0x7390
8003a68: b8 a0 08 00 mv r1,r5
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
8003a6c: 58 85 00 44 sw (r4+68),r5
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
8003a70: f8 00 0d 21 calli 8006ef4 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
8003a74: f8 00 0b d5 calli 80069c8 <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
8003a78: 29 61 00 00 lw r1,(r11+0)
8003a7c: 28 2b 00 34 lw r11,(r1+52)
if ( status && status != ETIMEDOUT )
8003a80: 7d 62 00 74 cmpnei r2,r11,116
8003a84: 7d 61 00 00 cmpnei r1,r11,0
8003a88: a0 41 08 00 and r1,r2,r1
8003a8c: 44 2e 00 04 be r1,r14,8003a9c <_POSIX_Condition_variables_Wait_support+0xfc><== ALWAYS TAKEN
8003a90: e0 00 00 07 bi 8003aac <_POSIX_Condition_variables_Wait_support+0x10c><== NOT EXECUTED
return status;
} else {
_Thread_Enable_dispatch();
8003a94: f8 00 0b cd calli 80069c8 <_Thread_Enable_dispatch>
8003a98: 34 0b 00 74 mvi r11,116
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
8003a9c: b9 80 08 00 mv r1,r12
8003aa0: f8 00 00 ce calli 8003dd8 <pthread_mutex_lock>
if ( mutex_status )
8003aa4: 44 20 00 02 be r1,r0,8003aac <_POSIX_Condition_variables_Wait_support+0x10c>
8003aa8: 34 0b 00 16 mvi r11,22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
8003aac: b9 60 08 00 mv r1,r11
8003ab0: 2b 9d 00 04 lw ra,(sp+4)
8003ab4: 2b 8b 00 1c lw r11,(sp+28)
8003ab8: 2b 8c 00 18 lw r12,(sp+24)
8003abc: 2b 8d 00 14 lw r13,(sp+20)
8003ac0: 2b 8e 00 10 lw r14,(sp+16)
8003ac4: 2b 8f 00 0c lw r15,(sp+12)
8003ac8: 2b 90 00 08 lw r16,(sp+8)
8003acc: 37 9c 00 20 addi sp,sp,32
8003ad0: c3 a0 00 00 ret
08008744 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
8008744: 37 9c ff d8 addi sp,sp,-40
8008748: 5b 8b 00 20 sw (sp+32),r11
800874c: 5b 8c 00 1c sw (sp+28),r12
8008750: 5b 8d 00 18 sw (sp+24),r13
8008754: 5b 8e 00 14 sw (sp+20),r14
8008758: 5b 8f 00 10 sw (sp+16),r15
800875c: 5b 90 00 0c sw (sp+12),r16
8008760: 5b 91 00 08 sw (sp+8),r17
8008764: 5b 9d 00 04 sw (sp+4),ra
8008768: b8 20 68 00 mv r13,r1
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
800876c: 78 01 08 02 mvhi r1,0x802
8008770: b8 40 80 00 mv r16,r2
8008774: b8 60 88 00 mv r17,r3
8008778: b9 a0 10 00 mv r2,r13
800877c: 38 21 92 40 ori r1,r1,0x9240
8008780: 37 83 00 28 addi r3,sp,40
8008784: b8 80 70 00 mv r14,r4
8008788: b8 c0 78 00 mv r15,r6
800878c: 20 ab 00 ff andi r11,r5,0xff
8008790: f8 00 0b ab calli 800b63c <_Objects_Get>
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
8008794: 2b 82 00 28 lw r2,(sp+40)
8008798: 5c 40 00 34 bne r2,r0,8008868 <_POSIX_Message_queue_Receive_support+0x124>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
800879c: 28 27 00 14 lw r7,(r1+20)
80087a0: 34 02 00 01 mvi r2,1
80087a4: 20 e3 00 03 andi r3,r7,0x3
80087a8: 5c 62 00 03 bne r3,r2,80087b4 <_POSIX_Message_queue_Receive_support+0x70>
_Thread_Enable_dispatch();
80087ac: f8 00 0e 2e calli 800c064 <_Thread_Enable_dispatch>
80087b0: e0 00 00 2e bi 8008868 <_POSIX_Message_queue_Receive_support+0x124>
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
80087b4: 28 2c 00 10 lw r12,(r1+16)
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
80087b8: 29 81 00 68 lw r1,(r12+104)
80087bc: 52 21 00 05 bgeu r17,r1,80087d0 <_POSIX_Message_queue_Receive_support+0x8c>
_Thread_Enable_dispatch();
80087c0: f8 00 0e 29 calli 800c064 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
80087c4: f8 00 2e c7 calli 80142e0 <__errno>
80087c8: 34 02 00 7a mvi r2,122
80087cc: e0 00 00 29 bi 8008870 <_POSIX_Message_queue_Receive_support+0x12c>
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
80087d0: b9 60 28 00 mv r5,r11
80087d4: 45 60 00 06 be r11,r0,80087ec <_POSIX_Message_queue_Receive_support+0xa8><== NEVER TAKEN
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
80087d8: b8 e0 08 00 mv r1,r7
80087dc: 34 02 00 0e mvi r2,14
80087e0: fb ff f7 3f calli 80064dc <__lshrsi3>
80087e4: 18 21 00 01 xori r1,r1,0x1
80087e8: 20 25 00 01 andi r5,r1,0x1
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
80087ec: 78 0b 08 02 mvhi r11,0x802
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
80087f0: 35 81 00 1c addi r1,r12,28
80087f4: b9 a0 10 00 mv r2,r13
80087f8: ba 00 18 00 mv r3,r16
80087fc: b9 e0 30 00 mv r6,r15
8008800: 37 84 00 24 addi r4,sp,36
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
8008804: 39 6b 8e 70 ori r11,r11,0x8e70
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
8008808: 34 0d ff ff mvi r13,-1
800880c: 5b 8d 00 24 sw (sp+36),r13
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
8008810: f8 00 06 b6 calli 800a2e8 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
8008814: f8 00 0e 14 calli 800c064 <_Thread_Enable_dispatch>
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
8008818: 29 6c 00 00 lw r12,(r11+0)
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
800881c: 34 02 00 1f mvi r2,31
8008820: 29 81 00 24 lw r1,(r12+36)
8008824: fb ff f7 56 calli 800657c <__ashrsi3>
8008828: 29 83 00 24 lw r3,(r12+36)
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
800882c: 29 82 00 34 lw r2,(r12+52)
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
8008830: 98 23 18 00 xor r3,r1,r3
8008834: c8 61 08 00 sub r1,r3,r1
8008838: 59 c1 00 00 sw (r14+0),r1
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
800883c: 5c 40 00 03 bne r2,r0,8008848 <_POSIX_Message_queue_Receive_support+0x104>
return length_out;
8008840: 2b 81 00 24 lw r1,(sp+36)
8008844: e0 00 00 0d bi 8008878 <_POSIX_Message_queue_Receive_support+0x134>
rtems_set_errno_and_return_minus_one(
8008848: f8 00 2e a6 calli 80142e0 <__errno>
800884c: b8 20 60 00 mv r12,r1
8008850: 29 61 00 00 lw r1,(r11+0)
8008854: 28 21 00 34 lw r1,(r1+52)
8008858: f8 00 00 c0 calli 8008b58 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
800885c: 59 81 00 00 sw (r12+0),r1
8008860: b9 a0 08 00 mv r1,r13
8008864: e0 00 00 05 bi 8008878 <_POSIX_Message_queue_Receive_support+0x134>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
8008868: f8 00 2e 9e calli 80142e0 <__errno>
800886c: 34 02 00 09 mvi r2,9
8008870: 58 22 00 00 sw (r1+0),r2
8008874: 34 01 ff ff mvi r1,-1
}
8008878: 2b 9d 00 04 lw ra,(sp+4)
800887c: 2b 8b 00 20 lw r11,(sp+32)
8008880: 2b 8c 00 1c lw r12,(sp+28)
8008884: 2b 8d 00 18 lw r13,(sp+24)
8008888: 2b 8e 00 14 lw r14,(sp+20)
800888c: 2b 8f 00 10 lw r15,(sp+16)
8008890: 2b 90 00 0c lw r16,(sp+12)
8008894: 2b 91 00 08 lw r17,(sp+8)
8008898: 37 9c 00 28 addi sp,sp,40
800889c: c3 a0 00 00 ret
08006b20 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
8006b20: 37 9c ff fc addi sp,sp,-4
8006b24: 5b 9d 00 04 sw (sp+4),ra
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
8006b28: 28 22 01 2c lw r2,(r1+300)
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
8006b2c: 28 43 00 d4 lw r3,(r2+212)
8006b30: 5c 60 00 0e bne r3,r0,8006b68 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x48><== NEVER TAKEN
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
8006b34: 28 44 00 d8 lw r4,(r2+216)
8006b38: 34 03 00 01 mvi r3,1
8006b3c: 5c 83 00 0b bne r4,r3,8006b68 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x48>
thread_support->cancelation_requested ) {
8006b40: 28 42 00 dc lw r2,(r2+220)
8006b44: 44 40 00 09 be r2,r0,8006b68 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x48>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
8006b48: 78 03 08 01 mvhi r3,0x801
8006b4c: 38 63 e8 6c ori r3,r3,0xe86c
8006b50: 28 64 00 00 lw r4,(r3+0)
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
8006b54: 34 02 ff ff mvi r2,-1
8006b58: b4 82 20 00 add r4,r4,r2
8006b5c: 58 64 00 00 sw (r3+0),r4
8006b60: f8 00 01 e5 calli 80072f4 <_POSIX_Thread_Exit>
{
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
8006b64: e0 00 00 02 bi 8006b6c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x4c>
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
8006b68: fb ff f4 d0 calli 8003ea8 <_Thread_Enable_dispatch>
}
8006b6c: 2b 9d 00 04 lw ra,(sp+4)
8006b70: 37 9c 00 04 addi sp,sp,4
8006b74: c3 a0 00 00 ret
080090c8 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
80090c8: 37 9c ff ec addi sp,sp,-20
80090cc: 5b 8b 00 14 sw (sp+20),r11
80090d0: 5b 8c 00 10 sw (sp+16),r12
80090d4: 5b 8d 00 0c sw (sp+12),r13
80090d8: 5b 8e 00 08 sw (sp+8),r14
80090dc: 5b 9d 00 04 sw (sp+4),ra
80090e0: b8 20 60 00 mv r12,r1
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
80090e4: 28 41 00 00 lw r1,(r2+0)
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
80090e8: b8 40 58 00 mv r11,r2
80090ec: b8 60 68 00 mv r13,r3
80090f0: b8 80 70 00 mv r14,r4
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
80090f4: fb ff ff ed calli 80090a8 <_POSIX_Priority_Is_valid>
80090f8: 34 02 00 00 mvi r2,0
80090fc: 44 22 00 2b be r1,r2,80091a8 <_POSIX_Thread_Translate_sched_param+0xe0><== NEVER TAKEN
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
8009100: 59 a2 00 00 sw (r13+0),r2
*budget_callout = NULL;
8009104: 59 c2 00 00 sw (r14+0),r2
if ( policy == SCHED_OTHER ) {
8009108: 5d 82 00 05 bne r12,r2,800911c <_POSIX_Thread_Translate_sched_param+0x54>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
800910c: 34 01 00 01 mvi r1,1
8009110: 59 a1 00 00 sw (r13+0),r1
8009114: b9 80 08 00 mv r1,r12
return 0;
8009118: e0 00 00 25 bi 80091ac <_POSIX_Thread_Translate_sched_param+0xe4>
}
if ( policy == SCHED_FIFO ) {
800911c: 34 01 00 01 mvi r1,1
8009120: 5d 81 00 03 bne r12,r1,800912c <_POSIX_Thread_Translate_sched_param+0x64>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
8009124: 59 a2 00 00 sw (r13+0),r2
8009128: e0 00 00 04 bi 8009138 <_POSIX_Thread_Translate_sched_param+0x70>
return 0;
}
if ( policy == SCHED_RR ) {
800912c: 34 01 00 02 mvi r1,2
8009130: 5d 81 00 04 bne r12,r1,8009140 <_POSIX_Thread_Translate_sched_param+0x78>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
8009134: 59 ac 00 00 sw (r13+0),r12
8009138: b8 40 08 00 mv r1,r2
return 0;
800913c: e0 00 00 1c bi 80091ac <_POSIX_Thread_Translate_sched_param+0xe4>
}
if ( policy == SCHED_SPORADIC ) {
8009140: 34 01 00 04 mvi r1,4
8009144: 5d 81 00 19 bne r12,r1,80091a8 <_POSIX_Thread_Translate_sched_param+0xe0>
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
8009148: 29 61 00 08 lw r1,(r11+8)
800914c: 5c 20 00 03 bne r1,r0,8009158 <_POSIX_Thread_Translate_sched_param+0x90>
(param->sched_ss_repl_period.tv_nsec == 0) )
8009150: 29 62 00 0c lw r2,(r11+12)
8009154: 44 41 00 15 be r2,r1,80091a8 <_POSIX_Thread_Translate_sched_param+0xe0>
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
8009158: 29 61 00 10 lw r1,(r11+16)
800915c: 5c 20 00 03 bne r1,r0,8009168 <_POSIX_Thread_Translate_sched_param+0xa0>
(param->sched_ss_init_budget.tv_nsec == 0) )
8009160: 29 62 00 14 lw r2,(r11+20)
8009164: 44 41 00 11 be r2,r1,80091a8 <_POSIX_Thread_Translate_sched_param+0xe0>
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
8009168: 35 61 00 08 addi r1,r11,8
800916c: fb ff f4 a8 calli 800640c <_Timespec_To_ticks>
8009170: b8 20 60 00 mv r12,r1
8009174: 35 61 00 10 addi r1,r11,16
8009178: fb ff f4 a5 calli 800640c <_Timespec_To_ticks>
800917c: 54 2c 00 0b bgu r1,r12,80091a8 <_POSIX_Thread_Translate_sched_param+0xe0>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
8009180: 29 61 00 04 lw r1,(r11+4)
8009184: fb ff ff c9 calli 80090a8 <_POSIX_Priority_Is_valid>
8009188: 44 20 00 08 be r1,r0,80091a8 <_POSIX_Thread_Translate_sched_param+0xe0>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
800918c: 78 01 08 00 mvhi r1,0x800
8009190: 38 21 2f c8 ori r1,r1,0x2fc8
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
8009194: 34 02 00 03 mvi r2,3
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
8009198: 59 c1 00 00 sw (r14+0),r1
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
800919c: 59 a2 00 00 sw (r13+0),r2
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
80091a0: 34 01 00 00 mvi r1,0
return 0;
80091a4: e0 00 00 02 bi 80091ac <_POSIX_Thread_Translate_sched_param+0xe4>
80091a8: 34 01 00 16 mvi r1,22
}
return EINVAL;
}
80091ac: 2b 9d 00 04 lw ra,(sp+4)
80091b0: 2b 8b 00 14 lw r11,(sp+20)
80091b4: 2b 8c 00 10 lw r12,(sp+16)
80091b8: 2b 8d 00 0c lw r13,(sp+12)
80091bc: 2b 8e 00 08 lw r14,(sp+8)
80091c0: 37 9c 00 14 addi sp,sp,20
80091c4: c3 a0 00 00 ret
08002c84 <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
8002c84: 37 9c ff ac addi sp,sp,-84
8002c88: 5b 8b 00 14 sw (sp+20),r11
8002c8c: 5b 8c 00 10 sw (sp+16),r12
8002c90: 5b 8d 00 0c sw (sp+12),r13
8002c94: 5b 8e 00 08 sw (sp+8),r14
8002c98: 5b 9d 00 04 sw (sp+4),ra
uint32_t maximum;
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
8002c9c: 78 01 08 01 mvhi r1,0x801
8002ca0: 38 21 e0 a8 ori r1,r1,0xe0a8
maximum = Configuration_POSIX_API.number_of_initialization_threads;
8002ca4: 28 2e 00 30 lw r14,(r1+48)
uint32_t maximum;
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
8002ca8: 28 2c 00 34 lw r12,(r1+52)
maximum = Configuration_POSIX_API.number_of_initialization_threads;
if ( !user_threads || maximum == 0 )
8002cac: 65 cd 00 00 cmpei r13,r14,0
8002cb0: 65 81 00 00 cmpei r1,r12,0
8002cb4: b9 a1 68 00 or r13,r13,r1
8002cb8: 5d a0 00 17 bne r13,r0,8002d14 <_POSIX_Threads_Initialize_user_threads_body+0x90><== NEVER TAKEN
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
8002cbc: 37 8b 00 18 addi r11,sp,24
8002cc0: b9 60 08 00 mv r1,r11
8002cc4: f8 00 19 41 calli 80091c8 <pthread_attr_init>
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
8002cc8: 34 02 00 02 mvi r2,2
8002ccc: b9 60 08 00 mv r1,r11
8002cd0: f8 00 19 4b calli 80091fc <pthread_attr_setinheritsched>
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
8002cd4: 29 82 00 04 lw r2,(r12+4)
8002cd8: b9 60 08 00 mv r1,r11
8002cdc: f8 00 19 55 calli 8009230 <pthread_attr_setstacksize>
status = pthread_create(
8002ce0: 29 83 00 00 lw r3,(r12+0)
8002ce4: 37 81 00 54 addi r1,sp,84
8002ce8: b9 60 10 00 mv r2,r11
8002cec: 34 04 00 00 mvi r4,0
8002cf0: fb ff ff 12 calli 8002938 <pthread_create>
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
8002cf4: 44 20 00 05 be r1,r0,8002d08 <_POSIX_Threads_Initialize_user_threads_body+0x84>
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
8002cf8: b8 20 18 00 mv r3,r1
8002cfc: 34 02 00 01 mvi r2,1
8002d00: 34 01 00 02 mvi r1,2
8002d04: f8 00 06 19 calli 8004568 <_Internal_error_Occurred>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
8002d08: 35 ad 00 01 addi r13,r13,1
8002d0c: 35 8c 00 08 addi r12,r12,8
8002d10: 55 cd ff ec bgu r14,r13,8002cc0 <_POSIX_Threads_Initialize_user_threads_body+0x3c><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
8002d14: 2b 9d 00 04 lw ra,(sp+4)
8002d18: 2b 8b 00 14 lw r11,(sp+20)
8002d1c: 2b 8c 00 10 lw r12,(sp+16)
8002d20: 2b 8d 00 0c lw r13,(sp+12)
8002d24: 2b 8e 00 08 lw r14,(sp+8)
8002d28: 37 9c 00 54 addi sp,sp,84
8002d2c: c3 a0 00 00 ret
0800dd18 <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
800dd18: 37 9c ff f4 addi sp,sp,-12
800dd1c: 5b 8b 00 0c sw (sp+12),r11
800dd20: 5b 8c 00 08 sw (sp+8),r12
800dd24: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
800dd28: 28 4c 01 2c lw r12,(r2+300)
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
800dd2c: b8 40 58 00 mv r11,r2
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
800dd30: 35 81 00 94 addi r1,r12,148
800dd34: f8 00 08 d4 calli 8010084 <_Timespec_To_ticks>
800dd38: 78 02 08 02 mvhi r2,0x802
800dd3c: 38 42 50 a8 ori r2,r2,0x50a8
the_thread->cpu_time_budget = ticks;
800dd40: 59 61 00 78 sw (r11+120),r1
800dd44: 40 41 00 00 lbu r1,(r2+0)
800dd48: 29 82 00 84 lw r2,(r12+132)
*/
#if 0
printk( "TSR %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
800dd4c: 29 63 00 1c lw r3,(r11+28)
800dd50: c8 22 10 00 sub r2,r1,r2
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
the_thread->cpu_time_budget = ticks;
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
800dd54: 59 62 00 18 sw (r11+24),r2
*/
#if 0
printk( "TSR %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
800dd58: 5c 60 00 06 bne r3,r0,800dd70 <_POSIX_Threads_Sporadic_budget_TSR+0x58><== NEVER TAKEN
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
800dd5c: 29 61 00 14 lw r1,(r11+20)
800dd60: 50 41 00 04 bgeu r2,r1,800dd70 <_POSIX_Threads_Sporadic_budget_TSR+0x58>
_Thread_Change_priority( the_thread, new_priority, true );
800dd64: b9 60 08 00 mv r1,r11
800dd68: 34 03 00 01 mvi r3,1
800dd6c: fb ff e1 76 calli 8006344 <_Thread_Change_priority>
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
800dd70: 35 81 00 8c addi r1,r12,140
800dd74: f8 00 08 c4 calli 8010084 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
800dd78: 59 81 00 b0 sw (r12+176),r1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
800dd7c: 78 01 08 02 mvhi r1,0x802
800dd80: 38 21 5a 20 ori r1,r1,0x5a20
800dd84: 35 82 00 a4 addi r2,r12,164
800dd88: fb ff e7 52 calli 8007ad0 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
}
800dd8c: 2b 9d 00 04 lw ra,(sp+4)
800dd90: 2b 8b 00 0c lw r11,(sp+12)
800dd94: 2b 8c 00 08 lw r12,(sp+8)
800dd98: 37 9c 00 0c addi sp,sp,12
800dd9c: c3 a0 00 00 ret
0800dcc8 <_POSIX_Threads_Sporadic_budget_callout>:
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
800dcc8: 37 9c ff fc addi sp,sp,-4
800dccc: 5b 9d 00 04 sw (sp+4),ra
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
800dcd0: 28 25 01 2c lw r5,(r1+300)
/*
* This will prevent the thread from consuming its entire "budget"
* while at low priority.
*/
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
800dcd4: 34 04 ff ff mvi r4,-1
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
800dcd8: 78 02 08 02 mvhi r2,0x802
800dcdc: 38 42 50 a8 ori r2,r2,0x50a8
800dce0: 58 24 00 78 sw (r1+120),r4
800dce4: 40 44 00 00 lbu r4,(r2+0)
800dce8: 28 a2 00 88 lw r2,(r5+136)
*/
#if 0
printk( "callout %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
800dcec: 28 25 00 1c lw r5,(r1+28)
800dcf0: c8 82 10 00 sub r2,r4,r2
* while at low priority.
*/
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
800dcf4: 58 22 00 18 sw (r1+24),r2
*/
#if 0
printk( "callout %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
800dcf8: 5c a0 00 05 bne r5,r0,800dd0c <_POSIX_Threads_Sporadic_budget_callout+0x44><== NEVER TAKEN
/*
* Make sure we are actually lowering it. If they have lowered it
* to logically lower than sched_ss_low_priority, then we do not want to
* change it.
*/
if ( the_thread->current_priority < new_priority ) {
800dcfc: 28 23 00 14 lw r3,(r1+20)
800dd00: 50 62 00 03 bgeu r3,r2,800dd0c <_POSIX_Threads_Sporadic_budget_callout+0x44><== NEVER TAKEN
_Thread_Change_priority( the_thread, new_priority, true );
800dd04: 34 03 00 01 mvi r3,1
800dd08: fb ff e1 8f calli 8006344 <_Thread_Change_priority>
#if 0
printk( "lower priority\n" );
#endif
}
}
}
800dd0c: 2b 9d 00 04 lw ra,(sp+4)
800dd10: 37 9c 00 04 addi sp,sp,4
800dd14: c3 a0 00 00 ret
080028fc <_POSIX_Timer_TSR>:
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(
Objects_Id timer __attribute__((unused)),
void *data)
{
80028fc: 37 9c ff f8 addi sp,sp,-8
8002900: 5b 8b 00 08 sw (sp+8),r11
8002904: 5b 9d 00 04 sw (sp+4),ra
8002908: b8 40 58 00 mv r11,r2
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
800290c: 28 42 00 68 lw r2,(r2+104)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
8002910: 29 61 00 54 lw r1,(r11+84)
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
8002914: 34 42 00 01 addi r2,r2,1
8002918: 59 62 00 68 sw (r11+104),r2
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
800291c: 5c 20 00 03 bne r1,r0,8002928 <_POSIX_Timer_TSR+0x2c>
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
8002920: 29 62 00 58 lw r2,(r11+88)
8002924: 44 41 00 0d be r2,r1,8002958 <_POSIX_Timer_TSR+0x5c> <== NEVER TAKEN
activated = _POSIX_Timer_Insert_helper(
8002928: 29 62 00 64 lw r2,(r11+100)
800292c: 29 63 00 08 lw r3,(r11+8)
8002930: 78 04 08 00 mvhi r4,0x800
8002934: 38 84 28 fc ori r4,r4,0x28fc
8002938: 35 61 00 10 addi r1,r11,16
800293c: b9 60 28 00 mv r5,r11
8002940: f8 00 15 8a calli 8007f68 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
8002944: 44 20 00 0c be r1,r0,8002974 <_POSIX_Timer_TSR+0x78> <== NEVER TAKEN
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
8002948: 35 61 00 6c addi r1,r11,108
800294c: f8 00 03 1e calli 80035c4 <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
8002950: 34 01 00 03 mvi r1,3
8002954: e0 00 00 02 bi 800295c <_POSIX_Timer_TSR+0x60>
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
8002958: 34 01 00 04 mvi r1,4 <== NOT EXECUTED
800295c: 31 61 00 3c sb (r11+60),r1
/*
* The sending of the signal to the process running the handling function
* specified for that signal is simulated
*/
if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) {
8002960: 29 62 00 44 lw r2,(r11+68)
8002964: 29 61 00 38 lw r1,(r11+56)
8002968: f8 00 14 2a calli 8007a10 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
800296c: 34 01 00 00 mvi r1,0
8002970: 59 61 00 68 sw (r11+104),r1
}
8002974: 2b 9d 00 04 lw ra,(sp+4)
8002978: 2b 8b 00 08 lw r11,(sp+8)
800297c: 37 9c 00 08 addi sp,sp,8
8002980: c3 a0 00 00 ret
08012008 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
8012008: 37 9c ff e0 addi sp,sp,-32
801200c: 5b 8b 00 14 sw (sp+20),r11
8012010: 5b 8c 00 10 sw (sp+16),r12
8012014: 5b 8d 00 0c sw (sp+12),r13
8012018: 5b 8e 00 08 sw (sp+8),r14
801201c: 5b 9d 00 04 sw (sp+4),ra
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
8012020: 37 8e 00 18 addi r14,sp,24
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
8012024: 20 64 00 ff andi r4,r3,0xff
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
8012028: 34 05 00 01 mvi r5,1
801202c: b9 c0 18 00 mv r3,r14
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
8012030: b8 20 60 00 mv r12,r1
8012034: b8 40 58 00 mv r11,r2
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
8012038: f8 00 00 25 calli 80120cc <_POSIX_signals_Clear_signals>
801203c: 44 20 00 1c be r1,r0,80120ac <_POSIX_signals_Check_signal+0xa4>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
8012040: b5 6b 08 00 add r1,r11,r11
8012044: b4 2b 08 00 add r1,r1,r11
8012048: 78 0d 08 02 mvhi r13,0x802
801204c: 34 02 00 02 mvi r2,2
8012050: fb ff ba df calli 8000bcc <__ashlsi3>
8012054: 39 ad 5e 44 ori r13,r13,0x5e44
8012058: b5 a1 20 00 add r4,r13,r1
801205c: 28 85 00 08 lw r5,(r4+8)
8012060: 34 01 00 01 mvi r1,1
8012064: 44 a1 00 12 be r5,r1,80120ac <_POSIX_signals_Check_signal+0xa4><== NEVER TAKEN
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
8012068: 29 8d 00 cc lw r13,(r12+204)
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
801206c: 28 81 00 04 lw r1,(r4+4)
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
8012070: 28 82 00 00 lw r2,(r4+0)
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
8012074: b8 2d 08 00 or r1,r1,r13
8012078: 59 81 00 cc sw (r12+204),r1
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
801207c: 34 01 00 02 mvi r1,2
8012080: 5c 41 00 06 bne r2,r1,8012098 <_POSIX_signals_Check_signal+0x90>
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
8012084: b9 60 08 00 mv r1,r11
8012088: b9 c0 10 00 mv r2,r14
801208c: 34 03 00 00 mvi r3,0
8012090: d8 a0 00 00 call r5
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
8012094: e0 00 00 03 bi 80120a0 <_POSIX_signals_Check_signal+0x98>
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
8012098: b9 60 08 00 mv r1,r11
801209c: d8 a0 00 00 call r5
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
80120a0: 59 8d 00 cc sw (r12+204),r13
80120a4: 34 01 00 01 mvi r1,1
return true;
80120a8: e0 00 00 02 bi 80120b0 <_POSIX_signals_Check_signal+0xa8>
80120ac: 34 01 00 00 mvi r1,0
}
80120b0: 2b 9d 00 04 lw ra,(sp+4)
80120b4: 2b 8b 00 14 lw r11,(sp+20)
80120b8: 2b 8c 00 10 lw r12,(sp+16)
80120bc: 2b 8d 00 0c lw r13,(sp+12)
80120c0: 2b 8e 00 08 lw r14,(sp+8)
80120c4: 37 9c 00 20 addi sp,sp,32
80120c8: c3 a0 00 00 ret
08012a8c <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
8012a8c: 37 9c ff f0 addi sp,sp,-16
8012a90: 5b 8b 00 10 sw (sp+16),r11
8012a94: 5b 8c 00 0c sw (sp+12),r12
8012a98: 5b 8d 00 08 sw (sp+8),r13
8012a9c: 5b 9d 00 04 sw (sp+4),ra
8012aa0: b8 20 58 00 mv r11,r1
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
8012aa4: 90 00 68 00 rcsr r13,IE
8012aa8: 34 01 ff fe mvi r1,-2
8012aac: a1 a1 08 00 and r1,r13,r1
8012ab0: d0 01 00 00 wcsr IE,r1
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
8012ab4: b5 6b 08 00 add r1,r11,r11
8012ab8: 34 02 00 02 mvi r2,2
8012abc: b4 2b 08 00 add r1,r1,r11
8012ac0: 78 0c 08 02 mvhi r12,0x802
8012ac4: fb ff b8 42 calli 8000bcc <__ashlsi3>
8012ac8: 39 8c 5e 44 ori r12,r12,0x5e44
8012acc: b5 81 60 00 add r12,r12,r1
8012ad0: 29 83 00 00 lw r3,(r12+0)
8012ad4: 34 02 00 02 mvi r2,2
8012ad8: 5c 62 00 07 bne r3,r2,8012af4 <_POSIX_signals_Clear_process_signals+0x68>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
8012adc: 78 02 08 02 mvhi r2,0x802
8012ae0: 38 42 60 3c ori r2,r2,0x603c
8012ae4: b4 22 10 00 add r2,r1,r2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
8012ae8: 28 41 00 00 lw r1,(r2+0)
8012aec: 34 42 00 04 addi r2,r2,4
8012af0: 5c 22 00 10 bne r1,r2,8012b30 <_POSIX_signals_Clear_process_signals+0xa4><== NEVER TAKEN
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
8012af4: 35 62 ff ff addi r2,r11,-1
8012af8: 34 01 00 01 mvi r1,1
8012afc: fb ff b8 34 calli 8000bcc <__ashlsi3>
8012b00: 78 02 08 02 mvhi r2,0x802
8012b04: 38 42 60 38 ori r2,r2,0x6038
8012b08: 28 43 00 00 lw r3,(r2+0)
8012b0c: a4 20 08 00 not r1,r1
8012b10: a0 23 08 00 and r1,r1,r3
8012b14: 58 41 00 00 sw (r2+0),r1
if ( !_POSIX_signals_Pending )
8012b18: 5c 20 00 06 bne r1,r0,8012b30 <_POSIX_signals_Clear_process_signals+0xa4><== NEVER TAKEN
_Thread_Do_post_task_switch_extension--;
8012b1c: 78 01 08 02 mvhi r1,0x802
8012b20: 38 21 59 e4 ori r1,r1,0x59e4
8012b24: 28 22 00 00 lw r2,(r1+0)
8012b28: 34 42 ff ff addi r2,r2,-1
8012b2c: 58 22 00 00 sw (r1+0),r2
}
_ISR_Enable( level );
8012b30: d0 0d 00 00 wcsr IE,r13
}
8012b34: 2b 9d 00 04 lw ra,(sp+4)
8012b38: 2b 8b 00 10 lw r11,(sp+16)
8012b3c: 2b 8c 00 0c lw r12,(sp+12)
8012b40: 2b 8d 00 08 lw r13,(sp+8)
8012b44: 37 9c 00 10 addi sp,sp,16
8012b48: c3 a0 00 00 ret
0800357c <_POSIX_signals_Get_highest>:
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
800357c: 37 9c ff f0 addi sp,sp,-16
8003580: 5b 8b 00 10 sw (sp+16),r11
8003584: 5b 8c 00 0c sw (sp+12),r12
8003588: 5b 8d 00 08 sw (sp+8),r13
800358c: 5b 9d 00 04 sw (sp+4),ra
8003590: 34 0b 00 1b mvi r11,27
8003594: b8 20 60 00 mv r12,r1
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
8003598: 34 0d 00 20 mvi r13,32
if ( set & signo_to_mask( signo ) ) {
800359c: 35 62 ff ff addi r2,r11,-1
80035a0: 34 01 00 01 mvi r1,1
80035a4: fb ff f5 de calli 8000d1c <__ashlsi3>
80035a8: a0 2c 08 00 and r1,r1,r12
80035ac: 5c 20 00 0c bne r1,r0,80035dc <_POSIX_signals_Get_highest+0x60><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
80035b0: 35 6b 00 01 addi r11,r11,1
80035b4: 5d 6d ff fa bne r11,r13,800359c <_POSIX_signals_Get_highest+0x20>
80035b8: 34 0b 00 01 mvi r11,1
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
80035bc: 34 0d 00 1b mvi r13,27
if ( set & signo_to_mask( signo ) ) {
80035c0: 35 62 ff ff addi r2,r11,-1
80035c4: 34 01 00 01 mvi r1,1
80035c8: fb ff f5 d5 calli 8000d1c <__ashlsi3>
80035cc: a0 2c 08 00 and r1,r1,r12
80035d0: 5c 20 00 03 bne r1,r0,80035dc <_POSIX_signals_Get_highest+0x60>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
80035d4: 35 6b 00 01 addi r11,r11,1
80035d8: 5d 6d ff fa bne r11,r13,80035c0 <_POSIX_signals_Get_highest+0x44><== ALWAYS TAKEN
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
80035dc: b9 60 08 00 mv r1,r11
80035e0: 2b 9d 00 04 lw ra,(sp+4)
80035e4: 2b 8b 00 10 lw r11,(sp+16)
80035e8: 2b 8c 00 0c lw r12,(sp+12)
80035ec: 2b 8d 00 08 lw r13,(sp+8)
80035f0: 37 9c 00 10 addi sp,sp,16
80035f4: c3 a0 00 00 ret
0801227c <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
801227c: 37 9c ff f0 addi sp,sp,-16
8012280: 5b 8b 00 10 sw (sp+16),r11
8012284: 5b 8c 00 0c sw (sp+12),r12
8012288: 5b 8d 00 08 sw (sp+8),r13
801228c: 5b 9d 00 04 sw (sp+4),ra
8012290: b8 20 58 00 mv r11,r1
8012294: b8 40 68 00 mv r13,r2
8012298: 34 01 00 01 mvi r1,1
801229c: 34 42 ff ff addi r2,r2,-1
80122a0: b8 60 60 00 mv r12,r3
80122a4: fb ff ba 4a calli 8000bcc <__ashlsi3>
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
80122a8: 29 64 00 10 lw r4,(r11+16)
80122ac: 78 05 10 00 mvhi r5,0x1000
80122b0: 38 a5 80 00 ori r5,r5,0x8000
80122b4: a0 85 10 00 and r2,r4,r5
{
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
80122b8: 29 63 01 2c lw r3,(r11+300)
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
80122bc: 5c 45 00 18 bne r2,r5,801231c <_POSIX_signals_Unblock_thread+0xa0>
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
80122c0: 29 62 00 30 lw r2,(r11+48)
80122c4: a0 22 10 00 and r2,r1,r2
80122c8: 5c 40 00 05 bne r2,r0,80122dc <_POSIX_signals_Unblock_thread+0x60>
80122cc: 28 63 00 cc lw r3,(r3+204)
80122d0: a4 60 18 00 not r3,r3
80122d4: a0 23 08 00 and r1,r1,r3
80122d8: 44 22 00 37 be r1,r2,80123b4 <_POSIX_signals_Unblock_thread+0x138>
the_thread->Wait.return_code = EINTR;
80122dc: 34 01 00 04 mvi r1,4
80122e0: 59 61 00 34 sw (r11+52),r1
the_info = (siginfo_t *) the_thread->Wait.return_argument;
80122e4: 29 61 00 28 lw r1,(r11+40)
if ( !info ) {
80122e8: 5d 80 00 06 bne r12,r0,8012300 <_POSIX_signals_Unblock_thread+0x84>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
80122ec: 34 02 00 01 mvi r2,1
the_info->si_value.sival_int = 0;
80122f0: 58 2c 00 08 sw (r1+8),r12
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
80122f4: 58 2d 00 00 sw (r1+0),r13
the_info->si_code = SI_USER;
80122f8: 58 22 00 04 sw (r1+4),r2
80122fc: e0 00 00 04 bi 801230c <_POSIX_signals_Unblock_thread+0x90>
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
8012300: b9 80 10 00 mv r2,r12
8012304: 34 03 00 0c mvi r3,12
8012308: f8 00 04 fa calli 80136f0 <memcpy>
}
_Thread_queue_Extract_with_proxy( the_thread );
801230c: b9 60 08 00 mv r1,r11
8012310: fb ff f6 d2 calli 800fe58 <_Thread_queue_Extract_with_proxy>
8012314: 34 01 00 01 mvi r1,1
return true;
8012318: e0 00 00 28 bi 80123b8 <_POSIX_signals_Unblock_thread+0x13c>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
801231c: 28 62 00 cc lw r2,(r3+204)
8012320: a4 40 10 00 not r2,r2
8012324: a0 22 08 00 and r1,r1,r2
8012328: 44 20 00 23 be r1,r0,80123b4 <_POSIX_signals_Unblock_thread+0x138>
* + Any other combination, do nothing.
*/
the_thread->do_post_task_switch_extension = true;
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
801232c: 78 01 10 00 mvhi r1,0x1000
8012330: 38 21 00 00 ori r1,r1,0x0
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
the_thread->do_post_task_switch_extension = true;
8012334: 34 02 00 01 mvi r2,1
8012338: 31 62 00 74 sb (r11+116),r2
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
801233c: a0 81 08 00 and r1,r4,r1
8012340: 44 20 00 0f be r1,r0,801237c <_POSIX_signals_Unblock_thread+0x100>
the_thread->Wait.return_code = EINTR;
8012344: 34 01 00 04 mvi r1,4
8012348: 59 61 00 34 sw (r11+52),r1
#if 0
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
else
#endif
if ( _States_Is_delaying(the_thread->current_state) ){
801234c: 20 84 00 08 andi r4,r4,0x8
8012350: 44 80 00 19 be r4,r0,80123b4 <_POSIX_signals_Unblock_thread+0x138><== NEVER TAKEN
if ( _Watchdog_Is_active( &the_thread->Timer ) )
8012354: 29 62 00 50 lw r2,(r11+80)
8012358: 34 01 00 02 mvi r1,2
801235c: 5c 41 00 03 bne r2,r1,8012368 <_POSIX_signals_Unblock_thread+0xec><== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
8012360: 35 61 00 48 addi r1,r11,72
8012364: fb ff d6 3a calli 8007c4c <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
8012368: 78 02 10 03 mvhi r2,0x1003
801236c: b9 60 08 00 mv r1,r11
8012370: 38 42 ff f8 ori r2,r2,0xfff8
8012374: fb ff f5 ad calli 800fa28 <_Thread_Clear_state>
8012378: e0 00 00 0f bi 80123b4 <_POSIX_signals_Unblock_thread+0x138>
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
801237c: 5c 81 00 0e bne r4,r1,80123b4 <_POSIX_signals_Unblock_thread+0x138><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
8012380: 78 01 08 02 mvhi r1,0x802
8012384: 38 21 59 dc ori r1,r1,0x59dc
8012388: 28 21 00 00 lw r1,(r1+0)
801238c: 44 24 00 0a be r1,r4,80123b4 <_POSIX_signals_Unblock_thread+0x138>
8012390: 78 01 08 02 mvhi r1,0x802
8012394: 38 21 5a 00 ori r1,r1,0x5a00
8012398: 28 21 00 00 lw r1,(r1+0)
801239c: 5d 61 00 06 bne r11,r1,80123b4 <_POSIX_signals_Unblock_thread+0x138><== NEVER TAKEN
_ISR_Signals_to_thread_executing = true;
80123a0: 78 01 08 02 mvhi r1,0x802
80123a4: 38 21 5a 98 ori r1,r1,0x5a98
80123a8: 30 22 00 00 sb (r1+0),r2
80123ac: b8 80 08 00 mv r1,r4
80123b0: e0 00 00 02 bi 80123b8 <_POSIX_signals_Unblock_thread+0x13c>
80123b4: 34 01 00 00 mvi r1,0
}
}
return false;
}
80123b8: 2b 9d 00 04 lw ra,(sp+4)
80123bc: 2b 8b 00 10 lw r11,(sp+16)
80123c0: 2b 8c 00 0c lw r12,(sp+12)
80123c4: 2b 8d 00 08 lw r13,(sp+8)
80123c8: 37 9c 00 10 addi sp,sp,16
80123cc: c3 a0 00 00 ret
0800ec24 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
800ec24: 37 9c ff f0 addi sp,sp,-16
800ec28: 5b 8b 00 0c sw (sp+12),r11
800ec2c: 5b 8c 00 08 sw (sp+8),r12
800ec30: 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 ];
800ec34: 28 2b 01 28 lw r11,(r1+296)
if ( !api )
800ec38: 45 60 00 1b be r11,r0,800eca4 <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
800ec3c: 90 00 08 00 rcsr r1,IE
800ec40: 34 02 ff fe mvi r2,-2
800ec44: a0 22 10 00 and r2,r1,r2
800ec48: d0 02 00 00 wcsr IE,r2
signal_set = asr->signals_posted;
asr->signals_posted = 0;
800ec4c: 34 02 00 00 mvi r2,0
*/
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
800ec50: 29 6c 00 14 lw r12,(r11+20)
asr->signals_posted = 0;
800ec54: 59 62 00 14 sw (r11+20),r2
_ISR_Enable( level );
800ec58: d0 01 00 00 wcsr IE,r1
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
800ec5c: 45 80 00 12 be r12,r0,800eca4 <_RTEMS_tasks_Post_switch_extension+0x80>
return;
asr->nest_level += 1;
800ec60: 29 63 00 1c lw r3,(r11+28)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
800ec64: 29 61 00 10 lw r1,(r11+16)
800ec68: 38 02 ff ff mvu r2,0xffff
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
800ec6c: 34 63 00 01 addi r3,r3,1
800ec70: 59 63 00 1c sw (r11+28),r3
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
800ec74: 37 83 00 10 addi r3,sp,16
800ec78: fb ff ff 46 calli 800e990 <rtems_task_mode>
(*asr->handler)( signal_set );
800ec7c: 29 62 00 0c lw r2,(r11+12)
800ec80: b9 80 08 00 mv r1,r12
800ec84: d8 40 00 00 call r2
asr->nest_level -= 1;
800ec88: 29 63 00 1c lw r3,(r11+28)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
800ec8c: 2b 81 00 10 lw r1,(sp+16)
800ec90: 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;
800ec94: 34 63 ff ff addi r3,r3,-1
800ec98: 59 63 00 1c sw (r11+28),r3
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
800ec9c: 37 83 00 10 addi r3,sp,16
800eca0: fb ff ff 3c calli 800e990 <rtems_task_mode>
}
800eca4: 2b 9d 00 04 lw ra,(sp+4)
800eca8: 2b 8b 00 0c lw r11,(sp+12)
800ecac: 2b 8c 00 08 lw r12,(sp+8)
800ecb0: 37 9c 00 10 addi sp,sp,16
800ecb4: 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 38 94 ori r1,r1,0x3894
8003c50: 37 83 00 0c addi r3,sp,12
8003c54: f8 00 07 d3 calli 8005ba0 <_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 2d calli 800613c <_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 3a a8 ori r1,r1,0x3aa8
8003cc0: f8 00 0f d7 calli 8007c1c <_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 39 cc ori r1,r1,0x39cc
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 10 25 calli 80076d8 <_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 7f calli 800784c <_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 6b calli 800781c <_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 10 11 calli 80076d8 <_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 6b calli 800784c <_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 57 calli 800781c <_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
080052a4 <_TOD_Get>:
*/
void _TOD_Get(
struct timespec *time
)
{
80052a4: 37 9c ff e4 addi sp,sp,-28
80052a8: 5b 8b 00 0c sw (sp+12),r11
80052ac: 5b 8c 00 08 sw (sp+8),r12
80052b0: 5b 9d 00 04 sw (sp+4),ra
80052b4: 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 );
80052b8: 90 00 60 00 rcsr r12,IE
80052bc: 34 01 ff fe mvi r1,-2
80052c0: a1 81 08 00 and r1,r12,r1
80052c4: d0 01 00 00 wcsr IE,r1
now = _TOD_Now;
80052c8: 78 02 08 02 mvhi r2,0x802
80052cc: 38 42 59 d4 ori r2,r2,0x59d4
if ( _Watchdog_Nanoseconds_since_tick_handler )
80052d0: 78 03 08 02 mvhi r3,0x802
/* assume time checked for NULL by caller */
/* _TOD_Now is the native current time */
nanoseconds = 0;
_ISR_Disable( level );
now = _TOD_Now;
80052d4: 28 41 00 04 lw r1,(r2+4)
if ( _Watchdog_Nanoseconds_since_tick_handler )
80052d8: 38 63 5a e4 ori r3,r3,0x5ae4
/* assume time checked for NULL by caller */
/* _TOD_Now is the native current time */
nanoseconds = 0;
_ISR_Disable( level );
now = _TOD_Now;
80052dc: 28 42 00 00 lw r2,(r2+0)
if ( _Watchdog_Nanoseconds_since_tick_handler )
80052e0: 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;
80052e4: 5b 81 00 14 sw (sp+20),r1
80052e8: 5b 82 00 10 sw (sp+16),r2
if ( _Watchdog_Nanoseconds_since_tick_handler )
80052ec: b8 60 20 00 mv r4,r3
80052f0: 44 60 00 03 be r3,r0,80052fc <_TOD_Get+0x58> <== ALWAYS TAKEN
nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)();
80052f4: d8 60 00 00 call r3 <== NOT EXECUTED
80052f8: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
_ISR_Enable( level );
80052fc: d0 0c 00 00 wcsr IE,r12
_Timestamp_Set( &offset, 0, nanoseconds );
8005300: 34 03 00 00 mvi r3,0
_Timestamp_Add_to( &now, &offset );
8005304: 37 81 00 10 addi r1,sp,16
8005308: 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 );
800530c: 5b 83 00 18 sw (sp+24),r3
8005310: 5b 84 00 1c sw (sp+28),r4
_Timestamp_Add_to( &now, &offset );
8005314: f8 00 08 f0 calli 80076d4 <_Timespec_Add_to>
_Timestamp_To_timespec( &now, time );
8005318: 2b 81 00 14 lw r1,(sp+20)
800531c: 59 61 00 04 sw (r11+4),r1
8005320: 2b 81 00 10 lw r1,(sp+16)
8005324: 59 61 00 00 sw (r11+0),r1
}
8005328: 2b 9d 00 04 lw ra,(sp+4)
800532c: 2b 8b 00 0c lw r11,(sp+12)
8005330: 2b 8c 00 08 lw r12,(sp+8)
8005334: 37 9c 00 1c addi sp,sp,28
8005338: c3 a0 00 00 ret
0800f240 <_TOD_Get_uptime>:
*/
void _TOD_Get_uptime(
Timestamp_Control *uptime
)
{
800f240: 37 9c ff e4 addi sp,sp,-28
800f244: 5b 8b 00 0c sw (sp+12),r11
800f248: 5b 8c 00 08 sw (sp+8),r12
800f24c: 5b 9d 00 04 sw (sp+4),ra
800f250: 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 );
800f254: 90 00 60 00 rcsr r12,IE
800f258: 34 01 ff fe mvi r1,-2
800f25c: a1 81 08 00 and r1,r12,r1
800f260: d0 01 00 00 wcsr IE,r1
up = _TOD_Uptime;
800f264: 78 02 08 02 mvhi r2,0x802
800f268: 38 42 59 c4 ori r2,r2,0x59c4
if ( _Watchdog_Nanoseconds_since_tick_handler )
800f26c: 78 03 08 02 mvhi r3,0x802
/* assume time checked for NULL by caller */
/* _TOD_Uptime is in native timestamp format */
nanoseconds = 0;
_ISR_Disable( level );
up = _TOD_Uptime;
800f270: 28 41 00 04 lw r1,(r2+4)
if ( _Watchdog_Nanoseconds_since_tick_handler )
800f274: 38 63 5a e4 ori r3,r3,0x5ae4
/* assume time checked for NULL by caller */
/* _TOD_Uptime is in native timestamp format */
nanoseconds = 0;
_ISR_Disable( level );
up = _TOD_Uptime;
800f278: 28 42 00 00 lw r2,(r2+0)
if ( _Watchdog_Nanoseconds_since_tick_handler )
800f27c: 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;
800f280: 5b 81 00 14 sw (sp+20),r1
800f284: 5b 82 00 10 sw (sp+16),r2
if ( _Watchdog_Nanoseconds_since_tick_handler )
800f288: b8 60 20 00 mv r4,r3
800f28c: 44 60 00 03 be r3,r0,800f298 <_TOD_Get_uptime+0x58> <== ALWAYS TAKEN
nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)();
800f290: d8 60 00 00 call r3 <== NOT EXECUTED
800f294: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
_ISR_Enable( level );
800f298: d0 0c 00 00 wcsr IE,r12
_Timestamp_Set( &offset, 0, nanoseconds );
800f29c: 34 03 00 00 mvi r3,0
_Timestamp_Add_to( &up, &offset );
800f2a0: 37 81 00 10 addi r1,sp,16
800f2a4: 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 );
800f2a8: 5b 83 00 18 sw (sp+24),r3
800f2ac: 5b 84 00 1c sw (sp+28),r4
_Timestamp_Add_to( &up, &offset );
800f2b0: fb ff e1 09 calli 80076d4 <_Timespec_Add_to>
*uptime = up;
800f2b4: 2b 81 00 14 lw r1,(sp+20)
800f2b8: 59 61 00 04 sw (r11+4),r1
800f2bc: 2b 81 00 10 lw r1,(sp+16)
800f2c0: 59 61 00 00 sw (r11+0),r1
}
800f2c4: 2b 9d 00 04 lw ra,(sp+4)
800f2c8: 2b 8b 00 0c lw r11,(sp+12)
800f2cc: 2b 8c 00 08 lw r12,(sp+8)
800f2d0: 37 9c 00 1c addi sp,sp,28
800f2d4: c3 a0 00 00 ret
0800380c <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
800380c: 37 9c ff f4 addi sp,sp,-12
8003810: 5b 8b 00 0c sw (sp+12),r11
8003814: 5b 8c 00 08 sw (sp+8),r12
8003818: 5b 9d 00 04 sw (sp+4),ra
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
800381c: 78 02 08 02 mvhi r2,0x802
8003820: 38 42 40 c4 ori r2,r2,0x40c4
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
8003824: b8 20 58 00 mv r11,r1
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
8003828: 28 42 00 0c lw r2,(r2+12)
if ((!the_tod) ||
800382c: 44 20 00 22 be r1,r0,80038b4 <_TOD_Validate+0xa8> <== NEVER TAKEN
(the_tod->ticks >= ticks_per_second) ||
8003830: 78 01 00 0f mvhi r1,0xf
8003834: 38 21 42 40 ori r1,r1,0x4240
8003838: f8 00 70 25 calli 801f8cc <__udivsi3>
800383c: 29 62 00 18 lw r2,(r11+24)
8003840: 50 41 00 1d bgeu r2,r1,80038b4 <_TOD_Validate+0xa8>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
8003844: 29 62 00 14 lw r2,(r11+20)
8003848: 34 01 00 3b mvi r1,59
800384c: 54 41 00 1a bgu r2,r1,80038b4 <_TOD_Validate+0xa8>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
8003850: 29 62 00 10 lw r2,(r11+16)
8003854: 54 41 00 18 bgu r2,r1,80038b4 <_TOD_Validate+0xa8>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
8003858: 29 62 00 0c lw r2,(r11+12)
800385c: 34 01 00 17 mvi r1,23
8003860: 54 41 00 15 bgu r2,r1,80038b4 <_TOD_Validate+0xa8>
(the_tod->month == 0) ||
8003864: 29 61 00 04 lw r1,(r11+4)
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
8003868: 44 20 00 13 be r1,r0,80038b4 <_TOD_Validate+0xa8> <== NEVER TAKEN
800386c: 34 02 00 0c mvi r2,12
8003870: 54 22 00 11 bgu r1,r2,80038b4 <_TOD_Validate+0xa8>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
8003874: 29 62 00 00 lw r2,(r11+0)
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
8003878: 34 03 07 c3 mvi r3,1987
800387c: 50 62 00 0e bgeu r3,r2,80038b4 <_TOD_Validate+0xa8>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
8003880: 29 6c 00 08 lw r12,(r11+8)
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
8003884: 45 80 00 0c be r12,r0,80038b4 <_TOD_Validate+0xa8> <== NEVER TAKEN
8003888: 78 0b 08 02 mvhi r11,0x802
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
800388c: 20 42 00 03 andi r2,r2,0x3
8003890: 39 6b 13 c0 ori r11,r11,0x13c0
8003894: 5c 40 00 02 bne r2,r0,800389c <_TOD_Validate+0x90>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
8003898: 34 21 00 0d addi r1,r1,13
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
800389c: 34 02 00 02 mvi r2,2
80038a0: fb ff f6 62 calli 8001228 <__ashlsi3>
80038a4: b5 61 08 00 add r1,r11,r1
80038a8: 28 21 00 00 lw r1,(r1+0)
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
80038ac: f0 2c 08 00 cmpgeu r1,r1,r12
80038b0: e0 00 00 02 bi 80038b8 <_TOD_Validate+0xac>
80038b4: 34 01 00 00 mvi r1,0
if ( the_tod->day > days_in_month )
return false;
return true;
}
80038b8: 2b 9d 00 04 lw ra,(sp+4)
80038bc: 2b 8b 00 0c lw r11,(sp+12)
80038c0: 2b 8c 00 08 lw r12,(sp+8)
80038c4: 37 9c 00 0c addi sp,sp,12
80038c8: c3 a0 00 00 ret
08006344 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
8006344: 37 9c ff ec addi sp,sp,-20
8006348: 5b 8b 00 14 sw (sp+20),r11
800634c: 5b 8c 00 10 sw (sp+16),r12
8006350: 5b 8d 00 0c sw (sp+12),r13
8006354: 5b 8e 00 08 sw (sp+8),r14
8006358: 5b 9d 00 04 sw (sp+4),ra
800635c: b8 20 58 00 mv r11,r1
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
8006360: 28 2e 00 10 lw r14,(r1+16)
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
8006364: b8 40 60 00 mv r12,r2
8006368: 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 );
800636c: f8 00 04 5b calli 80074d8 <_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 )
8006370: 29 61 00 14 lw r1,(r11+20)
8006374: 44 2c 00 04 be r1,r12,8006384 <_Thread_Change_priority+0x40>
_Thread_Set_priority( the_thread, new_priority );
8006378: b9 80 10 00 mv r2,r12
800637c: b9 60 08 00 mv r1,r11
8006380: f8 00 03 b3 calli 800724c <_Thread_Set_priority>
_ISR_Disable( level );
8006384: 90 00 60 00 rcsr r12,IE
8006388: 34 05 ff fe mvi r5,-2
800638c: a1 85 28 00 and r5,r12,r5
8006390: 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;
8006394: 29 64 00 10 lw r4,(r11+16)
if ( state != STATES_TRANSIENT ) {
8006398: 34 01 00 04 mvi r1,4
800639c: 21 c2 00 04 andi r2,r14,0x4
80063a0: 44 81 00 0e be r4,r1,80063d8 <_Thread_Change_priority+0x94>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
80063a4: 5c 40 00 04 bne r2,r0,80063b4 <_Thread_Change_priority+0x70><== NEVER TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
80063a8: 34 01 ff fb mvi r1,-5
80063ac: a0 81 08 00 and r1,r4,r1
80063b0: 59 61 00 10 sw (r11+16),r1
_ISR_Enable( level );
80063b4: d0 0c 00 00 wcsr IE,r12
if ( _States_Is_waiting_on_thread_queue( state ) ) {
80063b8: 78 01 00 03 mvhi r1,0x3
80063bc: 38 21 be e0 ori r1,r1,0xbee0
80063c0: a0 81 08 00 and r1,r4,r1
80063c4: 44 20 00 5f be r1,r0,8006540 <_Thread_Change_priority+0x1fc>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
80063c8: 29 61 00 44 lw r1,(r11+68)
80063cc: b9 60 10 00 mv r2,r11
80063d0: f8 00 03 6c calli 8007180 <_Thread_queue_Requeue>
80063d4: e0 00 00 5b bi 8006540 <_Thread_Change_priority+0x1fc>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
80063d8: 5c 40 00 1c bne r2,r0,8006448 <_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;
80063dc: 29 61 00 90 lw r1,(r11+144)
80063e0: 2d 63 00 96 lhu r3,(r11+150)
_Priority_Major_bit_map |= the_priority_map->ready_major;
80063e4: 78 04 08 02 mvhi r4,0x802
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
80063e8: 2c 26 00 00 lhu r6,(r1+0)
_Priority_Major_bit_map |= the_priority_map->ready_major;
80063ec: 38 84 59 f4 ori r4,r4,0x59f4
* 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 );
80063f0: 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;
80063f4: b8 c3 18 00 or r3,r6,r3
80063f8: 0c 23 00 00 sh (r1+0),r3
_Priority_Major_bit_map |= the_priority_map->ready_major;
80063fc: 2c 83 00 00 lhu r3,(r4+0)
8006400: 2d 66 00 94 lhu r6,(r11+148)
8006404: 29 61 00 8c lw r1,(r11+140)
8006408: b8 c3 18 00 or r3,r6,r3
800640c: 20 63 ff ff andi r3,r3,0xffff
8006410: 0c 83 00 00 sh (r4+0),r3
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
8006414: 45 a2 00 07 be r13,r2,8006430 <_Thread_Change_priority+0xec>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
8006418: 28 22 00 00 lw r2,(r1+0)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
800641c: 59 61 00 04 sw (r11+4),r1
before_node = after_node->next;
after_node->next = the_node;
8006420: 58 2b 00 00 sw (r1+0),r11
the_node->next = before_node;
before_node->previous = the_node;
8006424: 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;
8006428: 59 62 00 00 sw (r11+0),r2
800642c: e0 00 00 07 bi 8006448 <_Thread_Change_priority+0x104>
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
8006430: 34 22 00 04 addi r2,r1,4
8006434: 59 62 00 00 sw (r11+0),r2
old_last_node = the_chain->last;
8006438: 28 22 00 08 lw r2,(r1+8)
the_chain->last = the_node;
800643c: 58 2b 00 08 sw (r1+8),r11
old_last_node->next = the_node;
the_node->previous = old_last_node;
8006440: 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;
8006444: 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 );
8006448: d0 0c 00 00 wcsr IE,r12
800644c: 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 );
8006450: 78 01 08 02 mvhi r1,0x802
8006454: 38 21 59 f4 ori r1,r1,0x59f4
8006458: 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;
800645c: 78 02 08 02 mvhi r2,0x802
8006460: 38 42 58 d0 ori r2,r2,0x58d0
8006464: 78 0b 08 02 mvhi r11,0x802
8006468: 28 4e 00 00 lw r14,(r2+0)
800646c: 20 21 ff ff andi r1,r1,0xffff
8006470: 34 02 00 ff mvi r2,255
8006474: 39 6b 2d 84 ori r11,r11,0x2d84
8006478: 54 22 00 05 bgu r1,r2,800648c <_Thread_Change_priority+0x148>
800647c: b5 61 58 00 add r11,r11,r1
8006480: 41 6d 00 00 lbu r13,(r11+0)
8006484: 35 ad 00 08 addi r13,r13,8
8006488: e0 00 00 05 bi 800649c <_Thread_Change_priority+0x158>
800648c: 34 02 00 08 mvi r2,8
8006490: fb ff e9 f7 calli 8000c6c <__lshrsi3>
8006494: b5 61 58 00 add r11,r11,r1
8006498: 41 6d 00 00 lbu r13,(r11+0)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
800649c: 78 02 08 02 mvhi r2,0x802
80064a0: b5 ad 08 00 add r1,r13,r13
80064a4: 38 42 5a 70 ori r2,r2,0x5a70
80064a8: b4 41 10 00 add r2,r2,r1
80064ac: 2c 41 00 00 lhu r1,(r2+0)
80064b0: 78 0b 08 02 mvhi r11,0x802
80064b4: 34 02 00 ff mvi r2,255
80064b8: 39 6b 2d 84 ori r11,r11,0x2d84
80064bc: 54 22 00 05 bgu r1,r2,80064d0 <_Thread_Change_priority+0x18c>
80064c0: b5 61 58 00 add r11,r11,r1
80064c4: 41 6b 00 00 lbu r11,(r11+0)
80064c8: 35 6b 00 08 addi r11,r11,8
80064cc: e0 00 00 05 bi 80064e0 <_Thread_Change_priority+0x19c>
80064d0: 34 02 00 08 mvi r2,8
80064d4: fb ff e9 e6 calli 8000c6c <__lshrsi3>
80064d8: b5 61 58 00 add r11,r11,r1
80064dc: 41 6b 00 00 lbu r11,(r11+0)
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
80064e0: 34 02 00 04 mvi r2,4
80064e4: b9 a0 08 00 mv r1,r13
80064e8: fb ff e9 b9 calli 8000bcc <__ashlsi3>
80064ec: b5 61 08 00 add r1,r11,r1
80064f0: b4 21 10 00 add r2,r1,r1
80064f4: b4 41 08 00 add r1,r2,r1
80064f8: 34 02 00 02 mvi r2,2
80064fc: fb ff e9 b4 calli 8000bcc <__ashlsi3>
8006500: 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 );
8006504: 78 02 08 02 mvhi r2,0x802
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
8006508: 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 );
800650c: 38 42 5a 00 ori r2,r2,0x5a00
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
8006510: 78 01 08 02 mvhi r1,0x802
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
8006514: 28 42 00 00 lw r2,(r2+0)
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
8006518: 38 21 59 d0 ori r1,r1,0x59d0
800651c: 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() &&
8006520: 44 43 00 07 be r2,r3,800653c <_Thread_Change_priority+0x1f8>
_Thread_Executing->is_preemptible )
8006524: 40 41 00 75 lbu r1,(r2+117)
8006528: 44 20 00 05 be r1,r0,800653c <_Thread_Change_priority+0x1f8>
_Context_Switch_necessary = true;
800652c: 78 01 08 02 mvhi r1,0x802
8006530: 38 21 5a 10 ori r1,r1,0x5a10
8006534: 34 02 00 01 mvi r2,1
8006538: 30 22 00 00 sb (r1+0),r2
_ISR_Enable( level );
800653c: d0 0c 00 00 wcsr IE,r12
}
8006540: 2b 9d 00 04 lw ra,(sp+4)
8006544: 2b 8b 00 14 lw r11,(sp+20)
8006548: 2b 8c 00 10 lw r12,(sp+16)
800654c: 2b 8d 00 0c lw r13,(sp+12)
8006550: 2b 8e 00 08 lw r14,(sp+8)
8006554: 37 9c 00 14 addi sp,sp,20
8006558: c3 a0 00 00 ret
0800fa28 <_Thread_Clear_state>:
)
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
800fa28: 90 00 18 00 rcsr r3,IE
800fa2c: 34 05 ff fe mvi r5,-2
800fa30: a0 65 28 00 and r5,r3,r5
800fa34: d0 05 00 00 wcsr IE,r5
current_state = the_thread->current_state;
800fa38: 28 24 00 10 lw r4,(r1+16)
if ( current_state & state ) {
800fa3c: a0 44 30 00 and r6,r2,r4
800fa40: 44 c0 00 2b be r6,r0,800faec <_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);
800fa44: a4 40 10 00 not r2,r2
800fa48: a0 44 10 00 and r2,r2,r4
current_state =
800fa4c: 58 22 00 10 sw (r1+16),r2
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
800fa50: 5c 40 00 27 bne r2,r0,800faec <_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;
800fa54: 28 26 00 90 lw r6,(r1+144)
800fa58: 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);
800fa5c: 28 24 00 8c lw r4,(r1+140)
800fa60: 2c c8 00 00 lhu r8,(r6+0)
_Priority_Major_bit_map |= the_priority_map->ready_major;
800fa64: 78 02 08 02 mvhi r2,0x802
800fa68: 38 42 59 f4 ori r2,r2,0x59f4
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
800fa6c: b9 07 38 00 or r7,r8,r7
800fa70: 0c c7 00 00 sh (r6+0),r7
_Priority_Major_bit_map |= the_priority_map->ready_major;
800fa74: 2c 47 00 00 lhu r7,(r2+0)
800fa78: 2c 28 00 94 lhu r8,(r1+148)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
800fa7c: 34 86 00 04 addi r6,r4,4
800fa80: 58 26 00 00 sw (r1+0),r6
old_last_node = the_chain->last;
800fa84: 28 86 00 08 lw r6,(r4+8)
800fa88: b9 07 38 00 or r7,r8,r7
the_chain->last = the_node;
800fa8c: 58 81 00 08 sw (r4+8),r1
800fa90: 20 e4 ff ff andi r4,r7,0xffff
800fa94: 0c 44 00 00 sh (r2+0),r4
old_last_node->next = the_node;
the_node->previous = old_last_node;
800fa98: 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;
800fa9c: 58 c1 00 00 sw (r6+0),r1
_ISR_Flash( level );
800faa0: d0 03 00 00 wcsr IE,r3
800faa4: 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 ) {
800faa8: 78 02 08 02 mvhi r2,0x802
800faac: 38 42 59 d0 ori r2,r2,0x59d0
800fab0: 28 44 00 00 lw r4,(r2+0)
800fab4: 28 25 00 14 lw r5,(r1+20)
800fab8: 28 84 00 14 lw r4,(r4+20)
800fabc: 50 a4 00 0c bgeu r5,r4,800faec <_Thread_Clear_state+0xc4>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
800fac0: 78 04 08 02 mvhi r4,0x802
800fac4: 38 84 5a 00 ori r4,r4,0x5a00
800fac8: 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;
800facc: 58 41 00 00 sw (r2+0),r1
if ( _Thread_Executing->is_preemptible ||
800fad0: 40 81 00 75 lbu r1,(r4+117)
800fad4: 5c 20 00 02 bne r1,r0,800fadc <_Thread_Clear_state+0xb4>
800fad8: 5c a1 00 05 bne r5,r1,800faec <_Thread_Clear_state+0xc4> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
800fadc: 78 01 08 02 mvhi r1,0x802
800fae0: 38 21 5a 10 ori r1,r1,0x5a10
800fae4: 34 02 00 01 mvi r2,1
800fae8: 30 22 00 00 sb (r1+0),r2
}
}
}
_ISR_Enable( level );
800faec: d0 03 00 00 wcsr IE,r3
}
800faf0: c3 a0 00 00 ret
0800bbe4 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
800bbe4: 37 9c ff f8 addi sp,sp,-8
800bbe8: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
800bbec: 37 82 00 08 addi r2,sp,8
800bbf0: f8 00 00 a2 calli 800be78 <_Thread_Get>
switch ( location ) {
800bbf4: 2b 82 00 08 lw r2,(sp+8)
800bbf8: 5c 40 00 09 bne r2,r0,800bc1c <_Thread_Delay_ended+0x38> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
800bbfc: 78 02 10 00 mvhi r2,0x1000
800bc00: 38 42 00 18 ori r2,r2,0x18
800bc04: fb ff ff 4e calli 800b93c <_Thread_Clear_state>
800bc08: 78 01 08 02 mvhi r1,0x802
800bc0c: 38 21 aa 34 ori r1,r1,0xaa34
800bc10: 28 22 00 00 lw r2,(r1+0)
800bc14: 34 42 ff ff addi r2,r2,-1
800bc18: 58 22 00 00 sw (r1+0),r2
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
800bc1c: 2b 9d 00 04 lw ra,(sp+4)
800bc20: 37 9c 00 08 addi sp,sp,8
800bc24: c3 a0 00 00 ret
08006660 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
8006660: 37 9c ff b0 addi sp,sp,-80
8006664: 5b 8b 00 40 sw (sp+64),r11
8006668: 5b 8c 00 3c sw (sp+60),r12
800666c: 5b 8d 00 38 sw (sp+56),r13
8006670: 5b 8e 00 34 sw (sp+52),r14
8006674: 5b 8f 00 30 sw (sp+48),r15
8006678: 5b 90 00 2c sw (sp+44),r16
800667c: 5b 91 00 28 sw (sp+40),r17
8006680: 5b 92 00 24 sw (sp+36),r18
8006684: 5b 93 00 20 sw (sp+32),r19
8006688: 5b 94 00 1c sw (sp+28),r20
800668c: 5b 95 00 18 sw (sp+24),r21
8006690: 5b 96 00 14 sw (sp+20),r22
8006694: 5b 97 00 10 sw (sp+16),r23
8006698: 5b 98 00 0c sw (sp+12),r24
800669c: 5b 99 00 08 sw (sp+8),r25
80066a0: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
80066a4: 78 01 08 02 mvhi r1,0x802
80066a8: 38 21 5a 00 ori r1,r1,0x5a00
80066ac: 28 2b 00 00 lw r11,(r1+0)
_ISR_Disable( level );
80066b0: 90 00 20 00 rcsr r4,IE
80066b4: 34 01 ff fe mvi r1,-2
80066b8: a0 81 08 00 and r1,r4,r1
80066bc: d0 01 00 00 wcsr IE,r1
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
80066c0: 78 14 08 02 mvhi r20,0x802
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
80066c4: 78 0f 08 02 mvhi r15,0x802
80066c8: 78 0d 08 02 mvhi r13,0x802
heir = _Thread_Heir;
80066cc: 78 12 08 02 mvhi r18,0x802
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
_Thread_Executing = heir;
80066d0: 78 0e 08 02 mvhi r14,0x802
#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;
80066d4: 78 11 08 02 mvhi r17,0x802
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
80066d8: 78 10 08 02 mvhi r16,0x802
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
80066dc: ba 80 98 00 mv r19,r20
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
80066e0: 39 ef 5a 10 ori r15,r15,0x5a10
80066e4: 39 ad 59 44 ori r13,r13,0x5944
heir = _Thread_Heir;
80066e8: 3a 52 59 d0 ori r18,r18,0x59d0
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
_Thread_Executing = heir;
80066ec: 39 ce 5a 00 ori r14,r14,0x5a00
#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;
80066f0: 3a 31 58 d4 ori r17,r17,0x58d4
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
80066f4: 3a 10 59 cc ori r16,r16,0x59cc
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
80066f8: 34 19 00 00 mvi r25,0
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
80066fc: 34 17 00 01 mvi r23,1
_ISR_Enable( level );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
8006700: 37 96 00 4c addi r22,sp,76
_Timestamp_Subtract(
8006704: 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;
8006708: 3a 73 5a 08 ori r19,r19,0x5a08
#endif
#endif
executing = _Thread_Executing;
_ISR_Disable( level );
800670c: 34 18 ff fe mvi r24,-2
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
8006710: e0 00 00 28 bi 80067b0 <_Thread_Dispatch+0x150>
heir = _Thread_Heir;
8006714: 2a 4c 00 00 lw r12,(r18+0)
_Thread_Dispatch_disable_level = 1;
8006718: 59 b7 00 00 sw (r13+0),r23
_Context_Switch_necessary = false;
800671c: 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 )
8006720: 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;
8006724: 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 )
8006728: 5c 37 00 03 bne r1,r23,8006734 <_Thread_Dispatch+0xd4>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
800672c: 2a 21 00 00 lw r1,(r17+0)
8006730: 59 81 00 78 sw (r12+120),r1
_ISR_Enable( level );
8006734: d0 04 00 00 wcsr IE,r4
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
8006738: ba c0 08 00 mv r1,r22
800673c: f8 00 22 c1 calli 800f240 <_TOD_Get_uptime>
_Timestamp_Subtract(
8006740: ba 80 08 00 mv r1,r20
8006744: ba a0 18 00 mv r3,r21
8006748: 38 21 5a 08 ori r1,r1,0x5a08
800674c: ba c0 10 00 mv r2,r22
8006750: f8 00 03 f8 calli 8007730 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
8006754: ba a0 10 00 mv r2,r21
8006758: 35 61 00 84 addi r1,r11,132
800675c: f8 00 03 de calli 80076d4 <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
8006760: 2b 83 00 4c lw r3,(sp+76)
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
8006764: 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 );
8006768: 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;
800676c: 5a 63 00 00 sw (r19+0),r3
8006770: 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 );
8006774: 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;
8006778: 5a 63 00 04 sw (r19+4),r3
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
800677c: 44 80 00 05 be r4,r0,8006790 <_Thread_Dispatch+0x130> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
8006780: 28 83 00 00 lw r3,(r4+0)
8006784: 59 63 01 24 sw (r11+292),r3
*_Thread_libc_reent = heir->libc_reent;
8006788: 29 83 01 24 lw r3,(r12+292)
800678c: 58 83 00 00 sw (r4+0),r3
}
_User_extensions_Thread_switch( executing, heir );
8006790: f8 00 04 b6 calli 8007a68 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
8006794: 35 61 00 d0 addi r1,r11,208
8006798: 35 82 00 d0 addi r2,r12,208
800679c: f8 00 05 98 calli 8007dfc <_CPU_Context_switch>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
80067a0: 29 cb 00 00 lw r11,(r14+0)
_ISR_Disable( level );
80067a4: 90 00 20 00 rcsr r4,IE
80067a8: a0 98 08 00 and r1,r4,r24
80067ac: d0 01 00 00 wcsr IE,r1
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
80067b0: 41 e5 00 00 lbu r5,(r15+0)
80067b4: 20 a5 00 ff andi r5,r5,0xff
80067b8: 5c a0 ff d7 bne r5,r0,8006714 <_Thread_Dispatch+0xb4>
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
80067bc: 59 a5 00 00 sw (r13+0),r5
_ISR_Enable( level );
80067c0: d0 04 00 00 wcsr IE,r4
if ( _Thread_Do_post_task_switch_extension ||
80067c4: 78 01 08 02 mvhi r1,0x802
80067c8: 38 21 59 e4 ori r1,r1,0x59e4
80067cc: 28 21 00 00 lw r1,(r1+0)
80067d0: 5c 20 00 03 bne r1,r0,80067dc <_Thread_Dispatch+0x17c>
executing->do_post_task_switch_extension ) {
80067d4: 41 62 00 74 lbu r2,(r11+116)
80067d8: 44 41 00 04 be r2,r1,80067e8 <_Thread_Dispatch+0x188>
executing->do_post_task_switch_extension = false;
80067dc: 34 01 00 00 mvi r1,0
80067e0: 31 61 00 74 sb (r11+116),r1
_API_extensions_Run_postswitch();
80067e4: fb ff f9 22 calli 8004c6c <_API_extensions_Run_postswitch>
}
}
80067e8: 2b 9d 00 04 lw ra,(sp+4)
80067ec: 2b 8b 00 40 lw r11,(sp+64)
80067f0: 2b 8c 00 3c lw r12,(sp+60)
80067f4: 2b 8d 00 38 lw r13,(sp+56)
80067f8: 2b 8e 00 34 lw r14,(sp+52)
80067fc: 2b 8f 00 30 lw r15,(sp+48)
8006800: 2b 90 00 2c lw r16,(sp+44)
8006804: 2b 91 00 28 lw r17,(sp+40)
8006808: 2b 92 00 24 lw r18,(sp+36)
800680c: 2b 93 00 20 lw r19,(sp+32)
8006810: 2b 94 00 1c lw r20,(sp+28)
8006814: 2b 95 00 18 lw r21,(sp+24)
8006818: 2b 96 00 14 lw r22,(sp+20)
800681c: 2b 97 00 10 lw r23,(sp+16)
8006820: 2b 98 00 0c lw r24,(sp+12)
8006824: 2b 99 00 08 lw r25,(sp+8)
8006828: 37 9c 00 50 addi sp,sp,80
800682c: c3 a0 00 00 ret
0800fbcc <_Thread_Evaluate_mode>:
bool _Thread_Evaluate_mode( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
800fbcc: 78 01 08 02 mvhi r1,0x802
800fbd0: 38 21 5a 00 ori r1,r1,0x5a00
800fbd4: 28 21 00 00 lw r1,(r1+0)
if ( !_States_Is_ready( executing->current_state ) ||
800fbd8: 28 22 00 10 lw r2,(r1+16)
800fbdc: 5c 40 00 07 bne r2,r0,800fbf8 <_Thread_Evaluate_mode+0x2c> <== NEVER TAKEN
800fbe0: 78 02 08 02 mvhi r2,0x802
800fbe4: 38 42 59 d0 ori r2,r2,0x59d0
800fbe8: 28 42 00 00 lw r2,(r2+0)
800fbec: 44 22 00 09 be r1,r2,800fc10 <_Thread_Evaluate_mode+0x44>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
800fbf0: 40 21 00 75 lbu r1,(r1+117)
800fbf4: 44 20 00 07 be r1,r0,800fc10 <_Thread_Evaluate_mode+0x44> <== NEVER TAKEN
_Context_Switch_necessary = true;
800fbf8: 78 01 08 02 mvhi r1,0x802
800fbfc: 38 21 5a 10 ori r1,r1,0x5a10
800fc00: 34 02 00 01 mvi r2,1
800fc04: 30 22 00 00 sb (r1+0),r2
800fc08: b8 40 08 00 mv r1,r2
return true;
800fc0c: c3 a0 00 00 ret
800fc10: 34 01 00 00 mvi r1,0
}
return false;
}
800fc14: c3 a0 00 00 ret
08012960 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
8012960: 37 9c ff f4 addi sp,sp,-12
8012964: 5b 8b 00 0c sw (sp+12),r11
8012968: 5b 8c 00 08 sw (sp+8),r12
801296c: 5b 9d 00 04 sw (sp+4),ra
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
8012970: 78 01 08 02 mvhi r1,0x802
8012974: 38 21 5a 00 ori r1,r1,0x5a00
8012978: 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;
801297c: 29 61 00 b8 lw r1,(r11+184)
_ISR_Set_level(level);
8012980: 64 21 00 00 cmpei r1,r1,0
8012984: d0 01 00 00 wcsr IE,r1
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
8012988: 78 02 08 02 mvhi r2,0x802
801298c: 38 42 57 82 ori r2,r2,0x5782
8012990: 40 4c 00 00 lbu r12,(r2+0)
doneConstructors = 1;
8012994: 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 );
8012998: 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;
801299c: 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 );
80129a0: fb ff d3 ab calli 800784c <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
80129a4: fb ff cf a3 calli 8006830 <_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) */ {
80129a8: 5d 80 00 02 bne r12,r0,80129b0 <_Thread_Handler+0x50>
INIT_NAME ();
80129ac: fb ff b5 95 calli 8000000 <RamBase>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
80129b0: 29 61 00 a0 lw r1,(r11+160)
80129b4: 5c 20 00 04 bne r1,r0,80129c4 <_Thread_Handler+0x64>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
80129b8: 29 62 00 9c lw r2,(r11+156)
80129bc: 29 61 00 a8 lw r1,(r11+168)
80129c0: e0 00 00 05 bi 80129d4 <_Thread_Handler+0x74>
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
80129c4: 34 02 00 01 mvi r2,1
80129c8: 5c 22 00 05 bne r1,r2,80129dc <_Thread_Handler+0x7c> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
80129cc: 29 62 00 9c lw r2,(r11+156)
80129d0: 29 61 00 a4 lw r1,(r11+164)
80129d4: d8 40 00 00 call r2
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
80129d8: 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 );
80129dc: b9 60 08 00 mv r1,r11
80129e0: fb ff d3 b2 calli 80078a8 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
80129e4: 34 01 00 00 mvi r1,0
80129e8: 34 02 00 01 mvi r2,1
80129ec: 34 03 00 06 mvi r3,6
80129f0: fb ff cb 7e calli 80057e8 <_Internal_error_Occurred>
08006b74 <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
8006b74: 37 9c ff f0 addi sp,sp,-16
8006b78: 5b 8b 00 10 sw (sp+16),r11
8006b7c: 5b 8c 00 0c sw (sp+12),r12
8006b80: 5b 8d 00 08 sw (sp+8),r13
8006b84: 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;
8006b88: 78 01 08 02 mvhi r1,0x802
8006b8c: 38 21 50 ac ori r1,r1,0x50ac
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
8006b90: 28 22 00 20 lw r2,(r1+32)
8006b94: 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;
8006b98: 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)
8006b9c: 64 42 00 00 cmpei r2,r2,0
8006ba0: 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;
8006ba4: 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)
8006ba8: 99 22 48 00 xor r9,r9,r2
8006bac: b9 20 58 00 mv r11,r9
8006bb0: 45 20 00 05 be r9,r0,8006bc4 <_Thread_Handler_initialization+0x50><== ALWAYS TAKEN
== (!Configuration.stack_free_hook) ) )
_Internal_error_Occurred(
8006bb4: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8006bb8: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8006bbc: 34 03 00 0f mvi r3,15 <== NOT EXECUTED
8006bc0: fb ff fb 0a calli 80057e8 <_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(
8006bc4: 78 0c 08 02 mvhi r12,0x802
8006bc8: 39 8c 50 a8 ori r12,r12,0x50a8
8006bcc: 41 81 00 00 lbu r1,(r12+0)
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
8006bd0: 78 08 08 02 mvhi r8,0x802
_Thread_Executing = NULL;
8006bd4: 78 05 08 02 mvhi r5,0x802
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
8006bd8: 34 21 00 01 addi r1,r1,1
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
_Thread_Executing = NULL;
_Thread_Heir = NULL;
8006bdc: 78 04 08 02 mvhi r4,0x802
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
8006be0: 78 03 08 02 mvhi r3,0x802
_Thread_Maximum_extensions = maximum_extensions;
8006be4: 78 07 08 02 mvhi r7,0x802
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
8006be8: 78 06 08 02 mvhi r6,0x802
_Thread_Heir = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
8006bec: 38 63 59 e4 ori r3,r3,0x59e4
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
8006bf0: 38 c6 58 d4 ori r6,r6,0x58d4
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
8006bf4: 39 08 5a 10 ori r8,r8,0x5a10
_Thread_Executing = NULL;
8006bf8: 38 a5 5a 00 ori r5,r5,0x5a00
_Thread_Heir = NULL;
8006bfc: 38 84 59 d0 ori r4,r4,0x59d0
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
8006c00: 38 e7 59 e0 ori r7,r7,0x59e0
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
8006c04: 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;
8006c08: 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;
8006c0c: 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(
8006c10: b4 41 08 00 add r1,r2,r1
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
8006c14: 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(
8006c18: 34 02 00 02 mvi r2,2
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
8006c1c: 58 ed 00 00 sw (r7+0),r13
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
_Thread_Executing = NULL;
8006c20: 58 a9 00 00 sw (r5+0),r9
_Thread_Heir = NULL;
8006c24: 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(
8006c28: fb ff e7 e9 calli 8000bcc <__ashlsi3>
8006c2c: f8 00 04 34 calli 8007cfc <_Workspace_Allocate_or_fatal_error>
8006c30: 78 02 08 02 mvhi r2,0x802
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
8006c34: 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(
8006c38: 38 42 58 d0 ori r2,r2,0x58d0
8006c3c: 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;
8006c40: 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);
8006c44: 34 22 00 04 addi r2,r1,4
8006c48: 58 22 00 00 sw (r1+0),r2
the_chain->permanent_null = NULL;
8006c4c: 58 26 00 04 sw (r1+4),r6
the_chain->last = _Chain_Head(the_chain);
8006c50: 58 21 00 08 sw (r1+8),r1
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
8006c54: 35 6b 00 01 addi r11,r11,1
8006c58: 34 21 00 0c addi r1,r1,12
8006c5c: 50 6b ff fa bgeu r3,r11,8006c44 <_Thread_Handler_initialization+0xd0>
/*
* Initialize this class of objects.
*/
_Objects_Initialize_information(
8006c60: 34 02 00 01 mvi r2,1
8006c64: 78 01 08 02 mvhi r1,0x802
8006c68: 38 21 5a a0 ori r1,r1,0x5aa0
8006c6c: b8 40 18 00 mv r3,r2
8006c70: b8 40 20 00 mv r4,r2
8006c74: 34 05 01 3c mvi r5,316
8006c78: 34 07 00 08 mvi r7,8
8006c7c: fb ff fc a7 calli 8005f18 <_Objects_Initialize_information>
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
8006c80: 2b 9d 00 04 lw ra,(sp+4)
8006c84: 2b 8b 00 10 lw r11,(sp+16)
8006c88: 2b 8c 00 0c lw r12,(sp+12)
8006c8c: 2b 8d 00 08 lw r13,(sp+8)
8006c90: 37 9c 00 10 addi sp,sp,16
8006c94: c3 a0 00 00 ret
08006954 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
8006954: 37 9c ff e0 addi sp,sp,-32
8006958: 5b 8b 00 20 sw (sp+32),r11
800695c: 5b 8c 00 1c sw (sp+28),r12
8006960: 5b 8d 00 18 sw (sp+24),r13
8006964: 5b 8e 00 14 sw (sp+20),r14
8006968: 5b 8f 00 10 sw (sp+16),r15
800696c: 5b 90 00 0c sw (sp+12),r16
8006970: 5b 91 00 08 sw (sp+8),r17
8006974: 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;
8006978: 34 05 00 00 mvi r5,0
800697c: 58 45 01 28 sw (r2+296),r5
8006980: 58 45 01 2c sw (r2+300),r5
8006984: 58 45 01 30 sw (r2+304),r5
extensions_area = NULL;
the_thread->libc_reent = NULL;
8006988: 58 45 01 24 sw (r2+292),r5
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
800698c: b8 40 58 00 mv r11,r2
8006990: b8 60 60 00 mv r12,r3
8006994: b8 20 80 00 mv r16,r1
8006998: b8 80 68 00 mv r13,r4
800699c: b8 c0 70 00 mv r14,r6
80069a0: b9 00 78 00 mv r15,r8
80069a4: 20 f1 00 ff andi r17,r7,0xff
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
80069a8: 5c 65 00 0e bne r3,r5,80069e0 <_Thread_Initialize+0x8c>
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
80069ac: b8 40 08 00 mv r1,r2
80069b0: b8 80 10 00 mv r2,r4
80069b4: f8 00 02 ee calli 800756c <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
80069b8: f5 a1 68 00 cmpgu r13,r13,r1
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
80069bc: b8 20 28 00 mv r5,r1
if ( !actual_stack_size || actual_stack_size < stack_size )
80069c0: 64 21 00 00 cmpei r1,r1,0
80069c4: b9 80 48 00 mv r9,r12
80069c8: b9 a1 68 00 or r13,r13,r1
80069cc: 5d ac 00 5f bne r13,r12,8006b48 <_Thread_Initialize+0x1f4>
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = true;
80069d0: 34 01 00 01 mvi r1,1
80069d4: 31 61 00 c0 sb (r11+192),r1
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
80069d8: 29 6c 00 cc lw r12,(r11+204)
80069dc: e0 00 00 03 bi 80069e8 <_Thread_Initialize+0x94>
the_thread->Start.core_allocated_stack = true;
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
80069e0: 30 45 00 c0 sb (r2+192),r5
80069e4: b8 80 28 00 mv r5,r4
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
80069e8: 34 04 00 00 mvi r4,0
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
80069ec: 78 02 08 02 mvhi r2,0x802
the_watchdog->routine = routine;
the_watchdog->id = id;
80069f0: 59 64 00 68 sw (r11+104),r4
80069f4: 38 42 59 e0 ori r2,r2,0x59e0
80069f8: 28 43 00 00 lw r3,(r2+0)
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
80069fc: 59 6c 00 c8 sw (r11+200),r12
the_stack->size = size;
8006a00: 59 65 00 c4 sw (r11+196),r5
the_watchdog->user_data = user_data;
8006a04: 59 64 00 6c sw (r11+108),r4
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
8006a08: 59 64 00 50 sw (r11+80),r4
the_watchdog->routine = routine;
8006a0c: 59 64 00 64 sw (r11+100),r4
8006a10: b8 60 60 00 mv r12,r3
8006a14: 44 64 00 07 be r3,r4,8006a30 <_Thread_Initialize+0xdc>
extensions_area = _Workspace_Allocate(
8006a18: 34 61 00 01 addi r1,r3,1
8006a1c: 34 02 00 02 mvi r2,2
8006a20: fb ff e8 6b calli 8000bcc <__ashlsi3>
8006a24: f8 00 04 c5 calli 8007d38 <_Workspace_Allocate>
8006a28: b8 20 60 00 mv r12,r1
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
8006a2c: 44 20 00 35 be r1,r0,8006b00 <_Thread_Initialize+0x1ac>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
8006a30: 59 6c 01 34 sw (r11+308),r12
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
8006a34: 45 80 00 0e be r12,r0,8006a6c <_Thread_Initialize+0x118>
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
8006a38: 78 02 08 02 mvhi r2,0x802
8006a3c: 38 42 59 e0 ori r2,r2,0x59e0
8006a40: 34 03 00 00 mvi r3,0
8006a44: 28 44 00 00 lw r4,(r2+0)
the_thread->extensions[i] = NULL;
8006a48: 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++ )
8006a4c: b8 60 10 00 mv r2,r3
8006a50: e0 00 00 06 bi 8006a68 <_Thread_Initialize+0x114>
the_thread->extensions[i] = NULL;
8006a54: 29 65 01 34 lw r5,(r11+308)
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
8006a58: 34 42 00 01 addi r2,r2,1
the_thread->extensions[i] = NULL;
8006a5c: b4 a3 28 00 add r5,r5,r3
8006a60: 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++ )
8006a64: 34 63 00 04 addi r3,r3,4
8006a68: 50 82 ff fb bgeu r4,r2,8006a54 <_Thread_Initialize+0x100>
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
8006a6c: 2b 81 00 24 lw r1,(sp+36)
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
8006a70: 31 71 00 ac sb (r11+172),r17
the_thread->Start.budget_algorithm = budget_algorithm;
8006a74: 59 6f 00 b0 sw (r11+176),r15
the_thread->Start.budget_callout = budget_callout;
8006a78: 59 61 00 b4 sw (r11+180),r1
switch ( budget_algorithm ) {
8006a7c: 34 01 00 02 mvi r1,2
8006a80: 5d e1 00 05 bne r15,r1,8006a94 <_Thread_Initialize+0x140>
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
8006a84: 78 02 08 02 mvhi r2,0x802
8006a88: 38 42 58 d4 ori r2,r2,0x58d4
8006a8c: 28 42 00 00 lw r2,(r2+0)
8006a90: 59 62 00 78 sw (r11+120),r2
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
8006a94: 2b 81 00 28 lw r1,(sp+40)
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
8006a98: 34 0d 00 00 mvi r13,0
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
8006a9c: 34 0f 00 01 mvi r15,1
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
8006aa0: b9 c0 10 00 mv r2,r14
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
8006aa4: 59 61 00 b8 sw (r11+184),r1
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
8006aa8: 59 6e 00 18 sw (r11+24),r14
the_thread->Start.initial_priority = priority;
8006aac: 59 6e 00 bc sw (r11+188),r14
_Thread_Set_priority( the_thread, priority );
8006ab0: b9 60 08 00 mv r1,r11
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
8006ab4: 59 6f 00 10 sw (r11+16),r15
the_thread->Wait.queue = NULL;
8006ab8: 59 6d 00 44 sw (r11+68),r13
the_thread->resource_count = 0;
8006abc: 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 );
8006ac0: f8 00 01 e3 calli 800724c <_Thread_Set_priority>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8006ac4: 29 61 00 08 lw r1,(r11+8)
8006ac8: 2a 0e 00 1c lw r14,(r16+28)
8006acc: 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 );
8006ad0: 59 6d 00 88 sw (r11+136),r13
8006ad4: 59 6d 00 84 sw (r11+132),r13
8006ad8: 20 21 ff ff andi r1,r1,0xffff
8006adc: fb ff e8 3c calli 8000bcc <__ashlsi3>
8006ae0: b5 c1 08 00 add r1,r14,r1
8006ae4: 58 2b 00 00 sw (r1+0),r11
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
8006ae8: 2b 81 00 2c lw r1,(sp+44)
8006aec: 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 );
8006af0: b9 60 08 00 mv r1,r11
8006af4: f8 00 03 a3 calli 8007980 <_User_extensions_Thread_create>
if ( extension_status )
8006af8: b9 e0 48 00 mv r9,r15
8006afc: 5c 2d 00 13 bne r1,r13,8006b48 <_Thread_Initialize+0x1f4>
return true;
failed:
if ( the_thread->libc_reent )
8006b00: 29 61 01 24 lw r1,(r11+292)
8006b04: 44 20 00 02 be r1,r0,8006b0c <_Thread_Initialize+0x1b8>
_Workspace_Free( the_thread->libc_reent );
8006b08: f8 00 04 97 calli 8007d64 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
8006b0c: 29 61 01 28 lw r1,(r11+296)
8006b10: 44 20 00 02 be r1,r0,8006b18 <_Thread_Initialize+0x1c4>
_Workspace_Free( the_thread->API_Extensions[i] );
8006b14: f8 00 04 94 calli 8007d64 <_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] )
8006b18: 29 61 01 2c lw r1,(r11+300)
8006b1c: 44 20 00 02 be r1,r0,8006b24 <_Thread_Initialize+0x1d0>
_Workspace_Free( the_thread->API_Extensions[i] );
8006b20: f8 00 04 91 calli 8007d64 <_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] )
8006b24: 29 61 01 30 lw r1,(r11+304)
8006b28: 44 20 00 02 be r1,r0,8006b30 <_Thread_Initialize+0x1dc> <== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
8006b2c: f8 00 04 8e calli 8007d64 <_Workspace_Free> <== NOT EXECUTED
if ( extensions_area )
8006b30: 45 80 00 03 be r12,r0,8006b3c <_Thread_Initialize+0x1e8>
(void) _Workspace_Free( extensions_area );
8006b34: b9 80 08 00 mv r1,r12
8006b38: f8 00 04 8b calli 8007d64 <_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 );
8006b3c: b9 60 08 00 mv r1,r11
8006b40: f8 00 02 a8 calli 80075e0 <_Thread_Stack_Free>
8006b44: 34 09 00 00 mvi r9,0
return false;
}
8006b48: b9 20 08 00 mv r1,r9
8006b4c: 2b 9d 00 04 lw ra,(sp+4)
8006b50: 2b 8b 00 20 lw r11,(sp+32)
8006b54: 2b 8c 00 1c lw r12,(sp+28)
8006b58: 2b 8d 00 18 lw r13,(sp+24)
8006b5c: 2b 8e 00 14 lw r14,(sp+20)
8006b60: 2b 8f 00 10 lw r15,(sp+16)
8006b64: 2b 90 00 0c lw r16,(sp+12)
8006b68: 2b 91 00 08 lw r17,(sp+8)
8006b6c: 37 9c 00 20 addi sp,sp,32
8006b70: c3 a0 00 00 ret
08005cf4 <_Thread_Restart>:
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
8005cf4: 37 9c ff f0 addi sp,sp,-16
8005cf8: 5b 8b 00 08 sw (sp+8),r11
8005cfc: 5b 9d 00 04 sw (sp+4),ra
if ( !_States_Is_dormant( the_thread->current_state ) ) {
8005d00: 28 25 00 10 lw r5,(r1+16)
8005d04: 34 04 00 00 mvi r4,0
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
8005d08: b8 20 58 00 mv r11,r1
if ( !_States_Is_dormant( the_thread->current_state ) ) {
8005d0c: 20 a5 00 01 andi r5,r5,0x1
8005d10: 5c a4 00 16 bne r5,r4,8005d68 <_Thread_Restart+0x74>
_Thread_Set_transient( the_thread );
8005d14: 5b 82 00 10 sw (sp+16),r2
8005d18: 5b 83 00 0c sw (sp+12),r3
8005d1c: f8 00 00 bb calli 8006008 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
8005d20: 2b 82 00 10 lw r2,(sp+16)
8005d24: 2b 83 00 0c lw r3,(sp+12)
8005d28: b9 60 08 00 mv r1,r11
8005d2c: f8 00 13 d1 calli 800ac70 <_Thread_Reset>
_Thread_Load_environment( the_thread );
8005d30: b9 60 08 00 mv r1,r11
8005d34: f8 00 12 a6 calli 800a7cc <_Thread_Load_environment>
_Thread_Ready( the_thread );
8005d38: b9 60 08 00 mv r1,r11
8005d3c: f8 00 13 69 calli 800aae0 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
8005d40: b9 60 08 00 mv r1,r11
8005d44: f8 00 02 61 calli 80066c8 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
8005d48: 78 01 08 02 mvhi r1,0x802
8005d4c: 38 21 29 c0 ori r1,r1,0x29c0
8005d50: 28 21 00 00 lw r1,(r1+0)
8005d54: 34 04 00 01 mvi r4,1
8005d58: 5d 61 00 04 bne r11,r1,8005d68 <_Thread_Restart+0x74>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
_Context_Restore_fp( &_Thread_Executing->fp_context );
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
8005d5c: 35 61 00 d0 addi r1,r11,208
8005d60: f8 00 03 df calli 8006cdc <_CPU_Context_restore>
8005d64: 34 04 00 01 mvi r4,1 <== NOT EXECUTED
return true;
}
return false;
}
8005d68: b8 80 08 00 mv r1,r4
8005d6c: 2b 9d 00 04 lw ra,(sp+4)
8005d70: 2b 8b 00 08 lw r11,(sp+8)
8005d74: 37 9c 00 10 addi sp,sp,16
8005d78: c3 a0 00 00 ret
0800a254 <_Thread_Resume>:
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
800a254: 90 00 18 00 rcsr r3,IE
800a258: 34 05 ff fe mvi r5,-2
800a25c: a0 65 28 00 and r5,r3,r5
800a260: d0 05 00 00 wcsr IE,r5
_ISR_Enable( level );
return;
}
#endif
current_state = the_thread->current_state;
800a264: 28 22 00 10 lw r2,(r1+16)
if ( current_state & STATES_SUSPENDED ) {
800a268: 20 44 00 02 andi r4,r2,0x2
800a26c: 44 80 00 2b be r4,r0,800a318 <_Thread_Resume+0xc4> <== NEVER TAKEN
800a270: 34 04 ff fd mvi r4,-3
800a274: a0 44 10 00 and r2,r2,r4
current_state =
800a278: 58 22 00 10 sw (r1+16),r2
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
800a27c: 5c 40 00 27 bne r2,r0,800a318 <_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;
800a280: 28 26 00 90 lw r6,(r1+144)
800a284: 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);
800a288: 28 24 00 8c lw r4,(r1+140)
800a28c: 2c c8 00 00 lhu r8,(r6+0)
_Priority_Major_bit_map |= the_priority_map->ready_major;
800a290: 78 02 08 02 mvhi r2,0x802
800a294: 38 42 4a 34 ori r2,r2,0x4a34
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
800a298: b9 07 38 00 or r7,r8,r7
800a29c: 0c c7 00 00 sh (r6+0),r7
_Priority_Major_bit_map |= the_priority_map->ready_major;
800a2a0: 2c 47 00 00 lhu r7,(r2+0)
800a2a4: 2c 28 00 94 lhu r8,(r1+148)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
800a2a8: 34 86 00 04 addi r6,r4,4
800a2ac: 58 26 00 00 sw (r1+0),r6
old_last_node = the_chain->last;
800a2b0: 28 86 00 08 lw r6,(r4+8)
800a2b4: b9 07 38 00 or r7,r8,r7
the_chain->last = the_node;
800a2b8: 58 81 00 08 sw (r4+8),r1
800a2bc: 20 e4 ff ff andi r4,r7,0xffff
800a2c0: 0c 44 00 00 sh (r2+0),r4
old_last_node->next = the_node;
the_node->previous = old_last_node;
800a2c4: 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;
800a2c8: 58 c1 00 00 sw (r6+0),r1
_ISR_Flash( level );
800a2cc: d0 03 00 00 wcsr IE,r3
800a2d0: d0 05 00 00 wcsr IE,r5
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
800a2d4: 78 02 08 02 mvhi r2,0x802
800a2d8: 38 42 4a 10 ori r2,r2,0x4a10
800a2dc: 28 44 00 00 lw r4,(r2+0)
800a2e0: 28 25 00 14 lw r5,(r1+20)
800a2e4: 28 84 00 14 lw r4,(r4+20)
800a2e8: 50 a4 00 0c bgeu r5,r4,800a318 <_Thread_Resume+0xc4>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
800a2ec: 78 04 08 02 mvhi r4,0x802
800a2f0: 38 84 4a 40 ori r4,r4,0x4a40
800a2f4: 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;
800a2f8: 58 41 00 00 sw (r2+0),r1
if ( _Thread_Executing->is_preemptible ||
800a2fc: 40 81 00 75 lbu r1,(r4+117)
800a300: 5c 20 00 02 bne r1,r0,800a308 <_Thread_Resume+0xb4>
800a304: 5c a1 00 05 bne r5,r1,800a318 <_Thread_Resume+0xc4> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
800a308: 78 01 08 02 mvhi r1,0x802
800a30c: 38 21 4a 50 ori r1,r1,0x4a50
800a310: 34 02 00 01 mvi r2,1
800a314: 30 22 00 00 sb (r1+0),r2
}
}
}
_ISR_Enable( level );
800a318: d0 03 00 00 wcsr IE,r3
}
800a31c: c3 a0 00 00 ret
0800bffc <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
800bffc: 37 9c ff f8 addi sp,sp,-8
800c000: 5b 8b 00 08 sw (sp+8),r11
800c004: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *executing;
executing = _Thread_Executing;
800c008: 78 01 08 02 mvhi r1,0x802
800c00c: 38 21 5a a0 ori r1,r1,0x5aa0
800c010: 28 2b 00 00 lw r11,(r1+0)
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
800c014: 41 61 00 75 lbu r1,(r11+117)
800c018: 44 20 00 1b be r1,r0,800c084 <_Thread_Tickle_timeslice+0x88>
return;
if ( !_States_Is_ready( executing->current_state ) )
800c01c: 29 61 00 10 lw r1,(r11+16)
800c020: 5c 20 00 19 bne r1,r0,800c084 <_Thread_Tickle_timeslice+0x88>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
800c024: 29 61 00 7c lw r1,(r11+124)
800c028: 44 20 00 17 be r1,r0,800c084 <_Thread_Tickle_timeslice+0x88>
800c02c: 34 02 00 02 mvi r2,2
800c030: 50 41 00 04 bgeu r2,r1,800c040 <_Thread_Tickle_timeslice+0x44>
800c034: 34 02 00 03 mvi r2,3
800c038: 5c 22 00 13 bne r1,r2,800c084 <_Thread_Tickle_timeslice+0x88><== NEVER TAKEN
800c03c: e0 00 00 0b bi 800c068 <_Thread_Tickle_timeslice+0x6c>
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
#endif
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
800c040: 29 61 00 78 lw r1,(r11+120)
800c044: 34 21 ff ff addi r1,r1,-1
800c048: 59 61 00 78 sw (r11+120),r1
800c04c: 48 20 00 0e bg r1,r0,800c084 <_Thread_Tickle_timeslice+0x88>
_Thread_Reset_timeslice();
800c050: f8 00 13 4c calli 8010d80 <_Thread_Reset_timeslice>
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
800c054: 78 01 08 02 mvhi r1,0x802
800c058: 38 21 59 74 ori r1,r1,0x5974
800c05c: 28 21 00 00 lw r1,(r1+0)
800c060: 59 61 00 78 sw (r11+120),r1
800c064: e0 00 00 08 bi 800c084 <_Thread_Tickle_timeslice+0x88>
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
800c068: 29 61 00 78 lw r1,(r11+120)
800c06c: 34 21 ff ff addi r1,r1,-1
800c070: 59 61 00 78 sw (r11+120),r1
800c074: 5c 20 00 04 bne r1,r0,800c084 <_Thread_Tickle_timeslice+0x88>
(*executing->budget_callout)( executing );
800c078: 29 62 00 80 lw r2,(r11+128)
800c07c: b9 60 08 00 mv r1,r11
800c080: d8 40 00 00 call r2
break;
#endif
}
}
800c084: 2b 9d 00 04 lw ra,(sp+4)
800c088: 2b 8b 00 08 lw r11,(sp+8)
800c08c: 37 9c 00 08 addi sp,sp,8
800c090: c3 a0 00 00 ret
0800cdbc <_Thread_Yield_processor>:
{
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
800cdbc: 78 01 08 02 mvhi r1,0x802
800cdc0: 38 21 aa f0 ori r1,r1,0xaaf0
800cdc4: 28 21 00 00 lw r1,(r1+0)
ready = executing->ready;
800cdc8: 28 22 00 8c lw r2,(r1+140)
_ISR_Disable( level );
800cdcc: 90 00 20 00 rcsr r4,IE
800cdd0: 34 05 ff fe mvi r5,-2
800cdd4: a0 85 28 00 and r5,r4,r5
800cdd8: d0 05 00 00 wcsr IE,r5
if ( !_Chain_Has_only_one_node( ready ) ) {
800cddc: 28 47 00 00 lw r7,(r2+0)
800cde0: 28 46 00 08 lw r6,(r2+8)
800cde4: 78 03 08 02 mvhi r3,0x802
800cde8: 38 63 aa c0 ori r3,r3,0xaac0
800cdec: 44 e6 00 12 be r7,r6,800ce34 <_Thread_Yield_processor+0x78>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
800cdf0: 28 26 00 00 lw r6,(r1+0)
previous = the_node->previous;
800cdf4: 28 27 00 04 lw r7,(r1+4)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
800cdf8: 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;
800cdfc: 58 e6 00 00 sw (r7+0),r6
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
800ce00: 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;
800ce04: 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;
800ce08: 28 46 00 08 lw r6,(r2+8)
the_chain->last = the_node;
800ce0c: 58 41 00 08 sw (r2+8),r1
old_last_node->next = the_node;
the_node->previous = old_last_node;
800ce10: 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;
800ce14: 58 c1 00 00 sw (r6+0),r1
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
800ce18: d0 04 00 00 wcsr IE,r4
800ce1c: d0 05 00 00 wcsr IE,r5
if ( _Thread_Is_heir( executing ) )
800ce20: 28 65 00 00 lw r5,(r3+0)
800ce24: 5c 25 00 06 bne r1,r5,800ce3c <_Thread_Yield_processor+0x80><== NEVER TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
800ce28: 28 42 00 00 lw r2,(r2+0)
800ce2c: 58 62 00 00 sw (r3+0),r2
800ce30: e0 00 00 03 bi 800ce3c <_Thread_Yield_processor+0x80>
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
800ce34: 28 62 00 00 lw r2,(r3+0)
800ce38: 44 22 00 05 be r1,r2,800ce4c <_Thread_Yield_processor+0x90><== ALWAYS TAKEN
_Context_Switch_necessary = true;
800ce3c: 78 01 08 02 mvhi r1,0x802
800ce40: 38 21 ab 00 ori r1,r1,0xab00
800ce44: 34 02 00 01 mvi r2,1
800ce48: 30 22 00 00 sb (r1+0),r2
_ISR_Enable( level );
800ce4c: d0 04 00 00 wcsr IE,r4
}
800ce50: c3 a0 00 00 ret
08006f18 <_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
)
{
8006f18: 37 9c ff ec addi sp,sp,-20
8006f1c: 5b 8b 00 14 sw (sp+20),r11
8006f20: 5b 8c 00 10 sw (sp+16),r12
8006f24: 5b 8d 00 0c sw (sp+12),r13
8006f28: 5b 8e 00 08 sw (sp+8),r14
8006f2c: 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;
8006f30: 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
)
{
8006f34: 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);
8006f38: 34 44 00 3c addi r4,r2,60
8006f3c: 59 64 00 38 sw (r11+56),r4
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
8006f40: 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;
8006f44: 34 04 00 00 mvi r4,0
8006f48: b8 20 60 00 mv r12,r1
8006f4c: 59 64 00 3c sw (r11+60),r4
the_chain->last = _Chain_Head(the_chain);
8006f50: 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 ];
8006f54: b9 a0 08 00 mv r1,r13
8006f58: 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
)
{
8006f5c: 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 ];
8006f60: fb ff e7 43 calli 8000c6c <__lshrsi3>
8006f64: b4 21 10 00 add r2,r1,r1
8006f68: b4 41 08 00 add r1,r2,r1
8006f6c: 34 02 00 02 mvi r2,2
8006f70: fb ff e7 17 calli 8000bcc <__ashlsi3>
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
8006f74: 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 ];
8006f78: b5 81 08 00 add r1,r12,r1
block_state = the_thread_queue->state;
8006f7c: 29 87 00 38 lw r7,(r12+56)
if ( _Thread_queue_Is_reverse_search( priority ) )
8006f80: 5c 40 00 23 bne r2,r0,800700c <_Thread_queue_Enqueue_priority+0xf4>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
8006f84: 34 28 00 04 addi r8,r1,4
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
8006f88: 34 03 ff fe mvi r3,-2
8006f8c: 90 00 20 00 rcsr r4,IE
8006f90: a0 83 30 00 and r6,r4,r3
8006f94: d0 06 00 00 wcsr IE,r6
search_thread = (Thread_Control *) header->first;
8006f98: 34 05 ff ff mvi r5,-1
8006f9c: 28 22 00 00 lw r2,(r1+0)
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
8006fa0: e0 00 00 0b bi 8006fcc <_Thread_queue_Enqueue_priority+0xb4>
search_priority = search_thread->current_priority;
8006fa4: 28 45 00 14 lw r5,(r2+20)
if ( priority <= search_priority )
8006fa8: 50 ad 00 0a bgeu r5,r13,8006fd0 <_Thread_queue_Enqueue_priority+0xb8>
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
8006fac: d0 04 00 00 wcsr IE,r4
8006fb0: d0 06 00 00 wcsr IE,r6
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
8006fb4: 28 49 00 10 lw r9,(r2+16)
8006fb8: a0 e9 48 00 and r9,r7,r9
8006fbc: 5d 20 00 03 bne r9,r0,8006fc8 <_Thread_queue_Enqueue_priority+0xb0><== ALWAYS TAKEN
_ISR_Enable( level );
8006fc0: d0 04 00 00 wcsr IE,r4 <== NOT EXECUTED
goto restart_forward_search;
8006fc4: e3 ff ff f2 bi 8006f8c <_Thread_queue_Enqueue_priority+0x74><== NOT EXECUTED
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
8006fc8: 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 ) ) {
8006fcc: 5c 48 ff f6 bne r2,r8,8006fa4 <_Thread_queue_Enqueue_priority+0x8c>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
8006fd0: 29 83 00 30 lw r3,(r12+48)
8006fd4: 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;
8006fd8: b8 80 38 00 mv r7,r4
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
8006fdc: 5c 61 00 3b bne r3,r1,80070c8 <_Thread_queue_Enqueue_priority+0x1b0>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
8006fe0: 34 01 00 00 mvi r1,0
8006fe4: 59 81 00 30 sw (r12+48),r1
if ( priority == search_priority )
8006fe8: 45 a5 00 2f be r13,r5,80070a4 <_Thread_queue_Enqueue_priority+0x18c>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
8006fec: 28 41 00 04 lw r1,(r2+4)
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
8006ff0: 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;
8006ff4: 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;
8006ff8: 59 61 00 04 sw (r11+4),r1
previous_node->next = the_node;
8006ffc: 58 2b 00 00 sw (r1+0),r11
search_node->previous = the_node;
8007000: 58 4b 00 04 sw (r2+4),r11
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
8007004: d0 04 00 00 wcsr IE,r4
8007008: e0 00 00 25 bi 800709c <_Thread_queue_Enqueue_priority+0x184>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
800700c: 78 04 08 02 mvhi r4,0x802
8007010: 38 84 50 a8 ori r4,r4,0x50a8
_ISR_Disable( level );
8007014: 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;
8007018: 40 86 00 00 lbu r6,(r4+0)
800701c: 34 c6 00 01 addi r6,r6,1
_ISR_Disable( level );
8007020: 90 00 28 00 rcsr r5,IE
8007024: a0 a3 40 00 and r8,r5,r3
8007028: d0 08 00 00 wcsr IE,r8
search_thread = (Thread_Control *) header->last;
800702c: 28 22 00 08 lw r2,(r1+8)
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
8007030: e0 00 00 0b bi 800705c <_Thread_queue_Enqueue_priority+0x144>
search_priority = search_thread->current_priority;
8007034: 28 46 00 14 lw r6,(r2+20)
if ( priority >= search_priority )
8007038: 51 a6 00 0a bgeu r13,r6,8007060 <_Thread_queue_Enqueue_priority+0x148>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
800703c: d0 05 00 00 wcsr IE,r5
8007040: d0 08 00 00 wcsr IE,r8
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
8007044: 28 49 00 10 lw r9,(r2+16)
8007048: a0 e9 48 00 and r9,r7,r9
800704c: 5d 20 00 03 bne r9,r0,8007058 <_Thread_queue_Enqueue_priority+0x140><== ALWAYS TAKEN
_ISR_Enable( level );
8007050: d0 05 00 00 wcsr IE,r5 <== NOT EXECUTED
goto restart_reverse_search;
8007054: e3 ff ff f1 bi 8007018 <_Thread_queue_Enqueue_priority+0x100><== NOT EXECUTED
}
search_thread = (Thread_Control *)
8007058: 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 ) ) {
800705c: 5c 41 ff f6 bne r2,r1,8007034 <_Thread_queue_Enqueue_priority+0x11c>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
8007060: 29 83 00 30 lw r3,(r12+48)
8007064: 34 01 00 01 mvi r1,1
8007068: b8 a0 38 00 mv r7,r5
800706c: 5c 61 00 17 bne r3,r1,80070c8 <_Thread_queue_Enqueue_priority+0x1b0>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
8007070: 34 01 00 00 mvi r1,0
8007074: 59 81 00 30 sw (r12+48),r1
if ( priority == search_priority )
8007078: b8 a0 20 00 mv r4,r5
800707c: 45 a6 00 0a be r13,r6,80070a4 <_Thread_queue_Enqueue_priority+0x18c>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
8007080: 28 41 00 00 lw r1,(r2+0)
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
8007084: 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;
8007088: 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;
800708c: 59 61 00 00 sw (r11+0),r1
the_node->previous = search_node;
search_node->next = the_node;
8007090: 58 4b 00 00 sw (r2+0),r11
next_node->previous = the_node;
8007094: 58 2b 00 04 sw (r1+4),r11
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
8007098: d0 05 00 00 wcsr IE,r5
800709c: 34 01 00 01 mvi r1,1
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
80070a0: e0 00 00 0c bi 80070d0 <_Thread_queue_Enqueue_priority+0x1b8>
80070a4: 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;
80070a8: 28 41 00 04 lw r1,(r2+4)
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
80070ac: 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;
80070b0: 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;
80070b4: 59 61 00 04 sw (r11+4),r1
previous_node->next = the_node;
80070b8: 58 2b 00 00 sw (r1+0),r11
search_node->previous = the_node;
80070bc: 58 4b 00 04 sw (r2+4),r11
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
80070c0: d0 04 00 00 wcsr IE,r4
80070c4: e3 ff ff f6 bi 800709c <_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;
80070c8: 29 81 00 30 lw r1,(r12+48)
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
80070cc: 59 c7 00 00 sw (r14+0),r7
return the_thread_queue->sync_state;
}
80070d0: 2b 9d 00 04 lw ra,(sp+4)
80070d4: 2b 8b 00 14 lw r11,(sp+20)
80070d8: 2b 8c 00 10 lw r12,(sp+16)
80070dc: 2b 8d 00 0c lw r13,(sp+12)
80070e0: 2b 8e 00 08 lw r14,(sp+8)
80070e4: 37 9c 00 14 addi sp,sp,20
80070e8: c3 a0 00 00 ret
08007180 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
8007180: 37 9c ff ec addi sp,sp,-20
8007184: 5b 8b 00 10 sw (sp+16),r11
8007188: 5b 8c 00 0c sw (sp+12),r12
800718c: 5b 8d 00 08 sw (sp+8),r13
8007190: 5b 9d 00 04 sw (sp+4),ra
8007194: b8 20 58 00 mv r11,r1
8007198: 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 )
800719c: 44 20 00 17 be r1,r0,80071f8 <_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 ) {
80071a0: 28 22 00 34 lw r2,(r1+52)
80071a4: 34 01 00 01 mvi r1,1
80071a8: 5c 41 00 14 bne r2,r1,80071f8 <_Thread_queue_Requeue+0x78> <== NEVER TAKEN
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
80071ac: 90 00 68 00 rcsr r13,IE
80071b0: 34 01 ff fe mvi r1,-2
80071b4: a1 a1 08 00 and r1,r13,r1
80071b8: d0 01 00 00 wcsr IE,r1
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
80071bc: 29 82 00 10 lw r2,(r12+16)
80071c0: 78 01 00 03 mvhi r1,0x3
80071c4: 38 21 be e0 ori r1,r1,0xbee0
80071c8: a0 41 08 00 and r1,r2,r1
80071cc: 44 20 00 0a be r1,r0,80071f4 <_Thread_queue_Requeue+0x74> <== NEVER TAKEN
80071d0: 34 03 00 01 mvi r3,1
80071d4: 59 63 00 30 sw (r11+48),r3
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
80071d8: b9 60 08 00 mv r1,r11
80071dc: b9 80 10 00 mv r2,r12
80071e0: f8 00 22 e2 calli 800fd68 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
80071e4: b9 60 08 00 mv r1,r11
80071e8: b9 80 10 00 mv r2,r12
80071ec: 37 83 00 14 addi r3,sp,20
80071f0: fb ff ff 4a calli 8006f18 <_Thread_queue_Enqueue_priority>
}
_ISR_Enable( level );
80071f4: d0 0d 00 00 wcsr IE,r13
}
}
80071f8: 2b 9d 00 04 lw ra,(sp+4)
80071fc: 2b 8b 00 10 lw r11,(sp+16)
8007200: 2b 8c 00 0c lw r12,(sp+12)
8007204: 2b 8d 00 08 lw r13,(sp+8)
8007208: 37 9c 00 14 addi sp,sp,20
800720c: c3 a0 00 00 ret
08007210 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
8007210: 37 9c ff f8 addi sp,sp,-8
8007214: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
8007218: 37 82 00 08 addi r2,sp,8
800721c: fb ff fd 92 calli 8006864 <_Thread_Get>
switch ( location ) {
8007220: 2b 82 00 08 lw r2,(sp+8)
8007224: 5c 40 00 07 bne r2,r0,8007240 <_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 );
8007228: f8 00 23 1b calli 800fe94 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
800722c: 78 01 08 02 mvhi r1,0x802
8007230: 38 21 59 44 ori r1,r1,0x5944
8007234: 28 22 00 00 lw r2,(r1+0)
8007238: 34 42 ff ff addi r2,r2,-1
800723c: 58 22 00 00 sw (r1+0),r2
_Thread_Unnest_dispatch();
break;
}
}
8007240: 2b 9d 00 04 lw ra,(sp+4)
8007244: 37 9c 00 08 addi sp,sp,8
8007248: c3 a0 00 00 ret
08014140 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
8014140: 37 9c ff a4 addi sp,sp,-92
8014144: 5b 8b 00 44 sw (sp+68),r11
8014148: 5b 8c 00 40 sw (sp+64),r12
801414c: 5b 8d 00 3c sw (sp+60),r13
8014150: 5b 8e 00 38 sw (sp+56),r14
8014154: 5b 8f 00 34 sw (sp+52),r15
8014158: 5b 90 00 30 sw (sp+48),r16
801415c: 5b 91 00 2c sw (sp+44),r17
8014160: 5b 92 00 28 sw (sp+40),r18
8014164: 5b 93 00 24 sw (sp+36),r19
8014168: 5b 94 00 20 sw (sp+32),r20
801416c: 5b 95 00 1c sw (sp+28),r21
8014170: 5b 96 00 18 sw (sp+24),r22
8014174: 5b 97 00 14 sw (sp+20),r23
8014178: 5b 98 00 10 sw (sp+16),r24
801417c: 5b 99 00 0c sw (sp+12),r25
8014180: 5b 9b 00 08 sw (sp+8),fp
8014184: 5b 9d 00 04 sw (sp+4),ra
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
8014188: 78 11 08 03 mvhi r17,0x803
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
801418c: b8 20 58 00 mv r11,r1
8014190: 37 82 00 54 addi r2,sp,84
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
8014194: 34 01 00 00 mvi r1,0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
8014198: 37 96 00 58 addi r22,sp,88
801419c: 37 8e 00 48 addi r14,sp,72
80141a0: 37 92 00 4c addi r18,sp,76
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
80141a4: 78 10 08 03 mvhi r16,0x803
80141a8: 78 0d 08 03 mvhi r13,0x803
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
80141ac: 5b 96 00 54 sw (sp+84),r22
the_chain->permanent_null = NULL;
80141b0: 5b 81 00 58 sw (sp+88),r1
the_chain->last = _Chain_Head(the_chain);
80141b4: 5b 82 00 5c sw (sp+92),r2
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
80141b8: 5b 92 00 48 sw (sp+72),r18
the_chain->permanent_null = NULL;
80141bc: 5b 81 00 4c sw (sp+76),r1
the_chain->last = _Chain_Head(the_chain);
80141c0: 5b 8e 00 50 sw (sp+80),r14
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
80141c4: 3a 31 fd fc ori r17,r17,0xfdfc
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
80141c8: 3a 10 fd 3c ori r16,r16,0xfd3c
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
80141cc: b8 20 a8 00 mv r21,r1
80141d0: 39 ad fc ac ori r13,r13,0xfcac
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
80141d4: 35 74 00 30 addi r20,r11,48
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
80141d8: 35 6f 00 68 addi r15,r11,104
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
80141dc: 35 7b 00 08 addi fp,r11,8
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
80141e0: 35 79 00 40 addi r25,r11,64
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
80141e4: 34 18 00 01 mvi r24,1
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
80141e8: 34 17 00 03 mvi r23,3
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
80141ec: 34 13 ff fe mvi r19,-2
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
80141f0: 37 81 00 54 addi r1,sp,84
80141f4: 59 61 00 78 sw (r11+120),r1
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
80141f8: 2a 22 00 00 lw r2,(r17+0)
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
80141fc: 29 63 00 3c lw r3,(r11+60)
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
8014200: ba 80 08 00 mv r1,r20
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
8014204: 59 62 00 3c sw (r11+60),r2
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
8014208: c8 43 10 00 sub r2,r2,r3
801420c: b9 c0 18 00 mv r3,r14
8014210: f8 00 14 af calli 80194cc <_Watchdog_Adjust_to_chain>
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
8014214: 29 62 00 74 lw r2,(r11+116)
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
8014218: 2a 0c 00 00 lw r12,(r16+0)
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
801421c: 50 4c 00 06 bgeu r2,r12,8014234 <_Timer_server_Body+0xf4>
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
8014220: c9 82 10 00 sub r2,r12,r2
8014224: b9 e0 08 00 mv r1,r15
8014228: b9 c0 18 00 mv r3,r14
801422c: f8 00 14 a8 calli 80194cc <_Watchdog_Adjust_to_chain>
8014230: e0 00 00 06 bi 8014248 <_Timer_server_Body+0x108>
} else if ( snapshot < last_snapshot ) {
8014234: 51 82 00 05 bgeu r12,r2,8014248 <_Timer_server_Body+0x108>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
8014238: c8 4c 18 00 sub r3,r2,r12
801423c: b9 e0 08 00 mv r1,r15
8014240: 34 02 00 01 mvi r2,1
8014244: f8 00 14 6a calli 80193ec <_Watchdog_Adjust>
}
watchdogs->last_snapshot = snapshot;
8014248: 59 6c 00 74 sw (r11+116),r12
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
801424c: 29 61 00 78 lw r1,(r11+120)
8014250: f8 00 03 02 calli 8014e58 <_Chain_Get>
if ( timer == NULL ) {
8014254: 44 20 00 0b be r1,r0,8014280 <_Timer_server_Body+0x140>
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)
801425c: 5c 78 00 04 bne r3,r24,801426c <_Timer_server_Body+0x12c>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
8014260: 34 22 00 10 addi r2,r1,16
8014264: ba 80 08 00 mv r1,r20
8014268: e0 00 00 04 bi 8014278 <_Timer_server_Body+0x138>
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
801426c: 5c 77 ff f8 bne r3,r23,801424c <_Timer_server_Body+0x10c> <== NEVER TAKEN
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
8014270: 34 22 00 10 addi r2,r1,16
8014274: b9 e0 08 00 mv r1,r15
8014278: f8 00 14 c0 calli 8019578 <_Watchdog_Insert>
801427c: e3 ff ff f4 bi 801424c <_Timer_server_Body+0x10c>
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
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>
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
80142ac: e3 ff ff d3 bi 80141f8 <_Timer_server_Body+0xb8>
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
80142b0: 90 00 10 00 rcsr r2,IE
80142b4: a0 53 08 00 and r1,r2,r19
80142b8: d0 01 00 00 wcsr IE,r1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
80142bc: 2b 84 00 48 lw r4,(sp+72)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
80142c0: 5c 92 00 03 bne r4,r18,80142cc <_Timer_server_Body+0x18c>
80142c4: 34 04 00 00 mvi r4,0
80142c8: e0 00 00 04 bi 80142d8 <_Timer_server_Body+0x198>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
80142cc: 28 83 00 00 lw r3,(r4+0)
the_chain->first = new_first;
80142d0: 5b 83 00 48 sw (sp+72),r3
new_first->previous = _Chain_Head(the_chain);
80142d4: 58 6e 00 04 sw (r3+4),r14
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
80142d8: 44 80 00 08 be r4,r0,80142f8 <_Timer_server_Body+0x1b8>
watchdog->state = WATCHDOG_INACTIVE;
80142dc: 58 95 00 08 sw (r4+8),r21
_ISR_Enable( level );
80142e0: d0 02 00 00 wcsr IE,r2
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
80142e4: 28 82 00 24 lw r2,(r4+36)
80142e8: 28 83 00 1c lw r3,(r4+28)
80142ec: 28 81 00 20 lw r1,(r4+32)
80142f0: d8 60 00 00 call r3
}
80142f4: e3 ff ff ef bi 80142b0 <_Timer_server_Body+0x170>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
80142f8: d0 02 00 00 wcsr IE,r2
80142fc: e3 ff ff bd bi 80141f0 <_Timer_server_Body+0xb0>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
8014300: 34 01 00 00 mvi r1,0
8014304: 31 61 00 7c sb (r11+124),r1
8014308: 29 a1 00 00 lw r1,(r13+0)
801430c: 34 21 00 01 addi r1,r1,1
8014310: 59 a1 00 00 sw (r13+0),r1
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
8014314: 29 61 00 00 lw r1,(r11+0)
8014318: 34 02 00 08 mvi r2,8
801431c: f8 00 11 2d calli 80187d0 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
8014320: b9 60 08 00 mv r1,r11
8014324: fb ff ff 4d calli 8014058 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
8014328: b9 60 08 00 mv r1,r11
801432c: fb ff ff 68 calli 80140cc <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
8014330: f8 00 0d fd calli 8017b24 <_Thread_Enable_dispatch>
ts->active = true;
8014334: 34 01 00 01 mvi r1,1
8014338: 31 61 00 7c sb (r11+124),r1
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
801433c: bb 60 08 00 mv r1,fp
8014340: f8 00 14 ed calli 80196f4 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
8014344: bb 20 08 00 mv r1,r25
8014348: f8 00 14 eb calli 80196f4 <_Watchdog_Remove>
801434c: e3 ff ff a9 bi 80141f0 <_Timer_server_Body+0xb0>
080079a4 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
80079a4: 37 9c ff e4 addi sp,sp,-28
80079a8: 5b 8b 00 1c sw (sp+28),r11
80079ac: 5b 8c 00 18 sw (sp+24),r12
80079b0: 5b 8d 00 14 sw (sp+20),r13
80079b4: 5b 8e 00 10 sw (sp+16),r14
80079b8: 5b 8f 00 0c sw (sp+12),r15
80079bc: 5b 90 00 08 sw (sp+8),r16
80079c0: 5b 9d 00 04 sw (sp+4),ra
80079c4: b8 20 60 00 mv r12,r1
80079c8: b8 40 20 00 mv r4,r2
80079cc: b8 60 58 00 mv r11,r3
ISR_Level level;
_ISR_Disable( level );
80079d0: 90 00 10 00 rcsr r2,IE
80079d4: 34 01 ff fe mvi r1,-2
80079d8: a0 41 08 00 and r1,r2,r1
80079dc: d0 01 00 00 wcsr IE,r1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
80079e0: 29 81 00 00 lw r1,(r12+0)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
80079e4: 35 8e 00 04 addi r14,r12,4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
80079e8: 44 2e 00 1d be r1,r14,8007a5c <_Watchdog_Adjust+0xb8>
switch ( direction ) {
80079ec: 44 80 00 04 be r4,r0,80079fc <_Watchdog_Adjust+0x58>
80079f0: 34 03 00 01 mvi r3,1
80079f4: 5c 83 00 1a bne r4,r3,8007a5c <_Watchdog_Adjust+0xb8> <== NEVER TAKEN
80079f8: e0 00 00 04 bi 8007a08 <_Watchdog_Adjust+0x64>
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
80079fc: 34 10 00 01 mvi r16,1
_ISR_Enable( level );
_Watchdog_Tickle( header );
_ISR_Disable( level );
8007a00: 34 0f ff fe mvi r15,-2
8007a04: e0 00 00 15 bi 8007a58 <_Watchdog_Adjust+0xb4>
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
8007a08: 28 23 00 10 lw r3,(r1+16)
8007a0c: b4 6b 58 00 add r11,r3,r11
8007a10: e0 00 00 05 bi 8007a24 <_Watchdog_Adjust+0x80>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
8007a14: 29 81 00 00 lw r1,(r12+0)
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
8007a18: 28 2d 00 10 lw r13,(r1+16)
8007a1c: 51 6d 00 04 bgeu r11,r13,8007a2c <_Watchdog_Adjust+0x88>
_Watchdog_First( header )->delta_interval -= units;
8007a20: c9 ab 58 00 sub r11,r13,r11
8007a24: 58 2b 00 10 sw (r1+16),r11
break;
8007a28: e0 00 00 0d bi 8007a5c <_Watchdog_Adjust+0xb8>
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
8007a2c: 58 30 00 10 sw (r1+16),r16
_ISR_Enable( level );
8007a30: d0 02 00 00 wcsr IE,r2
_Watchdog_Tickle( header );
8007a34: b9 80 08 00 mv r1,r12
8007a38: f8 00 00 9e calli 8007cb0 <_Watchdog_Tickle>
_ISR_Disable( level );
8007a3c: 90 00 08 00 rcsr r1,IE
8007a40: a0 2f 10 00 and r2,r1,r15
8007a44: d0 02 00 00 wcsr IE,r2
if ( _Chain_Is_empty( header ) )
8007a48: 29 83 00 00 lw r3,(r12+0)
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
8007a4c: c9 6d 58 00 sub r11,r11,r13
8007a50: b8 20 10 00 mv r2,r1
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
8007a54: 44 6e 00 02 be r3,r14,8007a5c <_Watchdog_Adjust+0xb8>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
8007a58: 5d 60 ff ef bne r11,r0,8007a14 <_Watchdog_Adjust+0x70> <== ALWAYS TAKEN
}
break;
}
}
_ISR_Enable( level );
8007a5c: d0 02 00 00 wcsr IE,r2
}
8007a60: 2b 9d 00 04 lw ra,(sp+4)
8007a64: 2b 8b 00 1c lw r11,(sp+28)
8007a68: 2b 8c 00 18 lw r12,(sp+24)
8007a6c: 2b 8d 00 14 lw r13,(sp+20)
8007a70: 2b 8e 00 10 lw r14,(sp+16)
8007a74: 2b 8f 00 0c lw r15,(sp+12)
8007a78: 2b 90 00 08 lw r16,(sp+8)
8007a7c: 37 9c 00 1c addi sp,sp,28
8007a80: c3 a0 00 00 ret
08007ad0 <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
8007ad0: 37 9c ff f8 addi sp,sp,-8
8007ad4: 5b 8b 00 08 sw (sp+8),r11
8007ad8: 5b 8c 00 04 sw (sp+4),r12
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
8007adc: 78 03 08 02 mvhi r3,0x802
8007ae0: 38 63 59 dc ori r3,r3,0x59dc
8007ae4: 28 67 00 00 lw r7,(r3+0)
_ISR_Disable( level );
8007ae8: 90 00 28 00 rcsr r5,IE
8007aec: 34 09 ff fe mvi r9,-2
8007af0: a0 a9 48 00 and r9,r5,r9
8007af4: d0 09 00 00 wcsr IE,r9
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
8007af8: 28 43 00 08 lw r3,(r2+8)
8007afc: 44 60 00 03 be r3,r0,8007b08 <_Watchdog_Insert+0x38>
_ISR_Enable( level );
8007b00: d0 05 00 00 wcsr IE,r5
return;
8007b04: e0 00 00 37 bi 8007be0 <_Watchdog_Insert+0x110>
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
8007b08: 78 03 08 02 mvhi r3,0x802
8007b0c: 38 63 5a 90 ori r3,r3,0x5a90
8007b10: 28 68 00 00 lw r8,(r3+0)
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
8007b14: 78 06 08 02 mvhi r6,0x802
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
8007b18: 34 04 00 01 mvi r4,1
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
8007b1c: 38 c6 59 fc ori r6,r6,0x59fc
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
8007b20: 35 08 00 01 addi r8,r8,1
8007b24: 58 68 00 00 sw (r3+0),r8
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
8007b28: 58 44 00 08 sw (r2+8),r4
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
8007b2c: b8 80 58 00 mv r11,r4
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
8007b30: b8 c0 50 00 mv r10,r6
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
restart:
delta_interval = the_watchdog->initial;
8007b34: 28 44 00 0c lw r4,(r2+12)
* cache *header!!
*
* Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc)
*
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
8007b38: 28 23 00 00 lw r3,(r1+0)
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
8007b3c: 44 80 00 13 be r4,r0,8007b88 <_Watchdog_Insert+0xb8>
8007b40: 28 68 00 00 lw r8,(r3+0)
8007b44: 45 00 00 11 be r8,r0,8007b88 <_Watchdog_Insert+0xb8>
break;
if ( delta_interval < after->delta_interval ) {
8007b48: 28 68 00 10 lw r8,(r3+16)
8007b4c: 50 88 00 04 bgeu r4,r8,8007b5c <_Watchdog_Insert+0x8c>
after->delta_interval -= delta_interval;
8007b50: c9 04 40 00 sub r8,r8,r4
8007b54: 58 68 00 10 sw (r3+16),r8
break;
8007b58: e0 00 00 0c bi 8007b88 <_Watchdog_Insert+0xb8>
* used around this flash point allowed interrupts to execute
* which violated the design assumptions. The critical section
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
8007b5c: d0 05 00 00 wcsr IE,r5
8007b60: d0 09 00 00 wcsr IE,r9
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
8007b64: 28 4c 00 08 lw r12,(r2+8)
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
8007b68: c8 88 20 00 sub r4,r4,r8
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
8007b6c: 5d 8b 00 14 bne r12,r11,8007bbc <_Watchdog_Insert+0xec> <== NEVER TAKEN
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
8007b70: 28 c8 00 00 lw r8,(r6+0)
8007b74: 50 e8 00 03 bgeu r7,r8,8007b80 <_Watchdog_Insert+0xb0>
_Watchdog_Sync_level = insert_isr_nest_level;
8007b78: 59 47 00 00 sw (r10+0),r7
goto restart;
8007b7c: e3 ff ff ee bi 8007b34 <_Watchdog_Insert+0x64>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
8007b80: 28 63 00 00 lw r3,(r3+0)
}
}
8007b84: e3 ff ff ee bi 8007b3c <_Watchdog_Insert+0x6c>
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
8007b88: 28 63 00 04 lw r3,(r3+4)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
8007b8c: 78 01 08 02 mvhi r1,0x802
8007b90: 38 21 5a 94 ori r1,r1,0x5a94
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
8007b94: 58 44 00 10 sw (r2+16),r4
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
8007b98: 28 24 00 00 lw r4,(r1+0)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
8007b9c: 28 61 00 00 lw r1,(r3+0)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
8007ba0: 58 43 00 04 sw (r2+4),r3
before_node = after_node->next;
after_node->next = the_node;
8007ba4: 58 62 00 00 sw (r3+0),r2
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
8007ba8: 34 03 00 02 mvi r3,2
8007bac: 58 44 00 14 sw (r2+20),r4
8007bb0: 58 43 00 08 sw (r2+8),r3
the_node->next = before_node;
before_node->previous = the_node;
8007bb4: 58 22 00 04 sw (r1+4),r2
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
8007bb8: 58 41 00 00 sw (r2+0),r1
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
8007bbc: 78 02 08 02 mvhi r2,0x802
8007bc0: 38 42 59 fc ori r2,r2,0x59fc
_Watchdog_Sync_count--;
8007bc4: 78 01 08 02 mvhi r1,0x802
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
8007bc8: 58 47 00 00 sw (r2+0),r7
_Watchdog_Sync_count--;
8007bcc: 38 21 5a 90 ori r1,r1,0x5a90
8007bd0: 28 22 00 00 lw r2,(r1+0)
8007bd4: 34 42 ff ff addi r2,r2,-1
8007bd8: 58 22 00 00 sw (r1+0),r2
_ISR_Enable( level );
8007bdc: d0 05 00 00 wcsr IE,r5
}
8007be0: 2b 8b 00 08 lw r11,(sp+8)
8007be4: 2b 8c 00 04 lw r12,(sp+4)
8007be8: 37 9c 00 08 addi sp,sp,8
8007bec: c3 a0 00 00 ret
08007c4c <_Watchdog_Remove>:
{
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
8007c4c: 90 00 20 00 rcsr r4,IE
8007c50: 34 02 ff fe mvi r2,-2
8007c54: a0 82 10 00 and r2,r4,r2
8007c58: d0 02 00 00 wcsr IE,r2
previous_state = the_watchdog->state;
8007c5c: 28 22 00 08 lw r2,(r1+8)
switch ( previous_state ) {
8007c60: 34 03 00 01 mvi r3,1
8007c64: 44 43 00 05 be r2,r3,8007c78 <_Watchdog_Remove+0x2c>
8007c68: 44 40 00 1e be r2,r0,8007ce0 <_Watchdog_Remove+0x94>
8007c6c: 34 03 00 03 mvi r3,3
8007c70: 54 43 00 1c bgu r2,r3,8007ce0 <_Watchdog_Remove+0x94> <== NEVER TAKEN
8007c74: e0 00 00 04 bi 8007c84 <_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;
8007c78: 34 03 00 00 mvi r3,0
8007c7c: 58 23 00 08 sw (r1+8),r3
break;
8007c80: e0 00 00 18 bi 8007ce0 <_Watchdog_Remove+0x94>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
8007c84: 28 23 00 00 lw r3,(r1+0)
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
8007c88: 34 05 00 00 mvi r5,0
8007c8c: 58 25 00 08 sw (r1+8),r5
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
8007c90: 28 65 00 00 lw r5,(r3+0)
8007c94: 44 a0 00 05 be r5,r0,8007ca8 <_Watchdog_Remove+0x5c>
next_watchdog->delta_interval += the_watchdog->delta_interval;
8007c98: 28 66 00 10 lw r6,(r3+16)
8007c9c: 28 25 00 10 lw r5,(r1+16)
8007ca0: b4 c5 28 00 add r5,r6,r5
8007ca4: 58 65 00 10 sw (r3+16),r5
if ( _Watchdog_Sync_count )
8007ca8: 78 03 08 02 mvhi r3,0x802
8007cac: 38 63 5a 90 ori r3,r3,0x5a90
8007cb0: 28 63 00 00 lw r3,(r3+0)
8007cb4: 44 60 00 07 be r3,r0,8007cd0 <_Watchdog_Remove+0x84>
_Watchdog_Sync_level = _ISR_Nest_level;
8007cb8: 78 03 08 02 mvhi r3,0x802
8007cbc: 38 63 59 dc ori r3,r3,0x59dc
8007cc0: 28 65 00 00 lw r5,(r3+0)
8007cc4: 78 03 08 02 mvhi r3,0x802
8007cc8: 38 63 59 fc ori r3,r3,0x59fc
8007ccc: 58 65 00 00 sw (r3+0),r5
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
8007cd0: 28 23 00 00 lw r3,(r1+0)
previous = the_node->previous;
8007cd4: 28 25 00 04 lw r5,(r1+4)
next->previous = previous;
previous->next = next;
8007cd8: 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;
8007cdc: 58 65 00 04 sw (r3+4),r5
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
8007ce0: 78 03 08 02 mvhi r3,0x802
8007ce4: 38 63 5a 94 ori r3,r3,0x5a94
8007ce8: 28 63 00 00 lw r3,(r3+0)
8007cec: 58 23 00 18 sw (r1+24),r3
_ISR_Enable( level );
8007cf0: d0 04 00 00 wcsr IE,r4
return( previous_state );
}
8007cf4: b8 40 08 00 mv r1,r2
8007cf8: c3 a0 00 00 ret
080076a8 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
80076a8: 37 9c ff ec addi sp,sp,-20
80076ac: 5b 8b 00 14 sw (sp+20),r11
80076b0: 5b 8c 00 10 sw (sp+16),r12
80076b4: 5b 8d 00 0c sw (sp+12),r13
80076b8: 5b 8e 00 08 sw (sp+8),r14
80076bc: 5b 9d 00 04 sw (sp+4),ra
80076c0: b8 20 70 00 mv r14,r1
80076c4: b8 40 60 00 mv r12,r2
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
80076c8: 90 00 68 00 rcsr r13,IE
80076cc: 34 01 ff fe mvi r1,-2
80076d0: a1 a1 08 00 and r1,r13,r1
80076d4: d0 01 00 00 wcsr IE,r1
printk( "Watchdog Chain: %s %p\n", name, header );
80076d8: 78 01 08 02 mvhi r1,0x802
80076dc: b9 80 18 00 mv r3,r12
80076e0: 38 21 0e 78 ori r1,r1,0xe78
80076e4: b9 c0 10 00 mv r2,r14
80076e8: fb ff ec ed calli 8002a9c <printk>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
80076ec: 29 8b 00 00 lw r11,(r12+0)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
80076f0: 35 8c 00 04 addi r12,r12,4
if ( !_Chain_Is_empty( header ) ) {
80076f4: 45 6c 00 0b be r11,r12,8007720 <_Watchdog_Report_chain+0x78>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
80076f8: b9 60 10 00 mv r2,r11
80076fc: 34 01 00 00 mvi r1,0
8007700: f8 00 00 13 calli 800774c <_Watchdog_Report>
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
node != _Chain_Tail(header) ;
node = node->next )
8007704: 29 6b 00 00 lw r11,(r11+0)
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
8007708: 5d 6c ff fc bne r11,r12,80076f8 <_Watchdog_Report_chain+0x50><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
800770c: 78 01 08 02 mvhi r1,0x802
8007710: 38 21 0e 90 ori r1,r1,0xe90
8007714: b9 c0 10 00 mv r2,r14
8007718: fb ff ec e1 calli 8002a9c <printk>
800771c: e0 00 00 04 bi 800772c <_Watchdog_Report_chain+0x84>
} else {
printk( "Chain is empty\n" );
8007720: 78 01 08 02 mvhi r1,0x802
8007724: 38 21 0e a0 ori r1,r1,0xea0
8007728: fb ff ec dd calli 8002a9c <printk>
}
_ISR_Enable( level );
800772c: d0 0d 00 00 wcsr IE,r13
}
8007730: 2b 9d 00 04 lw ra,(sp+4)
8007734: 2b 8b 00 14 lw r11,(sp+20)
8007738: 2b 8c 00 10 lw r12,(sp+16)
800773c: 2b 8d 00 0c lw r13,(sp+12)
8007740: 2b 8e 00 08 lw r14,(sp+8)
8007744: 37 9c 00 14 addi sp,sp,20
8007748: c3 a0 00 00 ret
0800c72c <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
800c72c: 37 9c ff e4 addi sp,sp,-28
800c730: 5b 8b 00 1c sw (sp+28),r11
800c734: 5b 8c 00 18 sw (sp+24),r12
800c738: 5b 8d 00 14 sw (sp+20),r13
800c73c: 5b 8e 00 10 sw (sp+16),r14
800c740: 5b 8f 00 0c sw (sp+12),r15
800c744: 5b 90 00 08 sw (sp+8),r16
800c748: 5b 9d 00 04 sw (sp+4),ra
800c74c: 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 );
800c750: 90 00 08 00 rcsr r1,IE
800c754: 34 02 ff fe mvi r2,-2
800c758: a0 22 10 00 and r2,r1,r2
800c75c: 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));
800c760: 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;
800c764: 35 8e 00 04 addi r14,r12,4
if ( _Chain_Is_empty( header ) )
800c768: 45 6e 00 1a be r11,r14,800c7d0 <_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) {
800c76c: 29 62 00 10 lw r2,(r11+16)
800c770: 44 40 00 04 be r2,r0,800c780 <_Watchdog_Tickle+0x54>
the_watchdog->delta_interval--;
800c774: 34 42 ff ff addi r2,r2,-1
800c778: 59 62 00 10 sw (r11+16),r2
if ( the_watchdog->delta_interval != 0 )
800c77c: 5c 40 00 15 bne r2,r0,800c7d0 <_Watchdog_Tickle+0xa4>
800c780: b8 20 68 00 mv r13,r1
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
_ISR_Enable( level );
switch( watchdog_state ) {
800c784: 34 10 00 02 mvi r16,2
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
800c788: 34 0f ff fe mvi r15,-2
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
800c78c: b9 60 08 00 mv r1,r11
800c790: fb ff ff bb calli 800c67c <_Watchdog_Remove>
_ISR_Enable( level );
800c794: d0 0d 00 00 wcsr IE,r13
switch( watchdog_state ) {
800c798: 5c 30 00 05 bne r1,r16,800c7ac <_Watchdog_Tickle+0x80> <== NEVER TAKEN
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
800c79c: 29 62 00 24 lw r2,(r11+36)
800c7a0: 29 63 00 1c lw r3,(r11+28)
800c7a4: 29 61 00 20 lw r1,(r11+32)
800c7a8: d8 60 00 00 call r3
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
800c7ac: 90 00 08 00 rcsr r1,IE
800c7b0: a0 2f 10 00 and r2,r1,r15
800c7b4: d0 02 00 00 wcsr IE,r2
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
800c7b8: 29 82 00 00 lw r2,(r12+0)
800c7bc: b8 20 68 00 mv r13,r1
800c7c0: b8 40 58 00 mv r11,r2
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
800c7c4: 44 4e 00 03 be r2,r14,800c7d0 <_Watchdog_Tickle+0xa4>
800c7c8: 28 42 00 10 lw r2,(r2+16)
800c7cc: 44 40 ff f0 be r2,r0,800c78c <_Watchdog_Tickle+0x60>
leave:
_ISR_Enable(level);
800c7d0: d0 01 00 00 wcsr IE,r1
}
800c7d4: 2b 9d 00 04 lw ra,(sp+4)
800c7d8: 2b 8b 00 1c lw r11,(sp+28)
800c7dc: 2b 8c 00 18 lw r12,(sp+24)
800c7e0: 2b 8d 00 14 lw r13,(sp+20)
800c7e4: 2b 8e 00 10 lw r14,(sp+16)
800c7e8: 2b 8f 00 0c lw r15,(sp+12)
800c7ec: 2b 90 00 08 lw r16,(sp+8)
800c7f0: 37 9c 00 1c addi sp,sp,28
800c7f4: c3 a0 00 00 ret
08007cfc <_Workspace_Allocate_or_fatal_error>:
* _Workspace_Allocate_or_fatal_error
*/
void *_Workspace_Allocate_or_fatal_error(
size_t size
)
{
8007cfc: 37 9c ff fc addi sp,sp,-4
8007d00: 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 );
8007d04: 34 03 00 00 mvi r3,0
8007d08: b8 20 10 00 mv r2,r1
8007d0c: 78 01 08 02 mvhi r1,0x802
8007d10: 38 21 59 68 ori r1,r1,0x5968
8007d14: b8 60 20 00 mv r4,r3
8007d18: f8 00 1d 70 calli 800f2d8 <_Heap_Allocate_aligned_with_boundary>
__builtin_return_address( 1 ),
memory
);
#endif
if ( memory == NULL )
8007d1c: 5c 20 00 04 bne r1,r0,8007d2c <_Workspace_Allocate_or_fatal_error+0x30><== ALWAYS TAKEN
_Internal_error_Occurred(
8007d20: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8007d24: 34 03 00 04 mvi r3,4 <== NOT EXECUTED
8007d28: fb ff f6 b0 calli 80057e8 <_Internal_error_Occurred> <== NOT EXECUTED
true,
INTERNAL_ERROR_WORKSPACE_ALLOCATION
);
return memory;
}
8007d2c: 2b 9d 00 04 lw ra,(sp+4)
8007d30: 37 9c 00 04 addi sp,sp,4
8007d34: c3 a0 00 00 ret
080222ec <_exit>:
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
FINI_SYMBOL();
80222ec: 37 9c ff f8 addi sp,sp,-8
80222f0: 5b 9d 00 04 sw (sp+4),ra
80222f4: 5b 81 00 08 sw (sp+8),r1
80222f8: f8 00 01 6e calli 80228b0 <__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();
80222fc: fb ff ff d9 calli 8022260 <libc_wrapup>
rtems_shutdown_executive(status);
8022300: 2b 81 00 08 lw r1,(sp+8)
8022304: f8 00 00 61 calli 8022488 <rtems_shutdown_executive>
8022308: e0 00 00 00 bi 8022308 <_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
0800d1ac <_getpid_r>:
pid_t _getpid_r(
struct _reent *ptr __attribute__((unused))
)
{
return getpid();
}
800d1ac: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
800d1b0: c3 a0 00 00 ret <== NOT EXECUTED
08002b40 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
8002b40: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8002b44: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return gettimeofday( tp, tzp );
8002b48: fb ff ff e0 calli 8002ac8 <gettimeofday> <== NOT EXECUTED
}
8002b4c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002b50: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8002b54: 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
08022444 <_realloc_r>:
void *_realloc_r(
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
8022444: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8022448: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return realloc( ptr, size );
802244c: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
8022450: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
8022454: fb ff 85 4d calli 8003988 <realloc> <== NOT EXECUTED
}
8022458: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
802245c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8022460: 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 91 30 ori r2,r2,0x9130 <== 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 37 fd calli 8013f78 <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 91 30 ori r2,r2,0x9130
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 37 f4 calli 8013f78 <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 37 e4 calli 8013f78 <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 3e bb calli 8015ae4 <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 3e b4 calli 8015ae4 <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 91 30 ori r2,r2,0x9130
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 37 bc calli 8013f78 <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 91 30 ori r2,r2,0x9130
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 37 b3 calli 8013f78 <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 30 3b calli 8012270 <__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 30 25 calli 8012270 <__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
08003d18 <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
8003d18: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8003d1c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return unlink( path );
8003d20: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
8003d24: fb ff ff 6d calli 8003ad8 <unlink> <== NOT EXECUTED
}
8003d28: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003d2c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8003d30: c3 a0 00 00 ret <== NOT EXECUTED
08002718 <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
8002718: 37 9c ff e8 addi sp,sp,-24
800271c: 5b 8b 00 10 sw (sp+16),r11
8002720: 5b 8c 00 0c sw (sp+12),r12
8002724: 5b 8d 00 08 sw (sp+8),r13
8002728: 5b 9d 00 04 sw (sp+4),ra
800272c: b8 40 60 00 mv r12,r2
long adjustment;
/*
* Simple validations
*/
if ( !delta )
8002730: 34 02 00 00 mvi r2,0
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
8002734: b8 20 58 00 mv r11,r1
long adjustment;
/*
* Simple validations
*/
if ( !delta )
8002738: 44 22 00 05 be r1,r2,800274c <adjtime+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
800273c: 28 23 00 04 lw r3,(r1+4)
8002740: 78 01 00 0f mvhi r1,0xf
8002744: 38 21 42 3f ori r1,r1,0x423f
8002748: 50 23 00 06 bgeu r1,r3,8002760 <adjtime+0x48>
rtems_set_errno_and_return_minus_one( EINVAL );
800274c: f8 00 2b 1e calli 800d3c4 <__errno>
8002750: 34 02 00 16 mvi r2,22
8002754: 58 22 00 00 sw (r1+0),r2
8002758: 34 01 ff ff mvi r1,-1
800275c: e0 00 00 3e bi 8002854 <adjtime+0x13c>
if ( olddelta ) {
8002760: 45 80 00 03 be r12,r0,800276c <adjtime+0x54>
olddelta->tv_sec = 0;
olddelta->tv_usec = 0;
8002764: 59 82 00 04 sw (r12+4),r2
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
olddelta->tv_sec = 0;
8002768: 59 82 00 00 sw (r12+0),r2
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
800276c: 29 61 00 00 lw r1,(r11+0)
8002770: 78 02 00 0f mvhi r2,0xf
8002774: 38 42 42 40 ori r2,r2,0x4240
8002778: f8 00 64 e7 calli 801bb14 <__mulsi3>
adjustment += delta->tv_usec;
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
800277c: 78 02 08 01 mvhi r2,0x801
8002780: 38 42 f0 c4 ori r2,r2,0xf0c4
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
adjustment += delta->tv_usec;
8002784: 29 63 00 04 lw r3,(r11+4)
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
8002788: 28 42 00 0c lw r2,(r2+12)
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
adjustment += delta->tv_usec;
800278c: b4 23 08 00 add r1,r1,r3
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
8002790: 54 41 00 30 bgu r2,r1,8002850 <adjtime+0x138>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8002794: 78 01 08 01 mvhi r1,0x801
8002798: 38 21 f9 9c ori r1,r1,0xf99c
800279c: 28 22 00 00 lw r2,(r1+0)
80027a0: 34 42 00 01 addi r2,r2,1
80027a4: 58 22 00 00 sw (r1+0),r2
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
80027a8: 37 81 00 14 addi r1,sp,20
80027ac: f8 00 03 b3 calli 8003678 <_TOD_Get>
ts.tv_sec += delta->tv_sec;
80027b0: 29 63 00 00 lw r3,(r11+0)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
80027b4: 29 61 00 04 lw r1,(r11+4)
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
80027b8: 2b 8d 00 14 lw r13,(sp+20)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
80027bc: 34 02 03 e8 mvi r2,1000
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
80027c0: b5 a3 68 00 add r13,r13,r3
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
80027c4: f8 00 64 d4 calli 801bb14 <__mulsi3>
80027c8: 2b 84 00 18 lw r4,(sp+24)
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
80027cc: 78 03 3b 9a mvhi r3,0x3b9a
80027d0: 78 02 c4 65 mvhi r2,0xc465
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
80027d4: b4 24 08 00 add r1,r1,r4
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
80027d8: 38 63 c9 ff ori r3,r3,0xc9ff
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
80027dc: b9 a0 20 00 mv r4,r13
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
80027e0: 38 42 36 00 ori r2,r2,0x3600
80027e4: e0 00 00 02 bi 80027ec <adjtime+0xd4>
80027e8: b4 22 08 00 add r1,r1,r2
80027ec: b8 80 28 00 mv r5,r4
80027f0: 34 84 00 01 addi r4,r4,1
80027f4: 54 23 ff fd bgu r1,r3,80027e8 <adjtime+0xd0>
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
80027f8: 78 04 c4 65 mvhi r4,0xc465
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
80027fc: 78 03 3b 9a mvhi r3,0x3b9a
8002800: b8 20 10 00 mv r2,r1
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
8002804: 38 84 36 00 ori r4,r4,0x3600
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
8002808: 38 63 ca 00 ori r3,r3,0xca00
800280c: e0 00 00 02 bi 8002814 <adjtime+0xfc>
8002810: b4 43 10 00 add r2,r2,r3
8002814: b8 a0 30 00 mv r6,r5
8002818: 34 a5 ff ff addi r5,r5,-1
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
800281c: 50 82 ff fd bgeu r4,r2,8002810 <adjtime+0xf8>
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
8002820: 37 81 00 14 addi r1,sp,20
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
8002824: 5b 82 00 18 sw (sp+24),r2
8002828: 5b 86 00 14 sw (sp+20),r6
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
800282c: f8 00 03 c8 calli 800374c <_TOD_Set>
_Thread_Enable_dispatch();
8002830: f8 00 07 f3 calli 80047fc <_Thread_Enable_dispatch>
/* set the user's output */
if ( olddelta )
8002834: 45 80 00 07 be r12,r0,8002850 <adjtime+0x138> <== NEVER TAKEN
*olddelta = *delta;
8002838: 29 61 00 00 lw r1,(r11+0)
800283c: 59 81 00 00 sw (r12+0),r1
8002840: 29 6b 00 04 lw r11,(r11+4)
8002844: 34 01 00 00 mvi r1,0
8002848: 59 8b 00 04 sw (r12+4),r11
800284c: e0 00 00 02 bi 8002854 <adjtime+0x13c>
8002850: 34 01 00 00 mvi r1,0
return 0;
}
8002854: 2b 9d 00 04 lw ra,(sp+4)
8002858: 2b 8b 00 10 lw r11,(sp+16)
800285c: 2b 8c 00 0c lw r12,(sp+12)
8002860: 2b 8d 00 08 lw r13,(sp+8)
8002864: 37 9c 00 18 addi sp,sp,24
8002868: c3 a0 00 00 ret
0800272c <calloc>:
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
800272c: 37 9c ff f4 addi sp,sp,-12
8002730: 5b 8b 00 0c sw (sp+12),r11
8002734: 5b 8c 00 08 sw (sp+8),r12
8002738: 5b 9d 00 04 sw (sp+4),ra
800273c: 78 03 08 02 mvhi r3,0x802
8002740: 38 63 58 08 ori r3,r3,0x5808
8002744: 28 65 00 14 lw r5,(r3+20)
8002748: b8 20 20 00 mv r4,r1
length = nelem * elsize;
800274c: b8 40 08 00 mv r1,r2
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
8002750: 34 a5 00 01 addi r5,r5,1
length = nelem * elsize;
8002754: b8 80 10 00 mv r2,r4
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
8002758: 58 65 00 14 sw (r3+20),r5
length = nelem * elsize;
800275c: f8 00 7d 07 calli 8021b78 <__mulsi3>
8002760: b8 20 60 00 mv r12,r1
cptr = malloc( length );
8002764: f8 00 01 a0 calli 8002de4 <malloc>
8002768: b8 20 58 00 mv r11,r1
if ( cptr )
800276c: 44 20 00 04 be r1,r0,800277c <calloc+0x50> <== NEVER TAKEN
memset( cptr, '\0', length );
8002770: b9 80 18 00 mv r3,r12
8002774: 34 02 00 00 mvi r2,0
8002778: f8 00 44 3c calli 8013868 <memset>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
800277c: 78 02 08 02 mvhi r2,0x802
8002780: 38 42 58 08 ori r2,r2,0x5808
8002784: 28 43 00 04 lw r3,(r2+4)
return cptr;
}
8002788: 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 */
800278c: 34 63 ff ff addi r3,r3,-1
8002790: 58 43 00 04 sw (r2+4),r3
return cptr;
}
8002794: 2b 9d 00 04 lw ra,(sp+4)
8002798: 2b 8b 00 0c lw r11,(sp+12)
800279c: 2b 8c 00 08 lw r12,(sp+8)
80027a0: 37 9c 00 0c addi sp,sp,12
80027a4: c3 a0 00 00 ret
08009164 <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
8009164: 37 9c ff e0 addi sp,sp,-32
8009168: 5b 8b 00 0c sw (sp+12),r11
800916c: 5b 8c 00 08 sw (sp+8),r12
8009170: 5b 9d 00 04 sw (sp+4),ra
8009174: b8 20 60 00 mv r12,r1
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
8009178: 5c 20 00 04 bne r1,r0,8009188 <chdir+0x24>
rtems_set_errno_and_return_minus_one( EFAULT );
800917c: f8 00 14 a0 calli 800e3fc <__errno>
8009180: 34 02 00 0e mvi r2,14
8009184: e0 00 00 14 bi 80091d4 <chdir+0x70>
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
8009188: f8 00 19 4e calli 800f6c0 <strlen>
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
800918c: 34 03 00 01 mvi r3,1
8009190: 37 8b 00 10 addi r11,sp,16
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
8009194: 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(
8009198: b9 60 20 00 mv r4,r11
800919c: b9 80 08 00 mv r1,r12
80091a0: b8 60 28 00 mv r5,r3
80091a4: fb ff e1 96 calli 80017fc <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
80091a8: 34 02 ff ff mvi r2,-1
80091ac: 5c 20 00 2b bne r1,r0,8009258 <chdir+0xf4>
return -1;
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
80091b0: 2b 83 00 1c lw r3,(sp+28)
80091b4: 28 62 00 10 lw r2,(r3+16)
80091b8: 5c 41 00 0a bne r2,r1,80091e0 <chdir+0x7c> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
80091bc: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED
80091c0: 44 62 00 03 be r3,r2,80091cc <chdir+0x68> <== NOT EXECUTED
80091c4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80091c8: d8 60 00 00 call r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
80091cc: f8 00 14 8c calli 800e3fc <__errno> <== NOT EXECUTED
80091d0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
80091d4: 58 22 00 00 sw (r1+0),r2
80091d8: 34 02 ff ff mvi r2,-1
80091dc: e0 00 00 1f bi 8009258 <chdir+0xf4>
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
80091e0: b9 60 08 00 mv r1,r11
80091e4: d8 40 00 00 call r2
80091e8: 34 02 00 01 mvi r2,1
80091ec: 44 22 00 0a be r1,r2,8009214 <chdir+0xb0>
rtems_filesystem_freenode( &loc );
80091f0: 2b 81 00 1c lw r1,(sp+28)
80091f4: 44 20 00 05 be r1,r0,8009208 <chdir+0xa4> <== NEVER TAKEN
80091f8: 28 22 00 1c lw r2,(r1+28)
80091fc: 44 40 00 03 be r2,r0,8009208 <chdir+0xa4> <== NEVER TAKEN
8009200: b9 60 08 00 mv r1,r11
8009204: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( ENOTDIR );
8009208: f8 00 14 7d calli 800e3fc <__errno>
800920c: 34 02 00 14 mvi r2,20
8009210: e3 ff ff f1 bi 80091d4 <chdir+0x70>
}
rtems_filesystem_freenode( &rtems_filesystem_current );
8009214: 78 01 08 02 mvhi r1,0x802
8009218: 38 21 00 f8 ori r1,r1,0xf8
800921c: 28 21 00 00 lw r1,(r1+0)
8009220: 28 22 00 10 lw r2,(r1+16)
8009224: 44 40 00 05 be r2,r0,8009238 <chdir+0xd4> <== NEVER TAKEN
8009228: 28 42 00 1c lw r2,(r2+28)
800922c: 44 40 00 03 be r2,r0,8009238 <chdir+0xd4> <== NEVER TAKEN
8009230: 34 21 00 04 addi r1,r1,4
8009234: d8 40 00 00 call r2
rtems_filesystem_current = loc;
8009238: 78 01 08 02 mvhi r1,0x802
800923c: 38 21 00 f8 ori r1,r1,0xf8
8009240: 28 21 00 00 lw r1,(r1+0)
8009244: 37 82 00 10 addi r2,sp,16
8009248: 34 03 00 14 mvi r3,20
800924c: 34 21 00 04 addi r1,r1,4
8009250: f8 00 17 11 calli 800ee94 <memcpy>
8009254: 34 02 00 00 mvi r2,0
return 0;
}
8009258: b8 40 08 00 mv r1,r2
800925c: 2b 9d 00 04 lw ra,(sp+4)
8009260: 2b 8b 00 0c lw r11,(sp+12)
8009264: 2b 8c 00 08 lw r12,(sp+8)
8009268: 37 9c 00 20 addi sp,sp,32
800926c: 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 3e fe calli 80132b8 <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 37 23 calli 8011390 <__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 37 18 calli 8011390 <__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 3e c2 calli 80132b8 <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 36 e8 calli 8011390 <__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 02 mvhi r11,0x802
80014c4: 39 6b 00 f8 ori r11,r11,0xf8
80014c8: 29 6c 00 00 lw r12,(r11+0)
80014cc: 78 02 08 02 mvhi r2,0x802
80014d0: 38 42 07 64 ori r2,r2,0x764
#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 33 c5 calli 800e3fc <__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 1f 1a calli 8009164 <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 33 bd calli 800e3fc <__errno> <== NOT EXECUTED
800150c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
8001510: f8 00 33 bb calli 800e3fc <__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 e0 34 ori r1,r1,0xe034
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 02 mvhi r1,0x802
800154c: 38 21 00 f8 ori r1,r1,0xf8
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 02 mvhi r1,0x802
8001570: 38 21 00 f8 ori r1,r1,0xf8
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 36 44 calli 800ee94 <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
080025f0 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
80025f0: 37 9c ff fc addi sp,sp,-4
80025f4: 5b 9d 00 04 sw (sp+4),ra
if ( !tp )
80025f8: 44 40 00 13 be r2,r0,8002644 <clock_gettime+0x54>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
80025fc: 34 03 00 01 mvi r3,1
8002600: 5c 23 00 04 bne r1,r3,8002610 <clock_gettime+0x20>
_TOD_Get(tp);
8002604: b8 40 08 00 mv r1,r2
8002608: f8 00 06 0f calli 8003e44 <_TOD_Get>
800260c: e0 00 00 07 bi 8002628 <clock_gettime+0x38>
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
8002610: 34 03 00 04 mvi r3,4
8002614: 44 23 00 03 be r1,r3,8002620 <clock_gettime+0x30> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
8002618: 34 03 00 02 mvi r3,2
800261c: 5c 23 00 05 bne r1,r3,8002630 <clock_gettime+0x40>
_TOD_Get_uptime_as_timespec( tp );
8002620: b8 40 08 00 mv r1,r2
8002624: f8 00 06 2e calli 8003edc <_TOD_Get_uptime_as_timespec>
8002628: 34 01 00 00 mvi r1,0
return 0;
800262c: e0 00 00 0a bi 8002654 <clock_gettime+0x64>
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
8002630: 34 02 00 03 mvi r2,3
8002634: 5c 22 00 04 bne r1,r2,8002644 <clock_gettime+0x54>
rtems_set_errno_and_return_minus_one( ENOSYS );
8002638: f8 00 2b c8 calli 800d558 <__errno>
800263c: 34 02 00 58 mvi r2,88
8002640: e0 00 00 03 bi 800264c <clock_gettime+0x5c>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
8002644: f8 00 2b c5 calli 800d558 <__errno>
8002648: 34 02 00 16 mvi r2,22
800264c: 58 22 00 00 sw (r1+0),r2
8002650: 34 01 ff ff mvi r1,-1
return 0;
}
8002654: 2b 9d 00 04 lw ra,(sp+4)
8002658: 37 9c 00 04 addi sp,sp,4
800265c: c3 a0 00 00 ret
08002660 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
8002660: 37 9c ff fc addi sp,sp,-4
8002664: 5b 9d 00 04 sw (sp+4),ra
if ( !tp )
8002668: 44 40 00 19 be r2,r0,80026cc <clock_settime+0x6c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
800266c: 34 03 00 01 mvi r3,1
8002670: 5c 23 00 10 bne r1,r3,80026b0 <clock_settime+0x50>
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
8002674: 28 43 00 00 lw r3,(r2+0)
8002678: 78 01 21 da mvhi r1,0x21da
800267c: 38 21 e4 ff ori r1,r1,0xe4ff
8002680: 54 61 00 02 bgu r3,r1,8002688 <clock_settime+0x28>
8002684: e0 00 00 12 bi 80026cc <clock_settime+0x6c>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8002688: 78 01 08 01 mvhi r1,0x801
800268c: 38 21 f8 b4 ori r1,r1,0xf8b4
8002690: 28 23 00 00 lw r3,(r1+0)
8002694: 34 63 00 01 addi r3,r3,1
8002698: 58 23 00 00 sw (r1+0),r3
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
800269c: b8 40 08 00 mv r1,r2
80026a0: f8 00 06 2c calli 8003f50 <_TOD_Set>
_Thread_Enable_dispatch();
80026a4: f8 00 0b 04 calli 80052b4 <_Thread_Enable_dispatch>
80026a8: 34 01 00 00 mvi r1,0
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
80026ac: e0 00 00 0c bi 80026dc <clock_settime+0x7c>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
80026b0: 34 02 00 02 mvi r2,2
80026b4: 44 22 00 03 be r1,r2,80026c0 <clock_settime+0x60>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
80026b8: 34 02 00 03 mvi r2,3
80026bc: 5c 22 00 04 bne r1,r2,80026cc <clock_settime+0x6c>
rtems_set_errno_and_return_minus_one( ENOSYS );
80026c0: f8 00 2b a6 calli 800d558 <__errno>
80026c4: 34 02 00 58 mvi r2,88
80026c8: e0 00 00 03 bi 80026d4 <clock_settime+0x74>
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
80026cc: f8 00 2b a3 calli 800d558 <__errno>
80026d0: 34 02 00 16 mvi r2,22
80026d4: 58 22 00 00 sw (r1+0),r2
80026d8: 34 01 ff ff mvi r1,-1
return 0;
}
80026dc: 2b 9d 00 04 lw ra,(sp+4)
80026e0: 37 9c 00 04 addi sp,sp,4
80026e4: c3 a0 00 00 ret
0800cf7c <close>:
#include <rtems/libio_.h>
int close(
int fd
)
{
800cf7c: 37 9c ff f0 addi sp,sp,-16
800cf80: 5b 8b 00 10 sw (sp+16),r11
800cf84: 5b 8c 00 0c sw (sp+12),r12
800cf88: 5b 8d 00 08 sw (sp+8),r13
800cf8c: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
800cf90: 78 02 08 02 mvhi r2,0x802
800cf94: 38 42 50 10 ori r2,r2,0x5010
800cf98: 28 42 00 00 lw r2,(r2+0)
800cf9c: 54 41 00 02 bgu r2,r1,800cfa4 <close+0x28>
800cfa0: e0 00 00 0e bi 800cfd8 <close+0x5c>
iop = rtems_libio_iop(fd);
800cfa4: 34 02 00 03 mvi r2,3
800cfa8: fb ff cf 09 calli 8000bcc <__ashlsi3>
800cfac: 78 0c 08 02 mvhi r12,0x802
800cfb0: 39 8c 57 ec ori r12,r12,0x57ec
800cfb4: 34 02 00 03 mvi r2,3
800cfb8: b8 20 68 00 mv r13,r1
800cfbc: fb ff cf 04 calli 8000bcc <__ashlsi3>
800cfc0: 29 8b 00 00 lw r11,(r12+0)
800cfc4: b5 a1 08 00 add r1,r13,r1
800cfc8: b5 61 58 00 add r11,r11,r1
rtems_libio_check_is_open(iop);
800cfcc: 29 61 00 18 lw r1,(r11+24)
800cfd0: 20 21 01 00 andi r1,r1,0x100
800cfd4: 5c 20 00 06 bne r1,r0,800cfec <close+0x70>
800cfd8: f8 00 17 20 calli 8012c58 <__errno>
800cfdc: 34 02 00 09 mvi r2,9
800cfe0: 58 22 00 00 sw (r1+0),r2
800cfe4: 34 01 ff ff mvi r1,-1
800cfe8: e0 00 00 11 bi 800d02c <close+0xb0>
rc = RTEMS_SUCCESSFUL;
if ( iop->handlers->close_h )
800cfec: 29 61 00 40 lw r1,(r11+64)
800cff0: 28 22 00 04 lw r2,(r1+4)
800cff4: b8 40 60 00 mv r12,r2
800cff8: 44 40 00 04 be r2,r0,800d008 <close+0x8c> <== NEVER TAKEN
rc = (*iop->handlers->close_h)( iop );
800cffc: b9 60 08 00 mv r1,r11
800d000: d8 40 00 00 call r2
800d004: b8 20 60 00 mv r12,r1
rtems_filesystem_freenode( &iop->pathinfo );
800d008: 29 61 00 28 lw r1,(r11+40)
800d00c: 44 20 00 05 be r1,r0,800d020 <close+0xa4> <== NEVER TAKEN
800d010: 28 22 00 1c lw r2,(r1+28)
800d014: 44 40 00 03 be r2,r0,800d020 <close+0xa4>
800d018: 35 61 00 1c addi r1,r11,28
800d01c: d8 40 00 00 call r2
rtems_libio_free( iop );
800d020: b9 60 08 00 mv r1,r11
800d024: f8 00 00 cc calli 800d354 <rtems_libio_free>
return rc;
800d028: b9 80 08 00 mv r1,r12
}
800d02c: 2b 9d 00 04 lw ra,(sp+4)
800d030: 2b 8b 00 10 lw r11,(sp+16)
800d034: 2b 8c 00 0c lw r12,(sp+12)
800d038: 2b 8d 00 08 lw r13,(sp+8)
800d03c: 37 9c 00 10 addi sp,sp,16
800d040: c3 a0 00 00 ret
08004b90 <devFS_close>:
#include "devfs.h"
int devFS_close(
rtems_libio_t *iop
)
{
8004b90: 37 9c ff f0 addi sp,sp,-16
8004b94: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_open_close_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
8004b98: 28 23 00 3c lw r3,(r1+60)
#include "devfs.h"
int devFS_close(
rtems_libio_t *iop
)
{
8004b9c: b8 20 20 00 mv r4,r1
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.flags = 0;
8004ba0: 34 01 00 00 mvi r1,0
args.mode = 0;
8004ba4: 5b 81 00 10 sw (sp+16),r1
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.flags = 0;
8004ba8: 5b 81 00 0c sw (sp+12),r1
args.mode = 0;
status = rtems_io_close(
8004bac: 28 62 00 0c lw r2,(r3+12)
8004bb0: 28 61 00 08 lw r1,(r3+8)
8004bb4: 37 83 00 08 addi r3,sp,8
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
8004bb8: 5b 84 00 08 sw (sp+8),r4
args.flags = 0;
args.mode = 0;
status = rtems_io_close(
8004bbc: f8 00 07 08 calli 80067dc <rtems_io_close>
np->major,
np->minor,
(void *) &args
);
if ( status ) {
8004bc0: b8 20 10 00 mv r2,r1
8004bc4: 44 20 00 03 be r1,r0,8004bd0 <devFS_close+0x40> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8004bc8: f8 00 00 48 calli 8004ce8 <rtems_deviceio_errno> <== NOT EXECUTED
8004bcc: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
}
return 0;
}
8004bd0: b8 40 08 00 mv r1,r2
8004bd4: 2b 9d 00 04 lw ra,(sp+4)
8004bd8: 37 9c 00 10 addi sp,sp,16
8004bdc: c3 a0 00 00 ret
08004bec <devFS_evaluate_path>:
const char *pathname,
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
8004bec: 37 9c ff e0 addi sp,sp,-32
8004bf0: 5b 8b 00 20 sw (sp+32),r11
8004bf4: 5b 8c 00 1c sw (sp+28),r12
8004bf8: 5b 8d 00 18 sw (sp+24),r13
8004bfc: 5b 8e 00 14 sw (sp+20),r14
8004c00: 5b 8f 00 10 sw (sp+16),r15
8004c04: 5b 90 00 0c sw (sp+12),r16
8004c08: 5b 91 00 08 sw (sp+8),r17
8004c0c: 5b 9d 00 04 sw (sp+4),ra
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
8004c10: 28 8c 00 00 lw r12,(r4+0)
const char *pathname,
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
8004c14: b8 80 58 00 mv r11,r4
8004c18: b8 20 88 00 mv r17,r1
8004c1c: b8 40 80 00 mv r16,r2
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
8004c20: 45 80 00 05 be r12,r0,8004c34 <devFS_evaluate_path+0x48> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
8004c24: 78 0d 08 00 mvhi r13,0x800
8004c28: 39 ad d0 14 ori r13,r13,0xd014
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
8004c2c: 34 0e 00 00 mvi r14,0
8004c30: e0 00 00 1c bi 8004ca0 <devFS_evaluate_path+0xb4>
rtems_set_errno_and_return_minus_one( EFAULT );
8004c34: f8 00 12 21 calli 80094b8 <__errno> <== NOT EXECUTED
8004c38: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
8004c3c: e0 00 00 1f bi 8004cb8 <devFS_evaluate_path+0xcc> <== NOT EXECUTED
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
8004c40: 29 8f 00 00 lw r15,(r12+0)
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
8004c44: 35 ce 00 01 addi r14,r14,1
if (!device_name_table[i].device_name)
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8004c48: b9 e0 10 00 mv r2,r15
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
8004c4c: 45 e0 00 14 be r15,r0,8004c9c <devFS_evaluate_path+0xb0>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8004c50: f8 00 16 af calli 800a70c <strncmp>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
8004c54: b5 f0 78 00 add r15,r15,r16
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8004c58: 5c 20 00 11 bne r1,r0,8004c9c <devFS_evaluate_path+0xb0> <== NEVER TAKEN
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
8004c5c: 41 e5 00 00 lbu r5,(r15+0)
8004c60: 5c a1 00 0f bne r5,r1,8004c9c <devFS_evaluate_path+0xb0> <== NEVER TAKEN
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
8004c64: 78 02 08 00 mvhi r2,0x800
8004c68: 38 42 d1 7c ori r2,r2,0xd17c
8004c6c: 28 41 00 00 lw r1,(r2+0)
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
8004c70: 78 03 08 00 mvhi r3,0x800
pathloc->ops = &devFS_ops;
8004c74: 78 02 08 00 mvhi r2,0x800
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
8004c78: 28 21 00 28 lw r1,(r1+40)
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
8004c7c: 38 63 d1 44 ori r3,r3,0xd144
pathloc->ops = &devFS_ops;
8004c80: 38 42 d0 fc ori r2,r2,0xd0fc
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
8004c84: 59 61 00 10 sw (r11+16),r1
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
8004c88: 59 6c 00 00 sw (r11+0),r12
pathloc->handlers = &devFS_file_handlers;
8004c8c: 59 63 00 08 sw (r11+8),r3
pathloc->ops = &devFS_ops;
8004c90: 59 62 00 0c sw (r11+12),r2
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
8004c94: b8 a0 08 00 mv r1,r5
return 0;
8004c98: e0 00 00 0a bi 8004cc0 <devFS_evaluate_path+0xd4>
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
8004c9c: 35 8c 00 14 addi r12,r12,20
8004ca0: 29 a2 00 00 lw r2,(r13+0)
if (!device_name_table[i].device_name)
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8004ca4: ba 20 08 00 mv r1,r17
8004ca8: ba 00 18 00 mv r3,r16
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
8004cac: 54 4e ff e5 bgu r2,r14,8004c40 <devFS_evaluate_path+0x54>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
8004cb0: f8 00 12 02 calli 80094b8 <__errno>
8004cb4: 34 02 00 02 mvi r2,2
8004cb8: 58 22 00 00 sw (r1+0),r2
8004cbc: 34 01 ff ff mvi r1,-1
}
8004cc0: 2b 9d 00 04 lw ra,(sp+4)
8004cc4: 2b 8b 00 20 lw r11,(sp+32)
8004cc8: 2b 8c 00 1c lw r12,(sp+28)
8004ccc: 2b 8d 00 18 lw r13,(sp+24)
8004cd0: 2b 8e 00 14 lw r14,(sp+20)
8004cd4: 2b 8f 00 10 lw r15,(sp+16)
8004cd8: 2b 90 00 0c lw r16,(sp+12)
8004cdc: 2b 91 00 08 lw r17,(sp+8)
8004ce0: 37 9c 00 20 addi sp,sp,32
8004ce4: c3 a0 00 00 ret
080007e8 <devFS_initialize>:
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
80007e8: 37 9c ff f0 addi sp,sp,-16
80007ec: 5b 8b 00 10 sw (sp+16),r11
80007f0: 5b 8c 00 0c sw (sp+12),r12
80007f4: 5b 8d 00 08 sw (sp+8),r13
80007f8: 5b 9d 00 04 sw (sp+4),ra
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
80007fc: 78 0b 08 00 mvhi r11,0x800
8000800: 39 6b d0 14 ori r11,r11,0xd014
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
8000804: b8 20 60 00 mv r12,r1
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
8000808: 29 61 00 00 lw r1,(r11+0)
800080c: 34 02 00 02 mvi r2,2
8000810: fb ff fe 52 calli 8000158 <__ashlsi3>
8000814: 34 02 00 02 mvi r2,2
8000818: b8 20 68 00 mv r13,r1
800081c: fb ff fe 4f calli 8000158 <__ashlsi3>
8000820: b5 a1 08 00 add r1,r13,r1
8000824: f8 00 0f c4 calli 8004734 <_Workspace_Allocate>
8000828: b8 20 68 00 mv r13,r1
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
800082c: 5c 20 00 06 bne r1,r0,8000844 <devFS_initialize+0x5c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
8000830: f8 00 23 22 calli 80094b8 <__errno> <== NOT EXECUTED
8000834: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
8000838: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800083c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000840: e0 00 00 13 bi 800088c <devFS_initialize+0xa4> <== NOT EXECUTED
memset(
8000844: 29 61 00 00 lw r1,(r11+0)
8000848: 34 02 00 02 mvi r2,2
800084c: fb ff fe 43 calli 8000158 <__ashlsi3>
8000850: 34 02 00 02 mvi r2,2
8000854: b8 20 58 00 mv r11,r1
8000858: fb ff fe 40 calli 8000158 <__ashlsi3>
800085c: b5 61 18 00 add r3,r11,r1
8000860: 34 02 00 00 mvi r2,0
8000864: b9 a0 08 00 mv r1,r13
8000868: f8 00 25 f7 calli 800a044 <memset>
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
800086c: 78 03 08 00 mvhi r3,0x800
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
8000870: 78 02 08 00 mvhi r2,0x800
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
8000874: 38 63 d1 44 ori r3,r3,0xd144
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
8000878: 38 42 d0 fc ori r2,r2,0xd0fc
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
800087c: 59 8d 00 1c sw (r12+28),r13
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
8000880: 59 83 00 24 sw (r12+36),r3
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
8000884: 59 82 00 28 sw (r12+40),r2
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
8000888: 34 01 00 00 mvi r1,0
return 0;
}
800088c: 2b 9d 00 04 lw ra,(sp+4)
8000890: 2b 8b 00 10 lw r11,(sp+16)
8000894: 2b 8c 00 0c lw r12,(sp+12)
8000898: 2b 8d 00 08 lw r13,(sp+8)
800089c: 37 9c 00 10 addi sp,sp,16
80008a0: c3 a0 00 00 ret
08000a40 <devFS_ioctl>:
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
8000a40: 37 9c ff ec addi sp,sp,-20
8000a44: 5b 9d 00 04 sw (sp+4),ra
8000a48: b8 20 20 00 mv r4,r1
rtems_libio_ioctl_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
8000a4c: 28 21 00 3c lw r1,(r1+60)
args.iop = iop;
args.command = command;
8000a50: 5b 82 00 0c sw (sp+12),r2
args.buffer = buffer;
8000a54: 5b 83 00 10 sw (sp+16),r3
status = rtems_io_control(
8000a58: 28 22 00 0c lw r2,(r1+12)
8000a5c: 28 21 00 08 lw r1,(r1+8)
8000a60: 37 83 00 08 addi r3,sp,8
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
8000a64: 5b 84 00 08 sw (sp+8),r4
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
8000a68: f8 00 06 b6 calli 8002540 <rtems_io_control>
np->major,
np->minor,
(void *) &args
);
if ( status )
8000a6c: 44 20 00 03 be r1,r0,8000a78 <devFS_ioctl+0x38> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8000a70: f8 00 10 9e calli 8004ce8 <rtems_deviceio_errno> <== NOT EXECUTED
8000a74: e0 00 00 02 bi 8000a7c <devFS_ioctl+0x3c> <== NOT EXECUTED
return args.ioctl_return;
8000a78: 2b 81 00 14 lw r1,(sp+20)
}
8000a7c: 2b 9d 00 04 lw ra,(sp+4)
8000a80: 37 9c 00 14 addi sp,sp,20
8000a84: c3 a0 00 00 ret
080008a4 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
80008a4: 37 9c ff d8 addi sp,sp,-40
80008a8: 5b 8b 00 28 sw (sp+40),r11
80008ac: 5b 8c 00 24 sw (sp+36),r12
80008b0: 5b 8d 00 20 sw (sp+32),r13
80008b4: 5b 8e 00 1c sw (sp+28),r14
80008b8: 5b 8f 00 18 sw (sp+24),r15
80008bc: 5b 90 00 14 sw (sp+20),r16
80008c0: 5b 91 00 10 sw (sp+16),r17
80008c4: 5b 92 00 0c sw (sp+12),r18
80008c8: 5b 93 00 08 sw (sp+8),r19
80008cc: 5b 9d 00 04 sw (sp+4),ra
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
80008d0: 40 26 00 00 lbu r6,(r1+0)
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
80008d4: b8 20 58 00 mv r11,r1
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
80008d8: 34 01 00 64 mvi r1,100
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
80008dc: b8 40 88 00 mv r17,r2
80008e0: b8 60 98 00 mv r19,r3
80008e4: b8 80 90 00 mv r18,r4
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
80008e8: 5c c1 00 0a bne r6,r1,8000910 <devFS_mknod+0x6c> <== NEVER TAKEN
80008ec: 41 62 00 01 lbu r2,(r11+1)
80008f0: 34 01 00 65 mvi r1,101
80008f4: 5c 41 00 07 bne r2,r1,8000910 <devFS_mknod+0x6c> <== NEVER TAKEN
(path[2] == 'v') && (path[3] == '\0'))
80008f8: 41 62 00 02 lbu r2,(r11+2)
80008fc: 34 01 00 76 mvi r1,118
8000900: 5c 41 00 04 bne r2,r1,8000910 <devFS_mknod+0x6c> <== NEVER TAKEN
8000904: 41 62 00 03 lbu r2,(r11+3)
8000908: b8 40 08 00 mv r1,r2
800090c: 44 40 00 3f be r2,r0,8000a08 <devFS_mknod+0x164>
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
8000910: 22 21 f0 00 andi r1,r17,0xf000
8000914: 7c 22 60 00 cmpnei r2,r1,24576
8000918: 7c 2f 20 00 cmpnei r15,r1,8192
800091c: a1 e2 78 00 and r15,r15,r2
8000920: 45 e0 00 04 be r15,r0,8000930 <devFS_mknod+0x8c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
8000924: f8 00 22 e5 calli 80094b8 <__errno> <== NOT EXECUTED
8000928: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
800092c: e0 00 00 0a bi 8000954 <devFS_mknod+0xb0> <== NOT EXECUTED
else
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
8000930: 28 b0 00 00 lw r16,(r5+0)
if (!device_name_table)
8000934: 46 0f 00 06 be r16,r15,800094c <devFS_mknod+0xa8> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
8000938: 78 0e 08 00 mvhi r14,0x800
800093c: 39 ce d0 14 ori r14,r14,0xd014
else
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
8000940: ba 00 60 00 mv r12,r16
8000944: 34 0d ff ff mvi r13,-1
8000948: e0 00 00 11 bi 800098c <devFS_mknod+0xe8>
rtems_set_errno_and_return_minus_one( EFAULT );
800094c: f8 00 22 db calli 80094b8 <__errno> <== NOT EXECUTED
8000950: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
8000954: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8000958: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
800095c: e0 00 00 2b bi 8000a08 <devFS_mknod+0x164> <== NOT EXECUTED
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
8000960: 29 85 00 00 lw r5,(r12+0)
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
8000964: 35 8c 00 14 addi r12,r12,20
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
8000968: b8 a0 10 00 mv r2,r5
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
800096c: 44 a0 00 06 be r5,r0,8000984 <devFS_mknod+0xe0> <== ALWAYS TAKEN
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
8000970: f8 00 26 ec calli 800a520 <strcmp> <== NOT EXECUTED
8000974: 5c 20 00 05 bne r1,r0,8000988 <devFS_mknod+0xe4> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EEXIST );
8000978: f8 00 22 d0 calli 80094b8 <__errno> <== NOT EXECUTED
800097c: 34 02 00 11 mvi r2,17 <== NOT EXECUTED
8000980: e3 ff ff f5 bi 8000954 <devFS_mknod+0xb0> <== NOT EXECUTED
8000984: b9 e0 68 00 mv r13,r15
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
8000988: 35 ef 00 01 addi r15,r15,1
800098c: 29 c2 00 00 lw r2,(r14+0)
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
8000990: b9 60 08 00 mv r1,r11
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
8000994: 54 4f ff f3 bgu r2,r15,8000960 <devFS_mknod+0xbc>
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
8000998: 34 01 ff ff mvi r1,-1
800099c: 5d a1 00 06 bne r13,r1,80009b4 <devFS_mknod+0x110> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
80009a0: f8 00 22 c6 calli 80094b8 <__errno> <== NOT EXECUTED
80009a4: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
80009a8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80009ac: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
80009b0: e0 00 00 16 bi 8000a08 <devFS_mknod+0x164> <== NOT EXECUTED
_ISR_Disable(level);
80009b4: 90 00 70 00 rcsr r14,IE
80009b8: 34 01 ff fe mvi r1,-2
80009bc: a1 c1 08 00 and r1,r14,r1
80009c0: d0 01 00 00 wcsr IE,r1
device_name_table[slot].device_name = (char *)path;
80009c4: 34 02 00 02 mvi r2,2
80009c8: b9 a0 08 00 mv r1,r13
80009cc: fb ff fd e3 calli 8000158 <__ashlsi3>
80009d0: 34 02 00 02 mvi r2,2
80009d4: b8 20 60 00 mv r12,r1
80009d8: fb ff fd e0 calli 8000158 <__ashlsi3>
80009dc: b5 81 08 00 add r1,r12,r1
80009e0: b6 01 60 00 add r12,r16,r1
80009e4: 59 8b 00 00 sw (r12+0),r11
device_name_table[slot].device_name_length = strlen(path);
80009e8: b9 60 08 00 mv r1,r11
80009ec: f8 00 27 1d calli 800a660 <strlen>
80009f0: 59 81 00 04 sw (r12+4),r1
device_name_table[slot].major = major;
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
80009f4: 59 91 00 10 sw (r12+16),r17
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
device_name_table[slot].device_name_length = strlen(path);
device_name_table[slot].major = major;
80009f8: 59 93 00 08 sw (r12+8),r19
device_name_table[slot].minor = minor;
80009fc: 59 92 00 0c sw (r12+12),r18
device_name_table[slot].mode = mode;
_ISR_Enable(level);
8000a00: d0 0e 00 00 wcsr IE,r14
8000a04: 34 01 00 00 mvi r1,0
return 0;
}
8000a08: 2b 9d 00 04 lw ra,(sp+4)
8000a0c: 2b 8b 00 28 lw r11,(sp+40)
8000a10: 2b 8c 00 24 lw r12,(sp+36)
8000a14: 2b 8d 00 20 lw r13,(sp+32)
8000a18: 2b 8e 00 1c lw r14,(sp+28)
8000a1c: 2b 8f 00 18 lw r15,(sp+24)
8000a20: 2b 90 00 14 lw r16,(sp+20)
8000a24: 2b 91 00 10 lw r17,(sp+16)
8000a28: 2b 92 00 0c lw r18,(sp+12)
8000a2c: 2b 93 00 08 lw r19,(sp+8)
8000a30: 37 9c 00 28 addi sp,sp,40
8000a34: c3 a0 00 00 ret
08000a88 <devFS_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
8000a88: 37 9c ff f0 addi sp,sp,-16
8000a8c: 5b 9d 00 04 sw (sp+4),ra
8000a90: b8 20 28 00 mv r5,r1
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.flags = iop->flags;
8000a94: 28 21 00 18 lw r1,(r1+24)
args.mode = mode;
8000a98: 5b 84 00 10 sw (sp+16),r4
status = rtems_io_open(
8000a9c: 37 83 00 08 addi r3,sp,8
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.flags = iop->flags;
8000aa0: 5b 81 00 0c sw (sp+12),r1
{
rtems_libio_open_close_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
8000aa4: 28 a1 00 3c lw r1,(r5+60)
args.iop = iop;
8000aa8: 5b 85 00 08 sw (sp+8),r5
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open(
8000aac: 28 22 00 0c lw r2,(r1+12)
8000ab0: 28 21 00 08 lw r1,(r1+8)
8000ab4: f8 00 07 13 calli 8002700 <rtems_io_open>
np->major,
np->minor,
(void *) &args
);
if ( status )
8000ab8: b8 20 10 00 mv r2,r1
8000abc: 44 20 00 03 be r1,r0,8000ac8 <devFS_open+0x40> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8000ac0: f8 00 10 8a calli 8004ce8 <rtems_deviceio_errno> <== NOT EXECUTED
8000ac4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
return 0;
}
8000ac8: b8 40 08 00 mv r1,r2
8000acc: 2b 9d 00 04 lw ra,(sp+4)
8000ad0: 37 9c 00 10 addi sp,sp,16
8000ad4: c3 a0 00 00 ret
08000ad8 <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
8000ad8: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED
8000adc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8000ae0: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
8000ae4: 28 21 00 18 lw r1,(r1+24) <== NOT EXECUTED
8000ae8: 5b 81 00 20 sw (sp+32),r1 <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
8000aec: 28 81 00 14 lw r1,(r4+20) <== NOT EXECUTED
8000af0: 5b 81 00 14 sw (sp+20),r1 <== NOT EXECUTED
8000af4: 28 81 00 10 lw r1,(r4+16) <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
8000af8: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
8000afc: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
8000b00: 5b 81 00 10 sw (sp+16),r1 <== NOT EXECUTED
{
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
8000b04: 28 81 00 3c lw r1,(r4+60) <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
8000b08: 5b 83 00 24 sw (sp+36),r3 <== NOT EXECUTED
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
8000b0c: 5b 82 00 18 sw (sp+24),r2 <== NOT EXECUTED
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
8000b10: 28 22 00 0c lw r2,(r1+12) <== NOT EXECUTED
8000b14: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED
8000b18: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
8000b1c: 5b 84 00 08 sw (sp+8),r4 <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
8000b20: f8 00 07 1d calli 8002794 <rtems_io_read> <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
8000b24: 44 20 00 03 be r1,r0,8000b30 <devFS_read+0x58> <== NOT EXECUTED
return rtems_deviceio_errno(status);
8000b28: f8 00 10 70 calli 8004ce8 <rtems_deviceio_errno> <== NOT EXECUTED
8000b2c: e0 00 00 02 bi 8000b34 <devFS_read+0x5c> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
8000b30: 2b 81 00 24 lw r1,(sp+36) <== NOT EXECUTED
}
8000b34: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8000b38: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED
8000b3c: c3 a0 00 00 ret <== NOT EXECUTED
08000b40 <devFS_stat>:
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
8000b40: 37 9c ff fc addi sp,sp,-4
8000b44: 5b 9d 00 04 sw (sp+4),ra
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
8000b48: 28 21 00 00 lw r1,(r1+0)
if (!the_dev)
8000b4c: 5c 20 00 06 bne r1,r0,8000b64 <devFS_stat+0x24> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
8000b50: f8 00 22 5a calli 80094b8 <__errno> <== NOT EXECUTED
8000b54: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
8000b58: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8000b5c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000b60: e0 00 00 08 bi 8000b80 <devFS_stat+0x40> <== NOT EXECUTED
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
8000b64: 28 23 00 0c lw r3,(r1+12)
8000b68: 28 24 00 08 lw r4,(r1+8)
buf->st_mode = the_dev->mode;
8000b6c: 28 21 00 10 lw r1,(r1+16)
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
8000b70: 58 43 00 1c sw (r2+28),r3
8000b74: 58 44 00 18 sw (r2+24),r4
buf->st_mode = the_dev->mode;
8000b78: 58 41 00 0c sw (r2+12),r1
8000b7c: 34 01 00 00 mvi r1,0
return 0;
}
8000b80: 2b 9d 00 04 lw ra,(sp+4)
8000b84: 37 9c 00 04 addi sp,sp,4
8000b88: c3 a0 00 00 ret
08000b8c <devFS_write>:
ssize_t devFS_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
8000b8c: 37 9c ff dc addi sp,sp,-36
8000b90: 5b 9d 00 04 sw (sp+4),ra
8000b94: b8 20 20 00 mv r4,r1
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
8000b98: 28 21 00 18 lw r1,(r1+24)
8000b9c: 5b 81 00 20 sw (sp+32),r1
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
8000ba0: 28 81 00 14 lw r1,(r4+20)
8000ba4: 5b 81 00 14 sw (sp+20),r1
8000ba8: 28 81 00 10 lw r1,(r4+16)
args.buffer = (void *) buffer;
args.count = count;
8000bac: 5b 83 00 1c sw (sp+28),r3
args.flags = iop->flags;
args.bytes_moved = 0;
8000bb0: 34 03 00 00 mvi r3,0
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
8000bb4: 5b 81 00 10 sw (sp+16),r1
{
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
8000bb8: 28 81 00 3c lw r1,(r4+60)
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
8000bbc: 5b 83 00 24 sw (sp+36),r3
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
8000bc0: 5b 82 00 18 sw (sp+24),r2
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
8000bc4: 28 22 00 0c lw r2,(r1+12)
8000bc8: 28 21 00 08 lw r1,(r1+8)
8000bcc: 37 83 00 08 addi r3,sp,8
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
8000bd0: 5b 84 00 08 sw (sp+8),r4
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
8000bd4: f8 00 07 15 calli 8002828 <rtems_io_write>
np->major,
np->minor,
(void *) &args
);
if ( status )
8000bd8: 44 20 00 03 be r1,r0,8000be4 <devFS_write+0x58> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8000bdc: f8 00 10 43 calli 8004ce8 <rtems_deviceio_errno> <== NOT EXECUTED
8000be0: e0 00 00 02 bi 8000be8 <devFS_write+0x5c> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
8000be4: 2b 81 00 24 lw r1,(sp+36)
}
8000be8: 2b 9d 00 04 lw ra,(sp+4)
8000bec: 37 9c 00 24 addi sp,sp,36
8000bf0: c3 a0 00 00 ret
080115e4 <device_close>:
*/
int device_close(
rtems_libio_t *iop
)
{
80115e4: 37 9c ff f0 addi sp,sp,-16
80115e8: 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;
80115ec: 28 23 00 3c lw r3,(r1+60)
args.iop = iop;
args.flags = 0;
80115f0: 34 02 00 00 mvi r2,0
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
80115f4: 5b 81 00 08 sw (sp+8),r1
args.flags = 0;
args.mode = 0;
80115f8: 5b 82 00 10 sw (sp+16),r2
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.flags = 0;
80115fc: 5b 82 00 0c sw (sp+12),r2
args.mode = 0;
status = rtems_io_close(
8011600: 28 62 00 54 lw r2,(r3+84)
8011604: 28 61 00 50 lw r1,(r3+80)
8011608: 37 83 00 08 addi r3,sp,8
801160c: f8 00 03 ff calli 8012608 <rtems_io_close>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status ) {
8011610: b8 20 10 00 mv r2,r1
8011614: 44 20 00 03 be r1,r0,8011620 <device_close+0x3c> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8011618: f8 00 05 03 calli 8012a24 <rtems_deviceio_errno> <== NOT EXECUTED
801161c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
}
return 0;
}
8011620: b8 40 08 00 mv r1,r2
8011624: 2b 9d 00 04 lw ra,(sp+4)
8011628: 37 9c 00 10 addi sp,sp,16
801162c: c3 a0 00 00 ret
080114d8 <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
80114d8: 37 9c ff ec addi sp,sp,-20
80114dc: 5b 9d 00 04 sw (sp+4),ra
args.iop = iop;
args.command = command;
args.buffer = buffer;
the_jnode = iop->file_info;
80114e0: 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;
80114e4: 5b 82 00 0c sw (sp+12),r2
args.buffer = buffer;
80114e8: 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;
80114ec: 5b 81 00 08 sw (sp+8),r1
args.command = command;
args.buffer = buffer;
the_jnode = iop->file_info;
status = rtems_io_control(
80114f0: 28 82 00 54 lw r2,(r4+84)
80114f4: 28 81 00 50 lw r1,(r4+80)
80114f8: 37 83 00 08 addi r3,sp,8
80114fc: f8 00 04 68 calli 801269c <rtems_io_control>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
8011500: 44 20 00 03 be r1,r0,801150c <device_ioctl+0x34> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8011504: f8 00 05 48 calli 8012a24 <rtems_deviceio_errno> <== NOT EXECUTED
8011508: e0 00 00 02 bi 8011510 <device_ioctl+0x38> <== NOT EXECUTED
return args.ioctl_return;
801150c: 2b 81 00 14 lw r1,(sp+20)
}
8011510: 2b 9d 00 04 lw ra,(sp+4)
8011514: 37 9c 00 14 addi sp,sp,20
8011518: c3 a0 00 00 ret
08011630 <device_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
8011630: 37 9c ff f0 addi sp,sp,-16
8011634: 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;
8011638: 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;
801163c: 28 23 00 3c lw r3,(r1+60)
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
8011640: 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;
8011644: 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;
8011648: 5b 81 00 08 sw (sp+8),r1
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open(
801164c: 28 62 00 54 lw r2,(r3+84)
8011650: 28 61 00 50 lw r1,(r3+80)
8011654: 37 83 00 08 addi r3,sp,8
8011658: f8 00 04 36 calli 8012730 <rtems_io_open>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
801165c: b8 20 10 00 mv r2,r1
8011660: 44 20 00 03 be r1,r0,801166c <device_open+0x3c> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8011664: f8 00 04 f0 calli 8012a24 <rtems_deviceio_errno> <== NOT EXECUTED
8011668: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
return 0;
}
801166c: b8 40 08 00 mv r1,r2
8011670: 2b 9d 00 04 lw ra,(sp+4)
8011674: 37 9c 00 10 addi sp,sp,16
8011678: c3 a0 00 00 ret
08011580 <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
8011580: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED
8011584: 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;
8011588: 28 24 00 18 lw r4,(r1+24) <== NOT EXECUTED
801158c: 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;
8011590: 28 24 00 14 lw r4,(r1+20) <== NOT EXECUTED
8011594: 5b 84 00 14 sw (sp+20),r4 <== NOT EXECUTED
8011598: 28 24 00 10 lw r4,(r1+16) <== NOT EXECUTED
args.buffer = buffer;
801159c: 5b 82 00 18 sw (sp+24),r2 <== NOT EXECUTED
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
80115a0: 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;
80115a4: 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;
80115a8: 28 24 00 3c lw r4,(r1+60) <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
80115ac: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
80115b0: 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;
80115b4: 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(
80115b8: 28 82 00 54 lw r2,(r4+84) <== NOT EXECUTED
80115bc: 28 81 00 50 lw r1,(r4+80) <== NOT EXECUTED
80115c0: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED
80115c4: f8 00 04 80 calli 80127c4 <rtems_io_read> <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
80115c8: 44 20 00 03 be r1,r0,80115d4 <device_read+0x54> <== NOT EXECUTED
return rtems_deviceio_errno(status);
80115cc: f8 00 05 16 calli 8012a24 <rtems_deviceio_errno> <== NOT EXECUTED
80115d0: e0 00 00 02 bi 80115d8 <device_read+0x58> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
80115d4: 2b 81 00 24 lw r1,(sp+36) <== NOT EXECUTED
}
80115d8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80115dc: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED
80115e0: c3 a0 00 00 ret <== NOT EXECUTED
0801151c <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
801151c: 37 9c ff dc addi sp,sp,-36
8011520: 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;
8011524: 28 24 00 18 lw r4,(r1+24)
8011528: 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;
801152c: 28 24 00 14 lw r4,(r1+20)
8011530: 5b 84 00 14 sw (sp+20),r4
8011534: 28 24 00 10 lw r4,(r1+16)
args.buffer = (void *) buffer;
8011538: 5b 82 00 18 sw (sp+24),r2
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
801153c: 34 02 00 00 mvi r2,0
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
8011540: 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;
8011544: 28 24 00 3c lw r4,(r1+60)
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
8011548: 5b 83 00 1c sw (sp+28),r3
args.flags = iop->flags;
args.bytes_moved = 0;
801154c: 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;
8011550: 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(
8011554: 28 82 00 54 lw r2,(r4+84)
8011558: 28 81 00 50 lw r1,(r4+80)
801155c: 37 83 00 08 addi r3,sp,8
8011560: f8 00 04 be calli 8012858 <rtems_io_write>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
8011564: 44 20 00 03 be r1,r0,8011570 <device_write+0x54> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8011568: f8 00 05 2f calli 8012a24 <rtems_deviceio_errno> <== NOT EXECUTED
801156c: e0 00 00 02 bi 8011574 <device_write+0x58> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
8011570: 2b 81 00 24 lw r1,(sp+36)
}
8011574: 2b 9d 00 04 lw ra,(sp+4)
8011578: 37 9c 00 24 addi sp,sp,36
801157c: c3 a0 00 00 ret
080047f0 <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
80047f0: 37 9c ff f0 addi sp,sp,-16
80047f4: 5b 8b 00 10 sw (sp+16),r11
80047f8: 5b 8c 00 0c sw (sp+12),r12
80047fc: 5b 8d 00 08 sw (sp+8),r13
8004800: 5b 9d 00 04 sw (sp+4),ra
8004804: b8 20 58 00 mv r11,r1
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
8004808: 28 21 00 b4 lw r1,(r1+180)
800480c: 44 20 00 17 be r1,r0,8004868 <drainOutput+0x78> <== ALWAYS TAKEN
rtems_interrupt_disable (level);
8004810: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED
8004814: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED
8004818: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED
800481c: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
8004820: 34 0d 00 02 mvi r13,2 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
8004824: 34 0c ff fe mvi r12,-2 <== NOT EXECUTED
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
8004828: e0 00 00 0c bi 8004858 <drainOutput+0x68> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
800482c: 59 6d 00 94 sw (r11+148),r13 <== NOT EXECUTED
rtems_interrupt_enable (level);
8004830: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
8004834: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED
8004838: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800483c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
8004840: f8 00 06 81 calli 8006244 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
8004844: 44 20 00 02 be r1,r0,800484c <drainOutput+0x5c> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
8004848: f8 00 08 78 calli 8006a28 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
800484c: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED
8004850: a0 2c 10 00 and r2,r1,r12 <== NOT EXECUTED
8004854: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
8004858: 29 63 00 84 lw r3,(r11+132) <== NOT EXECUTED
800485c: 29 62 00 80 lw r2,(r11+128) <== NOT EXECUTED
8004860: 5c 62 ff f3 bne r3,r2,800482c <drainOutput+0x3c> <== NOT EXECUTED
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
8004864: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
}
}
8004868: 2b 9d 00 04 lw ra,(sp+4)
800486c: 2b 8b 00 10 lw r11,(sp+16)
8004870: 2b 8c 00 0c lw r12,(sp+12)
8004874: 2b 8d 00 08 lw r13,(sp+8)
8004878: 37 9c 00 10 addi sp,sp,16
800487c: c3 a0 00 00 ret
08001dc8 <dup2>:
int dup2(
int fildes,
int fildes2
)
{
8001dc8: 37 9c ff a4 addi sp,sp,-92
8001dcc: 5b 8b 00 14 sw (sp+20),r11
8001dd0: 5b 8c 00 10 sw (sp+16),r12
8001dd4: 5b 8d 00 0c sw (sp+12),r13
8001dd8: 5b 8e 00 08 sw (sp+8),r14
8001ddc: 5b 9d 00 04 sw (sp+4),ra
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
8001de0: 37 8d 00 18 addi r13,sp,24
int dup2(
int fildes,
int fildes2
)
{
8001de4: b8 40 58 00 mv r11,r2
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
8001de8: b9 a0 10 00 mv r2,r13
if ( status == -1 )
8001dec: 34 0c ff ff mvi r12,-1
int dup2(
int fildes,
int fildes2
)
{
8001df0: b8 20 70 00 mv r14,r1
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
8001df4: f8 00 01 f4 calli 80025c4 <fstat>
if ( status == -1 )
8001df8: 44 2c 00 0a be r1,r12,8001e20 <dup2+0x58> <== NEVER TAKEN
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
8001dfc: b9 a0 10 00 mv r2,r13
8001e00: b9 60 08 00 mv r1,r11
8001e04: f8 00 01 f0 calli 80025c4 <fstat>
if ( status == -1 )
8001e08: 44 2c 00 06 be r1,r12,8001e20 <dup2+0x58> <== ALWAYS TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
8001e0c: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
8001e10: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
8001e14: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8001e18: f8 00 00 ac calli 80020c8 <fcntl> <== NOT EXECUTED
8001e1c: e0 00 00 02 bi 8001e24 <dup2+0x5c> <== NOT EXECUTED
8001e20: 34 01 ff ff mvi r1,-1
}
8001e24: 2b 9d 00 04 lw ra,(sp+4)
8001e28: 2b 8b 00 14 lw r11,(sp+20)
8001e2c: 2b 8c 00 10 lw r12,(sp+16)
8001e30: 2b 8d 00 0c lw r13,(sp+12)
8001e34: 2b 8e 00 08 lw r14,(sp+8)
8001e38: 37 9c 00 5c addi sp,sp,92
8001e3c: c3 a0 00 00 ret
08004210 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
8004210: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED
8004214: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED
8004218: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED
800421c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8004220: b8 40 58 00 mv r11,r2 <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
8004224: 28 42 00 3c lw r2,(r2+60) <== NOT EXECUTED
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
8004228: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
800422c: 20 41 02 00 andi r1,r2,0x200 <== NOT EXECUTED
8004230: 44 20 00 19 be r1,r0,8004294 <echo+0x84> <== NOT EXECUTED
8004234: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8004238: 38 21 53 0c ori r1,r1,0x530c <== NOT EXECUTED
800423c: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
8004240: 34 02 00 05 mvi r2,5 <== NOT EXECUTED
8004244: b4 2c 08 00 add r1,r1,r12 <== NOT EXECUTED
8004248: 40 21 00 01 lbu r1,(r1+1) <== NOT EXECUTED
800424c: fb ff f4 93 calli 8001498 <__lshrsi3> <== NOT EXECUTED
8004250: 7d 82 00 09 cmpnei r2,r12,9 <== NOT EXECUTED
8004254: a0 22 08 00 and r1,r1,r2 <== NOT EXECUTED
8004258: 44 20 00 0f be r1,r0,8004294 <echo+0x84> <== NOT EXECUTED
800425c: 34 01 00 0a mvi r1,10 <== NOT EXECUTED
8004260: 45 81 00 0d be r12,r1,8004294 <echo+0x84> <== NOT EXECUTED
char echobuf[2];
echobuf[0] = '^';
8004264: 34 04 00 5e mvi r4,94 <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
8004268: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
800426c: 19 8c 00 40 xori r12,r12,0x40 <== NOT EXECUTED
rtems_termios_puts (echobuf, 2, tty);
8004270: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8004274: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
8004278: 33 84 00 10 sb (sp+16),r4 <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
800427c: 33 8c 00 11 sb (sp+17),r12 <== NOT EXECUTED
rtems_termios_puts (echobuf, 2, tty);
8004280: fb ff ff 2e calli 8003f38 <rtems_termios_puts> <== NOT EXECUTED
tty->column += 2;
8004284: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8004288: 34 21 00 02 addi r1,r1,2 <== NOT EXECUTED
800428c: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
8004290: e0 00 00 04 bi 80042a0 <echo+0x90> <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
}
else {
oproc (c, tty);
8004294: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8004298: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
800429c: fb ff ff 7d calli 8004090 <oproc> <== NOT EXECUTED
}
}
80042a0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80042a4: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
80042a8: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
80042ac: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
80042b0: c3 a0 00 00 ret <== NOT EXECUTED
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 02 mvhi r1,0x802 <== NOT EXECUTED
8001814: 38 21 17 9c ori r1,r1,0x179c <== 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 35 0b calli 800ec4c <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 02 mvhi r1,0x802 <== NOT EXECUTED
800183c: 38 21 16 b4 ori r1,r1,0x16b4 <== 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 35 01 calli 800ec4c <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 2a 14 ori r1,r1,0x2a14 <== NOT EXECUTED
80043e4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
80043e8: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
80043ec: 48 8c ff f7 bg r4,r12,80043c8 <erase+0x114> <== NOT EXECUTED
80043f0: e0 00 00 23 bi 800447c <erase+0x1c8> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
80043f4: 29 a2 00 00 lw r2,(r13+0) <== NOT EXECUTED
80043f8: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED
80043fc: b4 4c 10 00 add r2,r2,r12 <== NOT EXECUTED
8004400: 40 42 00 00 lbu r2,(r2+0) <== NOT EXECUTED
8004404: 20 42 00 20 andi r2,r2,0x20 <== NOT EXECUTED
8004408: 44 40 00 0c be r2,r0,8004438 <erase+0x184> <== NOT EXECUTED
800440c: 20 21 02 00 andi r1,r1,0x200 <== NOT EXECUTED
8004410: 44 20 00 0a be r1,r0,8004438 <erase+0x184> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
8004414: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
8004418: 38 21 2a 18 ori r1,r1,0x2a18 <== NOT EXECUTED
800441c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
8004420: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
8004424: fb ff fe c5 calli 8003f38 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
8004428: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800442c: 44 20 00 03 be r1,r0,8004438 <erase+0x184> <== NOT EXECUTED
tty->column--;
8004430: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
8004434: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
8004438: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED
800443c: b4 2c 60 00 add r12,r1,r12 <== NOT EXECUTED
8004440: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED
8004444: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED
8004448: 44 20 00 04 be r1,r0,8004458 <erase+0x1a4> <== NOT EXECUTED
800444c: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED
8004450: 20 21 02 00 andi r1,r1,0x200 <== NOT EXECUTED
8004454: 44 20 00 0a be r1,r0,800447c <erase+0x1c8> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
8004458: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
800445c: 38 21 2a 18 ori r1,r1,0x2a18 <== NOT EXECUTED
8004460: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
8004464: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
8004468: fb ff fe b4 calli 8003f38 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
800446c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8004470: 44 20 00 03 be r1,r0,800447c <erase+0x1c8> <== NOT EXECUTED
tty->column--;
8004474: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
8004478: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
}
}
}
if (!lineFlag)
800447c: 5d c0 00 07 bne r14,r0,8004498 <erase+0x1e4> <== NOT EXECUTED
8004480: e0 00 00 08 bi 80044a0 <erase+0x1ec> <== NOT EXECUTED
8004484: 78 0d 08 02 mvhi r13,0x802 <== NOT EXECUTED
8004488: 39 ad 53 0c ori r13,r13,0x530c <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
800448c: 34 10 00 09 mvi r16,9 <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
if (tty->column)
tty->column--;
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
8004490: 78 0f 08 02 mvhi r15,0x802 <== NOT EXECUTED
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
8004494: 78 11 08 02 mvhi r17,0x802 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
8004498: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED
800449c: 5c 60 ff a5 bne r3,r0,8004330 <erase+0x7c> <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
80044a0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80044a4: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED
80044a8: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED
80044ac: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED
80044b0: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED
80044b4: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED
80044b8: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED
80044bc: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED
80044c0: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED
80044c4: c3 a0 00 00 ret <== NOT EXECUTED
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 10 10 ori r9,r9,0x1010
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 17 24 ori r3,r3,0x1724
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 34 7d calli 800f34c <__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 fc 34 ori r16,r16,0xfc34
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 39 93 calli 8010844 <memcpy>
ret = (int) (diop - rtems_libio_iops);
80021fc: 78 01 08 02 mvhi r1,0x802
8002200: 38 21 17 24 ori r1,r1,0x1724
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 71 a6 calli 801e8b4 <__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 34 2c calli 800f34c <__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 34 29 calli 800f34c <__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 34 1d calli 800f34c <__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 10 10 ori r2,r2,0x1010
800234c: 28 42 00 00 lw r2,(r2+0)
8002350: 54 41 00 02 bgu r2,r1,8002358 <fdatasync+0x24>
8002354: e0 00 00 0e bi 800238c <fdatasync+0x58>
iop = rtems_libio_iop( fd );
8002358: 34 02 00 03 mvi r2,3
800235c: fb ff fa 0a calli 8000b84 <__ashlsi3>
8002360: 34 02 00 03 mvi r2,3
8002364: 78 0b 08 02 mvhi r11,0x802
8002368: b8 20 60 00 mv r12,r1
800236c: 39 6b 17 24 ori r11,r11,0x1724
8002370: fb ff fa 05 calli 8000b84 <__ashlsi3>
8002374: 29 62 00 00 lw r2,(r11+0)
8002378: b5 81 08 00 add r1,r12,r1
800237c: b4 41 08 00 add r1,r2,r1
rtems_libio_check_is_open(iop);
8002380: 28 22 00 18 lw r2,(r1+24)
8002384: 20 43 01 00 andi r3,r2,0x100
8002388: 5c 60 00 04 bne r3,r0,8002398 <fdatasync+0x64> <== ALWAYS TAKEN
800238c: f8 00 33 f0 calli 800f34c <__errno>
8002390: 34 02 00 09 mvi r2,9
8002394: e0 00 00 0b bi 80023c0 <fdatasync+0x8c>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
8002398: 20 42 00 04 andi r2,r2,0x4
800239c: 5c 40 00 04 bne r2,r0,80023ac <fdatasync+0x78>
80023a0: f8 00 33 eb calli 800f34c <__errno>
80023a4: 34 02 00 16 mvi r2,22
80023a8: e0 00 00 06 bi 80023c0 <fdatasync+0x8c>
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
80023ac: 28 22 00 40 lw r2,(r1+64)
80023b0: 28 42 00 2c lw r2,(r2+44)
80023b4: 5c 40 00 06 bne r2,r0,80023cc <fdatasync+0x98>
rtems_set_errno_and_return_minus_one( ENOTSUP );
80023b8: f8 00 33 e5 calli 800f34c <__errno>
80023bc: 34 02 00 86 mvi r2,134
80023c0: 58 22 00 00 sw (r1+0),r2
80023c4: 34 01 ff ff mvi r1,-1
80023c8: e0 00 00 02 bi 80023d0 <fdatasync+0x9c>
return (*iop->handlers->fdatasync_h)( iop );
80023cc: d8 40 00 00 call r2
}
80023d0: 2b 9d 00 04 lw ra,(sp+4)
80023d4: 2b 8b 00 0c lw r11,(sp+12)
80023d8: 2b 8c 00 08 lw r12,(sp+8)
80023dc: 37 9c 00 0c addi sp,sp,12
80023e0: c3 a0 00 00 ret
0800b8f8 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
800b8f8: 37 9c ff d8 addi sp,sp,-40
800b8fc: 5b 8b 00 20 sw (sp+32),r11
800b900: 5b 8c 00 1c sw (sp+28),r12
800b904: 5b 8d 00 18 sw (sp+24),r13
800b908: 5b 8e 00 14 sw (sp+20),r14
800b90c: 5b 8f 00 10 sw (sp+16),r15
800b910: 5b 90 00 0c sw (sp+12),r16
800b914: 5b 91 00 08 sw (sp+8),r17
800b918: 5b 9d 00 04 sw (sp+4),ra
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
800b91c: 78 03 08 02 mvhi r3,0x802
800b920: 38 63 57 78 ori r3,r3,0x5778
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
800b924: b8 20 70 00 mv r14,r1
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
800b928: 28 61 00 00 lw r1,(r3+0)
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
800b92c: b8 40 78 00 mv r15,r2
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
800b930: 34 02 00 00 mvi r2,0
800b934: b8 40 18 00 mv r3,r2
800b938: fb ff e2 7d calli 800432c <rtems_semaphore_obtain>
800b93c: b8 20 80 00 mv r16,r1
800b940: 34 0c ff fc mvi r12,-4
800b944: 5c 20 00 d1 bne r1,r0,800bc88 <fifo_open+0x390> <== ALWAYS TAKEN
RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL)
return -EINTR;
pipe = *pipep;
800b948: 29 cb 00 00 lw r11,(r14+0) <== NOT EXECUTED
if (pipe == NULL) {
800b94c: 5d 61 00 57 bne r11,r1,800baa8 <fifo_open+0x1b0> <== NOT EXECUTED
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
800b950: 34 01 00 34 mvi r1,52 <== NOT EXECUTED
800b954: fb ff dd 24 calli 8002de4 <malloc> <== NOT EXECUTED
800b958: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
800b95c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if (pipe == NULL)
800b960: 34 0c ff f4 mvi r12,-12 <== NOT EXECUTED
800b964: 44 20 00 5f be r1,r0,800bae0 <fifo_open+0x1e8> <== NOT EXECUTED
return err;
memset(pipe, 0, sizeof(pipe_control_t));
800b968: ba 00 10 00 mv r2,r16 <== NOT EXECUTED
800b96c: 34 03 00 34 mvi r3,52 <== NOT EXECUTED
800b970: f8 00 1f be calli 8013868 <memset> <== NOT EXECUTED
pipe->Size = PIPE_BUF;
800b974: 34 02 02 00 mvi r2,512 <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
800b978: 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;
800b97c: 59 a2 00 04 sw (r13+4),r2 <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
800b980: fb ff dd 19 calli 8002de4 <malloc> <== NOT EXECUTED
800b984: 59 a1 00 00 sw (r13+0),r1 <== NOT EXECUTED
if (! pipe->Buffer)
800b988: 44 20 00 45 be r1,r0,800ba9c <fifo_open+0x1a4> <== NOT EXECUTED
goto err_buf;
err = -EINTR;
if (rtems_barrier_create(
800b98c: 78 0c 08 02 mvhi r12,0x802 <== NOT EXECUTED
800b990: 39 8c 51 38 ori r12,r12,0x5138 <== NOT EXECUTED
800b994: 41 83 00 00 lbu r3,(r12+0) <== NOT EXECUTED
800b998: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED
800b99c: 38 21 72 00 ori r1,r1,0x7200 <== NOT EXECUTED
800b9a0: ba 00 10 00 mv r2,r16 <== NOT EXECUTED
800b9a4: b8 61 08 00 or r1,r3,r1 <== NOT EXECUTED
800b9a8: 35 a4 00 2c addi r4,r13,44 <== NOT EXECUTED
800b9ac: ba 00 18 00 mv r3,r16 <== NOT EXECUTED
800b9b0: f8 00 09 2a calli 800de58 <rtems_barrier_create> <== NOT EXECUTED
800b9b4: b8 20 80 00 mv r16,r1 <== NOT EXECUTED
800b9b8: 5c 20 00 36 bne r1,r0,800ba90 <fifo_open+0x198> <== NOT EXECUTED
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
800b9bc: 41 82 00 00 lbu r2,(r12+0) <== NOT EXECUTED
800b9c0: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED
800b9c4: 38 21 77 00 ori r1,r1,0x7700 <== NOT EXECUTED
800b9c8: b8 41 08 00 or r1,r2,r1 <== NOT EXECUTED
800b9cc: ba 00 18 00 mv r3,r16 <== NOT EXECUTED
800b9d0: ba 00 10 00 mv r2,r16 <== NOT EXECUTED
800b9d4: 35 a4 00 30 addi r4,r13,48 <== NOT EXECUTED
800b9d8: f8 00 09 20 calli 800de58 <rtems_barrier_create> <== NOT EXECUTED
800b9dc: b8 20 88 00 mv r17,r1 <== NOT EXECUTED
800b9e0: 5c 30 00 2a bne r1,r16,800ba88 <fifo_open+0x190> <== NOT EXECUTED
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
800b9e4: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED
800b9e8: 78 02 50 49 mvhi r2,0x5049 <== NOT EXECUTED
800b9ec: 38 42 73 00 ori r2,r2,0x7300 <== NOT EXECUTED
800b9f0: b8 22 08 00 or r1,r1,r2 <== NOT EXECUTED
800b9f4: 34 03 00 10 mvi r3,16 <== NOT EXECUTED
800b9f8: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
800b9fc: ba 20 20 00 mv r4,r17 <== NOT EXECUTED
800ba00: 35 a5 00 28 addi r5,r13,40 <== NOT EXECUTED
800ba04: fb ff e1 9c calli 8004074 <rtems_semaphore_create> <== NOT EXECUTED
800ba08: 5c 31 00 1e bne r1,r17,800ba80 <fifo_open+0x188> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
800ba0c: 29 a2 00 2c lw r2,(r13+44) <== NOT EXECUTED
800ba10: 37 90 00 24 addi r16,sp,36 <== NOT EXECUTED
800ba14: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800ba18: ba 00 18 00 mv r3,r16 <== NOT EXECUTED
800ba1c: 38 21 61 e4 ori r1,r1,0x61e4 <== NOT EXECUTED
800ba20: fb ff e9 17 calli 8005e7c <_Objects_Get> <== NOT EXECUTED
/* Set barriers to be interruptible by signals. */
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
800ba24: 28 22 00 4c lw r2,(r1+76) <== NOT EXECUTED
800ba28: 78 0d 10 00 mvhi r13,0x1000 <== NOT EXECUTED
800ba2c: 39 ad 00 00 ori r13,r13,0x0 <== NOT EXECUTED
800ba30: b8 4d 10 00 or r2,r2,r13 <== NOT EXECUTED
800ba34: 58 22 00 4c sw (r1+76),r2 <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
800ba38: fb ff eb 7e calli 8006830 <_Thread_Enable_dispatch> <== NOT EXECUTED
800ba3c: 29 62 00 30 lw r2,(r11+48) <== NOT EXECUTED
800ba40: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800ba44: ba 00 18 00 mv r3,r16 <== NOT EXECUTED
800ba48: 38 21 61 e4 ori r1,r1,0x61e4 <== NOT EXECUTED
800ba4c: fb ff e9 0c calli 8005e7c <_Objects_Get> <== NOT EXECUTED
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
800ba50: 28 22 00 4c lw r2,(r1+76) <== NOT EXECUTED
800ba54: b8 4d 68 00 or r13,r2,r13 <== NOT EXECUTED
800ba58: 58 2d 00 4c sw (r1+76),r13 <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
800ba5c: fb ff eb 75 calli 8006830 <_Thread_Enable_dispatch> <== NOT EXECUTED
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
800ba60: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED
800ba64: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED
800ba68: 31 82 00 00 sb (r12+0),r2 <== NOT EXECUTED
800ba6c: 34 02 00 7a mvi r2,122 <== NOT EXECUTED
800ba70: 5c 22 00 0e bne r1,r2,800baa8 <fifo_open+0x1b0> <== NOT EXECUTED
c = 'a';
800ba74: 34 01 00 61 mvi r1,97 <== NOT EXECUTED
800ba78: 31 81 00 00 sb (r12+0),r1 <== NOT EXECUTED
800ba7c: e0 00 00 0b bi 800baa8 <fifo_open+0x1b0> <== NOT EXECUTED
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
800ba80: 29 a1 00 30 lw r1,(r13+48) <== NOT EXECUTED
800ba84: f8 00 09 32 calli 800df4c <rtems_barrier_delete> <== NOT EXECUTED
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
800ba88: 29 a1 00 2c lw r1,(r13+44) <== NOT EXECUTED
800ba8c: f8 00 09 30 calli 800df4c <rtems_barrier_delete> <== NOT EXECUTED
err_rbar:
free(pipe->Buffer);
800ba90: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED
800ba94: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED
800ba98: fb ff db de calli 8002a10 <free> <== NOT EXECUTED
err_buf:
free(pipe);
800ba9c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
800baa0: fb ff db dc calli 8002a10 <free> <== NOT EXECUTED
800baa4: e0 00 00 0f bi 800bae0 <fifo_open+0x1e8> <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
800baa8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800baac: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800bab0: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
800bab4: fb ff e2 1e calli 800432c <rtems_semaphore_obtain> <== NOT EXECUTED
800bab8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
800babc: 44 20 00 02 be r1,r0,800bac4 <fifo_open+0x1cc> <== NOT EXECUTED
800bac0: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
800bac4: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED
800bac8: 5c 20 00 06 bne r1,r0,800bae0 <fifo_open+0x1e8> <== NOT EXECUTED
if (err)
800bacc: 45 81 00 04 be r12,r1,800badc <fifo_open+0x1e4> <== NOT EXECUTED
pipe_free(pipe);
800bad0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800bad4: fb ff ff 2f calli 800b790 <pipe_free> <== NOT EXECUTED
800bad8: e0 00 00 02 bi 800bae0 <fifo_open+0x1e8> <== NOT EXECUTED
else
*pipep = pipe;
800badc: 59 cb 00 00 sw (r14+0),r11 <== NOT EXECUTED
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
800bae0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800bae4: 38 21 57 78 ori r1,r1,0x5778 <== NOT EXECUTED
800bae8: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
800baec: fb ff e2 60 calli 800446c <rtems_semaphore_release> <== NOT EXECUTED
pipe_control_t *pipe;
uint prevCounter;
int err;
err = pipe_new(pipep);
if (err)
800baf0: 5d 80 00 66 bne r12,r0,800bc88 <fifo_open+0x390> <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
800baf4: 29 e2 00 18 lw r2,(r15+24) <== NOT EXECUTED
800baf8: 34 03 00 04 mvi r3,4 <== NOT EXECUTED
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
800bafc: 29 cb 00 00 lw r11,(r14+0) <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
800bb00: 20 41 00 06 andi r1,r2,0x6 <== NOT EXECUTED
800bb04: 44 23 00 24 be r1,r3,800bb94 <fifo_open+0x29c> <== NOT EXECUTED
800bb08: 34 02 00 06 mvi r2,6 <== NOT EXECUTED
800bb0c: 44 22 00 44 be r1,r2,800bc1c <fifo_open+0x324> <== NOT EXECUTED
800bb10: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
800bb14: 5c 22 00 56 bne r1,r2,800bc6c <fifo_open+0x374> <== NOT EXECUTED
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
800bb18: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED
if (pipe->Readers ++ == 0)
800bb1c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
800bb20: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
800bb24: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
800bb28: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
800bb2c: 59 62 00 10 sw (r11+16),r2 <== NOT EXECUTED
800bb30: 5c 20 00 04 bne r1,r0,800bb40 <fifo_open+0x248> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
800bb34: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
800bb38: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED
800bb3c: f8 00 09 34 calli 800e00c <rtems_barrier_release> <== NOT EXECUTED
if (pipe->Writers == 0) {
800bb40: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
800bb44: 5c 20 00 4a bne r1,r0,800bc6c <fifo_open+0x374> <== NOT EXECUTED
/* Not an error */
if (LIBIO_NODELAY(iop))
800bb48: 29 e2 00 18 lw r2,(r15+24) <== NOT EXECUTED
800bb4c: 20 42 00 01 andi r2,r2,0x1 <== NOT EXECUTED
800bb50: 5c 41 00 47 bne r2,r1,800bc6c <fifo_open+0x374> <== NOT EXECUTED
break;
prevCounter = pipe->writerCounter;
800bb54: 29 70 00 24 lw r16,(r11+36) <== NOT EXECUTED
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
800bb58: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800bb5c: fb ff e2 44 calli 800446c <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
800bb60: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED
800bb64: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800bb68: f8 00 09 48 calli 800e088 <rtems_barrier_wait> <== NOT EXECUTED
800bb6c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
800bb70: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
800bb74: 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))
800bb78: 5c 20 00 40 bne r1,r0,800bc78 <fifo_open+0x380> <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
800bb7c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800bb80: fb ff e1 eb calli 800432c <rtems_semaphore_obtain> <== NOT EXECUTED
800bb84: 5c 2d 00 3d bne r1,r13,800bc78 <fifo_open+0x380> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->writerCounter);
800bb88: 29 61 00 24 lw r1,(r11+36) <== NOT EXECUTED
800bb8c: 46 01 ff f3 be r16,r1,800bb58 <fifo_open+0x260> <== NOT EXECUTED
800bb90: e0 00 00 37 bi 800bc6c <fifo_open+0x374> <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_WRITE:
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
800bb94: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
800bb98: 5c 20 00 05 bne r1,r0,800bbac <fifo_open+0x2b4> <== NOT EXECUTED
800bb9c: 20 42 00 01 andi r2,r2,0x1 <== NOT EXECUTED
800bba0: 44 40 00 03 be r2,r0,800bbac <fifo_open+0x2b4> <== NOT EXECUTED
800bba4: 34 0c ff fa mvi r12,-6 <== NOT EXECUTED
800bba8: e0 00 00 35 bi 800bc7c <fifo_open+0x384> <== NOT EXECUTED
err = -ENXIO;
goto out_error;
}
pipe->writerCounter ++;
800bbac: 29 63 00 24 lw r3,(r11+36) <== NOT EXECUTED
if (pipe->Writers ++ == 0)
800bbb0: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
err = -ENXIO;
goto out_error;
}
pipe->writerCounter ++;
800bbb4: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
800bbb8: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
err = -ENXIO;
goto out_error;
}
pipe->writerCounter ++;
800bbbc: 59 63 00 24 sw (r11+36),r3 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
800bbc0: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED
800bbc4: 5c 20 00 04 bne r1,r0,800bbd4 <fifo_open+0x2dc> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
800bbc8: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED
800bbcc: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED
800bbd0: f8 00 09 0f calli 800e00c <rtems_barrier_release> <== NOT EXECUTED
if (pipe->Readers == 0) {
800bbd4: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
800bbd8: 5c 20 00 25 bne r1,r0,800bc6c <fifo_open+0x374> <== NOT EXECUTED
prevCounter = pipe->readerCounter;
800bbdc: 29 70 00 20 lw r16,(r11+32) <== NOT EXECUTED
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
800bbe0: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800bbe4: fb ff e2 22 calli 800446c <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
800bbe8: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
800bbec: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800bbf0: f8 00 09 26 calli 800e088 <rtems_barrier_wait> <== NOT EXECUTED
800bbf4: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
800bbf8: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
800bbfc: 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))
800bc00: 5c 20 00 1e bne r1,r0,800bc78 <fifo_open+0x380> <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
800bc04: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800bc08: fb ff e1 c9 calli 800432c <rtems_semaphore_obtain> <== NOT EXECUTED
800bc0c: 5c 2d 00 1b bne r1,r13,800bc78 <fifo_open+0x380> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->readerCounter);
800bc10: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED
800bc14: 46 01 ff f3 be r16,r1,800bbe0 <fifo_open+0x2e8> <== NOT EXECUTED
800bc18: e0 00 00 15 bi 800bc6c <fifo_open+0x374> <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
800bc1c: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED
if (pipe->Readers ++ == 0)
800bc20: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
800bc24: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
800bc28: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
800bc2c: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
800bc30: 59 62 00 10 sw (r11+16),r2 <== NOT EXECUTED
800bc34: 5c 20 00 04 bne r1,r0,800bc44 <fifo_open+0x34c> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
800bc38: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
800bc3c: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED
800bc40: f8 00 08 f3 calli 800e00c <rtems_barrier_release> <== NOT EXECUTED
pipe->writerCounter ++;
800bc44: 29 63 00 24 lw r3,(r11+36) <== NOT EXECUTED
if (pipe->Writers ++ == 0)
800bc48: 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 ++;
800bc4c: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
800bc50: 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 ++;
800bc54: 59 63 00 24 sw (r11+36),r3 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
800bc58: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED
800bc5c: 5c 20 00 04 bne r1,r0,800bc6c <fifo_open+0x374> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
800bc60: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED
800bc64: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED
800bc68: f8 00 08 e9 calli 800e00c <rtems_barrier_release> <== NOT EXECUTED
break;
}
PIPE_UNLOCK(pipe);
800bc6c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800bc70: fb ff e1 ff calli 800446c <rtems_semaphore_release> <== NOT EXECUTED
return 0;
800bc74: e0 00 00 05 bi 800bc88 <fifo_open+0x390> <== NOT EXECUTED
800bc78: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED
out_error:
pipe_release(pipep, iop);
800bc7c: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
800bc80: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED
800bc84: fb ff fe d5 calli 800b7d8 <pipe_release> <== NOT EXECUTED
return err;
}
800bc88: b9 80 08 00 mv r1,r12
800bc8c: 2b 9d 00 04 lw ra,(sp+4)
800bc90: 2b 8b 00 20 lw r11,(sp+32)
800bc94: 2b 8c 00 1c lw r12,(sp+28)
800bc98: 2b 8d 00 18 lw r13,(sp+24)
800bc9c: 2b 8e 00 14 lw r14,(sp+20)
800bca0: 2b 8f 00 10 lw r15,(sp+16)
800bca4: 2b 90 00 0c lw r16,(sp+12)
800bca8: 2b 91 00 08 lw r17,(sp+8)
800bcac: 37 9c 00 28 addi sp,sp,40
800bcb0: 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 a0 70 ori r1,r1,0xa070 <== 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 10 10 ori r3,r3,0x1010
8002400: 28 63 00 00 lw r3,(r3+0)
long fpathconf(
int fd,
int name
)
{
8002404: b8 40 60 00 mv r12,r2
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
8002408: 54 61 00 02 bgu r3,r1,8002410 <fpathconf+0x2c>
800240c: e0 00 00 0e bi 8002444 <fpathconf+0x60>
iop = rtems_libio_iop(fd);
8002410: 34 02 00 03 mvi r2,3
8002414: fb ff f9 dc calli 8000b84 <__ashlsi3>
8002418: 34 02 00 03 mvi r2,3
800241c: 78 0b 08 02 mvhi r11,0x802
8002420: b8 20 68 00 mv r13,r1
8002424: 39 6b 17 24 ori r11,r11,0x1724
8002428: fb ff f9 d7 calli 8000b84 <__ashlsi3>
800242c: 29 62 00 00 lw r2,(r11+0)
8002430: b5 a1 08 00 add r1,r13,r1
8002434: b4 41 08 00 add r1,r2,r1
rtems_libio_check_is_open(iop);
8002438: 28 22 00 18 lw r2,(r1+24)
800243c: 20 43 01 00 andi r3,r2,0x100
8002440: 5c 60 00 04 bne r3,r0,8002450 <fpathconf+0x6c> <== ALWAYS TAKEN
8002444: f8 00 33 c2 calli 800f34c <__errno>
8002448: 34 02 00 09 mvi r2,9
800244c: e0 00 00 28 bi 80024ec <fpathconf+0x108>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
8002450: 20 42 00 02 andi r2,r2,0x2
8002454: 44 40 00 24 be r2,r0,80024e4 <fpathconf+0x100> <== NEVER TAKEN
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
8002458: 28 2b 00 2c lw r11,(r1+44)
switch ( name ) {
800245c: 34 01 00 0b mvi r1,11
8002460: 55 81 00 21 bgu r12,r1,80024e4 <fpathconf+0x100>
8002464: b9 80 08 00 mv r1,r12
8002468: 34 02 00 02 mvi r2,2
800246c: 78 0c 08 01 mvhi r12,0x801
8002470: fb ff f9 c5 calli 8000b84 <__ashlsi3>
8002474: 39 8c fc 5c ori r12,r12,0xfc5c
8002478: b5 81 08 00 add r1,r12,r1
800247c: 28 21 00 00 lw r1,(r1+0)
8002480: c0 20 00 00 b r1
case _PC_LINK_MAX:
return_value = the_limits->link_max;
8002484: 29 61 00 38 lw r1,(r11+56)
break;
8002488: e0 00 00 1b bi 80024f4 <fpathconf+0x110>
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
800248c: 29 61 00 3c lw r1,(r11+60)
break;
8002490: e0 00 00 19 bi 80024f4 <fpathconf+0x110>
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
8002494: 29 61 00 40 lw r1,(r11+64)
break;
8002498: e0 00 00 17 bi 80024f4 <fpathconf+0x110>
case _PC_NAME_MAX:
return_value = the_limits->name_max;
800249c: 29 61 00 44 lw r1,(r11+68)
break;
80024a0: e0 00 00 15 bi 80024f4 <fpathconf+0x110>
case _PC_PATH_MAX:
return_value = the_limits->path_max;
80024a4: 29 61 00 48 lw r1,(r11+72)
break;
80024a8: e0 00 00 13 bi 80024f4 <fpathconf+0x110>
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
80024ac: 29 61 00 4c lw r1,(r11+76)
break;
80024b0: e0 00 00 11 bi 80024f4 <fpathconf+0x110>
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
80024b4: 29 61 00 54 lw r1,(r11+84)
break;
80024b8: e0 00 00 0f bi 80024f4 <fpathconf+0x110>
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
80024bc: 29 61 00 58 lw r1,(r11+88)
break;
80024c0: e0 00 00 0d bi 80024f4 <fpathconf+0x110>
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
80024c4: 29 61 00 64 lw r1,(r11+100)
break;
80024c8: e0 00 00 0b bi 80024f4 <fpathconf+0x110>
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
80024cc: 29 61 00 50 lw r1,(r11+80)
break;
80024d0: e0 00 00 09 bi 80024f4 <fpathconf+0x110>
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
80024d4: 29 61 00 5c lw r1,(r11+92)
break;
80024d8: e0 00 00 07 bi 80024f4 <fpathconf+0x110>
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
80024dc: 29 61 00 60 lw r1,(r11+96)
break;
80024e0: e0 00 00 05 bi 80024f4 <fpathconf+0x110>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
80024e4: f8 00 33 9a calli 800f34c <__errno>
80024e8: 34 02 00 16 mvi r2,22
80024ec: 58 22 00 00 sw (r1+0),r2
80024f0: 34 01 ff ff mvi r1,-1
break;
}
return return_value;
}
80024f4: 2b 9d 00 04 lw ra,(sp+4)
80024f8: 2b 8b 00 10 lw r11,(sp+16)
80024fc: 2b 8c 00 0c lw r12,(sp+12)
8002500: 2b 8d 00 08 lw r13,(sp+8)
8002504: 37 9c 00 10 addi sp,sp,16
8002508: c3 a0 00 00 ret
08002a10 <free>:
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
8002a10: 37 9c ff f4 addi sp,sp,-12
8002a14: 5b 8b 00 0c sw (sp+12),r11
8002a18: 5b 8c 00 08 sw (sp+8),r12
8002a1c: 5b 9d 00 04 sw (sp+4),ra
8002a20: 78 02 08 02 mvhi r2,0x802
8002a24: 38 42 58 08 ori r2,r2,0x5808
8002a28: 28 43 00 0c lw r3,(r2+12)
8002a2c: b8 20 58 00 mv r11,r1
8002a30: 34 61 00 01 addi r1,r3,1
8002a34: 58 41 00 0c sw (r2+12),r1
if ( !ptr )
8002a38: 45 60 00 1f be r11,r0,8002ab4 <free+0xa4>
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
8002a3c: 78 01 08 02 mvhi r1,0x802
8002a40: 38 21 5a e0 ori r1,r1,0x5ae0
8002a44: 28 22 00 00 lw r2,(r1+0)
8002a48: 34 01 00 03 mvi r1,3
8002a4c: 5c 41 00 06 bne r2,r1,8002a64 <free+0x54> <== NEVER TAKEN
8002a50: f8 00 00 7a calli 8002c38 <malloc_is_system_state_OK>
8002a54: 5c 20 00 04 bne r1,r0,8002a64 <free+0x54> <== ALWAYS TAKEN
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
8002a58: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8002a5c: f8 00 00 89 calli 8002c80 <malloc_deferred_free> <== NOT EXECUTED
return;
8002a60: e0 00 00 15 bi 8002ab4 <free+0xa4> <== NOT EXECUTED
#endif
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
8002a64: 78 01 08 02 mvhi r1,0x802
8002a68: 38 21 56 80 ori r1,r1,0x5680
8002a6c: 28 21 00 00 lw r1,(r1+0)
8002a70: 44 20 00 04 be r1,r0,8002a80 <free+0x70> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_free)(ptr);
8002a74: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED
8002a78: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8002a7c: d8 40 00 00 call r2 <== NOT EXECUTED
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
8002a80: 78 0c 08 02 mvhi r12,0x802
8002a84: 39 8c 50 1c ori r12,r12,0x501c
8002a88: 29 81 00 00 lw r1,(r12+0)
8002a8c: b9 60 10 00 mv r2,r11
8002a90: f8 00 0d e3 calli 800621c <_Protected_heap_Free>
8002a94: 5c 20 00 08 bne r1,r0,8002ab4 <free+0xa4> <== ALWAYS TAKEN
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
8002a98: 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",
8002a9c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8002aa0: 38 21 2d 04 ori r1,r1,0x2d04 <== NOT EXECUTED
8002aa4: 28 44 00 1c lw r4,(r2+28) <== NOT EXECUTED
8002aa8: 28 43 00 18 lw r3,(r2+24) <== NOT EXECUTED
8002aac: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8002ab0: f8 00 03 a7 calli 800394c <printk> <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
8002ab4: 2b 9d 00 04 lw ra,(sp+4)
8002ab8: 2b 8b 00 0c lw r11,(sp+12)
8002abc: 2b 8c 00 08 lw r12,(sp+8)
8002ac0: 37 9c 00 0c addi sp,sp,12
8002ac4: 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 02 mvhi r2,0x802 <== NOT EXECUTED
8002bc8: 38 42 07 64 ori r2,r2,0x764 <== 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
08021f74 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
8021f74: 37 9c ff ec addi sp,sp,-20
8021f78: 5b 8b 00 14 sw (sp+20),r11
8021f7c: 5b 8c 00 10 sw (sp+16),r12
8021f80: 5b 8d 00 0c sw (sp+12),r13
8021f84: 5b 8e 00 08 sw (sp+8),r14
8021f88: 5b 9d 00 04 sw (sp+4),ra
8021f8c: b8 40 60 00 mv r12,r2
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
8021f90: 5c 40 00 04 bne r2,r0,8021fa0 <fstat+0x2c>
rtems_set_errno_and_return_minus_one( EFAULT );
8021f94: fb ff c3 31 calli 8012c58 <__errno>
8021f98: 34 02 00 0e mvi r2,14
8021f9c: e0 00 00 14 bi 8021fec <fstat+0x78>
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
8021fa0: 78 02 08 02 mvhi r2,0x802
8021fa4: 38 42 50 10 ori r2,r2,0x5010
8021fa8: 28 42 00 00 lw r2,(r2+0)
8021fac: 50 22 00 0e bgeu r1,r2,8021fe4 <fstat+0x70>
8021fb0: 34 02 00 03 mvi r2,3
8021fb4: fb ff 7b 06 calli 8000bcc <__ashlsi3>
8021fb8: 78 0d 08 02 mvhi r13,0x802
8021fbc: 39 ad 57 ec ori r13,r13,0x57ec
8021fc0: 34 02 00 03 mvi r2,3
8021fc4: b8 20 70 00 mv r14,r1
8021fc8: fb ff 7b 01 calli 8000bcc <__ashlsi3>
8021fcc: 29 ab 00 00 lw r11,(r13+0)
8021fd0: b5 c1 08 00 add r1,r14,r1
8021fd4: b5 61 58 00 add r11,r11,r1
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
8021fd8: 29 61 00 18 lw r1,(r11+24)
8021fdc: 20 21 01 00 andi r1,r1,0x100
8021fe0: 5c 20 00 06 bne r1,r0,8021ff8 <fstat+0x84> <== ALWAYS TAKEN
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
8021fe4: fb ff c3 1d calli 8012c58 <__errno>
8021fe8: 34 02 00 09 mvi r2,9
8021fec: 58 22 00 00 sw (r1+0),r2
8021ff0: 34 01 ff ff mvi r1,-1
8021ff4: e0 00 00 11 bi 8022038 <fstat+0xc4>
rtems_libio_check_is_open(iop);
if ( !iop->handlers )
8021ff8: 29 61 00 40 lw r1,(r11+64)
8021ffc: 44 20 ff fa be r1,r0,8021fe4 <fstat+0x70> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
8022000: 28 21 00 18 lw r1,(r1+24)
8022004: 5c 20 00 04 bne r1,r0,8022014 <fstat+0xa0> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
8022008: fb ff c3 14 calli 8012c58 <__errno> <== NOT EXECUTED
802200c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8022010: e3 ff ff f7 bi 8021fec <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) );
8022014: 34 02 00 00 mvi r2,0
8022018: 34 03 00 48 mvi r3,72
802201c: b9 80 08 00 mv r1,r12
8022020: fb ff c6 12 calli 8013868 <memset>
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
8022024: 29 63 00 40 lw r3,(r11+64)
8022028: 35 61 00 1c addi r1,r11,28
802202c: b9 80 10 00 mv r2,r12
8022030: 28 63 00 18 lw r3,(r3+24)
8022034: d8 60 00 00 call r3
}
8022038: 2b 9d 00 04 lw ra,(sp+4)
802203c: 2b 8b 00 14 lw r11,(sp+20)
8022040: 2b 8c 00 10 lw r12,(sp+16)
8022044: 2b 8d 00 0c lw r13,(sp+12)
8022048: 2b 8e 00 08 lw r14,(sp+8)
802204c: 37 9c 00 14 addi sp,sp,20
8022050: 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 10 10 ori r2,r2,0x1010
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 17 24 ori r11,r11,0x1724
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 33 0a calli 800f34c <__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 33 05 calli 800f34c <__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 33 00 calli 800f34c <__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
0800d060 <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
800d060: 37 9c ff d8 addi sp,sp,-40
800d064: 5b 8b 00 14 sw (sp+20),r11
800d068: 5b 8c 00 10 sw (sp+16),r12
800d06c: 5b 8d 00 0c sw (sp+12),r13
800d070: 5b 8e 00 08 sw (sp+8),r14
800d074: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
800d078: 78 03 08 02 mvhi r3,0x802
800d07c: 38 63 50 10 ori r3,r3,0x5010
800d080: 28 63 00 00 lw r3,(r3+0)
int ftruncate(
int fd,
off_t length
)
{
800d084: b8 40 68 00 mv r13,r2
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
800d088: 54 61 00 02 bgu r3,r1,800d090 <ftruncate+0x30> <== ALWAYS TAKEN
800d08c: e0 00 00 0e bi 800d0c4 <ftruncate+0x64> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
800d090: 34 02 00 03 mvi r2,3
800d094: fb ff ce ce calli 8000bcc <__ashlsi3>
800d098: 78 0c 08 02 mvhi r12,0x802
800d09c: 39 8c 57 ec ori r12,r12,0x57ec
800d0a0: 34 02 00 03 mvi r2,3
800d0a4: b8 20 70 00 mv r14,r1
800d0a8: fb ff ce c9 calli 8000bcc <__ashlsi3>
800d0ac: 29 8b 00 00 lw r11,(r12+0)
800d0b0: b5 c1 08 00 add r1,r14,r1
800d0b4: b5 61 58 00 add r11,r11,r1
rtems_libio_check_is_open(iop);
800d0b8: 29 61 00 18 lw r1,(r11+24)
800d0bc: 20 21 01 00 andi r1,r1,0x100
800d0c0: 5c 20 00 04 bne r1,r0,800d0d0 <ftruncate+0x70> <== ALWAYS TAKEN
800d0c4: f8 00 16 e5 calli 8012c58 <__errno> <== NOT EXECUTED
800d0c8: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
800d0cc: e0 00 00 1b bi 800d138 <ftruncate+0xd8> <== NOT EXECUTED
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
800d0d0: 37 8c 00 18 addi r12,sp,24
800d0d4: b9 80 08 00 mv r1,r12
800d0d8: 35 62 00 1c addi r2,r11,28
800d0dc: 34 03 00 14 mvi r3,20
800d0e0: f8 00 19 84 calli 80136f0 <memcpy>
if ( !loc.ops->node_type_h )
800d0e4: 2b 81 00 24 lw r1,(sp+36)
800d0e8: 28 24 00 10 lw r4,(r1+16)
800d0ec: 44 80 00 11 be r4,r0,800d130 <ftruncate+0xd0> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
800d0f0: b9 80 08 00 mv r1,r12
800d0f4: d8 80 00 00 call r4
800d0f8: 34 02 00 01 mvi r2,1
800d0fc: 5c 22 00 04 bne r1,r2,800d10c <ftruncate+0xac>
rtems_set_errno_and_return_minus_one( EISDIR );
800d100: f8 00 16 d6 calli 8012c58 <__errno>
800d104: 34 02 00 15 mvi r2,21
800d108: e0 00 00 0c bi 800d138 <ftruncate+0xd8>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
800d10c: 29 61 00 18 lw r1,(r11+24)
800d110: 20 21 00 04 andi r1,r1,0x4
800d114: 5c 20 00 04 bne r1,r0,800d124 <ftruncate+0xc4> <== ALWAYS TAKEN
800d118: f8 00 16 d0 calli 8012c58 <__errno> <== NOT EXECUTED
800d11c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
800d120: e0 00 00 06 bi 800d138 <ftruncate+0xd8> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
800d124: 29 61 00 40 lw r1,(r11+64)
800d128: 28 2c 00 20 lw r12,(r1+32)
800d12c: 5d 80 00 06 bne r12,r0,800d144 <ftruncate+0xe4> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
800d130: f8 00 16 ca calli 8012c58 <__errno> <== NOT EXECUTED
800d134: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
800d138: 58 22 00 00 sw (r1+0),r2
800d13c: 34 01 ff ff mvi r1,-1
800d140: e0 00 00 08 bi 800d160 <ftruncate+0x100>
return (*iop->handlers->ftruncate_h)( iop, length );
800d144: 34 02 00 1f mvi r2,31
800d148: b9 a0 08 00 mv r1,r13
800d14c: fb ff ce f0 calli 8000d0c <__ashrsi3>
800d150: b8 20 10 00 mv r2,r1
800d154: b9 a0 18 00 mv r3,r13
800d158: b9 60 08 00 mv r1,r11
800d15c: d9 80 00 00 call r12
}
800d160: 2b 9d 00 04 lw ra,(sp+4)
800d164: 2b 8b 00 14 lw r11,(sp+20)
800d168: 2b 8c 00 10 lw r12,(sp+16)
800d16c: 2b 8d 00 0c lw r13,(sp+12)
800d170: 2b 8e 00 08 lw r14,(sp+8)
800d174: 37 9c 00 28 addi sp,sp,40
800d178: c3 a0 00 00 ret
0801eb04 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
801eb04: 37 9c ff d4 addi sp,sp,-44
801eb08: 5b 8b 00 18 sw (sp+24),r11
801eb0c: 5b 8c 00 14 sw (sp+20),r12
801eb10: 5b 8d 00 10 sw (sp+16),r13
801eb14: 5b 8e 00 0c sw (sp+12),r14
801eb18: 5b 8f 00 08 sw (sp+8),r15
801eb1c: 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 );
801eb20: 78 04 08 02 mvhi r4,0x802
801eb24: 38 84 30 10 ori r4,r4,0x3010
801eb28: 28 84 00 00 lw r4,(r4+0)
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
801eb2c: b8 40 78 00 mv r15,r2
801eb30: b8 60 70 00 mv r14,r3
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
801eb34: 54 81 00 03 bgu r4,r1,801eb40 <getdents+0x3c> <== ALWAYS TAKEN
801eb38: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED
801eb3c: e0 00 00 0b bi 801eb68 <getdents+0x64> <== NOT EXECUTED
801eb40: 34 02 00 03 mvi r2,3
801eb44: fb ff 89 e0 calli 80012c4 <__ashlsi3>
801eb48: 78 0c 08 02 mvhi r12,0x802
801eb4c: 39 8c 38 3c ori r12,r12,0x383c
801eb50: 34 02 00 03 mvi r2,3
801eb54: b8 20 68 00 mv r13,r1
801eb58: fb ff 89 db calli 80012c4 <__ashlsi3>
801eb5c: 29 8b 00 00 lw r11,(r12+0)
801eb60: b5 a1 08 00 add r1,r13,r1
801eb64: b5 61 58 00 add r11,r11,r1
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
801eb68: 37 8d 00 1c addi r13,sp,28
801eb6c: 34 0c 00 14 mvi r12,20
801eb70: b9 a0 08 00 mv r1,r13
801eb74: 35 62 00 1c addi r2,r11,28
801eb78: b9 80 18 00 mv r3,r12
801eb7c: fb ff c4 0d calli 800fbb0 <memcpy>
if ( !loc.ops->node_type_h )
801eb80: 2b 81 00 28 lw r1,(sp+40)
801eb84: 28 24 00 10 lw r4,(r1+16)
801eb88: 44 80 00 0c be r4,r0,801ebb8 <getdents+0xb4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
801eb8c: b9 a0 08 00 mv r1,r13
801eb90: d8 80 00 00 call r4
801eb94: 34 02 00 01 mvi r2,1
801eb98: 44 22 00 05 be r1,r2,801ebac <getdents+0xa8>
rtems_set_errno_and_return_minus_one( ENOTDIR );
801eb9c: fb ff c1 5f calli 800f118 <__errno>
801eba0: 58 2c 00 00 sw (r1+0),r12
801eba4: 34 01 ff ff mvi r1,-1
801eba8: e0 00 00 0c bi 801ebd8 <getdents+0xd4>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
801ebac: 29 61 00 40 lw r1,(r11+64)
801ebb0: 28 24 00 08 lw r4,(r1+8)
801ebb4: 5c 80 00 05 bne r4,r0,801ebc8 <getdents+0xc4> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
801ebb8: fb ff c1 58 calli 800f118 <__errno> <== NOT EXECUTED
801ebbc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
801ebc0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
801ebc4: e3 ff ff f8 bi 801eba4 <getdents+0xa0> <== NOT EXECUTED
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
801ebc8: b9 60 08 00 mv r1,r11
801ebcc: b9 e0 10 00 mv r2,r15
801ebd0: b9 c0 18 00 mv r3,r14
801ebd4: d8 80 00 00 call r4
}
801ebd8: 2b 9d 00 04 lw ra,(sp+4)
801ebdc: 2b 8b 00 18 lw r11,(sp+24)
801ebe0: 2b 8c 00 14 lw r12,(sp+20)
801ebe4: 2b 8d 00 10 lw r13,(sp+16)
801ebe8: 2b 8e 00 0c lw r14,(sp+12)
801ebec: 2b 8f 00 08 lw r15,(sp+8)
801ebf0: 37 9c 00 2c addi sp,sp,44
801ebf4: 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 f4 90 ori r1,r1,0xf490
8001fb4: 38 42 fc 1c ori r2,r2,0xfc1c
8001fb8: f8 00 35 45 calli 800f4cc <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 32 c0 calli 800eac4 <__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 32 b5 calli 800eac4 <__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 33 13 calli 800ec4c <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 3b f1 calli 8010fd8 <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 33 07 calli 800ec4c <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 02 mvhi r1,0x802 <== NOT EXECUTED
8001c74: 38 21 17 9c ori r1,r1,0x179c <== 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 02 mvhi r2,0x802 <== NOT EXECUTED
8001c84: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8001c88: 38 42 18 68 ori r2,r2,0x1868 <== NOT EXECUTED
8001c8c: 38 63 17 a0 ori r3,r3,0x17a0 <== 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 02 mvhi r1,0x802 <== NOT EXECUTED
8001ca0: 38 21 18 68 ori r1,r1,0x1868 <== 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 02 mvhi r2,0x802 <== NOT EXECUTED
80020ac: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80020b0: 38 42 18 68 ori r2,r2,0x1868 <== NOT EXECUTED
80020b4: 20 21 ff ff andi r1,r1,0xffff <== NOT EXECUTED
80020b8: 38 63 17 a0 ori r3,r3,0x17a0 <== 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 02 mvhi r2,0x802
8002124: 78 03 08 02 mvhi r3,0x802
8002128: 38 42 18 68 ori r2,r2,0x1868
800212c: 38 63 17 a0 ori r3,r3,0x17a0
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
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 f4 18 ori r1,r1,0xf418
80021f0: 38 42 fc 1c ori r2,r2,0xfc1c
80021f4: f8 00 34 b6 calli 800f4cc <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 32 31 calli 800eac4 <__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 32 26 calli 800eac4 <__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 32 84 calli 800ec4c <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 3b 62 calli 8010fd8 <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 32 78 calli 800ec4c <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 02 mvhi r1,0x802 <== NOT EXECUTED
8001dec: 38 21 16 b4 ori r1,r1,0x16b4 <== 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 02 mvhi r2,0x802 <== NOT EXECUTED
8001dfc: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8001e00: 38 42 17 80 ori r2,r2,0x1780 <== NOT EXECUTED
8001e04: 38 63 16 b8 ori r3,r3,0x16b8 <== 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 02 mvhi r1,0x802 <== NOT EXECUTED
8001e18: 38 21 17 80 ori r1,r1,0x1780 <== 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 02 mvhi r2,0x802
8002360: 78 03 08 02 mvhi r3,0x802
8002364: 38 42 17 80 ori r2,r2,0x1780
8002368: 38 63 16 b8 ori r3,r3,0x16b8
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 02 mvhi r2,0x802 <== NOT EXECUTED
80022e8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80022ec: 38 42 17 80 ori r2,r2,0x1780 <== NOT EXECUTED
80022f0: 20 21 ff ff andi r1,r1,0xffff <== NOT EXECUTED
80022f4: 38 63 16 b8 ori r3,r3,0x16b8 <== 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
08002ac8 <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
8002ac8: 37 9c ff ec addi sp,sp,-20
8002acc: 5b 8b 00 0c sw (sp+12),r11
8002ad0: 5b 8c 00 08 sw (sp+8),r12
8002ad4: 5b 9d 00 04 sw (sp+4),ra
8002ad8: b8 20 58 00 mv r11,r1
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
8002adc: 5c 20 00 06 bne r1,r0,8002af4 <gettimeofday+0x2c> <== ALWAYS TAKEN
errno = EFAULT;
8002ae0: f8 00 40 5e calli 8012c58 <__errno> <== NOT EXECUTED
8002ae4: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
8002ae8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8002aec: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
return -1;
8002af0: e0 00 00 0f bi 8002b2c <gettimeofday+0x64> <== NOT EXECUTED
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
8002af4: 90 00 60 00 rcsr r12,IE
8002af8: 34 01 ff fe mvi r1,-2
8002afc: a1 81 08 00 and r1,r12,r1
8002b00: d0 01 00 00 wcsr IE,r1
_TOD_Get( &now );
8002b04: 37 81 00 10 addi r1,sp,16
8002b08: f8 00 09 e7 calli 80052a4 <_TOD_Get>
_ISR_Enable(level);
8002b0c: 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;
8002b10: 2b 82 00 10 lw r2,(sp+16)
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
8002b14: 2b 81 00 14 lw r1,(sp+20)
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
8002b18: 59 62 00 00 sw (r11+0),r2
time->tv_usec = useconds;
8002b1c: 34 02 03 e8 mvi r2,1000
8002b20: f8 00 7c 36 calli 8021bf8 <__divsi3>
8002b24: 59 61 00 04 sw (r11+4),r1
8002b28: 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;
}
8002b2c: 2b 9d 00 04 lw ra,(sp+4)
8002b30: 2b 8b 00 0c lw r11,(sp+12)
8002b34: 2b 8c 00 08 lw r12,(sp+8)
8002b38: 37 9c 00 14 addi sp,sp,20
8002b3c: c3 a0 00 00 ret
0801167c <imfs_dir_open>:
)
{
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->file_info;
801167c: 28 23 00 3c lw r3,(r1+60)
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
8011680: 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;
8011684: 34 01 ff ff mvi r1,-1
8011688: 28 64 00 4c lw r4,(r3+76)
801168c: 34 03 00 01 mvi r3,1
8011690: 5c 83 00 04 bne r4,r3,80116a0 <imfs_dir_open+0x24> <== NEVER TAKEN
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
8011694: 34 01 00 00 mvi r1,0
8011698: 58 41 00 14 sw (r2+20),r1
801169c: 58 41 00 10 sw (r2+16),r1
return 0;
}
80116a0: c3 a0 00 00 ret
080117a4 <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
80117a4: 37 9c ff e8 addi sp,sp,-24
80117a8: 5b 8b 00 10 sw (sp+16),r11
80117ac: 5b 8c 00 0c sw (sp+12),r12
80117b0: 5b 8d 00 08 sw (sp+8),r13
80117b4: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
80117b8: 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 */
)
{
80117bc: b8 40 60 00 mv r12,r2
80117c0: 29 62 00 50 lw r2,(r11+80)
80117c4: 35 61 00 54 addi r1,r11,84
80117c8: 44 41 00 04 be r2,r1,80117d8 <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 );
80117cc: f8 00 05 23 calli 8012c58 <__errno>
80117d0: 34 02 00 5a mvi r2,90
80117d4: e0 00 00 08 bi 80117f4 <imfs_dir_rmnod+0x50>
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
80117d8: 29 81 00 10 lw r1,(r12+16)
80117dc: 28 21 00 1c lw r1,(r1+28)
80117e0: 44 2b 00 03 be r1,r11,80117ec <imfs_dir_rmnod+0x48>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
80117e4: 29 6d 00 5c lw r13,(r11+92)
80117e8: 45 a0 00 06 be r13,r0,8011800 <imfs_dir_rmnod+0x5c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EBUSY );
80117ec: f8 00 05 1b calli 8012c58 <__errno>
80117f0: 34 02 00 10 mvi r2,16
80117f4: 58 22 00 00 sw (r1+0),r2
80117f8: 34 01 ff ff mvi r1,-1
80117fc: e0 00 00 1d bi 8011870 <imfs_dir_rmnod+0xcc>
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
8011800: 29 61 00 08 lw r1,(r11+8)
8011804: 44 2d 00 04 be r1,r13,8011814 <imfs_dir_rmnod+0x70>
8011808: b9 60 08 00 mv r1,r11
801180c: fb ff cd 78 calli 8004dec <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
8011810: 59 6d 00 08 sw (r11+8),r13
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
8011814: 2d 63 00 34 lhu r3,(r11+52)
IMFS_update_ctime( the_jnode );
8011818: 34 02 00 00 mvi r2,0
801181c: 37 81 00 14 addi r1,sp,20
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
8011820: 34 63 ff ff addi r3,r3,-1
8011824: 0d 63 00 34 sh (r11+52),r3
IMFS_update_ctime( the_jnode );
8011828: fb ff c4 a8 calli 8002ac8 <gettimeofday>
801182c: 2b 81 00 14 lw r1,(sp+20)
8011830: 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) ) {
8011834: b9 60 08 00 mv r1,r11
8011838: fb ff ee 7b calli 800d224 <rtems_libio_is_file_open>
801183c: 5c 20 00 0c bne r1,r0,801186c <imfs_dir_rmnod+0xc8>
8011840: 2d 62 00 34 lhu r2,(r11+52)
8011844: 5c 41 00 0a bne r2,r1,801186c <imfs_dir_rmnod+0xc8>
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
8011848: 78 01 08 02 mvhi r1,0x802
801184c: 38 21 50 f8 ori r1,r1,0x50f8
8011850: 28 21 00 00 lw r1,(r1+0)
8011854: 29 83 00 00 lw r3,(r12+0)
8011858: 28 24 00 04 lw r4,(r1+4)
801185c: 5c 83 00 02 bne r4,r3,8011864 <imfs_dir_rmnod+0xc0> <== ALWAYS TAKEN
rtems_filesystem_current.node_access = NULL;
8011860: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
free( the_jnode );
8011864: b9 60 08 00 mv r1,r11
8011868: fb ff c4 6a calli 8002a10 <free>
801186c: 34 01 00 00 mvi r1,0
}
return 0;
}
8011870: 2b 9d 00 04 lw ra,(sp+4)
8011874: 2b 8b 00 10 lw r11,(sp+16)
8011878: 2b 8c 00 0c lw r12,(sp+12)
801187c: 2b 8d 00 08 lw r13,(sp+8)
8011880: 37 9c 00 18 addi sp,sp,24
8011884: 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 02 mvhi r3,0x802
8001e44: 38 63 16 b0 ori r3,r3,0x16b0
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 f4 10 ori r1,r1,0xf410
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 f4 18 ori r1,r1,0xf418
8001e74: 38 42 fc 1c ori r2,r2,0xfc1c
8001e78: f8 00 35 95 calli 800f4cc <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 f4 18 ori r1,r1,0xf418
8001e90: 38 42 f4 24 ori r2,r2,0xf424
8001e94: f8 00 35 8e calli 800f4cc <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 f4 28 ori r1,r1,0xf428
8001ea8: b9 60 10 00 mv r2,r11
8001eac: f8 00 35 bf calli 800f5a8 <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 33 66 calli 800ec4c <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 f4 90 ori r1,r1,0xf490
8001ec4: 38 42 fc 1c ori r2,r2,0xfc1c
8001ec8: f8 00 35 81 calli 800f4cc <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 f4 90 ori r1,r1,0xf490
8001ee0: 38 42 f4 24 ori r2,r2,0xf424
8001ee4: f8 00 35 7a calli 800f4cc <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 f4 9c ori r1,r1,0xf49c
8001ef8: b9 60 10 00 mv r2,r11
8001efc: f8 00 35 ab calli 800f5a8 <fputs>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
8001f00: b9 60 08 00 mv r1,r11
8001f04: f8 00 33 52 calli 800ec4c <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 50 10 ori r9,r9,0x5010
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 57 f4 ori r11,r11,0x57f4
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 36 8a calli 801313c <__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 36 85 calli 801313c <__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 53 0c ori r1,r1,0x530c <== NOT EXECUTED
8004500: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED
8004504: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8004508: b4 6c 60 00 add r12,r3,r12 <== NOT EXECUTED
800450c: 41 84 00 01 lbu r4,(r12+1) <== NOT EXECUTED
8004510: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
8004514: 20 84 00 03 andi r4,r4,0x3 <== NOT EXECUTED
8004518: 5c 83 00 02 bne r4,r3,8004520 <iproc+0x58> <== NOT EXECUTED
800451c: 34 21 00 20 addi r1,r1,32 <== NOT EXECUTED
8004520: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED
if (c == '\r') {
8004524: 34 01 00 0d mvi r1,13 <== NOT EXECUTED
8004528: 5d 81 00 07 bne r12,r1,8004544 <iproc+0x7c> <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
800452c: 20 41 00 80 andi r1,r2,0x80 <== NOT EXECUTED
8004530: 5c 20 00 4f bne r1,r0,800466c <iproc+0x1a4> <== NOT EXECUTED
return 0;
if (tty->termios.c_iflag & ICRNL)
8004534: 20 42 01 00 andi r2,r2,0x100 <== NOT EXECUTED
8004538: 44 41 00 0a be r2,r1,8004560 <iproc+0x98> <== NOT EXECUTED
800453c: 34 0c 00 0a mvi r12,10 <== NOT EXECUTED
8004540: e0 00 00 08 bi 8004560 <iproc+0x98> <== NOT EXECUTED
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
8004544: 34 03 00 0a mvi r3,10 <== NOT EXECUTED
8004548: 5d 83 00 05 bne r12,r3,800455c <iproc+0x94> <== NOT EXECUTED
800454c: 20 42 00 40 andi r2,r2,0x40 <== NOT EXECUTED
8004550: 44 40 00 04 be r2,r0,8004560 <iproc+0x98> <== NOT EXECUTED
8004554: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
8004558: e0 00 00 02 bi 8004560 <iproc+0x98> <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
800455c: 45 80 00 30 be r12,r0,800461c <iproc+0x154> <== NOT EXECUTED
8004560: 29 62 00 3c lw r2,(r11+60) <== NOT EXECUTED
8004564: 20 41 00 02 andi r1,r2,0x2 <== NOT EXECUTED
8004568: 44 20 00 2d be r1,r0,800461c <iproc+0x154> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
800456c: 41 61 00 43 lbu r1,(r11+67) <== NOT EXECUTED
8004570: 5c 2c 00 04 bne r1,r12,8004580 <iproc+0xb8> <== NOT EXECUTED
erase (tty, 0);
8004574: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8004578: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800457c: e0 00 00 05 bi 8004590 <iproc+0xc8> <== NOT EXECUTED
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
8004580: 41 61 00 44 lbu r1,(r11+68) <== NOT EXECUTED
8004584: 5c 2c 00 05 bne r1,r12,8004598 <iproc+0xd0> <== NOT EXECUTED
erase (tty, 1);
8004588: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800458c: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8004590: fb ff ff 49 calli 80042b4 <erase> <== NOT EXECUTED
8004594: e0 00 00 36 bi 800466c <iproc+0x1a4> <== NOT EXECUTED
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
8004598: 41 63 00 45 lbu r3,(r11+69) <== NOT EXECUTED
800459c: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
80045a0: 44 6c 00 34 be r3,r12,8004670 <iproc+0x1a8> <== NOT EXECUTED
return 1;
}
else if (c == '\n') {
80045a4: 34 01 00 0a mvi r1,10 <== NOT EXECUTED
80045a8: 5d 81 00 0f bne r12,r1,80045e4 <iproc+0x11c> <== NOT EXECUTED
if (tty->termios.c_lflag & (ECHO | ECHONL))
80045ac: 20 42 00 48 andi r2,r2,0x48 <== NOT EXECUTED
80045b0: 44 40 00 04 be r2,r0,80045c0 <iproc+0xf8> <== NOT EXECUTED
echo (c, tty);
80045b4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
80045b8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
80045bc: fb ff ff 15 calli 8004210 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
80045c0: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED
80045c4: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED
80045c8: 34 03 00 0a mvi r3,10 <== NOT EXECUTED
80045cc: 34 41 00 01 addi r1,r2,1 <== NOT EXECUTED
80045d0: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED
80045d4: 30 43 00 00 sb (r2+0),r3 <== NOT EXECUTED
80045d8: 59 61 00 20 sw (r11+32),r1 <== NOT EXECUTED
80045dc: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
return 1;
80045e0: e0 00 00 24 bi 8004670 <iproc+0x1a8> <== NOT EXECUTED
}
else if ((c == tty->termios.c_cc[VEOL])
80045e4: 41 61 00 4c lbu r1,(r11+76) <== NOT EXECUTED
80045e8: 44 2c 00 03 be r1,r12,80045f4 <iproc+0x12c> <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
80045ec: 41 61 00 51 lbu r1,(r11+81) <== NOT EXECUTED
80045f0: 5c 2c 00 0b bne r1,r12,800461c <iproc+0x154> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
80045f4: 20 42 00 08 andi r2,r2,0x8 <== NOT EXECUTED
80045f8: 44 40 00 04 be r2,r0,8004608 <iproc+0x140> <== NOT EXECUTED
echo (c, tty);
80045fc: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8004600: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8004604: fb ff ff 03 calli 8004210 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
8004608: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED
800460c: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
8004610: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED
8004614: b4 61 10 00 add r2,r3,r1 <== NOT EXECUTED
8004618: e0 00 00 11 bi 800465c <iproc+0x194> <== NOT EXECUTED
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
800461c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8004620: 38 21 52 34 ori r1,r1,0x5234 <== NOT EXECUTED
8004624: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
8004628: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED
800462c: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
8004630: 4c 41 00 0f bge r2,r1,800466c <iproc+0x1a4> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
8004634: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED
8004638: 20 21 00 08 andi r1,r1,0x8 <== NOT EXECUTED
800463c: 44 20 00 04 be r1,r0,800464c <iproc+0x184> <== NOT EXECUTED
echo (c, tty);
8004640: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8004644: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8004648: fb ff fe f2 calli 8004210 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
800464c: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED
8004650: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED
8004654: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8004658: 34 62 00 01 addi r2,r3,1 <== NOT EXECUTED
800465c: b4 83 18 00 add r3,r4,r3 <== NOT EXECUTED
8004660: 30 6c 00 00 sb (r3+0),r12 <== NOT EXECUTED
8004664: 59 62 00 20 sw (r11+32),r2 <== NOT EXECUTED
8004668: e0 00 00 02 bi 8004670 <iproc+0x1a8> <== NOT EXECUTED
800466c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
return 0;
}
8004670: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8004674: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8004678: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
800467c: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8004680: c3 a0 00 00 ret <== NOT EXECUTED
08011d40 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
8011d40: 37 9c ff dc addi sp,sp,-36
8011d44: 5b 8b 00 18 sw (sp+24),r11
8011d48: 5b 8c 00 14 sw (sp+20),r12
8011d4c: 5b 8d 00 10 sw (sp+16),r13
8011d50: 5b 8e 00 0c sw (sp+12),r14
8011d54: 5b 8f 00 08 sw (sp+8),r15
8011d58: 5b 9d 00 04 sw (sp+4),ra
8011d5c: b8 20 60 00 mv r12,r1
8011d60: b8 40 58 00 mv r11,r2
8011d64: b8 60 68 00 mv r13,r3
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
8011d68: fb ff ed 0f calli 800d1a4 <getpid>
8011d6c: 45 81 00 04 be r12,r1,8011d7c <killinfo+0x3c>
rtems_set_errno_and_return_minus_one( ESRCH );
8011d70: f8 00 03 ba calli 8012c58 <__errno>
8011d74: 34 02 00 03 mvi r2,3
8011d78: e0 00 00 04 bi 8011d88 <killinfo+0x48>
/*
* Validate the signal passed.
*/
if ( !sig )
8011d7c: 5d 60 00 06 bne r11,r0,8011d94 <killinfo+0x54>
rtems_set_errno_and_return_minus_one( EINVAL );
8011d80: f8 00 03 b6 calli 8012c58 <__errno>
8011d84: 34 02 00 16 mvi r2,22
8011d88: 58 22 00 00 sw (r1+0),r2
8011d8c: 34 01 ff ff mvi r1,-1
8011d90: e0 00 00 96 bi 8011fe8 <killinfo+0x2a8>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
8011d94: 35 6f ff ff addi r15,r11,-1
if ( !is_valid_signo(sig) )
8011d98: 34 01 00 1f mvi r1,31
8011d9c: 50 2f 00 02 bgeu r1,r15,8011da4 <killinfo+0x64>
8011da0: e3 ff ff f8 bi 8011d80 <killinfo+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
8011da4: b5 6b 08 00 add r1,r11,r11
8011da8: 34 02 00 02 mvi r2,2
8011dac: b4 2b 08 00 add r1,r1,r11
8011db0: 78 0c 08 02 mvhi r12,0x802
8011db4: fb ff bb 86 calli 8000bcc <__ashlsi3>
8011db8: 39 8c 5e 44 ori r12,r12,0x5e44
8011dbc: b5 81 08 00 add r1,r12,r1
8011dc0: 28 22 00 08 lw r2,(r1+8)
8011dc4: 34 0e 00 01 mvi r14,1
8011dc8: 34 01 00 00 mvi r1,0
8011dcc: 44 4e 00 87 be r2,r14,8011fe8 <killinfo+0x2a8>
/*
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
8011dd0: 65 62 00 04 cmpei r2,r11,4
8011dd4: 65 61 00 08 cmpei r1,r11,8
8011dd8: b8 41 08 00 or r1,r2,r1
8011ddc: 5c 20 00 03 bne r1,r0,8011de8 <killinfo+0xa8>
8011de0: 34 01 00 0b mvi r1,11
8011de4: 5d 61 00 05 bne r11,r1,8011df8 <killinfo+0xb8>
return pthread_kill( pthread_self(), sig );
8011de8: f8 00 01 f6 calli 80125c0 <pthread_self>
8011dec: b9 60 10 00 mv r2,r11
8011df0: f8 00 01 a8 calli 8012490 <pthread_kill>
8011df4: e0 00 00 7d bi 8011fe8 <killinfo+0x2a8>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
8011df8: b9 e0 10 00 mv r2,r15
8011dfc: b9 c0 08 00 mv r1,r14
8011e00: fb ff bb 73 calli 8000bcc <__ashlsi3>
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
8011e04: 5b 8e 00 20 sw (sp+32),r14
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
8011e08: 5b 8b 00 1c sw (sp+28),r11
8011e0c: b8 20 60 00 mv r12,r1
siginfo->si_code = SI_USER;
if ( !value ) {
8011e10: 45 a0 00 02 be r13,r0,8011e18 <killinfo+0xd8>
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
8011e14: 29 ad 00 00 lw r13,(r13+0)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8011e18: 78 01 08 02 mvhi r1,0x802
8011e1c: 5b 8d 00 24 sw (sp+36),r13
8011e20: 38 21 59 44 ori r1,r1,0x5944
8011e24: 28 22 00 00 lw r2,(r1+0)
8011e28: 34 42 00 01 addi r2,r2,1
8011e2c: 58 22 00 00 sw (r1+0),r2
/*
* Is the currently executing thread interested? If so then it will
* get it an execute it as soon as the dispatcher executes.
*/
the_thread = _Thread_Executing;
8011e30: 78 01 08 02 mvhi r1,0x802
8011e34: 38 21 5a 00 ori r1,r1,0x5a00
8011e38: 28 22 00 00 lw r2,(r1+0)
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
8011e3c: 28 41 01 2c lw r1,(r2+300)
8011e40: 28 21 00 cc lw r1,(r1+204)
8011e44: a4 20 08 00 not r1,r1
8011e48: a1 81 08 00 and r1,r12,r1
8011e4c: 5c 20 00 3f bne r1,r0,8011f48 <killinfo+0x208>
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
8011e50: 78 01 08 02 mvhi r1,0x802
8011e54: 38 21 5f d0 ori r1,r1,0x5fd0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
8011e58: 34 24 00 04 addi r4,r1,4
8011e5c: 28 23 00 00 lw r3,(r1+0)
8011e60: e0 00 00 0b bi 8011e8c <killinfo+0x14c>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
8011e64: 28 61 00 30 lw r1,(r3+48)
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
8011e68: 28 65 01 2c lw r5,(r3+300)
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
8011e6c: b8 60 10 00 mv r2,r3
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
8011e70: a1 81 08 00 and r1,r12,r1
8011e74: 5c 20 00 35 bne r1,r0,8011f48 <killinfo+0x208>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
8011e78: 28 a5 00 cc lw r5,(r5+204)
8011e7c: a4 a0 28 00 not r5,r5
8011e80: a1 85 28 00 and r5,r12,r5
8011e84: 5c a1 00 31 bne r5,r1,8011f48 <killinfo+0x208>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
8011e88: 28 63 00 00 lw r3,(r3+0)
8011e8c: 5c 64 ff f6 bne r3,r4,8011e64 <killinfo+0x124>
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
8011e90: 78 01 08 02 mvhi r1,0x802
8011e94: 38 21 50 a8 ori r1,r1,0x50a8
8011e98: 40 25 00 00 lbu r5,(r1+0)
8011e9c: 78 02 08 02 mvhi r2,0x802
8011ea0: 38 42 58 e4 ori r2,r2,0x58e4
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
8011ea4: 78 04 10 00 mvhi r4,0x1000
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
8011ea8: 34 a5 00 01 addi r5,r5,1
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
8011eac: 38 84 00 00 ori r4,r4,0x0
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
8011eb0: 34 4d 00 0c addi r13,r2,12
8011eb4: 34 01 00 00 mvi r1,0
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
/*
* This can occur when no one is interested and ITRON is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
8011eb8: 28 43 00 00 lw r3,(r2+0)
8011ebc: 44 60 00 1f be r3,r0,8011f38 <killinfo+0x1f8>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
8011ec0: 28 63 00 04 lw r3,(r3+4)
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
8011ec4: 34 08 00 01 mvi r8,1
8011ec8: 28 67 00 1c lw r7,(r3+28)
8011ecc: 2c 6e 00 10 lhu r14,(r3+16)
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
8011ed0: e0 00 00 19 bi 8011f34 <killinfo+0x1f4>
the_thread = (Thread_Control *) object_table[ index ];
8011ed4: 28 e3 00 04 lw r3,(r7+4)
if ( !the_thread )
8011ed8: 44 60 00 11 be r3,r0,8011f1c <killinfo+0x1dc>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
8011edc: 28 66 00 14 lw r6,(r3+20)
8011ee0: 54 c5 00 0f bgu r6,r5,8011f1c <killinfo+0x1dc>
DEBUG_STEP("2");
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
8011ee4: 28 69 01 2c lw r9,(r3+300)
8011ee8: 29 29 00 cc lw r9,(r9+204)
8011eec: a5 20 48 00 not r9,r9
8011ef0: a1 89 48 00 and r9,r12,r9
8011ef4: 45 20 00 0a be r9,r0,8011f1c <killinfo+0x1dc>
*
* NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1
* so we never have to worry about deferencing a NULL
* interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
8011ef8: 54 a6 00 0b bgu r5,r6,8011f24 <killinfo+0x1e4>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( !_States_Is_ready( interested->current_state ) ) {
8011efc: 28 29 00 10 lw r9,(r1+16)
8011f00: 45 20 00 07 be r9,r0,8011f1c <killinfo+0x1dc> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
8011f04: 28 6a 00 10 lw r10,(r3+16)
8011f08: 45 40 00 07 be r10,r0,8011f24 <killinfo+0x1e4>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
8011f0c: a1 24 48 00 and r9,r9,r4
8011f10: 5d 20 00 03 bne r9,r0,8011f1c <killinfo+0x1dc>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
8011f14: a1 44 50 00 and r10,r10,r4
8011f18: 5d 49 00 03 bne r10,r9,8011f24 <killinfo+0x1e4>
8011f1c: b8 a0 30 00 mv r6,r5
8011f20: e0 00 00 02 bi 8011f28 <killinfo+0x1e8>
8011f24: b8 60 08 00 mv r1,r3
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
8011f28: 35 08 00 01 addi r8,r8,1
8011f2c: 34 e7 00 04 addi r7,r7,4
8011f30: b8 c0 28 00 mv r5,r6
8011f34: 51 c8 ff e8 bgeu r14,r8,8011ed4 <killinfo+0x194>
8011f38: 34 42 00 04 addi r2,r2,4
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
8011f3c: 5c 4d ff df bne r2,r13,8011eb8 <killinfo+0x178>
}
}
}
}
if ( interested ) {
8011f40: 44 20 00 09 be r1,r0,8011f64 <killinfo+0x224>
8011f44: b8 20 10 00 mv r2,r1
* thread needs to do the post context switch extension so it can
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
8011f48: 34 01 00 01 mvi r1,1
8011f4c: 30 41 00 74 sb (r2+116),r1
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
8011f50: 37 83 00 1c addi r3,sp,28
8011f54: b8 40 08 00 mv r1,r2
8011f58: b9 60 10 00 mv r2,r11
8011f5c: f8 00 00 c8 calli 801227c <_POSIX_signals_Unblock_thread>
8011f60: 5c 20 00 20 bne r1,r0,8011fe0 <killinfo+0x2a0>
/*
* We may have woken up a thread but we definitely need to post the
* signal to the process wide information set.
*/
_POSIX_signals_Set_process_signals( mask );
8011f64: b9 80 08 00 mv r1,r12
8011f68: f8 00 00 b2 calli 8012230 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
8011f6c: b5 6b 08 00 add r1,r11,r11
8011f70: b4 2b 08 00 add r1,r1,r11
8011f74: 34 02 00 02 mvi r2,2
8011f78: 78 0b 08 02 mvhi r11,0x802
8011f7c: fb ff bb 14 calli 8000bcc <__ashlsi3>
8011f80: 39 6b 5e 44 ori r11,r11,0x5e44
8011f84: b5 61 58 00 add r11,r11,r1
8011f88: 29 62 00 00 lw r2,(r11+0)
8011f8c: b8 20 60 00 mv r12,r1
8011f90: 34 01 00 02 mvi r1,2
8011f94: 5c 41 00 13 bne r2,r1,8011fe0 <killinfo+0x2a0>
psiginfo = (POSIX_signals_Siginfo_node *)
8011f98: 78 01 08 02 mvhi r1,0x802
8011f9c: 38 21 5f c4 ori r1,r1,0x5fc4
8011fa0: fb ff cb 9d calli 8004e14 <_Chain_Get>
8011fa4: b8 20 58 00 mv r11,r1
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
8011fa8: 5c 20 00 05 bne r1,r0,8011fbc <killinfo+0x27c>
_Thread_Enable_dispatch();
8011fac: fb ff d2 21 calli 8006830 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
8011fb0: f8 00 03 2a calli 8012c58 <__errno>
8011fb4: 34 02 00 0b mvi r2,11
8011fb8: e3 ff ff 74 bi 8011d88 <killinfo+0x48>
}
psiginfo->Info = *siginfo;
8011fbc: 37 82 00 1c addi r2,sp,28
8011fc0: 34 03 00 0c mvi r3,12
8011fc4: 34 21 00 08 addi r1,r1,8
8011fc8: f8 00 05 ca calli 80136f0 <memcpy>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
8011fcc: 78 03 08 02 mvhi r3,0x802
8011fd0: 38 63 60 3c ori r3,r3,0x603c
8011fd4: b5 83 08 00 add r1,r12,r3
8011fd8: b9 60 10 00 mv r2,r11
8011fdc: fb ff cb 78 calli 8004dbc <_Chain_Append>
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
8011fe0: fb ff d2 14 calli 8006830 <_Thread_Enable_dispatch>
8011fe4: 34 01 00 00 mvi r1,0
return 0;
}
8011fe8: 2b 9d 00 04 lw ra,(sp+4)
8011fec: 2b 8b 00 18 lw r11,(sp+24)
8011ff0: 2b 8c 00 14 lw r12,(sp+20)
8011ff4: 2b 8d 00 10 lw r13,(sp+16)
8011ff8: 2b 8e 00 0c lw r14,(sp+12)
8011ffc: 2b 8f 00 08 lw r15,(sp+8)
8012000: 37 9c 00 24 addi sp,sp,36
8012004: c3 a0 00 00 ret
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 37 22 calli 80108f4 <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 31 94 ori r3,r3,0x3194
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 33 bc calli 800fbb0 <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 31 94 ori r3,r3,0x3194
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 33 b3 calli 800fbb0 <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 30 f6 calli 800f118 <__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 30 e3 calli 800f118 <__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 30 d1 calli 800f118 <__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
08022090 <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
8022090: 37 9c ff e8 addi sp,sp,-24
8022094: 5b 8b 00 18 sw (sp+24),r11
8022098: 5b 8c 00 14 sw (sp+20),r12
802209c: 5b 8d 00 10 sw (sp+16),r13
80220a0: 5b 8e 00 0c sw (sp+12),r14
80220a4: 5b 8f 00 08 sw (sp+8),r15
80220a8: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
80220ac: 78 04 08 02 mvhi r4,0x802
80220b0: 38 84 50 10 ori r4,r4,0x5010
80220b4: 28 84 00 00 lw r4,(r4+0)
off_t lseek(
int fd,
off_t offset,
int whence
)
{
80220b8: b8 40 60 00 mv r12,r2
80220bc: b8 60 68 00 mv r13,r3
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
80220c0: 54 81 00 02 bgu r4,r1,80220c8 <lseek+0x38> <== ALWAYS TAKEN
80220c4: e0 00 00 0e bi 80220fc <lseek+0x6c> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
80220c8: 34 02 00 03 mvi r2,3
80220cc: fb ff 7a c0 calli 8000bcc <__ashlsi3>
80220d0: 78 0e 08 02 mvhi r14,0x802
80220d4: 39 ce 57 ec ori r14,r14,0x57ec
80220d8: 34 02 00 03 mvi r2,3
80220dc: b8 20 78 00 mv r15,r1
80220e0: fb ff 7a bb calli 8000bcc <__ashlsi3>
80220e4: 29 cb 00 00 lw r11,(r14+0)
80220e8: b5 e1 08 00 add r1,r15,r1
80220ec: b5 61 58 00 add r11,r11,r1
rtems_libio_check_is_open(iop);
80220f0: 29 61 00 18 lw r1,(r11+24)
80220f4: 20 21 01 00 andi r1,r1,0x100
80220f8: 5c 20 00 04 bne r1,r0,8022108 <lseek+0x78> <== ALWAYS TAKEN
80220fc: fb ff c2 d7 calli 8012c58 <__errno> <== NOT EXECUTED
8022100: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
8022104: e0 00 00 29 bi 80221a8 <lseek+0x118> <== NOT EXECUTED
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
8022108: 29 61 00 40 lw r1,(r11+64)
802210c: 28 21 00 14 lw r1,(r1+20)
8022110: 5c 20 00 04 bne r1,r0,8022120 <lseek+0x90> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
8022114: fb ff c2 d1 calli 8012c58 <__errno> <== NOT EXECUTED
8022118: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
802211c: e0 00 00 23 bi 80221a8 <lseek+0x118> <== NOT EXECUTED
/*
* Now process the lseek().
*/
old_offset = iop->offset;
switch ( whence ) {
8022120: 34 01 00 01 mvi r1,1
/*
* Now process the lseek().
*/
old_offset = iop->offset;
8022124: 29 6f 00 10 lw r15,(r11+16)
8022128: 29 6e 00 14 lw r14,(r11+20)
switch ( whence ) {
802212c: 45 a1 00 0a be r13,r1,8022154 <lseek+0xc4>
8022130: 34 01 00 02 mvi r1,2
8022134: 45 a1 00 0f be r13,r1,8022170 <lseek+0xe0>
8022138: 5d a0 00 1a bne r13,r0,80221a0 <lseek+0x110>
case SEEK_SET:
iop->offset = offset;
802213c: b9 80 08 00 mv r1,r12
8022140: 34 02 00 1f mvi r2,31
8022144: fb ff 7a f2 calli 8000d0c <__ashrsi3>
8022148: 59 61 00 10 sw (r11+16),r1
802214c: 59 6c 00 14 sw (r11+20),r12
break;
8022150: e0 00 00 19 bi 80221b4 <lseek+0x124>
case SEEK_CUR:
iop->offset += offset;
8022154: 34 02 00 1f mvi r2,31
8022158: b9 80 08 00 mv r1,r12
802215c: fb ff 7a ec calli 8000d0c <__ashrsi3>
8022160: b5 8e 10 00 add r2,r12,r14
8022164: f5 82 18 00 cmpgu r3,r12,r2
8022168: b4 2f 08 00 add r1,r1,r15
802216c: e0 00 00 09 bi 8022190 <lseek+0x100>
break;
case SEEK_END:
iop->offset = iop->size + offset;
8022170: 34 02 00 1f mvi r2,31
8022174: b9 80 08 00 mv r1,r12
8022178: fb ff 7a e5 calli 8000d0c <__ashrsi3>
802217c: 29 62 00 0c lw r2,(r11+12)
8022180: 29 64 00 08 lw r4,(r11+8)
8022184: b5 82 10 00 add r2,r12,r2
8022188: f5 82 18 00 cmpgu r3,r12,r2
802218c: b4 24 08 00 add r1,r1,r4
8022190: b4 61 08 00 add r1,r3,r1
8022194: 59 61 00 10 sw (r11+16),r1
8022198: 59 62 00 14 sw (r11+20),r2
break;
802219c: e0 00 00 06 bi 80221b4 <lseek+0x124>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
80221a0: fb ff c2 ae calli 8012c58 <__errno>
80221a4: 34 02 00 16 mvi r2,22
80221a8: 58 22 00 00 sw (r1+0),r2
80221ac: 34 0c ff ff mvi r12,-1
80221b0: e0 00 00 13 bi 80221fc <lseek+0x16c>
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
80221b4: 29 6f 00 40 lw r15,(r11+64)
80221b8: 34 02 00 1f mvi r2,31
80221bc: b9 80 08 00 mv r1,r12
80221c0: fb ff 7a d3 calli 8000d0c <__ashrsi3>
80221c4: 29 e5 00 14 lw r5,(r15+20)
80221c8: b8 20 10 00 mv r2,r1
80221cc: b9 80 18 00 mv r3,r12
80221d0: b9 a0 20 00 mv r4,r13
80221d4: b9 60 08 00 mv r1,r11
80221d8: d8 a0 00 00 call r5
if ( status == (off_t) -1 )
80221dc: 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 );
80221e0: b8 40 60 00 mv r12,r2
if ( status == (off_t) -1 )
80221e4: 5c 41 00 06 bne r2,r1,80221fc <lseek+0x16c>
iop->offset = old_offset;
80221e8: b9 c0 08 00 mv r1,r14
80221ec: 34 02 00 1f mvi r2,31
80221f0: fb ff 7a c7 calli 8000d0c <__ashrsi3>
80221f4: 59 61 00 10 sw (r11+16),r1
80221f8: 59 6e 00 14 sw (r11+20),r14
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
80221fc: b9 80 08 00 mv r1,r12
8022200: 2b 9d 00 04 lw ra,(sp+4)
8022204: 2b 8b 00 18 lw r11,(sp+24)
8022208: 2b 8c 00 14 lw r12,(sp+20)
802220c: 2b 8d 00 10 lw r13,(sp+16)
8022210: 2b 8e 00 0c lw r14,(sp+12)
8022214: 2b 8f 00 08 lw r15,(sp+8)
8022218: 37 9c 00 18 addi sp,sp,24
802221c: c3 a0 00 00 ret
08002de4 <malloc>:
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
8002de4: 37 9c ff f0 addi sp,sp,-16
8002de8: 5b 8b 00 10 sw (sp+16),r11
8002dec: 5b 8c 00 0c sw (sp+12),r12
8002df0: 5b 8d 00 08 sw (sp+8),r13
8002df4: 5b 9d 00 04 sw (sp+4),ra
8002df8: 78 03 08 02 mvhi r3,0x802
8002dfc: 38 63 58 08 ori r3,r3,0x5808
8002e00: 28 62 00 04 lw r2,(r3+4)
8002e04: b8 20 68 00 mv r13,r1
8002e08: 34 41 00 01 addi r1,r2,1
8002e0c: 58 61 00 04 sw (r3+4),r1
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
8002e10: fb ff ff a5 calli 8002ca4 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
8002e14: 45 a0 00 30 be r13,r0,8002ed4 <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()) &&
8002e18: 78 01 08 02 mvhi r1,0x802
8002e1c: 38 21 5a e0 ori r1,r1,0x5ae0
8002e20: 28 22 00 00 lw r2,(r1+0)
8002e24: 34 01 00 03 mvi r1,3
8002e28: 5c 41 00 03 bne r2,r1,8002e34 <malloc+0x50>
8002e2c: fb ff ff 83 calli 8002c38 <malloc_is_system_state_OK>
8002e30: 44 20 00 29 be r1,r0,8002ed4 <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 );
8002e34: 78 01 08 02 mvhi r1,0x802
8002e38: 38 21 50 1c ori r1,r1,0x501c
8002e3c: 28 21 00 00 lw r1,(r1+0)
8002e40: 34 03 00 00 mvi r3,0
8002e44: b9 a0 10 00 mv r2,r13
8002e48: b8 60 20 00 mv r4,r3
8002e4c: f8 00 0c da calli 80061b4 <_Protected_heap_Allocate_aligned_with_boundary>
8002e50: 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;
8002e54: 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 ) {
8002e58: 5c 20 00 0e bne r1,r0,8002e90 <malloc+0xac>
if (rtems_malloc_sbrk_helpers)
8002e5c: 78 01 08 02 mvhi r1,0x802
8002e60: 38 21 56 84 ori r1,r1,0x5684
8002e64: 28 21 00 00 lw r1,(r1+0)
8002e68: 44 2b 00 06 be r1,r11,8002e80 <malloc+0x9c> <== ALWAYS TAKEN
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
8002e6c: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED
8002e70: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8002e74: d8 40 00 00 call r2 <== NOT EXECUTED
8002e78: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
if ( !return_this ) {
8002e7c: 5c 20 00 05 bne r1,r0,8002e90 <malloc+0xac> <== NOT EXECUTED
errno = ENOMEM;
8002e80: f8 00 3f 76 calli 8012c58 <__errno>
8002e84: 34 02 00 0c mvi r2,12
8002e88: 58 22 00 00 sw (r1+0),r2
return (void *) 0;
8002e8c: e0 00 00 13 bi 8002ed8 <malloc+0xf4>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
8002e90: 78 01 08 02 mvhi r1,0x802
8002e94: 38 21 56 88 ori r1,r1,0x5688
8002e98: 28 21 00 00 lw r1,(r1+0)
8002e9c: 44 20 00 05 be r1,r0,8002eb0 <malloc+0xcc> <== ALWAYS TAKEN
(*rtems_malloc_dirty_helper)( return_this, size );
8002ea0: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED
8002ea4: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED
8002ea8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8002eac: d8 60 00 00 call r3 <== NOT EXECUTED
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
8002eb0: 78 01 08 02 mvhi r1,0x802
8002eb4: 38 21 56 80 ori r1,r1,0x5680
8002eb8: 28 21 00 00 lw r1,(r1+0)
8002ebc: b9 80 58 00 mv r11,r12
8002ec0: 44 20 00 06 be r1,r0,8002ed8 <malloc+0xf4> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
8002ec4: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED
8002ec8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8002ecc: d8 40 00 00 call r2 <== NOT EXECUTED
8002ed0: e0 00 00 02 bi 8002ed8 <malloc+0xf4> <== NOT EXECUTED
8002ed4: 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;
}
8002ed8: b9 60 08 00 mv r1,r11
8002edc: 2b 9d 00 04 lw ra,(sp+4)
8002ee0: 2b 8b 00 10 lw r11,(sp+16)
8002ee4: 2b 8c 00 0c lw r12,(sp+12)
8002ee8: 2b 8d 00 08 lw r13,(sp+8)
8002eec: 37 9c 00 10 addi sp,sp,16
8002ef0: c3 a0 00 00 ret
08002c80 <malloc_deferred_free>:
}
void malloc_deferred_free(
void *pointer
)
{
8002c80: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8002c84: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8002c88: b8 20 10 00 mv r2,r1 <== 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 );
8002c8c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8002c90: 38 21 57 f8 ori r1,r1,0x57f8 <== NOT EXECUTED
8002c94: f8 00 08 4a calli 8004dbc <_Chain_Append> <== NOT EXECUTED
rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer);
}
8002c98: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002c9c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8002ca0: c3 a0 00 00 ret <== NOT EXECUTED
08002ca4 <malloc_deferred_frees_process>:
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
8002ca4: 37 9c ff f8 addi sp,sp,-8
8002ca8: 5b 8b 00 08 sw (sp+8),r11
8002cac: 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 );
8002cb0: 78 0b 08 02 mvhi r11,0x802
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)
8002cb4: e0 00 00 02 bi 8002cbc <malloc_deferred_frees_process+0x18>
free(to_be_freed);
8002cb8: fb ff ff 56 calli 8002a10 <free> <== NOT EXECUTED
8002cbc: b9 60 08 00 mv r1,r11
8002cc0: 38 21 57 f8 ori r1,r1,0x57f8
8002cc4: f8 00 08 54 calli 8004e14 <_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)
8002cc8: 5c 20 ff fc bne r1,r0,8002cb8 <malloc_deferred_frees_process+0x14><== NEVER TAKEN
free(to_be_freed);
}
8002ccc: 2b 9d 00 04 lw ra,(sp+4)
8002cd0: 2b 8b 00 08 lw r11,(sp+8)
8002cd4: 37 9c 00 08 addi sp,sp,8
8002cd8: c3 a0 00 00 ret
08002c38 <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 )
8002c38: 78 01 08 02 mvhi r1,0x802
8002c3c: 38 21 59 44 ori r1,r1,0x5944
8002c40: 28 22 00 00 lw r2,(r1+0)
8002c44: 34 01 00 00 mvi r1,0
8002c48: 5c 41 00 05 bne r2,r1,8002c5c <malloc_is_system_state_OK+0x24><== NEVER TAKEN
return false;
if ( _ISR_Nest_level > 0 )
8002c4c: 78 01 08 02 mvhi r1,0x802
8002c50: 38 21 59 dc ori r1,r1,0x59dc
8002c54: 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)
8002c58: 64 21 00 00 cmpei r1,r1,0
if ( _ISR_Nest_level > 0 )
return false;
return true;
}
8002c5c: c3 a0 00 00 ret
080101ec <memfile_alloc_block>:
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
80101ec: 37 9c ff fc addi sp,sp,-4
80101f0: 5b 9d 00 04 sw (sp+4),ra
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
80101f4: 78 01 08 02 mvhi r1,0x802
80101f8: 38 21 56 d8 ori r1,r1,0x56d8
80101fc: 28 22 00 00 lw r2,(r1+0)
8010200: 34 01 00 01 mvi r1,1
8010204: fb ff c9 4a calli 800272c <calloc>
if ( memory )
8010208: 44 20 00 06 be r1,r0,8010220 <memfile_alloc_block+0x34> <== NEVER TAKEN
memfile_blocks_allocated++;
801020c: 78 02 08 02 mvhi r2,0x802
8010210: 38 42 57 7c ori r2,r2,0x577c
8010214: 28 43 00 00 lw r3,(r2+0)
8010218: 34 63 00 01 addi r3,r3,1
801021c: 58 43 00 00 sw (r2+0),r3
return memory;
}
8010220: 2b 9d 00 04 lw ra,(sp+4)
8010224: 37 9c 00 04 addi sp,sp,4
8010228: c3 a0 00 00 ret
080107ac <memfile_check_rmnod>:
return memfile_check_rmnod( the_jnode );
}
int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){
80107ac: 37 9c ff f8 addi sp,sp,-8
80107b0: 5b 8b 00 08 sw (sp+8),r11
80107b4: 5b 9d 00 04 sw (sp+4),ra
80107b8: 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) ) {
80107bc: fb ff f2 9a calli 800d224 <rtems_libio_is_file_open>
80107c0: 5c 20 00 10 bne r1,r0,8010800 <memfile_check_rmnod+0x54>
80107c4: 2d 62 00 34 lhu r2,(r11+52)
80107c8: 5c 41 00 0e bne r2,r1,8010800 <memfile_check_rmnod+0x54> <== NEVER TAKEN
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == the_jnode )
80107cc: 78 01 08 02 mvhi r1,0x802
80107d0: 38 21 50 f8 ori r1,r1,0x50f8
80107d4: 28 21 00 00 lw r1,(r1+0)
80107d8: 28 23 00 04 lw r3,(r1+4)
80107dc: 5c 6b 00 02 bne r3,r11,80107e4 <memfile_check_rmnod+0x38> <== ALWAYS TAKEN
rtems_filesystem_current.node_access = NULL;
80107e0: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
if (the_jnode->type != IMFS_LINEAR_FILE)
80107e4: 29 62 00 4c lw r2,(r11+76)
80107e8: 34 01 00 06 mvi r1,6
80107ec: 44 41 00 03 be r2,r1,80107f8 <memfile_check_rmnod+0x4c> <== NEVER TAKEN
IMFS_memfile_remove( the_jnode );
80107f0: b9 60 08 00 mv r1,r11
80107f4: fb ff ff 7f calli 80105f0 <IMFS_memfile_remove>
free( the_jnode );
80107f8: b9 60 08 00 mv r1,r11
80107fc: fb ff c8 85 calli 8002a10 <free>
}
return 0;
}
8010800: 34 01 00 00 mvi r1,0
8010804: 2b 9d 00 04 lw ra,(sp+4)
8010808: 2b 8b 00 08 lw r11,(sp+8)
801080c: 37 9c 00 08 addi sp,sp,8
8010810: c3 a0 00 00 ret
080104f4 <memfile_free_blocks_in_table>:
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
80104f4: 37 9c ff e8 addi sp,sp,-24
80104f8: 5b 8b 00 18 sw (sp+24),r11
80104fc: 5b 8c 00 14 sw (sp+20),r12
8010500: 5b 8d 00 10 sw (sp+16),r13
8010504: 5b 8e 00 0c sw (sp+12),r14
8010508: 5b 8f 00 08 sw (sp+8),r15
801050c: 5b 9d 00 04 sw (sp+4),ra
8010510: b8 20 58 00 mv r11,r1
8010514: b8 40 78 00 mv r15,r2
/*
* Perform internal consistency checks
*/
assert( block_table );
8010518: 5c 20 00 09 bne r1,r0,801053c <memfile_free_blocks_in_table+0x48><== ALWAYS TAKEN
801051c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8010520: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8010524: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8010528: 38 21 34 9c ori r1,r1,0x349c <== NOT EXECUTED
801052c: 38 63 36 10 ori r3,r3,0x3610 <== NOT EXECUTED
8010530: 38 84 35 14 ori r4,r4,0x3514 <== NOT EXECUTED
8010534: 34 02 01 b3 mvi r2,435 <== NOT EXECUTED
8010538: fb ff f2 7e calli 800cf30 <__assert_func> <== NOT EXECUTED
801053c: 34 0c 00 00 mvi r12,0
8010540: 28 2d 00 00 lw r13,(r1+0)
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
if ( b[i] ) {
8010544: 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++ ) {
8010548: e0 00 00 07 bi 8010564 <memfile_free_blocks_in_table+0x70>
if ( b[i] ) {
801054c: 29 a1 00 00 lw r1,(r13+0)
8010550: 44 20 00 03 be r1,r0,801055c <memfile_free_blocks_in_table+0x68>
memfile_free_block( b[i] );
8010554: fb ff ff 1b calli 80101c0 <memfile_free_block>
b[i] = 0;
8010558: 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++ ) {
801055c: 35 8c 00 01 addi r12,r12,1
8010560: 35 ad 00 04 addi r13,r13,4
8010564: 49 ec ff fa bg r15,r12,801054c <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 );
8010568: 29 61 00 00 lw r1,(r11+0)
801056c: fb ff ff 15 calli 80101c0 <memfile_free_block>
*block_table = 0;
8010570: 34 01 00 00 mvi r1,0
8010574: 59 61 00 00 sw (r11+0),r1
}
8010578: 2b 9d 00 04 lw ra,(sp+4)
801057c: 2b 8b 00 18 lw r11,(sp+24)
8010580: 2b 8c 00 14 lw r12,(sp+20)
8010584: 2b 8d 00 10 lw r13,(sp+16)
8010588: 2b 8e 00 0c lw r14,(sp+12)
801058c: 2b 8f 00 08 lw r15,(sp+8)
8010590: 37 9c 00 18 addi sp,sp,24
8010594: c3 a0 00 00 ret
08010b00 <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
8010b00: 37 9c ff f0 addi sp,sp,-16
8010b04: 5b 8b 00 08 sw (sp+8),r11
8010b08: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
8010b0c: 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 )
8010b10: 29 64 00 50 lw r4,(r11+80)
8010b14: 48 44 00 05 bg r2,r4,8010b28 <memfile_ftruncate+0x28> <== NEVER TAKEN
8010b18: 5c 82 00 08 bne r4,r2,8010b38 <memfile_ftruncate+0x38> <== NEVER TAKEN
8010b1c: 29 64 00 54 lw r4,(r11+84)
8010b20: 54 64 00 02 bgu r3,r4,8010b28 <memfile_ftruncate+0x28> <== NEVER TAKEN
8010b24: e0 00 00 05 bi 8010b38 <memfile_ftruncate+0x38>
return IMFS_memfile_extend( the_jnode, length );
8010b28: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8010b2c: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
8010b30: fb ff ff 8a calli 8010958 <IMFS_memfile_extend> <== NOT EXECUTED
8010b34: e0 00 00 0b bi 8010b60 <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;
8010b38: 59 62 00 50 sw (r11+80),r2
8010b3c: 59 63 00 54 sw (r11+84),r3
iop->size = the_jnode->info.file.size;
8010b40: 58 22 00 08 sw (r1+8),r2
8010b44: 58 23 00 0c sw (r1+12),r3
IMFS_update_atime( the_jnode );
8010b48: 34 02 00 00 mvi r2,0
8010b4c: 37 81 00 0c addi r1,sp,12
8010b50: fb ff c7 de calli 8002ac8 <gettimeofday>
8010b54: 2b 81 00 0c lw r1,(sp+12)
8010b58: 59 61 00 40 sw (r11+64),r1
8010b5c: 34 01 00 00 mvi r1,0
return 0;
}
8010b60: 2b 9d 00 04 lw ra,(sp+4)
8010b64: 2b 8b 00 08 lw r11,(sp+8)
8010b68: 37 9c 00 10 addi sp,sp,16
8010b6c: c3 a0 00 00 ret
08010b70 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
8010b70: 37 9c ff f4 addi sp,sp,-12
8010b74: 5b 8b 00 0c sw (sp+12),r11
8010b78: 5b 8c 00 08 sw (sp+8),r12
8010b7c: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
8010b80: 28 2c 00 3c lw r12,(r1+60)
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
8010b84: b8 20 58 00 mv r11,r1
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
8010b88: 34 01 00 06 mvi r1,6
8010b8c: 29 82 00 4c lw r2,(r12+76)
8010b90: 5c 41 00 0c bne r2,r1,8010bc0 <memfile_lseek+0x50> <== ALWAYS TAKEN
if (iop->offset > the_jnode->info.linearfile.size)
8010b94: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED
8010b98: 29 63 00 10 lw r3,(r11+16) <== NOT EXECUTED
8010b9c: 29 82 00 54 lw r2,(r12+84) <== NOT EXECUTED
8010ba0: 48 61 00 05 bg r3,r1,8010bb4 <memfile_lseek+0x44> <== NOT EXECUTED
8010ba4: 5c 61 00 15 bne r3,r1,8010bf8 <memfile_lseek+0x88> <== NOT EXECUTED
8010ba8: 29 63 00 14 lw r3,(r11+20) <== NOT EXECUTED
8010bac: 54 62 00 02 bgu r3,r2,8010bb4 <memfile_lseek+0x44> <== NOT EXECUTED
8010bb0: e0 00 00 12 bi 8010bf8 <memfile_lseek+0x88> <== NOT EXECUTED
iop->offset = the_jnode->info.linearfile.size;
8010bb4: 59 61 00 10 sw (r11+16),r1 <== NOT EXECUTED
8010bb8: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED
8010bbc: e0 00 00 0f bi 8010bf8 <memfile_lseek+0x88> <== NOT EXECUTED
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
8010bc0: 29 62 00 14 lw r2,(r11+20)
8010bc4: b9 80 08 00 mv r1,r12
8010bc8: fb ff ff 64 calli 8010958 <IMFS_memfile_extend>
8010bcc: 44 20 00 07 be r1,r0,8010be8 <memfile_lseek+0x78> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
8010bd0: f8 00 08 22 calli 8012c58 <__errno> <== NOT EXECUTED
8010bd4: 34 02 00 1c mvi r2,28 <== NOT EXECUTED
8010bd8: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED
8010bdc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8010be0: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
8010be4: e0 00 00 07 bi 8010c00 <memfile_lseek+0x90> <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
8010be8: 29 81 00 50 lw r1,(r12+80)
8010bec: 59 61 00 08 sw (r11+8),r1
8010bf0: 29 8c 00 54 lw r12,(r12+84)
8010bf4: 59 6c 00 0c sw (r11+12),r12
}
return iop->offset;
8010bf8: 29 62 00 14 lw r2,(r11+20)
8010bfc: 29 63 00 10 lw r3,(r11+16)
}
8010c00: b8 60 08 00 mv r1,r3
8010c04: 2b 9d 00 04 lw ra,(sp+4)
8010c08: 2b 8b 00 0c lw r11,(sp+12)
8010c0c: 2b 8c 00 08 lw r12,(sp+8)
8010c10: 37 9c 00 0c addi sp,sp,12
8010c14: c3 a0 00 00 ret
08010f30 <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
8010f30: 37 9c ff f4 addi sp,sp,-12
8010f34: 5b 8b 00 0c sw (sp+12),r11
8010f38: 5b 8c 00 08 sw (sp+8),r12
8010f3c: 5b 9d 00 04 sw (sp+4),ra
8010f40: 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))
8010f44: 28 21 00 18 lw r1,(r1+24)
8010f48: 34 02 00 00 mvi r2,0
uint32_t mode
)
{
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
8010f4c: 29 8b 00 3c lw r11,(r12+60)
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
8010f50: 20 21 02 04 andi r1,r1,0x204
8010f54: 44 22 00 13 be r1,r2,8010fa0 <memfile_open+0x70>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
8010f58: 29 63 00 4c lw r3,(r11+76)
8010f5c: 34 01 00 06 mvi r1,6
8010f60: 5c 61 00 10 bne r3,r1,8010fa0 <memfile_open+0x70> <== ALWAYS TAKEN
uint32_t count = the_jnode->info.linearfile.size;
8010f64: 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;
8010f68: 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;
8010f6c: 29 63 00 58 lw r3,(r11+88) <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
8010f70: 59 61 00 4c sw (r11+76),r1 <== NOT EXECUTED
the_jnode->info.file.size = 0;
8010f74: 59 62 00 50 sw (r11+80),r2 <== NOT EXECUTED
8010f78: 59 62 00 54 sw (r11+84),r2 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
8010f7c: 59 62 00 5c sw (r11+92),r2 <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
8010f80: 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;
8010f84: 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)
8010f88: 44 82 00 06 be r4,r2,8010fa0 <memfile_open+0x70> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
8010f8c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8010f90: fb ff ff 22 calli 8010c18 <IMFS_memfile_write> <== NOT EXECUTED
8010f94: 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)
8010f98: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED
8010f9c: 44 43 00 0d be r2,r3,8010fd0 <memfile_open+0xa0> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
8010fa0: 29 81 00 18 lw r1,(r12+24)
8010fa4: 20 21 02 00 andi r1,r1,0x200
8010fa8: 44 20 00 05 be r1,r0,8010fbc <memfile_open+0x8c>
iop->offset = the_jnode->info.file.size;
8010fac: 29 61 00 50 lw r1,(r11+80)
8010fb0: 59 81 00 10 sw (r12+16),r1
8010fb4: 29 61 00 54 lw r1,(r11+84)
8010fb8: 59 81 00 14 sw (r12+20),r1
iop->size = the_jnode->info.file.size;
8010fbc: 29 61 00 50 lw r1,(r11+80)
8010fc0: 59 81 00 08 sw (r12+8),r1
8010fc4: 29 6b 00 54 lw r11,(r11+84)
8010fc8: 34 01 00 00 mvi r1,0
8010fcc: 59 8b 00 0c sw (r12+12),r11
return 0;
}
8010fd0: 2b 9d 00 04 lw ra,(sp+4)
8010fd4: 2b 8b 00 0c lw r11,(sp+12)
8010fd8: 2b 8c 00 08 lw r12,(sp+8)
8010fdc: 37 9c 00 0c addi sp,sp,12
8010fe0: c3 a0 00 00 ret
08010814 <memfile_rmnod>:
int memfile_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
8010814: 37 9c ff f0 addi sp,sp,-16
8010818: 5b 8b 00 08 sw (sp+8),r11
801081c: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
8010820: 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 ) {
8010824: 29 61 00 08 lw r1,(r11+8)
8010828: 44 20 00 05 be r1,r0,801083c <memfile_rmnod+0x28> <== NEVER TAKEN
801082c: b9 60 08 00 mv r1,r11
8010830: fb ff d1 6f calli 8004dec <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
8010834: 34 01 00 00 mvi r1,0
8010838: 59 61 00 08 sw (r11+8),r1
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
801083c: 2d 63 00 34 lhu r3,(r11+52)
IMFS_update_ctime( the_jnode );
8010840: 34 02 00 00 mvi r2,0
8010844: 37 81 00 0c addi r1,sp,12
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
8010848: 34 63 ff ff addi r3,r3,-1
801084c: 0d 63 00 34 sh (r11+52),r3
IMFS_update_ctime( the_jnode );
8010850: fb ff c8 9e calli 8002ac8 <gettimeofday>
8010854: 2b 81 00 0c lw r1,(sp+12)
8010858: 59 61 00 48 sw (r11+72),r1
return memfile_check_rmnod( the_jnode );
801085c: b9 60 08 00 mv r1,r11
8010860: fb ff ff d3 calli 80107ac <memfile_check_rmnod>
}
8010864: 2b 9d 00 04 lw ra,(sp+4)
8010868: 2b 8b 00 08 lw r11,(sp+8)
801086c: 37 9c 00 10 addi sp,sp,16
8010870: c3 a0 00 00 ret
08002f18 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
8002f18: 37 9c ff cc addi sp,sp,-52
8002f1c: 5b 8b 00 1c sw (sp+28),r11
8002f20: 5b 8c 00 18 sw (sp+24),r12
8002f24: 5b 8d 00 14 sw (sp+20),r13
8002f28: 5b 8e 00 10 sw (sp+16),r14
8002f2c: 5b 8f 00 0c sw (sp+12),r15
8002f30: 5b 90 00 08 sw (sp+8),r16
8002f34: 5b 9d 00 04 sw (sp+4),ra
8002f38: 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) ) )
8002f3c: 20 42 f0 00 andi r2,r2,0xf000
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
8002f40: b8 20 70 00 mv r14,r1
8002f44: b8 60 80 00 mv r16,r3
8002f48: 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) ) )
8002f4c: 5c 40 00 04 bne r2,r0,8002f5c <mknod+0x44> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
8002f50: f8 00 3f 42 calli 8012c58 <__errno> <== NOT EXECUTED
8002f54: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8002f58: e0 00 00 1c bi 8002fc8 <mknod+0xb0> <== NOT EXECUTED
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
8002f5c: 40 25 00 00 lbu r5,(r1+0)
8002f60: 64 ab 00 5c cmpei r11,r5,92
8002f64: 64 a1 00 2f cmpei r1,r5,47
8002f68: b9 61 58 00 or r11,r11,r1
8002f6c: 5d 60 00 02 bne r11,r0,8002f74 <mknod+0x5c>
8002f70: 5c ab 00 0a bne r5,r11,8002f98 <mknod+0x80> <== ALWAYS TAKEN
8002f74: 78 05 08 02 mvhi r5,0x802
8002f78: 38 a5 50 f8 ori r5,r5,0x50f8
8002f7c: 28 a2 00 00 lw r2,(r5+0)
8002f80: 37 81 00 20 addi r1,sp,32
8002f84: 34 03 00 14 mvi r3,20
8002f88: 34 42 00 18 addi r2,r2,24
8002f8c: f8 00 41 d9 calli 80136f0 <memcpy>
8002f90: 34 0b 00 01 mvi r11,1
8002f94: e0 00 00 08 bi 8002fb4 <mknod+0x9c>
8002f98: 78 05 08 02 mvhi r5,0x802
8002f9c: 38 a5 50 f8 ori r5,r5,0x50f8
8002fa0: 28 a2 00 00 lw r2,(r5+0)
8002fa4: 37 81 00 20 addi r1,sp,32
8002fa8: 34 03 00 14 mvi r3,20
8002fac: 34 42 00 04 addi r2,r2,4
8002fb0: f8 00 41 d0 calli 80136f0 <memcpy>
if ( !temp_loc.ops->evalformake_h ) {
8002fb4: 2b 81 00 2c lw r1,(sp+44)
8002fb8: 28 25 00 04 lw r5,(r1+4)
8002fbc: 5c a0 00 06 bne r5,r0,8002fd4 <mknod+0xbc> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
8002fc0: f8 00 3f 26 calli 8012c58 <__errno> <== NOT EXECUTED
8002fc4: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8002fc8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8002fcc: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
8002fd0: e0 00 00 1d bi 8003044 <mknod+0x12c> <== NOT EXECUTED
}
result = (*temp_loc.ops->evalformake_h)(
8002fd4: 37 8c 00 20 addi r12,sp,32
8002fd8: b5 cb 08 00 add r1,r14,r11
8002fdc: b9 80 10 00 mv r2,r12
8002fe0: 37 83 00 34 addi r3,sp,52
8002fe4: d8 a0 00 00 call r5
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
8002fe8: 34 0b ff ff mvi r11,-1
8002fec: 5c 20 00 16 bne r1,r0,8003044 <mknod+0x12c>
return -1;
if ( !temp_loc.ops->mknod_h ) {
8002ff0: 2b 82 00 2c lw r2,(sp+44)
8002ff4: 28 46 00 14 lw r6,(r2+20)
8002ff8: 5c c1 00 06 bne r6,r1,8003010 <mknod+0xf8> <== ALWAYS TAKEN
rtems_filesystem_freenode( &temp_loc );
8002ffc: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED
8003000: 44 46 ff f0 be r2,r6,8002fc0 <mknod+0xa8> <== NOT EXECUTED
8003004: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8003008: d8 40 00 00 call r2 <== NOT EXECUTED
800300c: e3 ff ff ed bi 8002fc0 <mknod+0xa8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
8003010: 2b 81 00 34 lw r1,(sp+52)
8003014: b9 a0 10 00 mv r2,r13
8003018: ba 00 18 00 mv r3,r16
800301c: b9 e0 20 00 mv r4,r15
8003020: b9 80 28 00 mv r5,r12
8003024: d8 c0 00 00 call r6
8003028: b8 20 58 00 mv r11,r1
rtems_filesystem_freenode( &temp_loc );
800302c: 2b 81 00 2c lw r1,(sp+44)
8003030: 44 20 00 05 be r1,r0,8003044 <mknod+0x12c> <== NEVER TAKEN
8003034: 28 22 00 1c lw r2,(r1+28)
8003038: 44 40 00 03 be r2,r0,8003044 <mknod+0x12c>
800303c: b9 80 08 00 mv r1,r12
8003040: d8 40 00 00 call r2
return result;
}
8003044: b9 60 08 00 mv r1,r11
8003048: 2b 9d 00 04 lw ra,(sp+4)
800304c: 2b 8b 00 1c lw r11,(sp+28)
8003050: 2b 8c 00 18 lw r12,(sp+24)
8003054: 2b 8d 00 14 lw r13,(sp+20)
8003058: 2b 8e 00 10 lw r14,(sp+16)
800305c: 2b 8f 00 0c lw r15,(sp+12)
8003060: 2b 90 00 08 lw r16,(sp+8)
8003064: 37 9c 00 34 addi sp,sp,52
8003068: c3 a0 00 00 ret
0800308c <mount>:
const rtems_filesystem_operations_table *fs_ops,
rtems_filesystem_options_t options,
const char *device,
const char *mount_point
)
{
800308c: 37 9c ff c8 addi sp,sp,-56
8003090: 5b 8b 00 24 sw (sp+36),r11
8003094: 5b 8c 00 20 sw (sp+32),r12
8003098: 5b 8d 00 1c sw (sp+28),r13
800309c: 5b 8e 00 18 sw (sp+24),r14
80030a0: 5b 8f 00 14 sw (sp+20),r15
80030a4: 5b 90 00 10 sw (sp+16),r16
80030a8: 5b 91 00 0c sw (sp+12),r17
80030ac: 5b 92 00 08 sw (sp+8),r18
80030b0: 5b 9d 00 04 sw (sp+4),ra
80030b4: b8 40 80 00 mv r16,r2
80030b8: b8 20 78 00 mv r15,r1
80030bc: b8 60 90 00 mv r18,r3
80030c0: b8 80 70 00 mv r14,r4
80030c4: b8 a0 68 00 mv r13,r5
/*
* Is there a file system operations table?
*/
if ( fs_ops == NULL ) {
80030c8: 44 40 00 03 be r2,r0,80030d4 <mount+0x48>
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
80030cc: 34 01 00 01 mvi r1,1
80030d0: 50 23 00 04 bgeu r1,r3,80030e0 <mount+0x54>
options != RTEMS_FILESYSTEM_READ_WRITE ) {
errno = EINVAL;
80030d4: f8 00 3e e1 calli 8012c58 <__errno>
80030d8: 34 02 00 16 mvi r2,22
80030dc: e0 00 00 13 bi 8003128 <mount+0x9c>
return -1;
}
/* Do they support being mounted at all ? */
if ( !fs_ops->fsmount_me_h ) {
80030e0: 28 4c 00 24 lw r12,(r2+36)
80030e4: 5d 80 00 06 bne r12,r0,80030fc <mount+0x70> <== ALWAYS TAKEN
errno = ENOTSUP;
80030e8: f8 00 3e dc calli 8012c58 <__errno> <== NOT EXECUTED
80030ec: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
80030f0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80030f4: b9 80 88 00 mv r17,r12 <== NOT EXECUTED
goto cleanup_and_bail;
80030f8: e0 00 00 67 bi 8003294 <mount+0x208> <== NOT EXECUTED
/*
* Allocate a mount table entry
*/
size = sizeof(rtems_filesystem_mount_table_entry_t);
if ( device )
80030fc: 34 01 00 6c mvi r1,108
8003100: 44 80 00 04 be r4,r0,8003110 <mount+0x84> <== ALWAYS TAKEN
size += strlen( device ) + 1;
8003104: b8 80 08 00 mv r1,r4 <== NOT EXECUTED
8003108: f8 00 43 85 calli 8013f1c <strlen> <== NOT EXECUTED
800310c: 34 21 00 6d addi r1,r1,109 <== NOT EXECUTED
temp_mt_entry = malloc( size );
8003110: fb ff ff 35 calli 8002de4 <malloc>
8003114: b8 20 58 00 mv r11,r1
8003118: b8 20 88 00 mv r17,r1
if ( !temp_mt_entry ) {
800311c: 5c 20 00 05 bne r1,r0,8003130 <mount+0xa4> <== ALWAYS TAKEN
errno = ENOMEM;
8003120: f8 00 3e ce calli 8012c58 <__errno> <== NOT EXECUTED
8003124: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
8003128: 58 22 00 00 sw (r1+0),r2
800312c: e0 00 00 63 bi 80032b8 <mount+0x22c>
return -1;
}
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
temp_mt_entry->options = options;
8003130: 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;
8003134: 59 61 00 2c sw (r11+44),r1
temp_mt_entry->options = options;
if ( device ) {
8003138: 45 c0 00 07 be r14,r0,8003154 <mount+0xc8> <== ALWAYS TAKEN
temp_mt_entry->dev =
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
800313c: 34 23 00 6c addi r3,r1,108 <== NOT EXECUTED
strcpy( temp_mt_entry->dev, device );
8003140: b8 60 08 00 mv r1,r3 <== NOT EXECUTED
8003144: 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 =
8003148: 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 );
800314c: f8 00 43 2f calli 8013e08 <strcpy> <== NOT EXECUTED
8003150: e0 00 00 02 bi 8003158 <mount+0xcc> <== NOT EXECUTED
} else
temp_mt_entry->dev = 0;
8003154: 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 ) {
8003158: 45 a0 00 32 be r13,r0,8003220 <mount+0x194>
if ( rtems_filesystem_evaluate_path(
mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
800315c: b9 a0 08 00 mv r1,r13
8003160: f8 00 43 6f calli 8013f1c <strlen>
* permissions in the existing tree.
*/
if ( mount_point ) {
if ( rtems_filesystem_evaluate_path(
8003164: 37 8c 00 28 addi r12,sp,40
8003168: b8 20 10 00 mv r2,r1
800316c: 34 03 00 07 mvi r3,7
8003170: b9 a0 08 00 mv r1,r13
8003174: b9 80 20 00 mv r4,r12
8003178: 34 05 00 01 mvi r5,1
800317c: fb ff fd e8 calli 800291c <rtems_filesystem_evaluate_path>
8003180: 34 02 ff ff mvi r2,-1
8003184: 44 22 00 43 be r1,r2,8003290 <mount+0x204> <== NEVER TAKEN
/*
* Test for node_type_h
*/
if (!loc.ops->node_type_h) {
8003188: 2b 81 00 34 lw r1,(sp+52)
800318c: 28 22 00 10 lw r2,(r1+16)
8003190: 5c 40 00 04 bne r2,r0,80031a0 <mount+0x114> <== ALWAYS TAKEN
errno = ENOTSUP;
8003194: f8 00 3e b1 calli 8012c58 <__errno> <== NOT EXECUTED
8003198: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
800319c: e0 00 00 07 bi 80031b8 <mount+0x12c> <== NOT EXECUTED
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
80031a0: b9 80 08 00 mv r1,r12
80031a4: d8 40 00 00 call r2
80031a8: 34 02 00 01 mvi r2,1
80031ac: 44 22 00 05 be r1,r2,80031c0 <mount+0x134>
errno = ENOTDIR;
80031b0: f8 00 3e aa calli 8012c58 <__errno>
80031b4: 34 02 00 14 mvi r2,20
80031b8: 58 22 00 00 sw (r1+0),r2
goto cleanup_and_bail;
80031bc: e0 00 00 36 bi 8003294 <mount+0x208>
/*
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
80031c0: 78 03 08 02 mvhi r3,0x802
80031c4: 38 63 58 38 ori r3,r3,0x5838
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
80031c8: 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 )
80031cc: 2b 81 00 28 lw r1,(sp+40)
/*
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
80031d0: 28 63 00 00 lw r3,(r3+0)
80031d4: e0 00 00 04 bi 80031e4 <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 )
80031d8: 28 64 00 1c lw r4,(r3+28)
80031dc: 44 81 00 04 be r4,r1,80031ec <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 ) {
80031e0: 28 63 00 00 lw r3,(r3+0)
80031e4: 5c 62 ff fd bne r3,r2,80031d8 <mount+0x14c>
80031e8: e0 00 00 41 bi 80032ec <mount+0x260>
/*
* You can only mount one file system onto a single mount point.
*/
if ( Is_node_fs_root( &loc ) ){
errno = EBUSY;
80031ec: f8 00 3e 9b calli 8012c58 <__errno>
80031f0: 34 02 00 10 mvi r2,16
80031f4: e0 00 00 03 bi 8003200 <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;
80031f8: f8 00 3e 98 calli 8012c58 <__errno> <== NOT EXECUTED
80031fc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8003200: 58 22 00 00 sw (r1+0),r2
8003204: 37 8c 00 28 addi r12,sp,40
goto cleanup_and_bail;
8003208: e0 00 00 23 bi 8003294 <mount+0x208>
}
if ( loc.ops->mount_h( temp_mt_entry ) ) {
800320c: b9 60 08 00 mv r1,r11
8003210: d8 40 00 00 call r2
8003214: 37 8c 00 28 addi r12,sp,40
8003218: 44 20 00 0a be r1,r0,8003240 <mount+0x1b4> <== ALWAYS TAKEN
800321c: e0 00 00 1e bi 8003294 <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;
8003220: 59 6d 00 1c sw (r11+28),r13
temp_mt_entry->mt_fs_root.handlers = NULL;
8003224: 59 6d 00 24 sw (r11+36),r13
temp_mt_entry->mt_fs_root.ops = NULL;
8003228: 59 6d 00 28 sw (r11+40),r13
temp_mt_entry->mt_point_node.node_access = NULL;
800322c: 59 6d 00 08 sw (r11+8),r13
temp_mt_entry->mt_point_node.handlers = NULL;
8003230: 59 6d 00 10 sw (r11+16),r13
temp_mt_entry->mt_point_node.ops = NULL;
8003234: 59 6d 00 14 sw (r11+20),r13
temp_mt_entry->mt_point_node.mt_entry = NULL;
8003238: 59 6d 00 18 sw (r11+24),r13
800323c: b9 a0 60 00 mv r12,r13
}
if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) {
8003240: 2a 02 00 24 lw r2,(r16+36)
8003244: b9 60 08 00 mv r1,r11
8003248: d8 40 00 00 call r2
800324c: b8 20 68 00 mv r13,r1
8003250: 44 20 00 07 be r1,r0,800326c <mount+0x1e0> <== ALWAYS TAKEN
/* try to undo the mount operation */
if ( loc.ops->unmount_h ) {
8003254: 2b 81 00 34 lw r1,(sp+52) <== NOT EXECUTED
8003258: 28 22 00 28 lw r2,(r1+40) <== NOT EXECUTED
800325c: 44 40 00 0e be r2,r0,8003294 <mount+0x208> <== NOT EXECUTED
loc.ops->unmount_h( temp_mt_entry );
8003260: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8003264: d8 40 00 00 call r2 <== NOT EXECUTED
8003268: e0 00 00 0b bi 8003294 <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 );
800326c: 78 01 08 02 mvhi r1,0x802
8003270: b9 60 10 00 mv r2,r11
8003274: 38 21 58 38 ori r1,r1,0x5838
8003278: f8 00 06 d1 calli 8004dbc <_Chain_Append>
*/
rtems_chain_append( &rtems_filesystem_mount_table_control,
&temp_mt_entry->Node );
if ( mt_entry )
800327c: b9 e0 10 00 mv r2,r15
8003280: 45 ed 00 0f be r15,r13,80032bc <mount+0x230> <== NEVER TAKEN
*mt_entry = temp_mt_entry;
8003284: 59 eb 00 00 sw (r15+0),r11
8003288: b9 a0 10 00 mv r2,r13
800328c: e0 00 00 0c bi 80032bc <mount+0x230>
8003290: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( temp_mt_entry );
8003294: ba 20 08 00 mv r1,r17
8003298: fb ff fd de calli 8002a10 <free>
if ( loc_to_free )
800329c: 45 80 00 07 be r12,r0,80032b8 <mount+0x22c> <== NEVER TAKEN
rtems_filesystem_freenode( loc_to_free );
80032a0: 29 81 00 0c lw r1,(r12+12)
80032a4: 44 20 00 05 be r1,r0,80032b8 <mount+0x22c> <== NEVER TAKEN
80032a8: 28 22 00 1c lw r2,(r1+28)
80032ac: 44 40 00 03 be r2,r0,80032b8 <mount+0x22c> <== NEVER TAKEN
80032b0: b9 80 08 00 mv r1,r12
80032b4: d8 40 00 00 call r2
80032b8: 34 02 ff ff mvi r2,-1
return -1;
}
80032bc: b8 40 08 00 mv r1,r2
80032c0: 2b 9d 00 04 lw ra,(sp+4)
80032c4: 2b 8b 00 24 lw r11,(sp+36)
80032c8: 2b 8c 00 20 lw r12,(sp+32)
80032cc: 2b 8d 00 1c lw r13,(sp+28)
80032d0: 2b 8e 00 18 lw r14,(sp+24)
80032d4: 2b 8f 00 14 lw r15,(sp+20)
80032d8: 2b 90 00 10 lw r16,(sp+16)
80032dc: 2b 91 00 0c lw r17,(sp+12)
80032e0: 2b 92 00 08 lw r18,(sp+8)
80032e4: 37 9c 00 38 addi sp,sp,56
80032e8: 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;
80032ec: 2b 82 00 30 lw r2,(sp+48)
temp_mt_entry->mt_point_node.ops = loc.ops;
80032f0: 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;
80032f4: 59 61 00 08 sw (r11+8),r1
temp_mt_entry->mt_point_node.handlers = loc.handlers;
80032f8: 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;
80032fc: 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;
8003300: 59 63 00 14 sw (r11+20),r3
temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
8003304: 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 ){
8003308: 28 62 00 20 lw r2,(r3+32)
800330c: 5c 40 ff c0 bne r2,r0,800320c <mount+0x180> <== ALWAYS TAKEN
8003310: e3 ff ff ba bi 80031f8 <mount+0x16c> <== NOT EXECUTED
0801ba90 <nanosleep>:
int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp
)
{
801ba90: 37 9c ff ec addi sp,sp,-20
801ba94: 5b 8b 00 14 sw (sp+20),r11
801ba98: 5b 8c 00 10 sw (sp+16),r12
801ba9c: 5b 8d 00 0c sw (sp+12),r13
801baa0: 5b 8e 00 08 sw (sp+8),r14
801baa4: 5b 9d 00 04 sw (sp+4),ra
Watchdog_Interval ticks;
if ( !_Timespec_Is_valid( rqtp ) )
801baa8: 34 0e 00 00 mvi r14,0
int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp
)
{
801baac: b8 40 68 00 mv r13,r2
801bab0: b8 20 58 00 mv r11,r1
Watchdog_Interval ticks;
if ( !_Timespec_Is_valid( rqtp ) )
801bab4: f8 00 00 a6 calli 801bd4c <_Timespec_Is_valid>
801bab8: 44 2e 00 05 be r1,r14,801bacc <nanosleep+0x3c>
* Return EINVAL if the delay interval is negative.
*
* NOTE: This behavior is beyond the POSIX specification.
* FSU and GNU/Linux pthreads shares this behavior.
*/
if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 )
801babc: 29 61 00 00 lw r1,(r11+0)
801bac0: 48 01 00 03 bg r0,r1,801bacc <nanosleep+0x3c> <== NEVER TAKEN
801bac4: 29 61 00 04 lw r1,(r11+4)
801bac8: 4c 20 00 04 bge r1,r0,801bad8 <nanosleep+0x48> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
801bacc: fb ff c3 f6 calli 800caa4 <__errno>
801bad0: 34 02 00 16 mvi r2,22
801bad4: e0 00 00 34 bi 801bba4 <nanosleep+0x114>
ticks = _Timespec_To_ticks( rqtp );
801bad8: b9 60 08 00 mv r1,r11
801badc: fb ff b7 2b calli 8009788 <_Timespec_To_ticks>
801bae0: b8 20 58 00 mv r11,r1
801bae4: 78 01 08 01 mvhi r1,0x801
801bae8: 38 21 e8 dc ori r1,r1,0xe8dc
* A nanosleep for zero time is implemented as a yield.
* This behavior is also beyond the POSIX specification but is
* consistent with the RTEMS API and yields desirable behavior.
*/
if ( !ticks ) {
801baec: 5d 60 00 0b bne r11,r0,801bb18 <nanosleep+0x88>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
801baf0: 28 22 00 00 lw r2,(r1+0)
801baf4: 34 42 00 01 addi r2,r2,1
801baf8: 58 22 00 00 sw (r1+0),r2
_Thread_Disable_dispatch();
_Thread_Yield_processor();
801bafc: f8 00 00 54 calli 801bc4c <_Thread_Yield_processor>
_Thread_Enable_dispatch();
801bb00: fb ff a1 18 calli 8003f60 <_Thread_Enable_dispatch>
if ( rmtp ) {
801bb04: 45 ab 00 2b be r13,r11,801bbb0 <nanosleep+0x120>
rmtp->tv_sec = 0;
rmtp->tv_nsec = 0;
801bb08: 59 ab 00 04 sw (r13+4),r11
if ( !ticks ) {
_Thread_Disable_dispatch();
_Thread_Yield_processor();
_Thread_Enable_dispatch();
if ( rmtp ) {
rmtp->tv_sec = 0;
801bb0c: 59 ab 00 00 sw (r13+0),r11
rmtp->tv_nsec = 0;
801bb10: b9 60 08 00 mv r1,r11
801bb14: e0 00 00 28 bi 801bbb4 <nanosleep+0x124>
801bb18: 28 22 00 00 lw r2,(r1+0)
801bb1c: 34 42 00 01 addi r2,r2,1
801bb20: 58 22 00 00 sw (r1+0),r2
/*
* Block for the desired amount of time
*/
_Thread_Disable_dispatch();
_Thread_Set_state(
801bb24: 78 0c 08 01 mvhi r12,0x801
801bb28: 39 8c e9 98 ori r12,r12,0xe998
801bb2c: 29 81 00 00 lw r1,(r12+0)
801bb30: 78 02 10 00 mvhi r2,0x1000
801bb34: 38 42 00 08 ori r2,r2,0x8
801bb38: fb ff b6 79 calli 800951c <_Thread_Set_state>
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
&_Thread_Executing->Timer,
801bb3c: 29 83 00 00 lw r3,(r12+0)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
801bb40: 78 02 08 01 mvhi r2,0x801
801bb44: 38 42 bc 08 ori r2,r2,0xbc08
_Thread_Disable_dispatch();
_Thread_Set_state(
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
801bb48: 28 64 00 08 lw r4,(r3+8)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
801bb4c: 78 01 08 01 mvhi r1,0x801
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
801bb50: 58 62 00 64 sw (r3+100),r2
the_watchdog->id = id;
801bb54: 58 64 00 68 sw (r3+104),r4
the_watchdog->user_data = user_data;
801bb58: 58 6e 00 6c sw (r3+108),r14
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
801bb5c: 38 21 e9 b8 ori r1,r1,0xe9b8
801bb60: 34 62 00 48 addi r2,r3,72
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
801bb64: 58 6e 00 50 sw (r3+80),r14
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
801bb68: 58 6b 00 54 sw (r3+84),r11
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
801bb6c: fb ff b7 38 calli 800984c <_Watchdog_Insert>
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
_Thread_Enable_dispatch();
801bb70: fb ff a0 fc calli 8003f60 <_Thread_Enable_dispatch>
/* calculate time remaining */
if ( rmtp ) {
801bb74: 45 a0 00 0f be r13,r0,801bbb0 <nanosleep+0x120>
ticks -=
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
801bb78: 29 81 00 00 lw r1,(r12+0)
_Timespec_From_ticks( ticks, rmtp );
801bb7c: b9 a0 10 00 mv r2,r13
_Thread_Enable_dispatch();
/* calculate time remaining */
if ( rmtp ) {
ticks -=
801bb80: 28 23 00 60 lw r3,(r1+96)
801bb84: 28 21 00 5c lw r1,(r1+92)
801bb88: c8 23 08 00 sub r1,r1,r3
801bb8c: b4 2b 58 00 add r11,r1,r11
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
_Timespec_From_ticks( ticks, rmtp );
801bb90: b9 60 08 00 mv r1,r11
801bb94: f8 00 00 54 calli 801bce4 <_Timespec_From_ticks>
*/
#if defined(RTEMS_POSIX_API)
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
801bb98: 45 60 00 06 be r11,r0,801bbb0 <nanosleep+0x120>
rtems_set_errno_and_return_minus_one( EINTR );
801bb9c: fb ff c3 c2 calli 800caa4 <__errno>
801bba0: 34 02 00 04 mvi r2,4
801bba4: 58 22 00 00 sw (r1+0),r2
801bba8: 34 01 ff ff mvi r1,-1
801bbac: e0 00 00 02 bi 801bbb4 <nanosleep+0x124>
801bbb0: 34 01 00 00 mvi r1,0
#endif
}
return 0;
}
801bbb4: 2b 9d 00 04 lw ra,(sp+4)
801bbb8: 2b 8b 00 14 lw r11,(sp+20)
801bbbc: 2b 8c 00 10 lw r12,(sp+16)
801bbc0: 2b 8d 00 0c lw r13,(sp+12)
801bbc4: 2b 8e 00 08 lw r14,(sp+8)
801bbc8: 37 9c 00 14 addi sp,sp,20
801bbcc: c3 a0 00 00 ret
08003318 <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
8003318: 37 9c ff f0 addi sp,sp,-16
800331c: 5b 8b 00 10 sw (sp+16),r11
8003320: 5b 8c 00 0c sw (sp+12),r12
8003324: 5b 8d 00 08 sw (sp+8),r13
8003328: 5b 9d 00 04 sw (sp+4),ra
800332c: b8 20 68 00 mv r13,r1
8003330: b8 40 60 00 mv r12,r2
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
8003334: 5c 22 00 05 bne r1,r2,8003348 <newlib_delete_hook+0x30>
ptr = _REENT;
8003338: 78 02 08 02 mvhi r2,0x802
800333c: 38 42 51 d8 ori r2,r2,0x51d8
8003340: 28 4b 00 00 lw r11,(r2+0)
8003344: e0 00 00 02 bi 800334c <newlib_delete_hook+0x34>
} else {
ptr = deleted_task->libc_reent;
8003348: 28 4b 01 24 lw r11,(r2+292)
}
if (ptr && ptr != _global_impure_ptr) {
800334c: 45 60 00 0b be r11,r0,8003378 <newlib_delete_hook+0x60> <== NEVER TAKEN
8003350: 78 02 08 02 mvhi r2,0x802
8003354: 38 42 37 b0 ori r2,r2,0x37b0
8003358: 28 41 00 00 lw r1,(r2+0)
800335c: 45 61 00 07 be r11,r1,8003378 <newlib_delete_hook+0x60>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
8003360: 78 02 08 00 mvhi r2,0x800
8003364: 38 42 33 a8 ori r2,r2,0x33a8
8003368: b9 60 08 00 mv r1,r11
800336c: f8 00 40 af calli 8013628 <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
8003370: b9 60 08 00 mv r1,r11
8003374: f8 00 12 7c calli 8007d64 <_Workspace_Free>
#endif
}
deleted_task->libc_reent = NULL;
8003378: 34 02 00 00 mvi r2,0
800337c: 59 82 01 24 sw (r12+292),r2
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
8003380: 5d ac 00 04 bne r13,r12,8003390 <newlib_delete_hook+0x78>
_REENT = 0;
8003384: 78 01 08 02 mvhi r1,0x802
8003388: 38 21 51 d8 ori r1,r1,0x51d8
800338c: 58 22 00 00 sw (r1+0),r2
}
}
8003390: 2b 9d 00 04 lw ra,(sp+4)
8003394: 2b 8b 00 10 lw r11,(sp+16)
8003398: 2b 8c 00 0c lw r12,(sp+12)
800339c: 2b 8d 00 08 lw r13,(sp+8)
80033a0: 37 9c 00 10 addi sp,sp,16
80033a4: c3 a0 00 00 ret
080033a8 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
80033a8: 37 9c ff f4 addi sp,sp,-12
80033ac: 5b 8b 00 0c sw (sp+12),r11
80033b0: 5b 8c 00 08 sw (sp+8),r12
80033b4: 5b 9d 00 04 sw (sp+4),ra
80033b8: b8 20 58 00 mv r11,r1
switch ( fileno(fp) ) {
80033bc: f8 00 3f 4b calli 80130e8 <fileno>
80033c0: 34 02 00 02 mvi r2,2
80033c4: 54 22 00 0d bgu r1,r2,80033f8 <newlib_free_buffers+0x50> <== NEVER TAKEN
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
80033c8: 2d 61 00 0c lhu r1,(r11+12)
80033cc: 34 0c 00 00 mvi r12,0
80033d0: 20 21 00 80 andi r1,r1,0x80
80033d4: 44 2c 00 0b be r1,r12,8003400 <newlib_free_buffers+0x58> <== ALWAYS TAKEN
free( fp->_bf._base );
80033d8: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
80033dc: fb ff fd 8d calli 8002a10 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
80033e0: 2d 61 00 0c lhu r1,(r11+12) <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
80033e4: 59 6c 00 10 sw (r11+16),r12 <== NOT EXECUTED
80033e8: 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;
80033ec: 20 21 ff 7f andi r1,r1,0xff7f <== NOT EXECUTED
80033f0: 0d 61 00 0c sh (r11+12),r1 <== NOT EXECUTED
80033f4: e0 00 00 03 bi 8003400 <newlib_free_buffers+0x58> <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
80033f8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80033fc: f8 00 3e 79 calli 8012de0 <fclose> <== NOT EXECUTED
}
return 0;
}
8003400: 34 01 00 00 mvi r1,0
8003404: 2b 9d 00 04 lw ra,(sp+4)
8003408: 2b 8b 00 0c lw r11,(sp+12)
800340c: 2b 8c 00 08 lw r12,(sp+8)
8003410: 37 9c 00 0c addi sp,sp,12
8003414: c3 a0 00 00 ret
080018e4 <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
80018e4: 37 9c ff f4 addi sp,sp,-12
80018e8: 5b 8b 00 0c sw (sp+12),r11
80018ec: 5b 8c 00 08 sw (sp+8),r12
80018f0: 5b 9d 00 04 sw (sp+4),ra
rtems_device_driver status;
if ( !initialized ) {
80018f4: 78 04 08 02 mvhi r4,0x802
80018f8: 38 84 27 20 ori r4,r4,0x2720
80018fc: 40 8b 00 00 lbu r11,(r4+0)
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
8001900: b8 20 60 00 mv r12,r1
rtems_device_driver status;
if ( !initialized ) {
8001904: 5d 60 00 0d bne r11,r0,8001938 <null_initialize+0x54>
initialized = 1;
status = rtems_io_register_name(
8001908: 78 01 08 01 mvhi r1,0x801
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
800190c: 34 05 00 01 mvi r5,1
status = rtems_io_register_name(
8001910: 38 21 f9 2c ori r1,r1,0xf92c
8001914: b9 80 10 00 mv r2,r12
8001918: b9 60 18 00 mv r3,r11
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
800191c: 30 85 00 00 sb (r4+0),r5
status = rtems_io_register_name(
8001920: f8 00 00 54 calli 8001a70 <rtems_io_register_name>
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
8001924: 44 2b 00 02 be r1,r11,800192c <null_initialize+0x48> <== ALWAYS TAKEN
rtems_fatal_error_occurred(status);
8001928: f8 00 07 f2 calli 80038f0 <rtems_fatal_error_occurred> <== NOT EXECUTED
NULL_major = major;
800192c: 78 03 08 02 mvhi r3,0x802
8001930: 38 63 27 c8 ori r3,r3,0x27c8
8001934: 58 6c 00 00 sw (r3+0),r12
}
return RTEMS_SUCCESSFUL;
}
8001938: 34 01 00 00 mvi r1,0
800193c: 2b 9d 00 04 lw ra,(sp+4)
8001940: 2b 8b 00 0c lw r11,(sp+12)
8001944: 2b 8c 00 08 lw r12,(sp+8)
8001948: 37 9c 00 0c addi sp,sp,12
800194c: c3 a0 00 00 ret
080018c8 <null_write>:
void *pargp
)
{
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
if ( rw_args )
80018c8: 44 60 00 03 be r3,r0,80018d4 <null_write+0xc> <== ALWAYS TAKEN
rw_args->bytes_moved = rw_args->count;
80018cc: 28 61 00 14 lw r1,(r3+20) <== NOT EXECUTED
80018d0: 58 61 00 1c sw (r3+28),r1 <== NOT EXECUTED
return NULL_SUCCESSFUL;
}
80018d4: 34 01 00 00 mvi r1,0
80018d8: c3 a0 00 00 ret
08003668 <open>:
int open(
const char *pathname,
int flags,
...
)
{
8003668: 37 9c ff ac addi sp,sp,-84
800366c: 5b 8b 00 24 sw (sp+36),r11
8003670: 5b 8c 00 20 sw (sp+32),r12
8003674: 5b 8d 00 1c sw (sp+28),r13
8003678: 5b 8e 00 18 sw (sp+24),r14
800367c: 5b 8f 00 14 sw (sp+20),r15
8003680: 5b 90 00 10 sw (sp+16),r16
8003684: 5b 91 00 0c sw (sp+12),r17
8003688: 5b 92 00 08 sw (sp+8),r18
800368c: 5b 9d 00 04 sw (sp+4),ra
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
8003690: 34 49 00 01 addi r9,r2,1
int open(
const char *pathname,
int flags,
...
)
{
8003694: b8 40 70 00 mv r14,r2
8003698: 5b 82 00 3c sw (sp+60),r2
800369c: 5b 83 00 40 sw (sp+64),r3
80036a0: 5b 84 00 44 sw (sp+68),r4
80036a4: 5b 85 00 48 sw (sp+72),r5
80036a8: 5b 86 00 4c sw (sp+76),r6
80036ac: 5b 87 00 50 sw (sp+80),r7
80036b0: 5b 88 00 54 sw (sp+84),r8
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
80036b4: 21 22 00 01 andi r2,r9,0x1
int open(
const char *pathname,
int flags,
...
)
{
80036b8: b8 20 78 00 mv r15,r1
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
80036bc: 34 0d 00 04 mvi r13,4
80036c0: 5c 40 00 02 bne r2,r0,80036c8 <open+0x60>
80036c4: b8 40 68 00 mv r13,r2
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
80036c8: 21 29 00 02 andi r9,r9,0x2
80036cc: 45 20 00 02 be r9,r0,80036d4 <open+0x6c>
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
80036d0: 39 ad 00 02 ori r13,r13,0x2
va_start(ap, flags);
mode = va_arg( ap, int );
80036d4: 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();
80036d8: f8 00 27 3d calli 800d3cc <rtems_libio_allocate>
80036dc: b8 20 58 00 mv r11,r1
if ( iop == 0 ) {
80036e0: 34 0c 00 17 mvi r12,23
80036e4: 44 20 00 76 be r1,r0,80038bc <open+0x254>
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
80036e8: b9 e0 08 00 mv r1,r15
80036ec: f8 00 42 0c calli 8013f1c <strlen>
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
80036f0: 37 91 00 28 addi r17,sp,40
80036f4: b8 20 10 00 mv r2,r1
80036f8: b9 a0 18 00 mv r3,r13
80036fc: b9 e0 08 00 mv r1,r15
8003700: ba 20 20 00 mv r4,r17
8003704: 34 05 00 01 mvi r5,1
8003708: fb ff fc 85 calli 800291c <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
800370c: 34 02 ff ff mvi r2,-1
8003710: 5c 22 00 1f bne r1,r2,800378c <open+0x124>
if ( errno != ENOENT ) {
8003714: f8 00 3d 51 calli 8012c58 <__errno>
8003718: 28 2c 00 00 lw r12,(r1+0)
800371c: 34 01 00 02 mvi r1,2
8003720: 5d 81 00 0b bne r12,r1,800374c <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) ) {
8003724: 21 c1 02 00 andi r1,r14,0x200
8003728: b8 20 68 00 mv r13,r1
800372c: 44 20 00 5a be r1,r0,8003894 <open+0x22c>
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
8003730: 34 03 00 00 mvi r3,0
8003734: b9 e0 08 00 mv r1,r15
8003738: 3a 42 80 00 ori r2,r18,0x8000
800373c: b8 60 20 00 mv r4,r3
8003740: fb ff fd f6 calli 8002f18 <mknod>
8003744: b8 20 80 00 mv r16,r1
if ( rc ) {
8003748: 44 20 00 05 be r1,r0,800375c <open+0xf4> <== ALWAYS TAKEN
rc = errno;
800374c: f8 00 3d 43 calli 8012c58 <__errno>
8003750: 28 2c 00 00 lw r12,(r1+0)
8003754: 34 0d 00 00 mvi r13,0
goto done;
8003758: e0 00 00 4e bi 8003890 <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 );
800375c: b9 e0 08 00 mv r1,r15
8003760: f8 00 41 ef calli 8013f1c <strlen>
8003764: b8 20 10 00 mv r2,r1
8003768: ba 00 18 00 mv r3,r16
800376c: b9 e0 08 00 mv r1,r15
8003770: ba 20 20 00 mv r4,r17
8003774: 34 05 00 01 mvi r5,1
8003778: fb ff fc 69 calli 800291c <rtems_filesystem_evaluate_path>
if ( status != 0 ) { /* The file did not exist */
800377c: ba 00 68 00 mv r13,r16
8003780: 34 0c 00 0d mvi r12,13
8003784: 5c 30 00 44 bne r1,r16,8003894 <open+0x22c> <== NEVER TAKEN
8003788: e0 00 00 06 bi 80037a0 <open+0x138>
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
800378c: 21 c2 0a 00 andi r2,r14,0xa00
8003790: 34 01 0a 00 mvi r1,2560
8003794: ba 20 68 00 mv r13,r17
8003798: 34 0c 00 11 mvi r12,17
800379c: 44 41 00 3e be r2,r1,8003894 <open+0x22c>
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
80037a0: 2b 81 00 30 lw r1,(sp+48)
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
80037a4: 29 6c 00 18 lw r12,(r11+24)
iop->pathinfo = loc;
80037a8: 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;
80037ac: 59 61 00 40 sw (r11+64),r1
iop->file_info = loc.node_access;
80037b0: 2b 81 00 28 lw r1,(sp+40)
80037b4: 59 61 00 3c sw (r11+60),r1
iop->flags |= rtems_libio_fcntl_flags( flags );
80037b8: b9 c0 08 00 mv r1,r14
80037bc: f8 00 27 3d calli 800d4b0 <rtems_libio_fcntl_flags>
80037c0: b8 2c 08 00 or r1,r1,r12
80037c4: 59 61 00 18 sw (r11+24),r1
iop->pathinfo = loc;
80037c8: b9 a0 10 00 mv r2,r13
80037cc: 35 61 00 1c addi r1,r11,28
80037d0: 34 03 00 14 mvi r3,20
80037d4: f8 00 3f c7 calli 80136f0 <memcpy>
if ( !iop->handlers || !iop->handlers->open_h ) {
80037d8: 29 61 00 40 lw r1,(r11+64)
80037dc: 44 20 00 50 be r1,r0,800391c <open+0x2b4> <== NEVER TAKEN
80037e0: 28 25 00 00 lw r5,(r1+0)
80037e4: 44 a0 00 4e be r5,r0,800391c <open+0x2b4> <== NEVER TAKEN
rc = ENOTSUP;
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
80037e8: b9 e0 10 00 mv r2,r15
80037ec: ba 40 20 00 mv r4,r18
80037f0: b9 60 08 00 mv r1,r11
80037f4: b9 c0 18 00 mv r3,r14
80037f8: d8 a0 00 00 call r5
80037fc: b8 20 60 00 mv r12,r1
if ( rc ) {
8003800: 44 20 00 04 be r1,r0,8003810 <open+0x1a8>
rc = errno;
8003804: f8 00 3d 15 calli 8012c58 <__errno>
8003808: 28 2c 00 00 lw r12,(r1+0)
goto done;
800380c: e0 00 00 21 bi 8003890 <open+0x228>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
8003810: 21 ce 04 00 andi r14,r14,0x400
8003814: 45 c1 00 2e be r14,r1,80038cc <open+0x264>
rc = ftruncate( iop - rtems_libio_iops, 0 );
8003818: 78 01 08 02 mvhi r1,0x802
800381c: 38 21 57 ec ori r1,r1,0x57ec
8003820: 28 21 00 00 lw r1,(r1+0)
8003824: 34 02 00 03 mvi r2,3
8003828: c9 61 08 00 sub r1,r11,r1
800382c: fb ff f5 38 calli 8000d0c <__ashrsi3>
8003830: 78 02 38 e3 mvhi r2,0x38e3
8003834: 38 42 8e 39 ori r2,r2,0x8e39
8003838: f8 00 78 d0 calli 8021b78 <__mulsi3>
800383c: b9 80 10 00 mv r2,r12
8003840: f8 00 26 08 calli 800d060 <ftruncate>
8003844: b8 20 60 00 mv r12,r1
if ( rc ) {
8003848: 44 20 00 21 be r1,r0,80038cc <open+0x264> <== ALWAYS TAKEN
if(errno) rc = errno;
800384c: f8 00 3d 03 calli 8012c58 <__errno> <== NOT EXECUTED
8003850: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
8003854: 44 20 00 03 be r1,r0,8003860 <open+0x1f8> <== NOT EXECUTED
8003858: f8 00 3d 00 calli 8012c58 <__errno> <== NOT EXECUTED
800385c: 28 2c 00 00 lw r12,(r1+0) <== NOT EXECUTED
close( iop - rtems_libio_iops );
8003860: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003864: 38 21 57 ec ori r1,r1,0x57ec <== NOT EXECUTED
8003868: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
800386c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
8003870: c9 61 08 00 sub r1,r11,r1 <== NOT EXECUTED
8003874: fb ff f5 26 calli 8000d0c <__ashrsi3> <== NOT EXECUTED
8003878: 78 02 38 e3 mvhi r2,0x38e3 <== NOT EXECUTED
800387c: 38 42 8e 39 ori r2,r2,0x8e39 <== NOT EXECUTED
8003880: f8 00 78 be calli 8021b78 <__mulsi3> <== NOT EXECUTED
8003884: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED
8003888: f8 00 25 bd calli 800cf7c <close> <== NOT EXECUTED
800388c: b9 60 68 00 mv r13,r11 <== NOT EXECUTED
*/
done:
va_end(ap);
if ( rc ) {
8003890: 45 80 00 0f be r12,r0,80038cc <open+0x264> <== NEVER TAKEN
if ( iop )
8003894: 45 60 00 03 be r11,r0,80038a0 <open+0x238> <== NEVER TAKEN
rtems_libio_free( iop );
8003898: b9 60 08 00 mv r1,r11
800389c: f8 00 26 ae calli 800d354 <rtems_libio_free>
if ( loc_to_free )
80038a0: 45 a0 00 07 be r13,r0,80038bc <open+0x254>
rtems_filesystem_freenode( loc_to_free );
80038a4: 29 a1 00 0c lw r1,(r13+12)
80038a8: 44 20 00 05 be r1,r0,80038bc <open+0x254> <== NEVER TAKEN
80038ac: 28 22 00 1c lw r2,(r1+28)
80038b0: 44 40 00 03 be r2,r0,80038bc <open+0x254> <== NEVER TAKEN
80038b4: b9 a0 08 00 mv r1,r13
80038b8: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( rc );
80038bc: f8 00 3c e7 calli 8012c58 <__errno>
80038c0: 58 2c 00 00 sw (r1+0),r12
80038c4: 34 01 ff ff mvi r1,-1
80038c8: e0 00 00 0a bi 80038f0 <open+0x288>
}
return iop - rtems_libio_iops;
80038cc: 78 01 08 02 mvhi r1,0x802
80038d0: 38 21 57 ec ori r1,r1,0x57ec
80038d4: 28 21 00 00 lw r1,(r1+0)
80038d8: 34 02 00 03 mvi r2,3
80038dc: c9 61 08 00 sub r1,r11,r1
80038e0: fb ff f5 0b calli 8000d0c <__ashrsi3>
80038e4: 78 02 38 e3 mvhi r2,0x38e3
80038e8: 38 42 8e 39 ori r2,r2,0x8e39
80038ec: f8 00 78 a3 calli 8021b78 <__mulsi3>
}
80038f0: 2b 9d 00 04 lw ra,(sp+4)
80038f4: 2b 8b 00 24 lw r11,(sp+36)
80038f8: 2b 8c 00 20 lw r12,(sp+32)
80038fc: 2b 8d 00 1c lw r13,(sp+28)
8003900: 2b 8e 00 18 lw r14,(sp+24)
8003904: 2b 8f 00 14 lw r15,(sp+20)
8003908: 2b 90 00 10 lw r16,(sp+16)
800390c: 2b 91 00 0c lw r17,(sp+12)
8003910: 2b 92 00 08 lw r18,(sp+8)
8003914: 37 9c 00 54 addi sp,sp,84
8003918: 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;
800391c: 37 8d 00 28 addi r13,sp,40 <== NOT EXECUTED
8003920: 34 0c 00 86 mvi r12,134 <== NOT EXECUTED
8003924: e3 ff ff dc bi 8003894 <open+0x22c> <== NOT EXECUTED
080035e8 <open_dev_console>:
/*
* This is a replaceable stub which opens the console, if present.
*/
void open_dev_console(void)
{
80035e8: 37 9c ff f8 addi sp,sp,-8
80035ec: 5b 8b 00 08 sw (sp+8),r11
80035f0: 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) {
80035f4: 34 02 00 00 mvi r2,0
80035f8: 78 01 08 02 mvhi r1,0x802
80035fc: 38 21 2c a0 ori r1,r1,0x2ca0
8003600: b8 40 18 00 mv r3,r2
8003604: f8 00 00 19 calli 8003668 <open>
8003608: 34 0b ff ff mvi r11,-1
800360c: 44 2b 00 13 be r1,r11,8003658 <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)
8003610: 78 01 08 02 mvhi r1,0x802
8003614: 38 21 2c a0 ori r1,r1,0x2ca0
8003618: 34 02 00 01 mvi r2,1
800361c: 34 03 00 00 mvi r3,0
8003620: f8 00 00 12 calli 8003668 <open>
8003624: 5c 2b 00 04 bne r1,r11,8003634 <open_dev_console+0x4c> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
8003628: 78 01 55 54 mvhi r1,0x5554 <== NOT EXECUTED
800362c: 38 21 44 31 ori r1,r1,0x4431 <== NOT EXECUTED
8003630: e0 00 00 09 bi 8003654 <open_dev_console+0x6c> <== NOT EXECUTED
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
8003634: 78 01 08 02 mvhi r1,0x802
8003638: 38 21 2c a0 ori r1,r1,0x2ca0
800363c: 34 02 00 01 mvi r2,1
8003640: 34 03 00 00 mvi r3,0
8003644: f8 00 00 09 calli 8003668 <open>
8003648: 5c 2b 00 04 bne r1,r11,8003658 <open_dev_console+0x70> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
800364c: 78 01 55 54 mvhi r1,0x5554 <== NOT EXECUTED
8003650: 38 21 44 32 ori r1,r1,0x4432 <== NOT EXECUTED
8003654: f8 00 04 69 calli 80047f8 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
8003658: 2b 9d 00 04 lw ra,(sp+4)
800365c: 2b 8b 00 08 lw r11,(sp+8)
8003660: 37 9c 00 08 addi sp,sp,8
8003664: c3 a0 00 00 ret
08004090 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
8004090: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED
8004094: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
8004098: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
800409c: b8 40 58 00 mv r11,r2 <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
80040a0: 28 42 00 34 lw r2,(r2+52) <== NOT EXECUTED
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
80040a4: 33 81 00 0c sb (sp+12),r1 <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
80040a8: 20 41 00 01 andi r1,r2,0x1 <== NOT EXECUTED
80040ac: 44 20 00 51 be r1,r0,80041f0 <oproc+0x160> <== NOT EXECUTED
switch (c) {
80040b0: 43 81 00 0c lbu r1,(sp+12) <== NOT EXECUTED
80040b4: 34 03 00 09 mvi r3,9 <== NOT EXECUTED
80040b8: 44 23 00 23 be r1,r3,8004144 <oproc+0xb4> <== NOT EXECUTED
80040bc: 54 23 00 04 bgu r1,r3,80040cc <oproc+0x3c> <== NOT EXECUTED
80040c0: 34 03 00 08 mvi r3,8 <== NOT EXECUTED
80040c4: 5c 23 00 33 bne r1,r3,8004190 <oproc+0x100> <== NOT EXECUTED
80040c8: e0 00 00 2e bi 8004180 <oproc+0xf0> <== NOT EXECUTED
80040cc: 34 03 00 0a mvi r3,10 <== NOT EXECUTED
80040d0: 44 23 00 04 be r1,r3,80040e0 <oproc+0x50> <== NOT EXECUTED
80040d4: 34 03 00 0d mvi r3,13 <== NOT EXECUTED
80040d8: 5c 23 00 2e bne r1,r3,8004190 <oproc+0x100> <== NOT EXECUTED
80040dc: e0 00 00 0e bi 8004114 <oproc+0x84> <== NOT EXECUTED
case '\n':
if (tty->termios.c_oflag & ONLRET)
80040e0: 20 42 00 20 andi r2,r2,0x20 <== NOT EXECUTED
80040e4: 44 40 00 03 be r2,r0,80040f0 <oproc+0x60> <== NOT EXECUTED
tty->column = 0;
80040e8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
80040ec: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
80040f0: 29 61 00 34 lw r1,(r11+52) <== NOT EXECUTED
80040f4: 20 21 00 04 andi r1,r1,0x4 <== NOT EXECUTED
80040f8: 44 20 00 3e be r1,r0,80041f0 <oproc+0x160> <== NOT EXECUTED
rtems_termios_puts ("\r", 1, tty);
80040fc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8004100: 38 21 2a 04 ori r1,r1,0x2a04 <== NOT EXECUTED
8004104: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8004108: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
800410c: fb ff ff 8b calli 8003f38 <rtems_termios_puts> <== NOT EXECUTED
8004110: e0 00 00 0b bi 800413c <oproc+0xac> <== NOT EXECUTED
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
8004114: 20 41 00 10 andi r1,r2,0x10 <== NOT EXECUTED
8004118: 44 20 00 03 be r1,r0,8004124 <oproc+0x94> <== NOT EXECUTED
800411c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8004120: 44 20 00 38 be r1,r0,8004200 <oproc+0x170> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
8004124: 20 41 00 08 andi r1,r2,0x8 <== NOT EXECUTED
8004128: 44 20 00 31 be r1,r0,80041ec <oproc+0x15c> <== NOT EXECUTED
c = '\n';
800412c: 34 01 00 0a mvi r1,10 <== NOT EXECUTED
8004130: 33 81 00 0c sb (sp+12),r1 <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
8004134: 20 42 00 20 andi r2,r2,0x20 <== NOT EXECUTED
8004138: 44 40 00 2e be r2,r0,80041f0 <oproc+0x160> <== NOT EXECUTED
tty->column = 0;
800413c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8004140: e0 00 00 2b bi 80041ec <oproc+0x15c> <== NOT EXECUTED
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
8004144: 29 63 00 28 lw r3,(r11+40) <== NOT EXECUTED
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
8004148: 20 44 18 00 andi r4,r2,0x1800 <== NOT EXECUTED
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
800414c: 34 02 00 08 mvi r2,8 <== NOT EXECUTED
8004150: 20 61 00 07 andi r1,r3,0x7 <== NOT EXECUTED
8004154: c8 41 10 00 sub r2,r2,r1 <== NOT EXECUTED
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
8004158: 34 01 18 00 mvi r1,6144 <== NOT EXECUTED
800415c: b4 43 18 00 add r3,r2,r3 <== NOT EXECUTED
8004160: 5c 81 00 06 bne r4,r1,8004178 <oproc+0xe8> <== NOT EXECUTED
tty->column += i;
rtems_termios_puts ( " ", i, tty);
8004164: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
8004168: 59 63 00 28 sw (r11+40),r3 <== NOT EXECUTED
rtems_termios_puts ( " ", i, tty);
800416c: 38 21 2a 08 ori r1,r1,0x2a08 <== NOT EXECUTED
8004170: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
8004174: e0 00 00 22 bi 80041fc <oproc+0x16c> <== NOT EXECUTED
return;
}
tty->column += i;
8004178: 59 63 00 28 sw (r11+40),r3 <== NOT EXECUTED
break;
800417c: e0 00 00 1d bi 80041f0 <oproc+0x160> <== NOT EXECUTED
case '\b':
if (tty->column > 0)
8004180: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8004184: 4c 01 00 1b bge r0,r1,80041f0 <oproc+0x160> <== NOT EXECUTED
tty->column--;
8004188: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
800418c: e0 00 00 18 bi 80041ec <oproc+0x15c> <== NOT EXECUTED
break;
default:
if (tty->termios.c_oflag & OLCUC)
8004190: 20 42 00 02 andi r2,r2,0x2 <== NOT EXECUTED
8004194: 44 40 00 0c be r2,r0,80041c4 <oproc+0x134> <== NOT EXECUTED
c = toupper(c);
8004198: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
800419c: 38 42 53 0c ori r2,r2,0x530c <== NOT EXECUTED
80041a0: 28 43 00 00 lw r3,(r2+0) <== NOT EXECUTED
80041a4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
80041a8: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED
80041ac: 40 23 00 01 lbu r3,(r1+1) <== NOT EXECUTED
80041b0: 34 01 00 02 mvi r1,2 <== NOT EXECUTED
80041b4: 20 63 00 03 andi r3,r3,0x3 <== NOT EXECUTED
80041b8: 5c 61 00 02 bne r3,r1,80041c0 <oproc+0x130> <== NOT EXECUTED
80041bc: 34 42 ff e0 addi r2,r2,-32 <== NOT EXECUTED
80041c0: 33 82 00 0c sb (sp+12),r2 <== NOT EXECUTED
if (!iscntrl(c))
80041c4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80041c8: 38 21 53 0c ori r1,r1,0x530c <== NOT EXECUTED
80041cc: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED
80041d0: 43 81 00 0c lbu r1,(sp+12) <== NOT EXECUTED
80041d4: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED
80041d8: 40 21 00 01 lbu r1,(r1+1) <== NOT EXECUTED
80041dc: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED
80041e0: 5c 20 00 04 bne r1,r0,80041f0 <oproc+0x160> <== NOT EXECUTED
tty->column++;
80041e4: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
80041e8: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED
80041ec: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
break;
}
}
rtems_termios_puts (&c, 1, tty);
80041f0: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
80041f4: 37 81 00 0c addi r1,sp,12 <== NOT EXECUTED
80041f8: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
80041fc: fb ff ff 4f calli 8003f38 <rtems_termios_puts> <== NOT EXECUTED
}
8004200: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8004204: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8004208: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
800420c: c3 a0 00 00 ret <== NOT EXECUTED
08011320 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
8011320: 37 9c ff cc addi sp,sp,-52
8011324: 5b 8b 00 10 sw (sp+16),r11
8011328: 5b 8c 00 0c sw (sp+12),r12
801132c: 5b 8d 00 08 sw (sp+8),r13
8011330: 5b 9d 00 04 sw (sp+4),ra
8011334: 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)
8011338: 37 8b 00 14 addi r11,sp,20
801133c: 78 01 08 02 mvhi r1,0x802
8011340: 38 21 36 78 ori r1,r1,0x3678
8011344: 34 02 00 03 mvi r2,3
8011348: 34 03 00 07 mvi r3,7
801134c: b9 60 20 00 mv r4,r11
8011350: 34 05 00 01 mvi r5,1
8011354: fb ff c5 72 calli 800291c <rtems_filesystem_evaluate_path>
8011358: 44 20 00 0b be r1,r0,8011384 <pipe_create+0x64> <== NEVER TAKEN
!= 0) {
if (errno != ENOENT)
801135c: f8 00 06 3f calli 8012c58 <__errno>
8011360: 28 22 00 00 lw r2,(r1+0)
8011364: 34 01 00 02 mvi r1,2
8011368: 5c 41 00 50 bne r2,r1,80114a8 <pipe_create+0x188> <== NEVER TAKEN
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
801136c: 78 01 08 02 mvhi r1,0x802
8011370: 38 21 36 78 ori r1,r1,0x3678
8011374: 34 02 03 ff mvi r2,1023
8011378: fb ff c6 df calli 8002ef4 <mkdir>
801137c: 44 20 00 08 be r1,r0,801139c <pipe_create+0x7c> <== ALWAYS TAKEN
8011380: e0 00 00 4a bi 80114a8 <pipe_create+0x188> <== NOT EXECUTED
return -1;
}
else
rtems_filesystem_freenode(&loc);
8011384: 2b 82 00 20 lw r2,(sp+32) <== NOT EXECUTED
8011388: 44 41 00 05 be r2,r1,801139c <pipe_create+0x7c> <== NOT EXECUTED
801138c: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED
8011390: 44 40 00 03 be r2,r0,801139c <pipe_create+0x7c> <== NOT EXECUTED
8011394: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8011398: d8 40 00 00 call r2 <== NOT EXECUTED
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
801139c: 37 8b 00 28 addi r11,sp,40
80113a0: 78 02 08 02 mvhi r2,0x802
80113a4: 38 42 36 80 ori r2,r2,0x3680
80113a8: 34 03 00 0a mvi r3,10
80113ac: b9 60 08 00 mv r1,r11
80113b0: f8 00 08 d0 calli 80136f0 <memcpy>
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
80113b4: 78 04 08 02 mvhi r4,0x802
80113b8: 38 84 57 80 ori r4,r4,0x5780
80113bc: 2c 81 00 00 lhu r1,(r4+0)
80113c0: 78 02 08 02 mvhi r2,0x802
80113c4: 38 42 36 8c ori r2,r2,0x368c
80113c8: 34 25 00 01 addi r5,r1,1
80113cc: b8 20 18 00 mv r3,r1
80113d0: 0c 85 00 00 sh (r4+0),r5
80113d4: 37 81 00 32 addi r1,sp,50
80113d8: f8 00 09 84 calli 80139e8 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
80113dc: b9 60 08 00 mv r1,r11
80113e0: 34 02 01 80 mvi r2,384
80113e4: f8 00 01 e3 calli 8011b70 <mkfifo>
80113e8: b8 20 60 00 mv r12,r1
80113ec: 44 20 00 03 be r1,r0,80113f8 <pipe_create+0xd8> <== ALWAYS TAKEN
if (errno != EEXIST){
80113f0: f8 00 06 1a calli 8012c58 <__errno> <== NOT EXECUTED
80113f4: e0 00 00 2d bi 80114a8 <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);
80113f8: b9 60 08 00 mv r1,r11
80113fc: 34 02 40 00 mvi r2,16384
8011400: fb ff c8 9a calli 8003668 <open>
8011404: 59 a1 00 00 sw (r13+0),r1
if (filsdes[0] < 0) {
8011408: 4c 2c 00 05 bge r1,r12,801141c <pipe_create+0xfc> <== NEVER TAKEN
err = errno;
801140c: f8 00 06 13 calli 8012c58 <__errno>
8011410: 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);
8011414: b9 60 08 00 mv r1,r11
8011418: e0 00 00 21 bi 801149c <pipe_create+0x17c>
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
801141c: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8011420: 38 42 50 10 ori r2,r2,0x5010 <== NOT EXECUTED
8011424: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED
8011428: 54 41 00 03 bgu r2,r1,8011434 <pipe_create+0x114> <== NOT EXECUTED
801142c: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
8011430: e0 00 00 0b bi 801145c <pipe_create+0x13c> <== NOT EXECUTED
8011434: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
8011438: fb ff bd e5 calli 8000bcc <__ashlsi3> <== NOT EXECUTED
801143c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
8011440: 78 0b 08 02 mvhi r11,0x802 <== NOT EXECUTED
8011444: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
8011448: 39 6b 57 ec ori r11,r11,0x57ec <== NOT EXECUTED
801144c: fb ff bd e0 calli 8000bcc <__ashlsi3> <== NOT EXECUTED
8011450: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED
8011454: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED
8011458: b4 41 10 00 add r2,r2,r1 <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
801145c: 28 44 00 18 lw r4,(r2+24) <== NOT EXECUTED
8011460: 34 03 ff fe mvi r3,-2 <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
8011464: 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;
8011468: a0 83 18 00 and r3,r4,r3 <== NOT EXECUTED
801146c: 58 43 00 18 sw (r2+24),r3 <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
8011470: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8011474: fb ff c8 7d calli 8003668 <open> <== NOT EXECUTED
8011478: 59 a1 00 04 sw (r13+4),r1 <== NOT EXECUTED
if (filsdes[1] < 0) {
801147c: 48 01 00 03 bg r0,r1,8011488 <pipe_create+0x168> <== NOT EXECUTED
8011480: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
8011484: e0 00 00 05 bi 8011498 <pipe_create+0x178> <== NOT EXECUTED
err = errno;
8011488: f8 00 05 f4 calli 8012c58 <__errno> <== NOT EXECUTED
801148c: 28 2c 00 00 lw r12,(r1+0) <== NOT EXECUTED
close(filsdes[0]);
8011490: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED
8011494: fb ff ee ba calli 800cf7c <close> <== NOT EXECUTED
}
unlink(fifopath);
8011498: 37 81 00 28 addi r1,sp,40 <== NOT EXECUTED
801149c: fb ff c9 8f calli 8003ad8 <unlink>
}
rtems_set_errno_and_return_minus_one(err);
80114a0: f8 00 05 ee calli 8012c58 <__errno>
80114a4: 58 2c 00 00 sw (r1+0),r12
}
80114a8: 34 01 ff ff mvi r1,-1
80114ac: 2b 9d 00 04 lw ra,(sp+4)
80114b0: 2b 8b 00 10 lw r11,(sp+16)
80114b4: 2b 8c 00 0c lw r12,(sp+12)
80114b8: 2b 8d 00 08 lw r13,(sp+8)
80114bc: 37 9c 00 34 addi sp,sp,52
80114c0: c3 a0 00 00 ret
0800b790 <pipe_free>:
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
800b790: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
800b794: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
800b798: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
800b79c: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
rtems_barrier_delete(pipe->readBarrier);
800b7a0: 28 21 00 2c lw r1,(r1+44) <== NOT EXECUTED
800b7a4: f8 00 09 ea calli 800df4c <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
800b7a8: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
800b7ac: f8 00 09 e8 calli 800df4c <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
800b7b0: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800b7b4: fb ff e2 b2 calli 800427c <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
800b7b8: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
800b7bc: fb ff dc 95 calli 8002a10 <free> <== NOT EXECUTED
free(pipe);
800b7c0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800b7c4: fb ff dc 93 calli 8002a10 <free> <== NOT EXECUTED
}
800b7c8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800b7cc: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
800b7d0: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
800b7d4: c3 a0 00 00 ret <== NOT EXECUTED
0800b384 <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
800b384: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED
800b388: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED
800b38c: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED
800b390: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED
800b394: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
if (cmd == FIONREAD) {
800b398: 78 05 40 04 mvhi r5,0x4004 <== NOT EXECUTED
800b39c: 38 a5 66 7f ori r5,r5,0x667f <== NOT EXECUTED
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
800b3a0: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
800b3a4: b8 60 68 00 mv r13,r3 <== NOT EXECUTED
if (cmd == FIONREAD) {
800b3a8: 34 04 ff ea mvi r4,-22 <== NOT EXECUTED
800b3ac: 5c 45 00 0f bne r2,r5,800b3e8 <pipe_ioctl+0x64> <== NOT EXECUTED
if (buffer == NULL)
800b3b0: 34 04 ff f2 mvi r4,-14 <== NOT EXECUTED
800b3b4: 44 60 00 0d be r3,r0,800b3e8 <pipe_ioctl+0x64> <== NOT EXECUTED
return -EFAULT;
if (! PIPE_LOCK(pipe))
800b3b8: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED
800b3bc: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800b3c0: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
800b3c4: fb ff e3 da calli 800432c <rtems_semaphore_obtain> <== NOT EXECUTED
800b3c8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
800b3cc: 34 04 ff fc mvi r4,-4 <== NOT EXECUTED
800b3d0: 5c 20 00 06 bne r1,r0,800b3e8 <pipe_ioctl+0x64> <== NOT EXECUTED
return -EINTR;
/* Return length of pipe */
*(uint *)buffer = pipe->Length;
800b3d4: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED
800b3d8: 59 a1 00 00 sw (r13+0),r1 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
800b3dc: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800b3e0: fb ff e4 23 calli 800446c <rtems_semaphore_release> <== NOT EXECUTED
800b3e4: b9 80 20 00 mv r4,r12 <== NOT EXECUTED
return 0;
}
return -EINVAL;
}
800b3e8: b8 80 08 00 mv r1,r4 <== NOT EXECUTED
800b3ec: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800b3f0: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
800b3f4: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
800b3f8: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
800b3fc: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
800b400: c3 a0 00 00 ret <== NOT EXECUTED
0800b310 <pipe_lseek>:
rtems_libio_t *iop
)
{
/* Seek on pipe is not supported */
return -ESPIPE;
}
800b310: 34 01 ff e3 mvi r1,-29 <== NOT EXECUTED
800b314: c3 a0 00 00 ret <== NOT EXECUTED
0800b404 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
800b404: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED
800b408: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED
800b40c: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED
800b410: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED
800b414: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED
800b418: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED
800b41c: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED
800b420: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED
800b424: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
800b428: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
800b42c: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
800b430: b8 40 88 00 mv r17,r2 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
800b434: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
800b438: b8 60 80 00 mv r16,r3 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
800b43c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
800b440: b8 80 78 00 mv r15,r4 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
800b444: fb ff e3 ba calli 800432c <rtems_semaphore_obtain> <== NOT EXECUTED
800b448: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
800b44c: 44 20 00 46 be r1,r0,800b564 <pipe_read+0x160> <== NOT EXECUTED
800b450: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED
800b454: e0 00 00 4a bi 800b57c <pipe_read+0x178> <== NOT EXECUTED
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
800b458: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
800b45c: 44 2d 00 43 be r1,r13,800b568 <pipe_read+0x164> <== NOT EXECUTED
goto out_locked;
if (LIBIO_NODELAY(iop)) {
800b460: 29 ee 00 18 lw r14,(r15+24) <== NOT EXECUTED
800b464: 21 ce 00 01 andi r14,r14,0x1 <== NOT EXECUTED
800b468: 45 c0 00 03 be r14,r0,800b474 <pipe_read+0x70> <== NOT EXECUTED
800b46c: 34 0d ff f5 mvi r13,-11 <== NOT EXECUTED
800b470: e0 00 00 3f bi 800b56c <pipe_read+0x168> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
800b474: 29 62 00 18 lw r2,(r11+24) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
800b478: 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 ++;
800b47c: 34 42 00 01 addi r2,r2,1 <== NOT EXECUTED
800b480: 59 62 00 18 sw (r11+24),r2 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
800b484: fb ff e3 fa calli 800446c <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
800b488: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED
800b48c: b9 c0 10 00 mv r2,r14 <== NOT EXECUTED
800b490: f8 00 0a fe calli 800e088 <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
800b494: 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))
800b498: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
800b49c: 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))
800b4a0: 44 2e 00 02 be r1,r14,800b4a8 <pipe_read+0xa4> <== NOT EXECUTED
800b4a4: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
800b4a8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800b4ac: fb ff e3 a0 calli 800432c <rtems_semaphore_obtain> <== NOT EXECUTED
800b4b0: 44 20 00 03 be r1,r0,800b4bc <pipe_read+0xb8> <== NOT EXECUTED
800b4b4: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED
800b4b8: e0 00 00 2f bi 800b574 <pipe_read+0x170> <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
800b4bc: 29 62 00 18 lw r2,(r11+24) <== NOT EXECUTED
800b4c0: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED
800b4c4: 59 62 00 18 sw (r11+24),r2 <== NOT EXECUTED
if (ret != 0)
800b4c8: 5d a1 00 29 bne r13,r1,800b56c <pipe_read+0x168> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
800b4cc: 29 6d 00 0c lw r13,(r11+12) <== NOT EXECUTED
800b4d0: 45 a0 ff e2 be r13,r0,800b458 <pipe_read+0x54> <== NOT EXECUTED
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
800b4d4: ca 0c 08 00 sub r1,r16,r12 <== NOT EXECUTED
800b4d8: 50 2d 00 02 bgeu r1,r13,800b4e0 <pipe_read+0xdc> <== NOT EXECUTED
800b4dc: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
chunk1 = pipe->Size - pipe->Start;
800b4e0: 29 65 00 08 lw r5,(r11+8) <== NOT EXECUTED
800b4e4: 29 6e 00 04 lw r14,(r11+4) <== NOT EXECUTED
800b4e8: 29 66 00 00 lw r6,(r11+0) <== NOT EXECUTED
800b4ec: b6 2c 08 00 add r1,r17,r12 <== NOT EXECUTED
800b4f0: 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);
800b4f4: b4 c5 10 00 add r2,r6,r5 <== NOT EXECUTED
800b4f8: 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) {
800b4fc: 4d cd 00 08 bge r14,r13,800b51c <pipe_read+0x118> <== NOT EXECUTED
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
800b500: b4 c5 10 00 add r2,r6,r5 <== NOT EXECUTED
800b504: b9 c0 18 00 mv r3,r14 <== NOT EXECUTED
800b508: f8 00 20 7a calli 80136f0 <memcpy> <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
800b50c: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED
800b510: b5 8e 08 00 add r1,r12,r14 <== NOT EXECUTED
800b514: b6 21 08 00 add r1,r17,r1 <== NOT EXECUTED
800b518: c9 ae 18 00 sub r3,r13,r14 <== NOT EXECUTED
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
800b51c: f8 00 20 75 calli 80136f0 <memcpy> <== NOT EXECUTED
pipe->Start += chunk;
800b520: 29 61 00 08 lw r1,(r11+8) <== NOT EXECUTED
pipe->Start %= pipe->Size;
800b524: 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;
800b528: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED
800b52c: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED
pipe->Start %= pipe->Size;
800b530: f8 00 5a 21 calli 8021db4 <__umodsi3> <== NOT EXECUTED
pipe->Length -= chunk;
800b534: 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;
800b538: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED
pipe->Length -= chunk;
800b53c: c8 4d 08 00 sub r1,r2,r13 <== NOT EXECUTED
800b540: 59 61 00 0c sw (r11+12),r1 <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
800b544: 5c 20 00 02 bne r1,r0,800b54c <pipe_read+0x148> <== NOT EXECUTED
pipe->Start = 0;
800b548: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED
if (pipe->waitingWriters > 0)
800b54c: 29 61 00 1c lw r1,(r11+28) <== NOT EXECUTED
800b550: 44 20 00 04 be r1,r0,800b560 <pipe_read+0x15c> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
800b554: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
800b558: 37 82 00 24 addi r2,sp,36 <== NOT EXECUTED
800b55c: f8 00 0a ac calli 800e00c <rtems_barrier_release> <== NOT EXECUTED
read += chunk;
800b560: 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) {
800b564: 56 0c ff da bgu r16,r12,800b4cc <pipe_read+0xc8> <== NOT EXECUTED
800b568: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
800b56c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800b570: fb ff e3 bf calli 800446c <rtems_semaphore_release> <== NOT EXECUTED
out_nolock:
if (read > 0)
800b574: 49 80 00 02 bg r12,r0,800b57c <pipe_read+0x178> <== NOT EXECUTED
800b578: b9 a0 60 00 mv r12,r13 <== NOT EXECUTED
return read;
return ret;
}
800b57c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
800b580: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800b584: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED
800b588: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED
800b58c: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED
800b590: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED
800b594: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED
800b598: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED
800b59c: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED
800b5a0: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED
800b5a4: c3 a0 00 00 ret <== NOT EXECUTED
0800b7d8 <pipe_release>:
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
800b7d8: 37 9c ff e8 addi sp,sp,-24 <== NOT EXECUTED
800b7dc: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED
800b7e0: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED
800b7e4: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED
800b7e8: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED
800b7ec: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
800b7f0: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
800b7f4: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
800b7f8: 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,
800b7fc: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800b800: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800b804: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
800b808: fb ff e2 c9 calli 800432c <rtems_semaphore_obtain> <== NOT EXECUTED
800b80c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not released! */
if(sc != RTEMS_SUCCESSFUL)
800b810: 5c 20 00 15 bne r1,r0,800b864 <pipe_release+0x8c> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
mode = LIBIO_ACCMODE(iop);
800b814: 29 8c 00 18 lw r12,(r12+24) <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
800b818: 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);
800b81c: 21 8c 00 06 andi r12,r12,0x6 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
800b820: 44 23 00 04 be r1,r3,800b830 <pipe_release+0x58> <== NOT EXECUTED
pipe->Readers --;
800b824: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
800b828: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
800b82c: 59 61 00 10 sw (r11+16),r1 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_WRITE)
800b830: 21 81 00 04 andi r1,r12,0x4 <== NOT EXECUTED
800b834: 44 20 00 04 be r1,r0,800b844 <pipe_release+0x6c> <== NOT EXECUTED
pipe->Writers --;
800b838: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
800b83c: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
800b840: 59 61 00 14 sw (r11+20),r1 <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
800b844: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
800b848: 38 42 57 78 ori r2,r2,0x5778 <== NOT EXECUTED
800b84c: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED
800b850: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800b854: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
800b858: fb ff e2 b5 calli 800432c <rtems_semaphore_obtain> <== NOT EXECUTED
800b85c: 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)
800b860: 44 20 00 02 be r1,r0,800b868 <pipe_release+0x90> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
800b864: fb ff e3 e5 calli 80047f8 <rtems_fatal_error_occurred> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
800b868: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800b86c: fb ff e3 00 calli 800446c <rtems_semaphore_release> <== NOT EXECUTED
if (pipe->Readers == 0 && pipe->Writers == 0) {
800b870: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED
800b874: 5c 4e 00 07 bne r2,r14,800b890 <pipe_release+0xb8> <== NOT EXECUTED
800b878: 29 6e 00 14 lw r14,(r11+20) <== NOT EXECUTED
800b87c: 5d c2 00 05 bne r14,r2,800b890 <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);
800b880: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800b884: fb ff ff c3 calli 800b790 <pipe_free> <== NOT EXECUTED
*pipep = NULL;
800b888: 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) {
800b88c: e0 00 00 0f bi 800b8c8 <pipe_release+0xf0> <== NOT EXECUTED
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
800b890: 64 42 00 00 cmpei r2,r2,0 <== NOT EXECUTED
800b894: 7d 81 00 04 cmpnei r1,r12,4 <== NOT EXECUTED
800b898: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED
800b89c: 44 40 00 03 be r2,r0,800b8a8 <pipe_release+0xd0> <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
800b8a0: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
800b8a4: e0 00 00 07 bi 800b8c0 <pipe_release+0xe8> <== NOT EXECUTED
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
800b8a8: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
800b8ac: 7d 8c 00 02 cmpnei r12,r12,2 <== NOT EXECUTED
800b8b0: 64 21 00 00 cmpei r1,r1,0 <== NOT EXECUTED
800b8b4: a1 81 60 00 and r12,r12,r1 <== NOT EXECUTED
800b8b8: 45 82 00 04 be r12,r2,800b8c8 <pipe_release+0xf0> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
800b8bc: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED
800b8c0: 37 82 00 18 addi r2,sp,24 <== NOT EXECUTED
800b8c4: f8 00 09 d2 calli 800e00c <rtems_barrier_release> <== NOT EXECUTED
rtems_semaphore_release(rtems_pipe_semaphore);
800b8c8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800b8cc: 38 21 57 78 ori r1,r1,0x5778 <== NOT EXECUTED
800b8d0: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
800b8d4: fb ff e2 e6 calli 800446c <rtems_semaphore_release> <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
800b8d8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
800b8dc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800b8e0: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED
800b8e4: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED
800b8e8: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED
800b8ec: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED
800b8f0: 37 9c 00 18 addi sp,sp,24 <== NOT EXECUTED
800b8f4: c3 a0 00 00 ret <== NOT EXECUTED
0800b5a8 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
800b5a8: 37 9c ff d8 addi sp,sp,-40 <== NOT EXECUTED
800b5ac: 5b 8b 00 24 sw (sp+36),r11 <== NOT EXECUTED
800b5b0: 5b 8c 00 20 sw (sp+32),r12 <== NOT EXECUTED
800b5b4: 5b 8d 00 1c sw (sp+28),r13 <== NOT EXECUTED
800b5b8: 5b 8e 00 18 sw (sp+24),r14 <== NOT EXECUTED
800b5bc: 5b 8f 00 14 sw (sp+20),r15 <== NOT EXECUTED
800b5c0: 5b 90 00 10 sw (sp+16),r16 <== NOT EXECUTED
800b5c4: 5b 91 00 0c sw (sp+12),r17 <== NOT EXECUTED
800b5c8: 5b 92 00 08 sw (sp+8),r18 <== NOT EXECUTED
800b5cc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
800b5d0: b8 60 70 00 mv r14,r3 <== NOT EXECUTED
800b5d4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
800b5d8: b8 40 88 00 mv r17,r2 <== NOT EXECUTED
800b5dc: b8 80 90 00 mv r18,r4 <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
800b5e0: b8 60 60 00 mv r12,r3 <== NOT EXECUTED
800b5e4: 44 60 00 5f be r3,r0,800b760 <pipe_write+0x1b8> <== NOT EXECUTED
return 0;
if (! PIPE_LOCK(pipe))
800b5e8: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED
800b5ec: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800b5f0: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
800b5f4: fb ff e3 4e calli 800432c <rtems_semaphore_obtain> <== NOT EXECUTED
800b5f8: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED
800b5fc: 5c 20 00 59 bne r1,r0,800b760 <pipe_write+0x1b8> <== NOT EXECUTED
return -EINTR;
if (pipe->Readers == 0) {
800b600: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED
800b604: 34 0d ff e0 mvi r13,-32 <== NOT EXECUTED
800b608: b8 40 60 00 mv r12,r2 <== NOT EXECUTED
800b60c: 44 41 00 4c be r2,r1,800b73c <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;
800b610: 29 61 00 04 lw r1,(r11+4) <== NOT EXECUTED
800b614: b9 c0 80 00 mv r16,r14 <== NOT EXECUTED
800b618: 50 2e 00 02 bgeu r1,r14,800b620 <pipe_write+0x78> <== NOT EXECUTED
800b61c: 34 10 00 01 mvi r16,1 <== NOT EXECUTED
800b620: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
800b624: e0 00 00 44 bi 800b734 <pipe_write+0x18c> <== NOT EXECUTED
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
800b628: 2a 4f 00 18 lw r15,(r18+24) <== NOT EXECUTED
800b62c: 21 ef 00 01 andi r15,r15,0x1 <== NOT EXECUTED
800b630: 45 e0 00 03 be r15,r0,800b63c <pipe_write+0x94> <== NOT EXECUTED
800b634: 34 0d ff f5 mvi r13,-11 <== NOT EXECUTED
800b638: e0 00 00 41 bi 800b73c <pipe_write+0x194> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
800b63c: 29 62 00 1c lw r2,(r11+28) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
800b640: 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 ++;
800b644: 34 42 00 01 addi r2,r2,1 <== NOT EXECUTED
800b648: 59 62 00 1c sw (r11+28),r2 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
800b64c: fb ff e3 88 calli 800446c <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
800b650: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
800b654: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED
800b658: f8 00 0a 8c calli 800e088 <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
800b65c: 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))
800b660: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
800b664: 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))
800b668: 44 2f 00 02 be r1,r15,800b670 <pipe_write+0xc8> <== NOT EXECUTED
800b66c: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
800b670: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800b674: fb ff e3 2e calli 800432c <rtems_semaphore_obtain> <== NOT EXECUTED
800b678: 44 20 00 03 be r1,r0,800b684 <pipe_write+0xdc> <== NOT EXECUTED
800b67c: 34 0d ff fc mvi r13,-4 <== NOT EXECUTED
800b680: e0 00 00 36 bi 800b758 <pipe_write+0x1b0> <== NOT EXECUTED
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
800b684: 29 62 00 1c lw r2,(r11+28) <== NOT EXECUTED
800b688: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED
800b68c: 59 62 00 1c sw (r11+28),r2 <== NOT EXECUTED
if (ret != 0)
800b690: 5d a1 00 2b bne r13,r1,800b73c <pipe_write+0x194> <== NOT EXECUTED
goto out_locked;
if (pipe->Readers == 0) {
800b694: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
800b698: 5c 2d 00 03 bne r1,r13,800b6a4 <pipe_write+0xfc> <== NOT EXECUTED
800b69c: 34 0d ff e0 mvi r13,-32 <== NOT EXECUTED
800b6a0: e0 00 00 27 bi 800b73c <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) {
800b6a4: 29 6f 00 04 lw r15,(r11+4) <== NOT EXECUTED
800b6a8: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED
800b6ac: c9 e1 68 00 sub r13,r15,r1 <== NOT EXECUTED
800b6b0: 56 0d ff de bgu r16,r13,800b628 <pipe_write+0x80> <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
800b6b4: c9 cc 10 00 sub r2,r14,r12 <== NOT EXECUTED
800b6b8: 50 4d 00 02 bgeu r2,r13,800b6c0 <pipe_write+0x118> <== NOT EXECUTED
800b6bc: b8 40 68 00 mv r13,r2 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
800b6c0: 29 63 00 08 lw r3,(r11+8) <== NOT EXECUTED
800b6c4: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED
800b6c8: b4 23 08 00 add r1,r1,r3 <== NOT EXECUTED
800b6cc: f8 00 59 ba calli 8021db4 <__umodsi3> <== NOT EXECUTED
800b6d0: c9 e1 78 00 sub r15,r15,r1 <== NOT EXECUTED
800b6d4: 29 63 00 00 lw r3,(r11+0) <== NOT EXECUTED
800b6d8: b6 2c 10 00 add r2,r17,r12 <== NOT EXECUTED
if (chunk > chunk1) {
800b6dc: 4d ed 00 09 bge r15,r13,800b700 <pipe_write+0x158> <== NOT EXECUTED
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
800b6e0: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED
800b6e4: b9 e0 18 00 mv r3,r15 <== NOT EXECUTED
800b6e8: f8 00 20 02 calli 80136f0 <memcpy> <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
800b6ec: b5 ec 10 00 add r2,r15,r12 <== NOT EXECUTED
800b6f0: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
800b6f4: b6 22 10 00 add r2,r17,r2 <== NOT EXECUTED
800b6f8: c9 af 18 00 sub r3,r13,r15 <== NOT EXECUTED
800b6fc: e0 00 00 03 bi 800b708 <pipe_write+0x160> <== NOT EXECUTED
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
800b700: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED
800b704: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED
800b708: f8 00 1f fa calli 80136f0 <memcpy> <== NOT EXECUTED
pipe->Length += chunk;
800b70c: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED
if (pipe->waitingReaders > 0)
800b710: 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;
800b714: b4 2d 08 00 add r1,r1,r13 <== NOT EXECUTED
800b718: 59 61 00 0c sw (r11+12),r1 <== NOT EXECUTED
if (pipe->waitingReaders > 0)
800b71c: 44 40 00 04 be r2,r0,800b72c <pipe_write+0x184> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
800b720: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED
800b724: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED
800b728: f8 00 0a 39 calli 800e00c <rtems_barrier_release> <== NOT EXECUTED
written += chunk;
800b72c: b5 8d 60 00 add r12,r12,r13 <== NOT EXECUTED
800b730: 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) {
800b734: 55 cc ff dc bgu r14,r12,800b6a4 <pipe_write+0xfc> <== NOT EXECUTED
800b738: 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);
800b73c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800b740: fb ff e3 4b calli 800446c <rtems_semaphore_release> <== NOT EXECUTED
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
800b744: 34 01 ff e0 mvi r1,-32 <== NOT EXECUTED
800b748: 5d a1 00 04 bne r13,r1,800b758 <pipe_write+0x1b0> <== NOT EXECUTED
kill(getpid(), SIGPIPE);
800b74c: f8 00 06 96 calli 800d1a4 <getpid> <== NOT EXECUTED
800b750: 34 02 00 0d mvi r2,13 <== NOT EXECUTED
800b754: f8 00 07 bb calli 800d640 <kill> <== NOT EXECUTED
#endif
if (written > 0)
800b758: 49 80 00 02 bg r12,r0,800b760 <pipe_write+0x1b8> <== NOT EXECUTED
800b75c: b9 a0 60 00 mv r12,r13 <== NOT EXECUTED
return written;
return ret;
}
800b760: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
800b764: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800b768: 2b 8b 00 24 lw r11,(sp+36) <== NOT EXECUTED
800b76c: 2b 8c 00 20 lw r12,(sp+32) <== NOT EXECUTED
800b770: 2b 8d 00 1c lw r13,(sp+28) <== NOT EXECUTED
800b774: 2b 8e 00 18 lw r14,(sp+24) <== NOT EXECUTED
800b778: 2b 8f 00 14 lw r15,(sp+20) <== NOT EXECUTED
800b77c: 2b 90 00 10 lw r16,(sp+16) <== NOT EXECUTED
800b780: 2b 91 00 0c lw r17,(sp+12) <== NOT EXECUTED
800b784: 2b 92 00 08 lw r18,(sp+8) <== NOT EXECUTED
800b788: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED
800b78c: c3 a0 00 00 ret <== NOT EXECUTED
08006fe8 <pthread_attr_getstackaddr>:
int pthread_attr_getstackaddr(
const pthread_attr_t *attr,
void **stackaddr
)
{
if ( !attr || !attr->is_initialized || !stackaddr )
8006fe8: 44 20 00 0a be r1,r0,8007010 <pthread_attr_getstackaddr+0x28><== NEVER TAKEN
8006fec: 28 23 00 00 lw r3,(r1+0)
8006ff0: 64 44 00 00 cmpei r4,r2,0
8006ff4: 64 63 00 00 cmpei r3,r3,0
8006ff8: b8 83 18 00 or r3,r4,r3
8006ffc: 5c 60 00 05 bne r3,r0,8007010 <pthread_attr_getstackaddr+0x28>
return EINVAL;
*stackaddr = attr->stackaddr;
8007000: 28 21 00 04 lw r1,(r1+4)
8007004: 58 41 00 00 sw (r2+0),r1
8007008: b8 60 08 00 mv r1,r3
return 0;
800700c: c3 a0 00 00 ret
8007010: 34 01 00 16 mvi r1,22
}
8007014: c3 a0 00 00 ret
08007124 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
8007124: 44 20 00 0d be r1,r0,8007158 <pthread_attr_setschedpolicy+0x34>
8007128: 28 23 00 00 lw r3,(r1+0)
800712c: 44 60 00 0b be r3,r0,8007158 <pthread_attr_setschedpolicy+0x34>
return EINVAL;
switch ( policy ) {
8007130: 48 02 00 05 bg r0,r2,8007144 <pthread_attr_setschedpolicy+0x20>
8007134: 34 03 00 02 mvi r3,2
8007138: 4c 62 00 05 bge r3,r2,800714c <pthread_attr_setschedpolicy+0x28>
800713c: 34 03 00 04 mvi r3,4
8007140: 44 43 00 03 be r2,r3,800714c <pthread_attr_setschedpolicy+0x28><== ALWAYS TAKEN
8007144: 34 01 00 86 mvi r1,134
8007148: c3 a0 00 00 ret
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
800714c: 58 22 00 14 sw (r1+20),r2
8007150: 34 01 00 00 mvi r1,0
return 0;
8007154: c3 a0 00 00 ret
8007158: 34 01 00 16 mvi r1,22
default:
return ENOTSUP;
}
}
800715c: c3 a0 00 00 ret
08002d38 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
8002d38: 37 9c ff d8 addi sp,sp,-40
8002d3c: 5b 8b 00 18 sw (sp+24),r11
8002d40: 5b 8c 00 14 sw (sp+20),r12
8002d44: 5b 8d 00 10 sw (sp+16),r13
8002d48: 5b 8e 00 0c sw (sp+12),r14
8002d4c: 5b 8f 00 08 sw (sp+8),r15
8002d50: 5b 9d 00 04 sw (sp+4),ra
8002d54: b8 20 68 00 mv r13,r1
8002d58: b8 60 60 00 mv r12,r3
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
8002d5c: 44 20 00 2c be r1,r0,8002e0c <pthread_barrier_init+0xd4>
return EINVAL;
if ( count == 0 )
8002d60: 44 60 00 2b be r3,r0,8002e0c <pthread_barrier_init+0xd4>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
8002d64: b8 40 20 00 mv r4,r2
8002d68: 5c 40 00 05 bne r2,r0,8002d7c <pthread_barrier_init+0x44>
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
8002d6c: 37 8b 00 1c addi r11,sp,28
8002d70: b9 60 08 00 mv r1,r11
8002d74: fb ff ff bb calli 8002c60 <pthread_barrierattr_init>
8002d78: b9 60 20 00 mv r4,r11
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
8002d7c: 28 81 00 00 lw r1,(r4+0)
8002d80: 44 20 00 23 be r1,r0,8002e0c <pthread_barrier_init+0xd4>
return EINVAL;
switch ( the_attr->process_shared ) {
8002d84: 28 8b 00 04 lw r11,(r4+4)
8002d88: 5d 60 00 21 bne r11,r0,8002e0c <pthread_barrier_init+0xd4> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8002d8c: 78 02 08 01 mvhi r2,0x801
8002d90: 38 42 f8 7c ori r2,r2,0xf87c
8002d94: 28 41 00 00 lw r1,(r2+0)
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
the_attributes.maximum_count = count;
8002d98: 5b 8c 00 28 sw (sp+40),r12
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
8002d9c: 5b 8b 00 24 sw (sp+36),r11
8002da0: 34 21 00 01 addi r1,r1,1
8002da4: 58 41 00 00 sw (r2+0),r1
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
8002da8: 78 01 08 01 mvhi r1,0x801
8002dac: 38 21 fb fc ori r1,r1,0xfbfc
8002db0: f8 00 06 c7 calli 80048cc <_Objects_Allocate>
8002db4: b8 20 60 00 mv r12,r1
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
8002db8: 5c 2b 00 04 bne r1,r11,8002dc8 <pthread_barrier_init+0x90>
_Thread_Enable_dispatch();
8002dbc: f8 00 0a 0f calli 80055f8 <_Thread_Enable_dispatch>
8002dc0: 34 01 00 0b mvi r1,11
return EAGAIN;
8002dc4: e0 00 00 13 bi 8002e10 <pthread_barrier_init+0xd8>
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
8002dc8: 34 21 00 10 addi r1,r1,16
8002dcc: 37 82 00 24 addi r2,sp,36
8002dd0: f8 00 04 0f calli 8003e0c <_CORE_barrier_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8002dd4: 78 02 08 01 mvhi r2,0x801
8002dd8: 29 8e 00 08 lw r14,(r12+8)
8002ddc: 38 42 fb fc ori r2,r2,0xfbfc
8002de0: 28 4f 00 1c lw r15,(r2+28)
8002de4: 21 c1 ff ff andi r1,r14,0xffff
8002de8: 34 02 00 02 mvi r2,2
8002dec: fb ff f8 59 calli 8000f50 <__ashlsi3>
8002df0: b5 e1 08 00 add r1,r15,r1
8002df4: 58 2c 00 00 sw (r1+0),r12
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
8002df8: 59 8b 00 0c sw (r12+12),r11
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
8002dfc: 59 ae 00 00 sw (r13+0),r14
_Thread_Enable_dispatch();
8002e00: f8 00 09 fe calli 80055f8 <_Thread_Enable_dispatch>
8002e04: b9 60 08 00 mv r1,r11
return 0;
8002e08: e0 00 00 02 bi 8002e10 <pthread_barrier_init+0xd8>
8002e0c: 34 01 00 16 mvi r1,22
}
8002e10: 2b 9d 00 04 lw ra,(sp+4)
8002e14: 2b 8b 00 18 lw r11,(sp+24)
8002e18: 2b 8c 00 14 lw r12,(sp+20)
8002e1c: 2b 8d 00 10 lw r13,(sp+16)
8002e20: 2b 8e 00 0c lw r14,(sp+12)
8002e24: 2b 8f 00 08 lw r15,(sp+8)
8002e28: 37 9c 00 28 addi sp,sp,40
8002e2c: c3 a0 00 00 ret
08002424 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
8002424: 37 9c ff f4 addi sp,sp,-12
8002428: 5b 8b 00 0c sw (sp+12),r11
800242c: 5b 8c 00 08 sw (sp+8),r12
8002430: 5b 9d 00 04 sw (sp+4),ra
8002434: b8 20 58 00 mv r11,r1
8002438: b8 40 60 00 mv r12,r2
/*
* The POSIX standard does not address what to do when the routine
* is NULL. It also does not address what happens when we cannot
* allocate memory or anything else bad happens.
*/
if ( !routine )
800243c: 44 20 00 14 be r1,r0,800248c <pthread_cleanup_push+0x68>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8002440: 78 03 08 01 mvhi r3,0x801
8002444: 38 63 f8 64 ori r3,r3,0xf864
8002448: 28 61 00 00 lw r1,(r3+0)
800244c: 34 21 00 01 addi r1,r1,1
8002450: 58 61 00 00 sw (r3+0),r1
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
8002454: 34 01 00 10 mvi r1,16
8002458: f8 00 0f 7e calli 8006250 <_Workspace_Allocate>
800245c: b8 20 18 00 mv r3,r1
if ( handler ) {
8002460: 44 20 00 0a be r1,r0,8002488 <pthread_cleanup_push+0x64> <== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
8002464: 78 04 08 01 mvhi r4,0x801
8002468: 38 84 f9 20 ori r4,r4,0xf920
800246c: 28 81 00 00 lw r1,(r4+0)
handler->routine = routine;
8002470: 58 6b 00 08 sw (r3+8),r11
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
8002474: b8 60 10 00 mv r2,r3
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
if ( handler ) {
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
8002478: 28 21 01 2c lw r1,(r1+300)
handler->routine = routine;
handler->arg = arg;
800247c: 58 6c 00 0c sw (r3+12),r12
_Chain_Append( handler_stack, &handler->Node );
8002480: 34 21 00 e0 addi r1,r1,224
8002484: f8 00 04 48 calli 80035a4 <_Chain_Append>
}
_Thread_Enable_dispatch();
8002488: f8 00 09 f3 calli 8004c54 <_Thread_Enable_dispatch>
}
800248c: 2b 9d 00 04 lw ra,(sp+4)
8002490: 2b 8b 00 0c lw r11,(sp+12)
8002494: 2b 8c 00 08 lw r12,(sp+8)
8002498: 37 9c 00 0c addi sp,sp,12
800249c: c3 a0 00 00 ret
0800379c <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
800379c: 37 9c ff e8 addi sp,sp,-24
80037a0: 5b 8b 00 18 sw (sp+24),r11
80037a4: 5b 8c 00 14 sw (sp+20),r12
80037a8: 5b 8d 00 10 sw (sp+16),r13
80037ac: 5b 8e 00 0c sw (sp+12),r14
80037b0: 5b 8f 00 08 sw (sp+8),r15
80037b4: 5b 9d 00 04 sw (sp+4),ra
80037b8: b8 20 70 00 mv r14,r1
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
80037bc: b8 40 60 00 mv r12,r2
80037c0: 5c 40 00 03 bne r2,r0,80037cc <pthread_cond_init+0x30>
80037c4: 78 0c 08 01 mvhi r12,0x801
80037c8: 39 8c e7 70 ori r12,r12,0xe770
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
80037cc: 29 82 00 04 lw r2,(r12+4)
80037d0: 34 01 00 01 mvi r1,1
80037d4: 44 41 00 27 be r2,r1,8003870 <pthread_cond_init+0xd4> <== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
80037d8: 29 81 00 00 lw r1,(r12+0)
80037dc: 34 0d 00 00 mvi r13,0
80037e0: 44 2d 00 24 be r1,r13,8003870 <pthread_cond_init+0xd4>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
80037e4: 78 02 08 02 mvhi r2,0x802
80037e8: 38 42 08 74 ori r2,r2,0x874
80037ec: 28 41 00 00 lw r1,(r2+0)
80037f0: 34 21 00 01 addi r1,r1,1
80037f4: 58 41 00 00 sw (r2+0),r1
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
80037f8: 78 01 08 02 mvhi r1,0x802
80037fc: 38 21 0c 8c ori r1,r1,0xc8c
8003800: f8 00 08 93 calli 8005a4c <_Objects_Allocate>
8003804: b8 20 58 00 mv r11,r1
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
8003808: 5c 2d 00 04 bne r1,r13,8003818 <pthread_cond_init+0x7c>
_Thread_Enable_dispatch();
800380c: f8 00 0c 6f calli 80069c8 <_Thread_Enable_dispatch>
8003810: 34 01 00 0c mvi r1,12
return ENOMEM;
8003814: e0 00 00 18 bi 8003874 <pthread_cond_init+0xd8>
}
the_cond->process_shared = the_attr->process_shared;
8003818: 29 8c 00 04 lw r12,(r12+4)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
800381c: 34 03 08 00 mvi r3,2048
8003820: 34 04 00 74 mvi r4,116
if ( !the_cond ) {
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
8003824: 58 2c 00 10 sw (r1+16),r12
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
8003828: 58 2d 00 14 sw (r1+20),r13
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
800382c: b9 a0 10 00 mv r2,r13
8003830: 34 21 00 18 addi r1,r1,24
8003834: f8 00 0e 9f calli 80072b0 <_Thread_queue_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8003838: 78 02 08 02 mvhi r2,0x802
800383c: 29 6c 00 08 lw r12,(r11+8)
8003840: 38 42 0c 8c ori r2,r2,0xc8c
8003844: 28 4f 00 1c lw r15,(r2+28)
8003848: 21 81 ff ff andi r1,r12,0xffff
800384c: 34 02 00 02 mvi r2,2
8003850: fb ff f8 1a calli 80018b8 <__ashlsi3>
8003854: b5 e1 10 00 add r2,r15,r1
8003858: 58 4b 00 00 sw (r2+0),r11
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
800385c: 59 6d 00 0c sw (r11+12),r13
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
8003860: 59 cc 00 00 sw (r14+0),r12
_Thread_Enable_dispatch();
8003864: f8 00 0c 59 calli 80069c8 <_Thread_Enable_dispatch>
8003868: b9 a0 08 00 mv r1,r13
return 0;
800386c: e0 00 00 02 bi 8003874 <pthread_cond_init+0xd8>
8003870: 34 01 00 16 mvi r1,22
}
8003874: 2b 9d 00 04 lw ra,(sp+4)
8003878: 2b 8b 00 18 lw r11,(sp+24)
800387c: 2b 8c 00 14 lw r12,(sp+20)
8003880: 2b 8d 00 10 lw r13,(sp+16)
8003884: 2b 8e 00 0c lw r14,(sp+12)
8003888: 2b 8f 00 08 lw r15,(sp+8)
800388c: 37 9c 00 18 addi sp,sp,24
8003890: c3 a0 00 00 ret
080035f0 <pthread_condattr_destroy>:
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
80035f0: 34 02 00 00 mvi r2,0
80035f4: 44 22 00 06 be r1,r2,800360c <pthread_condattr_destroy+0x1c>
80035f8: 28 23 00 00 lw r3,(r1+0)
80035fc: 44 62 00 04 be r3,r2,800360c <pthread_condattr_destroy+0x1c><== NEVER TAKEN
return EINVAL;
attr->is_initialized = false;
8003600: 58 22 00 00 sw (r1+0),r2
8003604: b8 40 08 00 mv r1,r2
return 0;
8003608: c3 a0 00 00 ret
800360c: 34 01 00 16 mvi r1,22
}
8003610: c3 a0 00 00 ret
08002938 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
8002938: 37 9c ff a4 addi sp,sp,-92
800293c: 5b 8b 00 38 sw (sp+56),r11
8002940: 5b 8c 00 34 sw (sp+52),r12
8002944: 5b 8d 00 30 sw (sp+48),r13
8002948: 5b 8e 00 2c sw (sp+44),r14
800294c: 5b 8f 00 28 sw (sp+40),r15
8002950: 5b 90 00 24 sw (sp+36),r16
8002954: 5b 91 00 20 sw (sp+32),r17
8002958: 5b 92 00 1c sw (sp+28),r18
800295c: 5b 93 00 18 sw (sp+24),r19
8002960: 5b 94 00 14 sw (sp+20),r20
8002964: 5b 9d 00 10 sw (sp+16),ra
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
8002968: 34 0c 00 0e mvi r12,14
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
800296c: b8 60 80 00 mv r16,r3
8002970: b8 20 88 00 mv r17,r1
8002974: b8 80 90 00 mv r18,r4
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
8002978: 44 60 00 83 be r3,r0,8002b84 <pthread_create+0x24c>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
800297c: b8 40 58 00 mv r11,r2
8002980: 5c 40 00 03 bne r2,r0,800298c <pthread_create+0x54>
8002984: 78 0b 08 01 mvhi r11,0x801
8002988: 39 6b cb 94 ori r11,r11,0xcb94
if ( !the_attr->is_initialized )
800298c: 29 61 00 00 lw r1,(r11+0)
8002990: 44 20 00 7c be r1,r0,8002b80 <pthread_create+0x248>
* stack space if it is allowed to allocate it itself.
*
* NOTE: If the user provides the stack we will let it drop below
* twice the minimum.
*/
if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) )
8002994: 29 61 00 04 lw r1,(r11+4)
8002998: 44 20 00 06 be r1,r0,80029b0 <pthread_create+0x78>
800299c: 78 02 08 01 mvhi r2,0x801
80029a0: 38 42 e0 e0 ori r2,r2,0xe0e0
80029a4: 28 41 00 00 lw r1,(r2+0)
80029a8: 29 62 00 08 lw r2,(r11+8)
80029ac: 54 22 00 75 bgu r1,r2,8002b80 <pthread_create+0x248>
* If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread
* inherits scheduling attributes from the creating thread. If it is
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
80029b0: 29 62 00 10 lw r2,(r11+16)
80029b4: 34 01 00 01 mvi r1,1
80029b8: 44 41 00 04 be r2,r1,80029c8 <pthread_create+0x90>
80029bc: 34 01 00 02 mvi r1,2
80029c0: 5c 41 00 70 bne r2,r1,8002b80 <pthread_create+0x248>
80029c4: e0 00 00 0a bi 80029ec <pthread_create+0xb4>
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
80029c8: 78 02 08 01 mvhi r2,0x801
80029cc: 38 42 e9 20 ori r2,r2,0xe920
80029d0: 28 42 00 00 lw r2,(r2+0)
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
80029d4: 37 81 00 3c addi r1,sp,60
80029d8: 34 03 00 1c mvi r3,28
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
80029dc: 28 45 01 2c lw r5,(r2+300)
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
80029e0: 34 a2 00 84 addi r2,r5,132
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
schedpolicy = api->schedpolicy;
80029e4: 28 af 00 80 lw r15,(r5+128)
80029e8: e0 00 00 05 bi 80029fc <pthread_create+0xc4>
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
80029ec: 29 6f 00 14 lw r15,(r11+20)
schedparam = the_attr->schedparam;
80029f0: 37 81 00 3c addi r1,sp,60
80029f4: 35 62 00 18 addi r2,r11,24
80029f8: 34 03 00 1c mvi r3,28
80029fc: f8 00 2c e6 calli 800dd94 <memcpy>
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
8002a00: 29 6d 00 0c lw r13,(r11+12)
8002a04: 34 0c 00 86 mvi r12,134
8002a08: 5d a0 00 5f bne r13,r0,8002b84 <pthread_create+0x24c>
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
8002a0c: 2b 81 00 3c lw r1,(sp+60)
8002a10: f8 00 19 a6 calli 80090a8 <_POSIX_Priority_Is_valid>
8002a14: 44 2d 00 5b be r1,r13,8002b80 <pthread_create+0x248> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
8002a18: 78 05 08 01 mvhi r5,0x801
8002a1c: 38 a5 e0 e4 ori r5,r5,0xe0e4
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
8002a20: b9 e0 08 00 mv r1,r15
8002a24: 37 82 00 3c addi r2,sp,60
8002a28: 37 83 00 5c addi r3,sp,92
8002a2c: 37 84 00 58 addi r4,sp,88
8002a30: 40 b4 00 00 lbu r20,(r5+0)
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
8002a34: 2b 93 00 3c lw r19,(sp+60)
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
8002a38: f8 00 19 a4 calli 80090c8 <_POSIX_Thread_Translate_sched_param>
8002a3c: b8 20 60 00 mv r12,r1
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
8002a40: 5c 20 00 51 bne r1,r0,8002b84 <pthread_create+0x24c>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
8002a44: 78 0e 08 01 mvhi r14,0x801
8002a48: 39 ce e9 18 ori r14,r14,0xe918
8002a4c: 29 c1 00 00 lw r1,(r14+0)
8002a50: f8 00 04 4d calli 8003b84 <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
8002a54: 78 01 08 01 mvhi r1,0x801
8002a58: 38 21 ea 64 ori r1,r1,0xea64
8002a5c: f8 00 06 fd calli 8004650 <_Objects_Allocate>
8002a60: b8 20 68 00 mv r13,r1
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
8002a64: 5c 2c 00 03 bne r1,r12,8002a70 <pthread_create+0x138>
_RTEMS_Unlock_allocator();
8002a68: 29 c1 00 00 lw r1,(r14+0)
8002a6c: e0 00 00 1f bi 8002ae8 <pthread_create+0x1b0>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
8002a70: 78 02 08 01 mvhi r2,0x801
8002a74: 38 42 e0 e0 ori r2,r2,0xe0e0
8002a78: 28 42 00 00 lw r2,(r2+0)
8002a7c: 29 65 00 08 lw r5,(r11+8)
8002a80: 29 63 00 04 lw r3,(r11+4)
8002a84: b4 42 10 00 add r2,r2,r2
8002a88: 50 45 00 02 bgeu r2,r5,8002a90 <pthread_create+0x158>
8002a8c: b8 a0 10 00 mv r2,r5
8002a90: 34 09 00 00 mvi r9,0
8002a94: 5b 89 00 08 sw (sp+8),r9
8002a98: 2b 88 00 5c lw r8,(sp+92)
8002a9c: 2b 89 00 58 lw r9,(sp+88)
8002aa0: 78 01 08 01 mvhi r1,0x801
8002aa4: b8 40 20 00 mv r4,r2
8002aa8: ca 93 30 00 sub r6,r20,r19
8002aac: 38 21 ea 64 ori r1,r1,0xea64
8002ab0: b9 a0 10 00 mv r2,r13
8002ab4: b9 80 28 00 mv r5,r12
8002ab8: 34 07 00 01 mvi r7,1
8002abc: 5b 89 00 04 sw (sp+4),r9
8002ac0: 5b 8c 00 0c sw (sp+12),r12
8002ac4: f8 00 0a 69 calli 8005468 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
8002ac8: 5c 20 00 0a bne r1,r0,8002af0 <pthread_create+0x1b8>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
8002acc: 78 01 08 01 mvhi r1,0x801
8002ad0: 38 21 ea 64 ori r1,r1,0xea64
8002ad4: b9 a0 10 00 mv r2,r13
8002ad8: f8 00 07 db calli 8004a44 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
8002adc: 78 01 08 01 mvhi r1,0x801
8002ae0: 38 21 e9 18 ori r1,r1,0xe918
8002ae4: 28 21 00 00 lw r1,(r1+0)
8002ae8: 34 0c 00 0b mvi r12,11
8002aec: e0 00 00 23 bi 8002b78 <pthread_create+0x240>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
8002af0: 29 ae 01 2c lw r14,(r13+300)
api->Attributes = *the_attr;
8002af4: b9 60 10 00 mv r2,r11
8002af8: 34 03 00 3c mvi r3,60
8002afc: b9 c0 08 00 mv r1,r14
8002b00: f8 00 2c a5 calli 800dd94 <memcpy>
api->detachstate = the_attr->detachstate;
8002b04: 29 6b 00 38 lw r11,(r11+56)
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
8002b08: 37 82 00 3c addi r2,sp,60
8002b0c: 34 03 00 1c mvi r3,28
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
8002b10: 59 cb 00 3c sw (r14+60),r11
api->schedpolicy = schedpolicy;
8002b14: 59 cf 00 80 sw (r14+128),r15
api->schedparam = schedparam;
8002b18: 35 c1 00 84 addi r1,r14,132
8002b1c: f8 00 2c 9e calli 800dd94 <memcpy>
* This insures we evaluate the process-wide signals pending when we
* first run.
*
* NOTE: Since the thread starts with all unblocked, this is necessary.
*/
the_thread->do_post_task_switch_extension = true;
8002b20: 34 01 00 01 mvi r1,1
8002b24: 31 a1 00 74 sb (r13+116),r1
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
8002b28: ba 00 18 00 mv r3,r16
8002b2c: ba 40 20 00 mv r4,r18
8002b30: b9 a0 08 00 mv r1,r13
8002b34: 34 02 00 01 mvi r2,1
8002b38: b9 80 28 00 mv r5,r12
8002b3c: f8 00 0d 92 calli 8006184 <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
8002b40: 34 01 00 04 mvi r1,4
8002b44: 5d e1 00 08 bne r15,r1,8002b64 <pthread_create+0x22c>
_Watchdog_Insert_ticks(
8002b48: 35 c1 00 8c addi r1,r14,140
8002b4c: f8 00 0e 30 calli 800640c <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
8002b50: 59 c1 00 b0 sw (r14+176),r1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8002b54: 78 01 08 01 mvhi r1,0x801
8002b58: 38 21 e9 40 ori r1,r1,0xe940
8002b5c: 35 c2 00 a4 addi r2,r14,164
8002b60: f8 00 0f 52 calli 80068a8 <_Watchdog_Insert>
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
8002b64: 78 02 08 01 mvhi r2,0x801
8002b68: 38 42 e9 18 ori r2,r2,0xe918
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
8002b6c: 29 ad 00 08 lw r13,(r13+8)
_RTEMS_Unlock_allocator();
8002b70: 28 41 00 00 lw r1,(r2+0)
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
8002b74: 5a 2d 00 00 sw (r17+0),r13
_RTEMS_Unlock_allocator();
8002b78: f8 00 04 1f calli 8003bf4 <_API_Mutex_Unlock>
return 0;
8002b7c: e0 00 00 02 bi 8002b84 <pthread_create+0x24c>
8002b80: 34 0c 00 16 mvi r12,22
}
8002b84: b9 80 08 00 mv r1,r12
8002b88: 2b 9d 00 10 lw ra,(sp+16)
8002b8c: 2b 8b 00 38 lw r11,(sp+56)
8002b90: 2b 8c 00 34 lw r12,(sp+52)
8002b94: 2b 8d 00 30 lw r13,(sp+48)
8002b98: 2b 8e 00 2c lw r14,(sp+44)
8002b9c: 2b 8f 00 28 lw r15,(sp+40)
8002ba0: 2b 90 00 24 lw r16,(sp+36)
8002ba4: 2b 91 00 20 lw r17,(sp+32)
8002ba8: 2b 92 00 1c lw r18,(sp+28)
8002bac: 2b 93 00 18 lw r19,(sp+24)
8002bb0: 2b 94 00 14 lw r20,(sp+20)
8002bb4: 37 9c 00 5c addi sp,sp,92
8002bb8: c3 a0 00 00 ret
08012468 <pthread_exit>:
void pthread_exit(
void *value_ptr
)
{
8012468: 37 9c ff fc addi sp,sp,-4
801246c: 5b 9d 00 04 sw (sp+4),ra
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
8012470: 78 03 08 02 mvhi r3,0x802
8012474: 38 63 5a 00 ori r3,r3,0x5a00
}
void pthread_exit(
void *value_ptr
)
{
8012478: b8 20 10 00 mv r2,r1
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
801247c: 28 61 00 00 lw r1,(r3+0)
8012480: fb ff ff d4 calli 80123d0 <_POSIX_Thread_Exit>
}
8012484: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8012488: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
801248c: c3 a0 00 00 ret <== NOT EXECUTED
08004fd0 <pthread_mutex_init>:
int pthread_mutex_init(
pthread_mutex_t *mutex,
const pthread_mutexattr_t *attr
)
{
8004fd0: 37 9c ff ec addi sp,sp,-20
8004fd4: 5b 8b 00 14 sw (sp+20),r11
8004fd8: 5b 8c 00 10 sw (sp+16),r12
8004fdc: 5b 8d 00 0c sw (sp+12),r13
8004fe0: 5b 8e 00 08 sw (sp+8),r14
8004fe4: 5b 9d 00 04 sw (sp+4),ra
8004fe8: b8 20 70 00 mv r14,r1
POSIX_Mutex_Control *the_mutex;
CORE_mutex_Attributes *the_mutex_attr;
const pthread_mutexattr_t *the_attr;
CORE_mutex_Disciplines the_discipline;
if ( attr ) the_attr = attr;
8004fec: b8 40 58 00 mv r11,r2
8004ff0: 5c 40 00 03 bne r2,r0,8004ffc <pthread_mutex_init+0x2c>
8004ff4: 78 0b 08 02 mvhi r11,0x802
8004ff8: 39 6b 3c 84 ori r11,r11,0x3c84
else the_attr = &_POSIX_Mutex_Default_attributes;
/* Check for NULL mutex */
if ( !mutex )
8004ffc: 45 c0 00 4a be r14,r0,8005124 <pthread_mutex_init+0x154> <== NEVER TAKEN
}
}
}
#endif
if ( !the_attr->is_initialized )
8005000: 29 61 00 00 lw r1,(r11+0)
8005004: 44 20 00 48 be r1,r0,8005124 <pthread_mutex_init+0x154>
return EINVAL;
/*
* We only support process private mutexes.
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
8005008: 29 62 00 04 lw r2,(r11+4)
800500c: 34 03 00 01 mvi r3,1
8005010: 34 01 00 58 mvi r1,88
8005014: 44 43 00 45 be r2,r3,8005128 <pthread_mutex_init+0x158>
return ENOSYS;
if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE )
8005018: 5c 40 00 43 bne r2,r0,8005124 <pthread_mutex_init+0x154>
return EINVAL;
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
800501c: 29 62 00 0c lw r2,(r11+12)
8005020: 44 43 00 05 be r2,r3,8005034 <pthread_mutex_init+0x64>
8005024: 34 01 00 02 mvi r1,2
8005028: 44 41 00 07 be r2,r1,8005044 <pthread_mutex_init+0x74>
800502c: 5c 40 00 3e bne r2,r0,8005124 <pthread_mutex_init+0x154>
8005030: e0 00 00 03 bi 800503c <pthread_mutex_init+0x6c>
8005034: 34 0d 00 02 mvi r13,2
8005038: e0 00 00 04 bi 8005048 <pthread_mutex_init+0x78>
800503c: b8 40 68 00 mv r13,r2
8005040: e0 00 00 02 bi 8005048 <pthread_mutex_init+0x78>
8005044: 34 0d 00 03 mvi r13,3
}
/*
* Validate the priority ceiling field -- should always be valid.
*/
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
8005048: 29 61 00 08 lw r1,(r11+8)
800504c: f8 00 00 f2 calli 8005414 <_POSIX_Priority_Is_valid>
8005050: 44 20 00 35 be r1,r0,8005124 <pthread_mutex_init+0x154>
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
/*
* Validate the mutex type and set appropriate SuperCore mutex
* attributes.
*/
switch ( the_attr->type ) {
8005054: 29 62 00 10 lw r2,(r11+16)
8005058: 34 01 00 03 mvi r1,3
800505c: 54 41 00 32 bgu r2,r1,8005124 <pthread_mutex_init+0x154>
8005060: 78 02 08 02 mvhi r2,0x802
8005064: 38 42 38 c4 ori r2,r2,0x38c4
8005068: 28 41 00 00 lw r1,(r2+0)
800506c: 34 21 00 01 addi r1,r1,1
8005070: 58 41 00 00 sw (r2+0),r1
* _POSIX_Mutex_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void )
{
return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information );
8005074: 78 01 08 02 mvhi r1,0x802
8005078: 38 21 3c 04 ori r1,r1,0x3c04
800507c: f8 00 08 41 calli 8007180 <_Objects_Allocate>
8005080: b8 20 60 00 mv r12,r1
*/
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
8005084: 5c 20 00 04 bne r1,r0,8005094 <pthread_mutex_init+0xc4>
_Thread_Enable_dispatch();
8005088: f8 00 0c 1d calli 80080fc <_Thread_Enable_dispatch>
800508c: 34 01 00 0b mvi r1,11
return EAGAIN;
8005090: e0 00 00 26 bi 8005128 <pthread_mutex_init+0x158>
}
the_mutex->process_shared = the_attr->process_shared;
8005094: 29 61 00 04 lw r1,(r11+4)
8005098: 59 81 00 10 sw (r12+16),r1
the_mutex_attr = &the_mutex->Mutex.Attributes;
if ( the_attr->recursive )
800509c: 29 61 00 14 lw r1,(r11+20)
80050a0: 44 20 00 03 be r1,r0,80050ac <pthread_mutex_init+0xdc>
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
80050a4: 34 01 00 00 mvi r1,0
80050a8: e0 00 00 02 bi 80050b0 <pthread_mutex_init+0xe0>
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
80050ac: 34 01 00 01 mvi r1,1
80050b0: 59 81 00 54 sw (r12+84),r1
the_mutex_attr->only_owner_release = true;
the_mutex_attr->priority_ceiling =
80050b4: 78 02 08 02 mvhi r2,0x802
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = true;
80050b8: 34 01 00 01 mvi r1,1
80050bc: 31 81 00 58 sb (r12+88),r1
the_mutex_attr->priority_ceiling =
80050c0: 38 42 30 e4 ori r2,r2,0x30e4
80050c4: 40 42 00 00 lbu r2,(r2+0)
80050c8: 29 61 00 08 lw r1,(r11+8)
the_mutex_attr->discipline = the_discipline;
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
80050cc: 34 03 00 01 mvi r3,1
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = true;
the_mutex_attr->priority_ceiling =
_POSIX_Priority_To_core( the_attr->prio_ceiling );
the_mutex_attr->discipline = the_discipline;
80050d0: 59 8d 00 5c sw (r12+92),r13
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = true;
the_mutex_attr->priority_ceiling =
80050d4: c8 41 08 00 sub r1,r2,r1
80050d8: 59 81 00 60 sw (r12+96),r1
the_mutex_attr->discipline = the_discipline;
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
80050dc: 35 82 00 54 addi r2,r12,84
80050e0: 35 81 00 14 addi r1,r12,20
80050e4: f8 00 05 5e calli 800665c <_CORE_mutex_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
80050e8: 78 02 08 02 mvhi r2,0x802
80050ec: 29 8d 00 08 lw r13,(r12+8)
80050f0: 38 42 3c 04 ori r2,r2,0x3c04
80050f4: 28 4b 00 1c lw r11,(r2+28)
80050f8: 21 a1 ff ff andi r1,r13,0xffff
80050fc: 34 02 00 02 mvi r2,2
8005100: fb ff f7 34 calli 8002dd0 <__ashlsi3>
8005104: b5 61 08 00 add r1,r11,r1
8005108: 58 2c 00 00 sw (r1+0),r12
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
800510c: 34 0b 00 00 mvi r11,0
8005110: 59 8b 00 0c sw (r12+12),r11
CORE_MUTEX_UNLOCKED
);
_Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 );
*mutex = the_mutex->Object.id;
8005114: 59 cd 00 00 sw (r14+0),r13
_Thread_Enable_dispatch();
8005118: f8 00 0b f9 calli 80080fc <_Thread_Enable_dispatch>
800511c: b9 60 08 00 mv r1,r11
return 0;
8005120: e0 00 00 02 bi 8005128 <pthread_mutex_init+0x158>
8005124: 34 01 00 16 mvi r1,22
}
8005128: 2b 9d 00 04 lw ra,(sp+4)
800512c: 2b 8b 00 14 lw r11,(sp+20)
8005130: 2b 8c 00 10 lw r12,(sp+16)
8005134: 2b 8d 00 0c lw r13,(sp+12)
8005138: 2b 8e 00 08 lw r14,(sp+8)
800513c: 37 9c 00 14 addi sp,sp,20
8005140: c3 a0 00 00 ret
080020d0 <pthread_mutexattr_gettype>:
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
if ( !attr )
80020d0: 44 20 00 08 be r1,r0,80020f0 <pthread_mutexattr_gettype+0x20>
return EINVAL;
if ( !attr->is_initialized )
80020d4: 28 23 00 00 lw r3,(r1+0)
80020d8: 44 60 00 06 be r3,r0,80020f0 <pthread_mutexattr_gettype+0x20>
return EINVAL;
if ( !type )
80020dc: 44 40 00 05 be r2,r0,80020f0 <pthread_mutexattr_gettype+0x20><== NEVER TAKEN
return EINVAL;
*type = attr->type;
80020e0: 28 21 00 10 lw r1,(r1+16)
80020e4: 58 41 00 00 sw (r2+0),r1
80020e8: 34 01 00 00 mvi r1,0
return 0;
80020ec: c3 a0 00 00 ret
80020f0: 34 01 00 16 mvi r1,22
}
80020f4: c3 a0 00 00 ret
08004db4 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
8004db4: 44 20 00 08 be r1,r0,8004dd4 <pthread_mutexattr_setpshared+0x20>
8004db8: 28 23 00 00 lw r3,(r1+0)
8004dbc: 44 60 00 06 be r3,r0,8004dd4 <pthread_mutexattr_setpshared+0x20>
return EINVAL;
switch ( pshared ) {
8004dc0: 34 03 00 01 mvi r3,1
8004dc4: 54 43 00 04 bgu r2,r3,8004dd4 <pthread_mutexattr_setpshared+0x20><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
8004dc8: 58 22 00 04 sw (r1+4),r2
8004dcc: 34 01 00 00 mvi r1,0
return 0;
8004dd0: c3 a0 00 00 ret
8004dd4: 34 01 00 16 mvi r1,22
default:
return EINVAL;
}
}
8004dd8: c3 a0 00 00 ret
0800212c <pthread_mutexattr_settype>:
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
if ( !attr || !attr->is_initialized )
800212c: 44 20 00 08 be r1,r0,800214c <pthread_mutexattr_settype+0x20>
8002130: 28 23 00 00 lw r3,(r1+0)
8002134: 44 60 00 06 be r3,r0,800214c <pthread_mutexattr_settype+0x20><== NEVER TAKEN
return EINVAL;
switch ( type ) {
8002138: 34 03 00 03 mvi r3,3
800213c: 54 43 00 04 bgu r2,r3,800214c <pthread_mutexattr_settype+0x20>
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
8002140: 58 22 00 10 sw (r1+16),r2
8002144: 34 01 00 00 mvi r1,0
return 0;
8002148: c3 a0 00 00 ret
800214c: 34 01 00 16 mvi r1,22
default:
return EINVAL;
}
}
8002150: c3 a0 00 00 ret
080030a0 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
80030a0: 37 9c ff ec addi sp,sp,-20
80030a4: 5b 8b 00 10 sw (sp+16),r11
80030a8: 5b 8c 00 0c sw (sp+12),r12
80030ac: 5b 8d 00 08 sw (sp+8),r13
80030b0: 5b 9d 00 04 sw (sp+4),ra
if ( !once_control || !init_routine )
80030b4: 64 43 00 00 cmpei r3,r2,0
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
80030b8: b8 40 60 00 mv r12,r2
if ( !once_control || !init_routine )
80030bc: 64 22 00 00 cmpei r2,r1,0
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
80030c0: b8 20 58 00 mv r11,r1
if ( !once_control || !init_routine )
80030c4: b8 62 18 00 or r3,r3,r2
80030c8: 34 01 00 16 mvi r1,22
80030cc: 5c 60 00 13 bne r3,r0,8003118 <pthread_once+0x78>
return EINVAL;
if ( !once_control->init_executed ) {
80030d0: 29 6d 00 04 lw r13,(r11+4)
80030d4: b8 60 08 00 mv r1,r3
80030d8: 5d a3 00 10 bne r13,r3,8003118 <pthread_once+0x78>
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
80030dc: 34 01 01 00 mvi r1,256
80030e0: b8 20 10 00 mv r2,r1
80030e4: 37 83 00 14 addi r3,sp,20
80030e8: f8 00 01 0a calli 8003510 <rtems_task_mode>
if ( !once_control->init_executed ) {
80030ec: 29 61 00 04 lw r1,(r11+4)
80030f0: 5c 2d 00 05 bne r1,r13,8003104 <pthread_once+0x64> <== NEVER TAKEN
once_control->is_initialized = true;
80030f4: 34 01 00 01 mvi r1,1
once_control->init_executed = true;
80030f8: 59 61 00 04 sw (r11+4),r1
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( !once_control->init_executed ) {
once_control->is_initialized = true;
80030fc: 59 61 00 00 sw (r11+0),r1
once_control->init_executed = true;
(*init_routine)();
8003100: d9 80 00 00 call r12
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
8003104: 2b 81 00 14 lw r1,(sp+20)
8003108: 34 02 01 00 mvi r2,256
800310c: 37 83 00 14 addi r3,sp,20
8003110: f8 00 01 00 calli 8003510 <rtems_task_mode>
8003114: 34 01 00 00 mvi r1,0
}
return 0;
}
8003118: 2b 9d 00 04 lw ra,(sp+4)
800311c: 2b 8b 00 10 lw r11,(sp+16)
8003120: 2b 8c 00 0c lw r12,(sp+12)
8003124: 2b 8d 00 08 lw r13,(sp+8)
8003128: 37 9c 00 14 addi sp,sp,20
800312c: c3 a0 00 00 ret
08003a98 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
8003a98: 37 9c ff dc addi sp,sp,-36
8003a9c: 5b 8b 00 18 sw (sp+24),r11
8003aa0: 5b 8c 00 14 sw (sp+20),r12
8003aa4: 5b 8d 00 10 sw (sp+16),r13
8003aa8: 5b 8e 00 0c sw (sp+12),r14
8003aac: 5b 8f 00 08 sw (sp+8),r15
8003ab0: 5b 9d 00 04 sw (sp+4),ra
8003ab4: b8 20 68 00 mv r13,r1
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
8003ab8: 44 20 00 29 be r1,r0,8003b5c <pthread_rwlock_init+0xc4>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
8003abc: b8 40 18 00 mv r3,r2
8003ac0: 5c 40 00 05 bne r2,r0,8003ad4 <pthread_rwlock_init+0x3c>
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
8003ac4: 37 8b 00 1c addi r11,sp,28
8003ac8: b9 60 08 00 mv r1,r11
8003acc: f8 00 02 b6 calli 80045a4 <pthread_rwlockattr_init>
8003ad0: b9 60 18 00 mv r3,r11
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
8003ad4: 28 61 00 00 lw r1,(r3+0)
8003ad8: 44 20 00 21 be r1,r0,8003b5c <pthread_rwlock_init+0xc4> <== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
8003adc: 28 6c 00 04 lw r12,(r3+4)
8003ae0: 5d 80 00 1f bne r12,r0,8003b5c <pthread_rwlock_init+0xc4> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8003ae4: 78 02 08 02 mvhi r2,0x802
8003ae8: 38 42 18 7c ori r2,r2,0x187c
8003aec: 28 41 00 00 lw r1,(r2+0)
8003af0: 34 21 00 01 addi r1,r1,1
8003af4: 58 41 00 00 sw (r2+0),r1
* This function allocates a RWLock control block from
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
8003af8: 78 01 08 02 mvhi r1,0x802
8003afc: 38 21 1a 3c ori r1,r1,0x1a3c
8003b00: f8 00 08 90 calli 8005d40 <_Objects_Allocate>
8003b04: b8 20 58 00 mv r11,r1
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
8003b08: 5c 2c 00 04 bne r1,r12,8003b18 <pthread_rwlock_init+0x80>
_Thread_Enable_dispatch();
8003b0c: f8 00 0b d8 calli 8006a6c <_Thread_Enable_dispatch>
8003b10: 34 01 00 0b mvi r1,11
return EAGAIN;
8003b14: e0 00 00 13 bi 8003b60 <pthread_rwlock_init+0xc8>
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
8003b18: 34 21 00 10 addi r1,r1,16
8003b1c: 37 82 00 24 addi r2,sp,36
8003b20: f8 00 05 f5 calli 80052f4 <_CORE_RWLock_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8003b24: 78 02 08 02 mvhi r2,0x802
8003b28: 29 6e 00 08 lw r14,(r11+8)
8003b2c: 38 42 1a 3c ori r2,r2,0x1a3c
8003b30: 28 4f 00 1c lw r15,(r2+28)
8003b34: 21 c1 ff ff andi r1,r14,0xffff
8003b38: 34 02 00 02 mvi r2,2
8003b3c: fb ff f8 62 calli 8001cc4 <__ashlsi3>
8003b40: b5 e1 08 00 add r1,r15,r1
8003b44: 58 2b 00 00 sw (r1+0),r11
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
8003b48: 59 6c 00 0c sw (r11+12),r12
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
8003b4c: 59 ae 00 00 sw (r13+0),r14
_Thread_Enable_dispatch();
8003b50: f8 00 0b c7 calli 8006a6c <_Thread_Enable_dispatch>
8003b54: b9 80 08 00 mv r1,r12
return 0;
8003b58: e0 00 00 02 bi 8003b60 <pthread_rwlock_init+0xc8>
8003b5c: 34 01 00 16 mvi r1,22
}
8003b60: 2b 9d 00 04 lw ra,(sp+4)
8003b64: 2b 8b 00 18 lw r11,(sp+24)
8003b68: 2b 8c 00 14 lw r12,(sp+20)
8003b6c: 2b 8d 00 10 lw r13,(sp+16)
8003b70: 2b 8e 00 0c lw r14,(sp+12)
8003b74: 2b 8f 00 08 lw r15,(sp+8)
8003b78: 37 9c 00 24 addi sp,sp,36
8003b7c: c3 a0 00 00 ret
08003bf4 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
8003bf4: 37 9c ff e8 addi sp,sp,-24
8003bf8: 5b 8b 00 10 sw (sp+16),r11
8003bfc: 5b 8c 00 0c sw (sp+12),r12
8003c00: 5b 8d 00 08 sw (sp+8),r13
8003c04: 5b 9d 00 04 sw (sp+4),ra
8003c08: b8 20 60 00 mv r12,r1
8003c0c: b8 40 08 00 mv r1,r2
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
8003c10: 45 80 00 24 be r12,r0,8003ca0 <pthread_rwlock_timedrdlock+0xac>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
8003c14: 37 82 00 14 addi r2,sp,20
8003c18: f8 00 1a 63 calli 800a5a4 <_POSIX_Absolute_timeout_to_ticks>
8003c1c: 29 82 00 00 lw r2,(r12+0)
8003c20: b8 20 58 00 mv r11,r1
8003c24: 78 01 08 02 mvhi r1,0x802
8003c28: 38 21 1a 3c ori r1,r1,0x1a3c
8003c2c: 37 83 00 18 addi r3,sp,24
8003c30: f8 00 09 84 calli 8006240 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
8003c34: 2b 8d 00 18 lw r13,(sp+24)
8003c38: 5d a0 00 1a bne r13,r0,8003ca0 <pthread_rwlock_timedrdlock+0xac>
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
8003c3c: 29 82 00 00 lw r2,(r12+0)
8003c40: 2b 84 00 14 lw r4,(sp+20)
int _EXFUN(pthread_rwlock_init,
(pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr));
int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedrdlock,
8003c44: 65 6c 00 03 cmpei r12,r11,3
8003c48: 34 21 00 10 addi r1,r1,16
8003c4c: b9 80 18 00 mv r3,r12
8003c50: b9 a0 28 00 mv r5,r13
8003c54: f8 00 05 b6 calli 800532c <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
8003c58: f8 00 0b 85 calli 8006a6c <_Thread_Enable_dispatch>
if ( !do_wait ) {
8003c5c: 5d 8d 00 0b bne r12,r13,8003c88 <pthread_rwlock_timedrdlock+0x94>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
8003c60: 78 01 08 02 mvhi r1,0x802
8003c64: 38 21 19 38 ori r1,r1,0x1938
8003c68: 28 21 00 00 lw r1,(r1+0)
8003c6c: 34 02 00 02 mvi r2,2
8003c70: 28 21 00 34 lw r1,(r1+52)
8003c74: 5c 22 00 05 bne r1,r2,8003c88 <pthread_rwlock_timedrdlock+0x94>
switch (status) {
8003c78: 45 6c 00 0a be r11,r12,8003ca0 <pthread_rwlock_timedrdlock+0xac><== NEVER TAKEN
8003c7c: 55 61 00 03 bgu r11,r1,8003c88 <pthread_rwlock_timedrdlock+0x94><== NEVER TAKEN
8003c80: 34 01 00 74 mvi r1,116
8003c84: e0 00 00 08 bi 8003ca4 <pthread_rwlock_timedrdlock+0xb0>
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
8003c88: 78 01 08 02 mvhi r1,0x802
8003c8c: 38 21 19 38 ori r1,r1,0x1938
8003c90: 28 21 00 00 lw r1,(r1+0)
8003c94: 28 21 00 34 lw r1,(r1+52)
8003c98: f8 00 00 3b calli 8003d84 <_POSIX_RWLock_Translate_core_RWLock_return_code>
8003c9c: e0 00 00 02 bi 8003ca4 <pthread_rwlock_timedrdlock+0xb0>
8003ca0: 34 01 00 16 mvi r1,22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
8003ca4: 2b 9d 00 04 lw ra,(sp+4)
8003ca8: 2b 8b 00 10 lw r11,(sp+16)
8003cac: 2b 8c 00 0c lw r12,(sp+12)
8003cb0: 2b 8d 00 08 lw r13,(sp+8)
8003cb4: 37 9c 00 18 addi sp,sp,24
8003cb8: c3 a0 00 00 ret
08003cbc <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
8003cbc: 37 9c ff e8 addi sp,sp,-24
8003cc0: 5b 8b 00 10 sw (sp+16),r11
8003cc4: 5b 8c 00 0c sw (sp+12),r12
8003cc8: 5b 8d 00 08 sw (sp+8),r13
8003ccc: 5b 9d 00 04 sw (sp+4),ra
8003cd0: b8 20 60 00 mv r12,r1
8003cd4: b8 40 08 00 mv r1,r2
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
8003cd8: 45 80 00 24 be r12,r0,8003d68 <pthread_rwlock_timedwrlock+0xac>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
8003cdc: 37 82 00 14 addi r2,sp,20
8003ce0: f8 00 1a 31 calli 800a5a4 <_POSIX_Absolute_timeout_to_ticks>
8003ce4: 29 82 00 00 lw r2,(r12+0)
8003ce8: b8 20 58 00 mv r11,r1
8003cec: 78 01 08 02 mvhi r1,0x802
8003cf0: 38 21 1a 3c ori r1,r1,0x1a3c
8003cf4: 37 83 00 18 addi r3,sp,24
8003cf8: f8 00 09 52 calli 8006240 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
8003cfc: 2b 8d 00 18 lw r13,(sp+24)
8003d00: 5d a0 00 1a bne r13,r0,8003d68 <pthread_rwlock_timedwrlock+0xac>
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
8003d04: 29 82 00 00 lw r2,(r12+0)
8003d08: 2b 84 00 14 lw r4,(sp+20)
(pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime));
int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedwrlock,
8003d0c: 65 6c 00 03 cmpei r12,r11,3
8003d10: 34 21 00 10 addi r1,r1,16
8003d14: b9 80 18 00 mv r3,r12
8003d18: b9 a0 28 00 mv r5,r13
8003d1c: f8 00 05 c7 calli 8005438 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
8003d20: f8 00 0b 53 calli 8006a6c <_Thread_Enable_dispatch>
if ( !do_wait &&
8003d24: 5d 8d 00 0b bne r12,r13,8003d50 <pthread_rwlock_timedwrlock+0x94>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
8003d28: 78 01 08 02 mvhi r1,0x802
8003d2c: 38 21 19 38 ori r1,r1,0x1938
8003d30: 28 21 00 00 lw r1,(r1+0)
8003d34: 34 02 00 02 mvi r2,2
8003d38: 28 21 00 34 lw r1,(r1+52)
8003d3c: 5c 22 00 05 bne r1,r2,8003d50 <pthread_rwlock_timedwrlock+0x94>
switch (status) {
8003d40: 45 6c 00 0a be r11,r12,8003d68 <pthread_rwlock_timedwrlock+0xac><== NEVER TAKEN
8003d44: 55 61 00 03 bgu r11,r1,8003d50 <pthread_rwlock_timedwrlock+0x94><== NEVER TAKEN
8003d48: 34 01 00 74 mvi r1,116
8003d4c: e0 00 00 08 bi 8003d6c <pthread_rwlock_timedwrlock+0xb0>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
8003d50: 78 01 08 02 mvhi r1,0x802
8003d54: 38 21 19 38 ori r1,r1,0x1938
8003d58: 28 21 00 00 lw r1,(r1+0)
8003d5c: 28 21 00 34 lw r1,(r1+52)
8003d60: f8 00 00 09 calli 8003d84 <_POSIX_RWLock_Translate_core_RWLock_return_code>
8003d64: e0 00 00 02 bi 8003d6c <pthread_rwlock_timedwrlock+0xb0>
8003d68: 34 01 00 16 mvi r1,22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
8003d6c: 2b 9d 00 04 lw ra,(sp+4)
8003d70: 2b 8b 00 10 lw r11,(sp+16)
8003d74: 2b 8c 00 0c lw r12,(sp+12)
8003d78: 2b 8d 00 08 lw r13,(sp+8)
8003d7c: 37 9c 00 18 addi sp,sp,24
8003d80: c3 a0 00 00 ret
080045c8 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
if ( !attr )
80045c8: 44 20 00 08 be r1,r0,80045e8 <pthread_rwlockattr_setpshared+0x20>
return EINVAL;
if ( !attr->is_initialized )
80045cc: 28 23 00 00 lw r3,(r1+0)
80045d0: 44 60 00 06 be r3,r0,80045e8 <pthread_rwlockattr_setpshared+0x20>
return EINVAL;
switch ( pshared ) {
80045d4: 34 03 00 01 mvi r3,1
80045d8: 54 43 00 04 bgu r2,r3,80045e8 <pthread_rwlockattr_setpshared+0x20><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
80045dc: 58 22 00 04 sw (r1+4),r2
80045e0: 34 01 00 00 mvi r1,0
return 0;
80045e4: c3 a0 00 00 ret
80045e8: 34 01 00 16 mvi r1,22
default:
return EINVAL;
}
}
80045ec: c3 a0 00 00 ret
08005c64 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
8005c64: 37 9c ff dc addi sp,sp,-36
8005c68: 5b 8b 00 18 sw (sp+24),r11
8005c6c: 5b 8c 00 14 sw (sp+20),r12
8005c70: 5b 8d 00 10 sw (sp+16),r13
8005c74: 5b 8e 00 0c sw (sp+12),r14
8005c78: 5b 8f 00 08 sw (sp+8),r15
8005c7c: 5b 9d 00 04 sw (sp+4),ra
int rc;
/*
* Check all the parameters
*/
if ( !param )
8005c80: 34 0d 00 16 mvi r13,22
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
8005c84: b8 60 70 00 mv r14,r3
8005c88: b8 20 58 00 mv r11,r1
8005c8c: b8 40 78 00 mv r15,r2
int rc;
/*
* Check all the parameters
*/
if ( !param )
8005c90: 44 60 00 3e be r3,r0,8005d88 <pthread_setschedparam+0x124>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
8005c94: b8 40 08 00 mv r1,r2
8005c98: 37 84 00 20 addi r4,sp,32
8005c9c: b8 60 10 00 mv r2,r3
8005ca0: 37 83 00 24 addi r3,sp,36
8005ca4: f8 00 18 27 calli 800bd40 <_POSIX_Thread_Translate_sched_param>
8005ca8: b8 20 68 00 mv r13,r1
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
8005cac: 5c 20 00 37 bne r1,r0,8005d88 <pthread_setschedparam+0x124>
8005cb0: 78 01 08 02 mvhi r1,0x802
8005cb4: 38 21 3a c4 ori r1,r1,0x3ac4
8005cb8: b9 60 10 00 mv r2,r11
8005cbc: 37 83 00 1c addi r3,sp,28
8005cc0: f8 00 06 ce calli 80077f8 <_Objects_Get>
8005cc4: b8 20 60 00 mv r12,r1
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
8005cc8: 2b 81 00 1c lw r1,(sp+28)
8005ccc: 44 2d 00 03 be r1,r13,8005cd8 <pthread_setschedparam+0x74>
8005cd0: 34 0d 00 03 mvi r13,3
8005cd4: e0 00 00 2d bi 8005d88 <pthread_setschedparam+0x124>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
8005cd8: 29 8b 01 2c lw r11,(r12+300)
if ( api->schedpolicy == SCHED_SPORADIC )
8005cdc: 34 01 00 04 mvi r1,4
8005ce0: 29 62 00 80 lw r2,(r11+128)
8005ce4: 5c 41 00 03 bne r2,r1,8005cf0 <pthread_setschedparam+0x8c>
(void) _Watchdog_Remove( &api->Sporadic_timer );
8005ce8: 35 61 00 a4 addi r1,r11,164
8005cec: f8 00 0e a0 calli 800976c <_Watchdog_Remove>
api->schedpolicy = policy;
api->schedparam = *param;
8005cf0: b9 c0 10 00 mv r2,r14
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
8005cf4: 59 6f 00 80 sw (r11+128),r15
api->schedparam = *param;
8005cf8: 35 61 00 84 addi r1,r11,132
8005cfc: 34 03 00 1c mvi r3,28
8005d00: f8 00 2b 0d calli 8010934 <memcpy>
the_thread->budget_algorithm = budget_algorithm;
8005d04: 2b 82 00 24 lw r2,(sp+36)
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
8005d08: 29 61 00 80 lw r1,(r11+128)
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
8005d0c: 59 82 00 7c sw (r12+124),r2
the_thread->budget_callout = budget_callout;
8005d10: 2b 82 00 20 lw r2,(sp+32)
8005d14: 59 82 00 80 sw (r12+128),r2
switch ( api->schedpolicy ) {
8005d18: 48 01 00 1b bg r0,r1,8005d84 <pthread_setschedparam+0x120> <== NEVER TAKEN
8005d1c: 34 02 00 02 mvi r2,2
8005d20: 4c 41 00 04 bge r2,r1,8005d30 <pthread_setschedparam+0xcc>
8005d24: 34 02 00 04 mvi r2,4
8005d28: 5c 22 00 17 bne r1,r2,8005d84 <pthread_setschedparam+0x120><== NEVER TAKEN
8005d2c: e0 00 00 0f bi 8005d68 <pthread_setschedparam+0x104>
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
8005d30: 78 01 08 02 mvhi r1,0x802
8005d34: 38 21 38 54 ori r1,r1,0x3854
8005d38: 28 21 00 00 lw r1,(r1+0)
8005d3c: 29 62 00 84 lw r2,(r11+132)
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
8005d40: 34 03 00 01 mvi r3,1
switch ( api->schedpolicy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
8005d44: 59 81 00 78 sw (r12+120),r1
8005d48: 78 01 08 02 mvhi r1,0x802
8005d4c: 38 21 30 e4 ori r1,r1,0x30e4
8005d50: 40 24 00 00 lbu r4,(r1+0)
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
8005d54: b9 80 08 00 mv r1,r12
8005d58: c8 82 10 00 sub r2,r4,r2
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
the_thread->real_priority =
8005d5c: 59 82 00 18 sw (r12+24),r2
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
8005d60: f8 00 07 76 calli 8007b38 <_Thread_Change_priority>
the_thread,
the_thread->real_priority,
true
);
break;
8005d64: e0 00 00 08 bi 8005d84 <pthread_setschedparam+0x120>
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
8005d68: 29 61 00 84 lw r1,(r11+132)
8005d6c: 59 61 00 a0 sw (r11+160),r1
_Watchdog_Remove( &api->Sporadic_timer );
8005d70: 35 61 00 a4 addi r1,r11,164
8005d74: f8 00 0e 7e calli 800976c <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
8005d78: b9 80 10 00 mv r2,r12
8005d7c: 34 01 00 00 mvi r1,0
8005d80: fb ff ff 92 calli 8005bc8 <_POSIX_Threads_Sporadic_budget_TSR>
break;
}
_Thread_Enable_dispatch();
8005d84: f8 00 08 de calli 80080fc <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
8005d88: b9 a0 08 00 mv r1,r13
8005d8c: 2b 9d 00 04 lw ra,(sp+4)
8005d90: 2b 8b 00 18 lw r11,(sp+24)
8005d94: 2b 8c 00 14 lw r12,(sp+20)
8005d98: 2b 8d 00 10 lw r13,(sp+16)
8005d9c: 2b 8e 00 0c lw r14,(sp+12)
8005da0: 2b 8f 00 08 lw r15,(sp+8)
8005da4: 37 9c 00 24 addi sp,sp,36
8005da8: c3 a0 00 00 ret
08002d08 <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
8002d08: 37 9c ff f8 addi sp,sp,-8
8002d0c: 5b 8b 00 08 sw (sp+8),r11
8002d10: 5b 9d 00 04 sw (sp+4),ra
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
8002d14: 78 01 08 01 mvhi r1,0x801
8002d18: 38 21 f8 fc ori r1,r1,0xf8fc
8002d1c: 28 22 00 00 lw r2,(r1+0)
8002d20: 5c 40 00 16 bne r2,r0,8002d78 <pthread_testcancel+0x70> <== NEVER TAKEN
8002d24: 78 01 08 01 mvhi r1,0x801
8002d28: 38 21 f8 64 ori r1,r1,0xf864
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
8002d2c: 78 03 08 01 mvhi r3,0x801
8002d30: 28 24 00 00 lw r4,(r1+0)
8002d34: 38 63 f9 20 ori r3,r3,0xf920
8002d38: 28 63 00 00 lw r3,(r3+0)
8002d3c: 34 84 00 01 addi r4,r4,1
8002d40: 58 24 00 00 sw (r1+0),r4
8002d44: 28 61 01 2c lw r1,(r3+300)
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
8002d48: 28 23 00 d4 lw r3,(r1+212)
8002d4c: b8 40 58 00 mv r11,r2
8002d50: 5c 62 00 03 bne r3,r2,8002d5c <pthread_testcancel+0x54> <== NEVER TAKEN
/* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */
int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate));
int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype));
void _EXFUN(pthread_testcancel, (void));
8002d54: 28 2b 00 dc lw r11,(r1+220)
8002d58: 7d 6b 00 00 cmpnei r11,r11,0
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
8002d5c: f8 00 07 be calli 8004c54 <_Thread_Enable_dispatch>
if ( cancel )
8002d60: 45 60 00 06 be r11,r0,8002d78 <pthread_testcancel+0x70>
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
8002d64: 78 01 08 01 mvhi r1,0x801
8002d68: 38 21 f9 20 ori r1,r1,0xf920
8002d6c: 28 21 00 00 lw r1,(r1+0)
8002d70: 34 02 ff ff mvi r2,-1
8002d74: f8 00 16 f1 calli 8008938 <_POSIX_Thread_Exit>
}
8002d78: 2b 9d 00 04 lw ra,(sp+4)
8002d7c: 2b 8b 00 08 lw r11,(sp+8)
8002d80: 37 9c 00 08 addi sp,sp,8
8002d84: c3 a0 00 00 ret
0802230c <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
802230c: 37 9c ff e8 addi sp,sp,-24
8022310: 5b 8b 00 14 sw (sp+20),r11
8022314: 5b 8c 00 10 sw (sp+16),r12
8022318: 5b 8d 00 0c sw (sp+12),r13
802231c: 5b 8e 00 08 sw (sp+8),r14
8022320: 5b 9d 00 04 sw (sp+4),ra
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
8022324: 78 04 08 02 mvhi r4,0x802
8022328: 38 84 50 10 ori r4,r4,0x5010
802232c: 28 84 00 00 lw r4,(r4+0)
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
8022330: b8 40 68 00 mv r13,r2
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
8022334: 54 81 00 02 bgu r4,r1,802233c <read+0x30> <== ALWAYS TAKEN
8022338: e0 00 00 10 bi 8022378 <read+0x6c> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
802233c: 34 02 00 03 mvi r2,3
8022340: 5b 83 00 18 sw (sp+24),r3
8022344: 78 0b 08 02 mvhi r11,0x802
8022348: fb ff 7a 21 calli 8000bcc <__ashlsi3>
802234c: 34 02 00 03 mvi r2,3
8022350: 39 6b 57 ec ori r11,r11,0x57ec
8022354: b8 20 70 00 mv r14,r1
8022358: fb ff 7a 1d calli 8000bcc <__ashlsi3>
802235c: 29 6c 00 00 lw r12,(r11+0)
8022360: b5 c1 08 00 add r1,r14,r1
rtems_libio_check_is_open( iop );
8022364: 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 );
8022368: b5 81 60 00 add r12,r12,r1
rtems_libio_check_is_open( iop );
802236c: 29 81 00 18 lw r1,(r12+24)
8022370: 20 22 01 00 andi r2,r1,0x100
8022374: 5c 40 00 04 bne r2,r0,8022384 <read+0x78>
8022378: fb ff c2 38 calli 8012c58 <__errno>
802237c: 34 02 00 09 mvi r2,9
8022380: e0 00 00 0e bi 80223b8 <read+0xac>
rtems_libio_check_buffer( buffer );
8022384: 45 a0 00 05 be r13,r0,8022398 <read+0x8c> <== NEVER TAKEN
rtems_libio_check_count( count );
8022388: b8 60 58 00 mv r11,r3
802238c: 44 60 00 1d be r3,r0,8022400 <read+0xf4> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
8022390: 20 21 00 02 andi r1,r1,0x2
8022394: 5c 20 00 04 bne r1,r0,80223a4 <read+0x98> <== ALWAYS TAKEN
8022398: fb ff c2 30 calli 8012c58 <__errno> <== NOT EXECUTED
802239c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
80223a0: e0 00 00 06 bi 80223b8 <read+0xac> <== NOT EXECUTED
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
80223a4: 29 81 00 40 lw r1,(r12+64)
80223a8: 28 24 00 08 lw r4,(r1+8)
80223ac: 5c 80 00 06 bne r4,r0,80223c4 <read+0xb8> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
80223b0: fb ff c2 2a calli 8012c58 <__errno> <== NOT EXECUTED
80223b4: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
80223b8: 58 22 00 00 sw (r1+0),r2
80223bc: 34 0b ff ff mvi r11,-1
80223c0: e0 00 00 10 bi 8022400 <read+0xf4>
rc = (*iop->handlers->read_h)( iop, buffer, count );
80223c4: b9 a0 10 00 mv r2,r13
80223c8: b9 80 08 00 mv r1,r12
80223cc: d8 80 00 00 call r4
80223d0: b8 20 58 00 mv r11,r1
if ( rc > 0 )
80223d4: 4c 01 00 0b bge r0,r1,8022400 <read+0xf4>
iop->offset += rc;
80223d8: 34 02 00 1f mvi r2,31
80223dc: fb ff 7a 4c calli 8000d0c <__ashrsi3>
80223e0: 29 82 00 14 lw r2,(r12+20)
80223e4: 29 84 00 10 lw r4,(r12+16)
80223e8: b5 62 10 00 add r2,r11,r2
80223ec: f5 62 18 00 cmpgu r3,r11,r2
80223f0: b4 24 08 00 add r1,r1,r4
80223f4: b4 61 08 00 add r1,r3,r1
80223f8: 59 82 00 14 sw (r12+20),r2
80223fc: 59 81 00 10 sw (r12+16),r1
return rc;
}
8022400: b9 60 08 00 mv r1,r11
8022404: 2b 9d 00 04 lw ra,(sp+4)
8022408: 2b 8b 00 14 lw r11,(sp+20)
802240c: 2b 8c 00 10 lw r12,(sp+16)
8022410: 2b 8d 00 0c lw r13,(sp+12)
8022414: 2b 8e 00 08 lw r14,(sp+8)
8022418: 37 9c 00 18 addi sp,sp,24
802241c: 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 31 7e calli 8011390 <__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 39 45 calli 80132b8 <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 31 6a calli 8011390 <__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 31 5b calli 8011390 <__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 20 10 ori r4,r4,0x2010
8003350: 28 84 00 00 lw r4,(r4+0)
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
8003354: b8 40 68 00 mv r13,r2
8003358: b8 60 80 00 mv r16,r3
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
800335c: 54 81 00 02 bgu r4,r1,8003364 <readv+0x3c> <== ALWAYS TAKEN
8003360: e0 00 00 0e bi 8003398 <readv+0x70> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
8003364: 34 02 00 03 mvi r2,3
8003368: fb ff f6 d2 calli 8000eb0 <__ashlsi3>
800336c: 78 0b 08 02 mvhi r11,0x802
8003370: 34 02 00 03 mvi r2,3
8003374: 39 6b 2e f0 ori r11,r11,0x2ef0
8003378: b8 20 70 00 mv r14,r1
800337c: fb ff f6 cd calli 8000eb0 <__ashlsi3>
8003380: 29 6c 00 00 lw r12,(r11+0)
8003384: b5 c1 08 00 add r1,r14,r1
8003388: b5 81 60 00 add r12,r12,r1
rtems_libio_check_is_open( iop );
800338c: 29 81 00 18 lw r1,(r12+24)
8003390: 20 22 01 00 andi r2,r1,0x100
8003394: 5c 40 00 04 bne r2,r0,80033a4 <readv+0x7c> <== ALWAYS TAKEN
8003398: f8 00 2e da calli 800ef00 <__errno> <== NOT EXECUTED
800339c: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
80033a0: e0 00 00 1e bi 8003418 <readv+0xf0> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
80033a4: 20 21 00 02 andi r1,r1,0x2
80033a8: 44 20 00 1a be r1,r0,8003410 <readv+0xe8> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
80033ac: 45 a0 00 19 be r13,r0,8003410 <readv+0xe8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
80033b0: 4a 00 00 02 bg r16,r0,80033b8 <readv+0x90>
80033b4: e0 00 00 17 bi 8003410 <readv+0xe8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
80033b8: 34 01 04 00 mvi r1,1024
80033bc: 4c 30 00 02 bge r1,r16,80033c4 <readv+0x9c> <== ALWAYS TAKEN
80033c0: e0 00 00 14 bi 8003410 <readv+0xe8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
80033c4: 29 81 00 40 lw r1,(r12+64)
80033c8: 28 21 00 08 lw r1,(r1+8)
80033cc: 5c 20 00 04 bne r1,r0,80033dc <readv+0xb4> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
80033d0: f8 00 2e cc calli 800ef00 <__errno> <== NOT EXECUTED
80033d4: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
80033d8: e0 00 00 10 bi 8003418 <readv+0xf0> <== NOT EXECUTED
80033dc: 34 02 00 00 mvi r2,0
80033e0: b9 a0 08 00 mv r1,r13
80033e4: 34 0f 00 01 mvi r15,1
80033e8: b8 40 18 00 mv r3,r2
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ssize_t old;
if ( !iov[v].iov_base )
80033ec: 28 24 00 00 lw r4,(r1+0)
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
80033f0: 34 42 00 01 addi r2,r2,1
ssize_t old;
if ( !iov[v].iov_base )
80033f4: 44 80 00 07 be r4,r0,8003410 <readv+0xe8>
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
80033f8: 28 24 00 04 lw r4,(r1+4)
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
80033fc: 34 21 00 08 addi r1,r1,8
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
8003400: 64 85 00 00 cmpei r5,r4,0
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
8003404: b4 64 20 00 add r4,r3,r4
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
8003408: c8 05 28 00 sub r5,r0,r5
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
800340c: 4c 83 00 05 bge r4,r3,8003420 <readv+0xf8>
rtems_set_errno_and_return_minus_one( EINVAL );
8003410: f8 00 2e bc calli 800ef00 <__errno>
8003414: 34 02 00 16 mvi r2,22
8003418: 58 22 00 00 sw (r1+0),r2
800341c: e0 00 00 13 bi 8003468 <readv+0x140>
if ( iov[v].iov_len )
8003420: a1 e5 78 00 and r15,r15,r5
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
8003424: 4c 50 00 03 bge r2,r16,8003430 <readv+0x108>
8003428: b8 80 18 00 mv r3,r4
800342c: e3 ff ff f0 bi 80033ec <readv+0xc4>
/*
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
8003430: b9 e0 58 00 mv r11,r15
8003434: 45 e0 00 03 be r15,r0,8003440 <readv+0x118>
8003438: 34 0b 00 00 mvi r11,0
800343c: e0 00 00 1c bi 80034ac <readv+0x184>
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
8003440: 29 81 00 40 lw r1,(r12+64)
8003444: 29 a2 00 00 lw r2,(r13+0)
8003448: 29 a3 00 04 lw r3,(r13+4)
800344c: 28 24 00 08 lw r4,(r1+8)
8003450: b9 80 08 00 mv r1,r12
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
8003454: 35 ef 00 01 addi r15,r15,1
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
8003458: d8 80 00 00 call r4
800345c: b8 20 70 00 mv r14,r1
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
8003460: 34 02 00 1f mvi r2,31
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
if ( bytes < 0 )
8003464: 4c 20 00 03 bge r1,r0,8003470 <readv+0x148> <== ALWAYS TAKEN
8003468: 34 0b ff ff mvi r11,-1
800346c: e0 00 00 10 bi 80034ac <readv+0x184>
return -1;
if ( bytes > 0 ) {
8003470: 44 20 00 0b be r1,r0,800349c <readv+0x174> <== NEVER TAKEN
iop->offset += bytes;
8003474: fb ff f6 df calli 8000ff0 <__ashrsi3>
8003478: 29 82 00 14 lw r2,(r12+20)
800347c: 29 84 00 10 lw r4,(r12+16)
total += bytes;
8003480: b5 6e 58 00 add r11,r11,r14
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
8003484: b5 c2 10 00 add r2,r14,r2
8003488: f5 c2 18 00 cmpgu r3,r14,r2
800348c: b4 24 08 00 add r1,r1,r4
8003490: b4 61 08 00 add r1,r3,r1
8003494: 59 81 00 10 sw (r12+16),r1
8003498: 59 82 00 14 sw (r12+20),r2
total += bytes;
}
if (bytes != iov[ v ].iov_len)
800349c: 29 a1 00 04 lw r1,(r13+4)
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
80034a0: 35 ad 00 08 addi r13,r13,8
if ( bytes > 0 ) {
iop->offset += bytes;
total += bytes;
}
if (bytes != iov[ v ].iov_len)
80034a4: 5d c1 00 02 bne r14,r1,80034ac <readv+0x184> <== NEVER TAKEN
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
80034a8: 4a 0f ff e6 bg r16,r15,8003440 <readv+0x118>
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
80034ac: b9 60 08 00 mv r1,r11
80034b0: 2b 9d 00 04 lw ra,(sp+4)
80034b4: 2b 8b 00 1c lw r11,(sp+28)
80034b8: 2b 8c 00 18 lw r12,(sp+24)
80034bc: 2b 8d 00 14 lw r13,(sp+20)
80034c0: 2b 8e 00 10 lw r14,(sp+16)
80034c4: 2b 8f 00 0c lw r15,(sp+12)
80034c8: 2b 90 00 08 lw r16,(sp+8)
80034cc: 37 9c 00 1c addi sp,sp,28
80034d0: c3 a0 00 00 ret
08003988 <realloc>:
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
8003988: 37 9c ff e8 addi sp,sp,-24
800398c: 5b 8b 00 14 sw (sp+20),r11
8003990: 5b 8c 00 10 sw (sp+16),r12
8003994: 5b 8d 00 0c sw (sp+12),r13
8003998: 5b 8e 00 08 sw (sp+8),r14
800399c: 5b 9d 00 04 sw (sp+4),ra
80039a0: 78 03 08 02 mvhi r3,0x802
80039a4: 38 63 58 08 ori r3,r3,0x5808
80039a8: 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())) {
80039ac: 78 04 08 02 mvhi r4,0x802
80039b0: 38 84 5a e0 ori r4,r4,0x5ae0
80039b4: 28 84 00 00 lw r4,(r4+0)
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
80039b8: 34 a5 00 01 addi r5,r5,1
80039bc: b8 20 58 00 mv r11,r1
80039c0: 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())) {
80039c4: 34 01 00 03 mvi r1,3
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
80039c8: 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())) {
80039cc: 5c 81 00 09 bne r4,r1,80039f0 <realloc+0x68> <== NEVER TAKEN
if (_Thread_Dispatch_disable_level > 0)
80039d0: 78 01 08 02 mvhi r1,0x802
80039d4: 38 21 59 44 ori r1,r1,0x5944
80039d8: 28 22 00 00 lw r2,(r1+0)
80039dc: 5c 40 00 36 bne r2,r0,8003ab4 <realloc+0x12c> <== NEVER TAKEN
return (void *) 0;
if (_ISR_Nest_level > 0)
80039e0: 78 01 08 02 mvhi r1,0x802
80039e4: 38 21 59 dc ori r1,r1,0x59dc
80039e8: 28 21 00 00 lw r1,(r1+0)
80039ec: 5c 22 00 32 bne r1,r2,8003ab4 <realloc+0x12c> <== NEVER TAKEN
}
/*
* Continue with realloc().
*/
if ( !ptr )
80039f0: 5d 60 00 05 bne r11,r0,8003a04 <realloc+0x7c>
return malloc( size );
80039f4: b9 80 08 00 mv r1,r12
80039f8: fb ff fc fb calli 8002de4 <malloc>
80039fc: b8 20 58 00 mv r11,r1
8003a00: e0 00 00 2e bi 8003ab8 <realloc+0x130>
if ( !size ) {
8003a04: 5d 80 00 05 bne r12,r0,8003a18 <realloc+0x90> <== ALWAYS TAKEN
free( ptr );
8003a08: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8003a0c: fb ff fc 01 calli 8002a10 <free> <== NOT EXECUTED
8003a10: b9 80 58 00 mv r11,r12 <== NOT EXECUTED
return (void *) 0;
8003a14: e0 00 00 29 bi 8003ab8 <realloc+0x130> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
8003a18: 78 0d 08 02 mvhi r13,0x802
8003a1c: 39 ad 50 1c ori r13,r13,0x501c
8003a20: 29 a1 00 00 lw r1,(r13+0)
8003a24: b9 60 10 00 mv r2,r11
8003a28: 37 83 00 18 addi r3,sp,24
8003a2c: f8 00 0a 12 calli 8006274 <_Protected_heap_Get_block_size>
8003a30: b8 20 70 00 mv r14,r1
8003a34: 5c 20 00 06 bne r1,r0,8003a4c <realloc+0xc4>
errno = EINVAL;
8003a38: f8 00 3c 88 calli 8012c58 <__errno>
8003a3c: 34 02 00 16 mvi r2,22
8003a40: 58 22 00 00 sw (r1+0),r2
8003a44: b9 c0 58 00 mv r11,r14
return (void *) 0;
8003a48: e0 00 00 1c bi 8003ab8 <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 ) ) {
8003a4c: 29 a1 00 00 lw r1,(r13+0)
8003a50: b9 60 10 00 mv r2,r11
8003a54: b9 80 18 00 mv r3,r12
8003a58: f8 00 0a 21 calli 80062dc <_Protected_heap_Resize_block>
8003a5c: b8 20 70 00 mv r14,r1
8003a60: 5c 20 00 16 bne r1,r0,8003ab8 <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 );
8003a64: b9 80 08 00 mv r1,r12
8003a68: fb ff fc df calli 8002de4 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
8003a6c: 78 02 08 02 mvhi r2,0x802
8003a70: 38 42 58 08 ori r2,r2,0x5808
* 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 );
8003a74: b8 20 68 00 mv r13,r1
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
8003a78: 28 41 00 04 lw r1,(r2+4)
8003a7c: 34 21 ff ff addi r1,r1,-1
8003a80: 58 41 00 04 sw (r2+4),r1
if ( !new_area ) {
8003a84: 45 ae 00 0c be r13,r14,8003ab4 <realloc+0x12c>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
8003a88: 2b 81 00 18 lw r1,(sp+24)
8003a8c: b9 80 18 00 mv r3,r12
8003a90: 50 2c 00 02 bgeu r1,r12,8003a98 <realloc+0x110> <== NEVER TAKEN
8003a94: b8 20 18 00 mv r3,r1
8003a98: b9 60 10 00 mv r2,r11
8003a9c: b9 a0 08 00 mv r1,r13
8003aa0: f8 00 3f 14 calli 80136f0 <memcpy>
free( ptr );
8003aa4: b9 60 08 00 mv r1,r11
8003aa8: fb ff fb da calli 8002a10 <free>
8003aac: b9 a0 58 00 mv r11,r13
return new_area;
8003ab0: e0 00 00 02 bi 8003ab8 <realloc+0x130>
8003ab4: 34 0b 00 00 mvi r11,0
}
8003ab8: b9 60 08 00 mv r1,r11
8003abc: 2b 9d 00 04 lw ra,(sp+4)
8003ac0: 2b 8b 00 14 lw r11,(sp+20)
8003ac4: 2b 8c 00 10 lw r12,(sp+16)
8003ac8: 2b 8d 00 0c lw r13,(sp+12)
8003acc: 2b 8e 00 08 lw r14,(sp+8)
8003ad0: 37 9c 00 18 addi sp,sp,24
8003ad4: 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 91 30 ori r1,r1,0x9130
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 37 27 calli 8013f78 <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 91 30 ori r1,r1,0x9130 <== 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 37 1e calli 8013f78 <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 37 0e calli 8013f78 <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 3d e6 calli 8015ae4 <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 3d e0 calli 8015ae4 <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 2f 9c calli 8012270 <__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 2f 89 calli 8012270 <__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
08013688 <rtems_assoc_name_bad>:
uint32_t bad_value
#else
uint32_t bad_value __attribute((unused))
#endif
)
{
8013688: 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;
}
801368c: 38 21 a1 f0 ori r1,r1,0xa1f0 <== NOT EXECUTED
8013690: c3 a0 00 00 ret <== NOT EXECUTED
0800f6bc <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
800f6bc: 37 9c ff f8 addi sp,sp,-8
800f6c0: 5b 8b 00 08 sw (sp+8),r11
800f6c4: 5b 9d 00 04 sw (sp+4),ra
800f6c8: b8 40 58 00 mv r11,r2
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
800f6cc: f8 00 00 0a calli 800f6f4 <rtems_assoc_ptr_by_local>
if (nap)
800f6d0: 44 20 00 03 be r1,r0,800f6dc <rtems_assoc_name_by_local+0x20><== NEVER TAKEN
return nap->name;
800f6d4: 28 21 00 00 lw r1,(r1+0)
800f6d8: e0 00 00 03 bi 800f6e4 <rtems_assoc_name_by_local+0x28>
return rtems_assoc_name_bad(local_value);
800f6dc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800f6e0: f8 00 0f ea calli 8013688 <rtems_assoc_name_bad> <== NOT EXECUTED
}
800f6e4: 2b 9d 00 04 lw ra,(sp+4)
800f6e8: 2b 8b 00 08 lw r11,(sp+8)
800f6ec: 37 9c 00 08 addi sp,sp,8
800f6f0: c3 a0 00 00 ret
08012be8 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
8012be8: 37 9c ff f4 addi sp,sp,-12
8012bec: 5b 8b 00 0c sw (sp+12),r11
8012bf0: 5b 8c 00 08 sw (sp+8),r12
8012bf4: 5b 9d 00 04 sw (sp+4),ra
8012bf8: b8 20 58 00 mv r11,r1
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
8012bfc: 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
)
{
8012c00: b8 40 60 00 mv r12,r2
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
8012c04: 44 20 00 07 be r1,r0,8012c20 <rtems_assoc_ptr_by_local+0x38><== NEVER TAKEN
8012c08: 78 02 08 02 mvhi r2,0x802
8012c0c: 38 42 36 94 ori r2,r2,0x3694
8012c10: f8 00 04 50 calli 8013d50 <strcmp>
8012c14: 5c 20 00 03 bne r1,r0,8012c20 <rtems_assoc_ptr_by_local+0x38><== ALWAYS TAKEN
default_ap = ap++;
8012c18: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8012c1c: e0 00 00 05 bi 8012c30 <rtems_assoc_ptr_by_local+0x48> <== NOT EXECUTED
8012c20: 34 01 00 00 mvi r1,0
8012c24: e0 00 00 04 bi 8012c34 <rtems_assoc_ptr_by_local+0x4c>
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
8012c28: 29 62 00 04 lw r2,(r11+4)
8012c2c: 44 4c 00 05 be r2,r12,8012c40 <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++)
8012c30: 35 6b 00 0c addi r11,r11,12
8012c34: 29 62 00 00 lw r2,(r11+0)
8012c38: 5c 40 ff fc bne r2,r0,8012c28 <rtems_assoc_ptr_by_local+0x40>
8012c3c: b8 20 58 00 mv r11,r1
if (ap->local_value == local_value)
return ap;
return default_ap;
}
8012c40: b9 60 08 00 mv r1,r11
8012c44: 2b 9d 00 04 lw ra,(sp+4)
8012c48: 2b 8b 00 0c lw r11,(sp+12)
8012c4c: 2b 8c 00 08 lw r12,(sp+8)
8012c50: 37 9c 00 0c addi sp,sp,12
8012c54: c3 a0 00 00 ret
08011b00 <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
8011b00: 37 9c ff f4 addi sp,sp,-12
8011b04: 5b 8b 00 0c sw (sp+12),r11
8011b08: 5b 8c 00 08 sw (sp+8),r12
8011b0c: 5b 9d 00 04 sw (sp+4),ra
8011b10: b8 20 58 00 mv r11,r1
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
8011b14: 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
)
{
8011b18: b8 40 60 00 mv r12,r2
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
8011b1c: 44 20 00 07 be r1,r0,8011b38 <rtems_assoc_ptr_by_remote+0x38><== NEVER TAKEN
8011b20: 78 02 08 02 mvhi r2,0x802
8011b24: 38 42 36 94 ori r2,r2,0x3694
8011b28: f8 00 08 8a calli 8013d50 <strcmp>
8011b2c: 5c 20 00 03 bne r1,r0,8011b38 <rtems_assoc_ptr_by_remote+0x38><== ALWAYS TAKEN
default_ap = ap++;
8011b30: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8011b34: e0 00 00 05 bi 8011b48 <rtems_assoc_ptr_by_remote+0x48> <== NOT EXECUTED
8011b38: 34 01 00 00 mvi r1,0
8011b3c: e0 00 00 04 bi 8011b4c <rtems_assoc_ptr_by_remote+0x4c>
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
8011b40: 29 62 00 08 lw r2,(r11+8)
8011b44: 44 4c 00 05 be r2,r12,8011b58 <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++)
8011b48: 35 6b 00 0c addi r11,r11,12
8011b4c: 29 62 00 00 lw r2,(r11+0)
8011b50: 5c 40 ff fc bne r2,r0,8011b40 <rtems_assoc_ptr_by_remote+0x40>
8011b54: b8 20 58 00 mv r11,r1
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
8011b58: b9 60 08 00 mv r1,r11
8011b5c: 2b 9d 00 04 lw ra,(sp+4)
8011b60: 2b 8b 00 0c lw r11,(sp+12)
8011b64: 2b 8c 00 08 lw r12,(sp+8)
8011b68: 37 9c 00 0c addi sp,sp,12
8011b6c: c3 a0 00 00 ret
08012a64 <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
8012a64: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8012a68: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
8012a6c: f8 00 00 5f calli 8012be8 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if (nap)
8012a70: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
8012a74: 44 20 00 02 be r1,r0,8012a7c <rtems_assoc_remote_by_local+0x18><== NOT EXECUTED
return nap->remote_value;
8012a78: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED
return 0;
}
8012a7c: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
8012a80: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8012a84: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8012a88: c3 a0 00 00 ret <== NOT EXECUTED
08000ea0 <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
8000ea0: 37 9c ff f0 addi sp,sp,-16
8000ea4: 5b 8b 00 10 sw (sp+16),r11
8000ea8: 5b 8c 00 0c sw (sp+12),r12
8000eac: 5b 8d 00 08 sw (sp+8),r13
8000eb0: 5b 9d 00 04 sw (sp+4),ra
const char *p;
if ( !name )
8000eb4: 34 0d 00 00 mvi r13,0
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
8000eb8: b8 40 58 00 mv r11,r2
8000ebc: b8 60 60 00 mv r12,r3
const char *p;
if ( !name )
8000ec0: 44 2d 00 1d be r1,r13,8000f34 <rtems_bsp_cmdline_get_param+0x94>
return NULL;
if ( !value )
8000ec4: 44 4d 00 1d be r2,r13,8000f38 <rtems_bsp_cmdline_get_param+0x98>
return NULL;
if ( !length )
8000ec8: 44 6d 00 1b be r3,r13,8000f34 <rtems_bsp_cmdline_get_param+0x94>
return NULL;
value[0] = '\0';
8000ecc: 30 4d 00 00 sb (r2+0),r13
p = rtems_bsp_cmdline_get_param_raw( name );
8000ed0: f8 00 00 21 calli 8000f54 <rtems_bsp_cmdline_get_param_raw>
if ( !p )
8000ed4: 44 2d 00 18 be r1,r13,8000f34 <rtems_bsp_cmdline_get_param+0x94>
8000ed8: b9 a0 20 00 mv r4,r13
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
8000edc: 35 8c ff ff addi r12,r12,-1
value[0] = '\0';
p = rtems_bsp_cmdline_get_param_raw( name );
if ( !p )
8000ee0: b9 60 28 00 mv r5,r11
8000ee4: b9 a0 10 00 mv r2,r13
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
8000ee8: 34 07 00 22 mvi r7,34
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
8000eec: 34 03 00 20 mvi r3,32
8000ef0: e0 00 00 0b bi 8000f1c <rtems_bsp_cmdline_get_param+0x7c>
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
8000ef4: 5c c7 00 03 bne r6,r7,8000f00 <rtems_bsp_cmdline_get_param+0x60>
quotes++;
8000ef8: 34 84 00 01 addi r4,r4,1
8000efc: e0 00 00 03 bi 8000f08 <rtems_bsp_cmdline_get_param+0x68>
} else if ( ((quotes % 2) == 0) && *p == ' ' )
8000f00: 5d 00 00 02 bne r8,r0,8000f08 <rtems_bsp_cmdline_get_param+0x68>
8000f04: 44 c3 00 0d be r6,r3,8000f38 <rtems_bsp_cmdline_get_param+0x98>
break;
value[i++] = *p++;
value[i] = '\0';
8000f08: 34 08 00 00 mvi r8,0
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
break;
value[i++] = *p++;
8000f0c: 30 a6 00 00 sb (r5+0),r6
value[i] = '\0';
8000f10: 30 a8 00 01 sb (r5+1),r8
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
break;
value[i++] = *p++;
8000f14: 34 42 00 01 addi r2,r2,1
value[i] = '\0';
8000f18: 34 a5 00 01 addi r5,r5,1
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
8000f1c: b4 22 30 00 add r6,r1,r2
8000f20: 40 c6 00 00 lbu r6,(r6+0)
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
8000f24: 20 88 00 01 andi r8,r4,0x1
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
8000f28: 44 c0 00 04 be r6,r0,8000f38 <rtems_bsp_cmdline_get_param+0x98>
8000f2c: 55 82 ff f2 bgu r12,r2,8000ef4 <rtems_bsp_cmdline_get_param+0x54><== ALWAYS TAKEN
8000f30: e0 00 00 02 bi 8000f38 <rtems_bsp_cmdline_get_param+0x98> <== NOT EXECUTED
8000f34: 34 0b 00 00 mvi r11,0
return NULL;
copy_string( p, value, length );
return value;
}
8000f38: b9 60 08 00 mv r1,r11
8000f3c: 2b 9d 00 04 lw ra,(sp+4)
8000f40: 2b 8b 00 10 lw r11,(sp+16)
8000f44: 2b 8c 00 0c lw r12,(sp+12)
8000f48: 2b 8d 00 08 lw r13,(sp+8)
8000f4c: 37 9c 00 10 addi sp,sp,16
8000f50: c3 a0 00 00 ret
08000f8c <rtems_bsp_cmdline_get_param_rhs>:
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
8000f8c: 37 9c ff f0 addi sp,sp,-16
8000f90: 5b 8b 00 10 sw (sp+16),r11
8000f94: 5b 8c 00 0c sw (sp+12),r12
8000f98: 5b 8d 00 08 sw (sp+8),r13
8000f9c: 5b 9d 00 04 sw (sp+4),ra
8000fa0: b8 20 68 00 mv r13,r1
8000fa4: b8 40 58 00 mv r11,r2
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
8000fa8: fb ff ff be calli 8000ea0 <rtems_bsp_cmdline_get_param>
8000fac: b8 20 60 00 mv r12,r1
if ( !p )
8000fb0: 44 20 00 1b be r1,r0,800101c <rtems_bsp_cmdline_get_param_rhs+0x90><== NEVER TAKEN
return NULL;
rhs = &p[strlen(name)];
8000fb4: b9 a0 08 00 mv r1,r13
8000fb8: f8 00 32 3c calli 800d8a8 <strlen>
8000fbc: b5 81 18 00 add r3,r12,r1
if ( *rhs != '=' )
8000fc0: 40 62 00 00 lbu r2,(r3+0)
8000fc4: 34 01 00 3d mvi r1,61
8000fc8: 5c 41 00 15 bne r2,r1,800101c <rtems_bsp_cmdline_get_param_rhs+0x90><== NEVER TAKEN
return NULL;
rhs++;
if ( *rhs == '\"' )
8000fcc: 40 62 00 01 lbu r2,(r3+1)
8000fd0: 34 01 00 22 mvi r1,34
rhs = &p[strlen(name)];
if ( *rhs != '=' )
return NULL;
rhs++;
8000fd4: 34 64 00 01 addi r4,r3,1
if ( *rhs == '\"' )
8000fd8: 5c 41 00 02 bne r2,r1,8000fe0 <rtems_bsp_cmdline_get_param_rhs+0x54>
rhs++;
8000fdc: 34 64 00 02 addi r4,r3,2
8000fe0: b9 60 18 00 mv r3,r11
8000fe4: e0 00 00 03 bi 8000ff0 <rtems_bsp_cmdline_get_param_rhs+0x64>
for ( d=value ; *rhs ; )
*d++ = *rhs++;
8000fe8: 30 61 00 00 sb (r3+0),r1
8000fec: 34 63 00 01 addi r3,r3,1
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
8000ff0: 40 81 00 00 lbu r1,(r4+0)
*d++ = *rhs++;
8000ff4: 34 84 00 01 addi r4,r4,1
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
8000ff8: 5c 20 ff fc bne r1,r0,8000fe8 <rtems_bsp_cmdline_get_param_rhs+0x5c>
*d++ = *rhs++;
if ( *(d-1) == '\"' )
8000ffc: 40 64 ff ff lbu r4,(r3+-1)
8001000: 34 02 00 22 mvi r2,34
8001004: 34 61 ff ff addi r1,r3,-1
8001008: 5c 82 00 02 bne r4,r2,8001010 <rtems_bsp_cmdline_get_param_rhs+0x84>
800100c: b8 20 18 00 mv r3,r1
d--;
*d = '\0';
8001010: 34 01 00 00 mvi r1,0
8001014: 30 61 00 00 sb (r3+0),r1
return value;
8001018: e0 00 00 02 bi 8001020 <rtems_bsp_cmdline_get_param_rhs+0x94>
800101c: 34 0b 00 00 mvi r11,0
}
8001020: b9 60 08 00 mv r1,r11
8001024: 2b 9d 00 04 lw ra,(sp+4)
8001028: 2b 8b 00 10 lw r11,(sp+16)
800102c: 2b 8c 00 0c lw r12,(sp+12)
8001030: 2b 8d 00 08 lw r13,(sp+8)
8001034: 37 9c 00 10 addi sp,sp,16
8001038: c3 a0 00 00 ret
0800355c <rtems_clock_get_tod>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod(
rtems_time_of_day *time_buffer
)
{
800355c: 37 9c ff c0 addi sp,sp,-64
8003560: 5b 8b 00 0c sw (sp+12),r11
8003564: 5b 8c 00 08 sw (sp+8),r12
8003568: 5b 9d 00 04 sw (sp+4),ra
800356c: b8 20 58 00 mv r11,r1
rtems_time_of_day *tmbuf = time_buffer;
struct tm time;
struct timeval now;
if ( !time_buffer )
8003570: 34 01 00 09 mvi r1,9
8003574: 45 60 00 2b be r11,r0,8003620 <rtems_clock_get_tod+0xc4> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
8003578: 78 01 08 02 mvhi r1,0x802
800357c: 38 21 c6 c0 ori r1,r1,0xc6c0
8003580: 40 22 00 00 lbu r2,(r1+0)
8003584: 34 01 00 0b mvi r1,11
8003588: 44 40 00 26 be r2,r0,8003620 <rtems_clock_get_tod+0xc4> <== NEVER TAKEN
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
800358c: 90 00 60 00 rcsr r12,IE
8003590: 34 01 ff fe mvi r1,-2
8003594: a1 81 08 00 and r1,r12,r1
8003598: d0 01 00 00 wcsr IE,r1
_TOD_Get( &now );
800359c: 37 81 00 34 addi r1,sp,52
80035a0: f8 00 05 50 calli 8004ae0 <_TOD_Get>
_ISR_Enable(level);
80035a4: d0 0c 00 00 wcsr IE,r12
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
80035a8: 2b 81 00 34 lw r1,(sp+52)
time->tv_usec = useconds;
80035ac: 34 02 03 e8 mvi r2,1000
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
80035b0: 5b 81 00 3c sw (sp+60),r1
time->tv_usec = useconds;
80035b4: 2b 81 00 38 lw r1,(sp+56)
80035b8: f8 00 70 66 calli 801f750 <__divsi3>
80035bc: 5b 81 00 40 sw (sp+64),r1
/* Obtain the current time */
_TOD_Get_timeval( &now );
/* Split it into a closer format */
gmtime_r( &now.tv_sec, &time );
80035c0: 37 82 00 10 addi r2,sp,16
80035c4: 37 81 00 3c addi r1,sp,60
80035c8: f8 00 2f 16 calli 800f220 <gmtime_r>
/* Now adjust it to the RTEMS format */
tmbuf->year = time.tm_year + 1900;
tmbuf->month = time.tm_mon + 1;
tmbuf->day = time.tm_mday;
80035cc: 2b 81 00 1c lw r1,(sp+28)
/* Split it into a closer format */
gmtime_r( &now.tv_sec, &time );
/* Now adjust it to the RTEMS format */
tmbuf->year = time.tm_year + 1900;
80035d0: 2b 83 00 24 lw r3,(sp+36)
tmbuf->month = time.tm_mon + 1;
80035d4: 2b 82 00 20 lw r2,(sp+32)
tmbuf->day = time.tm_mday;
80035d8: 59 61 00 08 sw (r11+8),r1
tmbuf->hour = time.tm_hour;
80035dc: 2b 81 00 18 lw r1,(sp+24)
/* Split it into a closer format */
gmtime_r( &now.tv_sec, &time );
/* Now adjust it to the RTEMS format */
tmbuf->year = time.tm_year + 1900;
80035e0: 34 63 07 6c addi r3,r3,1900
tmbuf->month = time.tm_mon + 1;
80035e4: 34 42 00 01 addi r2,r2,1
tmbuf->day = time.tm_mday;
tmbuf->hour = time.tm_hour;
80035e8: 59 61 00 0c sw (r11+12),r1
tmbuf->minute = time.tm_min;
80035ec: 2b 81 00 14 lw r1,(sp+20)
/* Split it into a closer format */
gmtime_r( &now.tv_sec, &time );
/* Now adjust it to the RTEMS format */
tmbuf->year = time.tm_year + 1900;
80035f0: 59 63 00 00 sw (r11+0),r3
tmbuf->month = time.tm_mon + 1;
80035f4: 59 62 00 04 sw (r11+4),r2
tmbuf->day = time.tm_mday;
tmbuf->hour = time.tm_hour;
tmbuf->minute = time.tm_min;
80035f8: 59 61 00 10 sw (r11+16),r1
tmbuf->second = time.tm_sec;
80035fc: 2b 81 00 10 lw r1,(sp+16)
8003600: 59 61 00 14 sw (r11+20),r1
tmbuf->ticks = now.tv_usec /
8003604: 78 01 08 02 mvhi r1,0x802
8003608: 38 21 40 c4 ori r1,r1,0x40c4
800360c: 28 22 00 0c lw r2,(r1+12)
8003610: 2b 81 00 40 lw r1,(sp+64)
8003614: f8 00 70 ae calli 801f8cc <__udivsi3>
8003618: 59 61 00 18 sw (r11+24),r1
800361c: 34 01 00 00 mvi r1,0
rtems_configuration_get_microseconds_per_tick();
return RTEMS_SUCCESSFUL;
}
8003620: 2b 9d 00 04 lw ra,(sp+4)
8003624: 2b 8b 00 0c lw r11,(sp+12)
8003628: 2b 8c 00 08 lw r12,(sp+8)
800362c: 37 9c 00 40 addi sp,sp,64
8003630: c3 a0 00 00 ret
0801013c <rtems_clock_set_nanoseconds_extension>:
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_set_nanoseconds_extension(
rtems_nanoseconds_extension_routine routine
)
{
801013c: b8 20 18 00 mv r3,r1
if ( !routine )
8010140: 34 01 00 09 mvi r1,9
8010144: 44 60 00 05 be r3,r0,8010158 <rtems_clock_set_nanoseconds_extension+0x1c><== ALWAYS TAKEN
return RTEMS_INVALID_ADDRESS;
_Watchdog_Nanoseconds_since_tick_handler = routine;
8010148: 78 02 08 03 mvhi r2,0x803 <== NOT EXECUTED
801014c: 38 42 fe 4c ori r2,r2,0xfe4c <== NOT EXECUTED
8010150: 58 43 00 00 sw (r2+0),r3 <== NOT EXECUTED
8010154: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
8010158: c3 a0 00 00 ret
08001a5c <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
8001a5c: 37 9c ff 84 addi sp,sp,-124
8001a60: 5b 8b 00 44 sw (sp+68),r11
8001a64: 5b 8c 00 40 sw (sp+64),r12
8001a68: 5b 8d 00 3c sw (sp+60),r13
8001a6c: 5b 8e 00 38 sw (sp+56),r14
8001a70: 5b 8f 00 34 sw (sp+52),r15
8001a74: 5b 90 00 30 sw (sp+48),r16
8001a78: 5b 91 00 2c sw (sp+44),r17
8001a7c: 5b 92 00 28 sw (sp+40),r18
8001a80: 5b 93 00 24 sw (sp+36),r19
8001a84: 5b 94 00 20 sw (sp+32),r20
8001a88: 5b 95 00 1c sw (sp+28),r21
8001a8c: 5b 96 00 18 sw (sp+24),r22
8001a90: 5b 97 00 14 sw (sp+20),r23
8001a94: 5b 98 00 10 sw (sp+16),r24
8001a98: 5b 99 00 0c sw (sp+12),r25
8001a9c: 5b 9b 00 08 sw (sp+8),fp
8001aa0: 5b 9d 00 04 sw (sp+4),ra
8001aa4: b8 40 68 00 mv r13,r2
8001aa8: b8 20 70 00 mv r14,r1
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
8001aac: 44 40 00 5e be r2,r0,8001c24 <rtems_cpu_usage_report_with_plugin+0x1c8><== NEVER TAKEN
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
8001ab0: 37 91 00 70 addi r17,sp,112
8001ab4: ba 20 08 00 mv r1,r17
8001ab8: f8 00 0c 30 calli 8004b78 <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
8001abc: 37 97 00 68 addi r23,sp,104
8001ac0: 78 01 08 02 mvhi r1,0x802
8001ac4: 38 21 cb ec ori r1,r1,0xcbec
8001ac8: ba 20 10 00 mv r2,r17
8001acc: ba e0 18 00 mv r3,r23
8001ad0: f8 00 16 ba calli 80075b8 <_Timespec_Subtract>
}
}
}
#endif
(*print)(
8001ad4: 78 02 08 02 mvhi r2,0x802
8001ad8: b9 c0 08 00 mv r1,r14
8001adc: 78 0b 08 02 mvhi r11,0x802
8001ae0: 38 42 0c 28 ori r2,r2,0xc28
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
8001ae4: 78 0f 08 02 mvhi r15,0x802
}
}
}
#endif
(*print)(
8001ae8: d9 a0 00 00 call r13
8001aec: 39 6b c6 48 ori r11,r11,0xc648
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
8001af0: 39 ef c7 68 ori r15,r15,0xc768
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
8001af4: 37 96 00 48 addi r22,sp,72
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
8001af8: 37 95 00 60 addi r21,sp,96
8001afc: 37 9b 00 78 addi fp,sp,120
/*
* Print the information
*/
(*print)( context,
8001b00: 78 19 08 02 mvhi r25,0x802
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
_Timestamp_Subtract(
8001b04: 37 94 00 58 addi r20,sp,88
8001b08: 78 18 08 02 mvhi r24,0x802
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
8001b0c: 29 61 00 00 lw r1,(r11+0)
8001b10: 44 20 00 38 be r1,r0,8001bf0 <rtems_cpu_usage_report_with_plugin+0x194>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
8001b14: 28 30 00 04 lw r16,(r1+4)
if ( information ) {
8001b18: 34 13 00 04 mvi r19,4
8001b1c: 34 12 00 01 mvi r18,1
8001b20: 5e 00 00 30 bne r16,r0,8001be0 <rtems_cpu_usage_report_with_plugin+0x184><== ALWAYS TAKEN
8001b24: e0 00 00 33 bi 8001bf0 <rtems_cpu_usage_report_with_plugin+0x194><== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
8001b28: 2a 01 00 1c lw r1,(r16+28)
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
8001b2c: 36 52 00 01 addi r18,r18,1
the_thread = (Thread_Control *)information->local_table[ i ];
8001b30: b4 33 08 00 add r1,r1,r19
8001b34: 28 2c 00 00 lw r12,(r1+0)
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
8001b38: 36 73 00 04 addi r19,r19,4
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
8001b3c: 45 80 00 29 be r12,r0,8001be0 <rtems_cpu_usage_report_with_plugin+0x184><== NEVER TAKEN
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
8001b40: 29 81 00 08 lw r1,(r12+8)
8001b44: f8 00 07 74 calli 8003914 <rtems_object_get_name>
(*print)(
8001b48: 29 83 00 08 lw r3,(r12+8)
8001b4c: 78 02 08 02 mvhi r2,0x802
8001b50: 38 42 0d 9c ori r2,r2,0xd9c
8001b54: b9 c0 08 00 mv r1,r14
8001b58: ba c0 20 00 mv r4,r22
8001b5c: d9 a0 00 00 call r13
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
8001b60: 29 81 00 84 lw r1,(r12+132)
8001b64: 5b 81 00 60 sw (sp+96),r1
8001b68: 29 82 00 88 lw r2,(r12+136)
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
8001b6c: 29 e1 00 00 lw r1,(r15+0)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
8001b70: 5b 82 00 64 sw (sp+100),r2
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
8001b74: 28 22 00 08 lw r2,(r1+8)
8001b78: 29 81 00 08 lw r1,(r12+8)
8001b7c: 5c 41 00 09 bne r2,r1,8001ba0 <rtems_cpu_usage_report_with_plugin+0x144>
Timestamp_Control used;
_Timestamp_Subtract(
8001b80: bb 00 08 00 mv r1,r24
8001b84: 38 21 c7 70 ori r1,r1,0xc770
8001b88: ba 20 10 00 mv r2,r17
8001b8c: ba 80 18 00 mv r3,r20
8001b90: f8 00 16 8a calli 80075b8 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
8001b94: ba a0 08 00 mv r1,r21
8001b98: ba 80 10 00 mv r2,r20
8001b9c: f8 00 16 1a calli 8007404 <_Timespec_Add_to>
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
8001ba0: 37 83 00 7c addi r3,sp,124
8001ba4: bb 60 20 00 mv r4,fp
8001ba8: ba a0 08 00 mv r1,r21
8001bac: ba e0 10 00 mv r2,r23
8001bb0: f8 00 16 2c calli 8007460 <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
8001bb4: 2b 81 00 64 lw r1,(sp+100)
8001bb8: 34 02 03 e8 mvi r2,1000
8001bbc: f8 00 77 44 calli 801f8cc <__udivsi3>
8001bc0: 2b 85 00 7c lw r5,(sp+124)
8001bc4: 2b 86 00 78 lw r6,(sp+120)
8001bc8: 2b 83 00 60 lw r3,(sp+96)
8001bcc: bb 20 10 00 mv r2,r25
8001bd0: b8 20 20 00 mv r4,r1
8001bd4: 38 42 0d b0 ori r2,r2,0xdb0
8001bd8: b9 c0 08 00 mv r1,r14
8001bdc: d9 a0 00 00 call r13
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
8001be0: 2e 01 00 10 lhu r1,(r16+16)
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
8001be4: 34 02 00 0d mvi r2,13
8001be8: ba c0 18 00 mv r3,r22
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
8001bec: 50 32 ff cf bgeu r1,r18,8001b28 <rtems_cpu_usage_report_with_plugin+0xcc>
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
8001bf0: 78 01 08 02 mvhi r1,0x802
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
8001bf4: 35 6b 00 04 addi r11,r11,4
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
8001bf8: 38 21 c6 58 ori r1,r1,0xc658
8001bfc: 5d 61 ff c4 bne r11,r1,8001b0c <rtems_cpu_usage_report_with_plugin+0xb0>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
8001c00: 2b 81 00 6c lw r1,(sp+108)
8001c04: 34 02 03 e8 mvi r2,1000
8001c08: f8 00 77 31 calli 801f8cc <__udivsi3>
8001c0c: 2b 83 00 68 lw r3,(sp+104)
8001c10: 78 02 08 02 mvhi r2,0x802
8001c14: b8 20 20 00 mv r4,r1
8001c18: 38 42 0d c8 ori r2,r2,0xdc8
8001c1c: b9 c0 08 00 mv r1,r14
8001c20: d9 a0 00 00 call r13
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
8001c24: 2b 9d 00 04 lw ra,(sp+4)
8001c28: 2b 8b 00 44 lw r11,(sp+68)
8001c2c: 2b 8c 00 40 lw r12,(sp+64)
8001c30: 2b 8d 00 3c lw r13,(sp+60)
8001c34: 2b 8e 00 38 lw r14,(sp+56)
8001c38: 2b 8f 00 34 lw r15,(sp+52)
8001c3c: 2b 90 00 30 lw r16,(sp+48)
8001c40: 2b 91 00 2c lw r17,(sp+44)
8001c44: 2b 92 00 28 lw r18,(sp+40)
8001c48: 2b 93 00 24 lw r19,(sp+36)
8001c4c: 2b 94 00 20 lw r20,(sp+32)
8001c50: 2b 95 00 1c lw r21,(sp+28)
8001c54: 2b 96 00 18 lw r22,(sp+24)
8001c58: 2b 97 00 14 lw r23,(sp+20)
8001c5c: 2b 98 00 10 lw r24,(sp+16)
8001c60: 2b 99 00 0c lw r25,(sp+12)
8001c64: 2b 9b 00 08 lw fp,(sp+8)
8001c68: 37 9c 00 7c addi sp,sp,124
8001c6c: c3 a0 00 00 ret
08012a24 <rtems_deviceio_errno>:
{ 0, 0, 0 },
};
int
rtems_deviceio_errno(rtems_status_code code)
{
8012a24: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
8012a28: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
8012a2c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8012a30: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
8012a34: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8012a38: 38 21 37 2c ori r1,r1,0x372c <== NOT EXECUTED
8012a3c: f8 00 00 0a calli 8012a64 <rtems_assoc_remote_by_local> <== NOT EXECUTED
8012a40: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
8012a44: 44 20 00 03 be r1,r0,8012a50 <rtems_deviceio_errno+0x2c> <== NOT EXECUTED
{
errno = rc;
8012a48: f8 00 00 84 calli 8012c58 <__errno> <== NOT EXECUTED
8012a4c: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
return -1;
}
return -1;
}
8012a50: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8012a54: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8012a58: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8012a5c: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
8012a60: 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
080027e4 <rtems_filesystem_dirname>:
}
int rtems_filesystem_dirname(
const char *pathname
)
{
80027e4: 37 9c ff f8 addi sp,sp,-8
80027e8: 5b 8b 00 08 sw (sp+8),r11
80027ec: 5b 9d 00 04 sw (sp+4),ra
80027f0: b8 20 58 00 mv r11,r1
int len = strlen( pathname );
80027f4: f8 00 45 ca calli 8013f1c <strlen>
80027f8: b5 61 10 00 add r2,r11,r1
while ( len ) {
80027fc: e0 00 00 09 bi 8002820 <rtems_filesystem_dirname+0x3c>
len--;
if ( rtems_filesystem_is_separator( pathname[len] ) )
8002800: 40 43 ff ff lbu r3,(r2+-1)
)
{
int len = strlen( pathname );
while ( len ) {
len--;
8002804: 34 21 ff ff addi r1,r1,-1
if ( rtems_filesystem_is_separator( pathname[len] ) )
8002808: 34 42 ff ff addi r2,r2,-1
800280c: 64 65 00 5c cmpei r5,r3,92
8002810: 64 64 00 2f cmpei r4,r3,47
8002814: b8 a4 20 00 or r4,r5,r4
8002818: 5c 80 00 03 bne r4,r0,8002824 <rtems_filesystem_dirname+0x40>
800281c: 44 64 00 02 be r3,r4,8002824 <rtems_filesystem_dirname+0x40><== NEVER TAKEN
const char *pathname
)
{
int len = strlen( pathname );
while ( len ) {
8002820: 5c 20 ff f8 bne r1,r0,8002800 <rtems_filesystem_dirname+0x1c>
if ( rtems_filesystem_is_separator( pathname[len] ) )
break;
}
return len;
}
8002824: 2b 9d 00 04 lw ra,(sp+4)
8002828: 2b 8b 00 08 lw r11,(sp+8)
800282c: 37 9c 00 08 addi sp,sp,8
8002830: c3 a0 00 00 ret
0800291c <rtems_filesystem_evaluate_path>:
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
800291c: 37 9c ff e4 addi sp,sp,-28
8002920: 5b 8b 00 1c sw (sp+28),r11
8002924: 5b 8c 00 18 sw (sp+24),r12
8002928: 5b 8d 00 14 sw (sp+20),r13
800292c: 5b 8e 00 10 sw (sp+16),r14
8002930: 5b 8f 00 0c sw (sp+12),r15
8002934: 5b 90 00 08 sw (sp+8),r16
8002938: 5b 9d 00 04 sw (sp+4),ra
800293c: b8 20 60 00 mv r12,r1
8002940: b8 40 80 00 mv r16,r2
8002944: b8 60 78 00 mv r15,r3
8002948: b8 80 58 00 mv r11,r4
800294c: b8 a0 70 00 mv r14,r5
/*
* Verify Input parameters.
*/
if ( !pathname )
8002950: 5c 20 00 04 bne r1,r0,8002960 <rtems_filesystem_evaluate_path+0x44><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
8002954: f8 00 40 c1 calli 8012c58 <__errno> <== NOT EXECUTED
8002958: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
800295c: e0 00 00 04 bi 800296c <rtems_filesystem_evaluate_path+0x50><== NOT EXECUTED
if ( !pathloc )
8002960: 5c 80 00 06 bne r4,r0,8002978 <rtems_filesystem_evaluate_path+0x5c><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
8002964: f8 00 40 bd calli 8012c58 <__errno> <== NOT EXECUTED
8002968: 34 02 00 05 mvi r2,5 <== NOT EXECUTED
800296c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8002970: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8002974: e0 00 00 1e bi 80029ec <rtems_filesystem_evaluate_path+0xd0><== NOT EXECUTED
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
8002978: 40 21 00 00 lbu r1,(r1+0)
800297c: 64 2d 00 5c cmpei r13,r1,92
8002980: 64 22 00 2f cmpei r2,r1,47
8002984: b9 a2 68 00 or r13,r13,r2
8002988: 5d a0 00 02 bne r13,r0,8002990 <rtems_filesystem_evaluate_path+0x74>
800298c: 5c 2d 00 0a bne r1,r13,80029b4 <rtems_filesystem_evaluate_path+0x98><== ALWAYS TAKEN
8002990: 78 01 08 02 mvhi r1,0x802
8002994: 38 21 50 f8 ori r1,r1,0x50f8
8002998: 28 24 00 00 lw r4,(r1+0)
800299c: 34 03 00 14 mvi r3,20
80029a0: b9 60 08 00 mv r1,r11
80029a4: 34 82 00 18 addi r2,r4,24
80029a8: f8 00 43 52 calli 80136f0 <memcpy>
80029ac: 34 04 00 01 mvi r4,1
80029b0: e0 00 00 09 bi 80029d4 <rtems_filesystem_evaluate_path+0xb8>
80029b4: 78 01 08 02 mvhi r1,0x802
80029b8: 38 21 50 f8 ori r1,r1,0x50f8
80029bc: 28 24 00 00 lw r4,(r1+0)
80029c0: 34 03 00 14 mvi r3,20
80029c4: b9 60 08 00 mv r1,r11
80029c8: 34 82 00 04 addi r2,r4,4
80029cc: f8 00 43 49 calli 80136f0 <memcpy>
80029d0: 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],
80029d4: ca 04 10 00 sub r2,r16,r4
80029d8: b5 84 08 00 add r1,r12,r4
80029dc: b9 e0 18 00 mv r3,r15
80029e0: b9 60 20 00 mv r4,r11
80029e4: b9 c0 28 00 mv r5,r14
80029e8: fb ff ff 93 calli 8002834 <rtems_filesystem_evaluate_relative_path>
pathnamelen - i,
flags,
pathloc,
follow_link );
}
80029ec: 2b 9d 00 04 lw ra,(sp+4)
80029f0: 2b 8b 00 1c lw r11,(sp+28)
80029f4: 2b 8c 00 18 lw r12,(sp+24)
80029f8: 2b 8d 00 14 lw r13,(sp+20)
80029fc: 2b 8e 00 10 lw r14,(sp+16)
8002a00: 2b 8f 00 0c lw r15,(sp+12)
8002a04: 2b 90 00 08 lw r16,(sp+8)
8002a08: 37 9c 00 1c addi sp,sp,28
8002a0c: c3 a0 00 00 ret
08002834 <rtems_filesystem_evaluate_relative_path>:
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
8002834: 37 9c ff f0 addi sp,sp,-16
8002838: 5b 8b 00 10 sw (sp+16),r11
800283c: 5b 8c 00 0c sw (sp+12),r12
8002840: 5b 8d 00 08 sw (sp+8),r13
8002844: 5b 9d 00 04 sw (sp+4),ra
8002848: b8 a0 68 00 mv r13,r5
800284c: b8 60 60 00 mv r12,r3
8002850: b8 80 58 00 mv r11,r4
/*
* Verify Input parameters.
*/
if ( !pathname )
8002854: 5c 20 00 04 bne r1,r0,8002864 <rtems_filesystem_evaluate_relative_path+0x30><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
8002858: f8 00 41 00 calli 8012c58 <__errno> <== NOT EXECUTED
800285c: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
8002860: e0 00 00 04 bi 8002870 <rtems_filesystem_evaluate_relative_path+0x3c><== NOT EXECUTED
if ( !pathloc )
8002864: 5c 80 00 06 bne r4,r0,800287c <rtems_filesystem_evaluate_relative_path+0x48><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
8002868: f8 00 40 fc calli 8012c58 <__errno> <== NOT EXECUTED
800286c: 34 02 00 05 mvi r2,5 <== NOT EXECUTED
8002870: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8002874: 34 06 ff ff mvi r6,-1 <== NOT EXECUTED
8002878: e0 00 00 22 bi 8002900 <rtems_filesystem_evaluate_relative_path+0xcc><== NOT EXECUTED
if ( !pathloc->ops->evalpath_h )
800287c: 28 85 00 0c lw r5,(r4+12)
8002880: 28 a6 00 00 lw r6,(r5+0)
8002884: 44 c0 00 18 be r6,r0,80028e4 <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 );
8002888: d8 c0 00 00 call r6
800288c: 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 ) {
8002890: 7d a5 00 00 cmpnei r5,r13,0
8002894: 64 21 00 00 cmpei r1,r1,0
8002898: a0 25 28 00 and r5,r1,r5
800289c: 44 a0 00 19 be r5,r0,8002900 <rtems_filesystem_evaluate_relative_path+0xcc>
if ( !pathloc->ops->node_type_h ){
80028a0: 29 61 00 0c lw r1,(r11+12)
80028a4: 28 24 00 10 lw r4,(r1+16)
80028a8: 44 80 00 0b be r4,r0,80028d4 <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 );
80028ac: b9 60 08 00 mv r1,r11
80028b0: d8 80 00 00 call r4
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
80028b4: 34 21 ff fd addi r1,r1,-3
80028b8: 34 02 00 01 mvi r2,1
80028bc: 50 41 00 03 bgeu r2,r1,80028c8 <rtems_filesystem_evaluate_relative_path+0x94>
80028c0: 34 06 00 00 mvi r6,0
80028c4: e0 00 00 0f bi 8002900 <rtems_filesystem_evaluate_relative_path+0xcc>
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
80028c8: 29 61 00 0c lw r1,(r11+12)
80028cc: 28 24 00 34 lw r4,(r1+52)
80028d0: 5c 80 00 08 bne r4,r0,80028f0 <rtems_filesystem_evaluate_relative_path+0xbc><== ALWAYS TAKEN
rtems_filesystem_freenode( pathloc );
80028d4: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
80028d8: 44 44 00 03 be r2,r4,80028e4 <rtems_filesystem_evaluate_relative_path+0xb0><== NOT EXECUTED
80028dc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80028e0: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
80028e4: f8 00 40 dd calli 8012c58 <__errno> <== NOT EXECUTED
80028e8: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
80028ec: e3 ff ff e1 bi 8002870 <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 );
80028f0: b9 60 08 00 mv r1,r11
80028f4: b9 80 10 00 mv r2,r12
80028f8: d8 80 00 00 call r4
80028fc: b8 20 30 00 mv r6,r1
}
}
return result;
}
8002900: b8 c0 08 00 mv r1,r6
8002904: 2b 9d 00 04 lw ra,(sp+4)
8002908: 2b 8b 00 10 lw r11,(sp+16)
800290c: 2b 8c 00 0c lw r12,(sp+12)
8002910: 2b 8d 00 08 lw r13,(sp+8)
8002914: 37 9c 00 10 addi sp,sp,16
8002918: c3 a0 00 00 ret
080025f0 <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 )
{
80025f0: 37 9c ff d8 addi sp,sp,-40
80025f4: 5b 8b 00 10 sw (sp+16),r11
80025f8: 5b 8c 00 0c sw (sp+12),r12
80025fc: 5b 8d 00 08 sw (sp+8),r13
8002600: 5b 9d 00 04 sw (sp+4),ra
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
8002604: 78 0b 08 02 mvhi r11,0x802
8002608: 39 6b 50 f8 ori r11,r11,0x50f8
800260c: 29 62 00 00 lw r2,(r11+0)
8002610: 34 01 00 12 mvi r1,18
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
8002614: 34 0d 00 00 mvi r13,0
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
8002618: 58 41 00 2c sw (r2+44),r1
init_fs_mount_table();
800261c: f8 00 02 94 calli 800306c <init_fs_mount_table>
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
8002620: 78 01 08 02 mvhi r1,0x802
8002624: 38 21 2a a8 ori r1,r1,0x2aa8
8002628: 28 21 00 00 lw r1,(r1+0)
800262c: 5c 2d 00 04 bne r1,r13,800263c <rtems_filesystem_initialize+0x4c><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0001 );
8002630: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED
8002634: 38 21 00 01 ori r1,r1,0x1 <== NOT EXECUTED
8002638: e0 00 00 0e bi 8002670 <rtems_filesystem_initialize+0x80> <== NOT EXECUTED
mt = &rtems_filesystem_mount_table[0];
800263c: 78 01 08 02 mvhi r1,0x802
8002640: 38 21 50 18 ori r1,r1,0x5018
8002644: 28 24 00 00 lw r4,(r1+0)
status = mount(
8002648: 37 81 00 28 addi r1,sp,40
800264c: 28 82 00 00 lw r2,(r4+0)
8002650: 28 85 00 0c lw r5,(r4+12)
8002654: 28 83 00 04 lw r3,(r4+4)
8002658: 28 84 00 08 lw r4,(r4+8)
800265c: f8 00 02 8c calli 800308c <mount>
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
8002660: 34 02 ff ff mvi r2,-1
8002664: 5c 22 00 04 bne r1,r2,8002674 <rtems_filesystem_initialize+0x84><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0002 );
8002668: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED
800266c: 38 21 00 02 ori r1,r1,0x2 <== NOT EXECUTED
8002670: f8 00 08 62 calli 80047f8 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_filesystem_link_counts = 0;
8002674: 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;
8002678: 2b 82 00 28 lw r2,(sp+40)
800267c: 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;
8002680: 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;
8002684: 34 42 00 1c addi r2,r2,28
8002688: 34 21 00 18 addi r1,r1,24
800268c: f8 00 44 19 calli 80136f0 <memcpy>
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8002690: 37 8c 00 14 addi r12,sp,20
8002694: 78 01 08 02 mvhi r1,0x802
8002698: b9 80 20 00 mv r4,r12
800269c: b9 a0 28 00 mv r5,r13
80026a0: 34 02 00 01 mvi r2,1
80026a4: b9 a0 18 00 mv r3,r13
80026a8: 38 21 2c f8 ori r1,r1,0x2cf8
80026ac: f8 00 00 9c calli 800291c <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
80026b0: 29 61 00 00 lw r1,(r11+0)
80026b4: b9 80 10 00 mv r2,r12
80026b8: 34 03 00 14 mvi r3,20
80026bc: 34 21 00 18 addi r1,r1,24
80026c0: f8 00 44 0c calli 80136f0 <memcpy>
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
80026c4: 78 01 08 02 mvhi r1,0x802
80026c8: b9 a0 18 00 mv r3,r13
80026cc: b9 a0 28 00 mv r5,r13
80026d0: 34 02 00 01 mvi r2,1
80026d4: b9 80 20 00 mv r4,r12
80026d8: 38 21 2c f8 ori r1,r1,0x2cf8
80026dc: f8 00 00 90 calli 800291c <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
80026e0: 29 61 00 00 lw r1,(r11+0)
80026e4: b9 80 10 00 mv r2,r12
80026e8: 34 03 00 14 mvi r3,20
80026ec: 34 21 00 04 addi r1,r1,4
80026f0: f8 00 44 00 calli 80136f0 <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);
80026f4: 78 01 08 02 mvhi r1,0x802
80026f8: 38 21 2c fc ori r1,r1,0x2cfc
80026fc: 34 02 01 ff mvi r2,511
8002700: f8 00 01 fd calli 8002ef4 <mkdir>
if ( status != 0 )
8002704: 44 20 00 04 be r1,r0,8002714 <rtems_filesystem_initialize+0x124><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0003 );
8002708: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED
800270c: 38 21 00 03 ori r1,r1,0x3 <== NOT EXECUTED
8002710: e3 ff ff d8 bi 8002670 <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.
*/
}
8002714: 2b 9d 00 04 lw ra,(sp+4)
8002718: 2b 8b 00 10 lw r11,(sp+16)
800271c: 2b 8c 00 0c lw r12,(sp+12)
8002720: 2b 8d 00 08 lw r13,(sp+8)
8002724: 37 9c 00 28 addi sp,sp,40
8002728: 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
080027a8 <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
80027a8: b8 20 20 00 mv r4,r1
80027ac: 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 ) )
80027b0: e0 00 00 02 bi 80027b8 <rtems_filesystem_prefix_separators+0x10>
{
pathname++;
pathnamelen--;
stripped++;
80027b4: 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 ) )
80027b8: b4 81 18 00 add r3,r4,r1
80027bc: 40 63 00 00 lbu r3,(r3+0)
80027c0: fc 41 38 00 cmpne r7,r2,r1
80027c4: 7c 65 00 00 cmpnei r5,r3,0
80027c8: 64 66 00 2f cmpei r6,r3,47
80027cc: 64 63 00 5c cmpei r3,r3,92
80027d0: a0 e5 28 00 and r5,r7,r5
80027d4: b8 66 18 00 or r3,r3,r6
80027d8: 44 a0 00 02 be r5,r0,80027e0 <rtems_filesystem_prefix_separators+0x38><== NEVER TAKEN
80027dc: 5c 60 ff f6 bne r3,r0,80027b4 <rtems_filesystem_prefix_separators+0xc>
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
80027e0: c3 a0 00 00 ret
0800249c <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
800249c: 37 9c ff d0 addi sp,sp,-48 <== NOT EXECUTED
80024a0: 5b 8b 00 1c sw (sp+28),r11 <== NOT EXECUTED
80024a4: 5b 8c 00 18 sw (sp+24),r12 <== NOT EXECUTED
80024a8: 5b 8d 00 14 sw (sp+20),r13 <== NOT EXECUTED
80024ac: 5b 8e 00 10 sw (sp+16),r14 <== NOT EXECUTED
80024b0: 5b 8f 00 0c sw (sp+12),r15 <== NOT EXECUTED
80024b4: 5b 90 00 08 sw (sp+8),r16 <== NOT EXECUTED
80024b8: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
80024bc: b8 40 68 00 mv r13,r2 <== NOT EXECUTED
80024c0: 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 );
80024c4: 37 8b 00 20 addi r11,sp,32 <== NOT EXECUTED
80024c8: f8 00 46 95 calli 8013f1c <strlen> <== NOT EXECUTED
80024cc: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
80024d0: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
80024d4: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
80024d8: b9 60 20 00 mv r4,r11 <== NOT EXECUTED
80024dc: 34 05 00 01 mvi r5,1 <== NOT EXECUTED
80024e0: f8 00 01 0f calli 800291c <rtems_filesystem_evaluate_path> <== NOT EXECUTED
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
80024e4: 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 );
80024e8: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
the_jnode = loc.node_access;
80024ec: 2b 90 00 20 lw r16,(sp+32) <== NOT EXECUTED
if ( !loc.ops->node_type_h ) {
80024f0: 28 62 00 10 lw r2,(r3+16) <== NOT EXECUTED
80024f4: 5c 40 00 0a bne r2,r0,800251c <rtems_io_lookup_name+0x80> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
80024f8: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED
80024fc: 44 62 00 03 be r3,r2,8002508 <rtems_io_lookup_name+0x6c> <== NOT EXECUTED
8002500: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8002504: d8 60 00 00 call r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8002508: f8 00 41 d4 calli 8012c58 <__errno> <== NOT EXECUTED
800250c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8002510: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8002514: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8002518: e0 00 00 20 bi 8002598 <rtems_io_lookup_name+0xfc> <== NOT EXECUTED
}
node_type = (*loc.ops->node_type_h)( &loc );
800251c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8002520: d8 40 00 00 call r2 <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
8002524: 7c 22 00 02 cmpnei r2,r1,2 <== NOT EXECUTED
8002528: 7d ce 00 00 cmpnei r14,r14,0 <== NOT EXECUTED
800252c: 2b 8c 00 2c lw r12,(sp+44) <== NOT EXECUTED
8002530: b8 4e 70 00 or r14,r2,r14 <== NOT EXECUTED
8002534: 45 c0 00 07 be r14,r0,8002550 <rtems_io_lookup_name+0xb4> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
8002538: 45 80 00 15 be r12,r0,800258c <rtems_io_lookup_name+0xf0> <== NOT EXECUTED
800253c: 29 82 00 1c lw r2,(r12+28) <== NOT EXECUTED
8002540: 44 40 00 13 be r2,r0,800258c <rtems_io_lookup_name+0xf0> <== NOT EXECUTED
8002544: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8002548: d8 40 00 00 call r2 <== NOT EXECUTED
800254c: e0 00 00 10 bi 800258c <rtems_io_lookup_name+0xf0> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
8002550: 59 af 00 00 sw (r13+0),r15 <== NOT EXECUTED
device_info->device_name_length = strlen( name );
8002554: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
8002558: f8 00 46 71 calli 8013f1c <strlen> <== NOT EXECUTED
800255c: 59 a1 00 04 sw (r13+4),r1 <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
8002560: 2a 01 00 50 lw r1,(r16+80) <== NOT EXECUTED
8002564: 59 a1 00 08 sw (r13+8),r1 <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
8002568: 2a 10 00 54 lw r16,(r16+84) <== NOT EXECUTED
800256c: 59 b0 00 0c sw (r13+12),r16 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
8002570: 45 8e 00 09 be r12,r14,8002594 <rtems_io_lookup_name+0xf8> <== NOT EXECUTED
8002574: 29 82 00 1c lw r2,(r12+28) <== NOT EXECUTED
8002578: 44 40 00 07 be r2,r0,8002594 <rtems_io_lookup_name+0xf8> <== NOT EXECUTED
800257c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8002580: d8 40 00 00 call r2 <== NOT EXECUTED
8002584: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
8002588: e0 00 00 04 bi 8002598 <rtems_io_lookup_name+0xfc> <== NOT EXECUTED
800258c: 34 01 00 0d mvi r1,13 <== NOT EXECUTED
8002590: e0 00 00 02 bi 8002598 <rtems_io_lookup_name+0xfc> <== NOT EXECUTED
8002594: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
8002598: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800259c: 2b 8b 00 1c lw r11,(sp+28) <== NOT EXECUTED
80025a0: 2b 8c 00 18 lw r12,(sp+24) <== NOT EXECUTED
80025a4: 2b 8d 00 14 lw r13,(sp+20) <== NOT EXECUTED
80025a8: 2b 8e 00 10 lw r14,(sp+16) <== NOT EXECUTED
80025ac: 2b 8f 00 0c lw r15,(sp+12) <== NOT EXECUTED
80025b0: 2b 90 00 08 lw r16,(sp+8) <== NOT EXECUTED
80025b4: 37 9c 00 30 addi sp,sp,48 <== NOT EXECUTED
80025b8: c3 a0 00 00 ret <== NOT EXECUTED
080052dc <rtems_iterate_over_all_threads>:
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
80052dc: 37 9c ff e4 addi sp,sp,-28
80052e0: 5b 8b 00 1c sw (sp+28),r11
80052e4: 5b 8c 00 18 sw (sp+24),r12
80052e8: 5b 8d 00 14 sw (sp+20),r13
80052ec: 5b 8e 00 10 sw (sp+16),r14
80052f0: 5b 8f 00 0c sw (sp+12),r15
80052f4: 5b 90 00 08 sw (sp+8),r16
80052f8: 5b 9d 00 04 sw (sp+4),ra
80052fc: b8 20 78 00 mv r15,r1
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
8005300: 44 20 00 17 be r1,r0,800535c <rtems_iterate_over_all_threads+0x80><== NEVER TAKEN
8005304: 78 0b 08 02 mvhi r11,0x802
8005308: 39 6b c6 48 ori r11,r11,0xc648
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
800530c: 35 70 00 10 addi r16,r11,16
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
8005310: 29 61 00 00 lw r1,(r11+0)
8005314: 44 20 00 10 be r1,r0,8005354 <rtems_iterate_over_all_threads+0x78>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
8005318: 28 2c 00 04 lw r12,(r1+4)
if ( !information )
800531c: 34 0e 00 04 mvi r14,4
8005320: 34 0d 00 01 mvi r13,1
8005324: 5d 80 00 0a bne r12,r0,800534c <rtems_iterate_over_all_threads+0x70>
8005328: e0 00 00 0b bi 8005354 <rtems_iterate_over_all_threads+0x78>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
800532c: 29 81 00 1c lw r1,(r12+28)
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
8005330: 35 ad 00 01 addi r13,r13,1
the_thread = (Thread_Control *)information->local_table[ i ];
8005334: b4 2e 08 00 add r1,r1,r14
8005338: 28 22 00 00 lw r2,(r1+0)
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
800533c: 35 ce 00 04 addi r14,r14,4
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
(*routine)(the_thread);
8005340: b8 40 08 00 mv r1,r2
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
8005344: 44 40 00 02 be r2,r0,800534c <rtems_iterate_over_all_threads+0x70><== NEVER TAKEN
continue;
(*routine)(the_thread);
8005348: d9 e0 00 00 call r15
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
800534c: 2d 81 00 10 lhu r1,(r12+16)
8005350: 50 2d ff f7 bgeu r1,r13,800532c <rtems_iterate_over_all_threads+0x50>
8005354: 35 6b 00 04 addi r11,r11,4
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
8005358: 5d 70 ff ee bne r11,r16,8005310 <rtems_iterate_over_all_threads+0x34>
(*routine)(the_thread);
}
}
}
800535c: 2b 9d 00 04 lw ra,(sp+4)
8005360: 2b 8b 00 1c lw r11,(sp+28)
8005364: 2b 8c 00 18 lw r12,(sp+24)
8005368: 2b 8d 00 14 lw r13,(sp+20)
800536c: 2b 8e 00 10 lw r14,(sp+16)
8005370: 2b 8f 00 0c lw r15,(sp+12)
8005374: 2b 90 00 08 lw r16,(sp+8)
8005378: 37 9c 00 1c addi sp,sp,28
800537c: c3 a0 00 00 ret
0800d3cc <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 )
{
800d3cc: 37 9c ff ec addi sp,sp,-20
800d3d0: 5b 8b 00 10 sw (sp+16),r11
800d3d4: 5b 8c 00 0c sw (sp+12),r12
800d3d8: 5b 8d 00 08 sw (sp+8),r13
800d3dc: 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 );
800d3e0: 78 01 08 02 mvhi r1,0x802
800d3e4: 38 21 57 f4 ori r1,r1,0x57f4
800d3e8: 28 21 00 00 lw r1,(r1+0)
800d3ec: 34 02 00 00 mvi r2,0
rtems_status_code rc;
rtems_id sema;
rtems_libio_lock();
if (rtems_libio_iop_freelist) {
800d3f0: 78 0c 08 02 mvhi r12,0x802
800d3f4: b8 40 18 00 mv r3,r2
800d3f8: 39 8c 57 f0 ori r12,r12,0x57f0
800d3fc: fb ff db cc calli 800432c <rtems_semaphore_obtain>
800d400: 29 81 00 00 lw r1,(r12+0)
800d404: 44 20 00 1f be r1,r0,800d480 <rtems_libio_allocate+0xb4>
rc = rtems_semaphore_create(
800d408: 78 02 08 02 mvhi r2,0x802
800d40c: 38 42 57 ec ori r2,r2,0x57ec
800d410: 28 43 00 00 lw r3,(r2+0)
800d414: 34 02 00 03 mvi r2,3
800d418: c8 23 08 00 sub r1,r1,r3
800d41c: fb ff ce 3c calli 8000d0c <__ashrsi3>
800d420: 78 02 38 e3 mvhi r2,0x38e3
800d424: 38 42 8e 39 ori r2,r2,0x8e39
800d428: f8 00 51 d4 calli 8021b78 <__mulsi3>
800d42c: 78 02 4c 42 mvhi r2,0x4c42
800d430: 38 42 49 00 ori r2,r2,0x4900
800d434: b8 22 08 00 or r1,r1,r2
800d438: 34 03 00 54 mvi r3,84
800d43c: 34 02 00 01 mvi r2,1
800d440: 34 04 00 00 mvi r4,0
800d444: 37 85 00 14 addi r5,sp,20
800d448: fb ff db 0b calli 8004074 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
0,
&sema
);
if (rc != RTEMS_SUCCESSFUL)
800d44c: 5c 20 00 0d bne r1,r0,800d480 <rtems_libio_allocate+0xb4> <== NEVER TAKEN
goto failed;
iop = rtems_libio_iop_freelist;
800d450: 29 8b 00 00 lw r11,(r12+0)
next = iop->data1;
(void) memset( iop, 0, sizeof(rtems_libio_t) );
800d454: b8 20 10 00 mv r2,r1
800d458: 34 03 00 48 mvi r3,72
800d45c: b9 60 08 00 mv r1,r11
&sema
);
if (rc != RTEMS_SUCCESSFUL)
goto failed;
iop = rtems_libio_iop_freelist;
next = iop->data1;
800d460: 29 6d 00 38 lw r13,(r11+56)
(void) memset( iop, 0, sizeof(rtems_libio_t) );
800d464: f8 00 19 01 calli 8013868 <memset>
iop->flags = LIBIO_FLAGS_OPEN;
800d468: 34 01 01 00 mvi r1,256
800d46c: 59 61 00 18 sw (r11+24),r1
iop->sem = sema;
800d470: 2b 81 00 14 lw r1,(sp+20)
rtems_libio_iop_freelist = next;
800d474: 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;
800d478: 59 61 00 30 sw (r11+48),r1
rtems_libio_iop_freelist = next;
goto done;
800d47c: e0 00 00 02 bi 800d484 <rtems_libio_allocate+0xb8>
800d480: 34 0b 00 00 mvi r11,0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
800d484: 78 01 08 02 mvhi r1,0x802
800d488: 38 21 57 f4 ori r1,r1,0x57f4
800d48c: 28 21 00 00 lw r1,(r1+0)
800d490: fb ff db f7 calli 800446c <rtems_semaphore_release>
iop = 0;
done:
rtems_libio_unlock();
return iop;
}
800d494: b9 60 08 00 mv r1,r11
800d498: 2b 9d 00 04 lw ra,(sp+4)
800d49c: 2b 8b 00 10 lw r11,(sp+16)
800d4a0: 2b 8c 00 0c lw r12,(sp+12)
800d4a4: 2b 8d 00 08 lw r13,(sp+8)
800d4a8: 37 9c 00 14 addi sp,sp,20
800d4ac: c3 a0 00 00 ret
0800d354 <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
800d354: 37 9c ff f8 addi sp,sp,-8
800d358: 5b 8b 00 08 sw (sp+8),r11
800d35c: 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 );
800d360: 78 02 08 02 mvhi r2,0x802
800d364: 38 42 57 f4 ori r2,r2,0x57f4
800d368: b8 20 58 00 mv r11,r1
800d36c: 28 41 00 00 lw r1,(r2+0)
800d370: 34 02 00 00 mvi r2,0
800d374: b8 40 18 00 mv r3,r2
800d378: fb ff db ed calli 800432c <rtems_semaphore_obtain>
rtems_libio_lock();
if (iop->sem)
800d37c: 29 61 00 30 lw r1,(r11+48)
800d380: 44 20 00 02 be r1,r0,800d388 <rtems_libio_free+0x34> <== NEVER TAKEN
rtems_semaphore_delete(iop->sem);
800d384: fb ff db be calli 800427c <rtems_semaphore_delete>
iop->flags &= ~LIBIO_FLAGS_OPEN;
800d388: 29 63 00 18 lw r3,(r11+24)
800d38c: 34 01 fe ff mvi r1,-257
iop->data1 = rtems_libio_iop_freelist;
800d390: 78 02 08 02 mvhi r2,0x802
800d394: 38 42 57 f0 ori r2,r2,0x57f0
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
800d398: a0 61 18 00 and r3,r3,r1
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
800d39c: 78 01 08 02 mvhi r1,0x802
800d3a0: 59 63 00 18 sw (r11+24),r3
800d3a4: 38 21 57 f4 ori r1,r1,0x57f4
iop->data1 = rtems_libio_iop_freelist;
800d3a8: 28 43 00 00 lw r3,(r2+0)
800d3ac: 28 21 00 00 lw r1,(r1+0)
rtems_libio_iop_freelist = iop;
800d3b0: 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;
800d3b4: 59 63 00 38 sw (r11+56),r3
800d3b8: fb ff dc 2d calli 800446c <rtems_semaphore_release>
rtems_libio_iop_freelist = iop;
rtems_libio_unlock();
}
800d3bc: 2b 9d 00 04 lw ra,(sp+4)
800d3c0: 2b 8b 00 08 lw r11,(sp+8)
800d3c4: 37 9c 00 08 addi sp,sp,8
800d3c8: c3 a0 00 00 ret
08002b78 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
8002b78: 37 9c ff f8 addi sp,sp,-8
8002b7c: 5b 8b 00 08 sw (sp+8),r11
8002b80: 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)
8002b84: 78 0b 08 02 mvhi r11,0x802
8002b88: 39 6b 50 10 ori r11,r11,0x5010
8002b8c: 29 61 00 00 lw r1,(r11+0)
8002b90: 44 20 00 16 be r1,r0,8002be8 <rtems_libio_init+0x70> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
8002b94: 34 02 00 48 mvi r2,72
8002b98: fb ff fe e5 calli 800272c <calloc>
8002b9c: 78 02 08 02 mvhi r2,0x802
8002ba0: 38 42 57 ec ori r2,r2,0x57ec
8002ba4: 58 41 00 00 sw (r2+0),r1
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
8002ba8: 5c 20 00 03 bne r1,r0,8002bb4 <rtems_libio_init+0x3c> <== ALWAYS TAKEN
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
8002bac: 34 01 00 1a mvi r1,26 <== NOT EXECUTED
8002bb0: e0 00 00 18 bi 8002c10 <rtems_libio_init+0x98> <== NOT EXECUTED
iop = rtems_libio_iop_freelist = rtems_libio_iops;
8002bb4: 78 02 08 02 mvhi r2,0x802
8002bb8: 38 42 57 f0 ori r2,r2,0x57f0
8002bbc: 58 41 00 00 sw (r2+0),r1
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
8002bc0: 29 64 00 00 lw r4,(r11+0)
8002bc4: 34 02 00 00 mvi r2,0
8002bc8: e0 00 00 02 bi 8002bd0 <rtems_libio_init+0x58>
iop->data1 = iop + 1;
8002bcc: 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++)
8002bd0: 34 42 00 01 addi r2,r2,1
iop->data1 = iop + 1;
8002bd4: 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++)
8002bd8: 34 21 00 48 addi r1,r1,72
8002bdc: 54 82 ff fc bgu r4,r2,8002bcc <rtems_libio_init+0x54>
iop->data1 = iop + 1;
iop->data1 = NULL;
8002be0: 34 01 00 00 mvi r1,0
8002be4: 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(
8002be8: 78 01 4c 42 mvhi r1,0x4c42
8002bec: 78 05 08 02 mvhi r5,0x802
8002bf0: 34 03 00 54 mvi r3,84
8002bf4: 38 21 49 4f ori r1,r1,0x494f
8002bf8: 38 a5 57 f4 ori r5,r5,0x57f4
8002bfc: 34 02 00 01 mvi r2,1
8002c00: 34 04 00 00 mvi r4,0
8002c04: f8 00 05 1c calli 8004074 <rtems_semaphore_create>
8002c08: 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 )
8002c0c: 44 20 00 02 be r1,r0,8002c14 <rtems_libio_init+0x9c> <== ALWAYS TAKEN
rtems_fatal_error_occurred( rc );
8002c10: f8 00 06 fa calli 80047f8 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
8002c14: 78 02 08 02 mvhi r2,0x802
8002c18: 38 42 50 0c ori r2,r2,0x500c
8002c1c: 28 41 00 00 lw r1,(r2+0)
8002c20: 44 23 00 02 be r1,r3,8002c28 <rtems_libio_init+0xb0> <== NEVER TAKEN
(* rtems_fs_init_helper)();
8002c24: d8 20 00 00 call r1
}
8002c28: 2b 9d 00 04 lw ra,(sp+4)
8002c2c: 2b 8b 00 08 lw r11,(sp+8)
8002c30: 37 9c 00 08 addi sp,sp,8
8002c34: 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 02 mvhi r11,0x802
8002d18: 39 6b 00 f8 ori r11,r11,0xf8
8002d1c: 29 62 00 00 lw r2,(r11+0)
8002d20: 78 01 08 02 mvhi r1,0x802
8002d24: 38 21 07 64 ori r1,r1,0x764
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 02 mvhi r11,0x802
8002d78: 39 6b 00 f8 ori r11,r11,0xf8
8002d7c: 29 6d 00 00 lw r13,(r11+0)
8002d80: 78 02 08 02 mvhi r2,0x802
8002d84: 38 42 07 64 ori r2,r2,0x764
8002d88: 34 03 00 48 mvi r3,72
8002d8c: b9 a0 08 00 mv r1,r13
8002d90: f8 00 30 41 calli 800ee94 <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 02 mvhi r1,0x802
8002d98: 38 21 07 58 ori r1,r1,0x758
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 30 38 calli 800ee94 <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 e0 28 ori r1,r1,0xe028
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 30 2b calli 800ee94 <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 e0 28 ori r1,r1,0xe028
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 30 1f calli 800ee94 <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 02 mvhi r2,0x802 <== NOT EXECUTED
8002c4c: 38 42 00 f8 ori r2,r2,0xf8 <== 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 02 mvhi r11,0x802 <== NOT EXECUTED
8002c78: 39 6b 00 f8 ori r11,r11,0xf8 <== 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 02 mvhi r1,0x802 <== NOT EXECUTED
8002cbc: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8002cc0: 38 21 00 f8 ori r1,r1,0xf8 <== NOT EXECUTED
8002cc4: 38 42 07 64 ori r2,r2,0x764 <== 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
0800d1b4 <rtems_libio_to_fcntl_flags>:
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
800d1b4: 37 9c ff f8 addi sp,sp,-8
800d1b8: 5b 8b 00 08 sw (sp+8),r11
800d1bc: 5b 9d 00 04 sw (sp+4),ra
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
800d1c0: 34 03 00 06 mvi r3,6
800d1c4: 20 24 00 06 andi r4,r1,0x6
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
800d1c8: b8 20 58 00 mv r11,r1
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
800d1cc: 34 02 00 02 mvi r2,2
800d1d0: 44 83 00 07 be r4,r3,800d1ec <rtems_libio_to_fcntl_flags+0x38><== NEVER TAKEN
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
800d1d4: a0 22 18 00 and r3,r1,r2
800d1d8: 34 02 00 00 mvi r2,0
800d1dc: 5c 62 00 04 bne r3,r2,800d1ec <rtems_libio_to_fcntl_flags+0x38><== ALWAYS TAKEN
800d1e0: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
800d1e4: fb ff ce a2 calli 8000c6c <__lshrsi3> <== NOT EXECUTED
800d1e8: 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 ) {
800d1ec: 21 61 00 01 andi r1,r11,0x1
800d1f0: 44 20 00 02 be r1,r0,800d1f8 <rtems_libio_to_fcntl_flags+0x44>
fcntl_flags |= O_NONBLOCK;
800d1f4: 38 42 40 00 ori r2,r2,0x4000
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
800d1f8: 21 61 02 00 andi r1,r11,0x200
800d1fc: 44 20 00 02 be r1,r0,800d204 <rtems_libio_to_fcntl_flags+0x50>
fcntl_flags |= O_APPEND;
800d200: 38 42 00 08 ori r2,r2,0x8
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
800d204: 21 6b 04 00 andi r11,r11,0x400
800d208: 45 60 00 02 be r11,r0,800d210 <rtems_libio_to_fcntl_flags+0x5c>
fcntl_flags |= O_CREAT;
800d20c: 38 42 02 00 ori r2,r2,0x200
}
return fcntl_flags;
}
800d210: b8 40 08 00 mv r1,r2
800d214: 2b 9d 00 04 lw ra,(sp+4)
800d218: 2b 8b 00 08 lw r11,(sp+8)
800d21c: 37 9c 00 08 addi sp,sp,8
800d220: c3 a0 00 00 ret
0800d504 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
800d504: 37 9c ff f0 addi sp,sp,-16
800d508: 5b 8b 00 10 sw (sp+16),r11
800d50c: 5b 8c 00 0c sw (sp+12),r12
800d510: 5b 8d 00 08 sw (sp+8),r13
800d514: 5b 9d 00 04 sw (sp+4),ra
800d518: b8 20 58 00 mv r11,r1
800d51c: b8 40 60 00 mv r12,r2
800d520: b8 60 68 00 mv r13,r3
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
800d524: 44 20 00 1f be r1,r0,800d5a0 <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()) &&
800d528: 78 01 08 02 mvhi r1,0x802
800d52c: 38 21 5a e0 ori r1,r1,0x5ae0
800d530: 28 22 00 00 lw r2,(r1+0)
* Parameter error checks
*/
if ( !pointer )
return EINVAL;
*pointer = NULL;
800d534: 34 01 00 00 mvi r1,0
800d538: 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()) &&
800d53c: 34 01 00 03 mvi r1,3
800d540: 5c 41 00 03 bne r2,r1,800d54c <rtems_memalign+0x48> <== NEVER TAKEN
800d544: fb ff d5 bd calli 8002c38 <malloc_is_system_state_OK>
800d548: 44 20 00 16 be r1,r0,800d5a0 <rtems_memalign+0x9c> <== NEVER TAKEN
/*
*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
800d54c: fb ff d5 d6 calli 8002ca4 <malloc_deferred_frees_process>
uintptr_t size,
uintptr_t alignment
)
{
return
_Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 );
800d550: 78 01 08 02 mvhi r1,0x802
800d554: 38 21 50 1c ori r1,r1,0x501c
800d558: 28 21 00 00 lw r1,(r1+0)
800d55c: b9 a0 10 00 mv r2,r13
800d560: b9 80 18 00 mv r3,r12
800d564: 34 04 00 00 mvi r4,0
800d568: fb ff e3 13 calli 80061b4 <_Protected_heap_Allocate_aligned_with_boundary>
800d56c: b8 20 60 00 mv r12,r1
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
800d570: 34 02 00 0c mvi r2,12
800d574: 44 20 00 0c be r1,r0,800d5a4 <rtems_memalign+0xa0>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
800d578: 78 02 08 02 mvhi r2,0x802
800d57c: 38 42 56 80 ori r2,r2,0x5680
800d580: 28 41 00 00 lw r1,(r2+0)
800d584: 44 20 00 04 be r1,r0,800d594 <rtems_memalign+0x90> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
800d588: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED
800d58c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800d590: 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;
800d594: 59 6c 00 00 sw (r11+0),r12
800d598: 34 02 00 00 mvi r2,0
return 0;
800d59c: e0 00 00 02 bi 800d5a4 <rtems_memalign+0xa0>
800d5a0: 34 02 00 16 mvi r2,22
}
800d5a4: b8 40 08 00 mv r1,r2
800d5a8: 2b 9d 00 04 lw ra,(sp+4)
800d5ac: 2b 8b 00 10 lw r11,(sp+16)
800d5b0: 2b 8c 00 0c lw r12,(sp+12)
800d5b4: 2b 8d 00 08 lw r13,(sp+8)
800d5b8: 37 9c 00 10 addi sp,sp,16
800d5bc: 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 fc ac ori r2,r2,0xfcac
8011104: 28 41 00 00 lw r1,(r2+0)
8011108: 34 21 00 01 addi r1,r1,1
801110c: 58 41 00 00 sw (r2+0),r1
* This function allocates a partition control block from
* the inactive chain of free partition control blocks.
*/
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
{
return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
8011110: 78 01 08 03 mvhi r1,0x803
8011114: 38 21 fa f4 ori r1,r1,0xfaf4
8011118: f8 00 15 d6 calli 8016870 <_Objects_Allocate>
801111c: b8 20 58 00 mv r11,r1
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
8011120: 5c 2d 00 04 bne r1,r13,8011130 <rtems_partition_create+0xa8>
_Thread_Enable_dispatch();
8011124: f8 00 1a 80 calli 8017b24 <_Thread_Enable_dispatch>
8011128: 34 07 00 05 mvi r7,5
return RTEMS_TOO_MANY;
801112c: e0 00 00 20 bi 80111ac <rtems_partition_create+0x124>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
8011130: 58 2e 00 10 sw (r1+16),r14
the_partition->length = length;
8011134: 58 2f 00 14 sw (r1+20),r15
the_partition->buffer_size = buffer_size;
8011138: 58 2c 00 18 sw (r1+24),r12
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
801113c: b9 80 10 00 mv r2,r12
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
8011140: 58 32 00 1c sw (r1+28),r18
the_partition->number_of_used_blocks = 0;
8011144: 58 2d 00 20 sw (r1+32),r13
_Chain_Initialize( &the_partition->Memory, starting_address,
8011148: b9 e0 08 00 mv r1,r15
801114c: f8 00 7d 65 calli 80306e0 <__udivsi3>
8011150: 35 6f 00 24 addi r15,r11,36
8011154: b8 20 18 00 mv r3,r1
8011158: b9 80 20 00 mv r4,r12
801115c: b9 c0 10 00 mv r2,r14
8011160: b9 e0 08 00 mv r1,r15
8011164: f8 00 0f 4c calli 8014e94 <_Chain_Initialize>
8011168: 78 02 08 03 mvhi r2,0x803
801116c: 29 6c 00 08 lw r12,(r11+8)
8011170: 38 42 fa f4 ori r2,r2,0xfaf4
8011174: 28 4e 00 1c lw r14,(r2+28)
8011178: 21 81 ff ff andi r1,r12,0xffff
801117c: 34 02 00 02 mvi r2,2
8011180: fb ff f3 46 calli 800de98 <__ashlsi3>
8011184: b5 c1 08 00 add r1,r14,r1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
8011188: 59 71 00 0c sw (r11+12),r17
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
801118c: 5a 0c 00 00 sw (r16+0),r12
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8011190: 58 2b 00 00 sw (r1+0),r11
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
8011194: f8 00 1a 64 calli 8017b24 <_Thread_Enable_dispatch>
8011198: b9 a0 38 00 mv r7,r13
return RTEMS_SUCCESSFUL;
801119c: e0 00 00 04 bi 80111ac <rtems_partition_create+0x124>
80111a0: 34 07 00 09 mvi r7,9
80111a4: e0 00 00 02 bi 80111ac <rtems_partition_create+0x124>
80111a8: 34 07 00 08 mvi r7,8
}
80111ac: b8 e0 08 00 mv r1,r7
80111b0: 2b 9d 00 04 lw ra,(sp+4)
80111b4: 2b 8b 00 24 lw r11,(sp+36)
80111b8: 2b 8c 00 20 lw r12,(sp+32)
80111bc: 2b 8d 00 1c lw r13,(sp+28)
80111c0: 2b 8e 00 18 lw r14,(sp+24)
80111c4: 2b 8f 00 14 lw r15,(sp+20)
80111c8: 2b 90 00 10 lw r16,(sp+16)
80111cc: 2b 91 00 0c lw r17,(sp+12)
80111d0: 2b 92 00 08 lw r18,(sp+8)
80111d4: 37 9c 00 24 addi sp,sp,36
80111d8: c3 a0 00 00 ret
0800b318 <rtems_pipe_initialize>:
/*
* Initialization of FIFO/pipe module.
*/
void rtems_pipe_initialize (void)
{
800b318: 37 9c ff f8 addi sp,sp,-8
800b31c: 5b 8b 00 08 sw (sp+8),r11
800b320: 5b 9d 00 04 sw (sp+4),ra
if (!rtems_pipe_configured)
800b324: 78 01 08 02 mvhi r1,0x802
800b328: 38 21 56 7c ori r1,r1,0x567c
800b32c: 40 21 00 00 lbu r1,(r1+0)
800b330: 44 20 00 11 be r1,r0,800b374 <rtems_pipe_initialize+0x5c> <== ALWAYS TAKEN
return;
if (rtems_pipe_semaphore)
800b334: 78 05 08 02 mvhi r5,0x802 <== NOT EXECUTED
800b338: 38 a5 57 78 ori r5,r5,0x5778 <== NOT EXECUTED
800b33c: 28 ab 00 00 lw r11,(r5+0) <== NOT EXECUTED
800b340: 5d 60 00 0d bne r11,r0,800b374 <rtems_pipe_initialize+0x5c><== NOT EXECUTED
return;
rtems_status_code sc;
sc = rtems_semaphore_create(
800b344: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED
800b348: 38 21 50 45 ori r1,r1,0x5045 <== NOT EXECUTED
800b34c: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
800b350: 34 03 00 54 mvi r3,84 <== NOT EXECUTED
800b354: b9 60 20 00 mv r4,r11 <== NOT EXECUTED
800b358: fb ff e3 47 calli 8004074 <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)
800b35c: 44 2b 00 02 be r1,r11,800b364 <rtems_pipe_initialize+0x4c> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
800b360: fb ff e5 26 calli 80047f8 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
800b364: f8 00 0b 69 calli 800e108 <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
rtems_pipe_no = now;
800b368: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
800b36c: 38 42 57 80 ori r2,r2,0x5780 <== NOT EXECUTED
800b370: 0c 41 00 00 sh (r2+0),r1 <== NOT EXECUTED
}
800b374: 2b 9d 00 04 lw ra,(sp+4)
800b378: 2b 8b 00 08 lw r11,(sp+8)
800b37c: 37 9c 00 08 addi sp,sp,8
800b380: 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 38 94 ori r1,r1,0x3894
8003714: b9 c0 10 00 mv r2,r14
8003718: 37 83 00 18 addi r3,sp,24
800371c: f8 00 09 21 calli 8005ba0 <_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 3a 88 ori r3,r3,0x3a88
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 78 calli 8006520 <_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 02 mvhi r11,0x802
8003768: 34 02 00 02 mvi r2,2
800376c: 39 6b 0c 68 ori r11,r11,0xc68
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 3a a8 ori r1,r1,0x3aa8
80037ec: f8 00 11 0c calli 8007c1c <_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 3a 88 ori r1,r1,0x3a88
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 f4 calli 8006ff8 <_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 3a 88 ori r1,r1,0x3a88 <== 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 36 calli 800613c <_Thread_Clear_state> <== NOT EXECUTED
_Thread_Enable_dispatch();
8003868: f8 00 0b 2e calli 8006520 <_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 3a a8 ori r1,r1,0x3aa8
800389c: f8 00 10 e0 calli 8007c1c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
80038a0: 34 0b 00 06 mvi r11,6
80038a4: f8 00 0b 1f calli 8006520 <_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 02 mvhi r2,0x802
8003928: 38 42 0c 7c ori r2,r2,0xc7c
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 02 mvhi r2,0x802
8003934: 38 42 0c 9c ori r2,r2,0xc9c
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 02 mvhi r2,0x802
8003944: 38 42 0c c0 ori r2,r2,0xcc0
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 02 mvhi r2,0x802
8003954: 38 42 0c e4 ori r2,r2,0xce4
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 02 mvhi r2,0x802
8003964: b9 80 08 00 mv r1,r12
8003968: 38 42 0d 30 ori r2,r2,0xd30
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 38 94 ori r1,r1,0x3894
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 02 mvhi r23,0x802
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 02 mvhi r21,0x802
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 02 mvhi r19,0x802
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
80039a4: 78 12 08 02 mvhi r18,0x802
/*
* 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 1b ba calli 800a894 <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 1b e8 calli 800a960 <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 0d 7c ori r2,r2,0xd7c
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 02 70 ori r2,r2,0x270
);
/*
* 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 46 calli 8007734 <_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 6e 33 calli 801f2f4 <__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 6e 2f calli 801f2f4 <__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 6e 2b calli 801f2f4 <__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 0d 94 ori r2,r2,0xd94
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 0f 2d calli 8007734 <_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 6e 1a calli 801f2f4 <__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 6e 16 calli 801f2f4 <__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 6e 12 calli 801f2f4 <__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 0d b4 ori r2,r2,0xdb4
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 14 0e calli 8017ba4 <_Thread_Get>
switch ( location ) {
8012b70: 2b 82 00 0c lw r2,(sp+12)
8012b74: 34 03 00 04 mvi r3,4
8012b78: 5c 40 00 29 bne r2,r0,8012c1c <rtems_signal_send+0xcc>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
8012b7c: 28 23 01 28 lw r3,(r1+296)
asr = &api->Signal;
8012b80: 28 64 00 0c lw r4,(r3+12)
8012b84: 44 82 00 24 be r4,r2,8012c14 <rtems_signal_send+0xc4>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
8012b88: 40 62 00 08 lbu r2,(r3+8)
8012b8c: 44 40 00 17 be r2,r0,8012be8 <rtems_signal_send+0x98>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
8012b90: 90 00 10 00 rcsr r2,IE
8012b94: 34 04 ff fe mvi r4,-2
8012b98: a0 44 20 00 and r4,r2,r4
8012b9c: d0 04 00 00 wcsr IE,r4
*signal_set |= signals;
8012ba0: 28 64 00 14 lw r4,(r3+20)
8012ba4: b8 8b 58 00 or r11,r4,r11
8012ba8: 58 6b 00 14 sw (r3+20),r11
_ISR_Enable( _level );
8012bac: d0 02 00 00 wcsr IE,r2
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
8012bb0: 78 02 08 03 mvhi r2,0x803
8012bb4: 38 42 fd 44 ori r2,r2,0xfd44
8012bb8: 28 42 00 00 lw r2,(r2+0)
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
8012bbc: 34 03 00 01 mvi r3,1
8012bc0: 30 23 00 74 sb (r1+116),r3
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
8012bc4: 44 40 00 11 be r2,r0,8012c08 <rtems_signal_send+0xb8>
8012bc8: 78 02 08 03 mvhi r2,0x803
8012bcc: 38 42 fd 68 ori r2,r2,0xfd68
8012bd0: 28 42 00 00 lw r2,(r2+0)
8012bd4: 5c 22 00 0d bne r1,r2,8012c08 <rtems_signal_send+0xb8> <== NEVER TAKEN
_ISR_Signals_to_thread_executing = true;
8012bd8: 78 01 08 03 mvhi r1,0x803
8012bdc: 38 21 fe 00 ori r1,r1,0xfe00
8012be0: 30 23 00 00 sb (r1+0),r3
8012be4: e0 00 00 09 bi 8012c08 <rtems_signal_send+0xb8>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
8012be8: 90 00 08 00 rcsr r1,IE
8012bec: 34 02 ff fe mvi r2,-2
8012bf0: a0 22 10 00 and r2,r1,r2
8012bf4: d0 02 00 00 wcsr IE,r2
*signal_set |= signals;
8012bf8: 28 62 00 18 lw r2,(r3+24)
8012bfc: b8 4b 58 00 or r11,r2,r11
8012c00: 58 6b 00 18 sw (r3+24),r11
_ISR_Enable( _level );
8012c04: d0 01 00 00 wcsr IE,r1
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
8012c08: f8 00 13 c7 calli 8017b24 <_Thread_Enable_dispatch>
8012c0c: 34 03 00 00 mvi r3,0
return RTEMS_SUCCESSFUL;
8012c10: e0 00 00 03 bi 8012c1c <rtems_signal_send+0xcc>
}
_Thread_Enable_dispatch();
8012c14: f8 00 13 c4 calli 8017b24 <_Thread_Enable_dispatch>
8012c18: 34 03 00 0b mvi r3,11
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8012c1c: b8 60 08 00 mv r1,r3
8012c20: 2b 9d 00 04 lw ra,(sp+4)
8012c24: 2b 8b 00 08 lw r11,(sp+8)
8012c28: 37 9c 00 0c addi sp,sp,12
8012c2c: c3 a0 00 00 ret
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 c8 lw r1,(r1+200)
8000878: 78 02 08 01 mvhi r2,0x801
800087c: 38 42 d7 34 ori r2,r2,0xd734
8000880: 34 21 00 08 addi r1,r1,8
8000884: 34 03 00 10 mvi r3,16
8000888: f8 00 32 45 calli 800d19c <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 c4 lw r3,(r11+196)
8000df8: 29 61 00 c8 lw r1,(r11+200)
8000dfc: 34 02 00 a5 mvi r2,165
8000e00: f8 00 31 45 calli 800d314 <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 d9 50 ori r1,r1,0xd950
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 c8 lw r1,(r2+200)
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 c4 lw r11,(r2+196)
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 d6 a8 ori r2,r2,0xd6a8
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 d7 34 ori r2,r2,0xd734
8000c4c: 34 21 00 08 addi r1,r1,8
8000c50: 34 03 00 10 mvi r3,16
8000c54: f8 00 31 32 calli 800d11c <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 d9 50 ori r1,r1,0xd950 <== 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 d6 ac ori r11,r11,0xd6ac <== NOT EXECUTED
print_handler = print;
8000aac: 39 8c d6 b0 ori r12,r12,0xd6b0 <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
8000ab0: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8000ab4: 38 42 b8 f0 ori r2,r2,0xb8f0 <== 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 b9 08 ori r2,r2,0xb908 <== 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 cf calli 800321c <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 c8 lw r1,(r1+200)
)
{
#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 c4 lw r12,(r11+196)
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 d7 34 ori r2,r2,0xd734
8000cd4: 34 21 00 08 addi r1,r1,8
8000cd8: 34 03 00 10 mvi r3,16
8000cdc: f8 00 31 10 calli 800d11c <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
08007e38 <rtems_string_to_double>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8007e38: 37 9c ff e4 addi sp,sp,-28
8007e3c: 5b 8b 00 18 sw (sp+24),r11
8007e40: 5b 8c 00 14 sw (sp+20),r12
8007e44: 5b 8d 00 10 sw (sp+16),r13
8007e48: 5b 8e 00 0c sw (sp+12),r14
8007e4c: 5b 8f 00 08 sw (sp+8),r15
8007e50: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8007e54: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8007e58: b8 40 58 00 mv r11,r2
8007e5c: b8 20 70 00 mv r14,r1
8007e60: b8 60 78 00 mv r15,r3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8007e64: 34 04 00 09 mvi r4,9
8007e68: 44 4c 00 20 be r2,r12,8007ee8 <rtems_string_to_double+0xb0>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8007e6c: f8 00 14 30 calli 800cf2c <__errno>
8007e70: 58 2c 00 00 sw (r1+0),r12
*n = 0;
8007e74: 59 6c 00 04 sw (r11+4),r12
8007e78: 59 6c 00 00 sw (r11+0),r12
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
8007e7c: b9 c0 08 00 mv r1,r14
8007e80: 37 82 00 1c addi r2,sp,28
8007e84: f8 00 20 4e calli 800ffbc <strtod>
8007e88: b8 20 60 00 mv r12,r1
8007e8c: b8 40 68 00 mv r13,r2
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
8007e90: 45 e0 00 03 be r15,r0,8007e9c <rtems_string_to_double+0x64>
*endptr = end;
8007e94: 2b 81 00 1c lw r1,(sp+28)
8007e98: 59 e1 00 00 sw (r15+0),r1
/* nothing was converted */
if ( end == s )
8007e9c: 2b 81 00 1c lw r1,(sp+28)
8007ea0: 34 04 00 0b mvi r4,11
8007ea4: 44 2e 00 11 be r1,r14,8007ee8 <rtems_string_to_double+0xb0>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
8007ea8: 78 03 7f ef mvhi r3,0x7fef
8007eac: 38 63 ff ff ori r3,r3,0xffff
8007eb0: b9 80 08 00 mv r1,r12
8007eb4: b9 a0 10 00 mv r2,r13
8007eb8: 34 04 ff ff mvi r4,-1
8007ebc: f8 00 4e 49 calli 801b7e0 <__gedf2>
8007ec0: 48 20 00 02 bg r1,r0,8007ec8 <rtems_string_to_double+0x90>
8007ec4: e0 00 00 06 bi 8007edc <rtems_string_to_double+0xa4>
8007ec8: f8 00 14 19 calli 800cf2c <__errno>
8007ecc: 28 22 00 00 lw r2,(r1+0)
8007ed0: 34 01 00 22 mvi r1,34
8007ed4: 34 04 00 0a mvi r4,10
8007ed8: 44 41 00 04 be r2,r1,8007ee8 <rtems_string_to_double+0xb0> <== ALWAYS TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
8007edc: 59 6d 00 04 sw (r11+4),r13
8007ee0: 59 6c 00 00 sw (r11+0),r12
8007ee4: 34 04 00 00 mvi r4,0
#endif
return RTEMS_SUCCESSFUL;
}
8007ee8: b8 80 08 00 mv r1,r4
8007eec: 2b 9d 00 04 lw ra,(sp+4)
8007ef0: 2b 8b 00 18 lw r11,(sp+24)
8007ef4: 2b 8c 00 14 lw r12,(sp+20)
8007ef8: 2b 8d 00 10 lw r13,(sp+16)
8007efc: 2b 8e 00 0c lw r14,(sp+12)
8007f00: 2b 8f 00 08 lw r15,(sp+8)
8007f04: 37 9c 00 1c addi sp,sp,28
8007f08: c3 a0 00 00 ret
08007f0c <rtems_string_to_float>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8007f0c: 37 9c ff e8 addi sp,sp,-24
8007f10: 5b 8b 00 14 sw (sp+20),r11
8007f14: 5b 8c 00 10 sw (sp+16),r12
8007f18: 5b 8d 00 0c sw (sp+12),r13
8007f1c: 5b 8e 00 08 sw (sp+8),r14
8007f20: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8007f24: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8007f28: b8 40 58 00 mv r11,r2
8007f2c: b8 20 68 00 mv r13,r1
8007f30: b8 60 70 00 mv r14,r3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8007f34: 34 04 00 09 mvi r4,9
8007f38: 44 4c 00 1b be r2,r12,8007fa4 <rtems_string_to_float+0x98>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8007f3c: f8 00 13 fc calli 800cf2c <__errno>
8007f40: 58 2c 00 00 sw (r1+0),r12
*n = 0;
8007f44: 59 6c 00 00 sw (r11+0),r12
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
8007f48: b9 a0 08 00 mv r1,r13
8007f4c: 37 82 00 18 addi r2,sp,24
8007f50: f8 00 1f fe calli 800ff48 <strtof>
8007f54: b8 20 60 00 mv r12,r1
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
8007f58: 45 c0 00 03 be r14,r0,8007f64 <rtems_string_to_float+0x58>
*endptr = end;
8007f5c: 2b 81 00 18 lw r1,(sp+24)
8007f60: 59 c1 00 00 sw (r14+0),r1
/* nothing was converted */
if ( end == s )
8007f64: 2b 81 00 18 lw r1,(sp+24)
8007f68: 34 04 00 0b mvi r4,11
8007f6c: 44 2d 00 0e be r1,r13,8007fa4 <rtems_string_to_float+0x98>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
8007f70: 78 02 7f 7f mvhi r2,0x7f7f
8007f74: 38 42 ff ff ori r2,r2,0xffff
8007f78: b9 80 08 00 mv r1,r12
8007f7c: f8 00 47 d8 calli 8019edc <__gesf2>
8007f80: 48 20 00 02 bg r1,r0,8007f88 <rtems_string_to_float+0x7c>
8007f84: e0 00 00 06 bi 8007f9c <rtems_string_to_float+0x90>
8007f88: f8 00 13 e9 calli 800cf2c <__errno>
8007f8c: 28 22 00 00 lw r2,(r1+0)
8007f90: 34 01 00 22 mvi r1,34
8007f94: 34 04 00 0a mvi r4,10
8007f98: 44 41 00 03 be r2,r1,8007fa4 <rtems_string_to_float+0x98> <== ALWAYS TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
8007f9c: 59 6c 00 00 sw (r11+0),r12
8007fa0: 34 04 00 00 mvi r4,0
#endif
return RTEMS_SUCCESSFUL;
}
8007fa4: b8 80 08 00 mv r1,r4
8007fa8: 2b 9d 00 04 lw ra,(sp+4)
8007fac: 2b 8b 00 14 lw r11,(sp+20)
8007fb0: 2b 8c 00 10 lw r12,(sp+16)
8007fb4: 2b 8d 00 0c lw r13,(sp+12)
8007fb8: 2b 8e 00 08 lw r14,(sp+8)
8007fbc: 37 9c 00 18 addi sp,sp,24
8007fc0: c3 a0 00 00 ret
08007fc4 <rtems_string_to_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8007fc4: 37 9c ff e4 addi sp,sp,-28
8007fc8: 5b 8b 00 18 sw (sp+24),r11
8007fcc: 5b 8c 00 14 sw (sp+20),r12
8007fd0: 5b 8d 00 10 sw (sp+16),r13
8007fd4: 5b 8e 00 0c sw (sp+12),r14
8007fd8: 5b 8f 00 08 sw (sp+8),r15
8007fdc: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8007fe0: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8007fe4: b8 40 58 00 mv r11,r2
8007fe8: b8 20 68 00 mv r13,r1
8007fec: b8 60 70 00 mv r14,r3
8007ff0: b8 80 78 00 mv r15,r4
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8007ff4: 34 05 00 09 mvi r5,9
8007ff8: 44 4c 00 19 be r2,r12,800805c <rtems_string_to_int+0x98> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
errno = 0;
8007ffc: f8 00 13 cc calli 800cf2c <__errno>
8008000: 58 2c 00 00 sw (r1+0),r12
*n = 0;
8008004: 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 );
8008008: b9 e0 18 00 mv r3,r15
800800c: b9 a0 08 00 mv r1,r13
8008010: 37 82 00 1c addi r2,sp,28
8008014: f8 00 20 8d calli 8010248 <strtol>
8008018: b8 20 60 00 mv r12,r1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
800801c: 45 c0 00 03 be r14,r0,8008028 <rtems_string_to_int+0x64>
*endptr = end;
8008020: 2b 81 00 1c lw r1,(sp+28)
8008024: 59 c1 00 00 sw (r14+0),r1
/* nothing was converted */
if ( end == s )
8008028: 2b 81 00 1c lw r1,(sp+28)
800802c: 34 05 00 0b mvi r5,11
8008030: 44 2d 00 0b be r1,r13,800805c <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))
8008034: 78 02 7f ff mvhi r2,0x7fff
8008038: 38 42 ff ff ori r2,r2,0xffff
800803c: 5d 82 00 06 bne r12,r2,8008054 <rtems_string_to_int+0x90>
8008040: f8 00 13 bb calli 800cf2c <__errno>
8008044: 28 22 00 00 lw r2,(r1+0)
8008048: 34 01 00 22 mvi r1,34
800804c: 34 05 00 0a mvi r5,10
8008050: 44 41 00 03 be r2,r1,800805c <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;
8008054: 59 6c 00 00 sw (r11+0),r12
8008058: 34 05 00 00 mvi r5,0
#endif
return RTEMS_SUCCESSFUL;
}
800805c: b8 a0 08 00 mv r1,r5
8008060: 2b 9d 00 04 lw ra,(sp+4)
8008064: 2b 8b 00 18 lw r11,(sp+24)
8008068: 2b 8c 00 14 lw r12,(sp+20)
800806c: 2b 8d 00 10 lw r13,(sp+16)
8008070: 2b 8e 00 0c lw r14,(sp+12)
8008074: 2b 8f 00 08 lw r15,(sp+8)
8008078: 37 9c 00 1c addi sp,sp,28
800807c: c3 a0 00 00 ret
08008160 <rtems_string_to_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008160: 37 9c ff e4 addi sp,sp,-28
8008164: 5b 8b 00 18 sw (sp+24),r11
8008168: 5b 8c 00 14 sw (sp+20),r12
800816c: 5b 8d 00 10 sw (sp+16),r13
8008170: 5b 8e 00 0c sw (sp+12),r14
8008174: 5b 8f 00 08 sw (sp+8),r15
8008178: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
800817c: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008180: b8 40 58 00 mv r11,r2
8008184: b8 20 68 00 mv r13,r1
8008188: b8 60 70 00 mv r14,r3
800818c: b8 80 78 00 mv r15,r4
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8008190: 34 05 00 09 mvi r5,9
8008194: 44 4c 00 1c be r2,r12,8008204 <rtems_string_to_long+0xa4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8008198: f8 00 13 65 calli 800cf2c <__errno>
800819c: 58 2c 00 00 sw (r1+0),r12
*n = 0;
80081a0: 59 6c 00 00 sw (r11+0),r12
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
80081a4: b9 e0 18 00 mv r3,r15
80081a8: b9 a0 08 00 mv r1,r13
80081ac: 37 82 00 1c addi r2,sp,28
80081b0: f8 00 20 26 calli 8010248 <strtol>
80081b4: b8 20 60 00 mv r12,r1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
80081b8: 45 c0 00 03 be r14,r0,80081c4 <rtems_string_to_long+0x64>
*endptr = end;
80081bc: 2b 81 00 1c lw r1,(sp+28)
80081c0: 59 c1 00 00 sw (r14+0),r1
/* nothing was converted */
if ( end == s )
80081c4: 2b 81 00 1c lw r1,(sp+28)
80081c8: 34 05 00 0b mvi r5,11
80081cc: 44 2d 00 0e be r1,r13,8008204 <rtems_string_to_long+0xa4>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
80081d0: 78 01 7f ff mvhi r1,0x7fff
80081d4: 38 21 ff ff ori r1,r1,0xffff
80081d8: 45 81 00 04 be r12,r1,80081e8 <rtems_string_to_long+0x88>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
80081dc: 78 01 80 00 mvhi r1,0x8000
80081e0: 38 21 00 00 ori r1,r1,0x0
80081e4: 5d 81 00 06 bne r12,r1,80081fc <rtems_string_to_long+0x9c>
80081e8: f8 00 13 51 calli 800cf2c <__errno>
80081ec: 28 22 00 00 lw r2,(r1+0)
80081f0: 34 01 00 22 mvi r1,34
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
80081f4: 34 05 00 0a mvi r5,10
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
80081f8: 44 41 00 03 be r2,r1,8008204 <rtems_string_to_long+0xa4> <== ALWAYS TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
80081fc: 59 6c 00 00 sw (r11+0),r12
8008200: 34 05 00 00 mvi r5,0
#endif
return RTEMS_SUCCESSFUL;
}
8008204: b8 a0 08 00 mv r1,r5
8008208: 2b 9d 00 04 lw ra,(sp+4)
800820c: 2b 8b 00 18 lw r11,(sp+24)
8008210: 2b 8c 00 14 lw r12,(sp+20)
8008214: 2b 8d 00 10 lw r13,(sp+16)
8008218: 2b 8e 00 0c lw r14,(sp+12)
800821c: 2b 8f 00 08 lw r15,(sp+8)
8008220: 37 9c 00 1c addi sp,sp,28
8008224: c3 a0 00 00 ret
08008080 <rtems_string_to_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008080: 37 9c ff e4 addi sp,sp,-28
8008084: 5b 8b 00 18 sw (sp+24),r11
8008088: 5b 8c 00 14 sw (sp+20),r12
800808c: 5b 8d 00 10 sw (sp+16),r13
8008090: 5b 8e 00 0c sw (sp+12),r14
8008094: 5b 8f 00 08 sw (sp+8),r15
8008098: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
800809c: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
80080a0: b8 40 58 00 mv r11,r2
80080a4: b8 20 70 00 mv r14,r1
80080a8: b8 60 78 00 mv r15,r3
80080ac: b8 80 68 00 mv r13,r4
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
80080b0: 34 05 00 09 mvi r5,9
80080b4: 44 4c 00 22 be r2,r12,800813c <rtems_string_to_long_long+0xbc>
return RTEMS_INVALID_ADDRESS;
errno = 0;
80080b8: f8 00 13 9d calli 800cf2c <__errno>
80080bc: 58 2c 00 00 sw (r1+0),r12
*n = 0;
80080c0: 59 6c 00 04 sw (r11+4),r12
80080c4: 59 6c 00 00 sw (r11+0),r12
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
80080c8: b9 a0 18 00 mv r3,r13
80080cc: b9 c0 08 00 mv r1,r14
80080d0: 37 82 00 1c addi r2,sp,28
80080d4: f8 00 20 6b calli 8010280 <strtoll>
80080d8: b8 20 60 00 mv r12,r1
80080dc: b8 40 68 00 mv r13,r2
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
80080e0: 45 e0 00 03 be r15,r0,80080ec <rtems_string_to_long_long+0x6c>
*endptr = end;
80080e4: 2b 81 00 1c lw r1,(sp+28)
80080e8: 59 e1 00 00 sw (r15+0),r1
/* nothing was converted */
if ( end == s )
80080ec: 2b 81 00 1c lw r1,(sp+28)
80080f0: 34 05 00 0b mvi r5,11
80080f4: 44 2e 00 12 be r1,r14,800813c <rtems_string_to_long_long+0xbc>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
80080f8: 78 01 7f ff mvhi r1,0x7fff
80080fc: 38 21 ff ff ori r1,r1,0xffff
8008100: 5d 81 00 03 bne r12,r1,800810c <rtems_string_to_long_long+0x8c>
8008104: 34 01 ff ff mvi r1,-1
8008108: 45 a1 00 05 be r13,r1,800811c <rtems_string_to_long_long+0x9c><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
800810c: 78 01 80 00 mvhi r1,0x8000
8008110: 38 21 00 00 ori r1,r1,0x0
8008114: 5d 81 00 07 bne r12,r1,8008130 <rtems_string_to_long_long+0xb0>
8008118: 5d a0 00 06 bne r13,r0,8008130 <rtems_string_to_long_long+0xb0><== NEVER TAKEN
800811c: f8 00 13 84 calli 800cf2c <__errno>
8008120: 28 22 00 00 lw r2,(r1+0)
8008124: 34 01 00 22 mvi r1,34
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
8008128: 34 05 00 0a mvi r5,10
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
800812c: 44 41 00 04 be r2,r1,800813c <rtems_string_to_long_long+0xbc><== ALWAYS TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
8008130: 59 6d 00 04 sw (r11+4),r13
8008134: 59 6c 00 00 sw (r11+0),r12
8008138: 34 05 00 00 mvi r5,0
#endif
return RTEMS_SUCCESSFUL;
}
800813c: b8 a0 08 00 mv r1,r5
8008140: 2b 9d 00 04 lw ra,(sp+4)
8008144: 2b 8b 00 18 lw r11,(sp+24)
8008148: 2b 8c 00 14 lw r12,(sp+20)
800814c: 2b 8d 00 10 lw r13,(sp+16)
8008150: 2b 8e 00 0c lw r14,(sp+12)
8008154: 2b 8f 00 08 lw r15,(sp+8)
8008158: 37 9c 00 1c addi sp,sp,28
800815c: c3 a0 00 00 ret
08008228 <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008228: 37 9c ff e8 addi sp,sp,-24
800822c: 5b 8b 00 14 sw (sp+20),r11
8008230: 5b 8c 00 10 sw (sp+16),r12
8008234: 5b 8d 00 0c sw (sp+12),r13
8008238: 5b 8e 00 08 sw (sp+8),r14
800823c: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8008240: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008244: b8 40 58 00 mv r11,r2
8008248: b8 20 68 00 mv r13,r1
800824c: b8 60 70 00 mv r14,r3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8008250: 34 04 00 09 mvi r4,9
8008254: 44 4c 00 18 be r2,r12,80082b4 <rtems_string_to_pointer+0x8c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8008258: f8 00 13 35 calli 800cf2c <__errno>
800825c: 58 2c 00 00 sw (r1+0),r12
*n = 0;
8008260: 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 );
8008264: b9 a0 08 00 mv r1,r13
8008268: 37 82 00 18 addi r2,sp,24
800826c: 34 03 00 10 mvi r3,16
8008270: f8 00 21 64 calli 8010800 <strtoul>
8008274: 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 )
8008278: 45 c0 00 03 be r14,r0,8008284 <rtems_string_to_pointer+0x5c>
*endptr = end;
800827c: 2b 81 00 18 lw r1,(sp+24)
8008280: 59 c1 00 00 sw (r14+0),r1
/* nothing was converted */
if ( end == s )
8008284: 2b 81 00 18 lw r1,(sp+24)
8008288: 34 04 00 0b mvi r4,11
800828c: 44 2d 00 0a be r1,r13,80082b4 <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))
8008290: 34 01 ff ff mvi r1,-1
8008294: 5d 81 00 06 bne r12,r1,80082ac <rtems_string_to_pointer+0x84><== ALWAYS TAKEN
8008298: f8 00 13 25 calli 800cf2c <__errno> <== NOT EXECUTED
800829c: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED
80082a0: 34 01 00 22 mvi r1,34 <== NOT EXECUTED
80082a4: 34 04 00 0a mvi r4,10 <== NOT EXECUTED
80082a8: 44 41 00 03 be r2,r1,80082b4 <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;
80082ac: 59 6c 00 00 sw (r11+0),r12
80082b0: 34 04 00 00 mvi r4,0
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
80082b4: b8 80 08 00 mv r1,r4
80082b8: 2b 9d 00 04 lw ra,(sp+4)
80082bc: 2b 8b 00 14 lw r11,(sp+20)
80082c0: 2b 8c 00 10 lw r12,(sp+16)
80082c4: 2b 8d 00 0c lw r13,(sp+12)
80082c8: 2b 8e 00 08 lw r14,(sp+8)
80082cc: 37 9c 00 18 addi sp,sp,24
80082d0: c3 a0 00 00 ret
08008370 <rtems_string_to_unsigned_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008370: 37 9c ff e4 addi sp,sp,-28
8008374: 5b 8b 00 18 sw (sp+24),r11
8008378: 5b 8c 00 14 sw (sp+20),r12
800837c: 5b 8d 00 10 sw (sp+16),r13
8008380: 5b 8e 00 0c sw (sp+12),r14
8008384: 5b 8f 00 08 sw (sp+8),r15
8008388: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
800838c: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008390: b8 40 58 00 mv r11,r2
8008394: b8 20 68 00 mv r13,r1
8008398: b8 60 70 00 mv r14,r3
800839c: b8 80 78 00 mv r15,r4
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
80083a0: 34 05 00 09 mvi r5,9
80083a4: 44 4c 00 18 be r2,r12,8008404 <rtems_string_to_unsigned_int+0x94>
return RTEMS_INVALID_ADDRESS;
errno = 0;
80083a8: f8 00 12 e1 calli 800cf2c <__errno>
80083ac: 58 2c 00 00 sw (r1+0),r12
*n = 0;
80083b0: 59 6c 00 00 sw (r11+0),r12
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
80083b4: b9 e0 18 00 mv r3,r15
80083b8: b9 a0 08 00 mv r1,r13
80083bc: 37 82 00 1c addi r2,sp,28
80083c0: f8 00 21 10 calli 8010800 <strtoul>
80083c4: b8 20 60 00 mv r12,r1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
80083c8: 45 c0 00 03 be r14,r0,80083d4 <rtems_string_to_unsigned_int+0x64>
*endptr = end;
80083cc: 2b 81 00 1c lw r1,(sp+28)
80083d0: 59 c1 00 00 sw (r14+0),r1
/* nothing was converted */
if ( end == s )
80083d4: 2b 81 00 1c lw r1,(sp+28)
80083d8: 34 05 00 0b mvi r5,11
80083dc: 44 2d 00 0a be r1,r13,8008404 <rtems_string_to_unsigned_int+0x94>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
80083e0: 34 01 ff ff mvi r1,-1
80083e4: 5d 81 00 06 bne r12,r1,80083fc <rtems_string_to_unsigned_int+0x8c>
80083e8: f8 00 12 d1 calli 800cf2c <__errno>
80083ec: 28 22 00 00 lw r2,(r1+0)
80083f0: 34 01 00 22 mvi r1,34
80083f4: 34 05 00 0a mvi r5,10
80083f8: 44 41 00 03 be r2,r1,8008404 <rtems_string_to_unsigned_int+0x94><== ALWAYS TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
80083fc: 59 6c 00 00 sw (r11+0),r12
8008400: 34 05 00 00 mvi r5,0
#endif
return RTEMS_SUCCESSFUL;
}
8008404: b8 a0 08 00 mv r1,r5
8008408: 2b 9d 00 04 lw ra,(sp+4)
800840c: 2b 8b 00 18 lw r11,(sp+24)
8008410: 2b 8c 00 14 lw r12,(sp+20)
8008414: 2b 8d 00 10 lw r13,(sp+16)
8008418: 2b 8e 00 0c lw r14,(sp+12)
800841c: 2b 8f 00 08 lw r15,(sp+8)
8008420: 37 9c 00 1c addi sp,sp,28
8008424: c3 a0 00 00 ret
080084f0 <rtems_string_to_unsigned_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
80084f0: 37 9c ff e4 addi sp,sp,-28
80084f4: 5b 8b 00 18 sw (sp+24),r11
80084f8: 5b 8c 00 14 sw (sp+20),r12
80084fc: 5b 8d 00 10 sw (sp+16),r13
8008500: 5b 8e 00 0c sw (sp+12),r14
8008504: 5b 8f 00 08 sw (sp+8),r15
8008508: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
800850c: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008510: b8 40 58 00 mv r11,r2
8008514: b8 20 68 00 mv r13,r1
8008518: b8 60 70 00 mv r14,r3
800851c: b8 80 78 00 mv r15,r4
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8008520: 34 05 00 09 mvi r5,9
8008524: 44 4c 00 18 be r2,r12,8008584 <rtems_string_to_unsigned_long+0x94>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8008528: f8 00 12 81 calli 800cf2c <__errno>
800852c: 58 2c 00 00 sw (r1+0),r12
*n = 0;
8008530: 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 );
8008534: b9 e0 18 00 mv r3,r15
8008538: b9 a0 08 00 mv r1,r13
800853c: 37 82 00 1c addi r2,sp,28
8008540: f8 00 20 b0 calli 8010800 <strtoul>
8008544: b8 20 60 00 mv r12,r1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
8008548: 45 c0 00 03 be r14,r0,8008554 <rtems_string_to_unsigned_long+0x64>
*endptr = end;
800854c: 2b 81 00 1c lw r1,(sp+28)
8008550: 59 c1 00 00 sw (r14+0),r1
/* nothing was converted */
if ( end == s )
8008554: 2b 81 00 1c lw r1,(sp+28)
8008558: 34 05 00 0b mvi r5,11
800855c: 44 2d 00 0a be r1,r13,8008584 <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))
8008560: 34 01 ff ff mvi r1,-1
8008564: 5d 81 00 06 bne r12,r1,800857c <rtems_string_to_unsigned_long+0x8c>
8008568: f8 00 12 71 calli 800cf2c <__errno>
800856c: 28 22 00 00 lw r2,(r1+0)
8008570: 34 01 00 22 mvi r1,34
8008574: 34 05 00 0a mvi r5,10
8008578: 44 41 00 03 be r2,r1,8008584 <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;
800857c: 59 6c 00 00 sw (r11+0),r12
8008580: 34 05 00 00 mvi r5,0
#endif
return RTEMS_SUCCESSFUL;
}
8008584: b8 a0 08 00 mv r1,r5
8008588: 2b 9d 00 04 lw ra,(sp+4)
800858c: 2b 8b 00 18 lw r11,(sp+24)
8008590: 2b 8c 00 14 lw r12,(sp+20)
8008594: 2b 8d 00 10 lw r13,(sp+16)
8008598: 2b 8e 00 0c lw r14,(sp+12)
800859c: 2b 8f 00 08 lw r15,(sp+8)
80085a0: 37 9c 00 1c addi sp,sp,28
80085a4: c3 a0 00 00 ret
08008428 <rtems_string_to_unsigned_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008428: 37 9c ff e4 addi sp,sp,-28
800842c: 5b 8b 00 18 sw (sp+24),r11
8008430: 5b 8c 00 14 sw (sp+20),r12
8008434: 5b 8d 00 10 sw (sp+16),r13
8008438: 5b 8e 00 0c sw (sp+12),r14
800843c: 5b 8f 00 08 sw (sp+8),r15
8008440: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8008444: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008448: b8 40 58 00 mv r11,r2
800844c: b8 20 70 00 mv r14,r1
8008450: b8 60 78 00 mv r15,r3
8008454: b8 80 68 00 mv r13,r4
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8008458: 34 05 00 09 mvi r5,9
800845c: 44 4c 00 1c be r2,r12,80084cc <rtems_string_to_unsigned_long_long+0xa4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8008460: f8 00 12 b3 calli 800cf2c <__errno>
8008464: 58 2c 00 00 sw (r1+0),r12
*n = 0;
8008468: 59 6c 00 04 sw (r11+4),r12
800846c: 59 6c 00 00 sw (r11+0),r12
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
8008470: b9 a0 18 00 mv r3,r13
8008474: b9 c0 08 00 mv r1,r14
8008478: 37 82 00 1c addi r2,sp,28
800847c: f8 00 20 ef calli 8010838 <strtoull>
8008480: b8 20 60 00 mv r12,r1
8008484: b8 40 68 00 mv r13,r2
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
8008488: 45 e0 00 03 be r15,r0,8008494 <rtems_string_to_unsigned_long_long+0x6c>
*endptr = end;
800848c: 2b 81 00 1c lw r1,(sp+28)
8008490: 59 e1 00 00 sw (r15+0),r1
/* nothing was converted */
if ( end == s )
8008494: 2b 81 00 1c lw r1,(sp+28)
8008498: 34 05 00 0b mvi r5,11
800849c: 44 2e 00 0c be r1,r14,80084cc <rtems_string_to_unsigned_long_long+0xa4>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
80084a0: 34 01 ff ff mvi r1,-1
80084a4: 5d 81 00 07 bne r12,r1,80084c0 <rtems_string_to_unsigned_long_long+0x98>
80084a8: 5d ac 00 06 bne r13,r12,80084c0 <rtems_string_to_unsigned_long_long+0x98><== NEVER TAKEN
80084ac: f8 00 12 a0 calli 800cf2c <__errno>
80084b0: 28 22 00 00 lw r2,(r1+0)
80084b4: 34 01 00 22 mvi r1,34
80084b8: 34 05 00 0a mvi r5,10
80084bc: 44 41 00 04 be r2,r1,80084cc <rtems_string_to_unsigned_long_long+0xa4><== ALWAYS TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
80084c0: 59 6d 00 04 sw (r11+4),r13
80084c4: 59 6c 00 00 sw (r11+0),r12
80084c8: 34 05 00 00 mvi r5,0
#endif
return RTEMS_SUCCESSFUL;
}
80084cc: b8 a0 08 00 mv r1,r5
80084d0: 2b 9d 00 04 lw ra,(sp+4)
80084d4: 2b 8b 00 18 lw r11,(sp+24)
80084d8: 2b 8c 00 14 lw r12,(sp+20)
80084dc: 2b 8d 00 10 lw r13,(sp+16)
80084e0: 2b 8e 00 0c lw r14,(sp+12)
80084e4: 2b 8f 00 08 lw r15,(sp+8)
80084e8: 37 9c 00 1c addi sp,sp,28
80084ec: c3 a0 00 00 ret
0800e990 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
800e990: 37 9c ff e0 addi sp,sp,-32
800e994: 5b 8b 00 20 sw (sp+32),r11
800e998: 5b 8c 00 1c sw (sp+28),r12
800e99c: 5b 8d 00 18 sw (sp+24),r13
800e9a0: 5b 8e 00 14 sw (sp+20),r14
800e9a4: 5b 8f 00 10 sw (sp+16),r15
800e9a8: 5b 90 00 0c sw (sp+12),r16
800e9ac: 5b 91 00 08 sw (sp+8),r17
800e9b0: 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 )
800e9b4: 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
)
{
800e9b8: b8 60 80 00 mv r16,r3
800e9bc: b8 20 68 00 mv r13,r1
800e9c0: 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 )
800e9c4: 44 60 00 51 be r3,r0,800eb08 <rtems_task_mode+0x178>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
800e9c8: 78 01 08 02 mvhi r1,0x802
800e9cc: 38 21 5a 00 ori r1,r1,0x5a00
800e9d0: 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;
800e9d4: 34 0f 00 00 mvi r15,0
800e9d8: 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 ];
800e9dc: 29 6c 01 28 lw r12,(r11+296)
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
800e9e0: 5c 2f 00 02 bne r1,r15,800e9e8 <rtems_task_mode+0x58>
800e9e4: 34 0f 01 00 mvi r15,256
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
800e9e8: 29 61 00 7c lw r1,(r11+124)
800e9ec: 44 20 00 02 be r1,r0,800e9f4 <rtems_task_mode+0x64>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
800e9f0: 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;
800e9f4: 41 81 00 08 lbu r1,(r12+8)
800e9f8: 34 11 00 00 mvi r17,0
800e9fc: 5c 31 00 02 bne r1,r17,800ea04 <rtems_task_mode+0x74>
800ea00: 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();
800ea04: fb ff e5 63 calli 8007f90 <_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;
800ea08: ba 21 88 00 or r17,r17,r1
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
800ea0c: ba 2f 88 00 or r17,r17,r15
800ea10: 5a 11 00 00 sw (r16+0),r17
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
800ea14: 21 c1 01 00 andi r1,r14,0x100
800ea18: 44 20 00 07 be r1,r0,800ea34 <rtems_task_mode+0xa4>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
800ea1c: b9 a0 08 00 mv r1,r13
800ea20: 34 02 00 08 mvi r2,8
800ea24: fb ff c8 92 calli 8000c6c <__lshrsi3>
800ea28: 18 21 00 01 xori r1,r1,0x1
800ea2c: 20 21 00 01 andi r1,r1,0x1
800ea30: 31 61 00 75 sb (r11+117),r1
if ( mask & RTEMS_TIMESLICE_MASK ) {
800ea34: 21 c1 02 00 andi r1,r14,0x200
800ea38: 44 20 00 0b be r1,r0,800ea64 <rtems_task_mode+0xd4>
if ( _Modes_Is_timeslice(mode_set) ) {
800ea3c: 21 a1 02 00 andi r1,r13,0x200
800ea40: 44 20 00 08 be r1,r0,800ea60 <rtems_task_mode+0xd0>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
800ea44: 78 01 08 02 mvhi r1,0x802
800ea48: 38 21 58 d4 ori r1,r1,0x58d4
800ea4c: 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;
800ea50: 34 02 00 01 mvi r2,1
800ea54: 59 62 00 7c sw (r11+124),r2
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
800ea58: 59 61 00 78 sw (r11+120),r1
800ea5c: e0 00 00 02 bi 800ea64 <rtems_task_mode+0xd4>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
800ea60: 59 61 00 7c sw (r11+124),r1
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
800ea64: 21 c1 00 01 andi r1,r14,0x1
800ea68: 44 20 00 04 be r1,r0,800ea78 <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 ) );
800ea6c: 19 a1 00 01 xori r1,r13,0x1
800ea70: 20 21 00 01 andi r1,r1,0x1
800ea74: d0 01 00 00 wcsr IE,r1
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
800ea78: 21 ce 04 00 andi r14,r14,0x400
800ea7c: 45 c0 00 18 be r14,r0,800eadc <rtems_task_mode+0x14c>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
800ea80: 34 02 00 0a mvi r2,10
800ea84: b9 a0 08 00 mv r1,r13
800ea88: fb ff c8 79 calli 8000c6c <__lshrsi3>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
800ea8c: 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(
800ea90: 18 21 00 01 xori r1,r1,0x1
800ea94: 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;
800ea98: 44 41 00 11 be r2,r1,800eadc <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;
800ea9c: 31 81 00 08 sb (r12+8),r1
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
800eaa0: 90 00 08 00 rcsr r1,IE
800eaa4: 34 02 ff fe mvi r2,-2
800eaa8: a0 22 10 00 and r2,r1,r2
800eaac: d0 02 00 00 wcsr IE,r2
_signals = information->signals_pending;
800eab0: 29 82 00 18 lw r2,(r12+24)
information->signals_pending = information->signals_posted;
800eab4: 29 83 00 14 lw r3,(r12+20)
information->signals_posted = _signals;
800eab8: 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;
800eabc: 59 83 00 18 sw (r12+24),r3
information->signals_posted = _signals;
_ISR_Enable( _level );
800eac0: 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;
800eac4: 29 81 00 14 lw r1,(r12+20)
800eac8: 44 20 00 05 be r1,r0,800eadc <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;
800eacc: 34 01 00 01 mvi r1,1
800ead0: 31 61 00 74 sb (r11+116),r1
800ead4: b8 20 58 00 mv r11,r1
800ead8: e0 00 00 02 bi 800eae0 <rtems_task_mode+0x150>
800eadc: 34 0b 00 00 mvi r11,0
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
800eae0: 78 01 08 02 mvhi r1,0x802
800eae4: 38 21 5a e0 ori r1,r1,0x5ae0
800eae8: 28 22 00 00 lw r2,(r1+0)
800eaec: 34 01 00 03 mvi r1,3
800eaf0: 5c 41 00 05 bne r2,r1,800eb04 <rtems_task_mode+0x174> <== NEVER TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
800eaf4: f8 00 04 36 calli 800fbcc <_Thread_Evaluate_mode>
800eaf8: 5c 20 00 02 bne r1,r0,800eb00 <rtems_task_mode+0x170>
800eafc: 45 61 00 02 be r11,r1,800eb04 <rtems_task_mode+0x174>
_Thread_Dispatch();
800eb00: fb ff de d8 calli 8006660 <_Thread_Dispatch>
800eb04: 34 04 00 00 mvi r4,0
return RTEMS_SUCCESSFUL;
}
800eb08: b8 80 08 00 mv r1,r4
800eb0c: 2b 9d 00 04 lw ra,(sp+4)
800eb10: 2b 8b 00 20 lw r11,(sp+32)
800eb14: 2b 8c 00 1c lw r12,(sp+28)
800eb18: 2b 8d 00 18 lw r13,(sp+24)
800eb1c: 2b 8e 00 14 lw r14,(sp+20)
800eb20: 2b 8f 00 10 lw r15,(sp+16)
800eb24: 2b 90 00 0c lw r16,(sp+12)
800eb28: 2b 91 00 08 lw r17,(sp+8)
800eb2c: 37 9c 00 20 addi sp,sp,32
800eb30: 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 50 c0 ori r2,r2,0x50c0
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 b0 calli 800aea8 <_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 de calli 800a798 <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
8008824: f8 00 09 81 calli 800ae28 <_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 52 34 ori r6,r6,0x5234 <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
8003944: 38 a5 52 38 ori r5,r5,0x5238 <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
8003948: 38 84 52 3c ori r4,r4,0x523c <== NOT EXECUTED
int cbufsize,
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
800394c: 58 c1 00 00 sw (r6+0),r1 <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
8003950: 58 a2 00 00 sw (r5+0),r2 <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
8003954: 58 83 00 00 sw (r4+0),r3 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
8003958: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
800395c: c3 a0 00 00 ret <== NOT EXECUTED
08004fdc <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
8004fdc: 37 9c ff ec addi sp,sp,-20
8004fe0: 5b 8b 00 14 sw (sp+20),r11
8004fe4: 5b 8c 00 10 sw (sp+16),r12
8004fe8: 5b 8d 00 0c sw (sp+12),r13
8004fec: 5b 8e 00 08 sw (sp+8),r14
8004ff0: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
8004ff4: 78 02 08 02 mvhi r2,0x802
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
8004ff8: b8 20 70 00 mv r14,r1
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
8004ffc: 38 42 59 cc ori r2,r2,0x59cc
8005000: 28 41 00 00 lw r1,(r2+0)
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
8005004: 29 c4 00 00 lw r4,(r14+0)
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
8005008: 34 02 00 00 mvi r2,0
800500c: b8 40 18 00 mv r3,r2
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
8005010: 28 8b 00 38 lw r11,(r4+56)
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
8005014: f8 00 04 8c calli 8006244 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
8005018: 5c 20 00 23 bne r1,r0,80050a4 <rtems_termios_close+0xc8> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
800501c: 29 6d 00 08 lw r13,(r11+8)
8005020: 35 ad ff ff addi r13,r13,-1
8005024: 59 6d 00 08 sw (r11+8),r13
8005028: 5d a1 00 4f bne r13,r1,8005164 <rtems_termios_close+0x188> <== NEVER TAKEN
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
800502c: 29 61 00 cc lw r1,(r11+204)
8005030: 78 0c 08 02 mvhi r12,0x802
8005034: 34 02 00 05 mvi r2,5
8005038: 39 8c 57 f8 ori r12,r12,0x57f8
800503c: fb ff f0 ef calli 80013f8 <__ashlsi3>
8005040: b5 81 08 00 add r1,r12,r1
8005044: 28 2c 00 04 lw r12,(r1+4)
8005048: 45 8d 00 04 be r12,r13,8005058 <rtems_termios_close+0x7c> <== ALWAYS TAKEN
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
800504c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8005050: d9 80 00 00 call r12 <== NOT EXECUTED
8005054: e0 00 00 08 bi 8005074 <rtems_termios_close+0x98> <== NOT EXECUTED
}
else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
8005058: 29 61 00 18 lw r1,(r11+24)
800505c: b9 80 10 00 mv r2,r12
8005060: b9 80 18 00 mv r3,r12
8005064: f8 00 04 78 calli 8006244 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
8005068: 5d 81 00 0f bne r12,r1,80050a4 <rtems_termios_close+0xc8> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
800506c: b9 60 08 00 mv r1,r11
8005070: fb ff fd e0 calli 80047f0 <drainOutput>
}
if (tty->device.outputUsesInterrupts
8005074: 29 62 00 b4 lw r2,(r11+180)
8005078: 34 01 00 02 mvi r1,2
800507c: 5c 41 00 0b bne r2,r1,80050a8 <rtems_termios_close+0xcc> <== ALWAYS TAKEN
== TERMIOS_TASK_DRIVEN) {
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send(
8005080: 29 61 00 c4 lw r1,(r11+196) <== NOT EXECUTED
8005084: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8005088: f8 00 03 1b calli 8005cf4 <rtems_event_send> <== NOT EXECUTED
800508c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
tty->rxTaskId,
TERMIOS_RX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
8005090: 5c 20 00 05 bne r1,r0,80050a4 <rtems_termios_close+0xc8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send(
8005094: 29 61 00 c8 lw r1,(r11+200) <== NOT EXECUTED
8005098: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
800509c: f8 00 03 16 calli 8005cf4 <rtems_event_send> <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
80050a0: 44 2c 00 02 be r1,r12,80050a8 <rtems_termios_close+0xcc> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
80050a4: f8 00 06 61 calli 8006a28 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
if (tty->device.lastClose)
80050a8: 29 64 00 9c lw r4,(r11+156)
80050ac: 44 80 00 05 be r4,r0,80050c0 <rtems_termios_close+0xe4> <== ALWAYS TAKEN
(*tty->device.lastClose)(tty->major, tty->minor, arg);
80050b0: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED
80050b4: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED
80050b8: b9 c0 18 00 mv r3,r14 <== NOT EXECUTED
80050bc: d8 80 00 00 call r4 <== NOT EXECUTED
if (tty->forw == NULL) {
80050c0: 29 61 00 00 lw r1,(r11+0)
80050c4: 29 62 00 04 lw r2,(r11+4)
80050c8: 5c 20 00 07 bne r1,r0,80050e4 <rtems_termios_close+0x108> <== NEVER TAKEN
rtems_termios_ttyTail = tty->back;
80050cc: 78 03 08 02 mvhi r3,0x802
80050d0: 38 63 59 d0 ori r3,r3,0x59d0
80050d4: 58 62 00 00 sw (r3+0),r2
if ( rtems_termios_ttyTail != NULL ) {
80050d8: 44 41 00 04 be r2,r1,80050e8 <rtems_termios_close+0x10c> <== ALWAYS TAKEN
rtems_termios_ttyTail->forw = NULL;
80050dc: 58 41 00 00 sw (r2+0),r1 <== NOT EXECUTED
80050e0: e0 00 00 02 bi 80050e8 <rtems_termios_close+0x10c> <== NOT EXECUTED
}
}
else {
tty->forw->back = tty->back;
80050e4: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED
}
if (tty->back == NULL) {
80050e8: 29 61 00 04 lw r1,(r11+4)
80050ec: 29 62 00 00 lw r2,(r11+0)
80050f0: 5c 20 00 07 bne r1,r0,800510c <rtems_termios_close+0x130> <== NEVER TAKEN
rtems_termios_ttyHead = tty->forw;
80050f4: 78 03 08 02 mvhi r3,0x802
80050f8: 38 63 59 d4 ori r3,r3,0x59d4
80050fc: 58 62 00 00 sw (r3+0),r2
if ( rtems_termios_ttyHead != NULL ) {
8005100: 44 41 00 04 be r2,r1,8005110 <rtems_termios_close+0x134> <== ALWAYS TAKEN
rtems_termios_ttyHead->back = NULL;
8005104: 58 41 00 04 sw (r2+4),r1 <== NOT EXECUTED
8005108: e0 00 00 02 bi 8005110 <rtems_termios_close+0x134> <== NOT EXECUTED
}
}
else {
tty->back->forw = tty->forw;
800510c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
8005110: 29 61 00 14 lw r1,(r11+20)
8005114: f8 00 04 20 calli 8006194 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
8005118: 29 61 00 18 lw r1,(r11+24)
800511c: f8 00 04 1e calli 8006194 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
8005120: 29 61 00 8c lw r1,(r11+140)
8005124: f8 00 04 1c calli 8006194 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
8005128: 29 61 00 a0 lw r1,(r11+160)
800512c: 44 20 00 04 be r1,r0,800513c <rtems_termios_close+0x160> <== NEVER TAKEN
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
8005130: 29 62 00 b4 lw r2,(r11+180)
8005134: 34 01 00 02 mvi r1,2
8005138: 5c 41 00 03 bne r2,r1,8005144 <rtems_termios_close+0x168> <== ALWAYS TAKEN
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
800513c: 29 61 00 68 lw r1,(r11+104) <== NOT EXECUTED
8005140: f8 00 04 15 calli 8006194 <rtems_semaphore_delete> <== NOT EXECUTED
free (tty->rawInBuf.theBuf);
8005144: 29 61 00 58 lw r1,(r11+88)
8005148: f8 00 1a 72 calli 800bb10 <free>
free (tty->rawOutBuf.theBuf);
800514c: 29 61 00 7c lw r1,(r11+124)
8005150: f8 00 1a 70 calli 800bb10 <free>
free (tty->cbuf);
8005154: 29 61 00 1c lw r1,(r11+28)
8005158: f8 00 1a 6e calli 800bb10 <free>
free (tty);
800515c: b9 60 08 00 mv r1,r11
8005160: f8 00 1a 6c calli 800bb10 <free>
}
rtems_semaphore_release (rtems_termios_ttyMutex);
8005164: 78 01 08 02 mvhi r1,0x802
8005168: 38 21 59 cc ori r1,r1,0x59cc
800516c: 28 21 00 00 lw r1,(r1+0)
8005170: f8 00 04 85 calli 8006384 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
8005174: 34 01 00 00 mvi r1,0
8005178: 2b 9d 00 04 lw ra,(sp+4)
800517c: 2b 8b 00 14 lw r11,(sp+20)
8005180: 2b 8c 00 10 lw r12,(sp+16)
8005184: 2b 8d 00 0c lw r13,(sp+12)
8005188: 2b 8e 00 08 lw r14,(sp+8)
800518c: 37 9c 00 14 addi sp,sp,20
8005190: c3 a0 00 00 ret
08003b90 <rtems_termios_dequeue_characters>:
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
8003b90: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8003b94: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
8003b98: 28 25 00 90 lw r5,(r1+144) <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
8003b9c: 28 24 00 b4 lw r4,(r1+180) <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
8003ba0: b4 a2 10 00 add r2,r5,r2 <== NOT EXECUTED
8003ba4: 58 22 00 90 sw (r1+144),r2 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
8003ba8: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8003bac: 5c 82 00 06 bne r4,r2,8003bc4 <rtems_termios_dequeue_characters+0x34><== NOT EXECUTED
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId,
8003bb0: 28 21 00 c8 lw r1,(r1+200) <== NOT EXECUTED
8003bb4: b8 80 10 00 mv r2,r4 <== NOT EXECUTED
8003bb8: f8 00 08 4f calli 8005cf4 <rtems_event_send> <== NOT EXECUTED
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
8003bbc: 44 20 00 0d be r1,r0,8003bf0 <rtems_termios_dequeue_characters+0x60><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
8003bc0: f8 00 0b 9a calli 8006a28 <rtems_fatal_error_occurred> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else if (tty->t_line == PPPDISC ) {
8003bc4: 28 23 00 cc lw r3,(r1+204) <== NOT EXECUTED
8003bc8: 34 02 00 05 mvi r2,5 <== NOT EXECUTED
8003bcc: 5c 62 00 07 bne r3,r2,8003be8 <rtems_termios_dequeue_characters+0x58><== NOT EXECUTED
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
8003bd0: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8003bd4: 38 42 57 f8 ori r2,r2,0x57f8 <== NOT EXECUTED
8003bd8: 28 42 00 b4 lw r2,(r2+180) <== NOT EXECUTED
8003bdc: 44 40 00 05 be r2,r0,8003bf0 <rtems_termios_dequeue_characters+0x60><== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
8003be0: d8 40 00 00 call r2 <== NOT EXECUTED
8003be4: e0 00 00 03 bi 8003bf0 <rtems_termios_dequeue_characters+0x60><== NOT EXECUTED
}
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
8003be8: fb ff ff 66 calli 8003980 <rtems_termios_refill_transmitter><== NOT EXECUTED
8003bec: e0 00 00 02 bi 8003bf4 <rtems_termios_dequeue_characters+0x64><== NOT EXECUTED
8003bf0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
}
8003bf4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003bf8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8003bfc: c3 a0 00 00 ret <== NOT EXECUTED
08003c00 <rtems_termios_enqueue_raw_characters>:
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
8003c00: 37 9c ff b8 addi sp,sp,-72 <== NOT EXECUTED
8003c04: 5b 8b 00 44 sw (sp+68),r11 <== NOT EXECUTED
8003c08: 5b 8c 00 40 sw (sp+64),r12 <== NOT EXECUTED
8003c0c: 5b 8d 00 3c sw (sp+60),r13 <== NOT EXECUTED
8003c10: 5b 8e 00 38 sw (sp+56),r14 <== NOT EXECUTED
8003c14: 5b 8f 00 34 sw (sp+52),r15 <== NOT EXECUTED
8003c18: 5b 90 00 30 sw (sp+48),r16 <== NOT EXECUTED
8003c1c: 5b 91 00 2c sw (sp+44),r17 <== NOT EXECUTED
8003c20: 5b 92 00 28 sw (sp+40),r18 <== NOT EXECUTED
8003c24: 5b 93 00 24 sw (sp+36),r19 <== NOT EXECUTED
8003c28: 5b 94 00 20 sw (sp+32),r20 <== NOT EXECUTED
8003c2c: 5b 95 00 1c sw (sp+28),r21 <== NOT EXECUTED
8003c30: 5b 96 00 18 sw (sp+24),r22 <== NOT EXECUTED
8003c34: 5b 97 00 14 sw (sp+20),r23 <== NOT EXECUTED
8003c38: 5b 98 00 10 sw (sp+16),r24 <== NOT EXECUTED
8003c3c: 5b 99 00 0c sw (sp+12),r25 <== NOT EXECUTED
8003c40: 5b 9b 00 08 sw (sp+8),fp <== NOT EXECUTED
8003c44: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8003c48: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
8003c4c: 28 21 00 cc lw r1,(r1+204) <== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
8003c50: b8 40 68 00 mv r13,r2 <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
8003c54: 78 0c 08 02 mvhi r12,0x802 <== NOT EXECUTED
8003c58: b4 21 08 00 add r1,r1,r1 <== NOT EXECUTED
8003c5c: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED
8003c60: 34 02 00 04 mvi r2,4 <== NOT EXECUTED
8003c64: 39 8c 57 f8 ori r12,r12,0x57f8 <== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
8003c68: b8 60 80 00 mv r16,r3 <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
8003c6c: fb ff f5 e3 calli 80013f8 <__ashlsi3> <== NOT EXECUTED
8003c70: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED
8003c74: 28 2f 00 00 lw r15,(r1+0) <== NOT EXECUTED
while (len--) {
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
8003c78: b9 80 70 00 mv r14,r12 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
8003c7c: ba 00 60 00 mv r12,r16 <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
8003c80: 5d e0 00 19 bne r15,r0,8003ce4 <rtems_termios_enqueue_raw_characters+0xe4><== NOT EXECUTED
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
8003c84: 35 61 00 4a addi r1,r11,74 <== NOT EXECUTED
8003c88: 5b 81 00 48 sw (sp+72),r1 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
8003c8c: 35 7b 00 30 addi fp,r11,48 <== NOT EXECUTED
8003c90: b9 e0 60 00 mv r12,r15 <== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
8003c94: 34 19 00 20 mvi r25,32 <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
8003c98: 34 12 ff fe mvi r18,-2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
8003c9c: 34 18 ff df mvi r24,-33 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
8003ca0: 34 17 00 01 mvi r23,1 <== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
8003ca4: 34 16 04 00 mvi r22,1024 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]),
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
8003ca8: 34 15 01 00 mvi r21,256 <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
8003cac: 34 14 ff ef mvi r20,-17 <== NOT EXECUTED
8003cb0: e0 00 00 86 bi 8003ec8 <rtems_termios_enqueue_raw_characters+0x2c8><== NOT EXECUTED
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
8003cb4: 29 63 00 cc lw r3,(r11+204) <== NOT EXECUTED
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
8003cb8: 41 af 00 00 lbu r15,(r13+0) <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
8003cbc: 35 8c ff ff addi r12,r12,-1 <== NOT EXECUTED
8003cc0: b4 63 18 00 add r3,r3,r3 <== NOT EXECUTED
8003cc4: 34 61 00 01 addi r1,r3,1 <== NOT EXECUTED
8003cc8: fb ff f5 cc calli 80013f8 <__ashlsi3> <== NOT EXECUTED
8003ccc: b5 c1 10 00 add r2,r14,r1 <== NOT EXECUTED
8003cd0: 28 43 00 00 lw r3,(r2+0) <== NOT EXECUTED
8003cd4: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
8003cd8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8003cdc: d8 60 00 00 call r3 <== NOT EXECUTED
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
8003ce0: 35 ad 00 01 addi r13,r13,1 <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
8003ce4: 34 02 00 04 mvi r2,4 <== NOT EXECUTED
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
8003ce8: 5d 80 ff f3 bne r12,r0,8003cb4 <rtems_termios_enqueue_raw_characters+0xb4><== NOT EXECUTED
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
8003cec: 29 61 00 e4 lw r1,(r11+228) <== NOT EXECUTED
8003cf0: 5c 2c 00 7d bne r1,r12,8003ee4 <rtems_termios_enqueue_raw_characters+0x2e4><== NOT EXECUTED
8003cf4: 29 63 00 dc lw r3,(r11+220) <== NOT EXECUTED
8003cf8: 44 60 00 7b be r3,r0,8003ee4 <rtems_termios_enqueue_raw_characters+0x2e4><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
8003cfc: 29 62 00 e0 lw r2,(r11+224) <== NOT EXECUTED
8003d00: 35 61 00 30 addi r1,r11,48 <== NOT EXECUTED
8003d04: d8 60 00 00 call r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
8003d08: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
8003d0c: 59 61 00 e4 sw (r11+228),r1 <== NOT EXECUTED
8003d10: e0 00 00 76 bi 8003ee8 <rtems_termios_enqueue_raw_characters+0x2e8><== NOT EXECUTED
while (len--) {
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
8003d14: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
8003d18: 41 b1 00 00 lbu r17,(r13+0) <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
8003d1c: 20 21 02 00 andi r1,r1,0x200 <== NOT EXECUTED
8003d20: 44 20 00 11 be r1,r0,8003d64 <rtems_termios_enqueue_raw_characters+0x164><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
8003d24: 41 64 00 4a lbu r4,(r11+74) <== NOT EXECUTED
8003d28: 41 63 00 49 lbu r3,(r11+73) <== NOT EXECUTED
8003d2c: 5c 91 00 0a bne r4,r17,8003d54 <rtems_termios_enqueue_raw_characters+0x154><== NOT EXECUTED
if (c == tty->termios.c_cc[VSTART]) {
8003d30: 5c 64 00 04 bne r3,r4,8003d40 <rtems_termios_enqueue_raw_characters+0x140><== NOT EXECUTED
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
8003d34: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8003d38: 18 21 00 10 xori r1,r1,0x10 <== NOT EXECUTED
8003d3c: e0 00 00 03 bi 8003d48 <rtems_termios_enqueue_raw_characters+0x148><== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
8003d40: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8003d44: 38 21 00 10 ori r1,r1,0x10 <== NOT EXECUTED
8003d48: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
8003d4c: 34 0f 00 01 mvi r15,1 <== NOT EXECUTED
8003d50: e0 00 00 06 bi 8003d68 <rtems_termios_enqueue_raw_characters+0x168><== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
8003d54: 5c 71 00 04 bne r3,r17,8003d64 <rtems_termios_enqueue_raw_characters+0x164><== NOT EXECUTED
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
8003d58: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8003d5c: a0 34 08 00 and r1,r1,r20 <== NOT EXECUTED
8003d60: e3 ff ff fa bi 8003d48 <rtems_termios_enqueue_raw_characters+0x148><== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
8003d64: 45 e0 00 15 be r15,r0,8003db8 <rtems_termios_enqueue_raw_characters+0x1b8><== NOT EXECUTED
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
8003d68: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8003d6c: 20 21 00 30 andi r1,r1,0x30 <== NOT EXECUTED
8003d70: 5c 39 00 54 bne r1,r25,8003ec0 <rtems_termios_enqueue_raw_characters+0x2c0><== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
8003d74: 90 00 70 00 rcsr r14,IE <== NOT EXECUTED
8003d78: a1 d2 08 00 and r1,r14,r18 <== NOT EXECUTED
8003d7c: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
8003d80: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
8003d84: 29 62 00 94 lw r2,(r11+148) <== NOT EXECUTED
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
8003d88: a0 38 08 00 and r1,r1,r24 <== NOT EXECUTED
8003d8c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
8003d90: 44 40 00 08 be r2,r0,8003db0 <rtems_termios_enqueue_raw_characters+0x1b0><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
8003d94: 29 63 00 84 lw r3,(r11+132) <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
8003d98: 29 62 00 7c lw r2,(r11+124) <== NOT EXECUTED
8003d9c: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED
8003da0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8003da4: b4 43 10 00 add r2,r2,r3 <== NOT EXECUTED
8003da8: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
8003dac: d8 80 00 00 call r4 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
8003db0: d0 0e 00 00 wcsr IE,r14 <== NOT EXECUTED
8003db4: e0 00 00 43 bi 8003ec0 <rtems_termios_enqueue_raw_characters+0x2c0><== NOT EXECUTED
}
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
8003db8: 29 63 00 60 lw r3,(r11+96) <== NOT EXECUTED
8003dbc: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED
8003dc0: 34 61 00 01 addi r1,r3,1 <== NOT EXECUTED
8003dc4: f8 00 73 f4 calli 8020d94 <__umodsi3> <== NOT EXECUTED
8003dc8: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
8003dcc: 90 00 98 00 rcsr r19,IE <== NOT EXECUTED
8003dd0: a2 72 08 00 and r1,r19,r18 <== NOT EXECUTED
8003dd4: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
8003dd8: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED
8003ddc: 29 63 00 64 lw r3,(r11+100) <== NOT EXECUTED
8003de0: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED
8003de4: c8 61 18 00 sub r3,r3,r1 <== NOT EXECUTED
8003de8: b4 6e 08 00 add r1,r3,r14 <== NOT EXECUTED
8003dec: f8 00 73 ea calli 8020d94 <__umodsi3> <== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
8003df0: 29 62 00 c0 lw r2,(r11+192) <== NOT EXECUTED
8003df4: 50 41 00 22 bgeu r2,r1,8003e7c <rtems_termios_enqueue_raw_characters+0x27c><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
8003df8: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
8003dfc: 20 21 00 01 andi r1,r1,0x1 <== NOT EXECUTED
8003e00: 5c 20 00 1f bne r1,r0,8003e7c <rtems_termios_enqueue_raw_characters+0x27c><== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
8003e04: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8003e08: 38 21 00 01 ori r1,r1,0x1 <== NOT EXECUTED
8003e0c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
8003e10: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8003e14: 20 21 04 02 andi r1,r1,0x402 <== NOT EXECUTED
8003e18: 5c 36 00 0f bne r1,r22,8003e54 <rtems_termios_enqueue_raw_characters+0x254><== NOT EXECUTED
== (FL_MDXOF ) ){
if ((tty->flow_ctrl & FL_OSTOP) ||
8003e1c: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED
8003e20: 20 63 00 20 andi r3,r3,0x20 <== NOT EXECUTED
8003e24: 5c 60 00 03 bne r3,r0,8003e30 <rtems_termios_enqueue_raw_characters+0x230><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
8003e28: 29 61 00 94 lw r1,(r11+148) <== NOT EXECUTED
8003e2c: 5c 23 00 14 bne r1,r3,8003e7c <rtems_termios_enqueue_raw_characters+0x27c><== NOT EXECUTED
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
8003e30: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
8003e34: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED
8003e38: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
== (FL_MDXOF ) ){
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
8003e3c: 38 42 00 02 ori r2,r2,0x2 <== NOT EXECUTED
8003e40: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
8003e44: 2b 82 00 48 lw r2,(sp+72) <== NOT EXECUTED
8003e48: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
8003e4c: d8 80 00 00 call r4 <== NOT EXECUTED
8003e50: e0 00 00 0b bi 8003e7c <rtems_termios_enqueue_raw_characters+0x27c><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]),
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
8003e54: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8003e58: 20 21 01 04 andi r1,r1,0x104 <== NOT EXECUTED
8003e5c: 5c 35 00 08 bne r1,r21,8003e7c <rtems_termios_enqueue_raw_characters+0x27c><== NOT EXECUTED
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
8003e60: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
8003e64: 29 63 00 ac lw r3,(r11+172) <== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
8003e68: 38 21 00 04 ori r1,r1,0x4 <== NOT EXECUTED
8003e6c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
8003e70: 44 60 00 03 be r3,r0,8003e7c <rtems_termios_enqueue_raw_characters+0x27c><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
8003e74: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8003e78: d8 60 00 00 call r3 <== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
8003e7c: d0 13 00 00 wcsr IE,r19 <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
8003e80: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED
8003e84: 5d c1 00 03 bne r14,r1,8003e90 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
dropped++;
8003e88: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED
8003e8c: e0 00 00 0d bi 8003ec0 <rtems_termios_enqueue_raw_characters+0x2c0><== NOT EXECUTED
}
else {
tty->rawInBuf.theBuf[newTail] = c;
8003e90: 29 61 00 58 lw r1,(r11+88) <== NOT EXECUTED
8003e94: b4 2e 08 00 add r1,r1,r14 <== NOT EXECUTED
8003e98: 30 31 00 00 sb (r1+0),r17 <== NOT EXECUTED
tty->rawInBuf.Tail = newTail;
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
8003e9c: 29 64 00 e4 lw r4,(r11+228) <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
8003ea0: 59 6e 00 60 sw (r11+96),r14 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
8003ea4: 5c 80 00 07 bne r4,r0,8003ec0 <rtems_termios_enqueue_raw_characters+0x2c0><== NOT EXECUTED
8003ea8: 29 63 00 dc lw r3,(r11+220) <== NOT EXECUTED
8003eac: 44 64 00 05 be r3,r4,8003ec0 <rtems_termios_enqueue_raw_characters+0x2c0><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
8003eb0: 29 62 00 e0 lw r2,(r11+224) <== NOT EXECUTED
8003eb4: bb 60 08 00 mv r1,fp <== NOT EXECUTED
8003eb8: d8 60 00 00 call r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
8003ebc: 59 77 00 e4 sw (r11+228),r23 <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
8003ec0: 35 ad 00 01 addi r13,r13,1 <== NOT EXECUTED
8003ec4: 36 10 ff ff addi r16,r16,-1 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
8003ec8: 5e 00 ff 93 bne r16,r0,8003d14 <rtems_termios_enqueue_raw_characters+0x114><== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
}
}
}
tty->rawInBufDropped += dropped;
8003ecc: 29 62 00 78 lw r2,(r11+120) <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
8003ed0: 29 61 00 68 lw r1,(r11+104) <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
}
}
}
tty->rawInBufDropped += dropped;
8003ed4: b4 4c 10 00 add r2,r2,r12 <== NOT EXECUTED
8003ed8: 59 62 00 78 sw (r11+120),r2 <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
8003edc: f8 00 09 2a calli 8006384 <rtems_semaphore_release> <== NOT EXECUTED
return dropped;
8003ee0: e0 00 00 02 bi 8003ee8 <rtems_termios_enqueue_raw_characters+0x2e8><== NOT EXECUTED
8003ee4: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
}
8003ee8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8003eec: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003ef0: 2b 8b 00 44 lw r11,(sp+68) <== NOT EXECUTED
8003ef4: 2b 8c 00 40 lw r12,(sp+64) <== NOT EXECUTED
8003ef8: 2b 8d 00 3c lw r13,(sp+60) <== NOT EXECUTED
8003efc: 2b 8e 00 38 lw r14,(sp+56) <== NOT EXECUTED
8003f00: 2b 8f 00 34 lw r15,(sp+52) <== NOT EXECUTED
8003f04: 2b 90 00 30 lw r16,(sp+48) <== NOT EXECUTED
8003f08: 2b 91 00 2c lw r17,(sp+44) <== NOT EXECUTED
8003f0c: 2b 92 00 28 lw r18,(sp+40) <== NOT EXECUTED
8003f10: 2b 93 00 24 lw r19,(sp+36) <== NOT EXECUTED
8003f14: 2b 94 00 20 lw r20,(sp+32) <== NOT EXECUTED
8003f18: 2b 95 00 1c lw r21,(sp+28) <== NOT EXECUTED
8003f1c: 2b 96 00 18 lw r22,(sp+24) <== NOT EXECUTED
8003f20: 2b 97 00 14 lw r23,(sp+20) <== NOT EXECUTED
8003f24: 2b 98 00 10 lw r24,(sp+16) <== NOT EXECUTED
8003f28: 2b 99 00 0c lw r25,(sp+12) <== NOT EXECUTED
8003f2c: 2b 9b 00 08 lw fp,(sp+8) <== NOT EXECUTED
8003f30: 37 9c 00 48 addi sp,sp,72 <== NOT EXECUTED
8003f34: c3 a0 00 00 ret <== NOT EXECUTED
080037c4 <rtems_termios_initialize>:
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
80037c4: 37 9c ff f8 addi sp,sp,-8
80037c8: 5b 8b 00 08 sw (sp+8),r11
80037cc: 5b 9d 00 04 sw (sp+4),ra
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
80037d0: 78 05 08 02 mvhi r5,0x802
80037d4: 38 a5 59 cc ori r5,r5,0x59cc
80037d8: 28 ab 00 00 lw r11,(r5+0)
80037dc: 5d 60 00 09 bne r11,r0,8003800 <rtems_termios_initialize+0x3c><== NEVER TAKEN
sc = rtems_semaphore_create (
80037e0: 78 01 54 52 mvhi r1,0x5452
80037e4: 38 21 6d 69 ori r1,r1,0x6d69
80037e8: 34 02 00 01 mvi r2,1
80037ec: 34 03 00 54 mvi r3,84
80037f0: b9 60 20 00 mv r4,r11
80037f4: f8 00 09 e6 calli 8005f8c <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'm', 'i'),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_termios_ttyMutex);
if (sc != RTEMS_SUCCESSFUL)
80037f8: 44 2b 00 02 be r1,r11,8003800 <rtems_termios_initialize+0x3c><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
80037fc: f8 00 0c 8b calli 8006a28 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
8003800: 2b 9d 00 04 lw ra,(sp+4)
8003804: 2b 8b 00 08 lw r11,(sp+8)
8003808: 37 9c 00 08 addi sp,sp,8
800380c: c3 a0 00 00 ret
08004bf0 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
8004bf0: 37 9c ff e8 addi sp,sp,-24
8004bf4: 5b 8b 00 18 sw (sp+24),r11
8004bf8: 5b 8c 00 14 sw (sp+20),r12
8004bfc: 5b 8d 00 10 sw (sp+16),r13
8004c00: 5b 8e 00 0c sw (sp+12),r14
8004c04: 5b 8f 00 08 sw (sp+8),r15
8004c08: 5b 9d 00 04 sw (sp+4),ra
8004c0c: b8 20 60 00 mv r12,r1
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
8004c10: 28 21 00 00 lw r1,(r1+0)
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
8004c14: 34 02 00 00 mvi r2,0
8004c18: 59 82 00 0c sw (r12+12),r2
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
8004c1c: 28 2b 00 38 lw r11,(r1+56)
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
8004c20: b8 40 18 00 mv r3,r2
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
8004c24: 29 8e 00 08 lw r14,(r12+8)
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
8004c28: 29 61 00 18 lw r1,(r11+24)
8004c2c: f8 00 05 86 calli 8006244 <rtems_semaphore_obtain>
8004c30: b8 20 68 00 mv r13,r1
if (sc != RTEMS_SUCCESSFUL) {
8004c34: 5c 20 00 e0 bne r1,r0,8004fb4 <rtems_termios_ioctl+0x3c4> <== NEVER TAKEN
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
8004c38: 29 82 00 04 lw r2,(r12+4)
8004c3c: 34 01 00 04 mvi r1,4
8004c40: 44 41 00 ab be r2,r1,8004eec <rtems_termios_ioctl+0x2fc> <== NEVER TAKEN
8004c44: 54 41 00 07 bgu r2,r1,8004c60 <rtems_termios_ioctl+0x70> <== NEVER TAKEN
8004c48: 34 01 00 02 mvi r1,2
8004c4c: 44 41 00 24 be r2,r1,8004cdc <rtems_termios_ioctl+0xec>
8004c50: 54 41 00 9f bgu r2,r1,8004ecc <rtems_termios_ioctl+0x2dc> <== NEVER TAKEN
8004c54: 34 01 00 01 mvi r1,1
8004c58: 5c 41 00 0f bne r2,r1,8004c94 <rtems_termios_ioctl+0xa4> <== NEVER TAKEN
8004c5c: e0 00 00 1b bi 8004cc8 <rtems_termios_ioctl+0xd8>
8004c60: 78 01 40 04 mvhi r1,0x4004 <== NOT EXECUTED
8004c64: 38 21 66 7f ori r1,r1,0x667f <== NOT EXECUTED
8004c68: 44 41 00 c5 be r2,r1,8004f7c <rtems_termios_ioctl+0x38c> <== NOT EXECUTED
8004c6c: 54 41 00 04 bgu r2,r1,8004c7c <rtems_termios_ioctl+0x8c> <== NOT EXECUTED
8004c70: 34 01 00 05 mvi r1,5 <== NOT EXECUTED
8004c74: 5c 41 00 08 bne r2,r1,8004c94 <rtems_termios_ioctl+0xa4> <== NOT EXECUTED
8004c78: e0 00 00 98 bi 8004ed8 <rtems_termios_ioctl+0x2e8> <== NOT EXECUTED
8004c7c: 78 01 40 04 mvhi r1,0x4004 <== NOT EXECUTED
8004c80: 38 21 74 1a ori r1,r1,0x741a <== NOT EXECUTED
8004c84: 44 41 00 ba be r2,r1,8004f6c <rtems_termios_ioctl+0x37c> <== NOT EXECUTED
8004c88: 78 01 80 04 mvhi r1,0x8004 <== NOT EXECUTED
8004c8c: 38 21 74 1b ori r1,r1,0x741b <== NOT EXECUTED
8004c90: 44 41 00 9c be r2,r1,8004f00 <rtems_termios_ioctl+0x310> <== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
8004c94: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED
8004c98: 78 0d 08 02 mvhi r13,0x802 <== NOT EXECUTED
8004c9c: 34 02 00 05 mvi r2,5 <== NOT EXECUTED
8004ca0: 39 ad 57 f8 ori r13,r13,0x57f8 <== NOT EXECUTED
8004ca4: fb ff f1 d5 calli 80013f8 <__ashlsi3> <== NOT EXECUTED
8004ca8: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED
8004cac: 28 23 00 18 lw r3,(r1+24) <== NOT EXECUTED
8004cb0: 34 0d 00 0a mvi r13,10 <== NOT EXECUTED
8004cb4: 44 60 00 be be r3,r0,8004fac <rtems_termios_ioctl+0x3bc> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
8004cb8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8004cbc: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
8004cc0: d8 60 00 00 call r3 <== NOT EXECUTED
8004cc4: e0 00 00 a8 bi 8004f64 <rtems_termios_ioctl+0x374> <== NOT EXECUTED
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
8004cc8: 29 81 00 08 lw r1,(r12+8)
8004ccc: 35 62 00 30 addi r2,r11,48
8004cd0: 34 03 00 24 mvi r3,36
8004cd4: f8 00 30 bb calli 8010fc0 <memcpy>
break;
8004cd8: e0 00 00 b5 bi 8004fac <rtems_termios_ioctl+0x3bc>
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
8004cdc: 29 82 00 08 lw r2,(r12+8)
8004ce0: 35 61 00 30 addi r1,r11,48
8004ce4: 34 03 00 24 mvi r3,36
8004ce8: f8 00 30 b6 calli 8010fc0 <memcpy>
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
8004cec: 29 61 00 b8 lw r1,(r11+184)
8004cf0: 20 21 02 00 andi r1,r1,0x200
8004cf4: 44 20 00 1d be r1,r0,8004d68 <rtems_termios_ioctl+0x178>
8004cf8: 29 61 00 30 lw r1,(r11+48)
8004cfc: 20 21 04 00 andi r1,r1,0x400
8004d00: 5c 20 00 1a bne r1,r0,8004d68 <rtems_termios_ioctl+0x178> <== ALWAYS TAKEN
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
8004d04: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
8004d08: 34 01 fd ef mvi r1,-529 <== NOT EXECUTED
8004d0c: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED
8004d10: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
8004d14: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8004d18: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED
8004d1c: 44 20 00 13 be r1,r0,8004d68 <rtems_termios_ioctl+0x178> <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
8004d20: 90 00 70 00 rcsr r14,IE <== NOT EXECUTED
8004d24: 34 01 ff fe mvi r1,-2 <== NOT EXECUTED
8004d28: a1 c1 08 00 and r1,r14,r1 <== NOT EXECUTED
8004d2c: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
8004d30: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
8004d34: 34 01 ff df mvi r1,-33 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
8004d38: 29 63 00 94 lw r3,(r11+148) <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
8004d3c: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED
8004d40: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
8004d44: 44 60 00 08 be r3,r0,8004d64 <rtems_termios_ioctl+0x174> <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
8004d48: 29 63 00 7c lw r3,(r11+124) <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
8004d4c: 29 62 00 84 lw r2,(r11+132) <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
8004d50: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED
8004d54: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8004d58: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED
8004d5c: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
8004d60: d8 80 00 00 call r4 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
8004d64: d0 0e 00 00 wcsr IE,r14 <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) &&
8004d68: 29 61 00 b8 lw r1,(r11+184)
8004d6c: 20 21 04 00 andi r1,r1,0x400
8004d70: 44 20 00 0c be r1,r0,8004da0 <rtems_termios_ioctl+0x1b0> <== ALWAYS TAKEN
8004d74: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
8004d78: 20 21 10 00 andi r1,r1,0x1000 <== NOT EXECUTED
8004d7c: 5c 20 00 09 bne r1,r0,8004da0 <rtems_termios_ioctl+0x1b0> <== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
8004d80: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
8004d84: 34 01 fb ff mvi r1,-1025 <== NOT EXECUTED
8004d88: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED
8004d8c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
8004d90: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
8004d94: 34 01 ff fd mvi r1,-3 <== NOT EXECUTED
8004d98: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED
8004d9c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) &&
8004da0: 29 61 00 b8 lw r1,(r11+184)
8004da4: 20 21 01 00 andi r1,r1,0x100
8004da8: 44 20 00 12 be r1,r0,8004df0 <rtems_termios_ioctl+0x200> <== ALWAYS TAKEN
8004dac: 29 61 00 38 lw r1,(r11+56) <== NOT EXECUTED
8004db0: 48 01 00 10 bg r0,r1,8004df0 <rtems_termios_ioctl+0x200> <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
8004db4: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
8004db8: 34 01 fe ff mvi r1,-257 <== NOT EXECUTED
8004dbc: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED
8004dc0: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
8004dc4: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8004dc8: 20 21 00 04 andi r1,r1,0x4 <== NOT EXECUTED
8004dcc: 44 20 00 05 be r1,r0,8004de0 <rtems_termios_ioctl+0x1f0> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
8004dd0: 29 62 00 b0 lw r2,(r11+176) <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
8004dd4: 44 40 00 03 be r2,r0,8004de0 <rtems_termios_ioctl+0x1f0> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
tty->device.startRemoteTx(tty->minor);
8004dd8: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8004ddc: d8 40 00 00 call r2 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
8004de0: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
8004de4: 34 01 ff fb mvi r1,-5 <== NOT EXECUTED
8004de8: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED
8004dec: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
8004df0: 29 61 00 38 lw r1,(r11+56)
8004df4: 4c 20 00 04 bge r1,r0,8004e04 <rtems_termios_ioctl+0x214> <== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDRTS;
8004df8: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8004dfc: 38 21 01 00 ori r1,r1,0x100 <== NOT EXECUTED
8004e00: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
8004e04: 29 61 00 30 lw r1,(r11+48)
8004e08: 20 21 10 00 andi r1,r1,0x1000
8004e0c: 44 20 00 04 be r1,r0,8004e1c <rtems_termios_ioctl+0x22c> <== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDXOF;
8004e10: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8004e14: 38 21 04 00 ori r1,r1,0x400 <== NOT EXECUTED
8004e18: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
8004e1c: 29 61 00 30 lw r1,(r11+48)
8004e20: 20 21 04 00 andi r1,r1,0x400
8004e24: 44 20 00 04 be r1,r0,8004e34 <rtems_termios_ioctl+0x244> <== NEVER TAKEN
tty->flow_ctrl |= FL_MDXON;
8004e28: 29 61 00 b8 lw r1,(r11+184)
8004e2c: 38 21 02 00 ori r1,r1,0x200
8004e30: 59 61 00 b8 sw (r11+184),r1
tty->termios = *(struct termios *)args->buffer;
/* check for and process change in flow control options */
termios_set_flowctrl(tty);
if (tty->termios.c_lflag & ICANON) {
8004e34: 29 6e 00 3c lw r14,(r11+60)
8004e38: 34 01 00 00 mvi r1,0
8004e3c: 21 ce 00 02 andi r14,r14,0x2
8004e40: 45 c1 00 05 be r14,r1,8004e54 <rtems_termios_ioctl+0x264> <== NEVER TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
8004e44: 59 61 00 74 sw (r11+116),r1
/* check for and process change in flow control options */
termios_set_flowctrl(tty);
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
8004e48: 59 61 00 6c sw (r11+108),r1
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
8004e4c: 59 61 00 70 sw (r11+112),r1
8004e50: e0 00 00 19 bi 8004eb4 <rtems_termios_ioctl+0x2c4>
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
8004e54: 41 6f 00 46 lbu r15,(r11+70) <== NOT EXECUTED
8004e58: f8 00 03 1d calli 8005acc <rtems_clock_get_ticks_per_second><== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
8004e5c: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED
8004e60: f8 00 6f 3e calli 8020b58 <__mulsi3> <== NOT EXECUTED
8004e64: 34 02 00 0a mvi r2,10 <== NOT EXECUTED
8004e68: f8 00 6f bb calli 8020d54 <__udivsi3> <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
8004e6c: 41 62 00 46 lbu r2,(r11+70) <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
8004e70: 59 61 00 54 sw (r11+84),r1 <== NOT EXECUTED
8004e74: 41 63 00 47 lbu r3,(r11+71) <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
8004e78: 44 4e 00 08 be r2,r14,8004e98 <rtems_termios_ioctl+0x2a8> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
8004e7c: 59 6e 00 6c sw (r11+108),r14 <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
8004e80: 59 61 00 70 sw (r11+112),r1 <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
8004e84: 44 60 00 03 be r3,r0,8004e90 <rtems_termios_ioctl+0x2a0> <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
8004e88: 59 6e 00 74 sw (r11+116),r14 <== NOT EXECUTED
8004e8c: e0 00 00 0a bi 8004eb4 <rtems_termios_ioctl+0x2c4> <== NOT EXECUTED
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
8004e90: 59 61 00 74 sw (r11+116),r1 <== NOT EXECUTED
8004e94: e0 00 00 08 bi 8004eb4 <rtems_termios_ioctl+0x2c4> <== NOT EXECUTED
}
else {
if (tty->termios.c_cc[VMIN]) {
8004e98: 44 62 00 05 be r3,r2,8004eac <rtems_termios_ioctl+0x2bc> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
8004e9c: 59 62 00 74 sw (r11+116),r2 <== NOT EXECUTED
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
8004ea0: 59 62 00 6c sw (r11+108),r2 <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
8004ea4: 59 62 00 70 sw (r11+112),r2 <== NOT EXECUTED
8004ea8: e0 00 00 03 bi 8004eb4 <rtems_termios_ioctl+0x2c4> <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
8004eac: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
8004eb0: 59 61 00 6c sw (r11+108),r1 <== NOT EXECUTED
}
}
}
if (tty->device.setAttributes)
8004eb4: 29 63 00 a8 lw r3,(r11+168)
8004eb8: 44 60 00 3d be r3,r0,8004fac <rtems_termios_ioctl+0x3bc> <== NEVER TAKEN
(*tty->device.setAttributes)(tty->minor, &tty->termios);
8004ebc: 29 61 00 10 lw r1,(r11+16)
8004ec0: 35 62 00 30 addi r2,r11,48
8004ec4: d8 60 00 00 call r3
8004ec8: e0 00 00 39 bi 8004fac <rtems_termios_ioctl+0x3bc>
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
8004ecc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8004ed0: fb ff fe 48 calli 80047f0 <drainOutput> <== NOT EXECUTED
break;
8004ed4: e0 00 00 36 bi 8004fac <rtems_termios_ioctl+0x3bc> <== NOT EXECUTED
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
8004ed8: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED
8004edc: 59 61 00 d4 sw (r11+212),r1 <== NOT EXECUTED
8004ee0: 29 ce 00 04 lw r14,(r14+4) <== NOT EXECUTED
8004ee4: 59 6e 00 d8 sw (r11+216),r14 <== NOT EXECUTED
break;
8004ee8: e0 00 00 31 bi 8004fac <rtems_termios_ioctl+0x3bc> <== NOT EXECUTED
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
8004eec: 29 c2 00 00 lw r2,(r14+0) <== NOT EXECUTED
8004ef0: 59 62 00 dc sw (r11+220),r2 <== NOT EXECUTED
8004ef4: 29 ce 00 04 lw r14,(r14+4) <== NOT EXECUTED
8004ef8: 59 6e 00 e0 sw (r11+224),r14 <== NOT EXECUTED
break;
8004efc: e0 00 00 2c bi 8004fac <rtems_termios_ioctl+0x3bc> <== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
8004f00: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED
8004f04: 34 02 00 05 mvi r2,5 <== NOT EXECUTED
8004f08: 78 0e 08 02 mvhi r14,0x802 <== NOT EXECUTED
8004f0c: fb ff f1 3b calli 80013f8 <__ashlsi3> <== NOT EXECUTED
8004f10: 39 ce 57 f8 ori r14,r14,0x57f8 <== NOT EXECUTED
8004f14: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED
8004f18: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED
8004f1c: 44 40 00 04 be r2,r0,8004f2c <rtems_termios_ioctl+0x33c> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
8004f20: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8004f24: d8 40 00 00 call r2 <== NOT EXECUTED
8004f28: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
}
tty->t_line=*(int*)(args->buffer);
8004f2c: 29 81 00 08 lw r1,(r12+8) <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
8004f30: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8004f34: 59 62 00 d0 sw (r11+208),r2 <== NOT EXECUTED
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
8004f38: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
8004f3c: 34 02 00 05 mvi r2,5 <== NOT EXECUTED
8004f40: 78 0e 08 02 mvhi r14,0x802 <== NOT EXECUTED
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
8004f44: 59 61 00 cc sw (r11+204),r1 <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
8004f48: fb ff f1 2c calli 80013f8 <__ashlsi3> <== NOT EXECUTED
8004f4c: 39 ce 57 f8 ori r14,r14,0x57f8 <== NOT EXECUTED
8004f50: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED
8004f54: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED
8004f58: 44 40 00 15 be r2,r0,8004fac <rtems_termios_ioctl+0x3bc> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
8004f5c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8004f60: d8 40 00 00 call r2 <== NOT EXECUTED
8004f64: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
8004f68: e0 00 00 11 bi 8004fac <rtems_termios_ioctl+0x3bc> <== NOT EXECUTED
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
8004f6c: 29 81 00 08 lw r1,(r12+8) <== NOT EXECUTED
8004f70: 29 62 00 cc lw r2,(r11+204) <== NOT EXECUTED
8004f74: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
break;
8004f78: e0 00 00 0d bi 8004fac <rtems_termios_ioctl+0x3bc> <== NOT EXECUTED
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
8004f7c: 29 62 00 60 lw r2,(r11+96) <== NOT EXECUTED
8004f80: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED
8004f84: c8 41 08 00 sub r1,r2,r1 <== NOT EXECUTED
if ( rawnc < 0 )
8004f88: 4c 20 00 03 bge r1,r0,8004f94 <rtems_termios_ioctl+0x3a4> <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
8004f8c: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED
8004f90: b4 22 08 00 add r1,r1,r2 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
8004f94: 29 64 00 20 lw r4,(r11+32) <== NOT EXECUTED
8004f98: 29 62 00 24 lw r2,(r11+36) <== NOT EXECUTED
8004f9c: 29 83 00 08 lw r3,(r12+8) <== NOT EXECUTED
8004fa0: c8 82 10 00 sub r2,r4,r2 <== NOT EXECUTED
8004fa4: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED
8004fa8: 58 61 00 00 sw (r3+0),r1 <== NOT EXECUTED
}
break;
}
rtems_semaphore_release (tty->osem);
8004fac: 29 61 00 18 lw r1,(r11+24)
8004fb0: f8 00 04 f5 calli 8006384 <rtems_semaphore_release>
args->ioctl_return = sc;
return sc;
}
8004fb4: b9 a0 08 00 mv r1,r13
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
args->ioctl_return = sc;
8004fb8: 59 8d 00 0c sw (r12+12),r13
return sc;
}
8004fbc: 2b 9d 00 04 lw ra,(sp+4)
8004fc0: 2b 8b 00 18 lw r11,(sp+24)
8004fc4: 2b 8c 00 14 lw r12,(sp+20)
8004fc8: 2b 8d 00 10 lw r13,(sp+16)
8004fcc: 2b 8e 00 0c lw r14,(sp+12)
8004fd0: 2b 8f 00 08 lw r15,(sp+8)
8004fd4: 37 9c 00 18 addi sp,sp,24
8004fd8: c3 a0 00 00 ret
08005194 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
8005194: 37 9c ff d0 addi sp,sp,-48
8005198: 5b 8b 00 30 sw (sp+48),r11
800519c: 5b 8c 00 2c sw (sp+44),r12
80051a0: 5b 8d 00 28 sw (sp+40),r13
80051a4: 5b 8e 00 24 sw (sp+36),r14
80051a8: 5b 8f 00 20 sw (sp+32),r15
80051ac: 5b 90 00 1c sw (sp+28),r16
80051b0: 5b 91 00 18 sw (sp+24),r17
80051b4: 5b 92 00 14 sw (sp+20),r18
80051b8: 5b 93 00 10 sw (sp+16),r19
80051bc: 5b 94 00 0c sw (sp+12),r20
80051c0: 5b 95 00 08 sw (sp+8),r21
80051c4: 5b 9d 00 04 sw (sp+4),ra
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
80051c8: 78 05 08 02 mvhi r5,0x802
80051cc: 38 a5 59 cc ori r5,r5,0x59cc
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
80051d0: b8 20 88 00 mv r17,r1
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
80051d4: 28 a1 00 00 lw r1,(r5+0)
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
80051d8: b8 40 90 00 mv r18,r2
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
80051dc: 34 02 00 00 mvi r2,0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
80051e0: b8 60 98 00 mv r19,r3
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
80051e4: b8 40 18 00 mv r3,r2
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
80051e8: b8 80 a0 00 mv r20,r4
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
80051ec: f8 00 04 16 calli 8006244 <rtems_semaphore_obtain>
80051f0: b8 20 70 00 mv r14,r1
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
80051f4: 5c 20 00 f7 bne r1,r0,80055d0 <rtems_termios_open+0x43c> <== NEVER TAKEN
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
80051f8: 78 01 08 02 mvhi r1,0x802
80051fc: 38 21 59 d4 ori r1,r1,0x59d4
8005200: 28 2b 00 00 lw r11,(r1+0)
8005204: e0 00 00 06 bi 800521c <rtems_termios_open+0x88>
if ((tty->major == major) && (tty->minor == minor))
8005208: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED
800520c: 5c 31 00 03 bne r1,r17,8005218 <rtems_termios_open+0x84> <== NOT EXECUTED
8005210: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8005214: 44 32 00 ce be r1,r18,800554c <rtems_termios_open+0x3b8> <== NOT EXECUTED
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
8005218: 29 6b 00 00 lw r11,(r11+0) <== NOT EXECUTED
800521c: 34 0d 00 00 mvi r13,0
8005220: 5d 6d ff fa bne r11,r13,8005208 <rtems_termios_open+0x74> <== NEVER TAKEN
8005224: e0 00 00 fa bi 800560c <rtems_termios_open+0x478>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
8005228: 78 01 08 02 mvhi r1,0x802
800522c: 38 21 52 38 ori r1,r1,0x5238
8005230: 28 21 00 00 lw r1,(r1+0)
8005234: 59 61 00 64 sw (r11+100),r1
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
8005238: 29 61 00 64 lw r1,(r11+100)
800523c: f8 00 1b 3d calli 800bf30 <malloc>
8005240: 59 61 00 58 sw (r11+88),r1
if (tty->rawInBuf.theBuf == NULL) {
8005244: 5c 20 00 08 bne r1,r0,8005264 <rtems_termios_open+0xd0> <== ALWAYS TAKEN
free(tty);
8005248: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800524c: f8 00 1a 31 calli 800bb10 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
8005250: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8005254: 38 21 59 cc ori r1,r1,0x59cc <== NOT EXECUTED
8005258: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
800525c: 34 0e 00 1a mvi r14,26 <== NOT EXECUTED
8005260: e0 00 00 db bi 80055cc <rtems_termios_open+0x438> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
8005264: 78 01 08 02 mvhi r1,0x802
8005268: 38 21 52 3c ori r1,r1,0x523c
800526c: 28 21 00 00 lw r1,(r1+0)
8005270: 59 61 00 88 sw (r11+136),r1
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
8005274: 29 61 00 88 lw r1,(r11+136)
8005278: f8 00 1b 2e calli 800bf30 <malloc>
800527c: 59 61 00 7c sw (r11+124),r1
if (tty->rawOutBuf.theBuf == NULL) {
8005280: 5c 20 00 04 bne r1,r0,8005290 <rtems_termios_open+0xfc> <== ALWAYS TAKEN
free((void *)(tty->rawInBuf.theBuf));
8005284: 29 61 00 58 lw r1,(r11+88) <== NOT EXECUTED
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
8005288: 34 0e 00 1a mvi r14,26 <== NOT EXECUTED
800528c: e0 00 00 0b bi 80052b8 <rtems_termios_open+0x124> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
8005290: 78 01 08 02 mvhi r1,0x802
8005294: 38 21 52 34 ori r1,r1,0x5234
8005298: 28 21 00 00 lw r1,(r1+0)
800529c: f8 00 1b 25 calli 800bf30 <malloc>
80052a0: 59 61 00 1c sw (r11+28),r1
if (tty->cbuf == NULL) {
80052a4: 5c 20 00 09 bne r1,r0,80052c8 <rtems_termios_open+0x134> <== ALWAYS TAKEN
free((void *)(tty->rawOutBuf.theBuf));
80052a8: 29 61 00 7c lw r1,(r11+124) <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
80052ac: 34 0e 00 1a mvi r14,26 <== NOT EXECUTED
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
80052b0: f8 00 1a 18 calli 800bb10 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
80052b4: 29 61 00 58 lw r1,(r11+88) <== NOT EXECUTED
80052b8: f8 00 1a 16 calli 800bb10 <free> <== NOT EXECUTED
free(tty);
80052bc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80052c0: f8 00 1a 14 calli 800bb10 <free> <== NOT EXECUTED
80052c4: e0 00 00 bf bi 80055c0 <rtems_termios_open+0x42c> <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
80052c8: 78 01 08 02 mvhi r1,0x802
80052cc: 38 21 59 d4 ori r1,r1,0x59d4
80052d0: 28 21 00 00 lw r1,(r1+0)
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
80052d4: 59 6d 00 d4 sw (r11+212),r13
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
80052d8: 59 6d 00 04 sw (r11+4),r13
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
tty->tty_snd.sw_arg = NULL;
80052dc: 59 6d 00 d8 sw (r11+216),r13
tty->tty_rcv.sw_pfn = NULL;
80052e0: 59 6d 00 dc sw (r11+220),r13
tty->tty_rcv.sw_arg = NULL;
80052e4: 59 6d 00 e0 sw (r11+224),r13
tty->tty_rcvwakeup = 0;
80052e8: 59 6d 00 e4 sw (r11+228),r13
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
80052ec: 59 61 00 00 sw (r11+0),r1
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
80052f0: 44 20 00 02 be r1,r0,80052f8 <rtems_termios_open+0x164> <== ALWAYS TAKEN
rtems_termios_ttyHead->back = tty;
80052f4: 58 2b 00 04 sw (r1+4),r11 <== NOT EXECUTED
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
80052f8: 78 05 08 02 mvhi r5,0x802
80052fc: 38 a5 59 d0 ori r5,r5,0x59d0
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
8005300: 78 01 08 02 mvhi r1,0x802
if (rtems_termios_ttyTail == NULL)
8005304: 28 a2 00 00 lw r2,(r5+0)
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
8005308: 38 21 59 d4 ori r1,r1,0x59d4
800530c: 58 2c 00 00 sw (r1+0),r12
if (rtems_termios_ttyTail == NULL)
8005310: 5c 40 00 02 bne r2,r0,8005318 <rtems_termios_open+0x184> <== NEVER TAKEN
rtems_termios_ttyTail = tty;
8005314: 58 ac 00 00 sw (r5+0),r12
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
8005318: 78 0d 08 02 mvhi r13,0x802
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
800531c: 59 92 00 10 sw (r12+16),r18
tty->major = major;
8005320: 59 91 00 0c sw (r12+12),r17
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
8005324: 39 ad 52 40 ori r13,r13,0x5240
8005328: 41 a1 00 00 lbu r1,(r13+0)
800532c: 78 05 54 52 mvhi r5,0x5452
8005330: 38 a5 69 00 ori r5,r5,0x6900
8005334: b8 25 08 00 or r1,r1,r5
8005338: 34 02 00 01 mvi r2,1
800533c: 34 03 00 54 mvi r3,84
8005340: 34 04 00 00 mvi r4,0
8005344: 35 85 00 14 addi r5,r12,20
8005348: f8 00 03 11 calli 8005f8c <rtems_semaphore_create>
800534c: b8 20 78 00 mv r15,r1
rtems_build_name ('T', 'R', 'i', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
8005350: 5c 20 00 9b bne r1,r0,80055bc <rtems_termios_open+0x428> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
8005354: 41 a1 00 00 lbu r1,(r13+0)
8005358: 78 05 54 52 mvhi r5,0x5452
800535c: 38 a5 6f 00 ori r5,r5,0x6f00
8005360: b8 25 08 00 or r1,r1,r5
8005364: 34 02 00 01 mvi r2,1
8005368: 34 03 00 54 mvi r3,84
800536c: b9 e0 20 00 mv r4,r15
8005370: 35 85 00 18 addi r5,r12,24
8005374: f8 00 03 06 calli 8005f8c <rtems_semaphore_create>
8005378: b8 20 80 00 mv r16,r1
rtems_build_name ('T', 'R', 'o', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
800537c: 5c 2f 00 90 bne r1,r15,80055bc <rtems_termios_open+0x428> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
8005380: 41 a1 00 00 lbu r1,(r13+0)
8005384: 78 05 54 52 mvhi r5,0x5452
8005388: 38 a5 78 00 ori r5,r5,0x7800
800538c: b8 25 08 00 or r1,r1,r5
8005390: ba 00 10 00 mv r2,r16
8005394: 34 03 00 20 mvi r3,32
8005398: ba 00 20 00 mv r4,r16
800539c: 35 85 00 8c addi r5,r12,140
80053a0: f8 00 02 fb calli 8005f8c <rtems_semaphore_create>
80053a4: b8 20 78 00 mv r15,r1
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
80053a8: 5c 30 00 85 bne r1,r16,80055bc <rtems_termios_open+0x428> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
80053ac: 59 81 00 94 sw (r12+148),r1
/*
* Set callbacks
*/
tty->device = *callbacks;
80053b0: ba 80 10 00 mv r2,r20
80053b4: 35 81 00 98 addi r1,r12,152
80053b8: 34 03 00 20 mvi r3,32
80053bc: f8 00 2f 01 calli 8010fc0 <memcpy>
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
80053c0: 29 82 00 b4 lw r2,(r12+180)
80053c4: 34 01 00 02 mvi r1,2
80053c8: 5c 41 00 18 bne r2,r1,8005428 <rtems_termios_open+0x294> <== ALWAYS TAKEN
sc = rtems_task_create (
80053cc: 41 a1 00 00 lbu r1,(r13+0) <== NOT EXECUTED
80053d0: 78 04 54 78 mvhi r4,0x5478 <== NOT EXECUTED
80053d4: 38 84 54 00 ori r4,r4,0x5400 <== NOT EXECUTED
80053d8: b8 24 08 00 or r1,r1,r4 <== NOT EXECUTED
80053dc: 34 02 00 0a mvi r2,10 <== NOT EXECUTED
80053e0: 34 03 04 00 mvi r3,1024 <== NOT EXECUTED
80053e4: 34 04 05 00 mvi r4,1280 <== NOT EXECUTED
80053e8: b9 e0 28 00 mv r5,r15 <== NOT EXECUTED
80053ec: 35 86 00 c8 addi r6,r12,200 <== NOT EXECUTED
80053f0: f8 00 04 22 calli 8006478 <rtems_task_create> <== NOT EXECUTED
80053f4: b8 20 80 00 mv r16,r1 <== NOT EXECUTED
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
80053f8: 5c 2f 00 71 bne r1,r15,80055bc <rtems_termios_open+0x428> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
80053fc: 41 a1 00 00 lbu r1,(r13+0) <== NOT EXECUTED
8005400: 78 04 52 78 mvhi r4,0x5278 <== NOT EXECUTED
8005404: 38 84 54 00 ori r4,r4,0x5400 <== NOT EXECUTED
8005408: b8 24 08 00 or r1,r1,r4 <== NOT EXECUTED
800540c: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
8005410: 34 03 04 00 mvi r3,1024 <== NOT EXECUTED
8005414: 34 04 05 00 mvi r4,1280 <== NOT EXECUTED
8005418: ba 00 28 00 mv r5,r16 <== NOT EXECUTED
800541c: 35 86 00 c4 addi r6,r12,196 <== NOT EXECUTED
8005420: f8 00 04 16 calli 8006478 <rtems_task_create> <== NOT EXECUTED
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
8005424: 5c 30 00 66 bne r1,r16,80055bc <rtems_termios_open+0x428> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
8005428: 29 81 00 a0 lw r1,(r12+160)
800542c: 44 20 00 04 be r1,r0,800543c <rtems_termios_open+0x2a8> <== NEVER TAKEN
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
8005430: 29 82 00 b4 lw r2,(r12+180)
8005434: 34 01 00 02 mvi r1,2
8005438: 5c 41 00 0d bne r2,r1,800546c <rtems_termios_open+0x2d8> <== ALWAYS TAKEN
sc = rtems_semaphore_create (
800543c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8005440: 38 21 52 40 ori r1,r1,0x5240 <== NOT EXECUTED
8005444: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED
8005448: 78 04 54 52 mvhi r4,0x5452 <== NOT EXECUTED
800544c: 38 84 72 00 ori r4,r4,0x7200 <== NOT EXECUTED
8005450: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8005454: b8 24 08 00 or r1,r1,r4 <== NOT EXECUTED
8005458: 34 03 00 24 mvi r3,36 <== NOT EXECUTED
800545c: b8 40 20 00 mv r4,r2 <== NOT EXECUTED
8005460: 35 85 00 68 addi r5,r12,104 <== NOT EXECUTED
8005464: f8 00 02 ca calli 8005f8c <rtems_semaphore_create> <== NOT EXECUTED
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
8005468: 5c 20 00 55 bne r1,r0,80055bc <rtems_termios_open+0x428> <== NOT EXECUTED
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
800546c: 34 01 00 00 mvi r1,0
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
8005470: 34 15 25 02 mvi r21,9474
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
8005474: 59 81 00 b8 sw (r12+184),r1
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
8005478: 59 95 00 30 sw (r12+48),r21
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
800547c: 34 15 18 05 mvi r21,6149
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
8005480: 29 81 00 64 lw r1,(r12+100)
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
8005484: 59 95 00 34 sw (r12+52),r21
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
8005488: 34 15 08 bd mvi r21,2237
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
800548c: 34 02 00 00 mvi r2,0
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
8005490: 34 0a 00 04 mvi r10,4
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
8005494: 34 09 00 11 mvi r9,17
tty->termios.c_cc[VSTOP] = '\023';
8005498: 34 08 00 13 mvi r8,19
tty->termios.c_cc[VSUSP] = '\032';
800549c: 34 07 00 1a mvi r7,26
tty->termios.c_cc[VREPRINT] = '\022';
80054a0: 34 06 00 12 mvi r6,18
tty->termios.c_cc[VDISCARD] = '\017';
80054a4: 34 05 00 0f mvi r5,15
tty->termios.c_cc[VWERASE] = '\027';
80054a8: 34 04 00 17 mvi r4,23
tty->termios.c_cc[VLNEXT] = '\026';
80054ac: 34 03 00 16 mvi r3,22
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
80054b0: 59 95 00 38 sw (r12+56),r21
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
80054b4: 34 14 00 03 mvi r20,3
tty->termios.c_cc[VQUIT] = '\034';
80054b8: 34 10 00 1c mvi r16,28
tty->termios.c_cc[VERASE] = '\177';
80054bc: 34 0f 00 7f mvi r15,127
tty->termios.c_cc[VKILL] = '\025';
80054c0: 34 0d 00 15 mvi r13,21
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
80054c4: 38 15 82 3b mvu r21,0x823b
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
80054c8: 31 8a 00 45 sb (r12+69),r10
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
80054cc: 31 82 00 51 sb (r12+81),r2
tty->termios.c_cc[VSTART] = '\021';
80054d0: 31 89 00 49 sb (r12+73),r9
tty->termios.c_cc[VSTOP] = '\023';
80054d4: 31 88 00 4a sb (r12+74),r8
tty->termios.c_cc[VSUSP] = '\032';
80054d8: 31 87 00 4b sb (r12+75),r7
tty->termios.c_cc[VREPRINT] = '\022';
80054dc: 31 86 00 4d sb (r12+77),r6
tty->termios.c_cc[VDISCARD] = '\017';
80054e0: 31 85 00 4e sb (r12+78),r5
tty->termios.c_cc[VWERASE] = '\027';
80054e4: 31 84 00 4f sb (r12+79),r4
tty->termios.c_cc[VLNEXT] = '\026';
80054e8: 31 83 00 50 sb (r12+80),r3
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
80054ec: 31 82 00 4c sb (r12+76),r2
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
80054f0: 59 95 00 3c sw (r12+60),r21
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
80054f4: 34 02 00 01 mvi r2,1
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
80054f8: 31 94 00 41 sb (r12+65),r20
tty->termios.c_cc[VQUIT] = '\034';
80054fc: 31 90 00 42 sb (r12+66),r16
tty->termios.c_cc[VERASE] = '\177';
8005500: 31 8f 00 43 sb (r12+67),r15
tty->termios.c_cc[VKILL] = '\025';
8005504: 31 8d 00 44 sb (r12+68),r13
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
8005508: fb ff ef e4 calli 8001498 <__lshrsi3>
tty->highwater = tty->rawInBuf.Size * 3/4;
800550c: 29 84 00 64 lw r4,(r12+100)
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
8005510: 59 81 00 bc sw (r12+188),r1
tty->highwater = tty->rawInBuf.Size * 3/4;
8005514: 34 02 00 02 mvi r2,2
8005518: b4 84 08 00 add r1,r4,r4
800551c: b4 24 08 00 add r1,r1,r4
8005520: fb ff ef de calli 8001498 <__lshrsi3>
/*
* Bump name characer
*/
if (c++ == 'z')
8005524: 78 04 08 02 mvhi r4,0x802
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
8005528: 59 81 00 c0 sw (r12+192),r1
/*
* Bump name characer
*/
if (c++ == 'z')
800552c: 38 84 52 40 ori r4,r4,0x5240
8005530: 40 81 00 00 lbu r1,(r4+0)
8005534: 34 22 00 01 addi r2,r1,1
8005538: 30 82 00 00 sb (r4+0),r2
800553c: 34 02 00 7a mvi r2,122
8005540: 5c 22 00 03 bne r1,r2,800554c <rtems_termios_open+0x3b8> <== ALWAYS TAKEN
c = 'a';
8005544: 34 01 00 61 mvi r1,97 <== NOT EXECUTED
8005548: 30 81 00 00 sb (r4+0),r1 <== NOT EXECUTED
}
args->iop->data1 = tty;
if (!tty->refcount++) {
800554c: 29 62 00 08 lw r2,(r11+8)
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
8005550: 2a 63 00 00 lw r3,(r19+0)
if (!tty->refcount++) {
8005554: 34 41 00 01 addi r1,r2,1
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
8005558: 58 6b 00 38 sw (r3+56),r11
if (!tty->refcount++) {
800555c: 59 61 00 08 sw (r11+8),r1
8005560: 5c 40 00 18 bne r2,r0,80055c0 <rtems_termios_open+0x42c> <== NEVER TAKEN
if (tty->device.firstOpen)
8005564: 29 64 00 98 lw r4,(r11+152)
8005568: 44 82 00 05 be r4,r2,800557c <rtems_termios_open+0x3e8> <== ALWAYS TAKEN
(*tty->device.firstOpen)(major, minor, arg);
800556c: ba 20 08 00 mv r1,r17 <== NOT EXECUTED
8005570: ba 40 10 00 mv r2,r18 <== NOT EXECUTED
8005574: ba 60 18 00 mv r3,r19 <== NOT EXECUTED
8005578: d8 80 00 00 call r4 <== NOT EXECUTED
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
800557c: 29 62 00 b4 lw r2,(r11+180)
8005580: 34 01 00 02 mvi r1,2
8005584: 5c 41 00 0f bne r2,r1,80055c0 <rtems_termios_open+0x42c> <== ALWAYS TAKEN
sc = rtems_task_start(tty->rxTaskId,
8005588: 29 61 00 c4 lw r1,(r11+196) <== NOT EXECUTED
800558c: 78 02 08 00 mvhi r2,0x800 <== NOT EXECUTED
8005590: 38 42 56 b4 ori r2,r2,0x56b4 <== NOT EXECUTED
8005594: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
8005598: f8 00 04 74 calli 8006768 <rtems_task_start> <== NOT EXECUTED
800559c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
rtems_termios_rxdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
80055a0: 5c 20 00 07 bne r1,r0,80055bc <rtems_termios_open+0x428> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(tty->txTaskId,
80055a4: 29 61 00 c8 lw r1,(r11+200) <== NOT EXECUTED
80055a8: 78 02 08 00 mvhi r2,0x800 <== NOT EXECUTED
80055ac: 38 42 56 28 ori r2,r2,0x5628 <== NOT EXECUTED
80055b0: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
80055b4: f8 00 04 6d calli 8006768 <rtems_task_start> <== NOT EXECUTED
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
80055b8: 44 2c 00 02 be r1,r12,80055c0 <rtems_termios_open+0x42c> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
80055bc: f8 00 05 1b calli 8006a28 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
80055c0: 78 01 08 02 mvhi r1,0x802
80055c4: 38 21 59 cc ori r1,r1,0x59cc
80055c8: 28 21 00 00 lw r1,(r1+0)
80055cc: f8 00 03 6e calli 8006384 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
80055d0: b9 c0 08 00 mv r1,r14
80055d4: 2b 9d 00 04 lw ra,(sp+4)
80055d8: 2b 8b 00 30 lw r11,(sp+48)
80055dc: 2b 8c 00 2c lw r12,(sp+44)
80055e0: 2b 8d 00 28 lw r13,(sp+40)
80055e4: 2b 8e 00 24 lw r14,(sp+36)
80055e8: 2b 8f 00 20 lw r15,(sp+32)
80055ec: 2b 90 00 1c lw r16,(sp+28)
80055f0: 2b 91 00 18 lw r17,(sp+24)
80055f4: 2b 92 00 14 lw r18,(sp+20)
80055f8: 2b 93 00 10 lw r19,(sp+16)
80055fc: 2b 94 00 0c lw r20,(sp+12)
8005600: 2b 95 00 08 lw r21,(sp+8)
8005604: 37 9c 00 30 addi sp,sp,48
8005608: c3 a0 00 00 ret
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
800560c: 34 01 00 01 mvi r1,1
8005610: 34 02 00 e8 mvi r2,232
8005614: f8 00 19 20 calli 800ba94 <calloc>
8005618: b8 20 58 00 mv r11,r1
800561c: b8 20 60 00 mv r12,r1
if (tty == NULL) {
8005620: 5c 20 ff 02 bne r1,r0,8005228 <rtems_termios_open+0x94> <== ALWAYS TAKEN
8005624: e3 ff ff 0b bi 8005250 <rtems_termios_open+0xbc> <== NOT EXECUTED
08003f38 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
8003f38: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED
8003f3c: 5b 8b 00 24 sw (sp+36),r11 <== NOT EXECUTED
8003f40: 5b 8c 00 20 sw (sp+32),r12 <== NOT EXECUTED
8003f44: 5b 8d 00 1c sw (sp+28),r13 <== NOT EXECUTED
8003f48: 5b 8e 00 18 sw (sp+24),r14 <== NOT EXECUTED
8003f4c: 5b 8f 00 14 sw (sp+20),r15 <== NOT EXECUTED
8003f50: 5b 90 00 10 sw (sp+16),r16 <== NOT EXECUTED
8003f54: 5b 91 00 0c sw (sp+12),r17 <== NOT EXECUTED
8003f58: 5b 92 00 08 sw (sp+8),r18 <== NOT EXECUTED
8003f5c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
8003f60: 28 64 00 b4 lw r4,(r3+180) <== NOT EXECUTED
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
8003f64: b8 60 58 00 mv r11,r3 <== NOT EXECUTED
8003f68: b8 40 68 00 mv r13,r2 <== NOT EXECUTED
8003f6c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
const unsigned char *buf = _buf;
8003f70: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
8003f74: 5c 80 00 07 bne r4,r0,8003f90 <rtems_termios_puts+0x58> <== NOT EXECUTED
(*tty->device.write)(tty->minor, (void *)buf, len);
8003f78: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8003f7c: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED
8003f80: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
8003f84: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED
8003f88: d8 80 00 00 call r4 <== NOT EXECUTED
return;
8003f8c: e0 00 00 36 bi 8004064 <rtems_termios_puts+0x12c> <== NOT EXECUTED
}
newHead = tty->rawOutBuf.Head;
8003f90: 29 6c 00 80 lw r12,(r11+128) <== NOT EXECUTED
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
8003f94: 34 10 ff fe mvi r16,-2 <== NOT EXECUTED
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
8003f98: 34 12 00 02 mvi r18,2 <== NOT EXECUTED
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
8003f9c: 34 11 00 01 mvi r17,1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
8003fa0: e0 00 00 30 bi 8004060 <rtems_termios_puts+0x128> <== NOT EXECUTED
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
8003fa4: 29 62 00 88 lw r2,(r11+136) <== NOT EXECUTED
8003fa8: 35 81 00 01 addi r1,r12,1 <== NOT EXECUTED
8003fac: f8 00 73 7a calli 8020d94 <__umodsi3> <== NOT EXECUTED
8003fb0: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
rtems_interrupt_disable (level);
8003fb4: 90 00 78 00 rcsr r15,IE <== NOT EXECUTED
8003fb8: a1 f0 08 00 and r1,r15,r16 <== NOT EXECUTED
8003fbc: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
while (newHead == tty->rawOutBuf.Tail) {
8003fc0: e0 00 00 0c bi 8003ff0 <rtems_termios_puts+0xb8> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
8003fc4: 59 72 00 94 sw (r11+148),r18 <== NOT EXECUTED
rtems_interrupt_enable (level);
8003fc8: d0 0f 00 00 wcsr IE,r15 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
8003fcc: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED
8003fd0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8003fd4: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
8003fd8: f8 00 08 9b calli 8006244 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
8003fdc: 44 20 00 02 be r1,r0,8003fe4 <rtems_termios_puts+0xac> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
8003fe0: f8 00 0a 92 calli 8006a28 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
8003fe4: 90 00 78 00 rcsr r15,IE <== NOT EXECUTED
8003fe8: a1 f0 08 00 and r1,r15,r16 <== NOT EXECUTED
8003fec: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
8003ff0: 29 61 00 84 lw r1,(r11+132) <== NOT EXECUTED
8003ff4: 45 81 ff f4 be r12,r1,8003fc4 <rtems_termios_puts+0x8c> <== NOT EXECUTED
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
8003ff8: 29 61 00 80 lw r1,(r11+128) <== NOT EXECUTED
8003ffc: 29 62 00 7c lw r2,(r11+124) <== NOT EXECUTED
8004000: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED
8004004: 41 c2 00 00 lbu r2,(r14+0) <== NOT EXECUTED
8004008: 30 22 00 00 sb (r1+0),r2 <== NOT EXECUTED
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
800400c: 29 61 00 94 lw r1,(r11+148) <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
8004010: 59 6c 00 80 sw (r11+128),r12 <== NOT EXECUTED
if (tty->rawOutBufState == rob_idle) {
8004014: 5c 20 00 10 bne r1,r0,8004054 <rtems_termios_puts+0x11c> <== NOT EXECUTED
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
8004018: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
800401c: 20 42 00 10 andi r2,r2,0x10 <== NOT EXECUTED
8004020: 5c 41 00 09 bne r2,r1,8004044 <rtems_termios_puts+0x10c> <== NOT EXECUTED
(*tty->device.write)(tty->minor,
8004024: 29 63 00 7c lw r3,(r11+124) <== NOT EXECUTED
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
8004028: 29 62 00 84 lw r2,(r11+132) <== NOT EXECUTED
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(tty->minor,
800402c: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED
8004030: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8004034: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED
8004038: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
800403c: d8 80 00 00 call r4 <== NOT EXECUTED
8004040: e0 00 00 04 bi 8004050 <rtems_termios_puts+0x118> <== NOT EXECUTED
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
8004044: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8004048: 38 21 00 20 ori r1,r1,0x20 <== NOT EXECUTED
800404c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
8004050: 59 71 00 94 sw (r11+148),r17 <== NOT EXECUTED
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
8004054: 35 ce 00 01 addi r14,r14,1 <== NOT EXECUTED
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
8004058: d0 0f 00 00 wcsr IE,r15 <== NOT EXECUTED
len--;
800405c: 35 ad ff ff addi r13,r13,-1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
8004060: 5d a0 ff d1 bne r13,r0,8003fa4 <rtems_termios_puts+0x6c> <== NOT EXECUTED
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
8004064: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8004068: 2b 8b 00 24 lw r11,(sp+36) <== NOT EXECUTED
800406c: 2b 8c 00 20 lw r12,(sp+32) <== NOT EXECUTED
8004070: 2b 8d 00 1c lw r13,(sp+28) <== NOT EXECUTED
8004074: 2b 8e 00 18 lw r14,(sp+24) <== NOT EXECUTED
8004078: 2b 8f 00 14 lw r15,(sp+20) <== NOT EXECUTED
800407c: 2b 90 00 10 lw r16,(sp+16) <== NOT EXECUTED
8004080: 2b 91 00 0c lw r17,(sp+12) <== NOT EXECUTED
8004084: 2b 92 00 08 lw r18,(sp+8) <== NOT EXECUTED
8004088: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED
800408c: c3 a0 00 00 ret <== NOT EXECUTED
08004880 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
8004880: 37 9c ff cc addi sp,sp,-52 <== NOT EXECUTED
8004884: 5b 8b 00 34 sw (sp+52),r11 <== NOT EXECUTED
8004888: 5b 8c 00 30 sw (sp+48),r12 <== NOT EXECUTED
800488c: 5b 8d 00 2c sw (sp+44),r13 <== NOT EXECUTED
8004890: 5b 8e 00 28 sw (sp+40),r14 <== NOT EXECUTED
8004894: 5b 8f 00 24 sw (sp+36),r15 <== NOT EXECUTED
8004898: 5b 90 00 20 sw (sp+32),r16 <== NOT EXECUTED
800489c: 5b 91 00 1c sw (sp+28),r17 <== NOT EXECUTED
80048a0: 5b 92 00 18 sw (sp+24),r18 <== NOT EXECUTED
80048a4: 5b 93 00 14 sw (sp+20),r19 <== NOT EXECUTED
80048a8: 5b 94 00 10 sw (sp+16),r20 <== NOT EXECUTED
80048ac: 5b 95 00 0c sw (sp+12),r21 <== NOT EXECUTED
80048b0: 5b 96 00 08 sw (sp+8),r22 <== NOT EXECUTED
80048b4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
80048b8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
80048bc: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
80048c0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
80048c4: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
80048c8: 28 2b 00 38 lw r11,(r1+56) <== NOT EXECUTED
uint32_t count = args->count;
80048cc: 29 8e 00 14 lw r14,(r12+20) <== NOT EXECUTED
char *buffer = args->buffer;
80048d0: 29 92 00 10 lw r18,(r12+16) <== NOT EXECUTED
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
80048d4: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
80048d8: f8 00 06 5b calli 8006244 <rtems_semaphore_obtain> <== NOT EXECUTED
80048dc: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
80048e0: 5c 20 00 b4 bne r1,r0,8004bb0 <rtems_termios_read+0x330> <== NOT EXECUTED
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
80048e4: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED
80048e8: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
80048ec: 78 0f 08 02 mvhi r15,0x802 <== NOT EXECUTED
80048f0: fb ff f2 c2 calli 80013f8 <__ashlsi3> <== NOT EXECUTED
80048f4: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED
80048f8: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
80048fc: fb ff f2 bf calli 80013f8 <__ashlsi3> <== NOT EXECUTED
8004900: 39 ef 57 f8 ori r15,r15,0x57f8 <== NOT EXECUTED
8004904: b5 e1 08 00 add r1,r15,r1 <== NOT EXECUTED
8004908: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED
800490c: 44 6d 00 09 be r3,r13,8004930 <rtems_termios_read+0xb0> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
8004910: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
8004914: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8004918: d8 60 00 00 call r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
800491c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
8004920: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
8004924: 59 62 00 e4 sw (r11+228),r2 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
8004928: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
800492c: e0 00 00 a0 bi 8004bac <rtems_termios_read+0x32c> <== NOT EXECUTED
return sc;
}
if (tty->cindex == tty->ccount) {
8004930: 29 62 00 24 lw r2,(r11+36) <== NOT EXECUTED
8004934: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED
8004938: 5c 41 00 92 bne r2,r1,8004b80 <rtems_termios_read+0x300> <== NOT EXECUTED
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
800493c: 29 62 00 28 lw r2,(r11+40) <== NOT EXECUTED
if (tty->device.pollRead != NULL
8004940: 29 61 00 a0 lw r1,(r11+160) <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
8004944: 59 6d 00 20 sw (r11+32),r13 <== NOT EXECUTED
tty->read_start_column = tty->column;
8004948: 59 62 00 2c sw (r11+44),r2 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
800494c: 59 6d 00 24 sw (r11+36),r13 <== NOT EXECUTED
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL
8004950: 44 20 00 32 be r1,r0,8004a18 <rtems_termios_read+0x198> <== NOT EXECUTED
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
8004954: 29 61 00 b4 lw r1,(r11+180) <== NOT EXECUTED
8004958: 5c 20 00 30 bne r1,r0,8004a18 <rtems_termios_read+0x198> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
800495c: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED
8004960: 20 21 00 02 andi r1,r1,0x2 <== NOT EXECUTED
8004964: 44 20 00 0e be r1,r0,800499c <rtems_termios_read+0x11c> <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
8004968: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED
800496c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8004970: d8 40 00 00 call r2 <== NOT EXECUTED
8004974: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
if (n < 0) {
rtems_task_wake_after (1);
}
else {
if (siproc (n, tty))
8004978: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
800497c: 20 21 00 ff andi r1,r1,0xff <== NOT EXECUTED
int n;
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
8004980: 4c 60 00 04 bge r3,r0,8004990 <rtems_termios_read+0x110> <== NOT EXECUTED
rtems_task_wake_after (1);
8004984: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
8004988: f8 00 07 98 calli 80067e8 <rtems_task_wake_after> <== NOT EXECUTED
800498c: e3 ff ff f7 bi 8004968 <rtems_termios_read+0xe8> <== NOT EXECUTED
}
else {
if (siproc (n, tty))
8004990: fb ff ff 3d calli 8004684 <siproc> <== NOT EXECUTED
8004994: 44 20 ff f5 be r1,r0,8004968 <rtems_termios_read+0xe8> <== NOT EXECUTED
8004998: e0 00 00 7a bi 8004b80 <rtems_termios_read+0x300> <== NOT EXECUTED
}
}
}
else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
800499c: f8 00 04 57 calli 8005af8 <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
80049a0: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
80049a4: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED
80049a8: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
80049ac: d8 40 00 00 call r2 <== NOT EXECUTED
if (n < 0) {
80049b0: 4c 20 00 10 bge r1,r0,80049f0 <rtems_termios_read+0x170> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
80049b4: 41 61 00 47 lbu r1,(r11+71) <== NOT EXECUTED
80049b8: 41 62 00 46 lbu r2,(r11+70) <== NOT EXECUTED
80049bc: 44 20 00 05 be r1,r0,80049d0 <rtems_termios_read+0x150> <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
80049c0: 44 40 00 09 be r2,r0,80049e4 <rtems_termios_read+0x164> <== NOT EXECUTED
80049c4: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED
80049c8: 44 20 00 07 be r1,r0,80049e4 <rtems_termios_read+0x164> <== NOT EXECUTED
80049cc: e0 00 00 02 bi 80049d4 <rtems_termios_read+0x154> <== NOT EXECUTED
break;
}
}
}
else {
if (!tty->termios.c_cc[VTIME])
80049d0: 44 41 00 6c be r2,r1,8004b80 <rtems_termios_read+0x300> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
80049d4: f8 00 04 49 calli 8005af8 <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
80049d8: 29 62 00 54 lw r2,(r11+84) <== NOT EXECUTED
80049dc: c8 2f 08 00 sub r1,r1,r15 <== NOT EXECUTED
80049e0: 54 22 00 68 bgu r1,r2,8004b80 <rtems_termios_read+0x300> <== NOT EXECUTED
break;
}
}
rtems_task_wake_after (1);
80049e4: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
80049e8: f8 00 07 80 calli 80067e8 <rtems_task_wake_after> <== NOT EXECUTED
80049ec: e3 ff ff ee bi 80049a4 <rtems_termios_read+0x124> <== NOT EXECUTED
}
else {
siproc (n, tty);
80049f0: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
80049f4: 20 21 00 ff andi r1,r1,0xff <== NOT EXECUTED
80049f8: fb ff ff 23 calli 8004684 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
80049fc: 41 61 00 47 lbu r1,(r11+71) <== NOT EXECUTED
8004a00: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED
8004a04: 4c 41 00 5f bge r2,r1,8004b80 <rtems_termios_read+0x300> <== NOT EXECUTED
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
8004a08: 44 20 ff e7 be r1,r0,80049a4 <rtems_termios_read+0x124> <== NOT EXECUTED
8004a0c: 41 61 00 46 lbu r1,(r11+70) <== NOT EXECUTED
8004a10: 44 20 ff e5 be r1,r0,80049a4 <rtems_termios_read+0x124> <== NOT EXECUTED
8004a14: e3 ff ff e2 bi 800499c <rtems_termios_read+0x11c> <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
8004a18: 78 0f 08 02 mvhi r15,0x802 <== NOT EXECUTED
8004a1c: 39 ef 52 34 ori r15,r15,0x5234 <== NOT EXECUTED
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
8004a20: 29 71 00 74 lw r17,(r11+116) <== NOT EXECUTED
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
8004a24: 35 76 00 49 addi r22,r11,73 <== NOT EXECUTED
8004a28: 34 10 00 01 mvi r16,1 <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
8004a2c: 34 15 ff fe mvi r21,-2 <== NOT EXECUTED
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
8004a30: 34 14 02 02 mvi r20,514 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
8004a34: 34 13 ff fb mvi r19,-5 <== NOT EXECUTED
8004a38: e0 00 00 3d bi 8004b2c <rtems_termios_read+0x2ac> <== NOT EXECUTED
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
8004a3c: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED
8004a40: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED
8004a44: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED
8004a48: f8 00 70 d3 calli 8020d94 <__umodsi3> <== NOT EXECUTED
8004a4c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
8004a50: 29 61 00 58 lw r1,(r11+88) <== NOT EXECUTED
8004a54: b4 23 08 00 add r1,r1,r3 <== NOT EXECUTED
8004a58: 40 31 00 00 lbu r17,(r1+0) <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
8004a5c: 59 63 00 5c sw (r11+92),r3 <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
8004a60: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED
8004a64: 29 64 00 64 lw r4,(r11+100) <== NOT EXECUTED
8004a68: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED
8004a6c: b4 81 08 00 add r1,r4,r1 <== NOT EXECUTED
8004a70: c8 23 08 00 sub r1,r1,r3 <== NOT EXECUTED
8004a74: f8 00 70 c8 calli 8020d94 <__umodsi3> <== NOT EXECUTED
8004a78: 29 62 00 bc lw r2,(r11+188) <== NOT EXECUTED
8004a7c: 50 22 00 1c bgeu r1,r2,8004aec <rtems_termios_read+0x26c> <== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
8004a80: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8004a84: a0 35 08 00 and r1,r1,r21 <== NOT EXECUTED
8004a88: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
8004a8c: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8004a90: 20 21 02 02 andi r1,r1,0x202 <== NOT EXECUTED
8004a94: 5c 34 00 0c bne r1,r20,8004ac4 <rtems_termios_read+0x244> <== NOT EXECUTED
8004a98: 29 61 00 94 lw r1,(r11+148) <== NOT EXECUTED
8004a9c: 44 20 00 04 be r1,r0,8004aac <rtems_termios_read+0x22c> <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
8004aa0: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
8004aa4: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED
8004aa8: 44 20 00 07 be r1,r0,8004ac4 <rtems_termios_read+0x244> <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
8004aac: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED
8004ab0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8004ab4: ba c0 10 00 mv r2,r22 <== NOT EXECUTED
8004ab8: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
8004abc: d8 80 00 00 call r4 <== NOT EXECUTED
8004ac0: e0 00 00 0b bi 8004aec <rtems_termios_read+0x26c> <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
8004ac4: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8004ac8: 20 21 01 00 andi r1,r1,0x100 <== NOT EXECUTED
8004acc: 44 20 00 08 be r1,r0,8004aec <rtems_termios_read+0x26c> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
8004ad0: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
8004ad4: 29 63 00 b0 lw r3,(r11+176) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
8004ad8: a0 33 08 00 and r1,r1,r19 <== NOT EXECUTED
8004adc: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
8004ae0: 44 60 00 03 be r3,r0,8004aec <rtems_termios_read+0x26c> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
8004ae4: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8004ae8: d8 60 00 00 call r3 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
8004aec: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED
8004af0: 20 21 00 02 andi r1,r1,0x2 <== NOT EXECUTED
8004af4: 44 20 00 06 be r1,r0,8004b0c <rtems_termios_read+0x28c> <== NOT EXECUTED
if (siproc (c, tty))
8004af8: ba 20 08 00 mv r1,r17 <== NOT EXECUTED
8004afc: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8004b00: fb ff fe e1 calli 8004684 <siproc> <== NOT EXECUTED
8004b04: 5c 20 00 08 bne r1,r0,8004b24 <rtems_termios_read+0x2a4> <== NOT EXECUTED
8004b08: e0 00 00 08 bi 8004b28 <rtems_termios_read+0x2a8> <== NOT EXECUTED
wait = 0;
}
else {
siproc (c, tty);
8004b0c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8004b10: ba 20 08 00 mv r1,r17 <== NOT EXECUTED
8004b14: fb ff fe dc calli 8004684 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
8004b18: 41 61 00 47 lbu r1,(r11+71) <== NOT EXECUTED
8004b1c: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED
8004b20: 48 22 00 02 bg r1,r2,8004b28 <rtems_termios_read+0x2a8> <== NOT EXECUTED
8004b24: 34 10 00 00 mvi r16,0 <== NOT EXECUTED
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
8004b28: 29 71 00 70 lw r17,(r11+112) <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
8004b2c: 29 62 00 5c lw r2,(r11+92) <== NOT EXECUTED
8004b30: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED
8004b34: 44 41 00 05 be r2,r1,8004b48 <rtems_termios_read+0x2c8> <== NOT EXECUTED
8004b38: 29 e1 00 00 lw r1,(r15+0) <== NOT EXECUTED
8004b3c: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED
8004b40: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
8004b44: 48 22 ff be bg r1,r2,8004a3c <rtems_termios_read+0x1bc> <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
8004b48: 46 00 00 0e be r16,r0,8004b80 <rtems_termios_read+0x300> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
8004b4c: 29 61 00 68 lw r1,(r11+104) <== NOT EXECUTED
8004b50: 29 62 00 6c lw r2,(r11+108) <== NOT EXECUTED
8004b54: ba 20 18 00 mv r3,r17 <== NOT EXECUTED
8004b58: f8 00 05 bb calli 8006244 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions,
timeout);
if (sc != RTEMS_SUCCESSFUL)
8004b5c: 44 20 ff f4 be r1,r0,8004b2c <rtems_termios_read+0x2ac> <== NOT EXECUTED
8004b60: e0 00 00 08 bi 8004b80 <rtems_termios_read+0x300> <== NOT EXECUTED
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
8004b64: 29 63 00 1c lw r3,(r11+28) <== NOT EXECUTED
count--;
8004b68: 35 ce ff ff addi r14,r14,-1 <== NOT EXECUTED
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
8004b6c: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED
8004b70: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED
8004b74: 32 41 00 00 sb (r18+0),r1 <== NOT EXECUTED
8004b78: 59 62 00 24 sw (r11+36),r2 <== NOT EXECUTED
8004b7c: 36 52 00 01 addi r18,r18,1 <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
8004b80: 45 c0 00 05 be r14,r0,8004b94 <rtems_termios_read+0x314> <== NOT EXECUTED
8004b84: 29 61 00 24 lw r1,(r11+36) <== NOT EXECUTED
8004b88: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
8004b8c: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
8004b90: 48 61 ff f5 bg r3,r1,8004b64 <rtems_termios_read+0x2e4> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
8004b94: 29 82 00 14 lw r2,(r12+20) <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
8004b98: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8004b9c: 59 61 00 e4 sw (r11+228),r1 <== NOT EXECUTED
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
8004ba0: c8 4e 70 00 sub r14,r2,r14 <== NOT EXECUTED
8004ba4: 59 8e 00 1c sw (r12+28),r14 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
8004ba8: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
8004bac: f8 00 05 f6 calli 8006384 <rtems_semaphore_release> <== NOT EXECUTED
return sc;
}
8004bb0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8004bb4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8004bb8: 2b 8b 00 34 lw r11,(sp+52) <== NOT EXECUTED
8004bbc: 2b 8c 00 30 lw r12,(sp+48) <== NOT EXECUTED
8004bc0: 2b 8d 00 2c lw r13,(sp+44) <== NOT EXECUTED
8004bc4: 2b 8e 00 28 lw r14,(sp+40) <== NOT EXECUTED
8004bc8: 2b 8f 00 24 lw r15,(sp+36) <== NOT EXECUTED
8004bcc: 2b 90 00 20 lw r16,(sp+32) <== NOT EXECUTED
8004bd0: 2b 91 00 1c lw r17,(sp+28) <== NOT EXECUTED
8004bd4: 2b 92 00 18 lw r18,(sp+24) <== NOT EXECUTED
8004bd8: 2b 93 00 14 lw r19,(sp+20) <== NOT EXECUTED
8004bdc: 2b 94 00 10 lw r20,(sp+16) <== NOT EXECUTED
8004be0: 2b 95 00 0c lw r21,(sp+12) <== NOT EXECUTED
8004be4: 2b 96 00 08 lw r22,(sp+8) <== NOT EXECUTED
8004be8: 37 9c 00 34 addi sp,sp,52 <== NOT EXECUTED
8004bec: c3 a0 00 00 ret <== NOT EXECUTED
08003980 <rtems_termios_refill_transmitter>:
* in task-driven mode, this function is called in Tx task context
* in interrupt-driven mode, this function is called in TxIRQ context
*/
int
rtems_termios_refill_transmitter (struct rtems_termios_tty *tty)
{
8003980: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED
8003984: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED
8003988: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED
800398c: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED
8003990: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
8003994: 28 22 00 b8 lw r2,(r1+184) <== NOT EXECUTED
* in task-driven mode, this function is called in Tx task context
* in interrupt-driven mode, this function is called in TxIRQ context
*/
int
rtems_termios_refill_transmitter (struct rtems_termios_tty *tty)
{
8003998: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
800399c: 34 01 04 01 mvi r1,1025 <== NOT EXECUTED
80039a0: 20 42 04 03 andi r2,r2,0x403 <== NOT EXECUTED
80039a4: 5c 41 00 12 bne r2,r1,80039ec <rtems_termios_refill_transmitter+0x6c><== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
80039a8: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED
80039ac: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
80039b0: 35 62 00 4a addi r2,r11,74 <== NOT EXECUTED
80039b4: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
80039b8: d8 80 00 00 call r4 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
80039bc: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED
80039c0: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED
80039c4: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED
80039c8: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
tty->t_dqlen--;
80039cc: 29 62 00 90 lw r2,(r11+144) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
80039d0: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
80039d4: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
80039d8: 38 63 00 02 ori r3,r3,0x2 <== NOT EXECUTED
80039dc: 59 63 00 b8 sw (r11+184),r3 <== NOT EXECUTED
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
80039e0: 59 62 00 90 sw (r11+144),r2 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
80039e4: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
80039e8: e0 00 00 16 bi 8003a40 <rtems_termios_refill_transmitter+0xc0><== NOT EXECUTED
nToSend = 1;
}
else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
80039ec: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
80039f0: 34 01 00 02 mvi r1,2 <== NOT EXECUTED
80039f4: 20 42 00 03 andi r2,r2,0x3 <== NOT EXECUTED
80039f8: 5c 41 00 14 bne r2,r1,8003a48 <rtems_termios_refill_transmitter+0xc8><== NOT EXECUTED
* FIXME: this .write call will generate another
* dequeue callback. This will advance the "Tail" in the data
* buffer, although the corresponding data is not yet out!
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor,
80039fc: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED
8003a00: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8003a04: 35 62 00 49 addi r2,r11,73 <== NOT EXECUTED
8003a08: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
8003a0c: d8 80 00 00 call r4 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
8003a10: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED
8003a14: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED
8003a18: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED
8003a1c: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
tty->t_dqlen--;
8003a20: 29 62 00 90 lw r2,(r11+144) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
8003a24: 29 64 00 b8 lw r4,(r11+184) <== NOT EXECUTED
8003a28: 34 03 ff fd mvi r3,-3 <== NOT EXECUTED
*/
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
8003a2c: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
8003a30: a0 83 18 00 and r3,r4,r3 <== NOT EXECUTED
8003a34: 59 63 00 b8 sw (r11+184),r3 <== NOT EXECUTED
*/
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
8003a38: 59 62 00 90 sw (r11+144),r2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
8003a3c: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
8003a40: 34 0c 00 01 mvi r12,1 <== NOT EXECUTED
8003a44: e0 00 00 4c bi 8003b74 <rtems_termios_refill_transmitter+0x1f4><== NOT EXECUTED
nToSend = 1;
}
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
8003a48: 29 63 00 80 lw r3,(r11+128) <== NOT EXECUTED
8003a4c: 29 62 00 84 lw r2,(r11+132) <== NOT EXECUTED
8003a50: 5c 62 00 07 bne r3,r2,8003a6c <rtems_termios_refill_transmitter+0xec><== NOT EXECUTED
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
8003a54: 29 62 00 94 lw r2,(r11+148) <== NOT EXECUTED
8003a58: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
8003a5c: 5c 41 00 46 bne r2,r1,8003b74 <rtems_termios_refill_transmitter+0x1f4><== NOT EXECUTED
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
8003a60: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED
8003a64: f8 00 0a 48 calli 8006384 <rtems_semaphore_release> <== NOT EXECUTED
8003a68: e0 00 00 43 bi 8003b74 <rtems_termios_refill_transmitter+0x1f4><== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
8003a6c: 90 00 10 00 rcsr r2,IE <== NOT EXECUTED
8003a70: 34 01 ff fe mvi r1,-2 <== NOT EXECUTED
8003a74: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED
8003a78: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
len = tty->t_dqlen;
tty->t_dqlen = 0;
8003a7c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
8003a80: 29 63 00 90 lw r3,(r11+144) <== NOT EXECUTED
tty->t_dqlen = 0;
8003a84: 59 61 00 90 sw (r11+144),r1 <== NOT EXECUTED
rtems_interrupt_enable(level);
8003a88: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
8003a8c: 29 61 00 84 lw r1,(r11+132) <== NOT EXECUTED
8003a90: 29 62 00 88 lw r2,(r11+136) <== NOT EXECUTED
8003a94: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED
8003a98: f8 00 74 bf calli 8020d94 <__umodsi3> <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
8003a9c: 29 62 00 94 lw r2,(r11+148) <== NOT EXECUTED
rtems_interrupt_disable(level);
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
8003aa0: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
8003aa4: 59 61 00 84 sw (r11+132),r1 <== NOT EXECUTED
if (tty->rawOutBufState == rob_wait) {
8003aa8: 34 01 00 02 mvi r1,2 <== NOT EXECUTED
8003aac: 5c 41 00 03 bne r2,r1,8003ab8 <rtems_termios_refill_transmitter+0x138><== NOT EXECUTED
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
8003ab0: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED
8003ab4: f8 00 0a 34 calli 8006384 <rtems_semaphore_release> <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
8003ab8: 29 61 00 80 lw r1,(r11+128) <== NOT EXECUTED
8003abc: 5d a1 00 0b bne r13,r1,8003ae8 <rtems_termios_refill_transmitter+0x168><== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
8003ac0: 29 63 00 d4 lw r3,(r11+212) <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
8003ac4: 34 04 00 00 mvi r4,0 <== NOT EXECUTED
8003ac8: 59 64 00 94 sw (r11+148),r4 <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
8003acc: b8 60 60 00 mv r12,r3 <== NOT EXECUTED
8003ad0: 44 64 00 28 be r3,r4,8003b70 <rtems_termios_refill_transmitter+0x1f0><== NOT EXECUTED
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
8003ad4: 29 62 00 d8 lw r2,(r11+216) <== NOT EXECUTED
8003ad8: 35 61 00 30 addi r1,r11,48 <== NOT EXECUTED
8003adc: b8 80 60 00 mv r12,r4 <== NOT EXECUTED
8003ae0: d8 60 00 00 call r3 <== NOT EXECUTED
8003ae4: e0 00 00 23 bi 8003b70 <rtems_termios_refill_transmitter+0x1f0><== NOT EXECUTED
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
8003ae8: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
8003aec: 34 01 02 10 mvi r1,528 <== NOT EXECUTED
8003af0: 20 42 02 10 andi r2,r2,0x210 <== NOT EXECUTED
8003af4: 5c 41 00 0d bne r2,r1,8003b28 <rtems_termios_refill_transmitter+0x1a8><== NOT EXECUTED
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
8003af8: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED
8003afc: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED
8003b00: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED
8003b04: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
8003b08: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
8003b0c: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
8003b10: 59 63 00 94 sw (r11+148),r3 <== NOT EXECUTED
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
tty->flow_ctrl |= FL_OSTOP;
8003b14: 38 42 00 20 ori r2,r2,0x20 <== NOT EXECUTED
8003b18: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
rtems_interrupt_enable(level);
8003b1c: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
8003b20: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
8003b24: e0 00 00 13 bi 8003b70 <rtems_termios_refill_transmitter+0x1f0><== NOT EXECUTED
}
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
8003b28: 29 61 00 80 lw r1,(r11+128) <== NOT EXECUTED
8003b2c: 50 2d 00 03 bgeu r1,r13,8003b38 <rtems_termios_refill_transmitter+0x1b8><== NOT EXECUTED
nToSend = tty->rawOutBuf.Size - newTail;
8003b30: 29 6c 00 88 lw r12,(r11+136) <== NOT EXECUTED
8003b34: e0 00 00 02 bi 8003b3c <rtems_termios_refill_transmitter+0x1bc><== NOT EXECUTED
else
nToSend = tty->rawOutBuf.Head - newTail;
8003b38: 29 6c 00 80 lw r12,(r11+128) <== NOT EXECUTED
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
8003b3c: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
8003b40: c9 8d 60 00 sub r12,r12,r13 <== NOT EXECUTED
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
8003b44: 20 21 06 00 andi r1,r1,0x600 <== NOT EXECUTED
8003b48: 44 20 00 02 be r1,r0,8003b50 <rtems_termios_refill_transmitter+0x1d0><== NOT EXECUTED
8003b4c: 34 0c 00 01 mvi r12,1 <== NOT EXECUTED
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(tty->minor,
8003b50: 29 62 00 7c lw r2,(r11+124) <== NOT EXECUTED
8003b54: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED
8003b58: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
8003b5c: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
8003b60: 59 63 00 94 sw (r11+148),r3 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
8003b64: b4 4d 10 00 add r2,r2,r13 <== NOT EXECUTED
8003b68: b9 80 18 00 mv r3,r12 <== NOT EXECUTED
8003b6c: d8 80 00 00 call r4 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[newTail],
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
8003b70: 59 6d 00 84 sw (r11+132),r13 <== NOT EXECUTED
}
return nToSend;
}
8003b74: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8003b78: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003b7c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
8003b80: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
8003b84: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
8003b88: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
8003b8c: c3 a0 00 00 ret <== NOT EXECUTED
080056b4 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
80056b4: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED
80056b8: 5b 8b 00 18 sw (sp+24),r11 <== NOT EXECUTED
80056bc: 5b 8c 00 14 sw (sp+20),r12 <== NOT EXECUTED
80056c0: 5b 8d 00 10 sw (sp+16),r13 <== NOT EXECUTED
80056c4: 5b 8e 00 0c sw (sp+12),r14 <== NOT EXECUTED
80056c8: 5b 8f 00 08 sw (sp+8),r15 <== NOT EXECUTED
80056cc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
80056d0: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
80056d4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
80056d8: 37 8f 00 1c addi r15,sp,28 <== NOT EXECUTED
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
80056dc: 34 0e ff ff mvi r14,-1 <== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters (
80056e0: 37 8d 00 23 addi r13,sp,35 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
80056e4: b9 e0 20 00 mv r4,r15 <== NOT EXECUTED
80056e8: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
80056ec: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
80056f0: 34 01 00 03 mvi r1,3 <== NOT EXECUTED
80056f4: f8 00 01 19 calli 8005b58 <rtems_event_receive> <== NOT EXECUTED
TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
80056f8: 2b 81 00 1c lw r1,(sp+28) <== NOT EXECUTED
80056fc: 20 21 00 01 andi r1,r1,0x1 <== NOT EXECUTED
8005700: 44 20 00 05 be r1,r0,8005714 <rtems_termios_rxdaemon+0x60> <== NOT EXECUTED
tty->rxTaskId = 0;
8005704: 59 6c 00 c4 sw (r11+196),r12 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
8005708: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
800570c: f8 00 03 c4 calli 800661c <rtems_task_delete> <== NOT EXECUTED
8005710: e3 ff ff f5 bi 80056e4 <rtems_termios_rxdaemon+0x30> <== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
8005714: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED
8005718: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
800571c: d8 40 00 00 call r2 <== NOT EXECUTED
8005720: b8 20 28 00 mv r5,r1 <== NOT EXECUTED
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters (
8005724: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED
8005728: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800572c: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
8005730: 44 ae ff ed be r5,r14,80056e4 <rtems_termios_rxdaemon+0x30><== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
8005734: 33 85 00 23 sb (sp+35),r5 <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
8005738: fb ff f9 32 calli 8003c00 <rtems_termios_enqueue_raw_characters><== NOT EXECUTED
800573c: e3 ff ff ea bi 80056e4 <rtems_termios_rxdaemon+0x30> <== NOT EXECUTED
08003960 <rtems_termios_rxirq_occured>:
* signal receive interrupt to rx daemon
* NOTE: This routine runs in the context of the
* device receive interrupt handler.
*/
void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty)
{
8003960: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8003964: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
/*
* send event to rx daemon task
*/
rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT);
8003968: 28 21 00 c4 lw r1,(r1+196) <== NOT EXECUTED
800396c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8003970: f8 00 08 e1 calli 8005cf4 <rtems_event_send> <== NOT EXECUTED
}
8003974: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003978: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
800397c: c3 a0 00 00 ret <== NOT EXECUTED
08005628 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
8005628: 37 9c ff e8 addi sp,sp,-24 <== NOT EXECUTED
800562c: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED
8005630: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED
8005634: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED
8005638: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED
800563c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
8005640: 78 0c 08 02 mvhi r12,0x802 <== NOT EXECUTED
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
8005644: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
8005648: 39 8c 57 f8 ori r12,r12,0x57f8 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
800564c: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED
8005650: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8005654: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
8005658: 37 84 00 18 addi r4,sp,24 <== NOT EXECUTED
800565c: 34 01 00 03 mvi r1,3 <== NOT EXECUTED
8005660: f8 00 01 3e calli 8005b58 <rtems_event_receive> <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
8005664: 2b 8e 00 18 lw r14,(sp+24) <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
8005668: 34 02 00 04 mvi r2,4 <== NOT EXECUTED
rtems_event_receive((TERMIOS_TX_START_EVENT |
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
800566c: 21 ce 00 01 andi r14,r14,0x1 <== NOT EXECUTED
8005670: 45 c0 00 05 be r14,r0,8005684 <rtems_termios_txdaemon+0x5c><== NOT EXECUTED
tty->txTaskId = 0;
8005674: 59 6d 00 c8 sw (r11+200),r13 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
8005678: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
800567c: f8 00 03 e8 calli 800661c <rtems_task_delete> <== NOT EXECUTED
8005680: e3 ff ff f4 bi 8005650 <rtems_termios_txdaemon+0x28> <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
8005684: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED
8005688: b4 21 08 00 add r1,r1,r1 <== NOT EXECUTED
800568c: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED
8005690: fb ff ef 5a calli 80013f8 <__ashlsi3> <== NOT EXECUTED
8005694: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED
8005698: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
800569c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
80056a0: 44 4e 00 02 be r2,r14,80056a8 <rtems_termios_txdaemon+0x80><== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
80056a4: d8 40 00 00 call r2 <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
80056a8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80056ac: fb ff f8 b5 calli 8003980 <rtems_termios_refill_transmitter><== NOT EXECUTED
80056b0: e3 ff ff e8 bi 8005650 <rtems_termios_txdaemon+0x28> <== NOT EXECUTED
080046f8 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
80046f8: 37 9c ff e8 addi sp,sp,-24 <== NOT EXECUTED
80046fc: 5b 8b 00 18 sw (sp+24),r11 <== NOT EXECUTED
8004700: 5b 8c 00 14 sw (sp+20),r12 <== NOT EXECUTED
8004704: 5b 8d 00 10 sw (sp+16),r13 <== NOT EXECUTED
8004708: 5b 8e 00 0c sw (sp+12),r14 <== NOT EXECUTED
800470c: 5b 8f 00 08 sw (sp+8),r15 <== NOT EXECUTED
8004710: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8004714: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
8004718: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
800471c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8004720: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
rtems_status_code
rtems_termios_write (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
8004724: 28 2b 00 38 lw r11,(r1+56) <== NOT EXECUTED
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
8004728: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED
800472c: f8 00 06 c6 calli 8006244 <rtems_semaphore_obtain> <== NOT EXECUTED
8004730: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
8004734: 5c 20 00 26 bne r1,r0,80047cc <rtems_termios_write+0xd4> <== NOT EXECUTED
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
8004738: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED
800473c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8004740: 78 0e 08 02 mvhi r14,0x802 <== NOT EXECUTED
8004744: fb ff f3 2d calli 80013f8 <__ashlsi3> <== NOT EXECUTED
8004748: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED
800474c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
8004750: fb ff f3 2a calli 80013f8 <__ashlsi3> <== NOT EXECUTED
8004754: 39 ce 57 f8 ori r14,r14,0x57f8 <== NOT EXECUTED
8004758: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED
800475c: 28 23 00 04 lw r3,(r1+4) <== NOT EXECUTED
8004760: 44 6d 00 06 be r3,r13,8004778 <rtems_termios_write+0x80> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
8004764: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
8004768: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800476c: d8 60 00 00 call r3 <== NOT EXECUTED
8004770: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
8004774: e0 00 00 14 bi 80047c4 <rtems_termios_write+0xcc> <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
8004778: 29 63 00 34 lw r3,(r11+52) <== NOT EXECUTED
800477c: 29 82 00 14 lw r2,(r12+20) <== NOT EXECUTED
8004780: 29 81 00 10 lw r1,(r12+16) <== NOT EXECUTED
8004784: 20 63 00 01 andi r3,r3,0x1 <== NOT EXECUTED
uint32_t count = args->count;
8004788: b8 40 78 00 mv r15,r2 <== NOT EXECUTED
char *buffer = args->buffer;
800478c: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
8004790: 5c 60 00 06 bne r3,r0,80047a8 <rtems_termios_write+0xb0> <== NOT EXECUTED
8004794: e0 00 00 08 bi 80047b4 <rtems_termios_write+0xbc> <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
8004798: 41 c1 00 00 lbu r1,(r14+0) <== NOT EXECUTED
800479c: 35 ef ff ff addi r15,r15,-1 <== NOT EXECUTED
80047a0: 35 ce 00 01 addi r14,r14,1 <== NOT EXECUTED
80047a4: fb ff fe 3b calli 8004090 <oproc> <== NOT EXECUTED
80047a8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
80047ac: 5d e0 ff fb bne r15,r0,8004798 <rtems_termios_write+0xa0> <== NOT EXECUTED
80047b0: e0 00 00 03 bi 80047bc <rtems_termios_write+0xc4> <== NOT EXECUTED
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
80047b4: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
80047b8: fb ff fd e0 calli 8003f38 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
80047bc: 29 81 00 14 lw r1,(r12+20) <== NOT EXECUTED
80047c0: 59 81 00 1c sw (r12+28),r1 <== NOT EXECUTED
}
rtems_semaphore_release (tty->osem);
80047c4: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED
80047c8: f8 00 06 ef calli 8006384 <rtems_semaphore_release> <== NOT EXECUTED
return sc;
}
80047cc: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
80047d0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80047d4: 2b 8b 00 18 lw r11,(sp+24) <== NOT EXECUTED
80047d8: 2b 8c 00 14 lw r12,(sp+20) <== NOT EXECUTED
80047dc: 2b 8d 00 10 lw r13,(sp+16) <== NOT EXECUTED
80047e0: 2b 8e 00 0c lw r14,(sp+12) <== NOT EXECUTED
80047e4: 2b 8f 00 08 lw r15,(sp+8) <== NOT EXECUTED
80047e8: 37 9c 00 18 addi sp,sp,24 <== NOT EXECUTED
80047ec: c3 a0 00 00 ret <== NOT EXECUTED
08013728 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
8013728: 37 9c ff f8 addi sp,sp,-8
801372c: 5b 9d 00 04 sw (sp+4),ra
8013730: b8 20 10 00 mv r2,r1
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
8013734: 78 01 08 04 mvhi r1,0x804
8013738: 37 83 00 08 addi r3,sp,8
801373c: 38 21 05 a4 ori r1,r1,0x5a4
8013740: f8 00 0e 06 calli 8016f58 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
8013744: 2b 83 00 08 lw r3,(sp+8)
8013748: 34 02 00 04 mvi r2,4
801374c: 5c 60 00 07 bne r3,r0,8013768 <rtems_timer_cancel+0x40>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
8013750: 28 23 00 38 lw r3,(r1+56)
8013754: 44 62 00 03 be r3,r2,8013760 <rtems_timer_cancel+0x38> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
8013758: 34 21 00 10 addi r1,r1,16
801375c: f8 00 17 e6 calli 80196f4 <_Watchdog_Remove>
_Thread_Enable_dispatch();
8013760: f8 00 10 f1 calli 8017b24 <_Thread_Enable_dispatch>
8013764: 34 02 00 00 mvi r2,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8013768: b8 40 08 00 mv r1,r2
801376c: 2b 9d 00 04 lw ra,(sp+4)
8013770: 37 9c 00 08 addi sp,sp,8
8013774: c3 a0 00 00 ret
08013d68 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
8013d68: 37 9c ff d8 addi sp,sp,-40
8013d6c: 5b 8b 00 24 sw (sp+36),r11
8013d70: 5b 8c 00 20 sw (sp+32),r12
8013d74: 5b 8d 00 1c sw (sp+28),r13
8013d78: 5b 8e 00 18 sw (sp+24),r14
8013d7c: 5b 8f 00 14 sw (sp+20),r15
8013d80: 5b 90 00 10 sw (sp+16),r16
8013d84: 5b 91 00 0c sw (sp+12),r17
8013d88: 5b 92 00 08 sw (sp+8),r18
8013d8c: 5b 9d 00 04 sw (sp+4),ra
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
8013d90: 78 05 08 04 mvhi r5,0x804
8013d94: 38 a5 05 e4 ori r5,r5,0x5e4
8013d98: 28 ae 00 00 lw r14,(r5+0)
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
8013d9c: b8 20 88 00 mv r17,r1
8013da0: b8 40 58 00 mv r11,r2
8013da4: b8 60 78 00 mv r15,r3
8013da8: b8 80 90 00 mv r18,r4
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
8013dac: 34 05 00 0e mvi r5,14
8013db0: 45 c0 00 2e be r14,r0,8013e68 <rtems_timer_server_fire_when+0x100>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
8013db4: 78 05 08 03 mvhi r5,0x803
8013db8: 38 a5 fc c0 ori r5,r5,0xfcc0
8013dbc: 40 a1 00 00 lbu r1,(r5+0)
8013dc0: 34 05 00 0b mvi r5,11
8013dc4: 44 20 00 29 be r1,r0,8013e68 <rtems_timer_server_fire_when+0x100><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
8013dc8: 34 05 00 09 mvi r5,9
8013dcc: 44 60 00 27 be r3,r0,8013e68 <rtems_timer_server_fire_when+0x100>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
8013dd0: b8 40 08 00 mv r1,r2
8013dd4: fb ff f1 58 calli 8010334 <_TOD_Validate>
8013dd8: 44 20 00 23 be r1,r0,8013e64 <rtems_timer_server_fire_when+0xfc>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
8013ddc: 78 0c 08 03 mvhi r12,0x803
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
8013de0: b9 60 08 00 mv r1,r11
8013de4: fb ff f1 14 calli 8010234 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
8013de8: 39 8c fd 3c ori r12,r12,0xfd3c
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
8013dec: b8 20 80 00 mv r16,r1
if ( seconds <= _TOD_Seconds_since_epoch() )
8013df0: 29 81 00 00 lw r1,(r12+0)
8013df4: 50 30 00 1c bgeu r1,r16,8013e64 <rtems_timer_server_fire_when+0xfc>
8013df8: 78 01 08 04 mvhi r1,0x804
8013dfc: 38 21 05 a4 ori r1,r1,0x5a4
8013e00: ba 20 10 00 mv r2,r17
8013e04: 37 83 00 28 addi r3,sp,40
8013e08: f8 00 0c 54 calli 8016f58 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
8013e0c: 2b 8d 00 28 lw r13,(sp+40)
8013e10: b8 20 58 00 mv r11,r1
8013e14: 34 05 00 04 mvi r5,4
8013e18: 5d a0 00 14 bne r13,r0,8013e68 <rtems_timer_server_fire_when+0x100>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
8013e1c: 34 21 00 10 addi r1,r1,16
8013e20: f8 00 16 35 calli 80196f4 <_Watchdog_Remove>
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
8013e24: 59 71 00 30 sw (r11+48),r17
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
8013e28: 29 81 00 00 lw r1,(r12+0)
(*timer_server->schedule_operation)( timer_server, the_timer );
8013e2c: 29 c3 00 04 lw r3,(r14+4)
8013e30: b9 60 10 00 mv r2,r11
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
8013e34: ca 01 80 00 sub r16,r16,r1
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
8013e38: 34 01 00 03 mvi r1,3
8013e3c: 59 61 00 38 sw (r11+56),r1
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
8013e40: 59 6f 00 2c sw (r11+44),r15
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
8013e44: b9 c0 08 00 mv r1,r14
the_watchdog->id = id;
the_watchdog->user_data = user_data;
8013e48: 59 72 00 34 sw (r11+52),r18
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
8013e4c: 59 70 00 1c sw (r11+28),r16
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
8013e50: 59 6d 00 18 sw (r11+24),r13
(*timer_server->schedule_operation)( timer_server, the_timer );
8013e54: d8 60 00 00 call r3
_Thread_Enable_dispatch();
8013e58: f8 00 0f 33 calli 8017b24 <_Thread_Enable_dispatch>
8013e5c: b9 a0 28 00 mv r5,r13
return RTEMS_SUCCESSFUL;
8013e60: e0 00 00 02 bi 8013e68 <rtems_timer_server_fire_when+0x100>
8013e64: 34 05 00 14 mvi r5,20
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8013e68: b8 a0 08 00 mv r1,r5
8013e6c: 2b 9d 00 04 lw ra,(sp+4)
8013e70: 2b 8b 00 24 lw r11,(sp+36)
8013e74: 2b 8c 00 20 lw r12,(sp+32)
8013e78: 2b 8d 00 1c lw r13,(sp+28)
8013e7c: 2b 8e 00 18 lw r14,(sp+24)
8013e80: 2b 8f 00 14 lw r15,(sp+20)
8013e84: 2b 90 00 10 lw r16,(sp+16)
8013e88: 2b 91 00 0c lw r17,(sp+12)
8013e8c: 2b 92 00 08 lw r18,(sp+8)
8013e90: 37 9c 00 28 addi sp,sp,40
8013e94: c3 a0 00 00 ret
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 a8 98 ori r4,r4,0xa898 <== 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 aa 34 ori r4,r4,0xaa34 <== 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 a8 98 ori r1,r1,0xa898 <== 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 a2 28 ori r1,r1,0xa228 <== 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 37 eb calli 8014b84 <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 36 d2 calli 8014744 <__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 a2 28 ori r13,r13,0xa228 <== 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 4e 35 calli 801a4f0 <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 77 d0 ori r2,r2,0x77d0 <== NOT EXECUTED
8006c44: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8006c48: f8 00 38 dc calli 8014fb8 <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 3c aa calli 8015f04 <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 a2 28 ori r1,r1,0xa228 <== 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 3c a2 calli 8015f04 <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 77 e0 ori r2,r2,0x77e0 <== 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 a2 28 ori r1,r1,0xa228 <== 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 77 f0 ori r2,r2,0x77f0 <== 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 38 c2 calli 8014fb8 <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 a2 28 ori r13,r13,0xa228 <== 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 70 14 ori r2,r2,0x7014 <== NOT EXECUTED
8006ccc: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED
8006cd0: f8 00 38 ba calli 8014fb8 <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 37 a9 calli 8014b84 <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 78 04 ori r2,r2,0x7804 <== 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 78 1c ori r2,r2,0x781c <== 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 36 78 calli 8014704 <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: 78 0d 7f ff mvhi r13,0x7fff
800188c: 34 0b 00 00 mvi r11,0
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
8001890: 78 11 08 02 mvhi r17,0x802
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
8001894: 78 10 08 02 mvhi r16,0x802
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
8001898: b8 20 60 00 mv r12,r1
800189c: b8 40 90 00 mv r18,r2
80018a0: 39 ad ff ff ori r13,r13,0xffff
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
80018a4: 3a 31 11 b8 ori r17,r17,0x11b8
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
80018a8: 3a 10 11 b0 ori r16,r16,0x11b0
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
80018ac: b9 60 70 00 mv r14,r11
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 81 00 04 lw r1,(r12+4)
80018bc: 34 21 ff ff addi r1,r1,-1
80018c0: 59 81 00 04 sw (r12+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 80 10 00 mv r2,r12 <== NOT EXECUTED
80018d0: f8 00 3c c1 calli 8010bd4 <__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 82 00 00 lw r2,(r12+0)
80018e0: 34 41 00 01 addi r1,r2,1
80018e4: 40 4f 00 00 lbu r15,(r2+0)
80018e8: 59 81 00 00 sw (r12+0),r1
if (c == ':')
80018ec: 45 f4 00 1d be r15,r20,8001960 <scanInt+0x108>
break;
if (sign == 0) {
80018f0: 5d c0 00 06 bne r14,r0,8001908 <scanInt+0xb0> <== NEVER TAKEN
if (c == '-') {
sign = -1;
limit++;
continue;
80018f4: 34 0e 00 01 mvi r14,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 ae 68 00 add r13,r13,r14 <== NOT EXECUTED
8001900: 34 0e ff ff mvi r14,-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 a0 08 00 mv r1,r13
8001920: 34 02 00 0a mvi r2,10
8001924: f8 00 71 be calli 801e01c <__udivsi3>
8001928: 55 61 00 15 bgu r11,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 61 00 05 bne r11,r1,8001944 <scanInt+0xec> <== ALWAYS TAKEN
8001934: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8001938: 34 02 00 0a mvi r2,10 <== NOT EXECUTED
800193c: f8 00 71 c8 calli 801e05c <__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 6b 58 00 add r11,r11,r11
8001948: b9 60 08 00 mv r1,r11
800194c: 34 02 00 02 mvi r2,2
8001950: fb ff fa 8e calli 8000388 <__ashlsi3>
8001954: b5 61 58 00 add r11,r11,r1
8001958: b5 eb 58 00 add r11,r15,r11
800195c: e3 ff ff d7 bi 80018b8 <scanInt+0x60>
}
if (sign == 0)
8001960: 45 c0 00 07 be r14,r0,800197c <scanInt+0x124> <== NEVER TAKEN
return 0;
*val = i * sign;
8001964: b9 c0 08 00 mv r1,r14
8001968: b9 60 10 00 mv r2,r11
800196c: f8 00 71 2d calli 801de20 <__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 02 mvhi r14,0x802
/*
* 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 11 b8 ori r14,r14,0x11b8
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 3c 6b calli 8010bd4 <__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
08003144 <sched_get_priority_max>:
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
8003144: 37 9c ff fc addi sp,sp,-4
8003148: 5b 9d 00 04 sw (sp+4),ra
switch ( policy ) {
800314c: 48 01 00 05 bg r0,r1,8003160 <sched_get_priority_max+0x1c>
8003150: 34 02 00 02 mvi r2,2
8003154: 4c 41 00 08 bge r2,r1,8003174 <sched_get_priority_max+0x30>
8003158: 34 02 00 04 mvi r2,4
800315c: 44 22 00 06 be r1,r2,8003174 <sched_get_priority_max+0x30> <== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
8003160: f8 00 28 67 calli 800d2fc <__errno>
8003164: 34 02 00 16 mvi r2,22
8003168: 58 22 00 00 sw (r1+0),r2
800316c: 34 01 ff ff mvi r1,-1
8003170: e0 00 00 05 bi 8003184 <sched_get_priority_max+0x40>
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
8003174: 78 01 08 01 mvhi r1,0x801
8003178: 38 21 e0 e4 ori r1,r1,0xe0e4
800317c: 40 21 00 00 lbu r1,(r1+0)
8003180: 34 21 ff ff addi r1,r1,-1
}
8003184: 2b 9d 00 04 lw ra,(sp+4)
8003188: 37 9c 00 04 addi sp,sp,4
800318c: c3 a0 00 00 ret
08003190 <sched_get_priority_min>:
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
8003190: 37 9c ff fc addi sp,sp,-4
8003194: 5b 9d 00 04 sw (sp+4),ra
switch ( policy ) {
8003198: 48 01 00 07 bg r0,r1,80031b4 <sched_get_priority_min+0x24>
800319c: 34 02 00 02 mvi r2,2
80031a0: 4c 41 00 03 bge r2,r1,80031ac <sched_get_priority_min+0x1c><== ALWAYS TAKEN
80031a4: 34 02 00 04 mvi r2,4 <== NOT EXECUTED
80031a8: 5c 22 00 03 bne r1,r2,80031b4 <sched_get_priority_min+0x24><== NOT EXECUTED
80031ac: 34 01 00 01 mvi r1,1
80031b0: e0 00 00 05 bi 80031c4 <sched_get_priority_min+0x34>
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
80031b4: f8 00 28 52 calli 800d2fc <__errno>
80031b8: 34 02 00 16 mvi r2,22
80031bc: 58 22 00 00 sw (r1+0),r2
80031c0: 34 01 ff ff mvi r1,-1
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
80031c4: 2b 9d 00 04 lw ra,(sp+4)
80031c8: 37 9c 00 04 addi sp,sp,4
80031cc: c3 a0 00 00 ret
080031d0 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
80031d0: 37 9c ff f4 addi sp,sp,-12
80031d4: 5b 8b 00 08 sw (sp+8),r11
80031d8: 5b 9d 00 04 sw (sp+4),ra
80031dc: b8 20 58 00 mv r11,r1
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
80031e0: 44 20 00 08 be r1,r0,8003200 <sched_rr_get_interval+0x30> <== NEVER TAKEN
80031e4: 5b 82 00 0c sw (sp+12),r2
80031e8: fb ff f9 c2 calli 80018f0 <getpid>
80031ec: 2b 82 00 0c lw r2,(sp+12)
80031f0: 45 61 00 04 be r11,r1,8003200 <sched_rr_get_interval+0x30>
rtems_set_errno_and_return_minus_one( ESRCH );
80031f4: f8 00 28 42 calli 800d2fc <__errno>
80031f8: 34 02 00 03 mvi r2,3
80031fc: e0 00 00 04 bi 800320c <sched_rr_get_interval+0x3c>
if ( !interval )
8003200: 5c 40 00 06 bne r2,r0,8003218 <sched_rr_get_interval+0x48>
rtems_set_errno_and_return_minus_one( EINVAL );
8003204: f8 00 28 3e calli 800d2fc <__errno>
8003208: 34 02 00 16 mvi r2,22
800320c: 58 22 00 00 sw (r1+0),r2
8003210: 34 01 ff ff mvi r1,-1
8003214: e0 00 00 06 bi 800322c <sched_rr_get_interval+0x5c>
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
8003218: 78 01 08 01 mvhi r1,0x801
800321c: 38 21 e7 f4 ori r1,r1,0xe7f4
8003220: 28 21 00 00 lw r1,(r1+0)
8003224: f8 00 0c 52 calli 800636c <_Timespec_From_ticks>
8003228: 34 01 00 00 mvi r1,0
return 0;
}
800322c: 2b 9d 00 04 lw ra,(sp+4)
8003230: 2b 8b 00 08 lw r11,(sp+8)
8003234: 37 9c 00 0c addi sp,sp,12
8003238: c3 a0 00 00 ret
080057b0 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
80057b0: 37 9c ff c0 addi sp,sp,-64
80057b4: 5b 8b 00 18 sw (sp+24),r11
80057b8: 5b 8c 00 14 sw (sp+20),r12
80057bc: 5b 8d 00 10 sw (sp+16),r13
80057c0: 5b 8e 00 0c sw (sp+12),r14
80057c4: 5b 8f 00 08 sw (sp+8),r15
80057c8: 5b 9d 00 04 sw (sp+4),ra
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
80057cc: 78 09 08 02 mvhi r9,0x802
80057d0: 39 29 3a 64 ori r9,r9,0x3a64
80057d4: 29 2a 00 00 lw r10,(r9+0)
80057d8: 5b 83 00 2c sw (sp+44),r3
80057dc: 5b 84 00 30 sw (sp+48),r4
80057e0: 35 43 00 01 addi r3,r10,1
80057e4: 59 23 00 00 sw (r9+0),r3
80057e8: 5b 85 00 34 sw (sp+52),r5
80057ec: 5b 86 00 38 sw (sp+56),r6
80057f0: 5b 87 00 3c sw (sp+60),r7
80057f4: 5b 88 00 40 sw (sp+64),r8
80057f8: b8 20 68 00 mv r13,r1
80057fc: 5b 82 00 28 sw (sp+40),r2
8005800: b8 40 78 00 mv r15,r2
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
8005804: 20 4c 02 00 andi r12,r2,0x200
8005808: b9 80 70 00 mv r14,r12
800580c: 45 80 00 02 be r12,r0,8005814 <sem_open+0x64>
va_start(arg, oflag);
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
8005810: 2b 8e 00 30 lw r14,(sp+48)
va_end(arg);
}
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
8005814: b9 a0 08 00 mv r1,r13
8005818: 37 82 00 24 addi r2,sp,36
800581c: f8 00 16 32 calli 800b0e4 <_POSIX_Semaphore_Name_to_id>
8005820: b8 20 58 00 mv r11,r1
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "semaphore does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
8005824: 44 20 00 08 be r1,r0,8005844 <sem_open+0x94>
/*
* Unless provided a valid name that did not already exist
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
8005828: 34 01 00 02 mvi r1,2
800582c: 5d 61 00 02 bne r11,r1,8005834 <sem_open+0x84> <== NEVER TAKEN
8005830: 5d 80 00 1a bne r12,r0,8005898 <sem_open+0xe8>
_Thread_Enable_dispatch();
8005834: f8 00 07 8b calli 8007660 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
8005838: f8 00 2b d9 calli 801079c <__errno>
800583c: 58 2b 00 00 sw (r1+0),r11
8005840: e0 00 00 08 bi 8005860 <sem_open+0xb0>
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
8005844: 21 ef 0a 00 andi r15,r15,0xa00
8005848: 34 01 0a 00 mvi r1,2560
800584c: 5d e1 00 07 bne r15,r1,8005868 <sem_open+0xb8>
_Thread_Enable_dispatch();
8005850: f8 00 07 84 calli 8007660 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
8005854: f8 00 2b d2 calli 801079c <__errno>
8005858: 34 02 00 11 mvi r2,17
800585c: 58 22 00 00 sw (r1+0),r2
8005860: 34 01 ff ff mvi r1,-1
8005864: e0 00 00 19 bi 80058c8 <sem_open+0x118>
8005868: 2b 82 00 24 lw r2,(sp+36)
800586c: 78 01 08 02 mvhi r1,0x802
8005870: 37 83 00 1c addi r3,sp,28
8005874: 38 21 3c e4 ori r1,r1,0x3ce4
8005878: f8 00 05 ac calli 8006f28 <_Objects_Get>
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
the_semaphore->open_count += 1;
800587c: 28 22 00 18 lw r2,(r1+24)
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
8005880: 5b 81 00 20 sw (sp+32),r1
the_semaphore->open_count += 1;
8005884: 34 42 00 01 addi r2,r2,1
8005888: 58 22 00 18 sw (r1+24),r2
_Thread_Enable_dispatch();
800588c: f8 00 07 75 calli 8007660 <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
8005890: f8 00 07 74 calli 8007660 <_Thread_Enable_dispatch>
goto return_id;
8005894: e0 00 00 0b bi 80058c0 <sem_open+0x110>
/*
* At this point, the semaphore does not exist and everything has been
* checked. We should go ahead and create a semaphore.
*/
status =_POSIX_Semaphore_Create_support(
8005898: 34 02 00 00 mvi r2,0
800589c: b9 c0 18 00 mv r3,r14
80058a0: 37 84 00 20 addi r4,sp,32
80058a4: b9 a0 08 00 mv r1,r13
80058a8: f8 00 15 a7 calli 800af44 <_POSIX_Semaphore_Create_support>
80058ac: b8 20 58 00 mv r11,r1
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
80058b0: f8 00 07 6c calli 8007660 <_Thread_Enable_dispatch>
if ( status == -1 )
80058b4: 34 02 ff ff mvi r2,-1
80058b8: b9 60 08 00 mv r1,r11
80058bc: 45 62 00 03 be r11,r2,80058c8 <sem_open+0x118>
return_id:
#if defined(RTEMS_USE_16_BIT_OBJECT)
the_semaphore->Semaphore_id = the_semaphore->Object.id;
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
80058c0: 2b 81 00 20 lw r1,(sp+32)
80058c4: 34 21 00 08 addi r1,r1,8
#endif
return id;
}
80058c8: 2b 9d 00 04 lw ra,(sp+4)
80058cc: 2b 8b 00 18 lw r11,(sp+24)
80058d0: 2b 8c 00 14 lw r12,(sp+20)
80058d4: 2b 8d 00 10 lw r13,(sp+16)
80058d8: 2b 8e 00 0c lw r14,(sp+12)
80058dc: 2b 8f 00 08 lw r15,(sp+8)
80058e0: 37 9c 00 40 addi sp,sp,64
80058e4: c3 a0 00 00 ret
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 02 mvhi r1,0x802 <== NOT EXECUTED
8001f2c: 38 21 17 9c ori r1,r1,0x179c <== 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 33 45 calli 800ec4c <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 fc 1c ori r2,r2,0xfc1c <== NOT EXECUTED
8001f48: 38 21 f4 90 ori r1,r1,0xf490 <== NOT EXECUTED
8001f4c: f8 00 35 60 calli 800f4cc <fopen> <== NOT EXECUTED
8001f50: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8001f54: 38 42 17 9c ori r2,r2,0x179c <== 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 02 mvhi r1,0x802 <== NOT EXECUTED
8002168: 38 21 16 b4 ori r1,r1,0x16b4 <== 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 32 b6 calli 800ec4c <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 fc 1c ori r2,r2,0xfc1c <== NOT EXECUTED
8002184: 38 21 f4 18 ori r1,r1,0xf418 <== NOT EXECUTED
8002188: f8 00 34 d1 calli 800f4cc <fopen> <== NOT EXECUTED
800218c: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8002190: 38 42 16 b4 ori r2,r2,0x16b4 <== 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
0800300c <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
800300c: 37 9c ff e8 addi sp,sp,-24
8003010: 5b 8b 00 18 sw (sp+24),r11
8003014: 5b 8c 00 14 sw (sp+20),r12
8003018: 5b 8d 00 10 sw (sp+16),r13
800301c: 5b 8e 00 0c sw (sp+12),r14
8003020: 5b 8f 00 08 sw (sp+8),r15
8003024: 5b 9d 00 04 sw (sp+4),ra
8003028: b8 60 70 00 mv r14,r3
800302c: b8 20 58 00 mv r11,r1
8003030: b8 40 60 00 mv r12,r2
ISR_Level level;
if ( oact )
8003034: 44 60 00 0b be r3,r0,8003060 <sigaction+0x54>
*oact = _POSIX_signals_Vectors[ sig ];
8003038: b4 21 08 00 add r1,r1,r1
800303c: 34 02 00 02 mvi r2,2
8003040: b4 2b 08 00 add r1,r1,r11
8003044: 78 0d 08 01 mvhi r13,0x801
8003048: fb ff f6 38 calli 8000928 <__ashlsi3>
800304c: 39 ad fd c0 ori r13,r13,0xfdc0
8003050: b5 a1 10 00 add r2,r13,r1
8003054: 34 03 00 0c mvi r3,12
8003058: b9 c0 08 00 mv r1,r14
800305c: f8 00 2b ec calli 800e00c <memcpy>
if ( !sig )
8003060: 45 60 00 07 be r11,r0,800307c <sigaction+0x70>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
8003064: 35 61 ff ff addi r1,r11,-1
8003068: 34 02 00 1f mvi r2,31
800306c: 50 41 00 02 bgeu r2,r1,8003074 <sigaction+0x68>
8003070: e0 00 00 03 bi 800307c <sigaction+0x70>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
8003074: 34 01 00 09 mvi r1,9
8003078: 5d 61 00 06 bne r11,r1,8003090 <sigaction+0x84>
rtems_set_errno_and_return_minus_one( EINVAL );
800307c: f8 00 29 37 calli 800d558 <__errno>
8003080: 34 02 00 16 mvi r2,22
8003084: 58 22 00 00 sw (r1+0),r2
8003088: 34 01 ff ff mvi r1,-1
800308c: e0 00 00 1f bi 8003108 <sigaction+0xfc>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
8003090: b9 80 08 00 mv r1,r12
8003094: 45 80 00 1d be r12,r0,8003108 <sigaction+0xfc> <== NEVER TAKEN
/*
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
8003098: 90 00 70 00 rcsr r14,IE
800309c: 34 01 ff fe mvi r1,-2
80030a0: a1 c1 08 00 and r1,r14,r1
80030a4: d0 01 00 00 wcsr IE,r1
if ( act->sa_handler == SIG_DFL ) {
80030a8: 29 81 00 08 lw r1,(r12+8)
80030ac: 78 0d 08 01 mvhi r13,0x801
80030b0: 39 ad fd c0 ori r13,r13,0xfdc0
80030b4: b5 6b 78 00 add r15,r11,r11
80030b8: 5c 20 00 09 bne r1,r0,80030dc <sigaction+0xd0>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
80030bc: 34 02 00 02 mvi r2,2
80030c0: b5 eb 08 00 add r1,r15,r11
80030c4: fb ff f6 19 calli 8000928 <__ashlsi3>
80030c8: 78 02 08 01 mvhi r2,0x801
80030cc: 38 42 de 0c ori r2,r2,0xde0c
80030d0: b4 41 10 00 add r2,r2,r1
80030d4: b5 a1 08 00 add r1,r13,r1
80030d8: e0 00 00 08 bi 80030f8 <sigaction+0xec>
} else {
_POSIX_signals_Clear_process_signals( sig );
80030dc: b9 60 08 00 mv r1,r11
80030e0: f8 00 17 4f calli 8008e1c <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
80030e4: 34 02 00 02 mvi r2,2
80030e8: b5 eb 08 00 add r1,r15,r11
80030ec: fb ff f6 0f calli 8000928 <__ashlsi3>
80030f0: b5 a1 08 00 add r1,r13,r1
80030f4: b9 80 10 00 mv r2,r12
80030f8: 34 03 00 0c mvi r3,12
80030fc: f8 00 2b c4 calli 800e00c <memcpy>
}
_ISR_Enable( level );
8003100: d0 0e 00 00 wcsr IE,r14
8003104: 34 01 00 00 mvi r1,0
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
8003108: 2b 9d 00 04 lw ra,(sp+4)
800310c: 2b 8b 00 18 lw r11,(sp+24)
8003110: 2b 8c 00 14 lw r12,(sp+20)
8003114: 2b 8d 00 10 lw r13,(sp+16)
8003118: 2b 8e 00 0c lw r14,(sp+12)
800311c: 2b 8f 00 08 lw r15,(sp+8)
8003120: 37 9c 00 18 addi sp,sp,24
8003124: c3 a0 00 00 ret
0800588c <sigsuspend>:
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
800588c: 37 9c ff f0 addi sp,sp,-16
8005890: 5b 8b 00 08 sw (sp+8),r11
8005894: 5b 9d 00 04 sw (sp+4),ra
int status;
POSIX_API_Control *api;
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
8005898: b8 20 10 00 mv r2,r1
800589c: 37 83 00 10 addi r3,sp,16
80058a0: 34 01 00 01 mvi r1,1
80058a4: fb ff ff ec calli 8005854 <sigprocmask>
(void) sigfillset( &all_signals );
80058a8: 37 8b 00 0c addi r11,sp,12
80058ac: b9 60 08 00 mv r1,r11
80058b0: fb ff ff ac calli 8005760 <sigfillset>
status = sigtimedwait( &all_signals, NULL, NULL );
80058b4: 34 02 00 00 mvi r2,0
80058b8: b8 40 18 00 mv r3,r2
80058bc: b9 60 08 00 mv r1,r11
80058c0: f8 00 00 2f calli 800597c <sigtimedwait>
80058c4: b8 20 58 00 mv r11,r1
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
80058c8: 34 01 00 00 mvi r1,0
80058cc: 37 82 00 10 addi r2,sp,16
80058d0: b8 20 18 00 mv r3,r1
80058d4: fb ff ff e0 calli 8005854 <sigprocmask>
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
80058d8: 34 02 ff ff mvi r2,-1
80058dc: 45 62 00 04 be r11,r2,80058ec <sigsuspend+0x60> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINTR );
80058e0: f8 00 28 20 calli 800f960 <__errno>
80058e4: 34 02 00 04 mvi r2,4
80058e8: 58 22 00 00 sw (r1+0),r2
return status;
}
80058ec: 34 01 ff ff mvi r1,-1
80058f0: 2b 9d 00 04 lw ra,(sp+4)
80058f4: 2b 8b 00 08 lw r11,(sp+8)
80058f8: 37 9c 00 10 addi sp,sp,16
80058fc: c3 a0 00 00 ret
080035f8 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
80035f8: 37 9c ff dc addi sp,sp,-36
80035fc: 5b 8b 00 18 sw (sp+24),r11
8003600: 5b 8c 00 14 sw (sp+20),r12
8003604: 5b 8d 00 10 sw (sp+16),r13
8003608: 5b 8e 00 0c sw (sp+12),r14
800360c: 5b 8f 00 08 sw (sp+8),r15
8003610: 5b 9d 00 04 sw (sp+4),ra
8003614: b8 20 60 00 mv r12,r1
8003618: b8 40 68 00 mv r13,r2
800361c: b8 60 58 00 mv r11,r3
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
8003620: 44 20 00 09 be r1,r0,8003644 <sigtimedwait+0x4c>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
8003624: 44 60 00 0d be r3,r0,8003658 <sigtimedwait+0x60>
if ( !_Timespec_Is_valid( timeout ) )
8003628: b8 60 08 00 mv r1,r3
800362c: f8 00 0c 8a calli 8006854 <_Timespec_Is_valid>
8003630: 44 20 00 05 be r1,r0,8003644 <sigtimedwait+0x4c>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
8003634: b9 60 08 00 mv r1,r11
8003638: f8 00 0c a0 calli 80068b8 <_Timespec_To_ticks>
800363c: b8 20 10 00 mv r2,r1
if ( !interval )
8003640: 5c 20 00 07 bne r1,r0,800365c <sigtimedwait+0x64> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
8003644: f8 00 28 a1 calli 800d8c8 <__errno>
8003648: 34 02 00 16 mvi r2,22
800364c: 58 22 00 00 sw (r1+0),r2
8003650: 34 0c ff ff mvi r12,-1
8003654: e0 00 00 58 bi 80037b4 <sigtimedwait+0x1bc>
8003658: b8 60 10 00 mv r2,r3
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
800365c: 37 8b 00 1c addi r11,sp,28
8003660: 45 a0 00 02 be r13,r0,8003668 <sigtimedwait+0x70>
8003664: b9 a0 58 00 mv r11,r13
the_thread = _Thread_Executing;
8003668: 78 01 08 01 mvhi r1,0x801
800366c: 38 21 f9 70 ori r1,r1,0xf970
8003670: 28 24 00 00 lw r4,(r1+0)
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
8003674: 28 8d 01 2c lw r13,(r4+300)
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
8003678: 90 00 70 00 rcsr r14,IE
800367c: 34 01 ff fe mvi r1,-2
8003680: a1 c1 08 00 and r1,r14,r1
8003684: d0 01 00 00 wcsr IE,r1
if ( *set & api->signals_pending ) {
8003688: 29 83 00 00 lw r3,(r12+0)
800368c: 29 a1 00 d0 lw r1,(r13+208)
8003690: a0 61 78 00 and r15,r3,r1
8003694: 45 e0 00 0f be r15,r0,80036d0 <sigtimedwait+0xd8>
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending );
8003698: fb ff ff b9 calli 800357c <_POSIX_signals_Get_highest>
_POSIX_signals_Clear_signals(
800369c: 34 04 00 00 mvi r4,0
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending );
80036a0: b8 20 10 00 mv r2,r1
80036a4: 59 61 00 00 sw (r11+0),r1
_POSIX_signals_Clear_signals(
80036a8: b9 60 18 00 mv r3,r11
80036ac: b9 a0 08 00 mv r1,r13
80036b0: b8 80 28 00 mv r5,r4
80036b4: f8 00 18 2b calli 8009760 <_POSIX_signals_Clear_signals>
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
80036b8: d0 0e 00 00 wcsr IE,r14
the_info->si_code = SI_USER;
80036bc: 34 01 00 01 mvi r1,1
80036c0: 59 61 00 04 sw (r11+4),r1
the_info->si_value.sival_int = 0;
80036c4: 34 01 00 00 mvi r1,0
80036c8: 59 61 00 08 sw (r11+8),r1
80036cc: e0 00 00 39 bi 80037b0 <sigtimedwait+0x1b8>
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
80036d0: 78 01 08 01 mvhi r1,0x801
80036d4: 38 21 ff b4 ori r1,r1,0xffb4
80036d8: 28 21 00 00 lw r1,(r1+0)
80036dc: a0 61 18 00 and r3,r3,r1
80036e0: 44 6f 00 10 be r3,r15,8003720 <sigtimedwait+0x128>
signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
80036e4: fb ff ff a6 calli 800357c <_POSIX_signals_Get_highest>
80036e8: b8 20 60 00 mv r12,r1
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
80036ec: b9 80 10 00 mv r2,r12
80036f0: b9 a0 08 00 mv r1,r13
80036f4: b9 60 18 00 mv r3,r11
80036f8: b9 e0 28 00 mv r5,r15
80036fc: 34 04 00 01 mvi r4,1
8003700: f8 00 18 18 calli 8009760 <_POSIX_signals_Clear_signals>
_ISR_Enable( level );
8003704: d0 0e 00 00 wcsr IE,r14
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
8003708: 34 01 00 00 mvi r1,0
800370c: 59 61 00 08 sw (r11+8),r1
signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
_ISR_Enable( level );
the_info->si_signo = signo;
the_info->si_code = SI_USER;
8003710: 34 01 00 01 mvi r1,1
8003714: 59 61 00 04 sw (r11+4),r1
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
_ISR_Enable( level );
the_info->si_signo = signo;
8003718: 59 6c 00 00 sw (r11+0),r12
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
return signo;
800371c: e0 00 00 26 bi 80037b4 <sigtimedwait+0x1bc>
8003720: 78 03 08 01 mvhi r3,0x801
8003724: 38 63 f8 b4 ori r3,r3,0xf8b4
8003728: 28 61 00 00 lw r1,(r3+0)
}
the_info->si_signo = -1;
800372c: 34 05 ff ff mvi r5,-1
8003730: 59 65 00 00 sw (r11+0),r5
8003734: 34 21 00 01 addi r1,r1,1
8003738: 58 61 00 00 sw (r3+0),r1
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
800373c: 34 01 00 04 mvi r1,4
8003740: 58 81 00 34 sw (r4+52),r1
the_thread->Wait.option = *set;
8003744: 29 8c 00 00 lw r12,(r12+0)
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
8003748: 78 03 08 01 mvhi r3,0x801
800374c: 38 63 ff 4c ori r3,r3,0xff4c
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
8003750: 34 01 00 01 mvi r1,1
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
8003754: 58 8c 00 30 sw (r4+48),r12
8003758: 58 61 00 30 sw (r3+48),r1
the_thread->Wait.return_argument = the_info;
800375c: 58 8b 00 28 sw (r4+40),r11
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
8003760: 58 83 00 44 sw (r4+68),r3
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
the_thread->Wait.return_argument = the_info;
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
8003764: d0 0e 00 00 wcsr IE,r14
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
8003768: 78 01 08 01 mvhi r1,0x801
800376c: 78 03 08 00 mvhi r3,0x800
8003770: 38 63 62 9c ori r3,r3,0x629c
8003774: 38 21 ff 4c ori r1,r1,0xff4c
8003778: f8 00 09 da calli 8005ee0 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
800377c: f8 00 08 8e calli 80059b4 <_Thread_Enable_dispatch>
/*
* When the thread is set free by a signal, it is need to eliminate
* the signal.
*/
_POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
8003780: 29 62 00 00 lw r2,(r11+0)
8003784: 34 04 00 00 mvi r4,0
8003788: b9 60 18 00 mv r3,r11
800378c: b8 80 28 00 mv r5,r4
8003790: b9 a0 08 00 mv r1,r13
8003794: f8 00 17 f3 calli 8009760 <_POSIX_signals_Clear_signals>
errno = _Thread_Executing->Wait.return_code;
8003798: f8 00 28 4c calli 800d8c8 <__errno>
800379c: 78 02 08 01 mvhi r2,0x801
80037a0: 38 42 f9 70 ori r2,r2,0xf970
80037a4: 28 42 00 00 lw r2,(r2+0)
80037a8: 28 42 00 34 lw r2,(r2+52)
80037ac: 58 22 00 00 sw (r1+0),r2
return the_info->si_signo;
80037b0: 29 6c 00 00 lw r12,(r11+0)
}
80037b4: b9 80 08 00 mv r1,r12
80037b8: 2b 9d 00 04 lw ra,(sp+4)
80037bc: 2b 8b 00 18 lw r11,(sp+24)
80037c0: 2b 8c 00 14 lw r12,(sp+20)
80037c4: 2b 8d 00 10 lw r13,(sp+16)
80037c8: 2b 8e 00 0c lw r14,(sp+12)
80037cc: 2b 8f 00 08 lw r15,(sp+8)
80037d0: 37 9c 00 24 addi sp,sp,36
80037d4: c3 a0 00 00 ret
08005b78 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
8005b78: 37 9c ff f8 addi sp,sp,-8
8005b7c: 5b 8b 00 08 sw (sp+8),r11
8005b80: 5b 9d 00 04 sw (sp+4),ra
8005b84: b8 40 58 00 mv r11,r2
int status;
status = sigtimedwait( set, NULL, NULL );
8005b88: 34 02 00 00 mvi r2,0
8005b8c: b8 40 18 00 mv r3,r2
8005b90: fb ff ff 7b calli 800597c <sigtimedwait>
8005b94: b8 20 10 00 mv r2,r1
if ( status != -1 ) {
8005b98: 34 01 ff ff mvi r1,-1
8005b9c: 44 41 00 06 be r2,r1,8005bb4 <sigwait+0x3c>
if ( sig )
8005ba0: b9 60 08 00 mv r1,r11
8005ba4: 45 60 00 06 be r11,r0,8005bbc <sigwait+0x44> <== NEVER TAKEN
*sig = status;
8005ba8: 59 62 00 00 sw (r11+0),r2
8005bac: 34 01 00 00 mvi r1,0
8005bb0: e0 00 00 03 bi 8005bbc <sigwait+0x44>
return 0;
}
return errno;
8005bb4: f8 00 27 6b calli 800f960 <__errno>
8005bb8: 28 21 00 00 lw r1,(r1+0)
}
8005bbc: 2b 9d 00 04 lw ra,(sp+4)
8005bc0: 2b 8b 00 08 lw r11,(sp+8)
8005bc4: 37 9c 00 08 addi sp,sp,8
8005bc8: c3 a0 00 00 ret
08004684 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
8004684: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED
8004688: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED
800468c: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED
8004690: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
8004694: 28 43 00 3c lw r3,(r2+60) <== NOT EXECUTED
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
8004698: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED
800469c: b8 40 58 00 mv r11,r2 <== NOT EXECUTED
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
80046a0: 20 61 0e 78 andi r1,r3,0xe78 <== NOT EXECUTED
80046a4: 44 20 00 0c be r1,r0,80046d4 <siproc+0x50> <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
80046a8: 28 41 00 18 lw r1,(r2+24) <== NOT EXECUTED
80046ac: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
80046b0: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
80046b4: f8 00 06 e4 calli 8006244 <rtems_semaphore_obtain> <== NOT EXECUTED
i = iproc (c, tty);
80046b8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
80046bc: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
80046c0: fb ff ff 82 calli 80044c8 <iproc> <== NOT EXECUTED
80046c4: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
80046c8: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED
80046cc: f8 00 07 2e calli 8006384 <rtems_semaphore_release> <== NOT EXECUTED
80046d0: e0 00 00 04 bi 80046e0 <siproc+0x5c> <== NOT EXECUTED
}
else {
i = iproc (c, tty);
80046d4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
80046d8: fb ff ff 7c calli 80044c8 <iproc> <== NOT EXECUTED
80046dc: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
}
return i;
}
80046e0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
80046e4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80046e8: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
80046ec: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
80046f0: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
80046f4: c3 a0 00 00 ret <== NOT EXECUTED
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 2d d8 calli 800f34c <__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 36 26 calli 8011490 <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 2d c2 calli 800f34c <__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 33 56 calli 80109bc <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 31 94 ori r3,r3,0x3194
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 2f a8 calli 800fbb0 <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 31 94 ori r3,r3,0x3194
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 2f 9f calli 800fbb0 <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 2c e7 calli 800f118 <__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 24 lw r3,(r1+292)
if ( this_reent ) {
8003ce8: 44 60 00 0c be r3,r0,8003d18 <sync_per_thread+0x44> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
8003cec: 78 0b 08 02 mvhi r11,0x802
8003cf0: 39 6b 19 38 ori r11,r11,0x1938
8003cf4: 29 64 00 00 lw r4,(r11+0)
_Thread_Executing->libc_reent = this_reent;
_fwalk (t->libc_reent, sync_wrapper);
8003cf8: 78 02 08 00 mvhi r2,0x800
8003cfc: 38 42 3d 64 ori r2,r2,0x3d64
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
if ( this_reent ) {
current_reent = _Thread_Executing->libc_reent;
8003d00: 28 8c 01 24 lw r12,(r4+292)
_Thread_Executing->libc_reent = this_reent;
8003d04: 58 83 01 24 sw (r4+292),r3
_fwalk (t->libc_reent, sync_wrapper);
8003d08: 28 21 01 24 lw r1,(r1+292)
8003d0c: f8 00 31 c6 calli 8010424 <_fwalk>
_Thread_Executing->libc_reent = current_reent;
8003d10: 29 61 00 00 lw r1,(r11+0)
8003d14: 58 2c 01 24 sw (r1+292),r12
}
}
8003d18: 2b 9d 00 04 lw ra,(sp+4)
8003d1c: 2b 8b 00 0c lw r11,(sp+12)
8003d20: 2b 8c 00 08 lw r12,(sp+8)
8003d24: 37 9c 00 0c addi sp,sp,12
8003d28: c3 a0 00 00 ret
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 33 d3 calli 80104a4 <__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 22 13 calli 800bdbc <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 22 0c calli 800bdbc <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
080025e4 <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
80025e4: 37 9c ff e8 addi sp,sp,-24
80025e8: 5b 8b 00 18 sw (sp+24),r11
80025ec: 5b 8c 00 14 sw (sp+20),r12
80025f0: 5b 8d 00 10 sw (sp+16),r13
80025f4: 5b 8e 00 0c sw (sp+12),r14
80025f8: 5b 8f 00 08 sw (sp+8),r15
80025fc: 5b 9d 00 04 sw (sp+4),ra
8002600: b8 40 60 00 mv r12,r2
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
8002604: 34 02 00 01 mvi r2,1
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
8002608: b8 60 68 00 mv r13,r3
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
800260c: 5c 22 00 0c bne r1,r2,800263c <timer_create+0x58>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
8002610: 44 60 00 0b be r3,r0,800263c <timer_create+0x58>
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
8002614: 45 80 00 0d be r12,r0,8002648 <timer_create+0x64>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
8002618: 29 82 00 00 lw r2,(r12+0)
800261c: 34 42 ff ff addi r2,r2,-1
8002620: 50 22 00 02 bgeu r1,r2,8002628 <timer_create+0x44> <== ALWAYS TAKEN
8002624: e0 00 00 06 bi 800263c <timer_create+0x58> <== NOT EXECUTED
( evp->sigev_notify != SIGEV_SIGNAL ) ) {
/* The value of the field sigev_notify is not valid */
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !evp->sigev_signo )
8002628: 29 81 00 04 lw r1,(r12+4)
800262c: 44 20 00 04 be r1,r0,800263c <timer_create+0x58> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
8002630: 34 21 ff ff addi r1,r1,-1
8002634: 34 02 00 1f mvi r2,31
8002638: 50 41 00 04 bgeu r2,r1,8002648 <timer_create+0x64> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
800263c: f8 00 2a e2 calli 800d1c4 <__errno>
8002640: 34 02 00 16 mvi r2,22
8002644: e0 00 00 0e bi 800267c <timer_create+0x98>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8002648: 78 01 08 02 mvhi r1,0x802
800264c: 38 21 18 bc ori r1,r1,0x18bc
8002650: 28 22 00 00 lw r2,(r1+0)
8002654: 34 42 00 01 addi r2,r2,1
8002658: 58 22 00 00 sw (r1+0),r2
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void )
{
return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information );
800265c: 78 01 08 02 mvhi r1,0x802
8002660: 38 21 1b 7c ori r1,r1,0x1b7c
8002664: f8 00 05 8a calli 8003c8c <_Objects_Allocate>
8002668: b8 20 58 00 mv r11,r1
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
800266c: 5c 20 00 07 bne r1,r0,8002688 <timer_create+0xa4>
_Thread_Enable_dispatch();
8002670: f8 00 08 25 calli 8004704 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
8002674: f8 00 2a d4 calli 800d1c4 <__errno>
8002678: 34 02 00 0b mvi r2,11
800267c: 58 22 00 00 sw (r1+0),r2
8002680: 34 01 ff ff mvi r1,-1
8002684: e0 00 00 26 bi 800271c <timer_create+0x138>
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
8002688: 34 02 00 02 mvi r2,2
ptimer->thread_id = _Thread_Executing->Object.id;
800268c: 78 01 08 02 mvhi r1,0x802
rtems_set_errno_and_return_minus_one( EAGAIN );
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
8002690: 31 62 00 3c sb (r11+60),r2
ptimer->thread_id = _Thread_Executing->Object.id;
8002694: 38 21 19 78 ori r1,r1,0x1978
8002698: 28 21 00 00 lw r1,(r1+0)
800269c: 28 21 00 08 lw r1,(r1+8)
80026a0: 59 61 00 38 sw (r11+56),r1
if ( evp != NULL ) {
80026a4: 45 80 00 07 be r12,r0,80026c0 <timer_create+0xdc>
ptimer->inf.sigev_notify = evp->sigev_notify;
ptimer->inf.sigev_signo = evp->sigev_signo;
ptimer->inf.sigev_value = evp->sigev_value;
80026a8: 29 81 00 08 lw r1,(r12+8)
80026ac: 59 61 00 48 sw (r11+72),r1
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
ptimer->thread_id = _Thread_Executing->Object.id;
if ( evp != NULL ) {
ptimer->inf.sigev_notify = evp->sigev_notify;
80026b0: 29 81 00 00 lw r1,(r12+0)
ptimer->inf.sigev_signo = evp->sigev_signo;
80026b4: 29 8c 00 04 lw r12,(r12+4)
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
ptimer->thread_id = _Thread_Executing->Object.id;
if ( evp != NULL ) {
ptimer->inf.sigev_notify = evp->sigev_notify;
80026b8: 59 61 00 40 sw (r11+64),r1
ptimer->inf.sigev_signo = evp->sigev_signo;
80026bc: 59 6c 00 44 sw (r11+68),r12
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
80026c0: 29 6e 00 08 lw r14,(r11+8)
80026c4: 78 01 08 02 mvhi r1,0x802
80026c8: 38 21 1b 7c ori r1,r1,0x1b7c
ptimer->inf.sigev_value = evp->sigev_value;
}
ptimer->overrun = 0;
80026cc: 34 0c 00 00 mvi r12,0
80026d0: 28 2f 00 1c lw r15,(r1+28)
80026d4: 34 02 00 02 mvi r2,2
80026d8: 59 6c 00 68 sw (r11+104),r12
ptimer->timer_data.it_value.tv_sec = 0;
80026dc: 59 6c 00 5c sw (r11+92),r12
ptimer->timer_data.it_value.tv_nsec = 0;
80026e0: 59 6c 00 60 sw (r11+96),r12
ptimer->timer_data.it_interval.tv_sec = 0;
80026e4: 59 6c 00 54 sw (r11+84),r12
ptimer->timer_data.it_interval.tv_nsec = 0;
80026e8: 59 6c 00 58 sw (r11+88),r12
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
80026ec: 59 6c 00 18 sw (r11+24),r12
the_watchdog->routine = routine;
80026f0: 59 6c 00 2c sw (r11+44),r12
the_watchdog->id = id;
80026f4: 59 6c 00 30 sw (r11+48),r12
the_watchdog->user_data = user_data;
80026f8: 59 6c 00 34 sw (r11+52),r12
80026fc: 21 c1 ff ff andi r1,r14,0xffff
8002700: fb ff f7 af calli 80005bc <__ashlsi3>
8002704: b5 e1 08 00 add r1,r15,r1
8002708: 58 2b 00 00 sw (r1+0),r11
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
800270c: 59 6c 00 0c sw (r11+12),r12
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
8002710: 59 ae 00 00 sw (r13+0),r14
_Thread_Enable_dispatch();
8002714: f8 00 07 fc calli 8004704 <_Thread_Enable_dispatch>
8002718: b9 80 08 00 mv r1,r12
return 0;
}
800271c: 2b 9d 00 04 lw ra,(sp+4)
8002720: 2b 8b 00 18 lw r11,(sp+24)
8002724: 2b 8c 00 14 lw r12,(sp+20)
8002728: 2b 8d 00 10 lw r13,(sp+16)
800272c: 2b 8e 00 0c lw r14,(sp+12)
8002730: 2b 8f 00 08 lw r15,(sp+8)
8002734: 37 9c 00 18 addi sp,sp,24
8002738: c3 a0 00 00 ret
0800273c <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
800273c: 37 9c ff cc addi sp,sp,-52
8002740: 5b 8b 00 18 sw (sp+24),r11
8002744: 5b 8c 00 14 sw (sp+20),r12
8002748: 5b 8d 00 10 sw (sp+16),r13
800274c: 5b 8e 00 0c sw (sp+12),r14
8002750: 5b 8f 00 08 sw (sp+8),r15
8002754: 5b 9d 00 04 sw (sp+4),ra
8002758: b8 60 60 00 mv r12,r3
800275c: b8 20 78 00 mv r15,r1
8002760: b8 40 58 00 mv r11,r2
8002764: b8 80 68 00 mv r13,r4
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
8002768: 44 60 00 59 be r3,r0,80028cc <timer_settime+0x190> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
/* First, it verifies if the structure "value" is correct */
if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) ||
800276c: 28 61 00 0c lw r1,(r3+12)
8002770: 78 03 3b 9a mvhi r3,0x3b9a
8002774: 38 63 c9 ff ori r3,r3,0xc9ff
8002778: 54 23 00 55 bgu r1,r3,80028cc <timer_settime+0x190> <== NEVER TAKEN
( value->it_value.tv_nsec < 0 ) ||
( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) ||
800277c: 29 81 00 04 lw r1,(r12+4)
8002780: 50 61 00 02 bgeu r3,r1,8002788 <timer_settime+0x4c> <== ALWAYS TAKEN
8002784: e0 00 00 52 bi 80028cc <timer_settime+0x190> <== NOT EXECUTED
( value->it_interval.tv_nsec < 0 )) {
/* The number of nanoseconds is not correct */
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
8002788: 7c 42 00 00 cmpnei r2,r2,0
800278c: 7d 61 00 04 cmpnei r1,r11,4
8002790: a0 41 08 00 and r1,r2,r1
8002794: 5c 20 00 4e bne r1,r0,80028cc <timer_settime+0x190> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
8002798: 37 81 00 1c addi r1,sp,28
800279c: b9 80 10 00 mv r2,r12
80027a0: 34 03 00 10 mvi r3,16
80027a4: f8 00 2d 4f calli 800dce0 <memcpy>
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
80027a8: 34 01 00 04 mvi r1,4
80027ac: 5d 61 00 0d bne r11,r1,80027e0 <timer_settime+0xa4>
struct timespec now;
_TOD_Get( &now );
80027b0: 37 8b 00 2c addi r11,sp,44
80027b4: b9 60 08 00 mv r1,r11
80027b8: f8 00 03 83 calli 80035c4 <_TOD_Get>
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
80027bc: 37 8e 00 24 addi r14,sp,36
80027c0: b9 60 08 00 mv r1,r11
80027c4: b9 c0 10 00 mv r2,r14
80027c8: f8 00 09 c1 calli 8004ecc <_Timespec_Greater_than>
80027cc: 5c 20 00 40 bne r1,r0,80028cc <timer_settime+0x190> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
80027d0: b9 c0 10 00 mv r2,r14
80027d4: b9 60 08 00 mv r1,r11
80027d8: b9 c0 18 00 mv r3,r14
80027dc: f8 00 09 c8 calli 8004efc <_Timespec_Subtract>
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
80027e0: 78 01 08 02 mvhi r1,0x802
80027e4: b9 e0 10 00 mv r2,r15
80027e8: 38 21 1b 7c ori r1,r1,0x1b7c
80027ec: 37 83 00 34 addi r3,sp,52
80027f0: f8 00 06 4f calli 800412c <_Objects_Get>
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
80027f4: 2b 82 00 34 lw r2,(sp+52)
80027f8: b8 20 58 00 mv r11,r1
80027fc: 5c 40 00 34 bne r2,r0,80028cc <timer_settime+0x190> <== NEVER TAKEN
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
8002800: 2b 81 00 24 lw r1,(sp+36)
8002804: 5c 22 00 11 bne r1,r2,8002848 <timer_settime+0x10c>
8002808: 2b 8e 00 28 lw r14,(sp+40)
800280c: 5d c1 00 0f bne r14,r1,8002848 <timer_settime+0x10c>
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
8002810: 35 61 00 10 addi r1,r11,16
8002814: f8 00 0b 1f calli 8005490 <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
8002818: 45 ae 00 05 be r13,r14,800282c <timer_settime+0xf0>
*ovalue = ptimer->timer_data;
800281c: b9 a0 08 00 mv r1,r13
8002820: 35 62 00 54 addi r2,r11,84
8002824: 34 03 00 10 mvi r3,16
8002828: f8 00 2d 2e calli 800dce0 <memcpy>
/* The new data are set */
ptimer->timer_data = normalize;
800282c: 37 82 00 1c addi r2,sp,28
8002830: 34 03 00 10 mvi r3,16
8002834: 35 61 00 54 addi r1,r11,84
8002838: f8 00 2d 2a calli 800dce0 <memcpy>
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
800283c: 34 01 00 04 mvi r1,4
8002840: 31 61 00 3c sb (r11+60),r1
8002844: e0 00 00 1f bi 80028c0 <timer_settime+0x184>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
8002848: b9 80 08 00 mv r1,r12
800284c: f8 00 09 ba calli 8004f34 <_Timespec_To_ticks>
8002850: 59 61 00 64 sw (r11+100),r1
initial_period = _Timespec_To_ticks( &normalize.it_value );
8002854: 37 81 00 24 addi r1,sp,36
8002858: f8 00 09 b7 calli 8004f34 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
800285c: 29 63 00 08 lw r3,(r11+8)
8002860: 78 04 08 00 mvhi r4,0x800
8002864: b8 20 10 00 mv r2,r1
8002868: 38 84 28 fc ori r4,r4,0x28fc
800286c: 35 61 00 10 addi r1,r11,16
8002870: b9 60 28 00 mv r5,r11
8002874: f8 00 15 bd calli 8007f68 <_POSIX_Timer_Insert_helper>
8002878: b8 20 60 00 mv r12,r1
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
800287c: 5c 20 00 04 bne r1,r0,800288c <timer_settime+0x150>
_Thread_Enable_dispatch();
8002880: f8 00 07 a1 calli 8004704 <_Thread_Enable_dispatch>
8002884: b9 80 08 00 mv r1,r12
return 0;
8002888: e0 00 00 15 bi 80028dc <timer_settime+0x1a0>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
800288c: 45 a0 00 05 be r13,r0,80028a0 <timer_settime+0x164>
*ovalue = ptimer->timer_data;
8002890: b9 a0 08 00 mv r1,r13
8002894: 35 62 00 54 addi r2,r11,84
8002898: 34 03 00 10 mvi r3,16
800289c: f8 00 2d 11 calli 800dce0 <memcpy>
ptimer->timer_data = normalize;
80028a0: 37 82 00 1c addi r2,sp,28
80028a4: 34 03 00 10 mvi r3,16
80028a8: 35 61 00 54 addi r1,r11,84
80028ac: f8 00 2d 0d calli 800dce0 <memcpy>
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
80028b0: 34 01 00 03 mvi r1,3
80028b4: 31 61 00 3c sb (r11+60),r1
_TOD_Get( &ptimer->time );
80028b8: 35 61 00 6c addi r1,r11,108
80028bc: f8 00 03 42 calli 80035c4 <_TOD_Get>
_Thread_Enable_dispatch();
80028c0: f8 00 07 91 calli 8004704 <_Thread_Enable_dispatch>
80028c4: 34 01 00 00 mvi r1,0
return 0;
80028c8: e0 00 00 05 bi 80028dc <timer_settime+0x1a0>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
80028cc: f8 00 2a 3e calli 800d1c4 <__errno>
80028d0: 34 02 00 16 mvi r2,22
80028d4: 58 22 00 00 sw (r1+0),r2
80028d8: 34 01 ff ff mvi r1,-1
}
80028dc: 2b 9d 00 04 lw ra,(sp+4)
80028e0: 2b 8b 00 18 lw r11,(sp+24)
80028e4: 2b 8c 00 14 lw r12,(sp+20)
80028e8: 2b 8d 00 10 lw r13,(sp+16)
80028ec: 2b 8e 00 0c lw r14,(sp+12)
80028f0: 2b 8f 00 08 lw r15,(sp+8)
80028f4: 37 9c 00 34 addi sp,sp,52
80028f8: c3 a0 00 00 ret
08002498 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
8002498: 37 9c ff ec addi sp,sp,-20
800249c: 5b 8b 00 0c sw (sp+12),r11
80024a0: 5b 8c 00 08 sw (sp+8),r12
80024a4: 5b 9d 00 04 sw (sp+4),ra
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
80024a8: 78 0b 08 02 mvhi r11,0x802
80024ac: 39 6b 01 48 ori r11,r11,0x148
80024b0: 29 62 00 1c lw r2,(r11+28)
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
80024b4: b8 20 60 00 mv r12,r1
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
80024b8: 5c 40 00 09 bne r2,r0,80024dc <ualarm+0x44>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
80024bc: 78 01 08 00 mvhi r1,0x800
80024c0: 38 21 25 b0 ori r1,r1,0x25b0
80024c4: 59 61 00 1c sw (r11+28),r1
the_watchdog->id = id;
the_watchdog->user_data = user_data;
80024c8: 59 62 00 24 sw (r11+36),r2
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
80024cc: 59 62 00 08 sw (r11+8),r2
the_watchdog->routine = routine;
the_watchdog->id = id;
80024d0: 59 62 00 20 sw (r11+32),r2
the_watchdog->user_data = user_data;
80024d4: b8 40 58 00 mv r11,r2
80024d8: e0 00 00 18 bi 8002538 <ualarm+0xa0>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
80024dc: b9 60 08 00 mv r1,r11
80024e0: f8 00 0a 15 calli 8004d34 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
80024e4: 34 21 ff fe addi r1,r1,-2
80024e8: 34 02 00 01 mvi r2,1
80024ec: 50 41 00 03 bgeu r2,r1,80024f8 <ualarm+0x60> <== ALWAYS TAKEN
80024f0: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED
80024f4: e0 00 00 11 bi 8002538 <ualarm+0xa0> <== NOT EXECUTED
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
80024f8: 29 64 00 14 lw r4,(r11+20)
80024fc: 29 61 00 0c lw r1,(r11+12)
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
8002500: 29 63 00 18 lw r3,(r11+24)
8002504: 37 82 00 10 addi r2,sp,16
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
8002508: b4 81 08 00 add r1,r4,r1
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
800250c: c8 23 08 00 sub r1,r1,r3
8002510: f8 00 08 52 calli 8004658 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
8002514: 2b 81 00 10 lw r1,(sp+16)
8002518: 78 02 00 0f mvhi r2,0xf
800251c: 38 42 42 40 ori r2,r2,0x4240
8002520: f8 00 65 c8 calli 801bc40 <__mulsi3>
8002524: b8 20 58 00 mv r11,r1
remaining += tp.tv_nsec / 1000;
8002528: 2b 81 00 14 lw r1,(sp+20)
800252c: 34 02 03 e8 mvi r2,1000
8002530: f8 00 65 e4 calli 801bcc0 <__divsi3>
8002534: b4 2b 58 00 add r11,r1,r11
/*
* If useconds is non-zero, then the caller wants to schedule
* the alarm repeatedly at that interval. If the interval is
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
8002538: 45 80 00 18 be r12,r0,8002598 <ualarm+0x100>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
800253c: 78 02 00 0f mvhi r2,0xf
8002540: 38 42 42 40 ori r2,r2,0x4240
8002544: b9 80 08 00 mv r1,r12
8002548: f8 00 66 3d calli 801be3c <__udivsi3>
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
800254c: 78 02 00 0f mvhi r2,0xf
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
8002550: 5b 81 00 10 sw (sp+16),r1
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
8002554: 38 42 42 40 ori r2,r2,0x4240
8002558: b9 80 08 00 mv r1,r12
800255c: f8 00 66 48 calli 801be7c <__umodsi3>
8002560: 34 02 03 e8 mvi r2,1000
8002564: f8 00 65 b7 calli 801bc40 <__mulsi3>
ticks = _Timespec_To_ticks( &tp );
8002568: 37 8c 00 10 addi r12,sp,16
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
800256c: 5b 81 00 14 sw (sp+20),r1
ticks = _Timespec_To_ticks( &tp );
8002570: b9 80 08 00 mv r1,r12
8002574: f8 00 08 61 calli 80046f8 <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
8002578: b9 80 08 00 mv r1,r12
800257c: f8 00 08 5f calli 80046f8 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
8002580: 78 02 08 02 mvhi r2,0x802
8002584: 38 42 01 48 ori r2,r2,0x148
8002588: 58 41 00 0c sw (r2+12),r1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
800258c: 78 01 08 01 mvhi r1,0x801
8002590: 38 21 f9 a0 ori r1,r1,0xf9a0
8002594: f8 00 09 89 calli 8004bb8 <_Watchdog_Insert>
}
return remaining;
}
8002598: b9 60 08 00 mv r1,r11
800259c: 2b 9d 00 04 lw ra,(sp+4)
80025a0: 2b 8b 00 0c lw r11,(sp+12)
80025a4: 2b 8c 00 08 lw r12,(sp+8)
80025a8: 37 9c 00 14 addi sp,sp,20
80025ac: c3 a0 00 00 ret
08003ad8 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
8003ad8: 37 9c ff c0 addi sp,sp,-64
8003adc: 5b 8b 00 18 sw (sp+24),r11
8003ae0: 5b 8c 00 14 sw (sp+20),r12
8003ae4: 5b 8d 00 10 sw (sp+16),r13
8003ae8: 5b 8e 00 0c sw (sp+12),r14
8003aec: 5b 8f 00 08 sw (sp+8),r15
8003af0: 5b 9d 00 04 sw (sp+4),ra
8003af4: b8 20 78 00 mv r15,r1
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
8003af8: fb ff fb 3b calli 80027e4 <rtems_filesystem_dirname>
8003afc: b8 20 68 00 mv r13,r1
if ( parentpathlen == 0 )
8003b00: 5c 20 00 19 bne r1,r0,8003b64 <unlink+0x8c>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
8003b04: 41 e1 00 00 lbu r1,(r15+0)
8003b08: 64 23 00 5c cmpei r3,r1,92
8003b0c: 64 22 00 2f cmpei r2,r1,47
8003b10: b8 62 10 00 or r2,r3,r2
8003b14: 5c 4d 00 02 bne r2,r13,8003b1c <unlink+0x44>
8003b18: 5c 20 00 0a bne r1,r0,8003b40 <unlink+0x68> <== ALWAYS TAKEN
8003b1c: 78 01 08 02 mvhi r1,0x802
8003b20: 38 21 50 f8 ori r1,r1,0x50f8
8003b24: 28 22 00 00 lw r2,(r1+0)
8003b28: 34 03 00 14 mvi r3,20
8003b2c: 37 81 00 30 addi r1,sp,48
8003b30: 34 42 00 18 addi r2,r2,24
8003b34: f8 00 3e ef calli 80136f0 <memcpy>
8003b38: 34 0c 00 00 mvi r12,0
8003b3c: e0 00 00 12 bi 8003b84 <unlink+0xac>
8003b40: 78 01 08 02 mvhi r1,0x802
8003b44: 38 21 50 f8 ori r1,r1,0x50f8
8003b48: 28 22 00 00 lw r2,(r1+0)
8003b4c: 34 03 00 14 mvi r3,20
8003b50: 37 81 00 30 addi r1,sp,48
8003b54: 34 42 00 04 addi r2,r2,4
8003b58: f8 00 3e e6 calli 80136f0 <memcpy>
8003b5c: b9 a0 60 00 mv r12,r13
8003b60: e0 00 00 09 bi 8003b84 <unlink+0xac>
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
8003b64: b9 e0 08 00 mv r1,r15
8003b68: b9 a0 10 00 mv r2,r13
8003b6c: 34 03 00 02 mvi r3,2
8003b70: 37 84 00 30 addi r4,sp,48
8003b74: 34 05 00 00 mvi r5,0
8003b78: fb ff fb 69 calli 800291c <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
8003b7c: 5c 20 00 5d bne r1,r0,8003cf0 <unlink+0x218> <== NEVER TAKEN
8003b80: 34 0c 00 01 mvi r12,1
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
8003b84: 37 8b 00 1c addi r11,sp,28
8003b88: 37 8e 00 30 addi r14,sp,48
8003b8c: 34 03 00 14 mvi r3,20
8003b90: b9 c0 10 00 mv r2,r14
8003b94: b9 60 08 00 mv r1,r11
8003b98: f8 00 3e d6 calli 80136f0 <memcpy>
name = path + parentpathlen;
8003b9c: b5 ed 68 00 add r13,r15,r13
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
8003ba0: b9 a0 08 00 mv r1,r13
8003ba4: f8 00 40 de calli 8013f1c <strlen>
8003ba8: b8 20 10 00 mv r2,r1
8003bac: b9 a0 08 00 mv r1,r13
8003bb0: fb ff fa fe calli 80027a8 <rtems_filesystem_prefix_separators>
8003bb4: b5 a1 68 00 add r13,r13,r1
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
8003bb8: b9 a0 08 00 mv r1,r13
8003bbc: f8 00 40 d8 calli 8013f1c <strlen>
8003bc0: 34 03 00 00 mvi r3,0
8003bc4: b8 20 10 00 mv r2,r1
8003bc8: b9 60 20 00 mv r4,r11
8003bcc: b9 a0 08 00 mv r1,r13
8003bd0: b8 60 28 00 mv r5,r3
8003bd4: fb ff fb 18 calli 8002834 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
8003bd8: 44 20 00 09 be r1,r0,8003bfc <unlink+0x124>
if ( free_parentloc )
8003bdc: 45 80 00 45 be r12,r0,8003cf0 <unlink+0x218> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
8003be0: 2b 81 00 3c lw r1,(sp+60)
8003be4: 44 20 00 43 be r1,r0,8003cf0 <unlink+0x218> <== NEVER TAKEN
8003be8: 28 22 00 1c lw r2,(r1+28)
8003bec: 44 40 00 41 be r2,r0,8003cf0 <unlink+0x218> <== NEVER TAKEN
8003bf0: b9 c0 08 00 mv r1,r14
8003bf4: d8 40 00 00 call r2
8003bf8: e0 00 00 3e bi 8003cf0 <unlink+0x218>
return -1;
}
if ( !loc.ops->node_type_h ) {
8003bfc: 2b 82 00 28 lw r2,(sp+40)
8003c00: 28 43 00 10 lw r3,(r2+16)
8003c04: 5c 61 00 04 bne r3,r1,8003c14 <unlink+0x13c> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
8003c08: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED
8003c0c: 5c 43 00 1a bne r2,r3,8003c74 <unlink+0x19c> <== NOT EXECUTED
8003c10: e0 00 00 1b bi 8003c7c <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 ) {
8003c14: b9 60 08 00 mv r1,r11
8003c18: d8 60 00 00 call r3
8003c1c: 34 02 00 01 mvi r2,1
8003c20: 2b 83 00 28 lw r3,(sp+40)
8003c24: 5c 22 00 10 bne r1,r2,8003c64 <unlink+0x18c>
rtems_filesystem_freenode( &loc );
8003c28: 44 60 00 05 be r3,r0,8003c3c <unlink+0x164> <== NEVER TAKEN
8003c2c: 28 62 00 1c lw r2,(r3+28)
8003c30: 44 40 00 03 be r2,r0,8003c3c <unlink+0x164> <== NEVER TAKEN
8003c34: b9 60 08 00 mv r1,r11
8003c38: d8 40 00 00 call r2
if ( free_parentloc )
8003c3c: 45 80 00 07 be r12,r0,8003c58 <unlink+0x180> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
8003c40: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED
8003c44: 44 20 00 05 be r1,r0,8003c58 <unlink+0x180> <== NOT EXECUTED
8003c48: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8003c4c: 44 40 00 03 be r2,r0,8003c58 <unlink+0x180> <== NOT EXECUTED
8003c50: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED
8003c54: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
8003c58: f8 00 3c 00 calli 8012c58 <__errno>
8003c5c: 34 02 00 15 mvi r2,21
8003c60: e0 00 00 10 bi 8003ca0 <unlink+0x1c8>
}
if ( !loc.ops->unlink_h ) {
8003c64: 28 64 00 0c lw r4,(r3+12)
8003c68: 5c 80 00 10 bne r4,r0,8003ca8 <unlink+0x1d0> <== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
8003c6c: 28 62 00 1c lw r2,(r3+28) <== NOT EXECUTED
8003c70: 44 44 00 03 be r2,r4,8003c7c <unlink+0x1a4> <== NOT EXECUTED
8003c74: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8003c78: d8 40 00 00 call r2 <== NOT EXECUTED
if ( free_parentloc )
8003c7c: 45 80 00 07 be r12,r0,8003c98 <unlink+0x1c0> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
8003c80: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED
8003c84: 44 20 00 05 be r1,r0,8003c98 <unlink+0x1c0> <== NOT EXECUTED
8003c88: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8003c8c: 44 40 00 03 be r2,r0,8003c98 <unlink+0x1c0> <== NOT EXECUTED
8003c90: 37 81 00 30 addi r1,sp,48 <== NOT EXECUTED
8003c94: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8003c98: f8 00 3b f0 calli 8012c58 <__errno> <== NOT EXECUTED
8003c9c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8003ca0: 58 22 00 00 sw (r1+0),r2
8003ca4: e0 00 00 13 bi 8003cf0 <unlink+0x218>
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
8003ca8: b9 c0 08 00 mv r1,r14
8003cac: b9 60 10 00 mv r2,r11
8003cb0: d8 80 00 00 call r4
8003cb4: b8 20 68 00 mv r13,r1
rtems_filesystem_freenode( &loc );
8003cb8: 2b 81 00 28 lw r1,(sp+40)
8003cbc: 44 20 00 05 be r1,r0,8003cd0 <unlink+0x1f8> <== NEVER TAKEN
8003cc0: 28 22 00 1c lw r2,(r1+28)
8003cc4: 44 40 00 03 be r2,r0,8003cd0 <unlink+0x1f8> <== NEVER TAKEN
8003cc8: b9 60 08 00 mv r1,r11
8003ccc: d8 40 00 00 call r2
if ( free_parentloc )
8003cd0: 45 80 00 09 be r12,r0,8003cf4 <unlink+0x21c>
rtems_filesystem_freenode( &parentloc );
8003cd4: 2b 81 00 3c lw r1,(sp+60)
8003cd8: 44 20 00 07 be r1,r0,8003cf4 <unlink+0x21c> <== NEVER TAKEN
8003cdc: 28 22 00 1c lw r2,(r1+28)
8003ce0: 44 40 00 05 be r2,r0,8003cf4 <unlink+0x21c> <== NEVER TAKEN
8003ce4: 37 81 00 30 addi r1,sp,48
8003ce8: d8 40 00 00 call r2
8003cec: e0 00 00 02 bi 8003cf4 <unlink+0x21c>
8003cf0: 34 0d ff ff mvi r13,-1
return result;
}
8003cf4: b9 a0 08 00 mv r1,r13
8003cf8: 2b 9d 00 04 lw ra,(sp+4)
8003cfc: 2b 8b 00 18 lw r11,(sp+24)
8003d00: 2b 8c 00 14 lw r12,(sp+20)
8003d04: 2b 8d 00 10 lw r13,(sp+16)
8003d08: 2b 8e 00 0c lw r14,(sp+12)
8003d0c: 2b 8f 00 08 lw r15,(sp+8)
8003d10: 37 9c 00 40 addi sp,sp,64
8003d14: 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 3c 75 calli 8015ae4 <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 2e 46 calli 8012270 <__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 2e 38 calli 8012270 <__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 91 30 ori r1,r1,0x9130
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 a0 70 ori r1,r1,0xa070
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 2e 26 calli 8012270 <__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 fb calli 8007a1c <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 ee calli 8007df0 <_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 35 b0 calli 8011490 <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 2d 4f calli 800f34c <__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
080224c0 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
80224c0: 37 9c ff e8 addi sp,sp,-24
80224c4: 5b 8b 00 14 sw (sp+20),r11
80224c8: 5b 8c 00 10 sw (sp+16),r12
80224cc: 5b 8d 00 0c sw (sp+12),r13
80224d0: 5b 8e 00 08 sw (sp+8),r14
80224d4: 5b 9d 00 04 sw (sp+4),ra
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
80224d8: 78 04 08 02 mvhi r4,0x802
80224dc: 38 84 50 10 ori r4,r4,0x5010
80224e0: 28 84 00 00 lw r4,(r4+0)
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
80224e4: b8 40 68 00 mv r13,r2
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
80224e8: 54 81 00 02 bgu r4,r1,80224f0 <write+0x30> <== ALWAYS TAKEN
80224ec: e0 00 00 10 bi 802252c <write+0x6c> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
80224f0: 34 02 00 03 mvi r2,3
80224f4: 5b 83 00 18 sw (sp+24),r3
80224f8: 78 0b 08 02 mvhi r11,0x802
80224fc: fb ff 79 b4 calli 8000bcc <__ashlsi3>
8022500: 34 02 00 03 mvi r2,3
8022504: 39 6b 57 ec ori r11,r11,0x57ec
8022508: b8 20 70 00 mv r14,r1
802250c: fb ff 79 b0 calli 8000bcc <__ashlsi3>
8022510: 29 6c 00 00 lw r12,(r11+0)
8022514: b5 c1 08 00 add r1,r14,r1
rtems_libio_check_is_open( iop );
8022518: 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 );
802251c: b5 81 60 00 add r12,r12,r1
rtems_libio_check_is_open( iop );
8022520: 29 81 00 18 lw r1,(r12+24)
8022524: 20 22 01 00 andi r2,r1,0x100
8022528: 5c 40 00 04 bne r2,r0,8022538 <write+0x78> <== ALWAYS TAKEN
802252c: fb ff c1 cb calli 8012c58 <__errno> <== NOT EXECUTED
8022530: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
8022534: e0 00 00 0e bi 802256c <write+0xac> <== NOT EXECUTED
rtems_libio_check_buffer( buffer );
8022538: 45 a0 00 05 be r13,r0,802254c <write+0x8c> <== NEVER TAKEN
rtems_libio_check_count( count );
802253c: b8 60 58 00 mv r11,r3
8022540: 44 60 00 1d be r3,r0,80225b4 <write+0xf4>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
8022544: 20 21 00 04 andi r1,r1,0x4
8022548: 5c 20 00 04 bne r1,r0,8022558 <write+0x98> <== ALWAYS TAKEN
802254c: fb ff c1 c3 calli 8012c58 <__errno> <== NOT EXECUTED
8022550: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8022554: e0 00 00 06 bi 802256c <write+0xac> <== NOT EXECUTED
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
8022558: 29 81 00 40 lw r1,(r12+64)
802255c: 28 24 00 0c lw r4,(r1+12)
8022560: 5c 80 00 06 bne r4,r0,8022578 <write+0xb8> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
8022564: fb ff c1 bd calli 8012c58 <__errno> <== NOT EXECUTED
8022568: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
802256c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8022570: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
8022574: e0 00 00 10 bi 80225b4 <write+0xf4> <== NOT EXECUTED
rc = (*iop->handlers->write_h)( iop, buffer, count );
8022578: b9 a0 10 00 mv r2,r13
802257c: b9 80 08 00 mv r1,r12
8022580: d8 80 00 00 call r4
8022584: b8 20 58 00 mv r11,r1
if ( rc > 0 )
8022588: 4c 01 00 0b bge r0,r1,80225b4 <write+0xf4> <== NEVER TAKEN
iop->offset += rc;
802258c: 34 02 00 1f mvi r2,31
8022590: fb ff 79 df calli 8000d0c <__ashrsi3>
8022594: 29 82 00 14 lw r2,(r12+20)
8022598: 29 84 00 10 lw r4,(r12+16)
802259c: b5 62 10 00 add r2,r11,r2
80225a0: f5 62 18 00 cmpgu r3,r11,r2
80225a4: b4 24 08 00 add r1,r1,r4
80225a8: b4 61 08 00 add r1,r3,r1
80225ac: 59 82 00 14 sw (r12+20),r2
80225b0: 59 81 00 10 sw (r12+16),r1
return rc;
}
80225b4: b9 60 08 00 mv r1,r11
80225b8: 2b 9d 00 04 lw ra,(sp+4)
80225bc: 2b 8b 00 14 lw r11,(sp+20)
80225c0: 2b 8c 00 10 lw r12,(sp+16)
80225c4: 2b 8d 00 0c lw r13,(sp+12)
80225c8: 2b 8e 00 08 lw r14,(sp+8)
80225cc: 37 9c 00 18 addi sp,sp,24
80225d0: c3 a0 00 00 ret
08003a70 <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
8003a70: 37 9c ff e4 addi sp,sp,-28
8003a74: 5b 8b 00 1c sw (sp+28),r11
8003a78: 5b 8c 00 18 sw (sp+24),r12
8003a7c: 5b 8d 00 14 sw (sp+20),r13
8003a80: 5b 8e 00 10 sw (sp+16),r14
8003a84: 5b 8f 00 0c sw (sp+12),r15
8003a88: 5b 90 00 08 sw (sp+8),r16
8003a8c: 5b 9d 00 04 sw (sp+4),ra
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
8003a90: 78 04 08 02 mvhi r4,0x802
8003a94: 38 84 20 10 ori r4,r4,0x2010
8003a98: 28 84 00 00 lw r4,(r4+0)
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
8003a9c: b8 40 68 00 mv r13,r2
8003aa0: b8 60 80 00 mv r16,r3
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
8003aa4: 54 81 00 02 bgu r4,r1,8003aac <writev+0x3c> <== ALWAYS TAKEN
8003aa8: e0 00 00 0e bi 8003ae0 <writev+0x70> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
8003aac: 34 02 00 03 mvi r2,3
8003ab0: fb ff f5 00 calli 8000eb0 <__ashlsi3>
8003ab4: 78 0b 08 02 mvhi r11,0x802
8003ab8: 34 02 00 03 mvi r2,3
8003abc: 39 6b 2e f0 ori r11,r11,0x2ef0
8003ac0: b8 20 70 00 mv r14,r1
8003ac4: fb ff f4 fb calli 8000eb0 <__ashlsi3>
8003ac8: 29 6c 00 00 lw r12,(r11+0)
8003acc: b5 c1 08 00 add r1,r14,r1
8003ad0: b5 81 60 00 add r12,r12,r1
rtems_libio_check_is_open( iop );
8003ad4: 29 81 00 18 lw r1,(r12+24)
8003ad8: 20 22 01 00 andi r2,r1,0x100
8003adc: 5c 40 00 04 bne r2,r0,8003aec <writev+0x7c>
8003ae0: f8 00 2d 08 calli 800ef00 <__errno>
8003ae4: 34 02 00 09 mvi r2,9
8003ae8: e0 00 00 22 bi 8003b70 <writev+0x100>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
8003aec: 20 21 00 04 andi r1,r1,0x4
8003af0: 44 20 00 1e be r1,r0,8003b68 <writev+0xf8> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
8003af4: 45 a0 00 1d be r13,r0,8003b68 <writev+0xf8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
8003af8: 4a 00 00 02 bg r16,r0,8003b00 <writev+0x90>
8003afc: e0 00 00 1b bi 8003b68 <writev+0xf8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
8003b00: 34 01 04 00 mvi r1,1024
8003b04: 4c 30 00 02 bge r1,r16,8003b0c <writev+0x9c> <== ALWAYS TAKEN
8003b08: e0 00 00 18 bi 8003b68 <writev+0xf8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
8003b0c: 29 81 00 40 lw r1,(r12+64)
8003b10: 28 21 00 0c lw r1,(r1+12)
8003b14: 5c 20 00 04 bne r1,r0,8003b24 <writev+0xb4> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
8003b18: f8 00 2c fa calli 800ef00 <__errno> <== NOT EXECUTED
8003b1c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8003b20: e0 00 00 14 bi 8003b70 <writev+0x100> <== NOT EXECUTED
8003b24: 34 02 00 00 mvi r2,0
8003b28: b9 a0 08 00 mv r1,r13
8003b2c: 34 0f 00 01 mvi r15,1
8003b30: b8 40 18 00 mv r3,r2
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
if ( !iov[v].iov_base )
8003b34: 28 24 00 00 lw r4,(r1+0)
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
8003b38: 34 42 00 01 addi r2,r2,1
if ( !iov[v].iov_base )
8003b3c: 44 80 00 0b be r4,r0,8003b68 <writev+0xf8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
8003b40: 28 25 00 04 lw r5,(r1+4)
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
8003b44: 34 21 00 08 addi r1,r1,8
if ( iov[v].iov_len )
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
8003b48: b4 65 20 00 add r4,r3,r5
if ( total < old || total > SSIZE_MAX )
8003b4c: e8 64 18 00 cmpg r3,r3,r4
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
8003b50: 64 a5 00 00 cmpei r5,r5,0
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
8003b54: 68 86 7f ff cmpgi r6,r4,32767
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
8003b58: c8 05 28 00 sub r5,r0,r5
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
8003b5c: b8 c3 18 00 or r3,r6,r3
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
8003b60: a1 e5 78 00 and r15,r15,r5
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
8003b64: 44 60 00 05 be r3,r0,8003b78 <writev+0x108>
rtems_set_errno_and_return_minus_one( EINVAL );
8003b68: f8 00 2c e6 calli 800ef00 <__errno>
8003b6c: 34 02 00 16 mvi r2,22
8003b70: 58 22 00 00 sw (r1+0),r2
8003b74: e0 00 00 13 bi 8003bc0 <writev+0x150>
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
8003b78: 4c 50 00 03 bge r2,r16,8003b84 <writev+0x114>
8003b7c: b8 80 18 00 mv r3,r4
8003b80: e3 ff ff ed bi 8003b34 <writev+0xc4>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
8003b84: b9 e0 58 00 mv r11,r15
8003b88: 45 e0 00 03 be r15,r0,8003b94 <writev+0x124>
8003b8c: b8 60 58 00 mv r11,r3
8003b90: e0 00 00 1d bi 8003c04 <writev+0x194>
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
8003b94: 29 a3 00 04 lw r3,(r13+4)
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
8003b98: 35 ef 00 01 addi r15,r15,1
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
8003b9c: 44 60 00 18 be r3,r0,8003bfc <writev+0x18c> <== NEVER TAKEN
continue;
bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
8003ba0: 29 81 00 40 lw r1,(r12+64)
8003ba4: 29 a2 00 00 lw r2,(r13+0)
8003ba8: 28 24 00 0c lw r4,(r1+12)
8003bac: b9 80 08 00 mv r1,r12
8003bb0: d8 80 00 00 call r4
8003bb4: b8 20 70 00 mv r14,r1
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
8003bb8: 34 02 00 1f mvi r2,31
if ( iov[v].iov_len == 0 )
continue;
bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
if ( bytes < 0 )
8003bbc: 4c 20 00 03 bge r1,r0,8003bc8 <writev+0x158> <== ALWAYS TAKEN
8003bc0: 34 0b ff ff mvi r11,-1
8003bc4: e0 00 00 10 bi 8003c04 <writev+0x194>
return -1;
if ( bytes > 0 ) {
8003bc8: 44 20 00 0b be r1,r0,8003bf4 <writev+0x184> <== NEVER TAKEN
iop->offset += bytes;
8003bcc: fb ff f5 09 calli 8000ff0 <__ashrsi3>
8003bd0: 29 82 00 14 lw r2,(r12+20)
8003bd4: 29 84 00 10 lw r4,(r12+16)
total += bytes;
8003bd8: b5 6e 58 00 add r11,r11,r14
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
8003bdc: b5 c2 10 00 add r2,r14,r2
8003be0: f5 c2 18 00 cmpgu r3,r14,r2
8003be4: b4 24 08 00 add r1,r1,r4
8003be8: b4 61 08 00 add r1,r3,r1
8003bec: 59 81 00 10 sw (r12+16),r1
8003bf0: 59 82 00 14 sw (r12+20),r2
total += bytes;
}
if (bytes != iov[ v ].iov_len)
8003bf4: 29 a1 00 04 lw r1,(r13+4)
8003bf8: 5d c1 00 03 bne r14,r1,8003c04 <writev+0x194> <== NEVER TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
8003bfc: 35 ad 00 08 addi r13,r13,8
8003c00: 4a 0f ff e5 bg r16,r15,8003b94 <writev+0x124>
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
8003c04: b9 60 08 00 mv r1,r11
8003c08: 2b 9d 00 04 lw ra,(sp+4)
8003c0c: 2b 8b 00 1c lw r11,(sp+28)
8003c10: 2b 8c 00 18 lw r12,(sp+24)
8003c14: 2b 8d 00 14 lw r13,(sp+20)
8003c18: 2b 8e 00 10 lw r14,(sp+16)
8003c1c: 2b 8f 00 0c lw r15,(sp+12)
8003c20: 2b 90 00 08 lw r16,(sp+8)
8003c24: 37 9c 00 1c addi sp,sp,28
8003c28: c3 a0 00 00 ret