RTEMS 4.10Annotated Report
Fri May 28 10:59:53 2010
08006484 <IMFS_Set_handlers>:
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
8006484: 37 9c ff f0 addi sp,sp,-16
8006488: 5b 8b 00 10 sw (sp+16),r11
800648c: 5b 8c 00 0c sw (sp+12),r12
8006490: 5b 8d 00 08 sw (sp+8),r13
8006494: 5b 9d 00 04 sw (sp+4),ra
8006498: 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 ) {
800649c: 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;
80064a0: 29 62 00 10 lw r2,(r11+16)
switch( node->type ) {
80064a4: 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;
80064a8: 28 4d 00 34 lw r13,(r2+52)
switch( node->type ) {
80064ac: 34 02 00 07 mvi r2,7
80064b0: 54 22 00 0a bgu r1,r2,80064d8 <IMFS_Set_handlers+0x54> <== NEVER TAKEN
80064b4: 78 0c 08 01 mvhi r12,0x801
80064b8: 34 02 00 02 mvi r2,2
80064bc: fb ff e7 4d calli 80001f0 <__ashlsi3>
80064c0: 39 8c c9 cc ori r12,r12,0xc9cc
80064c4: b5 81 08 00 add r1,r12,r1
80064c8: 28 21 00 00 lw r1,(r1+0)
80064cc: c0 20 00 00 b r1
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
80064d0: 29 ad 00 0c lw r13,(r13+12)
80064d4: 59 6d 00 08 sw (r11+8),r13
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
80064d8: 34 01 00 00 mvi r1,0
80064dc: 2b 9d 00 04 lw ra,(sp+4)
80064e0: 2b 8b 00 10 lw r11,(sp+16)
80064e4: 2b 8c 00 0c lw r12,(sp+12)
80064e8: 2b 8d 00 08 lw r13,(sp+8)
80064ec: 37 9c 00 10 addi sp,sp,16
80064f0: c3 a0 00 00 ret
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
80064f4: 29 ad 00 08 lw r13,(r13+8)
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
80064f8: 34 01 00 00 mvi r1,0
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
80064fc: 59 6d 00 08 sw (r11+8),r13
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
8006500: 2b 9d 00 04 lw ra,(sp+4)
8006504: 2b 8b 00 10 lw r11,(sp+16)
8006508: 2b 8c 00 0c lw r12,(sp+12)
800650c: 2b 8d 00 08 lw r13,(sp+8)
8006510: 37 9c 00 10 addi sp,sp,16
8006514: c3 a0 00 00 ret
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
8006518: 78 01 08 01 mvhi r1,0x801
800651c: 38 21 ca dc ori r1,r1,0xcadc
8006520: 59 61 00 08 sw (r11+8),r1
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
8006524: 34 01 00 00 mvi r1,0
8006528: 2b 9d 00 04 lw ra,(sp+4)
800652c: 2b 8b 00 10 lw r11,(sp+16)
8006530: 2b 8c 00 0c lw r12,(sp+12)
8006534: 2b 8d 00 08 lw r13,(sp+8)
8006538: 37 9c 00 10 addi sp,sp,16
800653c: c3 a0 00 00 ret
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = &IMFS_fifo_handlers;
8006540: 78 01 08 01 mvhi r1,0x801
8006544: 38 21 c9 ec ori r1,r1,0xc9ec
8006548: 59 61 00 08 sw (r11+8),r1
break;
}
return 0;
}
800654c: 34 01 00 00 mvi r1,0
8006550: 2b 9d 00 04 lw ra,(sp+4)
8006554: 2b 8b 00 10 lw r11,(sp+16)
8006558: 2b 8c 00 0c lw r12,(sp+12)
800655c: 2b 8d 00 08 lw r13,(sp+8)
8006560: 37 9c 00 10 addi sp,sp,16
8006564: c3 a0 00 00 ret
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
8006568: 78 01 08 01 mvhi r1,0x801
800656c: 38 21 ca a4 ori r1,r1,0xcaa4
8006570: 59 61 00 08 sw (r11+8),r1
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
8006574: 34 01 00 00 mvi r1,0
8006578: 2b 9d 00 04 lw ra,(sp+4)
800657c: 2b 8b 00 10 lw r11,(sp+16)
8006580: 2b 8c 00 0c lw r12,(sp+12)
8006584: 2b 8d 00 08 lw r13,(sp+8)
8006588: 37 9c 00 10 addi sp,sp,16
800658c: c3 a0 00 00 ret
0800b294 <IMFS_allocate_node>:
IMFS_jnode_t *IMFS_allocate_node(
IMFS_jnode_types_t type,
const char *name,
mode_t mode
)
{
800b294: 37 9c ff e4 addi sp,sp,-28
800b298: 5b 8b 00 14 sw (sp+20),r11
800b29c: 5b 8c 00 10 sw (sp+16),r12
800b2a0: 5b 8d 00 0c sw (sp+12),r13
800b2a4: 5b 8e 00 08 sw (sp+8),r14
800b2a8: 5b 9d 00 04 sw (sp+4),ra
800b2ac: b8 20 68 00 mv r13,r1
800b2b0: b8 40 70 00 mv r14,r2
struct timeval tv;
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
800b2b4: 34 01 00 01 mvi r1,1
800b2b8: 34 02 00 68 mvi r2,104
IMFS_jnode_t *IMFS_allocate_node(
IMFS_jnode_types_t type,
const char *name,
mode_t mode
)
{
800b2bc: b8 60 60 00 mv r12,r3
struct timeval tv;
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
800b2c0: fb ff f1 4c calli 80077f0 <calloc>
800b2c4: b8 20 58 00 mv r11,r1
if ( !node )
800b2c8: 44 20 00 14 be r1,r0,800b318 <IMFS_allocate_node+0x84> <== NEVER TAKEN
return NULL;
/*
* Fill in the basic information
*/
node->st_nlink = 1;
800b2cc: 34 04 00 01 mvi r4,1
node->type = type;
strncpy( node->name, name, IMFS_NAME_MAX );
800b2d0: b9 c0 10 00 mv r2,r14
800b2d4: 34 03 00 20 mvi r3,32
800b2d8: 34 21 00 0c addi r1,r1,12
return NULL;
/*
* Fill in the basic information
*/
node->st_nlink = 1;
800b2dc: 0d 64 00 34 sh (r11+52),r4
node->type = type;
800b2e0: 59 6d 00 4c sw (r11+76),r13
strncpy( node->name, name, IMFS_NAME_MAX );
800b2e4: f8 00 0d 23 calli 800e770 <strncpy>
/*
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode;
800b2e8: 59 6c 00 30 sw (r11+48),r12
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
800b2ec: fb ff f2 1b calli 8007b58 <geteuid>
800b2f0: 0d 61 00 3c sh (r11+60),r1
node->st_gid = getegid();
800b2f4: fb ff f2 14 calli 8007b44 <getegid>
800b2f8: 0d 61 00 3e sh (r11+62),r1
#endif
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
800b2fc: 34 02 00 00 mvi r2,0
800b300: 37 81 00 18 addi r1,sp,24
800b304: fb ff f2 1a calli 8007b6c <gettimeofday>
node->stat_atime = (time_t) tv.tv_sec;
800b308: 2b 81 00 18 lw r1,(sp+24)
node->stat_mtime = (time_t) tv.tv_sec;
node->stat_ctime = (time_t) tv.tv_sec;
800b30c: 59 61 00 48 sw (r11+72),r1
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
node->stat_atime = (time_t) tv.tv_sec;
800b310: 59 61 00 40 sw (r11+64),r1
node->stat_mtime = (time_t) tv.tv_sec;
800b314: 59 61 00 44 sw (r11+68),r1
node->stat_ctime = (time_t) tv.tv_sec;
return node;
}
800b318: b9 60 08 00 mv r1,r11
800b31c: 2b 9d 00 04 lw ra,(sp+4)
800b320: 2b 8b 00 14 lw r11,(sp+20)
800b324: 2b 8c 00 10 lw r12,(sp+16)
800b328: 2b 8d 00 0c lw r13,(sp+12)
800b32c: 2b 8e 00 08 lw r14,(sp+8)
800b330: 37 9c 00 1c addi sp,sp,28
800b334: c3 a0 00 00 ret
0800c89c <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
800c89c: 37 9c ff e4 addi sp,sp,-28
800c8a0: 5b 8b 00 14 sw (sp+20),r11
800c8a4: 5b 8c 00 10 sw (sp+16),r12
800c8a8: 5b 8d 00 0c sw (sp+12),r13
800c8ac: 5b 8e 00 08 sw (sp+8),r14
800c8b0: 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;
800c8b4: 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 */
)
{
800c8b8: 20 4e ff ff andi r14,r2,0xffff
800c8bc: 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();
800c8c0: f8 00 05 af calli 800df7c <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
800c8c4: 2d 64 00 3c lhu r4,(r11+60)
800c8c8: 7c 2c 00 00 cmpnei r12,r1,0
800c8cc: fc 81 08 00 cmpne r1,r4,r1
800c8d0: a1 81 60 00 and r12,r12,r1
800c8d4: 5d 80 00 10 bne r12,r0,800c914 <IMFS_chown+0x78> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
#endif
jnode->st_uid = owner;
800c8d8: 0d 6e 00 3c sh (r11+60),r14
jnode->st_gid = group;
800c8dc: 0d 6d 00 3e sh (r11+62),r13
IMFS_update_ctime( jnode );
800c8e0: 37 81 00 18 addi r1,sp,24
800c8e4: b9 80 10 00 mv r2,r12
800c8e8: fb ff d9 05 calli 8002cfc <gettimeofday>
800c8ec: 2b 81 00 18 lw r1,(sp+24)
800c8f0: 59 61 00 48 sw (r11+72),r1
800c8f4: b9 80 08 00 mv r1,r12
return 0;
}
800c8f8: 2b 9d 00 04 lw ra,(sp+4)
800c8fc: 2b 8b 00 14 lw r11,(sp+20)
800c900: 2b 8c 00 10 lw r12,(sp+16)
800c904: 2b 8d 00 0c lw r13,(sp+12)
800c908: 2b 8e 00 08 lw r14,(sp+8)
800c90c: 37 9c 00 1c addi sp,sp,28
800c910: c3 a0 00 00 ret
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
rtems_set_errno_and_return_minus_one( EPERM );
800c914: f8 00 1d 85 calli 8013f28 <__errno> <== NOT EXECUTED
800c918: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
800c91c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800c920: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
800c924: e3 ff ff f5 bi 800c8f8 <IMFS_chown+0x5c> <== NOT EXECUTED
0800b37c <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
800b37c: 37 9c ff ec addi sp,sp,-20
800b380: 5b 8b 00 10 sw (sp+16),r11
800b384: 5b 8c 00 0c sw (sp+12),r12
800b388: 5b 8d 00 08 sw (sp+8),r13
800b38c: 5b 9d 00 04 sw (sp+4),ra
800b390: b8 20 60 00 mv r12,r1
800b394: b8 40 68 00 mv r13,r2
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
800b398: b8 20 58 00 mv r11,r1
800b39c: 5c 20 00 08 bne r1,r0,800b3bc <IMFS_create_node+0x40> <== ALWAYS TAKEN
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
800b3a0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800b3a4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800b3a8: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
800b3ac: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
800b3b0: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
800b3b4: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
800b3b8: c3 a0 00 00 ret <== NOT EXECUTED
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
800b3bc: 78 01 08 01 mvhi r1,0x801
800b3c0: 38 21 e1 10 ori r1,r1,0xe110
800b3c4: 28 26 00 00 lw r6,(r1+0)
800b3c8: b8 60 10 00 mv r2,r3
800b3cc: b9 a0 08 00 mv r1,r13
800b3d0: 28 c3 00 2c lw r3,(r6+44)
800b3d4: 5b 85 00 14 sw (sp+20),r5
800b3d8: a4 60 18 00 not r3,r3
800b3dc: a0 83 18 00 and r3,r4,r3
800b3e0: fb ff ff ad calli 800b294 <IMFS_allocate_node>
800b3e4: b8 20 58 00 mv r11,r1
if ( !node )
800b3e8: 44 20 ff ee be r1,r0,800b3a0 <IMFS_create_node+0x24> <== NEVER TAKEN
return NULL;
/*
* Set the type specific information
*/
switch (type) {
800b3ec: 34 01 00 07 mvi r1,7
800b3f0: 55 a1 00 35 bgu r13,r1,800b4c4 <IMFS_create_node+0x148> <== NEVER TAKEN
800b3f4: b9 a0 08 00 mv r1,r13
800b3f8: 34 02 00 02 mvi r2,2
800b3fc: 78 0d 08 01 mvhi r13,0x801
800b400: fb ff d3 7c calli 80001f0 <__ashlsi3>
800b404: 39 ad ce f8 ori r13,r13,0xcef8
800b408: b5 a1 08 00 add r1,r13,r1
800b40c: 28 21 00 00 lw r1,(r1+0)
800b410: 2b 85 00 14 lw r5,(sp+20)
800b414: c0 20 00 00 b r1
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
800b418: 28 a1 00 04 lw r1,(r5+4)
800b41c: 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;
800b420: 28 a5 00 00 lw r5,(r5+0)
800b424: 59 65 00 50 sw (r11+80),r5
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
800b428: 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;
800b42c: 29 81 00 00 lw r1,(r12+0)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
800b430: b9 60 10 00 mv r2,r11
fs_info = parent_loc->mt_entry->fs_info;
800b434: 28 63 00 34 lw r3,(r3+52)
node->Parent = parent;
800b438: 59 61 00 08 sw (r11+8),r1
800b43c: 34 21 00 50 addi r1,r1,80
node->st_ino = ++fs_info->ino_count;
800b440: 28 64 00 04 lw r4,(r3+4)
800b444: 34 84 00 01 addi r4,r4,1
800b448: 58 64 00 04 sw (r3+4),r4
800b44c: 59 64 00 38 sw (r11+56),r4
800b450: fb ff de 67 calli 8002dec <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
800b454: b9 60 08 00 mv r1,r11
800b458: 2b 9d 00 04 lw ra,(sp+4)
800b45c: 2b 8b 00 10 lw r11,(sp+16)
800b460: 2b 8c 00 0c lw r12,(sp+12)
800b464: 2b 8d 00 08 lw r13,(sp+8)
800b468: 37 9c 00 14 addi sp,sp,20
800b46c: c3 a0 00 00 ret
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
800b470: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
node->info.linearfile.direct = 0;
800b474: 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;
800b478: 59 61 00 50 sw (r11+80),r1 <== NOT EXECUTED
800b47c: 59 61 00 54 sw (r11+84),r1 <== NOT EXECUTED
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
800b480: 34 01 00 00 mvi r1,0
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
800b484: 59 61 00 60 sw (r11+96),r1
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
800b488: 59 61 00 50 sw (r11+80),r1
800b48c: 59 61 00 54 sw (r11+84),r1
node->info.file.indirect = 0;
800b490: 59 61 00 58 sw (r11+88),r1
node->info.file.doubly_indirect = 0;
800b494: 59 61 00 5c sw (r11+92),r1
node->info.file.triply_indirect = 0;
break;
800b498: e3 ff ff e4 bi 800b428 <IMFS_create_node+0xac>
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
800b49c: 34 01 00 00 mvi r1,0
800b4a0: 59 61 00 50 sw (r11+80),r1
break;
800b4a4: e3 ff ff e1 bi 800b428 <IMFS_create_node+0xac>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
800b4a8: 35 62 00 54 addi r2,r11,84
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
800b4ac: 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);
800b4b0: 59 62 00 50 sw (r11+80),r2
the_chain->permanent_null = NULL;
800b4b4: 34 02 00 00 mvi r2,0
800b4b8: 59 62 00 54 sw (r11+84),r2
the_chain->last = _Chain_Head(the_chain);
800b4bc: 59 61 00 58 sw (r11+88),r1
800b4c0: e3 ff ff da bi 800b428 <IMFS_create_node+0xac>
default:
assert(0);
800b4c4: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
800b4c8: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED
800b4cc: 78 04 08 01 mvhi r4,0x801 <== NOT EXECUTED
800b4d0: 38 21 ce a8 ori r1,r1,0xcea8 <== NOT EXECUTED
800b4d4: 38 63 cf 18 ori r3,r3,0xcf18 <== NOT EXECUTED
800b4d8: 38 84 ce f4 ori r4,r4,0xcef4 <== NOT EXECUTED
800b4dc: 34 02 00 5c mvi r2,92 <== NOT EXECUTED
800b4e0: fb ff f0 b1 calli 80077a4 <__assert_func> <== NOT EXECUTED
0800b338 <IMFS_create_root_node>:
IMFS_jnode_t *IMFS_create_root_node(void)
{
800b338: 37 9c ff fc addi sp,sp,-4
800b33c: 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) );
800b340: 78 02 08 01 mvhi r2,0x801
800b344: 38 42 c7 d8 ori r2,r2,0xc7d8
800b348: 34 01 00 01 mvi r1,1
800b34c: 34 03 41 ed mvi r3,16877
800b350: fb ff ff d1 calli 800b294 <IMFS_allocate_node>
if ( !node )
800b354: 44 20 00 07 be r1,r0,800b370 <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);
800b358: 34 23 00 54 addi r3,r1,84
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
800b35c: 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);
800b360: 58 23 00 50 sw (r1+80),r3
the_chain->permanent_null = NULL;
800b364: 34 03 00 00 mvi r3,0
800b368: 58 23 00 54 sw (r1+84),r3
the_chain->last = _Chain_Head(the_chain);
800b36c: 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;
}
800b370: 2b 9d 00 04 lw ra,(sp+4)
800b374: 37 9c 00 04 addi sp,sp,4
800b378: c3 a0 00 00 ret
08003c88 <IMFS_dump_directory>:
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
8003c88: 37 9c ff dc addi sp,sp,-36
8003c8c: 5b 8b 00 24 sw (sp+36),r11
8003c90: 5b 8c 00 20 sw (sp+32),r12
8003c94: 5b 8d 00 1c sw (sp+28),r13
8003c98: 5b 8e 00 18 sw (sp+24),r14
8003c9c: 5b 8f 00 14 sw (sp+20),r15
8003ca0: 5b 90 00 10 sw (sp+16),r16
8003ca4: 5b 91 00 0c sw (sp+12),r17
8003ca8: 5b 92 00 08 sw (sp+8),r18
8003cac: 5b 9d 00 04 sw (sp+4),ra
8003cb0: 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 );
8003cb4: 44 20 00 33 be r1,r0,8003d80 <IMFS_dump_directory+0xf8> <== NEVER TAKEN
assert( level >= 0 );
8003cb8: 4c 40 00 09 bge r2,r0,8003cdc <IMFS_dump_directory+0x54> <== ALWAYS TAKEN
8003cbc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003cc0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8003cc4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8003cc8: 38 21 7e bc ori r1,r1,0x7ebc <== NOT EXECUTED
8003ccc: 38 63 80 84 ori r3,r3,0x8084 <== NOT EXECUTED
8003cd0: 38 84 7f 90 ori r4,r4,0x7f90 <== NOT EXECUTED
8003cd4: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8003cd8: f8 00 02 b3 calli 80047a4 <__assert_func> <== NOT EXECUTED
assert( the_directory->type == IMFS_DIRECTORY );
8003cdc: 28 31 00 4c lw r17,(r1+76)
8003ce0: 34 02 00 01 mvi r2,1
8003ce4: 5e 22 00 2f bne r17,r2,8003da0 <IMFS_dump_directory+0x118> <== NEVER TAKEN
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
8003ce8: 28 2e 00 50 lw r14,(r1+80)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
8003cec: 34 30 00 54 addi r16,r1,84
8003cf0: 45 d0 00 15 be r14,r16,8003d44 <IMFS_dump_directory+0xbc>
8003cf4: 78 0c 08 02 mvhi r12,0x802
8003cf8: 39 8c a1 d8 ori r12,r12,0xa1d8
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
8003cfc: 78 0f 08 02 mvhi r15,0x802
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
8003d00: 35 b2 00 01 addi r18,r13,1
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
8003d04: 34 0b 00 00 mvi r11,0
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
8003d08: 29 83 00 00 lw r3,(r12+0)
8003d0c: b9 e0 08 00 mv r1,r15
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
8003d10: 35 6b 00 01 addi r11,r11,1
fprintf(stdout, "...." );
8003d14: 28 64 00 08 lw r4,(r3+8)
8003d18: 38 21 7f c4 ori r1,r1,0x7fc4
8003d1c: 34 02 00 01 mvi r2,1
8003d20: 34 03 00 04 mvi r3,4
8003d24: f8 00 45 3b calli 8015210 <fwrite>
!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++ )
8003d28: 4d ab ff f8 bge r13,r11,8003d08 <IMFS_dump_directory+0x80>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
8003d2c: b9 c0 08 00 mv r1,r14
8003d30: fb ff ff 55 calli 8003a84 <IMFS_print_jnode>
if ( the_jnode->type == IMFS_DIRECTORY )
8003d34: 29 c1 00 4c lw r1,(r14+76)
8003d38: 44 31 00 0e be r1,r17,8003d70 <IMFS_dump_directory+0xe8>
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 ) {
8003d3c: 29 ce 00 00 lw r14,(r14+0)
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
8003d40: 5d d0 ff f1 bne r14,r16,8003d04 <IMFS_dump_directory+0x7c>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
8003d44: 2b 9d 00 04 lw ra,(sp+4)
8003d48: 2b 8b 00 24 lw r11,(sp+36)
8003d4c: 2b 8c 00 20 lw r12,(sp+32)
8003d50: 2b 8d 00 1c lw r13,(sp+28)
8003d54: 2b 8e 00 18 lw r14,(sp+24)
8003d58: 2b 8f 00 14 lw r15,(sp+20)
8003d5c: 2b 90 00 10 lw r16,(sp+16)
8003d60: 2b 91 00 0c lw r17,(sp+12)
8003d64: 2b 92 00 08 lw r18,(sp+8)
8003d68: 37 9c 00 24 addi sp,sp,36
8003d6c: c3 a0 00 00 ret
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
8003d70: b9 c0 08 00 mv r1,r14
8003d74: ba 40 10 00 mv r2,r18
8003d78: fb ff ff c4 calli 8003c88 <IMFS_dump_directory>
8003d7c: e3 ff ff f0 bi 8003d3c <IMFS_dump_directory+0xb4>
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
8003d80: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003d84: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8003d88: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8003d8c: 38 21 7e bc ori r1,r1,0x7ebc <== NOT EXECUTED
8003d90: 38 63 80 84 ori r3,r3,0x8084 <== NOT EXECUTED
8003d94: 38 84 7f 80 ori r4,r4,0x7f80 <== NOT EXECUTED
8003d98: 34 02 00 84 mvi r2,132 <== NOT EXECUTED
8003d9c: f8 00 02 82 calli 80047a4 <__assert_func> <== NOT EXECUTED
assert( level >= 0 );
assert( the_directory->type == IMFS_DIRECTORY );
8003da0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003da4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8003da8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8003dac: 38 21 7e bc ori r1,r1,0x7ebc <== NOT EXECUTED
8003db0: 38 63 80 84 ori r3,r3,0x8084 <== NOT EXECUTED
8003db4: 38 84 7f 9c ori r4,r4,0x7f9c <== NOT EXECUTED
8003db8: 34 02 00 88 mvi r2,136 <== NOT EXECUTED
8003dbc: f8 00 02 7a calli 80047a4 <__assert_func> <== NOT EXECUTED
080067ac <IMFS_eval_path>:
const char *pathname, /* IN */
int pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
80067ac: 37 9c ff 9c addi sp,sp,-100
80067b0: 5b 8b 00 3c sw (sp+60),r11
80067b4: 5b 8c 00 38 sw (sp+56),r12
80067b8: 5b 8d 00 34 sw (sp+52),r13
80067bc: 5b 8e 00 30 sw (sp+48),r14
80067c0: 5b 8f 00 2c sw (sp+44),r15
80067c4: 5b 90 00 28 sw (sp+40),r16
80067c8: 5b 91 00 24 sw (sp+36),r17
80067cc: 5b 92 00 20 sw (sp+32),r18
80067d0: 5b 93 00 1c sw (sp+28),r19
80067d4: 5b 94 00 18 sw (sp+24),r20
80067d8: 5b 95 00 14 sw (sp+20),r21
80067dc: 5b 96 00 10 sw (sp+16),r22
80067e0: 5b 97 00 0c sw (sp+12),r23
80067e4: 5b 98 00 08 sw (sp+8),r24
80067e8: 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;
80067ec: 28 8b 00 00 lw r11,(r4+0)
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
80067f0: 78 10 08 01 mvhi r16,0x801
const char *pathname, /* IN */
int pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
80067f4: b8 80 60 00 mv r12,r4
80067f8: b8 20 88 00 mv r17,r1
80067fc: b8 40 70 00 mv r14,r2
8006800: b8 60 b8 00 mv r23,r3
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
8006804: 3a 10 e1 10 ori r16,r16,0xe110
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
8006808: 34 0f 00 00 mvi r15,0
800680c: 37 93 00 40 addi r19,sp,64
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
8006810: 34 12 00 01 mvi r18,1
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
8006814: 34 14 00 03 mvi r20,3
node = pathloc->node_access;
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
8006818: 34 15 00 04 mvi r21,4
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
if ( result == -1 )
800681c: 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 ) {
8006820: 34 16 00 02 mvi r22,2
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
8006824: 37 84 00 64 addi r4,sp,100
8006828: b6 2f 08 00 add r1,r17,r15
800682c: b9 c0 10 00 mv r2,r14
8006830: ba 60 18 00 mv r3,r19
8006834: f8 00 02 78 calli 8007214 <IMFS_get_token>
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
8006838: 29 84 00 00 lw r4,(r12+0)
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
800683c: b8 20 68 00 mv r13,r1
pathnamelen -= len;
8006840: 2b 85 00 64 lw r5,(sp+100)
i += len;
if ( !pathloc->node_access )
8006844: 44 80 00 51 be r4,r0,8006988 <IMFS_eval_path+0x1dc> <== NEVER TAKEN
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
i += len;
8006848: b5 e5 78 00 add r15,r15,r5
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
800684c: c9 c5 70 00 sub r14,r14,r5
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
8006850: 5c 20 00 10 bne r1,r0,8006890 <IMFS_eval_path+0xe4>
* 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 ) {
8006854: 28 82 00 4c lw r2,(r4+76)
8006858: 34 01 00 01 mvi r1,1
800685c: 44 41 00 57 be r2,r1,80069b8 <IMFS_eval_path+0x20c>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
8006860: b9 80 08 00 mv r1,r12
8006864: fb ff ff 08 calli 8006484 <IMFS_Set_handlers>
8006868: b8 20 68 00 mv r13,r1
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
800686c: ba e0 10 00 mv r2,r23
8006870: b9 80 08 00 mv r1,r12
8006874: fb ff ff 47 calli 8006590 <IMFS_evaluate_permission>
8006878: 5c 20 00 2c bne r1,r0,8006928 <IMFS_eval_path+0x17c>
rtems_set_errno_and_return_minus_one( EACCES );
800687c: f8 00 1a c2 calli 800d384 <__errno>
8006880: 34 02 00 0d mvi r2,13
8006884: 58 22 00 00 sw (r1+0),r2
8006888: 34 0d ff ff mvi r13,-1
800688c: e0 00 00 27 bi 8006928 <IMFS_eval_path+0x17c>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
8006890: 29 61 00 4c lw r1,(r11+76)
8006894: 44 32 00 37 be r1,r18,8006970 <IMFS_eval_path+0x1c4>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
8006898: b8 80 58 00 mv r11,r4
switch( type ) {
800689c: 45 b4 00 06 be r13,r20,80068b4 <IMFS_eval_path+0x108>
80068a0: 45 b5 00 1e be r13,r21,8006918 <IMFS_eval_path+0x16c>
80068a4: 45 b6 00 11 be r13,r22,80068e8 <IMFS_eval_path+0x13c>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
80068a8: 7d ad 00 04 cmpnei r13,r13,4
80068ac: 5d a0 ff de bne r13,r0,8006824 <IMFS_eval_path+0x78> <== ALWAYS TAKEN
80068b0: e3 ff ff e9 bi 8006854 <IMFS_eval_path+0xa8> <== NOT EXECUTED
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
80068b4: 28 81 00 4c lw r1,(r4+76)
80068b8: 44 34 00 39 be r1,r20,800699c <IMFS_eval_path+0x1f0>
node = pathloc->node_access;
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
80068bc: 44 35 00 55 be r1,r21,8006a10 <IMFS_eval_path+0x264>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
80068c0: 5c 32 00 5c bne r1,r18,8006a30 <IMFS_eval_path+0x284>
/*
* 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 ) {
80068c4: 29 6d 00 5c lw r13,(r11+92)
80068c8: 5d a0 00 5f bne r13,r0,8006a44 <IMFS_eval_path+0x298>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
80068cc: b9 60 08 00 mv r1,r11
80068d0: ba 60 10 00 mv r2,r19
80068d4: f8 00 02 19 calli 8007138 <IMFS_find_match_in_dir>
80068d8: b8 20 58 00 mv r11,r1
if ( !node )
80068dc: 44 2d 00 2b be r1,r13,8006988 <IMFS_eval_path+0x1dc>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
80068e0: 59 8b 00 00 sw (r12+0),r11
break;
80068e4: e3 ff ff d0 bi 8006824 <IMFS_eval_path+0x78>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
80068e8: 2a 01 00 00 lw r1,(r16+0)
80068ec: 28 21 00 18 lw r1,(r1+24)
80068f0: 44 24 ff cd be r1,r4,8006824 <IMFS_eval_path+0x78>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
80068f4: 29 81 00 10 lw r1,(r12+16)
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
80068f8: 28 22 00 1c lw r2,(r1+28)
80068fc: 44 44 00 5a be r2,r4,8006a64 <IMFS_eval_path+0x2b8>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
8006900: 28 8b 00 08 lw r11,(r4+8)
8006904: 5d 60 ff f7 bne r11,r0,80068e0 <IMFS_eval_path+0x134>
rtems_set_errno_and_return_minus_one( ENOENT );
8006908: f8 00 1a 9f calli 800d384 <__errno>
800690c: 58 2d 00 00 sw (r1+0),r13
8006910: 34 0d ff ff mvi r13,-1
8006914: e0 00 00 05 bi 8006928 <IMFS_eval_path+0x17c>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
8006918: f8 00 1a 9b calli 800d384 <__errno>
800691c: 34 02 00 5b mvi r2,91
8006920: 58 22 00 00 sw (r1+0),r2
8006924: 34 0d ff ff mvi r13,-1
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
8006928: b9 a0 08 00 mv r1,r13
800692c: 2b 9d 00 04 lw ra,(sp+4)
8006930: 2b 8b 00 3c lw r11,(sp+60)
8006934: 2b 8c 00 38 lw r12,(sp+56)
8006938: 2b 8d 00 34 lw r13,(sp+52)
800693c: 2b 8e 00 30 lw r14,(sp+48)
8006940: 2b 8f 00 2c lw r15,(sp+44)
8006944: 2b 90 00 28 lw r16,(sp+40)
8006948: 2b 91 00 24 lw r17,(sp+36)
800694c: 2b 92 00 20 lw r18,(sp+32)
8006950: 2b 93 00 1c lw r19,(sp+28)
8006954: 2b 94 00 18 lw r20,(sp+24)
8006958: 2b 95 00 14 lw r21,(sp+20)
800695c: 2b 96 00 10 lw r22,(sp+16)
8006960: 2b 97 00 0c lw r23,(sp+12)
8006964: 2b 98 00 08 lw r24,(sp+8)
8006968: 37 9c 00 64 addi sp,sp,100
800696c: c3 a0 00 00 ret
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
8006970: b9 80 08 00 mv r1,r12
8006974: ba 40 10 00 mv r2,r18
8006978: fb ff ff 06 calli 8006590 <IMFS_evaluate_permission>
800697c: 44 20 ff c0 be r1,r0,800687c <IMFS_eval_path+0xd0>
8006980: 29 84 00 00 lw r4,(r12+0)
8006984: e3 ff ff c5 bi 8006898 <IMFS_eval_path+0xec>
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
8006988: f8 00 1a 7f calli 800d384 <__errno>
800698c: 34 02 00 02 mvi r2,2
8006990: 58 22 00 00 sw (r1+0),r2
8006994: 34 0d ff ff mvi r13,-1
8006998: e3 ff ff e4 bi 8006928 <IMFS_eval_path+0x17c>
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
800699c: b9 80 08 00 mv r1,r12
80069a0: 34 02 00 00 mvi r2,0
80069a4: fb ff ff 1d calli 8006618 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
80069a8: 29 8b 00 00 lw r11,(r12+0)
if ( !node )
80069ac: 45 60 00 21 be r11,r0,8006a30 <IMFS_eval_path+0x284> <== NEVER TAKEN
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
80069b0: 29 61 00 4c lw r1,(r11+76)
80069b4: e3 ff ff c3 bi 80068c0 <IMFS_eval_path+0x114>
*
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
80069b8: 28 81 00 5c lw r1,(r4+92)
80069bc: 44 20 ff a9 be r1,r0,8006860 <IMFS_eval_path+0xb4>
newloc = node->info.directory.mt_fs->mt_fs_root;
80069c0: 28 23 00 28 lw r3,(r1+40)
80069c4: 28 27 00 24 lw r7,(r1+36)
80069c8: 28 26 00 20 lw r6,(r1+32)
80069cc: 28 24 00 1c lw r4,(r1+28)
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
80069d0: 2b 82 00 64 lw r2,(sp+100)
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
80069d4: 28 21 00 2c lw r1,(r1+44)
80069d8: 59 81 00 10 sw (r12+16),r1
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
80069dc: 28 65 00 00 lw r5,(r3+0)
80069e0: c9 e2 08 00 sub r1,r15,r2
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
80069e4: 59 84 00 00 sw (r12+0),r4
80069e8: 59 83 00 0c sw (r12+12),r3
80069ec: 59 87 00 08 sw (r12+8),r7
80069f0: 59 86 00 04 sw (r12+4),r6
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
80069f4: b6 21 08 00 add r1,r17,r1
80069f8: b5 c2 10 00 add r2,r14,r2
80069fc: ba e0 18 00 mv r3,r23
8006a00: b9 80 20 00 mv r4,r12
8006a04: d8 a0 00 00 call r5
8006a08: b8 20 68 00 mv r13,r1
8006a0c: e3 ff ff c7 bi 8006928 <IMFS_eval_path+0x17c>
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
8006a10: b9 80 08 00 mv r1,r12
8006a14: 34 02 00 00 mvi r2,0
8006a18: fb ff ff 1e calli 8006690 <IMFS_evaluate_sym_link>
8006a1c: b8 20 68 00 mv r13,r1
node = pathloc->node_access;
8006a20: 29 8b 00 00 lw r11,(r12+0)
if ( result == -1 )
8006a24: 44 38 ff c1 be r1,r24,8006928 <IMFS_eval_path+0x17c> <== NEVER TAKEN
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
8006a28: 29 61 00 4c lw r1,(r11+76)
8006a2c: e3 ff ff a5 bi 80068c0 <IMFS_eval_path+0x114>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
8006a30: f8 00 1a 55 calli 800d384 <__errno>
8006a34: 34 02 00 14 mvi r2,20
8006a38: 58 22 00 00 sw (r1+0),r2
8006a3c: 34 0d ff ff mvi r13,-1
8006a40: e3 ff ff ba bi 8006928 <IMFS_eval_path+0x17c>
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
8006a44: 29 a3 00 28 lw r3,(r13+40)
8006a48: 29 a7 00 24 lw r7,(r13+36)
8006a4c: 29 a6 00 20 lw r6,(r13+32)
8006a50: 29 a4 00 1c lw r4,(r13+28)
*pathloc = newloc;
8006a54: 29 ad 00 2c lw r13,(r13+44)
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
8006a58: 2b 82 00 64 lw r2,(sp+100)
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
8006a5c: 59 8d 00 10 sw (r12+16),r13
8006a60: e3 ff ff df bi 80069dc <IMFS_eval_path+0x230>
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
8006a64: 28 23 00 14 lw r3,(r1+20)
8006a68: 28 27 00 10 lw r7,(r1+16)
8006a6c: 28 26 00 0c lw r6,(r1+12)
8006a70: 28 24 00 08 lw r4,(r1+8)
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
8006a74: 2b 82 00 64 lw r2,(sp+100)
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
8006a78: 28 21 00 18 lw r1,(r1+24)
8006a7c: e3 ff ff d7 bi 80069d8 <IMFS_eval_path+0x22c>
08006b80 <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 */
)
{
8006b80: 37 9c ff 98 addi sp,sp,-104
8006b84: 5b 8b 00 40 sw (sp+64),r11
8006b88: 5b 8c 00 3c sw (sp+60),r12
8006b8c: 5b 8d 00 38 sw (sp+56),r13
8006b90: 5b 8e 00 34 sw (sp+52),r14
8006b94: 5b 8f 00 30 sw (sp+48),r15
8006b98: 5b 90 00 2c sw (sp+44),r16
8006b9c: 5b 91 00 28 sw (sp+40),r17
8006ba0: 5b 92 00 24 sw (sp+36),r18
8006ba4: 5b 93 00 20 sw (sp+32),r19
8006ba8: 5b 94 00 1c sw (sp+28),r20
8006bac: 5b 95 00 18 sw (sp+24),r21
8006bb0: 5b 96 00 14 sw (sp+20),r22
8006bb4: 5b 97 00 10 sw (sp+16),r23
8006bb8: 5b 98 00 0c sw (sp+12),r24
8006bbc: 5b 99 00 08 sw (sp+8),r25
8006bc0: 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 )
8006bc4: 78 10 08 01 mvhi r16,0x801
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
8006bc8: b8 40 68 00 mv r13,r2
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
8006bcc: 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 */
)
{
8006bd0: b8 60 c0 00 mv r24,r3
8006bd4: b8 20 90 00 mv r18,r1
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
8006bd8: f8 00 1e bb calli 800e6c4 <strlen>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
8006bdc: 3a 10 e1 10 ori r16,r16,0xe110
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
8006be0: 34 0f 00 00 mvi r15,0
8006be4: 37 94 00 44 addi r20,sp,68
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
8006be8: 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 ) {
8006bec: 34 15 00 02 mvi r21,2
8006bf0: 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 ) {
8006bf4: 34 17 00 04 mvi r23,4
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
8006bf8: 34 19 ff ff mvi r25,-1
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
8006bfc: b8 20 70 00 mv r14,r1
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
8006c00: b9 c0 10 00 mv r2,r14
8006c04: 37 84 00 68 addi r4,sp,104
8006c08: b6 4f 08 00 add r1,r18,r15
8006c0c: ba 80 18 00 mv r3,r20
8006c10: f8 00 01 81 calli 8007214 <IMFS_get_token>
pathlen -= len;
i += len;
if ( !pathloc->node_access )
8006c14: 29 a4 00 00 lw r4,(r13+0)
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
8006c18: 2b 91 00 68 lw r17,(sp+104)
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
8006c1c: b8 20 60 00 mv r12,r1
pathlen -= len;
8006c20: c9 d1 70 00 sub r14,r14,r17
i += len;
if ( !pathloc->node_access )
8006c24: 44 80 00 55 be r4,r0,8006d78 <IMFS_evaluate_for_make+0x1f8><== NEVER TAKEN
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
8006c28: 5c 20 00 18 bne r1,r0,8006c88 <IMFS_evaluate_for_make+0x108>
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
8006c2c: f8 00 19 d6 calli 800d384 <__errno>
8006c30: 34 02 00 11 mvi r2,17
8006c34: 58 22 00 00 sw (r1+0),r2
8006c38: 34 0b ff ff mvi r11,-1
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
8006c3c: b9 60 08 00 mv r1,r11
8006c40: 2b 9d 00 04 lw ra,(sp+4)
8006c44: 2b 8b 00 40 lw r11,(sp+64)
8006c48: 2b 8c 00 3c lw r12,(sp+60)
8006c4c: 2b 8d 00 38 lw r13,(sp+56)
8006c50: 2b 8e 00 34 lw r14,(sp+52)
8006c54: 2b 8f 00 30 lw r15,(sp+48)
8006c58: 2b 90 00 2c lw r16,(sp+44)
8006c5c: 2b 91 00 28 lw r17,(sp+40)
8006c60: 2b 92 00 24 lw r18,(sp+36)
8006c64: 2b 93 00 20 lw r19,(sp+32)
8006c68: 2b 94 00 1c lw r20,(sp+28)
8006c6c: 2b 95 00 18 lw r21,(sp+24)
8006c70: 2b 96 00 14 lw r22,(sp+20)
8006c74: 2b 97 00 10 lw r23,(sp+16)
8006c78: 2b 98 00 0c lw r24,(sp+12)
8006c7c: 2b 99 00 08 lw r25,(sp+8)
8006c80: 37 9c 00 68 addi sp,sp,104
8006c84: c3 a0 00 00 ret
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
8006c88: 29 61 00 4c lw r1,(r11+76)
8006c8c: 44 33 00 40 be r1,r19,8006d8c <IMFS_evaluate_for_make+0x20c>
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
8006c90: b5 f1 78 00 add r15,r15,r17
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
8006c94: b8 80 58 00 mv r11,r4
switch( type ) {
8006c98: 45 95 00 1a be r12,r21,8006d00 <IMFS_evaluate_for_make+0x180>
8006c9c: 55 95 00 03 bgu r12,r21,8006ca8 <IMFS_evaluate_for_make+0x128>
8006ca0: 5d 80 ff d8 bne r12,r0,8006c00 <IMFS_evaluate_for_make+0x80><== ALWAYS TAKEN
8006ca4: e3 ff ff e2 bi 8006c2c <IMFS_evaluate_for_make+0xac> <== NOT EXECUTED
8006ca8: 45 96 00 07 be r12,r22,8006cc4 <IMFS_evaluate_for_make+0x144>
8006cac: 5d 97 ff d5 bne r12,r23,8006c00 <IMFS_evaluate_for_make+0x80><== NEVER TAKEN
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
8006cb0: f8 00 19 b5 calli 800d384 <__errno>
8006cb4: 34 02 00 5b mvi r2,91
8006cb8: 58 22 00 00 sw (r1+0),r2
8006cbc: 34 0b ff ff mvi r11,-1
8006cc0: e3 ff ff df bi 8006c3c <IMFS_evaluate_for_make+0xbc>
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
8006cc4: 28 81 00 4c lw r1,(r4+76)
8006cc8: 44 36 00 37 be r1,r22,8006da4 <IMFS_evaluate_for_make+0x224>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
8006ccc: 44 37 00 36 be r1,r23,8006da4 <IMFS_evaluate_for_make+0x224>
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
8006cd0: 45 60 00 4c be r11,r0,8006e00 <IMFS_evaluate_for_make+0x280><== NEVER TAKEN
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
8006cd4: 29 61 00 4c lw r1,(r11+76)
8006cd8: 5c 33 00 4a bne r1,r19,8006e00 <IMFS_evaluate_for_make+0x280>
/*
* 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 ) {
8006cdc: 29 6c 00 5c lw r12,(r11+92)
8006ce0: 5d 80 00 4d bne r12,r0,8006e14 <IMFS_evaluate_for_make+0x294>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
8006ce4: b9 60 08 00 mv r1,r11
8006ce8: ba 80 10 00 mv r2,r20
8006cec: f8 00 01 13 calli 8007138 <IMFS_find_match_in_dir>
8006cf0: 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 )
8006cf4: 44 2c 00 0f be r1,r12,8006d30 <IMFS_evaluate_for_make+0x1b0>
done = true;
else
pathloc->node_access = node;
8006cf8: 59 ab 00 00 sw (r13+0),r11
8006cfc: e3 ff ff c1 bi 8006c00 <IMFS_evaluate_for_make+0x80>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
8006d00: 2a 01 00 00 lw r1,(r16+0)
8006d04: 28 21 00 18 lw r1,(r1+24)
8006d08: 44 24 ff be be r1,r4,8006c00 <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){
8006d0c: 29 a1 00 10 lw r1,(r13+16)
8006d10: 28 22 00 1c lw r2,(r1+28)
8006d14: 44 44 00 53 be r2,r4,8006e60 <IMFS_evaluate_for_make+0x2e0>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
8006d18: 28 8b 00 08 lw r11,(r4+8)
8006d1c: 5d 60 ff f7 bne r11,r0,8006cf8 <IMFS_evaluate_for_make+0x178>
rtems_set_errno_and_return_minus_one( ENOENT );
8006d20: f8 00 19 99 calli 800d384 <__errno>
8006d24: 58 2c 00 00 sw (r1+0),r12
8006d28: 34 0b ff ff mvi r11,-1
8006d2c: e3 ff ff c4 bi 8006c3c <IMFS_evaluate_for_make+0xbc>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
8006d30: 2b 81 00 68 lw r1,(sp+104)
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
8006d34: b6 4f 10 00 add r2,r18,r15
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
8006d38: c9 e1 78 00 sub r15,r15,r1
8006d3c: b6 4f 90 00 add r18,r18,r15
8006d40: 5b 12 00 00 sw (r24+0),r18
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
8006d44: 40 41 00 00 lbu r1,(r2+0)
8006d48: 44 2b 00 1e be r1,r11,8006dc0 <IMFS_evaluate_for_make+0x240>
if ( !IMFS_is_separator( path[ i ] ) )
8006d4c: 7c 23 00 5c cmpnei r3,r1,92
8006d50: 7c 21 00 2f cmpnei r1,r1,47
8006d54: a0 23 08 00 and r1,r1,r3
8006d58: 5c 2b 00 08 bne r1,r11,8006d78 <IMFS_evaluate_for_make+0x1f8><== NEVER TAKEN
/*
* 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++) {
8006d5c: 40 41 00 01 lbu r1,(r2+1)
if ( !IMFS_is_separator( path[ i ] ) )
8006d60: 34 42 00 01 addi r2,r2,1
8006d64: 7c 24 00 2f cmpnei r4,r1,47
8006d68: 7c 23 00 5c cmpnei r3,r1,92
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
8006d6c: 44 20 00 15 be r1,r0,8006dc0 <IMFS_evaluate_for_make+0x240>
if ( !IMFS_is_separator( path[ i ] ) )
8006d70: a0 64 18 00 and r3,r3,r4
8006d74: 44 60 ff fa be r3,r0,8006d5c <IMFS_evaluate_for_make+0x1dc>
rtems_set_errno_and_return_minus_one( ENOENT );
8006d78: f8 00 19 83 calli 800d384 <__errno>
8006d7c: 34 02 00 02 mvi r2,2
8006d80: 58 22 00 00 sw (r1+0),r2
8006d84: 34 0b ff ff mvi r11,-1
8006d88: e3 ff ff ad bi 8006c3c <IMFS_evaluate_for_make+0xbc>
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
8006d8c: b9 a0 08 00 mv r1,r13
8006d90: ba 60 10 00 mv r2,r19
8006d94: fb ff fd ff calli 8006590 <IMFS_evaluate_permission>
8006d98: 44 20 00 15 be r1,r0,8006dec <IMFS_evaluate_for_make+0x26c>
8006d9c: 29 a4 00 00 lw r4,(r13+0)
8006da0: e3 ff ff bc bi 8006c90 <IMFS_evaluate_for_make+0x110>
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
8006da4: b9 a0 08 00 mv r1,r13
8006da8: 34 02 00 00 mvi r2,0
8006dac: fb ff ff 35 calli 8006a80 <IMFS_evaluate_link>
8006db0: b8 20 58 00 mv r11,r1
if ( result == -1 )
8006db4: 44 39 ff a2 be r1,r25,8006c3c <IMFS_evaluate_for_make+0xbc><== NEVER TAKEN
8006db8: 29 ab 00 00 lw r11,(r13+0)
8006dbc: e3 ff ff c5 bi 8006cd0 <IMFS_evaluate_for_make+0x150>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
8006dc0: b9 a0 08 00 mv r1,r13
8006dc4: fb ff fd b0 calli 8006484 <IMFS_Set_handlers>
8006dc8: b8 20 58 00 mv r11,r1
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
8006dcc: 29 a1 00 00 lw r1,(r13+0)
8006dd0: 28 22 00 4c lw r2,(r1+76)
8006dd4: 34 01 00 01 mvi r1,1
8006dd8: 5c 41 00 0a bne r2,r1,8006e00 <IMFS_evaluate_for_make+0x280><== NEVER TAKEN
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
8006ddc: b9 a0 08 00 mv r1,r13
8006de0: 34 02 00 03 mvi r2,3
8006de4: fb ff fd eb calli 8006590 <IMFS_evaluate_permission>
8006de8: 5c 20 ff 95 bne r1,r0,8006c3c <IMFS_evaluate_for_make+0xbc>
rtems_set_errno_and_return_minus_one( EACCES );
8006dec: f8 00 19 66 calli 800d384 <__errno>
8006df0: 34 02 00 0d mvi r2,13
8006df4: 58 22 00 00 sw (r1+0),r2
8006df8: 34 0b ff ff mvi r11,-1
8006dfc: e3 ff ff 90 bi 8006c3c <IMFS_evaluate_for_make+0xbc>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
8006e00: f8 00 19 61 calli 800d384 <__errno>
8006e04: 34 02 00 14 mvi r2,20
8006e08: 58 22 00 00 sw (r1+0),r2
8006e0c: 34 0b ff ff mvi r11,-1
8006e10: e3 ff ff 8b bi 8006c3c <IMFS_evaluate_for_make+0xbc>
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
8006e14: 29 82 00 28 lw r2,(r12+40)
8006e18: 29 86 00 24 lw r6,(r12+36)
8006e1c: 29 85 00 20 lw r5,(r12+32)
8006e20: 29 83 00 1c lw r3,(r12+28)
*pathloc = newloc;
8006e24: 29 8c 00 2c lw r12,(r12+44)
8006e28: 59 ac 00 10 sw (r13+16),r12
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
8006e2c: 2b 81 00 68 lw r1,(sp+104)
8006e30: 28 44 00 04 lw r4,(r2+4)
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
8006e34: 59 a3 00 00 sw (r13+0),r3
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
8006e38: c9 e1 08 00 sub r1,r15,r1
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
8006e3c: 59 a2 00 0c sw (r13+12),r2
8006e40: 59 a6 00 08 sw (r13+8),r6
8006e44: 59 a5 00 04 sw (r13+4),r5
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
8006e48: b6 41 08 00 add r1,r18,r1
8006e4c: b9 a0 10 00 mv r2,r13
8006e50: bb 00 18 00 mv r3,r24
8006e54: d8 80 00 00 call r4
8006e58: b8 20 58 00 mv r11,r1
8006e5c: e3 ff ff 78 bi 8006c3c <IMFS_evaluate_for_make+0xbc>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
8006e60: 28 22 00 14 lw r2,(r1+20)
8006e64: 28 26 00 10 lw r6,(r1+16)
8006e68: 28 25 00 0c lw r5,(r1+12)
8006e6c: 28 23 00 08 lw r3,(r1+8)
*pathloc = newloc;
8006e70: 28 21 00 18 lw r1,(r1+24)
8006e74: 59 a1 00 10 sw (r13+16),r1
8006e78: e3 ff ff ed bi 8006e2c <IMFS_evaluate_for_make+0x2ac>
08006618 <IMFS_evaluate_hard_link>:
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
8006618: 37 9c ff f4 addi sp,sp,-12
800661c: 5b 8b 00 08 sw (sp+8),r11
8006620: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *jnode = node->node_access;
8006624: 28 23 00 00 lw r3,(r1+0)
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
8006628: 34 04 00 03 mvi r4,3
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
800662c: b8 20 58 00 mv r11,r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
8006630: 28 65 00 4c lw r5,(r3+76)
8006634: 5c a4 00 14 bne r5,r4,8006684 <IMFS_evaluate_hard_link+0x6c><== NEVER TAKEN
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
8006638: 28 63 00 50 lw r3,(r3+80)
IMFS_Set_handlers( node );
800663c: 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;
8006640: 58 23 00 00 sw (r1+0),r3
IMFS_Set_handlers( node );
8006644: fb ff ff 90 calli 8006484 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
8006648: 2b 82 00 0c lw r2,(sp+12)
800664c: b9 60 08 00 mv r1,r11
8006650: fb ff ff d0 calli 8006590 <IMFS_evaluate_permission>
8006654: 34 02 00 00 mvi r2,0
8006658: 44 22 00 06 be r1,r2,8006670 <IMFS_evaluate_hard_link+0x58><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
800665c: b8 40 08 00 mv r1,r2
8006660: 2b 9d 00 04 lw ra,(sp+4)
8006664: 2b 8b 00 08 lw r11,(sp+8)
8006668: 37 9c 00 0c addi sp,sp,12
800666c: c3 a0 00 00 ret
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
8006670: f8 00 1b 45 calli 800d384 <__errno> <== NOT EXECUTED
8006674: 34 02 00 0d mvi r2,13 <== NOT EXECUTED
8006678: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800667c: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
8006680: e3 ff ff f7 bi 800665c <IMFS_evaluate_hard_link+0x44> <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
rtems_fatal_error_occurred (0xABCD0000);
8006684: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED
8006688: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED
800668c: fb ff f0 bd calli 8002980 <rtems_fatal_error_occurred> <== NOT EXECUTED
08006a80 <IMFS_evaluate_link>:
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
8006a80: 37 9c ff dc addi sp,sp,-36
8006a84: 5b 8b 00 24 sw (sp+36),r11
8006a88: 5b 8c 00 20 sw (sp+32),r12
8006a8c: 5b 8d 00 1c sw (sp+28),r13
8006a90: 5b 8e 00 18 sw (sp+24),r14
8006a94: 5b 8f 00 14 sw (sp+20),r15
8006a98: 5b 90 00 10 sw (sp+16),r16
8006a9c: 5b 91 00 0c sw (sp+12),r17
8006aa0: 5b 92 00 08 sw (sp+8),r18
8006aa4: 5b 9d 00 04 sw (sp+4),ra
8006aa8: 78 0d 08 01 mvhi r13,0x801
8006aac: 39 ad e1 10 ori r13,r13,0xe110
8006ab0: 29 a4 00 00 lw r4,(r13+0)
8006ab4: b8 20 60 00 mv r12,r1
8006ab8: b8 40 90 00 mv r18,r2
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
8006abc: 34 0e 00 05 mvi r14,5
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
8006ac0: 34 0f 00 03 mvi r15,3
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
8006ac4: 34 11 00 04 mvi r17,4
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
8006ac8: 34 10 00 01 mvi r16,1
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
8006acc: 2c 83 00 30 lhu r3,(r4+48)
{
IMFS_jnode_t *jnode;
int result = 0;
do {
jnode = node->node_access;
8006ad0: 29 8b 00 00 lw r11,(r12+0)
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
8006ad4: 34 63 00 01 addi r3,r3,1
8006ad8: 20 63 ff ff andi r3,r3,0xffff
8006adc: 0c 83 00 30 sh (r4+48),r3
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
8006ae0: 51 c3 00 08 bgeu r14,r3,8006b00 <IMFS_evaluate_link+0x80>
rtems_filesystem_link_counts = 0;
8006ae4: 34 01 00 00 mvi r1,0
8006ae8: 0c 81 00 30 sh (r4+48),r1
rtems_set_errno_and_return_minus_one( ELOOP );
8006aec: f8 00 1a 26 calli 800d384 <__errno>
8006af0: 34 02 00 5c mvi r2,92
8006af4: 58 22 00 00 sw (r1+0),r2
8006af8: 34 01 ff ff mvi r1,-1
8006afc: e0 00 00 09 bi 8006b20 <IMFS_evaluate_link+0xa0>
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
8006b00: 29 63 00 4c lw r3,(r11+76)
8006b04: 44 6f 00 12 be r3,r15,8006b4c <IMFS_evaluate_link+0xcc>
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
8006b08: 44 71 00 18 be r3,r17,8006b68 <IMFS_evaluate_link+0xe8>
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
8006b0c: 34 63 ff fd addi r3,r3,-3
8006b10: 52 03 ff ef bgeu r16,r3,8006acc <IMFS_evaluate_link+0x4c>
8006b14: 34 01 00 00 mvi r1,0
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
8006b18: 34 02 00 00 mvi r2,0
8006b1c: 0c 82 00 30 sh (r4+48),r2
return result;
}
8006b20: 2b 9d 00 04 lw ra,(sp+4)
8006b24: 2b 8b 00 24 lw r11,(sp+36)
8006b28: 2b 8c 00 20 lw r12,(sp+32)
8006b2c: 2b 8d 00 1c lw r13,(sp+28)
8006b30: 2b 8e 00 18 lw r14,(sp+24)
8006b34: 2b 8f 00 14 lw r15,(sp+20)
8006b38: 2b 90 00 10 lw r16,(sp+16)
8006b3c: 2b 91 00 0c lw r17,(sp+12)
8006b40: 2b 92 00 08 lw r18,(sp+8)
8006b44: 37 9c 00 24 addi sp,sp,36
8006b48: c3 a0 00 00 ret
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
8006b4c: b9 80 08 00 mv r1,r12
8006b50: ba 40 10 00 mv r2,r18
8006b54: fb ff fe b1 calli 8006618 <IMFS_evaluate_hard_link>
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
8006b58: 5c 20 00 08 bne r1,r0,8006b78 <IMFS_evaluate_link+0xf8> <== NEVER TAKEN
8006b5c: 29 63 00 4c lw r3,(r11+76)
8006b60: 29 a4 00 00 lw r4,(r13+0)
8006b64: e3 ff ff ea bi 8006b0c <IMFS_evaluate_link+0x8c>
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
8006b68: b9 80 08 00 mv r1,r12
8006b6c: ba 40 10 00 mv r2,r18
8006b70: fb ff fe c8 calli 8006690 <IMFS_evaluate_sym_link>
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
8006b74: 44 20 ff fa be r1,r0,8006b5c <IMFS_evaluate_link+0xdc>
8006b78: 29 a4 00 00 lw r4,(r13+0)
8006b7c: e3 ff ff e7 bi 8006b18 <IMFS_evaluate_link+0x98>
08006590 <IMFS_evaluate_permission>:
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
8006590: 37 9c ff f0 addi sp,sp,-16
8006594: 5b 8b 00 10 sw (sp+16),r11
8006598: 5b 8c 00 0c sw (sp+12),r12
800659c: 5b 8d 00 08 sw (sp+8),r13
80065a0: 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;
80065a4: 28 2b 00 00 lw r11,(r1+0)
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
80065a8: b8 40 60 00 mv r12,r2
}
jnode = node->node_access;
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
80065ac: f8 00 05 6b calli 8007b58 <geteuid>
80065b0: b8 20 68 00 mv r13,r1
st_gid = getegid();
80065b4: f8 00 05 64 calli 8007b44 <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
80065b8: 2d 62 00 3c lhu r2,(r11+60)
80065bc: 44 4d 00 0d be r2,r13,80065f0 <IMFS_evaluate_permission+0x60>
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
80065c0: 2d 62 00 3e lhu r2,(r11+62)
80065c4: b9 80 18 00 mv r3,r12
80065c8: 44 41 00 0f be r2,r1,8006604 <IMFS_evaluate_permission+0x74><== ALWAYS TAKEN
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
80065cc: 29 61 00 30 lw r1,(r11+48)
80065d0: a0 61 08 00 and r1,r3,r1
return 1;
return 0;
}
80065d4: e4 61 08 00 cmpe r1,r3,r1
80065d8: 2b 9d 00 04 lw ra,(sp+4)
80065dc: 2b 8b 00 10 lw r11,(sp+16)
80065e0: 2b 8c 00 0c lw r12,(sp+12)
80065e4: 2b 8d 00 08 lw r13,(sp+8)
80065e8: 37 9c 00 10 addi sp,sp,16
80065ec: c3 a0 00 00 ret
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
80065f0: b9 80 08 00 mv r1,r12
80065f4: 34 02 00 06 mvi r2,6
80065f8: fb ff e6 fe calli 80001f0 <__ashlsi3>
80065fc: b8 20 18 00 mv r3,r1
8006600: e3 ff ff f3 bi 80065cc <IMFS_evaluate_permission+0x3c>
else if ( st_gid == jnode->st_gid )
flags_to_test <<= 3;
8006604: b9 80 08 00 mv r1,r12
8006608: 34 02 00 03 mvi r2,3
800660c: fb ff e6 f9 calli 80001f0 <__ashlsi3>
8006610: b8 20 18 00 mv r3,r1
8006614: e3 ff ff ee bi 80065cc <IMFS_evaluate_permission+0x3c>
08006690 <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
8006690: 37 9c ff f0 addi sp,sp,-16
8006694: 5b 8b 00 10 sw (sp+16),r11
8006698: 5b 8c 00 0c sw (sp+12),r12
800669c: 5b 8d 00 08 sw (sp+8),r13
80066a0: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *jnode = node->node_access;
80066a4: 28 24 00 00 lw r4,(r1+0)
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
80066a8: b8 40 60 00 mv r12,r2
80066ac: b8 20 58 00 mv r11,r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
80066b0: 28 82 00 4c lw r2,(r4+76)
80066b4: 34 01 00 04 mvi r1,4
80066b8: 5c 41 00 3a bne r2,r1,80067a0 <IMFS_evaluate_sym_link+0x110><== NEVER TAKEN
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
80066bc: 28 81 00 08 lw r1,(r4+8)
80066c0: 44 20 00 35 be r1,r0,8006794 <IMFS_evaluate_sym_link+0x104><== NEVER TAKEN
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
80066c4: 59 61 00 00 sw (r11+0),r1
rtems_filesystem_get_sym_start_loc(
80066c8: 28 81 00 50 lw r1,(r4+80)
80066cc: 40 25 00 00 lbu r5,(r1+0)
80066d0: 64 a6 00 5c cmpei r6,r5,92
80066d4: 64 a2 00 2f cmpei r2,r5,47
80066d8: b8 c2 30 00 or r6,r6,r2
80066dc: 44 c0 00 26 be r6,r0,8006774 <IMFS_evaluate_sym_link+0xe4>
80066e0: 78 01 08 01 mvhi r1,0x801
80066e4: 38 21 e1 10 ori r1,r1,0xe110
80066e8: 28 25 00 00 lw r5,(r1+0)
80066ec: 34 0d 00 01 mvi r13,1
80066f0: 28 a1 00 18 lw r1,(r5+24)
80066f4: 59 61 00 00 sw (r11+0),r1
80066f8: 28 a1 00 1c lw r1,(r5+28)
80066fc: 59 61 00 04 sw (r11+4),r1
8006700: 28 a1 00 20 lw r1,(r5+32)
8006704: 59 61 00 08 sw (r11+8),r1
8006708: 28 a1 00 24 lw r1,(r5+36)
800670c: 59 61 00 0c sw (r11+12),r1
8006710: 28 a5 00 28 lw r5,(r5+40)
8006714: 59 65 00 10 sw (r11+16),r5
8006718: 28 81 00 50 lw r1,(r4+80)
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
&jnode->info.sym_link.name[i],
strlen( &jnode->info.sym_link.name[i] ),
800671c: b4 2d 68 00 add r13,r1,r13
8006720: b9 a0 08 00 mv r1,r13
8006724: f8 00 1f e8 calli 800e6c4 <strlen>
8006728: b8 20 10 00 mv r2,r1
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
800672c: b9 80 18 00 mv r3,r12
8006730: b9 a0 08 00 mv r1,r13
8006734: b9 60 20 00 mv r4,r11
8006738: f8 00 00 1d calli 80067ac <IMFS_eval_path>
800673c: b8 20 68 00 mv r13,r1
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
8006740: b9 60 08 00 mv r1,r11
8006744: fb ff ff 50 calli 8006484 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
8006748: b9 60 08 00 mv r1,r11
800674c: b9 80 10 00 mv r2,r12
8006750: fb ff ff 90 calli 8006590 <IMFS_evaluate_permission>
8006754: 44 20 00 0b be r1,r0,8006780 <IMFS_evaluate_sym_link+0xf0> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
8006758: b9 a0 08 00 mv r1,r13
800675c: 2b 9d 00 04 lw ra,(sp+4)
8006760: 2b 8b 00 10 lw r11,(sp+16)
8006764: 2b 8c 00 0c lw r12,(sp+12)
8006768: 2b 8d 00 08 lw r13,(sp+8)
800676c: 37 9c 00 10 addi sp,sp,16
8006770: c3 a0 00 00 ret
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
rtems_filesystem_get_sym_start_loc(
8006774: b8 c0 68 00 mv r13,r6
8006778: 5c a6 ff e9 bne r5,r6,800671c <IMFS_evaluate_sym_link+0x8c><== ALWAYS TAKEN
800677c: e3 ff ff d9 bi 80066e0 <IMFS_evaluate_sym_link+0x50> <== NOT EXECUTED
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
8006780: f8 00 1b 01 calli 800d384 <__errno> <== NOT EXECUTED
8006784: 34 02 00 0d mvi r2,13 <== NOT EXECUTED
8006788: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800678c: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED
8006790: e3 ff ff f2 bi 8006758 <IMFS_evaluate_sym_link+0xc8> <== NOT EXECUTED
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
rtems_fatal_error_occurred( 0xBAD00000 );
8006794: 78 01 ba d0 mvhi r1,0xbad0 <== NOT EXECUTED
8006798: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED
800679c: fb ff f0 79 calli 8002980 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
80067a0: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED
80067a4: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED
80067a8: fb ff f0 76 calli 8002980 <rtems_fatal_error_occurred> <== NOT EXECUTED
0800b4e4 <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
800b4e4: 37 9c ff e8 addi sp,sp,-24
800b4e8: 5b 8b 00 10 sw (sp+16),r11
800b4ec: 5b 8c 00 0c sw (sp+12),r12
800b4f0: 5b 8d 00 08 sw (sp+8),r13
800b4f4: 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;
800b4f8: 28 2b 00 00 lw r11,(r1+0)
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
800b4fc: 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();
800b500: fb ff f1 96 calli 8007b58 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
800b504: 2d 63 00 3c lhu r3,(r11+60)
800b508: 7c 2c 00 00 cmpnei r12,r1,0
800b50c: fc 61 08 00 cmpne r1,r3,r1
800b510: a1 81 60 00 and r12,r12,r1
800b514: 5d 80 00 13 bne r12,r0,800b560 <IMFS_fchmod+0x7c> <== NEVER TAKEN
/*
* 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);
800b518: 29 62 00 30 lw r2,(r11+48)
800b51c: 34 01 f0 00 mvi r1,-4096
800b520: 21 ad 0f ff andi r13,r13,0xfff
800b524: a0 41 08 00 and r1,r2,r1
800b528: b9 a1 68 00 or r13,r13,r1
800b52c: 59 6d 00 30 sw (r11+48),r13
IMFS_update_ctime( jnode );
800b530: 37 81 00 14 addi r1,sp,20
800b534: b9 80 10 00 mv r2,r12
800b538: fb ff f1 8d calli 8007b6c <gettimeofday>
800b53c: 2b 81 00 14 lw r1,(sp+20)
800b540: 59 61 00 48 sw (r11+72),r1
800b544: b9 80 08 00 mv r1,r12
return 0;
}
800b548: 2b 9d 00 04 lw ra,(sp+4)
800b54c: 2b 8b 00 10 lw r11,(sp+16)
800b550: 2b 8c 00 0c lw r12,(sp+12)
800b554: 2b 8d 00 08 lw r13,(sp+8)
800b558: 37 9c 00 18 addi sp,sp,24
800b55c: c3 a0 00 00 ret
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
rtems_set_errno_and_return_minus_one( EPERM );
800b560: f8 00 07 89 calli 800d384 <__errno> <== NOT EXECUTED
800b564: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
800b568: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800b56c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
800b570: e3 ff ff f6 bi 800b548 <IMFS_fchmod+0x64> <== NOT EXECUTED
08007060 <IMFS_fifo_close>:
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
8007060: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED
8007064: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED
8007068: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED
800706c: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED
8007070: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
8007074: 28 2d 00 3c lw r13,(r1+60) <== NOT EXECUTED
int err = pipe_release(&JNODE2PIPE(jnode), iop);
8007078: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
800707c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
8007080: 35 a1 00 50 addi r1,r13,80 <== NOT EXECUTED
8007084: f8 00 0f 28 calli 800ad24 <pipe_release> <== NOT EXECUTED
8007088: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if (! err) {
800708c: 44 20 00 0d be r1,r0,80070c0 <IMFS_fifo_close+0x60> <== NOT EXECUTED
/* Free jnode if file is already unlinked and no one opens it */
if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1)
free(jnode);
}
IMFS_FIFO_RETURN(err);
8007090: 4c 20 00 05 bge r1,r0,80070a4 <IMFS_fifo_close+0x44> <== NOT EXECUTED
8007094: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED
8007098: f8 00 18 bb calli 800d384 <__errno> <== NOT EXECUTED
800709c: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
80070a0: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
}
80070a4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80070a8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80070ac: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
80070b0: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
80070b4: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
80070b8: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
80070bc: c3 a0 00 00 ret <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (! err) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
80070c0: 29 83 00 18 lw r3,(r12+24) <== NOT EXECUTED
80070c4: 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)
80070c8: 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;
80070cc: a0 62 10 00 and r2,r3,r2 <== NOT EXECUTED
80070d0: 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)
80070d4: f8 00 02 ef calli 8007c90 <rtems_libio_is_file_open> <== NOT EXECUTED
80070d8: 5c 2b ff f3 bne r1,r11,80070a4 <IMFS_fifo_close+0x44> <== NOT EXECUTED
80070dc: 2d a1 00 34 lhu r1,(r13+52) <== NOT EXECUTED
80070e0: 5c 20 ff f1 bne r1,r0,80070a4 <IMFS_fifo_close+0x44> <== NOT EXECUTED
free(jnode);
80070e4: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
80070e8: f8 00 02 19 calli 800794c <free> <== NOT EXECUTED
80070ec: e3 ff ff ee bi 80070a4 <IMFS_fifo_close+0x44> <== NOT EXECUTED
08006ee8 <IMFS_fifo_ioctl>:
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
8006ee8: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
8006eec: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
8006ef0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
int err;
if (command == FIONBIO) {
8006ef4: 78 05 80 04 mvhi r5,0x8004 <== NOT EXECUTED
8006ef8: 38 a5 66 7e ori r5,r5,0x667e <== NOT EXECUTED
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
8006efc: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
int err;
if (command == FIONBIO) {
8006f00: 44 45 00 0d be r2,r5,8006f34 <IMFS_fifo_ioctl+0x4c> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
return 0;
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
8006f04: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED
8006f08: 28 21 00 50 lw r1,(r1+80) <== NOT EXECUTED
8006f0c: f8 00 0e 60 calli 800a88c <pipe_ioctl> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
8006f10: 4c 20 00 05 bge r1,r0,8006f24 <IMFS_fifo_ioctl+0x3c> <== NOT EXECUTED
8006f14: c8 01 58 00 sub r11,r0,r1 <== NOT EXECUTED
8006f18: f8 00 19 1b calli 800d384 <__errno> <== NOT EXECUTED
8006f1c: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
8006f20: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
}
8006f24: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8006f28: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8006f2c: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
8006f30: c3 a0 00 00 ret <== NOT EXECUTED
)
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
8006f34: 34 0b 00 0e mvi r11,14 <== NOT EXECUTED
8006f38: 44 60 ff f8 be r3,r0,8006f18 <IMFS_fifo_ioctl+0x30> <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
8006f3c: 28 61 00 00 lw r1,(r3+0) <== NOT EXECUTED
8006f40: 44 20 00 09 be r1,r0,8006f64 <IMFS_fifo_ioctl+0x7c> <== NOT EXECUTED
iop->flags |= LIBIO_FLAGS_NO_DELAY;
8006f44: 28 82 00 18 lw r2,(r4+24) <== NOT EXECUTED
8006f48: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8006f4c: 38 42 00 01 ori r2,r2,0x1 <== NOT EXECUTED
8006f50: 58 82 00 18 sw (r4+24),r2 <== NOT EXECUTED
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
8006f54: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8006f58: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8006f5c: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
8006f60: c3 a0 00 00 ret <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
8006f64: 28 83 00 18 lw r3,(r4+24) <== NOT EXECUTED
8006f68: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED
8006f6c: a0 62 10 00 and r2,r3,r2 <== NOT EXECUTED
8006f70: 58 82 00 18 sw (r4+24),r2 <== NOT EXECUTED
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
8006f74: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8006f78: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8006f7c: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
8006f80: c3 a0 00 00 ret <== NOT EXECUTED
08006e7c <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
8006e7c: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
8006e80: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
8006e84: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8006e88: b8 20 28 00 mv r5,r1 <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
8006e8c: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED
8006e90: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
8006e94: b8 80 18 00 mv r3,r4 <== NOT EXECUTED
8006e98: 28 21 00 50 lw r1,(r1+80) <== NOT EXECUTED
8006e9c: b8 a0 20 00 mv r4,r5 <== NOT EXECUTED
8006ea0: f8 00 0e 5a calli 800a808 <pipe_lseek> <== NOT EXECUTED
8006ea4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
8006ea8: 4c 20 00 07 bge r1,r0,8006ec4 <IMFS_fifo_lseek+0x48> <== NOT EXECUTED
8006eac: f8 00 19 36 calli 800d384 <__errno> <== NOT EXECUTED
8006eb0: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED
8006eb4: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED
8006eb8: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
8006ebc: b8 60 58 00 mv r11,r3 <== NOT EXECUTED
8006ec0: e0 00 00 04 bi 8006ed0 <IMFS_fifo_lseek+0x54> <== NOT EXECUTED
8006ec4: 34 02 00 1f mvi r2,31 <== NOT EXECUTED
8006ec8: fb ff e5 1a calli 8000330 <__ashrsi3> <== NOT EXECUTED
8006ecc: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
}
8006ed0: b8 60 08 00 mv r1,r3 <== NOT EXECUTED
8006ed4: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8006ed8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8006edc: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8006ee0: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
8006ee4: c3 a0 00 00 ret <== NOT EXECUTED
080070f0 <IMFS_fifo_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
80070f0: 37 9c ff f8 addi sp,sp,-8
80070f4: 5b 8b 00 08 sw (sp+8),r11
80070f8: 5b 9d 00 04 sw (sp+4),ra
80070fc: b8 20 10 00 mv r2,r1
IMFS_jnode_t *jnode = iop->file_info;
int err = fifo_open(&JNODE2PIPE(jnode), iop);
8007100: 28 21 00 3c lw r1,(r1+60)
8007104: 34 21 00 50 addi r1,r1,80
8007108: f8 00 0f 58 calli 800ae68 <fifo_open>
800710c: b8 20 58 00 mv r11,r1
IMFS_FIFO_RETURN(err);
8007110: 4c 20 00 05 bge r1,r0,8007124 <IMFS_fifo_open+0x34> <== NEVER TAKEN
8007114: c8 0b 58 00 sub r11,r0,r11
8007118: f8 00 18 9b calli 800d384 <__errno>
800711c: 58 2b 00 00 sw (r1+0),r11
8007120: 34 0b ff ff mvi r11,-1
}
8007124: b9 60 08 00 mv r1,r11
8007128: 2b 9d 00 04 lw ra,(sp+4)
800712c: 2b 8b 00 08 lw r11,(sp+8)
8007130: 37 9c 00 08 addi sp,sp,8
8007134: c3 a0 00 00 ret
08006ff4 <IMFS_fifo_read>:
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
8006ff4: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED
8006ff8: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED
8006ffc: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED
8007000: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
8007004: 28 2c 00 3c lw r12,(r1+60) <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
8007008: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
800700c: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED
8007010: f8 00 0e 40 calli 800a910 <pipe_read> <== NOT EXECUTED
8007014: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if (err > 0)
8007018: 4c 01 00 0c bge r0,r1,8007048 <IMFS_fifo_read+0x54> <== NOT EXECUTED
IMFS_update_atime(jnode);
800701c: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED
8007020: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8007024: f8 00 02 d2 calli 8007b6c <gettimeofday> <== NOT EXECUTED
8007028: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED
800702c: 59 81 00 40 sw (r12+64),r1 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
}
8007030: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8007034: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8007038: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
800703c: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8007040: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
8007044: c3 a0 00 00 ret <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0)
IMFS_update_atime(jnode);
IMFS_FIFO_RETURN(err);
8007048: 44 20 ff fa be r1,r0,8007030 <IMFS_fifo_read+0x3c> <== NOT EXECUTED
800704c: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED
8007050: f8 00 18 cd calli 800d384 <__errno> <== NOT EXECUTED
8007054: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
8007058: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
800705c: e3 ff ff f5 bi 8007030 <IMFS_fifo_read+0x3c> <== NOT EXECUTED
08006f84 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
8006f84: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED
8006f88: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED
8006f8c: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED
8006f90: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
8006f94: 28 2c 00 3c lw r12,(r1+60) <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
8006f98: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
8006f9c: 29 81 00 50 lw r1,(r12+80) <== NOT EXECUTED
8006fa0: f8 00 0e d2 calli 800aae8 <pipe_write> <== NOT EXECUTED
8006fa4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if (err > 0) {
8006fa8: 4c 01 00 0d bge r0,r1,8006fdc <IMFS_fifo_write+0x58> <== NOT EXECUTED
IMFS_mtime_ctime_update(jnode);
8006fac: 37 81 00 10 addi r1,sp,16 <== NOT EXECUTED
8006fb0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8006fb4: f8 00 02 ee calli 8007b6c <gettimeofday> <== NOT EXECUTED
8006fb8: 2b 81 00 10 lw r1,(sp+16) <== NOT EXECUTED
8006fbc: 59 81 00 48 sw (r12+72),r1 <== NOT EXECUTED
8006fc0: 59 81 00 44 sw (r12+68),r1 <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
}
8006fc4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8006fc8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8006fcc: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8006fd0: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8006fd4: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
8006fd8: c3 a0 00 00 ret <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
8006fdc: 44 20 ff fa be r1,r0,8006fc4 <IMFS_fifo_write+0x40> <== NOT EXECUTED
8006fe0: c8 0b 58 00 sub r11,r0,r11 <== NOT EXECUTED
8006fe4: f8 00 18 e8 calli 800d384 <__errno> <== NOT EXECUTED
8006fe8: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
8006fec: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
8006ff0: e3 ff ff f5 bi 8006fc4 <IMFS_fifo_write+0x40> <== NOT EXECUTED
08007138 <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
8007138: 37 9c ff f0 addi sp,sp,-16
800713c: 5b 8b 00 10 sw (sp+16),r11
8007140: 5b 8c 00 0c sw (sp+12),r12
8007144: 5b 8d 00 08 sw (sp+8),r13
8007148: 5b 9d 00 04 sw (sp+4),ra
800714c: b8 20 58 00 mv r11,r1
8007150: b8 40 60 00 mv r12,r2
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
8007154: 44 20 00 28 be r1,r0,80071f4 <IMFS_find_match_in_dir+0xbc> <== NEVER TAKEN
if ( !name )
8007158: 44 40 00 13 be r2,r0,80071a4 <IMFS_find_match_in_dir+0x6c> <== NEVER TAKEN
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
800715c: 78 02 08 01 mvhi r2,0x801
8007160: 38 42 ca 7c ori r2,r2,0xca7c
8007164: b9 80 08 00 mv r1,r12
8007168: f8 00 1d 07 calli 800e584 <strcmp>
800716c: 44 20 00 07 be r1,r0,8007188 <IMFS_find_match_in_dir+0x50> <== NEVER TAKEN
return directory;
if ( !strcmp( name, dotdotname ) )
8007170: 78 02 08 01 mvhi r2,0x801
8007174: 38 42 ca 80 ori r2,r2,0xca80
8007178: b9 80 08 00 mv r1,r12
800717c: f8 00 1d 02 calli 800e584 <strcmp>
8007180: 5c 20 00 11 bne r1,r0,80071c4 <IMFS_find_match_in_dir+0x8c><== ALWAYS TAKEN
return directory->Parent;
8007184: 29 6b 00 08 lw r11,(r11+8) <== NOT EXECUTED
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
8007188: b9 60 08 00 mv r1,r11
800718c: 2b 9d 00 04 lw ra,(sp+4)
8007190: 2b 8b 00 10 lw r11,(sp+16)
8007194: 2b 8c 00 0c lw r12,(sp+12)
8007198: 2b 8d 00 08 lw r13,(sp+8)
800719c: 37 9c 00 10 addi sp,sp,16
80071a0: c3 a0 00 00 ret
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
80071a4: 34 0b 00 00 mvi r11,0
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
80071a8: b9 60 08 00 mv r1,r11
80071ac: 2b 9d 00 04 lw ra,(sp+4)
80071b0: 2b 8b 00 10 lw r11,(sp+16)
80071b4: 2b 8c 00 0c lw r12,(sp+12)
80071b8: 2b 8d 00 08 lw r13,(sp+8)
80071bc: 37 9c 00 10 addi sp,sp,16
80071c0: c3 a0 00 00 ret
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
80071c4: 29 6d 00 50 lw r13,(r11+80)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
80071c8: 35 6b 00 54 addi r11,r11,84
80071cc: 5d ab 00 04 bne r13,r11,80071dc <IMFS_find_match_in_dir+0xa4>
80071d0: e3 ff ff f5 bi 80071a4 <IMFS_find_match_in_dir+0x6c>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
80071d4: 29 ad 00 00 lw r13,(r13+0)
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
80071d8: 45 ab ff f3 be r13,r11,80071a4 <IMFS_find_match_in_dir+0x6c>
!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 ) )
80071dc: b9 80 08 00 mv r1,r12
80071e0: 35 a2 00 0c addi r2,r13,12
80071e4: f8 00 1c e8 calli 800e584 <strcmp>
80071e8: 5c 20 ff fb bne r1,r0,80071d4 <IMFS_find_match_in_dir+0x9c>
80071ec: b9 a0 58 00 mv r11,r13
80071f0: e3 ff ff e6 bi 8007188 <IMFS_find_match_in_dir+0x50>
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
80071f4: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
80071f8: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED
80071fc: 78 04 08 01 mvhi r4,0x801 <== NOT EXECUTED
8007200: 38 21 ca 24 ori r1,r1,0xca24 <== NOT EXECUTED
8007204: 38 63 ca 84 ori r3,r3,0xca84 <== NOT EXECUTED
8007208: 38 84 ca 70 ori r4,r4,0xca70 <== NOT EXECUTED
800720c: 34 02 00 2a mvi r2,42 <== NOT EXECUTED
8007210: f8 00 01 65 calli 80077a4 <__assert_func> <== NOT EXECUTED
0800d834 <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
)
{
800d834: 37 9c ff d8 addi sp,sp,-40
800d838: 5b 8b 00 14 sw (sp+20),r11
800d83c: 5b 8c 00 10 sw (sp+16),r12
800d840: 5b 8d 00 0c sw (sp+12),r13
800d844: 5b 8e 00 08 sw (sp+8),r14
800d848: 5b 9d 00 04 sw (sp+4),ra
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
loc = temp_mt_entry->mt_fs_root;
800d84c: 28 22 00 20 lw r2,(r1+32)
/*
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
800d850: 28 2b 00 1c lw r11,(r1+28)
800d854: 37 8d 00 18 addi r13,sp,24
loc = temp_mt_entry->mt_fs_root;
800d858: 5b 82 00 1c sw (sp+28),r2
800d85c: 28 22 00 24 lw r2,(r1+36)
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( jnode->type != IMFS_DIRECTORY ) {
800d860: 34 0c 00 01 mvi r12,1
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
loc = temp_mt_entry->mt_fs_root;
800d864: 5b 82 00 20 sw (sp+32),r2
800d868: 28 22 00 28 lw r2,(r1+40)
800d86c: 5b 82 00 24 sw (sp+36),r2
800d870: 28 22 00 2c lw r2,(r1+44)
800d874: 5b 82 00 28 sw (sp+40),r2
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
800d878: 34 02 00 00 mvi r2,0
800d87c: 58 22 00 1c sw (r1+28),r2
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
loc = temp_mt_entry->mt_fs_root;
800d880: 5b 8b 00 18 sw (sp+24),r11
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
800d884: b9 a0 08 00 mv r1,r13
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
800d888: 5b 8b 00 18 sw (sp+24),r11
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
800d88c: 29 6e 00 08 lw r14,(r11+8)
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
800d890: fb ff fc ba calli 800cb78 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
800d894: 29 61 00 4c lw r1,(r11+76)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
800d898: 35 63 00 54 addi r3,r11,84
800d89c: 5c 2c 00 13 bne r1,r12,800d8e8 <IMFS_fsunmount+0xb4>
800d8a0: 29 61 00 50 lw r1,(r11+80)
800d8a4: 44 23 00 11 be r1,r3,800d8e8 <IMFS_fsunmount+0xb4>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
800d8a8: 45 60 00 08 be r11,r0,800d8c8 <IMFS_fsunmount+0x94>
if ( jnode->type == IMFS_DIRECTORY ) {
800d8ac: 29 61 00 4c lw r1,(r11+76)
800d8b0: 5c 2c ff f5 bne r1,r12,800d884 <IMFS_fsunmount+0x50> <== NEVER TAKEN
800d8b4: 29 61 00 50 lw r1,(r11+80)
800d8b8: 35 62 00 54 addi r2,r11,84
800d8bc: 44 22 ff f2 be r1,r2,800d884 <IMFS_fsunmount+0x50>
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
800d8c0: b8 20 58 00 mv r11,r1
}
}
} while (jnode != NULL);
800d8c4: 5c 20 ff f0 bne r1,r0,800d884 <IMFS_fsunmount+0x50> <== ALWAYS TAKEN
800d8c8: 34 01 00 00 mvi r1,0
return 0;
}
800d8cc: 2b 9d 00 04 lw ra,(sp+4)
800d8d0: 2b 8b 00 14 lw r11,(sp+20)
800d8d4: 2b 8c 00 10 lw r12,(sp+16)
800d8d8: 2b 8d 00 0c lw r13,(sp+12)
800d8dc: 2b 8e 00 08 lw r14,(sp+8)
800d8e0: 37 9c 00 28 addi sp,sp,40
800d8e4: c3 a0 00 00 ret
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
800d8e8: 34 01 00 00 mvi r1,0
800d8ec: b9 a0 10 00 mv r2,r13
800d8f0: fb ff d2 ef calli 80024ac <IMFS_unlink>
if (result != 0)
800d8f4: 5c 20 00 03 bne r1,r0,800d900 <IMFS_fsunmount+0xcc> <== NEVER TAKEN
800d8f8: b9 c0 58 00 mv r11,r14
800d8fc: e3 ff ff eb bi 800d8a8 <IMFS_fsunmount+0x74>
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
800d900: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
800d904: e3 ff ff f2 bi 800d8cc <IMFS_fsunmount+0x98> <== NOT EXECUTED
08007214 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
8007214: 37 9c ff f0 addi sp,sp,-16
8007218: 5b 8b 00 0c sw (sp+12),r11
800721c: 5b 8c 00 08 sw (sp+8),r12
8007220: 5b 9d 00 04 sw (sp+4),ra
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
8007224: 40 25 00 00 lbu r5,(r1+0)
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
8007228: 7c a6 00 5c cmpnei r6,r5,92
800722c: 7c a7 00 2f cmpnei r7,r5,47
8007230: a0 e6 38 00 and r7,r7,r6
8007234: 7c a6 00 00 cmpnei r6,r5,0
8007238: 44 e0 00 38 be r7,r0,8007318 <IMFS_get_token+0x104>
800723c: 68 47 00 00 cmpgi r7,r2,0
8007240: a0 c7 38 00 and r7,r6,r7
8007244: 44 e0 00 35 be r7,r0,8007318 <IMFS_get_token+0x104>
token[i] = c;
8007248: 30 65 00 00 sb (r3+0),r5
if ( i == IMFS_NAME_MAX )
800724c: 34 0c 00 20 mvi r12,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) ) {
token[i] = c;
8007250: 34 05 00 00 mvi r5,0
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
8007254: 34 a5 00 01 addi r5,r5,1
8007258: b4 25 30 00 add r6,r1,r5
800725c: 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) ) {
8007260: e8 45 48 00 cmpg r9,r2,r5
token[i] = c;
8007264: b4 65 58 00 add r11,r3,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) ) {
8007268: 7c ca 00 5c cmpnei r10,r6,92
800726c: 7c c7 00 2f cmpnei r7,r6,47
8007270: 7c c8 00 00 cmpnei r8,r6,0
8007274: a1 47 38 00 and r7,r10,r7
8007278: a1 28 40 00 and r8,r9,r8
800727c: 44 e0 00 0b be r7,r0,80072a8 <IMFS_get_token+0x94>
8007280: 45 00 00 0a be r8,r0,80072a8 <IMFS_get_token+0x94>
token[i] = c;
8007284: 31 66 00 00 sb (r11+0),r6
if ( i == IMFS_NAME_MAX )
8007288: 5c ac ff f3 bne r5,r12,8007254 <IMFS_get_token+0x40>
800728c: 34 02 00 04 mvi r2,4
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
8007290: b8 40 08 00 mv r1,r2
8007294: 2b 9d 00 04 lw ra,(sp+4)
8007298: 2b 8b 00 0c lw r11,(sp+12)
800729c: 2b 8c 00 08 lw r12,(sp+8)
80072a0: 37 9c 00 10 addi sp,sp,16
80072a4: c3 a0 00 00 ret
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
80072a8: b4 65 08 00 add r1,r3,r5
80072ac: 40 22 ff ff lbu r2,(r1+-1)
80072b0: 44 40 00 03 be r2,r0,80072bc <IMFS_get_token+0xa8> <== NEVER TAKEN
token[i] = '\0';
80072b4: 34 02 00 00 mvi r2,0
80072b8: 30 22 00 00 sb (r1+0),r2
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
80072bc: 78 02 08 01 mvhi r2,0x801
80072c0: 38 42 ca a0 ori r2,r2,0xcaa0
80072c4: b8 60 08 00 mv r1,r3
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
80072c8: 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 ) {
if ( strcmp( token, "..") == 0 )
80072cc: 5b 83 00 10 sw (sp+16),r3
80072d0: f8 00 1c ad calli 800e584 <strcmp>
80072d4: 34 02 00 02 mvi r2,2
80072d8: 2b 83 00 10 lw r3,(sp+16)
80072dc: 44 20 ff ed be r1,r0,8007290 <IMFS_get_token+0x7c>
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
80072e0: 78 02 08 01 mvhi r2,0x801
80072e4: b8 60 08 00 mv r1,r3
80072e8: 38 42 ca 9c ori r2,r2,0xca9c
80072ec: f8 00 1c a6 calli 800e584 <strcmp>
80072f0: 7c 21 00 00 cmpnei r1,r1,0
80072f4: c8 01 08 00 sub r1,r0,r1
80072f8: 20 22 00 02 andi r2,r1,0x2
80072fc: 34 42 00 01 addi r2,r2,1
type = IMFS_CURRENT_DIR;
}
return type;
}
8007300: b8 40 08 00 mv r1,r2
8007304: 2b 9d 00 04 lw ra,(sp+4)
8007308: 2b 8b 00 0c lw r11,(sp+12)
800730c: 2b 8c 00 08 lw r12,(sp+8)
8007310: 37 9c 00 10 addi sp,sp,16
8007314: c3 a0 00 00 ret
*/
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
8007318: 7c 42 00 00 cmpnei r2,r2,0
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
token[i] = c;
800731c: 30 65 00 00 sb (r3+0),r5
if ( (token[i] != '\0') && pathlen ) {
8007320: a0 c2 10 00 and r2,r6,r2
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
token[i] = '\0';
8007324: b8 40 08 00 mv r1,r2
*/
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
8007328: 44 40 00 03 be r2,r0,8007334 <IMFS_get_token+0x120>
800732c: 34 02 00 01 mvi r2,1
8007330: b8 40 08 00 mv r1,r2
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
8007334: 58 81 00 00 sw (r4+0),r1
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
8007338: b8 40 08 00 mv r1,r2
800733c: 2b 9d 00 04 lw ra,(sp+4)
8007340: 2b 8b 00 0c lw r11,(sp+12)
8007344: 2b 8c 00 08 lw r12,(sp+8)
8007348: 37 9c 00 10 addi sp,sp,16
800734c: c3 a0 00 00 ret
08007350 <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
)
{
8007350: 37 9c ff ec addi sp,sp,-20
8007354: 5b 8b 00 14 sw (sp+20),r11
8007358: 5b 8c 00 10 sw (sp+16),r12
800735c: 5b 8d 00 0c sw (sp+12),r13
8007360: 5b 8e 00 08 sw (sp+8),r14
8007364: 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,
8007368: 78 05 08 01 mvhi r5,0x801
800736c: 38 a5 e0 14 ori r5,r5,0xe014
8007370: 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
)
{
8007374: b8 20 58 00 mv r11,r1
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
8007378: 34 01 00 10 mvi r1,16
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
800737c: b8 40 68 00 mv r13,r2
8007380: b8 60 70 00 mv r14,r3
8007384: b8 80 60 00 mv r12,r4
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
8007388: 44 c1 00 09 be r6,r1,80073ac <IMFS_initialize_support+0x5c><== NEVER TAKEN
800738c: 34 05 00 00 mvi r5,0
8007390: 34 01 00 20 mvi r1,32
8007394: 34 07 00 05 mvi r7,5
8007398: 34 a5 00 01 addi r5,r5,1
800739c: 44 c1 00 04 be r6,r1,80073ac <IMFS_initialize_support+0x5c>
80073a0: b4 21 08 00 add r1,r1,r1
80073a4: 5c a7 ff fd bne r5,r7,8007398 <IMFS_initialize_support+0x48><== ALWAYS TAKEN
80073a8: 34 06 00 80 mvi r6,128 <== NOT EXECUTED
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
80073ac: 78 01 08 01 mvhi r1,0x801
80073b0: 38 21 e6 a0 ori r1,r1,0xe6a0
80073b4: 58 26 00 00 sw (r1+0),r6
/*
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
80073b8: f8 00 0f e0 calli 800b338 <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;
80073bc: 78 05 08 01 mvhi r5,0x801
80073c0: 38 a5 ce 78 ori r5,r5,0xce78
80073c4: 28 a2 00 2c lw r2,(r5+44)
/*
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
80073c8: 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;
80073cc: 59 6d 00 28 sw (r11+40),r13
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
80073d0: 59 62 00 64 sw (r11+100),r2
80073d4: 28 a2 00 00 lw r2,(r5+0)
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
80073d8: 59 6c 00 24 sw (r11+36),r12
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
80073dc: 34 01 00 01 mvi r1,1
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
80073e0: 59 62 00 38 sw (r11+56),r2
80073e4: 28 a2 00 04 lw r2,(r5+4)
80073e8: 59 62 00 3c sw (r11+60),r2
80073ec: 28 a2 00 08 lw r2,(r5+8)
80073f0: 59 62 00 40 sw (r11+64),r2
80073f4: 28 a2 00 0c lw r2,(r5+12)
80073f8: 59 62 00 44 sw (r11+68),r2
80073fc: 28 a2 00 10 lw r2,(r5+16)
8007400: 59 62 00 48 sw (r11+72),r2
8007404: 28 a2 00 14 lw r2,(r5+20)
8007408: 59 62 00 4c sw (r11+76),r2
800740c: 28 a2 00 18 lw r2,(r5+24)
8007410: 59 62 00 50 sw (r11+80),r2
8007414: 28 a2 00 1c lw r2,(r5+28)
8007418: 59 62 00 54 sw (r11+84),r2
800741c: 28 a2 00 20 lw r2,(r5+32)
8007420: 59 62 00 58 sw (r11+88),r2
8007424: 28 a2 00 24 lw r2,(r5+36)
8007428: 28 a5 00 28 lw r5,(r5+40)
800742c: 59 62 00 5c sw (r11+92),r2
8007430: 59 65 00 60 sw (r11+96),r5
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
8007434: 34 02 00 10 mvi r2,16
8007438: f8 00 00 ee calli 80077f0 <calloc>
if ( !fs_info ) {
800743c: 44 20 00 17 be r1,r0,8007498 <IMFS_initialize_support+0x148><== NEVER TAKEN
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
8007440: 78 02 08 01 mvhi r2,0x801
8007444: 38 42 e6 a4 ori r2,r2,0xe6a4
8007448: 28 43 00 00 lw r3,(r2+0)
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
800744c: 29 65 00 1c lw r5,(r11+28)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
8007450: 34 04 00 01 mvi r4,1
8007454: 58 24 00 04 sw (r1+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;
8007458: 58 a4 00 38 sw (r5+56),r4
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
800745c: b4 64 20 00 add r4,r3,r4
8007460: 58 44 00 00 sw (r2+0),r4
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
temp_mt_entry->fs_info = fs_info;
8007464: 59 61 00 34 sw (r11+52),r1
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
8007468: 58 2c 00 0c sw (r1+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;
800746c: 58 2e 00 08 sw (r1+8),r14
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
8007470: 58 23 00 00 sw (r1+0),r3
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
/* Initialize POSIX FIFO/pipe module */
rtems_pipe_initialize();
8007474: f8 00 0c e7 calli 800a810 <rtems_pipe_initialize>
8007478: 34 01 00 00 mvi r1,0
return 0;
}
800747c: 2b 9d 00 04 lw ra,(sp+4)
8007480: 2b 8b 00 14 lw r11,(sp+20)
8007484: 2b 8c 00 10 lw r12,(sp+16)
8007488: 2b 8d 00 0c lw r13,(sp+12)
800748c: 2b 8e 00 08 lw r14,(sp+8)
8007490: 37 9c 00 14 addi sp,sp,20
8007494: c3 a0 00 00 ret
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
8007498: 29 61 00 1c lw r1,(r11+28) <== NOT EXECUTED
800749c: f8 00 01 2c calli 800794c <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
80074a0: f8 00 17 b9 calli 800d384 <__errno> <== NOT EXECUTED
80074a4: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
80074a8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80074ac: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
80074b0: e3 ff ff f3 bi 800747c <IMFS_initialize_support+0x12c> <== NOT EXECUTED
080020dc <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 */
)
{
80020dc: 37 9c ff a8 addi sp,sp,-88
80020e0: 5b 8b 00 10 sw (sp+16),r11
80020e4: 5b 8c 00 0c sw (sp+12),r12
80020e8: 5b 8d 00 08 sw (sp+8),r13
80020ec: 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;
80020f0: 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 */
)
{
80020f4: b8 60 58 00 mv r11,r3
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
80020f8: 34 03 00 07 mvi r3,7
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
80020fc: 5b 84 00 38 sw (sp+56),r4
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
8002100: 2c 84 00 34 lhu r4,(r4+52)
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
8002104: 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 )
8002108: 50 64 00 06 bgeu r3,r4,8002120 <IMFS_link+0x44>
rtems_set_errno_and_return_minus_one( EMLINK );
800210c: f8 00 47 87 calli 8013f28 <__errno>
8002110: 34 02 00 1f mvi r2,31
8002114: 58 22 00 00 sw (r1+0),r2
8002118: 34 01 ff ff mvi r1,-1
800211c: e0 00 00 1b bi 8002188 <IMFS_link+0xac>
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, strlen( token ), new_name, &i );
8002120: b9 60 08 00 mv r1,r11
8002124: f8 00 4c 32 calli 80151ec <strlen>
8002128: 37 8c 00 14 addi r12,sp,20
800212c: b8 20 10 00 mv r2,r1
8002130: b9 80 18 00 mv r3,r12
8002134: 37 84 00 58 addi r4,sp,88
8002138: b9 60 08 00 mv r1,r11
800213c: f8 00 2e 2a calli 800d9e4 <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(
8002140: b9 a0 08 00 mv r1,r13
8002144: b9 80 18 00 mv r3,r12
8002148: 34 02 00 03 mvi r2,3
800214c: 38 04 a1 ff mvu r4,0xa1ff
8002150: 37 85 00 38 addi r5,sp,56
8002154: f8 00 2a 2f calli 800ca10 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
8002158: 44 20 00 12 be r1,r0,80021a0 <IMFS_link+0xc4> <== NEVER TAKEN
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++;
800215c: 2b 83 00 38 lw r3,(sp+56)
IMFS_update_ctime( info.hard_link.link_node );
8002160: 34 02 00 00 mvi r2,0
8002164: 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++;
8002168: 2c 64 00 34 lhu r4,(r3+52)
800216c: 34 84 00 01 addi r4,r4,1
8002170: 0c 64 00 34 sh (r3+52),r4
IMFS_update_ctime( info.hard_link.link_node );
8002174: f8 00 02 e2 calli 8002cfc <gettimeofday>
8002178: 2b 82 00 38 lw r2,(sp+56)
800217c: 2b 83 00 50 lw r3,(sp+80)
8002180: 34 01 00 00 mvi r1,0
8002184: 58 43 00 48 sw (r2+72),r3
return 0;
}
8002188: 2b 9d 00 04 lw ra,(sp+4)
800218c: 2b 8b 00 10 lw r11,(sp+16)
8002190: 2b 8c 00 0c lw r12,(sp+12)
8002194: 2b 8d 00 08 lw r13,(sp+8)
8002198: 37 9c 00 58 addi sp,sp,88
800219c: c3 a0 00 00 ret
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
80021a0: f8 00 47 62 calli 8013f28 <__errno> <== NOT EXECUTED
80021a4: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
80021a8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80021ac: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
80021b0: e3 ff ff f6 bi 8002188 <IMFS_link+0xac> <== NOT EXECUTED
08011928 <IMFS_memfile_addblock>:
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
8011928: 37 9c ff f4 addi sp,sp,-12
801192c: 5b 8b 00 0c sw (sp+12),r11
8011930: 5b 8c 00 08 sw (sp+8),r12
8011934: 5b 9d 00 04 sw (sp+4),ra
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
8011938: 44 20 00 16 be r1,r0,8011990 <IMFS_memfile_addblock+0x68> <== NEVER TAKEN
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
801193c: 28 24 00 4c lw r4,(r1+76)
8011940: 34 03 00 05 mvi r3,5
8011944: 5c 83 00 1b bne r4,r3,80119b0 <IMFS_memfile_addblock+0x88> <== NEVER TAKEN
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 );
8011948: 34 03 00 01 mvi r3,1
801194c: fb ff fe 3f calli 8011248 <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
8011950: 28 2b 00 00 lw r11,(r1+0)
assert( the_jnode->type == IMFS_MEMORY_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
8011954: b8 20 60 00 mv r12,r1
if ( *block_entry_ptr )
8011958: 34 01 00 00 mvi r1,0
801195c: 45 61 00 06 be r11,r1,8011974 <IMFS_memfile_addblock+0x4c>
if ( !memory )
return 1;
*block_entry_ptr = memory;
return 0;
}
8011960: 2b 9d 00 04 lw ra,(sp+4)
8011964: 2b 8b 00 0c lw r11,(sp+12)
8011968: 2b 8c 00 08 lw r12,(sp+8)
801196c: 37 9c 00 0c addi sp,sp,12
8011970: c3 a0 00 00 ret
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
8011974: fb ff fe 25 calli 8011208 <memfile_alloc_block>
8011978: b8 20 10 00 mv r2,r1
if ( !memory )
801197c: 34 01 00 01 mvi r1,1
8011980: 44 4b ff f8 be r2,r11,8011960 <IMFS_memfile_addblock+0x38> <== NEVER TAKEN
return 1;
*block_entry_ptr = memory;
8011984: 59 82 00 00 sw (r12+0),r2
8011988: b9 60 08 00 mv r1,r11
return 0;
801198c: e3 ff ff f5 bi 8011960 <IMFS_memfile_addblock+0x38>
)
{
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
8011990: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8011994: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8011998: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
801199c: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
80119a0: 38 63 49 44 ori r3,r3,0x4944 <== NOT EXECUTED
80119a4: 38 84 48 08 ori r4,r4,0x4808 <== NOT EXECUTED
80119a8: 34 02 01 69 mvi r2,361 <== NOT EXECUTED
80119ac: fb ff f0 d4 calli 800dcfc <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
80119b0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80119b4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80119b8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
80119bc: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
80119c0: 38 63 49 44 ori r3,r3,0x4944 <== NOT EXECUTED
80119c4: 38 84 48 14 ori r4,r4,0x4814 <== NOT EXECUTED
80119c8: 34 02 01 6d mvi r2,365 <== NOT EXECUTED
80119cc: fb ff f0 cc calli 800dcfc <__assert_func> <== NOT EXECUTED
080119d0 <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
80119d0: 37 9c ff e0 addi sp,sp,-32
80119d4: 5b 8b 00 20 sw (sp+32),r11
80119d8: 5b 8c 00 1c sw (sp+28),r12
80119dc: 5b 8d 00 18 sw (sp+24),r13
80119e0: 5b 8e 00 14 sw (sp+20),r14
80119e4: 5b 8f 00 10 sw (sp+16),r15
80119e8: 5b 90 00 0c sw (sp+12),r16
80119ec: 5b 91 00 08 sw (sp+8),r17
80119f0: 5b 9d 00 04 sw (sp+4),ra
80119f4: b8 20 60 00 mv r12,r1
80119f8: b8 40 78 00 mv r15,r2
/*
* Perform internal consistency checks
*/
assert( the_jnode );
80119fc: 44 20 00 59 be r1,r0,8011b60 <IMFS_memfile_extend+0x190> <== NEVER TAKEN
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
8011a00: 28 22 00 4c lw r2,(r1+76)
8011a04: 34 01 00 05 mvi r1,5
8011a08: 5c 41 00 4e bne r2,r1,8011b40 <IMFS_memfile_extend+0x170> <== NEVER TAKEN
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
8011a0c: 78 01 08 02 mvhi r1,0x802
8011a10: 38 21 66 d8 ori r1,r1,0x66d8
8011a14: 28 2b 00 00 lw r11,(r1+0)
8011a18: 34 02 00 02 mvi r2,2
8011a1c: b9 60 08 00 mv r1,r11
8011a20: fb ff bc 99 calli 8000c84 <__lshrsi3>
8011a24: b8 20 10 00 mv r2,r1
8011a28: b8 20 68 00 mv r13,r1
8011a2c: 34 21 00 01 addi r1,r1,1
8011a30: f8 00 45 06 calli 8022e48 <__mulsi3>
8011a34: b9 a0 10 00 mv r2,r13
8011a38: 34 21 00 01 addi r1,r1,1
8011a3c: f8 00 45 03 calli 8022e48 <__mulsi3>
8011a40: 34 21 ff ff addi r1,r1,-1
8011a44: b9 60 10 00 mv r2,r11
8011a48: f8 00 45 00 calli 8022e48 <__mulsi3>
8011a4c: 54 2f 00 06 bgu r1,r15,8011a64 <IMFS_memfile_extend+0x94> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
8011a50: f8 00 09 36 calli 8013f28 <__errno> <== NOT EXECUTED
8011a54: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8011a58: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8011a5c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8011a60: e0 00 00 2e bi 8011b18 <IMFS_memfile_extend+0x148> <== NOT EXECUTED
if ( new_length <= the_jnode->info.file.size )
8011a64: b9 e0 08 00 mv r1,r15
8011a68: 34 02 00 1f mvi r2,31
8011a6c: fb ff bc ae calli 8000d24 <__ashrsi3>
8011a70: 29 8d 00 50 lw r13,(r12+80)
8011a74: b8 20 80 00 mv r16,r1
8011a78: 29 91 00 54 lw r17,(r12+84)
8011a7c: 48 2d 00 05 bg r1,r13,8011a90 <IMFS_memfile_extend+0xc0> <== NEVER TAKEN
8011a80: 5c 2d 00 02 bne r1,r13,8011a88 <IMFS_memfile_extend+0xb8> <== NEVER TAKEN
8011a84: 55 f1 00 03 bgu r15,r17,8011a90 <IMFS_memfile_extend+0xc0>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
8011a88: 34 01 00 00 mvi r1,0
return 0;
8011a8c: e0 00 00 23 bi 8011b18 <IMFS_memfile_extend+0x148>
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
8011a90: b9 60 10 00 mv r2,r11
8011a94: b9 e0 08 00 mv r1,r15
8011a98: f8 00 45 0c calli 8022ec8 <__divsi3>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
8011a9c: 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;
8011aa0: b8 20 70 00 mv r14,r1
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
8011aa4: b9 60 08 00 mv r1,r11
8011aa8: fb ff bc 9f calli 8000d24 <__ashrsi3>
8011aac: b8 20 18 00 mv r3,r1
8011ab0: ba 20 10 00 mv r2,r17
8011ab4: b9 a0 08 00 mv r1,r13
8011ab8: b9 60 20 00 mv r4,r11
8011abc: f8 00 2f a5 calli 801d950 <__divdi3>
8011ac0: b8 40 68 00 mv r13,r2
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
8011ac4: 54 4e 00 08 bgu r2,r14,8011ae4 <IMFS_memfile_extend+0x114> <== NEVER TAKEN
8011ac8: b8 40 58 00 mv r11,r2
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
8011acc: b9 80 08 00 mv r1,r12
8011ad0: b9 60 10 00 mv r2,r11
8011ad4: fb ff ff 95 calli 8011928 <IMFS_memfile_addblock>
8011ad8: 5c 20 00 0b bne r1,r0,8011b04 <IMFS_memfile_extend+0x134> <== NEVER TAKEN
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
8011adc: 35 6b 00 01 addi r11,r11,1
8011ae0: 51 cb ff fb bgeu r14,r11,8011acc <IMFS_memfile_extend+0xfc>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
8011ae4: 59 8f 00 54 sw (r12+84),r15
8011ae8: 59 90 00 50 sw (r12+80),r16
8011aec: 34 01 00 00 mvi r1,0
8011af0: e0 00 00 0a bi 8011b18 <IMFS_memfile_extend+0x148>
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
8011af4: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8011af8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
8011afc: 35 6b ff ff addi r11,r11,-1 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
8011b00: fb ff fe a9 calli 80115a4 <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-- ) {
8011b04: 51 6d ff fc bgeu r11,r13,8011af4 <IMFS_memfile_extend+0x124><== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
8011b08: f8 00 09 08 calli 8013f28 <__errno> <== NOT EXECUTED
8011b0c: 34 02 00 1c mvi r2,28 <== NOT EXECUTED
8011b10: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8011b14: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
8011b18: 2b 9d 00 04 lw ra,(sp+4)
8011b1c: 2b 8b 00 20 lw r11,(sp+32)
8011b20: 2b 8c 00 1c lw r12,(sp+28)
8011b24: 2b 8d 00 18 lw r13,(sp+24)
8011b28: 2b 8e 00 14 lw r14,(sp+20)
8011b2c: 2b 8f 00 10 lw r15,(sp+16)
8011b30: 2b 90 00 0c lw r16,(sp+12)
8011b34: 2b 91 00 08 lw r17,(sp+8)
8011b38: 37 9c 00 20 addi sp,sp,32
8011b3c: c3 a0 00 00 ret
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
8011b40: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8011b44: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8011b48: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8011b4c: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
8011b50: 38 63 49 5c ori r3,r3,0x495c <== NOT EXECUTED
8011b54: 38 84 48 14 ori r4,r4,0x4814 <== NOT EXECUTED
8011b58: 34 02 01 35 mvi r2,309 <== NOT EXECUTED
8011b5c: fb ff f0 68 calli 800dcfc <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
8011b60: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8011b64: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8011b68: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8011b6c: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
8011b70: 38 63 49 5c ori r3,r3,0x495c <== NOT EXECUTED
8011b74: 38 84 48 08 ori r4,r4,0x4808 <== NOT EXECUTED
8011b78: 34 02 01 31 mvi r2,305 <== NOT EXECUTED
8011b7c: fb ff f0 60 calli 800dcfc <__assert_func> <== NOT EXECUTED
08011248 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
8011248: 37 9c ff e4 addi sp,sp,-28
801124c: 5b 8b 00 1c sw (sp+28),r11
8011250: 5b 8c 00 18 sw (sp+24),r12
8011254: 5b 8d 00 14 sw (sp+20),r13
8011258: 5b 8e 00 10 sw (sp+16),r14
801125c: 5b 8f 00 0c sw (sp+12),r15
8011260: 5b 90 00 08 sw (sp+8),r16
8011264: 5b 9d 00 04 sw (sp+4),ra
8011268: b8 20 58 00 mv r11,r1
801126c: b8 40 60 00 mv r12,r2
8011270: b8 60 70 00 mv r14,r3
/*
* Perform internal consistency checks
*/
assert( the_jnode );
8011274: 44 20 00 88 be r1,r0,8011494 <IMFS_memfile_get_block_pointer+0x24c><== NEVER TAKEN
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
8011278: 28 22 00 4c lw r2,(r1+76)
801127c: 34 01 00 05 mvi r1,5
8011280: 5c 41 00 8d bne r2,r1,80114b4 <IMFS_memfile_get_block_pointer+0x26c><== NEVER TAKEN
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
8011284: 78 01 08 02 mvhi r1,0x802
8011288: 38 21 66 d8 ori r1,r1,0x66d8
801128c: 28 21 00 00 lw r1,(r1+0)
8011290: 34 02 00 02 mvi r2,2
8011294: fb ff be 7c calli 8000c84 <__lshrsi3>
8011298: b8 20 68 00 mv r13,r1
801129c: 34 21 ff ff addi r1,r1,-1
80112a0: 55 81 00 09 bgu r12,r1,80112c4 <IMFS_memfile_get_block_pointer+0x7c><== NEVER TAKEN
#if 0
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
80112a4: 29 6d 00 58 lw r13,(r11+88)
if ( malloc_it ) {
80112a8: 45 c0 00 5d be r14,r0,801141c <IMFS_memfile_get_block_pointer+0x1d4>
if ( !p ) {
80112ac: 45 a0 00 5f be r13,r0,8011428 <IMFS_memfile_get_block_pointer+0x1e0>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
80112b0: b9 80 08 00 mv r1,r12
80112b4: 34 02 00 02 mvi r2,2
80112b8: fb ff be 4b calli 8000be4 <__ashlsi3>
80112bc: b5 a1 08 00 add r1,r13,r1
80112c0: e0 00 00 1d bi 8011334 <IMFS_memfile_get_block_pointer+0xec>
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
80112c4: 35 a1 00 01 addi r1,r13,1 <== NOT EXECUTED
80112c8: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED
80112cc: f8 00 46 df calli 8022e48 <__mulsi3> <== NOT EXECUTED
80112d0: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
80112d4: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
80112d8: 55 81 00 20 bgu r12,r1,8011358 <IMFS_memfile_get_block_pointer+0x110><== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
80112dc: c9 8d 60 00 sub r12,r12,r13 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
80112e0: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED
80112e4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
80112e8: f8 00 47 67 calli 8023084 <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
80112ec: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
80112f0: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
80112f4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
80112f8: f8 00 47 53 calli 8023044 <__udivsi3> <== NOT EXECUTED
80112fc: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
p = info->doubly_indirect;
8011300: 29 6c 00 5c lw r12,(r11+92) <== NOT EXECUTED
if ( malloc_it ) {
8011304: 45 c0 00 3e be r14,r0,80113fc <IMFS_memfile_get_block_pointer+0x1b4><== NOT EXECUTED
if ( !p ) {
8011308: 45 80 00 4d be r12,r0,801143c <IMFS_memfile_get_block_pointer+0x1f4><== NOT EXECUTED
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
801130c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8011310: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8011314: fb ff be 34 calli 8000be4 <__ashlsi3> <== NOT EXECUTED
8011318: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED
801131c: 29 8b 00 00 lw r11,(r12+0) <== NOT EXECUTED
if ( !p1 ) {
8011320: 45 60 00 32 be r11,r0,80113e8 <IMFS_memfile_get_block_pointer+0x1a0><== NOT EXECUTED
p2 = memfile_alloc_block();
if ( !p2 )
return 0;
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
8011324: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
8011328: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
801132c: fb ff be 2e calli 8000be4 <__ashlsi3> <== NOT EXECUTED
8011330: b5 61 08 00 add r1,r11,r1 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
8011334: 2b 9d 00 04 lw ra,(sp+4)
8011338: 2b 8b 00 1c lw r11,(sp+28)
801133c: 2b 8c 00 18 lw r12,(sp+24)
8011340: 2b 8d 00 14 lw r13,(sp+20)
8011344: 2b 8e 00 10 lw r14,(sp+16)
8011348: 2b 8f 00 0c lw r15,(sp+12)
801134c: 2b 90 00 08 lw r16,(sp+8)
8011350: 37 9c 00 1c addi sp,sp,28
8011354: c3 a0 00 00 ret
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
8011358: 35 e1 00 01 addi r1,r15,1 <== NOT EXECUTED
801135c: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED
8011360: f8 00 46 ba calli 8022e48 <__mulsi3> <== NOT EXECUTED
8011364: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
8011368: 55 81 00 2b bgu r12,r1,8011414 <IMFS_memfile_get_block_pointer+0x1cc><== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
801136c: c9 8f 60 00 sub r12,r12,r15 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
8011370: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED
8011374: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8011378: f8 00 47 43 calli 8023084 <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
801137c: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
8011380: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
8011384: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8011388: f8 00 47 2f calli 8023044 <__udivsi3> <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
801138c: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
8011390: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
8011394: f8 00 47 2c calli 8023044 <__udivsi3> <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
8011398: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
801139c: b8 20 80 00 mv r16,r1 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
80113a0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
80113a4: f8 00 47 38 calli 8023084 <__umodsi3> <== NOT EXECUTED
80113a8: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
p = info->triply_indirect;
80113ac: 29 6c 00 60 lw r12,(r11+96) <== NOT EXECUTED
if ( malloc_it ) {
80113b0: 45 c0 00 28 be r14,r0,8011450 <IMFS_memfile_get_block_pointer+0x208><== NOT EXECUTED
if ( !p ) {
80113b4: 45 80 00 48 be r12,r0,80114d4 <IMFS_memfile_get_block_pointer+0x28c><== NOT EXECUTED
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
80113b8: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
80113bc: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
80113c0: fb ff be 09 calli 8000be4 <__ashlsi3> <== NOT EXECUTED
80113c4: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED
80113c8: 29 8b 00 00 lw r11,(r12+0) <== NOT EXECUTED
if ( !p1 ) {
80113cc: 45 60 00 47 be r11,r0,80114e8 <IMFS_memfile_get_block_pointer+0x2a0><== NOT EXECUTED
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
80113d0: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
80113d4: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
80113d8: fb ff be 03 calli 8000be4 <__ashlsi3> <== NOT EXECUTED
80113dc: b5 61 60 00 add r12,r11,r1 <== NOT EXECUTED
80113e0: 29 8b 00 00 lw r11,(r12+0) <== NOT EXECUTED
if ( !p2 ) {
80113e4: 5d 60 ff d0 bne r11,r0,8011324 <IMFS_memfile_get_block_pointer+0xdc><== NOT EXECUTED
p2 = memfile_alloc_block();
80113e8: fb ff ff 88 calli 8011208 <memfile_alloc_block> <== NOT EXECUTED
80113ec: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if ( !p2 )
80113f0: 44 20 00 09 be r1,r0,8011414 <IMFS_memfile_get_block_pointer+0x1cc><== NOT EXECUTED
return 0;
p1[ doubly ] = (block_p) p2;
80113f4: 59 81 00 00 sw (r12+0),r1 <== NOT EXECUTED
80113f8: e3 ff ff cb bi 8011324 <IMFS_memfile_get_block_pointer+0xdc><== NOT EXECUTED
}
return (block_p *)&p1[ singly ];
}
if ( !p )
80113fc: 45 8e 00 06 be r12,r14,8011414 <IMFS_memfile_get_block_pointer+0x1cc><== NOT EXECUTED
return 0;
p = (block_p *)p[ doubly ];
8011400: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8011404: fb ff bd f8 calli 8000be4 <__ashlsi3> <== NOT EXECUTED
8011408: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED
801140c: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED
if ( !p )
8011410: 5d 60 ff c5 bne r11,r0,8011324 <IMFS_memfile_get_block_pointer+0xdc><== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
8011414: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8011418: e3 ff ff c7 bi 8011334 <IMFS_memfile_get_block_pointer+0xec><== NOT EXECUTED
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
801141c: 5d ae ff a5 bne r13,r14,80112b0 <IMFS_memfile_get_block_pointer+0x68><== ALWAYS TAKEN
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
8011420: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8011424: e3 ff ff c4 bi 8011334 <IMFS_memfile_get_block_pointer+0xec><== NOT EXECUTED
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
8011428: fb ff ff 78 calli 8011208 <memfile_alloc_block>
801142c: b8 20 68 00 mv r13,r1
if ( !p )
8011430: 44 20 ff f9 be r1,r0,8011414 <IMFS_memfile_get_block_pointer+0x1cc><== NEVER TAKEN
return 0;
info->indirect = p;
8011434: 59 61 00 58 sw (r11+88),r1
8011438: e3 ff ff 9e bi 80112b0 <IMFS_memfile_get_block_pointer+0x68>
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
801143c: fb ff ff 73 calli 8011208 <memfile_alloc_block> <== NOT EXECUTED
8011440: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
if ( !p )
8011444: 44 20 ff f4 be r1,r0,8011414 <IMFS_memfile_get_block_pointer+0x1cc><== NOT EXECUTED
return 0;
info->doubly_indirect = p;
8011448: 59 61 00 5c sw (r11+92),r1 <== NOT EXECUTED
801144c: e3 ff ff b0 bi 801130c <IMFS_memfile_get_block_pointer+0xc4><== NOT EXECUTED
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
8011450: 45 8e ff f1 be r12,r14,8011414 <IMFS_memfile_get_block_pointer+0x1cc><== 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 ];
8011454: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
8011458: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
801145c: fb ff bd e2 calli 8000be4 <__ashlsi3> <== NOT EXECUTED
8011460: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED
8011464: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED
if ( !p1 )
8011468: 45 60 ff eb be r11,r0,8011414 <IMFS_memfile_get_block_pointer+0x1cc><== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
801146c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8011470: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8011474: fb ff bd dc calli 8000be4 <__ashlsi3> <== NOT EXECUTED
8011478: b5 61 58 00 add r11,r11,r1 <== NOT EXECUTED
801147c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8011480: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
8011484: fb ff bd d8 calli 8000be4 <__ashlsi3> <== NOT EXECUTED
8011488: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED
801148c: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED
8011490: e3 ff ff a9 bi 8011334 <IMFS_memfile_get_block_pointer+0xec><== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
8011494: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8011498: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
801149c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
80114a0: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
80114a4: 38 63 48 ac ori r3,r3,0x48ac <== NOT EXECUTED
80114a8: 38 84 48 08 ori r4,r4,0x4808 <== NOT EXECUTED
80114ac: 34 02 03 88 mvi r2,904 <== NOT EXECUTED
80114b0: fb ff f2 13 calli 800dcfc <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
80114b4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80114b8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80114bc: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
80114c0: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
80114c4: 38 63 48 ac ori r3,r3,0x48ac <== NOT EXECUTED
80114c8: 38 84 48 14 ori r4,r4,0x4814 <== NOT EXECUTED
80114cc: 34 02 03 8c mvi r2,908 <== NOT EXECUTED
80114d0: fb ff f2 0b calli 800dcfc <__assert_func> <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
80114d4: fb ff ff 4d calli 8011208 <memfile_alloc_block> <== NOT EXECUTED
80114d8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
if ( !p )
80114dc: 44 20 ff ce be r1,r0,8011414 <IMFS_memfile_get_block_pointer+0x1cc><== NOT EXECUTED
return 0;
info->triply_indirect = p;
80114e0: 59 61 00 60 sw (r11+96),r1 <== NOT EXECUTED
80114e4: e3 ff ff b5 bi 80113b8 <IMFS_memfile_get_block_pointer+0x170><== NOT EXECUTED
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
80114e8: fb ff ff 48 calli 8011208 <memfile_alloc_block> <== NOT EXECUTED
80114ec: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if ( !p1 )
80114f0: 44 20 ff c9 be r1,r0,8011414 <IMFS_memfile_get_block_pointer+0x1cc><== NOT EXECUTED
return 0;
p[ triply ] = (block_p) p1;
80114f4: 59 81 00 00 sw (r12+0),r1 <== NOT EXECUTED
80114f8: e3 ff ff b6 bi 80113d0 <IMFS_memfile_get_block_pointer+0x188><== NOT EXECUTED
080120a0 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
80120a0: 37 9c ff cc addi sp,sp,-52
80120a4: 5b 8b 00 28 sw (sp+40),r11
80120a8: 5b 8c 00 24 sw (sp+36),r12
80120ac: 5b 8d 00 20 sw (sp+32),r13
80120b0: 5b 8e 00 1c sw (sp+28),r14
80120b4: 5b 8f 00 18 sw (sp+24),r15
80120b8: 5b 90 00 14 sw (sp+20),r16
80120bc: 5b 91 00 10 sw (sp+16),r17
80120c0: 5b 92 00 0c sw (sp+12),r18
80120c4: 5b 93 00 08 sw (sp+8),r19
80120c8: 5b 9d 00 04 sw (sp+4),ra
80120cc: b8 20 80 00 mv r16,r1
80120d0: b8 40 68 00 mv r13,r2
80120d4: b8 60 90 00 mv r18,r3
/*
* Perform internal consistency checks
*/
assert( the_jnode );
80120d8: 44 20 00 a3 be r1,r0,8012364 <IMFS_memfile_read+0x2c4> <== NEVER TAKEN
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
80120dc: 28 21 00 4c lw r1,(r1+76)
80120e0: 34 03 00 01 mvi r3,1
80120e4: 34 22 ff fb addi r2,r1,-5
80120e8: 50 62 00 09 bgeu r3,r2,801210c <IMFS_memfile_read+0x6c> <== ALWAYS TAKEN
80120ec: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80120f0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80120f4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
80120f8: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
80120fc: 38 63 48 e0 ori r3,r3,0x48e0 <== NOT EXECUTED
8012100: 38 84 48 58 ori r4,r4,0x4858 <== NOT EXECUTED
8012104: 34 02 02 51 mvi r2,593 <== NOT EXECUTED
8012108: fb ff ee fd calli 800dcfc <__assert_func> <== NOT EXECUTED
/*
* Error checks on arguments
*/
assert( dest );
801210c: 46 40 00 8e be r18,r0,8012344 <IMFS_memfile_read+0x2a4> <== NEVER TAKEN
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
8012110: 44 80 00 70 be r4,r0,80122d0 <IMFS_memfile_read+0x230> <== NEVER TAKEN
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
8012114: 34 02 00 06 mvi r2,6
8012118: 44 22 00 56 be r1,r2,8012270 <IMFS_memfile_read+0x1d0> <== NEVER TAKEN
* 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 )
801211c: 2a 01 00 50 lw r1,(r16+80)
8012120: 2a 0c 00 54 lw r12,(r16+84)
8012124: b4 8d 10 00 add r2,r4,r13
8012128: 48 01 00 04 bg r0,r1,8012138 <IMFS_memfile_read+0x98> <== NEVER TAKEN
801212c: 44 01 00 66 be r0,r1,80122c4 <IMFS_memfile_read+0x224> <== ALWAYS TAKEN
8012130: b8 80 60 00 mv r12,r4 <== NOT EXECUTED
8012134: e0 00 00 02 bi 801213c <IMFS_memfile_read+0x9c> <== NOT EXECUTED
my_length = the_jnode->info.file.size - start;
8012138: c9 8d 60 00 sub r12,r12,r13
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
801213c: 78 0f 08 02 mvhi r15,0x802
8012140: 39 ef 66 d8 ori r15,r15,0x66d8
8012144: 29 eb 00 00 lw r11,(r15+0)
8012148: b9 a0 08 00 mv r1,r13
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
801214c: ba 40 70 00 mv r14,r18
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
8012150: b9 60 10 00 mv r2,r11
8012154: f8 00 43 90 calli 8022f94 <__modsi3>
8012158: b8 20 98 00 mv r19,r1
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
801215c: b9 60 10 00 mv r2,r11
8012160: b9 a0 08 00 mv r1,r13
8012164: f8 00 43 59 calli 8022ec8 <__divsi3>
8012168: b8 20 68 00 mv r13,r1
if ( start_offset ) {
801216c: ba 60 88 00 mv r17,r19
8012170: 46 60 00 13 be r19,r0,80121bc <IMFS_memfile_read+0x11c>
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 );
8012174: ba 00 08 00 mv r1,r16
8012178: b9 a0 10 00 mv r2,r13
801217c: 34 03 00 00 mvi r3,0
8012180: fb ff fc 32 calli 8011248 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
8012184: 44 20 00 60 be r1,r0,8012304 <IMFS_memfile_read+0x264> <== NEVER TAKEN
*/
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;
8012188: c9 73 58 00 sub r11,r11,r19
801218c: b9 80 88 00 mv r17,r12
8012190: 51 6c 00 02 bgeu r11,r12,8012198 <IMFS_memfile_read+0xf8>
8012194: b9 60 88 00 mv r17,r11
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
8012198: 28 22 00 00 lw r2,(r1+0)
801219c: ba 20 18 00 mv r3,r17
80121a0: ba 40 08 00 mv r1,r18
80121a4: b4 53 10 00 add r2,r2,r19
80121a8: f8 00 0a 06 calli 80149c0 <memcpy>
dest += to_copy;
block++;
my_length -= to_copy;
80121ac: 29 eb 00 00 lw r11,(r15+0)
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
dest += to_copy;
80121b0: b6 51 70 00 add r14,r18,r17
block++;
80121b4: 35 ad 00 01 addi r13,r13,1
my_length -= to_copy;
80121b8: c9 91 60 00 sub r12,r12,r17
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
80121bc: 55 6c 00 10 bgu r11,r12,80121fc <IMFS_memfile_read+0x15c>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
80121c0: ba 00 08 00 mv r1,r16
80121c4: b9 a0 10 00 mv r2,r13
80121c8: 34 03 00 00 mvi r3,0
80121cc: fb ff fc 1f calli 8011248 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
80121d0: 44 20 00 45 be r1,r0,80122e4 <IMFS_memfile_read+0x244> <== NEVER TAKEN
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
80121d4: 28 22 00 00 lw r2,(r1+0)
80121d8: b9 60 18 00 mv r3,r11
80121dc: b9 c0 08 00 mv r1,r14
80121e0: f8 00 09 f8 calli 80149c0 <memcpy>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
80121e4: 29 e1 00 00 lw r1,(r15+0)
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
my_length -= to_copy;
80121e8: c9 8b 60 00 sub r12,r12,r11
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
80121ec: b5 cb 70 00 add r14,r14,r11
block++;
80121f0: 35 ad 00 01 addi r13,r13,1
my_length -= to_copy;
copied += to_copy;
80121f4: b6 2b 88 00 add r17,r17,r11
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
80121f8: 51 81 ff f2 bgeu r12,r1,80121c0 <IMFS_memfile_read+0x120>
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
80121fc: 45 80 00 0b be r12,r0,8012228 <IMFS_memfile_read+0x188>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
8012200: b9 a0 10 00 mv r2,r13
8012204: ba 00 08 00 mv r1,r16
8012208: 34 03 00 00 mvi r3,0
801220c: fb ff fc 0f calli 8011248 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
8012210: 44 20 00 45 be r1,r0,8012324 <IMFS_memfile_read+0x284> <== NEVER TAKEN
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
8012214: 28 22 00 00 lw r2,(r1+0)
8012218: b9 80 18 00 mv r3,r12
801221c: b9 c0 08 00 mv r1,r14
8012220: f8 00 09 e8 calli 80149c0 <memcpy>
copied += my_length;
8012224: b6 2c 88 00 add r17,r17,r12
}
IMFS_update_atime( the_jnode );
8012228: 37 81 00 30 addi r1,sp,48
801222c: 34 02 00 00 mvi r2,0
8012230: fb ff c2 b3 calli 8002cfc <gettimeofday>
8012234: 2b 81 00 30 lw r1,(sp+48)
8012238: 5a 01 00 40 sw (r16+64),r1
return copied;
801223c: ba 20 08 00 mv r1,r17
}
8012240: 2b 9d 00 04 lw ra,(sp+4)
8012244: 2b 8b 00 28 lw r11,(sp+40)
8012248: 2b 8c 00 24 lw r12,(sp+36)
801224c: 2b 8d 00 20 lw r13,(sp+32)
8012250: 2b 8e 00 1c lw r14,(sp+28)
8012254: 2b 8f 00 18 lw r15,(sp+24)
8012258: 2b 90 00 14 lw r16,(sp+20)
801225c: 2b 91 00 10 lw r17,(sp+16)
8012260: 2b 92 00 0c lw r18,(sp+12)
8012264: 2b 93 00 08 lw r19,(sp+8)
8012268: 37 9c 00 34 addi sp,sp,52
801226c: c3 a0 00 00 ret
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
8012270: 2a 0b 00 54 lw r11,(r16+84) <== NOT EXECUTED
8012274: 2a 0c 00 50 lw r12,(r16+80) <== NOT EXECUTED
8012278: 34 02 00 1f mvi r2,31 <== NOT EXECUTED
801227c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8012280: 5b 84 00 2c sw (sp+44),r4 <== NOT EXECUTED
8012284: c9 6d 88 00 sub r17,r11,r13 <== NOT EXECUTED
8012288: fb ff ba a7 calli 8000d24 <__ashrsi3> <== NOT EXECUTED
801228c: f6 2b 10 00 cmpgu r2,r17,r11 <== NOT EXECUTED
8012290: c9 81 08 00 sub r1,r12,r1 <== NOT EXECUTED
8012294: c8 22 08 00 sub r1,r1,r2 <== NOT EXECUTED
8012298: 2b 84 00 2c lw r4,(sp+44) <== NOT EXECUTED
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
801229c: 2a 02 00 58 lw r2,(r16+88) <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start))
80122a0: 48 01 00 04 bg r0,r1,80122b0 <IMFS_memfile_read+0x210> <== NOT EXECUTED
80122a4: 5c 01 00 02 bne r0,r1,80122ac <IMFS_memfile_read+0x20c> <== NOT EXECUTED
80122a8: 54 91 00 02 bgu r4,r17,80122b0 <IMFS_memfile_read+0x210> <== NOT EXECUTED
80122ac: b8 80 88 00 mv r17,r4 <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
80122b0: b4 4d 10 00 add r2,r2,r13 <== NOT EXECUTED
80122b4: ba 40 08 00 mv r1,r18 <== NOT EXECUTED
80122b8: ba 20 18 00 mv r3,r17 <== NOT EXECUTED
80122bc: f8 00 09 c1 calli 80149c0 <memcpy> <== NOT EXECUTED
80122c0: e3 ff ff da bi 8012228 <IMFS_memfile_read+0x188> <== 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 )
80122c4: 54 4c ff 9d bgu r2,r12,8012138 <IMFS_memfile_read+0x98>
80122c8: b8 80 60 00 mv r12,r4
80122cc: e3 ff ff 9c bi 801213c <IMFS_memfile_read+0x9c>
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
80122d0: f8 00 07 16 calli 8013f28 <__errno> <== NOT EXECUTED
80122d4: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
80122d8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80122dc: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
80122e0: e3 ff ff d8 bi 8012240 <IMFS_memfile_read+0x1a0> <== NOT EXECUTED
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
80122e4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80122e8: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80122ec: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
80122f0: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
80122f4: 38 63 48 e0 ori r3,r3,0x48e0 <== NOT EXECUTED
80122f8: 38 84 48 44 ori r4,r4,0x4844 <== NOT EXECUTED
80122fc: 34 02 02 a7 mvi r2,679 <== NOT EXECUTED
8012300: fb ff ee 7f calli 800dcfc <__assert_func> <== NOT EXECUTED
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
8012304: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8012308: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
801230c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8012310: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
8012314: 38 63 48 e0 ori r3,r3,0x48e0 <== NOT EXECUTED
8012318: 38 84 48 44 ori r4,r4,0x4844 <== NOT EXECUTED
801231c: 34 02 02 96 mvi r2,662 <== NOT EXECUTED
8012320: fb ff ee 77 calli 800dcfc <__assert_func> <== NOT EXECUTED
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
8012324: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8012328: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
801232c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8012330: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
8012334: 38 63 48 e0 ori r3,r3,0x48e0 <== NOT EXECUTED
8012338: 38 84 48 44 ori r4,r4,0x4844 <== NOT EXECUTED
801233c: 34 02 02 b9 mvi r2,697 <== NOT EXECUTED
8012340: fb ff ee 6f calli 800dcfc <__assert_func> <== NOT EXECUTED
/*
* Error checks on arguments
*/
assert( dest );
8012344: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8012348: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
801234c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8012350: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
8012354: 38 63 48 e0 ori r3,r3,0x48e0 <== NOT EXECUTED
8012358: 38 84 48 a4 ori r4,r4,0x48a4 <== NOT EXECUTED
801235c: 34 02 02 5a mvi r2,602 <== NOT EXECUTED
8012360: fb ff ee 67 calli 800dcfc <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
8012364: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8012368: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
801236c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8012370: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
8012374: 38 63 48 e0 ori r3,r3,0x48e0 <== NOT EXECUTED
8012378: 38 84 48 08 ori r4,r4,0x4808 <== NOT EXECUTED
801237c: 34 02 02 4c mvi r2,588 <== NOT EXECUTED
8012380: fb ff ee 5f calli 800dcfc <__assert_func> <== NOT EXECUTED
080115fc <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
80115fc: 37 9c ff d8 addi sp,sp,-40
8011600: 5b 8b 00 28 sw (sp+40),r11
8011604: 5b 8c 00 24 sw (sp+36),r12
8011608: 5b 8d 00 20 sw (sp+32),r13
801160c: 5b 8e 00 1c sw (sp+28),r14
8011610: 5b 8f 00 18 sw (sp+24),r15
8011614: 5b 90 00 14 sw (sp+20),r16
8011618: 5b 91 00 10 sw (sp+16),r17
801161c: 5b 92 00 0c sw (sp+12),r18
8011620: 5b 93 00 08 sw (sp+8),r19
8011624: 5b 9d 00 04 sw (sp+4),ra
8011628: b8 20 80 00 mv r16,r1
/*
* Perform internal consistency checks
*/
assert( the_jnode );
801162c: 44 20 00 6c be r1,r0,80117dc <IMFS_memfile_remove+0x1e0> <== NEVER TAKEN
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
8011630: 28 22 00 4c lw r2,(r1+76)
8011634: 34 01 00 05 mvi r1,5
8011638: 5c 41 00 71 bne r2,r1,80117fc <IMFS_memfile_remove+0x200> <== NEVER TAKEN
/*
* 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;
801163c: 78 0d 08 02 mvhi r13,0x802
8011640: 39 ad 66 d8 ori r13,r13,0x66d8
8011644: 29 a1 00 00 lw r1,(r13+0)
8011648: 34 02 00 02 mvi r2,2
801164c: fb ff bd 8e calli 8000c84 <__lshrsi3>
8011650: b8 20 78 00 mv r15,r1
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
8011654: 2a 01 00 58 lw r1,(r16+88)
8011658: 44 20 00 04 be r1,r0,8011668 <IMFS_memfile_remove+0x6c>
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
801165c: 36 01 00 58 addi r1,r16,88
8011660: b9 e0 10 00 mv r2,r15
8011664: fb ff ff a6 calli 80114fc <memfile_free_blocks_in_table>
}
if ( info->doubly_indirect ) {
8011668: 2a 0e 00 5c lw r14,(r16+92)
801166c: 45 c0 00 1a be r14,r0,80116d4 <IMFS_memfile_remove+0xd8> <== ALWAYS TAKEN
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
8011670: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED
8011674: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8011678: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
801167c: fb ff bd 82 calli 8000c84 <__lshrsi3> <== NOT EXECUTED
8011680: b9 80 58 00 mv r11,r12 <== NOT EXECUTED
8011684: 44 2c 00 11 be r1,r12,80116c8 <IMFS_memfile_remove+0xcc> <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
8011688: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
801168c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8011690: fb ff bd 55 calli 8000be4 <__ashlsi3> <== NOT EXECUTED
8011694: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED
8011698: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED
801169c: 44 40 00 03 be r2,r0,80116a8 <IMFS_memfile_remove+0xac> <== NOT EXECUTED
memfile_free_blocks_in_table(
80116a0: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED
80116a4: fb ff ff 96 calli 80114fc <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++ ) {
80116a8: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED
80116ac: 35 6b 00 01 addi r11,r11,1 <== NOT EXECUTED
80116b0: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
80116b4: b9 60 60 00 mv r12,r11 <== NOT EXECUTED
80116b8: fb ff bd 73 calli 8000c84 <__lshrsi3> <== NOT EXECUTED
80116bc: 51 61 00 03 bgeu r11,r1,80116c8 <IMFS_memfile_remove+0xcc> <== NOT EXECUTED
80116c0: 2a 0e 00 5c lw r14,(r16+92) <== NOT EXECUTED
80116c4: e3 ff ff f1 bi 8011688 <IMFS_memfile_remove+0x8c> <== 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 );
80116c8: 36 01 00 5c addi r1,r16,92 <== NOT EXECUTED
80116cc: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED
80116d0: fb ff ff 8b calli 80114fc <memfile_free_blocks_in_table> <== NOT EXECUTED
}
if ( info->triply_indirect ) {
80116d4: 2a 0b 00 60 lw r11,(r16+96)
80116d8: 45 60 00 2c be r11,r0,8011788 <IMFS_memfile_remove+0x18c> <== ALWAYS TAKEN
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
80116dc: 29 ac 00 00 lw r12,(r13+0) <== NOT EXECUTED
80116e0: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
80116e4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
80116e8: fb ff bd 67 calli 8000c84 <__lshrsi3> <== NOT EXECUTED
80116ec: 44 20 00 24 be r1,r0,801177c <IMFS_memfile_remove+0x180> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
80116f0: 29 6e 00 00 lw r14,(r11+0) <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
80116f4: 34 13 00 00 mvi r19,0 <== NOT EXECUTED
80116f8: 34 11 00 04 mvi r17,4 <== NOT EXECUTED
80116fc: ba 60 90 00 mv r18,r19 <== NOT EXECUTED
8011700: 45 d3 00 1f be r14,r19,801177c <IMFS_memfile_remove+0x180> <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
8011704: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8011708: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
801170c: fb ff bd 5e calli 8000c84 <__lshrsi3> <== NOT EXECUTED
8011710: 44 20 00 12 be r1,r0,8011758 <IMFS_memfile_remove+0x15c> <== NOT EXECUTED
8011714: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
8011718: b9 80 58 00 mv r11,r12 <== NOT EXECUTED
if ( p[j] ) {
801171c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8011720: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8011724: fb ff bd 30 calli 8000be4 <__ashlsi3> <== NOT EXECUTED
8011728: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED
801172c: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED
8011730: 44 40 00 03 be r2,r0,801173c <IMFS_memfile_remove+0x140> <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
8011734: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED
8011738: fb ff ff 71 calli 80114fc <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++ ) {
801173c: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED
8011740: 35 6b 00 01 addi r11,r11,1 <== NOT EXECUTED
8011744: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8011748: b9 60 60 00 mv r12,r11 <== NOT EXECUTED
801174c: fb ff bd 4e calli 8000c84 <__lshrsi3> <== NOT EXECUTED
8011750: 54 2b ff f3 bgu r1,r11,801171c <IMFS_memfile_remove+0x120> <== NOT EXECUTED
8011754: 2a 0b 00 60 lw r11,(r16+96) <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
8011758: b5 73 08 00 add r1,r11,r19 <== NOT EXECUTED
801175c: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED
8011760: fb ff ff 67 calli 80114fc <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++ ) {
8011764: 29 ac 00 00 lw r12,(r13+0) <== NOT EXECUTED
8011768: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
801176c: 36 52 00 01 addi r18,r18,1 <== NOT EXECUTED
8011770: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8011774: fb ff bd 44 calli 8000c84 <__lshrsi3> <== NOT EXECUTED
8011778: 54 32 00 11 bgu r1,r18,80117bc <IMFS_memfile_remove+0x1c0> <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
801177c: 36 01 00 60 addi r1,r16,96 <== NOT EXECUTED
8011780: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED
8011784: fb ff ff 5e calli 80114fc <memfile_free_blocks_in_table> <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
8011788: 34 01 00 00 mvi r1,0
801178c: 2b 9d 00 04 lw ra,(sp+4)
8011790: 2b 8b 00 28 lw r11,(sp+40)
8011794: 2b 8c 00 24 lw r12,(sp+36)
8011798: 2b 8d 00 20 lw r13,(sp+32)
801179c: 2b 8e 00 1c lw r14,(sp+28)
80117a0: 2b 8f 00 18 lw r15,(sp+24)
80117a4: 2b 90 00 14 lw r16,(sp+20)
80117a8: 2b 91 00 10 lw r17,(sp+16)
80117ac: 2b 92 00 0c lw r18,(sp+12)
80117b0: 2b 93 00 08 lw r19,(sp+8)
80117b4: 37 9c 00 28 addi sp,sp,40
80117b8: c3 a0 00 00 ret
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
80117bc: 2a 0b 00 60 lw r11,(r16+96) <== NOT EXECUTED
80117c0: 36 22 00 04 addi r2,r17,4 <== NOT EXECUTED
80117c4: b5 71 08 00 add r1,r11,r17 <== NOT EXECUTED
80117c8: 28 2e 00 00 lw r14,(r1+0) <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
80117cc: 45 c0 ff ec be r14,r0,801177c <IMFS_memfile_remove+0x180> <== NOT EXECUTED
80117d0: ba 20 98 00 mv r19,r17 <== NOT EXECUTED
80117d4: b8 40 88 00 mv r17,r2 <== NOT EXECUTED
80117d8: e3 ff ff cb bi 8011704 <IMFS_memfile_remove+0x108> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
80117dc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80117e0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80117e4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
80117e8: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
80117ec: 38 63 48 f4 ori r3,r3,0x48f4 <== NOT EXECUTED
80117f0: 38 84 48 08 ori r4,r4,0x4808 <== NOT EXECUTED
80117f4: 34 02 01 ee mvi r2,494 <== NOT EXECUTED
80117f8: fb ff f1 41 calli 800dcfc <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
80117fc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8011800: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8011804: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8011808: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
801180c: 38 63 48 f4 ori r3,r3,0x48f4 <== NOT EXECUTED
8011810: 38 84 48 14 ori r4,r4,0x4814 <== NOT EXECUTED
8011814: 34 02 01 f2 mvi r2,498 <== NOT EXECUTED
8011818: fb ff f1 39 calli 800dcfc <__assert_func> <== NOT EXECUTED
080115a4 <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
80115a4: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
80115a8: 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 );
80115ac: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
80115b0: fb ff ff 26 calli 8011248 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
assert( block_ptr );
80115b4: 44 20 00 0a be r1,r0,80115dc <IMFS_memfile_remove_block+0x38><== NOT EXECUTED
if ( block_ptr ) {
ptr = *block_ptr;
80115b8: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED
*block_ptr = 0;
80115bc: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
80115c0: 58 23 00 00 sw (r1+0),r3 <== NOT EXECUTED
memfile_free_block( ptr );
80115c4: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
80115c8: fb ff ff 05 calli 80111dc <memfile_free_block> <== NOT EXECUTED
}
return 1;
}
80115cc: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
80115d0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80115d4: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
80115d8: c3 a0 00 00 ret <== NOT EXECUTED
{
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
80115dc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80115e0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80115e4: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
80115e8: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
80115ec: 38 63 49 28 ori r3,r3,0x4928 <== NOT EXECUTED
80115f0: 38 84 48 44 ori r4,r4,0x4844 <== NOT EXECUTED
80115f4: 34 02 01 96 mvi r2,406 <== NOT EXECUTED
80115f8: fb ff f1 c1 calli 800dcfc <__assert_func> <== NOT EXECUTED
08011cd8 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
8011cd8: 37 9c ff cc addi sp,sp,-52
8011cdc: 5b 8b 00 2c sw (sp+44),r11
8011ce0: 5b 8c 00 28 sw (sp+40),r12
8011ce4: 5b 8d 00 24 sw (sp+36),r13
8011ce8: 5b 8e 00 20 sw (sp+32),r14
8011cec: 5b 8f 00 1c sw (sp+28),r15
8011cf0: 5b 90 00 18 sw (sp+24),r16
8011cf4: 5b 91 00 14 sw (sp+20),r17
8011cf8: 5b 92 00 10 sw (sp+16),r18
8011cfc: 5b 93 00 0c sw (sp+12),r19
8011d00: 5b 94 00 08 sw (sp+8),r20
8011d04: 5b 9d 00 04 sw (sp+4),ra
8011d08: b8 20 88 00 mv r17,r1
8011d0c: b8 40 68 00 mv r13,r2
8011d10: b8 60 98 00 mv r19,r3
8011d14: b8 80 90 00 mv r18,r4
/*
* Perform internal consistency checks
*/
assert( the_jnode );
8011d18: 44 20 00 7a be r1,r0,8011f00 <IMFS_memfile_write+0x228> <== NEVER TAKEN
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
8011d1c: 28 22 00 4c lw r2,(r1+76)
8011d20: 34 01 00 05 mvi r1,5
8011d24: 5c 41 00 6f bne r2,r1,8011ee0 <IMFS_memfile_write+0x208> <== NEVER TAKEN
/*
* Error check arguments
*/
assert( source );
8011d28: 44 60 00 8e be r3,r0,8011f60 <IMFS_memfile_write+0x288> <== NEVER TAKEN
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
8011d2c: 44 80 00 60 be r4,r0,8011eac <IMFS_memfile_write+0x1d4> <== NEVER TAKEN
* 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 ) {
8011d30: 2a 21 00 50 lw r1,(r17+80)
/*
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + length;
8011d34: b4 8d 10 00 add r2,r4,r13
if ( last_byte > the_jnode->info.file.size ) {
8011d38: 48 01 00 52 bg r0,r1,8011e80 <IMFS_memfile_write+0x1a8> <== NEVER TAKEN
8011d3c: 44 20 00 59 be r1,r0,8011ea0 <IMFS_memfile_write+0x1c8> <== ALWAYS TAKEN
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
8011d40: 78 10 08 02 mvhi r16,0x802
8011d44: 3a 10 66 d8 ori r16,r16,0x66d8
8011d48: 2a 0b 00 00 lw r11,(r16+0)
8011d4c: b9 a0 08 00 mv r1,r13
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
8011d50: ba 40 60 00 mv r12,r18
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
8011d54: b9 60 10 00 mv r2,r11
8011d58: f8 00 44 8f calli 8022f94 <__modsi3>
8011d5c: b8 20 a0 00 mv r20,r1
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
8011d60: b9 60 10 00 mv r2,r11
8011d64: b9 a0 08 00 mv r1,r13
8011d68: f8 00 44 58 calli 8022ec8 <__divsi3>
8011d6c: b8 20 68 00 mv r13,r1
if ( start_offset ) {
8011d70: ba 60 70 00 mv r14,r19
8011d74: ba 80 78 00 mv r15,r20
8011d78: 5e 80 00 30 bne r20,r0,8011e38 <IMFS_memfile_write+0x160>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
8011d7c: 55 6c 00 10 bgu r11,r12,8011dbc <IMFS_memfile_write+0xe4>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
8011d80: ba 20 08 00 mv r1,r17
8011d84: b9 a0 10 00 mv r2,r13
8011d88: 34 03 00 00 mvi r3,0
8011d8c: fb ff fd 2f calli 8011248 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
8011d90: 44 20 00 4c be r1,r0,8011ec0 <IMFS_memfile_write+0x1e8> <== NEVER TAKEN
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 );
8011d94: 28 21 00 00 lw r1,(r1+0)
8011d98: b9 c0 10 00 mv r2,r14
8011d9c: b9 60 18 00 mv r3,r11
8011da0: f8 00 0b 08 calli 80149c0 <memcpy>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
8011da4: 2a 01 00 00 lw r1,(r16+0)
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
block++;
my_length -= to_copy;
8011da8: c9 8b 60 00 sub r12,r12,r11
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
8011dac: b5 cb 70 00 add r14,r14,r11
block++;
8011db0: 35 ad 00 01 addi r13,r13,1
*
* This routine writes the specified data buffer into the in memory
* file pointed to by the_jnode. The file is extended as needed.
*/
MEMFILE_STATIC ssize_t IMFS_memfile_write(
8011db4: b5 eb 78 00 add r15,r15,r11
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
8011db8: 51 81 ff f2 bgeu r12,r1,8011d80 <IMFS_memfile_write+0xa8>
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
8011dbc: 45 80 00 0b be r12,r0,8011de8 <IMFS_memfile_write+0x110>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
8011dc0: b9 a0 10 00 mv r2,r13
8011dc4: ba 20 08 00 mv r1,r17
8011dc8: 34 03 00 00 mvi r3,0
8011dcc: fb ff fd 1f calli 8011248 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
8011dd0: 44 20 00 5c be r1,r0,8011f40 <IMFS_memfile_write+0x268> <== NEVER TAKEN
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 );
8011dd4: 28 21 00 00 lw r1,(r1+0)
8011dd8: b9 c0 10 00 mv r2,r14
8011ddc: b9 80 18 00 mv r3,r12
8011de0: f8 00 0a f8 calli 80149c0 <memcpy>
my_length = 0;
copied += to_copy;
8011de4: b5 ec 78 00 add r15,r15,r12
}
IMFS_mtime_ctime_update( the_jnode );
8011de8: 37 81 00 30 addi r1,sp,48
8011dec: 34 02 00 00 mvi r2,0
8011df0: fb ff c3 c3 calli 8002cfc <gettimeofday>
8011df4: 2b 81 00 30 lw r1,(sp+48)
8011df8: 5a 21 00 48 sw (r17+72),r1
8011dfc: 5a 21 00 44 sw (r17+68),r1
return copied;
}
8011e00: b9 e0 08 00 mv r1,r15
8011e04: 2b 9d 00 04 lw ra,(sp+4)
8011e08: 2b 8b 00 2c lw r11,(sp+44)
8011e0c: 2b 8c 00 28 lw r12,(sp+40)
8011e10: 2b 8d 00 24 lw r13,(sp+36)
8011e14: 2b 8e 00 20 lw r14,(sp+32)
8011e18: 2b 8f 00 1c lw r15,(sp+28)
8011e1c: 2b 90 00 18 lw r16,(sp+24)
8011e20: 2b 91 00 14 lw r17,(sp+20)
8011e24: 2b 92 00 10 lw r18,(sp+16)
8011e28: 2b 93 00 0c lw r19,(sp+12)
8011e2c: 2b 94 00 08 lw r20,(sp+8)
8011e30: 37 9c 00 34 addi sp,sp,52
8011e34: c3 a0 00 00 ret
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
8011e38: ba 20 08 00 mv r1,r17
8011e3c: b9 a0 10 00 mv r2,r13
8011e40: 34 03 00 00 mvi r3,0
8011e44: fb ff fd 01 calli 8011248 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
8011e48: 44 20 00 36 be r1,r0,8011f20 <IMFS_memfile_write+0x248> <== NEVER TAKEN
*/
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;
8011e4c: c9 74 78 00 sub r15,r11,r20
8011e50: 52 4f 00 02 bgeu r18,r15,8011e58 <IMFS_memfile_write+0x180>
8011e54: ba 40 78 00 mv r15,r18
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
8011e58: 28 21 00 00 lw r1,(r1+0)
8011e5c: ba 60 10 00 mv r2,r19
8011e60: b9 e0 18 00 mv r3,r15
8011e64: b4 34 08 00 add r1,r1,r20
8011e68: f8 00 0a d6 calli 80149c0 <memcpy>
src += to_copy;
8011e6c: b6 6f 70 00 add r14,r19,r15
block++;
my_length -= to_copy;
copied += to_copy;
8011e70: 2a 0b 00 00 lw r11,(r16+0)
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
block++;
8011e74: 35 ad 00 01 addi r13,r13,1
my_length -= to_copy;
8011e78: ca 4f 60 00 sub r12,r18,r15
8011e7c: e3 ff ff c0 bi 8011d7c <IMFS_memfile_write+0xa4>
* in memory file, then extend the length.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size ) {
status = IMFS_memfile_extend( the_jnode, last_byte );
8011e80: ba 20 08 00 mv r1,r17
8011e84: fb ff fe d3 calli 80119d0 <IMFS_memfile_extend>
if ( status )
8011e88: 44 20 ff ae be r1,r0,8011d40 <IMFS_memfile_write+0x68> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
8011e8c: f8 00 08 27 calli 8013f28 <__errno> <== NOT EXECUTED
8011e90: 34 02 00 1c mvi r2,28 <== NOT EXECUTED
8011e94: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8011e98: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED
8011e9c: e3 ff ff d9 bi 8011e00 <IMFS_memfile_write+0x128> <== 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 ) {
8011ea0: 2a 21 00 54 lw r1,(r17+84)
8011ea4: 54 41 ff f7 bgu r2,r1,8011e80 <IMFS_memfile_write+0x1a8> <== ALWAYS TAKEN
8011ea8: e3 ff ff a6 bi 8011d40 <IMFS_memfile_write+0x68> <== NOT EXECUTED
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
8011eac: f8 00 08 1f calli 8013f28 <__errno> <== NOT EXECUTED
8011eb0: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8011eb4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8011eb8: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED
8011ebc: e3 ff ff d1 bi 8011e00 <IMFS_memfile_write+0x128> <== NOT EXECUTED
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
8011ec0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8011ec4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8011ec8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8011ecc: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
8011ed0: 38 63 48 cc ori r3,r3,0x48cc <== NOT EXECUTED
8011ed4: 38 84 48 44 ori r4,r4,0x4844 <== NOT EXECUTED
8011ed8: 34 02 03 30 mvi r2,816 <== NOT EXECUTED
8011edc: fb ff ef 88 calli 800dcfc <__assert_func> <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
8011ee0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8011ee4: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8011ee8: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8011eec: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
8011ef0: 38 63 48 cc ori r3,r3,0x48cc <== NOT EXECUTED
8011ef4: 38 84 48 14 ori r4,r4,0x4814 <== NOT EXECUTED
8011ef8: 34 02 02 e7 mvi r2,743 <== NOT EXECUTED
8011efc: fb ff ef 80 calli 800dcfc <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
8011f00: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8011f04: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8011f08: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8011f0c: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
8011f10: 38 63 48 cc ori r3,r3,0x48cc <== NOT EXECUTED
8011f14: 38 84 48 08 ori r4,r4,0x4808 <== NOT EXECUTED
8011f18: 34 02 02 e3 mvi r2,739 <== NOT EXECUTED
8011f1c: fb ff ef 78 calli 800dcfc <__assert_func> <== NOT EXECUTED
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
8011f20: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8011f24: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8011f28: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8011f2c: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
8011f30: 38 63 48 cc ori r3,r3,0x48cc <== NOT EXECUTED
8011f34: 38 84 48 44 ori r4,r4,0x4844 <== NOT EXECUTED
8011f38: 34 02 03 1c mvi r2,796 <== NOT EXECUTED
8011f3c: fb ff ef 70 calli 800dcfc <__assert_func> <== NOT EXECUTED
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
8011f40: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8011f44: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8011f48: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8011f4c: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
8011f50: 38 63 48 cc ori r3,r3,0x48cc <== NOT EXECUTED
8011f54: 38 84 48 44 ori r4,r4,0x4844 <== NOT EXECUTED
8011f58: 34 02 03 46 mvi r2,838 <== NOT EXECUTED
8011f5c: fb ff ef 68 calli 800dcfc <__assert_func> <== NOT EXECUTED
/*
* Error check arguments
*/
assert( source );
8011f60: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8011f64: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8011f68: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8011f6c: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
8011f70: 38 63 48 cc ori r3,r3,0x48cc <== NOT EXECUTED
8011f74: 38 84 48 50 ori r4,r4,0x4850 <== NOT EXECUTED
8011f78: 34 02 02 ef mvi r2,751 <== NOT EXECUTED
8011f7c: fb ff ef 60 calli 800dcfc <__assert_func> <== NOT EXECUTED
080074b4 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
80074b4: 37 9c ff a4 addi sp,sp,-92
80074b8: 5b 8b 00 1c sw (sp+28),r11
80074bc: 5b 8c 00 18 sw (sp+24),r12
80074c0: 5b 8d 00 14 sw (sp+20),r13
80074c4: 5b 8e 00 10 sw (sp+16),r14
80074c8: 5b 8f 00 0c sw (sp+12),r15
80074cc: 5b 90 00 08 sw (sp+8),r16
80074d0: 5b 9d 00 04 sw (sp+4),ra
80074d4: b8 40 58 00 mv r11,r2
80074d8: b8 60 80 00 mv r16,r3
80074dc: b8 80 78 00 mv r15,r4
80074e0: b8 a0 70 00 mv r14,r5
80074e4: b8 20 68 00 mv r13,r1
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
80074e8: 37 8c 00 20 addi r12,sp,32
80074ec: f8 00 1c 76 calli 800e6c4 <strlen>
80074f0: b8 20 10 00 mv r2,r1
80074f4: b9 80 18 00 mv r3,r12
80074f8: b9 a0 08 00 mv r1,r13
80074fc: 37 84 00 5c addi r4,sp,92
8007500: fb ff ff 45 calli 8007214 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
8007504: 21 66 f0 00 andi r6,r11,0xf000
8007508: 34 02 40 00 mvi r2,16384
800750c: 44 c2 00 25 be r6,r2,80075a0 <IMFS_mknod+0xec>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
8007510: 38 01 80 00 mvu r1,0x8000
8007514: 34 07 00 05 mvi r7,5
8007518: 44 c1 00 08 be r6,r1,8007538 <IMFS_mknod+0x84>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
800751c: 64 c2 20 00 cmpei r2,r6,8192
8007520: 64 c1 60 00 cmpei r1,r6,24576
8007524: b8 41 08 00 or r1,r2,r1
8007528: 44 20 00 16 be r1,r0,8007580 <IMFS_mknod+0xcc>
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
800752c: 5b 90 00 44 sw (sp+68),r16
8007530: 5b 8f 00 48 sw (sp+72),r15
8007534: 34 07 00 02 mvi r7,2
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
8007538: b8 e0 10 00 mv r2,r7
800753c: b9 c0 08 00 mv r1,r14
8007540: b9 80 18 00 mv r3,r12
8007544: b9 60 20 00 mv r4,r11
8007548: 37 85 00 44 addi r5,sp,68
800754c: f8 00 0f 8c calli 800b37c <IMFS_create_node>
new_name,
mode,
&info
);
if ( !new_node )
8007550: 34 02 00 00 mvi r2,0
8007554: 44 22 00 15 be r1,r2,80075a8 <IMFS_mknod+0xf4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
}
8007558: b8 40 08 00 mv r1,r2
800755c: 2b 9d 00 04 lw ra,(sp+4)
8007560: 2b 8b 00 1c lw r11,(sp+28)
8007564: 2b 8c 00 18 lw r12,(sp+24)
8007568: 2b 8d 00 14 lw r13,(sp+20)
800756c: 2b 8e 00 10 lw r14,(sp+16)
8007570: 2b 8f 00 0c lw r15,(sp+12)
8007574: 2b 90 00 08 lw r16,(sp+8)
8007578: 37 9c 00 5c addi sp,sp,92
800757c: c3 a0 00 00 ret
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
8007580: 34 01 10 00 mvi r1,4096
8007584: 34 07 00 07 mvi r7,7
8007588: 44 c1 ff ec be r6,r1,8007538 <IMFS_mknod+0x84> <== ALWAYS TAKEN
type = IMFS_FIFO;
else {
rtems_set_errno_and_return_minus_one( EINVAL );
800758c: f8 00 17 7e calli 800d384 <__errno> <== NOT EXECUTED
8007590: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8007594: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8007598: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
800759c: e3 ff ff ef bi 8007558 <IMFS_mknod+0xa4> <== NOT EXECUTED
80075a0: 34 07 00 01 mvi r7,1
80075a4: e3 ff ff e5 bi 8007538 <IMFS_mknod+0x84>
mode,
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
80075a8: f8 00 17 77 calli 800d384 <__errno> <== NOT EXECUTED
80075ac: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
80075b0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80075b4: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
80075b8: e3 ff ff e8 bi 8007558 <IMFS_mknod+0xa4> <== NOT EXECUTED
080022bc <IMFS_mount>:
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
80022bc: 37 9c ff fc addi sp,sp,-4
80022c0: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
80022c4: 28 22 00 08 lw r2,(r1+8)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
80022c8: 34 03 00 01 mvi r3,1
80022cc: 28 44 00 4c lw r4,(r2+76)
80022d0: 5c 83 00 06 bne r4,r3,80022e8 <IMFS_mount+0x2c> <== NEVER TAKEN
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
80022d4: 58 41 00 5c sw (r2+92),r1
80022d8: 34 01 00 00 mvi r1,0
return 0;
}
80022dc: 2b 9d 00 04 lw ra,(sp+4)
80022e0: 37 9c 00 04 addi sp,sp,4
80022e4: c3 a0 00 00 ret
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
80022e8: f8 00 47 10 calli 8013f28 <__errno> <== NOT EXECUTED
80022ec: 34 02 00 14 mvi r2,20 <== NOT EXECUTED
80022f0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80022f4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
80022f8: e3 ff ff f9 bi 80022dc <IMFS_mount+0x20> <== NOT EXECUTED
08003a84 <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
8003a84: 37 9c ff ec addi sp,sp,-20
8003a88: 5b 8b 00 14 sw (sp+20),r11
8003a8c: 5b 8c 00 10 sw (sp+16),r12
8003a90: 5b 8d 00 0c sw (sp+12),r13
8003a94: 5b 8e 00 08 sw (sp+8),r14
8003a98: 5b 9d 00 04 sw (sp+4),ra
8003a9c: b8 20 60 00 mv r12,r1
assert( the_jnode );
8003aa0: 44 20 00 72 be r1,r0,8003c68 <IMFS_print_jnode+0x1e4> <== NEVER TAKEN
fprintf(stdout, "%s", the_jnode->name );
8003aa4: 78 0b 08 02 mvhi r11,0x802
8003aa8: 39 6b a1 d8 ori r11,r11,0xa1d8
8003aac: 29 62 00 00 lw r2,(r11+0)
8003ab0: 34 21 00 0c addi r1,r1,12
8003ab4: 28 42 00 08 lw r2,(r2+8)
8003ab8: f8 00 42 a5 calli 801454c <fputs>
switch( the_jnode->type ) {
8003abc: 29 8d 00 4c lw r13,(r12+76)
8003ac0: 34 01 00 07 mvi r1,7
8003ac4: 55 a1 00 09 bgu r13,r1,8003ae8 <IMFS_print_jnode+0x64> <== NEVER TAKEN
8003ac8: 78 0e 08 02 mvhi r14,0x802
8003acc: b9 a0 08 00 mv r1,r13
8003ad0: 34 02 00 02 mvi r2,2
8003ad4: fb ff fd bc calli 80031c4 <__ashlsi3>
8003ad8: 39 ce 80 64 ori r14,r14,0x8064
8003adc: b5 c1 08 00 add r1,r14,r1
8003ae0: 28 21 00 00 lw r1,(r1+0)
8003ae4: c0 20 00 00 b r1
fprintf(stdout, " FIFO not printed\n" );
assert(0);
break;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
8003ae8: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
8003aec: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8003af0: 38 42 7f 70 ori r2,r2,0x7f70 <== NOT EXECUTED
8003af4: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED
8003af8: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED
8003afc: f8 00 42 1d calli 8014370 <fprintf> <== NOT EXECUTED
assert(0);
8003b00: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003b04: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8003b08: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8003b0c: 38 21 7e bc ori r1,r1,0x7ebc <== NOT EXECUTED
8003b10: 38 63 80 98 ori r3,r3,0x8098 <== NOT EXECUTED
8003b14: 38 84 7f 58 ori r4,r4,0x7f58 <== NOT EXECUTED
8003b18: 34 02 00 6c mvi r2,108 <== NOT EXECUTED
8003b1c: f8 00 03 22 calli 80047a4 <__assert_func> <== NOT EXECUTED
fprintf(stdout, " links not printed\n" );
assert(0);
break;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
8003b20: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED
8003b24: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003b28: 34 03 00 12 mvi r3,18 <== NOT EXECUTED
8003b2c: 28 44 00 08 lw r4,(r2+8) <== NOT EXECUTED
8003b30: 38 21 7f 5c ori r1,r1,0x7f5c <== NOT EXECUTED
8003b34: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8003b38: f8 00 45 b6 calli 8015210 <fwrite> <== NOT EXECUTED
assert(0);
8003b3c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003b40: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8003b44: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8003b48: 38 21 7e bc ori r1,r1,0x7ebc <== NOT EXECUTED
8003b4c: 38 63 80 98 ori r3,r3,0x8098 <== NOT EXECUTED
8003b50: 38 84 7f 58 ori r4,r4,0x7f58 <== NOT EXECUTED
8003b54: 34 02 00 67 mvi r2,103 <== NOT EXECUTED
8003b58: f8 00 03 13 calli 80047a4 <__assert_func> <== NOT EXECUTED
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
8003b5c: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
8003b60: 29 84 00 58 lw r4,(r12+88) <== NOT EXECUTED
8003b64: 29 83 00 54 lw r3,(r12+84) <== NOT EXECUTED
8003b68: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED
8003b6c: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8003b70: 38 42 7f 28 ori r2,r2,0x7f28 <== NOT EXECUTED
8003b74: f8 00 41 ff calli 8014370 <fprintf> <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
8003b78: 78 01 08 02 mvhi r1,0x802
8003b7c: 38 21 79 28 ori r1,r1,0x7928
8003b80: f8 00 4a 6e calli 8016538 <puts>
}
8003b84: 2b 9d 00 04 lw ra,(sp+4)
8003b88: 2b 8b 00 14 lw r11,(sp+20)
8003b8c: 2b 8c 00 10 lw r12,(sp+16)
8003b90: 2b 8d 00 0c lw r13,(sp+12)
8003b94: 2b 8e 00 08 lw r14,(sp+8)
8003b98: 37 9c 00 14 addi sp,sp,20
8003b9c: c3 a0 00 00 ret
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
8003ba0: 29 61 00 00 lw r1,(r11+0)
8003ba4: 29 83 00 54 lw r3,(r12+84)
8003ba8: 78 02 08 02 mvhi r2,0x802
8003bac: 28 21 00 08 lw r1,(r1+8)
8003bb0: 38 42 7f 38 ori r2,r2,0x7f38
8003bb4: f8 00 41 ef calli 8014370 <fprintf>
(uint32_t)the_jnode->info.file.size );
#endif
break;
8003bb8: e3 ff ff f0 bi 8003b78 <IMFS_print_jnode+0xf4>
fprintf(stdout, " links not printed\n" );
assert(0);
break;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
8003bbc: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED
8003bc0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003bc4: 34 03 00 13 mvi r3,19 <== NOT EXECUTED
8003bc8: 28 44 00 08 lw r4,(r2+8) <== NOT EXECUTED
8003bcc: 38 21 7f 44 ori r1,r1,0x7f44 <== NOT EXECUTED
8003bd0: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8003bd4: f8 00 45 8f calli 8015210 <fwrite> <== NOT EXECUTED
assert(0);
8003bd8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003bdc: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8003be0: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8003be4: 38 21 7e bc ori r1,r1,0x7ebc <== NOT EXECUTED
8003be8: 38 63 80 98 ori r3,r3,0x8098 <== NOT EXECUTED
8003bec: 38 84 7f 58 ori r4,r4,0x7f58 <== NOT EXECUTED
8003bf0: 34 02 00 62 mvi r2,98 <== NOT EXECUTED
8003bf4: f8 00 02 ec calli 80047a4 <__assert_func> <== NOT EXECUTED
(uint32_t)the_jnode->info.file.size );
#endif
break;
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
8003bf8: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED
8003bfc: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003c00: 34 03 00 13 mvi r3,19 <== NOT EXECUTED
8003c04: 28 44 00 08 lw r4,(r2+8) <== NOT EXECUTED
8003c08: 38 21 7f 44 ori r1,r1,0x7f44 <== NOT EXECUTED
8003c0c: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8003c10: f8 00 45 80 calli 8015210 <fwrite> <== NOT EXECUTED
assert(0);
8003c14: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003c18: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8003c1c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8003c20: 38 21 7e bc ori r1,r1,0x7ebc <== NOT EXECUTED
8003c24: 38 63 80 98 ori r3,r3,0x8098 <== NOT EXECUTED
8003c28: 38 84 7f 58 ori r4,r4,0x7f58 <== NOT EXECUTED
8003c2c: 34 02 00 5d mvi r2,93 <== NOT EXECUTED
8003c30: f8 00 02 dd calli 80047a4 <__assert_func> <== NOT EXECUTED
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
8003c34: 29 61 00 00 lw r1,(r11+0)
8003c38: 29 84 00 54 lw r4,(r12+84)
8003c3c: 29 83 00 50 lw r3,(r12+80)
8003c40: 28 21 00 08 lw r1,(r1+8)
8003c44: 78 02 08 02 mvhi r2,0x802
8003c48: 38 42 7f 14 ori r2,r2,0x7f14
8003c4c: f8 00 41 c9 calli 8014370 <fprintf>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
8003c50: e3 ff ff ca bi 8003b78 <IMFS_print_jnode+0xf4>
assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
8003c54: 29 62 00 00 lw r2,(r11+0)
8003c58: 34 01 00 2f mvi r1,47
8003c5c: 28 42 00 08 lw r2,(r2+8)
8003c60: f8 00 41 e5 calli 80143f4 <fputc>
break;
8003c64: e3 ff ff c5 bi 8003b78 <IMFS_print_jnode+0xf4>
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
assert( the_jnode );
8003c68: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8003c6c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8003c70: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8003c74: 38 21 7e bc ori r1,r1,0x7ebc <== NOT EXECUTED
8003c78: 38 63 80 98 ori r3,r3,0x8098 <== NOT EXECUTED
8003c7c: 38 84 7f 08 ori r4,r4,0x7f08 <== NOT EXECUTED
8003c80: 34 02 00 38 mvi r2,56 <== NOT EXECUTED
8003c84: f8 00 02 c8 calli 80047a4 <__assert_func> <== NOT EXECUTED
08002308 <IMFS_readlink>:
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
8002308: 37 9c ff fc addi sp,sp,-4
800230c: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *node;
int i;
node = loc->node_access;
8002310: 28 25 00 00 lw r5,(r1+0)
if ( node->type != IMFS_SYM_LINK )
8002314: 34 01 00 04 mvi r1,4
8002318: 28 a4 00 4c lw r4,(r5+76)
800231c: 5c 81 00 15 bne r4,r1,8002370 <IMFS_readlink+0x68> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
8002320: 44 60 00 12 be r3,r0,8002368 <IMFS_readlink+0x60> <== NEVER TAKEN
8002324: 28 a4 00 50 lw r4,(r5+80)
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
8002328: 34 06 00 00 mvi r6,0
800232c: b8 c0 08 00 mv r1,r6
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
8002330: 40 84 00 00 lbu r4,(r4+0)
8002334: 44 86 00 0d be r4,r6,8002368 <IMFS_readlink+0x60> <== NEVER TAKEN
buf[i] = node->info.sym_link.name[i];
8002338: b4 46 30 00 add r6,r2,r6
800233c: 30 c4 00 00 sb (r6+0),r4
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
8002340: 34 21 00 01 addi r1,r1,1
8002344: b8 20 30 00 mv r6,r1
8002348: 50 23 00 05 bgeu r1,r3,800235c <IMFS_readlink+0x54>
800234c: 28 a4 00 50 lw r4,(r5+80)
8002350: b4 81 20 00 add r4,r4,r1
8002354: 40 84 00 00 lbu r4,(r4+0)
8002358: 5c 80 ff f8 bne r4,r0,8002338 <IMFS_readlink+0x30>
buf[i] = node->info.sym_link.name[i];
return i;
}
800235c: 2b 9d 00 04 lw ra,(sp+4)
8002360: 37 9c 00 04 addi sp,sp,4
8002364: c3 a0 00 00 ret
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
8002368: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
800236c: e3 ff ff fc bi 800235c <IMFS_readlink+0x54> <== NOT EXECUTED
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
8002370: f8 00 46 ee calli 8013f28 <__errno> <== NOT EXECUTED
8002374: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8002378: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800237c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8002380: e3 ff ff f7 bi 800235c <IMFS_readlink+0x54> <== NOT EXECUTED
08002384 <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 */
)
{
8002384: 37 9c ff ec addi sp,sp,-20
8002388: 5b 8b 00 0c sw (sp+12),r11
800238c: 5b 8c 00 08 sw (sp+8),r12
8002390: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
8002394: 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 */
)
{
8002398: 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 );
800239c: b8 80 10 00 mv r2,r4
80023a0: 35 61 00 0c addi r1,r11,12
80023a4: 34 03 00 20 mvi r3,32
80023a8: f8 00 4b bc calli 8015298 <strncpy>
if ( the_jnode->Parent != NULL )
80023ac: 29 61 00 08 lw r1,(r11+8)
80023b0: 44 20 00 03 be r1,r0,80023bc <IMFS_rename+0x38> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
80023b4: b9 60 08 00 mv r1,r11
80023b8: f8 00 0b fe calli 80053b0 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
80023bc: 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 );
80023c0: b9 60 10 00 mv r2,r11
80023c4: 34 61 00 50 addi r1,r3,80
the_jnode->Parent = new_parent;
80023c8: 59 63 00 08 sw (r11+8),r3
80023cc: f8 00 0b ed calli 8005380 <_Chain_Append>
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
80023d0: 37 81 00 10 addi r1,sp,16
80023d4: 34 02 00 00 mvi r2,0
80023d8: f8 00 02 49 calli 8002cfc <gettimeofday>
80023dc: 2b 81 00 10 lw r1,(sp+16)
80023e0: 59 61 00 48 sw (r11+72),r1
return 0;
}
80023e4: 34 01 00 00 mvi r1,0
80023e8: 2b 9d 00 04 lw ra,(sp+4)
80023ec: 2b 8b 00 0c lw r11,(sp+12)
80023f0: 2b 8c 00 08 lw r12,(sp+8)
80023f4: 37 9c 00 14 addi sp,sp,20
80023f8: c3 a0 00 00 ret
080075c8 <IMFS_rmnod>:
int IMFS_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
80075c8: 37 9c ff ec addi sp,sp,-20
80075cc: 5b 8b 00 0c sw (sp+12),r11
80075d0: 5b 8c 00 08 sw (sp+8),r12
80075d4: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
80075d8: 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 */
)
{
80075dc: 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 ) {
80075e0: 29 61 00 08 lw r1,(r11+8)
80075e4: 44 20 00 05 be r1,r0,80075f8 <IMFS_rmnod+0x30> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
80075e8: b9 60 08 00 mv r1,r11
80075ec: f8 00 07 6e calli 80093a4 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
80075f0: 34 01 00 00 mvi r1,0
80075f4: 59 61 00 08 sw (r11+8),r1
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
80075f8: 2d 63 00 34 lhu r3,(r11+52)
IMFS_update_ctime( the_jnode );
80075fc: 34 02 00 00 mvi r2,0
8007600: 37 81 00 10 addi r1,sp,16
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
8007604: 34 63 ff ff addi r3,r3,-1
8007608: 0d 63 00 34 sh (r11+52),r3
IMFS_update_ctime( the_jnode );
800760c: f8 00 01 58 calli 8007b6c <gettimeofday>
8007610: 2b 81 00 10 lw r1,(sp+16)
8007614: 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) ) {
8007618: b9 60 08 00 mv r1,r11
800761c: f8 00 01 9d calli 8007c90 <rtems_libio_is_file_open>
8007620: 5c 20 00 0e bne r1,r0,8007658 <IMFS_rmnod+0x90> <== NEVER TAKEN
8007624: 2d 62 00 34 lhu r2,(r11+52)
8007628: 5c 41 00 0c bne r2,r1,8007658 <IMFS_rmnod+0x90> <== NEVER TAKEN
/*
* Is rtems_filesystem_current this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
800762c: 78 01 08 01 mvhi r1,0x801
8007630: 38 21 e1 10 ori r1,r1,0xe110
8007634: 28 21 00 00 lw r1,(r1+0)
8007638: 29 83 00 00 lw r3,(r12+0)
800763c: 28 24 00 04 lw r4,(r1+4)
8007640: 44 83 00 10 be r4,r3,8007680 <IMFS_rmnod+0xb8> <== NEVER TAKEN
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
8007644: 29 62 00 4c lw r2,(r11+76)
8007648: 34 01 00 04 mvi r1,4
800764c: 44 41 00 09 be r2,r1,8007670 <IMFS_rmnod+0xa8>
if ( the_jnode->info.sym_link.name )
free( (void*) the_jnode->info.sym_link.name );
}
free( the_jnode );
8007650: b9 60 08 00 mv r1,r11
8007654: f8 00 00 be calli 800794c <free>
}
return 0;
}
8007658: 34 01 00 00 mvi r1,0
800765c: 2b 9d 00 04 lw ra,(sp+4)
8007660: 2b 8b 00 0c lw r11,(sp+12)
8007664: 2b 8c 00 08 lw r12,(sp+8)
8007668: 37 9c 00 14 addi sp,sp,20
800766c: c3 a0 00 00 ret
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
if ( the_jnode->info.sym_link.name )
8007670: 29 61 00 50 lw r1,(r11+80)
8007674: 44 20 ff f7 be r1,r0,8007650 <IMFS_rmnod+0x88> <== NEVER TAKEN
free( (void*) the_jnode->info.sym_link.name );
8007678: f8 00 00 b5 calli 800794c <free>
800767c: e3 ff ff f5 bi 8007650 <IMFS_rmnod+0x88>
/*
* Is rtems_filesystem_current this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
rtems_filesystem_current.node_access = NULL;
8007680: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED
8007684: e3 ff ff f0 bi 8007644 <IMFS_rmnod+0x7c> <== NOT EXECUTED
08007688 <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
8007688: 37 9c ff ec addi sp,sp,-20
800768c: 5b 8b 00 14 sw (sp+20),r11
8007690: 5b 8c 00 10 sw (sp+16),r12
8007694: 5b 8d 00 0c sw (sp+12),r13
8007698: 5b 8e 00 08 sw (sp+8),r14
800769c: 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;
80076a0: 28 2c 00 00 lw r12,(r1+0)
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
80076a4: b8 40 58 00 mv r11,r2
80076a8: b8 20 70 00 mv r14,r1
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
80076ac: 29 82 00 4c lw r2,(r12+76)
80076b0: 34 01 00 07 mvi r1,7
80076b4: 54 41 00 2e bgu r2,r1,800776c <IMFS_stat+0xe4> <== NEVER TAKEN
80076b8: b8 40 08 00 mv r1,r2
80076bc: 78 0d 08 01 mvhi r13,0x801
80076c0: 34 02 00 02 mvi r2,2
80076c4: fb ff e2 cb calli 80001f0 <__ashlsi3>
80076c8: 39 ad cb 14 ori r13,r13,0xcb14
80076cc: b5 a1 08 00 add r1,r13,r1
80076d0: 28 21 00 00 lw r1,(r1+0)
80076d4: c0 20 00 00 b r1
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
80076d8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
80076dc: 59 61 00 20 sw (r11+32),r1 <== 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;
80076e0: 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 );
80076e4: 29 c1 00 10 lw r1,(r14+16)
buf->st_mode = the_jnode->st_mode;
80076e8: 59 62 00 0c sw (r11+12),r2
buf->st_nlink = the_jnode->st_nlink;
80076ec: 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 );
80076f0: 28 21 00 34 lw r1,(r1+52)
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
80076f4: 0d 62 00 10 sh (r11+16),r2
buf->st_ino = the_jnode->st_ino;
80076f8: 29 82 00 38 lw r2,(r12+56)
80076fc: 59 62 00 08 sw (r11+8),r2
buf->st_uid = the_jnode->st_uid;
8007700: 2d 82 00 3c lhu r2,(r12+60)
8007704: 0d 62 00 12 sh (r11+18),r2
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
8007708: 29 82 00 40 lw r2,(r12+64)
800770c: 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 );
8007710: 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;
8007714: 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 =
8007718: 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;
800771c: 0d 61 00 14 sh (r11+20),r1
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
8007720: 29 81 00 44 lw r1,(r12+68)
8007724: 59 61 00 2c sw (r11+44),r1
buf->st_ctime = the_jnode->stat_ctime;
8007728: 29 8c 00 48 lw r12,(r12+72)
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
800772c: 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 =
8007730: 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;
8007734: 34 01 00 00 mvi r1,0
8007738: 59 6c 00 34 sw (r11+52),r12
return 0;
}
800773c: 2b 9d 00 04 lw ra,(sp+4)
8007740: 2b 8b 00 14 lw r11,(sp+20)
8007744: 2b 8c 00 10 lw r12,(sp+16)
8007748: 2b 8d 00 0c lw r13,(sp+12)
800774c: 2b 8e 00 08 lw r14,(sp+8)
8007750: 37 9c 00 14 addi sp,sp,20
8007754: c3 a0 00 00 ret
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
8007758: 29 81 00 54 lw r1,(r12+84)
800775c: 29 82 00 50 lw r2,(r12+80)
8007760: 59 61 00 1c sw (r11+28),r1
8007764: 59 62 00 18 sw (r11+24),r2
break;
8007768: e3 ff ff de bi 80076e0 <IMFS_stat+0x58>
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
800776c: f8 00 17 06 calli 800d384 <__errno> <== NOT EXECUTED
8007770: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8007774: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8007778: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
800777c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8007780: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED
8007784: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED
8007788: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED
800778c: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED
8007790: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
8007794: c3 a0 00 00 ret <== NOT EXECUTED
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
break;
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
8007798: 29 81 00 54 lw r1,(r12+84)
800779c: 59 61 00 20 sw (r11+32),r1
break;
80077a0: e3 ff ff d0 bi 80076e0 <IMFS_stat+0x58>
080023fc <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
80023fc: 37 9c ff ac addi sp,sp,-84
8002400: 5b 8b 00 14 sw (sp+20),r11
8002404: 5b 8c 00 10 sw (sp+16),r12
8002408: 5b 8d 00 0c sw (sp+12),r13
800240c: 5b 8e 00 08 sw (sp+8),r14
8002410: 5b 9d 00 04 sw (sp+4),ra
8002414: b8 20 70 00 mv r14,r1
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
8002418: 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
)
{
800241c: b8 60 58 00 mv r11,r3
8002420: b8 40 68 00 mv r13,r2
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
8002424: 37 8c 00 18 addi r12,sp,24
8002428: f8 00 4b 71 calli 80151ec <strlen>
800242c: b8 20 10 00 mv r2,r1
8002430: b9 80 18 00 mv r3,r12
8002434: 37 84 00 54 addi r4,sp,84
8002438: b9 60 08 00 mv r1,r11
800243c: f8 00 2d 6a calli 800d9e4 <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
8002440: b9 a0 08 00 mv r1,r13
8002444: f8 00 4b 47 calli 8015160 <strdup>
8002448: 5b 81 00 3c sw (sp+60),r1
if (info.sym_link.name == NULL) {
800244c: 44 20 00 13 be r1,r0,8002498 <IMFS_symlink+0x9c> <== 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(
8002450: 34 02 00 04 mvi r2,4
8002454: b9 c0 08 00 mv r1,r14
8002458: b9 80 18 00 mv r3,r12
800245c: 38 04 a1 ff mvu r4,0xa1ff
8002460: 37 85 00 3c addi r5,sp,60
8002464: f8 00 29 6b calli 800ca10 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
8002468: 34 02 00 00 mvi r2,0
800246c: 44 22 00 09 be r1,r2,8002490 <IMFS_symlink+0x94> <== NEVER TAKEN
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
}
8002470: b8 40 08 00 mv r1,r2
8002474: 2b 9d 00 04 lw ra,(sp+4)
8002478: 2b 8b 00 14 lw r11,(sp+20)
800247c: 2b 8c 00 10 lw r12,(sp+16)
8002480: 2b 8d 00 0c lw r13,(sp+12)
8002484: 2b 8e 00 08 lw r14,(sp+8)
8002488: 37 9c 00 54 addi sp,sp,84
800248c: c3 a0 00 00 ret
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
free(info.sym_link.name);
8002490: 2b 81 00 3c lw r1,(sp+60) <== NOT EXECUTED
8002494: f8 00 01 ec calli 8002c44 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
8002498: f8 00 46 a4 calli 8013f28 <__errno> <== NOT EXECUTED
800249c: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
80024a0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80024a4: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
80024a8: e3 ff ff f2 bi 8002470 <IMFS_symlink+0x74> <== NOT EXECUTED
080024ac <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
80024ac: 37 9c ff d0 addi sp,sp,-48
80024b0: 5b 8b 00 14 sw (sp+20),r11
80024b4: 5b 8c 00 10 sw (sp+16),r12
80024b8: 5b 8d 00 0c sw (sp+12),r13
80024bc: 5b 8e 00 08 sw (sp+8),r14
80024c0: 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;
80024c4: 28 4c 00 00 lw r12,(r2+0)
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
80024c8: b8 40 58 00 mv r11,r2
80024cc: b8 20 68 00 mv r13,r1
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
80024d0: 29 82 00 4c lw r2,(r12+76)
80024d4: 34 01 00 03 mvi r1,3
80024d8: 44 41 00 0f be r2,r1,8002514 <IMFS_unlink+0x68>
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
80024dc: 29 63 00 08 lw r3,(r11+8)
80024e0: b9 60 10 00 mv r2,r11
80024e4: b9 a0 08 00 mv r1,r13
80024e8: 28 63 00 34 lw r3,(r3+52)
80024ec: d8 60 00 00 call r3
80024f0: b8 20 10 00 mv r2,r1
return result;
}
80024f4: b8 40 08 00 mv r1,r2
80024f8: 2b 9d 00 04 lw ra,(sp+4)
80024fc: 2b 8b 00 14 lw r11,(sp+20)
8002500: 2b 8c 00 10 lw r12,(sp+16)
8002504: 2b 8d 00 0c lw r13,(sp+12)
8002508: 2b 8e 00 08 lw r14,(sp+8)
800250c: 37 9c 00 30 addi sp,sp,48
8002510: c3 a0 00 00 ret
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
8002514: 29 83 00 50 lw r3,(r12+80)
8002518: 44 60 00 22 be r3,r0,80025a0 <IMFS_unlink+0xf4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
the_link.node_access = node->info.hard_link.link_node;
800251c: 5b 83 00 18 sw (sp+24),r3
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
8002520: 29 62 00 04 lw r2,(r11+4)
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
8002524: 37 8e 00 18 addi r14,sp,24
8002528: b9 c0 08 00 mv r1,r14
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
800252c: 5b 82 00 1c sw (sp+28),r2
8002530: 29 62 00 08 lw r2,(r11+8)
8002534: 5b 82 00 20 sw (sp+32),r2
8002538: 29 62 00 0c lw r2,(r11+12)
800253c: 5b 82 00 24 sw (sp+36),r2
8002540: 29 62 00 10 lw r2,(r11+16)
8002544: 5b 82 00 28 sw (sp+40),r2
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
8002548: f8 00 29 8c calli 800cb78 <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)
800254c: 29 83 00 50 lw r3,(r12+80)
8002550: 34 01 00 01 mvi r1,1
8002554: 2c 64 00 34 lhu r4,(r3+52)
8002558: 44 81 00 0a be r4,r1,8002580 <IMFS_unlink+0xd4>
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
800255c: 34 84 ff ff addi r4,r4,-1
IMFS_update_ctime( node->info.hard_link.link_node );
8002560: 34 02 00 00 mvi r2,0
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
8002564: 0c 64 00 34 sh (r3+52),r4
IMFS_update_ctime( node->info.hard_link.link_node );
8002568: 37 81 00 2c addi r1,sp,44
800256c: f8 00 01 e4 calli 8002cfc <gettimeofday>
8002570: 29 81 00 50 lw r1,(r12+80)
8002574: 2b 82 00 2c lw r2,(sp+44)
8002578: 58 22 00 48 sw (r1+72),r2
800257c: e3 ff ff d8 bi 80024dc <IMFS_unlink+0x30>
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
8002580: 2b 83 00 20 lw r3,(sp+32)
8002584: b9 c0 10 00 mv r2,r14
8002588: b9 a0 08 00 mv r1,r13
800258c: 28 63 00 34 lw r3,(r3+52)
8002590: d8 60 00 00 call r3
if ( result != 0 )
8002594: 34 02 ff ff mvi r2,-1
8002598: 44 20 ff d1 be r1,r0,80024dc <IMFS_unlink+0x30>
800259c: e3 ff ff d6 bi 80024f4 <IMFS_unlink+0x48>
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
80025a0: f8 00 46 62 calli 8013f28 <__errno> <== NOT EXECUTED
80025a4: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
80025a8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80025ac: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
80025b0: e3 ff ff d1 bi 80024f4 <IMFS_unlink+0x48> <== NOT EXECUTED
080025b4 <IMFS_unmount>:
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
80025b4: 37 9c ff fc addi sp,sp,-4
80025b8: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
80025bc: 28 22 00 08 lw r2,(r1+8)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
80025c0: 34 01 00 01 mvi r1,1
80025c4: 28 43 00 4c lw r3,(r2+76)
80025c8: 5c 61 00 08 bne r3,r1,80025e8 <IMFS_unmount+0x34> <== NEVER TAKEN
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
80025cc: 28 43 00 5c lw r3,(r2+92)
80025d0: 34 01 00 00 mvi r1,0
80025d4: 44 61 00 0a be r3,r1,80025fc <IMFS_unmount+0x48> <== NEVER TAKEN
/*
* 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;
80025d8: 58 41 00 5c sw (r2+92),r1
return 0;
}
80025dc: 2b 9d 00 04 lw ra,(sp+4)
80025e0: 37 9c 00 04 addi sp,sp,4
80025e4: c3 a0 00 00 ret
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
80025e8: f8 00 46 50 calli 8013f28 <__errno> <== NOT EXECUTED
80025ec: 34 02 00 14 mvi r2,20 <== NOT EXECUTED
80025f0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80025f4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
80025f8: e3 ff ff f9 bi 80025dc <IMFS_unmount+0x28> <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
80025fc: f8 00 46 4b calli 8013f28 <__errno> <== NOT EXECUTED
8002600: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8002604: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8002608: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
800260c: e3 ff ff f4 bi 80025dc <IMFS_unmount+0x28> <== NOT EXECUTED
080010e0 <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
80010e0: 37 9c ff f0 addi sp,sp,-16
80010e4: 5b 8b 00 10 sw (sp+16),r11
80010e8: 5b 8c 00 0c sw (sp+12),r12
80010ec: 5b 8d 00 08 sw (sp+8),r13
80010f0: 5b 9d 00 04 sw (sp+4),ra
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
80010f4: 78 04 08 01 mvhi r4,0x801
80010f8: 38 84 e6 50 ori r4,r4,0xe650
80010fc: 28 84 00 00 lw r4,(r4+0)
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
8001100: b8 20 60 00 mv r12,r1
8001104: b8 40 68 00 mv r13,r2
8001108: b8 60 58 00 mv r11,r3
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
800110c: 44 80 00 03 be r4,r0,8001118 <RTEMS_Malloc_Initialize+0x38><== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->initialize)();
8001110: 28 81 00 00 lw r1,(r4+0) <== NOT EXECUTED
8001114: d8 20 00 00 call r1 <== NOT EXECUTED
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
8001118: f8 00 1b b0 calli 8007fd8 <malloc_deferred_frees_initialize>
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
800111c: 78 04 08 01 mvhi r4,0x801
8001120: 38 84 e6 54 ori r4,r4,0xe654
8001124: 28 81 00 00 lw r1,(r4+0)
8001128: 44 20 00 08 be r1,r0,8001148 <RTEMS_Malloc_Initialize+0x68><== ALWAYS TAKEN
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
800112c: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED
8001130: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8001134: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8001138: d8 60 00 00 call r3 <== NOT EXECUTED
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
800113c: b5 8d 68 00 add r13,r12,r13 <== NOT EXECUTED
8001140: c9 a1 68 00 sub r13,r13,r1 <== NOT EXECUTED
8001144: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
* of the time under UNIX because zero'ing memory when it is first
* given to a process eliminates the chance of a process seeing data
* left over from another process. This would be a security violation.
*/
if (
8001148: 78 0b 08 01 mvhi r11,0x801
800114c: 39 6b e6 4d ori r11,r11,0xe64d
8001150: 41 62 00 00 lbu r2,(r11+0)
8001154: 5c 40 00 1f bne r2,r0,80011d0 <RTEMS_Malloc_Initialize+0xf0>
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
8001158: 78 01 08 01 mvhi r1,0x801
800115c: 38 21 e0 c4 ori r1,r1,0xe0c4
8001160: 40 21 00 28 lbu r1,(r1+40)
8001164: 5c 22 00 16 bne r1,r2,80011bc <RTEMS_Malloc_Initialize+0xdc>
void *area_begin,
uintptr_t area_size,
uintptr_t page_size
)
{
return _Heap_Initialize( heap, area_begin, area_size, page_size );
8001168: 78 0b 08 01 mvhi r11,0x801
800116c: 39 6b e0 1c ori r11,r11,0xe01c
8001170: 29 61 00 00 lw r1,(r11+0)
8001174: b9 80 10 00 mv r2,r12
8001178: b9 a0 18 00 mv r3,r13
800117c: 34 04 00 08 mvi r4,8
8001180: f8 00 08 57 calli 80032dc <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
8001184: 44 20 00 16 be r1,r0,80011dc <RTEMS_Malloc_Initialize+0xfc><== NEVER TAKEN
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
8001188: 78 0c 08 01 mvhi r12,0x801
800118c: 39 8c e7 28 ori r12,r12,0xe728
8001190: 29 61 00 00 lw r1,(r11+0)
8001194: 29 8b 00 00 lw r11,(r12+0)
8001198: f8 00 0b d7 calli 80040f4 <_Protected_heap_Get_size>
800119c: b4 2b 08 00 add r1,r1,r11
80011a0: 59 81 00 00 sw (r12+0),r1
printk( "\n" );
rtems_print_buffer( (heap_begin + heap_size) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
}
80011a4: 2b 9d 00 04 lw ra,(sp+4)
80011a8: 2b 8b 00 10 lw r11,(sp+16)
80011ac: 2b 8c 00 0c lw r12,(sp+12)
80011b0: 2b 8d 00 08 lw r13,(sp+8)
80011b4: 37 9c 00 10 addi sp,sp,16
80011b8: c3 a0 00 00 ret
if (
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
) {
memset( heap_begin, 0, heap_size );
80011bc: b9 80 08 00 mv r1,r12
80011c0: b9 a0 18 00 mv r3,r13
80011c4: f8 00 33 74 calli 800df94 <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 ) {
80011c8: 41 61 00 00 lbu r1,(r11+0)
80011cc: 44 20 ff e7 be r1,r0,8001168 <RTEMS_Malloc_Initialize+0x88><== ALWAYS TAKEN
80011d0: 78 0b 08 01 mvhi r11,0x801
80011d4: 39 6b e0 1c ori r11,r11,0xe01c
80011d8: e3 ff ff ec bi 8001188 <RTEMS_Malloc_Initialize+0xa8>
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
80011dc: 34 01 00 1a mvi r1,26 <== NOT EXECUTED
80011e0: f8 00 05 e8 calli 8002980 <rtems_fatal_error_occurred> <== NOT EXECUTED
0800094c <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
800094c: 37 9c ff d0 addi sp,sp,-48 <== NOT EXECUTED
8000950: 5b 8b 00 28 sw (sp+40),r11 <== NOT EXECUTED
8000954: 5b 8c 00 24 sw (sp+36),r12 <== NOT EXECUTED
8000958: 5b 8d 00 20 sw (sp+32),r13 <== NOT EXECUTED
800095c: 5b 8e 00 1c sw (sp+28),r14 <== NOT EXECUTED
8000960: 5b 8f 00 18 sw (sp+24),r15 <== NOT EXECUTED
8000964: 5b 90 00 14 sw (sp+20),r16 <== NOT EXECUTED
8000968: 5b 91 00 10 sw (sp+16),r17 <== NOT EXECUTED
800096c: 5b 92 00 0c sw (sp+12),r18 <== NOT EXECUTED
8000970: 5b 93 00 08 sw (sp+8),r19 <== NOT EXECUTED
8000974: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8000978: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
void *high_water_mark;
void *current;
Stack_Control *stack;
char name[5];
if ( !the_thread )
800097c: 44 20 00 37 be r1,r0,8000a58 <Stack_check_Dump_threads_usage+0x10c><== NOT EXECUTED
return;
if ( !print_handler )
8000980: 78 0d 08 01 mvhi r13,0x801 <== NOT EXECUTED
8000984: 39 ad e6 b0 ori r13,r13,0xe6b0 <== NOT EXECUTED
8000988: 29 b0 00 00 lw r16,(r13+0) <== NOT EXECUTED
800098c: 46 00 00 33 be r16,r0,8000a58 <Stack_check_Dump_threads_usage+0x10c><== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
8000990: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000994: 45 61 00 4d be r11,r1,8000ac8 <Stack_check_Dump_threads_usage+0x17c><== NOT EXECUTED
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
8000998: 29 71 01 14 lw r17,(r11+276) <== NOT EXECUTED
current = 0;
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
800099c: 35 6e 00 c4 addi r14,r11,196 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
80009a0: 29 cc 00 04 lw r12,(r14+4) <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
80009a4: 29 cf 00 00 lw r15,(r14+0) <== NOT EXECUTED
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
80009a8: 35 8c 00 10 addi r12,r12,16 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
80009ac: 35 ef ff f0 addi r15,r15,-16 <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
80009b0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
80009b4: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED
80009b8: fb ff ff c3 calli 80008c4 <Stack_check_find_high_water_mark><== NOT EXECUTED
if ( high_water_mark )
used = Stack_check_Calculate_used( low, size, high_water_mark );
80009bc: b5 8f 60 00 add r12,r12,r15 <== NOT EXECUTED
80009c0: c9 81 90 00 sub r18,r12,r1 <== NOT EXECUTED
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
80009c4: 44 20 00 37 be r1,r0,8000aa0 <Stack_check_Dump_threads_usage+0x154><== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
80009c8: 45 60 00 38 be r11,r0,8000aa8 <Stack_check_Dump_threads_usage+0x15c><== NOT EXECUTED
(*print_handler)(
80009cc: 29 6b 00 08 lw r11,(r11+8) <== NOT EXECUTED
80009d0: 78 0c 08 01 mvhi r12,0x801 <== NOT EXECUTED
80009d4: 39 8c e6 ac ori r12,r12,0xe6ac <== NOT EXECUTED
80009d8: 29 93 00 00 lw r19,(r12+0) <== NOT EXECUTED
80009dc: 37 83 00 2c addi r3,sp,44 <== NOT EXECUTED
80009e0: 34 02 00 05 mvi r2,5 <== NOT EXECUTED
80009e4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80009e8: f8 00 06 e5 calli 800257c <rtems_object_get_name> <== NOT EXECUTED
80009ec: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
80009f0: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
80009f4: 38 42 c7 38 ori r2,r2,0xc738 <== NOT EXECUTED
80009f8: ba 60 08 00 mv r1,r19 <== NOT EXECUTED
80009fc: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
8000a00: da 00 00 00 call r16 <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
8000a04: 29 c4 00 00 lw r4,(r14+0) <== NOT EXECUTED
8000a08: 29 c3 00 04 lw r3,(r14+4) <== NOT EXECUTED
8000a0c: 29 a7 00 00 lw r7,(r13+0) <== NOT EXECUTED
8000a10: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED
8000a14: 34 84 ff ff addi r4,r4,-1 <== NOT EXECUTED
8000a18: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8000a1c: 38 42 c7 58 ori r2,r2,0xc758 <== NOT EXECUTED
8000a20: b4 64 20 00 add r4,r3,r4 <== NOT EXECUTED
8000a24: ba 20 28 00 mv r5,r17 <== NOT EXECUTED
8000a28: b9 e0 30 00 mv r6,r15 <== NOT EXECUTED
8000a2c: d8 e0 00 00 call r7 <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
8000a30: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8000a34: 38 42 e6 a8 ori r2,r2,0xe6a8 <== NOT EXECUTED
8000a38: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED
8000a3c: 44 20 00 13 be r1,r0,8000a88 <Stack_check_Dump_threads_usage+0x13c><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
8000a40: 29 a4 00 00 lw r4,(r13+0) <== NOT EXECUTED
8000a44: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED
8000a48: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8000a4c: 38 42 c7 88 ori r2,r2,0xc788 <== NOT EXECUTED
8000a50: ba 40 18 00 mv r3,r18 <== NOT EXECUTED
8000a54: d8 80 00 00 call r4 <== NOT EXECUTED
}
}
8000a58: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8000a5c: 2b 8b 00 28 lw r11,(sp+40) <== NOT EXECUTED
8000a60: 2b 8c 00 24 lw r12,(sp+36) <== NOT EXECUTED
8000a64: 2b 8d 00 20 lw r13,(sp+32) <== NOT EXECUTED
8000a68: 2b 8e 00 1c lw r14,(sp+28) <== NOT EXECUTED
8000a6c: 2b 8f 00 18 lw r15,(sp+24) <== NOT EXECUTED
8000a70: 2b 90 00 14 lw r16,(sp+20) <== NOT EXECUTED
8000a74: 2b 91 00 10 lw r17,(sp+16) <== NOT EXECUTED
8000a78: 2b 92 00 0c lw r18,(sp+12) <== NOT EXECUTED
8000a7c: 2b 93 00 08 lw r19,(sp+8) <== NOT EXECUTED
8000a80: 37 9c 00 30 addi sp,sp,48 <== NOT EXECUTED
8000a84: c3 a0 00 00 ret <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
8000a88: 29 a3 00 00 lw r3,(r13+0) <== NOT EXECUTED
8000a8c: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED
8000a90: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8000a94: 38 42 c7 78 ori r2,r2,0xc778 <== NOT EXECUTED
8000a98: d8 60 00 00 call r3 <== NOT EXECUTED
8000a9c: e3 ff ff ef bi 8000a58 <Stack_check_Dump_threads_usage+0x10c><== 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 )
8000aa0: b8 20 90 00 mv r18,r1 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
8000aa4: 5d 60 ff ca bne r11,r0,80009cc <Stack_check_Dump_threads_usage+0x80><== 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 );
8000aa8: 78 0c 08 01 mvhi r12,0x801 <== NOT EXECUTED
8000aac: 39 8c e6 ac ori r12,r12,0xe6ac <== NOT EXECUTED
8000ab0: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED
8000ab4: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8000ab8: 38 42 c7 48 ori r2,r2,0xc748 <== NOT EXECUTED
8000abc: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED
8000ac0: da 00 00 00 call r16 <== NOT EXECUTED
8000ac4: e3 ff ff d0 bi 8000a04 <Stack_check_Dump_threads_usage+0xb8><== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
if (Stack_check_Interrupt_stack.area) {
8000ac8: 78 0e 08 01 mvhi r14,0x801 <== NOT EXECUTED
8000acc: 39 ce e7 44 ori r14,r14,0xe744 <== NOT EXECUTED
8000ad0: 29 c1 00 04 lw r1,(r14+4) <== NOT EXECUTED
8000ad4: 34 11 00 00 mvi r17,0 <== NOT EXECUTED
8000ad8: ba 20 58 00 mv r11,r17 <== NOT EXECUTED
8000adc: 5c 31 ff b1 bne r1,r17,80009a0 <Stack_check_Dump_threads_usage+0x54><== NOT EXECUTED
8000ae0: e3 ff ff de bi 8000a58 <Stack_check_Dump_threads_usage+0x10c><== NOT EXECUTED
08000d74 <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
8000d74: 37 9c ff e8 addi sp,sp,-24
8000d78: 5b 8b 00 18 sw (sp+24),r11
8000d7c: 5b 8c 00 14 sw (sp+20),r12
8000d80: 5b 8d 00 10 sw (sp+16),r13
8000d84: 5b 8e 00 0c sw (sp+12),r14
8000d88: 5b 8f 00 08 sw (sp+8),r15
8000d8c: 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)
8000d90: 78 0d 08 01 mvhi r13,0x801
8000d94: 39 ad e6 a8 ori r13,r13,0xe6a8
8000d98: 29 ab 00 00 lw r11,(r13+0)
8000d9c: 5d 60 00 22 bne r11,r0,8000e24 <Stack_check_Initialize+0xb0>
8000da0: 78 0c 08 01 mvhi r12,0x801
8000da4: 78 0e 08 01 mvhi r14,0x801
8000da8: 39 8c e7 34 ori r12,r12,0xe734
8000dac: 39 ce c8 d0 ori r14,r14,0xc8d0
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
8000db0: 34 0f 00 04 mvi r15,4
p[i] = pattern[ i%4 ];
8000db4: 21 61 00 03 andi r1,r11,0x3
8000db8: 34 02 00 02 mvi r2,2
8000dbc: fb ff fd 06 calli 80001d4 <__ashlsi3>
8000dc0: b5 c1 08 00 add r1,r14,r1
8000dc4: 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++ ) {
8000dc8: 35 6b 00 01 addi r11,r11,1
p[i] = pattern[ i%4 ];
8000dcc: 59 81 00 00 sw (r12+0),r1
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
8000dd0: 35 8c 00 04 addi r12,r12,4
8000dd4: 5d 6f ff f8 bne r11,r15,8000db4 <Stack_check_Initialize+0x40>
/*
* 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) {
8000dd8: 78 01 08 01 mvhi r1,0x801
8000ddc: 38 21 e8 a4 ori r1,r1,0xe8a4
8000de0: 28 24 00 00 lw r4,(r1+0)
8000de4: 44 80 00 0e be r4,r0,8000e1c <Stack_check_Initialize+0xa8> <== NEVER TAKEN
8000de8: 78 01 08 01 mvhi r1,0x801
8000dec: 38 21 e8 28 ori r1,r1,0xe828
8000df0: 28 23 00 00 lw r3,(r1+0)
8000df4: 44 60 00 0a be r3,r0,8000e1c <Stack_check_Initialize+0xa8> <== NEVER TAKEN
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
8000df8: 78 05 08 01 mvhi r5,0x801
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
8000dfc: c8 64 30 00 sub r6,r3,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;
8000e00: 38 a5 e7 44 ori r5,r5,0xe744
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
8000e04: b8 80 08 00 mv r1,r4
8000e08: b8 c0 18 00 mv r3,r6
8000e0c: 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 -
8000e10: 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;
8000e14: 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);
8000e18: f8 00 34 c8 calli 800e138 <memset>
}
#endif
Stack_check_Initialized = 1;
8000e1c: 34 01 00 01 mvi r1,1
8000e20: 59 a1 00 00 sw (r13+0),r1
}
8000e24: 2b 9d 00 04 lw ra,(sp+4)
8000e28: 2b 8b 00 18 lw r11,(sp+24)
8000e2c: 2b 8c 00 14 lw r12,(sp+20)
8000e30: 2b 8d 00 10 lw r13,(sp+16)
8000e34: 2b 8e 00 0c lw r14,(sp+12)
8000e38: 2b 8f 00 08 lw r15,(sp+8)
8000e3c: 37 9c 00 18 addi sp,sp,24
8000e40: c3 a0 00 00 ret
080008c4 <Stack_check_find_high_water_mark>:
*/
void *Stack_check_find_high_water_mark(
const void *s,
size_t n
)
{
80008c4: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED
80008c8: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED
80008cc: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED
80008d0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
80008d4: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
80008d8: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
80008dc: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
80008e0: fb ff fe 65 calli 8000274 <__lshrsi3> <== NOT EXECUTED
80008e4: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
80008e8: 35 8b 00 10 addi r11,r12,16 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
80008ec: fb ff fe 3a calli 80001d4 <__ashlsi3> <== NOT EXECUTED
80008f0: b5 61 10 00 add r2,r11,r1 <== NOT EXECUTED
80008f4: 51 62 00 08 bgeu r11,r2,8000914 <Stack_check_find_high_water_mark+0x50><== NOT EXECUTED
if (*base != U32_PATTERN)
80008f8: 29 84 00 10 lw r4,(r12+16) <== NOT EXECUTED
80008fc: 78 03 a5 a5 mvhi r3,0xa5a5 <== NOT EXECUTED
8000900: 38 63 a5 a5 ori r3,r3,0xa5a5 <== NOT EXECUTED
8000904: b8 80 08 00 mv r1,r4 <== NOT EXECUTED
8000908: 5c 83 00 0b bne r4,r3,8000934 <Stack_check_find_high_water_mark+0x70><== 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++)
800090c: 35 6b 00 04 addi r11,r11,4 <== NOT EXECUTED
8000910: 54 4b 00 07 bgu r2,r11,800092c <Stack_check_find_high_water_mark+0x68><== NOT EXECUTED
8000914: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
if (*base != U32_PATTERN)
return (void *) base;
#endif
return (void *)0;
}
8000918: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800091c: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8000920: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8000924: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8000928: c3 a0 00 00 ret <== NOT EXECUTED
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
800092c: 29 63 00 00 lw r3,(r11+0) <== NOT EXECUTED
8000930: 44 61 ff f7 be r3,r1,800090c <Stack_check_find_high_water_mark+0x48><== NOT EXECUTED
return (void *) base;
8000934: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
#endif
return (void *)0;
}
8000938: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800093c: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8000940: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8000944: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8000948: c3 a0 00 00 ret <== NOT EXECUTED
08000b98 <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)
{
8000b98: 37 9c ff d0 addi sp,sp,-48
8000b9c: 5b 8b 00 10 sw (sp+16),r11
8000ba0: 5b 8c 00 0c sw (sp+12),r12
8000ba4: 5b 8d 00 08 sw (sp+8),r13
8000ba8: 5b 9d 00 04 sw (sp+4),ra
8000bac: 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");
8000bb0: 78 01 08 01 mvhi r1,0x801
8000bb4: 38 21 c7 f4 ori r1,r1,0xc7f4
*
* 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)
{
8000bb8: 20 4c 00 ff andi r12,r2,0xff
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
8000bbc: 29 6d 00 c8 lw r13,(r11+200)
char name [32];
printk("BLOWN STACK!!!\n");
8000bc0: f8 00 05 5e calli 8002138 <printk>
printk("task control block: 0x%08" PRIxPTR "\n", running);
8000bc4: 78 01 08 01 mvhi r1,0x801
8000bc8: 38 21 c8 04 ori r1,r1,0xc804
8000bcc: b9 60 10 00 mv r2,r11
8000bd0: f8 00 05 5a calli 8002138 <printk>
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
8000bd4: 29 62 00 08 lw r2,(r11+8)
8000bd8: 78 01 08 01 mvhi r1,0x801
8000bdc: 38 21 c8 24 ori r1,r1,0xc824
8000be0: f8 00 05 56 calli 8002138 <printk>
printk(
8000be4: 29 62 00 0c lw r2,(r11+12)
8000be8: 78 01 08 01 mvhi r1,0x801
8000bec: 38 21 c8 38 ori r1,r1,0xc838
8000bf0: f8 00 05 52 calli 8002138 <printk>
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
8000bf4: 29 61 00 08 lw r1,(r11+8)
8000bf8: 37 83 00 14 addi r3,sp,20
8000bfc: 34 02 00 20 mvi r2,32
8000c00: f8 00 06 5f calli 800257c <rtems_object_get_name>
8000c04: b8 20 10 00 mv r2,r1
8000c08: 78 01 08 01 mvhi r1,0x801
8000c0c: 38 21 c8 4c ori r1,r1,0xc84c
8000c10: f8 00 05 4a calli 8002138 <printk>
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
8000c14: 29 62 00 c4 lw r2,(r11+196)
8000c18: 29 63 00 c8 lw r3,(r11+200)
8000c1c: 78 01 08 01 mvhi r1,0x801
8000c20: 38 21 c8 64 ori r1,r1,0xc864
8000c24: b4 62 20 00 add r4,r3,r2
8000c28: f8 00 05 44 calli 8002138 <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) {
8000c2c: 45 80 00 03 be r12,r0,8000c38 <Stack_check_report_blown_task+0xa0><== ALWAYS TAKEN
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
8000c30: 34 01 00 81 mvi r1,129
8000c34: f8 00 07 95 calli 8002a88 <rtems_fatal_error_occurred>
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
8000c38: 78 01 08 01 mvhi r1,0x801
8000c3c: 38 21 c8 98 ori r1,r1,0xc898
8000c40: 35 a4 00 18 addi r4,r13,24
8000c44: 34 02 00 10 mvi r2,16
8000c48: 35 a3 00 08 addi r3,r13,8
8000c4c: f8 00 05 3b calli 8002138 <printk>
8000c50: e3 ff ff f8 bi 8000c30 <Stack_check_report_blown_task+0x98>
08007afc <Untar_FromFile>:
*************************************************************************/
int
Untar_FromFile(
const char *tar_name
)
{
8007afc: 37 9c fe f0 addi sp,sp,-272 <== NOT EXECUTED
8007b00: 5b 8b 00 44 sw (sp+68),r11 <== NOT EXECUTED
8007b04: 5b 8c 00 40 sw (sp+64),r12 <== NOT EXECUTED
8007b08: 5b 8d 00 3c sw (sp+60),r13 <== NOT EXECUTED
8007b0c: 5b 8e 00 38 sw (sp+56),r14 <== NOT EXECUTED
8007b10: 5b 8f 00 34 sw (sp+52),r15 <== NOT EXECUTED
8007b14: 5b 90 00 30 sw (sp+48),r16 <== NOT EXECUTED
8007b18: 5b 91 00 2c sw (sp+44),r17 <== NOT EXECUTED
8007b1c: 5b 92 00 28 sw (sp+40),r18 <== NOT EXECUTED
8007b20: 5b 93 00 24 sw (sp+36),r19 <== NOT EXECUTED
8007b24: 5b 94 00 20 sw (sp+32),r20 <== NOT EXECUTED
8007b28: 5b 95 00 1c sw (sp+28),r21 <== NOT EXECUTED
8007b2c: 5b 96 00 18 sw (sp+24),r22 <== NOT EXECUTED
8007b30: 5b 97 00 14 sw (sp+20),r23 <== NOT EXECUTED
8007b34: 5b 98 00 10 sw (sp+16),r24 <== NOT EXECUTED
8007b38: 5b 99 00 0c sw (sp+12),r25 <== NOT EXECUTED
8007b3c: 5b 9b 00 08 sw (sp+8),fp <== NOT EXECUTED
8007b40: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8007b44: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
unsigned long size;
unsigned char linkflag;
retval = UNTAR_SUCCESSFUL;
bufr = (char *)malloc(512);
8007b48: 34 01 02 00 mvi r1,512 <== NOT EXECUTED
8007b4c: fb ff ea 76 calli 8002524 <malloc> <== NOT EXECUTED
8007b50: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
if (bufr == NULL)
8007b54: 34 0c 00 01 mvi r12,1 <== NOT EXECUTED
8007b58: 44 20 00 54 be r1,r0,8007ca8 <Untar_FromFile+0x1ac> <== NOT EXECUTED
{
return(UNTAR_FAIL);
}
fd = open(tar_name, O_RDONLY);
8007b5c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8007b60: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8007b64: fb ff ec ef calli 8002f20 <open> <== NOT EXECUTED
8007b68: b8 20 b0 00 mv r22,r1 <== NOT EXECUTED
* We've decoded the header, now figure out what it contains and
* do something with it.
*****************************************************************/
if (linkflag == SYMTYPE)
{
strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE);
8007b6c: 35 61 00 9d addi r1,r11,157 <== NOT EXECUTED
while (1)
{
/* Read the header */
/* If the header read fails, we just consider it the end
of the tarfile. */
if ((n = read(fd, bufr, 512)) != 512)
8007b70: 34 0c 02 00 mvi r12,512 <== NOT EXECUTED
{
break;
}
if (strncmp(&bufr[257], "ustar ", 7))
8007b74: 35 79 01 01 addi r25,r11,257 <== NOT EXECUTED
8007b78: 78 18 08 02 mvhi r24,0x802 <== NOT EXECUTED
8007b7c: 34 0d 00 07 mvi r13,7 <== NOT EXECUTED
{
break;
}
strncpy(fname, bufr, MAX_NAME_FIELD_SIZE);
8007b80: 37 97 00 b0 addi r23,sp,176 <== NOT EXECUTED
**************************************************************************
* Change History: *
* 12/30/1998 - Creation (JWJ) *
*************************************************************************/
int
Untar_FromFile(
8007b84: 35 73 00 0c addi r19,r11,12 <== NOT EXECUTED
unsigned long num;
num = 0;
for (i=0; i < len; i++)
{
if ((octascii[i] < '0') || (octascii[i] > '9'))
8007b88: 34 12 00 09 mvi r18,9 <== NOT EXECUTED
**************************************************************************
* Change History: *
* 12/30/1998 - Creation (JWJ) *
*************************************************************************/
int
Untar_FromFile(
8007b8c: 35 74 00 08 addi r20,r11,8 <== NOT EXECUTED
/******************************************************************
* We've decoded the header, now figure out what it contains and
* do something with it.
*****************************************************************/
if (linkflag == SYMTYPE)
8007b90: 34 1b 00 32 mvi fp,50 <== NOT EXECUTED
{
strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE);
8007b94: 5b 81 00 48 sw (sp+72),r1 <== NOT EXECUTED
while (1)
{
/* Read the header */
/* If the header read fails, we just consider it the end
of the tarfile. */
if ((n = read(fd, bufr, 512)) != 512)
8007b98: ba c0 08 00 mv r1,r22 <== NOT EXECUTED
8007b9c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8007ba0: 34 03 02 00 mvi r3,512 <== NOT EXECUTED
8007ba4: fb ff ed ae calli 800325c <read> <== NOT EXECUTED
8007ba8: 5c 2c 00 3b bne r1,r12,8007c94 <Untar_FromFile+0x198> <== NOT EXECUTED
{
break;
}
if (strncmp(&bufr[257], "ustar ", 7))
8007bac: bb 00 10 00 mv r2,r24 <== NOT EXECUTED
8007bb0: bb 20 08 00 mv r1,r25 <== NOT EXECUTED
8007bb4: 38 42 2c a8 ori r2,r2,0x2ca8 <== NOT EXECUTED
8007bb8: 34 03 00 07 mvi r3,7 <== NOT EXECUTED
8007bbc: f8 00 29 94 calli 801220c <strncmp> <== NOT EXECUTED
8007bc0: b8 20 80 00 mv r16,r1 <== NOT EXECUTED
8007bc4: 5c 20 00 34 bne r1,r0,8007c94 <Untar_FromFile+0x198> <== NOT EXECUTED
{
break;
}
strncpy(fname, bufr, MAX_NAME_FIELD_SIZE);
8007bc8: ba e0 08 00 mv r1,r23 <== NOT EXECUTED
8007bcc: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8007bd0: 34 03 00 63 mvi r3,99 <== NOT EXECUTED
8007bd4: f8 00 29 d2 calli 801231c <strncpy> <== NOT EXECUTED
fname[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = bufr[156];
8007bd8: 41 75 00 9c lbu r21,(r11+156) <== NOT EXECUTED
{
break;
}
strncpy(fname, bufr, MAX_NAME_FIELD_SIZE);
fname[MAX_NAME_FIELD_SIZE] = '\0';
8007bdc: 33 90 01 13 sb (sp+275),r16 <== NOT EXECUTED
linkflag = bufr[156];
8007be0: b9 60 78 00 mv r15,r11 <== NOT EXECUTED
**************************************************************************
* Change History: *
* 12/30/1998 - Creation (JWJ) *
*************************************************************************/
int
Untar_FromFile(
8007be4: b9 60 70 00 mv r14,r11 <== NOT EXECUTED
unsigned long num;
num = 0;
for (i=0; i < len; i++)
{
if ((octascii[i] < '0') || (octascii[i] > '9'))
8007be8: 41 d1 00 7c lbu r17,(r14+124) <== NOT EXECUTED
{
continue;
}
num = num * 8 + ((unsigned long)(octascii[i] - '0'));
8007bec: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
8007bf0: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
unsigned long num;
num = 0;
for (i=0; i < len; i++)
{
if ((octascii[i] < '0') || (octascii[i] > '9'))
8007bf4: 36 31 ff d0 addi r17,r17,-48 <== NOT EXECUTED
8007bf8: 22 23 00 ff andi r3,r17,0xff <== NOT EXECUTED
{
continue;
}
num = num * 8 + ((unsigned long)(octascii[i] - '0'));
8007bfc: 35 ce 00 01 addi r14,r14,1 <== NOT EXECUTED
unsigned long num;
num = 0;
for (i=0; i < len; i++)
{
if ((octascii[i] < '0') || (octascii[i] > '9'))
8007c00: 54 72 00 03 bgu r3,r18,8007c0c <Untar_FromFile+0x110> <== NOT EXECUTED
{
continue;
}
num = num * 8 + ((unsigned long)(octascii[i] - '0'));
8007c04: fb ff e2 24 calli 8000494 <__ashlsi3> <== NOT EXECUTED
8007c08: b6 21 80 00 add r16,r17,r1 <== NOT EXECUTED
{
size_t i;
unsigned long num;
num = 0;
for (i=0; i < len; i++)
8007c0c: 5d d3 ff f7 bne r14,r19,8007be8 <Untar_FromFile+0xec> <== NOT EXECUTED
**************************************************************************
* Change History: *
* 12/30/1998 - Creation (JWJ) *
*************************************************************************/
int
Untar_FromFile(
8007c10: 34 07 00 00 mvi r7,0 <== NOT EXECUTED
unsigned long num;
num = 0;
for (i=0; i < len; i++)
{
if ((octascii[i] < '0') || (octascii[i] > '9'))
8007c14: 41 ee 00 94 lbu r14,(r15+148) <== NOT EXECUTED
{
continue;
}
num = num * 8 + ((unsigned long)(octascii[i] - '0'));
8007c18: b8 e0 08 00 mv r1,r7 <== NOT EXECUTED
8007c1c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
unsigned long num;
num = 0;
for (i=0; i < len; i++)
{
if ((octascii[i] < '0') || (octascii[i] > '9'))
8007c20: 35 ce ff d0 addi r14,r14,-48 <== NOT EXECUTED
8007c24: 21 c3 00 ff andi r3,r14,0xff <== NOT EXECUTED
{
continue;
}
num = num * 8 + ((unsigned long)(octascii[i] - '0'));
8007c28: 35 ef 00 01 addi r15,r15,1 <== NOT EXECUTED
unsigned long num;
num = 0;
for (i=0; i < len; i++)
{
if ((octascii[i] < '0') || (octascii[i] > '9'))
8007c2c: 54 72 00 03 bgu r3,r18,8007c38 <Untar_FromFile+0x13c> <== NOT EXECUTED
{
continue;
}
num = num * 8 + ((unsigned long)(octascii[i] - '0'));
8007c30: fb ff e2 19 calli 8000494 <__ashlsi3> <== NOT EXECUTED
8007c34: b5 c1 38 00 add r7,r14,r1 <== NOT EXECUTED
{
size_t i;
unsigned long num;
num = 0;
for (i=0; i < len; i++)
8007c38: 5d f4 ff f7 bne r15,r20,8007c14 <Untar_FromFile+0x118> <== NOT EXECUTED
8007c3c: 34 04 00 00 mvi r4,0 <== NOT EXECUTED
8007c40: b8 80 18 00 mv r3,r4 <== NOT EXECUTED
int i, sum;
sum = 0;
for (i=0; i<512; i++)
{
if ((i >= 148) && (i < 156))
8007c44: 34 65 ff 6c addi r5,r3,-148 <== NOT EXECUTED
sum += 0xff & ' ';
else
sum += 0xff & bufr[i];
8007c48: b5 63 30 00 add r6,r11,r3 <== NOT EXECUTED
int i, sum;
sum = 0;
for (i=0; i<512; i++)
{
if ((i >= 148) && (i < 156))
8007c4c: 54 ad 00 2b bgu r5,r13,8007cf8 <Untar_FromFile+0x1fc> <== NOT EXECUTED
sum += 0xff & ' ';
8007c50: 34 84 00 20 addi r4,r4,32 <== NOT EXECUTED
)
{
int i, sum;
sum = 0;
for (i=0; i<512; i++)
8007c54: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED
8007c58: 5c 6c ff fb bne r3,r12,8007c44 <Untar_FromFile+0x148> <== NOT EXECUTED
* header, but the checksum field is substituted with blanks.
******************************************************************/
hdr_chksum = _rtems_octal2ulong(&bufr[148], 8);
sum = _rtems_tar_header_checksum(bufr);
if (sum != hdr_chksum)
8007c5c: 5c e4 00 5b bne r7,r4,8007dc8 <Untar_FromFile+0x2cc> <== NOT EXECUTED
/******************************************************************
* We've decoded the header, now figure out what it contains and
* do something with it.
*****************************************************************/
if (linkflag == SYMTYPE)
8007c60: 46 bb 00 29 be r21,fp,8007d04 <Untar_FromFile+0x208> <== NOT EXECUTED
{
strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE);
linkname[MAX_NAME_FIELD_SIZE] = '\0';
symlink(linkname,fname);
}
else if (linkflag == REGTYPE)
8007c64: 34 02 00 30 mvi r2,48 <== NOT EXECUTED
8007c68: 46 a2 00 31 be r21,r2,8007d2c <Untar_FromFile+0x230> <== NOT EXECUTED
write(out_fd, bufr, n);
}
close(out_fd);
}
}
else if (linkflag == DIRTYPE)
8007c6c: 34 02 00 35 mvi r2,53 <== NOT EXECUTED
8007c70: 5e a2 ff ca bne r21,r2,8007b98 <Untar_FromFile+0x9c> <== NOT EXECUTED
{
mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO);
8007c74: 34 02 01 ff mvi r2,511 <== NOT EXECUTED
8007c78: ba e0 08 00 mv r1,r23 <== NOT EXECUTED
8007c7c: fb ff ea 74 calli 800264c <mkdir> <== NOT EXECUTED
while (1)
{
/* Read the header */
/* If the header read fails, we just consider it the end
of the tarfile. */
if ((n = read(fd, bufr, 512)) != 512)
8007c80: ba c0 08 00 mv r1,r22 <== NOT EXECUTED
8007c84: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8007c88: 34 03 02 00 mvi r3,512 <== NOT EXECUTED
8007c8c: fb ff ed 74 calli 800325c <read> <== NOT EXECUTED
8007c90: 44 2c ff c7 be r1,r12,8007bac <Untar_FromFile+0xb0> <== NOT EXECUTED
close(out_fd);
}
}
else if (linkflag == DIRTYPE)
{
mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO);
8007c94: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
}
}
free(bufr);
8007c98: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8007c9c: fb ff e7 cb calli 8001bc8 <free> <== NOT EXECUTED
close(fd);
8007ca0: ba c0 08 00 mv r1,r22 <== NOT EXECUTED
8007ca4: fb ff e6 38 calli 8001584 <close> <== NOT EXECUTED
return(retval);
}
8007ca8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8007cac: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8007cb0: 2b 8b 00 44 lw r11,(sp+68) <== NOT EXECUTED
8007cb4: 2b 8c 00 40 lw r12,(sp+64) <== NOT EXECUTED
8007cb8: 2b 8d 00 3c lw r13,(sp+60) <== NOT EXECUTED
8007cbc: 2b 8e 00 38 lw r14,(sp+56) <== NOT EXECUTED
8007cc0: 2b 8f 00 34 lw r15,(sp+52) <== NOT EXECUTED
8007cc4: 2b 90 00 30 lw r16,(sp+48) <== NOT EXECUTED
8007cc8: 2b 91 00 2c lw r17,(sp+44) <== NOT EXECUTED
8007ccc: 2b 92 00 28 lw r18,(sp+40) <== NOT EXECUTED
8007cd0: 2b 93 00 24 lw r19,(sp+36) <== NOT EXECUTED
8007cd4: 2b 94 00 20 lw r20,(sp+32) <== NOT EXECUTED
8007cd8: 2b 95 00 1c lw r21,(sp+28) <== NOT EXECUTED
8007cdc: 2b 96 00 18 lw r22,(sp+24) <== NOT EXECUTED
8007ce0: 2b 97 00 14 lw r23,(sp+20) <== NOT EXECUTED
8007ce4: 2b 98 00 10 lw r24,(sp+16) <== NOT EXECUTED
8007ce8: 2b 99 00 0c lw r25,(sp+12) <== NOT EXECUTED
8007cec: 2b 9b 00 08 lw fp,(sp+8) <== NOT EXECUTED
8007cf0: 37 9c 01 10 addi sp,sp,272 <== NOT EXECUTED
8007cf4: c3 a0 00 00 ret <== NOT EXECUTED
for (i=0; i<512; i++)
{
if ((i >= 148) && (i < 156))
sum += 0xff & ' ';
else
sum += 0xff & bufr[i];
8007cf8: 40 c5 00 00 lbu r5,(r6+0) <== NOT EXECUTED
8007cfc: b4 85 20 00 add r4,r4,r5 <== NOT EXECUTED
8007d00: e3 ff ff d5 bi 8007c54 <Untar_FromFile+0x158> <== NOT EXECUTED
* We've decoded the header, now figure out what it contains and
* do something with it.
*****************************************************************/
if (linkflag == SYMTYPE)
{
strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE);
8007d04: 2b 82 00 48 lw r2,(sp+72) <== NOT EXECUTED
8007d08: 37 81 00 4c addi r1,sp,76 <== NOT EXECUTED
8007d0c: 34 03 00 63 mvi r3,99 <== NOT EXECUTED
8007d10: f8 00 29 83 calli 801231c <strncpy> <== NOT EXECUTED
linkname[MAX_NAME_FIELD_SIZE] = '\0';
8007d14: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
symlink(linkname,fname);
8007d18: 37 81 00 4c addi r1,sp,76 <== NOT EXECUTED
8007d1c: ba e0 10 00 mv r2,r23 <== NOT EXECUTED
* do something with it.
*****************************************************************/
if (linkflag == SYMTYPE)
{
strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE);
linkname[MAX_NAME_FIELD_SIZE] = '\0';
8007d20: 33 83 00 af sb (sp+175),r3 <== NOT EXECUTED
symlink(linkname,fname);
8007d24: f8 00 09 9c calli 800a394 <symlink> <== NOT EXECUTED
8007d28: e3 ff ff 9c bi 8007b98 <Untar_FromFile+0x9c> <== NOT EXECUTED
/******************************************************************
* Read out the data. There are nblocks of data where nblocks
* is the size rounded to the nearest 512-byte boundary.
*****************************************************************/
nblocks = (((size) + 511) & ~511) / 512;
8007d2c: 34 02 fe 00 mvi r2,-512 <== NOT EXECUTED
8007d30: 36 01 01 ff addi r1,r16,511 <== NOT EXECUTED
8007d34: a0 22 08 00 and r1,r1,r2 <== NOT EXECUTED
8007d38: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
8007d3c: fb ff e1 fe calli 8000534 <__lshrsi3> <== NOT EXECUTED
8007d40: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
if ((out_fd = creat(fname, 0644)) == -1)
8007d44: 34 02 01 a4 mvi r2,420 <== NOT EXECUTED
8007d48: ba e0 08 00 mv r1,r23 <== NOT EXECUTED
8007d4c: f8 00 1f 29 calli 800f9f0 <creat> <== NOT EXECUTED
8007d50: b8 20 88 00 mv r17,r1 <== NOT EXECUTED
8007d54: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8007d58: 46 21 00 13 be r17,r1,8007da4 <Untar_FromFile+0x2a8> <== NOT EXECUTED
{
for (i=0; i<nblocks; i++)
8007d5c: 34 0e 00 00 mvi r14,0 <== NOT EXECUTED
n = read(fd, bufr, 512);
}
}
else
{
for (i=0; i<nblocks; i++)
8007d60: 45 ee 00 0e be r15,r14,8007d98 <Untar_FromFile+0x29c> <== NOT EXECUTED
{
n = read(fd, bufr, 512);
8007d64: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8007d68: 34 03 02 00 mvi r3,512 <== NOT EXECUTED
8007d6c: ba c0 08 00 mv r1,r22 <== NOT EXECUTED
8007d70: fb ff ed 3b calli 800325c <read> <== NOT EXECUTED
8007d74: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
n = read(fd, bufr, 512);
}
}
else
{
for (i=0; i<nblocks; i++)
8007d78: 35 ce 00 01 addi r14,r14,1 <== NOT EXECUTED
{
n = read(fd, bufr, 512);
n = MIN(n, size - i*512);
write(out_fd, bufr, n);
8007d7c: ba 20 08 00 mv r1,r17 <== NOT EXECUTED
8007d80: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8007d84: 52 03 00 02 bgeu r16,r3,8007d8c <Untar_FromFile+0x290> <== NOT EXECUTED
8007d88: ba 00 18 00 mv r3,r16 <== NOT EXECUTED
8007d8c: f8 00 09 dc calli 800a4fc <write> <== NOT EXECUTED
n = read(fd, bufr, 512);
}
}
else
{
for (i=0; i<nblocks; i++)
8007d90: 36 10 fe 00 addi r16,r16,-512 <== NOT EXECUTED
8007d94: 55 ee ff f4 bgu r15,r14,8007d64 <Untar_FromFile+0x268> <== NOT EXECUTED
{
n = read(fd, bufr, 512);
n = MIN(n, size - i*512);
write(out_fd, bufr, n);
}
close(out_fd);
8007d98: ba 20 08 00 mv r1,r17 <== NOT EXECUTED
8007d9c: fb ff e5 fa calli 8001584 <close> <== NOT EXECUTED
8007da0: e3 ff ff 7e bi 8007b98 <Untar_FromFile+0x9c> <== NOT EXECUTED
*****************************************************************/
nblocks = (((size) + 511) & ~511) / 512;
if ((out_fd = creat(fname, 0644)) == -1)
{
for (i=0; i<nblocks; i++)
8007da4: 45 e0 ff 7d be r15,r0,8007b98 <Untar_FromFile+0x9c> <== NOT EXECUTED
8007da8: 34 0e 00 00 mvi r14,0 <== NOT EXECUTED
8007dac: 35 ce 00 01 addi r14,r14,1 <== NOT EXECUTED
{
n = read(fd, bufr, 512);
8007db0: ba c0 08 00 mv r1,r22 <== NOT EXECUTED
8007db4: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8007db8: 34 03 02 00 mvi r3,512 <== NOT EXECUTED
8007dbc: fb ff ed 28 calli 800325c <read> <== NOT EXECUTED
*****************************************************************/
nblocks = (((size) + 511) & ~511) / 512;
if ((out_fd = creat(fname, 0644)) == -1)
{
for (i=0; i<nblocks; i++)
8007dc0: 55 ee ff fb bgu r15,r14,8007dac <Untar_FromFile+0x2b0> <== NOT EXECUTED
8007dc4: e3 ff ff 75 bi 8007b98 <Untar_FromFile+0x9c> <== NOT EXECUTED
* header, but the checksum field is substituted with blanks.
******************************************************************/
hdr_chksum = _rtems_octal2ulong(&bufr[148], 8);
sum = _rtems_tar_header_checksum(bufr);
if (sum != hdr_chksum)
8007dc8: 34 0c 00 02 mvi r12,2 <== NOT EXECUTED
8007dcc: e3 ff ff b3 bi 8007c98 <Untar_FromFile+0x19c> <== NOT EXECUTED
08007dd0 <Untar_FromMemory>:
int
Untar_FromMemory(
void *tar_buf,
size_t size
)
{
8007dd0: 37 9c fe f4 addi sp,sp,-268
8007dd4: 5b 8b 00 44 sw (sp+68),r11
8007dd8: 5b 8c 00 40 sw (sp+64),r12
8007ddc: 5b 8d 00 3c sw (sp+60),r13
8007de0: 5b 8e 00 38 sw (sp+56),r14
8007de4: 5b 8f 00 34 sw (sp+52),r15
8007de8: 5b 90 00 30 sw (sp+48),r16
8007dec: 5b 91 00 2c sw (sp+44),r17
8007df0: 5b 92 00 28 sw (sp+40),r18
8007df4: 5b 93 00 24 sw (sp+36),r19
8007df8: 5b 94 00 20 sw (sp+32),r20
8007dfc: 5b 95 00 1c sw (sp+28),r21
8007e00: 5b 96 00 18 sw (sp+24),r22
8007e04: 5b 97 00 14 sw (sp+20),r23
8007e08: 5b 98 00 10 sw (sp+16),r24
8007e0c: 5b 99 00 0c sw (sp+12),r25
8007e10: 5b 9b 00 08 sw (sp+8),fp
8007e14: 5b 9d 00 04 sw (sp+4),ra
FILE *fp;
const char *tar_ptr = (const char *)tar_buf;
8007e18: 34 0b 00 00 mvi r11,0
int
Untar_FromMemory(
void *tar_buf,
size_t size
)
{
8007e1c: b8 20 b8 00 mv r23,r1
8007e20: b8 40 c8 00 mv r25,r2
}
/* Read the header */
bufr = &tar_ptr[ptr];
ptr += 512;
if (strncmp(&bufr[257], "ustar ", 7))
8007e24: 78 18 08 02 mvhi r24,0x802
8007e28: 34 0d 00 07 mvi r13,7
{
retval = UNTAR_SUCCESSFUL;
break;
}
strncpy(fname, bufr, MAX_NAME_FIELD_SIZE);
8007e2c: 37 96 00 ac addi r22,sp,172
unsigned long num;
num = 0;
for (i=0; i < len; i++)
{
if ((octascii[i] < '0') || (octascii[i] > '9'))
8007e30: 34 12 00 09 mvi r18,9
)
{
int i, sum;
sum = 0;
for (i=0; i<512; i++)
8007e34: 34 0c 02 00 mvi r12,512
/******************************************************************
* We've decoded the header, now figure out what it contains and
* do something with it.
*****************************************************************/
if (linkflag == SYMTYPE)
8007e38: 34 1b 00 32 mvi fp,50
ptr = 0;
while (1)
{
if (ptr + 512 > size)
8007e3c: 35 74 02 00 addi r20,r11,512
8007e40: 56 99 00 70 bgu r20,r25,8008000 <Untar_FromMemory+0x230> <== NEVER TAKEN
retval = UNTAR_SUCCESSFUL;
break;
}
/* Read the header */
bufr = &tar_ptr[ptr];
8007e44: b6 eb 58 00 add r11,r23,r11
ptr += 512;
if (strncmp(&bufr[257], "ustar ", 7))
8007e48: bb 00 10 00 mv r2,r24
8007e4c: 35 61 01 01 addi r1,r11,257
8007e50: 38 42 2c a8 ori r2,r2,0x2ca8
8007e54: 34 03 00 07 mvi r3,7
8007e58: f8 00 28 ed calli 801220c <strncmp>
8007e5c: b8 20 88 00 mv r17,r1
8007e60: 5c 20 00 68 bne r1,r0,8008000 <Untar_FromMemory+0x230> <== NEVER TAKEN
{
retval = UNTAR_SUCCESSFUL;
break;
}
strncpy(fname, bufr, MAX_NAME_FIELD_SIZE);
8007e64: ba c0 08 00 mv r1,r22
8007e68: b9 60 10 00 mv r2,r11
8007e6c: 34 03 00 63 mvi r3,99
8007e70: f8 00 29 2b calli 801231c <strncpy>
fname[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = bufr[156];
8007e74: b9 60 78 00 mv r15,r11
8007e78: 41 75 00 9c lbu r21,(r11+156)
* UNTAR_INVALID_CHECKSUM for an invalid header checksum. *
* UNTAR_INVALID_HEADER for an invalid header. *
* *
**************************************************************************/
int
Untar_FromMemory(
8007e7c: 35 73 00 0c addi r19,r11,12
retval = UNTAR_SUCCESSFUL;
break;
}
strncpy(fname, bufr, MAX_NAME_FIELD_SIZE);
fname[MAX_NAME_FIELD_SIZE] = '\0';
8007e80: 33 91 01 0f sb (sp+271),r17
* UNTAR_INVALID_CHECKSUM for an invalid header checksum. *
* UNTAR_INVALID_HEADER for an invalid header. *
* *
**************************************************************************/
int
Untar_FromMemory(
8007e84: b9 60 70 00 mv r14,r11
unsigned long num;
num = 0;
for (i=0; i < len; i++)
{
if ((octascii[i] < '0') || (octascii[i] > '9'))
8007e88: 41 d0 00 7c lbu r16,(r14+124)
{
continue;
}
num = num * 8 + ((unsigned long)(octascii[i] - '0'));
8007e8c: ba 20 08 00 mv r1,r17
8007e90: 34 02 00 03 mvi r2,3
unsigned long num;
num = 0;
for (i=0; i < len; i++)
{
if ((octascii[i] < '0') || (octascii[i] > '9'))
8007e94: 36 10 ff d0 addi r16,r16,-48
8007e98: 22 03 00 ff andi r3,r16,0xff
{
continue;
}
num = num * 8 + ((unsigned long)(octascii[i] - '0'));
8007e9c: 35 ce 00 01 addi r14,r14,1
unsigned long num;
num = 0;
for (i=0; i < len; i++)
{
if ((octascii[i] < '0') || (octascii[i] > '9'))
8007ea0: 54 72 00 03 bgu r3,r18,8007eac <Untar_FromMemory+0xdc>
{
continue;
}
num = num * 8 + ((unsigned long)(octascii[i] - '0'));
8007ea4: fb ff e1 7c calli 8000494 <__ashlsi3>
8007ea8: b6 01 88 00 add r17,r16,r1
{
size_t i;
unsigned long num;
num = 0;
for (i=0; i < len; i++)
8007eac: 5d d3 ff f7 bne r14,r19,8007e88 <Untar_FromMemory+0xb8>
* UNTAR_INVALID_CHECKSUM for an invalid header checksum. *
* UNTAR_INVALID_HEADER for an invalid header. *
* *
**************************************************************************/
int
Untar_FromMemory(
8007eb0: 35 70 00 08 addi r16,r11,8
8007eb4: 34 07 00 00 mvi r7,0
unsigned long num;
num = 0;
for (i=0; i < len; i++)
{
if ((octascii[i] < '0') || (octascii[i] > '9'))
8007eb8: 41 ee 00 94 lbu r14,(r15+148)
{
continue;
}
num = num * 8 + ((unsigned long)(octascii[i] - '0'));
8007ebc: b8 e0 08 00 mv r1,r7
8007ec0: 34 02 00 03 mvi r2,3
unsigned long num;
num = 0;
for (i=0; i < len; i++)
{
if ((octascii[i] < '0') || (octascii[i] > '9'))
8007ec4: 35 ce ff d0 addi r14,r14,-48
8007ec8: 21 c3 00 ff andi r3,r14,0xff
{
continue;
}
num = num * 8 + ((unsigned long)(octascii[i] - '0'));
8007ecc: 35 ef 00 01 addi r15,r15,1
unsigned long num;
num = 0;
for (i=0; i < len; i++)
{
if ((octascii[i] < '0') || (octascii[i] > '9'))
8007ed0: 54 72 00 03 bgu r3,r18,8007edc <Untar_FromMemory+0x10c>
{
continue;
}
num = num * 8 + ((unsigned long)(octascii[i] - '0'));
8007ed4: fb ff e1 70 calli 8000494 <__ashlsi3>
8007ed8: b5 c1 38 00 add r7,r14,r1
{
size_t i;
unsigned long num;
num = 0;
for (i=0; i < len; i++)
8007edc: 5d f0 ff f7 bne r15,r16,8007eb8 <Untar_FromMemory+0xe8>
8007ee0: 34 04 00 00 mvi r4,0
8007ee4: b8 80 18 00 mv r3,r4
int i, sum;
sum = 0;
for (i=0; i<512; i++)
{
if ((i >= 148) && (i < 156))
8007ee8: 34 65 ff 6c addi r5,r3,-148
sum += 0xff & ' ';
else
sum += 0xff & bufr[i];
8007eec: b5 63 30 00 add r6,r11,r3
int i, sum;
sum = 0;
for (i=0; i<512; i++)
{
if ((i >= 148) && (i < 156))
8007ef0: 54 ad 00 11 bgu r5,r13,8007f34 <Untar_FromMemory+0x164>
sum += 0xff & ' ';
8007ef4: 34 84 00 20 addi r4,r4,32
)
{
int i, sum;
sum = 0;
for (i=0; i<512; i++)
8007ef8: 34 63 00 01 addi r3,r3,1
8007efc: 5c 6c ff fb bne r3,r12,8007ee8 <Untar_FromMemory+0x118>
* header, but the checksum field is substituted with blanks.
******************************************************************/
hdr_chksum = _rtems_octal2ulong(&bufr[148], 8);
sum = _rtems_tar_header_checksum(bufr);
if (sum != hdr_chksum)
8007f00: 5c e4 00 54 bne r7,r4,8008050 <Untar_FromMemory+0x280> <== NEVER TAKEN
/******************************************************************
* We've decoded the header, now figure out what it contains and
* do something with it.
*****************************************************************/
if (linkflag == SYMTYPE)
8007f04: 46 bb 00 0f be r21,fp,8007f40 <Untar_FromMemory+0x170>
{
strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE);
linkname[MAX_NAME_FIELD_SIZE] = '\0';
symlink(linkname, fname);
}
else if (linkflag == REGTYPE)
8007f08: 34 01 00 30 mvi r1,48
8007f0c: 46 a1 00 18 be r21,r1,8007f6c <Untar_FromMemory+0x19c>
sizeToGo -= n;
}
fclose(fp);
}
}
else if (linkflag == DIRTYPE)
8007f10: 34 01 00 35 mvi r1,53
8007f14: 46 a1 00 03 be r21,r1,8007f20 <Untar_FromMemory+0x150> <== ALWAYS TAKEN
void *tar_buf,
size_t size
)
{
FILE *fp;
const char *tar_ptr = (const char *)tar_buf;
8007f18: ba 80 58 00 mv r11,r20 <== NOT EXECUTED
8007f1c: e3 ff ff c8 bi 8007e3c <Untar_FromMemory+0x6c> <== NOT EXECUTED
fclose(fp);
}
}
else if (linkflag == DIRTYPE)
{
mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO);
8007f20: ba c0 08 00 mv r1,r22
8007f24: 34 02 01 ff mvi r2,511
8007f28: fb ff e9 c9 calli 800264c <mkdir>
void *tar_buf,
size_t size
)
{
FILE *fp;
const char *tar_ptr = (const char *)tar_buf;
8007f2c: ba 80 58 00 mv r11,r20
8007f30: e3 ff ff c3 bi 8007e3c <Untar_FromMemory+0x6c>
for (i=0; i<512; i++)
{
if ((i >= 148) && (i < 156))
sum += 0xff & ' ';
else
sum += 0xff & bufr[i];
8007f34: 40 c5 00 00 lbu r5,(r6+0)
8007f38: b4 85 20 00 add r4,r4,r5
8007f3c: e3 ff ff ef bi 8007ef8 <Untar_FromMemory+0x128>
* We've decoded the header, now figure out what it contains and
* do something with it.
*****************************************************************/
if (linkflag == SYMTYPE)
{
strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE);
8007f40: 35 62 00 9d addi r2,r11,157
8007f44: 34 03 00 63 mvi r3,99
8007f48: 37 81 00 48 addi r1,sp,72
8007f4c: f8 00 28 f4 calli 801231c <strncpy>
linkname[MAX_NAME_FIELD_SIZE] = '\0';
8007f50: 34 03 00 00 mvi r3,0
symlink(linkname, fname);
8007f54: 37 81 00 48 addi r1,sp,72
8007f58: ba c0 10 00 mv r2,r22
* do something with it.
*****************************************************************/
if (linkflag == SYMTYPE)
{
strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE);
linkname[MAX_NAME_FIELD_SIZE] = '\0';
8007f5c: 33 83 00 ab sb (sp+171),r3
void *tar_buf,
size_t size
)
{
FILE *fp;
const char *tar_ptr = (const char *)tar_buf;
8007f60: ba 80 58 00 mv r11,r20
*****************************************************************/
if (linkflag == SYMTYPE)
{
strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE);
linkname[MAX_NAME_FIELD_SIZE] = '\0';
symlink(linkname, fname);
8007f64: f8 00 09 0c calli 800a394 <symlink>
8007f68: e3 ff ff b5 bi 8007e3c <Untar_FromMemory+0x6c>
}
else if (linkflag == REGTYPE)
{
nblocks = (((file_size) + 511) & ~511) / 512;
8007f6c: 34 02 fe 00 mvi r2,-512
8007f70: 36 21 01 ff addi r1,r17,511
8007f74: a0 22 08 00 and r1,r1,r2
8007f78: 34 02 00 09 mvi r2,9
8007f7c: fb ff e1 6e calli 8000534 <__lshrsi3>
if ((fp = fopen(fname, "w")) == NULL)
8007f80: 78 02 08 02 mvhi r2,0x802
linkname[MAX_NAME_FIELD_SIZE] = '\0';
symlink(linkname, fname);
}
else if (linkflag == REGTYPE)
{
nblocks = (((file_size) + 511) & ~511) / 512;
8007f84: b8 20 98 00 mv r19,r1
if ((fp = fopen(fname, "w")) == NULL)
8007f88: 38 42 2c b0 ori r2,r2,0x2cb0
8007f8c: ba c0 08 00 mv r1,r22
8007f90: f8 00 21 22 calli 8010418 <fopen>
8007f94: b8 20 80 00 mv r16,r1
8007f98: 44 20 00 30 be r1,r0,8008058 <Untar_FromMemory+0x288> <== NEVER TAKEN
{
printk("Untar: failed to create file %s\n", fname);
ptr += 512 * nblocks;
8007f9c: 34 0e 00 00 mvi r14,0
8007fa0: b6 f4 78 00 add r15,r23,r20
/***************************************************************
* Read out the data. There are nblocks of data where nblocks
* is the file_size rounded to the nearest 512-byte boundary.
**************************************************************/
for (i=0; i<nblocks; i++)
8007fa4: 5e 6e 00 05 bne r19,r14,8007fb8 <Untar_FromMemory+0x1e8> <== ALWAYS TAKEN
8007fa8: e0 00 00 12 bi 8007ff0 <Untar_FromMemory+0x220> <== NOT EXECUTED
{
printk("untar: Error during write\n");
break;
}
ptr += 512;
sizeToGo -= n;
8007fac: ca 2b 88 00 sub r17,r17,r11
if (n != len)
{
printk("untar: Error during write\n");
break;
}
ptr += 512;
8007fb0: 36 94 02 00 addi r20,r20,512
/***************************************************************
* Read out the data. There are nblocks of data where nblocks
* is the file_size rounded to the nearest 512-byte boundary.
**************************************************************/
for (i=0; i<nblocks; i++)
8007fb4: 51 d3 00 0f bgeu r14,r19,8007ff0 <Untar_FromMemory+0x220> <== ALWAYS TAKEN
{
len = ((sizeToGo < 512L)?(sizeToGo):(512L));
n = fwrite(&tar_ptr[ptr], 1, len, fp);
8007fb8: 34 02 00 01 mvi r2,1
8007fbc: b9 e0 08 00 mv r1,r15
8007fc0: ba 00 20 00 mv r4,r16
/***************************************************************
* Read out the data. There are nblocks of data where nblocks
* is the file_size rounded to the nearest 512-byte boundary.
**************************************************************/
for (i=0; i<nblocks; i++)
8007fc4: b5 c2 70 00 add r14,r14,r2
8007fc8: 35 ef 02 00 addi r15,r15,512
{
len = ((sizeToGo < 512L)?(sizeToGo):(512L));
8007fcc: ba 20 58 00 mv r11,r17
8007fd0: 51 91 00 02 bgeu r12,r17,8007fd8 <Untar_FromMemory+0x208> <== ALWAYS TAKEN
8007fd4: 34 0b 02 00 mvi r11,512 <== NOT EXECUTED
n = fwrite(&tar_ptr[ptr], 1, len, fp);
8007fd8: b9 60 18 00 mv r3,r11
8007fdc: f8 00 23 27 calli 8010c78 <fwrite>
if (n != len)
8007fe0: 45 61 ff f3 be r11,r1,8007fac <Untar_FromMemory+0x1dc> <== ALWAYS TAKEN
{
printk("untar: Error during write\n");
8007fe4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8007fe8: 38 21 2c d8 ori r1,r1,0x2cd8 <== NOT EXECUTED
8007fec: fb ff ec 8d calli 8003220 <printk> <== NOT EXECUTED
break;
}
ptr += 512;
sizeToGo -= n;
}
fclose(fp);
8007ff0: ba 00 08 00 mv r1,r16
8007ff4: f8 00 1e e9 calli 800fb98 <fclose>
void *tar_buf,
size_t size
)
{
FILE *fp;
const char *tar_ptr = (const char *)tar_buf;
8007ff8: ba 80 58 00 mv r11,r20
8007ffc: e3 ff ff 90 bi 8007e3c <Untar_FromMemory+0x6c>
fclose(fp);
}
}
else if (linkflag == DIRTYPE)
{
mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO);
8008000: 34 01 00 00 mvi r1,0
}
}
return(retval);
}
8008004: 2b 9d 00 04 lw ra,(sp+4)
8008008: 2b 8b 00 44 lw r11,(sp+68)
800800c: 2b 8c 00 40 lw r12,(sp+64)
8008010: 2b 8d 00 3c lw r13,(sp+60)
8008014: 2b 8e 00 38 lw r14,(sp+56)
8008018: 2b 8f 00 34 lw r15,(sp+52)
800801c: 2b 90 00 30 lw r16,(sp+48)
8008020: 2b 91 00 2c lw r17,(sp+44)
8008024: 2b 92 00 28 lw r18,(sp+40)
8008028: 2b 93 00 24 lw r19,(sp+36)
800802c: 2b 94 00 20 lw r20,(sp+32)
8008030: 2b 95 00 1c lw r21,(sp+28)
8008034: 2b 96 00 18 lw r22,(sp+24)
8008038: 2b 97 00 14 lw r23,(sp+20)
800803c: 2b 98 00 10 lw r24,(sp+16)
8008040: 2b 99 00 0c lw r25,(sp+12)
8008044: 2b 9b 00 08 lw fp,(sp+8)
8008048: 37 9c 01 0c addi sp,sp,268
800804c: c3 a0 00 00 ret
* header, but the checksum field is substituted with blanks.
******************************************************************/
hdr_chksum = _rtems_octal2ulong(&bufr[148], 8);
sum = _rtems_tar_header_checksum(bufr);
if (sum != hdr_chksum)
8008050: 34 01 00 02 mvi r1,2 <== NOT EXECUTED
8008054: e3 ff ff ec bi 8008004 <Untar_FromMemory+0x234> <== NOT EXECUTED
else if (linkflag == REGTYPE)
{
nblocks = (((file_size) + 511) & ~511) / 512;
if ((fp = fopen(fname, "w")) == NULL)
{
printk("Untar: failed to create file %s\n", fname);
8008058: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800805c: ba c0 10 00 mv r2,r22 <== NOT EXECUTED
8008060: 38 21 2c b4 ori r1,r1,0x2cb4 <== NOT EXECUTED
8008064: fb ff ec 6f calli 8003220 <printk> <== NOT EXECUTED
ptr += 512 * nblocks;
8008068: ba 60 08 00 mv r1,r19 <== NOT EXECUTED
800806c: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
8008070: fb ff e1 09 calli 8000494 <__ashlsi3> <== NOT EXECUTED
8008074: b6 81 a0 00 add r20,r20,r1 <== NOT EXECUTED
void *tar_buf,
size_t size
)
{
FILE *fp;
const char *tar_ptr = (const char *)tar_buf;
8008078: ba 80 58 00 mv r11,r20 <== NOT EXECUTED
800807c: e3 ff ff 70 bi 8007e3c <Untar_FromMemory+0x6c> <== NOT EXECUTED
08002bd0 <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
8002bd0: 37 9c ff f4 addi sp,sp,-12
8002bd4: 5b 8b 00 0c sw (sp+12),r11
8002bd8: 5b 8c 00 08 sw (sp+8),r12
8002bdc: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
8002be0: 78 0c 08 01 mvhi r12,0x801
8002be4: 39 8c ea 58 ori r12,r12,0xea58
8002be8: 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;
8002bec: 35 8c 00 04 addi r12,r12,4
8002bf0: 45 6c 00 05 be r11,r12,8002c04 <_API_extensions_Run_postdriver+0x34><== NEVER TAKEN
* Currently all APIs configure this hook so it is always non-NULL.
*/
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
8002bf4: 29 61 00 08 lw r1,(r11+8)
8002bf8: d8 20 00 00 call r1
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
8002bfc: 29 6b 00 00 lw r11,(r11+0)
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
8002c00: 5d 6c ff fd bne r11,r12,8002bf4 <_API_extensions_Run_postdriver+0x24>
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
8002c04: 2b 9d 00 04 lw ra,(sp+4)
8002c08: 2b 8b 00 0c lw r11,(sp+12)
8002c0c: 2b 8c 00 08 lw r12,(sp+8)
8002c10: 37 9c 00 0c addi sp,sp,12
8002c14: c3 a0 00 00 ret
08002c18 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
8002c18: 37 9c ff f0 addi sp,sp,-16
8002c1c: 5b 8b 00 10 sw (sp+16),r11
8002c20: 5b 8c 00 0c sw (sp+12),r12
8002c24: 5b 8d 00 08 sw (sp+8),r13
8002c28: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
8002c2c: 78 0d 08 01 mvhi r13,0x801
8002c30: 39 ad ea 58 ori r13,r13,0xea58
8002c34: 29 ab 00 00 lw r11,(r13+0)
8002c38: 35 ad 00 04 addi r13,r13,4
8002c3c: 45 6d 00 08 be r11,r13,8002c5c <_API_extensions_Run_postswitch+0x44><== NEVER TAKEN
8002c40: 78 0c 08 01 mvhi r12,0x801
8002c44: 39 8c e9 60 ori r12,r12,0xe960
* provide this hook.
*/
#if defined(RTEMS_ITRON_API)
if ( the_extension->postswitch_hook )
#endif
(*the_extension->postswitch_hook)( _Thread_Executing );
8002c48: 29 62 00 0c lw r2,(r11+12)
8002c4c: 29 81 00 00 lw r1,(r12+0)
8002c50: d8 40 00 00 call r2
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
8002c54: 29 6b 00 00 lw r11,(r11+0)
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
8002c58: 5d 6d ff fc bne r11,r13,8002c48 <_API_extensions_Run_postswitch+0x30>
#if defined(RTEMS_ITRON_API)
if ( the_extension->postswitch_hook )
#endif
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
8002c5c: 2b 9d 00 04 lw ra,(sp+4)
8002c60: 2b 8b 00 10 lw r11,(sp+16)
8002c64: 2b 8c 00 0c lw r12,(sp+12)
8002c68: 2b 8d 00 08 lw r13,(sp+8)
8002c6c: 37 9c 00 10 addi sp,sp,16
8002c70: c3 a0 00 00 ret
08005a30 <_CORE_RWLock_Obtain_for_reading>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
8005a30: 37 9c ff e4 addi sp,sp,-28
8005a34: 5b 8b 00 14 sw (sp+20),r11
8005a38: 5b 8c 00 10 sw (sp+16),r12
8005a3c: 5b 8d 00 0c sw (sp+12),r13
8005a40: 5b 8e 00 08 sw (sp+8),r14
8005a44: 5b 9d 00 04 sw (sp+4),ra
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
8005a48: 78 05 08 02 mvhi r5,0x802
8005a4c: 38 a5 29 38 ori r5,r5,0x2938
8005a50: 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
)
{
8005a54: b8 20 58 00 mv r11,r1
8005a58: 20 6e 00 ff andi r14,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 );
8005a5c: 90 00 68 00 rcsr r13,IE
8005a60: 34 01 ff fe mvi r1,-2
8005a64: a1 a1 08 00 and r1,r13,r1
8005a68: d0 01 00 00 wcsr IE,r1
switch ( the_rwlock->current_state ) {
8005a6c: 29 61 00 44 lw r1,(r11+68)
8005a70: 44 20 00 30 be r1,r0,8005b30 <_CORE_RWLock_Obtain_for_reading+0x100>
8005a74: 34 03 00 01 mvi r3,1
8005a78: 44 23 00 20 be r1,r3,8005af8 <_CORE_RWLock_Obtain_for_reading+0xc8>
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
8005a7c: 34 01 00 00 mvi r1,0
8005a80: 5d c1 00 0b bne r14,r1,8005aac <_CORE_RWLock_Obtain_for_reading+0x7c>
_ISR_Enable( level );
8005a84: d0 0d 00 00 wcsr IE,r13
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
8005a88: 34 01 00 02 mvi r1,2
8005a8c: 59 81 00 34 sw (r12+52),r1
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
8005a90: 2b 9d 00 04 lw ra,(sp+4)
8005a94: 2b 8b 00 14 lw r11,(sp+20)
8005a98: 2b 8c 00 10 lw r12,(sp+16)
8005a9c: 2b 8d 00 0c lw r13,(sp+12)
8005aa0: 2b 8e 00 08 lw r14,(sp+8)
8005aa4: 37 9c 00 1c addi sp,sp,28
8005aa8: c3 a0 00 00 ret
8005aac: 34 03 00 01 mvi r3,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;
8005ab0: 59 81 00 34 sw (r12+52),r1
8005ab4: 59 63 00 30 sw (r11+48),r3
* 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;
8005ab8: 59 82 00 20 sw (r12+32),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;
8005abc: 59 8b 00 44 sw (r12+68),r11
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
8005ac0: 59 81 00 30 sw (r12+48),r1
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
8005ac4: d0 0d 00 00 wcsr IE,r13
_Thread_queue_Enqueue_with_handler(
8005ac8: 78 03 08 00 mvhi r3,0x800
8005acc: b9 60 08 00 mv r1,r11
8005ad0: b8 80 10 00 mv r2,r4
8005ad4: 38 63 5d 34 ori r3,r3,0x5d34
8005ad8: f8 00 07 a7 calli 8007974 <_Thread_queue_Enqueue_with_handler>
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
8005adc: 2b 9d 00 04 lw ra,(sp+4)
8005ae0: 2b 8b 00 14 lw r11,(sp+20)
8005ae4: 2b 8c 00 10 lw r12,(sp+16)
8005ae8: 2b 8d 00 0c lw r13,(sp+12)
8005aec: 2b 8e 00 08 lw r14,(sp+8)
8005af0: 37 9c 00 1c addi sp,sp,28
8005af4: c3 a0 00 00 ret
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 );
8005af8: b9 60 08 00 mv r1,r11
8005afc: 5b 82 00 1c sw (sp+28),r2
8005b00: 5b 84 00 18 sw (sp+24),r4
8005b04: f8 00 08 af calli 8007dc0 <_Thread_queue_First>
if ( !waiter ) {
8005b08: 2b 82 00 1c lw r2,(sp+28)
8005b0c: 2b 84 00 18 lw r4,(sp+24)
8005b10: 5c 20 ff db bne r1,r0,8005a7c <_CORE_RWLock_Obtain_for_reading+0x4c><== NEVER TAKEN
the_rwlock->number_of_readers += 1;
8005b14: 29 61 00 48 lw r1,(r11+72)
8005b18: 34 21 00 01 addi r1,r1,1
8005b1c: 59 61 00 48 sw (r11+72),r1
_ISR_Enable( level );
8005b20: d0 0d 00 00 wcsr IE,r13
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
8005b24: 34 01 00 00 mvi r1,0
8005b28: 59 81 00 34 sw (r12+52),r1
return;
8005b2c: e3 ff ff d9 bi 8005a90 <_CORE_RWLock_Obtain_for_reading+0x60>
_ISR_Disable( level );
switch ( the_rwlock->current_state ) {
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
the_rwlock->number_of_readers += 1;
8005b30: 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;
8005b34: 34 02 00 01 mvi r2,1
8005b38: 59 62 00 44 sw (r11+68),r2
the_rwlock->number_of_readers += 1;
8005b3c: b4 22 08 00 add r1,r1,r2
8005b40: 59 61 00 48 sw (r11+72),r1
_ISR_Enable( level );
8005b44: d0 0d 00 00 wcsr IE,r13
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
8005b48: 34 01 00 00 mvi r1,0
8005b4c: 59 81 00 34 sw (r12+52),r1
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
8005b50: 2b 9d 00 04 lw ra,(sp+4)
8005b54: 2b 8b 00 14 lw r11,(sp+20)
8005b58: 2b 8c 00 10 lw r12,(sp+16)
8005b5c: 2b 8d 00 0c lw r13,(sp+12)
8005b60: 2b 8e 00 08 lw r14,(sp+8)
8005b64: 37 9c 00 1c addi sp,sp,28
8005b68: c3 a0 00 00 ret
08005c14 <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
8005c14: 37 9c ff f4 addi sp,sp,-12
8005c18: 5b 8b 00 0c sw (sp+12),r11
8005c1c: 5b 8c 00 08 sw (sp+8),r12
8005c20: 5b 9d 00 04 sw (sp+4),ra
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
8005c24: 78 02 08 02 mvhi r2,0x802
8005c28: 38 42 29 38 ori r2,r2,0x2938
8005c2c: 28 43 00 00 lw r3,(r2+0)
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
8005c30: 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 );
8005c34: 90 00 08 00 rcsr r1,IE
8005c38: 34 02 ff fe mvi r2,-2
8005c3c: a0 22 10 00 and r2,r1,r2
8005c40: d0 02 00 00 wcsr IE,r2
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
8005c44: 29 62 00 44 lw r2,(r11+68)
8005c48: 44 40 00 2f be r2,r0,8005d04 <_CORE_RWLock_Release+0xf0>
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
8005c4c: 34 04 00 01 mvi r4,1
8005c50: 44 44 00 22 be r2,r4,8005cd8 <_CORE_RWLock_Release+0xc4>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
8005c54: 34 02 00 00 mvi r2,0
8005c58: 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;
8005c5c: 59 62 00 44 sw (r11+68),r2
_ISR_Enable( level );
8005c60: d0 01 00 00 wcsr IE,r1
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
8005c64: b9 60 08 00 mv r1,r11
8005c68: f8 00 06 cf calli 80077a4 <_Thread_queue_Dequeue>
if ( next ) {
8005c6c: 44 20 00 15 be r1,r0,8005cc0 <_CORE_RWLock_Release+0xac>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
8005c70: 28 21 00 30 lw r1,(r1+48)
8005c74: 34 0c 00 01 mvi r12,1
8005c78: 44 2c 00 2c be r1,r12,8005d28 <_CORE_RWLock_Release+0x114>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
8005c7c: 29 61 00 48 lw r1,(r11+72)
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
8005c80: 59 6c 00 44 sw (r11+68),r12
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
8005c84: 34 21 00 01 addi r1,r1,1
8005c88: 59 61 00 48 sw (r11+72),r1
8005c8c: e0 00 00 07 bi 8005ca8 <_CORE_RWLock_Release+0x94>
* 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 )
8005c90: 28 63 00 30 lw r3,(r3+48)
8005c94: 44 6c 00 0b be r3,r12,8005cc0 <_CORE_RWLock_Release+0xac> <== NEVER TAKEN
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
8005c98: 29 63 00 48 lw r3,(r11+72)
8005c9c: 34 63 00 01 addi r3,r3,1
8005ca0: 59 63 00 48 sw (r11+72),r3
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
8005ca4: f8 00 07 f6 calli 8007c7c <_Thread_queue_Extract>
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
8005ca8: b9 60 08 00 mv r1,r11
8005cac: f8 00 08 45 calli 8007dc0 <_Thread_queue_First>
8005cb0: 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 );
8005cb4: b8 20 10 00 mv r2,r1
8005cb8: 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 ||
8005cbc: 5c 60 ff f5 bne r3,r0,8005c90 <_CORE_RWLock_Release+0x7c>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
8005cc0: 34 01 00 00 mvi r1,0
8005cc4: 2b 9d 00 04 lw ra,(sp+4)
8005cc8: 2b 8b 00 0c lw r11,(sp+12)
8005ccc: 2b 8c 00 08 lw r12,(sp+8)
8005cd0: 37 9c 00 0c addi sp,sp,12
8005cd4: c3 a0 00 00 ret
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
the_rwlock->number_of_readers -= 1;
8005cd8: 29 62 00 48 lw r2,(r11+72)
8005cdc: 34 42 ff ff addi r2,r2,-1
8005ce0: 59 62 00 48 sw (r11+72),r2
if ( the_rwlock->number_of_readers != 0 ) {
8005ce4: 44 40 ff dc be r2,r0,8005c54 <_CORE_RWLock_Release+0x40>
/* must be unlocked again */
_ISR_Enable( level );
8005ce8: d0 01 00 00 wcsr IE,r1
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
8005cec: 34 01 00 00 mvi r1,0
8005cf0: 2b 9d 00 04 lw ra,(sp+4)
8005cf4: 2b 8b 00 0c lw r11,(sp+12)
8005cf8: 2b 8c 00 08 lw r12,(sp+8)
8005cfc: 37 9c 00 0c addi sp,sp,12
8005d00: c3 a0 00 00 ret
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
8005d04: d0 01 00 00 wcsr IE,r1
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
8005d08: 34 01 00 02 mvi r1,2
8005d0c: 58 61 00 34 sw (r3+52),r1
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
8005d10: 34 01 00 00 mvi r1,0
8005d14: 2b 9d 00 04 lw ra,(sp+4)
8005d18: 2b 8b 00 0c lw r11,(sp+12)
8005d1c: 2b 8c 00 08 lw r12,(sp+8)
8005d20: 37 9c 00 0c addi sp,sp,12
8005d24: c3 a0 00 00 ret
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
if ( next ) {
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
8005d28: 34 01 00 02 mvi r1,2
8005d2c: 59 61 00 44 sw (r11+68),r1
return CORE_RWLOCK_SUCCESSFUL;
8005d30: e3 ff ff e4 bi 8005cc0 <_CORE_RWLock_Release+0xac>
08005d34 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
8005d34: 37 9c ff f8 addi sp,sp,-8
8005d38: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
8005d3c: 37 82 00 08 addi r2,sp,8
8005d40: f8 00 05 6e calli 80072f8 <_Thread_Get>
switch ( location ) {
8005d44: 2b 82 00 08 lw r2,(sp+8)
8005d48: 5c 40 00 07 bne r2,r0,8005d64 <_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 );
8005d4c: f8 00 08 5e calli 8007ec4 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
8005d50: 78 01 08 02 mvhi r1,0x802
8005d54: 38 21 28 7c ori r1,r1,0x287c
8005d58: 28 22 00 00 lw r2,(r1+0)
8005d5c: 34 42 ff ff addi r2,r2,-1
8005d60: 58 22 00 00 sw (r1+0),r2
_Thread_Unnest_dispatch();
break;
}
}
8005d64: 2b 9d 00 04 lw ra,(sp+4)
8005d68: 37 9c 00 08 addi sp,sp,8
8005d6c: c3 a0 00 00 ret
080065a8 <_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
)
{
80065a8: 37 9c ff e4 addi sp,sp,-28
80065ac: 5b 8b 00 1c sw (sp+28),r11
80065b0: 5b 8c 00 18 sw (sp+24),r12
80065b4: 5b 8d 00 14 sw (sp+20),r13
80065b8: 5b 8e 00 10 sw (sp+16),r14
80065bc: 5b 8f 00 0c sw (sp+12),r15
80065c0: 5b 90 00 08 sw (sp+8),r16
80065c4: 5b 9d 00 04 sw (sp+4),ra
80065c8: b8 20 70 00 mv r14,r1
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
80065cc: 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
)
{
80065d0: b8 60 60 00 mv r12,r3
80065d4: b8 40 78 00 mv r15,r2
80065d8: b8 c0 80 00 mv r16,r6
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
80065dc: 50 23 00 0b bgeu r1,r3,8006608 <_CORE_message_queue_Broadcast+0x60><== ALWAYS TAKEN
80065e0: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
80065e4: 2b 9d 00 04 lw ra,(sp+4)
80065e8: 2b 8b 00 1c lw r11,(sp+28)
80065ec: 2b 8c 00 18 lw r12,(sp+24)
80065f0: 2b 8d 00 14 lw r13,(sp+20)
80065f4: 2b 8e 00 10 lw r14,(sp+16)
80065f8: 2b 8f 00 0c lw r15,(sp+12)
80065fc: 2b 90 00 08 lw r16,(sp+8)
8006600: 37 9c 00 1c addi sp,sp,28
8006604: c3 a0 00 00 ret
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
8006608: 29 c2 00 48 lw r2,(r14+72)
800660c: 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))) {
8006610: b8 40 68 00 mv r13,r2
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
8006614: 44 41 00 08 be r2,r1,8006634 <_CORE_message_queue_Broadcast+0x8c>
*count = 0;
8006618: 58 c1 00 00 sw (r6+0),r1
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
800661c: e3 ff ff f2 bi 80065e4 <_CORE_message_queue_Broadcast+0x3c>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
8006620: 29 61 00 2c lw r1,(r11+44)
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
8006624: 35 ad 00 01 addi r13,r13,1
8006628: f8 00 2e 2a calli 8011ed0 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
800662c: 29 61 00 28 lw r1,(r11+40)
8006630: 58 2c 00 00 sw (r1+0),r12
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
8006634: b9 c0 08 00 mv r1,r14
8006638: f8 00 09 25 calli 8008acc <_Thread_queue_Dequeue>
800663c: b8 20 58 00 mv r11,r1
8006640: b9 e0 10 00 mv r2,r15
8006644: b9 80 18 00 mv r3,r12
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
8006648: 5c 20 ff f6 bne r1,r0,8006620 <_CORE_message_queue_Broadcast+0x78>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
800664c: 5a 0d 00 00 sw (r16+0),r13
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
8006650: e3 ff ff e5 bi 80065e4 <_CORE_message_queue_Broadcast+0x3c>
0800ea44 <_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
)
{
800ea44: 37 9c ff e8 addi sp,sp,-24
800ea48: 5b 8b 00 18 sw (sp+24),r11
800ea4c: 5b 8c 00 14 sw (sp+20),r12
800ea50: 5b 8d 00 10 sw (sp+16),r13
800ea54: 5b 8e 00 0c sw (sp+12),r14
800ea58: 5b 8f 00 08 sw (sp+8),r15
800ea5c: 5b 9d 00 04 sw (sp+4),ra
800ea60: 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;
800ea64: 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;
800ea68: 59 61 00 64 sw (r11+100),r1
800ea6c: 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;
800ea70: 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;
800ea74: 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;
800ea78: 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)) {
800ea7c: 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
)
{
800ea80: b8 60 68 00 mv r13,r3
800ea84: 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)) {
800ea88: b8 80 60 00 mv r12,r4
800ea8c: 44 20 00 05 be r1,r0,800eaa0 <_CORE_message_queue_Initialize+0x5c>
allocated_message_size += sizeof(uint32_t);
800ea90: 34 8c 00 04 addi r12,r4,4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
800ea94: 34 01 ff fc mvi r1,-4
800ea98: a1 81 60 00 and r12,r12,r1
}
if (allocated_message_size < maximum_message_size)
800ea9c: 54 8c 00 23 bgu r4,r12,800eb28 <_CORE_message_queue_Initialize+0xe4><== 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));
800eaa0: 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 *
800eaa4: b9 c0 08 00 mv r1,r14
800eaa8: b9 a0 10 00 mv r2,r13
800eaac: f8 00 6d 33 calli 8029f78 <__mulsi3>
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
800eab0: 55 81 00 1e bgu r12,r1,800eb28 <_CORE_message_queue_Initialize+0xe4><== NEVER TAKEN
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
800eab4: f8 00 0e e8 calli 8012654 <_Workspace_Allocate>
800eab8: 59 61 00 5c sw (r11+92),r1
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
800eabc: 44 20 00 1b be r1,r0,800eb28 <_CORE_message_queue_Initialize+0xe4>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
800eac0: b8 20 10 00 mv r2,r1
800eac4: b9 a0 18 00 mv r3,r13
800eac8: b9 c0 20 00 mv r4,r14
800eacc: 35 61 00 68 addi r1,r11,104
800ead0: f8 00 1a 38 calli 80153b0 <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
800ead4: 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);
800ead8: 35 63 00 54 addi r3,r11,84
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
800eadc: 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);
800eae0: 59 63 00 50 sw (r11+80),r3
800eae4: 64 42 00 01 cmpei r2,r2,1
the_chain->permanent_null = NULL;
800eae8: 34 03 00 00 mvi r3,0
800eaec: 59 63 00 54 sw (r11+84),r3
the_chain->last = _Chain_Head(the_chain);
800eaf0: 59 61 00 58 sw (r11+88),r1
800eaf4: 34 03 00 80 mvi r3,128
800eaf8: b9 60 08 00 mv r1,r11
800eafc: 34 04 00 06 mvi r4,6
800eb00: f8 00 0b 1f calli 801177c <_Thread_queue_Initialize>
800eb04: 34 01 00 01 mvi r1,1
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
800eb08: 2b 9d 00 04 lw ra,(sp+4)
800eb0c: 2b 8b 00 18 lw r11,(sp+24)
800eb10: 2b 8c 00 14 lw r12,(sp+20)
800eb14: 2b 8d 00 10 lw r13,(sp+16)
800eb18: 2b 8e 00 0c lw r14,(sp+12)
800eb1c: 2b 8f 00 08 lw r15,(sp+8)
800eb20: 37 9c 00 18 addi sp,sp,24
800eb24: c3 a0 00 00 ret
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
800eb28: 34 01 00 00 mvi r1,0
}
800eb2c: 2b 9d 00 04 lw ra,(sp+4)
800eb30: 2b 8b 00 18 lw r11,(sp+24)
800eb34: 2b 8c 00 14 lw r12,(sp+20)
800eb38: 2b 8d 00 10 lw r13,(sp+16)
800eb3c: 2b 8e 00 0c lw r14,(sp+12)
800eb40: 2b 8f 00 08 lw r15,(sp+8)
800eb44: 37 9c 00 18 addi sp,sp,24
800eb48: c3 a0 00 00 ret
08002f64 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
8002f64: 37 9c ff e4 addi sp,sp,-28
8002f68: 5b 8b 00 18 sw (sp+24),r11
8002f6c: 5b 8c 00 14 sw (sp+20),r12
8002f70: 5b 8d 00 10 sw (sp+16),r13
8002f74: 5b 8e 00 0c sw (sp+12),r14
8002f78: 5b 8f 00 08 sw (sp+8),r15
8002f7c: 5b 9d 00 04 sw (sp+4),ra
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
8002f80: 78 0b 08 01 mvhi r11,0x801
8002f84: 39 6b e8 a4 ori r11,r11,0xe8a4
8002f88: 29 66 00 00 lw r6,(r11+0)
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
8002f8c: 5b 85 00 1c sw (sp+28),r5
8002f90: b8 20 60 00 mv r12,r1
8002f94: b8 40 78 00 mv r15,r2
8002f98: b8 80 70 00 mv r14,r4
8002f9c: 20 6d 00 ff andi r13,r3,0xff
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
8002fa0: 44 c0 00 02 be r6,r0,8002fa8 <_CORE_mutex_Seize+0x44>
8002fa4: 5d a0 00 15 bne r13,r0,8002ff8 <_CORE_mutex_Seize+0x94> <== ALWAYS TAKEN
8002fa8: b9 80 08 00 mv r1,r12
8002fac: 37 82 00 1c addi r2,sp,28
8002fb0: f8 00 19 2c calli 8009460 <_CORE_mutex_Seize_interrupt_trylock>
8002fb4: 44 20 00 09 be r1,r0,8002fd8 <_CORE_mutex_Seize+0x74>
8002fb8: 5d a0 00 19 bne r13,r0,800301c <_CORE_mutex_Seize+0xb8>
8002fbc: 2b 81 00 1c lw r1,(sp+28)
8002fc0: d0 01 00 00 wcsr IE,r1
8002fc4: 78 01 08 01 mvhi r1,0x801
8002fc8: 38 21 e9 60 ori r1,r1,0xe960
8002fcc: 28 21 00 00 lw r1,(r1+0)
8002fd0: 34 02 00 01 mvi r2,1
8002fd4: 58 22 00 34 sw (r1+52),r2
}
8002fd8: 2b 9d 00 04 lw ra,(sp+4)
8002fdc: 2b 8b 00 18 lw r11,(sp+24)
8002fe0: 2b 8c 00 14 lw r12,(sp+20)
8002fe4: 2b 8d 00 10 lw r13,(sp+16)
8002fe8: 2b 8e 00 0c lw r14,(sp+12)
8002fec: 2b 8f 00 08 lw r15,(sp+8)
8002ff0: 37 9c 00 1c addi sp,sp,28
8002ff4: c3 a0 00 00 ret
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
8002ff8: 78 01 08 01 mvhi r1,0x801
8002ffc: 38 21 ea 40 ori r1,r1,0xea40
8003000: 28 21 00 00 lw r1,(r1+0)
8003004: 34 02 00 01 mvi r2,1
8003008: 50 41 ff e8 bgeu r2,r1,8002fa8 <_CORE_mutex_Seize+0x44>
800300c: 34 01 00 00 mvi r1,0
8003010: b8 20 10 00 mv r2,r1
8003014: 34 03 00 13 mvi r3,19
8003018: f8 00 01 cf calli 8003754 <_Internal_error_Occurred>
800301c: 78 01 08 01 mvhi r1,0x801
8003020: 38 21 e9 60 ori r1,r1,0xe960
8003024: 28 21 00 00 lw r1,(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;
8003028: 34 02 00 01 mvi r2,1
800302c: 59 82 00 30 sw (r12+48),r2
8003030: 58 2f 00 20 sw (r1+32),r15
8003034: 29 62 00 00 lw r2,(r11+0)
8003038: 58 2c 00 44 sw (r1+68),r12
800303c: 34 41 00 01 addi r1,r2,1
8003040: 59 61 00 00 sw (r11+0),r1
8003044: 2b 81 00 1c lw r1,(sp+28)
8003048: d0 01 00 00 wcsr IE,r1
800304c: b9 80 08 00 mv r1,r12
8003050: b9 c0 10 00 mv r2,r14
8003054: fb ff ff a3 calli 8002ee0 <_CORE_mutex_Seize_interrupt_blocking>
}
8003058: 2b 9d 00 04 lw ra,(sp+4)
800305c: 2b 8b 00 18 lw r11,(sp+24)
8003060: 2b 8c 00 14 lw r12,(sp+20)
8003064: 2b 8d 00 10 lw r13,(sp+16)
8003068: 2b 8e 00 0c lw r14,(sp+12)
800306c: 2b 8f 00 08 lw r15,(sp+8)
8003070: 37 9c 00 1c addi sp,sp,28
8003074: c3 a0 00 00 ret
080095dc <_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
)
{
80095dc: 37 9c ff f8 addi sp,sp,-8
80095e0: 5b 8b 00 08 sw (sp+8),r11
80095e4: 5b 9d 00 04 sw (sp+4),ra
80095e8: 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)) ) {
80095ec: fb ff ed 87 calli 8004c08 <_Thread_queue_Dequeue>
80095f0: 34 02 00 00 mvi r2,0
80095f4: 44 22 00 06 be r1,r2,800960c <_CORE_semaphore_Surrender+0x30>
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
80095f8: b8 40 08 00 mv r1,r2
80095fc: 2b 9d 00 04 lw ra,(sp+4)
8009600: 2b 8b 00 08 lw r11,(sp+8)
8009604: 37 9c 00 08 addi sp,sp,8
8009608: c3 a0 00 00 ret
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
800960c: 90 00 08 00 rcsr r1,IE
8009610: 34 02 ff fe mvi r2,-2
8009614: a0 22 10 00 and r2,r1,r2
8009618: d0 02 00 00 wcsr IE,r2
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
800961c: 29 62 00 48 lw r2,(r11+72)
8009620: 29 63 00 40 lw r3,(r11+64)
8009624: 54 62 00 08 bgu r3,r2,8009644 <_CORE_semaphore_Surrender+0x68><== ALWAYS TAKEN
8009628: 34 02 00 04 mvi r2,4 <== NOT EXECUTED
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
800962c: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
}
return status;
}
8009630: b8 40 08 00 mv r1,r2
8009634: 2b 9d 00 04 lw ra,(sp+4)
8009638: 2b 8b 00 08 lw r11,(sp+8)
800963c: 37 9c 00 08 addi sp,sp,8
8009640: c3 a0 00 00 ret
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
8009644: 34 42 00 01 addi r2,r2,1
8009648: 59 62 00 48 sw (r11+72),r2
800964c: 34 02 00 00 mvi r2,0
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
8009650: d0 01 00 00 wcsr IE,r1
8009654: e3 ff ff f7 bi 8009630 <_CORE_semaphore_Surrender+0x54>
08009410 <_Chain_Initialize>:
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
8009410: 34 05 00 00 mvi r5,0
8009414: 58 25 00 04 sw (r1+4),r5
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
8009418: b8 20 28 00 mv r5,r1
next = starting_address;
while ( count-- ) {
800941c: 44 60 00 07 be r3,r0,8009438 <_Chain_Initialize+0x28> <== NEVER TAKEN
current->next = next;
next->previous = current;
8009420: 58 45 00 04 sw (r2+4),r5
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
current->next = next;
8009424: 58 a2 00 00 sw (r5+0),r2
next->previous = current;
current = next;
next = (Chain_Node *)
8009428: 34 63 ff ff addi r3,r3,-1
800942c: b8 40 28 00 mv r5,r2
8009430: b4 44 10 00 add r2,r2,r4
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
8009434: 5c 60 ff fb bne r3,r0,8009420 <_Chain_Initialize+0x10>
next->previous = current;
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
8009438: 34 22 00 04 addi r2,r1,4
800943c: 58 a2 00 00 sw (r5+0),r2
the_chain->last = current;
8009440: 58 25 00 08 sw (r1+8),r5
}
8009444: c3 a0 00 00 ret
0800f090 <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
800f090: 37 9c ff f4 addi sp,sp,-12
800f094: 5b 8b 00 0c sw (sp+12),r11
800f098: 5b 8c 00 08 sw (sp+8),r12
800f09c: 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;
800f0a0: 78 05 08 02 mvhi r5,0x802
800f0a4: 38 a5 6a 00 ori r5,r5,0x6a00
800f0a8: 28 ab 00 00 lw r11,(r5+0)
executing->Wait.return_code = RTEMS_SUCCESSFUL;
800f0ac: 34 05 00 00 mvi r5,0
800f0b0: 59 65 00 34 sw (r11+52),r5
api = executing->API_Extensions[ THREAD_API_RTEMS ];
800f0b4: 29 67 01 28 lw r7,(r11+296)
_ISR_Disable( level );
800f0b8: 90 00 30 00 rcsr r6,IE
800f0bc: 34 05 ff fe mvi r5,-2
800f0c0: a0 c5 28 00 and r5,r6,r5
800f0c4: d0 05 00 00 wcsr IE,r5
pending_events = api->pending_events;
800f0c8: 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 );
800f0cc: a0 28 28 00 and r5,r1,r8
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
800f0d0: 44 a0 00 04 be r5,r0,800f0e0 <_Event_Seize+0x50>
800f0d4: 44 25 00 2b be r1,r5,800f180 <_Event_Seize+0xf0>
800f0d8: 20 49 00 02 andi r9,r2,0x2
800f0dc: 5d 20 00 29 bne r9,r0,800f180 <_Event_Seize+0xf0> <== ALWAYS TAKEN
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
800f0e0: 20 47 00 01 andi r7,r2,0x1
800f0e4: 5c e0 00 1e bne r7,r0,800f15c <_Event_Seize+0xcc>
*/
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;
800f0e8: 78 0c 08 02 mvhi r12,0x802
800f0ec: 39 8c 72 ec ori r12,r12,0x72ec
*
* 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;
executing->Wait.count = (uint32_t) event_in;
800f0f0: 59 61 00 24 sw (r11+36),r1
executing->Wait.return_argument = event_out;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
800f0f4: 34 01 00 01 mvi r1,1
* 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;
800f0f8: 59 62 00 30 sw (r11+48),r2
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
800f0fc: 59 64 00 28 sw (r11+40),r4
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
800f100: 59 81 00 00 sw (r12+0),r1
_ISR_Enable( level );
800f104: d0 06 00 00 wcsr IE,r6
if ( ticks ) {
800f108: 34 04 00 00 mvi r4,0
800f10c: 5c 64 00 2d bne r3,r4,800f1c0 <_Event_Seize+0x130>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
800f110: b9 60 08 00 mv r1,r11
800f114: 34 02 01 00 mvi r2,256
800f118: fb ff e2 84 calli 8007b28 <_Thread_Set_state>
_ISR_Disable( level );
800f11c: 90 00 18 00 rcsr r3,IE
800f120: 34 01 ff fe mvi r1,-2
800f124: a0 61 08 00 and r1,r3,r1
800f128: d0 01 00 00 wcsr IE,r1
sync_state = _Event_Sync_state;
800f12c: 29 81 00 00 lw r1,(r12+0)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
800f130: 34 02 00 00 mvi r2,0
800f134: 59 82 00 00 sw (r12+0),r2
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
800f138: 34 02 00 01 mvi r2,1
800f13c: 44 22 00 1b be r1,r2,800f1a8 <_Event_Seize+0x118>
* 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 );
800f140: b9 60 10 00 mv r2,r11
800f144: f8 00 06 13 calli 8010990 <_Thread_blocking_operation_Cancel>
}
800f148: 2b 9d 00 04 lw ra,(sp+4)
800f14c: 2b 8b 00 0c lw r11,(sp+12)
800f150: 2b 8c 00 08 lw r12,(sp+8)
800f154: 37 9c 00 0c addi sp,sp,12
800f158: c3 a0 00 00 ret
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
800f15c: d0 06 00 00 wcsr IE,r6
executing->Wait.return_code = RTEMS_UNSATISFIED;
800f160: 34 01 00 0d mvi r1,13
800f164: 59 61 00 34 sw (r11+52),r1
*event_out = seized_events;
800f168: 58 85 00 00 sw (r4+0),r5
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
800f16c: 2b 9d 00 04 lw ra,(sp+4)
800f170: 2b 8b 00 0c lw r11,(sp+12)
800f174: 2b 8c 00 08 lw r12,(sp+8)
800f178: 37 9c 00 0c addi sp,sp,12
800f17c: c3 a0 00 00 ret
pending_events = api->pending_events;
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
800f180: a4 a0 08 00 not r1,r5
800f184: a0 28 40 00 and r8,r1,r8
800f188: 58 e8 00 00 sw (r7+0),r8
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
800f18c: d0 06 00 00 wcsr IE,r6
*event_out = seized_events;
800f190: 58 85 00 00 sw (r4+0),r5
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
800f194: 2b 9d 00 04 lw ra,(sp+4)
800f198: 2b 8b 00 0c lw r11,(sp+12)
800f19c: 2b 8c 00 08 lw r12,(sp+8)
800f1a0: 37 9c 00 0c addi sp,sp,12
800f1a4: c3 a0 00 00 ret
_ISR_Disable( level );
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
_ISR_Enable( level );
800f1a8: d0 03 00 00 wcsr IE,r3
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
800f1ac: 2b 9d 00 04 lw ra,(sp+4)
800f1b0: 2b 8b 00 0c lw r11,(sp+12)
800f1b4: 2b 8c 00 08 lw r12,(sp+8)
800f1b8: 37 9c 00 0c addi sp,sp,12
800f1bc: c3 a0 00 00 ret
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
800f1c0: 29 65 00 08 lw r5,(r11+8)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
800f1c4: 78 02 08 00 mvhi r2,0x800
800f1c8: 38 42 f3 c8 ori r2,r2,0xf3c8
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
800f1cc: 78 01 08 02 mvhi r1,0x802
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
800f1d0: 59 62 00 64 sw (r11+100),r2
the_watchdog->id = id;
800f1d4: 59 65 00 68 sw (r11+104),r5
the_watchdog->user_data = user_data;
800f1d8: 59 64 00 6c sw (r11+108),r4
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
800f1dc: 59 63 00 54 sw (r11+84),r3
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
800f1e0: 59 64 00 50 sw (r11+80),r4
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
800f1e4: 38 21 6a 20 ori r1,r1,0x6a20
800f1e8: 35 62 00 48 addi r2,r11,72
800f1ec: fb ff e4 60 calli 800836c <_Watchdog_Insert>
800f1f0: e3 ff ff c8 bi 800f110 <_Event_Seize+0x80>
0800f25c <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
800f25c: 37 9c ff f8 addi sp,sp,-8
800f260: 5b 8b 00 08 sw (sp+8),r11
800f264: 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 ];
800f268: 28 25 01 28 lw r5,(r1+296)
option_set = (rtems_option) the_thread->Wait.option;
800f26c: 28 28 00 30 lw r8,(r1+48)
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
800f270: 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 );
800f274: 90 00 08 00 rcsr r1,IE
800f278: 34 07 ff fe mvi r7,-2
800f27c: a0 27 38 00 and r7,r1,r7
800f280: d0 07 00 00 wcsr IE,r7
pending_events = api->pending_events;
800f284: 28 a6 00 00 lw r6,(r5+0)
event_condition = (rtems_event_set) the_thread->Wait.count;
800f288: 29 64 00 24 lw r4,(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 );
800f28c: a0 86 10 00 and r2,r4,r6
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
800f290: 44 40 00 29 be r2,r0,800f334 <_Event_Surrender+0xd8>
/*
* 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() &&
800f294: 78 03 08 02 mvhi r3,0x802
800f298: 38 63 69 dc ori r3,r3,0x69dc
800f29c: 28 63 00 00 lw r3,(r3+0)
800f2a0: 44 60 00 05 be r3,r0,800f2b4 <_Event_Surrender+0x58>
800f2a4: 78 03 08 02 mvhi r3,0x802
800f2a8: 38 63 6a 00 ori r3,r3,0x6a00
800f2ac: 28 63 00 00 lw r3,(r3+0)
800f2b0: 45 63 00 30 be r11,r3,800f370 <_Event_Surrender+0x114>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
800f2b4: 29 63 00 10 lw r3,(r11+16)
800f2b8: 20 63 01 00 andi r3,r3,0x100
800f2bc: 44 60 00 19 be r3,r0,800f320 <_Event_Surrender+0xc4>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
800f2c0: 44 82 00 03 be r4,r2,800f2cc <_Event_Surrender+0x70>
800f2c4: 21 08 00 02 andi r8,r8,0x2
800f2c8: 45 00 00 16 be r8,r0,800f320 <_Event_Surrender+0xc4> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
800f2cc: a4 40 18 00 not r3,r2
800f2d0: a0 66 30 00 and r6,r3,r6
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800f2d4: 29 64 00 28 lw r4,(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 );
800f2d8: 58 a6 00 00 sw (r5+0),r6
the_thread->Wait.count = 0;
800f2dc: 34 03 00 00 mvi r3,0
800f2e0: 59 63 00 24 sw (r11+36),r3
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800f2e4: 58 82 00 00 sw (r4+0),r2
_ISR_Flash( level );
800f2e8: d0 01 00 00 wcsr IE,r1
800f2ec: d0 07 00 00 wcsr IE,r7
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
800f2f0: 29 63 00 50 lw r3,(r11+80)
800f2f4: 34 02 00 02 mvi r2,2
800f2f8: 44 62 00 14 be r3,r2,800f348 <_Event_Surrender+0xec>
_ISR_Enable( level );
800f2fc: d0 01 00 00 wcsr IE,r1
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
800f300: 78 02 10 03 mvhi r2,0x1003
800f304: b9 60 08 00 mv r1,r11
800f308: 38 42 ff f8 ori r2,r2,0xfff8
800f30c: f8 00 05 b9 calli 80109f0 <_Thread_Clear_state>
}
return;
}
}
_ISR_Enable( level );
}
800f310: 2b 9d 00 04 lw ra,(sp+4)
800f314: 2b 8b 00 08 lw r11,(sp+8)
800f318: 37 9c 00 08 addi sp,sp,8
800f31c: c3 a0 00 00 ret
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
800f320: d0 01 00 00 wcsr IE,r1
}
800f324: 2b 9d 00 04 lw ra,(sp+4)
800f328: 2b 8b 00 08 lw r11,(sp+8)
800f32c: 37 9c 00 08 addi sp,sp,8
800f330: c3 a0 00 00 ret
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
800f334: d0 01 00 00 wcsr IE,r1
}
return;
}
}
_ISR_Enable( level );
}
800f338: 2b 9d 00 04 lw ra,(sp+4)
800f33c: 2b 8b 00 08 lw r11,(sp+8)
800f340: 37 9c 00 08 addi sp,sp,8
800f344: c3 a0 00 00 ret
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
800f348: 34 02 00 03 mvi r2,3
800f34c: 59 62 00 50 sw (r11+80),r2
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
800f350: d0 01 00 00 wcsr IE,r1
(void) _Watchdog_Remove( &the_thread->Timer );
800f354: 35 61 00 48 addi r1,r11,72
800f358: fb ff e4 6c calli 8008508 <_Watchdog_Remove>
800f35c: 78 02 10 03 mvhi r2,0x1003
800f360: b9 60 08 00 mv r1,r11
800f364: 38 42 ff f8 ori r2,r2,0xfff8
800f368: f8 00 05 a2 calli 80109f0 <_Thread_Clear_state>
800f36c: e3 ff ff ee bi 800f324 <_Event_Surrender+0xc8>
* 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() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
800f370: 78 03 08 02 mvhi r3,0x802
800f374: 38 63 72 ec ori r3,r3,0x72ec
800f378: 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() &&
800f37c: 34 09 00 02 mvi r9,2
800f380: 45 49 00 04 be r10,r9,800f390 <_Event_Surrender+0x134> <== NEVER TAKEN
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
800f384: 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() &&
800f388: 34 09 00 01 mvi r9,1
800f38c: 5d 49 ff ca bne r10,r9,800f2b4 <_Event_Surrender+0x58> <== NEVER TAKEN
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
800f390: 44 82 00 03 be r4,r2,800f39c <_Event_Surrender+0x140> <== ALWAYS TAKEN
800f394: 21 08 00 02 andi r8,r8,0x2 <== NOT EXECUTED
800f398: 45 00 00 0a be r8,r0,800f3c0 <_Event_Surrender+0x164> <== NOT EXECUTED
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
800f39c: a4 40 20 00 not r4,r2
800f3a0: a0 86 30 00 and r6,r4,r6
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800f3a4: 29 64 00 28 lw r4,(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 );
800f3a8: 58 a6 00 00 sw (r5+0),r6
the_thread->Wait.count = 0;
800f3ac: 34 05 00 00 mvi r5,0
800f3b0: 59 65 00 24 sw (r11+36),r5
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
800f3b4: 58 82 00 00 sw (r4+0),r2
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
800f3b8: 34 02 00 03 mvi r2,3
800f3bc: 58 62 00 00 sw (r3+0),r2
}
_ISR_Enable( level );
800f3c0: d0 01 00 00 wcsr IE,r1
return;
800f3c4: e3 ff ff d8 bi 800f324 <_Event_Surrender+0xc8>
0800f3c8 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
800f3c8: 37 9c ff f8 addi sp,sp,-8
800f3cc: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
800f3d0: 37 82 00 08 addi r2,sp,8
800f3d4: fb ff de e8 calli 8006f74 <_Thread_Get>
switch ( location ) {
800f3d8: 2b 82 00 08 lw r2,(sp+8)
800f3dc: 44 40 00 04 be r2,r0,800f3ec <_Event_Timeout+0x24> <== ALWAYS TAKEN
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
800f3e0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800f3e4: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
800f3e8: c3 a0 00 00 ret <== NOT EXECUTED
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
800f3ec: 90 00 18 00 rcsr r3,IE
800f3f0: 34 02 ff fe mvi r2,-2
800f3f4: a0 62 10 00 and r2,r3,r2
800f3f8: d0 02 00 00 wcsr IE,r2
return;
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
800f3fc: 78 02 08 02 mvhi r2,0x802
800f400: 38 42 6a 00 ori r2,r2,0x6a00
800f404: 28 42 00 00 lw r2,(r2+0)
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
800f408: 34 04 00 00 mvi r4,0
800f40c: 58 24 00 24 sw (r1+36),r4
if ( _Thread_Is_executing( the_thread ) ) {
800f410: 44 22 00 0f be r1,r2,800f44c <_Event_Timeout+0x84>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
800f414: 34 02 00 06 mvi r2,6
800f418: 58 22 00 34 sw (r1+52),r2
_ISR_Enable( level );
800f41c: d0 03 00 00 wcsr IE,r3
800f420: 78 02 10 03 mvhi r2,0x1003
800f424: 38 42 ff f8 ori r2,r2,0xfff8
800f428: f8 00 05 72 calli 80109f0 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
800f42c: 78 01 08 02 mvhi r1,0x802
800f430: 38 21 69 44 ori r1,r1,0x6944
800f434: 28 22 00 00 lw r2,(r1+0)
800f438: 34 42 ff ff addi r2,r2,-1
800f43c: 58 22 00 00 sw (r1+0),r2
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
800f440: 2b 9d 00 04 lw ra,(sp+4)
800f444: 37 9c 00 08 addi sp,sp,8
800f448: c3 a0 00 00 ret
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
800f44c: 78 02 08 02 mvhi r2,0x802
800f450: 38 42 72 ec ori r2,r2,0x72ec
800f454: 28 45 00 00 lw r5,(r2+0)
800f458: 34 04 00 01 mvi r4,1
800f45c: 5c a4 ff ee bne r5,r4,800f414 <_Event_Timeout+0x4c>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
800f460: 34 04 00 02 mvi r4,2
800f464: 58 44 00 00 sw (r2+0),r4
800f468: e3 ff ff eb bi 800f414 <_Event_Timeout+0x4c>
08009788 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
8009788: 37 9c ff bc addi sp,sp,-68
800978c: 5b 8b 00 44 sw (sp+68),r11
8009790: 5b 8c 00 40 sw (sp+64),r12
8009794: 5b 8d 00 3c sw (sp+60),r13
8009798: 5b 8e 00 38 sw (sp+56),r14
800979c: 5b 8f 00 34 sw (sp+52),r15
80097a0: 5b 90 00 30 sw (sp+48),r16
80097a4: 5b 91 00 2c sw (sp+44),r17
80097a8: 5b 92 00 28 sw (sp+40),r18
80097ac: 5b 93 00 24 sw (sp+36),r19
80097b0: 5b 94 00 20 sw (sp+32),r20
80097b4: 5b 95 00 1c sw (sp+28),r21
80097b8: 5b 96 00 18 sw (sp+24),r22
80097bc: 5b 97 00 14 sw (sp+20),r23
80097c0: 5b 98 00 10 sw (sp+16),r24
80097c4: 5b 99 00 0c sw (sp+12),r25
80097c8: 5b 9b 00 08 sw (sp+8),fp
80097cc: 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;
80097d0: 34 53 00 04 addi r19,r2,4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
80097d4: b8 40 68 00 mv r13,r2
80097d8: b8 20 78 00 mv r15,r1
80097dc: b8 60 88 00 mv r17,r3
80097e0: 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;
80097e4: 28 2b 00 08 lw r11,(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;
80097e8: 28 35 00 10 lw r21,(r1+16)
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
80097ec: 54 53 00 6a bgu r2,r19,8009994 <_Heap_Allocate_aligned_with_boundary+0x20c>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
80097f0: 5c 80 00 6b bne r4,r0,800999c <_Heap_Allocate_aligned_with_boundary+0x214>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
80097f4: 34 10 00 00 mvi r16,0
80097f8: 45 eb 00 0d be r15,r11,800982c <_Heap_Allocate_aligned_with_boundary+0xa4>
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;
80097fc: 34 1b 00 04 mvi fp,4
8009800: cb 6d d8 00 sub fp,fp,r13
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;
8009804: 34 19 ff fe mvi r25,-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;
8009808: 36 b8 00 07 addi r24,r21,7
/*
* 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 ) {
800980c: 29 61 00 04 lw r1,(r11+4)
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
8009810: 36 10 00 01 addi r16,r16,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 ) {
8009814: 52 61 00 04 bgeu r19,r1,8009824 <_Heap_Allocate_aligned_with_boundary+0x9c>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
8009818: 35 6c 00 08 addi r12,r11,8
if ( alignment == 0 ) {
800981c: 5e 20 00 1b bne r17,r0,8009888 <_Heap_Allocate_aligned_with_boundary+0x100>
boundary
);
}
}
if ( alloc_begin != 0 ) {
8009820: 5d 80 00 53 bne r12,r0,800996c <_Heap_Allocate_aligned_with_boundary+0x1e4><== ALWAYS TAKEN
break;
}
block = block->next;
8009824: 29 6b 00 08 lw r11,(r11+8)
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
8009828: 5d eb ff f9 bne r15,r11,800980c <_Heap_Allocate_aligned_with_boundary+0x84>
800982c: 34 01 00 00 mvi r1,0
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
8009830: 29 e2 00 44 lw r2,(r15+68)
8009834: 50 50 00 02 bgeu r2,r16,800983c <_Heap_Allocate_aligned_with_boundary+0xb4>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
8009838: 59 f0 00 44 sw (r15+68),r16
}
return (void *) alloc_begin;
}
800983c: 2b 9d 00 04 lw ra,(sp+4)
8009840: 2b 8b 00 44 lw r11,(sp+68)
8009844: 2b 8c 00 40 lw r12,(sp+64)
8009848: 2b 8d 00 3c lw r13,(sp+60)
800984c: 2b 8e 00 38 lw r14,(sp+56)
8009850: 2b 8f 00 34 lw r15,(sp+52)
8009854: 2b 90 00 30 lw r16,(sp+48)
8009858: 2b 91 00 2c lw r17,(sp+44)
800985c: 2b 92 00 28 lw r18,(sp+40)
8009860: 2b 93 00 24 lw r19,(sp+36)
8009864: 2b 94 00 20 lw r20,(sp+32)
8009868: 2b 95 00 1c lw r21,(sp+28)
800986c: 2b 96 00 18 lw r22,(sp+24)
8009870: 2b 97 00 14 lw r23,(sp+20)
8009874: 2b 98 00 10 lw r24,(sp+16)
8009878: 2b 99 00 0c lw r25,(sp+12)
800987c: 2b 9b 00 08 lw fp,(sp+8)
8009880: 37 9c 00 44 addi sp,sp,68
8009884: c3 a0 00 00 ret
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;
8009888: a0 39 70 00 and r14,r1,r25
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
800988c: 29 f6 00 14 lw r22,(r15+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;
8009890: b5 6e 70 00 add r14,r11,r14
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;
8009894: b7 6e 60 00 add r12,fp,r14
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;
8009898: cb 16 18 00 sub r3,r24,r22
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
800989c: b9 80 08 00 mv r1,r12
80098a0: ba 20 10 00 mv r2,r17
80098a4: b4 6e 70 00 add r14,r3,r14
80098a8: f8 00 47 32 calli 801b570 <__umodsi3>
80098ac: c9 81 60 00 sub r12,r12,r1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
80098b0: 35 77 00 08 addi r23,r11,8
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 ) {
80098b4: 51 cc 00 05 bgeu r14,r12,80098c8 <_Heap_Allocate_aligned_with_boundary+0x140>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
80098b8: b9 c0 08 00 mv r1,r14
80098bc: ba 20 10 00 mv r2,r17
80098c0: f8 00 47 2c calli 801b570 <__umodsi3>
80098c4: c9 c1 60 00 sub r12,r14,r1
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
80098c8: 46 40 00 1c be r18,r0,8009938 <_Heap_Allocate_aligned_with_boundary+0x1b0>
/* 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;
80098cc: b5 8d 70 00 add r14,r12,r13
80098d0: b9 c0 08 00 mv r1,r14
80098d4: ba 40 10 00 mv r2,r18
80098d8: f8 00 47 26 calli 801b570 <__umodsi3>
80098dc: c9 c1 28 00 sub r5,r14,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 ) {
80098e0: f5 c5 70 00 cmpgu r14,r14,r5
80098e4: f4 ac 08 00 cmpgu r1,r5,r12
80098e8: a1 c1 70 00 and r14,r14,r1
80098ec: 45 c0 00 13 be r14,r0,8009938 <_Heap_Allocate_aligned_with_boundary+0x1b0>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
80098f0: b6 ed a0 00 add r20,r23,r13
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
80098f4: 56 85 ff cc bgu r20,r5,8009824 <_Heap_Allocate_aligned_with_boundary+0x9c>
80098f8: e0 00 00 02 bi 8009900 <_Heap_Allocate_aligned_with_boundary+0x178>
80098fc: 56 85 ff ca bgu r20,r5,8009824 <_Heap_Allocate_aligned_with_boundary+0x9c><== NEVER TAKEN
return 0;
}
alloc_begin = boundary_line - alloc_size;
8009900: c8 ad 60 00 sub r12,r5,r13
8009904: ba 20 10 00 mv r2,r17
8009908: b9 80 08 00 mv r1,r12
800990c: f8 00 47 19 calli 801b570 <__umodsi3>
8009910: c9 81 60 00 sub r12,r12,r1
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
8009914: b5 8d 70 00 add r14,r12,r13
8009918: b9 c0 08 00 mv r1,r14
800991c: ba 40 10 00 mv r2,r18
8009920: f8 00 47 14 calli 801b570 <__umodsi3>
8009924: c9 c1 28 00 sub r5,r14,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 ) {
8009928: f5 c5 70 00 cmpgu r14,r14,r5
800992c: f4 ac 08 00 cmpgu r1,r5,r12
8009930: a1 c1 70 00 and r14,r14,r1
8009934: 5d c0 ff f2 bne r14,r0,80098fc <_Heap_Allocate_aligned_with_boundary+0x174>
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 ) {
8009938: 56 ec ff bb bgu r23,r12,8009824 <_Heap_Allocate_aligned_with_boundary+0x9c>
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;
800993c: 34 01 ff f8 mvi r1,-8
8009940: c8 2b 70 00 sub r14,r1,r11
8009944: ba a0 10 00 mv r2,r21
8009948: b9 80 08 00 mv r1,r12
800994c: b5 cc 70 00 add r14,r14,r12
8009950: f8 00 47 08 calli 801b570 <__umodsi3>
8009954: c9 c1 08 00 sub r1,r14,r1
if ( free_size >= min_block_size || free_size == 0 ) {
8009958: f0 36 b0 00 cmpgeu r22,r1,r22
800995c: 64 21 00 00 cmpei r1,r1,0
8009960: b8 36 08 00 or r1,r1,r22
8009964: 44 20 ff b0 be r1,r0,8009824 <_Heap_Allocate_aligned_with_boundary+0x9c>
boundary
);
}
}
if ( alloc_begin != 0 ) {
8009968: 45 80 ff af be r12,r0,8009824 <_Heap_Allocate_aligned_with_boundary+0x9c><== NEVER TAKEN
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
800996c: 29 e1 00 4c lw r1,(r15+76)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
8009970: b9 60 10 00 mv r2,r11
8009974: b9 a0 20 00 mv r4,r13
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
8009978: b4 30 08 00 add r1,r1,r16
800997c: 59 e1 00 4c sw (r15+76),r1
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
8009980: b9 80 18 00 mv r3,r12
8009984: b9 e0 08 00 mv r1,r15
8009988: fb ff e7 11 calli 80035cc <_Heap_Block_allocate>
800998c: b9 80 08 00 mv r1,r12
8009990: e3 ff ff a8 bi 8009830 <_Heap_Allocate_aligned_with_boundary+0xa8>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
8009994: 34 01 00 00 mvi r1,0
8009998: e3 ff ff a9 bi 800983c <_Heap_Allocate_aligned_with_boundary+0xb4>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
800999c: 54 44 ff fe bgu r2,r4,8009994 <_Heap_Allocate_aligned_with_boundary+0x20c>
return NULL;
}
if ( alignment == 0 ) {
80099a0: 5c 60 ff 95 bne r3,r0,80097f4 <_Heap_Allocate_aligned_with_boundary+0x6c>
80099a4: ba a0 88 00 mv r17,r21
80099a8: e3 ff ff 93 bi 80097f4 <_Heap_Allocate_aligned_with_boundary+0x6c>
0800fa94 <_Heap_Extend>:
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
800fa94: 37 9c ff e8 addi sp,sp,-24
800fa98: 5b 8b 00 14 sw (sp+20),r11
800fa9c: 5b 8c 00 10 sw (sp+16),r12
800faa0: 5b 8d 00 0c sw (sp+12),r13
800faa4: 5b 8e 00 08 sw (sp+8),r14
800faa8: 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;
800faac: 28 2c 00 18 lw r12,(r1+24)
uintptr_t const heap_area_end = heap->area_end;
800fab0: 28 25 00 1c lw r5,(r1+28)
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
800fab4: 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;
800fab8: f0 4c 60 00 cmpgeu r12,r2,r12
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
800fabc: f4 a2 08 00 cmpgu r1,r5,r2
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
uintptr_t extend_size = 0;
Heap_Block *const last_block = heap->last_block;
800fac0: 29 6d 00 24 lw r13,(r11+36)
uintptr_t *amount_extended
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
800fac4: a0 2c 60 00 and r12,r1,r12
800fac8: 34 01 00 01 mvi r1,1
800facc: 5d 80 00 03 bne r12,r0,800fad8 <_Heap_Extend+0x44> <== NEVER TAKEN
* 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 ) {
800fad0: 34 01 00 02 mvi r1,2
800fad4: 44 45 00 08 be r2,r5,800faf4 <_Heap_Extend+0x60>
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
}
return HEAP_EXTEND_SUCCESSFUL;
}
800fad8: 2b 9d 00 04 lw ra,(sp+4)
800fadc: 2b 8b 00 14 lw r11,(sp+20)
800fae0: 2b 8c 00 10 lw r12,(sp+16)
800fae4: 2b 8d 00 0c lw r13,(sp+12)
800fae8: 2b 8e 00 08 lw r14,(sp+8)
800faec: 37 9c 00 18 addi sp,sp,24
800faf0: c3 a0 00 00 ret
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
800faf4: b4 43 18 00 add r3,r2,r3
* block and free it.
*/
heap->area_end = new_heap_area_end;
extend_size = new_heap_area_end
800faf8: c8 6d 70 00 sub r14,r3,r13
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
800fafc: 29 62 00 10 lw r2,(r11+16)
800fb00: 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;
800fb04: 59 63 00 1c sw (r11+28),r3
800fb08: b9 c0 08 00 mv r1,r14
800fb0c: 5b 84 00 18 sw (sp+24),r4
800fb10: fb ff d2 89 calli 8004534 <__umodsi3>
extend_size = new_heap_area_end
- (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE;
extend_size = _Heap_Align_down( extend_size, heap->page_size );
*amount_extended = extend_size;
800fb14: 2b 84 00 18 lw r4,(sp+24)
800fb18: c9 c1 08 00 sub r1,r14,r1
800fb1c: 58 81 00 00 sw (r4+0),r1
if( extend_size >= heap->min_block_size ) {
800fb20: 29 62 00 14 lw r2,(r11+20)
800fb24: 50 22 00 09 bgeu r1,r2,800fb48 <_Heap_Extend+0xb4> <== ALWAYS TAKEN
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
800fb28: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
}
return HEAP_EXTEND_SUCCESSFUL;
}
800fb2c: 2b 9d 00 04 lw ra,(sp+4)
800fb30: 2b 8b 00 14 lw r11,(sp+20)
800fb34: 2b 8c 00 10 lw r12,(sp+16)
800fb38: 2b 8d 00 0c lw r13,(sp+12)
800fb3c: 2b 8e 00 08 lw r14,(sp+8)
800fb40: 37 9c 00 18 addi sp,sp,24
800fb44: c3 a0 00 00 ret
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
800fb48: 29 a4 00 04 lw r4,(r13+4)
if( extend_size >= heap->min_block_size ) {
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
800fb4c: 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);
800fb50: b4 2d 10 00 add r2,r1,r13
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
800fb54: 20 84 00 01 andi r4,r4,0x1
800fb58: b8 24 20 00 or r4,r1,r4
800fb5c: c8 62 18 00 sub r3,r3,r2
800fb60: 59 a4 00 04 sw (r13+4),r4
800fb64: 38 63 00 01 ori r3,r3,0x1
800fb68: 58 43 00 04 sw (r2+4),r3
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
800fb6c: 29 65 00 2c lw r5,(r11+44)
++stats->used_blocks;
800fb70: 29 64 00 40 lw r4,(r11+64)
--stats->frees; /* Do not count subsequent call as actual free() */
800fb74: 29 63 00 50 lw r3,(r11+80)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
800fb78: b4 a1 08 00 add r1,r5,r1
++stats->used_blocks;
800fb7c: 34 84 00 01 addi r4,r4,1
--stats->frees; /* Do not count subsequent call as actual free() */
800fb80: 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;
800fb84: 59 62 00 24 sw (r11+36),r2
/* Statistics */
stats->size += extend_size;
800fb88: 59 61 00 2c sw (r11+44),r1
++stats->used_blocks;
800fb8c: 59 64 00 40 sw (r11+64),r4
--stats->frees; /* Do not count subsequent call as actual free() */
800fb90: 59 63 00 50 sw (r11+80),r3
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
800fb94: b9 60 08 00 mv r1,r11
800fb98: 35 a2 00 08 addi r2,r13,8
800fb9c: fb ff e3 5f calli 8008918 <_Heap_Free>
800fba0: b9 80 08 00 mv r1,r12
800fba4: e3 ff ff e2 bi 800fb2c <_Heap_Extend+0x98>
080099ac <_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 )
{
80099ac: 37 9c ff f4 addi sp,sp,-12
80099b0: 5b 8b 00 0c sw (sp+12),r11
80099b4: 5b 8c 00 08 sw (sp+8),r12
80099b8: 5b 9d 00 04 sw (sp+4),ra
80099bc: 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 )
80099c0: 28 22 00 10 lw r2,(r1+16)
80099c4: b8 20 58 00 mv r11,r1
80099c8: b8 60 08 00 mv r1,r3
80099cc: 34 6c ff f8 addi r12,r3,-8
80099d0: f8 00 46 e8 calli 801b570 <__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;
80099d4: 29 64 00 20 lw r4,(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 )
80099d8: 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
80099dc: 54 81 00 2b bgu r4,r1,8009a88 <_Heap_Free+0xdc>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
80099e0: 29 63 00 24 lw r3,(r11+36)
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
80099e4: 54 23 00 29 bgu r1,r3,8009a88 <_Heap_Free+0xdc>
- 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;
80099e8: 28 28 00 04 lw r8,(r1+4)
80099ec: 34 06 ff fe mvi r6,-2
80099f0: a1 06 28 00 and r5,r8,r6
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
80099f4: b4 25 10 00 add r2,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
80099f8: 54 82 00 24 bgu r4,r2,8009a88 <_Heap_Free+0xdc> <== NEVER TAKEN
80099fc: 54 43 00 23 bgu r2,r3,8009a88 <_Heap_Free+0xdc> <== 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;
8009a00: 28 47 00 04 lw r7,(r2+4)
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
8009a04: 20 e9 00 01 andi r9,r7,0x1
8009a08: 45 20 00 20 be r9,r0,8009a88 <_Heap_Free+0xdc> <== NEVER TAKEN
- 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;
8009a0c: a0 e6 38 00 and r7,r7,r6
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
8009a10: 34 06 00 00 mvi r6,0
8009a14: 44 62 00 05 be r3,r2,8009a28 <_Heap_Free+0x7c>
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
8009a18: b4 47 30 00 add r6,r2,r7
8009a1c: 28 c6 00 04 lw r6,(r6+4)
8009a20: 20 c6 00 01 andi r6,r6,0x1
8009a24: 18 c6 00 01 xori r6,r6,0x1
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 ));
if ( !_Heap_Is_prev_used( block ) ) {
8009a28: 21 08 00 01 andi r8,r8,0x1
8009a2c: 5d 00 00 1d bne r8,r0,8009aa0 <_Heap_Free+0xf4>
uintptr_t const prev_size = block->prev_size;
8009a30: 28 28 00 00 lw r8,(r1+0)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
8009a34: c8 28 08 00 sub r1,r1,r8
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
8009a38: 54 81 00 14 bgu r4,r1,8009a88 <_Heap_Free+0xdc> <== NEVER TAKEN
8009a3c: 54 23 00 13 bgu r1,r3,8009a88 <_Heap_Free+0xdc> <== 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) ) {
8009a40: 28 23 00 04 lw r3,(r1+4)
8009a44: 20 63 00 01 andi r3,r3,0x1
8009a48: 44 60 00 10 be r3,r0,8009a88 <_Heap_Free+0xdc> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
8009a4c: 44 c0 00 43 be r6,r0,8009b58 <_Heap_Free+0x1ac>
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
8009a50: 29 64 00 38 lw r4,(r11+56)
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
8009a54: 28 43 00 0c lw r3,(r2+12)
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
8009a58: b4 a7 38 00 add r7,r5,r7
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
8009a5c: 28 42 00 08 lw r2,(r2+8)
8009a60: b4 e8 40 00 add r8,r7,r8
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
8009a64: 34 84 ff ff addi r4,r4,-1
8009a68: 59 64 00 38 sw (r11+56),r4
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;
8009a6c: b4 28 30 00 add r6,r1,r8
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;
8009a70: 39 04 00 01 ori r4,r8,0x1
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
8009a74: 58 43 00 0c sw (r2+12),r3
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
8009a78: 58 c8 00 00 sw (r6+0),r8
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;
8009a7c: 58 24 00 04 sw (r1+4),r4
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
8009a80: 58 62 00 08 sw (r3+8),r2
8009a84: e0 00 00 13 bi 8009ad0 <_Heap_Free+0x124>
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
8009a88: 34 01 00 00 mvi r1,0
}
8009a8c: 2b 9d 00 04 lw ra,(sp+4)
8009a90: 2b 8b 00 0c lw r11,(sp+12)
8009a94: 2b 8c 00 08 lw r12,(sp+8)
8009a98: 37 9c 00 0c addi sp,sp,12
8009a9c: c3 a0 00 00 ret
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;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
8009aa0: 44 c0 00 1b be r6,r0,8009b0c <_Heap_Free+0x160>
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
8009aa4: 28 43 00 0c lw r3,(r2+12)
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
8009aa8: 28 42 00 08 lw r2,(r2+8)
uintptr_t const size = block_size + next_block_size;
8009aac: b4 e5 38 00 add r7,r7,r5
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
8009ab0: 58 23 00 0c sw (r1+12),r3
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
8009ab4: 58 22 00 08 sw (r1+8),r2
_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;
8009ab8: b4 27 30 00 add r6,r1,r7
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;
8009abc: 38 e4 00 01 ori r4,r7,0x1
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
8009ac0: 58 c7 00 00 sw (r6+0),r7
new_block->prev = prev;
next->prev = new_block;
8009ac4: 58 41 00 0c sw (r2+12),r1
prev->next = new_block;
8009ac8: 58 61 00 08 sw (r3+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;
8009acc: 58 24 00 04 sw (r1+4),r4
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
8009ad0: 29 61 00 50 lw r1,(r11+80)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
8009ad4: 29 62 00 40 lw r2,(r11+64)
++stats->frees;
stats->free_size += block_size;
8009ad8: 29 63 00 30 lw r3,(r11+48)
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
8009adc: 34 21 00 01 addi r1,r1,1
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
8009ae0: 34 42 ff ff addi r2,r2,-1
++stats->frees;
stats->free_size += block_size;
8009ae4: b4 65 28 00 add r5,r3,r5
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
8009ae8: 59 61 00 50 sw (r11+80),r1
stats->free_size += block_size;
8009aec: 34 01 00 01 mvi r1,1
8009af0: 59 65 00 30 sw (r11+48),r5
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
8009af4: 59 62 00 40 sw (r11+64),r2
++stats->frees;
stats->free_size += block_size;
return( true );
}
8009af8: 2b 9d 00 04 lw ra,(sp+4)
8009afc: 2b 8b 00 0c lw r11,(sp+12)
8009b00: 2b 8c 00 08 lw r12,(sp+8)
8009b04: 37 9c 00 0c addi sp,sp,12
8009b08: c3 a0 00 00 ret
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;
8009b0c: 38 a3 00 01 ori r3,r5,0x1
8009b10: 58 23 00 04 sw (r1+4),r3
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
8009b14: 28 44 00 04 lw r4,(r2+4)
8009b18: 34 03 ff fe mvi r3,-2
next_block->prev_size = block_size;
8009b1c: 58 45 00 00 sw (r2+0),r5
} 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;
8009b20: a0 83 18 00 and r3,r4,r3
8009b24: 58 43 00 04 sw (r2+4),r3
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
8009b28: 29 62 00 38 lw r2,(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;
8009b2c: 29 63 00 08 lw r3,(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;
8009b30: 29 64 00 3c lw r4,(r11+60)
new_block->next = next;
new_block->prev = block_before;
8009b34: 58 2b 00 0c sw (r1+12),r11
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
8009b38: 58 23 00 08 sw (r1+8),r3
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;
8009b3c: 34 42 00 01 addi r2,r2,1
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
8009b40: 58 61 00 0c sw (r3+12),r1
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
8009b44: 59 61 00 08 sw (r11+8),r1
8009b48: 59 62 00 38 sw (r11+56),r2
#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;
8009b4c: 50 82 ff e1 bgeu r4,r2,8009ad0 <_Heap_Free+0x124>
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;
8009b50: 59 62 00 3c sw (r11+60),r2
8009b54: e3 ff ff df bi 8009ad0 <_Heap_Free+0x124>
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;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
8009b58: b4 a8 40 00 add r8,r5,r8
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
8009b5c: 39 03 00 01 ori r3,r8,0x1
8009b60: 58 23 00 04 sw (r1+4),r3
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
8009b64: 28 43 00 04 lw r3,(r2+4)
8009b68: 34 01 ff fe mvi r1,-2
next_block->prev_size = size;
8009b6c: 58 48 00 00 sw (r2+0),r8
_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;
8009b70: a0 61 08 00 and r1,r3,r1
8009b74: 58 41 00 04 sw (r2+4),r1
8009b78: e3 ff ff d6 bi 8009ad0 <_Heap_Free+0x124>
0800fba8 <_Heap_Get_free_information>:
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
800fba8: 28 23 00 08 lw r3,(r1+8)
)
{
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Free_list_tail(the_heap);
info->number = 0;
800fbac: 34 05 00 00 mvi r5,0
800fbb0: 58 45 00 00 sw (r2+0),r5
info->largest = 0;
800fbb4: 58 45 00 04 sw (r2+4),r5
info->total = 0;
800fbb8: 58 45 00 08 sw (r2+8),r5
for(the_block = _Heap_Free_list_first(the_heap);
800fbbc: 44 23 00 10 be r1,r3,800fbfc <_Heap_Get_free_information+0x54><== NEVER TAKEN
800fbc0: 34 06 00 01 mvi r6,1
- 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;
800fbc4: 34 08 ff fe mvi r8,-2
800fbc8: e0 00 00 02 bi 800fbd0 <_Heap_Get_free_information+0x28>
800fbcc: b8 e0 30 00 mv r6,r7
800fbd0: 28 64 00 04 lw r4,(r3+4)
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
info->total += the_size;
if ( info->largest < the_size )
800fbd4: 28 49 00 04 lw r9,(r2+4)
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
800fbd8: 34 c7 00 01 addi r7,r6,1
800fbdc: a0 88 20 00 and r4,r4,r8
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
info->total += the_size;
800fbe0: b4 a4 28 00 add r5,r5,r4
if ( info->largest < the_size )
800fbe4: 51 24 00 02 bgeu r9,r4,800fbec <_Heap_Get_free_information+0x44>
info->largest = the_size;
800fbe8: 58 44 00 04 sw (r2+4),r4
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
800fbec: 28 63 00 08 lw r3,(r3+8)
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
800fbf0: 5c 23 ff f7 bne r1,r3,800fbcc <_Heap_Get_free_information+0x24>
800fbf4: 58 45 00 08 sw (r2+8),r5
800fbf8: 58 46 00 00 sw (r2+0),r6
800fbfc: c3 a0 00 00 ret
0800fc00 <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
800fc00: 37 9c ff f8 addi sp,sp,-8
800fc04: 5b 8b 00 08 sw (sp+8),r11
800fc08: 5b 8c 00 04 sw (sp+4),r12
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
800fc0c: 28 29 00 24 lw r9,(r1+36)
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->first_block;
800fc10: 28 26 00 20 lw r6,(r1+32)
Heap_Block *const end = the_heap->last_block;
_HAssert(the_block->prev_size == the_heap->page_size);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
800fc14: 34 01 00 00 mvi r1,0
the_info->Free.total = 0;
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
800fc18: 58 41 00 10 sw (r2+16),r1
Heap_Block *const end = the_heap->last_block;
_HAssert(the_block->prev_size == the_heap->page_size);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
800fc1c: 58 41 00 00 sw (r2+0),r1
the_info->Free.total = 0;
800fc20: 58 41 00 08 sw (r2+8),r1
the_info->Free.largest = 0;
800fc24: 58 41 00 04 sw (r2+4),r1
the_info->Used.number = 0;
800fc28: 58 41 00 0c sw (r2+12),r1
the_info->Used.total = 0;
800fc2c: 58 41 00 14 sw (r2+20),r1
the_info->Used.largest = 0;
while ( the_block != end ) {
800fc30: 34 01 00 08 mvi r1,8
800fc34: 44 c9 00 18 be r6,r9,800fc94 <_Heap_Get_information+0x94> <== NEVER TAKEN
800fc38: 28 c5 00 04 lw r5,(r6+4)
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
800fc3c: 34 4b 00 0c addi r11,r2,12
800fc40: 34 0a ff fe mvi r10,-2
800fc44: a0 aa 18 00 and r3,r5,r10
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
800fc48: b4 c3 20 00 add r4,r6,r3
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;
800fc4c: 28 85 00 04 lw r5,(r4+4)
while ( the_block != end ) {
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
800fc50: b9 60 08 00 mv r1,r11
info = &the_info->Free;
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
800fc54: b8 80 30 00 mv r6,r4
while ( the_block != end ) {
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
800fc58: 20 a7 00 01 andi r7,r5,0x1
800fc5c: 5c e0 00 02 bne r7,r0,800fc64 <_Heap_Get_information+0x64>
800fc60: b8 40 08 00 mv r1,r2
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
800fc64: 28 28 00 00 lw r8,(r1+0)
info->total += the_size;
800fc68: 28 27 00 08 lw r7,(r1+8)
if ( info->largest < the_size )
800fc6c: 28 2c 00 04 lw r12,(r1+4)
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
800fc70: 35 08 00 01 addi r8,r8,1
info->total += the_size;
800fc74: b4 e3 38 00 add r7,r7,r3
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
800fc78: 58 28 00 00 sw (r1+0),r8
info->total += the_size;
800fc7c: 58 27 00 08 sw (r1+8),r7
if ( info->largest < the_size )
800fc80: 51 83 00 02 bgeu r12,r3,800fc88 <_Heap_Get_information+0x88>
info->largest = the_size;
800fc84: 58 23 00 04 sw (r1+4),r3
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
800fc88: 5d 24 ff ef bne r9,r4,800fc44 <_Heap_Get_information+0x44>
800fc8c: 28 41 00 14 lw r1,(r2+20)
800fc90: 34 21 00 08 addi r1,r1,8
/*
* Handle the last dummy block. Don't consider this block to be
* "used" as client never allocated it. Make 'Used.total' contain this
* blocks' overhead though.
*/
the_info->Used.total += HEAP_BLOCK_HEADER_SIZE;
800fc94: 58 41 00 14 sw (r2+20),r1
}
800fc98: 2b 8b 00 08 lw r11,(sp+8)
800fc9c: 2b 8c 00 04 lw r12,(sp+4)
800fca0: 37 9c 00 08 addi sp,sp,8
800fca4: c3 a0 00 00 ret
0801bff8 <_Heap_Resize_block>:
void *alloc_begin_ptr,
uintptr_t new_alloc_size,
uintptr_t *old_size,
uintptr_t *new_size
)
{
801bff8: 37 9c ff e8 addi sp,sp,-24
801bffc: 5b 8b 00 18 sw (sp+24),r11
801c000: 5b 8c 00 14 sw (sp+20),r12
801c004: 5b 8d 00 10 sw (sp+16),r13
801c008: 5b 8e 00 0c sw (sp+12),r14
801c00c: 5b 8f 00 08 sw (sp+8),r15
801c010: 5b 9d 00 04 sw (sp+4),ra
801c014: 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 )
801c018: 28 22 00 10 lw r2,(r1+16)
801c01c: b8 20 58 00 mv r11,r1
801c020: b9 80 08 00 mv r1,r12
801c024: b8 80 70 00 mv r14,r4
801c028: b8 a0 68 00 mv r13,r5
801c02c: b8 60 78 00 mv r15,r3
801c030: fb ff fd 50 calli 801b570 <__umodsi3>
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
*old_size = 0;
801c034: 34 02 00 00 mvi r2,0
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
801c038: 29 63 00 20 lw r3,(r11+32)
801c03c: 59 c2 00 00 sw (r14+0),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 )
801c040: 35 86 ff f8 addi r6,r12,-8
801c044: c8 c1 30 00 sub r6,r6,r1
*new_size = 0;
801c048: 59 a2 00 00 sw (r13+0),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
801c04c: 54 66 00 1b bgu r3,r6,801c0b8 <_Heap_Resize_block+0xc0> <== NEVER TAKEN
801c050: 29 61 00 24 lw r1,(r11+36)
801c054: 54 c1 00 19 bgu r6,r1,801c0b8 <_Heap_Resize_block+0xc0> <== NEVER TAKEN
- 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;
801c058: 28 c5 00 04 lw r5,(r6+4)
801c05c: 34 03 ff fe mvi r3,-2
801c060: a0 a3 28 00 and r5,r5,r3
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t block_size = _Heap_Block_size( block );
uintptr_t block_end = block_begin + block_size;
801c064: b4 c5 10 00 add r2,r6,r5
801c068: 28 44 00 04 lw r4,(r2+4)
uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET;
801c06c: c8 4c 08 00 sub r1,r2,r12
801c070: 34 21 00 04 addi r1,r1,4
801c074: a0 83 18 00 and r3,r4,r3
RTEMS_INLINE_ROUTINE bool _Heap_Is_free(
const Heap_Block *block
)
{
return !_Heap_Is_used( block );
801c078: b4 43 20 00 add r4,r2,r3
801c07c: 28 84 00 04 lw r4,(r4+4)
bool next_block_is_free = _Heap_Is_free( next_block );;
_HAssert( _Heap_Is_block_in_heap( heap, next_block ) );
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
801c080: 59 c1 00 00 sw (r14+0),r1
801c084: 20 84 00 01 andi r4,r4,0x1
801c088: 18 84 00 01 xori r4,r4,0x1
if ( next_block_is_free ) {
801c08c: 5c 80 00 14 bne r4,r0,801c0dc <_Heap_Resize_block+0xe4>
block_size += next_block_size;
alloc_size += next_block_size;
}
if ( new_alloc_size > alloc_size ) {
801c090: 50 2f 00 16 bgeu r1,r15,801c0e8 <_Heap_Resize_block+0xf0>
801c094: 34 01 00 01 mvi r1,1
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
801c098: 2b 9d 00 04 lw ra,(sp+4)
801c09c: 2b 8b 00 18 lw r11,(sp+24)
801c0a0: 2b 8c 00 14 lw r12,(sp+20)
801c0a4: 2b 8d 00 10 lw r13,(sp+16)
801c0a8: 2b 8e 00 0c lw r14,(sp+12)
801c0ac: 2b 8f 00 08 lw r15,(sp+8)
801c0b0: 37 9c 00 18 addi sp,sp,24
801c0b4: c3 a0 00 00 ret
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET;
/* Statistics */
++stats->resizes;
801c0b8: 34 01 00 02 mvi r1,2
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
801c0bc: 2b 9d 00 04 lw ra,(sp+4)
801c0c0: 2b 8b 00 18 lw r11,(sp+24)
801c0c4: 2b 8c 00 14 lw r12,(sp+20)
801c0c8: 2b 8d 00 10 lw r13,(sp+16)
801c0cc: 2b 8e 00 0c lw r14,(sp+12)
801c0d0: 2b 8f 00 08 lw r15,(sp+8)
801c0d4: 37 9c 00 18 addi sp,sp,24
801c0d8: c3 a0 00 00 ret
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
if ( next_block_is_free ) {
block_size += next_block_size;
801c0dc: b4 a3 28 00 add r5,r5,r3
alloc_size += next_block_size;
801c0e0: b4 23 08 00 add r1,r1,r3
801c0e4: e3 ff ff eb bi 801c090 <_Heap_Resize_block+0x98>
if ( new_alloc_size > alloc_size ) {
return HEAP_RESIZE_UNSATISFIED;
}
if ( next_block_is_free ) {
801c0e8: 44 80 00 13 be r4,r0,801c134 <_Heap_Resize_block+0x13c>
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
801c0ec: 28 c7 00 04 lw r7,(r6+4)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
801c0f0: b4 a6 08 00 add r1,r5,r6
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
801c0f4: 28 44 00 0c lw r4,(r2+12)
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
801c0f8: 20 e7 00 01 andi r7,r7,0x1
801c0fc: b8 a7 28 00 or r5,r5,r7
801c100: 58 c5 00 04 sw (r6+4),r5
_Heap_Block_set_size( block, block_size );
_Heap_Free_list_remove( next_block );
next_block = _Heap_Block_at( block, block_size );
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
801c104: 28 25 00 04 lw r5,(r1+4)
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
801c108: 28 42 00 08 lw r2,(r2+8)
801c10c: 38 a5 00 01 ori r5,r5,0x1
801c110: 58 25 00 04 sw (r1+4),r5
/* Statistics */
--stats->free_blocks;
801c114: 29 61 00 38 lw r1,(r11+56)
stats->free_size -= next_block_size;
801c118: 29 65 00 30 lw r5,(r11+48)
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
801c11c: 58 44 00 0c sw (r2+12),r4
next_block = _Heap_Block_at( block, block_size );
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
/* Statistics */
--stats->free_blocks;
801c120: 34 21 ff ff addi r1,r1,-1
stats->free_size -= next_block_size;
801c124: c8 a3 18 00 sub r3,r5,r3
next_block = _Heap_Block_at( block, block_size );
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
/* Statistics */
--stats->free_blocks;
801c128: 59 61 00 38 sw (r11+56),r1
stats->free_size -= next_block_size;
801c12c: 59 63 00 30 sw (r11+48),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;
801c130: 58 82 00 08 sw (r4+8),r2
}
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
801c134: b8 c0 10 00 mv r2,r6
801c138: b9 e0 20 00 mv r4,r15
801c13c: b9 80 18 00 mv r3,r12
801c140: b9 60 08 00 mv r1,r11
801c144: fb ff 9d 22 calli 80035cc <_Heap_Block_allocate>
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET;
801c148: 28 24 00 04 lw r4,(r1+4)
801c14c: 34 03 ff fe mvi r3,-2
/* Statistics */
--stats->free_blocks;
stats->free_size -= next_block_size;
}
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
801c150: b8 20 10 00 mv r2,r1
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET;
801c154: a0 83 18 00 and r3,r4,r3
801c158: 34 63 00 04 addi r3,r3,4
801c15c: c8 6c 60 00 sub r12,r3,r12
801c160: b4 4c 10 00 add r2,r2,r12
801c164: 59 a2 00 00 sw (r13+0),r2
/* Statistics */
++stats->resizes;
801c168: 29 62 00 54 lw r2,(r11+84)
801c16c: 34 01 00 00 mvi r1,0
801c170: 34 42 00 01 addi r2,r2,1
801c174: 59 62 00 54 sw (r11+84),r2
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
801c178: 2b 9d 00 04 lw ra,(sp+4)
801c17c: 2b 8b 00 18 lw r11,(sp+24)
801c180: 2b 8c 00 14 lw r12,(sp+20)
801c184: 2b 8d 00 10 lw r13,(sp+16)
801c188: 2b 8e 00 0c lw r14,(sp+12)
801c18c: 2b 8f 00 08 lw r15,(sp+8)
801c190: 37 9c 00 18 addi sp,sp,24
801c194: c3 a0 00 00 ret
0801c198 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
801c198: 37 9c ff f0 addi sp,sp,-16
801c19c: 5b 8b 00 10 sw (sp+16),r11
801c1a0: 5b 8c 00 0c sw (sp+12),r12
801c1a4: 5b 8d 00 08 sw (sp+8),r13
801c1a8: 5b 9d 00 04 sw (sp+4),ra
801c1ac: 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 )
801c1b0: 28 22 00 10 lw r2,(r1+16)
801c1b4: b8 20 58 00 mv r11,r1
801c1b8: b9 80 08 00 mv r1,r12
801c1bc: b8 60 68 00 mv r13,r3
801c1c0: fb ff fc ec calli 801b570 <__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;
801c1c4: 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 )
801c1c8: 35 84 ff f8 addi r4,r12,-8
801c1cc: 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
801c1d0: 54 44 00 16 bgu r2,r4,801c228 <_Heap_Size_of_alloc_area+0x90>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
801c1d4: 29 61 00 24 lw r1,(r11+36)
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
801c1d8: 54 81 00 14 bgu r4,r1,801c228 <_Heap_Size_of_alloc_area+0x90><== NEVER TAKEN
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
801c1dc: 28 85 00 04 lw r5,(r4+4)
801c1e0: 34 03 ff fe mvi r3,-2
801c1e4: a0 a3 18 00 and r3,r5,r3
801c1e8: b4 83 20 00 add r4,r4,r3
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
801c1ec: 54 44 00 0f bgu r2,r4,801c228 <_Heap_Size_of_alloc_area+0x90><== NEVER TAKEN
801c1f0: 54 81 00 0e bgu r4,r1,801c228 <_Heap_Size_of_alloc_area+0x90><== NEVER TAKEN
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
801c1f4: 28 81 00 04 lw r1,(r4+4)
801c1f8: 20 21 00 01 andi r1,r1,0x1
801c1fc: 44 20 00 0b be r1,r0,801c228 <_Heap_Size_of_alloc_area+0x90><== NEVER TAKEN
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
801c200: c8 8c 20 00 sub r4,r4,r12
801c204: 34 84 00 04 addi r4,r4,4
801c208: 34 01 00 01 mvi r1,1
801c20c: 59 a4 00 00 sw (r13+0),r4
return true;
}
801c210: 2b 9d 00 04 lw ra,(sp+4)
801c214: 2b 8b 00 10 lw r11,(sp+16)
801c218: 2b 8c 00 0c lw r12,(sp+12)
801c21c: 2b 8d 00 08 lw r13,(sp+8)
801c220: 37 9c 00 10 addi sp,sp,16
801c224: c3 a0 00 00 ret
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
return true;
801c228: 34 01 00 00 mvi r1,0
}
801c22c: 2b 9d 00 04 lw ra,(sp+4)
801c230: 2b 8b 00 10 lw r11,(sp+16)
801c234: 2b 8c 00 0c lw r12,(sp+12)
801c238: 2b 8d 00 08 lw r13,(sp+8)
801c23c: 37 9c 00 10 addi sp,sp,16
801c240: c3 a0 00 00 ret
08003f1c <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
8003f1c: 37 9c ff a8 addi sp,sp,-88
8003f20: 5b 8b 00 50 sw (sp+80),r11
8003f24: 5b 8c 00 4c sw (sp+76),r12
8003f28: 5b 8d 00 48 sw (sp+72),r13
8003f2c: 5b 8e 00 44 sw (sp+68),r14
8003f30: 5b 8f 00 40 sw (sp+64),r15
8003f34: 5b 90 00 3c sw (sp+60),r16
8003f38: 5b 91 00 38 sw (sp+56),r17
8003f3c: 5b 92 00 34 sw (sp+52),r18
8003f40: 5b 93 00 30 sw (sp+48),r19
8003f44: 5b 94 00 2c sw (sp+44),r20
8003f48: 5b 95 00 28 sw (sp+40),r21
8003f4c: 5b 96 00 24 sw (sp+36),r22
8003f50: 5b 97 00 20 sw (sp+32),r23
8003f54: 5b 98 00 1c sw (sp+28),r24
8003f58: 5b 99 00 18 sw (sp+24),r25
8003f5c: 5b 9b 00 14 sw (sp+20),fp
8003f60: 5b 9d 00 10 sw (sp+16),ra
8003f64: 20 63 00 ff andi r3,r3,0xff
8003f68: b8 20 58 00 mv r11,r1
8003f6c: b8 40 80 00 mv r16,r2
uintptr_t const page_size = heap->page_size;
8003f70: 28 32 00 10 lw r18,(r1+16)
uintptr_t const min_block_size = heap->min_block_size;
8003f74: 28 33 00 14 lw r19,(r1+20)
Heap_Block *const last_block = heap->last_block;
8003f78: 28 34 00 24 lw r20,(r1+36)
Heap_Block *block = heap->first_block;
8003f7c: 28 2c 00 20 lw r12,(r1+32)
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
8003f80: 5c 60 00 1c bne r3,r0,8003ff0 <_Heap_Walk+0xd4>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
8003f84: 78 03 08 02 mvhi r3,0x802
8003f88: 38 63 0a 88 ori r3,r3,0xa88
8003f8c: 28 63 00 00 lw r3,(r3+0)
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
8003f90: 78 0f 08 00 mvhi r15,0x800
if ( !_System_state_Is_up( _System_state_Get() ) ) {
8003f94: 34 02 00 03 mvi r2,3
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
8003f98: 39 ef 3e f8 ori r15,r15,0x3ef8
if ( !_System_state_Is_up( _System_state_Get() ) ) {
8003f9c: 44 62 00 1c be r3,r2,800400c <_Heap_Walk+0xf0>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
8003fa0: 34 01 00 01 mvi r1,1
block = next_block;
}
return true;
}
8003fa4: 2b 9d 00 10 lw ra,(sp+16)
8003fa8: 2b 8b 00 50 lw r11,(sp+80)
8003fac: 2b 8c 00 4c lw r12,(sp+76)
8003fb0: 2b 8d 00 48 lw r13,(sp+72)
8003fb4: 2b 8e 00 44 lw r14,(sp+68)
8003fb8: 2b 8f 00 40 lw r15,(sp+64)
8003fbc: 2b 90 00 3c lw r16,(sp+60)
8003fc0: 2b 91 00 38 lw r17,(sp+56)
8003fc4: 2b 92 00 34 lw r18,(sp+52)
8003fc8: 2b 93 00 30 lw r19,(sp+48)
8003fcc: 2b 94 00 2c lw r20,(sp+44)
8003fd0: 2b 95 00 28 lw r21,(sp+40)
8003fd4: 2b 96 00 24 lw r22,(sp+36)
8003fd8: 2b 97 00 20 lw r23,(sp+32)
8003fdc: 2b 98 00 1c lw r24,(sp+28)
8003fe0: 2b 99 00 18 lw r25,(sp+24)
8003fe4: 2b 9b 00 14 lw fp,(sp+20)
8003fe8: 37 9c 00 58 addi sp,sp,88
8003fec: c3 a0 00 00 ret
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
8003ff0: 78 03 08 02 mvhi r3,0x802
8003ff4: 38 63 0a 88 ori r3,r3,0xa88
8003ff8: 28 63 00 00 lw r3,(r3+0)
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
8003ffc: 78 0f 08 00 mvhi r15,0x800
if ( !_System_state_Is_up( _System_state_Get() ) ) {
8004000: 34 02 00 03 mvi r2,3
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
8004004: 39 ef 45 08 ori r15,r15,0x4508
if ( !_System_state_Is_up( _System_state_Get() ) ) {
8004008: 5c 62 ff e6 bne r3,r2,8003fa0 <_Heap_Walk+0x84> <== 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)(
800400c: 29 61 00 08 lw r1,(r11+8)
8004010: 29 66 00 18 lw r6,(r11+24)
8004014: 29 67 00 1c lw r7,(r11+28)
8004018: 5b 81 00 08 sw (sp+8),r1
800401c: 29 61 00 0c lw r1,(r11+12)
8004020: 78 03 08 01 mvhi r3,0x801
8004024: 5b 94 00 04 sw (sp+4),r20
8004028: 5b 81 00 0c sw (sp+12),r1
800402c: 38 63 dc 14 ori r3,r3,0xdc14
8004030: ba 00 08 00 mv r1,r16
8004034: 34 02 00 00 mvi r2,0
8004038: ba 40 20 00 mv r4,r18
800403c: ba 60 28 00 mv r5,r19
8004040: b9 80 40 00 mv r8,r12
8004044: d9 e0 00 00 call r15
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
8004048: 46 40 00 d1 be r18,r0,800438c <_Heap_Walk+0x470>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
800404c: 22 4d 00 07 andi r13,r18,0x7
8004050: 5d a0 00 d6 bne r13,r0,80043a8 <_Heap_Walk+0x48c>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
8004054: ba 60 08 00 mv r1,r19
8004058: ba 40 10 00 mv r2,r18
800405c: fb ff f3 11 calli 8000ca0 <__umodsi3>
8004060: b8 20 88 00 mv r17,r1
8004064: 5c 2d 00 d9 bne r1,r13,80043c8 <_Heap_Walk+0x4ac>
);
return false;
}
if (
8004068: 35 81 00 08 addi r1,r12,8
800406c: ba 40 10 00 mv r2,r18
8004070: fb ff f3 0c calli 8000ca0 <__umodsi3>
8004074: b8 20 70 00 mv r14,r1
8004078: 5c 31 00 ee bne r1,r17,8004430 <_Heap_Walk+0x514>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
800407c: 29 8d 00 04 lw r13,(r12+4)
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
8004080: 21 b1 00 01 andi r17,r13,0x1
8004084: 46 21 00 f3 be r17,r1,8004450 <_Heap_Walk+0x534>
);
return false;
}
if ( first_block->prev_size != page_size ) {
8004088: 29 84 00 00 lw r4,(r12+0)
800408c: 5e 44 00 60 bne r18,r4,800420c <_Heap_Walk+0x2f0>
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
8004090: 2a 82 00 04 lw r2,(r20+4)
8004094: 34 01 ff fe mvi r1,-2
8004098: a0 41 08 00 and r1,r2,r1
800409c: b6 81 08 00 add r1,r20,r1
80040a0: 28 35 00 04 lw r21,(r1+4)
80040a4: 22 b5 00 01 andi r21,r21,0x1
80040a8: 46 ae 00 f1 be r21,r14,800446c <_Heap_Walk+0x550>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
80040ac: 29 6e 00 08 lw r14,(r11+8)
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
80040b0: 29 78 00 10 lw r24,(r11+16)
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
80040b4: 45 6e 00 24 be r11,r14,8004144 <_Heap_Walk+0x228>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
80040b8: 29 76 00 20 lw r22,(r11+32)
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
80040bc: 56 ce 00 fb bgu r22,r14,80044a8 <_Heap_Walk+0x58c> <== NEVER TAKEN
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
80040c0: 29 79 00 24 lw r25,(r11+36)
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
80040c4: 55 d9 00 f9 bgu r14,r25,80044a8 <_Heap_Walk+0x58c> <== NEVER TAKEN
);
return false;
}
if (
80040c8: 35 c1 00 08 addi r1,r14,8
80040cc: bb 00 10 00 mv r2,r24
80040d0: fb ff f2 f4 calli 8000ca0 <__umodsi3>
80040d4: 5c 20 00 ed bne r1,r0,8004488 <_Heap_Walk+0x56c> <== NEVER TAKEN
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
80040d8: 29 c2 00 04 lw r2,(r14+4)
80040dc: 34 17 ff fe mvi r23,-2
80040e0: a0 57 10 00 and r2,r2,r23
80040e4: b5 c2 10 00 add r2,r14,r2
80040e8: 28 42 00 04 lw r2,(r2+4)
80040ec: 20 42 00 01 andi r2,r2,0x1
80040f0: 5c 41 00 fe bne r2,r1,80044e8 <_Heap_Walk+0x5cc> <== NEVER TAKEN
);
return false;
}
if ( free_block->prev != prev_block ) {
80040f4: 29 c5 00 0c lw r5,(r14+12)
80040f8: 45 65 00 10 be r11,r5,8004138 <_Heap_Walk+0x21c> <== ALWAYS TAKEN
80040fc: e0 00 00 f3 bi 80044c8 <_Heap_Walk+0x5ac> <== NOT EXECUTED
8004100: 56 ce 00 ea bgu r22,r14,80044a8 <_Heap_Walk+0x58c>
);
return false;
}
if (
8004104: 35 c1 00 08 addi r1,r14,8
8004108: bb 00 10 00 mv r2,r24
800410c: 55 d9 00 e7 bgu r14,r25,80044a8 <_Heap_Walk+0x58c> <== NEVER TAKEN
8004110: fb ff f2 e4 calli 8000ca0 <__umodsi3>
8004114: 5c 20 00 dd bne r1,r0,8004488 <_Heap_Walk+0x56c>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
8004118: 29 c3 00 04 lw r3,(r14+4)
800411c: a0 77 18 00 and r3,r3,r23
8004120: b4 6e 18 00 add r3,r3,r14
8004124: 28 63 00 04 lw r3,(r3+4)
8004128: 20 63 00 01 andi r3,r3,0x1
800412c: 5c 61 00 ef bne r3,r1,80044e8 <_Heap_Walk+0x5cc>
);
return false;
}
if ( free_block->prev != prev_block ) {
8004130: 29 c5 00 0c lw r5,(r14+12)
8004134: 5c b5 00 e5 bne r5,r21,80044c8 <_Heap_Walk+0x5ac>
(*printer)(
8004138: b9 c0 a8 00 mv r21,r14
return false;
}
prev_block = free_block;
free_block = free_block->next;
800413c: 29 ce 00 08 lw r14,(r14+8)
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
8004140: 5d 6e ff f0 bne r11,r14,8004100 <_Heap_Walk+0x1e4>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
8004144: 46 8c ff 97 be r20,r12,8003fa0 <_Heap_Walk+0x84> <== NEVER TAKEN
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
8004148: 78 01 08 01 mvhi r1,0x801
800414c: 5b 81 00 54 sw (sp+84),r1
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
8004150: 78 01 08 01 mvhi r1,0x801
8004154: 5b 81 00 58 sw (sp+88),r1
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
8004158: 2b 81 00 54 lw r1,(sp+84)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
800415c: 34 16 ff fe mvi r22,-2
8004160: 78 15 08 01 mvhi r21,0x801
8004164: 38 21 df 6c ori r1,r1,0xdf6c
8004168: 5b 81 00 54 sw (sp+84),r1
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
800416c: 2b 81 00 58 lw r1,(sp+88)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
8004170: 78 18 08 01 mvhi r24,0x801
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
8004174: 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)" : ""),
8004178: 38 21 df 54 ori r1,r1,0xdf54
- 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;
800417c: a1 b6 68 00 and r13,r13,r22
8004180: 5b 81 00 58 sw (sp+88),r1
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
8004184: ba 20 10 00 mv r2,r17
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
8004188: 3a b5 df dc ori r21,r21,0xdfdc
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)(
800418c: 3b 18 df 60 ori r24,r24,0xdf60
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
8004190: 3a f7 df 48 ori r23,r23,0xdf48
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
8004194: 78 1b 08 01 mvhi fp,0x801
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
8004198: b5 ac 70 00 add r14,r13,r12
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
800419c: 44 40 00 59 be r2,r0,8004300 <_Heap_Walk+0x3e4> <== NEVER TAKEN
(*printer)(
80041a0: 78 03 08 01 mvhi r3,0x801
80041a4: ba 00 08 00 mv r1,r16
80041a8: 34 02 00 00 mvi r2,0
80041ac: 38 63 de 48 ori r3,r3,0xde48
80041b0: b9 80 20 00 mv r4,r12
80041b4: b9 a0 28 00 mv r5,r13
80041b8: d9 e0 00 00 call r15
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
80041bc: 29 63 00 20 lw r3,(r11+32)
80041c0: 54 6e 00 8a bgu r3,r14,80043e8 <_Heap_Walk+0x4cc> <== NEVER TAKEN
80041c4: 29 61 00 24 lw r1,(r11+36)
80041c8: 55 c1 00 88 bgu r14,r1,80043e8 <_Heap_Walk+0x4cc>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
80041cc: b9 a0 08 00 mv r1,r13
80041d0: ba 40 10 00 mv r2,r18
80041d4: fb ff f2 b3 calli 8000ca0 <__umodsi3>
80041d8: b8 20 88 00 mv r17,r1
80041dc: 5c 20 00 8c bne r1,r0,800440c <_Heap_Walk+0x4f0>
);
return false;
}
if ( block_size < min_block_size ) {
80041e0: 51 b3 00 13 bgeu r13,r19,800422c <_Heap_Walk+0x310>
(*printer)(
80041e4: 78 03 08 01 mvhi r3,0x801
80041e8: ba 00 08 00 mv r1,r16
80041ec: 38 63 de e8 ori r3,r3,0xdee8
80041f0: b9 80 20 00 mv r4,r12
80041f4: b9 a0 28 00 mv r5,r13
80041f8: ba 60 30 00 mv r6,r19
80041fc: 34 02 00 01 mvi r2,1
8004200: d9 e0 00 00 call r15
8004204: ba 20 08 00 mv r1,r17
block,
block_size,
min_block_size
);
return false;
8004208: e3 ff ff 67 bi 8003fa4 <_Heap_Walk+0x88>
return false;
}
if ( first_block->prev_size != page_size ) {
(*printer)(
800420c: 78 03 08 01 mvhi r3,0x801
8004210: ba 00 08 00 mv r1,r16
8004214: 38 63 dd 64 ori r3,r3,0xdd64
8004218: ba 40 28 00 mv r5,r18
800421c: 34 02 00 01 mvi r2,1
8004220: d9 e0 00 00 call r15
8004224: b9 c0 08 00 mv r1,r14
8004228: e3 ff ff 5f bi 8003fa4 <_Heap_Walk+0x88>
);
return false;
}
if ( next_block_begin <= block_begin ) {
800422c: 55 cc 00 0a bgu r14,r12,8004254 <_Heap_Walk+0x338>
(*printer)(
8004230: 78 03 08 01 mvhi r3,0x801
8004234: ba 00 08 00 mv r1,r16
8004238: 38 63 df 14 ori r3,r3,0xdf14
800423c: b9 80 20 00 mv r4,r12
8004240: b9 c0 28 00 mv r5,r14
8004244: 34 02 00 01 mvi r2,1
8004248: d9 e0 00 00 call r15
800424c: ba 20 08 00 mv r1,r17
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
8004250: e3 ff ff 55 bi 8003fa4 <_Heap_Walk+0x88>
}
if ( !_Heap_Is_prev_used( next_block ) ) {
8004254: 29 c3 00 04 lw r3,(r14+4)
8004258: 20 63 00 01 andi r3,r3,0x1
800425c: 5c 60 00 22 bne r3,r0,80042e4 <_Heap_Walk+0x3c8>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
8004260: 29 91 00 04 lw r17,(r12+4)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
8004264: 29 85 00 0c lw r5,(r12+12)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
8004268: 29 61 00 08 lw r1,(r11+8)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
800426c: a2 36 68 00 and r13,r17,r22
return _Heap_Free_list_head(heap)->next;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
8004270: 29 63 00 0c lw r3,(r11+12)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
8004274: b5 8d c8 00 add r25,r12,r13
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
8004278: ba e0 30 00 mv r6,r23
800427c: 44 25 00 03 be r1,r5,8004288 <_Heap_Walk+0x36c>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
8004280: ba a0 30 00 mv r6,r21
8004284: 44 ab 00 40 be r5,r11,8004384 <_Heap_Walk+0x468>
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
8004288: 29 87 00 08 lw r7,(r12+8)
800428c: bb 00 40 00 mv r8,r24
8004290: 44 67 00 03 be r3,r7,800429c <_Heap_Walk+0x380>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
8004294: ba a0 40 00 mv r8,r21
8004298: 44 eb 00 39 be r7,r11,800437c <_Heap_Walk+0x460>
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
800429c: 78 03 08 01 mvhi r3,0x801
80042a0: ba 00 08 00 mv r1,r16
80042a4: 34 02 00 00 mvi r2,0
80042a8: 38 63 df 78 ori r3,r3,0xdf78
80042ac: b9 80 20 00 mv r4,r12
80042b0: d9 e0 00 00 call r15
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
80042b4: 2b 26 00 00 lw r6,(r25+0)
80042b8: 45 a6 00 1a be r13,r6,8004320 <_Heap_Walk+0x404>
(*printer)(
80042bc: 78 03 08 01 mvhi r3,0x801
80042c0: ba 00 08 00 mv r1,r16
80042c4: 38 63 df a4 ori r3,r3,0xdfa4
80042c8: b9 80 20 00 mv r4,r12
80042cc: b9 a0 28 00 mv r5,r13
80042d0: bb 20 38 00 mv r7,r25
80042d4: 34 02 00 01 mvi r2,1
80042d8: d9 e0 00 00 call r15
80042dc: 34 01 00 00 mvi r1,0
80042e0: e3 ff ff 31 bi 8003fa4 <_Heap_Walk+0x88>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
80042e4: 46 8e ff 2f be r20,r14,8003fa0 <_Heap_Walk+0x84>
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
80042e8: 29 cd 00 04 lw r13,(r14+4)
80042ec: b9 c0 60 00 mv r12,r14
80042f0: 21 a2 00 01 andi r2,r13,0x1
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
80042f4: a1 b6 68 00 and r13,r13,r22
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
80042f8: b5 ac 70 00 add r14,r13,r12
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
80042fc: 5c 40 ff a9 bne r2,r0,80041a0 <_Heap_Walk+0x284>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
8004300: 29 86 00 00 lw r6,(r12+0)
8004304: bb 60 18 00 mv r3,fp
8004308: ba 00 08 00 mv r1,r16
800430c: 38 63 de 60 ori r3,r3,0xde60
8004310: b9 80 20 00 mv r4,r12
8004314: b9 a0 28 00 mv r5,r13
8004318: d9 e0 00 00 call r15
800431c: e3 ff ff a8 bi 80041bc <_Heap_Walk+0x2a0>
);
return false;
}
if ( !prev_used ) {
8004320: 22 31 00 01 andi r17,r17,0x1
8004324: 46 20 00 0e be r17,r0,800435c <_Heap_Walk+0x440>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
8004328: 29 63 00 08 lw r3,(r11+8)
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
800432c: 44 6b 00 04 be r3,r11,800433c <_Heap_Walk+0x420> <== NEVER TAKEN
if ( free_block == block ) {
8004330: 44 6c ff ed be r3,r12,80042e4 <_Heap_Walk+0x3c8>
return true;
}
free_block = free_block->next;
8004334: 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 ) {
8004338: 5c 6b ff fe bne r3,r11,8004330 <_Heap_Walk+0x414>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
800433c: 78 03 08 01 mvhi r3,0x801
8004340: ba 00 08 00 mv r1,r16
8004344: 38 63 e0 10 ori r3,r3,0xe010
8004348: b9 80 20 00 mv r4,r12
800434c: 34 02 00 01 mvi r2,1
8004350: d9 e0 00 00 call r15
8004354: 34 01 00 00 mvi r1,0
8004358: e3 ff ff 13 bi 8003fa4 <_Heap_Walk+0x88>
return false;
}
if ( !prev_used ) {
(*printer)(
800435c: 78 03 08 01 mvhi r3,0x801
8004360: ba 00 08 00 mv r1,r16
8004364: 38 63 df e0 ori r3,r3,0xdfe0
8004368: b9 80 20 00 mv r4,r12
800436c: 34 02 00 01 mvi r2,1
8004370: d9 e0 00 00 call r15
8004374: ba 20 08 00 mv r1,r17
8004378: e3 ff ff 0b bi 8003fa4 <_Heap_Walk+0x88>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
800437c: 2b 88 00 54 lw r8,(sp+84)
8004380: e3 ff ff c7 bi 800429c <_Heap_Walk+0x380>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
8004384: 2b 86 00 58 lw r6,(sp+88)
8004388: e3 ff ff c0 bi 8004288 <_Heap_Walk+0x36c>
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
800438c: 78 03 08 01 mvhi r3,0x801
8004390: ba 00 08 00 mv r1,r16
8004394: 38 63 dc a8 ori r3,r3,0xdca8
8004398: 34 02 00 01 mvi r2,1
800439c: d9 e0 00 00 call r15
80043a0: ba 40 08 00 mv r1,r18
80043a4: e3 ff ff 00 bi 8003fa4 <_Heap_Walk+0x88>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
80043a8: 78 03 08 01 mvhi r3,0x801
80043ac: ba 00 08 00 mv r1,r16
80043b0: 38 63 dc bc ori r3,r3,0xdcbc
80043b4: ba 40 20 00 mv r4,r18
80043b8: 34 02 00 01 mvi r2,1
80043bc: d9 e0 00 00 call r15
80043c0: 34 01 00 00 mvi r1,0
80043c4: e3 ff fe f8 bi 8003fa4 <_Heap_Walk+0x88>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
80043c8: 78 03 08 01 mvhi r3,0x801
80043cc: ba 00 08 00 mv r1,r16
80043d0: 38 63 dc dc ori r3,r3,0xdcdc
80043d4: ba 60 20 00 mv r4,r19
80043d8: 34 02 00 01 mvi r2,1
80043dc: d9 e0 00 00 call r15
80043e0: b9 a0 08 00 mv r1,r13
80043e4: e3 ff fe f0 bi 8003fa4 <_Heap_Walk+0x88>
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
80043e8: 78 03 08 01 mvhi r3,0x801
80043ec: ba 00 08 00 mv r1,r16
80043f0: 38 63 de 88 ori r3,r3,0xde88
80043f4: b9 80 20 00 mv r4,r12
80043f8: b9 c0 28 00 mv r5,r14
80043fc: 34 02 00 01 mvi r2,1
8004400: d9 e0 00 00 call r15
8004404: 34 01 00 00 mvi r1,0
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
8004408: e3 ff fe e7 bi 8003fa4 <_Heap_Walk+0x88>
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
(*printer)(
800440c: 78 03 08 01 mvhi r3,0x801
8004410: ba 00 08 00 mv r1,r16
8004414: 38 63 de b8 ori r3,r3,0xdeb8
8004418: b9 80 20 00 mv r4,r12
800441c: b9 a0 28 00 mv r5,r13
8004420: 34 02 00 01 mvi r2,1
8004424: d9 e0 00 00 call r15
8004428: 34 01 00 00 mvi r1,0
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
800442c: e3 ff fe de bi 8003fa4 <_Heap_Walk+0x88>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
8004430: 78 03 08 01 mvhi r3,0x801
8004434: ba 00 08 00 mv r1,r16
8004438: 38 63 dd 00 ori r3,r3,0xdd00
800443c: b9 80 20 00 mv r4,r12
8004440: 34 02 00 01 mvi r2,1
8004444: d9 e0 00 00 call r15
8004448: ba 20 08 00 mv r1,r17
800444c: e3 ff fe d6 bi 8003fa4 <_Heap_Walk+0x88>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
8004450: 78 03 08 01 mvhi r3,0x801
8004454: ba 00 08 00 mv r1,r16
8004458: 38 63 dd 34 ori r3,r3,0xdd34
800445c: 34 02 00 01 mvi r2,1
8004460: d9 e0 00 00 call r15
8004464: ba 20 08 00 mv r1,r17
8004468: e3 ff fe cf bi 8003fa4 <_Heap_Walk+0x88>
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
800446c: 78 03 08 01 mvhi r3,0x801
8004470: ba 00 08 00 mv r1,r16
8004474: 38 63 dd 90 ori r3,r3,0xdd90
8004478: 34 02 00 01 mvi r2,1
800447c: d9 e0 00 00 call r15
8004480: ba a0 08 00 mv r1,r21
8004484: e3 ff fe c8 bi 8003fa4 <_Heap_Walk+0x88>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
8004488: 78 03 08 01 mvhi r3,0x801
800448c: ba 00 08 00 mv r1,r16
8004490: 38 63 dd c8 ori r3,r3,0xddc8
8004494: b9 c0 20 00 mv r4,r14
8004498: 34 02 00 01 mvi r2,1
800449c: d9 e0 00 00 call r15
80044a0: 34 01 00 00 mvi r1,0
80044a4: e3 ff fe c0 bi 8003fa4 <_Heap_Walk+0x88>
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
80044a8: 78 03 08 01 mvhi r3,0x801
80044ac: ba 00 08 00 mv r1,r16
80044b0: 38 63 dd a8 ori r3,r3,0xdda8
80044b4: b9 c0 20 00 mv r4,r14
80044b8: 34 02 00 01 mvi r2,1
80044bc: d9 e0 00 00 call r15
80044c0: 34 01 00 00 mvi r1,0
80044c4: e3 ff fe b8 bi 8003fa4 <_Heap_Walk+0x88>
return false;
}
if ( free_block->prev != prev_block ) {
(*printer)(
80044c8: 78 03 08 01 mvhi r3,0x801
80044cc: ba 00 08 00 mv r1,r16
80044d0: 38 63 de 14 ori r3,r3,0xde14
80044d4: b9 c0 20 00 mv r4,r14
80044d8: 34 02 00 01 mvi r2,1
80044dc: d9 e0 00 00 call r15
80044e0: 34 01 00 00 mvi r1,0
80044e4: e3 ff fe b0 bi 8003fa4 <_Heap_Walk+0x88>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
80044e8: 78 03 08 01 mvhi r3,0x801
80044ec: ba 00 08 00 mv r1,r16
80044f0: 38 63 dd f8 ori r3,r3,0xddf8
80044f4: b9 c0 20 00 mv r4,r14
80044f8: 34 02 00 01 mvi r2,1
80044fc: d9 e0 00 00 call r15
8004500: 34 01 00 00 mvi r1,0
8004504: e3 ff fe a8 bi 8003fa4 <_Heap_Walk+0x88>
08002998 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
8002998: 37 9c ff f4 addi sp,sp,-12
800299c: 5b 8b 00 0c sw (sp+12),r11
80029a0: 5b 8c 00 08 sw (sp+8),r12
80029a4: 5b 9d 00 04 sw (sp+4),ra
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
80029a8: 78 0c 08 01 mvhi r12,0x801
80029ac: 39 8c f1 90 ori r12,r12,0xf190
80029b0: 29 81 00 00 lw r1,(r12+0)
80029b4: 44 20 00 09 be r1,r0,80029d8 <_IO_Initialize_all_drivers+0x40><== NEVER TAKEN
80029b8: 34 0b 00 00 mvi r11,0
(void) rtems_io_initialize( major, 0, NULL );
80029bc: 34 02 00 00 mvi r2,0
80029c0: b9 60 08 00 mv r1,r11
80029c4: b8 40 18 00 mv r3,r2
80029c8: f8 00 1a 4f calli 8009304 <rtems_io_initialize>
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
80029cc: 29 81 00 00 lw r1,(r12+0)
80029d0: 35 6b 00 01 addi r11,r11,1
80029d4: 54 2b ff fa bgu r1,r11,80029bc <_IO_Initialize_all_drivers+0x24>
(void) rtems_io_initialize( major, 0, NULL );
}
80029d8: 2b 9d 00 04 lw ra,(sp+4)
80029dc: 2b 8b 00 0c lw r11,(sp+12)
80029e0: 2b 8c 00 08 lw r12,(sp+8)
80029e4: 37 9c 00 0c addi sp,sp,12
80029e8: c3 a0 00 00 ret
080029ec <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
80029ec: 37 9c ff e8 addi sp,sp,-24
80029f0: 5b 8b 00 18 sw (sp+24),r11
80029f4: 5b 8c 00 14 sw (sp+20),r12
80029f8: 5b 8d 00 10 sw (sp+16),r13
80029fc: 5b 8e 00 0c sw (sp+12),r14
8002a00: 5b 8f 00 08 sw (sp+8),r15
8002a04: 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;
8002a08: 78 01 08 01 mvhi r1,0x801
8002a0c: 38 21 e0 c4 ori r1,r1,0xe0c4
drivers_in_table = Configuration.number_of_device_drivers;
number_of_drivers = Configuration.maximum_drivers;
8002a10: 28 2d 00 2c lw r13,(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;
8002a14: 28 2b 00 30 lw r11,(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;
8002a18: 28 2c 00 34 lw r12,(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 )
8002a1c: 51 6d 00 2d bgeu r11,r13,8002ad0 <_IO_Manager_initialization+0xe4>
* 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 )
8002a20: b5 ad 08 00 add r1,r13,r13
8002a24: 34 02 00 03 mvi r2,3
8002a28: b4 2d 08 00 add r1,r1,r13
8002a2c: fb ff f5 f1 calli 80001f0 <__ashlsi3>
8002a30: b8 20 78 00 mv r15,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 *)
8002a34: f8 00 0d 61 calli 8005fb8 <_Workspace_Allocate_or_fatal_error>
8002a38: 78 0e 08 01 mvhi r14,0x801
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
8002a3c: 78 04 08 01 mvhi r4,0x801
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
8002a40: 39 ce f1 94 ori r14,r14,0xf194
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
8002a44: 38 84 f1 90 ori r4,r4,0xf190
memset(
8002a48: b9 e0 18 00 mv r3,r15
8002a4c: 34 02 00 00 mvi r2,0
_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;
8002a50: 58 8d 00 00 sw (r4+0),r13
/*
* 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 *)
8002a54: 59 c1 00 00 sw (r14+0),r1
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
8002a58: f8 00 2d 4f calli 800df94 <memset>
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
8002a5c: 45 60 00 15 be r11,r0,8002ab0 <_IO_Manager_initialization+0xc4><== NEVER TAKEN
8002a60: 29 c5 00 00 lw r5,(r14+0)
8002a64: 34 03 00 00 mvi r3,0
8002a68: b8 60 20 00 mv r4,r3
_IO_Driver_address_table[index] = driver_table[index];
8002a6c: b5 83 10 00 add r2,r12,r3
8002a70: 28 46 00 00 lw r6,(r2+0)
8002a74: b4 a3 08 00 add r1,r5,r3
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
8002a78: 34 84 00 01 addi r4,r4,1
_IO_Driver_address_table[index] = driver_table[index];
8002a7c: 58 26 00 00 sw (r1+0),r6
8002a80: 28 46 00 04 lw r6,(r2+4)
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
8002a84: 34 63 00 18 addi r3,r3,24
_IO_Driver_address_table[index] = driver_table[index];
8002a88: 58 26 00 04 sw (r1+4),r6
8002a8c: 28 46 00 08 lw r6,(r2+8)
8002a90: 58 26 00 08 sw (r1+8),r6
8002a94: 28 46 00 0c lw r6,(r2+12)
8002a98: 58 26 00 0c sw (r1+12),r6
8002a9c: 28 46 00 10 lw r6,(r2+16)
8002aa0: 58 26 00 10 sw (r1+16),r6
8002aa4: 28 42 00 14 lw r2,(r2+20)
8002aa8: 58 22 00 14 sw (r1+20),r2
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
8002aac: 55 64 ff f0 bgu r11,r4,8002a6c <_IO_Manager_initialization+0x80>
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
8002ab0: 2b 9d 00 04 lw ra,(sp+4)
8002ab4: 2b 8b 00 18 lw r11,(sp+24)
8002ab8: 2b 8c 00 14 lw r12,(sp+20)
8002abc: 2b 8d 00 10 lw r13,(sp+16)
8002ac0: 2b 8e 00 0c lw r14,(sp+12)
8002ac4: 2b 8f 00 08 lw r15,(sp+8)
8002ac8: 37 9c 00 18 addi sp,sp,24
8002acc: c3 a0 00 00 ret
* 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;
8002ad0: 78 02 08 01 mvhi r2,0x801
_IO_Number_of_drivers = number_of_drivers;
8002ad4: 78 01 08 01 mvhi r1,0x801
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
8002ad8: 38 42 f1 94 ori r2,r2,0xf194
_IO_Number_of_drivers = number_of_drivers;
8002adc: 38 21 f1 90 ori r1,r1,0xf190
* 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;
8002ae0: 58 4c 00 00 sw (r2+0),r12
_IO_Number_of_drivers = number_of_drivers;
8002ae4: 58 2b 00 00 sw (r1+0),r11
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
8002ae8: 2b 9d 00 04 lw ra,(sp+4)
8002aec: 2b 8b 00 18 lw r11,(sp+24)
8002af0: 2b 8c 00 14 lw r12,(sp+20)
8002af4: 2b 8d 00 10 lw r13,(sp+16)
8002af8: 2b 8e 00 0c lw r14,(sp+12)
8002afc: 2b 8f 00 08 lw r15,(sp+8)
8002b00: 37 9c 00 18 addi sp,sp,24
8002b04: c3 a0 00 00 ret
08003790 <_ISR_Handler_initialization>:
*
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
8003790: 37 9c ff f4 addi sp,sp,-12
8003794: 5b 8b 00 0c sw (sp+12),r11
8003798: 5b 8c 00 08 sw (sp+8),r12
800379c: 5b 9d 00 04 sw (sp+4),ra
_ISR_Signals_to_thread_executing = false;
80037a0: 78 03 08 01 mvhi r3,0x801
_ISR_Nest_level = 0;
80037a4: 78 02 08 01 mvhi r2,0x801
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
_ISR_Signals_to_thread_executing = false;
80037a8: 34 04 00 00 mvi r4,0
80037ac: 38 63 e9 f8 ori r3,r3,0xe9f8
_ISR_Nest_level = 0;
80037b0: 38 42 e9 3c ori r2,r2,0xe93c
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
_ISR_Signals_to_thread_executing = false;
80037b4: 30 64 00 00 sb (r3+0),r4
_ISR_Nest_level = 0;
80037b8: 58 44 00 00 sw (r2+0),r4
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
_ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
80037bc: 34 01 00 80 mvi r1,128
void _ISR_Handler_initialization( void )
{
_ISR_Signals_to_thread_executing = false;
_ISR_Nest_level = 0;
80037c0: b8 80 60 00 mv r12,r4
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
_ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
80037c4: f8 00 09 fd calli 8005fb8 <_Workspace_Allocate_or_fatal_error>
_CPU_Initialize_vectors();
#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) )
80037c8: 78 0b 08 01 mvhi r11,0x801
80037cc: 78 02 08 01 mvhi r2,0x801
80037d0: 38 42 e0 bc ori r2,r2,0xe0bc
80037d4: 39 6b e0 c4 ori r11,r11,0xe0c4
80037d8: 28 44 00 00 lw r4,(r2+0)
80037dc: 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(
80037e0: 78 02 08 01 mvhi r2,0x801
80037e4: 38 42 e9 20 ori r2,r2,0xe920
80037e8: 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) )
80037ec: 50 64 00 05 bgeu r3,r4,8003800 <_ISR_Handler_initialization+0x70><== ALWAYS TAKEN
_Internal_error_Occurred(
80037f0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
80037f4: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
80037f8: 34 03 00 05 mvi r3,5 <== NOT EXECUTED
80037fc: fb ff ff d6 calli 8003754 <_Internal_error_Occurred> <== NOT EXECUTED
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
);
_CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
8003800: b8 60 08 00 mv r1,r3
8003804: f8 00 09 ed calli 8005fb8 <_Workspace_Allocate_or_fatal_error>
Configuration.interrupt_stack_size
);
_CPU_Interrupt_stack_high = _Addresses_Add_offset(
8003808: 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(
800380c: 78 02 08 01 mvhi r2,0x801
Configuration.interrupt_stack_size
);
_CPU_Interrupt_stack_high = _Addresses_Add_offset(
8003810: 78 03 08 01 mvhi r3,0x801
8003814: 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(
8003818: 38 42 e8 b4 ori r2,r2,0xe8b4
Configuration.interrupt_stack_size
);
_CPU_Interrupt_stack_high = _Addresses_Add_offset(
800381c: 38 63 e8 38 ori r3,r3,0xe838
8003820: 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(
8003824: 58 41 00 00 sw (r2+0),r1
#if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE )
_CPU_Install_interrupt_stack();
#endif
}
8003828: 2b 9d 00 04 lw ra,(sp+4)
800382c: 2b 8b 00 0c lw r11,(sp+12)
8003830: 2b 8c 00 08 lw r12,(sp+8)
8003834: 37 9c 00 0c addi sp,sp,12
8003838: c3 a0 00 00 ret
0800383c <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
800383c: 37 9c ff ec addi sp,sp,-20
8003840: 5b 8b 00 14 sw (sp+20),r11
8003844: 5b 8c 00 10 sw (sp+16),r12
8003848: 5b 8d 00 0c sw (sp+12),r13
800384c: 5b 8e 00 08 sw (sp+8),r14
8003850: 5b 9d 00 04 sw (sp+4),ra
8003854: 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 )
8003858: 28 21 00 18 lw r1,(r1+24)
800385c: b8 20 60 00 mv r12,r1
8003860: 5c 20 00 09 bne r1,r0,8003884 <_Objects_Allocate+0x48> <== ALWAYS TAKEN
information->inactive--;
}
}
return the_object;
}
8003864: b9 80 08 00 mv r1,r12
8003868: 2b 9d 00 04 lw ra,(sp+4)
800386c: 2b 8b 00 14 lw r11,(sp+20)
8003870: 2b 8c 00 10 lw r12,(sp+16)
8003874: 2b 8d 00 0c lw r13,(sp+12)
8003878: 2b 8e 00 08 lw r14,(sp+8)
800387c: 37 9c 00 14 addi sp,sp,20
8003880: c3 a0 00 00 ret
/*
* 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 );
8003884: 35 6d 00 20 addi r13,r11,32
8003888: b9 a0 08 00 mv r1,r13
800388c: f8 00 16 d0 calli 80093cc <_Chain_Get>
8003890: b8 20 60 00 mv r12,r1
if ( information->auto_extend ) {
8003894: 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 );
8003898: b9 80 70 00 mv r14,r12
if ( information->auto_extend ) {
800389c: 44 20 ff f2 be r1,r0,8003864 <_Objects_Allocate+0x28>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
80038a0: 45 80 00 1a be r12,r0,8003908 <_Objects_Allocate+0xcc>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
80038a4: 29 83 00 08 lw r3,(r12+8)
80038a8: 29 61 00 08 lw r1,(r11+8)
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
80038ac: 2d 62 00 14 lhu r2,(r11+20)
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
80038b0: 20 63 ff ff andi r3,r3,0xffff
80038b4: 20 21 ff ff andi r1,r1,0xffff
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
80038b8: c8 61 08 00 sub r1,r3,r1
80038bc: f8 00 5f 1d calli 801b530 <__udivsi3>
80038c0: 34 02 00 02 mvi r2,2
80038c4: fb ff f2 4b calli 80001f0 <__ashlsi3>
80038c8: 29 62 00 30 lw r2,(r11+48)
information->inactive--;
80038cc: 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 ]--;
80038d0: b4 41 08 00 add r1,r2,r1
80038d4: 28 22 00 00 lw r2,(r1+0)
information->inactive--;
80038d8: 34 63 ff ff addi r3,r3,-1
80038dc: 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 ]--;
80038e0: 34 42 ff ff addi r2,r2,-1
80038e4: 58 22 00 00 sw (r1+0),r2
information->inactive--;
}
}
return the_object;
}
80038e8: b9 80 08 00 mv r1,r12
80038ec: 2b 9d 00 04 lw ra,(sp+4)
80038f0: 2b 8b 00 14 lw r11,(sp+20)
80038f4: 2b 8c 00 10 lw r12,(sp+16)
80038f8: 2b 8d 00 0c lw r13,(sp+12)
80038fc: 2b 8e 00 08 lw r14,(sp+8)
8003900: 37 9c 00 14 addi sp,sp,20
8003904: c3 a0 00 00 ret
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
8003908: b9 60 08 00 mv r1,r11
800390c: f8 00 00 06 calli 8003924 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
8003910: b9 a0 08 00 mv r1,r13
8003914: f8 00 16 ae calli 80093cc <_Chain_Get>
8003918: b8 20 60 00 mv r12,r1
}
if ( the_object ) {
800391c: 44 2e ff d2 be r1,r14,8003864 <_Objects_Allocate+0x28>
8003920: e3 ff ff e1 bi 80038a4 <_Objects_Allocate+0x68>
08003924 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
8003924: 37 9c ff c8 addi sp,sp,-56
8003928: 5b 8b 00 2c sw (sp+44),r11
800392c: 5b 8c 00 28 sw (sp+40),r12
8003930: 5b 8d 00 24 sw (sp+36),r13
8003934: 5b 8e 00 20 sw (sp+32),r14
8003938: 5b 8f 00 1c sw (sp+28),r15
800393c: 5b 90 00 18 sw (sp+24),r16
8003940: 5b 91 00 14 sw (sp+20),r17
8003944: 5b 92 00 10 sw (sp+16),r18
8003948: 5b 93 00 0c sw (sp+12),r19
800394c: 5b 94 00 08 sw (sp+8),r20
8003950: 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 );
8003954: 28 30 00 08 lw r16,(r1+8)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
8003958: 28 31 00 34 lw r17,(r1+52)
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
800395c: 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 );
8003960: 22 10 ff ff andi r16,r16,0xffff
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
8003964: 46 20 00 ba be r17,r0,8003c4c <_Objects_Extend_information+0x328>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
8003968: 2c 2f 00 14 lhu r15,(r1+20)
800396c: 2c 32 00 10 lhu r18,(r1+16)
for ( ; block < block_count; block++ ) {
8003970: ba 00 68 00 mv r13,r16
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
8003974: b9 e0 10 00 mv r2,r15
8003978: ba 40 08 00 mv r1,r18
800397c: f8 00 5e ed calli 801b530 <__udivsi3>
8003980: 20 2e ff ff andi r14,r1,0xffff
for ( ; block < block_count; block++ ) {
8003984: b9 c0 60 00 mv r12,r14
8003988: b9 e0 08 00 mv r1,r15
800398c: 45 c0 00 08 be r14,r0,80039ac <_Objects_Extend_information+0x88><== NEVER TAKEN
if ( information->object_blocks[ block ] == NULL )
8003990: 2a 2c 00 00 lw r12,(r17+0)
8003994: 45 80 00 06 be r12,r0,80039ac <_Objects_Extend_information+0x88><== NEVER TAKEN
8003998: ba 20 18 00 mv r3,r17
800399c: 34 0c 00 00 mvi r12,0
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
80039a0: 35 8c 00 01 addi r12,r12,1
if ( information->object_blocks[ block ] == NULL )
break;
else
index_base += information->allocation_size;
80039a4: b5 af 68 00 add r13,r13,r15
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
80039a8: 55 cc 00 8c bgu r14,r12,8003bd8 <_Objects_Extend_information+0x2b4>
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
80039ac: b6 41 90 00 add r18,r18,r1
/*
* 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 ) {
80039b0: 38 02 ff ff mvu r2,0xffff
80039b4: 56 42 00 7c bgu r18,r2,8003ba4 <_Objects_Extend_information+0x280><== 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;
80039b8: 29 62 00 18 lw r2,(r11+24)
80039bc: f8 00 5e 5e calli 801b334 <__mulsi3>
if ( information->auto_extend ) {
80039c0: 41 62 00 12 lbu r2,(r11+18)
80039c4: 5c 40 00 89 bne r2,r0,8003be8 <_Objects_Extend_information+0x2c4>
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
80039c8: f8 00 09 7c calli 8005fb8 <_Workspace_Allocate_or_fatal_error>
80039cc: 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 ) {
80039d0: 2d 61 00 10 lhu r1,(r11+16)
80039d4: 54 2d 00 4a bgu r1,r13,8003afc <_Objects_Extend_information+0x1d8>
*/
/*
* Up the block count and maximum
*/
block_count++;
80039d8: 35 d3 00 01 addi r19,r14,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 );
80039dc: b6 73 08 00 add r1,r19,r19
80039e0: b4 33 08 00 add r1,r1,r19
80039e4: b6 41 08 00 add r1,r18,r1
80039e8: 34 02 00 02 mvi r2,2
80039ec: b4 30 08 00 add r1,r1,r16
80039f0: fb ff f2 00 calli 80001f0 <__ashlsi3>
80039f4: f8 00 09 80 calli 8005ff4 <_Workspace_Allocate>
80039f8: b8 20 88 00 mv r17,r1
if ( !object_blocks ) {
80039fc: 44 20 00 9a be r1,r0,8003c64 <_Objects_Extend_information+0x340><== NEVER TAKEN
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
8003a00: ba 60 08 00 mv r1,r19
8003a04: 34 02 00 02 mvi r2,2
8003a08: fb ff f1 fa calli 80001f0 <__ashlsi3>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
8003a0c: 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);
8003a10: b6 21 98 00 add r19,r17,r1
8003a14: b6 61 a0 00 add r20,r19,r1
8003a18: 54 50 00 78 bgu r2,r16,8003bf8 <_Objects_Extend_information+0x2d4>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
8003a1c: 34 03 00 00 mvi r3,0
8003a20: ba 80 20 00 mv r4,r20
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
8003a24: b8 60 10 00 mv r2,r3
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
8003a28: 46 03 00 05 be r16,r3,8003a3c <_Objects_Extend_information+0x118><== NEVER TAKEN
local_table[ index ] = NULL;
8003a2c: 58 82 00 00 sw (r4+0),r2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
8003a30: 34 63 00 01 addi r3,r3,1
8003a34: 34 84 00 04 addi r4,r4,4
8003a38: 56 03 ff fd bgu r16,r3,8003a2c <_Objects_Extend_information+0x108><== NEVER TAKEN
8003a3c: b9 c0 08 00 mv r1,r14
8003a40: 34 02 00 02 mvi r2,2
8003a44: fb ff f1 eb calli 80001f0 <__ashlsi3>
8003a48: b8 20 70 00 mv r14,r1
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
8003a4c: 2d 61 00 14 lhu r1,(r11+20)
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
8003a50: b6 6e 10 00 add r2,r19,r14
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
8003a54: 34 10 00 00 mvi r16,0
8003a58: b6 2e 70 00 add r14,r17,r14
8003a5c: 59 d0 00 00 sw (r14+0),r16
inactive_per_block[block_count] = 0;
8003a60: 58 50 00 00 sw (r2+0),r16
for ( index=index_base ;
index < ( information->allocation_size + index_base );
8003a64: b5 a1 70 00 add r14,r13,r1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
8003a68: 51 ae 00 0b bgeu r13,r14,8003a94 <_Objects_Extend_information+0x170><== NEVER TAKEN
8003a6c: 34 02 00 02 mvi r2,2
8003a70: b9 a0 08 00 mv r1,r13
8003a74: fb ff f1 df calli 80001f0 <__ashlsi3>
8003a78: b6 81 18 00 add r3,r20,r1
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
8003a7c: ba 00 10 00 mv r2,r16
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
8003a80: b9 a0 20 00 mv r4,r13
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
8003a84: 58 62 00 00 sw (r3+0),r2
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
8003a88: 34 84 00 01 addi r4,r4,1
8003a8c: 34 63 00 04 addi r3,r3,4
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
8003a90: 55 c4 ff fd bgu r14,r4,8003a84 <_Objects_Extend_information+0x160>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
8003a94: 90 00 70 00 rcsr r14,IE
8003a98: 34 01 ff fe mvi r1,-2
8003a9c: a1 c1 08 00 and r1,r14,r1
8003aa0: 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(
8003aa4: 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;
8003aa8: 22 52 ff ff andi r18,r18,0xffff
8003aac: 0d 72 00 10 sh (r11+16),r18
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
8003ab0: 59 73 00 30 sw (r11+48),r19
information->local_table = local_table;
8003ab4: 59 74 00 1c sw (r11+28),r20
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
8003ab8: 29 70 00 34 lw r16,(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(
8003abc: 34 02 00 18 mvi r2,24
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
8003ac0: 59 71 00 34 sw (r11+52),r17
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
8003ac4: fb ff f1 cb calli 80001f0 <__ashlsi3>
8003ac8: 78 02 00 01 mvhi r2,0x1
8003acc: 38 42 00 00 ori r2,r2,0x0
8003ad0: b8 22 88 00 or r17,r1,r2
8003ad4: 2d 61 00 04 lhu r1,(r11+4)
8003ad8: 34 02 00 1b mvi r2,27
8003adc: fb ff f1 c5 calli 80001f0 <__ashlsi3>
8003ae0: ba 21 08 00 or r1,r17,r1
8003ae4: b8 32 90 00 or r18,r1,r18
8003ae8: 59 72 00 0c sw (r11+12),r18
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
8003aec: d0 0e 00 00 wcsr IE,r14
if ( old_tables )
8003af0: 46 00 00 03 be r16,r0,8003afc <_Objects_Extend_information+0x1d8>
_Workspace_Free( old_tables );
8003af4: ba 00 08 00 mv r1,r16
8003af8: f8 00 09 4a calli 8006020 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
8003afc: 34 02 00 02 mvi r2,2
8003b00: b9 80 08 00 mv r1,r12
8003b04: fb ff f1 bb calli 80001f0 <__ashlsi3>
8003b08: b8 20 90 00 mv r18,r1
8003b0c: 29 61 00 34 lw r1,(r11+52)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
8003b10: 2d 63 00 14 lhu r3,(r11+20)
8003b14: 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;
8003b18: b4 32 08 00 add r1,r1,r18
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
8003b1c: 37 90 00 30 addi r16,sp,48
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
8003b20: 58 2f 00 00 sw (r1+0),r15
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
8003b24: b9 e0 10 00 mv r2,r15
8003b28: ba 00 08 00 mv r1,r16
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
8003b2c: 78 0f 00 01 mvhi r15,0x1
information->object_blocks[ block ] = new_object_block;
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
8003b30: f8 00 16 38 calli 8009410 <_Chain_Initialize>
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
8003b34: 39 ef 00 00 ori r15,r15,0x0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
8003b38: 35 71 00 20 addi r17,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 ) {
8003b3c: e0 00 00 0e bi 8003b74 <_Objects_Extend_information+0x250>
the_object->id = _Objects_Build_id(
8003b40: 29 61 00 00 lw r1,(r11+0)
8003b44: fb ff f1 ab calli 80001f0 <__ashlsi3>
8003b48: b8 2f 70 00 or r14,r1,r15
8003b4c: 2d 61 00 04 lhu r1,(r11+4)
8003b50: 34 02 00 1b mvi r2,27
8003b54: fb ff f1 a7 calli 80001f0 <__ashlsi3>
8003b58: b9 c1 10 00 or r2,r14,r1
8003b5c: b8 4d 10 00 or r2,r2,r13
8003b60: 59 82 00 08 sw (r12+8),r2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
8003b64: ba 20 08 00 mv r1,r17
8003b68: b9 80 10 00 mv r2,r12
8003b6c: fb ff fc a0 calli 8002dec <_Chain_Append>
index++;
8003b70: 35 ad 00 01 addi r13,r13,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 ) {
8003b74: ba 00 08 00 mv r1,r16
8003b78: f8 00 16 15 calli 80093cc <_Chain_Get>
8003b7c: b8 20 60 00 mv r12,r1
the_object->id = _Objects_Build_id(
8003b80: 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 ) {
8003b84: 5c 20 ff ef bne r1,r0,8003b40 <_Objects_Extend_information+0x21c>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
8003b88: 2d 62 00 14 lhu r2,(r11+20)
information->inactive =
8003b8c: 2d 61 00 2c lhu r1,(r11+44)
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
8003b90: 29 63 00 30 lw r3,(r11+48)
information->inactive =
8003b94: b4 41 08 00 add r1,r2,r1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
8003b98: b4 72 90 00 add r18,r3,r18
information->inactive =
8003b9c: 0d 61 00 2c sh (r11+44),r1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
8003ba0: 5a 42 00 00 sw (r18+0),r2
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
}
8003ba4: 2b 9d 00 04 lw ra,(sp+4)
8003ba8: 2b 8b 00 2c lw r11,(sp+44)
8003bac: 2b 8c 00 28 lw r12,(sp+40)
8003bb0: 2b 8d 00 24 lw r13,(sp+36)
8003bb4: 2b 8e 00 20 lw r14,(sp+32)
8003bb8: 2b 8f 00 1c lw r15,(sp+28)
8003bbc: 2b 90 00 18 lw r16,(sp+24)
8003bc0: 2b 91 00 14 lw r17,(sp+20)
8003bc4: 2b 92 00 10 lw r18,(sp+16)
8003bc8: 2b 93 00 0c lw r19,(sp+12)
8003bcc: 2b 94 00 08 lw r20,(sp+8)
8003bd0: 37 9c 00 38 addi sp,sp,56
8003bd4: c3 a0 00 00 ret
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL )
8003bd8: 28 62 00 04 lw r2,(r3+4)
8003bdc: 34 63 00 04 addi r3,r3,4
8003be0: 5c 40 ff 70 bne r2,r0,80039a0 <_Objects_Extend_information+0x7c>
8003be4: e3 ff ff 72 bi 80039ac <_Objects_Extend_information+0x88>
* 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;
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
8003be8: f8 00 09 03 calli 8005ff4 <_Workspace_Allocate>
8003bec: b8 20 78 00 mv r15,r1
if ( !new_object_block )
8003bf0: 5c 20 ff 78 bne r1,r0,80039d0 <_Objects_Extend_information+0xac>
8003bf4: e3 ff ff ec bi 8003ba4 <_Objects_Extend_information+0x280>
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
information->object_blocks,
block_count * sizeof(void*) );
8003bf8: b9 c0 08 00 mv r1,r14
8003bfc: 34 02 00 02 mvi r2,2
8003c00: fb ff f1 7c calli 80001f0 <__ashlsi3>
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
8003c04: 29 62 00 34 lw r2,(r11+52)
information->object_blocks,
block_count * sizeof(void*) );
8003c08: b8 20 70 00 mv r14,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,
8003c0c: b9 c0 18 00 mv r3,r14
8003c10: ba 20 08 00 mv r1,r17
8003c14: f8 00 28 82 calli 800de1c <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
8003c18: 29 62 00 30 lw r2,(r11+48)
8003c1c: b9 c0 18 00 mv r3,r14
8003c20: ba 60 08 00 mv r1,r19
8003c24: f8 00 28 7e calli 800de1c <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
8003c28: 2d 61 00 10 lhu r1,(r11+16)
8003c2c: 34 02 00 02 mvi r2,2
8003c30: b6 01 08 00 add r1,r16,r1
8003c34: fb ff f1 6f calli 80001f0 <__ashlsi3>
8003c38: 29 62 00 1c lw r2,(r11+28)
8003c3c: b8 20 18 00 mv r3,r1
8003c40: ba 80 08 00 mv r1,r20
8003c44: f8 00 28 76 calli 800de1c <memcpy>
8003c48: e3 ff ff 81 bi 8003a4c <_Objects_Extend_information+0x128>
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
8003c4c: 2c 32 00 10 lhu r18,(r1+16)
8003c50: ba 20 60 00 mv r12,r17
8003c54: 2c 21 00 14 lhu r1,(r1+20)
8003c58: ba 00 68 00 mv r13,r16
8003c5c: ba 20 70 00 mv r14,r17
8003c60: e3 ff ff 53 bi 80039ac <_Objects_Extend_information+0x88>
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
8003c64: b9 e0 08 00 mv r1,r15
8003c68: f8 00 08 ee calli 8006020 <_Workspace_Free>
return;
8003c6c: e3 ff ff ce bi 8003ba4 <_Objects_Extend_information+0x280>
08003d68 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
8003d68: 37 9c ff f4 addi sp,sp,-12
8003d6c: 5b 8b 00 0c sw (sp+12),r11
8003d70: 5b 8c 00 08 sw (sp+8),r12
8003d74: 5b 9d 00 04 sw (sp+4),ra
8003d78: b8 40 58 00 mv r11,r2
8003d7c: b8 20 60 00 mv r12,r1
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
8003d80: 5c 40 00 07 bne r2,r0,8003d9c <_Objects_Get_information+0x34>
* 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 )
8003d84: 34 01 00 00 mvi r1,0
return NULL;
#endif
return info;
}
8003d88: 2b 9d 00 04 lw ra,(sp+4)
8003d8c: 2b 8b 00 0c lw r11,(sp+12)
8003d90: 2b 8c 00 08 lw r12,(sp+8)
8003d94: 37 9c 00 0c addi sp,sp,12
8003d98: c3 a0 00 00 ret
/*
* 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 );
8003d9c: f8 00 17 78 calli 8009b7c <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
8003da0: 44 20 ff f9 be r1,r0,8003d84 <_Objects_Get_information+0x1c>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
8003da4: 55 61 ff f8 bgu r11,r1,8003d84 <_Objects_Get_information+0x1c>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
8003da8: b9 80 08 00 mv r1,r12
8003dac: 34 02 00 02 mvi r2,2
8003db0: 78 0c 08 01 mvhi r12,0x801
8003db4: 39 8c e8 3c ori r12,r12,0xe83c
8003db8: fb ff f1 0e calli 80001f0 <__ashlsi3>
8003dbc: b5 81 08 00 add r1,r12,r1
8003dc0: 28 2c 00 00 lw r12,(r1+0)
8003dc4: 45 80 ff f0 be r12,r0,8003d84 <_Objects_Get_information+0x1c><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
8003dc8: b9 60 08 00 mv r1,r11
8003dcc: 34 02 00 02 mvi r2,2
8003dd0: fb ff f1 08 calli 80001f0 <__ashlsi3>
8003dd4: b5 81 08 00 add r1,r12,r1
8003dd8: 28 21 00 00 lw r1,(r1+0)
if ( !info )
8003ddc: 44 20 ff eb be r1,r0,8003d88 <_Objects_Get_information+0x20><== 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 )
8003de0: 2c 22 00 10 lhu r2,(r1+16)
8003de4: 5c 40 ff e9 bne r2,r0,8003d88 <_Objects_Get_information+0x20>
8003de8: e3 ff ff e7 bi 8003d84 <_Objects_Get_information+0x1c>
08005d40 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
8005d40: 37 9c ff e0 addi sp,sp,-32
8005d44: 5b 8b 00 14 sw (sp+20),r11
8005d48: 5b 8c 00 10 sw (sp+16),r12
8005d4c: 5b 8d 00 0c sw (sp+12),r13
8005d50: 5b 8e 00 08 sw (sp+8),r14
8005d54: 5b 9d 00 04 sw (sp+4),ra
8005d58: b8 40 60 00 mv r12,r2
8005d5c: b8 60 58 00 mv r11,r3
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
8005d60: 5c 40 00 0a bne r2,r0,8005d88 <_Objects_Get_name_as_string+0x48>
}
}
*d = '\0';
_Thread_Enable_dispatch();
return name;
8005d64: 34 0b 00 00 mvi r11,0
}
return NULL; /* unreachable path */
}
8005d68: b9 60 08 00 mv r1,r11
8005d6c: 2b 9d 00 04 lw ra,(sp+4)
8005d70: 2b 8b 00 14 lw r11,(sp+20)
8005d74: 2b 8c 00 10 lw r12,(sp+16)
8005d78: 2b 8d 00 0c lw r13,(sp+12)
8005d7c: 2b 8e 00 08 lw r14,(sp+8)
8005d80: 37 9c 00 20 addi sp,sp,32
8005d84: c3 a0 00 00 ret
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
8005d88: 44 60 ff f8 be r3,r0,8005d68 <_Objects_Get_name_as_string+0x28>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
8005d8c: b8 20 68 00 mv r13,r1
8005d90: 5c 20 00 05 bne r1,r0,8005da4 <_Objects_Get_name_as_string+0x64>
8005d94: 78 01 08 02 mvhi r1,0x802
8005d98: 38 21 c7 68 ori r1,r1,0xc768
8005d9c: 28 21 00 00 lw r1,(r1+0)
8005da0: 28 2d 00 08 lw r13,(r1+8)
information = _Objects_Get_information_id( tmpId );
8005da4: b9 a0 08 00 mv r1,r13
8005da8: fb ff ff b2 calli 8005c70 <_Objects_Get_information_id>
8005dac: b8 20 70 00 mv r14,r1
if ( !information )
8005db0: 44 20 ff ed be r1,r0,8005d64 <_Objects_Get_name_as_string+0x24>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
8005db4: b9 a0 10 00 mv r2,r13
8005db8: 37 83 00 20 addi r3,sp,32
8005dbc: f8 00 00 33 calli 8005e88 <_Objects_Get>
switch ( location ) {
8005dc0: 2b 82 00 20 lw r2,(sp+32)
8005dc4: 5c 40 ff e8 bne r2,r0,8005d64 <_Objects_Get_name_as_string+0x24>
return NULL;
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
8005dc8: 41 ce 00 38 lbu r14,(r14+56)
8005dcc: 45 c2 00 1c be r14,r2,8005e3c <_Objects_Get_name_as_string+0xfc>
s = the_object->name.name_p;
8005dd0: 28 27 00 0c lw r7,(r1+12)
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
8005dd4: 44 e0 00 2b be r7,r0,8005e80 <_Objects_Get_name_as_string+0x140><== NEVER TAKEN
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
8005dd8: 35 8c ff ff addi r12,r12,-1
8005ddc: 45 80 00 29 be r12,r0,8005e80 <_Objects_Get_name_as_string+0x140><== NEVER TAKEN
8005de0: 40 e1 00 00 lbu r1,(r7+0)
8005de4: 44 20 00 27 be r1,r0,8005e80 <_Objects_Get_name_as_string+0x140>
8005de8: 78 04 08 02 mvhi r4,0x802
8005dec: 38 84 41 f8 ori r4,r4,0x41f8
8005df0: b9 60 18 00 mv r3,r11
8005df4: 34 02 00 00 mvi r2,0
*d = (isprint((unsigned char)*s)) ? *s : '*';
8005df8: 28 85 00 00 lw r5,(r4+0)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
8005dfc: 34 42 00 01 addi r2,r2,1
8005e00: b4 e2 30 00 add r6,r7,r2
*d = (isprint((unsigned char)*s)) ? *s : '*';
8005e04: b4 a1 28 00 add r5,r5,r1
8005e08: 40 a5 00 01 lbu r5,(r5+1)
8005e0c: 20 a5 00 97 andi r5,r5,0x97
8005e10: 5c a0 00 02 bne r5,r0,8005e18 <_Objects_Get_name_as_string+0xd8>
8005e14: 34 01 00 2a mvi r1,42
8005e18: 30 61 00 00 sb (r3+0),r1
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
8005e1c: 34 63 00 01 addi r3,r3,1
8005e20: 50 4c 00 03 bgeu r2,r12,8005e2c <_Objects_Get_name_as_string+0xec>
8005e24: 40 c1 00 00 lbu r1,(r6+0)
8005e28: 5c 20 ff f4 bne r1,r0,8005df8 <_Objects_Get_name_as_string+0xb8>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
8005e2c: 34 01 00 00 mvi r1,0
8005e30: 30 61 00 00 sb (r3+0),r1
_Thread_Enable_dispatch();
8005e34: f8 00 02 3b calli 8006720 <_Thread_Enable_dispatch>
return name;
8005e38: e3 ff ff cc bi 8005d68 <_Objects_Get_name_as_string+0x28>
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
8005e3c: 28 2d 00 0c lw r13,(r1+12)
lname[ 0 ] = (u32_name >> 24) & 0xff;
8005e40: 34 02 00 18 mvi r2,24
8005e44: b9 a0 08 00 mv r1,r13
8005e48: fb ff ed 12 calli 8001290 <__lshrsi3>
8005e4c: 33 81 00 18 sb (sp+24),r1
lname[ 1 ] = (u32_name >> 16) & 0xff;
8005e50: 34 02 00 10 mvi r2,16
8005e54: b9 a0 08 00 mv r1,r13
8005e58: fb ff ed 0e calli 8001290 <__lshrsi3>
8005e5c: 33 81 00 19 sb (sp+25),r1
lname[ 2 ] = (u32_name >> 8) & 0xff;
8005e60: 34 02 00 08 mvi r2,8
8005e64: b9 a0 08 00 mv r1,r13
8005e68: fb ff ed 0a calli 8001290 <__lshrsi3>
8005e6c: 33 81 00 1a sb (sp+26),r1
lname[ 3 ] = (u32_name >> 0) & 0xff;
8005e70: 33 8d 00 1b sb (sp+27),r13
lname[ 4 ] = '\0';
8005e74: 33 8e 00 1c sb (sp+28),r14
8005e78: 37 87 00 18 addi r7,sp,24
8005e7c: e3 ff ff d7 bi 8005dd8 <_Objects_Get_name_as_string+0x98>
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
8005e80: b9 60 18 00 mv r3,r11
8005e84: e3 ff ff ea bi 8005e2c <_Objects_Get_name_as_string+0xec>
08007780 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
8007780: 37 9c ff f4 addi sp,sp,-12
8007784: 5b 8b 00 0c sw (sp+12),r11
8007788: 5b 8c 00 08 sw (sp+8),r12
800778c: 5b 9d 00 04 sw (sp+4),ra
/*
* 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;
8007790: 28 25 00 08 lw r5,(r1+8)
if ( information->maximum >= index ) {
8007794: 2c 24 00 10 lhu r4,(r1+16)
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
8007798: 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;
800779c: c8 45 10 00 sub r2,r2,r5
80077a0: 34 42 00 01 addi r2,r2,1
if ( information->maximum >= index ) {
80077a4: 54 44 00 0f bgu r2,r4,80077e0 <_Objects_Get_no_protection+0x60><== NEVER TAKEN
if ( (the_object = information->local_table[ index ]) != NULL ) {
80077a8: 28 2c 00 1c lw r12,(r1+28)
80077ac: b8 40 08 00 mv r1,r2
80077b0: 34 02 00 02 mvi r2,2
80077b4: fb ff ed 02 calli 8002bbc <__ashlsi3>
80077b8: b5 81 08 00 add r1,r12,r1
80077bc: 28 21 00 00 lw r1,(r1+0)
80077c0: 44 20 00 08 be r1,r0,80077e0 <_Objects_Get_no_protection+0x60><== NEVER TAKEN
*location = OBJECTS_LOCAL;
80077c4: 34 02 00 00 mvi r2,0
80077c8: 59 62 00 00 sw (r11+0),r2
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
return NULL;
}
80077cc: 2b 9d 00 04 lw ra,(sp+4)
80077d0: 2b 8b 00 0c lw r11,(sp+12)
80077d4: 2b 8c 00 08 lw r12,(sp+8)
80077d8: 37 9c 00 0c addi sp,sp,12
80077dc: c3 a0 00 00 ret
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
80077e0: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
80077e4: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED
80077e8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return NULL;
}
80077ec: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80077f0: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
80077f4: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
80077f8: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
80077fc: c3 a0 00 00 ret <== NOT EXECUTED
08005780 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
8005780: 37 9c ff ec addi sp,sp,-20
8005784: 5b 8b 00 10 sw (sp+16),r11
8005788: 5b 8c 00 0c sw (sp+12),r12
800578c: 5b 8d 00 08 sw (sp+8),r13
8005790: 5b 9d 00 04 sw (sp+4),ra
8005794: b8 40 68 00 mv r13,r2
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
8005798: b8 20 58 00 mv r11,r1
800579c: 5c 20 00 05 bne r1,r0,80057b0 <_Objects_Id_to_name+0x30>
80057a0: 78 01 08 02 mvhi r1,0x802
80057a4: 38 21 39 c0 ori r1,r1,0x39c0
80057a8: 28 21 00 00 lw r1,(r1+0)
80057ac: 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);
80057b0: b9 60 08 00 mv r1,r11
80057b4: 34 02 00 18 mvi r2,24
80057b8: fb ff ef 9d calli 800162c <__lshrsi3>
80057bc: 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 )
80057c0: 34 24 ff ff addi r4,r1,-1
80057c4: 34 03 00 03 mvi r3,3
80057c8: 54 83 00 12 bgu r4,r3,8005810 <_Objects_Id_to_name+0x90>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
80057cc: 78 0c 08 02 mvhi r12,0x802
80057d0: 34 02 00 02 mvi r2,2
80057d4: 39 8c 38 9c ori r12,r12,0x389c
80057d8: fb ff ef 6d calli 800158c <__ashlsi3>
80057dc: b5 81 08 00 add r1,r12,r1
80057e0: 28 2c 00 00 lw r12,(r1+0)
80057e4: 45 80 00 0b be r12,r0,8005810 <_Objects_Id_to_name+0x90> <== NEVER TAKEN
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
80057e8: 34 02 00 1b mvi r2,27
80057ec: b9 60 08 00 mv r1,r11
80057f0: fb ff ef 8f calli 800162c <__lshrsi3>
80057f4: 34 02 00 02 mvi r2,2
80057f8: fb ff ef 65 calli 800158c <__ashlsi3>
80057fc: b5 81 08 00 add r1,r12,r1
8005800: 28 21 00 00 lw r1,(r1+0)
if ( !information )
8005804: 44 20 00 03 be r1,r0,8005810 <_Objects_Id_to_name+0x90> <== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
8005808: 40 2c 00 38 lbu r12,(r1+56)
800580c: 45 80 00 08 be r12,r0,800582c <_Objects_Id_to_name+0xac> <== ALWAYS TAKEN
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
8005810: 34 01 00 03 mvi r1,3
}
8005814: 2b 9d 00 04 lw ra,(sp+4)
8005818: 2b 8b 00 10 lw r11,(sp+16)
800581c: 2b 8c 00 0c lw r12,(sp+12)
8005820: 2b 8d 00 08 lw r13,(sp+8)
8005824: 37 9c 00 14 addi sp,sp,20
8005828: c3 a0 00 00 ret
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
800582c: b9 60 10 00 mv r2,r11
8005830: 37 83 00 14 addi r3,sp,20
8005834: f8 00 18 bf calli 800bb30 <_Objects_Get>
if ( !the_object )
8005838: 44 2c ff f6 be r1,r12,8005810 <_Objects_Id_to_name+0x90>
return OBJECTS_INVALID_ID;
*name = the_object->name;
800583c: 28 21 00 0c lw r1,(r1+12)
8005840: 59 a1 00 00 sw (r13+0),r1
_Thread_Enable_dispatch();
8005844: f8 00 02 68 calli 80061e4 <_Thread_Enable_dispatch>
8005848: b9 80 08 00 mv r1,r12
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
800584c: 2b 9d 00 04 lw ra,(sp+4)
8005850: 2b 8b 00 10 lw r11,(sp+16)
8005854: 2b 8c 00 0c lw r12,(sp+12)
8005858: 2b 8d 00 08 lw r13,(sp+8)
800585c: 37 9c 00 14 addi sp,sp,20
8005860: c3 a0 00 00 ret
08003f60 <_Objects_Name_to_id_u32>:
Objects_Information *information,
uint32_t name,
uint32_t node,
Objects_Id *id
)
{
8003f60: b8 20 28 00 mv r5,r1
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
8003f64: 34 01 00 02 mvi r1,2
8003f68: 44 80 00 14 be r4,r0,8003fb8 <_Objects_Name_to_id_u32+0x58>
return OBJECTS_INVALID_ADDRESS;
if ( name == 0 )
8003f6c: 44 40 00 12 be r2,r0,8003fb4 <_Objects_Name_to_id_u32+0x54><== NEVER TAKEN
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
8003f70: 2c a6 00 10 lhu r6,(r5+16)
8003f74: 44 c0 00 10 be r6,r0,8003fb4 <_Objects_Name_to_id_u32+0x54>
8003f78: 78 01 7f ff mvhi r1,0x7fff
8003f7c: 38 21 ff ff ori r1,r1,0xffff
8003f80: e4 61 08 00 cmpe r1,r3,r1
8003f84: 64 67 00 00 cmpei r7,r3,0
8003f88: b8 27 08 00 or r1,r1,r7
8003f8c: 44 20 00 10 be r1,r0,8003fcc <_Objects_Name_to_id_u32+0x6c>
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
8003f90: 28 a3 00 1c lw r3,(r5+28)
8003f94: 34 05 00 01 mvi r5,1
the_object = information->local_table[ index ];
8003f98: 28 61 00 04 lw r1,(r3+4)
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
8003f9c: 34 a5 00 01 addi r5,r5,1
8003fa0: 34 63 00 04 addi r3,r3,4
the_object = information->local_table[ index ];
if ( !the_object )
8003fa4: 44 20 00 03 be r1,r0,8003fb0 <_Objects_Name_to_id_u32+0x50>
continue;
if ( name == the_object->name.name_u32 ) {
8003fa8: 28 27 00 0c lw r7,(r1+12)
8003fac: 44 e2 00 04 be r7,r2,8003fbc <_Objects_Name_to_id_u32+0x5c>
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
8003fb0: 50 c5 ff fa bgeu r6,r5,8003f98 <_Objects_Name_to_id_u32+0x38>
8003fb4: 34 01 00 01 mvi r1,1
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
8003fb8: c3 a0 00 00 ret
the_object = information->local_table[ index ];
if ( !the_object )
continue;
if ( name == the_object->name.name_u32 ) {
*id = the_object->id;
8003fbc: 28 21 00 08 lw r1,(r1+8)
8003fc0: 58 81 00 00 sw (r4+0),r1
8003fc4: 34 01 00 00 mvi r1,0
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
8003fc8: c3 a0 00 00 ret
if ( name == 0 )
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
8003fcc: 34 01 00 01 mvi r1,1
8003fd0: 44 61 ff f0 be r3,r1,8003f90 <_Objects_Name_to_id_u32+0x30><== ALWAYS TAKEN
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
8003fd4: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
8003fd8: e3 ff ff f8 bi 8003fb8 <_Objects_Name_to_id_u32+0x58> <== NOT EXECUTED
0800423c <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
800423c: 37 9c ff ec addi sp,sp,-20
8004240: 5b 8b 00 14 sw (sp+20),r11
8004244: 5b 8c 00 10 sw (sp+16),r12
8004248: 5b 8d 00 0c sw (sp+12),r13
800424c: 5b 8e 00 08 sw (sp+8),r14
8004250: 5b 9d 00 04 sw (sp+4),ra
8004254: b8 40 68 00 mv r13,r2
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
8004258: 2c 22 00 3a lhu r2,(r1+58)
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
800425c: b8 20 70 00 mv r14,r1
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
8004260: b8 60 08 00 mv r1,r3
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
8004264: b8 60 58 00 mv r11,r3
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
8004268: f8 00 2d d8 calli 800f9c8 <strnlen>
800426c: b8 20 60 00 mv r12,r1
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
8004270: 41 c1 00 38 lbu r1,(r14+56)
8004274: 5c 20 00 25 bne r1,r0,8004308 <_Objects_Set_name+0xcc>
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
8004278: 41 61 00 00 lbu r1,(r11+0)
800427c: 34 02 00 18 mvi r2,24
8004280: fb ff f0 65 calli 8000414 <__ashlsi3>
8004284: 34 03 00 01 mvi r3,1
8004288: b8 20 70 00 mv r14,r1
800428c: 50 6c 00 19 bgeu r3,r12,80042f0 <_Objects_Set_name+0xb4>
8004290: 41 61 00 01 lbu r1,(r11+1)
8004294: 34 02 00 10 mvi r2,16
8004298: fb ff f0 5f calli 8000414 <__ashlsi3>
800429c: b8 2e 70 00 or r14,r1,r14
80042a0: 34 01 00 02 mvi r1,2
80042a4: 45 81 00 16 be r12,r1,80042fc <_Objects_Set_name+0xc0>
80042a8: 41 61 00 02 lbu r1,(r11+2)
80042ac: 34 02 00 08 mvi r2,8
80042b0: fb ff f0 59 calli 8000414 <__ashlsi3>
80042b4: b9 c1 70 00 or r14,r14,r1
80042b8: 34 01 00 03 mvi r1,3
80042bc: 34 02 00 20 mvi r2,32
80042c0: 45 81 00 02 be r12,r1,80042c8 <_Objects_Set_name+0x8c>
80042c4: 41 62 00 03 lbu r2,(r11+3)
80042c8: b9 c2 70 00 or r14,r14,r2
80042cc: 59 ae 00 0c sw (r13+12),r14
80042d0: 34 01 00 01 mvi r1,1
);
}
return true;
}
80042d4: 2b 9d 00 04 lw ra,(sp+4)
80042d8: 2b 8b 00 14 lw r11,(sp+20)
80042dc: 2b 8c 00 10 lw r12,(sp+16)
80042e0: 2b 8d 00 0c lw r13,(sp+12)
80042e4: 2b 8e 00 08 lw r14,(sp+8)
80042e8: 37 9c 00 14 addi sp,sp,20
80042ec: c3 a0 00 00 ret
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
80042f0: 78 01 00 20 mvhi r1,0x20
80042f4: 38 21 00 00 ori r1,r1,0x0
80042f8: b9 c1 70 00 or r14,r14,r1
80042fc: 39 ce 20 00 ori r14,r14,0x2000
8004300: 34 02 00 20 mvi r2,32
8004304: e3 ff ff f1 bi 80042c8 <_Objects_Set_name+0x8c>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
8004308: 35 81 00 01 addi r1,r12,1
800430c: f8 00 04 3c calli 80053fc <_Workspace_Allocate>
8004310: b8 20 70 00 mv r14,r1
if ( !d )
8004314: 45 c0 ff f0 be r14,r0,80042d4 <_Objects_Set_name+0x98> <== NEVER TAKEN
return false;
if ( the_object->name.name_p ) {
8004318: 29 a1 00 0c lw r1,(r13+12)
800431c: 44 20 00 04 be r1,r0,800432c <_Objects_Set_name+0xf0>
_Workspace_Free( (void *)the_object->name.name_p );
8004320: f8 00 04 42 calli 8005428 <_Workspace_Free>
the_object->name.name_p = NULL;
8004324: 34 01 00 00 mvi r1,0
8004328: 59 a1 00 0c sw (r13+12),r1
}
strncpy( d, name, length );
800432c: b9 80 18 00 mv r3,r12
8004330: b9 60 10 00 mv r2,r11
8004334: b9 c0 08 00 mv r1,r14
8004338: f8 00 2d 72 calli 800f900 <strncpy>
d[length] = '\0';
800433c: b5 cc 60 00 add r12,r14,r12
8004340: 34 01 00 00 mvi r1,0
8004344: 31 81 00 00 sb (r12+0),r1
the_object->name.name_p = d;
8004348: 34 01 00 01 mvi r1,1
800434c: 59 ae 00 0c sw (r13+12),r14
);
}
return true;
}
8004350: 2b 9d 00 04 lw ra,(sp+4)
8004354: 2b 8b 00 14 lw r11,(sp+20)
8004358: 2b 8c 00 10 lw r12,(sp+16)
800435c: 2b 8d 00 0c lw r13,(sp+12)
8004360: 2b 8e 00 08 lw r14,(sp+8)
8004364: 37 9c 00 14 addi sp,sp,20
8004368: c3 a0 00 00 ret
08003fdc <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
8003fdc: 37 9c ff ec addi sp,sp,-20
8003fe0: 5b 8b 00 14 sw (sp+20),r11
8003fe4: 5b 8c 00 10 sw (sp+16),r12
8003fe8: 5b 8d 00 0c sw (sp+12),r13
8003fec: 5b 8e 00 08 sw (sp+8),r14
8003ff0: 5b 9d 00 04 sw (sp+4),ra
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
8003ff4: 28 2c 00 08 lw r12,(r1+8)
block_count = (information->maximum - index_base) /
8003ff8: 2c 2d 00 14 lhu r13,(r1+20)
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
8003ffc: b8 20 70 00 mv r14,r1
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
8004000: 2c 21 00 10 lhu r1,(r1+16)
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
8004004: 21 8c ff ff andi r12,r12,0xffff
block_count = (information->maximum - index_base) /
8004008: b9 a0 10 00 mv r2,r13
800400c: c8 2c 08 00 sub r1,r1,r12
8004010: f8 00 5d 48 calli 801b530 <__udivsi3>
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
8004014: 44 20 00 09 be r1,r0,8004038 <_Objects_Shrink_information+0x5c><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
8004018: 29 c5 00 30 lw r5,(r14+48)
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
800401c: 34 0b 00 04 mvi r11,4
8004020: 34 03 00 00 mvi r3,0
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
8004024: 28 a2 00 00 lw r2,(r5+0)
8004028: 45 a2 00 11 be r13,r2,800406c <_Objects_Shrink_information+0x90><== NEVER TAKEN
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
800402c: 34 63 00 01 addi r3,r3,1
if ( information->inactive_per_block[ block ] ==
8004030: b4 ab 10 00 add r2,r5,r11
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
8004034: 54 23 00 08 bgu r1,r3,8004054 <_Objects_Shrink_information+0x78>
return;
}
index_base += information->allocation_size;
}
}
8004038: 2b 9d 00 04 lw ra,(sp+4)
800403c: 2b 8b 00 14 lw r11,(sp+20)
8004040: 2b 8c 00 10 lw r12,(sp+16)
8004044: 2b 8d 00 0c lw r13,(sp+12)
8004048: 2b 8e 00 08 lw r14,(sp+8)
800404c: 37 9c 00 14 addi sp,sp,20
8004050: c3 a0 00 00 ret
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
8004054: 28 42 00 00 lw r2,(r2+0)
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
8004058: b5 8d 60 00 add r12,r12,r13
800405c: 35 64 00 04 addi r4,r11,4
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
8004060: 45 a2 00 04 be r13,r2,8004070 <_Objects_Shrink_information+0x94>
8004064: b8 80 58 00 mv r11,r4
8004068: e3 ff ff f1 bi 800402c <_Objects_Shrink_information+0x50>
800406c: b8 60 58 00 mv r11,r3 <== NOT EXECUTED
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
8004070: 29 c1 00 20 lw r1,(r14+32)
do {
index = _Objects_Get_index( the_object->id );
8004074: 28 22 00 08 lw r2,(r1+8)
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
8004078: 28 2d 00 00 lw r13,(r1+0)
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
do {
index = _Objects_Get_index( the_object->id );
800407c: 20 42 ff ff andi r2,r2,0xffff
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
8004080: 55 82 00 05 bgu r12,r2,8004094 <_Objects_Shrink_information+0xb8>
(index < (index_base + information->allocation_size))) {
8004084: 2d c3 00 14 lhu r3,(r14+20)
8004088: b5 83 18 00 add r3,r12,r3
800408c: 50 43 00 02 bgeu r2,r3,8004094 <_Objects_Shrink_information+0xb8>
_Chain_Extract( &extract_me->Node );
8004090: f8 00 14 c5 calli 80093a4 <_Chain_Extract>
}
}
while ( the_object );
8004094: 45 a0 00 03 be r13,r0,80040a0 <_Objects_Shrink_information+0xc4>
8004098: b9 a0 08 00 mv r1,r13
800409c: e3 ff ff f6 bi 8004074 <_Objects_Shrink_information+0x98>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
80040a0: 29 c1 00 34 lw r1,(r14+52)
80040a4: b4 2b 08 00 add r1,r1,r11
80040a8: 28 21 00 00 lw r1,(r1+0)
80040ac: f8 00 07 dd calli 8006020 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
80040b0: 2d c3 00 2c lhu r3,(r14+44)
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
80040b4: 29 c1 00 34 lw r1,(r14+52)
information->inactive_per_block[ block ] = 0;
80040b8: 29 c4 00 30 lw r4,(r14+48)
information->inactive -= information->allocation_size;
80040bc: 2d c2 00 14 lhu r2,(r14+20)
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
80040c0: b4 2b 08 00 add r1,r1,r11
information->inactive_per_block[ block ] = 0;
80040c4: b4 8b 58 00 add r11,r4,r11
information->inactive -= information->allocation_size;
80040c8: c8 62 10 00 sub r2,r3,r2
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
80040cc: 59 6d 00 00 sw (r11+0),r13
information->inactive -= information->allocation_size;
80040d0: 0d c2 00 2c sh (r14+44),r2
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
80040d4: 58 2d 00 00 sw (r1+0),r13
return;
}
index_base += information->allocation_size;
}
}
80040d8: 2b 9d 00 04 lw ra,(sp+4)
80040dc: 2b 8b 00 14 lw r11,(sp+20)
80040e0: 2b 8c 00 10 lw r12,(sp+16)
80040e4: 2b 8d 00 0c lw r13,(sp+12)
80040e8: 2b 8e 00 08 lw r14,(sp+8)
80040ec: 37 9c 00 14 addi sp,sp,20
80040f0: c3 a0 00 00 ret
08003da4 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
8003da4: 37 9c ff e0 addi sp,sp,-32
8003da8: 5b 8b 00 1c sw (sp+28),r11
8003dac: 5b 8c 00 18 sw (sp+24),r12
8003db0: 5b 8d 00 14 sw (sp+20),r13
8003db4: 5b 8e 00 10 sw (sp+16),r14
8003db8: 5b 8f 00 0c sw (sp+12),r15
8003dbc: 5b 90 00 08 sw (sp+8),r16
8003dc0: 5b 9d 00 04 sw (sp+4),ra
8003dc4: b8 40 58 00 mv r11,r2
8003dc8: b8 20 70 00 mv r14,r1
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
8003dcc: 37 82 00 20 addi r2,sp,32
8003dd0: b9 60 08 00 mv r1,r11
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
8003dd4: b8 60 78 00 mv r15,r3
8003dd8: 20 8d 00 ff andi r13,r4,0xff
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
8003ddc: f8 00 00 90 calli 800401c <_POSIX_Mutex_Get>
8003de0: 44 20 00 0c be r1,r0,8003e10 <_POSIX_Condition_variables_Wait_support+0x6c>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
8003de4: 78 05 08 02 mvhi r5,0x802
8003de8: 38 a5 18 74 ori r5,r5,0x1874
8003dec: 28 a4 00 00 lw r4,(r5+0)
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
8003df0: b9 c0 08 00 mv r1,r14
8003df4: 37 82 00 20 addi r2,sp,32
8003df8: 34 84 ff ff addi r4,r4,-1
8003dfc: 58 a4 00 00 sw (r5+0),r4
8003e00: fb ff ff 39 calli 8003ae4 <_POSIX_Condition_variables_Get>
switch ( location ) {
8003e04: 2b 85 00 20 lw r5,(sp+32)
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
8003e08: b8 20 60 00 mv r12,r1
switch ( location ) {
8003e0c: 44 a0 00 0c be r5,r0,8003e3c <_POSIX_Condition_variables_Wait_support+0x98>
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
if ( mutex_status )
8003e10: 34 0c 00 16 mvi r12,22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
8003e14: b9 80 08 00 mv r1,r12
8003e18: 2b 9d 00 04 lw ra,(sp+4)
8003e1c: 2b 8b 00 1c lw r11,(sp+28)
8003e20: 2b 8c 00 18 lw r12,(sp+24)
8003e24: 2b 8d 00 14 lw r13,(sp+20)
8003e28: 2b 8e 00 10 lw r14,(sp+16)
8003e2c: 2b 8f 00 0c lw r15,(sp+12)
8003e30: 2b 90 00 08 lw r16,(sp+8)
8003e34: 37 9c 00 20 addi sp,sp,32
8003e38: c3 a0 00 00 ret
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
8003e3c: 28 21 00 14 lw r1,(r1+20)
8003e40: 44 25 00 06 be r1,r5,8003e58 <_POSIX_Condition_variables_Wait_support+0xb4>
8003e44: 29 62 00 00 lw r2,(r11+0)
8003e48: 44 22 00 04 be r1,r2,8003e58 <_POSIX_Condition_variables_Wait_support+0xb4>
_Thread_Enable_dispatch();
8003e4c: f8 00 0c a5 calli 80070e0 <_Thread_Enable_dispatch>
8003e50: 34 0c 00 16 mvi r12,22
return EINVAL;
8003e54: e3 ff ff f0 bi 8003e14 <_POSIX_Condition_variables_Wait_support+0x70>
}
(void) pthread_mutex_unlock( mutex );
8003e58: b9 60 08 00 mv r1,r11
8003e5c: f8 00 01 20 calli 80042dc <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
8003e60: 45 a0 00 07 be r13,r0,8003e7c <_POSIX_Condition_variables_Wait_support+0xd8>
status = _Thread_Executing->Wait.return_code;
if ( status && status != ETIMEDOUT )
return status;
} else {
_Thread_Enable_dispatch();
8003e64: f8 00 0c 9f calli 80070e0 <_Thread_Enable_dispatch>
8003e68: 34 0c 00 74 mvi r12,116
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
8003e6c: b9 60 08 00 mv r1,r11
8003e70: f8 00 00 e9 calli 8004214 <pthread_mutex_lock>
if ( mutex_status )
8003e74: 44 20 ff e8 be r1,r0,8003e14 <_POSIX_Condition_variables_Wait_support+0x70>
8003e78: e3 ff ff e6 bi 8003e10 <_POSIX_Condition_variables_Wait_support+0x6c>
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
8003e7c: 78 10 08 02 mvhi r16,0x802
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
8003e80: 29 61 00 00 lw r1,(r11+0)
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
8003e84: 3a 10 19 30 ori r16,r16,0x1930
8003e88: 2a 04 00 00 lw r4,(r16+0)
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
8003e8c: 59 81 00 14 sw (r12+20),r1
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
8003e90: 35 85 00 18 addi r5,r12,24
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
8003e94: 58 8d 00 34 sw (r4+52),r13
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
8003e98: 29 ce 00 00 lw r14,(r14+0)
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
8003e9c: 34 01 00 01 mvi r1,1
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
8003ea0: 78 03 08 00 mvhi r3,0x800
8003ea4: 59 81 00 48 sw (r12+72),r1
8003ea8: b9 e0 10 00 mv r2,r15
8003eac: b8 a0 08 00 mv r1,r5
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
8003eb0: 58 8e 00 20 sw (r4+32),r14
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
8003eb4: 38 63 7b 84 ori r3,r3,0x7b84
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;
8003eb8: 58 85 00 44 sw (r4+68),r5
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
8003ebc: f8 00 0d e4 calli 800764c <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
8003ec0: f8 00 0c 88 calli 80070e0 <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
8003ec4: 2a 01 00 00 lw r1,(r16+0)
8003ec8: 28 2c 00 34 lw r12,(r1+52)
if ( status && status != ETIMEDOUT )
8003ecc: 7d 82 00 74 cmpnei r2,r12,116
8003ed0: 7d 81 00 00 cmpnei r1,r12,0
8003ed4: a0 41 08 00 and r1,r2,r1
8003ed8: 44 2d ff e5 be r1,r13,8003e6c <_POSIX_Condition_variables_Wait_support+0xc8><== ALWAYS TAKEN
8003edc: e3 ff ff ce bi 8003e14 <_POSIX_Condition_variables_Wait_support+0x70><== NOT EXECUTED
0800b788 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
800b788: 37 9c ff d4 addi sp,sp,-44
800b78c: 5b 8b 00 2c sw (sp+44),r11
800b790: 5b 8c 00 28 sw (sp+40),r12
800b794: 5b 8d 00 24 sw (sp+36),r13
800b798: 5b 8e 00 20 sw (sp+32),r14
800b79c: 5b 8f 00 1c sw (sp+28),r15
800b7a0: 5b 90 00 18 sw (sp+24),r16
800b7a4: 5b 91 00 14 sw (sp+20),r17
800b7a8: 5b 92 00 10 sw (sp+16),r18
800b7ac: 5b 93 00 0c sw (sp+12),r19
800b7b0: 5b 94 00 08 sw (sp+8),r20
800b7b4: 5b 9d 00 04 sw (sp+4),ra
uint32_t iterations;
bool are_all_null;
POSIX_Keys_Control *the_key;
void *value;
thread_index = _Objects_Get_index( thread->Object.id );
800b7b8: 28 2d 00 08 lw r13,(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);
800b7bc: 34 02 00 18 mvi r2,24
800b7c0: 78 0c 08 01 mvhi r12,0x801
800b7c4: b9 a0 08 00 mv r1,r13
800b7c8: fb ff d2 b2 calli 8000290 <__lshrsi3>
800b7cc: 39 8c ec 7c ori r12,r12,0xec7c
800b7d0: 20 32 00 07 andi r18,r1,0x7
if ( !the_key )
continue;
if ( !the_key->destructor )
continue;
value = the_key->Values[ thread_api ][ thread_index ];
800b7d4: 34 02 00 02 mvi r2,2
800b7d8: 21 a1 ff ff andi r1,r13,0xffff
800b7dc: 2d 8b 00 10 lhu r11,(r12+16)
800b7e0: fb ff d2 84 calli 80001f0 <__ashlsi3>
800b7e4: 36 52 00 04 addi r18,r18,4
800b7e8: b8 20 88 00 mv r17,r1
800b7ec: 34 13 00 00 mvi r19,0
for ( ; ; ) {
are_all_null = true;
for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) {
800b7f0: 34 14 00 04 mvi r20,4
800b7f4: 45 60 00 21 be r11,r0,800b878 <_POSIX_Keys_Run_destructors+0xf0>
800b7f8: 34 10 00 01 mvi r16,1
800b7fc: 34 0e 00 04 mvi r14,4
800b800: ba 00 68 00 mv r13,r16
the_key = (POSIX_Keys_Control *)
800b804: 29 83 00 1c lw r3,(r12+28)
if ( !the_key )
continue;
if ( !the_key->destructor )
continue;
value = the_key->Values[ thread_api ][ thread_index ];
800b808: 34 02 00 02 mvi r2,2
800b80c: ba 40 08 00 mv r1,r18
are_all_null = true;
for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) {
the_key = (POSIX_Keys_Control *)
800b810: b4 6e 18 00 add r3,r3,r14
800b814: 28 6b 00 00 lw r11,(r3+0)
for ( ; ; ) {
are_all_null = true;
for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) {
800b818: 35 ad 00 01 addi r13,r13,1
800b81c: 35 ce 00 04 addi r14,r14,4
the_key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table[ index ];
if ( !the_key )
800b820: 45 60 00 11 be r11,r0,800b864 <_POSIX_Keys_Run_destructors+0xdc>
continue;
if ( !the_key->destructor )
800b824: 29 6f 00 10 lw r15,(r11+16)
800b828: 45 e0 00 0f be r15,r0,800b864 <_POSIX_Keys_Run_destructors+0xdc><== NEVER TAKEN
continue;
value = the_key->Values[ thread_api ][ thread_index ];
800b82c: fb ff d2 71 calli 80001f0 <__ashlsi3>
800b830: b5 61 58 00 add r11,r11,r1
800b834: 29 62 00 04 lw r2,(r11+4)
800b838: b4 51 10 00 add r2,r2,r17
800b83c: 28 42 00 00 lw r2,(r2+0)
if ( value ) {
(*the_key->destructor)( value );
800b840: b8 40 08 00 mv r1,r2
continue;
if ( !the_key->destructor )
continue;
value = the_key->Values[ thread_api ][ thread_index ];
if ( value ) {
800b844: 44 40 00 08 be r2,r0,800b864 <_POSIX_Keys_Run_destructors+0xdc>
(*the_key->destructor)( value );
800b848: d9 e0 00 00 call r15
if ( the_key->Values[ thread_api ][ thread_index ] )
800b84c: 29 61 00 04 lw r1,(r11+4)
800b850: b4 31 08 00 add r1,r1,r17
800b854: 28 21 00 00 lw r1,(r1+0)
800b858: 64 21 00 00 cmpei r1,r1,0
800b85c: c8 01 08 00 sub r1,r0,r1
800b860: a2 01 80 00 and r16,r16,r1
for ( ; ; ) {
are_all_null = true;
for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) {
800b864: 2d 8b 00 10 lhu r11,(r12+16)
800b868: 51 6d ff e7 bgeu r11,r13,800b804 <_POSIX_Keys_Run_destructors+0x7c>
if ( the_key->Values[ thread_api ][ thread_index ] )
are_all_null = false;
}
}
if ( are_all_null == true )
800b86c: 5e 00 00 03 bne r16,r0,800b878 <_POSIX_Keys_Run_destructors+0xf0>
return;
iterations++;
800b870: 36 73 00 01 addi r19,r19,1
* loop. It seems rude to unnecessarily lock up a system.
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
if ( iterations >= PTHREAD_DESTRUCTOR_ITERATIONS )
800b874: 5e 74 ff e0 bne r19,r20,800b7f4 <_POSIX_Keys_Run_destructors+0x6c>
return;
}
}
800b878: 2b 9d 00 04 lw ra,(sp+4)
800b87c: 2b 8b 00 2c lw r11,(sp+44)
800b880: 2b 8c 00 28 lw r12,(sp+40)
800b884: 2b 8d 00 24 lw r13,(sp+36)
800b888: 2b 8e 00 20 lw r14,(sp+32)
800b88c: 2b 8f 00 1c lw r15,(sp+28)
800b890: 2b 90 00 18 lw r16,(sp+24)
800b894: 2b 91 00 14 lw r17,(sp+20)
800b898: 2b 92 00 10 lw r18,(sp+16)
800b89c: 2b 93 00 0c lw r19,(sp+12)
800b8a0: 2b 94 00 08 lw r20,(sp+8)
800b8a4: 37 9c 00 2c addi sp,sp,44
800b8a8: c3 a0 00 00 ret
08008c18 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
8008c18: 37 9c ff d8 addi sp,sp,-40
8008c1c: 5b 8b 00 20 sw (sp+32),r11
8008c20: 5b 8c 00 1c sw (sp+28),r12
8008c24: 5b 8d 00 18 sw (sp+24),r13
8008c28: 5b 8e 00 14 sw (sp+20),r14
8008c2c: 5b 8f 00 10 sw (sp+16),r15
8008c30: 5b 90 00 0c sw (sp+12),r16
8008c34: 5b 91 00 08 sw (sp+8),r17
8008c38: 5b 9d 00 04 sw (sp+4),ra
8008c3c: 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(
8008c40: 78 01 08 02 mvhi r1,0x802
8008c44: b8 40 88 00 mv r17,r2
8008c48: b8 60 70 00 mv r14,r3
8008c4c: 38 21 a2 40 ori r1,r1,0xa240
8008c50: b9 a0 10 00 mv r2,r13
8008c54: 37 83 00 28 addi r3,sp,40
8008c58: b8 80 78 00 mv r15,r4
8008c5c: b8 c0 80 00 mv r16,r6
8008c60: 20 ab 00 ff andi r11,r5,0xff
8008c64: f8 00 0c 77 calli 800be40 <_Objects_Get>
8008c68: b8 20 38 00 mv r7,r1
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
8008c6c: 2b 81 00 28 lw r1,(sp+40)
8008c70: 44 20 00 0f be r1,r0,8008cac <_POSIX_Message_queue_Receive_support+0x94>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
8008c74: f8 00 32 6d calli 8015628 <__errno>
8008c78: 34 02 00 09 mvi r2,9
8008c7c: 58 22 00 00 sw (r1+0),r2
8008c80: 34 01 ff ff mvi r1,-1
}
8008c84: 2b 9d 00 04 lw ra,(sp+4)
8008c88: 2b 8b 00 20 lw r11,(sp+32)
8008c8c: 2b 8c 00 1c lw r12,(sp+28)
8008c90: 2b 8d 00 18 lw r13,(sp+24)
8008c94: 2b 8e 00 14 lw r14,(sp+20)
8008c98: 2b 8f 00 10 lw r15,(sp+16)
8008c9c: 2b 90 00 0c lw r16,(sp+12)
8008ca0: 2b 91 00 08 lw r17,(sp+8)
8008ca4: 37 9c 00 28 addi sp,sp,40
8008ca8: c3 a0 00 00 ret
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
8008cac: 28 e1 00 14 lw r1,(r7+20)
8008cb0: 34 05 00 01 mvi r5,1
8008cb4: 20 28 00 03 andi r8,r1,0x3
8008cb8: 45 05 00 30 be r8,r5,8008d78 <_POSIX_Message_queue_Receive_support+0x160>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
8008cbc: 28 ec 00 10 lw r12,(r7+16)
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
8008cc0: 29 82 00 68 lw r2,(r12+104)
8008cc4: 51 c2 00 07 bgeu r14,r2,8008ce0 <_POSIX_Message_queue_Receive_support+0xc8>
_Thread_Enable_dispatch();
8008cc8: f8 00 0f 16 calli 800c920 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
8008ccc: f8 00 32 57 calli 8015628 <__errno>
8008cd0: 34 02 00 7a mvi r2,122
8008cd4: 58 22 00 00 sw (r1+0),r2
8008cd8: 34 01 ff ff mvi r1,-1
8008cdc: e3 ff ff ea bi 8008c84 <_POSIX_Message_queue_Receive_support+0x6c>
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
8008ce0: b9 60 28 00 mv r5,r11
8008ce4: 5d 60 00 18 bne r11,r0,8008d44 <_POSIX_Message_queue_Receive_support+0x12c><== ALWAYS TAKEN
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
8008ce8: 78 0b 08 02 mvhi r11,0x802
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
8008cec: 35 81 00 1c addi r1,r12,28
8008cf0: b9 a0 10 00 mv r2,r13
8008cf4: ba 20 18 00 mv r3,r17
8008cf8: ba 00 30 00 mv r6,r16
8008cfc: 37 84 00 24 addi r4,sp,36
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
8008d00: 39 6b 9e 70 ori r11,r11,0x9e70
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
8008d04: 34 0d ff ff mvi r13,-1
8008d08: 5b 8d 00 24 sw (sp+36),r13
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
8008d0c: f8 00 07 41 calli 800aa10 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
8008d10: f8 00 0f 04 calli 800c920 <_Thread_Enable_dispatch>
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
8008d14: 29 6c 00 00 lw r12,(r11+0)
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
8008d18: 34 02 00 1f mvi r2,31
8008d1c: 29 81 00 24 lw r1,(r12+36)
8008d20: fb ff f6 95 calli 8006774 <__ashrsi3>
8008d24: 29 83 00 24 lw r3,(r12+36)
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
8008d28: 29 82 00 34 lw r2,(r12+52)
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
8008d2c: 98 23 18 00 xor r3,r1,r3
8008d30: c8 61 08 00 sub r1,r3,r1
8008d34: 59 e1 00 00 sw (r15+0),r1
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
8008d38: 5c 40 00 08 bne r2,r0,8008d58 <_POSIX_Message_queue_Receive_support+0x140>
return length_out;
8008d3c: 2b 81 00 24 lw r1,(sp+36)
8008d40: e3 ff ff d1 bi 8008c84 <_POSIX_Message_queue_Receive_support+0x6c>
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
8008d44: 34 02 00 0e mvi r2,14
8008d48: fb ff f6 63 calli 80066d4 <__lshrsi3>
8008d4c: 18 21 00 01 xori r1,r1,0x1
8008d50: 20 25 00 01 andi r5,r1,0x1
8008d54: e3 ff ff e5 bi 8008ce8 <_POSIX_Message_queue_Receive_support+0xd0>
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
return length_out;
rtems_set_errno_and_return_minus_one(
8008d58: f8 00 32 34 calli 8015628 <__errno>
8008d5c: b8 20 60 00 mv r12,r1
8008d60: 29 61 00 00 lw r1,(r11+0)
8008d64: 28 21 00 34 lw r1,(r1+52)
8008d68: f8 00 00 c7 calli 8009084 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
8008d6c: 59 81 00 00 sw (r12+0),r1
8008d70: b9 a0 08 00 mv r1,r13
8008d74: e3 ff ff c4 bi 8008c84 <_POSIX_Message_queue_Receive_support+0x6c>
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
_Thread_Enable_dispatch();
8008d78: f8 00 0e ea calli 800c920 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
8008d7c: f8 00 32 2b calli 8015628 <__errno>
8008d80: 34 02 00 09 mvi r2,9
8008d84: 58 22 00 00 sw (r1+0),r2
8008d88: 34 01 ff ff mvi r1,-1
8008d8c: e3 ff ff be bi 8008c84 <_POSIX_Message_queue_Receive_support+0x6c>
08007270 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
8007270: 37 9c ff fc addi sp,sp,-4
8007274: 5b 9d 00 04 sw (sp+4),ra
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
8007278: 28 22 01 2c lw r2,(r1+300)
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
800727c: 28 43 00 d4 lw r3,(r2+212)
8007280: 5c 60 00 04 bne r3,r0,8007290 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x20><== NEVER TAKEN
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
8007284: 28 44 00 d8 lw r4,(r2+216)
8007288: 34 03 00 01 mvi r3,1
800728c: 44 83 00 05 be r4,r3,80072a0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x30>
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
8007290: fb ff f3 ec calli 8004240 <_Thread_Enable_dispatch>
}
8007294: 2b 9d 00 04 lw ra,(sp+4)
8007298: 37 9c 00 04 addi sp,sp,4
800729c: c3 a0 00 00 ret
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) {
80072a0: 28 42 00 dc lw r2,(r2+220)
80072a4: 44 40 ff fb be r2,r0,8007290 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x20>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
80072a8: 78 03 08 01 mvhi r3,0x801
80072ac: 38 63 f8 6c ori r3,r3,0xf86c
80072b0: 28 64 00 00 lw r4,(r3+0)
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
80072b4: 34 02 ff ff mvi r2,-1
80072b8: b4 82 20 00 add r4,r4,r2
80072bc: 58 64 00 00 sw (r3+0),r4
80072c0: f8 00 02 2f calli 8007b7c <_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 &&
80072c4: e3 ff ff f4 bi 8007294 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x24>
08009b88 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
8009b88: 37 9c ff ec addi sp,sp,-20
8009b8c: 5b 8b 00 14 sw (sp+20),r11
8009b90: 5b 8c 00 10 sw (sp+16),r12
8009b94: 5b 8d 00 0c sw (sp+12),r13
8009b98: 5b 8e 00 08 sw (sp+8),r14
8009b9c: 5b 9d 00 04 sw (sp+4),ra
8009ba0: b8 20 60 00 mv r12,r1
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
8009ba4: 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
)
{
8009ba8: b8 40 58 00 mv r11,r2
8009bac: b8 60 68 00 mv r13,r3
8009bb0: b8 80 70 00 mv r14,r4
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
8009bb4: fb ff ff ed calli 8009b68 <_POSIX_Priority_Is_valid>
8009bb8: 34 02 00 00 mvi r2,0
8009bbc: 44 22 00 0a be r1,r2,8009be4 <_POSIX_Thread_Translate_sched_param+0x5c><== NEVER TAKEN
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
8009bc0: 59 a2 00 00 sw (r13+0),r2
*budget_callout = NULL;
8009bc4: 59 c2 00 00 sw (r14+0),r2
if ( policy == SCHED_OTHER ) {
8009bc8: 45 82 00 0f be r12,r2,8009c04 <_POSIX_Thread_Translate_sched_param+0x7c>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
8009bcc: 34 01 00 01 mvi r1,1
8009bd0: 45 81 00 2f be r12,r1,8009c8c <_POSIX_Thread_Translate_sched_param+0x104>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
8009bd4: 34 01 00 02 mvi r1,2
8009bd8: 45 81 00 30 be r12,r1,8009c98 <_POSIX_Thread_Translate_sched_param+0x110>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
8009bdc: 34 01 00 04 mvi r1,4
8009be0: 45 81 00 13 be r12,r1,8009c2c <_POSIX_Thread_Translate_sched_param+0xa4>
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
8009be4: 34 01 00 16 mvi r1,22
}
return EINVAL;
}
8009be8: 2b 9d 00 04 lw ra,(sp+4)
8009bec: 2b 8b 00 14 lw r11,(sp+20)
8009bf0: 2b 8c 00 10 lw r12,(sp+16)
8009bf4: 2b 8d 00 0c lw r13,(sp+12)
8009bf8: 2b 8e 00 08 lw r14,(sp+8)
8009bfc: 37 9c 00 14 addi sp,sp,20
8009c00: c3 a0 00 00 ret
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
8009c04: 34 01 00 01 mvi r1,1
8009c08: 59 a1 00 00 sw (r13+0),r1
8009c0c: b9 80 08 00 mv r1,r12
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
8009c10: 2b 9d 00 04 lw ra,(sp+4)
8009c14: 2b 8b 00 14 lw r11,(sp+20)
8009c18: 2b 8c 00 10 lw r12,(sp+16)
8009c1c: 2b 8d 00 0c lw r13,(sp+12)
8009c20: 2b 8e 00 08 lw r14,(sp+8)
8009c24: 37 9c 00 14 addi sp,sp,20
8009c28: c3 a0 00 00 ret
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
8009c2c: 29 61 00 08 lw r1,(r11+8)
8009c30: 5c 20 00 03 bne r1,r0,8009c3c <_POSIX_Thread_Translate_sched_param+0xb4>
(param->sched_ss_repl_period.tv_nsec == 0) )
8009c34: 29 62 00 0c lw r2,(r11+12)
8009c38: 44 41 ff eb be r2,r1,8009be4 <_POSIX_Thread_Translate_sched_param+0x5c>
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
8009c3c: 29 61 00 10 lw r1,(r11+16)
8009c40: 5c 20 00 03 bne r1,r0,8009c4c <_POSIX_Thread_Translate_sched_param+0xc4>
(param->sched_ss_init_budget.tv_nsec == 0) )
8009c44: 29 62 00 14 lw r2,(r11+20)
8009c48: 44 41 ff e7 be r2,r1,8009be4 <_POSIX_Thread_Translate_sched_param+0x5c>
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
8009c4c: 35 61 00 08 addi r1,r11,8
8009c50: fb ff f3 c4 calli 8006b60 <_Timespec_To_ticks>
8009c54: b8 20 60 00 mv r12,r1
8009c58: 35 61 00 10 addi r1,r11,16
8009c5c: fb ff f3 c1 calli 8006b60 <_Timespec_To_ticks>
8009c60: 54 2c ff e1 bgu r1,r12,8009be4 <_POSIX_Thread_Translate_sched_param+0x5c>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
8009c64: 29 61 00 04 lw r1,(r11+4)
8009c68: fb ff ff c0 calli 8009b68 <_POSIX_Priority_Is_valid>
8009c6c: 44 20 ff de be r1,r0,8009be4 <_POSIX_Thread_Translate_sched_param+0x5c>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
8009c70: 78 01 08 00 mvhi r1,0x800
8009c74: 38 21 33 f8 ori r1,r1,0x33f8
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
8009c78: 34 02 00 03 mvi r2,3
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
8009c7c: 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;
8009c80: 59 a2 00 00 sw (r13+0),r2
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
8009c84: 34 01 00 00 mvi r1,0
return 0;
8009c88: e3 ff ff d8 bi 8009be8 <_POSIX_Thread_Translate_sched_param+0x60>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
8009c8c: 59 a2 00 00 sw (r13+0),r2
8009c90: b8 40 08 00 mv r1,r2
return 0;
8009c94: e3 ff ff d5 bi 8009be8 <_POSIX_Thread_Translate_sched_param+0x60>
}
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
8009c98: 59 ac 00 00 sw (r13+0),r12
8009c9c: b8 40 08 00 mv r1,r2
return 0;
8009ca0: e3 ff ff d2 bi 8009be8 <_POSIX_Thread_Translate_sched_param+0x60>
08008650 <_POSIX_Threads_Exitted_extension>:
* This method is invoked each time a thread exits.
*/
void _POSIX_Threads_Exitted_extension(
Thread_Control *executing
)
{
8008650: 37 9c ff f8 addi sp,sp,-8
8008654: 5b 8b 00 08 sw (sp+8),r11
8008658: 5b 9d 00 04 sw (sp+4),ra
800865c: b8 20 58 00 mv r11,r1
/*
* If the executing thread was not created with the POSIX API, then this
* API do not get to define its exit behavior.
*/
if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API )
8008660: 28 21 00 08 lw r1,(r1+8)
8008664: 34 02 00 18 mvi r2,24
8008668: fb ff df 0a calli 8000290 <__lshrsi3>
800866c: 20 21 00 07 andi r1,r1,0x7
8008670: 34 02 00 03 mvi r2,3
8008674: 44 22 00 05 be r1,r2,8008688 <_POSIX_Threads_Exitted_extension+0x38>
pthread_exit( executing->Wait.return_argument );
}
8008678: 2b 9d 00 04 lw ra,(sp+4)
800867c: 2b 8b 00 08 lw r11,(sp+8)
8008680: 37 9c 00 08 addi sp,sp,8
8008684: c3 a0 00 00 ret
/*
* If the executing thread was not created with the POSIX API, then this
* API do not get to define its exit behavior.
*/
if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API )
pthread_exit( executing->Wait.return_argument );
8008688: 29 61 00 28 lw r1,(r11+40)
800868c: f8 00 0d 49 calli 800bbb0 <pthread_exit>
}
8008690: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8008694: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8008698: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
800869c: c3 a0 00 00 ret <== NOT EXECUTED
08003074 <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
8003074: 37 9c ff ac addi sp,sp,-84
8003078: 5b 8b 00 14 sw (sp+20),r11
800307c: 5b 8c 00 10 sw (sp+16),r12
8003080: 5b 8d 00 0c sw (sp+12),r13
8003084: 5b 8e 00 08 sw (sp+8),r14
8003088: 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;
800308c: 78 01 08 01 mvhi r1,0x801
8003090: 38 21 f0 a8 ori r1,r1,0xf0a8
maximum = Configuration_POSIX_API.number_of_initialization_threads;
8003094: 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;
8003098: 28 2c 00 34 lw r12,(r1+52)
maximum = Configuration_POSIX_API.number_of_initialization_threads;
if ( !user_threads || maximum == 0 )
800309c: 65 cd 00 00 cmpei r13,r14,0
80030a0: 65 81 00 00 cmpei r1,r12,0
80030a4: b9 a1 68 00 or r13,r13,r1
80030a8: 5d a0 00 13 bne r13,r0,80030f4 <_POSIX_Threads_Initialize_user_threads_body+0x80><== NEVER TAKEN
80030ac: 37 8b 00 18 addi r11,sp,24
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
80030b0: b9 60 08 00 mv r1,r11
80030b4: f8 00 1a fc calli 8009ca4 <pthread_attr_init>
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
80030b8: 34 02 00 02 mvi r2,2
80030bc: b9 60 08 00 mv r1,r11
80030c0: f8 00 1b 1e calli 8009d38 <pthread_attr_setinheritsched>
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
80030c4: 29 82 00 04 lw r2,(r12+4)
80030c8: b9 60 08 00 mv r1,r11
80030cc: f8 00 1b 29 calli 8009d70 <pthread_attr_setstacksize>
status = pthread_create(
80030d0: 29 83 00 00 lw r3,(r12+0)
80030d4: 37 81 00 54 addi r1,sp,84
80030d8: b9 60 10 00 mv r2,r11
80030dc: 34 04 00 00 mvi r4,0
80030e0: fb ff fe de calli 8002c58 <pthread_create>
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
80030e4: 5c 20 00 0b bne r1,r0,8003110 <_POSIX_Threads_Initialize_user_threads_body+0x9c>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
80030e8: 35 ad 00 01 addi r13,r13,1
80030ec: 35 8c 00 08 addi r12,r12,8
80030f0: 55 cd ff f0 bgu r14,r13,80030b0 <_POSIX_Threads_Initialize_user_threads_body+0x3c><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
80030f4: 2b 9d 00 04 lw ra,(sp+4)
80030f8: 2b 8b 00 14 lw r11,(sp+20)
80030fc: 2b 8c 00 10 lw r12,(sp+16)
8003100: 2b 8d 00 0c lw r13,(sp+12)
8003104: 2b 8e 00 08 lw r14,(sp+8)
8003108: 37 9c 00 54 addi sp,sp,84
800310c: c3 a0 00 00 ret
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
8003110: b8 20 18 00 mv r3,r1
8003114: 34 02 00 01 mvi r2,1
8003118: 34 01 00 02 mvi r1,2
800311c: f8 00 06 6b calli 8004ac8 <_Internal_error_Occurred>
080088f8 <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
80088f8: 37 9c ff f4 addi sp,sp,-12
80088fc: 5b 8b 00 0c sw (sp+12),r11
8008900: 5b 8c 00 08 sw (sp+8),r12
8008904: 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 ];
8008908: 28 4c 01 2c lw r12,(r2+300)
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
800890c: 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 );
8008910: 35 81 00 94 addi r1,r12,148
8008914: f8 00 07 13 calli 800a560 <_Timespec_To_ticks>
8008918: 78 02 08 01 mvhi r2,0x801
800891c: 38 42 e0 c0 ori r2,r2,0xe0c0
the_thread->cpu_time_budget = ticks;
8008920: 59 61 00 78 sw (r11+120),r1
8008924: 40 41 00 00 lbu r1,(r2+0)
8008928: 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 ) {
800892c: 29 63 00 1c lw r3,(r11+28)
8008930: 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;
8008934: 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 ) {
8008938: 5c 60 00 06 bne r3,r0,8008950 <_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 ) {
800893c: 29 61 00 14 lw r1,(r11+20)
8008940: 50 41 00 04 bgeu r2,r1,8008950 <_POSIX_Threads_Sporadic_budget_TSR+0x58>
_Thread_Change_priority( the_thread, new_priority, true );
8008944: b9 60 08 00 mv r1,r11
8008948: 34 03 00 01 mvi r3,1
800894c: fb ff ed ec calli 80040fc <_Thread_Change_priority>
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
8008950: 35 81 00 8c addi r1,r12,140
8008954: f8 00 07 03 calli 800a560 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
8008958: 59 81 00 b0 sw (r12+176),r1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
800895c: 78 01 08 01 mvhi r1,0x801
8008960: 38 21 e9 80 ori r1,r1,0xe980
8008964: 35 82 00 a4 addi r2,r12,164
8008968: fb ff f4 ba calli 8005c50 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
}
800896c: 2b 9d 00 04 lw ra,(sp+4)
8008970: 2b 8b 00 0c lw r11,(sp+12)
8008974: 2b 8c 00 08 lw r12,(sp+8)
8008978: 37 9c 00 0c addi sp,sp,12
800897c: c3 a0 00 00 ret
080088a8 <_POSIX_Threads_Sporadic_budget_callout>:
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
80088a8: 37 9c ff fc addi sp,sp,-4
80088ac: 5b 9d 00 04 sw (sp+4),ra
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
80088b0: 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 */
80088b4: 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);
80088b8: 78 02 08 01 mvhi r2,0x801
80088bc: 38 42 e0 c0 ori r2,r2,0xe0c0
80088c0: 58 24 00 78 sw (r1+120),r4
80088c4: 40 44 00 00 lbu r4,(r2+0)
80088c8: 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 ) {
80088cc: 28 25 00 1c lw r5,(r1+28)
80088d0: 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;
80088d4: 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 ) {
80088d8: 5c a0 00 05 bne r5,r0,80088ec <_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 ) {
80088dc: 28 23 00 14 lw r3,(r1+20)
80088e0: 50 62 00 03 bgeu r3,r2,80088ec <_POSIX_Threads_Sporadic_budget_callout+0x44><== NEVER TAKEN
_Thread_Change_priority( the_thread, new_priority, true );
80088e4: 34 03 00 01 mvi r3,1
80088e8: fb ff ee 05 calli 80040fc <_Thread_Change_priority>
#if 0
printk( "lower priority\n" );
#endif
}
}
}
80088ec: 2b 9d 00 04 lw ra,(sp+4)
80088f0: 37 9c 00 04 addi sp,sp,4
80088f4: c3 a0 00 00 ret
0800b6f8 <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
800b6f8: 37 9c ff ec addi sp,sp,-20
800b6fc: 5b 8b 00 14 sw (sp+20),r11
800b700: 5b 8c 00 10 sw (sp+16),r12
800b704: 5b 8d 00 0c sw (sp+12),r13
800b708: 5b 8e 00 08 sw (sp+8),r14
800b70c: 5b 9d 00 04 sw (sp+4),ra
POSIX_Cancel_Handler_control *handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
800b710: 28 2c 01 2c lw r12,(r1+300)
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
800b714: 34 01 00 01 mvi r1,1
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
800b718: 29 82 00 e0 lw r2,(r12+224)
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
800b71c: 59 81 00 d4 sw (r12+212),r1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
800b720: 35 8d 00 e4 addi r13,r12,228
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
800b724: 44 4d 00 12 be r2,r13,800b76c <_POSIX_Threads_cancel_run+0x74>
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
_ISR_Disable( level );
800b728: 34 0e ff fe mvi r14,-2
800b72c: 90 00 08 00 rcsr r1,IE
800b730: a0 2e 10 00 and r2,r1,r14
800b734: d0 02 00 00 wcsr IE,r2
handler = (POSIX_Cancel_Handler_control *)
800b738: 29 ab 00 04 lw r11,(r13+4)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
800b73c: 29 62 00 00 lw r2,(r11+0)
previous = the_node->previous;
800b740: 29 63 00 04 lw r3,(r11+4)
next->previous = previous;
previous->next = next;
800b744: 58 62 00 00 sw (r3+0),r2
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
800b748: 58 43 00 04 sw (r2+4),r3
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
800b74c: d0 01 00 00 wcsr IE,r1
(*handler->routine)( handler->arg );
800b750: 29 62 00 08 lw r2,(r11+8)
800b754: 29 61 00 0c lw r1,(r11+12)
800b758: d8 40 00 00 call r2
_Workspace_Free( handler );
800b75c: b9 60 08 00 mv r1,r11
800b760: fb ff ea 30 calli 8006020 <_Workspace_Free>
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
800b764: 29 81 00 e0 lw r1,(r12+224)
800b768: 5c 2d ff f1 bne r1,r13,800b72c <_POSIX_Threads_cancel_run+0x34><== NEVER TAKEN
(*handler->routine)( handler->arg );
_Workspace_Free( handler );
}
}
800b76c: 2b 9d 00 04 lw ra,(sp+4)
800b770: 2b 8b 00 14 lw r11,(sp+20)
800b774: 2b 8c 00 10 lw r12,(sp+16)
800b778: 2b 8d 00 0c lw r13,(sp+12)
800b77c: 2b 8e 00 08 lw r14,(sp+8)
800b780: 37 9c 00 14 addi sp,sp,20
800b784: c3 a0 00 00 ret
08002c08 <_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)
{
8002c08: 37 9c ff f8 addi sp,sp,-8
8002c0c: 5b 8b 00 08 sw (sp+8),r11
8002c10: 5b 9d 00 04 sw (sp+4),ra
8002c14: b8 40 58 00 mv r11,r2
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
8002c18: 28 42 00 68 lw r2,(r2+104)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
8002c1c: 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;
8002c20: 34 42 00 01 addi r2,r2,1
8002c24: 59 62 00 68 sw (r11+104),r2
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
8002c28: 5c 20 00 0e bne r1,r0,8002c60 <_POSIX_Timer_TSR+0x58>
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
8002c2c: 29 62 00 58 lw r2,(r11+88)
8002c30: 5c 41 00 0c bne r2,r1,8002c60 <_POSIX_Timer_TSR+0x58> <== ALWAYS TAKEN
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
8002c34: 34 01 00 04 mvi r1,4 <== NOT EXECUTED
8002c38: 31 61 00 3c sb (r11+60),r1 <== NOT EXECUTED
/*
* The sending of the signal to the process running the handling function
* specified for that signal is simulated
*/
if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) {
8002c3c: 29 61 00 38 lw r1,(r11+56)
8002c40: 29 62 00 44 lw r2,(r11+68)
8002c44: f8 00 15 ac calli 80082f4 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
8002c48: 34 01 00 00 mvi r1,0
8002c4c: 59 61 00 68 sw (r11+104),r1
}
8002c50: 2b 9d 00 04 lw ra,(sp+4)
8002c54: 2b 8b 00 08 lw r11,(sp+8)
8002c58: 37 9c 00 08 addi sp,sp,8
8002c5c: c3 a0 00 00 ret
ptimer->overrun = ptimer->overrun + 1;
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
8002c60: 29 62 00 64 lw r2,(r11+100)
8002c64: 29 63 00 08 lw r3,(r11+8)
8002c68: 78 04 08 00 mvhi r4,0x800
8002c6c: 38 84 2c 08 ori r4,r4,0x2c08
8002c70: 35 61 00 10 addi r1,r11,16
8002c74: b9 60 28 00 mv r5,r11
8002c78: f8 00 17 08 calli 8008898 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
8002c7c: 44 20 ff f5 be r1,r0,8002c50 <_POSIX_Timer_TSR+0x48> <== NEVER TAKEN
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
8002c80: 35 61 00 6c addi r1,r11,108
8002c84: f8 00 03 46 calli 800399c <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
8002c88: 34 01 00 03 mvi r1,3
8002c8c: 31 61 00 3c sb (r11+60),r1
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
8002c90: e3 ff ff eb bi 8002c3c <_POSIX_Timer_TSR+0x34>
0800b8c8 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
800b8c8: 37 9c ff e0 addi sp,sp,-32
800b8cc: 5b 8b 00 14 sw (sp+20),r11
800b8d0: 5b 8c 00 10 sw (sp+16),r12
800b8d4: 5b 8d 00 0c sw (sp+12),r13
800b8d8: 5b 8e 00 08 sw (sp+8),r14
800b8dc: 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,
800b8e0: 37 8e 00 18 addi r14,sp,24
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
800b8e4: 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,
800b8e8: 34 05 00 01 mvi r5,1
800b8ec: b9 c0 18 00 mv r3,r14
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
800b8f0: b8 20 60 00 mv r12,r1
800b8f4: 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,
800b8f8: f8 00 00 2b calli 800b9a4 <_POSIX_signals_Clear_signals>
800b8fc: 44 20 00 22 be r1,r0,800b984 <_POSIX_signals_Check_signal+0xbc>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
800b900: b5 6b 08 00 add r1,r11,r11
800b904: 34 02 00 02 mvi r2,2
800b908: b4 2b 08 00 add r1,r1,r11
800b90c: 78 0d 08 01 mvhi r13,0x801
800b910: fb ff d2 38 calli 80001f0 <__ashlsi3>
800b914: 39 ad ed b0 ori r13,r13,0xedb0
800b918: b5 a1 08 00 add r1,r13,r1
800b91c: 28 24 00 08 lw r4,(r1+8)
800b920: 34 02 00 01 mvi r2,1
800b924: 44 82 00 18 be r4,r2,800b984 <_POSIX_signals_Check_signal+0xbc><== NEVER TAKEN
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
800b928: 29 8d 00 cc lw r13,(r12+204)
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
800b92c: 28 23 00 04 lw r3,(r1+4)
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
800b930: 28 22 00 00 lw r2,(r1+0)
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
800b934: b8 6d 08 00 or r1,r3,r13
800b938: 59 81 00 cc sw (r12+204),r1
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
800b93c: 34 01 00 02 mvi r1,2
800b940: 44 41 00 0c be r2,r1,800b970 <_POSIX_signals_Check_signal+0xa8>
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
800b944: b9 60 08 00 mv r1,r11
800b948: d8 80 00 00 call r4
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
800b94c: 34 01 00 01 mvi r1,1
800b950: 59 8d 00 cc sw (r12+204),r13
return true;
}
800b954: 2b 9d 00 04 lw ra,(sp+4)
800b958: 2b 8b 00 14 lw r11,(sp+20)
800b95c: 2b 8c 00 10 lw r12,(sp+16)
800b960: 2b 8d 00 0c lw r13,(sp+12)
800b964: 2b 8e 00 08 lw r14,(sp+8)
800b968: 37 9c 00 20 addi sp,sp,32
800b96c: c3 a0 00 00 ret
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
800b970: b9 60 08 00 mv r1,r11
800b974: b9 c0 10 00 mv r2,r14
800b978: 34 03 00 00 mvi r3,0
800b97c: d8 80 00 00 call r4
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
800b980: e3 ff ff f3 bi 800b94c <_POSIX_signals_Check_signal+0x84>
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
800b984: 34 01 00 00 mvi r1,0
}
800b988: 2b 9d 00 04 lw ra,(sp+4)
800b98c: 2b 8b 00 14 lw r11,(sp+20)
800b990: 2b 8c 00 10 lw r12,(sp+16)
800b994: 2b 8d 00 0c lw r13,(sp+12)
800b998: 2b 8e 00 08 lw r14,(sp+8)
800b99c: 37 9c 00 20 addi sp,sp,32
800b9a0: c3 a0 00 00 ret
0800ce70 <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
800ce70: 37 9c ff f0 addi sp,sp,-16
800ce74: 5b 8b 00 10 sw (sp+16),r11
800ce78: 5b 8c 00 0c sw (sp+12),r12
800ce7c: 5b 8d 00 08 sw (sp+8),r13
800ce80: 5b 9d 00 04 sw (sp+4),ra
800ce84: b8 20 58 00 mv r11,r1
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
800ce88: 90 00 68 00 rcsr r13,IE
800ce8c: 34 01 ff fe mvi r1,-2
800ce90: a1 a1 08 00 and r1,r13,r1
800ce94: d0 01 00 00 wcsr IE,r1
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
800ce98: b5 6b 08 00 add r1,r11,r11
800ce9c: 34 02 00 02 mvi r2,2
800cea0: b4 2b 08 00 add r1,r1,r11
800cea4: 78 0c 08 01 mvhi r12,0x801
800cea8: fb ff cc d2 calli 80001f0 <__ashlsi3>
800ceac: 39 8c ed b0 ori r12,r12,0xedb0
800ceb0: b5 81 60 00 add r12,r12,r1
800ceb4: 29 83 00 00 lw r3,(r12+0)
800ceb8: 34 02 00 02 mvi r2,2
800cebc: 44 62 00 17 be r3,r2,800cf18 <_POSIX_signals_Clear_process_signals+0xa8>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
800cec0: 35 62 ff ff addi r2,r11,-1
800cec4: 34 01 00 01 mvi r1,1
800cec8: fb ff cc ca calli 80001f0 <__ashlsi3>
800cecc: 78 02 08 01 mvhi r2,0x801
800ced0: 38 42 ef a4 ori r2,r2,0xefa4
800ced4: 28 43 00 00 lw r3,(r2+0)
800ced8: a4 20 08 00 not r1,r1
800cedc: a0 23 08 00 and r1,r1,r3
800cee0: 58 41 00 00 sw (r2+0),r1
if ( !_POSIX_signals_Pending )
800cee4: 5c 20 00 06 bne r1,r0,800cefc <_POSIX_signals_Clear_process_signals+0x8c><== NEVER TAKEN
_Thread_Do_post_task_switch_extension--;
800cee8: 78 01 08 01 mvhi r1,0x801
800ceec: 38 21 e9 44 ori r1,r1,0xe944
800cef0: 28 22 00 00 lw r2,(r1+0)
800cef4: 34 42 ff ff addi r2,r2,-1
800cef8: 58 22 00 00 sw (r1+0),r2
}
_ISR_Enable( level );
800cefc: d0 0d 00 00 wcsr IE,r13
}
800cf00: 2b 9d 00 04 lw ra,(sp+4)
800cf04: 2b 8b 00 10 lw r11,(sp+16)
800cf08: 2b 8c 00 0c lw r12,(sp+12)
800cf0c: 2b 8d 00 08 lw r13,(sp+8)
800cf10: 37 9c 00 10 addi sp,sp,16
800cf14: c3 a0 00 00 ret
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
800cf18: 78 02 08 01 mvhi r2,0x801
800cf1c: 38 42 ef a8 ori r2,r2,0xefa8
800cf20: b4 22 08 00 add r1,r1,r2
800cf24: 28 22 00 00 lw r2,(r1+0)
800cf28: 34 21 00 04 addi r1,r1,4
800cf2c: 44 41 ff e5 be r2,r1,800cec0 <_POSIX_signals_Clear_process_signals+0x50><== ALWAYS TAKEN
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
if ( !_POSIX_signals_Pending )
_Thread_Do_post_task_switch_extension--;
}
_ISR_Enable( level );
800cf30: d0 0d 00 00 wcsr IE,r13 <== NOT EXECUTED
}
800cf34: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800cf38: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
800cf3c: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
800cf40: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
800cf44: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
800cf48: c3 a0 00 00 ret <== NOT EXECUTED
080039e8 <_POSIX_signals_Get_highest>:
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
80039e8: 37 9c ff f0 addi sp,sp,-16
80039ec: 5b 8b 00 10 sw (sp+16),r11
80039f0: 5b 8c 00 0c sw (sp+12),r12
80039f4: 5b 8d 00 08 sw (sp+8),r13
80039f8: 5b 9d 00 04 sw (sp+4),ra
80039fc: 34 0b 00 1b mvi r11,27
8003a00: b8 20 60 00 mv r12,r1
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
8003a04: 34 0d 00 20 mvi r13,32
if ( set & signo_to_mask( signo ) ) {
8003a08: 35 62 ff ff addi r2,r11,-1
8003a0c: 34 01 00 01 mvi r1,1
8003a10: fb ff f4 ea calli 8000db8 <__ashlsi3>
8003a14: a0 2c 08 00 and r1,r1,r12
8003a18: 5c 20 00 0d bne r1,r0,8003a4c <_POSIX_signals_Get_highest+0x64><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
8003a1c: 35 6b 00 01 addi r11,r11,1
8003a20: 5d 6d ff fa bne r11,r13,8003a08 <_POSIX_signals_Get_highest+0x20>
8003a24: 34 0b 00 01 mvi r11,1
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
8003a28: 34 0d 00 1b mvi r13,27
8003a2c: e0 00 00 03 bi 8003a38 <_POSIX_signals_Get_highest+0x50>
8003a30: 35 6b 00 01 addi r11,r11,1
8003a34: 45 6d 00 06 be r11,r13,8003a4c <_POSIX_signals_Get_highest+0x64><== NEVER TAKEN
if ( set & signo_to_mask( signo ) ) {
8003a38: 35 62 ff ff addi r2,r11,-1
8003a3c: 34 01 00 01 mvi r1,1
8003a40: fb ff f4 de calli 8000db8 <__ashlsi3>
8003a44: a0 2c 10 00 and r2,r1,r12
8003a48: 44 40 ff fa be r2,r0,8003a30 <_POSIX_signals_Get_highest+0x48>
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
8003a4c: b9 60 08 00 mv r1,r11
8003a50: 2b 9d 00 04 lw ra,(sp+4)
8003a54: 2b 8b 00 10 lw r11,(sp+16)
8003a58: 2b 8c 00 0c lw r12,(sp+12)
8003a5c: 2b 8d 00 08 lw r13,(sp+8)
8003a60: 37 9c 00 10 addi sp,sp,16
8003a64: c3 a0 00 00 ret
0800cf90 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
800cf90: 37 9c ff f0 addi sp,sp,-16
800cf94: 5b 8b 00 10 sw (sp+16),r11
800cf98: 5b 8c 00 0c sw (sp+12),r12
800cf9c: 5b 8d 00 08 sw (sp+8),r13
800cfa0: 5b 9d 00 04 sw (sp+4),ra
800cfa4: b8 20 58 00 mv r11,r1
800cfa8: b8 40 68 00 mv r13,r2
800cfac: 34 01 00 01 mvi r1,1
800cfb0: 34 42 ff ff addi r2,r2,-1
800cfb4: b8 60 60 00 mv r12,r3
800cfb8: fb ff cc 8e calli 80001f0 <__ashlsi3>
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
800cfbc: 29 65 00 10 lw r5,(r11+16)
800cfc0: 78 04 10 00 mvhi r4,0x1000
800cfc4: 38 84 80 00 ori r4,r4,0x8000
800cfc8: a0 a4 10 00 and r2,r5,r4
{
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
800cfcc: 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 ) ) {
800cfd0: 44 44 00 2d be r2,r4,800d084 <_POSIX_signals_Unblock_thread+0xf4>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
800cfd4: 28 62 00 cc lw r2,(r3+204)
800cfd8: a4 40 10 00 not r2,r2
800cfdc: a0 22 08 00 and r1,r1,r2
800cfe0: 44 20 00 22 be r1,r0,800d068 <_POSIX_signals_Unblock_thread+0xd8>
* + Any other combination, do nothing.
*/
the_thread->do_post_task_switch_extension = true;
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
800cfe4: 78 01 10 00 mvhi r1,0x1000
800cfe8: 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;
800cfec: 34 02 00 01 mvi r2,1
800cff0: 31 62 00 74 sb (r11+116),r2
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
800cff4: a0 a1 08 00 and r1,r5,r1
800cff8: 44 20 00 13 be r1,r0,800d044 <_POSIX_signals_Unblock_thread+0xb4>
the_thread->Wait.return_code = EINTR;
800cffc: 34 01 00 04 mvi r1,4
800d000: 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) ){
800d004: 20 a5 00 08 andi r5,r5,0x8
800d008: 44 a0 00 18 be r5,r0,800d068 <_POSIX_signals_Unblock_thread+0xd8><== NEVER TAKEN
if ( _Watchdog_Is_active( &the_thread->Timer ) )
800d00c: 29 62 00 50 lw r2,(r11+80)
800d010: 34 01 00 02 mvi r1,2
800d014: 44 41 00 41 be r2,r1,800d118 <_POSIX_signals_Unblock_thread+0x188><== ALWAYS TAKEN
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
800d018: 78 02 10 03 mvhi r2,0x1003
800d01c: b9 60 08 00 mv r1,r11
800d020: 38 42 ff f8 ori r2,r2,0xfff8
800d024: fb ff f3 b7 calli 8009f00 <_Thread_Clear_state>
800d028: 34 01 00 00 mvi r1,0
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
}
}
return false;
}
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
if ( _States_Is_delaying(the_thread->current_state) ){
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
800d044: 5c a1 00 09 bne r5,r1,800d068 <_POSIX_signals_Unblock_thread+0xd8><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
800d048: 78 01 08 01 mvhi r1,0x801
800d04c: 38 21 e9 3c ori r1,r1,0xe93c
800d050: 28 21 00 00 lw r1,(r1+0)
800d054: 44 25 00 05 be r1,r5,800d068 <_POSIX_signals_Unblock_thread+0xd8>
800d058: 78 01 08 01 mvhi r1,0x801
800d05c: 38 21 e9 60 ori r1,r1,0xe960
800d060: 28 21 00 00 lw r1,(r1+0)
800d064: 45 61 00 28 be r11,r1,800d104 <_POSIX_signals_Unblock_thread+0x174><== ALWAYS TAKEN
_ISR_Signals_to_thread_executing = true;
800d068: 34 01 00 00 mvi r1,0
}
}
return false;
}
800d06c: 2b 9d 00 04 lw ra,(sp+4)
800d070: 2b 8b 00 10 lw r11,(sp+16)
800d074: 2b 8c 00 0c lw r12,(sp+12)
800d078: 2b 8d 00 08 lw r13,(sp+8)
800d07c: 37 9c 00 10 addi sp,sp,16
800d080: c3 a0 00 00 ret
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
800d084: 29 62 00 30 lw r2,(r11+48)
800d088: a0 22 10 00 and r2,r1,r2
800d08c: 44 40 00 14 be r2,r0,800d0dc <_POSIX_signals_Unblock_thread+0x14c>
the_thread->Wait.return_code = EINTR;
800d090: 34 01 00 04 mvi r1,4
800d094: 59 61 00 34 sw (r11+52),r1
the_info = (siginfo_t *) the_thread->Wait.return_argument;
800d098: 29 61 00 28 lw r1,(r11+40)
if ( !info ) {
800d09c: 45 80 00 15 be r12,r0,800d0f0 <_POSIX_signals_Unblock_thread+0x160>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
800d0a0: 29 82 00 00 lw r2,(r12+0)
800d0a4: 58 22 00 00 sw (r1+0),r2
800d0a8: 29 82 00 04 lw r2,(r12+4)
800d0ac: 58 22 00 04 sw (r1+4),r2
800d0b0: 29 8c 00 08 lw r12,(r12+8)
800d0b4: 58 2c 00 08 sw (r1+8),r12
}
_Thread_queue_Extract_with_proxy( the_thread );
800d0b8: b9 60 08 00 mv r1,r11
800d0bc: fb ff e0 09 calli 80050e0 <_Thread_queue_Extract_with_proxy>
800d0c0: 34 01 00 01 mvi r1,1
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
}
}
return false;
}
800d0c4: 2b 9d 00 04 lw ra,(sp+4)
800d0c8: 2b 8b 00 10 lw r11,(sp+16)
800d0cc: 2b 8c 00 0c lw r12,(sp+12)
800d0d0: 2b 8d 00 08 lw r13,(sp+8)
800d0d4: 37 9c 00 10 addi sp,sp,16
800d0d8: c3 a0 00 00 ret
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
800d0dc: 28 63 00 cc lw r3,(r3+204)
800d0e0: a4 60 18 00 not r3,r3
800d0e4: a0 23 08 00 and r1,r1,r3
800d0e8: 5c 22 ff ea bne r1,r2,800d090 <_POSIX_signals_Unblock_thread+0x100>
800d0ec: e3 ff ff df bi 800d068 <_POSIX_signals_Unblock_thread+0xd8>
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
the_info->si_code = SI_USER;
800d0f0: 34 02 00 01 mvi r2,1
the_info->si_value.sival_int = 0;
800d0f4: 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;
800d0f8: 58 2d 00 00 sw (r1+0),r13
the_info->si_code = SI_USER;
800d0fc: 58 22 00 04 sw (r1+4),r2
800d100: e3 ff ff ee bi 800d0b8 <_POSIX_signals_Unblock_thread+0x128>
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
800d104: 78 01 08 01 mvhi r1,0x801
800d108: 38 21 e9 f8 ori r1,r1,0xe9f8
800d10c: 30 22 00 00 sb (r1+0),r2
800d110: b8 a0 08 00 mv r1,r5
800d114: e3 ff ff d6 bi 800d06c <_POSIX_signals_Unblock_thread+0xdc>
_Thread_queue_Extract_with_proxy( the_thread );
else
#endif
if ( _States_Is_delaying(the_thread->current_state) ){
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
800d118: 35 61 00 48 addi r1,r11,72
800d11c: fb ff e3 34 calli 8005dec <_Watchdog_Remove>
800d120: e3 ff ff be bi 800d018 <_POSIX_signals_Unblock_thread+0x88>
080026b4 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
80026b4: 37 9c ff e8 addi sp,sp,-24
80026b8: 5b 8b 00 14 sw (sp+20),r11
80026bc: 5b 8c 00 10 sw (sp+16),r12
80026c0: 5b 8d 00 0c sw (sp+12),r13
80026c4: 5b 8e 00 08 sw (sp+8),r14
80026c8: 5b 9d 00 04 sw (sp+4),ra
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
80026cc: 78 01 08 01 mvhi r1,0x801
80026d0: 38 21 e0 8c ori r1,r1,0xe08c
80026d4: 28 2b 00 2c lw r11,(r1+44)
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
80026d8: 28 2e 00 28 lw r14,(r1+40)
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
80026dc: 45 60 00 15 be r11,r0,8002730 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
80026e0: 45 c0 00 14 be r14,r0,8002730 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c><== NEVER TAKEN
80026e4: 34 0c 00 00 mvi r12,0
return_value = rtems_task_create(
80026e8: 29 61 00 00 lw r1,(r11+0)
80026ec: 29 62 00 08 lw r2,(r11+8)
80026f0: 29 63 00 04 lw r3,(r11+4)
80026f4: 29 64 00 14 lw r4,(r11+20)
80026f8: 29 65 00 0c lw r5,(r11+12)
80026fc: 37 86 00 18 addi r6,sp,24
8002700: fb ff ff 3a calli 80023e8 <rtems_task_create>
8002704: b8 20 68 00 mv r13,r1
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
8002708: 5c 20 00 11 bne r1,r0,800274c <_RTEMS_tasks_Initialize_user_tasks_body+0x98>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
800270c: 29 63 00 18 lw r3,(r11+24)
8002710: 2b 81 00 18 lw r1,(sp+24)
8002714: 29 62 00 10 lw r2,(r11+16)
8002718: f8 00 00 14 calli 8002768 <rtems_task_start>
800271c: b8 20 18 00 mv r3,r1
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
8002720: 5c 2d 00 0f bne r1,r13,800275c <_RTEMS_tasks_Initialize_user_tasks_body+0xa8>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
8002724: 35 8c 00 01 addi r12,r12,1
8002728: 35 6b 00 1c addi r11,r11,28
800272c: 55 cc ff ef bgu r14,r12,80026e8 <_RTEMS_tasks_Initialize_user_tasks_body+0x34><== NEVER TAKEN
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
}
}
8002730: 2b 9d 00 04 lw ra,(sp+4)
8002734: 2b 8b 00 14 lw r11,(sp+20)
8002738: 2b 8c 00 10 lw r12,(sp+16)
800273c: 2b 8d 00 0c lw r13,(sp+12)
8002740: 2b 8e 00 08 lw r14,(sp+8)
8002744: 37 9c 00 18 addi sp,sp,24
8002748: c3 a0 00 00 ret
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
800274c: 34 01 00 01 mvi r1,1
8002750: b9 a0 18 00 mv r3,r13
8002754: b8 20 10 00 mv r2,r1
8002758: f8 00 03 ff calli 8003754 <_Internal_error_Occurred>
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
800275c: 34 01 00 01 mvi r1,1
8002760: b8 20 10 00 mv r2,r1
8002764: f8 00 03 fc calli 8003754 <_Internal_error_Occurred>
080090b0 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
80090b0: 37 9c ff f0 addi sp,sp,-16
80090b4: 5b 8b 00 0c sw (sp+12),r11
80090b8: 5b 8c 00 08 sw (sp+8),r12
80090bc: 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 ];
80090c0: 28 2b 01 28 lw r11,(r1+296)
if ( !api )
80090c4: 45 60 00 1b be r11,r0,8009130 <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
80090c8: 90 00 10 00 rcsr r2,IE
80090cc: 34 01 ff fe mvi r1,-2
80090d0: a0 41 08 00 and r1,r2,r1
80090d4: d0 01 00 00 wcsr IE,r1
signal_set = asr->signals_posted;
asr->signals_posted = 0;
80090d8: 34 01 00 00 mvi r1,0
*/
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
80090dc: 29 6c 00 14 lw r12,(r11+20)
asr->signals_posted = 0;
80090e0: 59 61 00 14 sw (r11+20),r1
_ISR_Enable( level );
80090e4: d0 02 00 00 wcsr IE,r2
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
80090e8: 45 80 00 12 be r12,r0,8009130 <_RTEMS_tasks_Post_switch_extension+0x80>
return;
asr->nest_level += 1;
80090ec: 29 63 00 1c lw r3,(r11+28)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
80090f0: 29 61 00 10 lw r1,(r11+16)
80090f4: 38 02 ff ff mvu r2,0xffff
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
80090f8: 34 63 00 01 addi r3,r3,1
80090fc: 59 63 00 1c sw (r11+28),r3
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
8009100: 37 83 00 10 addi r3,sp,16
8009104: f8 00 0b 5e calli 800be7c <rtems_task_mode>
(*asr->handler)( signal_set );
8009108: 29 62 00 0c lw r2,(r11+12)
800910c: b9 80 08 00 mv r1,r12
8009110: d8 40 00 00 call r2
asr->nest_level -= 1;
8009114: 29 63 00 1c lw r3,(r11+28)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
8009118: 2b 81 00 10 lw r1,(sp+16)
800911c: 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;
8009120: 34 63 ff ff addi r3,r3,-1
8009124: 59 63 00 1c sw (r11+28),r3
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
8009128: 37 83 00 10 addi r3,sp,16
800912c: f8 00 0b 54 calli 800be7c <rtems_task_mode>
}
8009130: 2b 9d 00 04 lw ra,(sp+4)
8009134: 2b 8b 00 0c lw r11,(sp+12)
8009138: 2b 8c 00 08 lw r12,(sp+8)
800913c: 37 9c 00 10 addi sp,sp,16
8009140: c3 a0 00 00 ret
08008fe4 <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
8008fe4: 28 21 01 38 lw r1,(r1+312)
while (tvp) {
8008fe8: 44 20 00 08 be r1,r0,8009008 <_RTEMS_tasks_Switch_extension+0x24>
tvp->tval = *tvp->ptr;
8008fec: 28 23 00 04 lw r3,(r1+4)
8008ff0: 28 64 00 00 lw r4,(r3+0)
8008ff4: 58 24 00 0c sw (r1+12),r4
*tvp->ptr = tvp->gval;
8008ff8: 28 24 00 08 lw r4,(r1+8)
tvp = (rtems_task_variable_t *)tvp->next;
8008ffc: 28 21 00 00 lw r1,(r1+0)
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
8009000: 58 64 00 00 sw (r3+0),r4
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
8009004: 5c 20 ff fa bne r1,r0,8008fec <_RTEMS_tasks_Switch_extension+0x8><== NEVER TAKEN
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
8009008: 28 41 01 38 lw r1,(r2+312)
while (tvp) {
800900c: 44 20 00 08 be r1,r0,800902c <_RTEMS_tasks_Switch_extension+0x48>
tvp->gval = *tvp->ptr;
8009010: 28 22 00 04 lw r2,(r1+4)
*tvp->ptr = tvp->tval;
8009014: 28 24 00 0c lw r4,(r1+12)
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
tvp->gval = *tvp->ptr;
8009018: 28 43 00 00 lw r3,(r2+0)
800901c: 58 23 00 08 sw (r1+8),r3
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
8009020: 28 21 00 00 lw r1,(r1+0)
}
tvp = heir->task_variables;
while (tvp) {
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
8009024: 58 44 00 00 sw (r2+0),r4
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
8009028: 5c 20 ff fa bne r1,r0,8009010 <_RTEMS_tasks_Switch_extension+0x2c><== NEVER TAKEN
800902c: c3 a0 00 00 ret
08003f0c <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
8003f0c: 37 9c ff f4 addi sp,sp,-12
8003f10: 5b 8b 00 08 sw (sp+8),r11
8003f14: 5b 9d 00 04 sw (sp+4),ra
8003f18: b8 20 10 00 mv r2,r1
8003f1c: 78 01 08 02 mvhi r1,0x802
8003f20: 38 21 48 94 ori r1,r1,0x4894
8003f24: 37 83 00 0c addi r3,sp,12
8003f28: f8 00 08 41 calli 800602c <_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 ) {
8003f2c: 2b 82 00 0c lw r2,(sp+12)
8003f30: b8 20 58 00 mv r11,r1
8003f34: 44 40 00 05 be r2,r0,8003f48 <_Rate_monotonic_Timeout+0x3c><== ALWAYS TAKEN
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
8003f38: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003f3c: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8003f40: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8003f44: c3 a0 00 00 ret <== NOT EXECUTED
*/
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_thread = the_period->owner;
8003f48: 28 21 00 40 lw r1,(r1+64)
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
8003f4c: 28 23 00 10 lw r3,(r1+16)
8003f50: 20 63 40 00 andi r3,r3,0x4000
8003f54: 44 62 00 04 be r3,r2,8003f64 <_Rate_monotonic_Timeout+0x58>
the_thread->Wait.id == the_period->Object.id ) {
8003f58: 28 23 00 20 lw r3,(r1+32)
8003f5c: 29 62 00 08 lw r2,(r11+8)
8003f60: 44 62 00 1a be r3,r2,8003fc8 <_Rate_monotonic_Timeout+0xbc>
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
8003f64: 29 62 00 38 lw r2,(r11+56)
8003f68: 34 01 00 01 mvi r1,1
8003f6c: 44 41 00 0c be r2,r1,8003f9c <_Rate_monotonic_Timeout+0x90>
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
8003f70: 34 01 00 04 mvi r1,4
8003f74: 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;
8003f78: 78 01 08 02 mvhi r1,0x802
8003f7c: 38 21 49 cc ori r1,r1,0x49cc
8003f80: 28 22 00 00 lw r2,(r1+0)
8003f84: 34 42 ff ff addi r2,r2,-1
8003f88: 58 22 00 00 sw (r1+0),r2
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
8003f8c: 2b 9d 00 04 lw ra,(sp+4)
8003f90: 2b 8b 00 08 lw r11,(sp+8)
8003f94: 37 9c 00 0c addi sp,sp,12
8003f98: c3 a0 00 00 ret
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
8003f9c: 34 01 00 03 mvi r1,3
8003fa0: 59 61 00 38 sw (r11+56),r1
_Rate_monotonic_Initiate_statistics( the_period );
8003fa4: b9 60 08 00 mv r1,r11
8003fa8: fb ff fd c7 calli 80036c4 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
8003fac: 29 61 00 3c lw r1,(r11+60)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8003fb0: 35 62 00 10 addi r2,r11,16
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
8003fb4: 59 61 00 1c sw (r11+28),r1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8003fb8: 78 01 08 02 mvhi r1,0x802
8003fbc: 38 21 4a a8 ori r1,r1,0x4aa8
8003fc0: f8 00 10 cc calli 80082f0 <_Watchdog_Insert>
8003fc4: e3 ff ff ed bi 8003f78 <_Rate_monotonic_Timeout+0x6c>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
8003fc8: 78 02 10 03 mvhi r2,0x1003
8003fcc: 38 42 ff f8 ori r2,r2,0xfff8
8003fd0: f8 00 09 a3 calli 800665c <_Thread_Clear_state>
8003fd4: e3 ff ff f4 bi 8003fa4 <_Rate_monotonic_Timeout+0x98>
08003858 <_Rate_monotonic_Update_statistics>:
}
void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
8003858: 37 9c ff e0 addi sp,sp,-32
800385c: 5b 8b 00 10 sw (sp+16),r11
8003860: 5b 8c 00 0c sw (sp+12),r12
8003864: 5b 8d 00 08 sw (sp+8),r13
8003868: 5b 9d 00 04 sw (sp+4),ra
800386c: b8 20 58 00 mv r11,r1
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
8003870: 28 21 00 54 lw r1,(r1+84)
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
8003874: 29 62 00 38 lw r2,(r11+56)
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
8003878: 34 21 00 01 addi r1,r1,1
800387c: 59 61 00 54 sw (r11+84),r1
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
8003880: 34 01 00 04 mvi r1,4
8003884: 44 41 00 36 be r2,r1,800395c <_Rate_monotonic_Update_statistics+0x104>
/*
* Grab status for time statistics.
*/
valid_status =
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
8003888: 37 8c 00 14 addi r12,sp,20
800388c: 37 8d 00 1c addi r13,sp,28
8003890: b9 60 08 00 mv r1,r11
8003894: b9 80 10 00 mv r2,r12
8003898: b9 a0 18 00 mv r3,r13
800389c: fb ff ff b5 calli 8003770 <_Rate_monotonic_Get_status>
if (!valid_status)
80038a0: 5c 20 00 07 bne r1,r0,80038bc <_Rate_monotonic_Update_statistics+0x64><== ALWAYS TAKEN
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
80038a4: 2b 9d 00 04 lw ra,(sp+4)
80038a8: 2b 8b 00 10 lw r11,(sp+16)
80038ac: 2b 8c 00 0c lw r12,(sp+12)
80038b0: 2b 8d 00 08 lw r13,(sp+8)
80038b4: 37 9c 00 20 addi sp,sp,32
80038b8: c3 a0 00 00 ret
/*
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
80038bc: b9 a0 10 00 mv r2,r13
80038c0: 35 61 00 6c addi r1,r11,108
80038c4: f8 00 11 2b calli 8007d70 <_Timespec_Add_to>
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
80038c8: b9 a0 08 00 mv r1,r13
80038cc: 35 62 00 5c addi r2,r11,92
80038d0: f8 00 11 83 calli 8007edc <_Timespec_Less_than>
80038d4: 44 20 00 05 be r1,r0,80038e8 <_Rate_monotonic_Update_statistics+0x90>
stats->min_cpu_time = executed;
80038d8: 2b 81 00 1c lw r1,(sp+28)
80038dc: 59 61 00 5c sw (r11+92),r1
80038e0: 2b 81 00 20 lw r1,(sp+32)
80038e4: 59 61 00 60 sw (r11+96),r1
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
80038e8: b9 a0 08 00 mv r1,r13
80038ec: 35 62 00 64 addi r2,r11,100
80038f0: f8 00 11 6f calli 8007eac <_Timespec_Greater_than>
80038f4: 44 20 00 05 be r1,r0,8003908 <_Rate_monotonic_Update_statistics+0xb0>
stats->max_cpu_time = executed;
80038f8: 2b 81 00 1c lw r1,(sp+28)
80038fc: 59 61 00 64 sw (r11+100),r1
8003900: 2b 81 00 20 lw r1,(sp+32)
8003904: 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 );
8003908: b9 80 10 00 mv r2,r12
800390c: 35 61 00 84 addi r1,r11,132
8003910: f8 00 11 18 calli 8007d70 <_Timespec_Add_to>
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
8003914: b9 80 08 00 mv r1,r12
8003918: 35 62 00 74 addi r2,r11,116
800391c: f8 00 11 70 calli 8007edc <_Timespec_Less_than>
8003920: 5c 20 00 13 bne r1,r0,800396c <_Rate_monotonic_Update_statistics+0x114>
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
8003924: b9 80 08 00 mv r1,r12
8003928: 35 62 00 7c addi r2,r11,124
800392c: f8 00 11 60 calli 8007eac <_Timespec_Greater_than>
8003930: 44 20 ff dd be r1,r0,80038a4 <_Rate_monotonic_Update_statistics+0x4c>
stats->max_wall_time = since_last_period;
8003934: 2b 81 00 18 lw r1,(sp+24)
8003938: 59 61 00 80 sw (r11+128),r1
800393c: 2b 81 00 14 lw r1,(sp+20)
8003940: 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
}
8003944: 2b 9d 00 04 lw ra,(sp+4)
8003948: 2b 8b 00 10 lw r11,(sp+16)
800394c: 2b 8c 00 0c lw r12,(sp+12)
8003950: 2b 8d 00 08 lw r13,(sp+8)
8003954: 37 9c 00 20 addi sp,sp,32
8003958: c3 a0 00 00 ret
*/
stats = &the_period->Statistics;
stats->count++;
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
stats->missed_count++;
800395c: 29 61 00 58 lw r1,(r11+88)
8003960: 34 21 00 01 addi r1,r1,1
8003964: 59 61 00 58 sw (r11+88),r1
8003968: e3 ff ff c8 bi 8003888 <_Rate_monotonic_Update_statistics+0x30>
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
stats->min_wall_time = since_last_period;
800396c: 2b 81 00 14 lw r1,(sp+20)
8003970: 59 61 00 74 sw (r11+116),r1
8003974: 2b 81 00 18 lw r1,(sp+24)
8003978: 59 61 00 78 sw (r11+120),r1
800397c: e3 ff ff ea bi 8003924 <_Rate_monotonic_Update_statistics+0xcc>
08009658 <_TOD_Get>:
*/
void _TOD_Get(
struct timespec *time
)
{
8009658: 37 9c ff e4 addi sp,sp,-28
800965c: 5b 8b 00 0c sw (sp+12),r11
8009660: 5b 8c 00 08 sw (sp+8),r12
8009664: 5b 9d 00 04 sw (sp+4),ra
8009668: 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 );
800966c: 90 00 60 00 rcsr r12,IE
8009670: 34 01 ff fe mvi r1,-2
8009674: a1 81 08 00 and r1,r12,r1
8009678: d0 01 00 00 wcsr IE,r1
now = _TOD_Now;
800967c: 78 02 08 01 mvhi r2,0x801
8009680: 38 42 e9 34 ori r2,r2,0xe934
if ( _Watchdog_Nanoseconds_since_tick_handler )
8009684: 78 03 08 01 mvhi r3,0x801
/* assume time checked for NULL by caller */
/* _TOD_Now is the native current time */
nanoseconds = 0;
_ISR_Disable( level );
now = _TOD_Now;
8009688: 28 41 00 04 lw r1,(r2+4)
if ( _Watchdog_Nanoseconds_since_tick_handler )
800968c: 38 63 ea 44 ori r3,r3,0xea44
/* assume time checked for NULL by caller */
/* _TOD_Now is the native current time */
nanoseconds = 0;
_ISR_Disable( level );
now = _TOD_Now;
8009690: 28 42 00 00 lw r2,(r2+0)
if ( _Watchdog_Nanoseconds_since_tick_handler )
8009694: 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;
8009698: 5b 81 00 14 sw (sp+20),r1
800969c: 5b 82 00 10 sw (sp+16),r2
if ( _Watchdog_Nanoseconds_since_tick_handler )
80096a0: b8 60 20 00 mv r4,r3
80096a4: 44 60 00 03 be r3,r0,80096b0 <_TOD_Get+0x58> <== ALWAYS TAKEN
nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)();
80096a8: d8 60 00 00 call r3 <== NOT EXECUTED
80096ac: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
_ISR_Enable( level );
80096b0: d0 0c 00 00 wcsr IE,r12
_Timestamp_Set( &offset, 0, nanoseconds );
80096b4: 34 03 00 00 mvi r3,0
_Timestamp_Add_to( &now, &offset );
80096b8: 37 81 00 10 addi r1,sp,16
80096bc: 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 );
80096c0: 5b 83 00 18 sw (sp+24),r3
80096c4: 5b 84 00 1c sw (sp+28),r4
_Timestamp_Add_to( &now, &offset );
80096c8: fb ff f0 39 calli 80057ac <_Timespec_Add_to>
_Timestamp_To_timespec( &now, time );
80096cc: 2b 81 00 14 lw r1,(sp+20)
80096d0: 59 61 00 04 sw (r11+4),r1
80096d4: 2b 81 00 10 lw r1,(sp+16)
80096d8: 59 61 00 00 sw (r11+0),r1
}
80096dc: 2b 9d 00 04 lw ra,(sp+4)
80096e0: 2b 8b 00 0c lw r11,(sp+12)
80096e4: 2b 8c 00 08 lw r12,(sp+8)
80096e8: 37 9c 00 1c addi sp,sp,28
80096ec: c3 a0 00 00 ret
080096f0 <_TOD_Get_uptime>:
*/
void _TOD_Get_uptime(
Timestamp_Control *uptime
)
{
80096f0: 37 9c ff e4 addi sp,sp,-28
80096f4: 5b 8b 00 0c sw (sp+12),r11
80096f8: 5b 8c 00 08 sw (sp+8),r12
80096fc: 5b 9d 00 04 sw (sp+4),ra
8009700: 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 );
8009704: 90 00 60 00 rcsr r12,IE
8009708: 34 01 ff fe mvi r1,-2
800970c: a1 81 08 00 and r1,r12,r1
8009710: d0 01 00 00 wcsr IE,r1
up = _TOD_Uptime;
8009714: 78 02 08 01 mvhi r2,0x801
8009718: 38 42 e9 24 ori r2,r2,0xe924
if ( _Watchdog_Nanoseconds_since_tick_handler )
800971c: 78 03 08 01 mvhi r3,0x801
/* assume time checked for NULL by caller */
/* _TOD_Uptime is in native timestamp format */
nanoseconds = 0;
_ISR_Disable( level );
up = _TOD_Uptime;
8009720: 28 41 00 04 lw r1,(r2+4)
if ( _Watchdog_Nanoseconds_since_tick_handler )
8009724: 38 63 ea 44 ori r3,r3,0xea44
/* assume time checked for NULL by caller */
/* _TOD_Uptime is in native timestamp format */
nanoseconds = 0;
_ISR_Disable( level );
up = _TOD_Uptime;
8009728: 28 42 00 00 lw r2,(r2+0)
if ( _Watchdog_Nanoseconds_since_tick_handler )
800972c: 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;
8009730: 5b 81 00 14 sw (sp+20),r1
8009734: 5b 82 00 10 sw (sp+16),r2
if ( _Watchdog_Nanoseconds_since_tick_handler )
8009738: b8 60 20 00 mv r4,r3
800973c: 44 60 00 03 be r3,r0,8009748 <_TOD_Get_uptime+0x58> <== ALWAYS TAKEN
nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)();
8009740: d8 60 00 00 call r3 <== NOT EXECUTED
8009744: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
_ISR_Enable( level );
8009748: d0 0c 00 00 wcsr IE,r12
_Timestamp_Set( &offset, 0, nanoseconds );
800974c: 34 03 00 00 mvi r3,0
_Timestamp_Add_to( &up, &offset );
8009750: 37 81 00 10 addi r1,sp,16
8009754: 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 );
8009758: 5b 83 00 18 sw (sp+24),r3
800975c: 5b 84 00 1c sw (sp+28),r4
_Timestamp_Add_to( &up, &offset );
8009760: fb ff f0 13 calli 80057ac <_Timespec_Add_to>
*uptime = up;
8009764: 2b 81 00 14 lw r1,(sp+20)
8009768: 59 61 00 04 sw (r11+4),r1
800976c: 2b 81 00 10 lw r1,(sp+16)
8009770: 59 61 00 00 sw (r11+0),r1
}
8009774: 2b 9d 00 04 lw ra,(sp+4)
8009778: 2b 8b 00 0c lw r11,(sp+12)
800977c: 2b 8c 00 08 lw r12,(sp+8)
8009780: 37 9c 00 1c addi sp,sp,28
8009784: c3 a0 00 00 ret
08003240 <_TOD_Tickle_ticks>:
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
8003240: 37 9c ff ec addi sp,sp,-20
8003244: 5b 8b 00 0c sw (sp+12),r11
8003248: 5b 8c 00 08 sw (sp+8),r12
800324c: 5b 9d 00 04 sw (sp+4),ra
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
8003250: 78 01 08 01 mvhi r1,0x801
8003254: 38 21 e0 c4 ori r1,r1,0xe0c4
8003258: 28 21 00 0c lw r1,(r1+12)
800325c: 34 03 00 00 mvi r3,0
8003260: 34 02 03 e8 mvi r2,1000
8003264: 5b 83 00 10 sw (sp+16),r3
8003268: f8 00 60 33 calli 801b334 <__mulsi3>
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
800326c: 78 03 08 01 mvhi r3,0x801
8003270: 38 63 e9 f4 ori r3,r3,0xe9f4
8003274: 28 64 00 00 lw r4,(r3+0)
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
8003278: 37 8b 00 10 addi r11,sp,16
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
800327c: 5b 81 00 14 sw (sp+20),r1
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
8003280: 34 84 00 01 addi r4,r4,1
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
8003284: 78 01 08 01 mvhi r1,0x801
8003288: b9 60 10 00 mv r2,r11
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
800328c: 58 64 00 00 sw (r3+0),r4
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
8003290: 38 21 e9 24 ori r1,r1,0xe924
8003294: f8 00 09 46 calli 80057ac <_Timespec_Add_to>
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
8003298: 78 01 08 01 mvhi r1,0x801
800329c: b9 60 10 00 mv r2,r11
80032a0: 38 21 e9 34 ori r1,r1,0xe934
80032a4: f8 00 09 42 calli 80057ac <_Timespec_Add_to>
80032a8: b8 20 58 00 mv r11,r1
while ( seconds ) {
80032ac: 44 20 00 07 be r1,r0,80032c8 <_TOD_Tickle_ticks+0x88>
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
80032b0: 78 0c 08 01 mvhi r12,0x801
80032b4: b9 80 08 00 mv r1,r12
_Watchdog_Tickle_seconds();
seconds--;
80032b8: 35 6b ff ff addi r11,r11,-1
80032bc: 38 21 e9 74 ori r1,r1,0xe974
80032c0: f8 00 0b 02 calli 8005ec8 <_Watchdog_Tickle>
_Timestamp_Add_to( &_TOD_Uptime, &tick );
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
while ( seconds ) {
80032c4: 5d 60 ff fc bne r11,r0,80032b4 <_TOD_Tickle_ticks+0x74> <== NEVER TAKEN
_Watchdog_Tickle_seconds();
seconds--;
}
}
80032c8: 2b 9d 00 04 lw ra,(sp+4)
80032cc: 2b 8b 00 0c lw r11,(sp+12)
80032d0: 2b 8c 00 08 lw r12,(sp+8)
80032d4: 37 9c 00 14 addi sp,sp,20
80032d8: c3 a0 00 00 ret
08003a50 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
8003a50: 37 9c ff f4 addi sp,sp,-12
8003a54: 5b 8b 00 0c sw (sp+12),r11
8003a58: 5b 8c 00 08 sw (sp+8),r12
8003a5c: 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();
8003a60: 78 02 08 02 mvhi r2,0x802
8003a64: 38 42 40 c4 ori r2,r2,0x40c4
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
8003a68: 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();
8003a6c: 28 42 00 0c lw r2,(r2+12)
if ((!the_tod) ||
8003a70: 44 20 00 22 be r1,r0,8003af8 <_TOD_Validate+0xa8> <== NEVER TAKEN
8003a74: 78 01 00 0f mvhi r1,0xf
8003a78: 38 21 42 40 ori r1,r1,0x4240
8003a7c: f8 00 73 50 calli 80207bc <__udivsi3>
(the_tod->ticks >= ticks_per_second) ||
8003a80: 29 62 00 18 lw r2,(r11+24)
8003a84: 50 41 00 1d bgeu r2,r1,8003af8 <_TOD_Validate+0xa8> <== NEVER TAKEN
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
8003a88: 29 62 00 14 lw r2,(r11+20)
8003a8c: 34 01 00 3b mvi r1,59
8003a90: 54 41 00 1a bgu r2,r1,8003af8 <_TOD_Validate+0xa8> <== NEVER TAKEN
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
8003a94: 29 62 00 10 lw r2,(r11+16)
8003a98: 54 41 00 18 bgu r2,r1,8003af8 <_TOD_Validate+0xa8> <== NEVER TAKEN
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
8003a9c: 29 62 00 0c lw r2,(r11+12)
8003aa0: 34 01 00 17 mvi r1,23
8003aa4: 54 41 00 15 bgu r2,r1,8003af8 <_TOD_Validate+0xa8> <== NEVER TAKEN
(the_tod->month == 0) ||
8003aa8: 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) ||
8003aac: 44 20 00 13 be r1,r0,8003af8 <_TOD_Validate+0xa8> <== NEVER TAKEN
8003ab0: 34 02 00 0c mvi r2,12
8003ab4: 54 22 00 11 bgu r1,r2,8003af8 <_TOD_Validate+0xa8> <== NEVER TAKEN
(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) ||
8003ab8: 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) ||
8003abc: 34 03 07 c3 mvi r3,1987
8003ac0: 50 62 00 0e bgeu r3,r2,8003af8 <_TOD_Validate+0xa8> <== NEVER TAKEN
(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) )
8003ac4: 29 6b 00 08 lw r11,(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) ||
8003ac8: 45 60 00 0c be r11,r0,8003af8 <_TOD_Validate+0xa8> <== NEVER TAKEN
(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 )
8003acc: 20 42 00 03 andi r2,r2,0x3
8003ad0: 5c 40 00 02 bne r2,r0,8003ad8 <_TOD_Validate+0x88>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
8003ad4: 34 21 00 0d addi r1,r1,13
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
8003ad8: 78 0c 08 02 mvhi r12,0x802
8003adc: 34 02 00 02 mvi r2,2
8003ae0: fb ff f5 c4 calli 80011f0 <__ashlsi3>
8003ae4: 39 8c 23 30 ori r12,r12,0x2330
8003ae8: b5 81 08 00 add r1,r12,r1
8003aec: 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(
8003af0: f0 2b 08 00 cmpgeu r1,r1,r11
8003af4: e0 00 00 02 bi 8003afc <_TOD_Validate+0xac>
8003af8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
if ( the_tod->day > days_in_month )
return false;
return true;
}
8003afc: 2b 9d 00 04 lw ra,(sp+4)
8003b00: 2b 8b 00 0c lw r11,(sp+12)
8003b04: 2b 8c 00 08 lw r12,(sp+8)
8003b08: 37 9c 00 0c addi sp,sp,12
8003b0c: c3 a0 00 00 ret
080040fc <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
80040fc: 37 9c ff ec addi sp,sp,-20
8004100: 5b 8b 00 14 sw (sp+20),r11
8004104: 5b 8c 00 10 sw (sp+16),r12
8004108: 5b 8d 00 0c sw (sp+12),r13
800410c: 5b 8e 00 08 sw (sp+8),r14
8004110: 5b 9d 00 04 sw (sp+4),ra
8004114: b8 20 58 00 mv r11,r1
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
8004118: 28 2d 00 10 lw r13,(r1+16)
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
800411c: b8 40 60 00 mv r12,r2
8004120: 20 6e 00 ff andi r14,r3,0xff
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
8004124: f8 00 04 f2 calli 80054ec <_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 )
8004128: 29 61 00 14 lw r1,(r11+20)
800412c: 44 2c 00 04 be r1,r12,800413c <_Thread_Change_priority+0x40>
_Thread_Set_priority( the_thread, new_priority );
8004130: b9 80 10 00 mv r2,r12
8004134: b9 60 08 00 mv r1,r11
8004138: f8 00 04 48 calli 8005258 <_Thread_Set_priority>
_ISR_Disable( level );
800413c: 90 00 60 00 rcsr r12,IE
8004140: 34 02 ff fe mvi r2,-2
8004144: a1 82 10 00 and r2,r12,r2
8004148: d0 02 00 00 wcsr IE,r2
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
800414c: 29 61 00 10 lw r1,(r11+16)
if ( state != STATES_TRANSIENT ) {
8004150: 34 04 00 04 mvi r4,4
8004154: 44 24 00 21 be r1,r4,80041d8 <_Thread_Change_priority+0xdc>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
8004158: a1 a4 68 00 and r13,r13,r4
800415c: 45 a0 00 0d be r13,r0,8004190 <_Thread_Change_priority+0x94><== ALWAYS TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
8004160: d0 0c 00 00 wcsr IE,r12 <== NOT EXECUTED
if ( _States_Is_waiting_on_thread_queue( state ) ) {
8004164: 78 02 00 03 mvhi r2,0x3 <== NOT EXECUTED
8004168: 38 42 be e0 ori r2,r2,0xbee0 <== NOT EXECUTED
800416c: a0 22 08 00 and r1,r1,r2 <== NOT EXECUTED
8004170: 5c 20 00 10 bne r1,r0,80041b0 <_Thread_Change_priority+0xb4><== NOT EXECUTED
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
8004174: 2b 9d 00 04 lw ra,(sp+4)
8004178: 2b 8b 00 14 lw r11,(sp+20)
800417c: 2b 8c 00 10 lw r12,(sp+16)
8004180: 2b 8d 00 0c lw r13,(sp+12)
8004184: 2b 8e 00 08 lw r14,(sp+8)
8004188: 37 9c 00 14 addi sp,sp,20
800418c: c3 a0 00 00 ret
*/
state = the_thread->current_state;
if ( state != STATES_TRANSIENT ) {
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
8004190: 34 02 ff fb mvi r2,-5
8004194: a0 22 10 00 and r2,r1,r2
8004198: 59 62 00 10 sw (r11+16),r2
_ISR_Enable( level );
800419c: d0 0c 00 00 wcsr IE,r12
if ( _States_Is_waiting_on_thread_queue( state ) ) {
80041a0: 78 02 00 03 mvhi r2,0x3
80041a4: 38 42 be e0 ori r2,r2,0xbee0
80041a8: a0 22 08 00 and r1,r1,r2
80041ac: 44 20 ff f2 be r1,r0,8004174 <_Thread_Change_priority+0x78>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
80041b0: 29 61 00 44 lw r1,(r11+68)
80041b4: b9 60 10 00 mv r2,r11
80041b8: f8 00 03 ed calli 800516c <_Thread_queue_Requeue>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
80041bc: 2b 9d 00 04 lw ra,(sp+4)
80041c0: 2b 8b 00 14 lw r11,(sp+20)
80041c4: 2b 8c 00 10 lw r12,(sp+16)
80041c8: 2b 8d 00 0c lw r13,(sp+12)
80041cc: 2b 8e 00 08 lw r14,(sp+8)
80041d0: 37 9c 00 14 addi sp,sp,20
80041d4: c3 a0 00 00 ret
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
80041d8: 21 ad 00 04 andi r13,r13,0x4
80041dc: 45 a0 00 3a be r13,r0,80042c4 <_Thread_Change_priority+0x1c8><== ALWAYS TAKEN
80041e0: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
80041e4: 38 21 e9 54 ori r1,r1,0xe954 <== NOT EXECUTED
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
80041e8: d0 0c 00 00 wcsr IE,r12
80041ec: d0 02 00 00 wcsr IE,r2
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
80041f0: 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;
80041f4: 78 02 08 01 mvhi r2,0x801
80041f8: 38 42 e8 30 ori r2,r2,0xe830
80041fc: 28 4e 00 00 lw r14,(r2+0)
8004200: 20 21 ff ff andi r1,r1,0xffff
8004204: 34 02 00 ff mvi r2,255
8004208: 54 22 00 49 bgu r1,r2,800432c <_Thread_Change_priority+0x230>
800420c: 78 0b 08 01 mvhi r11,0x801
8004210: 39 6b c8 24 ori r11,r11,0xc824
8004214: b5 61 08 00 add r1,r11,r1
8004218: 40 2d 00 00 lbu r13,(r1+0)
800421c: 35 ad 00 08 addi r13,r13,8
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
8004220: 78 02 08 01 mvhi r2,0x801
8004224: b5 ad 08 00 add r1,r13,r13
8004228: 38 42 e9 d0 ori r2,r2,0xe9d0
800422c: b4 41 10 00 add r2,r2,r1
8004230: 2c 41 00 00 lhu r1,(r2+0)
8004234: 34 02 00 ff mvi r2,255
8004238: 54 22 00 38 bgu r1,r2,8004318 <_Thread_Change_priority+0x21c>
800423c: b5 61 58 00 add r11,r11,r1
8004240: 41 6b 00 00 lbu r11,(r11+0)
8004244: 35 6b 00 08 addi r11,r11,8
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
8004248: 34 02 00 04 mvi r2,4
800424c: b9 a0 08 00 mv r1,r13
8004250: fb ff ef e8 calli 80001f0 <__ashlsi3>
8004254: b5 61 08 00 add r1,r11,r1
8004258: b4 21 10 00 add r2,r1,r1
800425c: b4 41 08 00 add r1,r2,r1
8004260: 34 02 00 02 mvi r2,2
8004264: fb ff ef e3 calli 80001f0 <__ashlsi3>
8004268: 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 );
800426c: 78 02 08 01 mvhi r2,0x801
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
8004270: 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 );
8004274: 38 42 e9 60 ori r2,r2,0xe960
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
8004278: 78 01 08 01 mvhi r1,0x801
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
800427c: 28 42 00 00 lw r2,(r2+0)
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
8004280: 38 21 e9 30 ori r1,r1,0xe930
8004284: 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() &&
8004288: 44 62 00 07 be r3,r2,80042a4 <_Thread_Change_priority+0x1a8>
_Thread_Executing->is_preemptible )
800428c: 40 41 00 75 lbu r1,(r2+117)
8004290: 44 20 00 05 be r1,r0,80042a4 <_Thread_Change_priority+0x1a8>
_Context_Switch_necessary = true;
8004294: 78 01 08 01 mvhi r1,0x801
8004298: 38 21 e9 70 ori r1,r1,0xe970
800429c: 34 02 00 01 mvi r2,1
80042a0: 30 22 00 00 sb (r1+0),r2
_ISR_Enable( level );
80042a4: d0 0c 00 00 wcsr IE,r12
}
80042a8: 2b 9d 00 04 lw ra,(sp+4)
80042ac: 2b 8b 00 14 lw r11,(sp+20)
80042b0: 2b 8c 00 10 lw r12,(sp+16)
80042b4: 2b 8d 00 0c lw r13,(sp+12)
80042b8: 2b 8e 00 08 lw r14,(sp+8)
80042bc: 37 9c 00 14 addi sp,sp,20
80042c0: c3 a0 00 00 ret
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
80042c4: 29 63 00 90 lw r3,(r11+144)
80042c8: 2d 64 00 96 lhu r4,(r11+150)
_Priority_Major_bit_map |= the_priority_map->ready_major;
80042cc: 78 01 08 01 mvhi r1,0x801
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
80042d0: 2c 65 00 00 lhu r5,(r3+0)
_Priority_Major_bit_map |= the_priority_map->ready_major;
80042d4: 38 21 e9 54 ori r1,r1,0xe954
* Interrupts are STILL disabled.
* We now know the thread will be in the READY state when we remove
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
80042d8: 59 6d 00 10 sw (r11+16),r13
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
80042dc: b8 a4 20 00 or r4,r5,r4
80042e0: 0c 64 00 00 sh (r3+0),r4
_Priority_Major_bit_map |= the_priority_map->ready_major;
80042e4: 2c 23 00 00 lhu r3,(r1+0)
80042e8: 2d 64 00 94 lhu r4,(r11+148)
80042ec: b8 83 18 00 or r3,r4,r3
80042f0: 20 63 ff ff andi r3,r3,0xffff
80042f4: 0c 23 00 00 sh (r1+0),r3
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
80042f8: 45 cd 00 14 be r14,r13,8004348 <_Thread_Change_priority+0x24c>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
80042fc: 29 63 00 8c lw r3,(r11+140)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
8004300: 28 64 00 00 lw r4,(r3+0)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
8004304: 59 63 00 04 sw (r11+4),r3
before_node = after_node->next;
after_node->next = the_node;
8004308: 58 6b 00 00 sw (r3+0),r11
the_node->next = before_node;
before_node->previous = the_node;
800430c: 58 8b 00 04 sw (r4+4),r11
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
8004310: 59 64 00 00 sw (r11+0),r4
8004314: e3 ff ff b5 bi 80041e8 <_Thread_Change_priority+0xec>
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
8004318: 34 02 00 08 mvi r2,8
800431c: fb ff ef dd calli 8000290 <__lshrsi3>
8004320: b5 61 08 00 add r1,r11,r1
8004324: 40 2b 00 00 lbu r11,(r1+0)
8004328: e3 ff ff c8 bi 8004248 <_Thread_Change_priority+0x14c>
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
800432c: 34 02 00 08 mvi r2,8
8004330: 78 0b 08 01 mvhi r11,0x801
8004334: fb ff ef d7 calli 8000290 <__lshrsi3>
8004338: 39 6b c8 24 ori r11,r11,0xc824
800433c: b5 61 08 00 add r1,r11,r1
8004340: 40 2d 00 00 lbu r13,(r1+0)
8004344: e3 ff ff b7 bi 8004220 <_Thread_Change_priority+0x124>
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
8004348: 29 63 00 8c lw r3,(r11+140)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
800434c: 34 64 00 04 addi r4,r3,4
8004350: 59 64 00 00 sw (r11+0),r4
old_last_node = the_chain->last;
8004354: 28 64 00 08 lw r4,(r3+8)
the_chain->last = the_node;
8004358: 58 6b 00 08 sw (r3+8),r11
old_last_node->next = the_node;
the_node->previous = old_last_node;
800435c: 59 64 00 04 sw (r11+4),r4
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
8004360: 58 8b 00 00 sw (r4+0),r11
8004364: e3 ff ff a1 bi 80041e8 <_Thread_Change_priority+0xec>
08009f00 <_Thread_Clear_state>:
)
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
8009f00: 90 00 18 00 rcsr r3,IE
8009f04: 34 05 ff fe mvi r5,-2
8009f08: a0 65 28 00 and r5,r3,r5
8009f0c: d0 05 00 00 wcsr IE,r5
current_state = the_thread->current_state;
8009f10: 28 24 00 10 lw r4,(r1+16)
if ( current_state & state ) {
8009f14: a0 44 30 00 and r6,r2,r4
8009f18: 44 c0 00 2a be r6,r0,8009fc0 <_Thread_Clear_state+0xc0>
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
8009f1c: a4 40 10 00 not r2,r2
8009f20: a0 44 20 00 and r4,r2,r4
current_state =
8009f24: 58 24 00 10 sw (r1+16),r4
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
8009f28: 5c 80 00 26 bne r4,r0,8009fc0 <_Thread_Clear_state+0xc0>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
8009f2c: 28 26 00 90 lw r6,(r1+144)
8009f30: 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);
8009f34: 28 24 00 8c lw r4,(r1+140)
8009f38: 2c c8 00 00 lhu r8,(r6+0)
_Priority_Major_bit_map |= the_priority_map->ready_major;
8009f3c: 78 02 08 01 mvhi r2,0x801
8009f40: 38 42 e9 54 ori r2,r2,0xe954
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
8009f44: b9 07 38 00 or r7,r8,r7
8009f48: 0c c7 00 00 sh (r6+0),r7
_Priority_Major_bit_map |= the_priority_map->ready_major;
8009f4c: 2c 47 00 00 lhu r7,(r2+0)
8009f50: 2c 28 00 94 lhu r8,(r1+148)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
8009f54: 34 86 00 04 addi r6,r4,4
8009f58: 58 26 00 00 sw (r1+0),r6
old_last_node = the_chain->last;
8009f5c: 28 86 00 08 lw r6,(r4+8)
8009f60: b9 07 38 00 or r7,r8,r7
the_chain->last = the_node;
8009f64: 58 81 00 08 sw (r4+8),r1
8009f68: 20 e4 ff ff andi r4,r7,0xffff
8009f6c: 0c 44 00 00 sh (r2+0),r4
old_last_node->next = the_node;
the_node->previous = old_last_node;
8009f70: 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;
8009f74: 58 c1 00 00 sw (r6+0),r1
_ISR_Flash( level );
8009f78: d0 03 00 00 wcsr IE,r3
8009f7c: 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 ) {
8009f80: 78 02 08 01 mvhi r2,0x801
8009f84: 38 42 e9 30 ori r2,r2,0xe930
8009f88: 28 44 00 00 lw r4,(r2+0)
8009f8c: 28 25 00 14 lw r5,(r1+20)
8009f90: 28 84 00 14 lw r4,(r4+20)
8009f94: 50 a4 00 0b bgeu r5,r4,8009fc0 <_Thread_Clear_state+0xc0>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
8009f98: 78 04 08 01 mvhi r4,0x801
8009f9c: 38 84 e9 60 ori r4,r4,0xe960
8009fa0: 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;
8009fa4: 58 41 00 00 sw (r2+0),r1
if ( _Thread_Executing->is_preemptible ||
8009fa8: 40 81 00 75 lbu r1,(r4+117)
8009fac: 44 20 00 07 be r1,r0,8009fc8 <_Thread_Clear_state+0xc8>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
8009fb0: 78 01 08 01 mvhi r1,0x801
8009fb4: 38 21 e9 70 ori r1,r1,0xe970
8009fb8: 34 02 00 01 mvi r2,1
8009fbc: 30 22 00 00 sb (r1+0),r2
}
}
}
_ISR_Enable( level );
8009fc0: d0 03 00 00 wcsr IE,r3
}
8009fc4: c3 a0 00 00 ret
* 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;
if ( _Thread_Executing->is_preemptible ||
8009fc8: 44 a1 ff fa be r5,r1,8009fb0 <_Thread_Clear_state+0xb0> <== NEVER TAKEN
8009fcc: e3 ff ff fd bi 8009fc0 <_Thread_Clear_state+0xc0>
0800c804 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
800c804: 37 9c ff f8 addi sp,sp,-8
800c808: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
800c80c: 37 82 00 08 addi r2,sp,8
800c810: f8 00 00 a5 calli 800caa4 <_Thread_Get>
switch ( location ) {
800c814: 2b 82 00 08 lw r2,(sp+8)
800c818: 5c 40 00 09 bne r2,r0,800c83c <_Thread_Delay_ended+0x38> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
800c81c: 78 02 10 00 mvhi r2,0x1000
800c820: 38 42 00 18 ori r2,r2,0x18
800c824: fb ff ff 4b calli 800c550 <_Thread_Clear_state>
800c828: 78 01 08 02 mvhi r1,0x802
800c82c: 38 21 ba 34 ori r1,r1,0xba34
800c830: 28 22 00 00 lw r2,(r1+0)
800c834: 34 42 ff ff addi r2,r2,-1
800c838: 58 22 00 00 sw (r1+0),r2
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
800c83c: 2b 9d 00 04 lw ra,(sp+4)
800c840: 37 9c 00 08 addi sp,sp,8
800c844: c3 a0 00 00 ret
0800454c <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
800454c: 37 9c ff b4 addi sp,sp,-76
8004550: 5b 8b 00 3c sw (sp+60),r11
8004554: 5b 8c 00 38 sw (sp+56),r12
8004558: 5b 8d 00 34 sw (sp+52),r13
800455c: 5b 8e 00 30 sw (sp+48),r14
8004560: 5b 8f 00 2c sw (sp+44),r15
8004564: 5b 90 00 28 sw (sp+40),r16
8004568: 5b 91 00 24 sw (sp+36),r17
800456c: 5b 92 00 20 sw (sp+32),r18
8004570: 5b 93 00 1c sw (sp+28),r19
8004574: 5b 94 00 18 sw (sp+24),r20
8004578: 5b 95 00 14 sw (sp+20),r21
800457c: 5b 96 00 10 sw (sp+16),r22
8004580: 5b 97 00 0c sw (sp+12),r23
8004584: 5b 98 00 08 sw (sp+8),r24
8004588: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
800458c: 78 0e 08 01 mvhi r14,0x801
8004590: 39 ce e9 60 ori r14,r14,0xe960
8004594: 29 cc 00 00 lw r12,(r14+0)
_ISR_Disable( level );
8004598: 90 00 08 00 rcsr r1,IE
800459c: 34 02 ff fe mvi r2,-2
80045a0: a0 22 10 00 and r2,r1,r2
80045a4: d0 02 00 00 wcsr IE,r2
while ( _Context_Switch_necessary == true ) {
80045a8: 78 0d 08 01 mvhi r13,0x801
80045ac: 39 ad e9 70 ori r13,r13,0xe970
80045b0: 41 a2 00 00 lbu r2,(r13+0)
80045b4: 44 40 00 3d be r2,r0,80046a8 <_Thread_Dispatch+0x15c>
80045b8: 78 11 08 01 mvhi r17,0x801
80045bc: 78 15 08 01 mvhi r21,0x801
80045c0: 78 0f 08 01 mvhi r15,0x801
80045c4: 78 14 08 01 mvhi r20,0x801
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
80045c8: 78 18 08 01 mvhi r24,0x801
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
80045cc: ba 20 b8 00 mv r23,r17
80045d0: 3a b5 e9 30 ori r21,r21,0xe930
80045d4: 39 ef e8 a4 ori r15,r15,0xe8a4
80045d8: 3a 94 e9 2c ori r20,r20,0xe92c
#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;
80045dc: 3b 18 e8 34 ori r24,r24,0xe834
80045e0: 37 93 00 48 addi r19,sp,72
80045e4: 37 92 00 40 addi r18,sp,64
80045e8: 3a 31 e9 68 ori r17,r17,0xe968
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
80045ec: 34 10 00 01 mvi r16,1
#endif
#endif
executing = _Thread_Executing;
_ISR_Disable( level );
80045f0: 34 16 ff fe mvi r22,-2
80045f4: e0 00 00 23 bi 8004680 <_Thread_Dispatch+0x134>
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;
_ISR_Enable( level );
80045f8: d0 01 00 00 wcsr IE,r1
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
80045fc: ba 60 08 00 mv r1,r19
8004600: f8 00 14 3c calli 80096f0 <_TOD_Get_uptime>
_Timestamp_Subtract(
8004604: ba e0 08 00 mv r1,r23
8004608: ba 40 18 00 mv r3,r18
800460c: 38 21 e9 68 ori r1,r1,0xe968
8004610: ba 60 10 00 mv r2,r19
8004614: f8 00 04 7b calli 8005800 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
8004618: ba 40 10 00 mv r2,r18
800461c: 35 81 00 84 addi r1,r12,132
8004620: f8 00 04 63 calli 80057ac <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
8004624: 2b 83 00 48 lw r3,(sp+72)
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
8004628: 2a 84 00 00 lw r4,(r20+0)
executing->libc_reent = *_Thread_libc_reent;
*_Thread_libc_reent = heir->libc_reent;
}
_User_extensions_Thread_switch( executing, heir );
800462c: b9 80 08 00 mv r1,r12
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
8004630: 5a 23 00 00 sw (r17+0),r3
8004634: 2b 83 00 4c lw r3,(sp+76)
if ( _Thread_libc_reent ) {
executing->libc_reent = *_Thread_libc_reent;
*_Thread_libc_reent = heir->libc_reent;
}
_User_extensions_Thread_switch( executing, heir );
8004638: b9 60 10 00 mv r2,r11
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
800463c: 5a 23 00 04 sw (r17+4),r3
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
8004640: 44 80 00 05 be r4,r0,8004654 <_Thread_Dispatch+0x108> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
8004644: 28 83 00 00 lw r3,(r4+0)
8004648: 59 83 01 24 sw (r12+292),r3
*_Thread_libc_reent = heir->libc_reent;
800464c: 29 63 01 24 lw r3,(r11+292)
8004650: 58 83 00 00 sw (r4+0),r3
}
_User_extensions_Thread_switch( executing, heir );
8004654: f8 00 05 65 calli 8005be8 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
8004658: 35 81 00 d0 addi r1,r12,208
800465c: 35 62 00 d0 addi r2,r11,208
8004660: f8 00 06 97 calli 80060bc <_CPU_Context_switch>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
8004664: 29 cc 00 00 lw r12,(r14+0)
_ISR_Disable( level );
8004668: 90 00 20 00 rcsr r4,IE
800466c: a0 96 08 00 and r1,r4,r22
8004670: d0 01 00 00 wcsr IE,r1
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
8004674: 41 a2 00 00 lbu r2,(r13+0)
8004678: b8 80 08 00 mv r1,r4
800467c: 44 40 00 0e be r2,r0,80046b4 <_Thread_Dispatch+0x168>
heir = _Thread_Heir;
8004680: 2a ab 00 00 lw r11,(r21+0)
_Thread_Dispatch_disable_level = 1;
8004684: 59 f0 00 00 sw (r15+0),r16
_Context_Switch_necessary = false;
8004688: 34 02 00 00 mvi r2,0
_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 )
800468c: 29 63 00 7c lw r3,(r11+124)
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
8004690: 31 a2 00 00 sb (r13+0),r2
_Thread_Executing = heir;
8004694: 59 cb 00 00 sw (r14+0),r11
#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 )
8004698: 5c 70 ff d8 bne r3,r16,80045f8 <_Thread_Dispatch+0xac>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
800469c: 2b 02 00 00 lw r2,(r24+0)
80046a0: 59 62 00 78 sw (r11+120),r2
80046a4: e3 ff ff d5 bi 80045f8 <_Thread_Dispatch+0xac>
80046a8: 78 0f 08 01 mvhi r15,0x801
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
80046ac: b8 20 20 00 mv r4,r1
80046b0: 39 ef e8 a4 ori r15,r15,0xe8a4
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
80046b4: 34 02 00 00 mvi r2,0
80046b8: 59 e2 00 00 sw (r15+0),r2
_ISR_Enable( level );
80046bc: d0 04 00 00 wcsr IE,r4
if ( _Thread_Do_post_task_switch_extension ||
80046c0: 78 01 08 01 mvhi r1,0x801
80046c4: 38 21 e9 44 ori r1,r1,0xe944
80046c8: 28 21 00 00 lw r1,(r1+0)
80046cc: 5c 20 00 03 bne r1,r0,80046d8 <_Thread_Dispatch+0x18c>
executing->do_post_task_switch_extension ) {
80046d0: 41 82 00 74 lbu r2,(r12+116)
80046d4: 44 41 00 04 be r2,r1,80046e4 <_Thread_Dispatch+0x198>
executing->do_post_task_switch_extension = false;
80046d8: 34 01 00 00 mvi r1,0
80046dc: 31 81 00 74 sb (r12+116),r1
_API_extensions_Run_postswitch();
80046e0: fb ff f9 4e calli 8002c18 <_API_extensions_Run_postswitch>
}
}
80046e4: 2b 9d 00 04 lw ra,(sp+4)
80046e8: 2b 8b 00 3c lw r11,(sp+60)
80046ec: 2b 8c 00 38 lw r12,(sp+56)
80046f0: 2b 8d 00 34 lw r13,(sp+52)
80046f4: 2b 8e 00 30 lw r14,(sp+48)
80046f8: 2b 8f 00 2c lw r15,(sp+44)
80046fc: 2b 90 00 28 lw r16,(sp+40)
8004700: 2b 91 00 24 lw r17,(sp+36)
8004704: 2b 92 00 20 lw r18,(sp+32)
8004708: 2b 93 00 1c lw r19,(sp+28)
800470c: 2b 94 00 18 lw r20,(sp+24)
8004710: 2b 95 00 14 lw r21,(sp+20)
8004714: 2b 96 00 10 lw r22,(sp+16)
8004718: 2b 97 00 0c lw r23,(sp+12)
800471c: 2b 98 00 08 lw r24,(sp+8)
8004720: 37 9c 00 4c addi sp,sp,76
8004724: c3 a0 00 00 ret
0800c4cc <_Thread_Evaluate_mode>:
bool _Thread_Evaluate_mode( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
800c4cc: 78 01 08 01 mvhi r1,0x801
800c4d0: 38 21 e9 60 ori r1,r1,0xe960
800c4d4: 28 21 00 00 lw r1,(r1+0)
if ( !_States_Is_ready( executing->current_state ) ||
800c4d8: 28 22 00 10 lw r2,(r1+16)
800c4dc: 5c 40 00 07 bne r2,r0,800c4f8 <_Thread_Evaluate_mode+0x2c> <== NEVER TAKEN
800c4e0: 78 02 08 01 mvhi r2,0x801
800c4e4: 38 42 e9 30 ori r2,r2,0xe930
800c4e8: 28 42 00 00 lw r2,(r2+0)
800c4ec: 44 22 00 09 be r1,r2,800c510 <_Thread_Evaluate_mode+0x44>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
800c4f0: 40 21 00 75 lbu r1,(r1+117)
800c4f4: 44 20 00 07 be r1,r0,800c510 <_Thread_Evaluate_mode+0x44> <== NEVER TAKEN
_Context_Switch_necessary = true;
800c4f8: 78 01 08 01 mvhi r1,0x801
800c4fc: 38 21 e9 70 ori r1,r1,0xe970
800c500: 34 02 00 01 mvi r2,1
800c504: 30 22 00 00 sb (r1+0),r2
800c508: b8 40 08 00 mv r1,r2
return true;
800c50c: c3 a0 00 00 ret
800c510: 34 01 00 00 mvi r1,0
}
return false;
}
800c514: c3 a0 00 00 ret
0800475c <_Thread_Get>:
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
800475c: 37 9c ff ec addi sp,sp,-20
8004760: 5b 8b 00 14 sw (sp+20),r11
8004764: 5b 8c 00 10 sw (sp+16),r12
8004768: 5b 8d 00 0c sw (sp+12),r13
800476c: 5b 8e 00 08 sw (sp+8),r14
8004770: 5b 9d 00 04 sw (sp+4),ra
8004774: b8 20 58 00 mv r11,r1
8004778: b8 40 60 00 mv r12,r2
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
800477c: 44 20 00 2b be r1,r0,8004828 <_Thread_Get+0xcc>
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
8004780: 34 02 00 18 mvi r2,24
8004784: fb ff ee c3 calli 8000290 <__lshrsi3>
8004788: 20 2d 00 07 andi r13,r1,0x7
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
800478c: 35 a1 ff ff addi r1,r13,-1
8004790: 34 02 00 03 mvi r2,3
8004794: 50 41 00 0b bgeu r2,r1,80047c0 <_Thread_Get+0x64>
goto done;
}
the_api = _Objects_Get_API( id );
if ( !_Objects_Is_api_valid( the_api ) ) {
*location = OBJECTS_ERROR;
8004798: 34 01 00 01 mvi r1,1
800479c: 59 81 00 00 sw (r12+0),r1
80047a0: 34 01 00 00 mvi r1,0
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
80047a4: 2b 9d 00 04 lw ra,(sp+4)
80047a8: 2b 8b 00 14 lw r11,(sp+20)
80047ac: 2b 8c 00 10 lw r12,(sp+16)
80047b0: 2b 8d 00 0c lw r13,(sp+12)
80047b4: 2b 8e 00 08 lw r14,(sp+8)
80047b8: 37 9c 00 14 addi sp,sp,20
80047bc: c3 a0 00 00 ret
*location = OBJECTS_ERROR;
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
80047c0: b9 60 08 00 mv r1,r11
80047c4: 34 02 00 1b mvi r2,27
80047c8: fb ff ee b2 calli 8000290 <__lshrsi3>
80047cc: b8 20 70 00 mv r14,r1
80047d0: 34 01 00 01 mvi r1,1
80047d4: 5d c1 00 25 bne r14,r1,8004868 <_Thread_Get+0x10c> <== NEVER TAKEN
*location = OBJECTS_ERROR;
goto done;
}
api_information = _Objects_Information_table[ the_api ];
80047d8: b9 a0 08 00 mv r1,r13
80047dc: 34 02 00 02 mvi r2,2
80047e0: 78 0d 08 01 mvhi r13,0x801
80047e4: fb ff ee 83 calli 80001f0 <__ashlsi3>
80047e8: 39 ad e8 3c ori r13,r13,0xe83c
80047ec: b5 a1 08 00 add r1,r13,r1
80047f0: 28 22 00 00 lw r2,(r1+0)
if ( !api_information ) {
80047f4: 44 40 00 28 be r2,r0,8004894 <_Thread_Get+0x138> <== NEVER TAKEN
*location = OBJECTS_ERROR;
goto done;
}
information = api_information[ the_class ];
80047f8: 28 41 00 04 lw r1,(r2+4)
if ( !information ) {
80047fc: 44 20 00 24 be r1,r0,800488c <_Thread_Get+0x130>
*location = OBJECTS_ERROR;
goto done;
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
8004800: b9 60 10 00 mv r2,r11
8004804: b9 80 18 00 mv r3,r12
8004808: f8 00 15 3b calli 8009cf4 <_Objects_Get>
done:
return tp;
}
800480c: 2b 9d 00 04 lw ra,(sp+4)
8004810: 2b 8b 00 14 lw r11,(sp+20)
8004814: 2b 8c 00 10 lw r12,(sp+16)
8004818: 2b 8d 00 0c lw r13,(sp+12)
800481c: 2b 8e 00 08 lw r14,(sp+8)
8004820: 37 9c 00 14 addi sp,sp,20
8004824: c3 a0 00 00 ret
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8004828: 78 01 08 01 mvhi r1,0x801
800482c: 38 21 e8 a4 ori r1,r1,0xe8a4
8004830: 28 22 00 00 lw r2,(r1+0)
8004834: 34 42 00 01 addi r2,r2,1
8004838: 58 22 00 00 sw (r1+0),r2
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
tp = _Thread_Executing;
800483c: 78 01 08 01 mvhi r1,0x801
8004840: 38 21 e9 60 ori r1,r1,0xe960
8004844: 28 21 00 00 lw r1,(r1+0)
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
8004848: 59 8b 00 00 sw (r12+0),r11
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
800484c: 2b 9d 00 04 lw ra,(sp+4)
8004850: 2b 8b 00 14 lw r11,(sp+20)
8004854: 2b 8c 00 10 lw r12,(sp+16)
8004858: 2b 8d 00 0c lw r13,(sp+12)
800485c: 2b 8e 00 08 lw r14,(sp+8)
8004860: 37 9c 00 14 addi sp,sp,20
8004864: c3 a0 00 00 ret
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
*location = OBJECTS_ERROR;
8004868: 59 81 00 00 sw (r12+0),r1 <== NOT EXECUTED
800486c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
8004870: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8004874: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED
8004878: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED
800487c: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED
8004880: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED
8004884: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
8004888: c3 a0 00 00 ret <== NOT EXECUTED
goto done;
}
information = api_information[ the_class ];
if ( !information ) {
*location = OBJECTS_ERROR;
800488c: 59 8e 00 00 sw (r12+0),r14
goto done;
8004890: e3 ff ff df bi 800480c <_Thread_Get+0xb0>
goto done;
}
api_information = _Objects_Information_table[ the_api ];
if ( !api_information ) {
*location = OBJECTS_ERROR;
8004894: 59 8e 00 00 sw (r12+0),r14 <== NOT EXECUTED
8004898: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
goto done;
800489c: e3 ff ff dc bi 800480c <_Thread_Get+0xb0> <== NOT EXECUTED
0800c518 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
800c518: 37 9c ff f4 addi sp,sp,-12
800c51c: 5b 8b 00 0c sw (sp+12),r11
800c520: 5b 8c 00 08 sw (sp+8),r12
800c524: 5b 9d 00 04 sw (sp+4),ra
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
800c528: 78 01 08 01 mvhi r1,0x801
800c52c: 38 21 e9 60 ori r1,r1,0xe960
800c530: 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;
800c534: 29 61 00 b8 lw r1,(r11+184)
_ISR_Set_level(level);
800c538: 64 21 00 00 cmpei r1,r1,0
800c53c: d0 01 00 00 wcsr IE,r1
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
800c540: 78 02 08 01 mvhi r2,0x801
800c544: 38 42 e6 ac ori r2,r2,0xe6ac
800c548: 40 4c 00 00 lbu r12,(r2+0)
doneConstructors = 1;
800c54c: 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 );
800c550: 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;
800c554: 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 );
800c558: fb ff e5 04 calli 8005968 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
800c55c: fb ff e0 73 calli 8004728 <_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) */ {
800c560: 45 80 00 0b be r12,r0,800c58c <_Thread_Handler+0x74>
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
800c564: 29 61 00 a0 lw r1,(r11+160)
800c568: 44 20 00 0c be r1,r0,800c598 <_Thread_Handler+0x80>
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
800c56c: 34 02 00 01 mvi r2,1
800c570: 44 22 00 0f be r1,r2,800c5ac <_Thread_Handler+0x94> <== ALWAYS TAKEN
* 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 );
800c574: b9 60 08 00 mv r1,r11
800c578: fb ff e5 13 calli 80059c4 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
800c57c: 34 01 00 00 mvi r1,0
800c580: 34 02 00 01 mvi r2,1
800c584: 34 03 00 06 mvi r3,6
800c588: fb ff dc 73 calli 8003754 <_Internal_error_Occurred>
* _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) */ {
INIT_NAME ();
800c58c: fb ff ce 9d calli 8000000 <RamBase>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
800c590: 29 61 00 a0 lw r1,(r11+160)
800c594: 5c 20 ff f6 bne r1,r0,800c56c <_Thread_Handler+0x54>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
800c598: 29 62 00 9c lw r2,(r11+156)
800c59c: 29 61 00 a8 lw r1,(r11+168)
800c5a0: d8 40 00 00 call r2
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
800c5a4: 59 61 00 28 sw (r11+40),r1
800c5a8: e3 ff ff f3 bi 800c574 <_Thread_Handler+0x5c>
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
800c5ac: 29 62 00 9c lw r2,(r11+156)
800c5b0: 29 61 00 a4 lw r1,(r11+164)
800c5b4: 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 =
800c5b8: 59 61 00 28 sw (r11+40),r1
800c5bc: e3 ff ff ee bi 800c574 <_Thread_Handler+0x5c>
08004ae0 <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
8004ae0: 37 9c ff f0 addi sp,sp,-16
8004ae4: 5b 8b 00 10 sw (sp+16),r11
8004ae8: 5b 8c 00 0c sw (sp+12),r12
8004aec: 5b 8d 00 08 sw (sp+8),r13
8004af0: 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;
8004af4: 78 01 08 01 mvhi r1,0x801
8004af8: 38 21 e0 c4 ori r1,r1,0xe0c4
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
8004afc: 28 22 00 20 lw r2,(r1+32)
8004b00: 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;
8004b04: 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)
8004b08: 64 42 00 00 cmpei r2,r2,0
8004b0c: 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;
8004b10: 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)
8004b14: 99 22 48 00 xor r9,r9,r2
8004b18: b9 20 58 00 mv r11,r9
8004b1c: 5d 20 00 37 bne r9,r0,8004bf8 <_Thread_Handler_initialization+0x118><== NEVER TAKEN
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
8004b20: 78 0c 08 01 mvhi r12,0x801
8004b24: 39 8c e0 c0 ori r12,r12,0xe0c0
8004b28: 41 81 00 00 lbu r1,(r12+0)
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
8004b2c: 78 08 08 01 mvhi r8,0x801
_Thread_Executing = NULL;
8004b30: 78 05 08 01 mvhi r5,0x801
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
8004b34: 34 21 00 01 addi r1,r1,1
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
_Thread_Executing = NULL;
_Thread_Heir = NULL;
8004b38: 78 04 08 01 mvhi r4,0x801
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
8004b3c: 78 03 08 01 mvhi r3,0x801
_Thread_Maximum_extensions = maximum_extensions;
8004b40: 78 07 08 01 mvhi r7,0x801
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
8004b44: 78 06 08 01 mvhi r6,0x801
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
_Thread_Executing = NULL;
_Thread_Heir = NULL;
8004b48: 38 84 e9 30 ori r4,r4,0xe930
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
8004b4c: 38 63 e9 44 ori r3,r3,0xe944
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
8004b50: 38 c6 e8 34 ori r6,r6,0xe834
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
8004b54: 39 08 e9 70 ori r8,r8,0xe970
_Thread_Executing = NULL;
8004b58: 38 a5 e9 60 ori r5,r5,0xe960
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
8004b5c: 38 e7 e9 40 ori r7,r7,0xe940
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
8004b60: 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;
8004b64: 58 ca 00 00 sw (r6+0),r10
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
_Thread_Executing = NULL;
_Thread_Heir = NULL;
8004b68: 58 89 00 00 sw (r4+0),r9
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
8004b6c: 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(
8004b70: b4 41 08 00 add r1,r2,r1
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
8004b74: 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(
8004b78: 34 02 00 02 mvi r2,2
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
8004b7c: 58 ed 00 00 sw (r7+0),r13
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
_Thread_Executing = NULL;
8004b80: 58 a9 00 00 sw (r5+0),r9
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
8004b84: fb ff ed 9b calli 80001f0 <__ashlsi3>
8004b88: f8 00 05 0c calli 8005fb8 <_Workspace_Allocate_or_fatal_error>
8004b8c: 78 03 08 01 mvhi r3,0x801
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
8004b90: 41 84 00 00 lbu r4,(r12+0)
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
8004b94: 38 63 e8 30 ori r3,r3,0xe830
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
8004b98: b9 60 10 00 mv r2,r11
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
8004b9c: 58 61 00 00 sw (r3+0),r1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
8004ba0: 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);
8004ba4: 34 23 00 04 addi r3,r1,4
8004ba8: 58 23 00 00 sw (r1+0),r3
the_chain->permanent_null = NULL;
8004bac: 58 26 00 04 sw (r1+4),r6
the_chain->last = _Chain_Head(the_chain);
8004bb0: 58 21 00 08 sw (r1+8),r1
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
8004bb4: 34 42 00 01 addi r2,r2,1
8004bb8: 34 21 00 0c addi r1,r1,12
8004bbc: 50 82 ff fa bgeu r4,r2,8004ba4 <_Thread_Handler_initialization+0xc4>
/*
* Initialize this class of objects.
*/
_Objects_Initialize_information(
8004bc0: 34 02 00 01 mvi r2,1
8004bc4: 78 01 08 01 mvhi r1,0x801
8004bc8: 38 21 ea 00 ori r1,r1,0xea00
8004bcc: b8 40 18 00 mv r3,r2
8004bd0: b8 40 20 00 mv r4,r2
8004bd4: 34 05 01 3c mvi r5,316
8004bd8: 34 07 00 08 mvi r7,8
8004bdc: fb ff fc 84 calli 8003dec <_Objects_Initialize_information>
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
8004be0: 2b 9d 00 04 lw ra,(sp+4)
8004be4: 2b 8b 00 10 lw r11,(sp+16)
8004be8: 2b 8c 00 0c lw r12,(sp+12)
8004bec: 2b 8d 00 08 lw r13,(sp+8)
8004bf0: 37 9c 00 10 addi sp,sp,16
8004bf4: c3 a0 00 00 ret
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
== (!Configuration.stack_free_hook) ) )
_Internal_error_Occurred(
8004bf8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8004bfc: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8004c00: 34 03 00 0f mvi r3,15 <== NOT EXECUTED
8004c04: fb ff fa d4 calli 8003754 <_Internal_error_Occurred> <== NOT EXECUTED
080048a0 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
80048a0: 37 9c ff cc addi sp,sp,-52
80048a4: 5b 8b 00 2c sw (sp+44),r11
80048a8: 5b 8c 00 28 sw (sp+40),r12
80048ac: 5b 8d 00 24 sw (sp+36),r13
80048b0: 5b 8e 00 20 sw (sp+32),r14
80048b4: 5b 8f 00 1c sw (sp+28),r15
80048b8: 5b 90 00 18 sw (sp+24),r16
80048bc: 5b 91 00 14 sw (sp+20),r17
80048c0: 5b 92 00 10 sw (sp+16),r18
80048c4: 5b 93 00 0c sw (sp+12),r19
80048c8: 5b 94 00 08 sw (sp+8),r20
80048cc: 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;
80048d0: 34 05 00 00 mvi r5,0
80048d4: 58 45 01 28 sw (r2+296),r5
80048d8: 58 45 01 2c sw (r2+300),r5
80048dc: 58 45 01 30 sw (r2+304),r5
extensions_area = NULL;
the_thread->libc_reent = NULL;
80048e0: 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
)
{
80048e4: b8 40 58 00 mv r11,r2
80048e8: b8 20 98 00 mv r19,r1
80048ec: b8 c0 80 00 mv r16,r6
80048f0: b9 00 90 00 mv r18,r8
80048f4: 20 f4 00 ff andi r20,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 ) {
80048f8: 44 65 00 69 be r3,r5,8004a9c <_Thread_Initialize+0x1fc>
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = true;
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
80048fc: 30 45 00 c0 sb (r2+192),r5
8004900: b8 80 28 00 mv r5,r4
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
8004904: 34 0c 00 00 mvi r12,0
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
8004908: 78 0d 08 01 mvhi r13,0x801
the_watchdog->routine = routine;
the_watchdog->id = id;
800490c: 59 6c 00 68 sw (r11+104),r12
8004910: 39 ad e9 40 ori r13,r13,0xe940
8004914: 29 a2 00 00 lw r2,(r13+0)
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
8004918: 59 63 00 c8 sw (r11+200),r3
the_stack->size = size;
800491c: 59 65 00 c4 sw (r11+196),r5
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
8004920: 59 6c 00 50 sw (r11+80),r12
the_watchdog->routine = routine;
8004924: 59 6c 00 64 sw (r11+100),r12
the_watchdog->id = id;
the_watchdog->user_data = user_data;
8004928: 59 6c 00 6c sw (r11+108),r12
800492c: 5c 4c 00 48 bne r2,r12,8004a4c <_Thread_Initialize+0x1ac>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
8004930: 59 62 01 34 sw (r11+308),r2
8004934: b8 40 88 00 mv r17,r2
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
8004938: 2b 81 00 38 lw r1,(sp+56)
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
800493c: 31 74 00 ac sb (r11+172),r20
the_thread->Start.budget_algorithm = budget_algorithm;
8004940: 59 72 00 b0 sw (r11+176),r18
the_thread->Start.budget_callout = budget_callout;
8004944: 59 61 00 b4 sw (r11+180),r1
switch ( budget_algorithm ) {
8004948: 34 01 00 02 mvi r1,2
800494c: 5e 41 00 05 bne r18,r1,8004960 <_Thread_Initialize+0xc0>
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;
8004950: 78 02 08 01 mvhi r2,0x801
8004954: 38 42 e8 34 ori r2,r2,0xe834
8004958: 28 42 00 00 lw r2,(r2+0)
800495c: 59 62 00 78 sw (r11+120),r2
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
8004960: 2b 81 00 3c lw r1,(sp+60)
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
8004964: 34 0c 00 00 mvi r12,0
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
8004968: 34 0d 00 01 mvi r13,1
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
800496c: 59 61 00 b8 sw (r11+184),r1
#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 );
8004970: ba 00 10 00 mv r2,r16
8004974: b9 60 08 00 mv r1,r11
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
8004978: 59 6d 00 10 sw (r11+16),r13
the_thread->Wait.queue = NULL;
800497c: 59 6c 00 44 sw (r11+68),r12
the_thread->resource_count = 0;
8004980: 59 6c 00 1c sw (r11+28),r12
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
8004984: 59 70 00 18 sw (r11+24),r16
the_thread->Start.initial_priority = priority;
8004988: 59 70 00 bc sw (r11+188),r16
_Thread_Set_priority( the_thread, priority );
800498c: f8 00 02 33 calli 8005258 <_Thread_Set_priority>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8004990: 29 61 00 08 lw r1,(r11+8)
8004994: 2a 6e 00 1c lw r14,(r19+28)
8004998: 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 );
800499c: 59 6c 00 88 sw (r11+136),r12
80049a0: 59 6c 00 84 sw (r11+132),r12
80049a4: 20 21 ff ff andi r1,r1,0xffff
80049a8: fb ff ee 12 calli 80001f0 <__ashlsi3>
80049ac: b5 c1 08 00 add r1,r14,r1
80049b0: 58 2b 00 00 sw (r1+0),r11
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
80049b4: 2b 81 00 40 lw r1,(sp+64)
80049b8: 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 );
80049bc: b9 60 08 00 mv r1,r11
80049c0: f8 00 04 35 calli 8005a94 <_User_extensions_Thread_create>
if ( extension_status )
80049c4: b9 a0 20 00 mv r4,r13
80049c8: 5c 2c 00 13 bne r1,r12,8004a14 <_Thread_Initialize+0x174>
return true;
failed:
if ( the_thread->libc_reent )
80049cc: 29 61 01 24 lw r1,(r11+292)
80049d0: 44 20 00 02 be r1,r0,80049d8 <_Thread_Initialize+0x138>
_Workspace_Free( the_thread->libc_reent );
80049d4: f8 00 05 93 calli 8006020 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
80049d8: 29 61 01 28 lw r1,(r11+296)
80049dc: 44 20 00 02 be r1,r0,80049e4 <_Thread_Initialize+0x144>
_Workspace_Free( the_thread->API_Extensions[i] );
80049e0: f8 00 05 90 calli 8006020 <_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] )
80049e4: 29 61 01 2c lw r1,(r11+300)
80049e8: 44 20 00 02 be r1,r0,80049f0 <_Thread_Initialize+0x150>
_Workspace_Free( the_thread->API_Extensions[i] );
80049ec: f8 00 05 8d calli 8006020 <_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] )
80049f0: 29 61 01 30 lw r1,(r11+304)
80049f4: 44 20 00 02 be r1,r0,80049fc <_Thread_Initialize+0x15c> <== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
80049f8: f8 00 05 8a calli 8006020 <_Workspace_Free> <== NOT EXECUTED
if ( extensions_area )
80049fc: 46 20 00 03 be r17,r0,8004a08 <_Thread_Initialize+0x168>
(void) _Workspace_Free( extensions_area );
8004a00: ba 20 08 00 mv r1,r17
8004a04: f8 00 05 87 calli 8006020 <_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 );
8004a08: b9 60 08 00 mv r1,r11
8004a0c: f8 00 03 03 calli 8005618 <_Thread_Stack_Free>
8004a10: 34 04 00 00 mvi r4,0
return false;
}
8004a14: b8 80 08 00 mv r1,r4
8004a18: 2b 9d 00 04 lw ra,(sp+4)
8004a1c: 2b 8b 00 2c lw r11,(sp+44)
8004a20: 2b 8c 00 28 lw r12,(sp+40)
8004a24: 2b 8d 00 24 lw r13,(sp+36)
8004a28: 2b 8e 00 20 lw r14,(sp+32)
8004a2c: 2b 8f 00 1c lw r15,(sp+28)
8004a30: 2b 90 00 18 lw r16,(sp+24)
8004a34: 2b 91 00 14 lw r17,(sp+20)
8004a38: 2b 92 00 10 lw r18,(sp+16)
8004a3c: 2b 93 00 0c lw r19,(sp+12)
8004a40: 2b 94 00 08 lw r20,(sp+8)
8004a44: 37 9c 00 34 addi sp,sp,52
8004a48: c3 a0 00 00 ret
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
8004a4c: 34 41 00 01 addi r1,r2,1
8004a50: 34 02 00 02 mvi r2,2
8004a54: fb ff ed e7 calli 80001f0 <__ashlsi3>
8004a58: f8 00 05 67 calli 8005ff4 <_Workspace_Allocate>
8004a5c: b8 20 88 00 mv r17,r1
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
8004a60: 44 2c ff db be r1,r12,80049cc <_Thread_Initialize+0x12c>
* 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++ )
8004a64: 29 af 00 00 lw r15,(r13+0)
8004a68: b9 80 08 00 mv r1,r12
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
8004a6c: 59 71 01 34 sw (r11+308),r17
8004a70: ba 20 68 00 mv r13,r17
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
8004a74: b9 80 70 00 mv r14,r12
8004a78: 34 02 00 02 mvi r2,2
8004a7c: fb ff ed dd calli 80001f0 <__ashlsi3>
8004a80: b5 a1 18 00 add r3,r13,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++ )
8004a84: 35 8c 00 01 addi r12,r12,1
the_thread->extensions[i] = NULL;
8004a88: 58 6e 00 00 sw (r3+0),r14
* 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++ )
8004a8c: b9 80 08 00 mv r1,r12
8004a90: 55 8f ff aa bgu r12,r15,8004938 <_Thread_Initialize+0x98>
8004a94: 29 6d 01 34 lw r13,(r11+308)
8004a98: e3 ff ff f8 bi 8004a78 <_Thread_Initialize+0x1d8>
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
8004a9c: b8 40 08 00 mv r1,r2
8004aa0: b8 80 10 00 mv r2,r4
8004aa4: 5b 83 00 34 sw (sp+52),r3
8004aa8: 5b 84 00 30 sw (sp+48),r4
8004aac: f8 00 02 b5 calli 8005580 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
8004ab0: 2b 84 00 30 lw r4,(sp+48)
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
8004ab4: b8 20 28 00 mv r5,r1
if ( !actual_stack_size || actual_stack_size < stack_size )
8004ab8: 2b 83 00 34 lw r3,(sp+52)
8004abc: f4 81 10 00 cmpgu r2,r4,r1
8004ac0: 64 21 00 00 cmpei r1,r1,0
8004ac4: b8 60 20 00 mv r4,r3
8004ac8: b8 41 08 00 or r1,r2,r1
8004acc: 5c 23 ff d2 bne r1,r3,8004a14 <_Thread_Initialize+0x174>
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = true;
8004ad0: 34 01 00 01 mvi r1,1
8004ad4: 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;
8004ad8: 29 63 00 cc lw r3,(r11+204)
8004adc: e3 ff ff 8a bi 8004904 <_Thread_Initialize+0x64>
0800621c <_Thread_Restart>:
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
800621c: 37 9c ff f0 addi sp,sp,-16
8006220: 5b 8b 00 08 sw (sp+8),r11
8006224: 5b 9d 00 04 sw (sp+4),ra
if ( !_States_Is_dormant( the_thread->current_state ) ) {
8006228: 28 25 00 10 lw r5,(r1+16)
800622c: 34 04 00 00 mvi r4,0
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
8006230: b8 20 58 00 mv r11,r1
if ( !_States_Is_dormant( the_thread->current_state ) ) {
8006234: 20 a5 00 01 andi r5,r5,0x1
8006238: 44 a4 00 06 be r5,r4,8006250 <_Thread_Restart+0x34> <== ALWAYS TAKEN
return true;
}
return false;
}
800623c: b8 80 08 00 mv r1,r4
8006240: 2b 9d 00 04 lw ra,(sp+4)
8006244: 2b 8b 00 08 lw r11,(sp+8)
8006248: 37 9c 00 10 addi sp,sp,16
800624c: c3 a0 00 00 ret
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
_Thread_Set_transient( the_thread );
8006250: 5b 82 00 10 sw (sp+16),r2
8006254: 5b 83 00 0c sw (sp+12),r3
8006258: f8 00 00 b9 calli 800653c <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
800625c: 2b 82 00 10 lw r2,(sp+16)
8006260: 2b 83 00 0c lw r3,(sp+12)
8006264: b9 60 08 00 mv r1,r11
8006268: f8 00 15 2a calli 800b710 <_Thread_Reset>
_Thread_Load_environment( the_thread );
800626c: b9 60 08 00 mv r1,r11
8006270: f8 00 13 ef calli 800b22c <_Thread_Load_environment>
_Thread_Ready( the_thread );
8006274: b9 60 08 00 mv r1,r11
8006278: f8 00 14 c2 calli 800b580 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
800627c: b9 60 08 00 mv r1,r11
8006280: f8 00 02 7b calli 8006c6c <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
8006284: 78 01 08 02 mvhi r1,0x802
8006288: 38 21 39 c0 ori r1,r1,0x39c0
800628c: 28 21 00 00 lw r1,(r1+0)
8006290: 34 04 00 01 mvi r4,1
8006294: 5d 61 ff ea bne r11,r1,800623c <_Thread_Restart+0x20>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
_Context_Restore_fp( &_Thread_Executing->fp_context );
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
8006298: 35 61 00 d0 addi r1,r11,208
800629c: f8 00 04 16 calli 80072f4 <_CPU_Context_restore>
80062a0: 34 04 00 01 mvi r4,1 <== NOT EXECUTED
80062a4: e3 ff ff e6 bi 800623c <_Thread_Restart+0x20> <== NOT EXECUTED
0800aca8 <_Thread_Resume>:
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
800aca8: 90 00 10 00 rcsr r2,IE
800acac: 34 04 ff fe mvi r4,-2
800acb0: a0 44 20 00 and r4,r2,r4
800acb4: d0 04 00 00 wcsr IE,r4
_ISR_Enable( level );
return;
}
#endif
current_state = the_thread->current_state;
800acb8: 28 23 00 10 lw r3,(r1+16)
if ( current_state & STATES_SUSPENDED ) {
800acbc: 20 65 00 02 andi r5,r3,0x2
800acc0: 44 a0 00 2a be r5,r0,800ad68 <_Thread_Resume+0xc0> <== NEVER TAKEN
800acc4: 34 05 ff fd mvi r5,-3
800acc8: a0 65 18 00 and r3,r3,r5
current_state =
800accc: 58 23 00 10 sw (r1+16),r3
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
800acd0: 5c 60 00 26 bne r3,r0,800ad68 <_Thread_Resume+0xc0> <== 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;
800acd4: 28 26 00 90 lw r6,(r1+144)
800acd8: 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);
800acdc: 28 25 00 8c lw r5,(r1+140)
800ace0: 2c c8 00 00 lhu r8,(r6+0)
_Priority_Major_bit_map |= the_priority_map->ready_major;
800ace4: 78 03 08 02 mvhi r3,0x802
800ace8: 38 63 6a 34 ori r3,r3,0x6a34
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
800acec: b9 07 38 00 or r7,r8,r7
800acf0: 0c c7 00 00 sh (r6+0),r7
_Priority_Major_bit_map |= the_priority_map->ready_major;
800acf4: 2c 67 00 00 lhu r7,(r3+0)
800acf8: 2c 28 00 94 lhu r8,(r1+148)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
800acfc: 34 a6 00 04 addi r6,r5,4
800ad00: 58 26 00 00 sw (r1+0),r6
old_last_node = the_chain->last;
800ad04: 28 a6 00 08 lw r6,(r5+8)
800ad08: b9 07 38 00 or r7,r8,r7
the_chain->last = the_node;
800ad0c: 58 a1 00 08 sw (r5+8),r1
800ad10: 20 e5 ff ff andi r5,r7,0xffff
800ad14: 0c 65 00 00 sh (r3+0),r5
old_last_node->next = the_node;
the_node->previous = old_last_node;
800ad18: 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;
800ad1c: 58 c1 00 00 sw (r6+0),r1
_ISR_Flash( level );
800ad20: d0 02 00 00 wcsr IE,r2
800ad24: d0 04 00 00 wcsr IE,r4
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
800ad28: 78 03 08 02 mvhi r3,0x802
800ad2c: 38 63 6a 10 ori r3,r3,0x6a10
800ad30: 28 64 00 00 lw r4,(r3+0)
800ad34: 28 25 00 14 lw r5,(r1+20)
800ad38: 28 84 00 14 lw r4,(r4+20)
800ad3c: 50 a4 00 0b bgeu r5,r4,800ad68 <_Thread_Resume+0xc0>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
800ad40: 78 04 08 02 mvhi r4,0x802
800ad44: 38 84 6a 40 ori r4,r4,0x6a40
800ad48: 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;
800ad4c: 58 61 00 00 sw (r3+0),r1
if ( _Thread_Executing->is_preemptible ||
800ad50: 40 81 00 75 lbu r1,(r4+117)
800ad54: 44 20 00 07 be r1,r0,800ad70 <_Thread_Resume+0xc8>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
800ad58: 78 01 08 02 mvhi r1,0x802
800ad5c: 38 21 6a 50 ori r1,r1,0x6a50
800ad60: 34 03 00 01 mvi r3,1
800ad64: 30 23 00 00 sb (r1+0),r3
}
}
}
_ISR_Enable( level );
800ad68: d0 02 00 00 wcsr IE,r2
}
800ad6c: c3 a0 00 00 ret
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
800ad70: 44 a1 ff fa be r5,r1,800ad58 <_Thread_Resume+0xb0> <== NEVER TAKEN
800ad74: e3 ff ff fd bi 800ad68 <_Thread_Resume+0xc0>
080056bc <_Thread_Start>:
Thread_Start_types the_prototype,
void *entry_point,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
80056bc: 37 9c ff f8 addi sp,sp,-8
80056c0: 5b 8b 00 08 sw (sp+8),r11
80056c4: 5b 9d 00 04 sw (sp+4),ra
if ( _States_Is_dormant( the_thread->current_state ) ) {
80056c8: 28 27 00 10 lw r7,(r1+16)
Thread_Start_types the_prototype,
void *entry_point,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
80056cc: b8 20 58 00 mv r11,r1
if ( _States_Is_dormant( the_thread->current_state ) ) {
80056d0: 20 e7 00 01 andi r7,r7,0x1
80056d4: b8 e0 30 00 mv r6,r7
80056d8: 44 e0 00 0b be r7,r0,8005704 <_Thread_Start+0x48> <== NEVER TAKEN
the_thread->Start.entry_point = (Thread_Entry) entry_point;
80056dc: 58 23 00 9c sw (r1+156),r3
the_thread->Start.prototype = the_prototype;
80056e0: 58 22 00 a0 sw (r1+160),r2
the_thread->Start.pointer_argument = pointer_argument;
80056e4: 58 24 00 a4 sw (r1+164),r4
the_thread->Start.numeric_argument = numeric_argument;
80056e8: 58 25 00 a8 sw (r1+168),r5
_Thread_Load_environment( the_thread );
80056ec: f8 00 12 39 calli 8009fd0 <_Thread_Load_environment>
_Thread_Ready( the_thread );
80056f0: b9 60 08 00 mv r1,r11
80056f4: f8 00 13 0c calli 800a324 <_Thread_Ready>
_User_extensions_Thread_start( the_thread );
80056f8: b9 60 08 00 mv r1,r11
80056fc: f8 00 01 1f calli 8005b78 <_User_extensions_Thread_start>
8005700: 34 06 00 01 mvi r6,1
return true;
}
return false;
}
8005704: b8 c0 08 00 mv r1,r6
8005708: 2b 9d 00 04 lw ra,(sp+4)
800570c: 2b 8b 00 08 lw r11,(sp+8)
8005710: 37 9c 00 08 addi sp,sp,8
8005714: c3 a0 00 00 ret
08005718 <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
8005718: 37 9c ff f8 addi sp,sp,-8
800571c: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *executing;
executing = _Thread_Executing;
8005720: 78 01 08 01 mvhi r1,0x801
8005724: 38 21 e9 60 ori r1,r1,0xe960
8005728: 28 21 00 00 lw r1,(r1+0)
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
800572c: 40 22 00 75 lbu r2,(r1+117)
8005730: 44 40 00 09 be r2,r0,8005754 <_Thread_Tickle_timeslice+0x3c>
return;
if ( !_States_Is_ready( executing->current_state ) )
8005734: 28 22 00 10 lw r2,(r1+16)
8005738: 5c 40 00 07 bne r2,r0,8005754 <_Thread_Tickle_timeslice+0x3c>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
800573c: 28 22 00 7c lw r2,(r1+124)
8005740: 44 40 00 05 be r2,r0,8005754 <_Thread_Tickle_timeslice+0x3c>
8005744: 34 03 00 02 mvi r3,2
8005748: 50 62 00 0d bgeu r3,r2,800577c <_Thread_Tickle_timeslice+0x64>
800574c: 34 03 00 03 mvi r3,3
8005750: 44 43 00 04 be r2,r3,8005760 <_Thread_Tickle_timeslice+0x48><== ALWAYS TAKEN
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
#endif
}
}
8005754: 2b 9d 00 04 lw ra,(sp+4)
8005758: 37 9c 00 08 addi sp,sp,8
800575c: c3 a0 00 00 ret
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
8005760: 28 22 00 78 lw r2,(r1+120)
8005764: 34 42 ff ff addi r2,r2,-1
8005768: 58 22 00 78 sw (r1+120),r2
800576c: 5c 40 ff fa bne r2,r0,8005754 <_Thread_Tickle_timeslice+0x3c>
(*executing->budget_callout)( executing );
8005770: 28 22 00 80 lw r2,(r1+128)
8005774: d8 40 00 00 call r2
8005778: e3 ff ff f7 bi 8005754 <_Thread_Tickle_timeslice+0x3c>
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 ) {
800577c: 28 22 00 78 lw r2,(r1+120)
8005780: 34 42 ff ff addi r2,r2,-1
8005784: 58 22 00 78 sw (r1+120),r2
8005788: 48 40 ff f3 bg r2,r0,8005754 <_Thread_Tickle_timeslice+0x3c>
_Thread_Reset_timeslice();
800578c: 5b 81 00 08 sw (sp+8),r1
8005790: f8 00 13 49 calli 800a4b4 <_Thread_Reset_timeslice>
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
8005794: 78 02 08 01 mvhi r2,0x801
8005798: 38 42 e8 34 ori r2,r2,0xe834
800579c: 2b 81 00 08 lw r1,(sp+8)
80057a0: 28 42 00 00 lw r2,(r2+0)
80057a4: 58 22 00 78 sw (r1+120),r2
80057a8: e3 ff ff eb bi 8005754 <_Thread_Tickle_timeslice+0x3c>
0800db34 <_Thread_Yield_processor>:
{
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
800db34: 78 01 08 02 mvhi r1,0x802
800db38: 38 21 ba f0 ori r1,r1,0xbaf0
800db3c: 28 21 00 00 lw r1,(r1+0)
ready = executing->ready;
800db40: 28 22 00 8c lw r2,(r1+140)
_ISR_Disable( level );
800db44: 90 00 20 00 rcsr r4,IE
800db48: 34 03 ff fe mvi r3,-2
800db4c: a0 83 18 00 and r3,r4,r3
800db50: d0 03 00 00 wcsr IE,r3
if ( !_Chain_Has_only_one_node( ready ) ) {
800db54: 28 46 00 00 lw r6,(r2+0)
800db58: 28 45 00 08 lw r5,(r2+8)
800db5c: 44 c5 00 1a be r6,r5,800dbc4 <_Thread_Yield_processor+0x90>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
800db60: 28 25 00 00 lw r5,(r1+0)
previous = the_node->previous;
800db64: 28 26 00 04 lw r6,(r1+4)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
800db68: 34 47 00 04 addi r7,r2,4
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
previous->next = next;
800db6c: 58 c5 00 00 sw (r6+0),r5
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
800db70: 58 27 00 00 sw (r1+0),r7
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
800db74: 58 a6 00 04 sw (r5+4),r6
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
800db78: 28 45 00 08 lw r5,(r2+8)
the_chain->last = the_node;
800db7c: 58 41 00 08 sw (r2+8),r1
old_last_node->next = the_node;
the_node->previous = old_last_node;
800db80: 58 25 00 04 sw (r1+4),r5
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
800db84: 58 a1 00 00 sw (r5+0),r1
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
800db88: d0 04 00 00 wcsr IE,r4
800db8c: d0 03 00 00 wcsr IE,r3
if ( _Thread_Is_heir( executing ) )
800db90: 78 03 08 02 mvhi r3,0x802
800db94: 38 63 ba c0 ori r3,r3,0xbac0
800db98: 28 65 00 00 lw r5,(r3+0)
800db9c: 44 25 00 07 be r1,r5,800dbb8 <_Thread_Yield_processor+0x84><== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
800dba0: 78 01 08 02 mvhi r1,0x802
800dba4: 38 21 bb 00 ori r1,r1,0xbb00
800dba8: 34 02 00 01 mvi r2,1
800dbac: 30 22 00 00 sb (r1+0),r2
_ISR_Enable( level );
800dbb0: d0 04 00 00 wcsr IE,r4
}
800dbb4: c3 a0 00 00 ret
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
800dbb8: 28 42 00 00 lw r2,(r2+0)
800dbbc: 58 62 00 00 sw (r3+0),r2
800dbc0: e3 ff ff f8 bi 800dba0 <_Thread_Yield_processor+0x6c>
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
800dbc4: 78 02 08 02 mvhi r2,0x802
800dbc8: 38 42 ba c0 ori r2,r2,0xbac0
800dbcc: 28 42 00 00 lw r2,(r2+0)
800dbd0: 5c 22 ff f4 bne r1,r2,800dba0 <_Thread_Yield_processor+0x6c><== NEVER TAKEN
800dbd4: e3 ff ff f7 bi 800dbb0 <_Thread_Yield_processor+0x7c>
08004eb0 <_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
)
{
8004eb0: 37 9c ff ec addi sp,sp,-20
8004eb4: 5b 8b 00 14 sw (sp+20),r11
8004eb8: 5b 8c 00 10 sw (sp+16),r12
8004ebc: 5b 8d 00 0c sw (sp+12),r13
8004ec0: 5b 8e 00 08 sw (sp+8),r14
8004ec4: 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;
8004ec8: 28 4b 00 14 lw r11,(r2+20)
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
8004ecc: b8 40 60 00 mv r12,r2
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
8004ed0: 34 44 00 3c addi r4,r2,60
8004ed4: 59 84 00 38 sw (r12+56),r4
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
8004ed8: 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;
8004edc: 34 04 00 00 mvi r4,0
8004ee0: b8 20 68 00 mv r13,r1
8004ee4: 59 84 00 3c sw (r12+60),r4
the_chain->last = _Chain_Head(the_chain);
8004ee8: 59 82 00 40 sw (r12+64),r2
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
8004eec: b9 60 08 00 mv r1,r11
8004ef0: 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
)
{
8004ef4: 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 ];
8004ef8: fb ff ec e6 calli 8000290 <__lshrsi3>
8004efc: b4 21 10 00 add r2,r1,r1
8004f00: b4 41 08 00 add r1,r2,r1
8004f04: 34 02 00 02 mvi r2,2
8004f08: fb ff ec ba calli 80001f0 <__ashlsi3>
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
8004f0c: 21 62 00 20 andi r2,r11,0x20
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
8004f10: b5 a1 40 00 add r8,r13,r1
block_state = the_thread_queue->state;
8004f14: 29 a6 00 38 lw r6,(r13+56)
if ( _Thread_queue_Is_reverse_search( priority ) )
8004f18: 5c 40 00 25 bne r2,r0,8004fac <_Thread_queue_Enqueue_priority+0xfc>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
8004f1c: 35 01 00 04 addi r1,r8,4
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
8004f20: 34 0a ff fe mvi r10,-2
8004f24: 90 00 10 00 rcsr r2,IE
8004f28: a0 4a 48 00 and r9,r2,r10
8004f2c: d0 09 00 00 wcsr IE,r9
search_thread = (Thread_Control *) header->first;
8004f30: 29 04 00 00 lw r4,(r8+0)
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
8004f34: 44 81 00 69 be r4,r1,80050d8 <_Thread_queue_Enqueue_priority+0x228>
search_priority = search_thread->current_priority;
8004f38: 28 85 00 14 lw r5,(r4+20)
if ( priority <= search_priority )
8004f3c: 50 ab 00 10 bgeu r5,r11,8004f7c <_Thread_queue_Enqueue_priority+0xcc>
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
8004f40: d0 02 00 00 wcsr IE,r2
8004f44: d0 09 00 00 wcsr IE,r9
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
8004f48: 28 83 00 10 lw r3,(r4+16)
8004f4c: a0 c3 18 00 and r3,r6,r3
8004f50: 5c 60 00 09 bne r3,r0,8004f74 <_Thread_queue_Enqueue_priority+0xc4><== ALWAYS TAKEN
8004f54: e0 00 00 43 bi 8005060 <_Thread_queue_Enqueue_priority+0x1b0><== NOT EXECUTED
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
search_priority = search_thread->current_priority;
8004f58: 28 85 00 14 lw r5,(r4+20)
if ( priority <= search_priority )
8004f5c: 50 ab 00 08 bgeu r5,r11,8004f7c <_Thread_queue_Enqueue_priority+0xcc>
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
8004f60: d0 02 00 00 wcsr IE,r2
8004f64: d0 09 00 00 wcsr IE,r9
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
8004f68: 28 87 00 10 lw r7,(r4+16)
8004f6c: a0 c7 38 00 and r7,r6,r7
8004f70: 44 e0 00 3c be r7,r0,8005060 <_Thread_queue_Enqueue_priority+0x1b0><== NEVER TAKEN
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
8004f74: 28 84 00 00 lw r4,(r4+0)
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
8004f78: 5c 81 ff f8 bne r4,r1,8004f58 <_Thread_queue_Enqueue_priority+0xa8>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
8004f7c: 29 a1 00 30 lw r1,(r13+48)
8004f80: 34 06 00 01 mvi r6,1
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
8004f84: b8 40 18 00 mv r3,r2
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
8004f88: 44 26 00 38 be r1,r6,8005068 <_Thread_queue_Enqueue_priority+0x1b8>
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
8004f8c: 59 c3 00 00 sw (r14+0),r3
return the_thread_queue->sync_state;
}
8004f90: 2b 9d 00 04 lw ra,(sp+4)
8004f94: 2b 8b 00 14 lw r11,(sp+20)
8004f98: 2b 8c 00 10 lw r12,(sp+16)
8004f9c: 2b 8d 00 0c lw r13,(sp+12)
8004fa0: 2b 8e 00 08 lw r14,(sp+8)
8004fa4: 37 9c 00 14 addi sp,sp,20
8004fa8: c3 a0 00 00 ret
8004fac: 78 01 08 01 mvhi r1,0x801
8004fb0: 38 21 e0 c0 ori r1,r1,0xe0c0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
8004fb4: 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;
8004fb8: 40 25 00 00 lbu r5,(r1+0)
8004fbc: 34 a5 00 01 addi r5,r5,1
_ISR_Disable( level );
8004fc0: 90 00 38 00 rcsr r7,IE
8004fc4: a0 e3 48 00 and r9,r7,r3
8004fc8: d0 09 00 00 wcsr IE,r9
search_thread = (Thread_Control *) header->last;
8004fcc: 29 04 00 08 lw r4,(r8+8)
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
8004fd0: 5c 88 00 04 bne r4,r8,8004fe0 <_Thread_queue_Enqueue_priority+0x130>
8004fd4: e0 00 00 0c bi 8005004 <_Thread_queue_Enqueue_priority+0x154>
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
8004fd8: 28 84 00 04 lw r4,(r4+4)
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
8004fdc: 45 04 00 0a be r8,r4,8005004 <_Thread_queue_Enqueue_priority+0x154>
search_priority = search_thread->current_priority;
8004fe0: 28 85 00 14 lw r5,(r4+20)
if ( priority >= search_priority )
8004fe4: 51 65 00 08 bgeu r11,r5,8005004 <_Thread_queue_Enqueue_priority+0x154>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
8004fe8: d0 07 00 00 wcsr IE,r7
8004fec: d0 09 00 00 wcsr IE,r9
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
8004ff0: 28 82 00 10 lw r2,(r4+16)
8004ff4: a0 c2 10 00 and r2,r6,r2
8004ff8: 5c 40 ff f8 bne r2,r0,8004fd8 <_Thread_queue_Enqueue_priority+0x128>
_ISR_Enable( level );
8004ffc: d0 07 00 00 wcsr IE,r7
goto restart_reverse_search;
8005000: e3 ff ff ee bi 8004fb8 <_Thread_queue_Enqueue_priority+0x108>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
8005004: 29 a1 00 30 lw r1,(r13+48)
8005008: 34 02 00 01 mvi r2,1
800500c: b8 e0 18 00 mv r3,r7
8005010: 5c 22 ff df bne r1,r2,8004f8c <_Thread_queue_Enqueue_priority+0xdc>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
8005014: 34 01 00 00 mvi r1,0
8005018: 59 a1 00 30 sw (r13+48),r1
if ( priority == search_priority )
800501c: b8 e0 10 00 mv r2,r7
8005020: 45 65 00 24 be r11,r5,80050b0 <_Thread_queue_Enqueue_priority+0x200>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
8005024: 28 81 00 00 lw r1,(r4+0)
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
8005028: 59 84 00 04 sw (r12+4),r4
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
800502c: 59 8d 00 44 sw (r12+68),r13
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
8005030: 59 81 00 00 sw (r12+0),r1
the_node->previous = search_node;
search_node->next = the_node;
8005034: 58 8c 00 00 sw (r4+0),r12
next_node->previous = the_node;
8005038: 58 2c 00 04 sw (r1+4),r12
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
800503c: d0 07 00 00 wcsr IE,r7
8005040: 34 01 00 01 mvi r1,1
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
8005044: 2b 9d 00 04 lw ra,(sp+4)
8005048: 2b 8b 00 14 lw r11,(sp+20)
800504c: 2b 8c 00 10 lw r12,(sp+16)
8005050: 2b 8d 00 0c lw r13,(sp+12)
8005054: 2b 8e 00 08 lw r14,(sp+8)
8005058: 37 9c 00 14 addi sp,sp,20
800505c: c3 a0 00 00 ret
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
8005060: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
goto restart_forward_search;
8005064: e3 ff ff b0 bi 8004f24 <_Thread_queue_Enqueue_priority+0x74><== NOT EXECUTED
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
8005068: 34 01 00 00 mvi r1,0
800506c: 59 a1 00 30 sw (r13+48),r1
if ( priority == search_priority )
8005070: 45 65 00 10 be r11,r5,80050b0 <_Thread_queue_Enqueue_priority+0x200>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
8005074: 28 81 00 04 lw r1,(r4+4)
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
8005078: 59 84 00 00 sw (r12+0),r4
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
800507c: 59 8d 00 44 sw (r12+68),r13
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
8005080: 59 81 00 04 sw (r12+4),r1
previous_node->next = the_node;
8005084: 58 2c 00 00 sw (r1+0),r12
search_node->previous = the_node;
8005088: 58 8c 00 04 sw (r4+4),r12
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
800508c: d0 02 00 00 wcsr IE,r2
8005090: 34 01 00 01 mvi r1,1
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
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 14 addi sp,sp,20
80050ac: c3 a0 00 00 ret
80050b0: 34 84 00 3c addi r4,r4,60
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
80050b4: 28 81 00 04 lw r1,(r4+4)
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
80050b8: 59 84 00 00 sw (r12+0),r4
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
80050bc: 59 8d 00 44 sw (r12+68),r13
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
80050c0: 59 81 00 04 sw (r12+4),r1
previous_node->next = the_node;
80050c4: 58 2c 00 00 sw (r1+0),r12
search_node->previous = the_node;
80050c8: 58 8c 00 04 sw (r4+4),r12
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
80050cc: d0 02 00 00 wcsr IE,r2
80050d0: 34 01 00 01 mvi r1,1
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
80050d4: e3 ff ff af bi 8004f90 <_Thread_queue_Enqueue_priority+0xe0>
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
80050d8: 34 05 ff ff mvi r5,-1
80050dc: e3 ff ff a8 bi 8004f7c <_Thread_queue_Enqueue_priority+0xcc>
0800a2c8 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
800a2c8: 37 9c ff fc addi sp,sp,-4
800a2cc: 5b 9d 00 04 sw (sp+4),ra
800a2d0: b8 20 10 00 mv r2,r1
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
800a2d4: 28 21 00 44 lw r1,(r1+68)
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
800a2d8: 28 24 00 30 lw r4,(r1+48)
800a2dc: 44 80 00 05 be r4,r0,800a2f0 <_Thread_queue_Process_timeout+0x28>
800a2e0: 78 03 08 01 mvhi r3,0x801
800a2e4: 38 63 e9 60 ori r3,r3,0xe960
800a2e8: 28 63 00 00 lw r3,(r3+0)
800a2ec: 44 43 00 07 be r2,r3,800a308 <_Thread_queue_Process_timeout+0x40>
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
800a2f0: 28 23 00 3c lw r3,(r1+60)
800a2f4: 58 43 00 34 sw (r2+52),r3
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
800a2f8: fb ff ff 93 calli 800a144 <_Thread_queue_Extract>
}
}
800a2fc: 2b 9d 00 04 lw ra,(sp+4)
800a300: 37 9c 00 04 addi sp,sp,4
800a304: c3 a0 00 00 ret
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
800a308: 34 03 00 03 mvi r3,3
800a30c: 44 83 ff fc be r4,r3,800a2fc <_Thread_queue_Process_timeout+0x34><== ALWAYS TAKEN
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
800a310: 34 03 00 02 mvi r3,2 <== NOT EXECUTED
800a314: 58 23 00 30 sw (r1+48),r3 <== NOT EXECUTED
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
800a318: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED
800a31c: 58 41 00 34 sw (r2+52),r1 <== NOT EXECUTED
800a320: e3 ff ff f7 bi 800a2fc <_Thread_queue_Process_timeout+0x34><== NOT EXECUTED
0800516c <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
800516c: 37 9c ff ec addi sp,sp,-20
8005170: 5b 8b 00 10 sw (sp+16),r11
8005174: 5b 8c 00 0c sw (sp+12),r12
8005178: 5b 8d 00 08 sw (sp+8),r13
800517c: 5b 9d 00 04 sw (sp+4),ra
8005180: b8 20 58 00 mv r11,r1
8005184: 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 )
8005188: 44 20 00 04 be r1,r0,8005198 <_Thread_queue_Requeue+0x2c> <== 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 ) {
800518c: 28 22 00 34 lw r2,(r1+52)
8005190: 34 01 00 01 mvi r1,1
8005194: 44 41 00 07 be r2,r1,80051b0 <_Thread_queue_Requeue+0x44> <== ALWAYS TAKEN
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
8005198: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800519c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
80051a0: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
80051a4: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
80051a8: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
80051ac: c3 a0 00 00 ret <== NOT EXECUTED
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
80051b0: 90 00 68 00 rcsr r13,IE
80051b4: 34 01 ff fe mvi r1,-2
80051b8: a1 a1 08 00 and r1,r13,r1
80051bc: d0 01 00 00 wcsr IE,r1
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
80051c0: 29 82 00 10 lw r2,(r12+16)
80051c4: 78 01 00 03 mvhi r1,0x3
80051c8: 38 21 be e0 ori r1,r1,0xbee0
80051cc: a0 41 08 00 and r1,r2,r1
80051d0: 5c 20 00 08 bne r1,r0,80051f0 <_Thread_queue_Requeue+0x84> <== ALWAYS TAKEN
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
80051d4: d0 0d 00 00 wcsr IE,r13 <== NOT EXECUTED
}
}
80051d8: 2b 9d 00 04 lw ra,(sp+4)
80051dc: 2b 8b 00 10 lw r11,(sp+16)
80051e0: 2b 8c 00 0c lw r12,(sp+12)
80051e4: 2b 8d 00 08 lw r13,(sp+8)
80051e8: 37 9c 00 14 addi sp,sp,20
80051ec: c3 a0 00 00 ret
80051f0: 34 03 00 01 mvi r3,1
80051f4: 59 63 00 30 sw (r11+48),r3
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
80051f8: b9 60 08 00 mv r1,r11
80051fc: b9 80 10 00 mv r2,r12
8005200: f8 00 13 df calli 800a17c <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
8005204: b9 60 08 00 mv r1,r11
8005208: b9 80 10 00 mv r2,r12
800520c: 37 83 00 14 addi r3,sp,20
8005210: fb ff ff 28 calli 8004eb0 <_Thread_queue_Enqueue_priority>
}
_ISR_Enable( level );
8005214: d0 0d 00 00 wcsr IE,r13
8005218: e3 ff ff f0 bi 80051d8 <_Thread_queue_Requeue+0x6c>
0800521c <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
800521c: 37 9c ff f8 addi sp,sp,-8
8005220: 5b 9d 00 04 sw (sp+4),ra
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
8005224: 37 82 00 08 addi r2,sp,8
8005228: fb ff fd 4d calli 800475c <_Thread_Get>
switch ( location ) {
800522c: 2b 82 00 08 lw r2,(sp+8)
8005230: 5c 40 00 07 bne r2,r0,800524c <_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 );
8005234: f8 00 14 25 calli 800a2c8 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
8005238: 78 01 08 01 mvhi r1,0x801
800523c: 38 21 e8 a4 ori r1,r1,0xe8a4
8005240: 28 22 00 00 lw r2,(r1+0)
8005244: 34 42 ff ff addi r2,r2,-1
8005248: 58 22 00 00 sw (r1+0),r2
_Thread_Unnest_dispatch();
break;
}
}
800524c: 2b 9d 00 04 lw ra,(sp+4)
8005250: 37 9c 00 08 addi sp,sp,8
8005254: c3 a0 00 00 ret
0800409c <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
800409c: 37 9c ff a0 addi sp,sp,-96
80040a0: 5b 8b 00 44 sw (sp+68),r11
80040a4: 5b 8c 00 40 sw (sp+64),r12
80040a8: 5b 8d 00 3c sw (sp+60),r13
80040ac: 5b 8e 00 38 sw (sp+56),r14
80040b0: 5b 8f 00 34 sw (sp+52),r15
80040b4: 5b 90 00 30 sw (sp+48),r16
80040b8: 5b 91 00 2c sw (sp+44),r17
80040bc: 5b 92 00 28 sw (sp+40),r18
80040c0: 5b 93 00 24 sw (sp+36),r19
80040c4: 5b 94 00 20 sw (sp+32),r20
80040c8: 5b 95 00 1c sw (sp+28),r21
80040cc: 5b 96 00 18 sw (sp+24),r22
80040d0: 5b 97 00 14 sw (sp+20),r23
80040d4: 5b 98 00 10 sw (sp+16),r24
80040d8: 5b 99 00 0c sw (sp+12),r25
80040dc: 5b 9b 00 08 sw (sp+8),fp
80040e0: 5b 9d 00 04 sw (sp+4),ra
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
80040e4: 34 17 00 00 mvi r23,0
80040e8: b8 20 58 00 mv r11,r1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
80040ec: 37 98 00 58 addi r24,sp,88
80040f0: 37 96 00 5c addi r22,sp,92
80040f4: 37 8f 00 4c addi r15,sp,76
80040f8: 37 95 00 50 addi r21,sp,80
80040fc: 78 14 08 02 mvhi r20,0x802
8004100: 78 13 08 02 mvhi r19,0x802
8004104: 78 19 08 02 mvhi r25,0x802
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
8004108: 34 31 00 30 addi r17,r1,48
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
800410c: 34 30 00 68 addi r16,r1,104
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
8004110: 34 21 00 08 addi r1,r1,8
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
8004114: 5b 96 00 58 sw (sp+88),r22
the_chain->permanent_null = NULL;
8004118: 5b 97 00 5c sw (sp+92),r23
the_chain->last = _Chain_Head(the_chain);
800411c: 5b 98 00 60 sw (sp+96),r24
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
8004120: 5b 95 00 4c sw (sp+76),r21
the_chain->permanent_null = NULL;
8004124: 5b 97 00 50 sw (sp+80),r23
the_chain->last = _Chain_Head(the_chain);
8004128: 5b 8f 00 54 sw (sp+84),r15
800412c: 3a 94 4b 44 ori r20,r20,0x4b44
8004130: 3a 73 4a 84 ori r19,r19,0x4a84
8004134: 3b 39 49 f4 ori r25,r25,0x49f4
8004138: 5b 81 00 48 sw (sp+72),r1
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
800413c: 35 7b 00 40 addi fp,r11,64
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
8004140: 34 0c 00 01 mvi r12,1
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
8004144: 34 0d 00 03 mvi r13,3
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
8004148: 34 12 ff fe mvi r18,-2
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
800414c: 59 78 00 78 sw (r11+120),r24
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
8004150: 2a 82 00 00 lw r2,(r20+0)
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
8004154: 29 63 00 3c lw r3,(r11+60)
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
8004158: ba 20 08 00 mv r1,r17
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
800415c: 59 62 00 3c sw (r11+60),r2
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
8004160: c8 43 10 00 sub r2,r2,r3
8004164: b9 e0 18 00 mv r3,r15
8004168: f8 00 0f 4b calli 8007e94 <_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;
800416c: 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();
8004170: 2a 6e 00 00 lw r14,(r19+0)
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
8004174: 50 4e 00 19 bgeu r2,r14,80041d8 <_Timer_server_Body+0x13c>
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
8004178: c9 c2 10 00 sub r2,r14,r2
800417c: ba 00 08 00 mv r1,r16
8004180: b9 e0 18 00 mv r3,r15
8004184: f8 00 0f 44 calli 8007e94 <_Watchdog_Adjust_to_chain>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
8004188: 59 6e 00 74 sw (r11+116),r14
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
800418c: 29 61 00 78 lw r1,(r11+120)
8004190: f8 00 02 2c calli 8004a40 <_Chain_Get>
if ( timer == NULL ) {
8004194: 44 20 00 0a be r1,r0,80041bc <_Timer_server_Body+0x120> <== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
8004198: 28 22 00 38 lw r2,(r1+56) <== NOT EXECUTED
800419c: 44 4c 00 15 be r2,r12,80041f0 <_Timer_server_Body+0x154> <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
80041a0: 5c 4d ff fb bne r2,r13,800418c <_Timer_server_Body+0xf0> <== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
80041a4: 34 22 00 10 addi r2,r1,16 <== NOT EXECUTED
80041a8: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
80041ac: f8 00 0f 64 calli 8007f3c <_Watchdog_Insert> <== NOT EXECUTED
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
80041b0: 29 61 00 78 lw r1,(r11+120) <== NOT EXECUTED
80041b4: f8 00 02 23 calli 8004a40 <_Chain_Get> <== NOT EXECUTED
if ( timer == NULL ) {
80041b8: 5c 20 ff f8 bne r1,r0,8004198 <_Timer_server_Body+0xfc> <== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
80041bc: 90 00 10 00 rcsr r2,IE
80041c0: a0 52 18 00 and r3,r2,r18
80041c4: d0 03 00 00 wcsr IE,r3
if ( _Chain_Is_empty( insert_chain ) ) {
80041c8: 2b 83 00 58 lw r3,(sp+88)
80041cc: 46 c3 00 0d be r22,r3,8004200 <_Timer_server_Body+0x164> <== ALWAYS TAKEN
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
80041d0: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
80041d4: e3 ff ff df bi 8004150 <_Timer_server_Body+0xb4> <== NOT EXECUTED
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
80041d8: 51 c2 ff ec bgeu r14,r2,8004188 <_Timer_server_Body+0xec>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
80041dc: c8 4e 18 00 sub r3,r2,r14
80041e0: ba 00 08 00 mv r1,r16
80041e4: 34 02 00 01 mvi r2,1
80041e8: f8 00 0e ed calli 8007d9c <_Watchdog_Adjust>
80041ec: e3 ff ff e7 bi 8004188 <_Timer_server_Body+0xec>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
80041f0: 34 22 00 10 addi r2,r1,16 <== NOT EXECUTED
80041f4: ba 20 08 00 mv r1,r17 <== NOT EXECUTED
80041f8: f8 00 0f 51 calli 8007f3c <_Watchdog_Insert> <== NOT EXECUTED
80041fc: e3 ff ff e4 bi 800418c <_Timer_server_Body+0xf0> <== NOT EXECUTED
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
8004200: 59 77 00 78 sw (r11+120),r23
_ISR_Enable( level );
8004204: 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 ) ) {
8004208: 2b 82 00 4c lw r2,(sp+76)
800420c: 5e a2 00 0b bne r21,r2,8004238 <_Timer_server_Body+0x19c>
8004210: e0 00 00 11 bi 8004254 <_Timer_server_Body+0x1b8>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
8004214: 28 83 00 00 lw r3,(r4+0)
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
8004218: 58 97 00 08 sw (r4+8),r23
the_chain->first = new_first;
800421c: 5b 83 00 4c sw (sp+76),r3
new_first->previous = _Chain_Head(the_chain);
8004220: 58 6f 00 04 sw (r3+4),r15
_ISR_Enable( level );
8004224: 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 );
8004228: 28 82 00 24 lw r2,(r4+36)
800422c: 28 83 00 1c lw r3,(r4+28)
8004230: 28 81 00 20 lw r1,(r4+32)
8004234: d8 60 00 00 call r3
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
8004238: 90 00 10 00 rcsr r2,IE
800423c: a0 52 18 00 and r3,r2,r18
8004240: 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));
8004244: 2b 84 00 4c lw r4,(sp+76)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
8004248: 5e a4 ff f3 bne r21,r4,8004214 <_Timer_server_Body+0x178>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
800424c: d0 02 00 00 wcsr IE,r2
8004250: e3 ff ff bf bi 800414c <_Timer_server_Body+0xb0>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
8004254: 34 01 00 00 mvi r1,0
8004258: 31 61 00 7c sb (r11+124),r1
800425c: 2b 21 00 00 lw r1,(r25+0)
8004260: 34 21 00 01 addi r1,r1,1
8004264: 5b 21 00 00 sw (r25+0),r1
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
8004268: 29 61 00 00 lw r1,(r11+0)
800426c: 34 02 00 08 mvi r2,8
8004270: f8 00 0c 01 calli 8007274 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
8004274: b9 60 08 00 mv r1,r11
8004278: fb ff ff 47 calli 8003f94 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
800427c: b9 60 08 00 mv r1,r11
8004280: fb ff ff 66 calli 8004018 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
8004284: f8 00 08 cf calli 80065c0 <_Thread_Enable_dispatch>
ts->active = true;
8004288: 34 01 00 01 mvi r1,1
800428c: 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 );
8004290: 2b 81 00 48 lw r1,(sp+72)
8004294: f8 00 0f 91 calli 80080d8 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
8004298: bb 60 08 00 mv r1,fp
800429c: f8 00 0f 8f calli 80080d8 <_Watchdog_Remove>
80042a0: e3 ff ff ab bi 800414c <_Timer_server_Body+0xb0>
080042a4 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
80042a4: 37 9c ff f8 addi sp,sp,-8
80042a8: 5b 8b 00 08 sw (sp+8),r11
80042ac: 5b 9d 00 04 sw (sp+4),ra
if ( ts->insert_chain == NULL ) {
80042b0: 28 23 00 78 lw r3,(r1+120)
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
80042b4: b8 20 58 00 mv r11,r1
80042b8: b8 40 08 00 mv r1,r2
if ( ts->insert_chain == NULL ) {
80042bc: 44 60 00 07 be r3,r0,80042d8 <_Timer_server_Schedule_operation_method+0x34><== ALWAYS TAKEN
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
80042c0: 29 61 00 78 lw r1,(r11+120) <== NOT EXECUTED
80042c4: f8 00 01 d3 calli 8004a10 <_Chain_Append> <== NOT EXECUTED
}
}
80042c8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80042cc: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
80042d0: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
80042d4: c3 a0 00 00 ret <== NOT EXECUTED
80042d8: 78 02 08 02 mvhi r2,0x802
80042dc: 38 42 49 f4 ori r2,r2,0x49f4
80042e0: 28 43 00 00 lw r3,(r2+0)
80042e4: 34 63 00 01 addi r3,r3,1
80042e8: 58 43 00 00 sw (r2+0),r3
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
80042ec: 28 22 00 38 lw r2,(r1+56)
80042f0: 34 03 00 01 mvi r3,1
80042f4: 44 43 00 28 be r2,r3,8004394 <_Timer_server_Schedule_operation_method+0xf0>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
80042f8: 34 03 00 03 mvi r3,3
80042fc: 44 43 00 06 be r2,r3,8004314 <_Timer_server_Schedule_operation_method+0x70>
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
8004300: f8 00 08 b0 calli 80065c0 <_Thread_Enable_dispatch>
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
8004304: 2b 9d 00 04 lw ra,(sp+4)
8004308: 2b 8b 00 08 lw r11,(sp+8)
800430c: 37 9c 00 08 addi sp,sp,8
8004310: c3 a0 00 00 ret
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
8004314: 90 00 38 00 rcsr r7,IE
8004318: 34 02 ff fe mvi r2,-2
800431c: a0 e2 10 00 and r2,r7,r2
8004320: 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));
8004324: 29 63 00 68 lw r3,(r11+104)
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
8004328: 78 02 08 02 mvhi r2,0x802
last_snapshot = ts->TOD_watchdogs.last_snapshot;
800432c: 29 64 00 74 lw r4,(r11+116)
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
8004330: 38 42 4a 84 ori r2,r2,0x4a84
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
8004334: 35 65 00 6c addi r5,r11,108
8004338: 28 42 00 00 lw r2,(r2+0)
800433c: 44 65 00 0b be r3,r5,8004368 <_Timer_server_Schedule_operation_method+0xc4>
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
8004340: 28 66 00 10 lw r6,(r3+16)
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
8004344: b4 c4 28 00 add r5,r6,r4
delta_interval += delta;
8004348: c8 a2 28 00 sub r5,r5,r2
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
if ( snapshot > last_snapshot ) {
800434c: 50 82 00 06 bgeu r4,r2,8004364 <_Timer_server_Schedule_operation_method+0xc0>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
8004350: c8 44 20 00 sub r4,r2,r4
if (delta_interval > delta) {
8004354: f4 c4 40 00 cmpgu r8,r6,r4
delta_interval -= delta;
8004358: c8 c4 28 00 sub r5,r6,r4
if ( snapshot > last_snapshot ) {
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
800435c: c8 08 20 00 sub r4,r0,r8
8004360: a0 a4 28 00 and r5,r5,r4
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
8004364: 58 65 00 10 sw (r3+16),r5
}
ts->TOD_watchdogs.last_snapshot = snapshot;
8004368: 59 62 00 74 sw (r11+116),r2
_ISR_Enable( level );
800436c: d0 07 00 00 wcsr IE,r7
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
8004370: 34 22 00 10 addi r2,r1,16
8004374: 35 61 00 68 addi r1,r11,104
8004378: f8 00 0e f1 calli 8007f3c <_Watchdog_Insert>
if ( !ts->active ) {
800437c: 41 61 00 7c lbu r1,(r11+124)
8004380: 5c 20 ff e0 bne r1,r0,8004300 <_Timer_server_Schedule_operation_method+0x5c>
_Timer_server_Reset_tod_system_watchdog( ts );
8004384: b9 60 08 00 mv r1,r11
8004388: fb ff ff 24 calli 8004018 <_Timer_server_Reset_tod_system_watchdog>
}
}
_Thread_Enable_dispatch();
800438c: f8 00 08 8d calli 80065c0 <_Thread_Enable_dispatch>
8004390: e3 ff ff dd bi 8004304 <_Timer_server_Schedule_operation_method+0x60>
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
8004394: 90 00 20 00 rcsr r4,IE
8004398: 34 02 ff fe mvi r2,-2
800439c: a0 82 10 00 and r2,r4,r2
80043a0: d0 02 00 00 wcsr IE,r2
snapshot = _Watchdog_Ticks_since_boot;
80043a4: 78 03 08 02 mvhi r3,0x802
80043a8: 38 63 4b 44 ori r3,r3,0x4b44
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
80043ac: 29 62 00 30 lw r2,(r11+48)
80043b0: 28 65 00 00 lw r5,(r3+0)
last_snapshot = ts->Interval_watchdogs.last_snapshot;
80043b4: 29 63 00 3c lw r3,(r11+60)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
80043b8: 35 66 00 34 addi r6,r11,52
80043bc: 44 46 00 08 be r2,r6,80043dc <_Timer_server_Schedule_operation_method+0x138>
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
80043c0: 28 47 00 10 lw r7,(r2+16)
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
80043c4: c8 a3 18 00 sub r3,r5,r3
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
80043c8: f4 e3 30 00 cmpgu r6,r7,r3
delta_interval -= delta;
80043cc: c8 e3 18 00 sub r3,r7,r3
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
80043d0: c8 06 30 00 sub r6,r0,r6
80043d4: a0 66 18 00 and r3,r3,r6
delta_interval -= delta;
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
80043d8: 58 43 00 10 sw (r2+16),r3
}
ts->Interval_watchdogs.last_snapshot = snapshot;
80043dc: 59 65 00 3c sw (r11+60),r5
_ISR_Enable( level );
80043e0: d0 04 00 00 wcsr IE,r4
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
80043e4: 34 22 00 10 addi r2,r1,16
80043e8: 35 61 00 30 addi r1,r11,48
80043ec: f8 00 0e d4 calli 8007f3c <_Watchdog_Insert>
if ( !ts->active ) {
80043f0: 41 61 00 7c lbu r1,(r11+124)
80043f4: 5c 20 ff c3 bne r1,r0,8004300 <_Timer_server_Schedule_operation_method+0x5c>
_Timer_server_Reset_interval_system_watchdog( ts );
80043f8: b9 60 08 00 mv r1,r11
80043fc: fb ff fe e6 calli 8003f94 <_Timer_server_Reset_interval_system_watchdog>
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
8004400: f8 00 08 70 calli 80065c0 <_Thread_Enable_dispatch>
8004404: e3 ff ff c0 bi 8004304 <_Timer_server_Schedule_operation_method+0x60>
08005a1c <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
8005a1c: 37 9c ff e8 addi sp,sp,-24
8005a20: 5b 8b 00 18 sw (sp+24),r11
8005a24: 5b 8c 00 14 sw (sp+20),r12
8005a28: 5b 8d 00 10 sw (sp+16),r13
8005a2c: 5b 8e 00 0c sw (sp+12),r14
8005a30: 5b 8f 00 08 sw (sp+8),r15
8005a34: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
8005a38: 78 0c 08 01 mvhi r12,0x801
8005a3c: 39 8c ea 4c ori r12,r12,0xea4c
8005a40: 29 8b 00 08 lw r11,(r12+8)
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
8005a44: b8 20 78 00 mv r15,r1
8005a48: b8 60 70 00 mv r14,r3
8005a4c: 20 4d 00 ff andi r13,r2,0xff
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
8005a50: 45 6c 00 09 be r11,r12,8005a74 <_User_extensions_Fatal+0x58><== NEVER TAKEN
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
8005a54: 29 64 00 30 lw r4,(r11+48)
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
8005a58: b9 e0 08 00 mv r1,r15
8005a5c: b9 a0 10 00 mv r2,r13
8005a60: b9 c0 18 00 mv r3,r14
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
8005a64: 44 80 00 02 be r4,r0,8005a6c <_User_extensions_Fatal+0x50>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
8005a68: d8 80 00 00 call r4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
8005a6c: 29 6b 00 04 lw r11,(r11+4)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
8005a70: 5d 6c ff f9 bne r11,r12,8005a54 <_User_extensions_Fatal+0x38>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
8005a74: 2b 9d 00 04 lw ra,(sp+4)
8005a78: 2b 8b 00 18 lw r11,(sp+24)
8005a7c: 2b 8c 00 14 lw r12,(sp+20)
8005a80: 2b 8d 00 10 lw r13,(sp+16)
8005a84: 2b 8e 00 0c lw r14,(sp+12)
8005a88: 2b 8f 00 08 lw r15,(sp+8)
8005a8c: 37 9c 00 18 addi sp,sp,24
8005a90: c3 a0 00 00 ret
08005854 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
8005854: 37 9c ff e8 addi sp,sp,-24
8005858: 5b 8b 00 18 sw (sp+24),r11
800585c: 5b 8c 00 14 sw (sp+20),r12
8005860: 5b 8d 00 10 sw (sp+16),r13
8005864: 5b 8e 00 0c sw (sp+12),r14
8005868: 5b 8f 00 08 sw (sp+8),r15
800586c: 5b 9d 00 04 sw (sp+4),ra
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
8005870: 78 04 08 01 mvhi r4,0x801
8005874: 38 84 e0 c4 ori r4,r4,0xe0c4
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
8005878: 78 03 08 01 mvhi r3,0x801
800587c: 78 01 08 01 mvhi r1,0x801
8005880: 38 63 ea 4c ori r3,r3,0xea4c
8005884: 38 21 e8 a8 ori r1,r1,0xe8a8
initial_extensions = Configuration.User_extension_table;
8005888: 28 8c 00 3c lw r12,(r4+60)
the_chain->permanent_null = NULL;
800588c: 34 0d 00 00 mvi r13,0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
8005890: 34 65 00 04 addi r5,r3,4
8005894: 34 22 00 04 addi r2,r1,4
8005898: 58 65 00 00 sw (r3+0),r5
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
800589c: 58 63 00 08 sw (r3+8),r3
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
80058a0: 58 22 00 00 sw (r1+0),r2
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
80058a4: 58 21 00 08 sw (r1+8),r1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
80058a8: 58 6d 00 04 sw (r3+4),r13
80058ac: 58 2d 00 04 sw (r1+4),r13
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
80058b0: 28 8e 00 38 lw r14,(r4+56)
initial_extensions = Configuration.User_extension_table;
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
80058b4: 45 8d 00 25 be r12,r13,8005948 <_User_extensions_Handler_initialization+0xf4>
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
80058b8: b5 ce 78 00 add r15,r14,r14
80058bc: b5 ee 78 00 add r15,r15,r14
80058c0: 34 02 00 04 mvi r2,4
80058c4: b9 e0 08 00 mv r1,r15
80058c8: fb ff ea 4a calli 80001f0 <__ashlsi3>
80058cc: b5 e1 78 00 add r15,r15,r1
80058d0: b5 ee 78 00 add r15,r15,r14
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
80058d4: b9 e0 08 00 mv r1,r15
80058d8: f8 00 01 b8 calli 8005fb8 <_Workspace_Allocate_or_fatal_error>
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
80058dc: b9 a0 10 00 mv r2,r13
80058e0: b9 e0 18 00 mv r3,r15
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
80058e4: b8 20 58 00 mv r11,r1
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
80058e8: f8 00 21 ab calli 800df94 <memset>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
80058ec: 45 cd 00 17 be r14,r13,8005948 <_User_extensions_Handler_initialization+0xf4><== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
80058f0: 29 81 00 00 lw r1,(r12+0)
80058f4: 35 ad 00 01 addi r13,r13,1
80058f8: 59 61 00 14 sw (r11+20),r1
80058fc: 29 82 00 04 lw r2,(r12+4)
_User_extensions_Add_set( extension );
8005900: b9 60 08 00 mv r1,r11
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
8005904: 59 62 00 18 sw (r11+24),r2
8005908: 29 82 00 08 lw r2,(r12+8)
800590c: 59 62 00 1c sw (r11+28),r2
8005910: 29 82 00 0c lw r2,(r12+12)
8005914: 59 62 00 20 sw (r11+32),r2
8005918: 29 82 00 10 lw r2,(r12+16)
800591c: 59 62 00 24 sw (r11+36),r2
8005920: 29 82 00 14 lw r2,(r12+20)
8005924: 59 62 00 28 sw (r11+40),r2
8005928: 29 82 00 18 lw r2,(r12+24)
800592c: 59 62 00 2c sw (r11+44),r2
8005930: 29 82 00 1c lw r2,(r12+28)
8005934: 35 8c 00 20 addi r12,r12,32
8005938: 59 62 00 30 sw (r11+48),r2
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
800593c: 35 6b 00 34 addi r11,r11,52
_User_extensions_Add_set( extension );
8005940: f8 00 13 2b calli 800a5ec <_User_extensions_Add_set>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
8005944: 55 cd ff eb bgu r14,r13,80058f0 <_User_extensions_Handler_initialization+0x9c>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
8005948: 2b 9d 00 04 lw ra,(sp+4)
800594c: 2b 8b 00 18 lw r11,(sp+24)
8005950: 2b 8c 00 14 lw r12,(sp+20)
8005954: 2b 8d 00 10 lw r13,(sp+16)
8005958: 2b 8e 00 0c lw r14,(sp+12)
800595c: 2b 8f 00 08 lw r15,(sp+8)
8005960: 37 9c 00 18 addi sp,sp,24
8005964: c3 a0 00 00 ret
08005968 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
8005968: 37 9c ff f0 addi sp,sp,-16
800596c: 5b 8b 00 10 sw (sp+16),r11
8005970: 5b 8c 00 0c sw (sp+12),r12
8005974: 5b 8d 00 08 sw (sp+8),r13
8005978: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
800597c: 78 0c 08 01 mvhi r12,0x801
8005980: 39 8c ea 4c ori r12,r12,0xea4c
8005984: 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;
8005988: 35 8c 00 04 addi r12,r12,4
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
800598c: b8 20 68 00 mv r13,r1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
8005990: 45 6c 00 07 be r11,r12,80059ac <_User_extensions_Thread_begin+0x44><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
8005994: 29 62 00 28 lw r2,(r11+40)
(*the_extension->Callouts.thread_begin)( executing );
8005998: b9 a0 08 00 mv r1,r13
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
800599c: 44 40 00 02 be r2,r0,80059a4 <_User_extensions_Thread_begin+0x3c>
(*the_extension->Callouts.thread_begin)( executing );
80059a0: d8 40 00 00 call r2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
80059a4: 29 6b 00 00 lw r11,(r11+0)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
80059a8: 5d 6c ff fb bne r11,r12,8005994 <_User_extensions_Thread_begin+0x2c>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing );
}
}
80059ac: 2b 9d 00 04 lw ra,(sp+4)
80059b0: 2b 8b 00 10 lw r11,(sp+16)
80059b4: 2b 8c 00 0c lw r12,(sp+12)
80059b8: 2b 8d 00 08 lw r13,(sp+8)
80059bc: 37 9c 00 10 addi sp,sp,16
80059c0: c3 a0 00 00 ret
08005a94 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
8005a94: 37 9c ff ec addi sp,sp,-20
8005a98: 5b 8b 00 14 sw (sp+20),r11
8005a9c: 5b 8c 00 10 sw (sp+16),r12
8005aa0: 5b 8d 00 0c sw (sp+12),r13
8005aa4: 5b 8e 00 08 sw (sp+8),r14
8005aa8: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
8005aac: 78 0d 08 01 mvhi r13,0x801
8005ab0: 39 ad ea 4c ori r13,r13,0xea4c
8005ab4: 29 ab 00 00 lw r11,(r13+0)
8005ab8: 35 ad 00 04 addi r13,r13,4
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
8005abc: b8 20 70 00 mv r14,r1
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
8005ac0: 45 6d 00 0b be r11,r13,8005aec <_User_extensions_Thread_create+0x58><== NEVER TAKEN
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
status = (*the_extension->Callouts.thread_create)(
8005ac4: 78 0c 08 01 mvhi r12,0x801
8005ac8: 39 8c e9 60 ori r12,r12,0xe960
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
8005acc: 29 63 00 14 lw r3,(r11+20)
status = (*the_extension->Callouts.thread_create)(
8005ad0: b9 c0 10 00 mv r2,r14
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
8005ad4: 44 60 00 04 be r3,r0,8005ae4 <_User_extensions_Thread_create+0x50>
status = (*the_extension->Callouts.thread_create)(
8005ad8: 29 81 00 00 lw r1,(r12+0)
8005adc: d8 60 00 00 call r3
_Thread_Executing,
the_thread
);
if ( !status )
8005ae0: 44 20 00 04 be r1,r0,8005af0 <_User_extensions_Thread_create+0x5c>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
8005ae4: 29 6b 00 00 lw r11,(r11+0)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
8005ae8: 5d 6d ff f9 bne r11,r13,8005acc <_User_extensions_Thread_create+0x38>
8005aec: 34 01 00 01 mvi r1,1
return false;
}
}
return true;
}
8005af0: 2b 9d 00 04 lw ra,(sp+4)
8005af4: 2b 8b 00 14 lw r11,(sp+20)
8005af8: 2b 8c 00 10 lw r12,(sp+16)
8005afc: 2b 8d 00 0c lw r13,(sp+12)
8005b00: 2b 8e 00 08 lw r14,(sp+8)
8005b04: 37 9c 00 14 addi sp,sp,20
8005b08: c3 a0 00 00 ret
08005b0c <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
8005b0c: 37 9c ff ec addi sp,sp,-20
8005b10: 5b 8b 00 14 sw (sp+20),r11
8005b14: 5b 8c 00 10 sw (sp+16),r12
8005b18: 5b 8d 00 0c sw (sp+12),r13
8005b1c: 5b 8e 00 08 sw (sp+8),r14
8005b20: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
8005b24: 78 0d 08 01 mvhi r13,0x801
8005b28: 39 ad ea 4c ori r13,r13,0xea4c
8005b2c: 29 ab 00 08 lw r11,(r13+8)
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
8005b30: b8 20 70 00 mv r14,r1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
8005b34: 45 6d 00 0a be r11,r13,8005b5c <_User_extensions_Thread_delete+0x50><== NEVER TAKEN
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
(*the_extension->Callouts.thread_delete)(
8005b38: 78 0c 08 01 mvhi r12,0x801
8005b3c: 39 8c e9 60 ori r12,r12,0xe960
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
8005b40: 29 63 00 20 lw r3,(r11+32)
(*the_extension->Callouts.thread_delete)(
8005b44: b9 c0 10 00 mv r2,r14
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
8005b48: 44 60 00 03 be r3,r0,8005b54 <_User_extensions_Thread_delete+0x48>
(*the_extension->Callouts.thread_delete)(
8005b4c: 29 81 00 00 lw r1,(r12+0)
8005b50: d8 60 00 00 call r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
8005b54: 29 6b 00 04 lw r11,(r11+4)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
8005b58: 5d 6d ff fa bne r11,r13,8005b40 <_User_extensions_Thread_delete+0x34>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
8005b5c: 2b 9d 00 04 lw ra,(sp+4)
8005b60: 2b 8b 00 14 lw r11,(sp+20)
8005b64: 2b 8c 00 10 lw r12,(sp+16)
8005b68: 2b 8d 00 0c lw r13,(sp+12)
8005b6c: 2b 8e 00 08 lw r14,(sp+8)
8005b70: 37 9c 00 14 addi sp,sp,20
8005b74: c3 a0 00 00 ret
080059c4 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
80059c4: 37 9c ff f0 addi sp,sp,-16
80059c8: 5b 8b 00 10 sw (sp+16),r11
80059cc: 5b 8c 00 0c sw (sp+12),r12
80059d0: 5b 8d 00 08 sw (sp+8),r13
80059d4: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
80059d8: 78 0c 08 01 mvhi r12,0x801
80059dc: 39 8c ea 4c ori r12,r12,0xea4c
80059e0: 29 8b 00 08 lw r11,(r12+8)
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
80059e4: b8 20 68 00 mv r13,r1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
80059e8: 45 6c 00 07 be r11,r12,8005a04 <_User_extensions_Thread_exitted+0x40><== NEVER TAKEN
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
80059ec: 29 62 00 2c lw r2,(r11+44)
(*the_extension->Callouts.thread_exitted)( executing );
80059f0: b9 a0 08 00 mv r1,r13
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
80059f4: 44 40 00 02 be r2,r0,80059fc <_User_extensions_Thread_exitted+0x38>
(*the_extension->Callouts.thread_exitted)( executing );
80059f8: d8 40 00 00 call r2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
80059fc: 29 6b 00 04 lw r11,(r11+4)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
8005a00: 5d 6c ff fb bne r11,r12,80059ec <_User_extensions_Thread_exitted+0x28>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
8005a04: 2b 9d 00 04 lw ra,(sp+4)
8005a08: 2b 8b 00 10 lw r11,(sp+16)
8005a0c: 2b 8c 00 0c lw r12,(sp+12)
8005a10: 2b 8d 00 08 lw r13,(sp+8)
8005a14: 37 9c 00 10 addi sp,sp,16
8005a18: c3 a0 00 00 ret
08006c6c <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
8006c6c: 37 9c ff ec addi sp,sp,-20
8006c70: 5b 8b 00 14 sw (sp+20),r11
8006c74: 5b 8c 00 10 sw (sp+16),r12
8006c78: 5b 8d 00 0c sw (sp+12),r13
8006c7c: 5b 8e 00 08 sw (sp+8),r14
8006c80: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
8006c84: 78 0d 08 02 mvhi r13,0x802
8006c88: 39 ad 3a ac ori r13,r13,0x3aac
8006c8c: 29 ab 00 00 lw r11,(r13+0)
8006c90: 35 ad 00 04 addi r13,r13,4
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
8006c94: b8 20 70 00 mv r14,r1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
8006c98: 45 6d 00 0a be r11,r13,8006cc0 <_User_extensions_Thread_restart+0x54><== NEVER TAKEN
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
(*the_extension->Callouts.thread_restart)(
8006c9c: 78 0c 08 02 mvhi r12,0x802
8006ca0: 39 8c 39 c0 ori r12,r12,0x39c0
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
8006ca4: 29 63 00 1c lw r3,(r11+28)
(*the_extension->Callouts.thread_restart)(
8006ca8: b9 c0 10 00 mv r2,r14
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
8006cac: 44 60 00 03 be r3,r0,8006cb8 <_User_extensions_Thread_restart+0x4c>
(*the_extension->Callouts.thread_restart)(
8006cb0: 29 81 00 00 lw r1,(r12+0)
8006cb4: d8 60 00 00 call r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
8006cb8: 29 6b 00 00 lw r11,(r11+0)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
8006cbc: 5d 6d ff fa bne r11,r13,8006ca4 <_User_extensions_Thread_restart+0x38>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
8006cc0: 2b 9d 00 04 lw ra,(sp+4)
8006cc4: 2b 8b 00 14 lw r11,(sp+20)
8006cc8: 2b 8c 00 10 lw r12,(sp+16)
8006ccc: 2b 8d 00 0c lw r13,(sp+12)
8006cd0: 2b 8e 00 08 lw r14,(sp+8)
8006cd4: 37 9c 00 14 addi sp,sp,20
8006cd8: c3 a0 00 00 ret
08005b78 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
8005b78: 37 9c ff ec addi sp,sp,-20
8005b7c: 5b 8b 00 14 sw (sp+20),r11
8005b80: 5b 8c 00 10 sw (sp+16),r12
8005b84: 5b 8d 00 0c sw (sp+12),r13
8005b88: 5b 8e 00 08 sw (sp+8),r14
8005b8c: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
8005b90: 78 0d 08 01 mvhi r13,0x801
8005b94: 39 ad ea 4c ori r13,r13,0xea4c
8005b98: 29 ab 00 00 lw r11,(r13+0)
8005b9c: 35 ad 00 04 addi r13,r13,4
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
8005ba0: b8 20 70 00 mv r14,r1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
8005ba4: 45 6d 00 0a be r11,r13,8005bcc <_User_extensions_Thread_start+0x54><== NEVER TAKEN
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
(*the_extension->Callouts.thread_start)(
8005ba8: 78 0c 08 01 mvhi r12,0x801
8005bac: 39 8c e9 60 ori r12,r12,0xe960
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
8005bb0: 29 63 00 18 lw r3,(r11+24)
(*the_extension->Callouts.thread_start)(
8005bb4: b9 c0 10 00 mv r2,r14
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
8005bb8: 44 60 00 03 be r3,r0,8005bc4 <_User_extensions_Thread_start+0x4c>
(*the_extension->Callouts.thread_start)(
8005bbc: 29 81 00 00 lw r1,(r12+0)
8005bc0: d8 60 00 00 call r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
8005bc4: 29 6b 00 00 lw r11,(r11+0)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
8005bc8: 5d 6d ff fa bne r11,r13,8005bb0 <_User_extensions_Thread_start+0x38>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
8005bcc: 2b 9d 00 04 lw ra,(sp+4)
8005bd0: 2b 8b 00 14 lw r11,(sp+20)
8005bd4: 2b 8c 00 10 lw r12,(sp+16)
8005bd8: 2b 8d 00 0c lw r13,(sp+12)
8005bdc: 2b 8e 00 08 lw r14,(sp+8)
8005be0: 37 9c 00 14 addi sp,sp,20
8005be4: c3 a0 00 00 ret
08005be8 <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
8005be8: 37 9c ff ec addi sp,sp,-20
8005bec: 5b 8b 00 14 sw (sp+20),r11
8005bf0: 5b 8c 00 10 sw (sp+16),r12
8005bf4: 5b 8d 00 0c sw (sp+12),r13
8005bf8: 5b 8e 00 08 sw (sp+8),r14
8005bfc: 5b 9d 00 04 sw (sp+4),ra
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
8005c00: 78 0c 08 01 mvhi r12,0x801
8005c04: 39 8c e8 a8 ori r12,r12,0xe8a8
8005c08: 29 8b 00 00 lw r11,(r12+0)
8005c0c: 35 8c 00 04 addi r12,r12,4
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
8005c10: b8 20 70 00 mv r14,r1
8005c14: b8 40 68 00 mv r13,r2
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
8005c18: 45 6c 00 07 be r11,r12,8005c34 <_User_extensions_Thread_switch+0x4c><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
8005c1c: 29 63 00 08 lw r3,(r11+8)
8005c20: b9 c0 08 00 mv r1,r14
8005c24: b9 a0 10 00 mv r2,r13
8005c28: d8 60 00 00 call r3
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
8005c2c: 29 6b 00 00 lw r11,(r11+0)
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
8005c30: 5d 6c ff fb bne r11,r12,8005c1c <_User_extensions_Thread_switch+0x34>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
8005c34: 2b 9d 00 04 lw ra,(sp+4)
8005c38: 2b 8b 00 14 lw r11,(sp+20)
8005c3c: 2b 8c 00 10 lw r12,(sp+16)
8005c40: 2b 8d 00 0c lw r13,(sp+12)
8005c44: 2b 8e 00 08 lw r14,(sp+8)
8005c48: 37 9c 00 14 addi sp,sp,20
8005c4c: c3 a0 00 00 ret
08008044 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
8008044: 37 9c ff e4 addi sp,sp,-28
8008048: 5b 8b 00 1c sw (sp+28),r11
800804c: 5b 8c 00 18 sw (sp+24),r12
8008050: 5b 8d 00 14 sw (sp+20),r13
8008054: 5b 8e 00 10 sw (sp+16),r14
8008058: 5b 8f 00 0c sw (sp+12),r15
800805c: 5b 90 00 08 sw (sp+8),r16
8008060: 5b 9d 00 04 sw (sp+4),ra
8008064: b8 20 60 00 mv r12,r1
8008068: b8 60 58 00 mv r11,r3
ISR_Level level;
_ISR_Disable( level );
800806c: 90 00 20 00 rcsr r4,IE
8008070: 34 01 ff fe mvi r1,-2
8008074: a0 81 08 00 and r1,r4,r1
8008078: 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));
800807c: 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;
8008080: 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 ) ) {
8008084: 44 2e 00 04 be r1,r14,8008094 <_Watchdog_Adjust+0x50>
switch ( direction ) {
8008088: 44 40 00 11 be r2,r0,80080cc <_Watchdog_Adjust+0x88>
800808c: 34 03 00 01 mvi r3,1
8008090: 44 43 00 0b be r2,r3,80080bc <_Watchdog_Adjust+0x78> <== ALWAYS TAKEN
}
break;
}
}
_ISR_Enable( level );
8008094: d0 04 00 00 wcsr IE,r4
}
8008098: 2b 9d 00 04 lw ra,(sp+4)
800809c: 2b 8b 00 1c lw r11,(sp+28)
80080a0: 2b 8c 00 18 lw r12,(sp+24)
80080a4: 2b 8d 00 14 lw r13,(sp+20)
80080a8: 2b 8e 00 10 lw r14,(sp+16)
80080ac: 2b 8f 00 0c lw r15,(sp+12)
80080b0: 2b 90 00 08 lw r16,(sp+8)
80080b4: 37 9c 00 1c addi sp,sp,28
80080b8: c3 a0 00 00 ret
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
80080bc: 28 22 00 10 lw r2,(r1+16)
80080c0: b4 4b 58 00 add r11,r2,r11
80080c4: 58 2b 00 10 sw (r1+16),r11
break;
80080c8: e3 ff ff f3 bi 8008094 <_Watchdog_Adjust+0x50>
case WATCHDOG_FORWARD:
while ( units ) {
80080cc: 44 62 ff f2 be r3,r2,8008094 <_Watchdog_Adjust+0x50> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
80080d0: 28 2d 00 10 lw r13,(r1+16)
_Watchdog_First( header )->delta_interval -= units;
break;
80080d4: b8 80 18 00 mv r3,r4
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
80080d8: 34 10 00 01 mvi r16,1
_ISR_Enable( level );
_Watchdog_Tickle( header );
_ISR_Disable( level );
80080dc: 34 0f ff fe mvi r15,-2
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
80080e0: 51 6d 00 02 bgeu r11,r13,80080e8 <_Watchdog_Adjust+0xa4> <== ALWAYS TAKEN
80080e4: e0 00 00 11 bi 8008128 <_Watchdog_Adjust+0xe4> <== NOT EXECUTED
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
80080e8: 58 30 00 10 sw (r1+16),r16
_ISR_Enable( level );
80080ec: d0 03 00 00 wcsr IE,r3
_Watchdog_Tickle( header );
80080f0: b9 80 08 00 mv r1,r12
80080f4: f8 00 00 b0 calli 80083b4 <_Watchdog_Tickle>
_ISR_Disable( level );
80080f8: 90 00 10 00 rcsr r2,IE
80080fc: a0 4f 08 00 and r1,r2,r15
8008100: 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));
8008104: 29 84 00 00 lw r4,(r12+0)
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
8008108: c9 6d 58 00 sub r11,r11,r13
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
800810c: b8 40 18 00 mv r3,r2
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
8008110: b8 80 08 00 mv r1,r4
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
8008114: 45 c4 00 08 be r14,r4,8008134 <_Watchdog_Adjust+0xf0>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
8008118: 45 60 00 07 be r11,r0,8008134 <_Watchdog_Adjust+0xf0> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
800811c: 28 2d 00 10 lw r13,(r1+16)
8008120: 51 6d ff f2 bgeu r11,r13,80080e8 <_Watchdog_Adjust+0xa4>
8008124: b8 60 20 00 mv r4,r3
_Watchdog_First( header )->delta_interval -= units;
8008128: c9 ab 58 00 sub r11,r13,r11
800812c: 58 2b 00 10 sw (r1+16),r11
break;
8008130: e3 ff ff d9 bi 8008094 <_Watchdog_Adjust+0x50>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
8008134: b8 40 20 00 mv r4,r2
8008138: e3 ff ff d7 bi 8008094 <_Watchdog_Adjust+0x50>
08005c50 <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
8005c50: 37 9c ff f8 addi sp,sp,-8
8005c54: 5b 8b 00 08 sw (sp+8),r11
8005c58: 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;
8005c5c: 78 03 08 01 mvhi r3,0x801
8005c60: 38 63 e9 3c ori r3,r3,0xe93c
8005c64: 28 69 00 00 lw r9,(r3+0)
_ISR_Disable( level );
8005c68: 90 00 30 00 rcsr r6,IE
8005c6c: 34 08 ff fe mvi r8,-2
8005c70: a0 c8 40 00 and r8,r6,r8
8005c74: d0 08 00 00 wcsr IE,r8
/*
* 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 ) {
8005c78: 28 43 00 08 lw r3,(r2+8)
8005c7c: 5c 60 00 3e bne r3,r0,8005d74 <_Watchdog_Insert+0x124> <== NEVER TAKEN
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
8005c80: 78 0c 08 01 mvhi r12,0x801
8005c84: 39 8c e9 f0 ori r12,r12,0xe9f0
8005c88: 29 83 00 00 lw r3,(r12+0)
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
8005c8c: 34 0a 00 01 mvi r10,1
8005c90: 78 07 08 01 mvhi r7,0x801
_Watchdog_Sync_count++;
8005c94: b4 6a 18 00 add r3,r3,r10
8005c98: 59 83 00 00 sw (r12+0),r3
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
8005c9c: 58 4a 00 08 sw (r2+8),r10
8005ca0: 38 e7 e9 5c ori r7,r7,0xe95c
_Watchdog_Sync_count++;
restart:
delta_interval = the_watchdog->initial;
8005ca4: 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 ;
8005ca8: 28 23 00 00 lw r3,(r1+0)
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
8005cac: 44 80 00 14 be r4,r0,8005cfc <_Watchdog_Insert+0xac>
8005cb0: 28 65 00 00 lw r5,(r3+0)
8005cb4: 44 a0 00 12 be r5,r0,8005cfc <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
8005cb8: 28 65 00 10 lw r5,(r3+16)
8005cbc: 54 a4 00 0e bgu r5,r4,8005cf4 <_Watchdog_Insert+0xa4>
* 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 );
8005cc0: d0 06 00 00 wcsr IE,r6
8005cc4: d0 08 00 00 wcsr IE,r8
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
8005cc8: 28 4b 00 08 lw r11,(r2+8)
8005ccc: 5d 6a 00 19 bne r11,r10,8005d30 <_Watchdog_Insert+0xe0> <== NEVER TAKEN
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
8005cd0: 28 eb 00 00 lw r11,(r7+0)
8005cd4: 55 69 00 2d bgu r11,r9,8005d88 <_Watchdog_Insert+0x138>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
8005cd8: c8 85 20 00 sub r4,r4,r5
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
8005cdc: 28 63 00 00 lw r3,(r3+0)
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
8005ce0: 44 80 00 07 be r4,r0,8005cfc <_Watchdog_Insert+0xac>
8005ce4: 28 65 00 00 lw r5,(r3+0)
8005ce8: 44 a0 00 05 be r5,r0,8005cfc <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
8005cec: 28 65 00 10 lw r5,(r3+16)
8005cf0: 50 85 00 19 bgeu r4,r5,8005d54 <_Watchdog_Insert+0x104>
after->delta_interval -= delta_interval;
8005cf4: c8 a4 28 00 sub r5,r5,r4
8005cf8: 58 65 00 10 sw (r3+16),r5
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
8005cfc: 28 63 00 04 lw r3,(r3+4)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
8005d00: 78 01 08 01 mvhi r1,0x801
8005d04: 38 21 e9 f4 ori r1,r1,0xe9f4
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
8005d08: 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;
8005d0c: 28 24 00 00 lw r4,(r1+0)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
8005d10: 28 61 00 00 lw r1,(r3+0)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
8005d14: 58 43 00 04 sw (r2+4),r3
before_node = after_node->next;
after_node->next = the_node;
8005d18: 58 62 00 00 sw (r3+0),r2
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
8005d1c: 34 03 00 02 mvi r3,2
8005d20: 58 44 00 14 sw (r2+20),r4
8005d24: 58 43 00 08 sw (r2+8),r3
the_node->next = before_node;
before_node->previous = the_node;
8005d28: 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;
8005d2c: 58 41 00 00 sw (r2+0),r1
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
8005d30: 58 e9 00 00 sw (r7+0),r9
_Watchdog_Sync_count--;
8005d34: 29 81 00 00 lw r1,(r12+0)
8005d38: 34 21 ff ff addi r1,r1,-1
8005d3c: 59 81 00 00 sw (r12+0),r1
_ISR_Enable( level );
8005d40: d0 06 00 00 wcsr IE,r6
}
8005d44: 2b 8b 00 08 lw r11,(sp+8)
8005d48: 2b 8c 00 04 lw r12,(sp+4)
8005d4c: 37 9c 00 08 addi sp,sp,8
8005d50: c3 a0 00 00 ret
* 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 );
8005d54: d0 06 00 00 wcsr IE,r6
8005d58: d0 08 00 00 wcsr IE,r8
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
8005d5c: 28 4b 00 08 lw r11,(r2+8)
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
8005d60: c8 85 20 00 sub r4,r4,r5
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
8005d64: 5d 6a ff f3 bne r11,r10,8005d30 <_Watchdog_Insert+0xe0> <== NEVER TAKEN
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
8005d68: 28 e5 00 00 lw r5,(r7+0)
8005d6c: 54 a9 00 07 bgu r5,r9,8005d88 <_Watchdog_Insert+0x138>
8005d70: e3 ff ff db bi 8005cdc <_Watchdog_Insert+0x8c>
* 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 ) {
_ISR_Enable( level );
8005d74: d0 06 00 00 wcsr IE,r6
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
8005d78: 2b 8b 00 08 lw r11,(sp+8)
8005d7c: 2b 8c 00 04 lw r12,(sp+4)
8005d80: 37 9c 00 08 addi sp,sp,8
8005d84: c3 a0 00 00 ret
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
_Watchdog_Sync_level = insert_isr_nest_level;
8005d88: 58 e9 00 00 sw (r7+0),r9
goto restart;
8005d8c: e3 ff ff c6 bi 8005ca4 <_Watchdog_Insert+0x54>
08005dec <_Watchdog_Remove>:
{
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
8005dec: 90 00 20 00 rcsr r4,IE
8005df0: 34 02 ff fe mvi r2,-2
8005df4: a0 82 10 00 and r2,r4,r2
8005df8: d0 02 00 00 wcsr IE,r2
previous_state = the_watchdog->state;
8005dfc: 28 22 00 08 lw r2,(r1+8)
switch ( previous_state ) {
8005e00: 34 03 00 01 mvi r3,1
8005e04: 44 43 00 28 be r2,r3,8005ea4 <_Watchdog_Remove+0xb8> <== NEVER TAKEN
8005e08: 5c 40 00 08 bne r2,r0,8005e28 <_Watchdog_Remove+0x3c>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
8005e0c: 78 03 08 01 mvhi r3,0x801
8005e10: 38 63 e9 f4 ori r3,r3,0xe9f4
8005e14: 28 63 00 00 lw r3,(r3+0)
8005e18: 58 23 00 18 sw (r1+24),r3
_ISR_Enable( level );
8005e1c: d0 04 00 00 wcsr IE,r4
return( previous_state );
}
8005e20: b8 40 08 00 mv r1,r2
8005e24: c3 a0 00 00 ret
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
8005e28: 34 03 00 03 mvi r3,3
8005e2c: 54 43 ff f8 bgu r2,r3,8005e0c <_Watchdog_Remove+0x20> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
8005e30: 28 23 00 00 lw r3,(r1+0)
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
8005e34: 34 05 00 00 mvi r5,0
8005e38: 58 25 00 08 sw (r1+8),r5
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
8005e3c: 28 65 00 00 lw r5,(r3+0)
8005e40: 44 a0 00 05 be r5,r0,8005e54 <_Watchdog_Remove+0x68>
next_watchdog->delta_interval += the_watchdog->delta_interval;
8005e44: 28 66 00 10 lw r6,(r3+16)
8005e48: 28 25 00 10 lw r5,(r1+16)
8005e4c: b4 c5 28 00 add r5,r6,r5
8005e50: 58 65 00 10 sw (r3+16),r5
if ( _Watchdog_Sync_count )
8005e54: 78 05 08 01 mvhi r5,0x801
8005e58: 38 a5 e9 f0 ori r5,r5,0xe9f0
8005e5c: 28 a5 00 00 lw r5,(r5+0)
8005e60: 44 a0 00 07 be r5,r0,8005e7c <_Watchdog_Remove+0x90>
_Watchdog_Sync_level = _ISR_Nest_level;
8005e64: 78 05 08 01 mvhi r5,0x801
8005e68: 38 a5 e9 3c ori r5,r5,0xe93c
8005e6c: 28 a6 00 00 lw r6,(r5+0)
8005e70: 78 05 08 01 mvhi r5,0x801
8005e74: 38 a5 e9 5c ori r5,r5,0xe95c
8005e78: 58 a6 00 00 sw (r5+0),r6
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
8005e7c: 28 25 00 04 lw r5,(r1+4)
next->previous = previous;
previous->next = next;
8005e80: 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;
8005e84: 58 65 00 04 sw (r3+4),r5
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
8005e88: 78 03 08 01 mvhi r3,0x801
8005e8c: 38 63 e9 f4 ori r3,r3,0xe9f4
8005e90: 28 63 00 00 lw r3,(r3+0)
8005e94: 58 23 00 18 sw (r1+24),r3
_ISR_Enable( level );
8005e98: d0 04 00 00 wcsr IE,r4
return( previous_state );
}
8005e9c: b8 40 08 00 mv r1,r2
8005ea0: c3 a0 00 00 ret
/*
* 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;
8005ea4: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
8005ea8: 58 23 00 08 sw (r1+8),r3 <== NOT EXECUTED
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
8005eac: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED
8005eb0: 38 63 e9 f4 ori r3,r3,0xe9f4 <== NOT EXECUTED
8005eb4: 28 63 00 00 lw r3,(r3+0) <== NOT EXECUTED
8005eb8: 58 23 00 18 sw (r1+24),r3 <== NOT EXECUTED
_ISR_Enable( level );
8005ebc: d0 04 00 00 wcsr IE,r4 <== NOT EXECUTED
return( previous_state );
}
8005ec0: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
8005ec4: c3 a0 00 00 ret <== NOT EXECUTED
08007d98 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
8007d98: 37 9c ff ec addi sp,sp,-20
8007d9c: 5b 8b 00 14 sw (sp+20),r11
8007da0: 5b 8c 00 10 sw (sp+16),r12
8007da4: 5b 8d 00 0c sw (sp+12),r13
8007da8: 5b 8e 00 08 sw (sp+8),r14
8007dac: 5b 9d 00 04 sw (sp+4),ra
8007db0: b8 20 70 00 mv r14,r1
8007db4: b8 40 60 00 mv r12,r2
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
8007db8: 90 00 68 00 rcsr r13,IE
8007dbc: 34 01 ff fe mvi r1,-2
8007dc0: a1 a1 08 00 and r1,r13,r1
8007dc4: d0 01 00 00 wcsr IE,r1
printk( "Watchdog Chain: %s %p\n", name, header );
8007dc8: 78 01 08 02 mvhi r1,0x802
8007dcc: b9 80 18 00 mv r3,r12
8007dd0: 38 21 1e 08 ori r1,r1,0x1e08
8007dd4: b9 c0 10 00 mv r2,r14
8007dd8: fb ff eb 9e calli 8002c50 <printk>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
8007ddc: 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;
8007de0: 35 8c 00 04 addi r12,r12,4
if ( !_Chain_Is_empty( header ) ) {
8007de4: 45 6c 00 12 be r11,r12,8007e2c <_Watchdog_Report_chain+0x94>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
8007de8: b9 60 10 00 mv r2,r11
8007dec: 34 01 00 00 mvi r1,0
8007df0: f8 00 00 13 calli 8007e3c <_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 )
8007df4: 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 ;
8007df8: 5d 6c ff fc bne r11,r12,8007de8 <_Watchdog_Report_chain+0x50><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
8007dfc: 78 01 08 02 mvhi r1,0x802
8007e00: 38 21 1e 20 ori r1,r1,0x1e20
8007e04: b9 c0 10 00 mv r2,r14
8007e08: fb ff eb 92 calli 8002c50 <printk>
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
8007e0c: d0 0d 00 00 wcsr IE,r13
}
8007e10: 2b 9d 00 04 lw ra,(sp+4)
8007e14: 2b 8b 00 14 lw r11,(sp+20)
8007e18: 2b 8c 00 10 lw r12,(sp+16)
8007e1c: 2b 8d 00 0c lw r13,(sp+12)
8007e20: 2b 8e 00 08 lw r14,(sp+8)
8007e24: 37 9c 00 14 addi sp,sp,20
8007e28: c3 a0 00 00 ret
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
8007e2c: 78 01 08 02 mvhi r1,0x802
8007e30: 38 21 1e 30 ori r1,r1,0x1e30
8007e34: fb ff eb 87 calli 8002c50 <printk>
8007e38: e3 ff ff f5 bi 8007e0c <_Watchdog_Report_chain+0x74>
08005ec8 <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
8005ec8: 37 9c ff e4 addi sp,sp,-28
8005ecc: 5b 8b 00 1c sw (sp+28),r11
8005ed0: 5b 8c 00 18 sw (sp+24),r12
8005ed4: 5b 8d 00 14 sw (sp+20),r13
8005ed8: 5b 8e 00 10 sw (sp+16),r14
8005edc: 5b 8f 00 0c sw (sp+12),r15
8005ee0: 5b 90 00 08 sw (sp+8),r16
8005ee4: 5b 9d 00 04 sw (sp+4),ra
8005ee8: 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 );
8005eec: 90 00 68 00 rcsr r13,IE
8005ef0: 34 01 ff fe mvi r1,-2
8005ef4: a1 a1 08 00 and r1,r13,r1
8005ef8: 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));
8005efc: 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;
8005f00: 35 8e 00 04 addi r14,r12,4
if ( _Chain_Is_empty( header ) )
8005f04: 45 6e 00 2b be r11,r14,8005fb0 <_Watchdog_Tickle+0xe8>
* to be inserted has already had its delta_interval adjusted to 0, and
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
8005f08: 29 61 00 10 lw r1,(r11+16)
8005f0c: 5c 20 00 26 bne r1,r0,8005fa4 <_Watchdog_Tickle+0xdc>
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
_ISR_Enable( level );
switch( watchdog_state ) {
8005f10: 34 10 00 02 mvi r16,2
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
8005f14: 34 0f ff fe mvi r15,-2
8005f18: e0 00 00 0a bi 8005f40 <_Watchdog_Tickle+0x78>
8005f1c: 90 00 10 00 rcsr r2,IE <== NOT EXECUTED
8005f20: a0 4f 08 00 and r1,r2,r15 <== NOT EXECUTED
8005f24: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
8005f28: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED
8005f2c: b8 40 68 00 mv r13,r2 <== NOT EXECUTED
8005f30: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
8005f34: 45 c1 00 12 be r14,r1,8005f7c <_Watchdog_Tickle+0xb4> <== NOT EXECUTED
8005f38: 28 21 00 10 lw r1,(r1+16)
8005f3c: 5c 20 00 10 bne r1,r0,8005f7c <_Watchdog_Tickle+0xb4>
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
8005f40: b9 60 08 00 mv r1,r11
8005f44: fb ff ff aa calli 8005dec <_Watchdog_Remove>
_ISR_Enable( level );
8005f48: d0 0d 00 00 wcsr IE,r13
switch( watchdog_state ) {
8005f4c: 5c 30 ff f4 bne r1,r16,8005f1c <_Watchdog_Tickle+0x54> <== NEVER TAKEN
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
8005f50: 29 62 00 24 lw r2,(r11+36)
8005f54: 29 63 00 1c lw r3,(r11+28)
8005f58: 29 61 00 20 lw r1,(r11+32)
8005f5c: d8 60 00 00 call r3
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
8005f60: 90 00 10 00 rcsr r2,IE
8005f64: a0 4f 08 00 and r1,r2,r15
8005f68: d0 01 00 00 wcsr IE,r1
8005f6c: 29 81 00 00 lw r1,(r12+0)
8005f70: b8 40 68 00 mv r13,r2
8005f74: b8 20 58 00 mv r11,r1
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
8005f78: 5d c1 ff f0 bne r14,r1,8005f38 <_Watchdog_Tickle+0x70>
leave:
_ISR_Enable(level);
8005f7c: d0 02 00 00 wcsr IE,r2
}
8005f80: 2b 9d 00 04 lw ra,(sp+4)
8005f84: 2b 8b 00 1c lw r11,(sp+28)
8005f88: 2b 8c 00 18 lw r12,(sp+24)
8005f8c: 2b 8d 00 14 lw r13,(sp+20)
8005f90: 2b 8e 00 10 lw r14,(sp+16)
8005f94: 2b 8f 00 0c lw r15,(sp+12)
8005f98: 2b 90 00 08 lw r16,(sp+8)
8005f9c: 37 9c 00 1c addi sp,sp,28
8005fa0: c3 a0 00 00 ret
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
the_watchdog->delta_interval--;
8005fa4: 34 21 ff ff addi r1,r1,-1
8005fa8: 59 61 00 10 sw (r11+16),r1
if ( the_watchdog->delta_interval != 0 )
8005fac: 44 20 ff d9 be r1,r0,8005f10 <_Watchdog_Tickle+0x48>
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
8005fb0: b9 a0 10 00 mv r2,r13
8005fb4: e3 ff ff f2 bi 8005f7c <_Watchdog_Tickle+0xb4>
08005fb8 <_Workspace_Allocate_or_fatal_error>:
* _Workspace_Allocate_or_fatal_error
*/
void *_Workspace_Allocate_or_fatal_error(
size_t size
)
{
8005fb8: 37 9c ff fc addi sp,sp,-4
8005fbc: 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 );
8005fc0: 34 03 00 00 mvi r3,0
8005fc4: b8 20 10 00 mv r2,r1
8005fc8: 78 01 08 01 mvhi r1,0x801
8005fcc: 38 21 e8 c8 ori r1,r1,0xe8c8
8005fd0: b8 60 20 00 mv r4,r3
8005fd4: f8 00 0d ed calli 8009788 <_Heap_Allocate_aligned_with_boundary>
__builtin_return_address( 1 ),
memory
);
#endif
if ( memory == NULL )
8005fd8: 44 20 00 04 be r1,r0,8005fe8 <_Workspace_Allocate_or_fatal_error+0x30><== NEVER TAKEN
true,
INTERNAL_ERROR_WORKSPACE_ALLOCATION
);
return memory;
}
8005fdc: 2b 9d 00 04 lw ra,(sp+4)
8005fe0: 37 9c 00 04 addi sp,sp,4
8005fe4: c3 a0 00 00 ret
memory
);
#endif
if ( memory == NULL )
_Internal_error_Occurred(
8005fe8: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8005fec: 34 03 00 04 mvi r3,4 <== NOT EXECUTED
8005ff0: fb ff f5 d9 calli 8003754 <_Internal_error_Occurred> <== NOT EXECUTED
0801bad4 <_exit>:
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
FINI_SYMBOL();
801bad4: 37 9c ff f8 addi sp,sp,-8
801bad8: 5b 9d 00 04 sw (sp+4),ra
801badc: 5b 81 00 08 sw (sp+8),r1
801bae0: f8 00 02 90 calli 801c520 <__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();
801bae4: fb ff ff d7 calli 801ba40 <libc_wrapup>
rtems_shutdown_executive(status);
801bae8: 2b 81 00 08 lw r1,(sp+8)
801baec: f8 00 00 64 calli 801bc7c <rtems_shutdown_executive>
801baf0: e0 00 00 00 bi 801baf0 <_exit+0x1c> <== NOT EXECUTED
08002510 <_fcntl_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
int cmd,
int arg
)
{
8002510: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8002514: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return fcntl( fd, cmd, arg );
8002518: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
800251c: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
8002520: b8 80 18 00 mv r3,r4 <== NOT EXECUTED
8002524: fb ff ff 5c calli 8002294 <fcntl> <== NOT EXECUTED
}
8002528: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800252c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8002530: c3 a0 00 00 ret <== NOT EXECUTED
0800b6f0 <_getpid_r>:
pid_t _getpid_r(
struct _reent *ptr __attribute__((unused))
)
{
return getpid();
}
800b6f0: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
800b6f4: c3 a0 00 00 ret <== NOT EXECUTED
08007be4 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
8007be4: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8007be8: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return gettimeofday( tp, tzp );
8007bec: fb ff ff e0 calli 8007b6c <gettimeofday> <== NOT EXECUTED
}
8007bf0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8007bf4: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8007bf8: c3 a0 00 00 ret <== NOT EXECUTED
08003230 <_link_r>:
int _link_r(
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
8003230: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8003234: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return link( existing, new );
8003238: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
800323c: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
8003240: fb ff ff 64 calli 8002fd0 <link> <== NOT EXECUTED
}
8003244: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003248: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
800324c: c3 a0 00 00 ret <== NOT EXECUTED
0801bc38 <_realloc_r>:
void *_realloc_r(
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
801bc38: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
801bc3c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return realloc( ptr, size );
801bc40: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
801bc44: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
801bc48: f8 00 00 1b calli 801bcb4 <realloc> <== NOT EXECUTED
}
801bc4c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
801bc50: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
801bc54: c3 a0 00 00 ret <== NOT EXECUTED
0800661c <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
800661c: 37 9c ff a8 addi sp,sp,-88
8006620: 5b 8b 00 18 sw (sp+24),r11
8006624: 5b 8c 00 14 sw (sp+20),r12
8006628: 5b 8d 00 10 sw (sp+16),r13
800662c: 5b 8e 00 0c sw (sp+12),r14
8006630: 5b 8f 00 08 sw (sp+8),r15
8006634: 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 );
8006638: b8 40 08 00 mv r1,r2
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
800663c: b8 40 60 00 mv r12,r2
8006640: b8 60 68 00 mv r13,r3
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
8006644: fb ff f9 8c calli 8004c74 <rtems_filesystem_dirname>
8006648: b8 20 58 00 mv r11,r1
if ( old_parent_pathlen == 0 )
800664c: 5c 20 00 e1 bne r1,r0,80069d0 <_rename_r+0x3b4>
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
8006650: 41 82 00 00 lbu r2,(r12+0)
8006654: 64 43 00 5c cmpei r3,r2,92
8006658: 64 41 00 2f cmpei r1,r2,47
800665c: b8 61 08 00 or r1,r3,r1
8006660: 44 2b 00 6b be r1,r11,800680c <_rename_r+0x1f0> <== ALWAYS TAKEN
8006664: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8006668: 38 42 a1 30 ori r2,r2,0xa130 <== NOT EXECUTED
800666c: 28 44 00 00 lw r4,(r2+0) <== NOT EXECUTED
8006670: 34 0e 00 00 mvi r14,0 <== NOT EXECUTED
8006674: 28 81 00 18 lw r1,(r4+24) <== NOT EXECUTED
8006678: 5b 81 00 30 sw (sp+48),r1 <== NOT EXECUTED
800667c: 28 82 00 1c lw r2,(r4+28) <== NOT EXECUTED
8006680: 5b 82 00 34 sw (sp+52),r2 <== NOT EXECUTED
8006684: 28 83 00 20 lw r3,(r4+32) <== NOT EXECUTED
8006688: 5b 83 00 38 sw (sp+56),r3 <== NOT EXECUTED
800668c: 28 81 00 24 lw r1,(r4+36) <== NOT EXECUTED
8006690: 5b 81 00 3c sw (sp+60),r1 <== NOT EXECUTED
8006694: 28 84 00 28 lw r4,(r4+40) <== NOT EXECUTED
8006698: 5b 84 00 40 sw (sp+64),r4 <== NOT EXECUTED
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
800669c: 2b 82 00 30 lw r2,(sp+48)
80066a0: 2b 83 00 34 lw r3,(sp+52)
name = old + old_parent_pathlen;
80066a4: b5 8b 58 00 add r11,r12,r11
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
80066a8: 5b 82 00 44 sw (sp+68),r2
80066ac: 2b 82 00 38 lw r2,(sp+56)
80066b0: 5b 83 00 48 sw (sp+72),r3
80066b4: 2b 83 00 3c lw r3,(sp+60)
80066b8: 5b 82 00 4c sw (sp+76),r2
80066bc: 2b 82 00 40 lw r2,(sp+64)
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
80066c0: b9 60 08 00 mv r1,r11
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
80066c4: 5b 83 00 50 sw (sp+80),r3
80066c8: 5b 82 00 54 sw (sp+84),r2
name = old + old_parent_pathlen;
80066cc: 5b 8b 00 58 sw (sp+88),r11
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
80066d0: f8 00 42 9a calli 8017138 <strlen>
80066d4: b8 20 10 00 mv r2,r1
80066d8: b9 60 08 00 mv r1,r11
80066dc: fb ff f9 4d calli 8004c10 <rtems_filesystem_prefix_separators>
80066e0: b5 61 58 00 add r11,r11,r1
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
80066e4: b9 60 08 00 mv r1,r11
* 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 ) );
80066e8: 5b 8b 00 58 sw (sp+88),r11
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
80066ec: f8 00 42 93 calli 8017138 <strlen>
80066f0: 34 03 00 00 mvi r3,0
80066f4: 37 8c 00 44 addi r12,sp,68
80066f8: b8 20 10 00 mv r2,r1
80066fc: b9 80 20 00 mv r4,r12
8006700: b9 60 08 00 mv r1,r11
8006704: b8 60 28 00 mv r5,r3
8006708: fb ff f9 78 calli 8004ce8 <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false );
if ( result != 0 ) {
800670c: 5c 20 00 7f bne r1,r0,8006908 <_rename_r+0x2ec>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
8006710: 41 a2 00 00 lbu r2,(r13+0)
8006714: 64 44 00 5c cmpei r4,r2,92
8006718: 64 43 00 2f cmpei r3,r2,47
800671c: b8 83 20 00 or r4,r4,r3
8006720: 44 81 00 4b be r4,r1,800684c <_rename_r+0x230>
8006724: 78 02 08 02 mvhi r2,0x802
8006728: 38 42 a1 30 ori r2,r2,0xa130
800672c: 28 42 00 00 lw r2,(r2+0)
8006730: 34 01 00 01 mvi r1,1
8006734: 28 43 00 18 lw r3,(r2+24)
8006738: 5b 83 00 1c sw (sp+28),r3
800673c: 28 43 00 1c lw r3,(r2+28)
8006740: 5b 83 00 20 sw (sp+32),r3
8006744: 28 43 00 20 lw r3,(r2+32)
8006748: 5b 83 00 24 sw (sp+36),r3
800674c: 28 43 00 24 lw r3,(r2+36)
8006750: 5b 83 00 28 sw (sp+40),r3
8006754: 28 42 00 28 lw r2,(r2+40)
8006758: 5b 82 00 2c sw (sp+44),r2
if ( !new_parent_loc.ops->evalformake_h ) {
800675c: 2b 82 00 28 lw r2,(sp+40)
8006760: 28 44 00 04 lw r4,(r2+4)
8006764: 44 80 00 89 be r4,r0,8006988 <_rename_r+0x36c>
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 );
8006768: 37 8b 00 1c addi r11,sp,28
800676c: b5 a1 08 00 add r1,r13,r1
8006770: b9 60 10 00 mv r2,r11
8006774: 37 83 00 58 addi r3,sp,88
8006778: d8 80 00 00 call r4
if ( result != 0 ) {
800677c: 5c 20 00 6e bne r1,r0,8006934 <_rename_r+0x318>
/*
* 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 ) {
8006780: 2b 81 00 2c lw r1,(sp+44)
8006784: 2b 82 00 40 lw r2,(sp+64)
8006788: 5c 41 00 48 bne r2,r1,80068a8 <_rename_r+0x28c>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !new_parent_loc.ops->rename_h ) {
800678c: 2b 81 00 28 lw r1,(sp+40)
8006790: 28 25 00 40 lw r5,(r1+64)
8006794: 44 a0 00 98 be r5,r0,80069f4 <_rename_r+0x3d8>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
8006798: 2b 84 00 58 lw r4,(sp+88)
800679c: 37 8f 00 30 addi r15,sp,48
80067a0: b9 80 10 00 mv r2,r12
80067a4: b9 e0 08 00 mv r1,r15
80067a8: b9 60 18 00 mv r3,r11
80067ac: d8 a0 00 00 call r5
rtems_filesystem_freenode( &new_parent_loc );
80067b0: 2b 82 00 28 lw r2,(sp+40)
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
80067b4: b8 20 68 00 mv r13,r1
rtems_filesystem_freenode( &new_parent_loc );
80067b8: 44 40 00 05 be r2,r0,80067cc <_rename_r+0x1b0> <== NEVER TAKEN
80067bc: 28 42 00 1c lw r2,(r2+28)
80067c0: 44 40 00 03 be r2,r0,80067cc <_rename_r+0x1b0> <== NEVER TAKEN
80067c4: b9 60 08 00 mv r1,r11
80067c8: d8 40 00 00 call r2
if ( free_old_parentloc )
80067cc: 5d c0 00 30 bne r14,r0,800688c <_rename_r+0x270>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
80067d0: 2b 81 00 50 lw r1,(sp+80)
80067d4: 44 20 00 05 be r1,r0,80067e8 <_rename_r+0x1cc> <== NEVER TAKEN
80067d8: 28 22 00 1c lw r2,(r1+28)
80067dc: 44 40 00 03 be r2,r0,80067e8 <_rename_r+0x1cc> <== NEVER TAKEN
80067e0: b9 80 08 00 mv r1,r12
80067e4: d8 40 00 00 call r2
return result;
}
80067e8: b9 a0 08 00 mv r1,r13
80067ec: 2b 9d 00 04 lw ra,(sp+4)
80067f0: 2b 8b 00 18 lw r11,(sp+24)
80067f4: 2b 8c 00 14 lw r12,(sp+20)
80067f8: 2b 8d 00 10 lw r13,(sp+16)
80067fc: 2b 8e 00 0c lw r14,(sp+12)
8006800: 2b 8f 00 08 lw r15,(sp+8)
8006804: 37 9c 00 58 addi sp,sp,88
8006808: c3 a0 00 00 ret
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
800680c: 44 40 ff 96 be r2,r0,8006664 <_rename_r+0x48> <== NEVER TAKEN
8006810: 78 01 08 02 mvhi r1,0x802
8006814: 38 21 a1 30 ori r1,r1,0xa130
8006818: 28 21 00 00 lw r1,(r1+0)
800681c: b9 60 70 00 mv r14,r11
8006820: 28 22 00 04 lw r2,(r1+4)
8006824: 5b 82 00 30 sw (sp+48),r2
8006828: 28 23 00 08 lw r3,(r1+8)
800682c: 5b 83 00 34 sw (sp+52),r3
8006830: 28 22 00 0c lw r2,(r1+12)
8006834: 5b 82 00 38 sw (sp+56),r2
8006838: 28 23 00 10 lw r3,(r1+16)
800683c: 5b 83 00 3c sw (sp+60),r3
8006840: 28 21 00 14 lw r1,(r1+20)
8006844: 5b 81 00 40 sw (sp+64),r1
8006848: e3 ff ff 95 bi 800669c <_rename_r+0x80>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
800684c: 44 44 ff b6 be r2,r4,8006724 <_rename_r+0x108> <== NEVER TAKEN
8006850: 78 01 08 02 mvhi r1,0x802
8006854: 38 21 a1 30 ori r1,r1,0xa130
8006858: 28 22 00 00 lw r2,(r1+0)
800685c: b8 80 08 00 mv r1,r4
8006860: 28 43 00 04 lw r3,(r2+4)
8006864: 5b 83 00 1c sw (sp+28),r3
8006868: 28 43 00 08 lw r3,(r2+8)
800686c: 5b 83 00 20 sw (sp+32),r3
8006870: 28 43 00 0c lw r3,(r2+12)
8006874: 5b 83 00 24 sw (sp+36),r3
8006878: 28 43 00 10 lw r3,(r2+16)
800687c: 5b 83 00 28 sw (sp+40),r3
8006880: 28 42 00 14 lw r2,(r2+20)
8006884: 5b 82 00 2c sw (sp+44),r2
8006888: e3 ff ff b5 bi 800675c <_rename_r+0x140>
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
800688c: 2b 81 00 3c lw r1,(sp+60)
8006890: 44 20 ff d0 be r1,r0,80067d0 <_rename_r+0x1b4> <== NEVER TAKEN
8006894: 28 22 00 1c lw r2,(r1+28)
8006898: 44 40 ff ce be r2,r0,80067d0 <_rename_r+0x1b4> <== NEVER TAKEN
800689c: b9 e0 08 00 mv r1,r15
80068a0: d8 40 00 00 call r2
80068a4: e3 ff ff cb bi 80067d0 <_rename_r+0x1b4>
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
80068a8: 2b 81 00 28 lw r1,(sp+40)
80068ac: 44 20 00 05 be r1,r0,80068c0 <_rename_r+0x2a4> <== NEVER TAKEN
80068b0: 28 22 00 1c lw r2,(r1+28)
80068b4: 44 40 00 03 be r2,r0,80068c0 <_rename_r+0x2a4> <== NEVER TAKEN
80068b8: b9 60 08 00 mv r1,r11
80068bc: d8 40 00 00 call r2
if ( free_old_parentloc )
80068c0: 45 c0 00 07 be r14,r0,80068dc <_rename_r+0x2c0>
rtems_filesystem_freenode( &old_parent_loc );
80068c4: 2b 81 00 3c lw r1,(sp+60)
80068c8: 44 20 00 05 be r1,r0,80068dc <_rename_r+0x2c0> <== NEVER TAKEN
80068cc: 28 22 00 1c lw r2,(r1+28)
80068d0: 44 40 00 03 be r2,r0,80068dc <_rename_r+0x2c0> <== NEVER TAKEN
80068d4: 37 81 00 30 addi r1,sp,48
80068d8: d8 40 00 00 call r2
rtems_filesystem_freenode( &old_loc );
80068dc: 2b 81 00 50 lw r1,(sp+80)
80068e0: 44 20 00 05 be r1,r0,80068f4 <_rename_r+0x2d8> <== NEVER TAKEN
80068e4: 28 22 00 1c lw r2,(r1+28)
80068e8: 44 40 00 03 be r2,r0,80068f4 <_rename_r+0x2d8> <== NEVER TAKEN
80068ec: b9 80 08 00 mv r1,r12
80068f0: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( EXDEV );
80068f4: f8 00 33 a8 calli 8013794 <__errno>
80068f8: 34 02 00 12 mvi r2,18
80068fc: 58 22 00 00 sw (r1+0),r2
8006900: 34 0d ff ff mvi r13,-1
8006904: e3 ff ff b9 bi 80067e8 <_rename_r+0x1cc>
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
8006908: 5d c0 00 03 bne r14,r0,8006914 <_rename_r+0x2f8> <== ALWAYS TAKEN
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
800690c: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED
8006910: e3 ff ff b6 bi 80067e8 <_rename_r+0x1cc> <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
8006914: 2b 81 00 3c lw r1,(sp+60)
8006918: 44 20 ff fd be r1,r0,800690c <_rename_r+0x2f0> <== NEVER TAKEN
800691c: 28 22 00 1c lw r2,(r1+28)
8006920: 44 40 ff fb be r2,r0,800690c <_rename_r+0x2f0> <== NEVER TAKEN
8006924: 37 81 00 30 addi r1,sp,48
8006928: d8 40 00 00 call r2
800692c: 34 0d ff ff mvi r13,-1
8006930: e3 ff ff ae bi 80067e8 <_rename_r+0x1cc>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
8006934: 2b 81 00 28 lw r1,(sp+40)
8006938: 44 20 00 05 be r1,r0,800694c <_rename_r+0x330> <== NEVER TAKEN
800693c: 28 22 00 1c lw r2,(r1+28)
8006940: 44 40 00 03 be r2,r0,800694c <_rename_r+0x330> <== NEVER TAKEN
8006944: b9 60 08 00 mv r1,r11
8006948: d8 40 00 00 call r2
if ( free_old_parentloc )
800694c: 45 c0 00 07 be r14,r0,8006968 <_rename_r+0x34c> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
8006950: 2b 81 00 3c lw r1,(sp+60)
8006954: 44 20 00 05 be r1,r0,8006968 <_rename_r+0x34c> <== NEVER TAKEN
8006958: 28 22 00 1c lw r2,(r1+28)
800695c: 44 40 00 03 be r2,r0,8006968 <_rename_r+0x34c> <== NEVER TAKEN
8006960: 37 81 00 30 addi r1,sp,48
8006964: d8 40 00 00 call r2
rtems_filesystem_freenode( &old_loc );
8006968: 2b 81 00 50 lw r1,(sp+80)
800696c: 44 20 ff e8 be r1,r0,800690c <_rename_r+0x2f0> <== NEVER TAKEN
8006970: 28 22 00 1c lw r2,(r1+28)
8006974: 44 40 ff e6 be r2,r0,800690c <_rename_r+0x2f0> <== NEVER TAKEN
8006978: b9 80 08 00 mv r1,r12
800697c: d8 40 00 00 call r2
8006980: 34 0d ff ff mvi r13,-1
8006984: e3 ff ff 99 bi 80067e8 <_rename_r+0x1cc>
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
if ( !new_parent_loc.ops->evalformake_h ) {
if ( free_old_parentloc )
8006988: 45 c4 00 07 be r14,r4,80069a4 <_rename_r+0x388> <== NEVER TAKEN
}
if ( !new_parent_loc.ops->rename_h ) {
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
800698c: 2b 81 00 3c lw r1,(sp+60)
8006990: 44 20 00 05 be r1,r0,80069a4 <_rename_r+0x388> <== NEVER TAKEN
8006994: 28 22 00 1c lw r2,(r1+28)
8006998: 44 40 00 03 be r2,r0,80069a4 <_rename_r+0x388> <== NEVER TAKEN
800699c: 37 81 00 30 addi r1,sp,48
80069a0: d8 40 00 00 call r2
rtems_filesystem_freenode( &old_loc );
80069a4: 2b 81 00 50 lw r1,(sp+80)
80069a8: 44 20 00 05 be r1,r0,80069bc <_rename_r+0x3a0> <== NEVER TAKEN
80069ac: 28 22 00 1c lw r2,(r1+28)
80069b0: 44 40 00 03 be r2,r0,80069bc <_rename_r+0x3a0> <== NEVER TAKEN
80069b4: b9 80 08 00 mv r1,r12
80069b8: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( ENOTSUP );
80069bc: f8 00 33 76 calli 8013794 <__errno>
80069c0: 34 02 00 86 mvi r2,134
80069c4: 58 22 00 00 sw (r1+0),r2
80069c8: 34 0d ff ff mvi r13,-1
80069cc: e3 ff ff 87 bi 80067e8 <_rename_r+0x1cc>
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
80069d0: b9 80 08 00 mv r1,r12
80069d4: b9 60 10 00 mv r2,r11
80069d8: 34 03 00 02 mvi r3,2
80069dc: 37 84 00 30 addi r4,sp,48
80069e0: 34 05 00 00 mvi r5,0
80069e4: fb ff f9 04 calli 8004df4 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
80069e8: 5c 20 ff c9 bne r1,r0,800690c <_rename_r+0x2f0> <== NEVER TAKEN
80069ec: 34 0e 00 01 mvi r14,1
80069f0: e3 ff ff 2b bi 800669c <_rename_r+0x80>
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !new_parent_loc.ops->rename_h ) {
rtems_filesystem_freenode( &new_parent_loc );
80069f4: 28 22 00 1c lw r2,(r1+28)
80069f8: 44 45 00 03 be r2,r5,8006a04 <_rename_r+0x3e8> <== NEVER TAKEN
80069fc: b9 60 08 00 mv r1,r11
8006a00: d8 40 00 00 call r2
if ( free_old_parentloc )
8006a04: 45 c0 ff e8 be r14,r0,80069a4 <_rename_r+0x388> <== NEVER TAKEN
8006a08: e3 ff ff e1 bi 800698c <_rename_r+0x370>
08007a3c <_rtems_octal2ulong>:
unsigned long
_rtems_octal2ulong(
const char *octascii,
size_t len
)
{
8007a3c: 37 9c ff e8 addi sp,sp,-24 <== NOT EXECUTED
8007a40: 5b 8b 00 18 sw (sp+24),r11 <== NOT EXECUTED
8007a44: 5b 8c 00 14 sw (sp+20),r12 <== NOT EXECUTED
8007a48: 5b 8d 00 10 sw (sp+16),r13 <== NOT EXECUTED
8007a4c: 5b 8e 00 0c sw (sp+12),r14 <== NOT EXECUTED
8007a50: 5b 8f 00 08 sw (sp+8),r15 <== NOT EXECUTED
8007a54: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
size_t i;
unsigned long num;
num = 0;
for (i=0; i < len; i++)
8007a58: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
unsigned long
_rtems_octal2ulong(
const char *octascii,
size_t len
)
{
8007a5c: b8 40 68 00 mv r13,r2 <== NOT EXECUTED
8007a60: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
size_t i;
unsigned long num;
num = 0;
for (i=0; i < len; i++)
8007a64: b8 60 58 00 mv r11,r3 <== NOT EXECUTED
8007a68: 44 43 00 0d be r2,r3,8007a9c <_rtems_octal2ulong+0x60> <== NOT EXECUTED
{
if ((octascii[i] < '0') || (octascii[i] > '9'))
8007a6c: 34 0f 00 09 mvi r15,9 <== NOT EXECUTED
8007a70: b5 cb 20 00 add r4,r14,r11 <== NOT EXECUTED
8007a74: 40 8c 00 00 lbu r12,(r4+0) <== NOT EXECUTED
{
continue;
}
num = num * 8 + ((unsigned long)(octascii[i] - '0'));
8007a78: b8 60 08 00 mv r1,r3 <== NOT EXECUTED
8007a7c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
unsigned long num;
num = 0;
for (i=0; i < len; i++)
{
if ((octascii[i] < '0') || (octascii[i] > '9'))
8007a80: 35 8c ff d0 addi r12,r12,-48 <== NOT EXECUTED
8007a84: 21 84 00 ff andi r4,r12,0xff <== NOT EXECUTED
{
size_t i;
unsigned long num;
num = 0;
for (i=0; i < len; i++)
8007a88: 35 6b 00 01 addi r11,r11,1 <== NOT EXECUTED
{
if ((octascii[i] < '0') || (octascii[i] > '9'))
8007a8c: 54 8f 00 03 bgu r4,r15,8007a98 <_rtems_octal2ulong+0x5c> <== NOT EXECUTED
{
continue;
}
num = num * 8 + ((unsigned long)(octascii[i] - '0'));
8007a90: fb ff e2 81 calli 8000494 <__ashlsi3> <== NOT EXECUTED
8007a94: b5 81 18 00 add r3,r12,r1 <== NOT EXECUTED
{
size_t i;
unsigned long num;
num = 0;
for (i=0; i < len; i++)
8007a98: 55 ab ff f6 bgu r13,r11,8007a70 <_rtems_octal2ulong+0x34> <== NOT EXECUTED
continue;
}
num = num * 8 + ((unsigned long)(octascii[i] - '0'));
}
return(num);
}
8007a9c: b8 60 08 00 mv r1,r3 <== NOT EXECUTED
8007aa0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8007aa4: 2b 8b 00 18 lw r11,(sp+24) <== NOT EXECUTED
8007aa8: 2b 8c 00 14 lw r12,(sp+20) <== NOT EXECUTED
8007aac: 2b 8d 00 10 lw r13,(sp+16) <== NOT EXECUTED
8007ab0: 2b 8e 00 0c lw r14,(sp+12) <== NOT EXECUTED
8007ab4: 2b 8f 00 08 lw r15,(sp+8) <== NOT EXECUTED
8007ab8: 37 9c 00 18 addi sp,sp,24 <== NOT EXECUTED
8007abc: c3 a0 00 00 ret <== NOT EXECUTED
08007ac0 <_rtems_tar_header_checksum>:
************************************************************************/
int
_rtems_tar_header_checksum(
const char *bufr
)
{
8007ac0: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
8007ac4: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
int i, sum;
sum = 0;
for (i=0; i<512; i++)
{
if ((i >= 148) && (i < 156))
8007ac8: 34 07 00 07 mvi r7,7 <== NOT EXECUTED
)
{
int i, sum;
sum = 0;
for (i=0; i<512; i++)
8007acc: 34 06 02 00 mvi r6,512 <== NOT EXECUTED
{
if ((i >= 148) && (i < 156))
8007ad0: 34 44 ff 6c addi r4,r2,-148 <== NOT EXECUTED
sum += 0xff & ' ';
else
sum += 0xff & bufr[i];
8007ad4: b4 22 28 00 add r5,r1,r2 <== NOT EXECUTED
int i, sum;
sum = 0;
for (i=0; i<512; i++)
{
if ((i >= 148) && (i < 156))
8007ad8: 54 87 00 06 bgu r4,r7,8007af0 <_rtems_tar_header_checksum+0x30><== NOT EXECUTED
sum += 0xff & ' ';
8007adc: 34 63 00 20 addi r3,r3,32 <== NOT EXECUTED
)
{
int i, sum;
sum = 0;
for (i=0; i<512; i++)
8007ae0: 34 42 00 01 addi r2,r2,1 <== NOT EXECUTED
8007ae4: 5c 46 ff fb bne r2,r6,8007ad0 <_rtems_tar_header_checksum+0x10><== NOT EXECUTED
sum += 0xff & ' ';
else
sum += 0xff & bufr[i];
}
return(sum);
}
8007ae8: b8 60 08 00 mv r1,r3 <== NOT EXECUTED
8007aec: c3 a0 00 00 ret <== NOT EXECUTED
for (i=0; i<512; i++)
{
if ((i >= 148) && (i < 156))
sum += 0xff & ' ';
else
sum += 0xff & bufr[i];
8007af0: 40 a4 00 00 lbu r4,(r5+0) <== NOT EXECUTED
8007af4: b4 64 18 00 add r3,r3,r4 <== NOT EXECUTED
8007af8: e3 ff ff fa bi 8007ae0 <_rtems_tar_header_checksum+0x20> <== NOT EXECUTED
08004068 <_stat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
8004068: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
800406c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return _STAT_NAME( path, buf );
8004070: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
8004074: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
8004078: fb ff ff b9 calli 8003f5c <stat> <== NOT EXECUTED
}
800407c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8004080: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8004084: c3 a0 00 00 ret <== NOT EXECUTED
0800cb54 <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
800cb54: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
800cb58: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
return unlink( path );
800cb5c: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
800cb60: fb ff ff 56 calli 800c8b8 <unlink> <== NOT EXECUTED
}
800cb64: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800cb68: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
800cb6c: c3 a0 00 00 ret <== NOT EXECUTED
080029b4 <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
80029b4: 37 9c ff e4 addi sp,sp,-28
80029b8: 5b 8b 00 14 sw (sp+20),r11
80029bc: 5b 8c 00 10 sw (sp+16),r12
80029c0: 5b 8d 00 0c sw (sp+12),r13
80029c4: 5b 8e 00 08 sw (sp+8),r14
80029c8: 5b 9d 00 04 sw (sp+4),ra
80029cc: b8 40 60 00 mv r12,r2
long adjustment;
/*
* Simple validations
*/
if ( !delta )
80029d0: 34 02 00 00 mvi r2,0
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
80029d4: b8 20 58 00 mv r11,r1
long adjustment;
/*
* Simple validations
*/
if ( !delta )
80029d8: 44 22 00 05 be r1,r2,80029ec <adjtime+0x38>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
80029dc: 28 2d 00 04 lw r13,(r1+4)
80029e0: 78 01 00 0f mvhi r1,0xf
80029e4: 38 21 42 3f ori r1,r1,0x423f
80029e8: 50 2d 00 06 bgeu r1,r13,8002a00 <adjtime+0x4c>
rtems_set_errno_and_return_minus_one( EINVAL );
80029ec: f8 00 2e 38 calli 800e2cc <__errno>
80029f0: 34 02 00 16 mvi r2,22
80029f4: 58 22 00 00 sw (r1+0),r2
80029f8: 34 01 ff ff mvi r1,-1
80029fc: e0 00 00 47 bi 8002b18 <adjtime+0x164>
if ( olddelta ) {
8002a00: 45 80 00 04 be r12,r0,8002a10 <adjtime+0x5c>
olddelta->tv_sec = 0;
olddelta->tv_usec = 0;
8002a04: 59 82 00 04 sw (r12+4),r2
8002a08: 29 6d 00 04 lw r13,(r11+4)
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
olddelta->tv_sec = 0;
8002a0c: 59 82 00 00 sw (r12+0),r2
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
8002a10: 29 61 00 00 lw r1,(r11+0)
8002a14: 78 02 00 0f mvhi r2,0xf
8002a18: 38 42 42 40 ori r2,r2,0x4240
8002a1c: f8 00 68 00 calli 801ca1c <__mulsi3>
adjustment += delta->tv_usec;
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
8002a20: 78 02 08 02 mvhi r2,0x802
8002a24: 38 42 00 c4 ori r2,r2,0xc4
8002a28: 28 42 00 0c lw r2,(r2+12)
8002a2c: b5 a1 08 00 add r1,r13,r1
8002a30: 54 41 00 39 bgu r2,r1,8002b14 <adjtime+0x160>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8002a34: 78 01 08 02 mvhi r1,0x802
8002a38: 38 21 09 9c ori r1,r1,0x99c
8002a3c: 28 22 00 00 lw r2,(r1+0)
8002a40: 34 42 00 01 addi r2,r2,1
8002a44: 58 22 00 00 sw (r1+0),r2
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
8002a48: 37 8d 00 18 addi r13,sp,24
8002a4c: b9 a0 08 00 mv r1,r13
8002a50: f8 00 03 f9 calli 8003a34 <_TOD_Get>
ts.tv_sec += delta->tv_sec;
8002a54: 29 62 00 00 lw r2,(r11+0)
8002a58: 2b 8e 00 18 lw r14,(sp+24)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
8002a5c: 29 61 00 04 lw r1,(r11+4)
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
8002a60: b5 c2 70 00 add r14,r14,r2
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
8002a64: 34 02 03 e8 mvi r2,1000
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
8002a68: 5b 8e 00 18 sw (sp+24),r14
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
8002a6c: f8 00 67 ec calli 801ca1c <__mulsi3>
8002a70: 2b 83 00 1c lw r3,(sp+28)
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
8002a74: 78 06 3b 9a mvhi r6,0x3b9a
8002a78: 38 c6 c9 ff ori r6,r6,0xc9ff
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
8002a7c: b4 23 18 00 add r3,r1,r3
8002a80: 5b 83 00 1c sw (sp+28),r3
8002a84: 78 02 c4 65 mvhi r2,0xc465
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
8002a88: 50 c3 00 09 bgeu r6,r3,8002aac <adjtime+0xf8>
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
8002a8c: b8 40 28 00 mv r5,r2
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 ) {
8002a90: b9 c0 20 00 mv r4,r14
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
8002a94: 38 a5 36 00 ori r5,r5,0x3600
8002a98: b4 65 18 00 add r3,r3,r5
* At one point there was a static variable named adjustment
* used by this implementation. I don't see any reason for it
* to be here based upon the GNU/Linux documentation.
*/
int adjtime(
8002a9c: 34 84 00 01 addi r4,r4,1
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 ) {
8002aa0: 54 66 ff fe bgu r3,r6,8002a98 <adjtime+0xe4> <== NEVER TAKEN
8002aa4: 5b 84 00 18 sw (sp+24),r4
8002aa8: 5b 83 00 1c sw (sp+28),r3
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) ) {
8002aac: 38 42 36 00 ori r2,r2,0x3600
8002ab0: 54 62 00 09 bgu r3,r2,8002ad4 <adjtime+0x120> <== NEVER TAKEN
8002ab4: 2b 84 00 18 lw r4,(sp+24)
8002ab8: 78 05 3b 9a mvhi r5,0x3b9a
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
8002abc: 38 a5 ca 00 ori r5,r5,0xca00
8002ac0: b4 65 18 00 add r3,r3,r5
* At one point there was a static variable named adjustment
* used by this implementation. I don't see any reason for it
* to be here based upon the GNU/Linux documentation.
*/
int adjtime(
8002ac4: 34 84 ff ff addi r4,r4,-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) ) {
8002ac8: 50 43 ff fe bgeu r2,r3,8002ac0 <adjtime+0x10c>
8002acc: 5b 83 00 1c sw (sp+28),r3
8002ad0: 5b 84 00 18 sw (sp+24),r4
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
8002ad4: b9 a0 08 00 mv r1,r13
8002ad8: f8 00 04 0c calli 8003b08 <_TOD_Set>
_Thread_Enable_dispatch();
8002adc: f8 00 08 59 calli 8004c40 <_Thread_Enable_dispatch>
/* set the user's output */
if ( olddelta )
8002ae0: 45 80 00 0d be r12,r0,8002b14 <adjtime+0x160> <== NEVER TAKEN
*olddelta = *delta;
8002ae4: 29 61 00 00 lw r1,(r11+0)
8002ae8: 59 81 00 00 sw (r12+0),r1
8002aec: 29 6b 00 04 lw r11,(r11+4)
8002af0: 34 01 00 00 mvi r1,0
8002af4: 59 8b 00 04 sw (r12+4),r11
return 0;
}
8002af8: 2b 9d 00 04 lw ra,(sp+4)
8002afc: 2b 8b 00 14 lw r11,(sp+20)
8002b00: 2b 8c 00 10 lw r12,(sp+16)
8002b04: 2b 8d 00 0c lw r13,(sp+12)
8002b08: 2b 8e 00 08 lw r14,(sp+8)
8002b0c: 37 9c 00 1c addi sp,sp,28
8002b10: c3 a0 00 00 ret
_Thread_Enable_dispatch();
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
8002b14: 34 01 00 00 mvi r1,0
return 0;
}
8002b18: 2b 9d 00 04 lw ra,(sp+4)
8002b1c: 2b 8b 00 14 lw r11,(sp+20)
8002b20: 2b 8c 00 10 lw r12,(sp+16)
8002b24: 2b 8d 00 0c lw r13,(sp+12)
8002b28: 2b 8e 00 08 lw r14,(sp+8)
8002b2c: 37 9c 00 1c addi sp,sp,28
8002b30: c3 a0 00 00 ret
080077f0 <calloc>:
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
80077f0: 37 9c ff f0 addi sp,sp,-16
80077f4: 5b 8b 00 10 sw (sp+16),r11
80077f8: 5b 8c 00 0c sw (sp+12),r12
80077fc: 5b 8d 00 08 sw (sp+8),r13
8007800: 5b 9d 00 04 sw (sp+4),ra
8007804: 78 0b 08 01 mvhi r11,0x801
8007808: 39 6b e7 28 ori r11,r11,0xe728
800780c: 29 64 00 14 lw r4,(r11+20)
8007810: b8 20 18 00 mv r3,r1
length = nelem * elsize;
8007814: b8 40 08 00 mv r1,r2
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
8007818: 34 84 00 01 addi r4,r4,1
length = nelem * elsize;
800781c: b8 60 10 00 mv r2,r3
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
8007820: 59 64 00 14 sw (r11+20),r4
length = nelem * elsize;
8007824: f8 00 4e c4 calli 801b334 <__mulsi3>
8007828: b8 20 68 00 mv r13,r1
cptr = malloc( length );
800782c: f8 00 02 0a calli 8008054 <malloc>
8007830: b8 20 60 00 mv r12,r1
if ( cptr )
8007834: 44 20 00 04 be r1,r0,8007844 <calloc+0x54> <== NEVER TAKEN
memset( cptr, '\0', length );
8007838: b9 a0 18 00 mv r3,r13
800783c: 34 02 00 00 mvi r2,0
8007840: f8 00 19 d5 calli 800df94 <memset>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
8007844: 29 62 00 04 lw r2,(r11+4)
return cptr;
}
8007848: b9 80 08 00 mv r1,r12
length = nelem * elsize;
cptr = malloc( length );
if ( cptr )
memset( cptr, '\0', length );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
800784c: 34 42 ff ff addi r2,r2,-1
8007850: 59 62 00 04 sw (r11+4),r2
return cptr;
}
8007854: 2b 9d 00 04 lw ra,(sp+4)
8007858: 2b 8b 00 10 lw r11,(sp+16)
800785c: 2b 8c 00 0c lw r12,(sp+12)
8007860: 2b 8d 00 08 lw r13,(sp+8)
8007864: 37 9c 00 10 addi sp,sp,16
8007868: c3 a0 00 00 ret
08009de4 <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
8009de4: 37 9c ff e0 addi sp,sp,-32
8009de8: 5b 8b 00 0c sw (sp+12),r11
8009dec: 5b 8c 00 08 sw (sp+8),r12
8009df0: 5b 9d 00 04 sw (sp+4),ra
8009df4: b8 20 60 00 mv r12,r1
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
8009df8: 44 20 00 2d be r1,r0,8009eac <chdir+0xc8>
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
8009dfc: f8 00 1a 5b calli 8010768 <strlen>
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
8009e00: 34 03 00 01 mvi r3,1
8009e04: 37 8b 00 10 addi r11,sp,16
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
8009e08: 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(
8009e0c: b8 60 28 00 mv r5,r3
8009e10: b9 80 08 00 mv r1,r12
8009e14: b9 60 20 00 mv r4,r11
8009e18: fb ff de de calli 8001990 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
8009e1c: 34 03 ff ff mvi r3,-1
8009e20: 5c 20 00 1d bne r1,r0,8009e94 <chdir+0xb0>
return -1;
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
8009e24: 2b 83 00 1c lw r3,(sp+28)
8009e28: 28 62 00 10 lw r2,(r3+16)
8009e2c: 44 41 00 35 be r2,r1,8009f00 <chdir+0x11c> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
8009e30: b9 60 08 00 mv r1,r11
8009e34: d8 40 00 00 call r2
8009e38: 34 02 00 01 mvi r2,1
8009e3c: 5c 22 00 26 bne r1,r2,8009ed4 <chdir+0xf0>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
}
rtems_filesystem_freenode( &rtems_filesystem_current );
8009e40: 78 0b 08 02 mvhi r11,0x802
8009e44: 39 6b 10 f8 ori r11,r11,0x10f8
8009e48: 29 62 00 00 lw r2,(r11+0)
8009e4c: 28 41 00 10 lw r1,(r2+16)
8009e50: 44 20 00 06 be r1,r0,8009e68 <chdir+0x84> <== NEVER TAKEN
8009e54: 28 23 00 1c lw r3,(r1+28)
8009e58: 44 60 00 04 be r3,r0,8009e68 <chdir+0x84> <== NEVER TAKEN
8009e5c: 34 41 00 04 addi r1,r2,4
8009e60: d8 60 00 00 call r3
8009e64: 29 62 00 00 lw r2,(r11+0)
rtems_filesystem_current = loc;
8009e68: 2b 81 00 10 lw r1,(sp+16)
8009e6c: 34 03 00 00 mvi r3,0
8009e70: 58 41 00 04 sw (r2+4),r1
8009e74: 2b 81 00 14 lw r1,(sp+20)
8009e78: 58 41 00 08 sw (r2+8),r1
8009e7c: 2b 81 00 18 lw r1,(sp+24)
8009e80: 58 41 00 0c sw (r2+12),r1
8009e84: 2b 81 00 1c lw r1,(sp+28)
8009e88: 58 41 00 10 sw (r2+16),r1
8009e8c: 2b 81 00 20 lw r1,(sp+32)
8009e90: 58 41 00 14 sw (r2+20),r1
return 0;
}
8009e94: b8 60 08 00 mv r1,r3
8009e98: 2b 9d 00 04 lw ra,(sp+4)
8009e9c: 2b 8b 00 0c lw r11,(sp+12)
8009ea0: 2b 8c 00 08 lw r12,(sp+8)
8009ea4: 37 9c 00 20 addi sp,sp,32
8009ea8: c3 a0 00 00 ret
{
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
8009eac: f8 00 15 7e calli 800f4a4 <__errno>
8009eb0: 34 02 00 0e mvi r2,14
8009eb4: 34 03 ff ff mvi r3,-1
8009eb8: 58 22 00 00 sw (r1+0),r2
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
8009ebc: b8 60 08 00 mv r1,r3
8009ec0: 2b 9d 00 04 lw ra,(sp+4)
8009ec4: 2b 8b 00 0c lw r11,(sp+12)
8009ec8: 2b 8c 00 08 lw r12,(sp+8)
8009ecc: 37 9c 00 20 addi sp,sp,32
8009ed0: c3 a0 00 00 ret
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
8009ed4: 2b 81 00 1c lw r1,(sp+28)
8009ed8: 44 20 00 05 be r1,r0,8009eec <chdir+0x108> <== NEVER TAKEN
8009edc: 28 22 00 1c lw r2,(r1+28)
8009ee0: 44 40 00 03 be r2,r0,8009eec <chdir+0x108> <== NEVER TAKEN
8009ee4: b9 60 08 00 mv r1,r11
8009ee8: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( ENOTDIR );
8009eec: f8 00 15 6e calli 800f4a4 <__errno>
8009ef0: 34 02 00 14 mvi r2,20
8009ef4: 58 22 00 00 sw (r1+0),r2
8009ef8: 34 03 ff ff mvi r3,-1
8009efc: e3 ff ff e6 bi 8009e94 <chdir+0xb0>
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
8009f00: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED
8009f04: 44 62 00 03 be r3,r2,8009f10 <chdir+0x12c> <== NOT EXECUTED
8009f08: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8009f0c: d8 60 00 00 call r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8009f10: f8 00 15 65 calli 800f4a4 <__errno> <== NOT EXECUTED
8009f14: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8009f18: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8009f1c: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED
8009f20: e3 ff ff dd bi 8009e94 <chdir+0xb0> <== NOT EXECUTED
08003b50 <chmod>:
int chmod(
const char *path,
mode_t mode
)
{
8003b50: 37 9c ff dc addi sp,sp,-36
8003b54: 5b 8b 00 10 sw (sp+16),r11
8003b58: 5b 8c 00 0c sw (sp+12),r12
8003b5c: 5b 8d 00 08 sw (sp+8),r13
8003b60: 5b 9d 00 04 sw (sp+4),ra
8003b64: b8 20 58 00 mv r11,r1
8003b68: 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 );
8003b6c: 37 8c 00 14 addi r12,sp,20
8003b70: f8 00 42 ed calli 8014724 <strlen>
8003b74: b8 20 10 00 mv r2,r1
8003b78: 34 03 00 00 mvi r3,0
8003b7c: b9 60 08 00 mv r1,r11
8003b80: b9 80 20 00 mv r4,r12
8003b84: 34 05 00 01 mvi r5,1
8003b88: f8 00 00 d9 calli 8003eec <rtems_filesystem_evaluate_path>
if ( status != 0 )
8003b8c: 34 0b ff ff mvi r11,-1
8003b90: 5c 20 00 0f bne r1,r0,8003bcc <chmod+0x7c>
return -1;
if ( !loc.handlers ){
8003b94: 2b 83 00 1c lw r3,(sp+28)
8003b98: 44 61 00 1f be r3,r1,8003c14 <chmod+0xc4> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod_h ){
8003b9c: 28 63 00 1c lw r3,(r3+28)
8003ba0: 44 60 00 12 be r3,r0,8003be8 <chmod+0x98> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
8003ba4: b9 a0 10 00 mv r2,r13
8003ba8: b9 80 08 00 mv r1,r12
8003bac: d8 60 00 00 call r3
8003bb0: b8 20 58 00 mv r11,r1
rtems_filesystem_freenode( &loc );
8003bb4: 2b 81 00 20 lw r1,(sp+32)
8003bb8: 44 20 00 05 be r1,r0,8003bcc <chmod+0x7c> <== NEVER TAKEN
8003bbc: 28 22 00 1c lw r2,(r1+28)
8003bc0: 44 40 00 03 be r2,r0,8003bcc <chmod+0x7c> <== NEVER TAKEN
8003bc4: b9 80 08 00 mv r1,r12
8003bc8: d8 40 00 00 call r2
return result;
}
8003bcc: b9 60 08 00 mv r1,r11
8003bd0: 2b 9d 00 04 lw ra,(sp+4)
8003bd4: 2b 8b 00 10 lw r11,(sp+16)
8003bd8: 2b 8c 00 0c lw r12,(sp+12)
8003bdc: 2b 8d 00 08 lw r13,(sp+8)
8003be0: 37 9c 00 24 addi sp,sp,36
8003be4: c3 a0 00 00 ret
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
8003be8: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED
8003bec: 44 23 00 05 be r1,r3,8003c00 <chmod+0xb0> <== NOT EXECUTED
8003bf0: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8003bf4: 44 40 00 03 be r2,r0,8003c00 <chmod+0xb0> <== NOT EXECUTED
8003bf8: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8003bfc: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8003c00: f8 00 3b 24 calli 8012890 <__errno> <== NOT EXECUTED
8003c04: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8003c08: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8003c0c: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
8003c10: e3 ff ff ef bi 8003bcc <chmod+0x7c> <== NOT EXECUTED
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
if ( status != 0 )
return -1;
if ( !loc.handlers ){
rtems_filesystem_freenode( &loc );
8003c14: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED
8003c18: 44 23 00 05 be r1,r3,8003c2c <chmod+0xdc> <== NOT EXECUTED
8003c1c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8003c20: 44 43 00 03 be r2,r3,8003c2c <chmod+0xdc> <== NOT EXECUTED
8003c24: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8003c28: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
8003c2c: f8 00 3b 19 calli 8012890 <__errno> <== NOT EXECUTED
8003c30: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
8003c34: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8003c38: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
8003c3c: e3 ff ff e4 bi 8003bcc <chmod+0x7c> <== NOT EXECUTED
08003c40 <chown>:
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
8003c40: 37 9c ff d8 addi sp,sp,-40
8003c44: 5b 8b 00 14 sw (sp+20),r11
8003c48: 5b 8c 00 10 sw (sp+16),r12
8003c4c: 5b 8d 00 0c sw (sp+12),r13
8003c50: 5b 8e 00 08 sw (sp+8),r14
8003c54: 5b 9d 00 04 sw (sp+4),ra
8003c58: b8 20 58 00 mv r11,r1
8003c5c: 20 4e ff ff andi r14,r2,0xffff
8003c60: 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 ) )
8003c64: 37 8c 00 18 addi r12,sp,24
8003c68: f8 00 42 af calli 8014724 <strlen>
8003c6c: b8 20 10 00 mv r2,r1
8003c70: 34 03 00 00 mvi r3,0
8003c74: b9 60 08 00 mv r1,r11
8003c78: b9 80 20 00 mv r4,r12
8003c7c: 34 05 00 01 mvi r5,1
8003c80: f8 00 00 9b calli 8003eec <rtems_filesystem_evaluate_path>
8003c84: 34 0b ff ff mvi r11,-1
8003c88: 5c 20 00 0f bne r1,r0,8003cc4 <chown+0x84>
return -1;
if ( !loc.ops->chown_h ) {
8003c8c: 2b 82 00 24 lw r2,(sp+36)
8003c90: 28 44 00 18 lw r4,(r2+24)
8003c94: 44 81 00 14 be r4,r1,8003ce4 <chown+0xa4> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->chown_h)( &loc, owner, group );
8003c98: b9 c0 10 00 mv r2,r14
8003c9c: b9 a0 18 00 mv r3,r13
8003ca0: b9 80 08 00 mv r1,r12
8003ca4: d8 80 00 00 call r4
8003ca8: b8 20 58 00 mv r11,r1
rtems_filesystem_freenode( &loc );
8003cac: 2b 81 00 24 lw r1,(sp+36)
8003cb0: 44 20 00 05 be r1,r0,8003cc4 <chown+0x84> <== NEVER TAKEN
8003cb4: 28 22 00 1c lw r2,(r1+28)
8003cb8: 44 40 00 03 be r2,r0,8003cc4 <chown+0x84> <== NEVER TAKEN
8003cbc: b9 80 08 00 mv r1,r12
8003cc0: d8 40 00 00 call r2
return result;
}
8003cc4: b9 60 08 00 mv r1,r11
8003cc8: 2b 9d 00 04 lw ra,(sp+4)
8003ccc: 2b 8b 00 14 lw r11,(sp+20)
8003cd0: 2b 8c 00 10 lw r12,(sp+16)
8003cd4: 2b 8d 00 0c lw r13,(sp+12)
8003cd8: 2b 8e 00 08 lw r14,(sp+8)
8003cdc: 37 9c 00 28 addi sp,sp,40
8003ce0: c3 a0 00 00 ret
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
return -1;
if ( !loc.ops->chown_h ) {
rtems_filesystem_freenode( &loc );
8003ce4: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED
8003ce8: 44 44 00 03 be r2,r4,8003cf4 <chown+0xb4> <== NOT EXECUTED
8003cec: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8003cf0: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8003cf4: f8 00 3a e7 calli 8012890 <__errno> <== NOT EXECUTED
8003cf8: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8003cfc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8003d00: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
8003d04: e3 ff ff f0 bi 8003cc4 <chown+0x84> <== NOT EXECUTED
080015cc <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
80015cc: 37 9c ff dc addi sp,sp,-36
80015d0: 5b 8b 00 10 sw (sp+16),r11
80015d4: 5b 8c 00 0c sw (sp+12),r12
80015d8: 5b 8d 00 08 sw (sp+8),r13
80015dc: 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) {
80015e0: 78 0b 08 02 mvhi r11,0x802
80015e4: 39 6b 10 f8 ori r11,r11,0x10f8
80015e8: 29 6d 00 00 lw r13,(r11+0)
80015ec: 78 02 08 02 mvhi r2,0x802
80015f0: 38 42 17 64 ori r2,r2,0x1764
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
80015f4: b8 20 60 00 mv r12,r1
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
80015f8: 45 a2 00 26 be r13,r2,8001690 <chroot+0xc4> <== ALWAYS TAKEN
rtems_libio_set_private_env(); /* try to set a new private env*/
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = chdir(pathname);
80015fc: b9 80 08 00 mv r1,r12
8001600: f8 00 21 f9 calli 8009de4 <chdir>
8001604: b8 20 60 00 mv r12,r1
if (result) {
8001608: 5c 20 00 2a bne r1,r0,80016b0 <chroot+0xe4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
800160c: 78 01 08 01 mvhi r1,0x801
8001610: 38 21 f1 64 ori r1,r1,0xf164
8001614: 34 02 00 01 mvi r2,1
8001618: b9 80 18 00 mv r3,r12
800161c: 37 84 00 14 addi r4,sp,20
8001620: b9 80 28 00 mv r5,r12
8001624: f8 00 00 db calli 8001990 <rtems_filesystem_evaluate_path>
8001628: 5c 2c 00 22 bne r1,r12,80016b0 <chroot+0xe4> <== 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);
800162c: 29 62 00 00 lw r2,(r11+0)
8001630: 28 43 00 24 lw r3,(r2+36)
8001634: 44 61 00 06 be r3,r1,800164c <chroot+0x80> <== NEVER TAKEN
8001638: 28 63 00 1c lw r3,(r3+28)
800163c: 44 61 00 04 be r3,r1,800164c <chroot+0x80> <== NEVER TAKEN
8001640: 34 41 00 18 addi r1,r2,24
8001644: d8 60 00 00 call r3
8001648: 29 62 00 00 lw r2,(r11+0)
rtems_filesystem_root = loc;
800164c: 2b 81 00 14 lw r1,(sp+20)
8001650: 58 41 00 18 sw (r2+24),r1
8001654: 2b 83 00 18 lw r3,(sp+24)
8001658: 34 01 00 00 mvi r1,0
800165c: 58 43 00 1c sw (r2+28),r3
8001660: 2b 83 00 1c lw r3,(sp+28)
8001664: 58 43 00 20 sw (r2+32),r3
8001668: 2b 83 00 20 lw r3,(sp+32)
800166c: 58 43 00 24 sw (r2+36),r3
8001670: 2b 83 00 24 lw r3,(sp+36)
8001674: 58 43 00 28 sw (r2+40),r3
return 0;
}
8001678: 2b 9d 00 04 lw ra,(sp+4)
800167c: 2b 8b 00 10 lw r11,(sp+16)
8001680: 2b 8c 00 0c lw r12,(sp+12)
8001684: 2b 8d 00 08 lw r13,(sp+8)
8001688: 37 9c 00 24 addi sp,sp,36
800168c: c3 a0 00 00 ret
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
rtems_libio_set_private_env(); /* try to set a new private env*/
8001690: f8 00 06 4c calli 8002fc0 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
8001694: 29 61 00 00 lw r1,(r11+0)
8001698: 5c 2d ff d9 bne r1,r13,80015fc <chroot+0x30> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
800169c: f8 00 37 82 calli 800f4a4 <__errno> <== NOT EXECUTED
80016a0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
80016a4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80016a8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
80016ac: e3 ff ff f3 bi 8001678 <chroot+0xac> <== NOT EXECUTED
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
80016b0: f8 00 37 7d calli 800f4a4 <__errno> <== NOT EXECUTED
80016b4: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
80016b8: f8 00 37 7b calli 800f4a4 <__errno> <== NOT EXECUTED
80016bc: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
80016c0: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED
80016c4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
80016c8: e3 ff ff ec bi 8001678 <chroot+0xac> <== NOT EXECUTED
0800289c <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
800289c: 37 9c ff fc addi sp,sp,-4
80028a0: 5b 9d 00 04 sw (sp+4),ra
if ( !tp )
80028a4: 44 40 00 09 be r2,r0,80028c8 <clock_gettime+0x2c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
80028a8: 34 03 00 01 mvi r3,1
80028ac: 44 23 00 1b be r1,r3,8002918 <clock_gettime+0x7c>
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
80028b0: 34 03 00 04 mvi r3,4
80028b4: 44 23 00 13 be r1,r3,8002900 <clock_gettime+0x64> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
80028b8: 34 03 00 02 mvi r3,2
80028bc: 44 23 00 11 be r1,r3,8002900 <clock_gettime+0x64>
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
80028c0: 34 02 00 03 mvi r2,3
80028c4: 44 22 00 08 be r1,r2,80028e4 <clock_gettime+0x48>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
80028c8: f8 00 2f 41 calli 800e5cc <__errno>
80028cc: 34 02 00 16 mvi r2,22
80028d0: 58 22 00 00 sw (r1+0),r2
80028d4: 34 01 ff ff mvi r1,-1
return 0;
}
80028d8: 2b 9d 00 04 lw ra,(sp+4)
80028dc: 37 9c 00 04 addi sp,sp,4
80028e0: c3 a0 00 00 ret
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
80028e4: f8 00 2f 3a calli 800e5cc <__errno>
80028e8: 34 02 00 58 mvi r2,88
80028ec: 58 22 00 00 sw (r1+0),r2
80028f0: 34 01 ff ff mvi r1,-1
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
80028f4: 2b 9d 00 04 lw ra,(sp+4)
80028f8: 37 9c 00 04 addi sp,sp,4
80028fc: c3 a0 00 00 ret
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
_TOD_Get_uptime_as_timespec( tp );
8002900: b8 40 08 00 mv r1,r2
8002904: f8 00 06 ba calli 80043ec <_TOD_Get_uptime_as_timespec>
8002908: 34 01 00 00 mvi r1,0
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
800290c: 2b 9d 00 04 lw ra,(sp+4)
8002910: 37 9c 00 04 addi sp,sp,4
8002914: c3 a0 00 00 ret
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
8002918: b8 40 08 00 mv r1,r2
800291c: f8 00 06 8e calli 8004354 <_TOD_Get>
8002920: 34 01 00 00 mvi r1,0
return 0;
8002924: e3 ff ff ed bi 80028d8 <clock_gettime+0x3c>
08002928 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
8002928: 37 9c ff fc addi sp,sp,-4
800292c: 5b 9d 00 04 sw (sp+4),ra
if ( !tp )
8002930: 44 40 00 07 be r2,r0,800294c <clock_settime+0x24> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
8002934: 34 03 00 01 mvi r3,1
8002938: 44 23 00 0c be r1,r3,8002968 <clock_settime+0x40>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
800293c: 34 02 00 02 mvi r2,2
8002940: 44 22 00 1b be r1,r2,80029ac <clock_settime+0x84>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
8002944: 34 02 00 03 mvi r2,3
8002948: 44 22 00 19 be r1,r2,80029ac <clock_settime+0x84>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
800294c: f8 00 2f 20 calli 800e5cc <__errno>
8002950: 34 02 00 16 mvi r2,22
8002954: 58 22 00 00 sw (r1+0),r2
8002958: 34 01 ff ff mvi r1,-1
return 0;
}
800295c: 2b 9d 00 04 lw ra,(sp+4)
8002960: 37 9c 00 04 addi sp,sp,4
8002964: c3 a0 00 00 ret
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
8002968: 28 43 00 00 lw r3,(r2+0)
800296c: 78 01 21 da mvhi r1,0x21da
8002970: 38 21 e4 ff ori r1,r1,0xe4ff
8002974: 54 61 00 02 bgu r3,r1,800297c <clock_settime+0x54>
8002978: e3 ff ff f5 bi 800294c <clock_settime+0x24>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
800297c: 78 01 08 02 mvhi r1,0x802
8002980: 38 21 08 b4 ori r1,r1,0x8b4
8002984: 28 23 00 00 lw r3,(r1+0)
8002988: 34 63 00 01 addi r3,r3,1
800298c: 58 23 00 00 sw (r1+0),r3
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
8002990: b8 40 08 00 mv r1,r2
8002994: f8 00 06 b3 calli 8004460 <_TOD_Set>
_Thread_Enable_dispatch();
8002998: f8 00 0b c8 calli 80058b8 <_Thread_Enable_dispatch>
800299c: 34 01 00 00 mvi r1,0
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
80029a0: 2b 9d 00 04 lw ra,(sp+4)
80029a4: 37 9c 00 04 addi sp,sp,4
80029a8: c3 a0 00 00 ret
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
80029ac: f8 00 2f 08 calli 800e5cc <__errno>
80029b0: 34 02 00 58 mvi r2,88
80029b4: 58 22 00 00 sw (r1+0),r2
80029b8: 34 01 ff ff mvi r1,-1
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
80029bc: 2b 9d 00 04 lw ra,(sp+4)
80029c0: 37 9c 00 04 addi sp,sp,4
80029c4: c3 a0 00 00 ret
0800786c <close>:
#include <rtems/libio_.h>
int close(
int fd
)
{
800786c: 37 9c ff f0 addi sp,sp,-16
8007870: 5b 8b 00 10 sw (sp+16),r11
8007874: 5b 8c 00 0c sw (sp+12),r12
8007878: 5b 8d 00 08 sw (sp+8),r13
800787c: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
8007880: 78 02 08 01 mvhi r2,0x801
8007884: 38 42 e0 10 ori r2,r2,0xe010
8007888: 28 42 00 00 lw r2,(r2+0)
800788c: 54 41 00 06 bgu r2,r1,80078a4 <close+0x38>
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
8007890: f8 00 16 bd calli 800d384 <__errno>
8007894: 34 02 00 09 mvi r2,9
8007898: 58 22 00 00 sw (r1+0),r2
800789c: 34 0c ff ff mvi r12,-1
80078a0: e0 00 00 1d bi 8007914 <close+0xa8>
{
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
80078a4: 34 02 00 03 mvi r2,3
80078a8: fb ff e2 52 calli 80001f0 <__ashlsi3>
80078ac: 78 0c 08 01 mvhi r12,0x801
80078b0: 39 8c e7 1c ori r12,r12,0xe71c
80078b4: 34 02 00 03 mvi r2,3
80078b8: b8 20 68 00 mv r13,r1
80078bc: fb ff e2 4d calli 80001f0 <__ashlsi3>
80078c0: 29 8b 00 00 lw r11,(r12+0)
80078c4: b5 a1 08 00 add r1,r13,r1
80078c8: b5 61 58 00 add r11,r11,r1
rtems_libio_check_is_open(iop);
80078cc: 29 61 00 18 lw r1,(r11+24)
80078d0: 20 21 01 00 andi r1,r1,0x100
80078d4: 44 20 ff ef be r1,r0,8007890 <close+0x24>
rc = RTEMS_SUCCESSFUL;
if ( iop->handlers->close_h )
80078d8: 29 61 00 40 lw r1,(r11+64)
80078dc: 28 22 00 04 lw r2,(r1+4)
80078e0: b8 40 60 00 mv r12,r2
80078e4: 44 40 00 04 be r2,r0,80078f4 <close+0x88> <== NEVER TAKEN
rc = (*iop->handlers->close_h)( iop );
80078e8: b9 60 08 00 mv r1,r11
80078ec: d8 40 00 00 call r2
80078f0: b8 20 60 00 mv r12,r1
rtems_filesystem_freenode( &iop->pathinfo );
80078f4: 29 61 00 28 lw r1,(r11+40)
80078f8: 44 20 00 05 be r1,r0,800790c <close+0xa0> <== NEVER TAKEN
80078fc: 28 22 00 1c lw r2,(r1+28)
8007900: 44 40 00 03 be r2,r0,800790c <close+0xa0>
8007904: 35 61 00 1c addi r1,r11,28
8007908: d8 40 00 00 call r2
rtems_libio_free( iop );
800790c: b9 60 08 00 mv r1,r11
8007910: f8 00 01 3c calli 8007e00 <rtems_libio_free>
return rc;
}
8007914: b9 80 08 00 mv r1,r12
8007918: 2b 9d 00 04 lw ra,(sp+4)
800791c: 2b 8b 00 10 lw r11,(sp+16)
8007920: 2b 8c 00 0c lw r12,(sp+12)
8007924: 2b 8d 00 08 lw r13,(sp+8)
8007928: 37 9c 00 10 addi sp,sp,16
800792c: c3 a0 00 00 ret
08005064 <devFS_close>:
#include "devfs.h"
int devFS_close(
rtems_libio_t *iop
)
{
8005064: 37 9c ff f0 addi sp,sp,-16
8005068: 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;
800506c: 28 23 00 3c lw r3,(r1+60)
#include "devfs.h"
int devFS_close(
rtems_libio_t *iop
)
{
8005070: 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;
8005074: 34 01 00 00 mvi r1,0
args.mode = 0;
8005078: 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;
800507c: 5b 81 00 0c sw (sp+12),r1
args.mode = 0;
status = rtems_io_close(
8005080: 28 62 00 0c lw r2,(r3+12)
8005084: 28 61 00 08 lw r1,(r3+8)
8005088: 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;
800508c: 5b 84 00 08 sw (sp+8),r4
args.flags = 0;
args.mode = 0;
status = rtems_io_close(
8005090: f8 00 07 67 calli 8006e2c <rtems_io_close>
np->major,
np->minor,
(void *) &args
);
if ( status ) {
8005094: b8 20 10 00 mv r2,r1
8005098: 44 20 00 03 be r1,r0,80050a4 <devFS_close+0x40> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
800509c: f8 00 00 54 calli 80051ec <rtems_deviceio_errno> <== NOT EXECUTED
80050a0: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
}
return 0;
}
80050a4: b8 40 08 00 mv r1,r2
80050a8: 2b 9d 00 04 lw ra,(sp+4)
80050ac: 37 9c 00 10 addi sp,sp,16
80050b0: c3 a0 00 00 ret
080050c0 <devFS_evaluate_path>:
const char *pathname,
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
80050c0: 37 9c ff dc addi sp,sp,-36
80050c4: 5b 8b 00 24 sw (sp+36),r11
80050c8: 5b 8c 00 20 sw (sp+32),r12
80050cc: 5b 8d 00 1c sw (sp+28),r13
80050d0: 5b 8e 00 18 sw (sp+24),r14
80050d4: 5b 8f 00 14 sw (sp+20),r15
80050d8: 5b 90 00 10 sw (sp+16),r16
80050dc: 5b 91 00 0c sw (sp+12),r17
80050e0: 5b 92 00 08 sw (sp+8),r18
80050e4: 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;
80050e8: 28 90 00 00 lw r16,(r4+0)
const char *pathname,
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
80050ec: b8 80 78 00 mv r15,r4
80050f0: b8 20 90 00 mv r18,r1
80050f4: b8 40 70 00 mv r14,r2
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
80050f8: 46 00 00 38 be r16,r0,80051d8 <devFS_evaluate_path+0x118> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
80050fc: 78 02 08 00 mvhi r2,0x800
8005100: 38 42 e0 14 ori r2,r2,0xe014
8005104: 28 51 00 00 lw r17,(r2+0)
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
8005108: 34 01 00 00 mvi r1,0
800510c: b8 20 58 00 mv r11,r1
for (i = 0; i < rtems_device_table_size; i++) {
8005110: 46 21 00 15 be r17,r1,8005164 <devFS_evaluate_path+0xa4> <== NEVER TAKEN
if (!device_name_table[i].device_name)
8005114: 34 02 00 02 mvi r2,2
8005118: fb ff ec 10 calli 8000158 <__ashlsi3>
800511c: 34 02 00 02 mvi r2,2
8005120: b8 20 68 00 mv r13,r1
8005124: fb ff ec 0d calli 8000158 <__ashlsi3>
8005128: b5 a1 68 00 add r13,r13,r1
800512c: b6 0d 68 00 add r13,r16,r13
8005130: 29 ac 00 00 lw r12,(r13+0)
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8005134: ba 40 08 00 mv r1,r18
8005138: b9 c0 18 00 mv r3,r14
800513c: b9 80 10 00 mv r2,r12
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
8005140: 35 6b 00 01 addi r11,r11,1
if (!device_name_table[i].device_name)
8005144: 45 80 00 06 be r12,r0,800515c <devFS_evaluate_path+0x9c>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8005148: f8 00 17 eb calli 800b0f4 <strncmp>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
800514c: b5 8e 60 00 add r12,r12,r14
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8005150: 5c 20 00 03 bne r1,r0,800515c <devFS_evaluate_path+0x9c> <== NEVER TAKEN
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
8005154: 41 82 00 00 lbu r2,(r12+0)
8005158: 44 41 00 08 be r2,r1,8005178 <devFS_evaluate_path+0xb8> <== ALWAYS TAKEN
/* 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++) {
800515c: b9 60 08 00 mv r1,r11
8005160: 56 2b ff ed bgu r17,r11,8005114 <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 );
8005164: f8 00 13 4f calli 8009ea0 <__errno>
8005168: 34 02 00 02 mvi r2,2
800516c: 58 22 00 00 sw (r1+0),r2
8005170: 34 01 ff ff mvi r1,-1
8005174: e0 00 00 0e bi 80051ac <devFS_evaluate_path+0xec>
/* 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;
8005178: 78 01 08 00 mvhi r1,0x800
800517c: 38 21 e1 7c ori r1,r1,0xe17c
8005180: 28 24 00 00 lw r4,(r1+0)
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
8005184: 78 03 08 00 mvhi r3,0x800
pathloc->ops = &devFS_ops;
8005188: 78 01 08 00 mvhi r1,0x800
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
800518c: 28 84 00 28 lw r4,(r4+40)
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
8005190: 38 21 e0 fc ori r1,r1,0xe0fc
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;
8005194: 38 63 e1 44 ori r3,r3,0xe144
pathloc->ops = &devFS_ops;
8005198: 59 e1 00 0c sw (r15+12),r1
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
800519c: 59 e4 00 10 sw (r15+16),r4
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
80051a0: 59 ed 00 00 sw (r15+0),r13
pathloc->handlers = &devFS_file_handlers;
80051a4: 59 e3 00 08 sw (r15+8),r3
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
80051a8: b8 40 08 00 mv r1,r2
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
80051ac: 2b 9d 00 04 lw ra,(sp+4)
80051b0: 2b 8b 00 24 lw r11,(sp+36)
80051b4: 2b 8c 00 20 lw r12,(sp+32)
80051b8: 2b 8d 00 1c lw r13,(sp+28)
80051bc: 2b 8e 00 18 lw r14,(sp+24)
80051c0: 2b 8f 00 14 lw r15,(sp+20)
80051c4: 2b 90 00 10 lw r16,(sp+16)
80051c8: 2b 91 00 0c lw r17,(sp+12)
80051cc: 2b 92 00 08 lw r18,(sp+8)
80051d0: 37 9c 00 24 addi sp,sp,36
80051d4: c3 a0 00 00 ret
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
80051d8: f8 00 13 32 calli 8009ea0 <__errno> <== NOT EXECUTED
80051dc: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
80051e0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80051e4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
80051e8: e3 ff ff f1 bi 80051ac <devFS_evaluate_path+0xec> <== NOT EXECUTED
08000810 <devFS_initialize>:
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
8000810: 37 9c ff f0 addi sp,sp,-16
8000814: 5b 8b 00 10 sw (sp+16),r11
8000818: 5b 8c 00 0c sw (sp+12),r12
800081c: 5b 8d 00 08 sw (sp+8),r13
8000820: 5b 9d 00 04 sw (sp+4),ra
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
8000824: 78 0b 08 00 mvhi r11,0x800
8000828: 39 6b e0 14 ori r11,r11,0xe014
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
800082c: b8 20 68 00 mv r13,r1
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
8000830: 29 61 00 00 lw r1,(r11+0)
8000834: 34 02 00 02 mvi r2,2
8000838: fb ff fe 48 calli 8000158 <__ashlsi3>
800083c: 34 02 00 02 mvi r2,2
8000840: b8 20 60 00 mv r12,r1
8000844: fb ff fe 45 calli 8000158 <__ashlsi3>
8000848: b5 81 08 00 add r1,r12,r1
800084c: f8 00 10 ed calli 8004c00 <_Workspace_Allocate>
8000850: b8 20 60 00 mv r12,r1
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
8000854: 44 20 00 19 be r1,r0,80008b8 <devFS_initialize+0xa8> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(
8000858: 29 61 00 00 lw r1,(r11+0)
800085c: 34 02 00 02 mvi r2,2
8000860: fb ff fe 3e calli 8000158 <__ashlsi3>
8000864: 34 02 00 02 mvi r2,2
8000868: b8 20 58 00 mv r11,r1
800086c: fb ff fe 3b calli 8000158 <__ashlsi3>
8000870: b5 61 18 00 add r3,r11,r1
8000874: 34 02 00 00 mvi r2,0
8000878: b9 80 08 00 mv r1,r12
800087c: f8 00 28 6c calli 800aa2c <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;
8000880: 78 02 08 00 mvhi r2,0x800
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
8000884: 78 01 08 00 mvhi r1,0x800
8000888: 38 21 e0 fc ori r1,r1,0xe0fc
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
800088c: 38 42 e1 44 ori r2,r2,0xe144
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
8000890: 59 a1 00 28 sw (r13+40),r1
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
8000894: 59 ac 00 1c sw (r13+28),r12
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
8000898: 59 a2 00 24 sw (r13+36),r2
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
800089c: 34 01 00 00 mvi r1,0
return 0;
}
80008a0: 2b 9d 00 04 lw ra,(sp+4)
80008a4: 2b 8b 00 10 lw r11,(sp+16)
80008a8: 2b 8c 00 0c lw r12,(sp+12)
80008ac: 2b 8d 00 08 lw r13,(sp+8)
80008b0: 37 9c 00 10 addi sp,sp,16
80008b4: c3 a0 00 00 ret
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
rtems_set_errno_and_return_minus_one( ENOMEM );
80008b8: f8 00 25 7a calli 8009ea0 <__errno> <== NOT EXECUTED
80008bc: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
80008c0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80008c4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
80008c8: e3 ff ff f6 bi 80008a0 <devFS_initialize+0x90> <== NOT EXECUTED
08000a9c <devFS_ioctl>:
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
8000a9c: 37 9c ff ec addi sp,sp,-20
8000aa0: 5b 9d 00 04 sw (sp+4),ra
8000aa4: b8 20 20 00 mv r4,r1
rtems_libio_ioctl_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
8000aa8: 28 21 00 3c lw r1,(r1+60)
args.iop = iop;
args.command = command;
8000aac: 5b 82 00 0c sw (sp+12),r2
args.buffer = buffer;
8000ab0: 5b 83 00 10 sw (sp+16),r3
status = rtems_io_control(
8000ab4: 28 22 00 0c lw r2,(r1+12)
8000ab8: 28 21 00 08 lw r1,(r1+8)
8000abc: 37 83 00 08 addi r3,sp,8
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
8000ac0: 5b 84 00 08 sw (sp+8),r4
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
8000ac4: f8 00 07 5b calli 8002830 <rtems_io_control>
np->major,
np->minor,
(void *) &args
);
if ( status )
8000ac8: 5c 20 00 05 bne r1,r0,8000adc <devFS_ioctl+0x40> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return args.ioctl_return;
8000acc: 2b 81 00 14 lw r1,(sp+20)
}
8000ad0: 2b 9d 00 04 lw ra,(sp+4)
8000ad4: 37 9c 00 14 addi sp,sp,20
8000ad8: c3 a0 00 00 ret
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
8000adc: f8 00 11 c4 calli 80051ec <rtems_deviceio_errno> <== NOT EXECUTED
return args.ioctl_return;
}
8000ae0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8000ae4: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
8000ae8: c3 a0 00 00 ret <== NOT EXECUTED
080008cc <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
80008cc: 37 9c ff d8 addi sp,sp,-40
80008d0: 5b 8b 00 28 sw (sp+40),r11
80008d4: 5b 8c 00 24 sw (sp+36),r12
80008d8: 5b 8d 00 20 sw (sp+32),r13
80008dc: 5b 8e 00 1c sw (sp+28),r14
80008e0: 5b 8f 00 18 sw (sp+24),r15
80008e4: 5b 90 00 14 sw (sp+20),r16
80008e8: 5b 91 00 10 sw (sp+16),r17
80008ec: 5b 92 00 0c sw (sp+12),r18
80008f0: 5b 93 00 08 sw (sp+8),r19
80008f4: 5b 9d 00 04 sw (sp+4),ra
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
80008f8: 40 26 00 00 lbu r6,(r1+0)
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
80008fc: b8 20 60 00 mv r12,r1
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
8000900: 34 01 00 64 mvi r1,100
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
8000904: b8 40 88 00 mv r17,r2
8000908: b8 60 98 00 mv r19,r3
800090c: b8 80 90 00 mv r18,r4
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
8000910: 44 c1 00 48 be r6,r1,8000a30 <devFS_mknod+0x164> <== ALWAYS TAKEN
(path[2] == 'v') && (path[3] == '\0'))
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
8000914: 22 26 f0 00 andi r6,r17,0xf000
8000918: 7c c2 60 00 cmpnei r2,r6,24576
800091c: 7c c1 20 00 cmpnei r1,r6,8192
8000920: a0 22 08 00 and r1,r1,r2
8000924: 5c 20 00 4d bne r1,r0,8000a58 <devFS_mknod+0x18c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
else
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
8000928: 28 ae 00 00 lw r14,(r5+0)
if (!device_name_table)
800092c: 45 c1 00 55 be r14,r1,8000a80 <devFS_mknod+0x1b4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
8000930: 78 05 08 00 mvhi r5,0x800
8000934: 38 a5 e0 14 ori r5,r5,0xe014
8000938: 28 af 00 00 lw r15,(r5+0)
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
800093c: 34 10 ff ff mvi r16,-1
8000940: b8 20 58 00 mv r11,r1
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
8000944: 45 e0 00 4a be r15,r0,8000a6c <devFS_mknod+0x1a0> <== NEVER TAKEN
if (device_name_table[i].device_name == NULL)
8000948: 34 02 00 02 mvi r2,2
800094c: fb ff fe 03 calli 8000158 <__ashlsi3>
8000950: 34 02 00 02 mvi r2,2
8000954: b8 20 68 00 mv r13,r1
8000958: fb ff fe 00 calli 8000158 <__ashlsi3>
800095c: b5 a1 08 00 add r1,r13,r1
8000960: b5 c1 08 00 add r1,r14,r1
8000964: 28 25 00 00 lw r5,(r1+0)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
8000968: b9 80 08 00 mv r1,r12
800096c: b8 a0 10 00 mv r2,r5
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
8000970: 44 a0 00 29 be r5,r0,8000a14 <devFS_mknod+0x148> <== ALWAYS TAKEN
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
8000974: f8 00 29 65 calli 800af08 <strcmp> <== NOT EXECUTED
8000978: 44 20 00 29 be r1,r0,8000a1c <devFS_mknod+0x150> <== NOT EXECUTED
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
800097c: 35 6b 00 01 addi r11,r11,1
8000980: b9 60 08 00 mv r1,r11
8000984: 55 eb ff f1 bgu r15,r11,8000948 <devFS_mknod+0x7c>
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
8000988: 34 01 ff ff mvi r1,-1
800098c: 46 01 00 38 be r16,r1,8000a6c <devFS_mknod+0x1a0> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
8000990: 90 00 58 00 rcsr r11,IE
8000994: 34 01 ff fe mvi r1,-2
8000998: a1 61 08 00 and r1,r11,r1
800099c: d0 01 00 00 wcsr IE,r1
device_name_table[slot].device_name = (char *)path;
80009a0: 34 02 00 02 mvi r2,2
80009a4: ba 00 08 00 mv r1,r16
80009a8: fb ff fd ec calli 8000158 <__ashlsi3>
80009ac: 34 02 00 02 mvi r2,2
80009b0: b8 20 68 00 mv r13,r1
80009b4: fb ff fd e9 calli 8000158 <__ashlsi3>
80009b8: b5 a1 08 00 add r1,r13,r1
80009bc: b5 c1 70 00 add r14,r14,r1
80009c0: 59 cc 00 00 sw (r14+0),r12
device_name_table[slot].device_name_length = strlen(path);
80009c4: b9 80 08 00 mv r1,r12
80009c8: f8 00 29 a0 calli 800b048 <strlen>
80009cc: 59 c1 00 04 sw (r14+4),r1
device_name_table[slot].major = major;
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
80009d0: 59 d1 00 10 sw (r14+16),r17
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
device_name_table[slot].device_name_length = strlen(path);
device_name_table[slot].major = major;
80009d4: 59 d3 00 08 sw (r14+8),r19
device_name_table[slot].minor = minor;
80009d8: 59 d2 00 0c sw (r14+12),r18
device_name_table[slot].mode = mode;
_ISR_Enable(level);
80009dc: d0 0b 00 00 wcsr IE,r11
80009e0: 34 01 00 00 mvi r1,0
return 0;
}
80009e4: 2b 9d 00 04 lw ra,(sp+4)
80009e8: 2b 8b 00 28 lw r11,(sp+40)
80009ec: 2b 8c 00 24 lw r12,(sp+36)
80009f0: 2b 8d 00 20 lw r13,(sp+32)
80009f4: 2b 8e 00 1c lw r14,(sp+28)
80009f8: 2b 8f 00 18 lw r15,(sp+24)
80009fc: 2b 90 00 14 lw r16,(sp+20)
8000a00: 2b 91 00 10 lw r17,(sp+16)
8000a04: 2b 92 00 0c lw r18,(sp+12)
8000a08: 2b 93 00 08 lw r19,(sp+8)
8000a0c: 37 9c 00 28 addi sp,sp,40
8000a10: c3 a0 00 00 ret
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
8000a14: b9 60 80 00 mv r16,r11
8000a18: e3 ff ff d9 bi 800097c <devFS_mknod+0xb0>
8000a1c: f8 00 25 21 calli 8009ea0 <__errno> <== NOT EXECUTED
8000a20: 34 02 00 11 mvi r2,17 <== NOT EXECUTED
8000a24: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8000a28: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000a2c: e3 ff ff ee bi 80009e4 <devFS_mknod+0x118> <== NOT EXECUTED
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
8000a30: 41 82 00 01 lbu r2,(r12+1)
8000a34: 34 01 00 65 mvi r1,101
8000a38: 5c 41 ff b7 bne r2,r1,8000914 <devFS_mknod+0x48> <== NEVER TAKEN
(path[2] == 'v') && (path[3] == '\0'))
8000a3c: 41 82 00 02 lbu r2,(r12+2)
8000a40: 34 01 00 76 mvi r1,118
8000a44: 5c 41 ff b4 bne r2,r1,8000914 <devFS_mknod+0x48> <== NEVER TAKEN
8000a48: 41 82 00 03 lbu r2,(r12+3)
8000a4c: b8 40 08 00 mv r1,r2
8000a50: 5c 40 ff b1 bne r2,r0,8000914 <devFS_mknod+0x48>
8000a54: e3 ff ff e4 bi 80009e4 <devFS_mknod+0x118>
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
rtems_set_errno_and_return_minus_one( EINVAL );
8000a58: f8 00 25 12 calli 8009ea0 <__errno> <== NOT EXECUTED
8000a5c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8000a60: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8000a64: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000a68: e3 ff ff df bi 80009e4 <devFS_mknod+0x118> <== NOT EXECUTED
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
8000a6c: f8 00 25 0d calli 8009ea0 <__errno> <== NOT EXECUTED
8000a70: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
8000a74: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8000a78: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000a7c: e3 ff ff da bi 80009e4 <devFS_mknod+0x118> <== NOT EXECUTED
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
8000a80: f8 00 25 08 calli 8009ea0 <__errno> <== NOT EXECUTED
8000a84: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
8000a88: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8000a8c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000a90: e3 ff ff d5 bi 80009e4 <devFS_mknod+0x118> <== NOT EXECUTED
08000aec <devFS_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
8000aec: 37 9c ff f0 addi sp,sp,-16
8000af0: 5b 9d 00 04 sw (sp+4),ra
8000af4: b8 20 28 00 mv r5,r1
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.flags = iop->flags;
8000af8: 28 21 00 18 lw r1,(r1+24)
args.mode = mode;
8000afc: 5b 84 00 10 sw (sp+16),r4
status = rtems_io_open(
8000b00: 37 83 00 08 addi r3,sp,8
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.flags = iop->flags;
8000b04: 5b 81 00 0c sw (sp+12),r1
{
rtems_libio_open_close_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
8000b08: 28 a1 00 3c lw r1,(r5+60)
args.iop = iop;
8000b0c: 5b 85 00 08 sw (sp+8),r5
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open(
8000b10: 28 22 00 0c lw r2,(r1+12)
8000b14: 28 21 00 08 lw r1,(r1+8)
8000b18: f8 00 07 ca calli 8002a40 <rtems_io_open>
np->major,
np->minor,
(void *) &args
);
if ( status )
8000b1c: b8 20 10 00 mv r2,r1
8000b20: 44 20 00 03 be r1,r0,8000b2c <devFS_open+0x40> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
8000b24: f8 00 11 b2 calli 80051ec <rtems_deviceio_errno> <== NOT EXECUTED
8000b28: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
return 0;
}
8000b2c: b8 40 08 00 mv r1,r2
8000b30: 2b 9d 00 04 lw ra,(sp+4)
8000b34: 37 9c 00 10 addi sp,sp,16
8000b38: c3 a0 00 00 ret
08000b3c <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
8000b3c: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED
8000b40: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8000b44: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
8000b48: 28 21 00 18 lw r1,(r1+24) <== NOT EXECUTED
8000b4c: 5b 81 00 20 sw (sp+32),r1 <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
8000b50: 28 81 00 14 lw r1,(r4+20) <== NOT EXECUTED
8000b54: 5b 81 00 14 sw (sp+20),r1 <== NOT EXECUTED
8000b58: 28 81 00 10 lw r1,(r4+16) <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
8000b5c: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
8000b60: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
8000b64: 5b 81 00 10 sw (sp+16),r1 <== NOT EXECUTED
{
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
8000b68: 28 81 00 3c lw r1,(r4+60) <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
8000b6c: 5b 83 00 24 sw (sp+36),r3 <== NOT EXECUTED
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
8000b70: 5b 82 00 18 sw (sp+24),r2 <== NOT EXECUTED
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
8000b74: 28 22 00 0c lw r2,(r1+12) <== NOT EXECUTED
8000b78: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED
8000b7c: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
8000b80: 5b 84 00 08 sw (sp+8),r4 <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
8000b84: f8 00 07 d7 calli 8002ae0 <rtems_io_read> <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
8000b88: 5c 20 00 05 bne r1,r0,8000b9c <devFS_read+0x60> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
8000b8c: 2b 81 00 24 lw r1,(sp+36) <== NOT EXECUTED
}
8000b90: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8000b94: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED
8000b98: c3 a0 00 00 ret <== NOT EXECUTED
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
8000b9c: f8 00 11 94 calli 80051ec <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
8000ba0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8000ba4: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED
8000ba8: c3 a0 00 00 ret <== NOT EXECUTED
08000bac <devFS_stat>:
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
8000bac: 37 9c ff fc addi sp,sp,-4
8000bb0: 5b 9d 00 04 sw (sp+4),ra
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
8000bb4: 28 21 00 00 lw r1,(r1+0)
if (!the_dev)
8000bb8: 44 20 00 0b be r1,r0,8000be4 <devFS_stat+0x38> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
8000bbc: 28 23 00 0c lw r3,(r1+12)
8000bc0: 28 24 00 08 lw r4,(r1+8)
buf->st_mode = the_dev->mode;
8000bc4: 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 );
8000bc8: 58 43 00 1c sw (r2+28),r3
8000bcc: 58 44 00 18 sw (r2+24),r4
buf->st_mode = the_dev->mode;
8000bd0: 58 41 00 0c sw (r2+12),r1
8000bd4: 34 01 00 00 mvi r1,0
return 0;
}
8000bd8: 2b 9d 00 04 lw ra,(sp+4)
8000bdc: 37 9c 00 04 addi sp,sp,4
8000be0: c3 a0 00 00 ret
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
8000be4: f8 00 24 af calli 8009ea0 <__errno> <== NOT EXECUTED
8000be8: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
8000bec: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8000bf0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000bf4: e3 ff ff f9 bi 8000bd8 <devFS_stat+0x2c> <== NOT EXECUTED
08000bf8 <devFS_write>:
ssize_t devFS_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
8000bf8: 37 9c ff dc addi sp,sp,-36
8000bfc: 5b 9d 00 04 sw (sp+4),ra
8000c00: b8 20 20 00 mv r4,r1
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
8000c04: 28 21 00 18 lw r1,(r1+24)
8000c08: 5b 81 00 20 sw (sp+32),r1
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
8000c0c: 28 81 00 14 lw r1,(r4+20)
8000c10: 5b 81 00 14 sw (sp+20),r1
8000c14: 28 81 00 10 lw r1,(r4+16)
args.buffer = (void *) buffer;
args.count = count;
8000c18: 5b 83 00 1c sw (sp+28),r3
args.flags = iop->flags;
args.bytes_moved = 0;
8000c1c: 34 03 00 00 mvi r3,0
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
8000c20: 5b 81 00 10 sw (sp+16),r1
{
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
8000c24: 28 81 00 3c lw r1,(r4+60)
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
8000c28: 5b 83 00 24 sw (sp+36),r3
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
8000c2c: 5b 82 00 18 sw (sp+24),r2
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
8000c30: 28 22 00 0c lw r2,(r1+12)
8000c34: 28 21 00 08 lw r1,(r1+8)
8000c38: 37 83 00 08 addi r3,sp,8
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
8000c3c: 5b 84 00 08 sw (sp+8),r4
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
8000c40: f8 00 07 d0 calli 8002b80 <rtems_io_write>
np->major,
np->minor,
(void *) &args
);
if ( status )
8000c44: 5c 20 00 05 bne r1,r0,8000c58 <devFS_write+0x60> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
8000c48: 2b 81 00 24 lw r1,(sp+36)
}
8000c4c: 2b 9d 00 04 lw ra,(sp+4)
8000c50: 37 9c 00 24 addi sp,sp,36
8000c54: c3 a0 00 00 ret
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
8000c58: f8 00 11 65 calli 80051ec <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
8000c5c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8000c60: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED
8000c64: c3 a0 00 00 ret <== NOT EXECUTED
0800a770 <device_close>:
*/
int device_close(
rtems_libio_t *iop
)
{
800a770: 37 9c ff f0 addi sp,sp,-16
800a774: 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;
800a778: 28 23 00 3c lw r3,(r1+60)
args.iop = iop;
args.flags = 0;
800a77c: 34 02 00 00 mvi r2,0
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
800a780: 5b 81 00 08 sw (sp+8),r1
args.flags = 0;
args.mode = 0;
800a784: 5b 82 00 10 sw (sp+16),r2
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.flags = 0;
800a788: 5b 82 00 0c sw (sp+12),r2
args.mode = 0;
status = rtems_io_close(
800a78c: 28 62 00 54 lw r2,(r3+84)
800a790: 28 61 00 50 lw r1,(r3+80)
800a794: 37 83 00 08 addi r3,sp,8
800a798: f8 00 06 34 calli 800c068 <rtems_io_close>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status ) {
800a79c: b8 20 10 00 mv r2,r1
800a7a0: 44 20 00 03 be r1,r0,800a7ac <device_close+0x3c> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
800a7a4: f8 00 08 22 calli 800c82c <rtems_deviceio_errno> <== NOT EXECUTED
800a7a8: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
}
return 0;
}
800a7ac: b8 40 08 00 mv r1,r2
800a7b0: 2b 9d 00 04 lw ra,(sp+4)
800a7b4: 37 9c 00 10 addi sp,sp,16
800a7b8: c3 a0 00 00 ret
0800a64c <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
800a64c: 37 9c ff ec addi sp,sp,-20
800a650: 5b 9d 00 04 sw (sp+4),ra
args.iop = iop;
args.command = command;
args.buffer = buffer;
the_jnode = iop->file_info;
800a654: 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;
800a658: 5b 82 00 0c sw (sp+12),r2
args.buffer = buffer;
800a65c: 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;
800a660: 5b 81 00 08 sw (sp+8),r1
args.command = command;
args.buffer = buffer;
the_jnode = iop->file_info;
status = rtems_io_control(
800a664: 28 82 00 54 lw r2,(r4+84)
800a668: 28 81 00 50 lw r1,(r4+80)
800a66c: 37 83 00 08 addi r3,sp,8
800a670: f8 00 06 a6 calli 800c108 <rtems_io_control>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
800a674: 5c 20 00 05 bne r1,r0,800a688 <device_ioctl+0x3c> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return args.ioctl_return;
800a678: 2b 81 00 14 lw r1,(sp+20)
}
800a67c: 2b 9d 00 04 lw ra,(sp+4)
800a680: 37 9c 00 14 addi sp,sp,20
800a684: c3 a0 00 00 ret
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
800a688: f8 00 08 69 calli 800c82c <rtems_deviceio_errno> <== NOT EXECUTED
return args.ioctl_return;
}
800a68c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800a690: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
800a694: c3 a0 00 00 ret <== NOT EXECUTED
0800a7bc <device_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
800a7bc: 37 9c ff f0 addi sp,sp,-16
800a7c0: 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;
800a7c4: 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;
800a7c8: 28 23 00 3c lw r3,(r1+60)
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
800a7cc: 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;
800a7d0: 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;
800a7d4: 5b 81 00 08 sw (sp+8),r1
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open(
800a7d8: 28 62 00 54 lw r2,(r3+84)
800a7dc: 28 61 00 50 lw r1,(r3+80)
800a7e0: 37 83 00 08 addi r3,sp,8
800a7e4: f8 00 06 71 calli 800c1a8 <rtems_io_open>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
800a7e8: b8 20 10 00 mv r2,r1
800a7ec: 44 20 00 03 be r1,r0,800a7f8 <device_open+0x3c> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
800a7f0: f8 00 08 0f calli 800c82c <rtems_deviceio_errno> <== NOT EXECUTED
800a7f4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
return 0;
}
800a7f8: b8 40 08 00 mv r1,r2
800a7fc: 2b 9d 00 04 lw ra,(sp+4)
800a800: 37 9c 00 10 addi sp,sp,16
800a804: c3 a0 00 00 ret
0800a704 <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
800a704: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED
800a708: 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;
800a70c: 28 24 00 18 lw r4,(r1+24) <== NOT EXECUTED
800a710: 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;
800a714: 28 24 00 14 lw r4,(r1+20) <== NOT EXECUTED
800a718: 5b 84 00 14 sw (sp+20),r4 <== NOT EXECUTED
800a71c: 28 24 00 10 lw r4,(r1+16) <== NOT EXECUTED
args.buffer = buffer;
800a720: 5b 82 00 18 sw (sp+24),r2 <== NOT EXECUTED
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
800a724: 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;
800a728: 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;
800a72c: 28 24 00 3c lw r4,(r1+60) <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
800a730: 5b 83 00 1c sw (sp+28),r3 <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
800a734: 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;
800a738: 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(
800a73c: 28 82 00 54 lw r2,(r4+84) <== NOT EXECUTED
800a740: 28 81 00 50 lw r1,(r4+80) <== NOT EXECUTED
800a744: 37 83 00 08 addi r3,sp,8 <== NOT EXECUTED
800a748: f8 00 06 c0 calli 800c248 <rtems_io_read> <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
800a74c: 5c 20 00 05 bne r1,r0,800a760 <device_read+0x5c> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
800a750: 2b 81 00 24 lw r1,(sp+36) <== NOT EXECUTED
}
800a754: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800a758: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED
800a75c: c3 a0 00 00 ret <== NOT EXECUTED
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
800a760: f8 00 08 33 calli 800c82c <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
800a764: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800a768: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED
800a76c: c3 a0 00 00 ret <== NOT EXECUTED
0800a698 <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
800a698: 37 9c ff dc addi sp,sp,-36
800a69c: 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;
800a6a0: 28 24 00 18 lw r4,(r1+24)
800a6a4: 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;
800a6a8: 28 24 00 14 lw r4,(r1+20)
800a6ac: 5b 84 00 14 sw (sp+20),r4
800a6b0: 28 24 00 10 lw r4,(r1+16)
args.buffer = (void *) buffer;
800a6b4: 5b 82 00 18 sw (sp+24),r2
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
800a6b8: 34 02 00 00 mvi r2,0
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
800a6bc: 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;
800a6c0: 28 24 00 3c lw r4,(r1+60)
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
800a6c4: 5b 83 00 1c sw (sp+28),r3
args.flags = iop->flags;
args.bytes_moved = 0;
800a6c8: 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;
800a6cc: 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(
800a6d0: 28 82 00 54 lw r2,(r4+84)
800a6d4: 28 81 00 50 lw r1,(r4+80)
800a6d8: 37 83 00 08 addi r3,sp,8
800a6dc: f8 00 07 03 calli 800c2e8 <rtems_io_write>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
800a6e0: 5c 20 00 05 bne r1,r0,800a6f4 <device_write+0x5c> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
800a6e4: 2b 81 00 24 lw r1,(sp+36)
}
800a6e8: 2b 9d 00 04 lw ra,(sp+4)
800a6ec: 37 9c 00 24 addi sp,sp,36
800a6f0: c3 a0 00 00 ret
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
800a6f4: f8 00 08 4e calli 800c82c <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
800a6f8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800a6fc: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED
800a700: c3 a0 00 00 ret <== NOT EXECUTED
08004c38 <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
8004c38: 37 9c ff f0 addi sp,sp,-16
8004c3c: 5b 8b 00 10 sw (sp+16),r11
8004c40: 5b 8c 00 0c sw (sp+12),r12
8004c44: 5b 8d 00 08 sw (sp+8),r13
8004c48: 5b 9d 00 04 sw (sp+4),ra
8004c4c: b8 20 58 00 mv r11,r1
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
8004c50: 28 21 00 b4 lw r1,(r1+180)
8004c54: 44 20 00 1a be r1,r0,8004cbc <drainOutput+0x84> <== ALWAYS TAKEN
rtems_interrupt_disable (level);
8004c58: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED
8004c5c: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED
8004c60: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED
8004c64: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
8004c68: 29 64 00 84 lw r4,(r11+132) <== NOT EXECUTED
8004c6c: 29 63 00 80 lw r3,(r11+128) <== NOT EXECUTED
8004c70: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
8004c74: 44 83 00 11 be r4,r3,8004cb8 <drainOutput+0x80> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
8004c78: 34 0c 00 02 mvi r12,2 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
8004c7c: 34 0d ff fe mvi r13,-2 <== NOT EXECUTED
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
8004c80: 59 6c 00 94 sw (r11+148),r12 <== NOT EXECUTED
rtems_interrupt_enable (level);
8004c84: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
8004c88: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED
8004c8c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8004c90: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
8004c94: f8 00 07 1d calli 8006908 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
8004c98: 5c 20 00 0f bne r1,r0,8004cd4 <drainOutput+0x9c> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
8004c9c: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED
8004ca0: a0 2d 10 00 and r2,r1,r13 <== NOT EXECUTED
8004ca4: 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) {
8004ca8: 29 63 00 84 lw r3,(r11+132) <== NOT EXECUTED
8004cac: 29 62 00 80 lw r2,(r11+128) <== NOT EXECUTED
8004cb0: 5c 62 ff f4 bne r3,r2,8004c80 <drainOutput+0x48> <== NOT EXECUTED
8004cb4: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
8004cb8: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
}
}
8004cbc: 2b 9d 00 04 lw ra,(sp+4)
8004cc0: 2b 8b 00 10 lw r11,(sp+16)
8004cc4: 2b 8c 00 0c lw r12,(sp+12)
8004cc8: 2b 8d 00 08 lw r13,(sp+8)
8004ccc: 37 9c 00 10 addi sp,sp,16
8004cd0: c3 a0 00 00 ret
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
8004cd4: f8 00 09 3a calli 80071bc <rtems_fatal_error_occurred> <== NOT EXECUTED
08001f38 <dup2>:
int dup2(
int fildes,
int fildes2
)
{
8001f38: 37 9c ff a4 addi sp,sp,-92
8001f3c: 5b 8b 00 14 sw (sp+20),r11
8001f40: 5b 8c 00 10 sw (sp+16),r12
8001f44: 5b 8d 00 0c sw (sp+12),r13
8001f48: 5b 8e 00 08 sw (sp+8),r14
8001f4c: 5b 9d 00 04 sw (sp+4),ra
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
8001f50: 37 8c 00 18 addi r12,sp,24
int dup2(
int fildes,
int fildes2
)
{
8001f54: b8 40 68 00 mv r13,r2
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
8001f58: b9 80 10 00 mv r2,r12
if ( status == -1 )
8001f5c: 34 0b ff ff mvi r11,-1
int dup2(
int fildes,
int fildes2
)
{
8001f60: b8 20 70 00 mv r14,r1
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
8001f64: f8 00 02 1c calli 80027d4 <fstat>
if ( status == -1 )
8001f68: 5c 2b 00 09 bne r1,r11,8001f8c <dup2+0x54> <== ALWAYS TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
8001f6c: 34 01 ff ff mvi r1,-1
}
8001f70: 2b 9d 00 04 lw ra,(sp+4)
8001f74: 2b 8b 00 14 lw r11,(sp+20)
8001f78: 2b 8c 00 10 lw r12,(sp+16)
8001f7c: 2b 8d 00 0c lw r13,(sp+12)
8001f80: 2b 8e 00 08 lw r14,(sp+8)
8001f84: 37 9c 00 5c addi sp,sp,92
8001f88: c3 a0 00 00 ret
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
8001f8c: b9 80 10 00 mv r2,r12
8001f90: b9 a0 08 00 mv r1,r13
8001f94: f8 00 02 10 calli 80027d4 <fstat>
if ( status == -1 )
8001f98: 44 2b ff f5 be r1,r11,8001f6c <dup2+0x34> <== ALWAYS TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
8001f9c: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
8001fa0: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED
8001fa4: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8001fa8: f8 00 00 bb calli 8002294 <fcntl> <== NOT EXECUTED
8001fac: e3 ff ff f1 bi 8001f70 <dup2+0x38> <== NOT EXECUTED
080045dc <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
80045dc: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED
80045e0: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED
80045e4: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED
80045e8: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
80045ec: b8 40 58 00 mv r11,r2 <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
80045f0: 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)
{
80045f4: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
80045f8: 20 41 02 00 andi r1,r2,0x200 <== NOT EXECUTED
80045fc: 44 20 00 0b be r1,r0,8004628 <echo+0x4c> <== NOT EXECUTED
8004600: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8004604: 38 21 63 0c ori r1,r1,0x630c <== NOT EXECUTED
8004608: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
800460c: 34 02 00 05 mvi r2,5 <== NOT EXECUTED
8004610: b4 2c 08 00 add r1,r1,r12 <== NOT EXECUTED
8004614: 40 21 00 01 lbu r1,(r1+1) <== NOT EXECUTED
8004618: fb ff f3 d4 calli 8001568 <__lshrsi3> <== NOT EXECUTED
800461c: 7d 82 00 09 cmpnei r2,r12,9 <== NOT EXECUTED
8004620: a0 22 08 00 and r1,r1,r2 <== NOT EXECUTED
8004624: 5c 20 00 09 bne r1,r0,8004648 <echo+0x6c> <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
}
else {
oproc (c, tty);
8004628: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
800462c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8004630: fb ff ff 86 calli 8004448 <oproc> <== NOT EXECUTED
}
}
8004634: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8004638: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
800463c: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8004640: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
8004644: c3 a0 00 00 ret <== NOT EXECUTED
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
8004648: 34 01 00 0a mvi r1,10 <== NOT EXECUTED
800464c: 45 81 ff f7 be r12,r1,8004628 <echo+0x4c> <== NOT EXECUTED
char echobuf[2];
echobuf[0] = '^';
8004650: 34 04 00 5e mvi r4,94 <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
8004654: 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;
8004658: 19 8c 00 40 xori r12,r12,0x40 <== NOT EXECUTED
rtems_termios_puts (echobuf, 2, tty);
800465c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8004660: 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] = '^';
8004664: 33 84 00 10 sb (sp+16),r4 <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
8004668: 33 8c 00 11 sb (sp+17),r12 <== NOT EXECUTED
rtems_termios_puts (echobuf, 2, tty);
800466c: fb ff ff 1c calli 80042dc <rtems_termios_puts> <== NOT EXECUTED
tty->column += 2;
8004670: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8004674: 34 21 00 02 addi r1,r1,2 <== NOT EXECUTED
8004678: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
}
else {
oproc (c, tty);
}
}
800467c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8004680: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8004684: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8004688: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
800468c: c3 a0 00 00 ret <== NOT EXECUTED
080019b0 <endgrent>:
fclose(group_fp);
group_fp = fopen("/etc/group", "r");
}
void endgrent(void)
{
80019b0: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
80019b4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
if (group_fp != NULL)
80019b8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80019bc: 38 21 27 9c ori r1,r1,0x279c <== NOT EXECUTED
80019c0: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
80019c4: 44 20 00 02 be r1,r0,80019cc <endgrent+0x1c> <== NOT EXECUTED
fclose(group_fp);
80019c8: f8 00 38 8b calli 800fbf4 <fclose> <== NOT EXECUTED
}
80019cc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80019d0: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
80019d4: c3 a0 00 00 ret <== NOT EXECUTED
080019d8 <endpwent>:
fclose(passwd_fp);
passwd_fp = fopen("/etc/passwd", "r");
}
void endpwent(void)
{
80019d8: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
80019dc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
if (passwd_fp != NULL)
80019e0: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80019e4: 38 21 26 b4 ori r1,r1,0x26b4 <== NOT EXECUTED
80019e8: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
80019ec: 44 20 00 02 be r1,r0,80019f4 <endpwent+0x1c> <== NOT EXECUTED
fclose(passwd_fp);
80019f0: f8 00 38 81 calli 800fbf4 <fclose> <== NOT EXECUTED
}
80019f4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80019f8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
80019fc: c3 a0 00 00 ret <== NOT EXECUTED
08004690 <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)
{
8004690: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED
8004694: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED
8004698: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED
800469c: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED
80046a0: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED
80046a4: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED
80046a8: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED
80046ac: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED
80046b0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
if (tty->ccount == 0)
80046b4: 28 23 00 20 lw r3,(r1+32) <== NOT EXECUTED
* FIXME: Needs support for WERASE and ECHOPRT.
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
80046b8: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
80046bc: b8 40 68 00 mv r13,r2 <== NOT EXECUTED
if (tty->ccount == 0)
80046c0: 44 60 00 24 be r3,r0,8004750 <erase+0xc0> <== NOT EXECUTED
return;
if (lineFlag) {
80046c4: 5c 40 00 1f bne r2,r0,8004740 <erase+0xb0> <== NOT EXECUTED
80046c8: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
80046cc: 78 0e 08 02 mvhi r14,0x802 <== NOT EXECUTED
80046d0: 39 ce 63 0c ori r14,r14,0x630c <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
80046d4: 34 0f 00 09 mvi r15,9 <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
if (tty->column)
tty->column--;
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
80046d8: 78 11 08 02 mvhi r17,0x802 <== NOT EXECUTED
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
80046dc: 78 10 08 02 mvhi r16,0x802 <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
80046e0: 29 62 00 1c lw r2,(r11+28) <== NOT EXECUTED
80046e4: 34 63 ff ff addi r3,r3,-1 <== NOT EXECUTED
80046e8: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED
80046ec: b4 43 28 00 add r5,r2,r3 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
80046f0: 20 24 00 08 andi r4,r1,0x8 <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
80046f4: 40 a5 00 00 lbu r5,(r5+0) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
80046f8: 44 80 00 0d be r4,r0,800472c <erase+0x9c> <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
80046fc: 5d a0 00 03 bne r13,r0,8004708 <erase+0x78> <== NOT EXECUTED
8004700: 20 24 00 10 andi r4,r1,0x10 <== NOT EXECUTED
8004704: 44 8d 00 68 be r4,r13,80048a4 <erase+0x214> <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
8004708: 44 af 00 37 be r5,r15,80047e4 <erase+0x154> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
800470c: 29 c2 00 00 lw r2,(r14+0) <== NOT EXECUTED
8004710: 34 ac 00 01 addi r12,r5,1 <== NOT EXECUTED
8004714: b4 4c 10 00 add r2,r2,r12 <== NOT EXECUTED
8004718: 40 42 00 00 lbu r2,(r2+0) <== NOT EXECUTED
800471c: 20 42 00 20 andi r2,r2,0x20 <== NOT EXECUTED
8004720: 44 40 00 27 be r2,r0,80047bc <erase+0x12c> <== NOT EXECUTED
8004724: 20 21 02 00 andi r1,r1,0x200 <== NOT EXECUTED
8004728: 5c 20 00 14 bne r1,r0,8004778 <erase+0xe8> <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
800472c: 45 a0 00 09 be r13,r0,8004750 <erase+0xc0> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
8004730: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED
8004734: 44 60 00 07 be r3,r0,8004750 <erase+0xc0> <== NOT EXECUTED
8004738: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED
800473c: e3 ff ff e9 bi 80046e0 <erase+0x50> <== NOT EXECUTED
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
8004740: 28 21 00 3c lw r1,(r1+60) <== NOT EXECUTED
8004744: 20 22 00 08 andi r2,r1,0x8 <== NOT EXECUTED
8004748: 5c 40 00 4a bne r2,r0,8004870 <erase+0x1e0> <== NOT EXECUTED
tty->ccount = 0;
800474c: 59 62 00 20 sw (r11+32),r2 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
8004750: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8004754: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED
8004758: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED
800475c: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED
8004760: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED
8004764: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED
8004768: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED
800476c: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED
8004770: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED
8004774: c3 a0 00 00 ret <== NOT EXECUTED
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
8004778: ba 20 08 00 mv r1,r17 <== NOT EXECUTED
800477c: 38 21 3d 28 ori r1,r1,0x3d28 <== NOT EXECUTED
8004780: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
8004784: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
8004788: fb ff fe d5 calli 80042dc <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
800478c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8004790: 44 20 00 03 be r1,r0,800479c <erase+0x10c> <== NOT EXECUTED
tty->column--;
8004794: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
8004798: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
800479c: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED
80047a0: b4 2c 60 00 add r12,r1,r12 <== NOT EXECUTED
80047a4: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED
80047a8: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED
80047ac: 44 20 00 04 be r1,r0,80047bc <erase+0x12c> <== NOT EXECUTED
80047b0: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED
80047b4: 20 21 02 00 andi r1,r1,0x200 <== NOT EXECUTED
80047b8: 44 20 ff dd be r1,r0,800472c <erase+0x9c> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
80047bc: ba 20 08 00 mv r1,r17 <== NOT EXECUTED
80047c0: 38 21 3d 28 ori r1,r1,0x3d28 <== NOT EXECUTED
80047c4: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
80047c8: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
80047cc: fb ff fe c4 calli 80042dc <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
80047d0: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
80047d4: 44 20 ff d6 be r1,r0,800472c <erase+0x9c> <== NOT EXECUTED
tty->column--;
80047d8: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
80047dc: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
80047e0: e3 ff ff d3 bi 800472c <erase+0x9c> <== 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;
80047e4: 29 6c 00 2c lw r12,(r11+44) <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
80047e8: 44 60 00 0f be r3,r0,8004824 <erase+0x194> <== NOT EXECUTED
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
80047ec: 29 c6 00 00 lw r6,(r14+0) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
80047f0: 20 27 02 00 andi r7,r1,0x200 <== NOT EXECUTED
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
80047f4: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
80047f8: b4 41 20 00 add r4,r2,r1 <== NOT EXECUTED
80047fc: 40 84 00 00 lbu r4,(r4+0) <== NOT EXECUTED
8004800: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
8004804: b4 c4 28 00 add r5,r6,r4 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
8004808: 44 8f 00 16 be r4,r15,8004860 <erase+0x1d0> <== NOT EXECUTED
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
800480c: 40 a4 00 01 lbu r4,(r5+1) <== NOT EXECUTED
8004810: 20 84 00 20 andi r4,r4,0x20 <== NOT EXECUTED
8004814: 44 80 00 10 be r4,r0,8004854 <erase+0x1c4> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
8004818: 44 e0 00 02 be r7,r0,8004820 <erase+0x190> <== NOT EXECUTED
col += 2;
800481c: 35 8c 00 02 addi r12,r12,2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
8004820: 5c 61 ff f6 bne r3,r1,80047f8 <erase+0x168> <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
8004824: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8004828: 4d 81 ff c1 bge r12,r1,800472c <erase+0x9c> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
800482c: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
8004830: 38 21 3d 24 ori r1,r1,0x3d24 <== NOT EXECUTED
8004834: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8004838: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
800483c: fb ff fe a8 calli 80042dc <rtems_termios_puts> <== NOT EXECUTED
tty->column--;
8004840: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8004844: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
8004848: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
800484c: 48 2c ff f8 bg r1,r12,800482c <erase+0x19c> <== NOT EXECUTED
8004850: e3 ff ff b7 bi 800472c <erase+0x9c> <== NOT EXECUTED
else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
col += 2;
}
else {
col++;
8004854: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
8004858: 5c 61 ff e8 bne r3,r1,80047f8 <erase+0x168> <== NOT EXECUTED
800485c: e3 ff ff f2 bi 8004824 <erase+0x194> <== NOT EXECUTED
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
8004860: 39 8c 00 07 ori r12,r12,0x7 <== NOT EXECUTED
8004864: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
8004868: 5c 61 ff e4 bne r3,r1,80047f8 <erase+0x168> <== NOT EXECUTED
800486c: e3 ff ff ee bi 8004824 <erase+0x194> <== NOT EXECUTED
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
8004870: 20 2c 00 10 andi r12,r1,0x10 <== NOT EXECUTED
8004874: 5d 80 ff 96 bne r12,r0,80046cc <erase+0x3c> <== NOT EXECUTED
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
8004878: 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;
800487c: 59 6c 00 20 sw (r11+32),r12 <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
8004880: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8004884: fb ff ff 56 calli 80045dc <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
8004888: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED
800488c: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED
8004890: 44 2c ff b0 be r1,r12,8004750 <erase+0xc0> <== NOT EXECUTED
echo ('\n', tty);
8004894: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8004898: 34 01 00 0a mvi r1,10 <== NOT EXECUTED
800489c: fb ff ff 50 calli 80045dc <echo> <== NOT EXECUTED
80048a0: e3 ff ff ac bi 8004750 <erase+0xc0> <== NOT EXECUTED
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
80048a4: 41 61 00 43 lbu r1,(r11+67) <== NOT EXECUTED
80048a8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
80048ac: fb ff ff 4c calli 80045dc <echo> <== NOT EXECUTED
80048b0: e3 ff ff a8 bi 8004750 <erase+0xc0> <== NOT EXECUTED
08002294 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
8002294: 37 9c ff c0 addi sp,sp,-64
8002298: 5b 8b 00 24 sw (sp+36),r11
800229c: 5b 8c 00 20 sw (sp+32),r12
80022a0: 5b 8d 00 1c sw (sp+28),r13
80022a4: 5b 8e 00 18 sw (sp+24),r14
80022a8: 5b 8f 00 14 sw (sp+20),r15
80022ac: 5b 90 00 10 sw (sp+16),r16
80022b0: 5b 91 00 0c sw (sp+12),r17
80022b4: 5b 92 00 08 sw (sp+8),r18
80022b8: 5b 9d 00 04 sw (sp+4),ra
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
80022bc: 78 09 08 02 mvhi r9,0x802
80022c0: 39 29 20 10 ori r9,r9,0x2010
80022c4: 29 30 00 00 lw r16,(r9+0)
int fcntl(
int fd,
int cmd,
...
)
{
80022c8: 5b 83 00 2c sw (sp+44),r3
80022cc: 5b 84 00 30 sw (sp+48),r4
80022d0: 5b 85 00 34 sw (sp+52),r5
80022d4: 5b 86 00 38 sw (sp+56),r6
80022d8: 5b 87 00 3c sw (sp+60),r7
80022dc: 5b 88 00 40 sw (sp+64),r8
80022e0: 5b 82 00 28 sw (sp+40),r2
80022e4: b8 40 68 00 mv r13,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, ...));
80022e8: 37 91 00 2c addi r17,sp,44
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
80022ec: 56 01 00 06 bgu r16,r1,8002304 <fcntl+0x70> <== ALWAYS TAKEN
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
80022f0: f8 00 38 1a calli 8010358 <__errno> <== NOT EXECUTED
80022f4: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
80022f8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80022fc: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
8002300: e0 00 00 1c bi 8002370 <fcntl+0xdc> <== NOT EXECUTED
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
8002304: 34 02 00 03 mvi r2,3
8002308: 78 0e 08 02 mvhi r14,0x802
800230c: fb ff fa 2e calli 8000bc4 <__ashlsi3>
8002310: 39 ce 27 24 ori r14,r14,0x2724
8002314: 29 d2 00 00 lw r18,(r14+0)
8002318: 34 02 00 03 mvi r2,3
800231c: b8 20 58 00 mv r11,r1
8002320: fb ff fa 29 calli 8000bc4 <__ashlsi3>
8002324: b5 61 08 00 add r1,r11,r1
8002328: b6 41 58 00 add r11,r18,r1
rtems_libio_check_is_open(iop);
800232c: 29 6f 00 18 lw r15,(r11+24)
8002330: 21 e1 01 00 andi r1,r15,0x100
8002334: 44 20 ff ef be r1,r0,80022f0 <fcntl+0x5c> <== NEVER TAKEN
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
8002338: 34 02 00 09 mvi r2,9
800233c: 55 a2 00 5b bgu r13,r2,80024a8 <fcntl+0x214>
8002340: 78 0c 08 02 mvhi r12,0x802
8002344: b9 a0 08 00 mv r1,r13
8002348: 34 02 00 02 mvi r2,2
800234c: fb ff fa 1e calli 8000bc4 <__ashlsi3>
8002350: 39 8c 0c a4 ori r12,r12,0xca4
8002354: b5 81 08 00 add r1,r12,r1
8002358: 28 21 00 00 lw r1,(r1+0)
800235c: c0 20 00 00 b r1
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
8002360: f8 00 37 fe calli 8010358 <__errno>
8002364: 34 02 00 86 mvi r2,134
8002368: 58 22 00 00 sw (r1+0),r2
800236c: 34 0c ff ff mvi r12,-1
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
8002370: b9 80 08 00 mv r1,r12
8002374: 2b 9d 00 04 lw ra,(sp+4)
8002378: 2b 8b 00 24 lw r11,(sp+36)
800237c: 2b 8c 00 20 lw r12,(sp+32)
8002380: 2b 8d 00 1c lw r13,(sp+28)
8002384: 2b 8e 00 18 lw r14,(sp+24)
8002388: 2b 8f 00 14 lw r15,(sp+20)
800238c: 2b 90 00 10 lw r16,(sp+16)
8002390: 2b 91 00 0c lw r17,(sp+12)
8002394: 2b 92 00 08 lw r18,(sp+8)
8002398: 37 9c 00 40 addi sp,sp,64
800239c: c3 a0 00 00 ret
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
80023a0: 2a 21 00 00 lw r1,(r17+0)
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
80023a4: 34 0c 00 00 mvi r12,0
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
80023a8: f8 00 02 b7 calli 8002e84 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
80023ac: 29 63 00 18 lw r3,(r11+24)
80023b0: 34 02 fd fe mvi r2,-514
80023b4: 20 21 02 01 andi r1,r1,0x201
80023b8: a0 62 10 00 and r2,r3,r2
80023bc: b8 22 08 00 or r1,r1,r2
80023c0: 59 61 00 18 sw (r11+24),r1
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
if (iop->handlers->fcntl_h) {
80023c4: 29 61 00 40 lw r1,(r11+64)
80023c8: 28 23 00 30 lw r3,(r1+48)
80023cc: 44 60 ff e9 be r3,r0,8002370 <fcntl+0xdc> <== NEVER TAKEN
int err = (*iop->handlers->fcntl_h)( cmd, iop );
80023d0: b9 60 10 00 mv r2,r11
80023d4: b9 a0 08 00 mv r1,r13
80023d8: d8 60 00 00 call r3
80023dc: b8 20 58 00 mv r11,r1
if (err) {
80023e0: 44 20 ff e4 be r1,r0,8002370 <fcntl+0xdc> <== ALWAYS TAKEN
errno = err;
80023e4: f8 00 37 dd calli 8010358 <__errno> <== NOT EXECUTED
80023e8: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
80023ec: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
80023f0: e3 ff ff e0 bi 8002370 <fcntl+0xdc> <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
80023f4: b9 e0 08 00 mv r1,r15
80023f8: f8 00 01 d3 calli 8002b44 <rtems_libio_to_fcntl_flags>
80023fc: b8 20 60 00 mv r12,r1
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
8002400: 48 0c ff dc bg r0,r12,8002370 <fcntl+0xdc> <== NEVER TAKEN
8002404: e3 ff ff f0 bi 80023c4 <fcntl+0x130>
* 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 ) )
8002408: 2a 2c 00 00 lw r12,(r17+0)
800240c: 45 80 00 2c be r12,r0,80024bc <fcntl+0x228> <== NEVER TAKEN
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
8002410: 39 ef 08 00 ori r15,r15,0x800
8002414: 59 6f 00 18 sw (r11+24),r15
8002418: 34 0c 00 00 mvi r12,0
800241c: e3 ff ff ea bi 80023c4 <fcntl+0x130>
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
8002420: b9 e0 08 00 mv r1,r15
8002424: 34 02 00 0b mvi r2,11
8002428: fb ff fa 0f calli 8000c64 <__lshrsi3>
800242c: 20 2c 00 01 andi r12,r1,0x1
8002430: e3 ff ff e5 bi 80023c4 <fcntl+0x130>
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
8002434: 2a 31 00 00 lw r17,(r17+0)
if ( fd2 )
8002438: 46 20 00 2f be r17,r0,80024f4 <fcntl+0x260> <== ALWAYS TAKEN
diop = rtems_libio_iop( fd2 );
800243c: 56 11 00 24 bgu r16,r17,80024cc <fcntl+0x238> <== NOT EXECUTED
8002440: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8002444: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
8002448: 29 62 00 1c lw r2,(r11+28)
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
800244c: 29 64 00 40 lw r4,(r11+64)
diop->file_info = iop->file_info;
diop->flags = iop->flags;
8002450: 58 6f 00 18 sw (r3+24),r15
diop->pathinfo = iop->pathinfo;
8002454: 58 62 00 1c sw (r3+28),r2
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
8002458: 58 64 00 40 sw (r3+64),r4
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
800245c: 29 64 00 20 lw r4,(r11+32)
break;
}
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
8002460: 29 62 00 3c lw r2,(r11+60)
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
8002464: c8 32 08 00 sub r1,r1,r18
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
8002468: 58 64 00 20 sw (r3+32),r4
break;
}
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
800246c: 58 62 00 3c sw (r3+60),r2
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
8002470: 29 62 00 24 lw r2,(r11+36)
8002474: 58 62 00 24 sw (r3+36),r2
8002478: 29 64 00 28 lw r4,(r11+40)
ret = (int) (diop - rtems_libio_iops);
800247c: 34 02 00 03 mvi r2,3
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
8002480: 58 64 00 28 sw (r3+40),r4
8002484: 29 64 00 2c lw r4,(r11+44)
8002488: 58 64 00 2c sw (r3+44),r4
ret = (int) (diop - rtems_libio_iops);
800248c: fb ff fa 1e calli 8000d04 <__ashrsi3>
8002490: 78 02 38 e3 mvhi r2,0x38e3
8002494: 38 42 8e 39 ori r2,r2,0x8e39
8002498: f8 00 75 0a calli 801f8c0 <__mulsi3>
800249c: b8 20 60 00 mv r12,r1
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
80024a0: 48 0c ff b4 bg r0,r12,8002370 <fcntl+0xdc> <== NEVER TAKEN
80024a4: e3 ff ff c8 bi 80023c4 <fcntl+0x130>
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
80024a8: f8 00 37 ac calli 8010358 <__errno>
80024ac: 34 02 00 16 mvi r2,22
80024b0: 58 22 00 00 sw (r1+0),r2
80024b4: 34 0c ff ff mvi r12,-1
80024b8: e3 ff ff ae bi 8002370 <fcntl+0xdc>
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
80024bc: 34 01 f7 ff mvi r1,-2049 <== NOT EXECUTED
80024c0: a1 e1 78 00 and r15,r15,r1 <== NOT EXECUTED
80024c4: 59 6f 00 18 sw (r11+24),r15 <== NOT EXECUTED
80024c8: e3 ff ff bf bi 80023c4 <fcntl+0x130> <== NOT EXECUTED
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
80024cc: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
80024d0: ba 20 08 00 mv r1,r17 <== NOT EXECUTED
80024d4: fb ff f9 bc calli 8000bc4 <__ashlsi3> <== NOT EXECUTED
80024d8: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
80024dc: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
80024e0: fb ff f9 b9 calli 8000bc4 <__ashlsi3> <== NOT EXECUTED
80024e4: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED
80024e8: b6 41 18 00 add r3,r18,r1 <== NOT EXECUTED
80024ec: b8 60 08 00 mv r1,r3 <== NOT EXECUTED
80024f0: e3 ff ff d6 bi 8002448 <fcntl+0x1b4> <== NOT EXECUTED
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
80024f4: f8 00 02 2b calli 8002da0 <rtems_libio_allocate>
80024f8: b8 20 18 00 mv r3,r1
if ( diop == 0 ) {
80024fc: 34 0c ff ff mvi r12,-1
8002500: 44 31 ff 9c be r1,r17,8002370 <fcntl+0xdc> <== NEVER TAKEN
8002504: 29 d2 00 00 lw r18,(r14+0)
8002508: 29 6f 00 18 lw r15,(r11+24)
800250c: e3 ff ff cf bi 8002448 <fcntl+0x1b4>
08002534 <fdatasync>:
#include <rtems/seterr.h>
int fdatasync(
int fd
)
{
8002534: 37 9c ff f4 addi sp,sp,-12
8002538: 5b 8b 00 0c sw (sp+12),r11
800253c: 5b 8c 00 08 sw (sp+8),r12
8002540: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
8002544: 78 02 08 02 mvhi r2,0x802
8002548: 38 42 20 10 ori r2,r2,0x2010
800254c: 28 42 00 00 lw r2,(r2+0)
8002550: 54 41 00 06 bgu r2,r1,8002568 <fdatasync+0x34>
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
8002554: f8 00 37 81 calli 8010358 <__errno>
8002558: 34 02 00 09 mvi r2,9
800255c: 58 22 00 00 sw (r1+0),r2
8002560: 34 01 ff ff mvi r1,-1
8002564: e0 00 00 14 bi 80025b4 <fdatasync+0x80>
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
8002568: 34 02 00 03 mvi r2,3
800256c: fb ff f9 96 calli 8000bc4 <__ashlsi3>
8002570: 34 02 00 03 mvi r2,3
8002574: 78 0b 08 02 mvhi r11,0x802
8002578: b8 20 60 00 mv r12,r1
800257c: 39 6b 27 24 ori r11,r11,0x2724
8002580: fb ff f9 91 calli 8000bc4 <__ashlsi3>
8002584: 29 62 00 00 lw r2,(r11+0)
8002588: b5 81 08 00 add r1,r12,r1
800258c: b4 41 08 00 add r1,r2,r1
rtems_libio_check_is_open(iop);
8002590: 28 22 00 18 lw r2,(r1+24)
8002594: 20 43 01 00 andi r3,r2,0x100
8002598: 44 60 ff ef be r3,r0,8002554 <fdatasync+0x20> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
800259c: 20 42 00 04 andi r2,r2,0x4
80025a0: 44 40 00 0a be r2,r0,80025c8 <fdatasync+0x94>
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
80025a4: 28 22 00 40 lw r2,(r1+64)
80025a8: 28 42 00 2c lw r2,(r2+44)
80025ac: 44 40 00 0c be r2,r0,80025dc <fdatasync+0xa8>
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
80025b0: d8 40 00 00 call r2
}
80025b4: 2b 9d 00 04 lw ra,(sp+4)
80025b8: 2b 8b 00 0c lw r11,(sp+12)
80025bc: 2b 8c 00 08 lw r12,(sp+8)
80025c0: 37 9c 00 0c addi sp,sp,12
80025c4: c3 a0 00 00 ret
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
80025c8: f8 00 37 64 calli 8010358 <__errno>
80025cc: 34 02 00 16 mvi r2,22
80025d0: 58 22 00 00 sw (r1+0),r2
80025d4: 34 01 ff ff mvi r1,-1
80025d8: e3 ff ff f7 bi 80025b4 <fdatasync+0x80>
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
80025dc: f8 00 37 5f calli 8010358 <__errno>
80025e0: 34 02 00 86 mvi r2,134
80025e4: 58 22 00 00 sw (r1+0),r2
80025e8: 34 01 ff ff mvi r1,-1
80025ec: e3 ff ff f2 bi 80025b4 <fdatasync+0x80>
0800ae68 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
800ae68: 37 9c ff d4 addi sp,sp,-44
800ae6c: 5b 8b 00 24 sw (sp+36),r11
800ae70: 5b 8c 00 20 sw (sp+32),r12
800ae74: 5b 8d 00 1c sw (sp+28),r13
800ae78: 5b 8e 00 18 sw (sp+24),r14
800ae7c: 5b 8f 00 14 sw (sp+20),r15
800ae80: 5b 90 00 10 sw (sp+16),r16
800ae84: 5b 91 00 0c sw (sp+12),r17
800ae88: 5b 92 00 08 sw (sp+8),r18
800ae8c: 5b 9d 00 04 sw (sp+4),ra
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
800ae90: 78 0d 08 01 mvhi r13,0x801
800ae94: 39 ad e6 a8 ori r13,r13,0xe6a8
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
800ae98: b8 20 70 00 mv r14,r1
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
800ae9c: 29 a1 00 00 lw r1,(r13+0)
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
800aea0: b8 40 88 00 mv r17,r2
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
800aea4: 34 02 00 00 mvi r2,0
800aea8: b8 40 18 00 mv r3,r2
800aeac: fb ff f7 9f calli 8008d28 <rtems_semaphore_obtain>
800aeb0: b8 20 58 00 mv r11,r1
800aeb4: 34 0c ff fc mvi r12,-4
800aeb8: 5c 20 00 1b bne r1,r0,800af24 <fifo_open+0xbc> <== ALWAYS TAKEN
RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL)
return -EINTR;
pipe = *pipep;
800aebc: 29 cf 00 00 lw r15,(r14+0) <== NOT EXECUTED
if (pipe == NULL) {
800aec0: 45 e1 00 25 be r15,r1,800af54 <fifo_open+0xec> <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
800aec4: 29 e1 00 28 lw r1,(r15+40) <== NOT EXECUTED
800aec8: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800aecc: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
800aed0: fb ff f7 96 calli 8008d28 <rtems_semaphore_obtain> <== NOT EXECUTED
800aed4: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
800aed8: 44 20 00 02 be r1,r0,800aee0 <fifo_open+0x78> <== NOT EXECUTED
800aedc: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
800aee0: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED
800aee4: 44 20 00 c3 be r1,r0,800b1f0 <fifo_open+0x388> <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
800aee8: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED
800aeec: fb ff f7 f0 calli 8008eac <rtems_semaphore_release> <== NOT EXECUTED
pipe_control_t *pipe;
uint prevCounter;
int err;
err = pipe_new(pipep);
if (err)
800aef0: 5d 80 00 0d bne r12,r0,800af24 <fifo_open+0xbc> <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
800aef4: 2a 22 00 18 lw r2,(r17+24) <== NOT EXECUTED
800aef8: 34 03 00 04 mvi r3,4 <== NOT EXECUTED
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
800aefc: 29 cb 00 00 lw r11,(r14+0) <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
800af00: 20 41 00 06 andi r1,r2,0x6 <== NOT EXECUTED
800af04: 44 23 00 8a be r1,r3,800b12c <fifo_open+0x2c4> <== NOT EXECUTED
800af08: 34 02 00 06 mvi r2,6 <== NOT EXECUTED
800af0c: 44 22 00 a7 be r1,r2,800b1a8 <fifo_open+0x340> <== NOT EXECUTED
800af10: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
800af14: 44 22 00 65 be r1,r2,800b0a8 <fifo_open+0x240> <== NOT EXECUTED
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
800af18: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800af1c: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
800af20: fb ff f7 e3 calli 8008eac <rtems_semaphore_release> <== NOT EXECUTED
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
800af24: b9 80 08 00 mv r1,r12
800af28: 2b 9d 00 04 lw ra,(sp+4)
800af2c: 2b 8b 00 24 lw r11,(sp+36)
800af30: 2b 8c 00 20 lw r12,(sp+32)
800af34: 2b 8d 00 1c lw r13,(sp+28)
800af38: 2b 8e 00 18 lw r14,(sp+24)
800af3c: 2b 8f 00 14 lw r15,(sp+20)
800af40: 2b 90 00 10 lw r16,(sp+16)
800af44: 2b 91 00 0c lw r17,(sp+12)
800af48: 2b 92 00 08 lw r18,(sp+8)
800af4c: 37 9c 00 2c addi sp,sp,44
800af50: c3 a0 00 00 ret
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
800af54: 34 01 00 34 mvi r1,52 <== NOT EXECUTED
800af58: fb ff f4 3f calli 8008054 <malloc> <== NOT EXECUTED
800af5c: b8 20 80 00 mv r16,r1 <== NOT EXECUTED
800af60: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
if (pipe == NULL)
800af64: 34 0c ff f4 mvi r12,-12 <== NOT EXECUTED
800af68: 44 20 ff e0 be r1,r0,800aee8 <fifo_open+0x80> <== NOT EXECUTED
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
800af6c: 34 02 02 00 mvi r2,512 <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
800af70: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
800af74: 5a 0b 00 00 sw (r16+0),r11 <== NOT EXECUTED
800af78: 5a 0b 00 08 sw (r16+8),r11 <== NOT EXECUTED
800af7c: 5a 0b 00 0c sw (r16+12),r11 <== NOT EXECUTED
800af80: 5a 0b 00 10 sw (r16+16),r11 <== NOT EXECUTED
800af84: 5a 0b 00 14 sw (r16+20),r11 <== NOT EXECUTED
800af88: 5a 0b 00 18 sw (r16+24),r11 <== NOT EXECUTED
800af8c: 5a 0b 00 1c sw (r16+28),r11 <== NOT EXECUTED
800af90: 5a 0b 00 20 sw (r16+32),r11 <== NOT EXECUTED
800af94: 5a 0b 00 24 sw (r16+36),r11 <== NOT EXECUTED
800af98: 5a 0b 00 28 sw (r16+40),r11 <== NOT EXECUTED
800af9c: 5a 0b 00 2c sw (r16+44),r11 <== NOT EXECUTED
800afa0: 5a 0b 00 30 sw (r16+48),r11 <== NOT EXECUTED
pipe->Size = PIPE_BUF;
800afa4: 5a 02 00 04 sw (r16+4),r2 <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
800afa8: fb ff f4 2b calli 8008054 <malloc> <== NOT EXECUTED
800afac: 5a 01 00 00 sw (r16+0),r1 <== NOT EXECUTED
if (! pipe->Buffer)
800afb0: 44 20 00 9c be r1,r0,800b220 <fifo_open+0x3b8> <== NOT EXECUTED
goto err_buf;
err = -EINTR;
if (rtems_barrier_create(
800afb4: 78 0c 08 01 mvhi r12,0x801 <== NOT EXECUTED
800afb8: 39 8c e1 9c ori r12,r12,0xe19c <== NOT EXECUTED
800afbc: 41 83 00 00 lbu r3,(r12+0) <== NOT EXECUTED
800afc0: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED
800afc4: 38 21 72 00 ori r1,r1,0x7200 <== NOT EXECUTED
800afc8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
800afcc: b8 61 08 00 or r1,r3,r1 <== NOT EXECUTED
800afd0: 36 04 00 2c addi r4,r16,44 <== NOT EXECUTED
800afd4: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
800afd8: f8 00 03 00 calli 800bbd8 <rtems_barrier_create> <== NOT EXECUTED
800afdc: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
800afe0: 5c 20 00 8d bne r1,r0,800b214 <fifo_open+0x3ac> <== 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(
800afe4: 41 82 00 00 lbu r2,(r12+0) <== NOT EXECUTED
800afe8: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED
800afec: 38 21 77 00 ori r1,r1,0x7700 <== NOT EXECUTED
800aff0: b8 41 08 00 or r1,r2,r1 <== NOT EXECUTED
800aff4: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
800aff8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
800affc: 36 04 00 30 addi r4,r16,48 <== NOT EXECUTED
800b000: f8 00 02 f6 calli 800bbd8 <rtems_barrier_create> <== NOT EXECUTED
800b004: b8 20 90 00 mv r18,r1 <== NOT EXECUTED
800b008: 5c 2b 00 81 bne r1,r11,800b20c <fifo_open+0x3a4> <== 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(
800b00c: 41 82 00 00 lbu r2,(r12+0) <== NOT EXECUTED
800b010: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED
800b014: 38 21 73 00 ori r1,r1,0x7300 <== NOT EXECUTED
800b018: b8 41 08 00 or r1,r2,r1 <== NOT EXECUTED
800b01c: 34 03 00 10 mvi r3,16 <== NOT EXECUTED
800b020: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
800b024: ba 40 20 00 mv r4,r18 <== NOT EXECUTED
800b028: 36 05 00 28 addi r5,r16,40 <== NOT EXECUTED
800b02c: fb ff dc 65 calli 80021c0 <rtems_semaphore_create> <== NOT EXECUTED
800b030: 5c 32 00 75 bne r1,r18,800b204 <fifo_open+0x39c> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
800b034: 2a 02 00 2c lw r2,(r16+44) <== NOT EXECUTED
800b038: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
800b03c: 37 90 00 28 addi r16,sp,40 <== NOT EXECUTED
800b040: ba 00 18 00 mv r3,r16 <== NOT EXECUTED
800b044: 38 21 f1 98 ori r1,r1,0xf198 <== NOT EXECUTED
800b048: fb ff fb 2b calli 8009cf4 <_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
800b04c: 28 22 00 4c lw r2,(r1+76) <== NOT EXECUTED
800b050: 78 0b 10 00 mvhi r11,0x1000 <== NOT EXECUTED
800b054: 39 6b 00 00 ori r11,r11,0x0 <== NOT EXECUTED
800b058: b8 4b 10 00 or r2,r2,r11 <== NOT EXECUTED
800b05c: 58 22 00 4c sw (r1+76),r2 <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
800b060: fb ff e5 b2 calli 8004728 <_Thread_Enable_dispatch> <== NOT EXECUTED
800b064: 29 e2 00 30 lw r2,(r15+48) <== NOT EXECUTED
800b068: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
800b06c: ba 00 18 00 mv r3,r16 <== NOT EXECUTED
800b070: 38 21 f1 98 ori r1,r1,0xf198 <== NOT EXECUTED
800b074: fb ff fb 20 calli 8009cf4 <_Objects_Get> <== NOT EXECUTED
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
800b078: 28 22 00 4c lw r2,(r1+76) <== NOT EXECUTED
800b07c: b8 4b 58 00 or r11,r2,r11 <== NOT EXECUTED
800b080: 58 2b 00 4c sw (r1+76),r11 <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
800b084: fb ff e5 a9 calli 8004728 <_Thread_Enable_dispatch> <== NOT EXECUTED
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
800b088: 41 81 00 00 lbu r1,(r12+0) <== NOT EXECUTED
800b08c: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED
800b090: 31 82 00 00 sb (r12+0),r2 <== NOT EXECUTED
800b094: 34 02 00 7a mvi r2,122 <== NOT EXECUTED
800b098: 5c 22 ff 8b bne r1,r2,800aec4 <fifo_open+0x5c> <== NOT EXECUTED
c = 'a';
800b09c: 34 01 00 61 mvi r1,97 <== NOT EXECUTED
800b0a0: 31 81 00 00 sb (r12+0),r1 <== NOT EXECUTED
800b0a4: e3 ff ff 88 bi 800aec4 <fifo_open+0x5c> <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
800b0a8: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED
if (pipe->Readers ++ == 0)
800b0ac: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
800b0b0: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
800b0b4: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
800b0b8: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
800b0bc: 59 62 00 10 sw (r11+16),r2 <== NOT EXECUTED
800b0c0: 44 20 00 71 be r1,r0,800b284 <fifo_open+0x41c> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
800b0c4: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
800b0c8: 5c 20 ff 94 bne r1,r0,800af18 <fifo_open+0xb0> <== NOT EXECUTED
/* Not an error */
if (LIBIO_NODELAY(iop))
800b0cc: 2a 22 00 18 lw r2,(r17+24) <== NOT EXECUTED
800b0d0: 20 42 00 01 andi r2,r2,0x1 <== NOT EXECUTED
800b0d4: 5c 41 ff 91 bne r2,r1,800af18 <fifo_open+0xb0> <== NOT EXECUTED
break;
prevCounter = pipe->writerCounter;
800b0d8: 29 6d 00 24 lw r13,(r11+36) <== NOT EXECUTED
800b0dc: e0 00 00 06 bi 800b0f4 <fifo_open+0x28c> <== NOT EXECUTED
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
800b0e0: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800b0e4: fb ff f7 11 calli 8008d28 <rtems_semaphore_obtain> <== NOT EXECUTED
800b0e8: 5c 2c 00 0c bne r1,r12,800b118 <fifo_open+0x2b0> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->writerCounter);
800b0ec: 29 61 00 24 lw r1,(r11+36) <== NOT EXECUTED
800b0f0: 5c 2d ff 8a bne r1,r13,800af18 <fifo_open+0xb0> <== NOT EXECUTED
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
800b0f4: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800b0f8: fb ff f7 6d calli 8008eac <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
800b0fc: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED
800b100: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800b104: f8 00 03 3a calli 800bdec <rtems_barrier_wait> <== NOT EXECUTED
800b108: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
800b10c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
800b110: 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))
800b114: 44 20 ff f3 be r1,r0,800b0e0 <fifo_open+0x278> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
return 0;
800b118: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED
out_error:
pipe_release(pipep, iop);
800b11c: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
800b120: ba 20 10 00 mv r2,r17 <== NOT EXECUTED
800b124: fb ff ff 00 calli 800ad24 <pipe_release> <== NOT EXECUTED
return err;
800b128: e3 ff ff 7f bi 800af24 <fifo_open+0xbc> <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
800b12c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
800b130: 5c 20 00 04 bne r1,r0,800b140 <fifo_open+0x2d8> <== NOT EXECUTED
800b134: 20 42 00 01 andi r2,r2,0x1 <== NOT EXECUTED
800b138: 34 0c ff fa mvi r12,-6 <== NOT EXECUTED
800b13c: 5c 41 ff f8 bne r2,r1,800b11c <fifo_open+0x2b4> <== NOT EXECUTED
err = -ENXIO;
goto out_error;
}
pipe->writerCounter ++;
800b140: 29 64 00 24 lw r4,(r11+36) <== NOT EXECUTED
if (pipe->Writers ++ == 0)
800b144: 29 62 00 14 lw r2,(r11+20) <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
err = -ENXIO;
goto out_error;
}
pipe->writerCounter ++;
800b148: 34 84 00 01 addi r4,r4,1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
800b14c: 34 43 00 01 addi r3,r2,1 <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
err = -ENXIO;
goto out_error;
}
pipe->writerCounter ++;
800b150: 59 64 00 24 sw (r11+36),r4 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
800b154: 59 63 00 14 sw (r11+20),r3 <== NOT EXECUTED
800b158: 44 40 00 35 be r2,r0,800b22c <fifo_open+0x3c4> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0) {
800b15c: 5c 20 ff 6f bne r1,r0,800af18 <fifo_open+0xb0> <== NOT EXECUTED
prevCounter = pipe->readerCounter;
800b160: 29 6d 00 20 lw r13,(r11+32) <== NOT EXECUTED
800b164: e0 00 00 06 bi 800b17c <fifo_open+0x314> <== NOT EXECUTED
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
800b168: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800b16c: fb ff f6 ef calli 8008d28 <rtems_semaphore_obtain> <== NOT EXECUTED
800b170: 5c 2c ff ea bne r1,r12,800b118 <fifo_open+0x2b0> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->readerCounter);
800b174: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED
800b178: 5c 2d ff 68 bne r1,r13,800af18 <fifo_open+0xb0> <== NOT EXECUTED
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
800b17c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800b180: fb ff f7 4b calli 8008eac <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
800b184: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
800b188: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800b18c: f8 00 03 18 calli 800bdec <rtems_barrier_wait> <== NOT EXECUTED
800b190: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
800b194: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
800b198: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
800b19c: 44 20 ff f3 be r1,r0,800b168 <fifo_open+0x300> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
return 0;
800b1a0: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED
800b1a4: e3 ff ff de bi 800b11c <fifo_open+0x2b4> <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
800b1a8: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED
if (pipe->Readers ++ == 0)
800b1ac: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
800b1b0: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
800b1b4: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
800b1b8: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
800b1bc: 59 62 00 10 sw (r11+16),r2 <== NOT EXECUTED
800b1c0: 44 20 00 2d be r1,r0,800b274 <fifo_open+0x40c> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
800b1c4: 29 63 00 24 lw r3,(r11+36) <== NOT EXECUTED
if (pipe->Writers ++ == 0)
800b1c8: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
800b1cc: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
800b1d0: 34 22 00 01 addi r2,r1,1 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
800b1d4: 59 63 00 24 sw (r11+36),r3 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
800b1d8: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED
800b1dc: 5c 20 ff 4f bne r1,r0,800af18 <fifo_open+0xb0> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
800b1e0: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED
800b1e4: 37 82 00 2c addi r2,sp,44 <== NOT EXECUTED
800b1e8: f8 00 02 e2 calli 800bd70 <rtems_barrier_release> <== NOT EXECUTED
800b1ec: e3 ff ff 4b bi 800af18 <fifo_open+0xb0> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
800b1f0: 5d 81 00 14 bne r12,r1,800b240 <fifo_open+0x3d8> <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
800b1f4: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED
if (*pipep == NULL) {
if (err)
pipe_free(pipe);
else
*pipep = pipe;
800b1f8: 59 cf 00 00 sw (r14+0),r15 <== NOT EXECUTED
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
800b1fc: fb ff f7 2c calli 8008eac <rtems_semaphore_release> <== NOT EXECUTED
800b200: e3 ff ff 3d bi 800aef4 <fifo_open+0x8c> <== NOT EXECUTED
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
800b204: 2a 01 00 30 lw r1,(r16+48) <== NOT EXECUTED
800b208: f8 00 02 ba calli 800bcf0 <rtems_barrier_delete> <== NOT EXECUTED
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
800b20c: 2a 01 00 2c lw r1,(r16+44) <== NOT EXECUTED
800b210: f8 00 02 b8 calli 800bcf0 <rtems_barrier_delete> <== NOT EXECUTED
err_rbar:
free(pipe->Buffer);
800b214: 2a 01 00 00 lw r1,(r16+0) <== NOT EXECUTED
800b218: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED
800b21c: fb ff f1 cc calli 800794c <free> <== NOT EXECUTED
err_buf:
free(pipe);
800b220: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
800b224: fb ff f1 ca calli 800794c <free> <== NOT EXECUTED
800b228: e3 ff ff 30 bi 800aee8 <fifo_open+0x80> <== NOT EXECUTED
goto out_error;
}
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
800b22c: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED
800b230: 37 82 00 2c addi r2,sp,44 <== NOT EXECUTED
800b234: f8 00 02 cf calli 800bd70 <rtems_barrier_release> <== NOT EXECUTED
800b238: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
800b23c: e3 ff ff c8 bi 800b15c <fifo_open+0x2f4> <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
800b240: 29 e1 00 2c lw r1,(r15+44) <== NOT EXECUTED
800b244: f8 00 02 ab calli 800bcf0 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
800b248: 29 e1 00 30 lw r1,(r15+48) <== NOT EXECUTED
800b24c: f8 00 02 a9 calli 800bcf0 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
800b250: 29 e1 00 28 lw r1,(r15+40) <== NOT EXECUTED
800b254: fb ff f6 72 calli 8008c1c <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
800b258: 29 e1 00 00 lw r1,(r15+0) <== NOT EXECUTED
800b25c: fb ff f1 bc calli 800794c <free> <== NOT EXECUTED
free(pipe);
800b260: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
800b264: fb ff f1 ba calli 800794c <free> <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
800b268: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED
800b26c: fb ff f7 10 calli 8008eac <rtems_semaphore_release> <== NOT EXECUTED
800b270: e3 ff ff 2d bi 800af24 <fifo_open+0xbc> <== NOT EXECUTED
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
800b274: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
800b278: 37 82 00 2c addi r2,sp,44 <== NOT EXECUTED
800b27c: f8 00 02 bd calli 800bd70 <rtems_barrier_release> <== NOT EXECUTED
800b280: e3 ff ff d1 bi 800b1c4 <fifo_open+0x35c> <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
800b284: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
800b288: 37 82 00 2c addi r2,sp,44 <== NOT EXECUTED
800b28c: f8 00 02 b9 calli 800bd70 <rtems_barrier_release> <== NOT EXECUTED
800b290: e3 ff ff 8d bi 800b0c4 <fifo_open+0x25c> <== NOT EXECUTED
08007124 <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;
8007124: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8007128: 38 63 b0 70 ori r3,r3,0xb070 <== NOT EXECUTED
800712c: 28 61 00 00 lw r1,(r3+0) <== NOT EXECUTED
8007130: 34 63 00 04 addi r3,r3,4 <== NOT EXECUTED
8007134: 44 23 00 09 be r1,r3,8007158 <file_systems_below_this_mountpoint+0x34><== 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 ) {
8007138: 28 42 00 10 lw r2,(r2+16) <== NOT EXECUTED
800713c: 28 24 00 18 lw r4,(r1+24) <== NOT EXECUTED
8007140: 5c 82 00 04 bne r4,r2,8007150 <file_systems_below_this_mountpoint+0x2c><== NOT EXECUTED
8007144: e0 00 00 07 bi 8007160 <file_systems_below_this_mountpoint+0x3c><== NOT EXECUTED
8007148: 28 24 00 18 lw r4,(r1+24) <== NOT EXECUTED
800714c: 44 82 00 05 be r4,r2,8007160 <file_systems_below_this_mountpoint+0x3c><== 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 ) {
8007150: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
8007154: 5c 23 ff fd bne r1,r3,8007148 <file_systems_below_this_mountpoint+0x24><== NOT EXECUTED
8007158: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return true;
}
}
return false;
}
800715c: c3 a0 00 00 ret <== NOT EXECUTED
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
8007160: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
8007164: c3 a0 00 00 ret <== NOT EXECUTED
080025f0 <fpathconf>:
long fpathconf(
int fd,
int name
)
{
80025f0: 37 9c ff f0 addi sp,sp,-16
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
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
8002604: 78 03 08 02 mvhi r3,0x802
8002608: 38 63 20 10 ori r3,r3,0x2010
800260c: 28 63 00 00 lw r3,(r3+0)
long fpathconf(
int fd,
int name
)
{
8002610: 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);
8002614: 54 61 00 06 bgu r3,r1,800262c <fpathconf+0x3c>
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
8002618: f8 00 37 50 calli 8010358 <__errno>
800261c: 34 02 00 09 mvi r2,9
8002620: 58 22 00 00 sw (r1+0),r2
8002624: 34 01 ff ff mvi r1,-1
8002628: e0 00 00 1c bi 8002698 <fpathconf+0xa8>
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
800262c: 34 02 00 03 mvi r2,3
8002630: fb ff f9 65 calli 8000bc4 <__ashlsi3>
8002634: 34 02 00 03 mvi r2,3
8002638: 78 0b 08 02 mvhi r11,0x802
800263c: b8 20 68 00 mv r13,r1
8002640: 39 6b 27 24 ori r11,r11,0x2724
8002644: fb ff f9 60 calli 8000bc4 <__ashlsi3>
8002648: 29 62 00 00 lw r2,(r11+0)
800264c: b5 a1 08 00 add r1,r13,r1
8002650: b4 41 08 00 add r1,r2,r1
rtems_libio_check_is_open(iop);
8002654: 28 22 00 18 lw r2,(r1+24)
8002658: 20 43 01 00 andi r3,r2,0x100
800265c: 44 60 ff ef be r3,r0,8002618 <fpathconf+0x28> <== NEVER TAKEN
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
8002660: 20 42 00 02 andi r2,r2,0x2
8002664: 44 40 00 29 be r2,r0,8002708 <fpathconf+0x118> <== NEVER TAKEN
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
8002668: 28 2b 00 2c lw r11,(r1+44)
switch ( name ) {
800266c: 34 01 00 0b mvi r1,11
8002670: 55 81 00 26 bgu r12,r1,8002708 <fpathconf+0x118>
8002674: b9 80 08 00 mv r1,r12
8002678: 34 02 00 02 mvi r2,2
800267c: 78 0c 08 02 mvhi r12,0x802
8002680: fb ff f9 51 calli 8000bc4 <__ashlsi3>
8002684: 39 8c 0c cc ori r12,r12,0xccc
8002688: b5 81 08 00 add r1,r12,r1
800268c: 28 21 00 00 lw r1,(r1+0)
8002690: c0 20 00 00 b r1
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
8002694: 29 61 00 5c lw r1,(r11+92)
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
8002698: 2b 9d 00 04 lw ra,(sp+4)
800269c: 2b 8b 00 10 lw r11,(sp+16)
80026a0: 2b 8c 00 0c lw r12,(sp+12)
80026a4: 2b 8d 00 08 lw r13,(sp+8)
80026a8: 37 9c 00 10 addi sp,sp,16
80026ac: c3 a0 00 00 ret
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
80026b0: 29 61 00 50 lw r1,(r11+80)
break;
80026b4: e3 ff ff f9 bi 8002698 <fpathconf+0xa8>
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
80026b8: 29 61 00 64 lw r1,(r11+100)
break;
80026bc: e3 ff ff f7 bi 8002698 <fpathconf+0xa8>
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
80026c0: 29 61 00 58 lw r1,(r11+88)
break;
80026c4: e3 ff ff f5 bi 8002698 <fpathconf+0xa8>
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
80026c8: 29 61 00 54 lw r1,(r11+84)
break;
80026cc: e3 ff ff f3 bi 8002698 <fpathconf+0xa8>
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
80026d0: 29 61 00 4c lw r1,(r11+76)
break;
80026d4: e3 ff ff f1 bi 8002698 <fpathconf+0xa8>
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
80026d8: 29 61 00 48 lw r1,(r11+72)
break;
80026dc: e3 ff ff ef bi 8002698 <fpathconf+0xa8>
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
80026e0: 29 61 00 44 lw r1,(r11+68)
break;
80026e4: e3 ff ff ed bi 8002698 <fpathconf+0xa8>
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
80026e8: 29 61 00 40 lw r1,(r11+64)
break;
80026ec: e3 ff ff eb bi 8002698 <fpathconf+0xa8>
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
80026f0: 29 61 00 3c lw r1,(r11+60)
break;
80026f4: e3 ff ff e9 bi 8002698 <fpathconf+0xa8>
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
80026f8: 29 61 00 38 lw r1,(r11+56)
break;
80026fc: e3 ff ff e7 bi 8002698 <fpathconf+0xa8>
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
8002700: 29 61 00 60 lw r1,(r11+96)
break;
8002704: e3 ff ff e5 bi 8002698 <fpathconf+0xa8>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
8002708: f8 00 37 14 calli 8010358 <__errno>
800270c: 34 02 00 16 mvi r2,22
8002710: 58 22 00 00 sw (r1+0),r2
8002714: 34 01 ff ff mvi r1,-1
8002718: e3 ff ff e0 bi 8002698 <fpathconf+0xa8>
0800794c <free>:
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
800794c: 37 9c ff f4 addi sp,sp,-12
8007950: 5b 8b 00 0c sw (sp+12),r11
8007954: 5b 8c 00 08 sw (sp+8),r12
8007958: 5b 9d 00 04 sw (sp+4),ra
800795c: 78 03 08 01 mvhi r3,0x801
8007960: 38 63 e7 28 ori r3,r3,0xe728
8007964: 28 62 00 0c lw r2,(r3+12)
8007968: b8 20 58 00 mv r11,r1
800796c: 34 41 00 01 addi r1,r2,1
8007970: 58 61 00 0c sw (r3+12),r1
if ( !ptr )
8007974: 45 60 00 1a be r11,r0,80079dc <free+0x90>
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
8007978: 78 01 08 01 mvhi r1,0x801
800797c: 38 21 ea 40 ori r1,r1,0xea40
8007980: 28 22 00 00 lw r2,(r1+0)
8007984: 34 01 00 03 mvi r1,3
8007988: 44 41 00 1a be r2,r1,80079f0 <free+0xa4> <== ALWAYS TAKEN
#endif
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
800798c: 78 01 08 01 mvhi r1,0x801
8007990: 38 21 e6 50 ori r1,r1,0xe650
8007994: 28 21 00 00 lw r1,(r1+0)
8007998: 44 20 00 04 be r1,r0,80079a8 <free+0x5c> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_free)(ptr);
800799c: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED
80079a0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80079a4: d8 40 00 00 call r2 <== NOT EXECUTED
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
80079a8: 78 0c 08 01 mvhi r12,0x801
80079ac: 39 8c e0 1c ori r12,r12,0xe01c
80079b0: 29 81 00 00 lw r1,(r12+0)
80079b4: b9 60 10 00 mv r2,r11
80079b8: f8 00 09 24 calli 8009e48 <_Protected_heap_Free>
80079bc: 5c 20 00 08 bne r1,r0,80079dc <free+0x90> <== ALWAYS TAKEN
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
80079c0: 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",
80079c4: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
80079c8: 38 21 cb 74 ori r1,r1,0xcb74 <== NOT EXECUTED
80079cc: 28 44 00 1c lw r4,(r2+28) <== NOT EXECUTED
80079d0: 28 43 00 18 lw r3,(r2+24) <== NOT EXECUTED
80079d4: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
80079d8: fb ff e8 cb calli 8001d04 <printk> <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
80079dc: 2b 9d 00 04 lw ra,(sp+4)
80079e0: 2b 8b 00 0c lw r11,(sp+12)
80079e4: 2b 8c 00 08 lw r12,(sp+8)
80079e8: 37 9c 00 0c addi sp,sp,12
80079ec: c3 a0 00 00 ret
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
80079f0: f8 00 01 70 calli 8007fb0 <malloc_is_system_state_OK>
80079f4: 5c 20 ff e6 bne r1,r0,800798c <free+0x40> <== ALWAYS TAKEN
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
80079f8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80079fc: f8 00 01 7f calli 8007ff8 <malloc_deferred_free> <== NOT EXECUTED
return;
8007a00: e3 ff ff f7 bi 80079dc <free+0x90> <== NOT EXECUTED
08002e88 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
8002e88: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
8002e8c: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
8002e90: 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
8002e94: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8002e98: 38 42 17 64 ori r2,r2,0x1764 <== NOT EXECUTED
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
8002e9c: 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
8002ea0: 44 22 00 0f be r1,r2,8002edc <free_user_env+0x54> <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
8002ea4: 28 21 00 10 lw r1,(r1+16) <== NOT EXECUTED
8002ea8: 44 20 00 05 be r1,r0,8002ebc <free_user_env+0x34> <== NOT EXECUTED
8002eac: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8002eb0: 44 40 00 03 be r2,r0,8002ebc <free_user_env+0x34> <== NOT EXECUTED
8002eb4: 35 61 00 04 addi r1,r11,4 <== NOT EXECUTED
8002eb8: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
8002ebc: 29 61 00 24 lw r1,(r11+36) <== NOT EXECUTED
8002ec0: 44 20 00 05 be r1,r0,8002ed4 <free_user_env+0x4c> <== NOT EXECUTED
8002ec4: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8002ec8: 44 40 00 03 be r2,r0,8002ed4 <free_user_env+0x4c> <== NOT EXECUTED
8002ecc: 35 61 00 18 addi r1,r11,24 <== NOT EXECUTED
8002ed0: d8 40 00 00 call r2 <== NOT EXECUTED
free(env);
8002ed4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8002ed8: fb ff fa e6 calli 8001a70 <free> <== NOT EXECUTED
}
}
8002edc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002ee0: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8002ee4: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
8002ee8: c3 a0 00 00 ret <== NOT EXECUTED
0801b730 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
801b730: 37 9c ff ec addi sp,sp,-20
801b734: 5b 8b 00 14 sw (sp+20),r11
801b738: 5b 8c 00 10 sw (sp+16),r12
801b73c: 5b 8d 00 0c sw (sp+12),r13
801b740: 5b 8e 00 08 sw (sp+8),r14
801b744: 5b 9d 00 04 sw (sp+4),ra
801b748: b8 40 60 00 mv r12,r2
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
801b74c: 45 80 00 30 be r12,r0,801b80c <fstat+0xdc>
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
801b750: 78 03 08 01 mvhi r3,0x801
801b754: 38 63 e0 10 ori r3,r3,0xe010
801b758: 28 63 00 00 lw r3,(r3+0)
801b75c: 50 23 00 22 bgeu r1,r3,801b7e4 <fstat+0xb4>
801b760: 34 02 00 03 mvi r2,3
801b764: fb ff 92 a3 calli 80001f0 <__ashlsi3>
801b768: 78 0d 08 01 mvhi r13,0x801
801b76c: 39 ad e7 1c ori r13,r13,0xe71c
801b770: 34 02 00 03 mvi r2,3
801b774: b8 20 70 00 mv r14,r1
801b778: fb ff 92 9e calli 80001f0 <__ashlsi3>
801b77c: 29 ab 00 00 lw r11,(r13+0)
801b780: b5 c1 08 00 add r1,r14,r1
801b784: b5 61 58 00 add r11,r11,r1
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
801b788: 29 61 00 18 lw r1,(r11+24)
801b78c: 20 21 01 00 andi r1,r1,0x100
801b790: 44 20 00 15 be r1,r0,801b7e4 <fstat+0xb4> <== NEVER TAKEN
if ( !iop->handlers )
801b794: 29 61 00 40 lw r1,(r11+64)
801b798: 44 20 00 13 be r1,r0,801b7e4 <fstat+0xb4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
801b79c: 28 21 00 18 lw r1,(r1+24)
801b7a0: 44 20 00 16 be r1,r0,801b7f8 <fstat+0xc8> <== NEVER TAKEN
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
801b7a4: 34 02 00 00 mvi r2,0
801b7a8: 34 03 00 48 mvi r3,72
801b7ac: b9 80 08 00 mv r1,r12
801b7b0: fb ff c9 f9 calli 800df94 <memset>
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
801b7b4: 29 63 00 40 lw r3,(r11+64)
801b7b8: 35 61 00 1c addi r1,r11,28
801b7bc: b9 80 10 00 mv r2,r12
801b7c0: 28 63 00 18 lw r3,(r3+24)
801b7c4: d8 60 00 00 call r3
}
801b7c8: 2b 9d 00 04 lw ra,(sp+4)
801b7cc: 2b 8b 00 14 lw r11,(sp+20)
801b7d0: 2b 8c 00 10 lw r12,(sp+16)
801b7d4: 2b 8d 00 0c lw r13,(sp+12)
801b7d8: 2b 8e 00 08 lw r14,(sp+8)
801b7dc: 37 9c 00 14 addi sp,sp,20
801b7e0: c3 a0 00 00 ret
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
801b7e4: fb ff c6 e8 calli 800d384 <__errno>
801b7e8: 34 02 00 09 mvi r2,9
801b7ec: 58 22 00 00 sw (r1+0),r2
801b7f0: 34 01 ff ff mvi r1,-1
801b7f4: e3 ff ff f5 bi 801b7c8 <fstat+0x98>
if ( !iop->handlers->fstat_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
801b7f8: fb ff c6 e3 calli 800d384 <__errno> <== NOT EXECUTED
801b7fc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
801b800: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
801b804: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
801b808: e3 ff ff f0 bi 801b7c8 <fstat+0x98> <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
801b80c: fb ff c6 de calli 800d384 <__errno>
801b810: 34 02 00 0e mvi r2,14
801b814: 58 22 00 00 sw (r1+0),r2
801b818: 34 01 ff ff mvi r1,-1
801b81c: e3 ff ff eb bi 801b7c8 <fstat+0x98>
080028e4 <fsync>:
#include <rtems/seterr.h>
int fsync(
int fd
)
{
80028e4: 37 9c ff f4 addi sp,sp,-12
80028e8: 5b 8b 00 0c sw (sp+12),r11
80028ec: 5b 8c 00 08 sw (sp+8),r12
80028f0: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
80028f4: 78 02 08 02 mvhi r2,0x802
80028f8: 38 42 20 10 ori r2,r2,0x2010
80028fc: 28 42 00 00 lw r2,(r2+0)
8002900: 54 41 00 06 bgu r2,r1,8002918 <fsync+0x34> <== ALWAYS TAKEN
/*
* Now process the fsync().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
8002904: f8 00 36 95 calli 8010358 <__errno> <== NOT EXECUTED
8002908: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
800290c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8002910: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8002914: e0 00 00 15 bi 8002968 <fsync+0x84> <== NOT EXECUTED
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
8002918: 34 02 00 03 mvi r2,3
800291c: fb ff f8 aa calli 8000bc4 <__ashlsi3>
8002920: 34 02 00 03 mvi r2,3
8002924: 78 0b 08 02 mvhi r11,0x802
8002928: b8 20 60 00 mv r12,r1
800292c: 39 6b 27 24 ori r11,r11,0x2724
8002930: fb ff f8 a5 calli 8000bc4 <__ashlsi3>
8002934: 29 62 00 00 lw r2,(r11+0)
8002938: b5 81 08 00 add r1,r12,r1
800293c: b4 41 08 00 add r1,r2,r1
rtems_libio_check_is_open(iop);
8002940: 28 22 00 18 lw r2,(r1+24)
8002944: 20 43 01 00 andi r3,r2,0x100
8002948: 44 60 ff ef be r3,r0,8002904 <fsync+0x20> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
800294c: 20 42 00 04 andi r2,r2,0x4
8002950: 44 40 00 0b be r2,r0,800297c <fsync+0x98>
/*
* Now process the fsync().
*/
if ( !iop->handlers )
8002954: 28 22 00 40 lw r2,(r1+64)
8002958: 44 40 ff eb be r2,r0,8002904 <fsync+0x20> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
800295c: 28 42 00 28 lw r2,(r2+40)
8002960: 44 40 00 0c be r2,r0,8002990 <fsync+0xac>
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
8002964: d8 40 00 00 call r2
}
8002968: 2b 9d 00 04 lw ra,(sp+4)
800296c: 2b 8b 00 0c lw r11,(sp+12)
8002970: 2b 8c 00 08 lw r12,(sp+8)
8002974: 37 9c 00 0c addi sp,sp,12
8002978: c3 a0 00 00 ret
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
800297c: f8 00 36 77 calli 8010358 <__errno>
8002980: 34 02 00 16 mvi r2,22
8002984: 58 22 00 00 sw (r1+0),r2
8002988: 34 01 ff ff mvi r1,-1
800298c: e3 ff ff f7 bi 8002968 <fsync+0x84>
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
8002990: f8 00 36 72 calli 8010358 <__errno>
8002994: 34 02 00 86 mvi r2,134
8002998: 58 22 00 00 sw (r1+0),r2
800299c: 34 01 ff ff mvi r1,-1
80029a0: e3 ff ff f2 bi 8002968 <fsync+0x84>
08007a04 <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
8007a04: 37 9c ff d8 addi sp,sp,-40
8007a08: 5b 8b 00 14 sw (sp+20),r11
8007a0c: 5b 8c 00 10 sw (sp+16),r12
8007a10: 5b 8d 00 0c sw (sp+12),r13
8007a14: 5b 8e 00 08 sw (sp+8),r14
8007a18: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
8007a1c: 78 03 08 01 mvhi r3,0x801
8007a20: 38 63 e0 10 ori r3,r3,0xe010
8007a24: 28 63 00 00 lw r3,(r3+0)
int ftruncate(
int fd,
off_t length
)
{
8007a28: b8 40 68 00 mv r13,r2
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
8007a2c: 54 61 00 06 bgu r3,r1,8007a44 <ftruncate+0x40> <== ALWAYS TAKEN
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
8007a30: f8 00 16 55 calli 800d384 <__errno> <== NOT EXECUTED
8007a34: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
8007a38: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8007a3c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8007a40: e0 00 00 2b bi 8007aec <ftruncate+0xe8> <== NOT EXECUTED
{
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
8007a44: 34 02 00 03 mvi r2,3
8007a48: fb ff e1 ea calli 80001f0 <__ashlsi3>
8007a4c: 78 0c 08 01 mvhi r12,0x801
8007a50: 39 8c e7 1c ori r12,r12,0xe71c
8007a54: 34 02 00 03 mvi r2,3
8007a58: b8 20 70 00 mv r14,r1
8007a5c: fb ff e1 e5 calli 80001f0 <__ashlsi3>
8007a60: 29 8b 00 00 lw r11,(r12+0)
8007a64: b5 c1 08 00 add r1,r14,r1
8007a68: b5 61 58 00 add r11,r11,r1
rtems_libio_check_is_open(iop);
8007a6c: 29 61 00 18 lw r1,(r11+24)
8007a70: 20 21 01 00 andi r1,r1,0x100
8007a74: 44 20 ff ef be r1,r0,8007a30 <ftruncate+0x2c> <== NEVER TAKEN
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
8007a78: 29 61 00 1c lw r1,(r11+28)
8007a7c: 5b 81 00 18 sw (sp+24),r1
8007a80: 29 61 00 20 lw r1,(r11+32)
8007a84: 5b 81 00 1c sw (sp+28),r1
8007a88: 29 61 00 24 lw r1,(r11+36)
8007a8c: 5b 81 00 20 sw (sp+32),r1
8007a90: 29 64 00 28 lw r4,(r11+40)
8007a94: 5b 84 00 24 sw (sp+36),r4
8007a98: 29 61 00 2c lw r1,(r11+44)
if ( !loc.ops->node_type_h )
8007a9c: 28 84 00 10 lw r4,(r4+16)
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
8007aa0: 5b 81 00 28 sw (sp+40),r1
if ( !loc.ops->node_type_h )
8007aa4: 44 80 00 1e be r4,r0,8007b1c <ftruncate+0x118> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
8007aa8: 37 81 00 18 addi r1,sp,24
8007aac: d8 80 00 00 call r4
8007ab0: 34 02 00 01 mvi r2,1
8007ab4: 44 22 00 1f be r1,r2,8007b30 <ftruncate+0x12c>
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
8007ab8: 29 61 00 18 lw r1,(r11+24)
8007abc: 20 21 00 04 andi r1,r1,0x4
8007ac0: 44 20 00 12 be r1,r0,8007b08 <ftruncate+0x104> <== NEVER TAKEN
if ( !iop->handlers->ftruncate_h )
8007ac4: 29 61 00 40 lw r1,(r11+64)
8007ac8: 28 2c 00 20 lw r12,(r1+32)
8007acc: 45 80 00 14 be r12,r0,8007b1c <ftruncate+0x118> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
8007ad0: 34 02 00 1f mvi r2,31
8007ad4: b9 a0 08 00 mv r1,r13
8007ad8: fb ff e2 16 calli 8000330 <__ashrsi3>
8007adc: b8 20 10 00 mv r2,r1
8007ae0: b9 a0 18 00 mv r3,r13
8007ae4: b9 60 08 00 mv r1,r11
8007ae8: d9 80 00 00 call r12
}
8007aec: 2b 9d 00 04 lw ra,(sp+4)
8007af0: 2b 8b 00 14 lw r11,(sp+20)
8007af4: 2b 8c 00 10 lw r12,(sp+16)
8007af8: 2b 8d 00 0c lw r13,(sp+12)
8007afc: 2b 8e 00 08 lw r14,(sp+8)
8007b00: 37 9c 00 28 addi sp,sp,40
8007b04: c3 a0 00 00 ret
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
8007b08: f8 00 16 1f calli 800d384 <__errno> <== NOT EXECUTED
8007b0c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8007b10: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8007b14: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8007b18: e3 ff ff f5 bi 8007aec <ftruncate+0xe8> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
8007b1c: f8 00 16 1a calli 800d384 <__errno> <== NOT EXECUTED
8007b20: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8007b24: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8007b28: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8007b2c: e3 ff ff f0 bi 8007aec <ftruncate+0xe8> <== NOT EXECUTED
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
8007b30: f8 00 16 15 calli 800d384 <__errno>
8007b34: 34 02 00 15 mvi r2,21
8007b38: 58 22 00 00 sw (r1+0),r2
8007b3c: 34 01 ff ff mvi r1,-1
8007b40: e3 ff ff eb bi 8007aec <ftruncate+0xe8>
0801fce4 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
801fce4: 37 9c ff d4 addi sp,sp,-44
801fce8: 5b 8b 00 18 sw (sp+24),r11
801fcec: 5b 8c 00 14 sw (sp+20),r12
801fcf0: 5b 8d 00 10 sw (sp+16),r13
801fcf4: 5b 8e 00 0c sw (sp+12),r14
801fcf8: 5b 8f 00 08 sw (sp+8),r15
801fcfc: 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 );
801fd00: 78 04 08 02 mvhi r4,0x802
801fd04: 38 84 40 10 ori r4,r4,0x4010
801fd08: 28 84 00 00 lw r4,(r4+0)
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
801fd0c: b8 40 70 00 mv r14,r2
801fd10: b8 60 68 00 mv r13,r3
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
801fd14: 54 81 00 21 bgu r4,r1,801fd98 <getdents+0xb4>
801fd18: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
801fd1c: 29 61 00 1c lw r1,(r11+28)
801fd20: 5b 81 00 1c sw (sp+28),r1
801fd24: 29 61 00 20 lw r1,(r11+32)
801fd28: 5b 81 00 20 sw (sp+32),r1
801fd2c: 29 61 00 24 lw r1,(r11+36)
801fd30: 5b 81 00 24 sw (sp+36),r1
801fd34: 29 61 00 28 lw r1,(r11+40)
801fd38: 5b 81 00 28 sw (sp+40),r1
if ( !loc.ops->node_type_h )
801fd3c: 28 24 00 10 lw r4,(r1+16)
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
801fd40: 29 61 00 2c lw r1,(r11+44)
801fd44: 5b 81 00 2c sw (sp+44),r1
if ( !loc.ops->node_type_h )
801fd48: 44 80 00 24 be r4,r0,801fdd8 <getdents+0xf4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
801fd4c: 37 81 00 1c addi r1,sp,28
801fd50: d8 80 00 00 call r4
801fd54: 34 04 00 01 mvi r4,1
801fd58: 5c 24 00 1b bne r1,r4,801fdc4 <getdents+0xe0>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
801fd5c: 29 61 00 40 lw r1,(r11+64)
801fd60: 28 24 00 08 lw r4,(r1+8)
801fd64: 44 80 00 1d be r4,r0,801fdd8 <getdents+0xf4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
801fd68: b9 60 08 00 mv r1,r11
801fd6c: b9 c0 10 00 mv r2,r14
801fd70: b9 a0 18 00 mv r3,r13
801fd74: d8 80 00 00 call r4
}
801fd78: 2b 9d 00 04 lw ra,(sp+4)
801fd7c: 2b 8b 00 18 lw r11,(sp+24)
801fd80: 2b 8c 00 14 lw r12,(sp+20)
801fd84: 2b 8d 00 10 lw r13,(sp+16)
801fd88: 2b 8e 00 0c lw r14,(sp+12)
801fd8c: 2b 8f 00 08 lw r15,(sp+8)
801fd90: 37 9c 00 2c addi sp,sp,44
801fd94: c3 a0 00 00 ret
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
801fd98: 34 02 00 03 mvi r2,3
801fd9c: fb ff 85 9d calli 8001410 <__ashlsi3>
801fda0: 78 0c 08 02 mvhi r12,0x802
801fda4: 39 8c 48 3c ori r12,r12,0x483c
801fda8: 34 02 00 03 mvi r2,3
801fdac: b8 20 78 00 mv r15,r1
801fdb0: fb ff 85 98 calli 8001410 <__ashlsi3>
801fdb4: 29 8b 00 00 lw r11,(r12+0)
801fdb8: b5 e1 08 00 add r1,r15,r1
801fdbc: b5 61 58 00 add r11,r11,r1
801fdc0: e3 ff ff d7 bi 801fd1c <getdents+0x38>
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
801fdc4: fb ff c1 3c calli 80102b4 <__errno>
801fdc8: 34 02 00 14 mvi r2,20
801fdcc: 58 22 00 00 sw (r1+0),r2
801fdd0: 34 01 ff ff mvi r1,-1
801fdd4: e3 ff ff e9 bi 801fd78 <getdents+0x94>
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
801fdd8: fb ff c1 37 calli 80102b4 <__errno> <== NOT EXECUTED
801fddc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
801fde0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
801fde4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
801fde8: e3 ff ff e4 bi 801fd78 <getdents+0x94> <== NOT EXECUTED
08002160 <getgr_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
8002160: 37 9c ff e0 addi sp,sp,-32
8002164: 5b 8b 00 20 sw (sp+32),r11
8002168: 5b 8c 00 1c sw (sp+28),r12
800216c: 5b 8d 00 18 sw (sp+24),r13
8002170: 5b 8e 00 14 sw (sp+20),r14
8002174: 5b 8f 00 10 sw (sp+16),r15
8002178: 5b 90 00 0c sw (sp+12),r16
800217c: 5b 91 00 08 sw (sp+8),r17
8002180: 5b 9d 00 04 sw (sp+4),ra
8002184: b8 20 68 00 mv r13,r1
8002188: b8 40 80 00 mv r16,r2
800218c: b8 60 58 00 mv r11,r3
8002190: b8 80 78 00 mv r15,r4
8002194: b8 a0 70 00 mv r14,r5
8002198: b8 c0 88 00 mv r17,r6
FILE *fp;
int match;
init_etc_passwd_group();
800219c: fb ff ff 97 calli 8001ff8 <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL) {
80021a0: 78 01 08 02 mvhi r1,0x802
80021a4: 78 02 08 02 mvhi r2,0x802
80021a8: 38 21 05 10 ori r1,r1,0x510
80021ac: 38 42 0c 9c ori r2,r2,0xc9c
80021b0: f8 00 38 b1 calli 8010474 <fopen>
80021b4: b8 20 60 00 mv r12,r1
80021b8: 44 20 00 26 be r1,r0,8002250 <getgr_r+0xf0> <== NEVER TAKEN
errno = EINVAL;
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
80021bc: b9 60 10 00 mv r2,r11
80021c0: b9 e0 18 00 mv r3,r15
80021c4: b9 c0 20 00 mv r4,r14
80021c8: b9 80 08 00 mv r1,r12
80021cc: fb ff fe b0 calli 8001c8c <scangr>
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
80021d0: 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)) {
80021d4: 44 20 00 18 be r1,r0,8002234 <getgr_r+0xd4> <== NEVER TAKEN
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
80021d8: 45 a0 00 13 be r13,r0,8002224 <getgr_r+0xc4> <== NEVER TAKEN
match = (strcmp(grp->gr_name, name) == 0);
80021dc: 29 61 00 00 lw r1,(r11+0)
80021e0: f8 00 3d 93 calli 801182c <strcmp>
80021e4: 64 21 00 00 cmpei r1,r1,0
}
else {
match = (grp->gr_gid == gid);
}
if (match) {
80021e8: 44 20 ff f5 be r1,r0,80021bc <getgr_r+0x5c>
fclose(fp);
80021ec: b9 80 08 00 mv r1,r12
80021f0: f8 00 36 81 calli 800fbf4 <fclose>
*result = grp;
80021f4: 34 01 00 00 mvi r1,0
80021f8: 5a 2b 00 00 sw (r17+0),r11
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
80021fc: 2b 9d 00 04 lw ra,(sp+4)
8002200: 2b 8b 00 20 lw r11,(sp+32)
8002204: 2b 8c 00 1c lw r12,(sp+28)
8002208: 2b 8d 00 18 lw r13,(sp+24)
800220c: 2b 8e 00 14 lw r14,(sp+20)
8002210: 2b 8f 00 10 lw r15,(sp+16)
8002214: 2b 90 00 0c lw r16,(sp+12)
8002218: 2b 91 00 08 lw r17,(sp+8)
800221c: 37 9c 00 20 addi sp,sp,32
8002220: c3 a0 00 00 ret
}
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
}
else {
match = (grp->gr_gid == gid);
8002224: 2d 61 00 08 lhu r1,(r11+8) <== NOT EXECUTED
8002228: e4 30 08 00 cmpe r1,r1,r16 <== NOT EXECUTED
}
if (match) {
800222c: 44 20 ff e4 be r1,r0,80021bc <getgr_r+0x5c> <== NOT EXECUTED
8002230: e3 ff ff ef bi 80021ec <getgr_r+0x8c> <== NOT EXECUTED
errno = EINVAL;
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
errno = EINVAL;
8002234: f8 00 36 0e calli 800fa6c <__errno> <== NOT EXECUTED
8002238: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
800223c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
fclose(fp);
8002240: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8002244: f8 00 36 6c calli 800fbf4 <fclose> <== NOT EXECUTED
8002248: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
return -1;
800224c: e3 ff ff ec bi 80021fc <getgr_r+0x9c> <== NOT EXECUTED
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/group", "r")) == NULL) {
errno = EINVAL;
8002250: f8 00 36 07 calli 800fa6c <__errno> <== NOT EXECUTED
8002254: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8002258: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800225c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
return -1;
8002260: e3 ff ff e7 bi 80021fc <getgr_r+0x9c> <== NOT EXECUTED
08001e20 <getgrent>:
return NULL;
return p;
}
struct group *getgrent(void)
{
8001e20: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8001e24: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
if (group_fp == NULL)
8001e28: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8001e2c: 38 21 27 9c ori r1,r1,0x279c <== NOT EXECUTED
8001e30: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
8001e34: 5c 20 00 05 bne r1,r0,8001e48 <getgrent+0x28> <== NOT EXECUTED
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
8001e38: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return NULL;
return &grent;
}
8001e3c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8001e40: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8001e44: c3 a0 00 00 ret <== NOT EXECUTED
struct group *getgrent(void)
{
if (group_fp == NULL)
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
8001e48: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8001e4c: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8001e50: 38 42 28 68 ori r2,r2,0x2868 <== NOT EXECUTED
8001e54: 38 63 27 a0 ori r3,r3,0x27a0 <== NOT EXECUTED
8001e58: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED
8001e5c: fb ff ff 8c calli 8001c8c <scangr> <== NOT EXECUTED
8001e60: 44 20 ff f6 be r1,r0,8001e38 <getgrent+0x18> <== NOT EXECUTED
8001e64: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8001e68: 38 21 28 68 ori r1,r1,0x2868 <== NOT EXECUTED
return NULL;
return &grent;
}
8001e6c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8001e70: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8001e74: c3 a0 00 00 ret <== NOT EXECUTED
080022a0 <getgrgid>:
struct group *getgrgid(
gid_t gid
)
{
80022a0: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
80022a4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
80022a8: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
80022ac: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80022b0: 38 42 28 68 ori r2,r2,0x2868 <== NOT EXECUTED
80022b4: 20 21 ff ff andi r1,r1,0xffff <== NOT EXECUTED
80022b8: 38 63 27 a0 ori r3,r3,0x27a0 <== NOT EXECUTED
80022bc: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED
80022c0: 37 85 00 08 addi r5,sp,8 <== NOT EXECUTED
80022c4: fb ff ff e8 calli 8002264 <getgrgid_r> <== NOT EXECUTED
80022c8: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
80022cc: 5c 22 00 02 bne r1,r2,80022d4 <getgrgid+0x34> <== NOT EXECUTED
return NULL;
return p;
80022d0: 2b 82 00 08 lw r2,(sp+8) <== NOT EXECUTED
}
80022d4: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
80022d8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80022dc: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
80022e0: c3 a0 00 00 ret <== NOT EXECUTED
08002264 <getgrgid_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
8002264: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8002268: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
800226c: b8 40 48 00 mv r9,r2 <== NOT EXECUTED
8002270: b8 60 40 00 mv r8,r3 <== NOT EXECUTED
8002274: b8 80 38 00 mv r7,r4 <== NOT EXECUTED
8002278: b8 a0 30 00 mv r6,r5 <== NOT EXECUTED
800227c: 20 22 ff ff andi r2,r1,0xffff <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
8002280: b9 20 18 00 mv r3,r9 <== NOT EXECUTED
8002284: b9 00 20 00 mv r4,r8 <== NOT EXECUTED
8002288: b8 e0 28 00 mv r5,r7 <== NOT EXECUTED
800228c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8002290: fb ff ff b4 calli 8002160 <getgr_r> <== NOT EXECUTED
}
8002294: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002298: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
800229c: c3 a0 00 00 ret <== NOT EXECUTED
08002318 <getgrnam>:
struct group *getgrnam(
const char *name
)
{
8002318: 37 9c ff f8 addi sp,sp,-8
800231c: 5b 9d 00 04 sw (sp+4),ra
struct group *p;
if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
8002320: 78 02 08 02 mvhi r2,0x802
8002324: 78 03 08 02 mvhi r3,0x802
8002328: 38 42 28 68 ori r2,r2,0x2868
800232c: 38 63 27 a0 ori r3,r3,0x27a0
8002330: 34 04 00 c8 mvi r4,200
8002334: 37 85 00 08 addi r5,sp,8
8002338: fb ff ff eb calli 80022e4 <getgrnam_r>
800233c: 34 02 00 00 mvi r2,0
8002340: 5c 22 00 02 bne r1,r2,8002348 <getgrnam+0x30> <== NEVER TAKEN
return NULL;
return p;
8002344: 2b 82 00 08 lw r2,(sp+8)
}
8002348: b8 40 08 00 mv r1,r2
800234c: 2b 9d 00 04 lw ra,(sp+4)
8002350: 37 9c 00 08 addi sp,sp,8
8002354: c3 a0 00 00 ret
080023a4 <getpw_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
80023a4: 37 9c ff e0 addi sp,sp,-32
80023a8: 5b 8b 00 20 sw (sp+32),r11
80023ac: 5b 8c 00 1c sw (sp+28),r12
80023b0: 5b 8d 00 18 sw (sp+24),r13
80023b4: 5b 8e 00 14 sw (sp+20),r14
80023b8: 5b 8f 00 10 sw (sp+16),r15
80023bc: 5b 90 00 0c sw (sp+12),r16
80023c0: 5b 91 00 08 sw (sp+8),r17
80023c4: 5b 9d 00 04 sw (sp+4),ra
80023c8: b8 20 68 00 mv r13,r1
80023cc: b8 40 80 00 mv r16,r2
80023d0: b8 60 58 00 mv r11,r3
80023d4: b8 80 78 00 mv r15,r4
80023d8: b8 a0 70 00 mv r14,r5
80023dc: b8 c0 88 00 mv r17,r6
FILE *fp;
int match;
init_etc_passwd_group();
80023e0: fb ff ff 06 calli 8001ff8 <init_etc_passwd_group>
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
80023e4: 78 01 08 02 mvhi r1,0x802
80023e8: 78 02 08 02 mvhi r2,0x802
80023ec: 38 21 04 98 ori r1,r1,0x498
80023f0: 38 42 0c 9c ori r2,r2,0xc9c
80023f4: f8 00 38 20 calli 8010474 <fopen>
80023f8: b8 20 60 00 mv r12,r1
80023fc: 44 20 00 26 be r1,r0,8002494 <getpw_r+0xf0> <== NEVER TAKEN
errno = EINVAL;
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
8002400: b9 60 10 00 mv r2,r11
8002404: b9 e0 18 00 mv r3,r15
8002408: b9 c0 20 00 mv r4,r14
800240c: b9 80 08 00 mv r1,r12
8002410: fb ff fe 9a calli 8001e78 <scanpw>
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(pwd->pw_name, name) == 0);
8002414: 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)) {
8002418: 44 20 00 18 be r1,r0,8002478 <getpw_r+0xd4> <== NEVER TAKEN
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
800241c: 45 a0 00 13 be r13,r0,8002468 <getpw_r+0xc4> <== NEVER TAKEN
match = (strcmp(pwd->pw_name, name) == 0);
8002420: 29 61 00 00 lw r1,(r11+0)
8002424: f8 00 3d 02 calli 801182c <strcmp>
8002428: 64 21 00 00 cmpei r1,r1,0
}
else {
match = (pwd->pw_uid == uid);
}
if (match) {
800242c: 44 20 ff f5 be r1,r0,8002400 <getpw_r+0x5c>
fclose(fp);
8002430: b9 80 08 00 mv r1,r12
8002434: f8 00 35 f0 calli 800fbf4 <fclose>
*result = pwd;
8002438: 34 01 00 00 mvi r1,0
800243c: 5a 2b 00 00 sw (r17+0),r11
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
8002440: 2b 9d 00 04 lw ra,(sp+4)
8002444: 2b 8b 00 20 lw r11,(sp+32)
8002448: 2b 8c 00 1c lw r12,(sp+28)
800244c: 2b 8d 00 18 lw r13,(sp+24)
8002450: 2b 8e 00 14 lw r14,(sp+20)
8002454: 2b 8f 00 10 lw r15,(sp+16)
8002458: 2b 90 00 0c lw r16,(sp+12)
800245c: 2b 91 00 08 lw r17,(sp+8)
8002460: 37 9c 00 20 addi sp,sp,32
8002464: c3 a0 00 00 ret
}
if (name) {
match = (strcmp(pwd->pw_name, name) == 0);
}
else {
match = (pwd->pw_uid == uid);
8002468: 2d 61 00 08 lhu r1,(r11+8) <== NOT EXECUTED
800246c: e4 30 08 00 cmpe r1,r1,r16 <== NOT EXECUTED
}
if (match) {
8002470: 44 20 ff e4 be r1,r0,8002400 <getpw_r+0x5c> <== NOT EXECUTED
8002474: e3 ff ff ef bi 8002430 <getpw_r+0x8c> <== NOT EXECUTED
errno = EINVAL;
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
errno = EINVAL;
8002478: f8 00 35 7d calli 800fa6c <__errno> <== NOT EXECUTED
800247c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8002480: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
fclose(fp);
8002484: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8002488: f8 00 35 db calli 800fbf4 <fclose> <== NOT EXECUTED
800248c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
return -1;
8002490: e3 ff ff ec bi 8002440 <getpw_r+0x9c> <== NOT EXECUTED
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
errno = EINVAL;
8002494: f8 00 35 76 calli 800fa6c <__errno> <== NOT EXECUTED
8002498: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
800249c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80024a0: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
return -1;
80024a4: e3 ff ff e7 bi 8002440 <getpw_r+0x9c> <== NOT EXECUTED
08001fa0 <getpwent>:
return NULL;
return p;
}
struct passwd *getpwent(void)
{
8001fa0: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8001fa4: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
if (passwd_fp == NULL)
8001fa8: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8001fac: 38 21 26 b4 ori r1,r1,0x26b4 <== NOT EXECUTED
8001fb0: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
8001fb4: 5c 20 00 05 bne r1,r0,8001fc8 <getpwent+0x28> <== NOT EXECUTED
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
8001fb8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return NULL;
return &pwent;
}
8001fbc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8001fc0: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8001fc4: c3 a0 00 00 ret <== NOT EXECUTED
struct passwd *getpwent(void)
{
if (passwd_fp == NULL)
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
8001fc8: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8001fcc: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8001fd0: 38 42 27 80 ori r2,r2,0x2780 <== NOT EXECUTED
8001fd4: 38 63 26 b8 ori r3,r3,0x26b8 <== NOT EXECUTED
8001fd8: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED
8001fdc: fb ff ff a7 calli 8001e78 <scanpw> <== NOT EXECUTED
8001fe0: 44 20 ff f6 be r1,r0,8001fb8 <getpwent+0x18> <== NOT EXECUTED
8001fe4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8001fe8: 38 21 27 80 ori r1,r1,0x2780 <== NOT EXECUTED
return NULL;
return &pwent;
}
8001fec: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8001ff0: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8001ff4: c3 a0 00 00 ret <== NOT EXECUTED
0800255c <getpwnam>:
struct passwd *getpwnam(
const char *name
)
{
800255c: 37 9c ff f8 addi sp,sp,-8
8002560: 5b 9d 00 04 sw (sp+4),ra
struct passwd *p;
if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
8002564: 78 02 08 02 mvhi r2,0x802
8002568: 78 03 08 02 mvhi r3,0x802
800256c: 38 42 27 80 ori r2,r2,0x2780
8002570: 38 63 26 b8 ori r3,r3,0x26b8
8002574: 34 04 00 c8 mvi r4,200
8002578: 37 85 00 08 addi r5,sp,8
800257c: fb ff ff eb calli 8002528 <getpwnam_r>
8002580: 34 02 00 00 mvi r2,0
8002584: 5c 22 00 02 bne r1,r2,800258c <getpwnam+0x30> <== NEVER TAKEN
return NULL;
return p;
8002588: 2b 82 00 08 lw r2,(sp+8)
}
800258c: b8 40 08 00 mv r1,r2
8002590: 2b 9d 00 04 lw ra,(sp+4)
8002594: 37 9c 00 08 addi sp,sp,8
8002598: c3 a0 00 00 ret
080024e4 <getpwuid>:
struct passwd *getpwuid(
uid_t uid
)
{
80024e4: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
80024e8: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
80024ec: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
80024f0: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
80024f4: 38 42 27 80 ori r2,r2,0x2780 <== NOT EXECUTED
80024f8: 20 21 ff ff andi r1,r1,0xffff <== NOT EXECUTED
80024fc: 38 63 26 b8 ori r3,r3,0x26b8 <== NOT EXECUTED
8002500: 34 04 00 c8 mvi r4,200 <== NOT EXECUTED
8002504: 37 85 00 08 addi r5,sp,8 <== NOT EXECUTED
8002508: fb ff ff e8 calli 80024a8 <getpwuid_r> <== NOT EXECUTED
800250c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8002510: 5c 22 00 02 bne r1,r2,8002518 <getpwuid+0x34> <== NOT EXECUTED
return NULL;
return p;
8002514: 2b 82 00 08 lw r2,(sp+8) <== NOT EXECUTED
}
8002518: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
800251c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002520: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
8002524: c3 a0 00 00 ret <== NOT EXECUTED
080024a8 <getpwuid_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
80024a8: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
80024ac: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
80024b0: b8 40 48 00 mv r9,r2 <== NOT EXECUTED
80024b4: b8 60 40 00 mv r8,r3 <== NOT EXECUTED
80024b8: b8 80 38 00 mv r7,r4 <== NOT EXECUTED
80024bc: b8 a0 30 00 mv r6,r5 <== NOT EXECUTED
80024c0: 20 22 ff ff andi r2,r1,0xffff <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
80024c4: b9 20 18 00 mv r3,r9 <== NOT EXECUTED
80024c8: b9 00 20 00 mv r4,r8 <== NOT EXECUTED
80024cc: b8 e0 28 00 mv r5,r7 <== NOT EXECUTED
80024d0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
80024d4: fb ff ff b4 calli 80023a4 <getpw_r> <== NOT EXECUTED
}
80024d8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80024dc: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
80024e0: c3 a0 00 00 ret <== NOT EXECUTED
08007b6c <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
8007b6c: 37 9c ff ec addi sp,sp,-20
8007b70: 5b 8b 00 0c sw (sp+12),r11
8007b74: 5b 8c 00 08 sw (sp+8),r12
8007b78: 5b 9d 00 04 sw (sp+4),ra
8007b7c: b8 20 58 00 mv r11,r1
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
8007b80: 44 20 00 14 be r1,r0,8007bd0 <gettimeofday+0x64> <== NEVER TAKEN
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
8007b84: 90 00 60 00 rcsr r12,IE
8007b88: 34 01 ff fe mvi r1,-2
8007b8c: a1 81 08 00 and r1,r12,r1
8007b90: d0 01 00 00 wcsr IE,r1
_TOD_Get( &now );
8007b94: 37 81 00 10 addi r1,sp,16
8007b98: f8 00 06 b0 calli 8009658 <_TOD_Get>
_ISR_Enable(level);
8007b9c: 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;
8007ba0: 2b 82 00 10 lw r2,(sp+16)
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
8007ba4: 2b 81 00 14 lw r1,(sp+20)
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
8007ba8: 59 62 00 00 sw (r11+0),r2
time->tv_usec = useconds;
8007bac: 34 02 03 e8 mvi r2,1000
8007bb0: f8 00 4e 01 calli 801b3b4 <__divsi3>
8007bb4: 59 61 00 04 sw (r11+4),r1
8007bb8: 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;
}
8007bbc: 2b 9d 00 04 lw ra,(sp+4)
8007bc0: 2b 8b 00 0c lw r11,(sp+12)
8007bc4: 2b 8c 00 08 lw r12,(sp+8)
8007bc8: 37 9c 00 14 addi sp,sp,20
8007bcc: c3 a0 00 00 ret
void * __tz __attribute__((unused))
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
errno = EFAULT;
8007bd0: f8 00 15 ed calli 800d384 <__errno> <== NOT EXECUTED
8007bd4: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
8007bd8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8007bdc: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
return -1;
8007be0: e3 ff ff f7 bi 8007bbc <gettimeofday+0x50> <== NOT EXECUTED
08012744 <imfs_dir_open>:
)
{
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->file_info;
8012744: 28 23 00 3c lw r3,(r1+60)
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
8012748: 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;
801274c: 34 01 ff ff mvi r1,-1
8012750: 28 64 00 4c lw r4,(r3+76)
8012754: 34 03 00 01 mvi r3,1
8012758: 44 83 00 02 be r4,r3,8012760 <imfs_dir_open+0x1c> <== ALWAYS TAKEN
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
return 0;
}
801275c: c3 a0 00 00 ret <== NOT EXECUTED
the_jnode = (IMFS_jnode_t *) iop->file_info;
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
8012760: 34 01 00 00 mvi r1,0
8012764: 58 41 00 14 sw (r2+20),r1
8012768: 58 41 00 10 sw (r2+16),r1
return 0;
}
801276c: c3 a0 00 00 ret
08012980 <imfs_dir_read>:
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
8012980: 37 9c fe c4 addi sp,sp,-316
8012984: 5b 8b 00 30 sw (sp+48),r11
8012988: 5b 8c 00 2c sw (sp+44),r12
801298c: 5b 8d 00 28 sw (sp+40),r13
8012990: 5b 8e 00 24 sw (sp+36),r14
8012994: 5b 8f 00 20 sw (sp+32),r15
8012998: 5b 90 00 1c sw (sp+28),r16
801299c: 5b 91 00 18 sw (sp+24),r17
80129a0: 5b 92 00 14 sw (sp+20),r18
80129a4: 5b 93 00 10 sw (sp+16),r19
80129a8: 5b 94 00 0c sw (sp+12),r20
80129ac: 5b 95 00 08 sw (sp+8),r21
80129b0: 5b 9d 00 04 sw (sp+4),ra
int current_entry;
int first_entry;
int last_entry;
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->file_info;
80129b4: 28 31 00 3c lw r17,(r1+60)
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
80129b8: b8 20 68 00 mv r13,r1
80129bc: b8 40 98 00 mv r19,r2
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
80129c0: 2a 2c 00 50 lw r12,(r17+80)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
80129c4: 36 31 00 54 addi r17,r17,84
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->file_info;
the_chain = &the_jnode->info.directory.Entries;
if ( rtems_chain_is_empty( the_chain ) )
80129c8: 34 0e 00 00 mvi r14,0
80129cc: 45 91 00 0a be r12,r17,80129f4 <imfs_dir_read+0x74>
bytes_transferred = 0;
first_entry = iop->offset;
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
80129d0: b8 60 08 00 mv r1,r3
80129d4: 34 02 01 0c mvi r2,268
80129d8: f8 00 41 9b calli 8023044 <__udivsi3>
/* Move to the first of the desired directory entries */
the_node = the_chain->first;
bytes_transferred = 0;
first_entry = iop->offset;
80129dc: 29 b0 00 14 lw r16,(r13+20)
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
80129e0: 34 02 01 0c mvi r2,268
80129e4: f8 00 41 19 calli 8022e48 <__mulsi3>
80129e8: b4 30 78 00 add r15,r1,r16
/* The directory was not empty so try to move to the desired entry in chain*/
for (
80129ec: b9 c0 58 00 mv r11,r14
80129f0: 49 ee 00 10 bg r15,r14,8012a30 <imfs_dir_read+0xb0> <== ALWAYS TAKEN
the_node = the_node->next;
}
/* Success */
return bytes_transferred;
}
80129f4: b9 c0 08 00 mv r1,r14
80129f8: 2b 9d 00 04 lw ra,(sp+4)
80129fc: 2b 8b 00 30 lw r11,(sp+48)
8012a00: 2b 8c 00 2c lw r12,(sp+44)
8012a04: 2b 8d 00 28 lw r13,(sp+40)
8012a08: 2b 8e 00 24 lw r14,(sp+36)
8012a0c: 2b 8f 00 20 lw r15,(sp+32)
8012a10: 2b 90 00 1c lw r16,(sp+28)
8012a14: 2b 91 00 18 lw r17,(sp+24)
8012a18: 2b 92 00 14 lw r18,(sp+20)
8012a1c: 2b 93 00 10 lw r19,(sp+16)
8012a20: 2b 94 00 0c lw r20,(sp+12)
8012a24: 2b 95 00 08 lw r21,(sp+8)
8012a28: 37 9c 01 3c addi sp,sp,316
8012a2c: c3 a0 00 00 ret
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
strcpy( tmp_dirent.d_name, the_jnode->name );
8012a30: 37 95 00 34 addi r21,sp,52
8012a34: 37 94 00 40 addi r20,sp,64
/* entry in the read */
return bytes_transferred; /* Indicate that there are no more */
/* entries to return */
}
if( current_entry >= first_entry ) {
8012a38: 4a 0b 00 19 bg r16,r11,8012a9c <imfs_dir_read+0x11c>
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
8012a3c: 5b 8b 00 38 sw (sp+56),r11
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
8012a40: 29 82 00 38 lw r2,(r12+56)
tmp_dirent.d_namlen = strlen( the_jnode->name );
8012a44: 35 92 00 0c addi r18,r12,12
}
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
8012a48: 34 03 01 0c mvi r3,268
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
8012a4c: ba 40 08 00 mv r1,r18
}
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
8012a50: 0f 83 00 3c sh (sp+60),r3
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
8012a54: 5b 82 00 34 sw (sp+52),r2
tmp_dirent.d_namlen = strlen( the_jnode->name );
8012a58: f8 00 09 e5 calli 80151ec <strlen>
8012a5c: 0f 81 00 3e sh (sp+62),r1
strcpy( tmp_dirent.d_name, the_jnode->name );
8012a60: ba 40 10 00 mv r2,r18
8012a64: ba 80 08 00 mv r1,r20
8012a68: f8 00 09 9c calli 80150d8 <strcpy>
memcpy(
8012a6c: b6 6e 08 00 add r1,r19,r14
8012a70: 34 03 01 0c mvi r3,268
8012a74: ba a0 10 00 mv r2,r21
8012a78: f8 00 07 d2 calli 80149c0 <memcpy>
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
8012a7c: 29 a4 00 14 lw r4,(r13+20)
8012a80: 29 a1 00 10 lw r1,(r13+16)
bytes_transferred = bytes_transferred + sizeof( struct dirent );
8012a84: 35 ce 01 0c addi r14,r14,268
memcpy(
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
8012a88: 34 83 01 0c addi r3,r4,268
8012a8c: f4 83 20 00 cmpgu r4,r4,r3
8012a90: 59 a3 00 14 sw (r13+20),r3
8012a94: b4 81 18 00 add r3,r4,r1
8012a98: 59 a3 00 10 sw (r13+16),r3
* to the end of the exisiting file, the remaining entries will be placed in
* the buffer and the returned value will be equal to -m actual- times the
* size of a directory entry.
*/
ssize_t imfs_dir_read(
8012a9c: 35 6b 01 0c addi r11,r11,268
);
iop->offset = iop->offset + sizeof(struct dirent);
bytes_transferred = bytes_transferred + sizeof( struct dirent );
}
the_node = the_node->next;
8012aa0: 29 8c 00 00 lw r12,(r12+0)
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
/* The directory was not empty so try to move to the desired entry in chain*/
for (
8012aa4: 49 eb 00 02 bg r15,r11,8012aac <imfs_dir_read+0x12c>
8012aa8: e3 ff ff d3 bi 80129f4 <imfs_dir_read+0x74>
current_entry = 0;
current_entry < last_entry;
current_entry = current_entry + sizeof(struct dirent) ){
if ( rtems_chain_is_tail( the_chain, the_node ) ){
8012aac: 45 91 ff d2 be r12,r17,80129f4 <imfs_dir_read+0x74>
/* entry in the read */
return bytes_transferred; /* Indicate that there are no more */
/* entries to return */
}
if( current_entry >= first_entry ) {
8012ab0: 4a 0b ff fb bg r16,r11,8012a9c <imfs_dir_read+0x11c>
8012ab4: e3 ff ff e2 bi 8012a3c <imfs_dir_read+0xbc>
08012874 <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
8012874: 37 9c ff e8 addi sp,sp,-24
8012878: 5b 8b 00 10 sw (sp+16),r11
801287c: 5b 8c 00 0c sw (sp+12),r12
8012880: 5b 8d 00 08 sw (sp+8),r13
8012884: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
8012888: 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 */
)
{
801288c: b8 40 60 00 mv r12,r2
8012890: 29 62 00 50 lw r2,(r11+80)
8012894: 35 61 00 54 addi r1,r11,84
8012898: 5c 41 00 2e bne r2,r1,8012950 <imfs_dir_rmnod+0xdc>
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
801289c: 29 81 00 10 lw r1,(r12+16)
80128a0: 28 21 00 1c lw r1,(r1+28)
80128a4: 45 61 00 30 be r11,r1,8012964 <imfs_dir_rmnod+0xf0>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
80128a8: 29 6d 00 5c lw r13,(r11+92)
80128ac: 5d a0 00 2e bne r13,r0,8012964 <imfs_dir_rmnod+0xf0> <== NEVER TAKEN
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
80128b0: 29 61 00 08 lw r1,(r11+8)
80128b4: 44 2d 00 04 be r1,r13,80128c4 <imfs_dir_rmnod+0x50>
80128b8: b9 60 08 00 mv r1,r11
80128bc: fb ff ca bd calli 80053b0 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
80128c0: 59 6d 00 08 sw (r11+8),r13
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
80128c4: 2d 63 00 34 lhu r3,(r11+52)
IMFS_update_ctime( the_jnode );
80128c8: 34 02 00 00 mvi r2,0
80128cc: 37 81 00 14 addi r1,sp,20
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
80128d0: 34 63 ff ff addi r3,r3,-1
80128d4: 0d 63 00 34 sh (r11+52),r3
IMFS_update_ctime( the_jnode );
80128d8: fb ff c1 09 calli 8002cfc <gettimeofday>
80128dc: 2b 81 00 14 lw r1,(sp+20)
80128e0: 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) ) {
80128e4: b9 60 08 00 mv r1,r11
80128e8: fb ff ed cb calli 800e014 <rtems_libio_is_file_open>
80128ec: 5c 20 00 12 bne r1,r0,8012934 <imfs_dir_rmnod+0xc0>
80128f0: 2d 62 00 34 lhu r2,(r11+52)
80128f4: 5c 41 00 10 bne r2,r1,8012934 <imfs_dir_rmnod+0xc0>
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
80128f8: 78 01 08 02 mvhi r1,0x802
80128fc: 38 21 60 f8 ori r1,r1,0x60f8
8012900: 28 21 00 00 lw r1,(r1+0)
8012904: 29 83 00 00 lw r3,(r12+0)
8012908: 28 24 00 04 lw r4,(r1+4)
801290c: 44 83 00 1b be r4,r3,8012978 <imfs_dir_rmnod+0x104> <== NEVER TAKEN
/*
* Free memory associated with a memory file.
*/
free( the_jnode );
8012910: b9 60 08 00 mv r1,r11
8012914: fb ff c0 cc calli 8002c44 <free>
8012918: 34 01 00 00 mvi r1,0
}
return 0;
}
801291c: 2b 9d 00 04 lw ra,(sp+4)
8012920: 2b 8b 00 10 lw r11,(sp+16)
8012924: 2b 8c 00 0c lw r12,(sp+12)
8012928: 2b 8d 00 08 lw r13,(sp+8)
801292c: 37 9c 00 18 addi sp,sp,24
8012930: c3 a0 00 00 ret
/*
* Free memory associated with a memory file.
*/
free( the_jnode );
8012934: 34 01 00 00 mvi r1,0
}
return 0;
}
8012938: 2b 9d 00 04 lw ra,(sp+4)
801293c: 2b 8b 00 10 lw r11,(sp+16)
8012940: 2b 8c 00 0c lw r12,(sp+12)
8012944: 2b 8d 00 08 lw r13,(sp+8)
8012948: 37 9c 00 18 addi sp,sp,24
801294c: c3 a0 00 00 ret
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
8012950: f8 00 05 76 calli 8013f28 <__errno>
8012954: 34 02 00 5a mvi r2,90
8012958: 58 22 00 00 sw (r1+0),r2
801295c: 34 01 ff ff mvi r1,-1
8012960: e3 ff ff f6 bi 8012938 <imfs_dir_rmnod+0xc4>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
8012964: f8 00 05 71 calli 8013f28 <__errno>
8012968: 34 02 00 10 mvi r2,16
801296c: 58 22 00 00 sw (r1+0),r2
8012970: 34 01 ff ff mvi r1,-1
8012974: e3 ff ff f1 bi 8012938 <imfs_dir_rmnod+0xc4>
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
rtems_filesystem_current.node_access = NULL;
8012978: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED
801297c: e3 ff ff e5 bi 8012910 <imfs_dir_rmnod+0x9c> <== NOT EXECUTED
08001ff8 <init_etc_passwd_group>:
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
8001ff8: 37 9c ff f4 addi sp,sp,-12
8001ffc: 5b 8b 00 0c sw (sp+12),r11
8002000: 5b 8c 00 08 sw (sp+8),r12
8002004: 5b 9d 00 04 sw (sp+4),ra
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
8002008: 78 03 08 02 mvhi r3,0x802
800200c: 38 63 26 b0 ori r3,r3,0x26b0
8002010: 40 6b 00 00 lbu r11,(r3+0)
8002014: 45 60 00 06 be r11,r0,800202c <init_etc_passwd_group+0x34>
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
}
}
8002018: 2b 9d 00 04 lw ra,(sp+4)
800201c: 2b 8b 00 0c lw r11,(sp+12)
8002020: 2b 8c 00 08 lw r12,(sp+8)
8002024: 37 9c 00 0c addi sp,sp,12
8002028: c3 a0 00 00 ret
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
800202c: 34 04 00 01 mvi r4,1
mkdir("/etc", 0777);
8002030: 78 01 08 02 mvhi r1,0x802
8002034: 34 02 01 ff mvi r2,511
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
8002038: 30 64 00 00 sb (r3+0),r4
mkdir("/etc", 0777);
800203c: 38 21 04 90 ori r1,r1,0x490
8002040: f8 00 02 73 calli 8002a0c <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
8002044: 78 01 08 02 mvhi r1,0x802
8002048: 78 02 08 02 mvhi r2,0x802
800204c: 38 21 04 98 ori r1,r1,0x498
8002050: 38 42 0c 9c ori r2,r2,0xc9c
8002054: f8 00 39 08 calli 8010474 <fopen>
8002058: b8 20 60 00 mv r12,r1
800205c: 44 2b 00 1f be r1,r11,80020d8 <init_etc_passwd_group+0xe0> <== ALWAYS TAKEN
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
8002060: f8 00 36 e5 calli 800fbf4 <fclose>
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
8002064: 78 01 08 02 mvhi r1,0x802
8002068: 78 02 08 02 mvhi r2,0x802
800206c: 38 21 05 10 ori r1,r1,0x510
8002070: 38 42 0c 9c ori r2,r2,0xc9c
8002074: f8 00 39 00 calli 8010474 <fopen>
8002078: b8 20 58 00 mv r11,r1
800207c: 44 20 00 07 be r1,r0,8002098 <init_etc_passwd_group+0xa0> <== ALWAYS TAKEN
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
8002080: f8 00 36 dd calli 800fbf4 <fclose> <== NOT EXECUTED
}
}
8002084: 2b 9d 00 04 lw ra,(sp+4)
8002088: 2b 8b 00 0c lw r11,(sp+12)
800208c: 2b 8c 00 08 lw r12,(sp+8)
8002090: 37 9c 00 0c addi sp,sp,12
8002094: c3 a0 00 00 ret
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
8002098: 78 01 08 02 mvhi r1,0x802
800209c: 78 02 08 02 mvhi r2,0x802
80020a0: 38 21 05 10 ori r1,r1,0x510
80020a4: 38 42 04 a4 ori r2,r2,0x4a4
80020a8: f8 00 38 f3 calli 8010474 <fopen>
80020ac: b8 20 60 00 mv r12,r1
80020b0: 44 2b ff da be r1,r11,8002018 <init_etc_passwd_group+0x20> <== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
80020b4: 78 01 08 02 mvhi r1,0x802
80020b8: 34 02 00 01 mvi r2,1
80020bc: 34 03 00 2a mvi r3,42
80020c0: b9 80 20 00 mv r4,r12
80020c4: 38 21 05 1c ori r1,r1,0x51c
80020c8: f8 00 3a e2 calli 8010c50 <fwrite>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
80020cc: b9 80 08 00 mv r1,r12
80020d0: f8 00 36 c9 calli 800fbf4 <fclose>
80020d4: e3 ff ff ec bi 8002084 <init_etc_passwd_group+0x8c>
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
80020d8: 78 01 08 02 mvhi r1,0x802
80020dc: 78 02 08 02 mvhi r2,0x802
80020e0: 38 21 04 98 ori r1,r1,0x498
80020e4: 38 42 04 a4 ori r2,r2,0x4a4
80020e8: f8 00 38 e3 calli 8010474 <fopen>
80020ec: b8 20 58 00 mv r11,r1
80020f0: 44 2c ff dd be r1,r12,8002064 <init_etc_passwd_group+0x6c> <== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
80020f4: 78 01 08 02 mvhi r1,0x802
80020f8: 38 21 04 a8 ori r1,r1,0x4a8
80020fc: 34 02 00 01 mvi r2,1
8002100: 34 03 00 66 mvi r3,102
8002104: b9 60 20 00 mv r4,r11
8002108: f8 00 3a d2 calli 8010c50 <fwrite>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
800210c: b9 60 08 00 mv r1,r11
8002110: e3 ff ff d4 bi 8002060 <init_etc_passwd_group+0x68>
08005a6c <ioctl>:
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
8005a6c: 37 9c ff d4 addi sp,sp,-44
8005a70: 5b 8b 00 10 sw (sp+16),r11
8005a74: 5b 8c 00 0c sw (sp+12),r12
8005a78: 5b 8d 00 08 sw (sp+8),r13
8005a7c: 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 );
8005a80: 78 09 08 02 mvhi r9,0x802
8005a84: 39 29 60 10 ori r9,r9,0x6010
8005a88: 29 29 00 00 lw r9,(r9+0)
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
8005a8c: 5b 83 00 18 sw (sp+24),r3
8005a90: 5b 84 00 1c sw (sp+28),r4
8005a94: 5b 85 00 20 sw (sp+32),r5
8005a98: 5b 86 00 24 sw (sp+36),r6
8005a9c: 5b 87 00 28 sw (sp+40),r7
8005aa0: 5b 88 00 2c sw (sp+44),r8
8005aa4: 5b 82 00 14 sw (sp+20),r2
8005aa8: 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 );
8005aac: 55 21 00 06 bgu r9,r1,8005ac4 <ioctl+0x58>
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
8005ab0: f8 00 3a 93 calli 80144fc <__errno>
8005ab4: 34 02 00 09 mvi r2,9
8005ab8: 58 22 00 00 sw (r1+0),r2
8005abc: 34 01 ff ff mvi r1,-1
8005ac0: e0 00 00 15 bi 8005b14 <ioctl+0xa8>
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
8005ac4: 34 02 00 03 mvi r2,3
8005ac8: fb ff ec 6f calli 8000c84 <__ashlsi3>
8005acc: 34 02 00 03 mvi r2,3
8005ad0: 78 0b 08 02 mvhi r11,0x802
8005ad4: b8 20 68 00 mv r13,r1
8005ad8: 39 6b 67 f4 ori r11,r11,0x67f4
8005adc: fb ff ec 6a calli 8000c84 <__ashlsi3>
8005ae0: 29 62 00 00 lw r2,(r11+0)
8005ae4: b5 a1 08 00 add r1,r13,r1
8005ae8: b4 41 08 00 add r1,r2,r1
rtems_libio_check_is_open(iop);
8005aec: 28 22 00 18 lw r2,(r1+24)
8005af0: 20 42 01 00 andi r2,r2,0x100
8005af4: 44 40 ff ef be r2,r0,8005ab0 <ioctl+0x44> <== NEVER TAKEN
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
8005af8: 28 22 00 40 lw r2,(r1+64)
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
va_start(ap, command);
buffer = va_arg(ap, void *);
8005afc: 2b 83 00 18 lw r3,(sp+24)
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
8005b00: 44 40 ff ec be r2,r0,8005ab0 <ioctl+0x44> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl_h )
8005b04: 28 44 00 10 lw r4,(r2+16)
8005b08: 44 80 00 09 be r4,r0,8005b2c <ioctl+0xc0> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
8005b0c: b9 80 10 00 mv r2,r12
8005b10: d8 80 00 00 call r4
return rc;
}
8005b14: 2b 9d 00 04 lw ra,(sp+4)
8005b18: 2b 8b 00 10 lw r11,(sp+16)
8005b1c: 2b 8c 00 0c lw r12,(sp+12)
8005b20: 2b 8d 00 08 lw r13,(sp+8)
8005b24: 37 9c 00 2c addi sp,sp,44
8005b28: c3 a0 00 00 ret
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
8005b2c: f8 00 3a 74 calli 80144fc <__errno> <== NOT EXECUTED
8005b30: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8005b34: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8005b38: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8005b3c: e3 ff ff f6 bi 8005b14 <ioctl+0xa8> <== NOT EXECUTED
080048b4 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
80048b4: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED
80048b8: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED
80048bc: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED
80048c0: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
80048c4: b8 40 58 00 mv r11,r2 <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
80048c8: 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)
{
80048cc: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
80048d0: 20 41 00 20 andi r1,r2,0x20 <== NOT EXECUTED
80048d4: 44 20 00 02 be r1,r0,80048dc <iproc+0x28> <== NOT EXECUTED
c &= 0x7f;
80048d8: 21 8c 00 7f andi r12,r12,0x7f <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
80048dc: 20 41 02 00 andi r1,r2,0x200 <== NOT EXECUTED
80048e0: 44 20 00 0b be r1,r0,800490c <iproc+0x58> <== NOT EXECUTED
c = tolower (c);
80048e4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
80048e8: 38 21 63 0c ori r1,r1,0x630c <== NOT EXECUTED
80048ec: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED
80048f0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
80048f4: b4 6c 60 00 add r12,r3,r12 <== NOT EXECUTED
80048f8: 41 84 00 01 lbu r4,(r12+1) <== NOT EXECUTED
80048fc: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
8004900: 20 84 00 03 andi r4,r4,0x3 <== NOT EXECUTED
8004904: 44 83 00 44 be r4,r3,8004a14 <iproc+0x160> <== NOT EXECUTED
8004908: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED
if (c == '\r') {
800490c: 34 01 00 0d mvi r1,13 <== NOT EXECUTED
8004910: 45 81 00 18 be r12,r1,8004970 <iproc+0xbc> <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
8004914: 34 03 00 0a mvi r3,10 <== NOT EXECUTED
8004918: 45 83 00 3b be r12,r3,8004a04 <iproc+0x150> <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
800491c: 5d 80 00 20 bne r12,r0,800499c <iproc+0xe8> <== NOT EXECUTED
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
8004920: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8004924: 38 21 62 34 ori r1,r1,0x6234 <== NOT EXECUTED
8004928: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
800492c: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED
8004930: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
8004934: 4c 41 00 11 bge r2,r1,8004978 <iproc+0xc4> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
8004938: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED
800493c: 20 21 00 08 andi r1,r1,0x8 <== NOT EXECUTED
8004940: 5c 20 00 37 bne r1,r0,8004a1c <iproc+0x168> <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
8004944: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED
8004948: 34 43 00 01 addi r3,r2,1 <== NOT EXECUTED
800494c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8004950: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED
8004954: 30 4c 00 00 sb (r2+0),r12 <== NOT EXECUTED
8004958: 59 63 00 20 sw (r11+32),r3 <== NOT EXECUTED
}
return 0;
}
800495c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8004960: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8004964: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8004968: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
800496c: c3 a0 00 00 ret <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
8004970: 20 41 00 80 andi r1,r2,0x80 <== NOT EXECUTED
8004974: 44 20 00 07 be r1,r0,8004990 <iproc+0xdc> <== NOT EXECUTED
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
8004978: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
return 0;
}
800497c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8004980: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8004984: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8004988: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
800498c: c3 a0 00 00 ret <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
8004990: 20 42 01 00 andi r2,r2,0x100 <== NOT EXECUTED
8004994: 44 41 00 02 be r2,r1,800499c <iproc+0xe8> <== NOT EXECUTED
8004998: 34 0c 00 0a mvi r12,10 <== NOT EXECUTED
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
800499c: 29 62 00 3c lw r2,(r11+60) <== NOT EXECUTED
80049a0: 20 41 00 02 andi r1,r2,0x2 <== NOT EXECUTED
80049a4: 44 20 ff df be r1,r0,8004920 <iproc+0x6c> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
80049a8: 41 61 00 43 lbu r1,(r11+67) <== NOT EXECUTED
80049ac: 44 2c 00 38 be r1,r12,8004a8c <iproc+0x1d8> <== NOT EXECUTED
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
80049b0: 41 61 00 44 lbu r1,(r11+68) <== NOT EXECUTED
80049b4: 44 2c 00 23 be r1,r12,8004a40 <iproc+0x18c> <== NOT EXECUTED
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
80049b8: 41 63 00 45 lbu r3,(r11+69) <== NOT EXECUTED
80049bc: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
80049c0: 44 6c ff e7 be r3,r12,800495c <iproc+0xa8> <== NOT EXECUTED
return 1;
}
else if (c == '\n') {
80049c4: 34 01 00 0a mvi r1,10 <== NOT EXECUTED
80049c8: 45 81 00 23 be r12,r1,8004a54 <iproc+0x1a0> <== NOT EXECUTED
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
return 1;
}
else if ((c == tty->termios.c_cc[VEOL])
80049cc: 41 61 00 4c lbu r1,(r11+76) <== NOT EXECUTED
80049d0: 44 2c 00 03 be r1,r12,80049dc <iproc+0x128> <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
80049d4: 41 61 00 51 lbu r1,(r11+81) <== NOT EXECUTED
80049d8: 5c 2c ff d2 bne r1,r12,8004920 <iproc+0x6c> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
80049dc: 20 42 00 08 andi r2,r2,0x8 <== NOT EXECUTED
80049e0: 5c 40 00 14 bne r2,r0,8004a30 <iproc+0x17c> <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
80049e4: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED
80049e8: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED
80049ec: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
80049f0: b4 61 10 00 add r2,r3,r1 <== NOT EXECUTED
80049f4: b4 83 18 00 add r3,r4,r3 <== NOT EXECUTED
80049f8: 30 6c 00 00 sb (r3+0),r12 <== NOT EXECUTED
80049fc: 59 62 00 20 sw (r11+32),r2 <== NOT EXECUTED
return 1;
8004a00: e3 ff ff d7 bi 800495c <iproc+0xa8> <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
8004a04: 20 42 00 40 andi r2,r2,0x40 <== NOT EXECUTED
8004a08: 44 40 ff e5 be r2,r0,800499c <iproc+0xe8> <== NOT EXECUTED
8004a0c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
8004a10: e3 ff ff e3 bi 800499c <iproc+0xe8> <== NOT EXECUTED
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
8004a14: 34 21 00 20 addi r1,r1,32 <== NOT EXECUTED
8004a18: e3 ff ff bc bi 8004908 <iproc+0x54> <== NOT EXECUTED
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
8004a1c: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8004a20: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8004a24: fb ff fe ee calli 80045dc <echo> <== NOT EXECUTED
8004a28: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED
8004a2c: e3 ff ff c6 bi 8004944 <iproc+0x90> <== NOT EXECUTED
return 1;
}
else if ((c == tty->termios.c_cc[VEOL])
|| (c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
8004a30: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8004a34: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8004a38: fb ff fe e9 calli 80045dc <echo> <== NOT EXECUTED
8004a3c: e3 ff ff ea bi 80049e4 <iproc+0x130> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
8004a40: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8004a44: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8004a48: fb ff ff 12 calli 8004690 <erase> <== NOT EXECUTED
8004a4c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return 0;
8004a50: e3 ff ff c3 bi 800495c <iproc+0xa8> <== NOT EXECUTED
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
}
else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
8004a54: 20 42 00 48 andi r2,r2,0x48 <== NOT EXECUTED
8004a58: 44 40 00 04 be r2,r0,8004a68 <iproc+0x1b4> <== NOT EXECUTED
echo (c, tty);
8004a5c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8004a60: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8004a64: fb ff fe de calli 80045dc <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
8004a68: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED
8004a6c: 29 64 00 1c lw r4,(r11+28) <== NOT EXECUTED
8004a70: 34 03 00 0a mvi r3,10 <== NOT EXECUTED
8004a74: 34 41 00 01 addi r1,r2,1 <== NOT EXECUTED
8004a78: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED
8004a7c: 30 43 00 00 sb (r2+0),r3 <== NOT EXECUTED
8004a80: 59 61 00 20 sw (r11+32),r1 <== NOT EXECUTED
8004a84: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
return 1;
8004a88: e3 ff ff b5 bi 800495c <iproc+0xa8> <== NOT EXECUTED
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
8004a8c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8004a90: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8004a94: fb ff fe ff calli 8004690 <erase> <== NOT EXECUTED
8004a98: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return 0;
8004a9c: e3 ff ff b0 bi 800495c <iproc+0xa8> <== NOT EXECUTED
0800cb70 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
800cb70: 37 9c ff d8 addi sp,sp,-40
800cb74: 5b 8b 00 1c sw (sp+28),r11
800cb78: 5b 8c 00 18 sw (sp+24),r12
800cb7c: 5b 8d 00 14 sw (sp+20),r13
800cb80: 5b 8e 00 10 sw (sp+16),r14
800cb84: 5b 8f 00 0c sw (sp+12),r15
800cb88: 5b 90 00 08 sw (sp+8),r16
800cb8c: 5b 9d 00 04 sw (sp+4),ra
800cb90: b8 20 58 00 mv r11,r1
800cb94: b8 40 60 00 mv r12,r2
800cb98: b8 60 78 00 mv r15,r3
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
800cb9c: fb ff fa d3 calli 800b6e8 <getpid>
800cba0: 5c 2b 00 a9 bne r1,r11,800ce44 <killinfo+0x2d4>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
800cba4: 45 80 00 04 be r12,r0,800cbb4 <killinfo+0x44>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
800cba8: 35 8b ff ff addi r11,r12,-1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
800cbac: 34 01 00 1f mvi r1,31
800cbb0: 50 2b 00 06 bgeu r1,r11,800cbc8 <killinfo+0x58>
rtems_set_errno_and_return_minus_one( EINVAL );
800cbb4: f8 00 01 f4 calli 800d384 <__errno>
800cbb8: 34 02 00 16 mvi r2,22
800cbbc: 58 22 00 00 sw (r1+0),r2
800cbc0: 34 01 ff ff mvi r1,-1
800cbc4: e0 00 00 50 bi 800cd04 <killinfo+0x194>
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
800cbc8: b5 8c 80 00 add r16,r12,r12
800cbcc: 34 02 00 02 mvi r2,2
800cbd0: 78 0d 08 01 mvhi r13,0x801
800cbd4: b6 0c 08 00 add r1,r16,r12
800cbd8: fb ff cd 86 calli 80001f0 <__ashlsi3>
800cbdc: 39 ad ed b0 ori r13,r13,0xedb0
800cbe0: b5 a1 08 00 add r1,r13,r1
800cbe4: 28 22 00 08 lw r2,(r1+8)
800cbe8: 34 0e 00 01 mvi r14,1
800cbec: 34 01 00 00 mvi r1,0
800cbf0: 44 4e 00 45 be r2,r14,800cd04 <killinfo+0x194>
/*
* 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 ) )
800cbf4: 65 82 00 04 cmpei r2,r12,4
800cbf8: 65 81 00 08 cmpei r1,r12,8
800cbfc: b8 41 08 00 or r1,r2,r1
800cc00: 5c 20 00 4a bne r1,r0,800cd28 <killinfo+0x1b8>
800cc04: 34 01 00 0b mvi r1,11
800cc08: 45 81 00 48 be r12,r1,800cd28 <killinfo+0x1b8>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
800cc0c: b9 60 10 00 mv r2,r11
800cc10: b9 c0 08 00 mv r1,r14
800cc14: fb ff cd 77 calli 80001f0 <__ashlsi3>
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
800cc18: 5b 8e 00 24 sw (sp+36),r14
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
800cc1c: 5b 8c 00 20 sw (sp+32),r12
800cc20: b8 20 58 00 mv r11,r1
siginfo->si_code = SI_USER;
if ( !value ) {
800cc24: 45 e0 00 02 be r15,r0,800cc2c <killinfo+0xbc>
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
800cc28: 29 ef 00 00 lw r15,(r15+0)
800cc2c: 78 02 08 01 mvhi r2,0x801
800cc30: 5b 8f 00 28 sw (sp+40),r15
800cc34: 38 42 e8 a4 ori r2,r2,0xe8a4
800cc38: 28 41 00 00 lw r1,(r2+0)
800cc3c: 34 21 00 01 addi r1,r1,1
800cc40: 58 41 00 00 sw (r2+0),r1
/*
* Is the currently executing thread interested? If so then it will
* get it an execute it as soon as the dispatcher executes.
*/
the_thread = _Thread_Executing;
800cc44: 78 02 08 01 mvhi r2,0x801
800cc48: 38 42 e9 60 ori r2,r2,0xe960
800cc4c: 28 41 00 00 lw r1,(r2+0)
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
800cc50: 28 22 01 2c lw r2,(r1+300)
800cc54: 28 42 00 cc lw r2,(r2+204)
800cc58: a4 40 10 00 not r2,r2
800cc5c: a1 62 10 00 and r2,r11,r2
800cc60: 5c 40 00 17 bne r2,r0,800ccbc <killinfo+0x14c>
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
800cc64: 78 05 08 01 mvhi r5,0x801
800cc68: 38 a5 ef 3c ori r5,r5,0xef3c
800cc6c: 28 a3 00 00 lw r3,(r5+0)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
800cc70: 34 a5 00 04 addi r5,r5,4
800cc74: 44 65 00 42 be r3,r5,800cd7c <killinfo+0x20c>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
800cc78: 28 62 00 30 lw r2,(r3+48)
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
800cc7c: b8 60 08 00 mv r1,r3
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
800cc80: 28 64 01 2c lw r4,(r3+300)
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
800cc84: a1 62 10 00 and r2,r11,r2
800cc88: 44 40 00 09 be r2,r0,800ccac <killinfo+0x13c>
800cc8c: e0 00 00 0c bi 800ccbc <killinfo+0x14c>
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 ) {
800cc90: 28 63 00 00 lw r3,(r3+0)
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
800cc94: 44 65 00 3a be r3,r5,800cd7c <killinfo+0x20c> <== ALWAYS TAKEN
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
800cc98: 28 62 00 30 lw r2,(r3+48) <== NOT EXECUTED
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
800cc9c: 28 64 01 2c lw r4,(r3+300) <== NOT EXECUTED
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
800cca0: b8 60 08 00 mv r1,r3 <== NOT EXECUTED
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
800cca4: a1 62 10 00 and r2,r11,r2 <== NOT EXECUTED
800cca8: 5c 40 00 05 bne r2,r0,800ccbc <killinfo+0x14c> <== NOT EXECUTED
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
800ccac: 28 84 00 cc lw r4,(r4+204)
800ccb0: a4 80 20 00 not r4,r4
800ccb4: a1 64 20 00 and r4,r11,r4
800ccb8: 44 82 ff f6 be r4,r2,800cc90 <killinfo+0x120>
* 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;
800ccbc: 34 02 00 01 mvi r2,1
800ccc0: 30 22 00 74 sb (r1+116),r2
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
800ccc4: 37 83 00 20 addi r3,sp,32
800ccc8: b9 80 10 00 mv r2,r12
800cccc: f8 00 00 b1 calli 800cf90 <_POSIX_signals_Unblock_thread>
800ccd0: 5c 20 00 0b bne r1,r0,800ccfc <killinfo+0x18c>
/*
* 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 );
800ccd4: b9 60 08 00 mv r1,r11
800ccd8: f8 00 00 9d calli 800cf4c <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
800ccdc: 34 02 00 02 mvi r2,2
800cce0: b6 0c 08 00 add r1,r16,r12
800cce4: fb ff cd 43 calli 80001f0 <__ashlsi3>
800cce8: b5 a1 68 00 add r13,r13,r1
800ccec: 29 a2 00 00 lw r2,(r13+0)
800ccf0: b8 20 58 00 mv r11,r1
800ccf4: 34 01 00 02 mvi r1,2
800ccf8: 44 41 00 10 be r2,r1,800cd38 <killinfo+0x1c8>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
800ccfc: fb ff de 8b calli 8004728 <_Thread_Enable_dispatch>
800cd00: 34 01 00 00 mvi r1,0
return 0;
}
800cd04: 2b 9d 00 04 lw ra,(sp+4)
800cd08: 2b 8b 00 1c lw r11,(sp+28)
800cd0c: 2b 8c 00 18 lw r12,(sp+24)
800cd10: 2b 8d 00 14 lw r13,(sp+20)
800cd14: 2b 8e 00 10 lw r14,(sp+16)
800cd18: 2b 8f 00 0c lw r15,(sp+12)
800cd1c: 2b 90 00 08 lw r16,(sp+8)
800cd20: 37 9c 00 28 addi sp,sp,40
800cd24: c3 a0 00 00 ret
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
return pthread_kill( pthread_self(), sig );
800cd28: f8 00 01 4e calli 800d260 <pthread_self>
800cd2c: b9 80 10 00 mv r2,r12
800cd30: f8 00 00 fd calli 800d124 <pthread_kill>
800cd34: e3 ff ff f4 bi 800cd04 <killinfo+0x194>
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
800cd38: 78 01 08 01 mvhi r1,0x801
800cd3c: 38 21 ef 30 ori r1,r1,0xef30
800cd40: fb ff f1 a3 calli 80093cc <_Chain_Get>
800cd44: b8 20 18 00 mv r3,r1
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
800cd48: 44 20 00 44 be r1,r0,800ce58 <killinfo+0x2e8>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
800cd4c: 2b 81 00 20 lw r1,(sp+32)
800cd50: 58 61 00 08 sw (r3+8),r1
800cd54: 2b 82 00 24 lw r2,(sp+36)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
800cd58: 78 01 08 01 mvhi r1,0x801
800cd5c: 38 21 ef a8 ori r1,r1,0xefa8
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
800cd60: 58 62 00 0c sw (r3+12),r2
800cd64: 2b 84 00 28 lw r4,(sp+40)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
800cd68: b5 61 08 00 add r1,r11,r1
800cd6c: b8 60 10 00 mv r2,r3
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
800cd70: 58 64 00 10 sw (r3+16),r4
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
800cd74: fb ff d8 1e calli 8002dec <_Chain_Append>
800cd78: e3 ff ff e1 bi 800ccfc <killinfo+0x18c>
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
800cd7c: 78 01 08 01 mvhi r1,0x801
800cd80: 38 21 e0 c0 ori r1,r1,0xe0c0
800cd84: 40 26 00 00 lbu r6,(r1+0)
800cd88: 78 07 08 01 mvhi r7,0x801
800cd8c: 38 e7 e8 44 ori r7,r7,0xe844
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
800cd90: 78 0a 10 00 mvhi r10,0x1000
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
800cd94: 34 c6 00 01 addi r6,r6,1
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
800cd98: 39 4a 00 00 ori r10,r10,0x0
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
800cd9c: 34 ee 00 0c addi r14,r7,12
800cda0: 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 ] )
800cda4: 28 e2 00 00 lw r2,(r7+0)
800cda8: 44 40 00 1d be r2,r0,800ce1c <killinfo+0x2ac>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
800cdac: 28 42 00 04 lw r2,(r2+4)
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
800cdb0: 2c 48 00 10 lhu r8,(r2+16)
object_table = the_info->local_table;
800cdb4: 28 44 00 1c lw r4,(r2+28)
for ( index = 1 ; index <= maximum ; index++ ) {
800cdb8: 45 00 00 19 be r8,r0,800ce1c <killinfo+0x2ac>
800cdbc: 34 03 00 01 mvi r3,1
the_thread = (Thread_Control *) object_table[ index ];
800cdc0: 28 82 00 04 lw r2,(r4+4)
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
800cdc4: 34 63 00 01 addi r3,r3,1
800cdc8: 34 84 00 04 addi r4,r4,4
the_thread = (Thread_Control *) object_table[ index ];
if ( !the_thread )
800cdcc: 44 40 00 13 be r2,r0,800ce18 <killinfo+0x2a8>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
800cdd0: 28 45 00 14 lw r5,(r2+20)
800cdd4: 54 a6 00 11 bgu r5,r6,800ce18 <killinfo+0x2a8>
DEBUG_STEP("2");
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
800cdd8: 28 49 01 2c lw r9,(r2+300)
800cddc: 29 29 00 cc lw r9,(r9+204)
800cde0: a5 20 48 00 not r9,r9
800cde4: a1 69 48 00 and r9,r11,r9
800cde8: 45 20 00 0c be r9,r0,800ce18 <killinfo+0x2a8>
*
* 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 ) {
800cdec: 54 c5 00 09 bgu r6,r5,800ce10 <killinfo+0x2a0>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( !_States_Is_ready( interested->current_state ) ) {
800cdf0: 28 29 00 10 lw r9,(r1+16)
800cdf4: 45 20 00 09 be r9,r0,800ce18 <killinfo+0x2a8> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
800cdf8: 28 4f 00 10 lw r15,(r2+16)
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
800cdfc: a1 2a 48 00 and r9,r9,r10
*/
if ( !_States_Is_ready( interested->current_state ) ) {
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
800ce00: 45 e0 00 04 be r15,r0,800ce10 <killinfo+0x2a0>
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
800ce04: a1 ea 78 00 and r15,r15,r10
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
800ce08: 5d 20 00 04 bne r9,r0,800ce18 <killinfo+0x2a8>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
800ce0c: 45 e9 00 03 be r15,r9,800ce18 <killinfo+0x2a8>
800ce10: b8 a0 30 00 mv r6,r5
800ce14: b8 40 08 00 mv r1,r2
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
800ce18: 51 03 ff ea bgeu r8,r3,800cdc0 <killinfo+0x250>
800ce1c: 34 e7 00 04 addi r7,r7,4
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
800ce20: 5c ee ff e1 bne r7,r14,800cda4 <killinfo+0x234>
}
}
}
}
if ( interested ) {
800ce24: 44 20 ff ac be r1,r0,800ccd4 <killinfo+0x164>
* 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;
800ce28: 34 02 00 01 mvi r2,1
800ce2c: 30 22 00 74 sb (r1+116),r2
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
800ce30: 37 83 00 20 addi r3,sp,32
800ce34: b9 80 10 00 mv r2,r12
800ce38: f8 00 00 56 calli 800cf90 <_POSIX_signals_Unblock_thread>
800ce3c: 44 20 ff a6 be r1,r0,800ccd4 <killinfo+0x164> <== ALWAYS TAKEN
800ce40: e3 ff ff af bi 800ccfc <killinfo+0x18c> <== NOT EXECUTED
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
800ce44: f8 00 01 50 calli 800d384 <__errno>
800ce48: 34 02 00 03 mvi r2,3
800ce4c: 58 22 00 00 sw (r1+0),r2
800ce50: 34 01 ff ff mvi r1,-1
800ce54: e3 ff ff ac bi 800cd04 <killinfo+0x194>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
_Thread_Enable_dispatch();
800ce58: fb ff de 34 calli 8004728 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
800ce5c: f8 00 01 4a calli 800d384 <__errno>
800ce60: 34 02 00 0b mvi r2,11
800ce64: 58 22 00 00 sw (r1+0),r2
800ce68: 34 01 ff ff mvi r1,-1
800ce6c: e3 ff ff a6 bi 800cd04 <killinfo+0x194>
08002fd0 <link>:
int link(
const char *existing,
const char *new
)
{
8002fd0: 37 9c ff c0 addi sp,sp,-64
8002fd4: 5b 8b 00 14 sw (sp+20),r11
8002fd8: 5b 8c 00 10 sw (sp+16),r12
8002fdc: 5b 8d 00 0c sw (sp+12),r13
8002fe0: 5b 8e 00 08 sw (sp+8),r14
8002fe4: 5b 9d 00 04 sw (sp+4),ra
8002fe8: b8 20 60 00 mv r12,r1
8002fec: b8 40 70 00 mv r14,r2
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
8002ff0: 37 8b 00 2c addi r11,sp,44
8002ff4: f8 00 3a a7 calli 8011a90 <strlen>
8002ff8: b8 20 10 00 mv r2,r1
8002ffc: 34 03 00 00 mvi r3,0
8003000: b9 80 08 00 mv r1,r12
8003004: b9 60 20 00 mv r4,r11
8003008: 34 05 00 01 mvi r5,1
800300c: fb ff fe 3e calli 8002904 <rtems_filesystem_evaluate_path>
0, &existing_loc, true );
if ( result != 0 )
8003010: 34 0c ff ff mvi r12,-1
8003014: 5c 20 00 35 bne r1,r0,80030e8 <link+0x118>
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
8003018: 41 c3 00 00 lbu r3,(r14+0)
800301c: 64 64 00 5c cmpei r4,r3,92
8003020: 64 62 00 2f cmpei r2,r3,47
8003024: b8 82 20 00 or r4,r4,r2
8003028: 44 81 00 38 be r4,r1,8003108 <link+0x138>
800302c: 78 03 08 02 mvhi r3,0x802
8003030: 38 63 41 94 ori r3,r3,0x4194
8003034: 28 63 00 00 lw r3,(r3+0)
8003038: 34 01 00 01 mvi r1,1
800303c: 28 62 00 18 lw r2,(r3+24)
8003040: 5b 82 00 18 sw (sp+24),r2
8003044: 28 62 00 1c lw r2,(r3+28)
8003048: 5b 82 00 1c sw (sp+28),r2
800304c: 28 62 00 20 lw r2,(r3+32)
8003050: 5b 82 00 20 sw (sp+32),r2
8003054: 28 62 00 24 lw r2,(r3+36)
8003058: 5b 82 00 24 sw (sp+36),r2
800305c: 28 63 00 28 lw r3,(r3+40)
8003060: 5b 83 00 28 sw (sp+40),r3
if ( !parent_loc.ops->evalformake_h ) {
8003064: 2b 82 00 24 lw r2,(sp+36)
8003068: 28 44 00 04 lw r4,(r2+4)
800306c: 44 80 00 59 be r4,r0,80031d0 <link+0x200> <== NEVER TAKEN
rtems_filesystem_freenode( &existing_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
8003070: 37 8d 00 18 addi r13,sp,24
8003074: b5 c1 08 00 add r1,r14,r1
8003078: b9 a0 10 00 mv r2,r13
800307c: 37 83 00 40 addi r3,sp,64
8003080: d8 80 00 00 call r4
8003084: b8 20 60 00 mv r12,r1
if ( result != 0 ) {
8003088: 5c 20 00 48 bne r1,r0,80031a8 <link+0x1d8>
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
800308c: 2b 81 00 3c lw r1,(sp+60)
8003090: 2b 82 00 28 lw r2,(sp+40)
8003094: 5c 41 00 2d bne r2,r1,8003148 <link+0x178>
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
8003098: 2b 82 00 24 lw r2,(sp+36)
800309c: 28 44 00 08 lw r4,(r2+8)
80030a0: 44 80 00 57 be r4,r0,80031fc <link+0x22c> <== NEVER TAKEN
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
80030a4: 2b 83 00 40 lw r3,(sp+64)
80030a8: b9 60 08 00 mv r1,r11
80030ac: b9 a0 10 00 mv r2,r13
80030b0: d8 80 00 00 call r4
80030b4: b8 20 60 00 mv r12,r1
rtems_filesystem_freenode( &existing_loc );
80030b8: 2b 81 00 38 lw r1,(sp+56)
80030bc: 44 20 00 05 be r1,r0,80030d0 <link+0x100> <== NEVER TAKEN
80030c0: 28 22 00 1c lw r2,(r1+28)
80030c4: 44 40 00 03 be r2,r0,80030d0 <link+0x100> <== NEVER TAKEN
80030c8: b9 60 08 00 mv r1,r11
80030cc: d8 40 00 00 call r2
rtems_filesystem_freenode( &parent_loc );
80030d0: 2b 81 00 24 lw r1,(sp+36)
80030d4: 44 20 00 05 be r1,r0,80030e8 <link+0x118> <== NEVER TAKEN
80030d8: 28 22 00 1c lw r2,(r1+28)
80030dc: 44 40 00 03 be r2,r0,80030e8 <link+0x118> <== NEVER TAKEN
80030e0: b9 a0 08 00 mv r1,r13
80030e4: d8 40 00 00 call r2
return result;
}
80030e8: b9 80 08 00 mv r1,r12
80030ec: 2b 9d 00 04 lw ra,(sp+4)
80030f0: 2b 8b 00 14 lw r11,(sp+20)
80030f4: 2b 8c 00 10 lw r12,(sp+16)
80030f8: 2b 8d 00 0c lw r13,(sp+12)
80030fc: 2b 8e 00 08 lw r14,(sp+8)
8003100: 37 9c 00 40 addi sp,sp,64
8003104: c3 a0 00 00 ret
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
8003108: 44 64 ff c9 be r3,r4,800302c <link+0x5c> <== NEVER TAKEN
800310c: 78 01 08 02 mvhi r1,0x802
8003110: 38 21 41 94 ori r1,r1,0x4194
8003114: 28 22 00 00 lw r2,(r1+0)
8003118: b8 80 08 00 mv r1,r4
800311c: 28 43 00 04 lw r3,(r2+4)
8003120: 5b 83 00 18 sw (sp+24),r3
8003124: 28 43 00 08 lw r3,(r2+8)
8003128: 5b 83 00 1c sw (sp+28),r3
800312c: 28 43 00 0c lw r3,(r2+12)
8003130: 5b 83 00 20 sw (sp+32),r3
8003134: 28 43 00 10 lw r3,(r2+16)
8003138: 5b 83 00 24 sw (sp+36),r3
800313c: 28 42 00 14 lw r2,(r2+20)
8003140: 5b 82 00 28 sw (sp+40),r2
8003144: e3 ff ff c8 bi 8003064 <link+0x94>
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
rtems_filesystem_freenode( &existing_loc );
8003148: 2b 81 00 38 lw r1,(sp+56)
800314c: 44 20 00 05 be r1,r0,8003160 <link+0x190> <== NEVER TAKEN
8003150: 28 22 00 1c lw r2,(r1+28)
8003154: 44 40 00 03 be r2,r0,8003160 <link+0x190> <== NEVER TAKEN
8003158: b9 60 08 00 mv r1,r11
800315c: d8 40 00 00 call r2
rtems_filesystem_freenode( &parent_loc );
8003160: 2b 81 00 24 lw r1,(sp+36)
8003164: 44 20 00 05 be r1,r0,8003178 <link+0x1a8> <== NEVER TAKEN
8003168: 28 22 00 1c lw r2,(r1+28)
800316c: 44 40 00 03 be r2,r0,8003178 <link+0x1a8> <== NEVER TAKEN
8003170: b9 a0 08 00 mv r1,r13
8003174: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( EXDEV );
8003178: f8 00 34 4f calli 80102b4 <__errno>
800317c: 34 02 00 12 mvi r2,18
8003180: 34 0c ff ff mvi r12,-1
8003184: 58 22 00 00 sw (r1+0),r2
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
8003188: b9 80 08 00 mv r1,r12
800318c: 2b 9d 00 04 lw ra,(sp+4)
8003190: 2b 8b 00 14 lw r11,(sp+20)
8003194: 2b 8c 00 10 lw r12,(sp+16)
8003198: 2b 8d 00 0c lw r13,(sp+12)
800319c: 2b 8e 00 08 lw r14,(sp+8)
80031a0: 37 9c 00 40 addi sp,sp,64
80031a4: c3 a0 00 00 ret
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
if ( result != 0 ) {
rtems_filesystem_freenode( &existing_loc );
80031a8: 2b 81 00 38 lw r1,(sp+56)
80031ac: 44 20 00 05 be r1,r0,80031c0 <link+0x1f0> <== NEVER TAKEN
80031b0: 28 22 00 1c lw r2,(r1+28)
80031b4: 44 40 00 03 be r2,r0,80031c0 <link+0x1f0> <== NEVER TAKEN
80031b8: b9 60 08 00 mv r1,r11
80031bc: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( result );
80031c0: f8 00 34 3d calli 80102b4 <__errno>
80031c4: 58 2c 00 00 sw (r1+0),r12
80031c8: 34 0c ff ff mvi r12,-1
80031cc: e3 ff ff c7 bi 80030e8 <link+0x118>
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
if ( !parent_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &existing_loc );
80031d0: 2b 81 00 38 lw r1,(sp+56) <== NOT EXECUTED
80031d4: 44 24 00 05 be r1,r4,80031e8 <link+0x218> <== NOT EXECUTED
80031d8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
80031dc: 44 40 00 03 be r2,r0,80031e8 <link+0x218> <== NOT EXECUTED
80031e0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80031e4: d8 40 00 00 call r2 <== NOT EXECUTED
}
if ( !parent_loc.ops->link_h ) {
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
80031e8: f8 00 34 33 calli 80102b4 <__errno> <== NOT EXECUTED
80031ec: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
80031f0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80031f4: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
80031f8: e3 ff ff bc bi 80030e8 <link+0x118> <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
rtems_filesystem_freenode( &existing_loc );
80031fc: 2b 81 00 38 lw r1,(sp+56) <== NOT EXECUTED
8003200: 44 24 00 06 be r1,r4,8003218 <link+0x248> <== NOT EXECUTED
8003204: 28 23 00 1c lw r3,(r1+28) <== NOT EXECUTED
8003208: 44 64 00 04 be r3,r4,8003218 <link+0x248> <== NOT EXECUTED
800320c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8003210: d8 60 00 00 call r3 <== NOT EXECUTED
8003214: 2b 82 00 24 lw r2,(sp+36) <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
8003218: 44 40 ff f4 be r2,r0,80031e8 <link+0x218> <== NOT EXECUTED
800321c: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED
8003220: 44 40 ff f2 be r2,r0,80031e8 <link+0x218> <== NOT EXECUTED
8003224: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8003228: d8 40 00 00 call r2 <== NOT EXECUTED
800322c: e3 ff ff ef bi 80031e8 <link+0x218> <== NOT EXECUTED
0801b85c <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
801b85c: 37 9c ff e4 addi sp,sp,-28
801b860: 5b 8b 00 1c sw (sp+28),r11
801b864: 5b 8c 00 18 sw (sp+24),r12
801b868: 5b 8d 00 14 sw (sp+20),r13
801b86c: 5b 8e 00 10 sw (sp+16),r14
801b870: 5b 8f 00 0c sw (sp+12),r15
801b874: 5b 90 00 08 sw (sp+8),r16
801b878: 5b 9d 00 04 sw (sp+4),ra
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
801b87c: 78 04 08 01 mvhi r4,0x801
801b880: 38 84 e0 10 ori r4,r4,0xe010
801b884: 28 84 00 00 lw r4,(r4+0)
off_t lseek(
int fd,
off_t offset,
int whence
)
{
801b888: b8 40 60 00 mv r12,r2
801b88c: b8 60 68 00 mv r13,r3
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
801b890: 54 81 00 06 bgu r4,r1,801b8a8 <lseek+0x4c> <== ALWAYS TAKEN
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
801b894: fb ff c6 bc calli 800d384 <__errno> <== NOT EXECUTED
801b898: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
801b89c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
801b8a0: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
801b8a4: e0 00 00 1c bi 801b914 <lseek+0xb8> <== NOT EXECUTED
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
801b8a8: 34 02 00 03 mvi r2,3
801b8ac: fb ff 92 51 calli 80001f0 <__ashlsi3>
801b8b0: 78 0e 08 01 mvhi r14,0x801
801b8b4: 39 ce e7 1c ori r14,r14,0xe71c
801b8b8: 34 02 00 03 mvi r2,3
801b8bc: b8 20 78 00 mv r15,r1
801b8c0: fb ff 92 4c calli 80001f0 <__ashlsi3>
801b8c4: 29 cb 00 00 lw r11,(r14+0)
801b8c8: b5 e1 08 00 add r1,r15,r1
801b8cc: b5 61 58 00 add r11,r11,r1
rtems_libio_check_is_open(iop);
801b8d0: 29 61 00 18 lw r1,(r11+24)
801b8d4: 20 21 01 00 andi r1,r1,0x100
801b8d8: 44 20 ff ef be r1,r0,801b894 <lseek+0x38> <== NEVER TAKEN
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
801b8dc: 29 6e 00 40 lw r14,(r11+64)
801b8e0: 29 c1 00 14 lw r1,(r14+20)
801b8e4: 44 20 00 42 be r1,r0,801b9ec <lseek+0x190> <== NEVER TAKEN
/*
* Now process the lseek().
*/
old_offset = iop->offset;
switch ( whence ) {
801b8e8: 34 01 00 01 mvi r1,1
/*
* Now process the lseek().
*/
old_offset = iop->offset;
801b8ec: 29 70 00 10 lw r16,(r11+16)
801b8f0: 29 6f 00 14 lw r15,(r11+20)
switch ( whence ) {
801b8f4: 45 a1 00 33 be r13,r1,801b9c0 <lseek+0x164>
801b8f8: 34 01 00 02 mvi r1,2
801b8fc: 45 a1 00 24 be r13,r1,801b98c <lseek+0x130>
801b900: 45 a0 00 0f be r13,r0,801b93c <lseek+0xe0>
case SEEK_END:
iop->offset = iop->size + offset;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
801b904: fb ff c6 a0 calli 800d384 <__errno>
801b908: 34 02 00 16 mvi r2,22
801b90c: 58 22 00 00 sw (r1+0),r2
801b910: 34 0c ff ff mvi r12,-1
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
801b914: b9 80 08 00 mv r1,r12
801b918: 2b 9d 00 04 lw ra,(sp+4)
801b91c: 2b 8b 00 1c lw r11,(sp+28)
801b920: 2b 8c 00 18 lw r12,(sp+24)
801b924: 2b 8d 00 14 lw r13,(sp+20)
801b928: 2b 8e 00 10 lw r14,(sp+16)
801b92c: 2b 8f 00 0c lw r15,(sp+12)
801b930: 2b 90 00 08 lw r16,(sp+8)
801b934: 37 9c 00 1c addi sp,sp,28
801b938: c3 a0 00 00 ret
*/
old_offset = iop->offset;
switch ( whence ) {
case SEEK_SET:
iop->offset = offset;
801b93c: 34 02 00 1f mvi r2,31
801b940: b9 80 08 00 mv r1,r12
801b944: fb ff 92 7b calli 8000330 <__ashrsi3>
801b948: b8 20 10 00 mv r2,r1
801b94c: 59 61 00 10 sw (r11+16),r1
801b950: 59 6c 00 14 sw (r11+20),r12
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
801b954: 29 c5 00 14 lw r5,(r14+20)
801b958: b9 80 18 00 mv r3,r12
801b95c: b9 a0 20 00 mv r4,r13
801b960: b9 60 08 00 mv r1,r11
801b964: d8 a0 00 00 call r5
if ( status == (off_t) -1 )
801b968: 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 );
801b96c: b8 40 60 00 mv r12,r2
if ( status == (off_t) -1 )
801b970: 5c 41 ff e9 bne r2,r1,801b914 <lseek+0xb8>
iop->offset = old_offset;
801b974: b9 e0 08 00 mv r1,r15
801b978: 34 02 00 1f mvi r2,31
801b97c: fb ff 92 6d calli 8000330 <__ashrsi3>
801b980: 59 61 00 10 sw (r11+16),r1
801b984: 59 6f 00 14 sw (r11+20),r15
801b988: e3 ff ff e3 bi 801b914 <lseek+0xb8>
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
801b98c: 34 02 00 1f mvi r2,31
801b990: b9 80 08 00 mv r1,r12
801b994: fb ff 92 67 calli 8000330 <__ashrsi3>
801b998: b8 20 10 00 mv r2,r1
801b99c: 29 61 00 0c lw r1,(r11+12)
801b9a0: 29 63 00 08 lw r3,(r11+8)
801b9a4: b5 81 08 00 add r1,r12,r1
801b9a8: f5 81 20 00 cmpgu r4,r12,r1
801b9ac: b4 43 18 00 add r3,r2,r3
801b9b0: b4 83 18 00 add r3,r4,r3
801b9b4: 59 63 00 10 sw (r11+16),r3
801b9b8: 59 61 00 14 sw (r11+20),r1
break;
801b9bc: e3 ff ff e6 bi 801b954 <lseek+0xf8>
case SEEK_SET:
iop->offset = offset;
break;
case SEEK_CUR:
iop->offset += offset;
801b9c0: 34 02 00 1f mvi r2,31
801b9c4: b9 80 08 00 mv r1,r12
801b9c8: fb ff 92 5a calli 8000330 <__ashrsi3>
801b9cc: b8 20 10 00 mv r2,r1
801b9d0: b5 8f 08 00 add r1,r12,r15
801b9d4: f5 81 18 00 cmpgu r3,r12,r1
801b9d8: b4 50 80 00 add r16,r2,r16
801b9dc: b4 70 80 00 add r16,r3,r16
801b9e0: 59 70 00 10 sw (r11+16),r16
801b9e4: 59 61 00 14 sw (r11+20),r1
break;
801b9e8: e3 ff ff db bi 801b954 <lseek+0xf8>
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
801b9ec: fb ff c6 66 calli 800d384 <__errno> <== NOT EXECUTED
801b9f0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
801b9f4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
801b9f8: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
801b9fc: e3 ff ff c6 bi 801b914 <lseek+0xb8> <== NOT EXECUTED
08008054 <malloc>:
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
8008054: 37 9c ff f0 addi sp,sp,-16
8008058: 5b 8b 00 10 sw (sp+16),r11
800805c: 5b 8c 00 0c sw (sp+12),r12
8008060: 5b 8d 00 08 sw (sp+8),r13
8008064: 5b 9d 00 04 sw (sp+4),ra
8008068: 78 03 08 01 mvhi r3,0x801
800806c: 38 63 e7 28 ori r3,r3,0xe728
8008070: 28 62 00 04 lw r2,(r3+4)
8008074: b8 20 60 00 mv r12,r1
8008078: 34 41 00 01 addi r1,r2,1
800807c: 58 61 00 04 sw (r3+4),r1
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
8008080: fb ff ff e7 calli 800801c <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
8008084: 45 80 00 29 be r12,r0,8008128 <malloc+0xd4> <== 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()) &&
8008088: 78 01 08 01 mvhi r1,0x801
800808c: 38 21 ea 40 ori r1,r1,0xea40
8008090: 28 22 00 00 lw r2,(r1+0)
8008094: 34 01 00 03 mvi r1,3
8008098: 44 41 00 22 be r2,r1,8008120 <malloc+0xcc>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
800809c: 78 01 08 01 mvhi r1,0x801
80080a0: 38 21 e0 1c ori r1,r1,0xe01c
80080a4: 28 21 00 00 lw r1,(r1+0)
80080a8: 34 03 00 00 mvi r3,0
80080ac: b9 80 10 00 mv r2,r12
80080b0: b8 60 20 00 mv r4,r3
80080b4: f8 00 07 4b calli 8009de0 <_Protected_heap_Allocate_aligned_with_boundary>
80080b8: 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;
80080bc: b8 20 68 00 mv r13,r1
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
80080c0: 44 20 00 22 be r1,r0,8008148 <malloc+0xf4>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
80080c4: 78 01 08 01 mvhi r1,0x801
80080c8: 38 21 e6 58 ori r1,r1,0xe658
80080cc: 28 21 00 00 lw r1,(r1+0)
80080d0: 44 20 00 05 be r1,r0,80080e4 <malloc+0x90> <== ALWAYS TAKEN
(*rtems_malloc_dirty_helper)( return_this, size );
80080d4: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED
80080d8: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
80080dc: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
80080e0: d8 60 00 00 call r3 <== NOT EXECUTED
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
80080e4: 78 01 08 01 mvhi r1,0x801
80080e8: 38 21 e6 50 ori r1,r1,0xe650
80080ec: 28 21 00 00 lw r1,(r1+0)
80080f0: b9 a0 58 00 mv r11,r13
80080f4: 44 20 00 04 be r1,r0,8008104 <malloc+0xb0> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
80080f8: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED
80080fc: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8008100: d8 40 00 00 call r2 <== NOT EXECUTED
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
8008104: b9 60 08 00 mv r1,r11
8008108: 2b 9d 00 04 lw ra,(sp+4)
800810c: 2b 8b 00 10 lw r11,(sp+16)
8008110: 2b 8c 00 0c lw r12,(sp+12)
8008114: 2b 8d 00 08 lw r13,(sp+8)
8008118: 37 9c 00 10 addi sp,sp,16
800811c: c3 a0 00 00 ret
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
8008120: fb ff ff a4 calli 8007fb0 <malloc_is_system_state_OK>
8008124: 5c 20 ff de bne r1,r0,800809c <malloc+0x48> <== ALWAYS TAKEN
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
8008128: 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;
}
800812c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8008130: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8008134: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
8008138: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
800813c: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
8008140: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
8008144: c3 a0 00 00 ret <== NOT EXECUTED
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
8008148: 78 01 08 01 mvhi r1,0x801
800814c: 38 21 e6 54 ori r1,r1,0xe654
8008150: 28 21 00 00 lw r1,(r1+0)
8008154: 44 2b 00 06 be r1,r11,800816c <malloc+0x118> <== ALWAYS TAKEN
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
8008158: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED
800815c: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8008160: d8 40 00 00 call r2 <== NOT EXECUTED
8008164: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
if ( !return_this ) {
8008168: 5c 20 ff d7 bne r1,r0,80080c4 <malloc+0x70> <== NOT EXECUTED
errno = ENOMEM;
800816c: f8 00 14 86 calli 800d384 <__errno>
8008170: 34 02 00 0c mvi r2,12
8008174: 58 22 00 00 sw (r1+0),r2
return (void *) 0;
8008178: e3 ff ff e3 bi 8008104 <malloc+0xb0>
08007ff8 <malloc_deferred_free>:
}
void malloc_deferred_free(
void *pointer
)
{
8007ff8: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8007ffc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8008000: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
8008004: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
8008008: 38 21 ed a4 ori r1,r1,0xeda4 <== NOT EXECUTED
800800c: fb ff eb 78 calli 8002dec <_Chain_Append> <== NOT EXECUTED
rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer);
}
8008010: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8008014: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8008018: c3 a0 00 00 ret <== NOT EXECUTED
0800801c <malloc_deferred_frees_process>:
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
800801c: 37 9c ff f8 addi sp,sp,-8
8008020: 5b 8b 00 08 sw (sp+8),r11
8008024: 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 );
8008028: 78 0b 08 01 mvhi r11,0x801
rtems_chain_node *to_be_freed;
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
800802c: e0 00 00 02 bi 8008034 <malloc_deferred_frees_process+0x18>
free(to_be_freed);
8008030: fb ff fe 47 calli 800794c <free> <== NOT EXECUTED
8008034: b9 60 08 00 mv r1,r11
8008038: 38 21 ed a4 ori r1,r1,0xeda4
800803c: f8 00 04 e4 calli 80093cc <_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)
8008040: 5c 20 ff fc bne r1,r0,8008030 <malloc_deferred_frees_process+0x14><== NEVER TAKEN
free(to_be_freed);
}
8008044: 2b 9d 00 04 lw ra,(sp+4)
8008048: 2b 8b 00 08 lw r11,(sp+8)
800804c: 37 9c 00 08 addi sp,sp,8
8008050: c3 a0 00 00 ret
08007fb0 <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 )
8007fb0: 78 01 08 01 mvhi r1,0x801
8007fb4: 38 21 e8 a4 ori r1,r1,0xe8a4
8007fb8: 28 22 00 00 lw r2,(r1+0)
8007fbc: 34 01 00 00 mvi r1,0
8007fc0: 5c 41 00 05 bne r2,r1,8007fd4 <malloc_is_system_state_OK+0x24><== NEVER TAKEN
return false;
if ( _ISR_Nest_level > 0 )
8007fc4: 78 01 08 01 mvhi r1,0x801
8007fc8: 38 21 e9 3c ori r1,r1,0xe93c
8007fcc: 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)
8007fd0: 64 21 00 00 cmpei r1,r1,0
if ( _ISR_Nest_level > 0 )
return false;
return true;
}
8007fd4: c3 a0 00 00 ret
08011208 <memfile_alloc_block>:
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
8011208: 37 9c ff fc addi sp,sp,-4
801120c: 5b 9d 00 04 sw (sp+4),ra
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
8011210: 78 01 08 02 mvhi r1,0x802
8011214: 38 21 66 d8 ori r1,r1,0x66d8
8011218: 28 22 00 00 lw r2,(r1+0)
801121c: 34 01 00 01 mvi r1,1
8011220: fb ff c5 b9 calli 8002904 <calloc>
if ( memory )
8011224: 44 20 00 06 be r1,r0,801123c <memfile_alloc_block+0x34> <== NEVER TAKEN
memfile_blocks_allocated++;
8011228: 78 02 08 02 mvhi r2,0x802
801122c: 38 42 67 7c ori r2,r2,0x677c
8011230: 28 43 00 00 lw r3,(r2+0)
8011234: 34 63 00 01 addi r3,r3,1
8011238: 58 43 00 00 sw (r2+0),r3
return memory;
}
801123c: 2b 9d 00 04 lw ra,(sp+4)
8011240: 37 9c 00 04 addi sp,sp,4
8011244: c3 a0 00 00 ret
0801181c <memfile_check_rmnod>:
return memfile_check_rmnod( the_jnode );
}
int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){
801181c: 37 9c ff f8 addi sp,sp,-8
8011820: 5b 8b 00 08 sw (sp+8),r11
8011824: 5b 9d 00 04 sw (sp+4),ra
8011828: 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) ) {
801182c: fb ff f1 fa calli 800e014 <rtems_libio_is_file_open>
8011830: 5c 20 00 0f bne r1,r0,801186c <memfile_check_rmnod+0x50>
8011834: 2d 62 00 34 lhu r2,(r11+52)
8011838: 5c 41 00 0d bne r2,r1,801186c <memfile_check_rmnod+0x50> <== NEVER TAKEN
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == the_jnode )
801183c: 78 01 08 02 mvhi r1,0x802
8011840: 38 21 60 f8 ori r1,r1,0x60f8
8011844: 28 21 00 00 lw r1,(r1+0)
8011848: 28 23 00 04 lw r3,(r1+4)
801184c: 44 6b 00 0d be r3,r11,8011880 <memfile_check_rmnod+0x64> <== NEVER TAKEN
rtems_filesystem_current.node_access = NULL;
/*
* Free memory associated with a memory file.
*/
if (the_jnode->type != IMFS_LINEAR_FILE)
8011850: 29 62 00 4c lw r2,(r11+76)
8011854: 34 01 00 06 mvi r1,6
8011858: 44 41 00 03 be r2,r1,8011864 <memfile_check_rmnod+0x48> <== NEVER TAKEN
IMFS_memfile_remove( the_jnode );
801185c: b9 60 08 00 mv r1,r11
8011860: fb ff ff 67 calli 80115fc <IMFS_memfile_remove>
free( the_jnode );
8011864: b9 60 08 00 mv r1,r11
8011868: fb ff c4 f7 calli 8002c44 <free>
}
return 0;
}
801186c: 34 01 00 00 mvi r1,0
8011870: 2b 9d 00 04 lw ra,(sp+4)
8011874: 2b 8b 00 08 lw r11,(sp+8)
8011878: 37 9c 00 08 addi sp,sp,8
801187c: c3 a0 00 00 ret
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == the_jnode )
rtems_filesystem_current.node_access = NULL;
8011880: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED
8011884: e3 ff ff f3 bi 8011850 <memfile_check_rmnod+0x34> <== NOT EXECUTED
080114fc <memfile_free_blocks_in_table>:
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
80114fc: 37 9c ff e8 addi sp,sp,-24
8011500: 5b 8b 00 18 sw (sp+24),r11
8011504: 5b 8c 00 14 sw (sp+20),r12
8011508: 5b 8d 00 10 sw (sp+16),r13
801150c: 5b 8e 00 0c sw (sp+12),r14
8011510: 5b 8f 00 08 sw (sp+8),r15
8011514: 5b 9d 00 04 sw (sp+4),ra
8011518: b8 20 78 00 mv r15,r1
801151c: b8 40 68 00 mv r13,r2
/*
* Perform internal consistency checks
*/
assert( block_table );
8011520: 44 20 00 19 be r1,r0,8011584 <memfile_free_blocks_in_table+0x88><== NEVER TAKEN
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
8011524: 28 21 00 00 lw r1,(r1+0)
for ( i=0 ; i<entries ; i++ ) {
8011528: 4c 02 00 0c bge r0,r2,8011558 <memfile_free_blocks_in_table+0x5c><== NEVER TAKEN
801152c: 34 0c 00 00 mvi r12,0
8011530: b8 20 58 00 mv r11,r1
if ( b[i] ) {
8011534: b9 80 70 00 mv r14,r12
8011538: 29 61 00 00 lw r1,(r11+0)
801153c: 44 20 00 03 be r1,r0,8011548 <memfile_free_blocks_in_table+0x4c>
memfile_free_block( b[i] );
8011540: fb ff ff 27 calli 80111dc <memfile_free_block>
b[i] = 0;
8011544: 59 6e 00 00 sw (r11+0),r14
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
8011548: 35 8c 00 01 addi r12,r12,1
801154c: 35 6b 00 04 addi r11,r11,4
8011550: 49 ac ff fa bg r13,r12,8011538 <memfile_free_blocks_in_table+0x3c>
8011554: 29 e1 00 00 lw r1,(r15+0)
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
8011558: fb ff ff 21 calli 80111dc <memfile_free_block>
*block_table = 0;
801155c: 34 01 00 00 mvi r1,0
8011560: 59 e1 00 00 sw (r15+0),r1
}
8011564: 2b 9d 00 04 lw ra,(sp+4)
8011568: 2b 8b 00 18 lw r11,(sp+24)
801156c: 2b 8c 00 14 lw r12,(sp+20)
8011570: 2b 8d 00 10 lw r13,(sp+16)
8011574: 2b 8e 00 0c lw r14,(sp+12)
8011578: 2b 8f 00 08 lw r15,(sp+8)
801157c: 37 9c 00 18 addi sp,sp,24
8011580: c3 a0 00 00 ret
/*
* Perform internal consistency checks
*/
assert( block_table );
8011584: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8011588: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
801158c: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
8011590: 38 21 47 c0 ori r1,r1,0x47c0 <== NOT EXECUTED
8011594: 38 63 49 08 ori r3,r3,0x4908 <== NOT EXECUTED
8011598: 38 84 48 38 ori r4,r4,0x4838 <== NOT EXECUTED
801159c: 34 02 01 b3 mvi r2,435 <== NOT EXECUTED
80115a0: fb ff f1 d7 calli 800dcfc <__assert_func> <== NOT EXECUTED
08011b80 <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
8011b80: 37 9c ff f0 addi sp,sp,-16
8011b84: 5b 8b 00 08 sw (sp+8),r11
8011b88: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
8011b8c: 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 )
8011b90: 29 64 00 50 lw r4,(r11+80)
8011b94: 48 44 00 13 bg r2,r4,8011be0 <memfile_ftruncate+0x60> <== NEVER TAKEN
8011b98: 44 82 00 0f be r4,r2,8011bd4 <memfile_ftruncate+0x54> <== ALWAYS TAKEN
* 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;
8011b9c: 59 62 00 50 sw (r11+80),r2
8011ba0: 59 63 00 54 sw (r11+84),r3
iop->size = the_jnode->info.file.size;
8011ba4: 58 23 00 0c sw (r1+12),r3
8011ba8: 58 22 00 08 sw (r1+8),r2
IMFS_update_atime( the_jnode );
8011bac: 37 81 00 0c addi r1,sp,12
8011bb0: 34 02 00 00 mvi r2,0
8011bb4: fb ff c4 52 calli 8002cfc <gettimeofday>
8011bb8: 2b 81 00 0c lw r1,(sp+12)
8011bbc: 59 61 00 40 sw (r11+64),r1
8011bc0: 34 01 00 00 mvi r1,0
return 0;
}
8011bc4: 2b 9d 00 04 lw ra,(sp+4)
8011bc8: 2b 8b 00 08 lw r11,(sp+8)
8011bcc: 37 9c 00 10 addi sp,sp,16
8011bd0: c3 a0 00 00 ret
* 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 )
8011bd4: 29 64 00 54 lw r4,(r11+84)
8011bd8: 54 64 00 02 bgu r3,r4,8011be0 <memfile_ftruncate+0x60> <== NEVER TAKEN
8011bdc: e3 ff ff f0 bi 8011b9c <memfile_ftruncate+0x1c>
return IMFS_memfile_extend( the_jnode, length );
8011be0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8011be4: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
8011be8: fb ff ff 7a calli 80119d0 <IMFS_memfile_extend> <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
return 0;
}
8011bec: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8011bf0: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8011bf4: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
8011bf8: c3 a0 00 00 ret <== NOT EXECUTED
08011bfc <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
8011bfc: 37 9c ff f4 addi sp,sp,-12
8011c00: 5b 8b 00 0c sw (sp+12),r11
8011c04: 5b 8c 00 08 sw (sp+8),r12
8011c08: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
8011c0c: 28 2c 00 3c lw r12,(r1+60)
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
8011c10: b8 20 58 00 mv r11,r1
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
8011c14: 34 01 00 06 mvi r1,6
8011c18: 29 82 00 4c lw r2,(r12+76)
8011c1c: 44 41 00 11 be r2,r1,8011c60 <memfile_lseek+0x64> <== NEVER TAKEN
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
8011c20: 29 62 00 14 lw r2,(r11+20)
8011c24: b9 80 08 00 mv r1,r12
8011c28: fb ff ff 6a calli 80119d0 <IMFS_memfile_extend>
8011c2c: 5c 20 00 25 bne r1,r0,8011cc0 <memfile_lseek+0xc4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
8011c30: 29 81 00 50 lw r1,(r12+80)
8011c34: 29 62 00 14 lw r2,(r11+20)
8011c38: 29 63 00 10 lw r3,(r11+16)
8011c3c: 59 61 00 08 sw (r11+8),r1
8011c40: 29 8c 00 54 lw r12,(r12+84)
8011c44: 59 6c 00 0c sw (r11+12),r12
}
return iop->offset;
}
8011c48: b8 60 08 00 mv r1,r3
8011c4c: 2b 9d 00 04 lw ra,(sp+4)
8011c50: 2b 8b 00 0c lw r11,(sp+12)
8011c54: 2b 8c 00 08 lw r12,(sp+8)
8011c58: 37 9c 00 0c addi sp,sp,12
8011c5c: c3 a0 00 00 ret
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
8011c60: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8011c64: 29 83 00 50 lw r3,(r12+80) <== NOT EXECUTED
8011c68: 29 82 00 54 lw r2,(r12+84) <== NOT EXECUTED
8011c6c: 29 64 00 14 lw r4,(r11+20) <== NOT EXECUTED
8011c70: 48 23 00 0a bg r1,r3,8011c98 <memfile_lseek+0x9c> <== NOT EXECUTED
8011c74: 44 23 00 11 be r1,r3,8011cb8 <memfile_lseek+0xbc> <== NOT EXECUTED
8011c78: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
8011c7c: b8 80 10 00 mv r2,r4 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
8011c80: b8 60 08 00 mv r1,r3 <== NOT EXECUTED
8011c84: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8011c88: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8011c8c: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8011c90: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8011c94: c3 a0 00 00 ret <== NOT EXECUTED
8011c98: b8 60 08 00 mv r1,r3 <== NOT EXECUTED
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
8011c9c: 59 62 00 14 sw (r11+20),r2 <== NOT EXECUTED
8011ca0: 59 63 00 10 sw (r11+16),r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
8011ca4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8011ca8: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8011cac: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8011cb0: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8011cb4: c3 a0 00 00 ret <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
8011cb8: 54 82 ff f8 bgu r4,r2,8011c98 <memfile_lseek+0x9c> <== NOT EXECUTED
8011cbc: e3 ff ff ef bi 8011c78 <memfile_lseek+0x7c> <== NOT EXECUTED
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
rtems_set_errno_and_return_minus_one( ENOSPC );
8011cc0: f8 00 08 9a calli 8013f28 <__errno> <== NOT EXECUTED
8011cc4: 34 02 00 1c mvi r2,28 <== NOT EXECUTED
8011cc8: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED
8011ccc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8011cd0: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
8011cd4: e3 ff ff dd bi 8011c48 <memfile_lseek+0x4c> <== NOT EXECUTED
08011fd4 <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
8011fd4: 37 9c ff f4 addi sp,sp,-12
8011fd8: 5b 8b 00 0c sw (sp+12),r11
8011fdc: 5b 8c 00 08 sw (sp+8),r12
8011fe0: 5b 9d 00 04 sw (sp+4),ra
the_jnode = iop->file_info;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
8011fe4: 28 23 00 18 lw r3,(r1+24)
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
8011fe8: b8 20 60 00 mv r12,r1
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
8011fec: 28 2b 00 3c lw r11,(r1+60)
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
8011ff0: 34 02 00 00 mvi r2,0
8011ff4: 20 61 02 04 andi r1,r3,0x204
8011ff8: 44 22 00 04 be r1,r2,8012008 <memfile_open+0x34>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
8011ffc: 29 64 00 4c lw r4,(r11+76)
8012000: 34 01 00 06 mvi r1,6
8012004: 44 81 00 12 be r4,r1,801204c <memfile_open+0x78> <== NEVER TAKEN
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)
8012008: 29 61 00 50 lw r1,(r11+80)
801200c: 29 62 00 54 lw r2,(r11+84)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
8012010: 20 63 02 00 andi r3,r3,0x200
8012014: 5c 60 00 09 bne r3,r0,8012038 <memfile_open+0x64>
iop->offset = the_jnode->info.file.size;
iop->size = the_jnode->info.file.size;
8012018: 59 81 00 08 sw (r12+8),r1
801201c: 59 82 00 0c sw (r12+12),r2
8012020: 34 01 00 00 mvi r1,0
return 0;
}
8012024: 2b 9d 00 04 lw ra,(sp+4)
8012028: 2b 8b 00 0c lw r11,(sp+12)
801202c: 2b 8c 00 08 lw r12,(sp+8)
8012030: 37 9c 00 0c addi sp,sp,12
8012034: c3 a0 00 00 ret
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = the_jnode->info.file.size;
8012038: 59 81 00 10 sw (r12+16),r1
801203c: 59 82 00 14 sw (r12+20),r2
8012040: 29 62 00 54 lw r2,(r11+84)
8012044: 29 61 00 50 lw r1,(r11+80)
8012048: e3 ff ff f4 bi 8012018 <memfile_open+0x44>
/*
* 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;
801204c: 29 61 00 54 lw r1,(r11+84) <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
8012050: 34 03 00 05 mvi r3,5 <== NOT EXECUTED
8012054: 59 63 00 4c sw (r11+76),r3 <== NOT EXECUTED
the_jnode->info.file.size = 0;
8012058: 59 62 00 50 sw (r11+80),r2 <== NOT EXECUTED
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
801205c: 29 63 00 58 lw r3,(r11+88) <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
8012060: 59 62 00 54 sw (r11+84),r2 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
8012064: 59 62 00 5c sw (r11+92),r2 <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
8012068: 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;
801206c: 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)
8012070: 5c 20 00 04 bne r1,r0,8012080 <memfile_open+0xac> <== NOT EXECUTED
8012074: 29 83 00 18 lw r3,(r12+24) <== NOT EXECUTED
8012078: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
801207c: e3 ff ff e5 bi 8012010 <memfile_open+0x3c> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
8012080: b8 20 20 00 mv r4,r1 <== NOT EXECUTED
8012084: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8012088: fb ff ff 14 calli 8011cd8 <IMFS_memfile_write> <== NOT EXECUTED
801208c: 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)
8012090: 34 03 ff ff mvi r3,-1 <== NOT EXECUTED
8012094: 44 43 ff e4 be r2,r3,8012024 <memfile_open+0x50> <== NOT EXECUTED
8012098: 29 83 00 18 lw r3,(r12+24) <== NOT EXECUTED
801209c: e3 ff ff db bi 8012008 <memfile_open+0x34> <== NOT EXECUTED
08011888 <memfile_rmnod>:
int memfile_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
8011888: 37 9c ff f0 addi sp,sp,-16
801188c: 5b 8b 00 08 sw (sp+8),r11
8011890: 5b 9d 00 04 sw (sp+4),ra
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
8011894: 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 ) {
8011898: 29 61 00 08 lw r1,(r11+8)
801189c: 44 20 00 05 be r1,r0,80118b0 <memfile_rmnod+0x28> <== NEVER TAKEN
80118a0: b9 60 08 00 mv r1,r11
80118a4: fb ff ce c3 calli 80053b0 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
80118a8: 34 01 00 00 mvi r1,0
80118ac: 59 61 00 08 sw (r11+8),r1
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
80118b0: 2d 63 00 34 lhu r3,(r11+52)
IMFS_update_ctime( the_jnode );
80118b4: 34 02 00 00 mvi r2,0
80118b8: 37 81 00 0c addi r1,sp,12
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
80118bc: 34 63 ff ff addi r3,r3,-1
80118c0: 0d 63 00 34 sh (r11+52),r3
IMFS_update_ctime( the_jnode );
80118c4: fb ff c5 0e calli 8002cfc <gettimeofday>
80118c8: 2b 81 00 0c lw r1,(sp+12)
80118cc: 59 61 00 48 sw (r11+72),r1
return memfile_check_rmnod( the_jnode );
80118d0: b9 60 08 00 mv r1,r11
80118d4: fb ff ff d2 calli 801181c <memfile_check_rmnod>
}
80118d8: 2b 9d 00 04 lw ra,(sp+4)
80118dc: 2b 8b 00 08 lw r11,(sp+8)
80118e0: 37 9c 00 10 addi sp,sp,16
80118e4: c3 a0 00 00 ret
08001208 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
8001208: 37 9c ff d0 addi sp,sp,-48
800120c: 5b 8b 00 18 sw (sp+24),r11
8001210: 5b 8c 00 14 sw (sp+20),r12
8001214: 5b 8d 00 10 sw (sp+16),r13
8001218: 5b 8e 00 0c sw (sp+12),r14
800121c: 5b 8f 00 08 sw (sp+8),r15
8001220: 5b 9d 00 04 sw (sp+4),ra
8001224: 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) ) )
8001228: 20 42 f0 00 andi r2,r2,0xf000
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
800122c: b8 60 78 00 mv r15,r3
8001230: b8 80 70 00 mv r14,r4
rtems_filesystem_location_info_t temp_loc;
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
8001234: 44 40 00 4d be r2,r0,8001368 <mknod+0x160> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
8001238: 40 25 00 00 lbu r5,(r1+0)
800123c: 64 a6 00 5c cmpei r6,r5,92
8001240: 64 a2 00 2f cmpei r2,r5,47
8001244: b8 c2 30 00 or r6,r6,r2
8001248: 44 c0 00 32 be r6,r0,8001310 <mknod+0x108>
800124c: 78 05 08 01 mvhi r5,0x801
8001250: 38 a5 e1 10 ori r5,r5,0xe110
8001254: 28 a5 00 00 lw r5,(r5+0)
8001258: 34 06 00 01 mvi r6,1
800125c: 28 a2 00 18 lw r2,(r5+24)
8001260: 5b 82 00 1c sw (sp+28),r2
8001264: 28 a3 00 1c lw r3,(r5+28)
8001268: 5b 83 00 20 sw (sp+32),r3
800126c: 28 a2 00 20 lw r2,(r5+32)
8001270: 5b 82 00 24 sw (sp+36),r2
8001274: 28 a3 00 24 lw r3,(r5+36)
8001278: 5b 83 00 28 sw (sp+40),r3
800127c: 28 a5 00 28 lw r5,(r5+40)
if ( !temp_loc.ops->evalformake_h ) {
8001280: 2b 82 00 28 lw r2,(sp+40)
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
rtems_set_errno_and_return_minus_one( EINVAL );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
8001284: 5b 85 00 2c sw (sp+44),r5
if ( !temp_loc.ops->evalformake_h ) {
8001288: 28 45 00 04 lw r5,(r2+4)
800128c: 44 a0 00 32 be r5,r0,8001354 <mknod+0x14c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->evalformake_h)(
8001290: 37 8c 00 1c addi r12,sp,28
8001294: b4 26 08 00 add r1,r1,r6
8001298: b9 80 10 00 mv r2,r12
800129c: 37 83 00 30 addi r3,sp,48
80012a0: d8 a0 00 00 call r5
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
80012a4: 34 0b ff ff mvi r11,-1
80012a8: 5c 20 00 11 bne r1,r0,80012ec <mknod+0xe4>
return -1;
if ( !temp_loc.ops->mknod_h ) {
80012ac: 2b 82 00 28 lw r2,(sp+40)
80012b0: 28 46 00 14 lw r6,(r2+20)
80012b4: 44 c1 00 32 be r6,r1,800137c <mknod+0x174> <== NEVER TAKEN
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
80012b8: 2b 81 00 30 lw r1,(sp+48)
80012bc: b9 a0 10 00 mv r2,r13
80012c0: b9 e0 18 00 mv r3,r15
80012c4: b9 c0 20 00 mv r4,r14
80012c8: b9 80 28 00 mv r5,r12
80012cc: d8 c0 00 00 call r6
80012d0: b8 20 58 00 mv r11,r1
rtems_filesystem_freenode( &temp_loc );
80012d4: 2b 81 00 28 lw r1,(sp+40)
80012d8: 44 20 00 05 be r1,r0,80012ec <mknod+0xe4> <== NEVER TAKEN
80012dc: 28 22 00 1c lw r2,(r1+28)
80012e0: 44 40 00 03 be r2,r0,80012ec <mknod+0xe4>
80012e4: b9 80 08 00 mv r1,r12
80012e8: d8 40 00 00 call r2
return result;
}
80012ec: b9 60 08 00 mv r1,r11
80012f0: 2b 9d 00 04 lw ra,(sp+4)
80012f4: 2b 8b 00 18 lw r11,(sp+24)
80012f8: 2b 8c 00 14 lw r12,(sp+20)
80012fc: 2b 8d 00 10 lw r13,(sp+16)
8001300: 2b 8e 00 0c lw r14,(sp+12)
8001304: 2b 8f 00 08 lw r15,(sp+8)
8001308: 37 9c 00 30 addi sp,sp,48
800130c: c3 a0 00 00 ret
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
rtems_set_errno_and_return_minus_one( EINVAL );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
8001310: 44 a6 ff cf be r5,r6,800124c <mknod+0x44> <== NEVER TAKEN
8001314: 78 02 08 01 mvhi r2,0x801
8001318: 38 42 e1 10 ori r2,r2,0xe110
800131c: 28 42 00 00 lw r2,(r2+0)
8001320: 28 43 00 04 lw r3,(r2+4)
8001324: 5b 83 00 1c sw (sp+28),r3
8001328: 28 43 00 08 lw r3,(r2+8)
800132c: 5b 83 00 20 sw (sp+32),r3
8001330: 28 43 00 0c lw r3,(r2+12)
8001334: 5b 83 00 24 sw (sp+36),r3
8001338: 28 43 00 10 lw r3,(r2+16)
800133c: 5b 83 00 28 sw (sp+40),r3
8001340: 28 42 00 14 lw r2,(r2+20)
8001344: 5b 82 00 2c sw (sp+44),r2
if ( !temp_loc.ops->evalformake_h ) {
8001348: 2b 82 00 28 lw r2,(sp+40)
800134c: 28 45 00 04 lw r5,(r2+4)
8001350: 5c a0 ff d0 bne r5,r0,8001290 <mknod+0x88> <== ALWAYS TAKEN
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
8001354: f8 00 30 0c calli 800d384 <__errno> <== NOT EXECUTED
8001358: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
800135c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8001360: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
8001364: e3 ff ff e2 bi 80012ec <mknod+0xe4> <== NOT EXECUTED
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
rtems_set_errno_and_return_minus_one( EINVAL );
8001368: f8 00 30 07 calli 800d384 <__errno> <== NOT EXECUTED
800136c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8001370: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8001374: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
8001378: e3 ff ff dd bi 80012ec <mknod+0xe4> <== NOT EXECUTED
);
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
800137c: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED
8001380: 44 46 ff f5 be r2,r6,8001354 <mknod+0x14c> <== NOT EXECUTED
8001384: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8001388: d8 40 00 00 call r2 <== NOT EXECUTED
800138c: e3 ff ff f2 bi 8001354 <mknod+0x14c> <== NOT EXECUTED
080013b0 <mount>:
const rtems_filesystem_operations_table *fs_ops,
rtems_filesystem_options_t options,
const char *device,
const char *mount_point
)
{
80013b0: 37 9c ff cc addi sp,sp,-52
80013b4: 5b 8b 00 20 sw (sp+32),r11
80013b8: 5b 8c 00 1c sw (sp+28),r12
80013bc: 5b 8d 00 18 sw (sp+24),r13
80013c0: 5b 8e 00 14 sw (sp+20),r14
80013c4: 5b 8f 00 10 sw (sp+16),r15
80013c8: 5b 90 00 0c sw (sp+12),r16
80013cc: 5b 91 00 08 sw (sp+8),r17
80013d0: 5b 9d 00 04 sw (sp+4),ra
80013d4: b8 40 70 00 mv r14,r2
80013d8: b8 20 78 00 mv r15,r1
80013dc: b8 60 80 00 mv r16,r3
80013e0: b8 80 68 00 mv r13,r4
80013e4: b8 a0 60 00 mv r12,r5
/*
* Is there a file system operations table?
*/
if ( fs_ops == NULL ) {
80013e8: 44 40 00 03 be r2,r0,80013f4 <mount+0x44>
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
80013ec: 34 01 00 01 mvi r1,1
80013f0: 50 23 00 06 bgeu r1,r3,8001408 <mount+0x58>
options != RTEMS_FILESYSTEM_READ_WRITE ) {
errno = EINVAL;
80013f4: f8 00 2f e4 calli 800d384 <__errno>
80013f8: 34 02 00 16 mvi r2,22
80013fc: 58 22 00 00 sw (r1+0),r2
8001400: 34 02 ff ff mvi r2,-1
return -1;
8001404: e0 00 00 4e bi 800153c <mount+0x18c>
}
/* Do they support being mounted at all ? */
if ( !fs_ops->fsmount_me_h ) {
8001408: 28 4b 00 24 lw r11,(r2+36)
800140c: 45 60 00 85 be r11,r0,8001620 <mount+0x270> <== NEVER TAKEN
/*
* Allocate a mount table entry
*/
size = sizeof(rtems_filesystem_mount_table_entry_t);
if ( device )
8001410: 34 01 00 6c mvi r1,108
8001414: 44 80 00 04 be r4,r0,8001424 <mount+0x74> <== ALWAYS TAKEN
size += strlen( device ) + 1;
8001418: b8 80 08 00 mv r1,r4 <== NOT EXECUTED
800141c: f8 00 34 aa calli 800e6c4 <strlen> <== NOT EXECUTED
8001420: 34 21 00 6d addi r1,r1,109 <== NOT EXECUTED
temp_mt_entry = malloc( size );
8001424: f8 00 1b 0c calli 8008054 <malloc>
8001428: b8 20 58 00 mv r11,r1
800142c: b8 20 88 00 mv r17,r1
if ( !temp_mt_entry ) {
8001430: 44 20 00 84 be r1,r0,8001640 <mount+0x290> <== NEVER TAKEN
errno = ENOMEM;
return -1;
}
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
temp_mt_entry->options = options;
8001434: 58 30 00 30 sw (r1+48),r16
if ( !temp_mt_entry ) {
errno = ENOMEM;
return -1;
}
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
8001438: 59 61 00 2c sw (r11+44),r1
temp_mt_entry->options = options;
if ( device ) {
800143c: 45 a0 00 59 be r13,r0,80015a0 <mount+0x1f0> <== ALWAYS TAKEN
temp_mt_entry->dev =
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
8001440: 34 23 00 6c addi r3,r1,108 <== NOT EXECUTED
strcpy( temp_mt_entry->dev, device );
8001444: b8 60 08 00 mv r1,r3 <== NOT EXECUTED
8001448: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED
}
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
temp_mt_entry->options = options;
if ( device ) {
temp_mt_entry->dev =
800144c: 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 );
8001450: f8 00 34 7b calli 800e63c <strcpy> <== NOT EXECUTED
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( mount_point ) {
8001454: 45 80 00 55 be r12,r0,80015a8 <mount+0x1f8> <== NOT EXECUTED
if ( rtems_filesystem_evaluate_path(
mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
8001458: b9 80 08 00 mv r1,r12
800145c: f8 00 34 9a calli 800e6c4 <strlen>
* permissions in the existing tree.
*/
if ( mount_point ) {
if ( rtems_filesystem_evaluate_path(
8001460: 37 8d 00 24 addi r13,sp,36
mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
8001464: b8 20 10 00 mv r2,r1
* permissions in the existing tree.
*/
if ( mount_point ) {
if ( rtems_filesystem_evaluate_path(
8001468: 34 03 00 07 mvi r3,7
800146c: b9 80 08 00 mv r1,r12
8001470: b9 a0 20 00 mv r4,r13
8001474: 34 05 00 01 mvi r5,1
8001478: fb ff fe a6 calli 8000f10 <rtems_filesystem_evaluate_path>
800147c: 34 02 ff ff mvi r2,-1
8001480: 44 22 00 6c be r1,r2,8001630 <mount+0x280> <== NEVER TAKEN
/*
* Test for node_type_h
*/
if (!loc.ops->node_type_h) {
8001484: 2b 81 00 30 lw r1,(sp+48)
8001488: 28 22 00 10 lw r2,(r1+16)
800148c: 44 40 00 37 be r2,r0,8001568 <mount+0x1b8> <== NEVER TAKEN
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
8001490: b9 a0 08 00 mv r1,r13
8001494: d8 40 00 00 call r2
8001498: 34 02 00 01 mvi r2,1
800149c: 5c 22 00 5d bne r1,r2,8001610 <mount+0x260>
/*
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
80014a0: 78 06 08 01 mvhi r6,0x801
80014a4: 38 c6 e7 58 ori r6,r6,0xe758
80014a8: 28 c3 00 00 lw r3,(r6+0)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
80014ac: 34 c6 00 04 addi r6,r6,4
80014b0: 44 66 00 56 be r3,r6,8001608 <mount+0x258> <== NEVER TAKEN
!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 )
80014b4: 2b 85 00 24 lw r5,(sp+36)
80014b8: 28 61 00 1c lw r1,(r3+28)
80014bc: 5c 25 00 04 bne r1,r5,80014cc <mount+0x11c> <== ALWAYS TAKEN
80014c0: e0 00 00 34 bi 8001590 <mount+0x1e0> <== NOT EXECUTED
80014c4: 28 67 00 1c lw r7,(r3+28)
80014c8: 44 e5 00 32 be r7,r5,8001590 <mount+0x1e0>
* 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 ) {
80014cc: 28 63 00 00 lw r3,(r3+0)
/*
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
80014d0: 5c 66 ff fd bne r3,r6,80014c4 <mount+0x114>
* 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;
80014d4: 2b 82 00 2c lw r2,(sp+44)
temp_mt_entry->mt_point_node.ops = loc.ops;
80014d8: 2b 81 00 30 lw r1,(sp+48)
* may have been allocated in loc should not be sent to freenode
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
temp_mt_entry->mt_point_node.node_access = loc.node_access;
80014dc: 59 65 00 08 sw (r11+8),r5
temp_mt_entry->mt_point_node.handlers = loc.handlers;
80014e0: 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;
80014e4: 2b 82 00 34 lw r2,(sp+52)
* traverse the tree.
*/
temp_mt_entry->mt_point_node.node_access = loc.node_access;
temp_mt_entry->mt_point_node.handlers = loc.handlers;
temp_mt_entry->mt_point_node.ops = loc.ops;
80014e8: 59 61 00 14 sw (r11+20),r1
temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
80014ec: 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 ){
80014f0: 28 22 00 20 lw r2,(r1+32)
80014f4: 44 40 00 1d be r2,r0,8001568 <mount+0x1b8> <== NEVER TAKEN
errno = ENOTSUP;
goto cleanup_and_bail;
}
if ( loc.ops->mount_h( temp_mt_entry ) ) {
80014f8: b9 60 08 00 mv r1,r11
80014fc: d8 40 00 00 call r2
8001500: b9 a0 60 00 mv r12,r13
8001504: 5c 20 00 1c bne r1,r0,8001574 <mount+0x1c4> <== NEVER TAKEN
temp_mt_entry->mt_point_node.handlers = NULL;
temp_mt_entry->mt_point_node.ops = NULL;
temp_mt_entry->mt_point_node.mt_entry = NULL;
}
if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) {
8001508: 29 c2 00 24 lw r2,(r14+36)
800150c: b9 60 08 00 mv r1,r11
8001510: d8 40 00 00 call r2
8001514: b8 20 68 00 mv r13,r1
8001518: 5c 20 00 2c bne r1,r0,80015c8 <mount+0x218> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
800151c: 78 01 08 01 mvhi r1,0x801
8001520: b9 60 10 00 mv r2,r11
8001524: 38 21 e7 58 ori r1,r1,0xe758
8001528: f8 00 06 31 calli 8002dec <_Chain_Append>
*/
rtems_chain_append( &rtems_filesystem_mount_table_control,
&temp_mt_entry->Node );
if ( mt_entry )
800152c: b9 e0 10 00 mv r2,r15
8001530: 45 ed 00 03 be r15,r13,800153c <mount+0x18c> <== NEVER TAKEN
*mt_entry = temp_mt_entry;
8001534: 59 eb 00 00 sw (r15+0),r11
8001538: b9 a0 10 00 mv r2,r13
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
800153c: b8 40 08 00 mv r1,r2
8001540: 2b 9d 00 04 lw ra,(sp+4)
8001544: 2b 8b 00 20 lw r11,(sp+32)
8001548: 2b 8c 00 1c lw r12,(sp+28)
800154c: 2b 8d 00 18 lw r13,(sp+24)
8001550: 2b 8e 00 14 lw r14,(sp+20)
8001554: 2b 8f 00 10 lw r15,(sp+16)
8001558: 2b 90 00 0c lw r16,(sp+12)
800155c: 2b 91 00 08 lw r17,(sp+8)
8001560: 37 9c 00 34 addi sp,sp,52
8001564: c3 a0 00 00 ret
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
errno = ENOTSUP;
8001568: f8 00 2f 87 calli 800d384 <__errno> <== NOT EXECUTED
800156c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8001570: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( temp_mt_entry );
8001574: b9 60 08 00 mv r1,r11
8001578: f8 00 18 f5 calli 800794c <free>
800157c: b9 a0 60 00 mv r12,r13
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
8001580: 29 81 00 0c lw r1,(r12+12)
8001584: 5c 20 00 1b bne r1,r0,80015f0 <mount+0x240> <== ALWAYS TAKEN
8001588: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
800158c: e3 ff ff ec bi 800153c <mount+0x18c> <== NOT EXECUTED
/*
* You can only mount one file system onto a single mount point.
*/
if ( Is_node_fs_root( &loc ) ){
errno = EBUSY;
8001590: f8 00 2f 7d calli 800d384 <__errno>
8001594: 34 02 00 10 mvi r2,16
8001598: 58 22 00 00 sw (r1+0),r2
goto cleanup_and_bail;
800159c: e3 ff ff f6 bi 8001574 <mount+0x1c4>
if ( device ) {
temp_mt_entry->dev =
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
strcpy( temp_mt_entry->dev, device );
} else
temp_mt_entry->dev = 0;
80015a0: 58 2d 00 68 sw (r1+104),r13
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( mount_point ) {
80015a4: 5d 80 ff ad bne r12,r0,8001458 <mount+0xa8>
* 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;
80015a8: 59 6c 00 1c sw (r11+28),r12
temp_mt_entry->mt_fs_root.handlers = NULL;
80015ac: 59 6c 00 24 sw (r11+36),r12
temp_mt_entry->mt_fs_root.ops = NULL;
80015b0: 59 6c 00 28 sw (r11+40),r12
temp_mt_entry->mt_point_node.node_access = NULL;
80015b4: 59 6c 00 08 sw (r11+8),r12
temp_mt_entry->mt_point_node.handlers = NULL;
80015b8: 59 6c 00 10 sw (r11+16),r12
temp_mt_entry->mt_point_node.ops = NULL;
80015bc: 59 6c 00 14 sw (r11+20),r12
temp_mt_entry->mt_point_node.mt_entry = NULL;
80015c0: 59 6c 00 18 sw (r11+24),r12
80015c4: e3 ff ff d1 bi 8001508 <mount+0x158>
}
if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) {
/* try to undo the mount operation */
if ( loc.ops->unmount_h ) {
80015c8: 2b 81 00 30 lw r1,(sp+48) <== NOT EXECUTED
80015cc: 28 22 00 28 lw r2,(r1+40) <== NOT EXECUTED
80015d0: 44 40 00 03 be r2,r0,80015dc <mount+0x22c> <== NOT EXECUTED
loc.ops->unmount_h( temp_mt_entry );
80015d4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80015d8: d8 40 00 00 call r2 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( temp_mt_entry );
80015dc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80015e0: f8 00 18 db calli 800794c <free> <== NOT EXECUTED
if ( loc_to_free )
80015e4: 5d 80 ff e7 bne r12,r0,8001580 <mount+0x1d0> <== NOT EXECUTED
rtems_filesystem_freenode( loc_to_free );
80015e8: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
80015ec: e3 ff ff d4 bi 800153c <mount+0x18c> <== NOT EXECUTED
80015f0: 28 22 00 1c lw r2,(r1+28)
80015f4: 44 40 ff e5 be r2,r0,8001588 <mount+0x1d8> <== NEVER TAKEN
80015f8: b9 80 08 00 mv r1,r12
80015fc: d8 40 00 00 call r2
8001600: 34 02 ff ff mvi r2,-1
8001604: e3 ff ff ce bi 800153c <mount+0x18c>
8001608: 2b 85 00 24 lw r5,(sp+36) <== NOT EXECUTED
800160c: e3 ff ff b2 bi 80014d4 <mount+0x124> <== NOT EXECUTED
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
8001610: f8 00 2f 5d calli 800d384 <__errno>
8001614: 34 02 00 14 mvi r2,20
8001618: 58 22 00 00 sw (r1+0),r2
goto cleanup_and_bail;
800161c: e3 ff ff d6 bi 8001574 <mount+0x1c4>
return -1;
}
/* Do they support being mounted at all ? */
if ( !fs_ops->fsmount_me_h ) {
errno = ENOTSUP;
8001620: f8 00 2f 59 calli 800d384 <__errno> <== NOT EXECUTED
8001624: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8001628: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800162c: b9 60 88 00 mv r17,r11 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( temp_mt_entry );
8001630: ba 20 08 00 mv r1,r17 <== NOT EXECUTED
8001634: f8 00 18 c6 calli 800794c <free> <== NOT EXECUTED
8001638: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
800163c: e3 ff ff c0 bi 800153c <mount+0x18c> <== NOT EXECUTED
if ( device )
size += strlen( device ) + 1;
temp_mt_entry = malloc( size );
if ( !temp_mt_entry ) {
errno = ENOMEM;
8001640: f8 00 2f 51 calli 800d384 <__errno> <== NOT EXECUTED
8001644: 34 02 00 0c mvi r2,12 <== NOT EXECUTED
8001648: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800164c: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
return -1;
8001650: e3 ff ff bb bi 800153c <mount+0x18c> <== NOT EXECUTED
080089d8 <mq_open>:
int oflag,
...
/* mode_t mode, */
/* struct mq_attr attr */
)
{
80089d8: 37 9c ff bc addi sp,sp,-68
80089dc: 5b 8b 00 1c sw (sp+28),r11
80089e0: 5b 8c 00 18 sw (sp+24),r12
80089e4: 5b 8d 00 14 sw (sp+20),r13
80089e8: 5b 8e 00 10 sw (sp+16),r14
80089ec: 5b 8f 00 0c sw (sp+12),r15
80089f0: 5b 90 00 08 sw (sp+8),r16
80089f4: 5b 9d 00 04 sw (sp+4),ra
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
80089f8: 78 09 08 02 mvhi r9,0x802
80089fc: 39 29 9d b4 ori r9,r9,0x9db4
8008a00: 29 2a 00 00 lw r10,(r9+0)
8008a04: 5b 83 00 30 sw (sp+48),r3
8008a08: 5b 84 00 34 sw (sp+52),r4
8008a0c: 35 43 00 01 addi r3,r10,1
8008a10: 59 23 00 00 sw (r9+0),r3
8008a14: 5b 85 00 38 sw (sp+56),r5
8008a18: 5b 86 00 3c sw (sp+60),r6
8008a1c: 5b 87 00 40 sw (sp+64),r7
8008a20: 5b 88 00 44 sw (sp+68),r8
8008a24: b8 20 78 00 mv r15,r1
8008a28: 5b 82 00 2c sw (sp+44),r2
8008a2c: b8 40 68 00 mv r13,r2
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
8008a30: 20 4c 02 00 andi r12,r2,0x200
8008a34: b9 80 80 00 mv r16,r12
8008a38: 5d 80 00 3a bne r12,r0,8008b20 <mq_open+0x148>
*/
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *
_POSIX_Message_queue_Allocate_fd( void )
{
return (POSIX_Message_queue_Control_fd *)
8008a3c: 78 01 08 02 mvhi r1,0x802
8008a40: 38 21 a2 40 ori r1,r1,0xa240
8008a44: f8 00 0b 7b calli 800b830 <_Objects_Allocate>
8008a48: b8 20 58 00 mv r11,r1
attr = (struct mq_attr *) va_arg( arg, struct mq_attr * );
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
8008a4c: 44 20 00 3b be r1,r0,8008b38 <mq_open+0x160> <== NEVER TAKEN
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq_fd->oflag = oflag;
8008a50: 58 2d 00 14 sw (r1+20),r13
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
8008a54: 37 82 00 28 addi r2,sp,40
8008a58: b9 e0 08 00 mv r1,r15
8008a5c: f8 00 1f 30 calli 801071c <_POSIX_Message_queue_Name_to_id>
8008a60: b8 20 70 00 mv r14,r1
* If the name to id translation worked, then the message queue exists
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "message queue does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
8008a64: 5c 20 00 24 bne r1,r0,8008af4 <mq_open+0x11c>
} else { /* name -> ID translation succeeded */
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
8008a68: 21 ad 0a 00 andi r13,r13,0xa00
8008a6c: 34 01 0a 00 mvi r1,2560
8008a70: 45 a1 00 38 be r13,r1,8008b50 <mq_open+0x178>
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control *)
8008a74: 2b 82 00 28 lw r2,(sp+40)
8008a78: 78 01 08 02 mvhi r1,0x802
8008a7c: 37 83 00 20 addi r3,sp,32
8008a80: 38 21 a0 b4 ori r1,r1,0xa0b4
8008a84: f8 00 0c ef calli 800be40 <_Objects_Get>
/*
* In this case we need to do an ID->pointer conversion to
* check the mode.
*/
the_mq = _POSIX_Message_queue_Get( the_mq_id, &location );
the_mq->open_count += 1;
8008a88: 28 23 00 18 lw r3,(r1+24)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8008a8c: 78 02 08 02 mvhi r2,0x802
8008a90: 38 42 a2 40 ori r2,r2,0xa240
8008a94: 34 63 00 01 addi r3,r3,1
8008a98: 58 23 00 18 sw (r1+24),r3
8008a9c: 29 63 00 08 lw r3,(r11+8)
8008aa0: 28 4c 00 1c lw r12,(r2+28)
/*
* In this case we need to do an ID->pointer conversion to
* check the mode.
*/
the_mq = _POSIX_Message_queue_Get( the_mq_id, &location );
8008aa4: 5b 81 00 24 sw (sp+36),r1
8008aa8: 34 02 00 02 mvi r2,2
the_mq->open_count += 1;
the_mq_fd->Queue = the_mq;
8008aac: 59 61 00 10 sw (r11+16),r1
8008ab0: 20 61 ff ff andi r1,r3,0xffff
8008ab4: fb ff f6 e0 calli 8006634 <__ashlsi3>
8008ab8: b5 81 08 00 add r1,r12,r1
8008abc: 58 2b 00 00 sw (r1+0),r11
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
8008ac0: 59 6e 00 0c sw (r11+12),r14
_Objects_Open_string(
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
8008ac4: f8 00 0f 97 calli 800c920 <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
8008ac8: f8 00 0f 96 calli 800c920 <_Thread_Enable_dispatch>
return (mqd_t)the_mq_fd->Object.id;
8008acc: 29 61 00 08 lw r1,(r11+8)
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
8008ad0: 2b 9d 00 04 lw ra,(sp+4)
8008ad4: 2b 8b 00 1c lw r11,(sp+28)
8008ad8: 2b 8c 00 18 lw r12,(sp+24)
8008adc: 2b 8d 00 14 lw r13,(sp+20)
8008ae0: 2b 8e 00 10 lw r14,(sp+16)
8008ae4: 2b 8f 00 0c lw r15,(sp+12)
8008ae8: 2b 90 00 08 lw r16,(sp+8)
8008aec: 37 9c 00 44 addi sp,sp,68
8008af0: c3 a0 00 00 ret
if ( status ) {
/*
* 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) ) ) {
8008af4: 34 01 00 02 mvi r1,2
8008af8: 45 c1 00 20 be r14,r1,8008b78 <mq_open+0x1a0>
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd (
POSIX_Message_queue_Control_fd *the_mq_fd
)
{
_Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
8008afc: 78 01 08 02 mvhi r1,0x802
8008b00: 38 21 a2 40 ori r1,r1,0xa240
8008b04: b9 60 10 00 mv r2,r11
8008b08: f8 00 0c 6f calli 800bcc4 <_Objects_Free>
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
8008b0c: f8 00 0f 85 calli 800c920 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
8008b10: f8 00 32 c6 calli 8015628 <__errno>
8008b14: 58 2e 00 00 sw (r1+0),r14
8008b18: 34 01 ff ff mvi r1,-1
8008b1c: e3 ff ff ed bi 8008ad0 <mq_open+0xf8>
*/
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *
_POSIX_Message_queue_Allocate_fd( void )
{
return (POSIX_Message_queue_Control_fd *)
8008b20: 78 01 08 02 mvhi r1,0x802
8008b24: 38 21 a2 40 ori r1,r1,0xa240
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
mode = (mode_t) va_arg( arg, unsigned int );
attr = (struct mq_attr *) va_arg( arg, struct mq_attr * );
8008b28: 2b 90 00 34 lw r16,(sp+52)
8008b2c: f8 00 0b 41 calli 800b830 <_Objects_Allocate>
8008b30: b8 20 58 00 mv r11,r1
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
8008b34: 5c 20 ff c7 bne r1,r0,8008a50 <mq_open+0x78>
_Thread_Enable_dispatch();
8008b38: f8 00 0f 7a calli 800c920 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENFILE );
8008b3c: f8 00 32 bb calli 8015628 <__errno>
8008b40: 34 02 00 17 mvi r2,23
8008b44: 58 22 00 00 sw (r1+0),r2
8008b48: 34 01 ff ff mvi r1,-1
8008b4c: e3 ff ff e1 bi 8008ad0 <mq_open+0xf8>
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd (
POSIX_Message_queue_Control_fd *the_mq_fd
)
{
_Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
8008b50: 78 01 08 02 mvhi r1,0x802
8008b54: b9 60 10 00 mv r2,r11
8008b58: 38 21 a2 40 ori r1,r1,0xa240
8008b5c: f8 00 0c 5a calli 800bcc4 <_Objects_Free>
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
8008b60: f8 00 0f 70 calli 800c920 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
8008b64: f8 00 32 b1 calli 8015628 <__errno>
8008b68: 34 02 00 11 mvi r2,17
8008b6c: 58 22 00 00 sw (r1+0),r2
8008b70: 34 01 ff ff mvi r1,-1
8008b74: e3 ff ff d7 bi 8008ad0 <mq_open+0xf8>
if ( status ) {
/*
* 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) ) ) {
8008b78: 45 80 ff e1 be r12,r0,8008afc <mq_open+0x124>
/*
* At this point, the message queue does not exist and everything has been
* checked. We should go ahead and create a message queue.
*/
status = _POSIX_Message_queue_Create_support(
8008b7c: b9 e0 08 00 mv r1,r15
8008b80: ba 00 18 00 mv r3,r16
8008b84: 34 02 00 01 mvi r2,1
8008b88: 37 84 00 24 addi r4,sp,36
8008b8c: f8 00 1e 72 calli 8010554 <_POSIX_Message_queue_Create_support>
8008b90: b8 20 60 00 mv r12,r1
);
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
8008b94: 34 01 ff ff mvi r1,-1
8008b98: 45 81 00 11 be r12,r1,8008bdc <mq_open+0x204>
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
return (mqd_t) -1;
}
the_mq_fd->Queue = the_mq;
8008b9c: 2b 83 00 24 lw r3,(sp+36)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8008ba0: 29 61 00 08 lw r1,(r11+8)
8008ba4: 78 02 08 02 mvhi r2,0x802
8008ba8: 38 42 a2 40 ori r2,r2,0xa240
8008bac: 28 4c 00 1c lw r12,(r2+28)
8008bb0: 59 63 00 10 sw (r11+16),r3
8008bb4: b9 c0 10 00 mv r2,r14
8008bb8: 20 21 ff ff andi r1,r1,0xffff
8008bbc: fb ff f6 9e calli 8006634 <__ashlsi3>
8008bc0: b5 81 08 00 add r1,r12,r1
8008bc4: 58 2b 00 00 sw (r1+0),r11
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
8008bc8: 34 01 00 00 mvi r1,0
8008bcc: 59 61 00 0c sw (r11+12),r1
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
8008bd0: f8 00 0f 54 calli 800c920 <_Thread_Enable_dispatch>
return (mqd_t) the_mq_fd->Object.id;
8008bd4: 29 61 00 08 lw r1,(r11+8)
8008bd8: e3 ff ff be bi 8008ad0 <mq_open+0xf8>
8008bdc: 78 01 08 02 mvhi r1,0x802
8008be0: 38 21 a2 40 ori r1,r1,0xa240
8008be4: b9 60 10 00 mv r2,r11
8008be8: f8 00 0c 37 calli 800bcc4 <_Objects_Free>
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
8008bec: f8 00 0f 4d calli 800c920 <_Thread_Enable_dispatch>
8008bf0: b9 80 08 00 mv r1,r12
return (mqd_t) -1;
8008bf4: e3 ff ff b7 bi 8008ad0 <mq_open+0xf8>
0801c938 <nanosleep>:
int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp
)
{
801c938: 37 9c ff ec addi sp,sp,-20
801c93c: 5b 8b 00 14 sw (sp+20),r11
801c940: 5b 8c 00 10 sw (sp+16),r12
801c944: 5b 8d 00 0c sw (sp+12),r13
801c948: 5b 8e 00 08 sw (sp+8),r14
801c94c: 5b 9d 00 04 sw (sp+4),ra
Watchdog_Interval ticks;
if ( !_Timespec_Is_valid( rqtp ) )
801c950: 34 0e 00 00 mvi r14,0
int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp
)
{
801c954: b8 40 68 00 mv r13,r2
801c958: b8 20 58 00 mv r11,r1
Watchdog_Interval ticks;
if ( !_Timespec_Is_valid( rqtp ) )
801c95c: f8 00 00 b3 calli 801cc28 <_Timespec_Is_valid>
801c960: 44 2e 00 05 be r1,r14,801c974 <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 )
801c964: 29 61 00 00 lw r1,(r11+0)
801c968: 48 01 00 03 bg r0,r1,801c974 <nanosleep+0x3c> <== NEVER TAKEN
801c96c: 29 61 00 04 lw r1,(r11+4)
801c970: 4c 20 00 06 bge r1,r0,801c988 <nanosleep+0x50> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
801c974: fb ff c3 e8 calli 800d914 <__errno>
801c978: 34 02 00 16 mvi r2,22
801c97c: 58 22 00 00 sw (r1+0),r2
801c980: 34 01 ff ff mvi r1,-1
801c984: e0 00 00 10 bi 801c9c4 <nanosleep+0x8c>
ticks = _Timespec_To_ticks( rqtp );
801c988: b9 60 08 00 mv r1,r11
801c98c: fb ff b5 fb calli 800a178 <_Timespec_To_ticks>
801c990: b8 20 58 00 mv r11,r1
* 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 ) {
801c994: 5c 20 00 13 bne r1,r0,801c9e0 <nanosleep+0xa8>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
801c998: 78 01 08 01 mvhi r1,0x801
801c99c: 38 21 f8 dc ori r1,r1,0xf8dc
801c9a0: 28 22 00 00 lw r2,(r1+0)
801c9a4: 34 42 00 01 addi r2,r2,1
801c9a8: 58 22 00 00 sw (r1+0),r2
_Thread_Disable_dispatch();
_Thread_Yield_processor();
801c9ac: f8 00 00 5c calli 801cb1c <_Thread_Yield_processor>
_Thread_Enable_dispatch();
801c9b0: fb ff 9e 5a calli 8004318 <_Thread_Enable_dispatch>
if ( rmtp ) {
801c9b4: 45 ab 00 2e be r13,r11,801ca6c <nanosleep+0x134>
rmtp->tv_sec = 0;
rmtp->tv_nsec = 0;
801c9b8: 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;
801c9bc: 59 ab 00 00 sw (r13+0),r11
rmtp->tv_nsec = 0;
801c9c0: b9 60 08 00 mv r1,r11
rtems_set_errno_and_return_minus_one( EINTR );
#endif
}
return 0;
}
801c9c4: 2b 9d 00 04 lw ra,(sp+4)
801c9c8: 2b 8b 00 14 lw r11,(sp+20)
801c9cc: 2b 8c 00 10 lw r12,(sp+16)
801c9d0: 2b 8d 00 0c lw r13,(sp+12)
801c9d4: 2b 8e 00 08 lw r14,(sp+8)
801c9d8: 37 9c 00 14 addi sp,sp,20
801c9dc: c3 a0 00 00 ret
801c9e0: 78 01 08 01 mvhi r1,0x801
801c9e4: 38 21 f8 dc ori r1,r1,0xf8dc
801c9e8: 28 22 00 00 lw r2,(r1+0)
801c9ec: 34 42 00 01 addi r2,r2,1
801c9f0: 58 22 00 00 sw (r1+0),r2
/*
* Block for the desired amount of time
*/
_Thread_Disable_dispatch();
_Thread_Set_state(
801c9f4: 78 0c 08 01 mvhi r12,0x801
801c9f8: 39 8c f9 98 ori r12,r12,0xf998
801c9fc: 29 81 00 00 lw r1,(r12+0)
801ca00: 78 02 10 00 mvhi r2,0x1000
801ca04: 38 42 00 08 ori r2,r2,0x8
801ca08: fb ff b5 3f calli 8009f04 <_Thread_Set_state>
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
&_Thread_Executing->Timer,
801ca0c: 29 83 00 00 lw r3,(r12+0)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
801ca10: 78 02 08 01 mvhi r2,0x801
801ca14: 38 42 ca d8 ori r2,r2,0xcad8
_Thread_Disable_dispatch();
_Thread_Set_state(
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
801ca18: 28 64 00 08 lw r4,(r3+8)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
801ca1c: 78 01 08 01 mvhi r1,0x801
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
801ca20: 58 62 00 64 sw (r3+100),r2
the_watchdog->id = id;
801ca24: 58 64 00 68 sw (r3+104),r4
the_watchdog->user_data = user_data;
801ca28: 58 6e 00 6c sw (r3+108),r14
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
801ca2c: 38 21 f9 b8 ori r1,r1,0xf9b8
801ca30: 34 62 00 48 addi r2,r3,72
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
801ca34: 58 6e 00 50 sw (r3+80),r14
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
801ca38: 58 6b 00 54 sw (r3+84),r11
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
801ca3c: fb ff b6 05 calli 800a250 <_Watchdog_Insert>
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
_Thread_Enable_dispatch();
801ca40: fb ff 9e 36 calli 8004318 <_Thread_Enable_dispatch>
/* calculate time remaining */
if ( rmtp ) {
801ca44: 45 a0 00 0a be r13,r0,801ca6c <nanosleep+0x134>
ticks -=
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
801ca48: 29 81 00 00 lw r1,(r12+0)
_Timespec_From_ticks( ticks, rmtp );
801ca4c: b9 a0 10 00 mv r2,r13
_Thread_Enable_dispatch();
/* calculate time remaining */
if ( rmtp ) {
ticks -=
801ca50: 28 23 00 60 lw r3,(r1+96)
801ca54: 28 21 00 5c lw r1,(r1+92)
801ca58: c8 23 08 00 sub r1,r1,r3
801ca5c: b4 2b 58 00 add r11,r1,r11
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
_Timespec_From_ticks( ticks, rmtp );
801ca60: b9 60 08 00 mv r1,r11
801ca64: f8 00 00 57 calli 801cbc0 <_Timespec_From_ticks>
*/
#if defined(RTEMS_POSIX_API)
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
801ca68: 5d 60 00 09 bne r11,r0,801ca8c <nanosleep+0x154>
rtems_set_errno_and_return_minus_one( EINTR );
801ca6c: 34 01 00 00 mvi r1,0
#endif
}
return 0;
}
801ca70: 2b 9d 00 04 lw ra,(sp+4)
801ca74: 2b 8b 00 14 lw r11,(sp+20)
801ca78: 2b 8c 00 10 lw r12,(sp+16)
801ca7c: 2b 8d 00 0c lw r13,(sp+12)
801ca80: 2b 8e 00 08 lw r14,(sp+8)
801ca84: 37 9c 00 14 addi sp,sp,20
801ca88: c3 a0 00 00 ret
#if defined(RTEMS_POSIX_API)
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
rtems_set_errno_and_return_minus_one( EINTR );
801ca8c: fb ff c3 a2 calli 800d914 <__errno>
801ca90: 34 02 00 04 mvi r2,4
801ca94: 58 22 00 00 sw (r1+0),r2
801ca98: 34 01 ff ff mvi r1,-1
801ca9c: e3 ff ff ca bi 801c9c4 <nanosleep+0x8c>
08001658 <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
8001658: 37 9c ff f0 addi sp,sp,-16
800165c: 5b 8b 00 10 sw (sp+16),r11
8001660: 5b 8c 00 0c sw (sp+12),r12
8001664: 5b 8d 00 08 sw (sp+8),r13
8001668: 5b 9d 00 04 sw (sp+4),ra
800166c: b8 20 68 00 mv r13,r1
8001670: b8 40 58 00 mv r11,r2
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
8001674: 44 22 00 1f be r1,r2,80016f0 <newlib_delete_hook+0x98>
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
8001678: 28 4c 01 24 lw r12,(r2+292)
}
if (ptr && ptr != _global_impure_ptr) {
800167c: 45 80 00 0b be r12,r0,80016a8 <newlib_delete_hook+0x50> <== NEVER TAKEN
8001680: 78 02 08 01 mvhi r2,0x801
8001684: 38 42 d0 48 ori r2,r2,0xd048
8001688: 28 41 00 00 lw r1,(r2+0)
800168c: 45 81 00 07 be r12,r1,80016a8 <newlib_delete_hook+0x50>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
8001690: 78 02 08 00 mvhi r2,0x800
8001694: 38 42 17 00 ori r2,r2,0x1700
8001698: b9 80 08 00 mv r1,r12
800169c: f8 00 31 ae calli 800dd54 <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
80016a0: b9 80 08 00 mv r1,r12
80016a4: f8 00 12 5f calli 8006020 <_Workspace_Free>
#endif
}
deleted_task->libc_reent = NULL;
80016a8: 34 01 00 00 mvi r1,0
80016ac: 59 61 01 24 sw (r11+292),r1
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
80016b0: 45 ab 00 07 be r13,r11,80016cc <newlib_delete_hook+0x74>
_REENT = 0;
}
}
80016b4: 2b 9d 00 04 lw ra,(sp+4)
80016b8: 2b 8b 00 10 lw r11,(sp+16)
80016bc: 2b 8c 00 0c lw r12,(sp+12)
80016c0: 2b 8d 00 08 lw r13,(sp+8)
80016c4: 37 9c 00 10 addi sp,sp,16
80016c8: c3 a0 00 00 ret
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
_REENT = 0;
80016cc: 78 02 08 01 mvhi r2,0x801
80016d0: 38 42 e1 b0 ori r2,r2,0xe1b0
80016d4: 58 41 00 00 sw (r2+0),r1
}
}
80016d8: 2b 9d 00 04 lw ra,(sp+4)
80016dc: 2b 8b 00 10 lw r11,(sp+16)
80016e0: 2b 8c 00 0c lw r12,(sp+12)
80016e4: 2b 8d 00 08 lw r13,(sp+8)
80016e8: 37 9c 00 10 addi sp,sp,16
80016ec: c3 a0 00 00 ret
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
80016f0: 78 01 08 01 mvhi r1,0x801
80016f4: 38 21 e1 b0 ori r1,r1,0xe1b0
80016f8: 28 2c 00 00 lw r12,(r1+0)
80016fc: e3 ff ff e0 bi 800167c <newlib_delete_hook+0x24>
08001700 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
8001700: 37 9c ff f4 addi sp,sp,-12
8001704: 5b 8b 00 0c sw (sp+12),r11
8001708: 5b 8c 00 08 sw (sp+8),r12
800170c: 5b 9d 00 04 sw (sp+4),ra
8001710: b8 20 58 00 mv r11,r1
switch ( fileno(fp) ) {
8001714: f8 00 30 40 calli 800d814 <fileno>
8001718: 34 02 00 02 mvi r2,2
800171c: 54 22 00 0b bgu r1,r2,8001748 <newlib_free_buffers+0x48> <== NEVER TAKEN
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
8001720: 2d 61 00 0c lhu r1,(r11+12)
8001724: 34 0c 00 00 mvi r12,0
8001728: 20 21 00 80 andi r1,r1,0x80
800172c: 5c 2c 00 0f bne r1,r12,8001768 <newlib_free_buffers+0x68> <== NEVER TAKEN
break;
default:
fclose(fp);
}
return 0;
}
8001730: 34 01 00 00 mvi r1,0
8001734: 2b 9d 00 04 lw ra,(sp+4)
8001738: 2b 8b 00 0c lw r11,(sp+12)
800173c: 2b 8c 00 08 lw r12,(sp+8)
8001740: 37 9c 00 0c addi sp,sp,12
8001744: c3 a0 00 00 ret
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
8001748: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800174c: f8 00 2f 70 calli 800d50c <fclose> <== NOT EXECUTED
}
return 0;
}
8001750: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8001754: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8001758: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
800175c: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8001760: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8001764: c3 a0 00 00 ret <== NOT EXECUTED
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
8001768: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
800176c: f8 00 18 78 calli 800794c <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
8001770: 2d 61 00 0c lhu r1,(r11+12) <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
8001774: 59 6c 00 10 sw (r11+16),r12 <== NOT EXECUTED
8001778: 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;
800177c: 20 21 ff 7f andi r1,r1,0xff7f <== NOT EXECUTED
8001780: 0d 61 00 0c sh (r11+12),r1 <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
8001784: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8001788: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800178c: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8001790: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8001794: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8001798: c3 a0 00 00 ret <== NOT EXECUTED
080018ec <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
80018ec: 37 9c ff f4 addi sp,sp,-12
80018f0: 5b 8b 00 0c sw (sp+12),r11
80018f4: 5b 8c 00 08 sw (sp+8),r12
80018f8: 5b 9d 00 04 sw (sp+4),ra
rtems_device_driver status;
if ( !initialized ) {
80018fc: 78 04 08 02 mvhi r4,0x802
8001900: 38 84 37 20 ori r4,r4,0x3720
8001904: 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))
)
{
8001908: b8 20 60 00 mv r12,r1
rtems_device_driver status;
if ( !initialized ) {
800190c: 45 60 00 07 be r11,r0,8001928 <null_initialize+0x3c>
NULL_major = major;
}
return RTEMS_SUCCESSFUL;
}
8001910: 34 01 00 00 mvi r1,0
8001914: 2b 9d 00 04 lw ra,(sp+4)
8001918: 2b 8b 00 0c lw r11,(sp+12)
800191c: 2b 8c 00 08 lw r12,(sp+8)
8001920: 37 9c 00 0c addi sp,sp,12
8001924: c3 a0 00 00 ret
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
status = rtems_io_register_name(
8001928: 78 01 08 02 mvhi r1,0x802
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
800192c: 34 05 00 01 mvi r5,1
status = rtems_io_register_name(
8001930: 38 21 08 3c ori r1,r1,0x83c
8001934: b9 80 10 00 mv r2,r12
8001938: b9 60 18 00 mv r3,r11
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
800193c: 30 85 00 00 sb (r4+0),r5
status = rtems_io_register_name(
8001940: f8 00 00 56 calli 8001a98 <rtems_io_register_name>
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
8001944: 5c 2b 00 0a bne r1,r11,800196c <null_initialize+0x80> <== NEVER TAKEN
rtems_fatal_error_occurred(status);
NULL_major = major;
8001948: 78 03 08 02 mvhi r3,0x802
800194c: 38 63 37 c8 ori r3,r3,0x37c8
}
return RTEMS_SUCCESSFUL;
}
8001950: 34 01 00 00 mvi r1,0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
NULL_major = major;
8001954: 58 6c 00 00 sw (r3+0),r12
}
return RTEMS_SUCCESSFUL;
}
8001958: 2b 9d 00 04 lw ra,(sp+4)
800195c: 2b 8b 00 0c lw r11,(sp+12)
8001960: 2b 8c 00 08 lw r12,(sp+8)
8001964: 37 9c 00 0c addi sp,sp,12
8001968: c3 a0 00 00 ret
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
800196c: f8 00 08 90 calli 8003bac <rtems_fatal_error_occurred> <== NOT EXECUTED
080018d0 <null_write>:
void *pargp
)
{
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
if ( rw_args )
80018d0: 44 60 00 03 be r3,r0,80018dc <null_write+0xc> <== ALWAYS TAKEN
rw_args->bytes_moved = rw_args->count;
80018d4: 28 61 00 14 lw r1,(r3+20) <== NOT EXECUTED
80018d8: 58 61 00 1c sw (r3+28),r1 <== NOT EXECUTED
return NULL_SUCCESSFUL;
}
80018dc: 34 01 00 00 mvi r1,0
80018e0: c3 a0 00 00 ret
08001a04 <open>:
int open(
const char *pathname,
int flags,
...
)
{
8001a04: 37 9c ff ac addi sp,sp,-84
8001a08: 5b 8b 00 24 sw (sp+36),r11
8001a0c: 5b 8c 00 20 sw (sp+32),r12
8001a10: 5b 8d 00 1c sw (sp+28),r13
8001a14: 5b 8e 00 18 sw (sp+24),r14
8001a18: 5b 8f 00 14 sw (sp+20),r15
8001a1c: 5b 90 00 10 sw (sp+16),r16
8001a20: 5b 91 00 0c sw (sp+12),r17
8001a24: 5b 92 00 08 sw (sp+8),r18
8001a28: 5b 9d 00 04 sw (sp+4),ra
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
8001a2c: 34 49 00 01 addi r9,r2,1
int open(
const char *pathname,
int flags,
...
)
{
8001a30: b8 40 60 00 mv r12,r2
8001a34: 5b 82 00 3c sw (sp+60),r2
8001a38: 5b 83 00 40 sw (sp+64),r3
8001a3c: 5b 84 00 44 sw (sp+68),r4
8001a40: 5b 85 00 48 sw (sp+72),r5
8001a44: 5b 86 00 4c sw (sp+76),r6
8001a48: 5b 87 00 50 sw (sp+80),r7
8001a4c: 5b 88 00 54 sw (sp+84),r8
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
8001a50: 21 22 00 01 andi r2,r9,0x1
int open(
const char *pathname,
int flags,
...
)
{
8001a54: b8 20 78 00 mv r15,r1
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
8001a58: 34 0d 00 04 mvi r13,4
8001a5c: 5c 40 00 02 bne r2,r0,8001a64 <open+0x60>
8001a60: b8 40 68 00 mv r13,r2
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
8001a64: 21 29 00 02 andi r9,r9,0x2
8001a68: 45 20 00 02 be r9,r0,8001a70 <open+0x6c>
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
8001a6c: 39 ad 00 02 ori r13,r13,0x2
va_start(ap, flags);
mode = va_arg( ap, int );
8001a70: 2b 91 00 40 lw r17,(sp+64)
* code does not require changes here since network file
* descriptors are obtained using socket(), not open().
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
8001a74: f8 00 19 01 calli 8007e78 <rtems_libio_allocate>
8001a78: b8 20 58 00 mv r11,r1
if ( iop == 0 ) {
8001a7c: 34 0e 00 17 mvi r14,23
8001a80: 44 20 00 53 be r1,r0,8001bcc <open+0x1c8>
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
8001a84: b9 e0 08 00 mv r1,r15
8001a88: f8 00 33 0f calli 800e6c4 <strlen>
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
8001a8c: 37 90 00 28 addi r16,sp,40
8001a90: b8 20 10 00 mv r2,r1
8001a94: b9 a0 18 00 mv r3,r13
8001a98: b9 e0 08 00 mv r1,r15
8001a9c: ba 00 20 00 mv r4,r16
8001aa0: 34 05 00 01 mvi r5,1
8001aa4: fb ff fd 1b calli 8000f10 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
8001aa8: 34 02 ff ff mvi r2,-1
8001aac: 44 22 00 4f be r1,r2,8001be8 <open+0x1e4>
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
8001ab0: 21 82 0a 00 andi r2,r12,0xa00
8001ab4: 34 01 0a 00 mvi r1,2560
8001ab8: ba 00 68 00 mv r13,r16
8001abc: 34 0e 00 11 mvi r14,17
8001ac0: 44 41 00 39 be r2,r1,8001ba4 <open+0x1a0>
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
8001ac4: 2b 81 00 30 lw r1,(sp+48)
iop->file_info = loc.node_access;
8001ac8: 2b 82 00 28 lw r2,(sp+40)
iop->flags |= rtems_libio_fcntl_flags( flags );
8001acc: 29 6d 00 18 lw r13,(r11+24)
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
8001ad0: 59 61 00 40 sw (r11+64),r1
iop->file_info = loc.node_access;
8001ad4: 59 62 00 3c sw (r11+60),r2
iop->flags |= rtems_libio_fcntl_flags( flags );
8001ad8: b9 80 08 00 mv r1,r12
8001adc: f8 00 19 20 calli 8007f5c <rtems_libio_fcntl_flags>
iop->pathinfo = loc;
8001ae0: 2b 83 00 28 lw r3,(sp+40)
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
8001ae4: b8 2d 08 00 or r1,r1,r13
8001ae8: 59 61 00 18 sw (r11+24),r1
iop->pathinfo = loc;
8001aec: 59 63 00 1c sw (r11+28),r3
8001af0: 2b 83 00 2c lw r3,(sp+44)
if ( !iop->handlers || !iop->handlers->open_h ) {
8001af4: 29 62 00 40 lw r2,(r11+64)
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
8001af8: 59 63 00 20 sw (r11+32),r3
8001afc: 2b 81 00 30 lw r1,(sp+48)
8001b00: 59 61 00 24 sw (r11+36),r1
8001b04: 2b 83 00 34 lw r3,(sp+52)
8001b08: 59 63 00 28 sw (r11+40),r3
8001b0c: 2b 81 00 38 lw r1,(sp+56)
8001b10: 59 61 00 2c sw (r11+44),r1
if ( !iop->handlers || !iop->handlers->open_h ) {
8001b14: 44 40 00 32 be r2,r0,8001bdc <open+0x1d8> <== NEVER TAKEN
8001b18: 28 45 00 00 lw r5,(r2+0)
8001b1c: 44 a0 00 30 be r5,r0,8001bdc <open+0x1d8> <== NEVER TAKEN
rc = ENOTSUP;
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
8001b20: b9 e0 10 00 mv r2,r15
8001b24: ba 20 20 00 mv r4,r17
8001b28: b9 60 08 00 mv r1,r11
8001b2c: b9 80 18 00 mv r3,r12
8001b30: d8 a0 00 00 call r5
8001b34: b8 20 68 00 mv r13,r1
if ( rc ) {
8001b38: 5c 20 00 17 bne r1,r0,8001b94 <open+0x190>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
8001b3c: 21 8c 04 00 andi r12,r12,0x400
8001b40: 5d 81 00 33 bne r12,r1,8001c0c <open+0x208>
8001b44: 78 0c 08 01 mvhi r12,0x801
8001b48: 39 8c e7 1c ori r12,r12,0xe71c
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
8001b4c: 29 81 00 00 lw r1,(r12+0)
8001b50: 34 02 00 03 mvi r2,3
8001b54: c9 61 08 00 sub r1,r11,r1
8001b58: fb ff f9 f6 calli 8000330 <__ashrsi3>
8001b5c: 78 02 38 e3 mvhi r2,0x38e3
8001b60: 38 42 8e 39 ori r2,r2,0x8e39
8001b64: f8 00 65 f4 calli 801b334 <__mulsi3>
}
8001b68: 2b 9d 00 04 lw ra,(sp+4)
8001b6c: 2b 8b 00 24 lw r11,(sp+36)
8001b70: 2b 8c 00 20 lw r12,(sp+32)
8001b74: 2b 8d 00 1c lw r13,(sp+28)
8001b78: 2b 8e 00 18 lw r14,(sp+24)
8001b7c: 2b 8f 00 14 lw r15,(sp+20)
8001b80: 2b 90 00 10 lw r16,(sp+16)
8001b84: 2b 91 00 0c lw r17,(sp+12)
8001b88: 2b 92 00 08 lw r18,(sp+8)
8001b8c: 37 9c 00 54 addi sp,sp,84
8001b90: c3 a0 00 00 ret
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
8001b94: f8 00 2d fc calli 800d384 <__errno>
8001b98: 28 2e 00 00 lw r14,(r1+0)
8001b9c: ba 00 68 00 mv r13,r16
*/
done:
va_end(ap);
if ( rc ) {
8001ba0: 45 c0 ff e9 be r14,r0,8001b44 <open+0x140> <== NEVER TAKEN
if ( iop )
8001ba4: 45 60 00 03 be r11,r0,8001bb0 <open+0x1ac> <== NEVER TAKEN
rtems_libio_free( iop );
8001ba8: b9 60 08 00 mv r1,r11
8001bac: f8 00 18 95 calli 8007e00 <rtems_libio_free>
if ( loc_to_free )
8001bb0: 45 a0 00 07 be r13,r0,8001bcc <open+0x1c8>
rtems_filesystem_freenode( loc_to_free );
8001bb4: 29 a1 00 0c lw r1,(r13+12)
8001bb8: 44 20 00 05 be r1,r0,8001bcc <open+0x1c8> <== NEVER TAKEN
8001bbc: 28 22 00 1c lw r2,(r1+28)
8001bc0: 44 40 00 03 be r2,r0,8001bcc <open+0x1c8> <== NEVER TAKEN
8001bc4: b9 a0 08 00 mv r1,r13
8001bc8: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( rc );
8001bcc: f8 00 2d ee calli 800d384 <__errno>
8001bd0: 58 2e 00 00 sw (r1+0),r14
8001bd4: 34 01 ff ff mvi r1,-1
8001bd8: e3 ff ff e4 bi 8001b68 <open+0x164>
}
return iop - rtems_libio_iops;
8001bdc: ba 00 68 00 mv r13,r16 <== NOT EXECUTED
8001be0: 34 0e 00 86 mvi r14,134 <== NOT EXECUTED
8001be4: e3 ff ff f0 bi 8001ba4 <open+0x1a0> <== NOT EXECUTED
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
8001be8: f8 00 2d e7 calli 800d384 <__errno>
8001bec: 28 2e 00 00 lw r14,(r1+0)
8001bf0: 34 01 00 02 mvi r1,2
8001bf4: 45 c1 00 22 be r14,r1,8001c7c <open+0x278>
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
8001bf8: f8 00 2d e3 calli 800d384 <__errno>
8001bfc: 28 2e 00 00 lw r14,(r1+0)
8001c00: 34 0d 00 00 mvi r13,0
*/
done:
va_end(ap);
if ( rc ) {
8001c04: 45 c0 ff d0 be r14,r0,8001b44 <open+0x140> <== NEVER TAKEN
8001c08: e3 ff ff e7 bi 8001ba4 <open+0x1a0>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
8001c0c: 78 0c 08 01 mvhi r12,0x801
8001c10: 39 8c e7 1c ori r12,r12,0xe71c
8001c14: 29 81 00 00 lw r1,(r12+0)
8001c18: 34 02 00 03 mvi r2,3
8001c1c: c9 61 08 00 sub r1,r11,r1
8001c20: fb ff f9 c4 calli 8000330 <__ashrsi3>
8001c24: 78 02 38 e3 mvhi r2,0x38e3
8001c28: 38 42 8e 39 ori r2,r2,0x8e39
8001c2c: f8 00 65 c2 calli 801b334 <__mulsi3>
8001c30: b9 a0 10 00 mv r2,r13
8001c34: f8 00 17 74 calli 8007a04 <ftruncate>
8001c38: b8 20 70 00 mv r14,r1
if ( rc ) {
8001c3c: 44 20 ff c4 be r1,r0,8001b4c <open+0x148> <== ALWAYS TAKEN
if(errno) rc = errno;
8001c40: f8 00 2d d1 calli 800d384 <__errno> <== NOT EXECUTED
8001c44: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
8001c48: 5c 20 00 23 bne r1,r0,8001cd4 <open+0x2d0> <== NOT EXECUTED
close( iop - rtems_libio_iops );
8001c4c: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED
8001c50: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
8001c54: c9 61 08 00 sub r1,r11,r1 <== NOT EXECUTED
8001c58: fb ff f9 b6 calli 8000330 <__ashrsi3> <== NOT EXECUTED
8001c5c: 78 02 38 e3 mvhi r2,0x38e3 <== NOT EXECUTED
8001c60: 38 42 8e 39 ori r2,r2,0x8e39 <== NOT EXECUTED
8001c64: f8 00 65 b4 calli 801b334 <__mulsi3> <== NOT EXECUTED
8001c68: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED
8001c6c: f8 00 17 00 calli 800786c <close> <== NOT EXECUTED
8001c70: b9 60 68 00 mv r13,r11 <== NOT EXECUTED
*/
done:
va_end(ap);
if ( rc ) {
8001c74: 45 c0 ff b4 be r14,r0,8001b44 <open+0x140> <== NOT EXECUTED
8001c78: e3 ff ff cb bi 8001ba4 <open+0x1a0> <== NOT EXECUTED
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
8001c7c: 21 81 02 00 andi r1,r12,0x200
8001c80: b8 20 68 00 mv r13,r1
8001c84: 44 20 ff c8 be r1,r0,8001ba4 <open+0x1a0>
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
8001c88: 34 03 00 00 mvi r3,0
8001c8c: b9 e0 08 00 mv r1,r15
8001c90: 3a 22 80 00 ori r2,r17,0x8000
8001c94: b8 60 20 00 mv r4,r3
8001c98: fb ff fd 5c calli 8001208 <mknod>
8001c9c: b8 20 90 00 mv r18,r1
if ( rc ) {
8001ca0: 5c 20 ff d6 bne r1,r0,8001bf8 <open+0x1f4> <== NEVER TAKEN
rc = errno;
goto done;
}
/* Sanity check to see if the file name exists after the mknod() */
status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true );
8001ca4: b9 e0 08 00 mv r1,r15
8001ca8: f8 00 32 87 calli 800e6c4 <strlen>
8001cac: b8 20 10 00 mv r2,r1
8001cb0: ba 40 18 00 mv r3,r18
8001cb4: b9 e0 08 00 mv r1,r15
8001cb8: ba 00 20 00 mv r4,r16
8001cbc: 34 05 00 01 mvi r5,1
8001cc0: fb ff fc 94 calli 8000f10 <rtems_filesystem_evaluate_path>
if ( status != 0 ) { /* The file did not exist */
8001cc4: ba 40 68 00 mv r13,r18
8001cc8: 34 0e 00 0d mvi r14,13
8001ccc: 5c 32 ff b6 bne r1,r18,8001ba4 <open+0x1a0> <== NEVER TAKEN
8001cd0: e3 ff ff 7d bi 8001ac4 <open+0xc0>
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
8001cd4: f8 00 2d ac calli 800d384 <__errno> <== NOT EXECUTED
8001cd8: 28 2e 00 00 lw r14,(r1+0) <== NOT EXECUTED
8001cdc: e3 ff ff dc bi 8001c4c <open+0x248> <== NOT EXECUTED
08001984 <open_dev_console>:
/*
* This is a replaceable stub which opens the console, if present.
*/
void open_dev_console(void)
{
8001984: 37 9c ff f8 addi sp,sp,-8
8001988: 5b 8b 00 08 sw (sp+8),r11
800198c: 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) {
8001990: 34 02 00 00 mvi r2,0
8001994: 78 01 08 01 mvhi r1,0x801
8001998: 38 21 c7 f0 ori r1,r1,0xc7f0
800199c: b8 40 18 00 mv r3,r2
80019a0: f8 00 00 19 calli 8001a04 <open>
80019a4: 34 0b ff ff mvi r11,-1
80019a8: 44 2b 00 0d be r1,r11,80019dc <open_dev_console+0x58>
/*
* 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)
80019ac: 78 01 08 01 mvhi r1,0x801
80019b0: 38 21 c7 f0 ori r1,r1,0xc7f0
80019b4: 34 02 00 01 mvi r2,1
80019b8: 34 03 00 00 mvi r3,0
80019bc: f8 00 00 12 calli 8001a04 <open>
80019c0: 44 2b 00 0b be r1,r11,80019ec <open_dev_console+0x68> <== NEVER TAKEN
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
80019c4: 78 01 08 01 mvhi r1,0x801
80019c8: 38 21 c7 f0 ori r1,r1,0xc7f0
80019cc: 34 02 00 01 mvi r2,1
80019d0: 34 03 00 00 mvi r3,0
80019d4: f8 00 00 0c calli 8001a04 <open>
80019d8: 44 2b 00 08 be r1,r11,80019f8 <open_dev_console+0x74> <== NEVER TAKEN
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
}
80019dc: 2b 9d 00 04 lw ra,(sp+4)
80019e0: 2b 8b 00 08 lw r11,(sp+8)
80019e4: 37 9c 00 08 addi sp,sp,8
80019e8: c3 a0 00 00 ret
/*
* But if we find /dev/console once, we better find it twice more
* or something is REALLY wrong.
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
80019ec: 78 01 55 54 mvhi r1,0x5554 <== NOT EXECUTED
80019f0: 38 21 44 31 ori r1,r1,0x4431 <== NOT EXECUTED
80019f4: f8 00 03 e3 calli 8002980 <rtems_fatal_error_occurred> <== NOT EXECUTED
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
80019f8: 78 01 55 54 mvhi r1,0x5554 <== NOT EXECUTED
80019fc: 38 21 44 32 ori r1,r1,0x4432 <== NOT EXECUTED
8001a00: f8 00 03 e0 calli 8002980 <rtems_fatal_error_occurred> <== NOT EXECUTED
08004448 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
8004448: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED
800444c: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
8004450: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8004454: b8 40 58 00 mv r11,r2 <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
8004458: 28 42 00 34 lw r2,(r2+52) <== NOT EXECUTED
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
800445c: 33 81 00 0c sb (sp+12),r1 <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
8004460: 20 41 00 01 andi r1,r2,0x1 <== NOT EXECUTED
8004464: 44 20 00 0b be r1,r0,8004490 <oproc+0x48> <== NOT EXECUTED
switch (c) {
8004468: 43 81 00 0c lbu r1,(sp+12) <== NOT EXECUTED
800446c: 34 03 00 09 mvi r3,9 <== NOT EXECUTED
8004470: 44 23 00 2f be r1,r3,800452c <oproc+0xe4> <== NOT EXECUTED
8004474: 54 23 00 0f bgu r1,r3,80044b0 <oproc+0x68> <== NOT EXECUTED
8004478: 34 03 00 08 mvi r3,8 <== NOT EXECUTED
800447c: 5c 23 00 11 bne r1,r3,80044c0 <oproc+0x78> <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
8004480: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8004484: 4c 01 00 03 bge r0,r1,8004490 <oproc+0x48> <== NOT EXECUTED
tty->column--;
8004488: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
800448c: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
8004490: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
8004494: 37 81 00 0c addi r1,sp,12 <== NOT EXECUTED
8004498: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
800449c: fb ff ff 90 calli 80042dc <rtems_termios_puts> <== NOT EXECUTED
}
80044a0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80044a4: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
80044a8: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
80044ac: c3 a0 00 00 ret <== NOT EXECUTED
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
80044b0: 34 03 00 0a mvi r3,10 <== NOT EXECUTED
80044b4: 44 23 00 10 be r1,r3,80044f4 <oproc+0xac> <== NOT EXECUTED
80044b8: 34 03 00 0d mvi r3,13 <== NOT EXECUTED
80044bc: 44 23 00 26 be r1,r3,8004554 <oproc+0x10c> <== NOT EXECUTED
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
80044c0: 20 42 00 02 andi r2,r2,0x2 <== NOT EXECUTED
80044c4: 5c 40 00 31 bne r2,r0,8004588 <oproc+0x140> <== NOT EXECUTED
80044c8: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
80044cc: 38 42 63 0c ori r2,r2,0x630c <== NOT EXECUTED
80044d0: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED
c = toupper(c);
if (!iscntrl(c))
80044d4: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED
80044d8: 40 21 00 01 lbu r1,(r1+1) <== NOT EXECUTED
80044dc: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED
80044e0: 5c 20 ff ec bne r1,r0,8004490 <oproc+0x48> <== NOT EXECUTED
tty->column++;
80044e4: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
80044e8: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED
80044ec: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
80044f0: e3 ff ff e8 bi 8004490 <oproc+0x48> <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
80044f4: 20 41 00 20 andi r1,r2,0x20 <== NOT EXECUTED
80044f8: 44 20 00 03 be r1,r0,8004504 <oproc+0xbc> <== NOT EXECUTED
tty->column = 0;
80044fc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8004500: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
8004504: 20 42 00 04 andi r2,r2,0x4 <== NOT EXECUTED
8004508: 44 40 ff e2 be r2,r0,8004490 <oproc+0x48> <== NOT EXECUTED
rtems_termios_puts ("\r", 1, tty);
800450c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8004510: 38 21 3d 14 ori r1,r1,0x3d14 <== NOT EXECUTED
8004514: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
8004518: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
800451c: fb ff ff 70 calli 80042dc <rtems_termios_puts> <== NOT EXECUTED
tty->column = 0;
8004520: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8004524: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
8004528: e3 ff ff da bi 8004490 <oproc+0x48> <== NOT EXECUTED
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
800452c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8004530: 34 03 00 08 mvi r3,8 <== NOT EXECUTED
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
8004534: 20 44 18 00 andi r4,r2,0x1800 <== NOT EXECUTED
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
8004538: 20 22 00 07 andi r2,r1,0x7 <== NOT EXECUTED
800453c: c8 62 10 00 sub r2,r3,r2 <== NOT EXECUTED
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
8004540: 34 03 18 00 mvi r3,6144 <== NOT EXECUTED
8004544: 44 83 00 1f be r4,r3,80045c0 <oproc+0x178> <== NOT EXECUTED
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
8004548: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED
800454c: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
break;
8004550: e3 ff ff d0 bi 8004490 <oproc+0x48> <== NOT EXECUTED
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
8004554: 20 41 00 10 andi r1,r2,0x10 <== NOT EXECUTED
8004558: 44 20 00 03 be r1,r0,8004564 <oproc+0x11c> <== NOT EXECUTED
800455c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
8004560: 44 20 ff d0 be r1,r0,80044a0 <oproc+0x58> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
8004564: 20 41 00 08 andi r1,r2,0x8 <== NOT EXECUTED
8004568: 44 20 ff e1 be r1,r0,80044ec <oproc+0xa4> <== NOT EXECUTED
c = '\n';
800456c: 34 01 00 0a mvi r1,10 <== NOT EXECUTED
8004570: 33 81 00 0c sb (sp+12),r1 <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
8004574: 20 42 00 20 andi r2,r2,0x20 <== NOT EXECUTED
8004578: 44 40 ff c6 be r2,r0,8004490 <oproc+0x48> <== NOT EXECUTED
tty->column = 0;
800457c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8004580: 59 61 00 28 sw (r11+40),r1 <== NOT EXECUTED
8004584: e3 ff ff c3 bi 8004490 <oproc+0x48> <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
8004588: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
800458c: 38 42 63 0c ori r2,r2,0x630c <== NOT EXECUTED
8004590: 28 42 00 00 lw r2,(r2+0) <== NOT EXECUTED
8004594: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
8004598: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED
800459c: 40 24 00 01 lbu r4,(r1+1) <== NOT EXECUTED
80045a0: 34 01 00 02 mvi r1,2 <== NOT EXECUTED
80045a4: 20 84 00 03 andi r4,r4,0x3 <== NOT EXECUTED
80045a8: 44 81 00 04 be r4,r1,80045b8 <oproc+0x170> <== NOT EXECUTED
80045ac: 20 61 00 ff andi r1,r3,0xff <== NOT EXECUTED
80045b0: 33 81 00 0c sb (sp+12),r1 <== NOT EXECUTED
80045b4: e3 ff ff c8 bi 80044d4 <oproc+0x8c> <== NOT EXECUTED
80045b8: 34 63 ff e0 addi r3,r3,-32 <== NOT EXECUTED
80045bc: e3 ff ff fc bi 80045ac <oproc+0x164> <== NOT EXECUTED
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
80045c0: b4 41 18 00 add r3,r2,r1 <== NOT EXECUTED
rtems_termios_puts ( " ", i, tty);
80045c4: 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;
80045c8: 59 63 00 28 sw (r11+40),r3 <== NOT EXECUTED
rtems_termios_puts ( " ", i, tty);
80045cc: 38 21 3d 18 ori r1,r1,0x3d18 <== NOT EXECUTED
80045d0: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
80045d4: fb ff ff 42 calli 80042dc <rtems_termios_puts> <== NOT EXECUTED
return;
80045d8: e3 ff ff b2 bi 80044a0 <oproc+0x58> <== NOT EXECUTED
0800c668 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
800c668: 37 9c ff c4 addi sp,sp,-60
800c66c: 5b 8b 00 18 sw (sp+24),r11
800c670: 5b 8c 00 14 sw (sp+20),r12
800c674: 5b 8d 00 10 sw (sp+16),r13
800c678: 5b 8e 00 0c sw (sp+12),r14
800c67c: 5b 8f 00 08 sw (sp+8),r15
800c680: 5b 9d 00 04 sw (sp+4),ra
800c684: 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)
800c688: 37 8b 00 1c addi r11,sp,28
800c68c: 78 01 08 01 mvhi r1,0x801
800c690: 34 02 00 03 mvi r2,3
800c694: 38 21 cf 38 ori r1,r1,0xcf38
800c698: 34 03 00 07 mvi r3,7
800c69c: b9 60 20 00 mv r4,r11
800c6a0: 34 05 00 01 mvi r5,1
800c6a4: fb ff d2 1b calli 8000f10 <rtems_filesystem_evaluate_path>
800c6a8: b8 20 10 00 mv r2,r1
800c6ac: 5c 20 00 46 bne r1,r0,800c7c4 <pipe_create+0x15c> <== ALWAYS TAKEN
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
return -1;
}
else
rtems_filesystem_freenode(&loc);
800c6b0: 2b 81 00 28 lw r1,(sp+40) <== NOT EXECUTED
800c6b4: 44 22 00 05 be r1,r2,800c6c8 <pipe_create+0x60> <== NOT EXECUTED
800c6b8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
800c6bc: 44 40 00 03 be r2,r0,800c6c8 <pipe_create+0x60> <== NOT EXECUTED
800c6c0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800c6c4: d8 40 00 00 call r2 <== NOT EXECUTED
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
800c6c8: 78 04 08 01 mvhi r4,0x801
800c6cc: 38 84 e6 ae ori r4,r4,0xe6ae
800c6d0: 2c 81 00 00 lhu r1,(r4+0)
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
800c6d4: 78 06 2f 74 mvhi r6,0x2f74
800c6d8: 78 05 2f 2e mvhi r5,0x2f2e
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
800c6dc: 34 28 00 01 addi r8,r1,1
800c6e0: 78 02 08 01 mvhi r2,0x801
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
800c6e4: 38 c6 6d 70 ori r6,r6,0x6d70
800c6e8: 38 a5 66 69 ori r5,r5,0x6669
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
800c6ec: b8 20 18 00 mv r3,r1
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
800c6f0: 37 8b 00 30 addi r11,sp,48
800c6f4: 34 07 66 6f mvi r7,26223
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
800c6f8: 38 42 cf 40 ori r2,r2,0xcf40
800c6fc: 0c 88 00 00 sh (r4+0),r8
800c700: 37 81 00 3a addi r1,sp,58
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
800c704: 5b 86 00 30 sw (sp+48),r6
800c708: 59 65 00 04 sw (r11+4),r5
800c70c: 0d 67 00 08 sh (r11+8),r7
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
800c710: f8 00 06 c3 calli 800e21c <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
800c714: b9 60 08 00 mv r1,r11
800c718: 34 02 01 80 mvi r2,384
800c71c: f8 00 00 5e calli 800c894 <mkfifo>
800c720: b8 20 60 00 mv r12,r1
800c724: 5c 20 00 1e bne r1,r0,800c79c <pipe_create+0x134> <== NEVER TAKEN
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);
800c728: b9 60 08 00 mv r1,r11
800c72c: 34 02 40 00 mvi r2,16384
800c730: fb ff d4 b5 calli 8001a04 <open>
800c734: 59 a1 00 00 sw (r13+0),r1
if (filsdes[0] < 0) {
800c738: 4c 2c 00 06 bge r1,r12,800c750 <pipe_create+0xe8> <== NEVER TAKEN
err = errno;
800c73c: f8 00 03 12 calli 800d384 <__errno>
800c740: 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);
800c744: b9 60 08 00 mv r1,r11
800c748: f8 00 00 5c calli 800c8b8 <unlink>
800c74c: e0 00 00 11 bi 800c790 <pipe_create+0x128>
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
800c750: 78 03 08 01 mvhi r3,0x801 <== NOT EXECUTED
800c754: 38 63 e0 10 ori r3,r3,0xe010 <== NOT EXECUTED
800c758: 28 63 00 00 lw r3,(r3+0) <== NOT EXECUTED
800c75c: 54 61 00 24 bgu r3,r1,800c7ec <pipe_create+0x184> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
800c760: 29 83 00 18 lw r3,(r12+24) <== NOT EXECUTED
800c764: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
800c768: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
800c76c: a0 62 10 00 and r2,r3,r2 <== NOT EXECUTED
800c770: 59 82 00 18 sw (r12+24),r2 <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
800c774: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
800c778: fb ff d4 a3 calli 8001a04 <open> <== NOT EXECUTED
800c77c: 59 a1 00 04 sw (r13+4),r1 <== NOT EXECUTED
if (filsdes[1] < 0) {
800c780: 48 01 00 26 bg r0,r1,800c818 <pipe_create+0x1b0> <== NOT EXECUTED
800c784: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
800c788: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800c78c: f8 00 00 4b calli 800c8b8 <unlink> <== NOT EXECUTED
}
rtems_set_errno_and_return_minus_one(err);
800c790: f8 00 02 fd calli 800d384 <__errno>
800c794: 58 2c 00 00 sw (r1+0),r12
800c798: e0 00 00 02 bi 800c7a0 <pipe_create+0x138>
memcpy(fifopath, "/tmp/.fifo", 10);
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
if (errno != EEXIST){
800c79c: f8 00 02 fa calli 800d384 <__errno> <== NOT EXECUTED
}
unlink(fifopath);
}
rtems_set_errno_and_return_minus_one(err);
}
800c7a0: 34 01 ff ff mvi r1,-1
800c7a4: 2b 9d 00 04 lw ra,(sp+4)
800c7a8: 2b 8b 00 18 lw r11,(sp+24)
800c7ac: 2b 8c 00 14 lw r12,(sp+20)
800c7b0: 2b 8d 00 10 lw r13,(sp+16)
800c7b4: 2b 8e 00 0c lw r14,(sp+12)
800c7b8: 2b 8f 00 08 lw r15,(sp+8)
800c7bc: 37 9c 00 3c addi sp,sp,60
800c7c0: c3 a0 00 00 ret
rtems_libio_t *iop;
int err = 0;
/* Create /tmp if not exists */
if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE)
!= 0) {
if (errno != ENOENT)
800c7c4: f8 00 02 f0 calli 800d384 <__errno>
800c7c8: 28 22 00 00 lw r2,(r1+0)
800c7cc: 34 01 00 02 mvi r1,2
800c7d0: 5c 41 ff f4 bne r2,r1,800c7a0 <pipe_create+0x138> <== NEVER TAKEN
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
800c7d4: 78 01 08 01 mvhi r1,0x801
800c7d8: 38 21 cf 38 ori r1,r1,0xcf38
800c7dc: 34 02 03 ff mvi r2,1023
800c7e0: fb ff d2 81 calli 80011e4 <mkdir>
800c7e4: 44 20 ff b9 be r1,r0,800c6c8 <pipe_create+0x60> <== ALWAYS TAKEN
800c7e8: e3 ff ff ee bi 800c7a0 <pipe_create+0x138> <== NOT EXECUTED
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
800c7ec: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
800c7f0: fb ff ce 80 calli 80001f0 <__ashlsi3> <== NOT EXECUTED
800c7f4: 78 0e 08 01 mvhi r14,0x801 <== NOT EXECUTED
800c7f8: 39 ce e7 1c ori r14,r14,0xe71c <== NOT EXECUTED
800c7fc: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
800c800: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
800c804: fb ff ce 7b calli 80001f0 <__ashlsi3> <== NOT EXECUTED
800c808: 29 cc 00 00 lw r12,(r14+0) <== NOT EXECUTED
800c80c: b5 e1 08 00 add r1,r15,r1 <== NOT EXECUTED
800c810: b5 81 60 00 add r12,r12,r1 <== NOT EXECUTED
800c814: e3 ff ff d3 bi 800c760 <pipe_create+0xf8> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
err = errno;
800c818: f8 00 02 db calli 800d384 <__errno> <== NOT EXECUTED
800c81c: 28 2c 00 00 lw r12,(r1+0) <== NOT EXECUTED
close(filsdes[0]);
800c820: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED
800c824: fb ff ec 12 calli 800786c <close> <== NOT EXECUTED
800c828: e3 ff ff d8 bi 800c788 <pipe_create+0x120> <== NOT EXECUTED
0800a88c <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
800a88c: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED
800a890: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED
800a894: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED
800a898: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED
800a89c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
if (cmd == FIONREAD) {
800a8a0: 78 04 40 04 mvhi r4,0x4004 <== NOT EXECUTED
800a8a4: 38 84 66 7f ori r4,r4,0x667f <== NOT EXECUTED
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
800a8a8: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
800a8ac: b8 60 60 00 mv r12,r3 <== NOT EXECUTED
if (cmd == FIONREAD) {
800a8b0: 34 05 ff ea mvi r5,-22 <== NOT EXECUTED
800a8b4: 44 44 00 08 be r2,r4,800a8d4 <pipe_ioctl+0x48> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
800a8b8: b8 a0 08 00 mv r1,r5 <== NOT EXECUTED
800a8bc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800a8c0: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
800a8c4: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
800a8c8: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
800a8cc: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
800a8d0: c3 a0 00 00 ret <== NOT EXECUTED
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
800a8d4: 34 05 ff f2 mvi r5,-14 <== NOT EXECUTED
800a8d8: 44 60 ff f8 be r3,r0,800a8b8 <pipe_ioctl+0x2c> <== NOT EXECUTED
return -EFAULT;
if (! PIPE_LOCK(pipe))
800a8dc: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED
800a8e0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800a8e4: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
800a8e8: fb ff f9 10 calli 8008d28 <rtems_semaphore_obtain> <== NOT EXECUTED
800a8ec: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
800a8f0: 34 05 ff fc mvi r5,-4 <== NOT EXECUTED
800a8f4: 5c 20 ff f1 bne r1,r0,800a8b8 <pipe_ioctl+0x2c> <== NOT EXECUTED
return -EINTR;
/* Return length of pipe */
*(uint *)buffer = pipe->Length;
800a8f8: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED
800a8fc: 59 81 00 00 sw (r12+0),r1 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
800a900: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800a904: fb ff f9 6a calli 8008eac <rtems_semaphore_release> <== NOT EXECUTED
800a908: b9 a0 28 00 mv r5,r13 <== NOT EXECUTED
return 0;
800a90c: e3 ff ff eb bi 800a8b8 <pipe_ioctl+0x2c> <== NOT EXECUTED
0800a808 <pipe_lseek>:
rtems_libio_t *iop
)
{
/* Seek on pipe is not supported */
return -ESPIPE;
}
800a808: 34 01 ff e3 mvi r1,-29 <== NOT EXECUTED
800a80c: c3 a0 00 00 ret <== NOT EXECUTED
0800a910 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
800a910: 37 9c ff d8 addi sp,sp,-40 <== NOT EXECUTED
800a914: 5b 8b 00 24 sw (sp+36),r11 <== NOT EXECUTED
800a918: 5b 8c 00 20 sw (sp+32),r12 <== NOT EXECUTED
800a91c: 5b 8d 00 1c sw (sp+28),r13 <== NOT EXECUTED
800a920: 5b 8e 00 18 sw (sp+24),r14 <== NOT EXECUTED
800a924: 5b 8f 00 14 sw (sp+20),r15 <== NOT EXECUTED
800a928: 5b 90 00 10 sw (sp+16),r16 <== NOT EXECUTED
800a92c: 5b 91 00 0c sw (sp+12),r17 <== NOT EXECUTED
800a930: 5b 92 00 08 sw (sp+8),r18 <== NOT EXECUTED
800a934: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
800a938: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
800a93c: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
800a940: b8 40 90 00 mv r18,r2 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
800a944: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
800a948: b8 60 80 00 mv r16,r3 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
800a94c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
800a950: b8 80 78 00 mv r15,r4 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
800a954: fb ff f8 f5 calli 8008d28 <rtems_semaphore_obtain> <== NOT EXECUTED
800a958: 34 0e ff fc mvi r14,-4 <== NOT EXECUTED
800a95c: 5c 20 00 24 bne r1,r0,800a9ec <pipe_read+0xdc> <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
if (ret != 0)
800a960: b8 20 88 00 mv r17,r1 <== NOT EXECUTED
800a964: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
800a968: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
800a96c: 46 01 00 1c be r16,r1,800a9dc <pipe_read+0xcc> <== NOT EXECUTED
while (PIPE_EMPTY(pipe)) {
800a970: 29 65 00 0c lw r5,(r11+12) <== NOT EXECUTED
800a974: 5c a0 00 41 bne r5,r0,800aa78 <pipe_read+0x168> <== NOT EXECUTED
/* Not an error */
if (pipe->Writers == 0)
800a978: 29 64 00 14 lw r4,(r11+20) <== NOT EXECUTED
800a97c: 44 85 00 3d be r4,r5,800aa70 <pipe_read+0x160> <== NOT EXECUTED
goto out_locked;
if (LIBIO_NODELAY(iop)) {
800a980: 29 ed 00 18 lw r13,(r15+24) <== NOT EXECUTED
800a984: 21 ad 00 01 andi r13,r13,0x1 <== NOT EXECUTED
800a988: 5d a0 00 4f bne r13,r0,800aac4 <pipe_read+0x1b4> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
800a98c: 29 64 00 18 lw r4,(r11+24) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
800a990: 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 ++;
800a994: 34 84 00 01 addi r4,r4,1 <== NOT EXECUTED
800a998: 59 64 00 18 sw (r11+24),r4 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
800a99c: fb ff f9 44 calli 8008eac <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
800a9a0: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED
800a9a4: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED
800a9a8: f8 00 05 11 calli 800bdec <rtems_barrier_wait> <== NOT EXECUTED
800a9ac: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
800a9b0: 44 2d 00 02 be r1,r13,800a9b8 <pipe_read+0xa8> <== NOT EXECUTED
800a9b4: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
800a9b8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800a9bc: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800a9c0: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
800a9c4: fb ff f8 d9 calli 8008d28 <rtems_semaphore_obtain> <== NOT EXECUTED
800a9c8: 5c 20 00 41 bne r1,r0,800aacc <pipe_read+0x1bc> <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
800a9cc: 29 64 00 18 lw r4,(r11+24) <== NOT EXECUTED
800a9d0: 34 84 ff ff addi r4,r4,-1 <== NOT EXECUTED
800a9d4: 59 64 00 18 sw (r11+24),r4 <== NOT EXECUTED
if (ret != 0)
800a9d8: 45 81 ff e6 be r12,r1,800a970 <pipe_read+0x60> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
800a9dc: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800a9e0: fb ff f9 33 calli 8008eac <rtems_semaphore_release> <== NOT EXECUTED
out_nolock:
if (read > 0)
800a9e4: 49 c0 00 02 bg r14,r0,800a9ec <pipe_read+0xdc> <== NOT EXECUTED
800a9e8: b9 80 70 00 mv r14,r12 <== NOT EXECUTED
return read;
return ret;
}
800a9ec: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
800a9f0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800a9f4: 2b 8b 00 24 lw r11,(sp+36) <== NOT EXECUTED
800a9f8: 2b 8c 00 20 lw r12,(sp+32) <== NOT EXECUTED
800a9fc: 2b 8d 00 1c lw r13,(sp+28) <== NOT EXECUTED
800aa00: 2b 8e 00 18 lw r14,(sp+24) <== NOT EXECUTED
800aa04: 2b 8f 00 14 lw r15,(sp+20) <== NOT EXECUTED
800aa08: 2b 90 00 10 lw r16,(sp+16) <== NOT EXECUTED
800aa0c: 2b 91 00 0c lw r17,(sp+12) <== NOT EXECUTED
800aa10: 2b 92 00 08 lw r18,(sp+8) <== NOT EXECUTED
800aa14: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED
800aa18: c3 a0 00 00 ret <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
800aa1c: 29 64 00 00 lw r4,(r11+0) <== NOT EXECUTED
800aa20: b6 51 08 00 add r1,r18,r17 <== NOT EXECUTED
800aa24: b9 80 18 00 mv r3,r12 <== NOT EXECUTED
800aa28: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED
800aa2c: f8 00 0c fc calli 800de1c <memcpy> <== NOT EXECUTED
pipe->Start += chunk;
800aa30: 29 61 00 08 lw r1,(r11+8) <== NOT EXECUTED
pipe->Start %= pipe->Size;
800aa34: 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;
800aa38: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED
800aa3c: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED
pipe->Start %= pipe->Size;
800aa40: f8 00 42 cc calli 801b570 <__umodsi3> <== NOT EXECUTED
pipe->Length -= chunk;
800aa44: 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;
800aa48: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED
pipe->Length -= chunk;
800aa4c: c8 4c 08 00 sub r1,r2,r12 <== NOT EXECUTED
800aa50: 59 61 00 0c sw (r11+12),r1 <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
800aa54: 5c 20 00 02 bne r1,r0,800aa5c <pipe_read+0x14c> <== NOT EXECUTED
pipe->Start = 0;
800aa58: 59 61 00 08 sw (r11+8),r1 <== NOT EXECUTED
if (pipe->waitingWriters > 0)
800aa5c: 29 61 00 1c lw r1,(r11+28) <== NOT EXECUTED
800aa60: 5c 20 00 1e bne r1,r0,800aad8 <pipe_read+0x1c8> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
800aa64: b5 cc 70 00 add r14,r14,r12 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
800aa68: b9 c0 88 00 mv r17,r14 <== NOT EXECUTED
800aa6c: 56 0e ff c1 bgu r16,r14,800a970 <pipe_read+0x60> <== NOT EXECUTED
800aa70: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
800aa74: e3 ff ff da bi 800a9dc <pipe_read+0xcc> <== NOT EXECUTED
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
800aa78: ca 11 08 00 sub r1,r16,r17 <== NOT EXECUTED
800aa7c: b8 a0 60 00 mv r12,r5 <== NOT EXECUTED
800aa80: 50 25 00 02 bgeu r1,r5,800aa88 <pipe_read+0x178> <== NOT EXECUTED
800aa84: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
chunk1 = pipe->Size - pipe->Start;
800aa88: 29 62 00 08 lw r2,(r11+8) <== NOT EXECUTED
800aa8c: 29 6d 00 04 lw r13,(r11+4) <== NOT EXECUTED
800aa90: c9 a2 68 00 sub r13,r13,r2 <== NOT EXECUTED
if (chunk > chunk1) {
800aa94: 4d ac ff e2 bge r13,r12,800aa1c <pipe_read+0x10c> <== NOT EXECUTED
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
800aa98: 29 64 00 00 lw r4,(r11+0) <== NOT EXECUTED
800aa9c: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED
800aaa0: b6 51 08 00 add r1,r18,r17 <== NOT EXECUTED
800aaa4: b4 82 10 00 add r2,r4,r2 <== NOT EXECUTED
800aaa8: f8 00 0c dd calli 800de1c <memcpy> <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
800aaac: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED
800aab0: b6 2d 08 00 add r1,r17,r13 <== NOT EXECUTED
800aab4: b6 41 08 00 add r1,r18,r1 <== NOT EXECUTED
800aab8: c9 8d 18 00 sub r3,r12,r13 <== NOT EXECUTED
800aabc: f8 00 0c d8 calli 800de1c <memcpy> <== NOT EXECUTED
800aac0: e3 ff ff dc bi 800aa30 <pipe_read+0x120> <== NOT EXECUTED
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
800aac4: 34 0c ff f5 mvi r12,-11 <== NOT EXECUTED
800aac8: e3 ff ff c5 bi 800a9dc <pipe_read+0xcc> <== NOT EXECUTED
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
800aacc: 34 0c ff fc mvi r12,-4 <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
800aad0: 49 c0 ff c7 bg r14,r0,800a9ec <pipe_read+0xdc> <== NOT EXECUTED
800aad4: e3 ff ff c5 bi 800a9e8 <pipe_read+0xd8> <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
800aad8: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
800aadc: 37 82 00 28 addi r2,sp,40 <== NOT EXECUTED
800aae0: f8 00 04 a4 calli 800bd70 <rtems_barrier_release> <== NOT EXECUTED
800aae4: e3 ff ff e0 bi 800aa64 <pipe_read+0x154> <== NOT EXECUTED
0800ad24 <pipe_release>:
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
800ad24: 37 9c ff e4 addi sp,sp,-28 <== NOT EXECUTED
800ad28: 5b 8b 00 18 sw (sp+24),r11 <== NOT EXECUTED
800ad2c: 5b 8c 00 14 sw (sp+20),r12 <== NOT EXECUTED
800ad30: 5b 8d 00 10 sw (sp+16),r13 <== NOT EXECUTED
800ad34: 5b 8e 00 0c sw (sp+12),r14 <== NOT EXECUTED
800ad38: 5b 8f 00 08 sw (sp+8),r15 <== NOT EXECUTED
800ad3c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
800ad40: 28 2b 00 00 lw r11,(r1+0) <== NOT EXECUTED
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
800ad44: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
800ad48: 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,
800ad4c: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800ad50: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800ad54: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
800ad58: fb ff f7 f4 calli 8008d28 <rtems_semaphore_obtain> <== NOT EXECUTED
800ad5c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not released! */
if(sc != RTEMS_SUCCESSFUL)
800ad60: 5c 20 00 41 bne r1,r0,800ae64 <pipe_release+0x140> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
mode = LIBIO_ACCMODE(iop);
800ad64: 29 8d 00 18 lw r13,(r12+24) <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
800ad68: 21 a1 00 02 andi r1,r13,0x2 <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not released! */
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
mode = LIBIO_ACCMODE(iop);
800ad6c: 21 ad 00 06 andi r13,r13,0x6 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
800ad70: 44 23 00 04 be r1,r3,800ad80 <pipe_release+0x5c> <== NOT EXECUTED
pipe->Readers --;
800ad74: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
800ad78: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
800ad7c: 59 61 00 10 sw (r11+16),r1 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_WRITE)
800ad80: 21 a1 00 04 andi r1,r13,0x4 <== NOT EXECUTED
800ad84: 5c 20 00 20 bne r1,r0,800ae04 <pipe_release+0xe0> <== NOT EXECUTED
pipe->Writers --;
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
800ad88: 78 0c 08 01 mvhi r12,0x801 <== NOT EXECUTED
800ad8c: 39 8c e6 a8 ori r12,r12,0xe6a8 <== NOT EXECUTED
800ad90: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED
800ad94: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800ad98: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
800ad9c: fb ff f7 e3 calli 8008d28 <rtems_semaphore_obtain> <== NOT EXECUTED
800ada0: 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)
800ada4: 5c 20 00 30 bne r1,r0,800ae64 <pipe_release+0x140> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
800ada8: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800adac: fb ff f8 40 calli 8008eac <rtems_semaphore_release> <== NOT EXECUTED
if (pipe->Readers == 0 && pipe->Writers == 0) {
800adb0: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED
800adb4: 44 4e 00 18 be r2,r14,800ae14 <pipe_release+0xf0> <== NOT EXECUTED
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
800adb8: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
800adbc: 7d ad 00 02 cmpnei r13,r13,2 <== NOT EXECUTED
800adc0: 64 21 00 00 cmpei r1,r1,0 <== NOT EXECUTED
800adc4: a0 2d 68 00 and r13,r1,r13 <== NOT EXECUTED
800adc8: 45 a0 00 04 be r13,r0,800add8 <pipe_release+0xb4> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
800adcc: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED
800add0: 37 82 00 1c addi r2,sp,28 <== NOT EXECUTED
800add4: f8 00 03 e7 calli 800bd70 <rtems_barrier_release> <== NOT EXECUTED
rtems_semaphore_release(rtems_pipe_semaphore);
800add8: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED
800addc: fb ff f8 34 calli 8008eac <rtems_semaphore_release> <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
800ade0: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
800ade4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800ade8: 2b 8b 00 18 lw r11,(sp+24) <== NOT EXECUTED
800adec: 2b 8c 00 14 lw r12,(sp+20) <== NOT EXECUTED
800adf0: 2b 8d 00 10 lw r13,(sp+16) <== NOT EXECUTED
800adf4: 2b 8e 00 0c lw r14,(sp+12) <== NOT EXECUTED
800adf8: 2b 8f 00 08 lw r15,(sp+8) <== NOT EXECUTED
800adfc: 37 9c 00 1c addi sp,sp,28 <== NOT EXECUTED
800ae00: c3 a0 00 00 ret <== NOT EXECUTED
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
800ae04: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
800ae08: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
800ae0c: 59 61 00 14 sw (r11+20),r1 <== NOT EXECUTED
800ae10: e3 ff ff de bi 800ad88 <pipe_release+0x64> <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
800ae14: 29 6e 00 14 lw r14,(r11+20) <== NOT EXECUTED
800ae18: 45 c2 00 07 be r14,r2,800ae34 <pipe_release+0x110> <== NOT EXECUTED
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
800ae1c: 7d ad 00 04 cmpnei r13,r13,4 <== NOT EXECUTED
800ae20: 45 a2 ff ee be r13,r2,800add8 <pipe_release+0xb4> <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
800ae24: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
800ae28: 37 82 00 1c addi r2,sp,28 <== NOT EXECUTED
800ae2c: f8 00 03 d1 calli 800bd70 <rtems_barrier_release> <== NOT EXECUTED
800ae30: e3 ff ff ea bi 800add8 <pipe_release+0xb4> <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
800ae34: 29 61 00 2c lw r1,(r11+44) <== NOT EXECUTED
800ae38: f8 00 03 ae calli 800bcf0 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
800ae3c: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
800ae40: f8 00 03 ac calli 800bcf0 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
800ae44: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
800ae48: fb ff f7 75 calli 8008c1c <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
800ae4c: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
800ae50: fb ff f2 bf calli 800794c <free> <== NOT EXECUTED
free(pipe);
800ae54: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800ae58: fb ff f2 bd calli 800794c <free> <== NOT EXECUTED
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
800ae5c: 59 ee 00 00 sw (r15+0),r14 <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
800ae60: e3 ff ff de bi 800add8 <pipe_release+0xb4> <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not freed and pipep not set to NULL! */
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
800ae64: fb ff de c7 calli 8002980 <rtems_fatal_error_occurred> <== NOT EXECUTED
0800aae8 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
800aae8: 37 9c ff d4 addi sp,sp,-44 <== NOT EXECUTED
800aaec: 5b 8b 00 24 sw (sp+36),r11 <== NOT EXECUTED
800aaf0: 5b 8c 00 20 sw (sp+32),r12 <== NOT EXECUTED
800aaf4: 5b 8d 00 1c sw (sp+28),r13 <== NOT EXECUTED
800aaf8: 5b 8e 00 18 sw (sp+24),r14 <== NOT EXECUTED
800aafc: 5b 8f 00 14 sw (sp+20),r15 <== NOT EXECUTED
800ab00: 5b 90 00 10 sw (sp+16),r16 <== NOT EXECUTED
800ab04: 5b 91 00 0c sw (sp+12),r17 <== NOT EXECUTED
800ab08: 5b 92 00 08 sw (sp+8),r18 <== NOT EXECUTED
800ab0c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
800ab10: b8 60 60 00 mv r12,r3 <== NOT EXECUTED
800ab14: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
800ab18: b8 40 70 00 mv r14,r2 <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
800ab1c: b8 60 58 00 mv r11,r3 <== NOT EXECUTED
800ab20: 5c 60 00 0d bne r3,r0,800ab54 <pipe_write+0x6c> <== NOT EXECUTED
#endif
if (written > 0)
return written;
return ret;
}
800ab24: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800ab28: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800ab2c: 2b 8b 00 24 lw r11,(sp+36) <== NOT EXECUTED
800ab30: 2b 8c 00 20 lw r12,(sp+32) <== NOT EXECUTED
800ab34: 2b 8d 00 1c lw r13,(sp+28) <== NOT EXECUTED
800ab38: 2b 8e 00 18 lw r14,(sp+24) <== NOT EXECUTED
800ab3c: 2b 8f 00 14 lw r15,(sp+20) <== NOT EXECUTED
800ab40: 2b 90 00 10 lw r16,(sp+16) <== NOT EXECUTED
800ab44: 2b 91 00 0c lw r17,(sp+12) <== NOT EXECUTED
800ab48: 2b 92 00 08 lw r18,(sp+8) <== NOT EXECUTED
800ab4c: 37 9c 00 2c addi sp,sp,44 <== NOT EXECUTED
800ab50: c3 a0 00 00 ret <== NOT EXECUTED
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
800ab54: 28 21 00 28 lw r1,(r1+40) <== NOT EXECUTED
800ab58: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800ab5c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
800ab60: 5b 84 00 28 sw (sp+40),r4 <== NOT EXECUTED
800ab64: fb ff f8 71 calli 8008d28 <rtems_semaphore_obtain> <== NOT EXECUTED
800ab68: 34 0b ff fc mvi r11,-4 <== NOT EXECUTED
800ab6c: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED
800ab70: 5c 20 ff ed bne r1,r0,800ab24 <pipe_write+0x3c> <== NOT EXECUTED
return -EINTR;
if (pipe->Readers == 0) {
800ab74: 29 ab 00 10 lw r11,(r13+16) <== NOT EXECUTED
800ab78: 45 61 00 54 be r11,r1,800acc8 <pipe_write+0x1e0> <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
800ab7c: 29 af 00 04 lw r15,(r13+4) <== NOT EXECUTED
}
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
800ab80: 34 11 00 01 mvi r17,1 <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
800ab84: 55 8f 00 02 bgu r12,r15,800ab8c <pipe_write+0xa4> <== NOT EXECUTED
800ab88: b9 80 88 00 mv r17,r12 <== NOT EXECUTED
}
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
800ab8c: 34 12 00 00 mvi r18,0 <== NOT EXECUTED
800ab90: ba 40 58 00 mv r11,r18 <== NOT EXECUTED
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
800ab94: 29 a1 00 0c lw r1,(r13+12) <== NOT EXECUTED
800ab98: c9 e1 18 00 sub r3,r15,r1 <== NOT EXECUTED
800ab9c: 56 23 00 2c bgu r17,r3,800ac4c <pipe_write+0x164> <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
800aba0: c9 92 10 00 sub r2,r12,r18 <== NOT EXECUTED
800aba4: b8 60 80 00 mv r16,r3 <== NOT EXECUTED
800aba8: 50 43 00 02 bgeu r2,r3,800abb0 <pipe_write+0xc8> <== NOT EXECUTED
800abac: b8 40 80 00 mv r16,r2 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
800abb0: 29 a3 00 08 lw r3,(r13+8) <== NOT EXECUTED
800abb4: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED
800abb8: 5b 84 00 28 sw (sp+40),r4 <== NOT EXECUTED
800abbc: b4 23 08 00 add r1,r1,r3 <== NOT EXECUTED
800abc0: f8 00 42 6c calli 801b570 <__umodsi3> <== NOT EXECUTED
800abc4: c9 e1 78 00 sub r15,r15,r1 <== NOT EXECUTED
if (chunk > chunk1) {
800abc8: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED
800abcc: 4d f0 00 48 bge r15,r16,800acec <pipe_write+0x204> <== NOT EXECUTED
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
800abd0: 29 a5 00 00 lw r5,(r13+0) <== NOT EXECUTED
800abd4: b5 d2 10 00 add r2,r14,r18 <== NOT EXECUTED
800abd8: b9 e0 18 00 mv r3,r15 <== NOT EXECUTED
800abdc: b4 a1 08 00 add r1,r5,r1 <== NOT EXECUTED
800abe0: f8 00 0c 8f calli 800de1c <memcpy> <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
800abe4: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED
800abe8: b5 f2 10 00 add r2,r15,r18 <== NOT EXECUTED
800abec: b5 c2 10 00 add r2,r14,r2 <== NOT EXECUTED
800abf0: ca 0f 18 00 sub r3,r16,r15 <== NOT EXECUTED
800abf4: f8 00 0c 8a calli 800de1c <memcpy> <== NOT EXECUTED
800abf8: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
800abfc: 29 a1 00 0c lw r1,(r13+12) <== NOT EXECUTED
if (pipe->waitingReaders > 0)
800ac00: 29 a2 00 18 lw r2,(r13+24) <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
800ac04: b4 30 08 00 add r1,r1,r16 <== NOT EXECUTED
800ac08: 59 a1 00 0c sw (r13+12),r1 <== NOT EXECUTED
if (pipe->waitingReaders > 0)
800ac0c: 5c 40 00 40 bne r2,r0,800ad0c <pipe_write+0x224> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
written += chunk;
800ac10: b5 70 58 00 add r11,r11,r16 <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
800ac14: b9 60 90 00 mv r18,r11 <== NOT EXECUTED
800ac18: 55 8b 00 2e bgu r12,r11,800acd0 <pipe_write+0x1e8> <== NOT EXECUTED
800ac1c: 34 0f 00 00 mvi r15,0 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
800ac20: 29 a1 00 28 lw r1,(r13+40) <== NOT EXECUTED
800ac24: fb ff f8 a2 calli 8008eac <rtems_semaphore_release> <== NOT EXECUTED
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
800ac28: 34 01 ff e0 mvi r1,-32 <== NOT EXECUTED
800ac2c: 45 e1 00 04 be r15,r1,800ac3c <pipe_write+0x154> <== NOT EXECUTED
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
800ac30: 49 60 ff bd bg r11,r0,800ab24 <pipe_write+0x3c> <== NOT EXECUTED
800ac34: b9 e0 58 00 mv r11,r15 <== NOT EXECUTED
800ac38: e3 ff ff bb bi 800ab24 <pipe_write+0x3c> <== NOT EXECUTED
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
800ac3c: f8 00 02 ab calli 800b6e8 <getpid> <== NOT EXECUTED
800ac40: 34 02 00 0d mvi r2,13 <== NOT EXECUTED
800ac44: f8 00 03 1a calli 800b8ac <kill> <== NOT EXECUTED
800ac48: e3 ff ff fa bi 800ac30 <pipe_write+0x148> <== NOT EXECUTED
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
800ac4c: 28 90 00 18 lw r16,(r4+24) <== NOT EXECUTED
800ac50: 22 10 00 01 andi r16,r16,0x1 <== NOT EXECUTED
800ac54: 5e 00 00 22 bne r16,r0,800acdc <pipe_write+0x1f4> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
800ac58: 29 a3 00 1c lw r3,(r13+28) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
800ac5c: 29 a1 00 28 lw r1,(r13+40) <== NOT EXECUTED
800ac60: 5b 84 00 28 sw (sp+40),r4 <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
800ac64: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED
800ac68: 59 a3 00 1c sw (r13+28),r3 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
800ac6c: fb ff f8 90 calli 8008eac <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
800ac70: 29 a1 00 30 lw r1,(r13+48) <== NOT EXECUTED
800ac74: ba 00 10 00 mv r2,r16 <== NOT EXECUTED
800ac78: f8 00 04 5d calli 800bdec <rtems_barrier_wait> <== NOT EXECUTED
800ac7c: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
800ac80: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED
800ac84: 44 30 00 02 be r1,r16,800ac8c <pipe_write+0x1a4> <== NOT EXECUTED
800ac88: 34 0f ff fc mvi r15,-4 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
800ac8c: 29 a1 00 28 lw r1,(r13+40) <== NOT EXECUTED
800ac90: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800ac94: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
800ac98: 5b 84 00 28 sw (sp+40),r4 <== NOT EXECUTED
800ac9c: fb ff f8 23 calli 8008d28 <rtems_semaphore_obtain> <== NOT EXECUTED
800aca0: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED
800aca4: 5c 20 00 10 bne r1,r0,800ace4 <pipe_write+0x1fc> <== NOT EXECUTED
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
800aca8: 29 a3 00 1c lw r3,(r13+28) <== NOT EXECUTED
800acac: 34 63 ff ff addi r3,r3,-1 <== NOT EXECUTED
800acb0: 59 a3 00 1c sw (r13+28),r3 <== NOT EXECUTED
if (ret != 0)
800acb4: 5d e1 ff db bne r15,r1,800ac20 <pipe_write+0x138> <== NOT EXECUTED
goto out_locked;
if (pipe->Readers == 0) {
800acb8: 29 a1 00 10 lw r1,(r13+16) <== NOT EXECUTED
800acbc: 44 2f 00 03 be r1,r15,800acc8 <pipe_write+0x1e0> <== NOT EXECUTED
800acc0: 29 af 00 04 lw r15,(r13+4) <== NOT EXECUTED
800acc4: e3 ff ff b4 bi 800ab94 <pipe_write+0xac> <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
800acc8: 34 0f ff e0 mvi r15,-32 <== NOT EXECUTED
800accc: e3 ff ff d5 bi 800ac20 <pipe_write+0x138> <== NOT EXECUTED
800acd0: 29 af 00 04 lw r15,(r13+4) <== NOT EXECUTED
800acd4: 34 11 00 01 mvi r17,1 <== NOT EXECUTED
800acd8: e3 ff ff af bi 800ab94 <pipe_write+0xac> <== NOT EXECUTED
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
800acdc: 34 0f ff f5 mvi r15,-11 <== NOT EXECUTED
800ace0: e3 ff ff d0 bi 800ac20 <pipe_write+0x138> <== NOT EXECUTED
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
800ace4: 34 0f ff fc mvi r15,-4 <== NOT EXECUTED
800ace8: e3 ff ff d2 bi 800ac30 <pipe_write+0x148> <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
800acec: 29 a5 00 00 lw r5,(r13+0) <== NOT EXECUTED
800acf0: b5 d2 10 00 add r2,r14,r18 <== NOT EXECUTED
800acf4: ba 00 18 00 mv r3,r16 <== NOT EXECUTED
800acf8: b4 a1 08 00 add r1,r5,r1 <== NOT EXECUTED
800acfc: 5b 84 00 28 sw (sp+40),r4 <== NOT EXECUTED
800ad00: f8 00 0c 47 calli 800de1c <memcpy> <== NOT EXECUTED
800ad04: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED
800ad08: e3 ff ff bd bi 800abfc <pipe_write+0x114> <== NOT EXECUTED
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
800ad0c: 29 a1 00 2c lw r1,(r13+44) <== NOT EXECUTED
800ad10: 37 82 00 2c addi r2,sp,44 <== NOT EXECUTED
800ad14: 5b 84 00 28 sw (sp+40),r4 <== NOT EXECUTED
800ad18: f8 00 04 16 calli 800bd70 <rtems_barrier_release> <== NOT EXECUTED
800ad1c: 2b 84 00 28 lw r4,(sp+40) <== NOT EXECUTED
800ad20: e3 ff ff bc bi 800ac10 <pipe_write+0x128> <== NOT EXECUTED
08006ff0 <pthread_attr_getinheritsched>:
int pthread_attr_getinheritsched(
const pthread_attr_t *attr,
int *inheritsched
)
{
if ( !attr || !attr->is_initialized || !inheritsched )
8006ff0: 44 20 00 0a be r1,r0,8007018 <pthread_attr_getinheritsched+0x28><== NEVER TAKEN
8006ff4: 28 23 00 00 lw r3,(r1+0)
8006ff8: 64 44 00 00 cmpei r4,r2,0
8006ffc: 64 63 00 00 cmpei r3,r3,0
8007000: b8 83 18 00 or r3,r4,r3
8007004: 5c 60 00 05 bne r3,r0,8007018 <pthread_attr_getinheritsched+0x28>
return EINVAL;
*inheritsched = attr->inheritsched;
8007008: 28 21 00 10 lw r1,(r1+16)
800700c: 58 41 00 00 sw (r2+0),r1
8007010: b8 60 08 00 mv r1,r3
return 0;
8007014: c3 a0 00 00 ret
8007018: 34 01 00 16 mvi r1,22
}
800701c: c3 a0 00 00 ret
08007294 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
8007294: 44 20 00 0d be r1,r0,80072c8 <pthread_attr_setschedpolicy+0x34>
8007298: 28 23 00 00 lw r3,(r1+0)
800729c: 44 60 00 0b be r3,r0,80072c8 <pthread_attr_setschedpolicy+0x34>
return EINVAL;
switch ( policy ) {
80072a0: 48 02 00 05 bg r0,r2,80072b4 <pthread_attr_setschedpolicy+0x20>
80072a4: 34 03 00 02 mvi r3,2
80072a8: 4c 62 00 05 bge r3,r2,80072bc <pthread_attr_setschedpolicy+0x28>
80072ac: 34 03 00 04 mvi r3,4
80072b0: 44 43 00 03 be r2,r3,80072bc <pthread_attr_setschedpolicy+0x28><== ALWAYS TAKEN
80072b4: 34 01 00 86 mvi r1,134
80072b8: c3 a0 00 00 ret
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
80072bc: 58 22 00 14 sw (r1+20),r2
80072c0: 34 01 00 00 mvi r1,0
return 0;
80072c4: c3 a0 00 00 ret
80072c8: 34 01 00 16 mvi r1,22
default:
return ENOTSUP;
}
}
80072cc: c3 a0 00 00 ret
080030b4 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
80030b4: 37 9c ff d4 addi sp,sp,-44
80030b8: 5b 8b 00 18 sw (sp+24),r11
80030bc: 5b 8c 00 14 sw (sp+20),r12
80030c0: 5b 8d 00 10 sw (sp+16),r13
80030c4: 5b 8e 00 0c sw (sp+12),r14
80030c8: 5b 8f 00 08 sw (sp+8),r15
80030cc: 5b 9d 00 04 sw (sp+4),ra
80030d0: b8 20 58 00 mv r11,r1
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
80030d4: 44 20 00 08 be r1,r0,80030f4 <pthread_barrier_init+0x40>
return EINVAL;
if ( count == 0 )
80030d8: 44 60 00 07 be r3,r0,80030f4 <pthread_barrier_init+0x40>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
80030dc: b8 40 20 00 mv r4,r2
80030e0: 44 40 00 35 be r2,r0,80031b4 <pthread_barrier_init+0x100>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
80030e4: 28 81 00 00 lw r1,(r4+0)
80030e8: 44 20 00 03 be r1,r0,80030f4 <pthread_barrier_init+0x40>
return EINVAL;
switch ( the_attr->process_shared ) {
80030ec: 28 8c 00 04 lw r12,(r4+4)
80030f0: 45 80 00 0a be r12,r0,8003118 <pthread_barrier_init+0x64> <== ALWAYS TAKEN
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
_Thread_Enable_dispatch();
return 0;
80030f4: 34 01 00 16 mvi r1,22
}
80030f8: 2b 9d 00 04 lw ra,(sp+4)
80030fc: 2b 8b 00 18 lw r11,(sp+24)
8003100: 2b 8c 00 14 lw r12,(sp+20)
8003104: 2b 8d 00 10 lw r13,(sp+16)
8003108: 2b 8e 00 0c lw r14,(sp+12)
800310c: 2b 8f 00 08 lw r15,(sp+8)
8003110: 37 9c 00 2c addi sp,sp,44
8003114: c3 a0 00 00 ret
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8003118: 78 01 08 02 mvhi r1,0x802
800311c: 38 21 08 7c ori r1,r1,0x87c
8003120: 28 22 00 00 lw r2,(r1+0)
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
the_attributes.maximum_count = count;
8003124: 5b 83 00 2c sw (sp+44),r3
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
8003128: 5b 8c 00 28 sw (sp+40),r12
800312c: 34 42 00 01 addi r2,r2,1
8003130: 58 22 00 00 sw (r1+0),r2
* 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 *)
8003134: 78 01 08 02 mvhi r1,0x802
8003138: 38 21 0b fc ori r1,r1,0xbfc
800313c: f8 00 07 50 calli 8004e7c <_Objects_Allocate>
8003140: b8 20 68 00 mv r13,r1
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
8003144: 44 2c 00 19 be r1,r12,80031a8 <pthread_barrier_init+0xf4>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
8003148: 37 82 00 28 addi r2,sp,40
800314c: 34 21 00 10 addi r1,r1,16
8003150: f8 00 04 8f calli 800438c <_CORE_barrier_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8003154: 78 01 08 02 mvhi r1,0x802
8003158: 29 ae 00 08 lw r14,(r13+8)
800315c: 38 21 0b fc ori r1,r1,0xbfc
8003160: 28 2f 00 1c lw r15,(r1+28)
8003164: 34 02 00 02 mvi r2,2
8003168: 21 c1 ff ff andi r1,r14,0xffff
800316c: fb ff f7 bc calli 800105c <__ashlsi3>
8003170: b5 e1 08 00 add r1,r15,r1
8003174: 58 2d 00 00 sw (r1+0),r13
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
8003178: 59 ac 00 0c sw (r13+12),r12
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
800317c: 59 6e 00 00 sw (r11+0),r14
_Thread_Enable_dispatch();
8003180: f8 00 0a c3 calli 8005c8c <_Thread_Enable_dispatch>
8003184: b9 80 08 00 mv r1,r12
return 0;
}
8003188: 2b 9d 00 04 lw ra,(sp+4)
800318c: 2b 8b 00 18 lw r11,(sp+24)
8003190: 2b 8c 00 14 lw r12,(sp+20)
8003194: 2b 8d 00 10 lw r13,(sp+16)
8003198: 2b 8e 00 0c lw r14,(sp+12)
800319c: 2b 8f 00 08 lw r15,(sp+8)
80031a0: 37 9c 00 2c addi sp,sp,44
80031a4: c3 a0 00 00 ret
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
80031a8: f8 00 0a b9 calli 8005c8c <_Thread_Enable_dispatch>
80031ac: 34 01 00 0b mvi r1,11
return EAGAIN;
80031b0: e3 ff ff d2 bi 80030f8 <pthread_barrier_init+0x44>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
80031b4: 37 8c 00 20 addi r12,sp,32
80031b8: b9 80 08 00 mv r1,r12
80031bc: 5b 83 00 1c sw (sp+28),r3
80031c0: fb ff ff 7f calli 8002fbc <pthread_barrierattr_init>
80031c4: b9 80 20 00 mv r4,r12
80031c8: 2b 83 00 1c lw r3,(sp+28)
80031cc: e3 ff ff c6 bi 80030e4 <pthread_barrier_init+0x30>
08002fe0 <pthread_barrierattr_setpshared>:
int pthread_barrierattr_setpshared(
pthread_barrierattr_t *attr,
int pshared
)
{
if ( !attr )
8002fe0: 44 20 00 08 be r1,r0,8003000 <pthread_barrierattr_setpshared+0x20><== NEVER TAKEN
return EINVAL;
if ( !attr->is_initialized )
8002fe4: 28 23 00 00 lw r3,(r1+0)
8002fe8: 44 60 00 06 be r3,r0,8003000 <pthread_barrierattr_setpshared+0x20><== NEVER TAKEN
return EINVAL;
switch ( pshared ) {
8002fec: 34 03 00 01 mvi r3,1
8002ff0: 54 43 00 04 bgu r2,r3,8003000 <pthread_barrierattr_setpshared+0x20><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
8002ff4: 58 22 00 04 sw (r1+4),r2
8002ff8: 34 01 00 00 mvi r1,0
return 0;
8002ffc: c3 a0 00 00 ret
8003000: 34 01 00 16 mvi r1,22
default:
return EINVAL;
}
}
8003004: c3 a0 00 00 ret
08001f70 <pthread_cleanup_pop>:
*/
void pthread_cleanup_pop(
int execute
)
{
8001f70: 37 9c ff f0 addi sp,sp,-16
8001f74: 5b 8b 00 10 sw (sp+16),r11
8001f78: 5b 8c 00 0c sw (sp+12),r12
8001f7c: 5b 8d 00 08 sw (sp+8),r13
8001f80: 5b 9d 00 04 sw (sp+4),ra
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8001f84: 78 02 08 01 mvhi r2,0x801
8001f88: 38 42 e8 3c ori r2,r2,0xe83c
POSIX_Cancel_Handler_control tmp_handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
8001f8c: 78 03 08 01 mvhi r3,0x801
8001f90: 28 44 00 00 lw r4,(r2+0)
8001f94: 38 63 e8 f8 ori r3,r3,0xe8f8
8001f98: 28 63 00 00 lw r3,(r3+0)
8001f9c: 34 84 00 01 addi r4,r4,1
8001fa0: 58 44 00 00 sw (r2+0),r4
*/
void pthread_cleanup_pop(
int execute
)
{
8001fa4: b8 20 60 00 mv r12,r1
POSIX_Cancel_Handler_control tmp_handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
8001fa8: 28 62 01 2c lw r2,(r3+300)
* ensure that we do not get prempted and deleted while we are holding
* memory that needs to be freed.
*/
_Thread_Disable_dispatch();
_ISR_Disable( level );
8001fac: 90 00 58 00 rcsr r11,IE
8001fb0: 34 03 ff fe mvi r3,-2
8001fb4: a1 63 18 00 and r3,r11,r3
8001fb8: d0 03 00 00 wcsr IE,r3
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
8001fbc: 28 43 00 e0 lw r3,(r2+224)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
8001fc0: 34 42 00 e4 addi r2,r2,228
8001fc4: 44 62 00 15 be r3,r2,8002018 <pthread_cleanup_pop+0xa8>
_Thread_Enable_dispatch();
_ISR_Enable( level );
return;
}
handler = (POSIX_Cancel_Handler_control *)
8001fc8: 28 42 00 04 lw r2,(r2+4)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
8001fcc: 28 43 00 00 lw r3,(r2+0)
previous = the_node->previous;
8001fd0: 28 41 00 04 lw r1,(r2+4)
next->previous = previous;
previous->next = next;
8001fd4: 58 23 00 00 sw (r1+0),r3
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
8001fd8: 58 61 00 04 sw (r3+4),r1
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
8001fdc: d0 0b 00 00 wcsr IE,r11
tmp_handler = *handler;
_Workspace_Free( handler );
8001fe0: b8 40 08 00 mv r1,r2
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
tmp_handler = *handler;
8001fe4: 28 4d 00 0c lw r13,(r2+12)
8001fe8: 28 4b 00 08 lw r11,(r2+8)
_Workspace_Free( handler );
8001fec: f8 00 09 54 calli 800453c <_Workspace_Free>
_Thread_Enable_dispatch();
8001ff0: f8 00 06 86 calli 8003a08 <_Thread_Enable_dispatch>
if ( execute )
8001ff4: 45 80 00 03 be r12,r0,8002000 <pthread_cleanup_pop+0x90> <== NEVER TAKEN
(*tmp_handler.routine)( tmp_handler.arg );
8001ff8: b9 a0 08 00 mv r1,r13
8001ffc: d9 60 00 00 call r11
}
8002000: 2b 9d 00 04 lw ra,(sp+4)
8002004: 2b 8b 00 10 lw r11,(sp+16)
8002008: 2b 8c 00 0c lw r12,(sp+12)
800200c: 2b 8d 00 08 lw r13,(sp+8)
8002010: 37 9c 00 10 addi sp,sp,16
8002014: c3 a0 00 00 ret
_Thread_Disable_dispatch();
_ISR_Disable( level );
if ( _Chain_Is_empty( handler_stack ) ) {
_Thread_Enable_dispatch();
8002018: f8 00 06 7c calli 8003a08 <_Thread_Enable_dispatch>
_ISR_Enable( level );
800201c: d0 0b 00 00 wcsr IE,r11
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
}
8002020: 2b 9d 00 04 lw ra,(sp+4)
8002024: 2b 8b 00 10 lw r11,(sp+16)
8002028: 2b 8c 00 0c lw r12,(sp+12)
800202c: 2b 8d 00 08 lw r13,(sp+8)
8002030: 37 9c 00 10 addi sp,sp,16
8002034: c3 a0 00 00 ret
08002680 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
8002680: 37 9c ff f4 addi sp,sp,-12
8002684: 5b 8b 00 0c sw (sp+12),r11
8002688: 5b 8c 00 08 sw (sp+8),r12
800268c: 5b 9d 00 04 sw (sp+4),ra
8002690: b8 20 58 00 mv r11,r1
8002694: 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 )
8002698: 44 20 00 14 be r1,r0,80026e8 <pthread_cleanup_push+0x68>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
800269c: 78 03 08 02 mvhi r3,0x802
80026a0: 38 63 08 64 ori r3,r3,0x864
80026a4: 28 61 00 00 lw r1,(r3+0)
80026a8: 34 21 00 01 addi r1,r1,1
80026ac: 58 61 00 00 sw (r3+0),r1
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
80026b0: 34 01 00 10 mvi r1,16
80026b4: f8 00 10 ac calli 8006964 <_Workspace_Allocate>
80026b8: b8 20 18 00 mv r3,r1
if ( handler ) {
80026bc: 44 20 00 0a be r1,r0,80026e4 <pthread_cleanup_push+0x64> <== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
80026c0: 78 04 08 02 mvhi r4,0x802
80026c4: 38 84 09 20 ori r4,r4,0x920
80026c8: 28 81 00 00 lw r1,(r4+0)
handler->routine = routine;
80026cc: 58 6b 00 08 sw (r3+8),r11
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
80026d0: 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;
80026d4: 28 21 01 2c lw r1,(r1+300)
handler->routine = routine;
handler->arg = arg;
80026d8: 58 6c 00 0c sw (r3+12),r12
_Chain_Append( handler_stack, &handler->Node );
80026dc: 34 21 00 e0 addi r1,r1,224
80026e0: f8 00 04 c1 calli 80039e4 <_Chain_Append>
}
_Thread_Enable_dispatch();
80026e4: f8 00 0a b2 calli 80051ac <_Thread_Enable_dispatch>
}
80026e8: 2b 9d 00 04 lw ra,(sp+4)
80026ec: 2b 8b 00 0c lw r11,(sp+12)
80026f0: 2b 8c 00 08 lw r12,(sp+8)
80026f4: 37 9c 00 0c addi sp,sp,12
80026f8: c3 a0 00 00 ret
08003b64 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
8003b64: 37 9c ff e8 addi sp,sp,-24
8003b68: 5b 8b 00 18 sw (sp+24),r11
8003b6c: 5b 8c 00 14 sw (sp+20),r12
8003b70: 5b 8d 00 10 sw (sp+16),r13
8003b74: 5b 8e 00 0c sw (sp+12),r14
8003b78: 5b 8f 00 08 sw (sp+8),r15
8003b7c: 5b 9d 00 04 sw (sp+4),ra
8003b80: b8 20 70 00 mv r14,r1
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
8003b84: b8 40 58 00 mv r11,r2
8003b88: 44 40 00 37 be r2,r0,8003c64 <pthread_cond_init+0x100>
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
8003b8c: 29 61 00 04 lw r1,(r11+4)
8003b90: 34 02 00 01 mvi r2,1
8003b94: 44 22 00 04 be r1,r2,8003ba4 <pthread_cond_init+0x40> <== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
8003b98: 29 61 00 00 lw r1,(r11+0)
8003b9c: 34 0d 00 00 mvi r13,0
8003ba0: 5c 2d 00 0a bne r1,r13,8003bc8 <pthread_cond_init+0x64>
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
8003ba4: 34 01 00 16 mvi r1,22
}
8003ba8: 2b 9d 00 04 lw ra,(sp+4)
8003bac: 2b 8b 00 18 lw r11,(sp+24)
8003bb0: 2b 8c 00 14 lw r12,(sp+20)
8003bb4: 2b 8d 00 10 lw r13,(sp+16)
8003bb8: 2b 8e 00 0c lw r14,(sp+12)
8003bbc: 2b 8f 00 08 lw r15,(sp+8)
8003bc0: 37 9c 00 18 addi sp,sp,24
8003bc4: c3 a0 00 00 ret
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8003bc8: 78 02 08 02 mvhi r2,0x802
8003bcc: 38 42 18 74 ori r2,r2,0x1874
8003bd0: 28 41 00 00 lw r1,(r2+0)
8003bd4: 34 21 00 01 addi r1,r1,1
8003bd8: 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 *)
8003bdc: 78 01 08 02 mvhi r1,0x802
8003be0: 38 21 1c 8c ori r1,r1,0x1c8c
8003be4: f8 00 09 1f calli 8006060 <_Objects_Allocate>
8003be8: b8 20 60 00 mv r12,r1
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
8003bec: 44 2d 00 21 be r1,r13,8003c70 <pthread_cond_init+0x10c>
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
8003bf0: 29 6b 00 04 lw r11,(r11+4)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
8003bf4: 34 03 08 00 mvi r3,2048
8003bf8: 34 04 00 74 mvi r4,116
if ( !the_cond ) {
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
8003bfc: 58 2b 00 10 sw (r1+16),r11
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
8003c00: 58 2d 00 14 sw (r1+20),r13
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
8003c04: b9 a0 10 00 mv r2,r13
8003c08: 34 21 00 18 addi r1,r1,24
8003c0c: f8 00 0f 9e calli 8007a84 <_Thread_queue_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8003c10: 78 02 08 02 mvhi r2,0x802
8003c14: 29 8b 00 08 lw r11,(r12+8)
8003c18: 38 42 1c 8c ori r2,r2,0x1c8c
8003c1c: 28 4f 00 1c lw r15,(r2+28)
8003c20: 21 61 ff ff andi r1,r11,0xffff
8003c24: 34 02 00 02 mvi r2,2
8003c28: fb ff f7 74 calli 80019f8 <__ashlsi3>
8003c2c: b5 e1 08 00 add r1,r15,r1
8003c30: 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;
8003c34: 59 8d 00 0c sw (r12+12),r13
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
8003c38: 59 cb 00 00 sw (r14+0),r11
_Thread_Enable_dispatch();
8003c3c: f8 00 0d 29 calli 80070e0 <_Thread_Enable_dispatch>
8003c40: b9 a0 08 00 mv r1,r13
return 0;
}
8003c44: 2b 9d 00 04 lw ra,(sp+4)
8003c48: 2b 8b 00 18 lw r11,(sp+24)
8003c4c: 2b 8c 00 14 lw r12,(sp+20)
8003c50: 2b 8d 00 10 lw r13,(sp+16)
8003c54: 2b 8e 00 0c lw r14,(sp+12)
8003c58: 2b 8f 00 08 lw r15,(sp+8)
8003c5c: 37 9c 00 18 addi sp,sp,24
8003c60: c3 a0 00 00 ret
)
{
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
8003c64: 78 0b 08 01 mvhi r11,0x801
8003c68: 39 6b f9 80 ori r11,r11,0xf980
8003c6c: e3 ff ff c8 bi 8003b8c <pthread_cond_init+0x28>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
8003c70: f8 00 0d 1c calli 80070e0 <_Thread_Enable_dispatch>
8003c74: 34 01 00 0c mvi r1,12
return ENOMEM;
8003c78: e3 ff ff cc bi 8003ba8 <pthread_cond_init+0x44>
0800399c <pthread_condattr_destroy>:
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
800399c: 34 02 00 00 mvi r2,0
80039a0: 44 22 00 06 be r1,r2,80039b8 <pthread_condattr_destroy+0x1c>
80039a4: 28 23 00 00 lw r3,(r1+0)
80039a8: 44 62 00 04 be r3,r2,80039b8 <pthread_condattr_destroy+0x1c><== NEVER TAKEN
return EINVAL;
attr->is_initialized = false;
80039ac: 58 22 00 00 sw (r1+0),r2
80039b0: b8 40 08 00 mv r1,r2
return 0;
80039b4: c3 a0 00 00 ret
80039b8: 34 01 00 16 mvi r1,22
}
80039bc: c3 a0 00 00 ret
08002c58 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
8002c58: 37 9c ff a4 addi sp,sp,-92
8002c5c: 5b 8b 00 38 sw (sp+56),r11
8002c60: 5b 8c 00 34 sw (sp+52),r12
8002c64: 5b 8d 00 30 sw (sp+48),r13
8002c68: 5b 8e 00 2c sw (sp+44),r14
8002c6c: 5b 8f 00 28 sw (sp+40),r15
8002c70: 5b 90 00 24 sw (sp+36),r16
8002c74: 5b 91 00 20 sw (sp+32),r17
8002c78: 5b 92 00 1c sw (sp+28),r18
8002c7c: 5b 93 00 18 sw (sp+24),r19
8002c80: 5b 94 00 14 sw (sp+20),r20
8002c84: 5b 9d 00 10 sw (sp+16),ra
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
8002c88: 34 0c 00 0e mvi r12,14
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
8002c8c: b8 60 68 00 mv r13,r3
8002c90: b8 20 78 00 mv r15,r1
8002c94: b8 80 70 00 mv r14,r4
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
8002c98: 44 60 00 12 be r3,r0,8002ce0 <pthread_create+0x88>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
8002c9c: b8 40 58 00 mv r11,r2
8002ca0: 44 40 00 65 be r2,r0,8002e34 <pthread_create+0x1dc>
if ( !the_attr->is_initialized )
8002ca4: 29 61 00 00 lw r1,(r11+0)
8002ca8: 44 20 00 0d be r1,r0,8002cdc <pthread_create+0x84>
* 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) )
8002cac: 29 61 00 04 lw r1,(r11+4)
8002cb0: 44 20 00 06 be r1,r0,8002cc8 <pthread_create+0x70>
8002cb4: 78 02 08 01 mvhi r2,0x801
8002cb8: 38 42 f0 e0 ori r2,r2,0xf0e0
8002cbc: 28 41 00 00 lw r1,(r2+0)
8002cc0: 29 62 00 08 lw r2,(r11+8)
8002cc4: 54 22 00 06 bgu r1,r2,8002cdc <pthread_create+0x84>
* 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 ) {
8002cc8: 29 61 00 10 lw r1,(r11+16)
8002ccc: 34 02 00 01 mvi r2,1
8002cd0: 44 22 00 5c be r1,r2,8002e40 <pthread_create+0x1e8>
8002cd4: 34 02 00 02 mvi r2,2
8002cd8: 44 22 00 10 be r1,r2,8002d18 <pthread_create+0xc0>
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
8002cdc: 34 0c 00 16 mvi r12,22
}
8002ce0: b9 80 08 00 mv r1,r12
8002ce4: 2b 9d 00 10 lw ra,(sp+16)
8002ce8: 2b 8b 00 38 lw r11,(sp+56)
8002cec: 2b 8c 00 34 lw r12,(sp+52)
8002cf0: 2b 8d 00 30 lw r13,(sp+48)
8002cf4: 2b 8e 00 2c lw r14,(sp+44)
8002cf8: 2b 8f 00 28 lw r15,(sp+40)
8002cfc: 2b 90 00 24 lw r16,(sp+36)
8002d00: 2b 91 00 20 lw r17,(sp+32)
8002d04: 2b 92 00 1c lw r18,(sp+28)
8002d08: 2b 93 00 18 lw r19,(sp+24)
8002d0c: 2b 94 00 14 lw r20,(sp+20)
8002d10: 37 9c 00 5c addi sp,sp,92
8002d14: c3 a0 00 00 ret
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
8002d18: 29 67 00 18 lw r7,(r11+24)
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
8002d1c: 29 71 00 14 lw r17,(r11+20)
schedparam = the_attr->schedparam;
8002d20: 5b 87 00 3c sw (sp+60),r7
8002d24: 29 69 00 1c lw r9,(r11+28)
8002d28: 5b 89 00 40 sw (sp+64),r9
8002d2c: 29 61 00 20 lw r1,(r11+32)
8002d30: 5b 81 00 44 sw (sp+68),r1
8002d34: 29 62 00 24 lw r2,(r11+36)
8002d38: 5b 82 00 48 sw (sp+72),r2
8002d3c: 29 66 00 28 lw r6,(r11+40)
8002d40: 5b 86 00 4c sw (sp+76),r6
8002d44: 29 67 00 2c lw r7,(r11+44)
8002d48: 5b 87 00 50 sw (sp+80),r7
8002d4c: 29 69 00 30 lw r9,(r11+48)
8002d50: 5b 89 00 54 sw (sp+84),r9
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
8002d54: 29 70 00 0c lw r16,(r11+12)
8002d58: 34 0c 00 86 mvi r12,134
8002d5c: 5e 00 ff e1 bne r16,r0,8002ce0 <pthread_create+0x88>
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
8002d60: 2b 81 00 3c lw r1,(sp+60)
8002d64: f8 00 1b 81 calli 8009b68 <_POSIX_Priority_Is_valid>
8002d68: 44 30 ff dd be r1,r16,8002cdc <pthread_create+0x84> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
8002d6c: 78 05 08 01 mvhi r5,0x801
8002d70: 38 a5 f0 e4 ori r5,r5,0xf0e4
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
8002d74: ba 20 08 00 mv r1,r17
8002d78: 37 82 00 3c addi r2,sp,60
8002d7c: 37 83 00 5c addi r3,sp,92
8002d80: 37 84 00 58 addi r4,sp,88
8002d84: 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 );
8002d88: 2b 90 00 3c lw r16,(sp+60)
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
8002d8c: f8 00 1b 7f calli 8009b88 <_POSIX_Thread_Translate_sched_param>
8002d90: b8 20 60 00 mv r12,r1
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
8002d94: 5c 20 ff d3 bne r1,r0,8002ce0 <pthread_create+0x88>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
8002d98: 78 13 08 01 mvhi r19,0x801
8002d9c: 3a 73 f9 18 ori r19,r19,0xf918
8002da0: 2a 61 00 00 lw r1,(r19+0)
8002da4: f8 00 04 c4 calli 80040b4 <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
8002da8: 78 01 08 01 mvhi r1,0x801
8002dac: 38 21 fa 64 ori r1,r1,0xfa64
8002db0: f8 00 07 80 calli 8004bb0 <_Objects_Allocate>
8002db4: b8 20 90 00 mv r18,r1
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
8002db8: 44 2c 00 1b be r1,r12,8002e24 <pthread_create+0x1cc>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
8002dbc: 78 01 08 01 mvhi r1,0x801
8002dc0: 38 21 f0 e0 ori r1,r1,0xf0e0
8002dc4: 28 24 00 00 lw r4,(r1+0)
8002dc8: 29 61 00 08 lw r1,(r11+8)
8002dcc: 29 63 00 04 lw r3,(r11+4)
8002dd0: b4 84 20 00 add r4,r4,r4
8002dd4: 50 81 00 02 bgeu r4,r1,8002ddc <pthread_create+0x184>
8002dd8: b8 20 20 00 mv r4,r1
8002ddc: 34 09 00 00 mvi r9,0
8002de0: 5b 89 00 08 sw (sp+8),r9
8002de4: 2b 88 00 5c lw r8,(sp+92)
8002de8: 2b 89 00 58 lw r9,(sp+88)
8002dec: 78 01 08 01 mvhi r1,0x801
8002df0: ca 90 30 00 sub r6,r20,r16
8002df4: 38 21 fa 64 ori r1,r1,0xfa64
8002df8: ba 40 10 00 mv r2,r18
8002dfc: b9 80 28 00 mv r5,r12
8002e00: 34 07 00 01 mvi r7,1
8002e04: 5b 89 00 04 sw (sp+4),r9
8002e08: 5b 8c 00 0c sw (sp+12),r12
8002e0c: f8 00 0b 25 calli 8005aa0 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
8002e10: 5c 20 00 20 bne r1,r0,8002e90 <pthread_create+0x238>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
8002e14: 78 01 08 01 mvhi r1,0x801
8002e18: 38 21 fa 64 ori r1,r1,0xfa64
8002e1c: ba 40 10 00 mv r2,r18
8002e20: f8 00 08 71 calli 8004fe4 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
8002e24: 2a 61 00 00 lw r1,(r19+0)
8002e28: 34 0c 00 0b mvi r12,11
8002e2c: f8 00 04 be calli 8004124 <_API_Mutex_Unlock>
return EAGAIN;
8002e30: e3 ff ff ac bi 8002ce0 <pthread_create+0x88>
int rc;
if ( !start_routine )
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
8002e34: 78 0b 08 01 mvhi r11,0x801
8002e38: 39 6b dc 60 ori r11,r11,0xdc60
8002e3c: e3 ff ff 9a bi 8002ca4 <pthread_create+0x4c>
* 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 ];
8002e40: 78 01 08 01 mvhi r1,0x801
8002e44: 38 21 f9 20 ori r1,r1,0xf920
8002e48: 28 21 00 00 lw r1,(r1+0)
8002e4c: 28 22 01 2c lw r2,(r1+300)
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
8002e50: 28 41 00 84 lw r1,(r2+132)
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
schedpolicy = api->schedpolicy;
8002e54: 28 51 00 80 lw r17,(r2+128)
schedparam = api->schedparam;
8002e58: 5b 81 00 3c sw (sp+60),r1
8002e5c: 28 46 00 88 lw r6,(r2+136)
8002e60: 5b 86 00 40 sw (sp+64),r6
8002e64: 28 47 00 8c lw r7,(r2+140)
8002e68: 5b 87 00 44 sw (sp+68),r7
8002e6c: 28 49 00 90 lw r9,(r2+144)
8002e70: 5b 89 00 48 sw (sp+72),r9
8002e74: 28 41 00 94 lw r1,(r2+148)
8002e78: 5b 81 00 4c sw (sp+76),r1
8002e7c: 28 46 00 98 lw r6,(r2+152)
8002e80: 5b 86 00 50 sw (sp+80),r6
8002e84: 28 42 00 9c lw r2,(r2+156)
8002e88: 5b 82 00 54 sw (sp+84),r2
break;
8002e8c: e3 ff ff b2 bi 8002d54 <pthread_create+0xfc>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
8002e90: 2a 50 01 2c lw r16,(r18+300)
api->Attributes = *the_attr;
8002e94: 29 61 00 00 lw r1,(r11+0)
* 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;
8002e98: 34 06 00 01 mvi r6,1
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
8002e9c: b9 a0 18 00 mv r3,r13
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
8002ea0: 5a 01 00 00 sw (r16+0),r1
8002ea4: 29 62 00 04 lw r2,(r11+4)
the_thread->do_post_task_switch_extension = true;
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
8002ea8: b9 c0 20 00 mv r4,r14
8002eac: ba 40 08 00 mv r1,r18
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
8002eb0: 5a 02 00 04 sw (r16+4),r2
8002eb4: 29 67 00 08 lw r7,(r11+8)
the_thread->do_post_task_switch_extension = true;
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
8002eb8: b8 c0 10 00 mv r2,r6
8002ebc: b9 80 28 00 mv r5,r12
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
8002ec0: 5a 07 00 08 sw (r16+8),r7
8002ec4: 29 69 00 0c lw r9,(r11+12)
8002ec8: 5a 09 00 0c sw (r16+12),r9
8002ecc: 29 67 00 10 lw r7,(r11+16)
8002ed0: 5a 07 00 10 sw (r16+16),r7
8002ed4: 29 69 00 14 lw r9,(r11+20)
8002ed8: 5a 09 00 14 sw (r16+20),r9
8002edc: 29 67 00 18 lw r7,(r11+24)
8002ee0: 5a 07 00 18 sw (r16+24),r7
8002ee4: 29 69 00 1c lw r9,(r11+28)
8002ee8: 5a 09 00 1c sw (r16+28),r9
8002eec: 29 67 00 20 lw r7,(r11+32)
8002ef0: 5a 07 00 20 sw (r16+32),r7
8002ef4: 29 69 00 24 lw r9,(r11+36)
8002ef8: 5a 09 00 24 sw (r16+36),r9
8002efc: 29 67 00 28 lw r7,(r11+40)
8002f00: 5a 07 00 28 sw (r16+40),r7
8002f04: 29 69 00 2c lw r9,(r11+44)
8002f08: 5a 09 00 2c sw (r16+44),r9
8002f0c: 29 67 00 30 lw r7,(r11+48)
8002f10: 5a 07 00 30 sw (r16+48),r7
8002f14: 29 69 00 34 lw r9,(r11+52)
8002f18: 5a 09 00 34 sw (r16+52),r9
8002f1c: 29 67 00 38 lw r7,(r11+56)
8002f20: 5a 07 00 38 sw (r16+56),r7
api->detachstate = the_attr->detachstate;
8002f24: 29 6b 00 38 lw r11,(r11+56)
8002f28: 5a 0b 00 3c sw (r16+60),r11
api->schedpolicy = schedpolicy;
8002f2c: 5a 11 00 80 sw (r16+128),r17
api->schedparam = schedparam;
8002f30: 2b 89 00 3c lw r9,(sp+60)
* 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;
8002f34: 32 46 00 74 sb (r18+116),r6
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
8002f38: 5a 09 00 84 sw (r16+132),r9
8002f3c: 2b 86 00 40 lw r6,(sp+64)
8002f40: 5a 06 00 88 sw (r16+136),r6
8002f44: 2b 87 00 44 lw r7,(sp+68)
8002f48: 5a 07 00 8c sw (r16+140),r7
8002f4c: 2b 89 00 48 lw r9,(sp+72)
8002f50: 5a 09 00 90 sw (r16+144),r9
8002f54: 2b 86 00 4c lw r6,(sp+76)
8002f58: 5a 06 00 94 sw (r16+148),r6
8002f5c: 2b 87 00 50 lw r7,(sp+80)
8002f60: 5a 07 00 98 sw (r16+152),r7
8002f64: 2b 89 00 54 lw r9,(sp+84)
8002f68: 5a 09 00 9c sw (r16+156),r9
the_thread->do_post_task_switch_extension = true;
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
8002f6c: f8 00 0e 54 calli 80068bc <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
8002f70: 34 01 00 04 mvi r1,4
8002f74: 46 21 00 06 be r17,r1,8002f8c <pthread_create+0x334>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
8002f78: 2a 52 00 08 lw r18,(r18+8)
_RTEMS_Unlock_allocator();
8002f7c: 2a 61 00 00 lw r1,(r19+0)
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
8002f80: 59 f2 00 00 sw (r15+0),r18
_RTEMS_Unlock_allocator();
8002f84: f8 00 04 68 calli 8004124 <_API_Mutex_Unlock>
return 0;
8002f88: e3 ff ff 56 bi 8002ce0 <pthread_create+0x88>
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
8002f8c: 36 01 00 8c addi r1,r16,140
8002f90: f8 00 0e f4 calli 8006b60 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
8002f94: 5a 01 00 b0 sw (r16+176),r1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8002f98: 78 01 08 01 mvhi r1,0x801
8002f9c: 38 21 f9 40 ori r1,r1,0xf940
8002fa0: 36 02 00 a4 addi r2,r16,164
8002fa4: f8 00 10 24 calli 8007034 <_Watchdog_Insert>
8002fa8: e3 ff ff f4 bi 8002f78 <pthread_create+0x320>
0800bbb0 <pthread_exit>:
void pthread_exit(
void *value_ptr
)
{
800bbb0: 37 9c ff fc addi sp,sp,-4
800bbb4: 5b 9d 00 04 sw (sp+4),ra
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
800bbb8: 78 03 08 01 mvhi r3,0x801
800bbbc: 38 63 e9 60 ori r3,r3,0xe960
}
void pthread_exit(
void *value_ptr
)
{
800bbc0: b8 20 10 00 mv r2,r1
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
800bbc4: 28 61 00 00 lw r1,(r3+0)
800bbc8: fb ff ff d4 calli 800bb18 <_POSIX_Thread_Exit>
}
800bbcc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800bbd0: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
800bbd4: c3 a0 00 00 ret <== NOT EXECUTED
08002374 <pthread_mutexattr_gettype>:
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
if ( !attr )
8002374: 44 20 00 08 be r1,r0,8002394 <pthread_mutexattr_gettype+0x20>
return EINVAL;
if ( !attr->is_initialized )
8002378: 28 23 00 00 lw r3,(r1+0)
800237c: 44 60 00 06 be r3,r0,8002394 <pthread_mutexattr_gettype+0x20>
return EINVAL;
if ( !type )
8002380: 44 40 00 05 be r2,r0,8002394 <pthread_mutexattr_gettype+0x20><== NEVER TAKEN
return EINVAL;
*type = attr->type;
8002384: 28 21 00 10 lw r1,(r1+16)
8002388: 58 41 00 00 sw (r2+0),r1
800238c: 34 01 00 00 mvi r1,0
return 0;
8002390: c3 a0 00 00 ret
8002394: 34 01 00 16 mvi r1,22
}
8002398: c3 a0 00 00 ret
080052cc <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
80052cc: 44 20 00 08 be r1,r0,80052ec <pthread_mutexattr_setpshared+0x20>
80052d0: 28 23 00 00 lw r3,(r1+0)
80052d4: 44 60 00 06 be r3,r0,80052ec <pthread_mutexattr_setpshared+0x20>
return EINVAL;
switch ( pshared ) {
80052d8: 34 03 00 01 mvi r3,1
80052dc: 54 43 00 04 bgu r2,r3,80052ec <pthread_mutexattr_setpshared+0x20><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
80052e0: 58 22 00 04 sw (r1+4),r2
80052e4: 34 01 00 00 mvi r1,0
return 0;
80052e8: c3 a0 00 00 ret
80052ec: 34 01 00 16 mvi r1,22
default:
return EINVAL;
}
}
80052f0: c3 a0 00 00 ret
080023e8 <pthread_mutexattr_settype>:
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
if ( !attr || !attr->is_initialized )
80023e8: 44 20 00 08 be r1,r0,8002408 <pthread_mutexattr_settype+0x20>
80023ec: 28 23 00 00 lw r3,(r1+0)
80023f0: 44 60 00 06 be r3,r0,8002408 <pthread_mutexattr_settype+0x20><== NEVER TAKEN
return EINVAL;
switch ( type ) {
80023f4: 34 03 00 03 mvi r3,3
80023f8: 54 43 00 04 bgu r2,r3,8002408 <pthread_mutexattr_settype+0x20>
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
80023fc: 58 22 00 10 sw (r1+16),r2
8002400: 34 01 00 00 mvi r1,0
return 0;
8002404: c3 a0 00 00 ret
8002408: 34 01 00 16 mvi r1,22
default:
return EINVAL;
}
}
800240c: c3 a0 00 00 ret
080034d0 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
80034d0: 37 9c ff ec addi sp,sp,-20
80034d4: 5b 8b 00 10 sw (sp+16),r11
80034d8: 5b 8c 00 0c sw (sp+12),r12
80034dc: 5b 8d 00 08 sw (sp+8),r13
80034e0: 5b 9d 00 04 sw (sp+4),ra
if ( !once_control || !init_routine )
80034e4: 64 43 00 00 cmpei r3,r2,0
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
80034e8: b8 40 60 00 mv r12,r2
if ( !once_control || !init_routine )
80034ec: 64 22 00 00 cmpei r2,r1,0
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
80034f0: b8 20 58 00 mv r11,r1
if ( !once_control || !init_routine )
80034f4: b8 62 18 00 or r3,r3,r2
80034f8: 34 01 00 16 mvi r1,22
80034fc: 5c 60 00 04 bne r3,r0,800350c <pthread_once+0x3c>
return EINVAL;
if ( !once_control->init_executed ) {
8003500: 29 6d 00 04 lw r13,(r11+4)
8003504: b8 60 08 00 mv r1,r3
8003508: 45 a3 00 07 be r13,r3,8003524 <pthread_once+0x54>
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
800350c: 2b 9d 00 04 lw ra,(sp+4)
8003510: 2b 8b 00 10 lw r11,(sp+16)
8003514: 2b 8c 00 0c lw r12,(sp+12)
8003518: 2b 8d 00 08 lw r13,(sp+8)
800351c: 37 9c 00 14 addi sp,sp,20
8003520: c3 a0 00 00 ret
if ( !once_control || !init_routine )
return EINVAL;
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
8003524: 34 01 01 00 mvi r1,256
8003528: b8 20 10 00 mv r2,r1
800352c: 37 83 00 14 addi r3,sp,20
8003530: f8 00 01 1d calli 80039a4 <rtems_task_mode>
if ( !once_control->init_executed ) {
8003534: 29 61 00 04 lw r1,(r11+4)
8003538: 44 2d 00 0c be r1,r13,8003568 <pthread_once+0x98> <== ALWAYS TAKEN
once_control->is_initialized = true;
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
800353c: 2b 81 00 14 lw r1,(sp+20)
8003540: 34 02 01 00 mvi r2,256
8003544: 37 83 00 14 addi r3,sp,20
8003548: f8 00 01 17 calli 80039a4 <rtems_task_mode>
800354c: 34 01 00 00 mvi r1,0
}
return 0;
}
8003550: 2b 9d 00 04 lw ra,(sp+4)
8003554: 2b 8b 00 10 lw r11,(sp+16)
8003558: 2b 8c 00 0c lw r12,(sp+12)
800355c: 2b 8d 00 08 lw r13,(sp+8)
8003560: 37 9c 00 14 addi sp,sp,20
8003564: c3 a0 00 00 ret
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;
8003568: 34 01 00 01 mvi r1,1
once_control->init_executed = true;
800356c: 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;
8003570: 59 61 00 00 sw (r11+0),r1
once_control->init_executed = true;
(*init_routine)();
8003574: d9 80 00 00 call r12
8003578: e3 ff ff f1 bi 800353c <pthread_once+0x6c>
08003f0c <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
8003f0c: 37 9c ff dc addi sp,sp,-36
8003f10: 5b 8b 00 18 sw (sp+24),r11
8003f14: 5b 8c 00 14 sw (sp+20),r12
8003f18: 5b 8d 00 10 sw (sp+16),r13
8003f1c: 5b 8e 00 0c sw (sp+12),r14
8003f20: 5b 8f 00 08 sw (sp+8),r15
8003f24: 5b 9d 00 04 sw (sp+4),ra
8003f28: b8 20 60 00 mv r12,r1
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
8003f2c: 44 20 00 07 be r1,r0,8003f48 <pthread_rwlock_init+0x3c>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
8003f30: b8 40 18 00 mv r3,r2
8003f34: 44 40 00 33 be r2,r0,8004000 <pthread_rwlock_init+0xf4> <== NEVER TAKEN
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
8003f38: 28 61 00 00 lw r1,(r3+0)
8003f3c: 44 20 00 03 be r1,r0,8003f48 <pthread_rwlock_init+0x3c> <== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
8003f40: 28 6b 00 04 lw r11,(r3+4)
8003f44: 45 60 00 0a be r11,r0,8003f6c <pthread_rwlock_init+0x60> <== ALWAYS TAKEN
);
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
8003f48: 34 01 00 16 mvi r1,22
}
8003f4c: 2b 9d 00 04 lw ra,(sp+4)
8003f50: 2b 8b 00 18 lw r11,(sp+24)
8003f54: 2b 8c 00 14 lw r12,(sp+20)
8003f58: 2b 8d 00 10 lw r13,(sp+16)
8003f5c: 2b 8e 00 0c lw r14,(sp+12)
8003f60: 2b 8f 00 08 lw r15,(sp+8)
8003f64: 37 9c 00 24 addi sp,sp,36
8003f68: c3 a0 00 00 ret
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8003f6c: 78 01 08 02 mvhi r1,0x802
8003f70: 38 21 28 7c ori r1,r1,0x287c
8003f74: 28 22 00 00 lw r2,(r1+0)
8003f78: 34 42 00 01 addi r2,r2,1
8003f7c: 58 22 00 00 sw (r1+0),r2
* 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 *)
8003f80: 78 01 08 02 mvhi r1,0x802
8003f84: 38 21 2a 3c ori r1,r1,0x2a3c
8003f88: f8 00 09 4b calli 80064b4 <_Objects_Allocate>
8003f8c: b8 20 68 00 mv r13,r1
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
8003f90: 44 2b 00 19 be r1,r11,8003ff4 <pthread_rwlock_init+0xe8>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
8003f94: 37 82 00 24 addi r2,sp,36
8003f98: 34 21 00 10 addi r1,r1,16
8003f9c: f8 00 06 97 calli 80059f8 <_CORE_RWLock_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8003fa0: 78 01 08 02 mvhi r1,0x802
8003fa4: 29 ae 00 08 lw r14,(r13+8)
8003fa8: 38 21 2a 3c ori r1,r1,0x2a3c
8003fac: 28 2f 00 1c lw r15,(r1+28)
8003fb0: 34 02 00 02 mvi r2,2
8003fb4: 21 c1 ff ff andi r1,r14,0xffff
8003fb8: fb ff f7 c0 calli 8001eb8 <__ashlsi3>
8003fbc: b5 e1 08 00 add r1,r15,r1
8003fc0: 58 2d 00 00 sw (r1+0),r13
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
8003fc4: 59 ab 00 0c sw (r13+12),r11
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
8003fc8: 59 8e 00 00 sw (r12+0),r14
_Thread_Enable_dispatch();
8003fcc: f8 00 0c be calli 80072c4 <_Thread_Enable_dispatch>
8003fd0: b9 60 08 00 mv r1,r11
return 0;
}
8003fd4: 2b 9d 00 04 lw ra,(sp+4)
8003fd8: 2b 8b 00 18 lw r11,(sp+24)
8003fdc: 2b 8c 00 14 lw r12,(sp+20)
8003fe0: 2b 8d 00 10 lw r13,(sp+16)
8003fe4: 2b 8e 00 0c lw r14,(sp+12)
8003fe8: 2b 8f 00 08 lw r15,(sp+8)
8003fec: 37 9c 00 24 addi sp,sp,36
8003ff0: c3 a0 00 00 ret
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
8003ff4: f8 00 0c b4 calli 80072c4 <_Thread_Enable_dispatch>
8003ff8: 34 01 00 0b mvi r1,11
return EAGAIN;
8003ffc: e3 ff ff d4 bi 8003f4c <pthread_rwlock_init+0x40>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
8004000: 37 8b 00 1c addi r11,sp,28
8004004: b9 60 08 00 mv r1,r11
8004008: f8 00 02 ec calli 8004bb8 <pthread_rwlockattr_init>
800400c: b9 60 18 00 mv r3,r11
8004010: e3 ff ff ca bi 8003f38 <pthread_rwlock_init+0x2c>
08004094 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
8004094: 37 9c ff e8 addi sp,sp,-24
8004098: 5b 8b 00 10 sw (sp+16),r11
800409c: 5b 8c 00 0c sw (sp+12),r12
80040a0: 5b 8d 00 08 sw (sp+8),r13
80040a4: 5b 9d 00 04 sw (sp+4),ra
80040a8: b8 20 58 00 mv r11,r1
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
80040ac: 44 20 00 0c be r1,r0,80040dc <pthread_rwlock_timedrdlock+0x48>
*
* 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 );
80040b0: b8 40 08 00 mv r1,r2
80040b4: 37 82 00 14 addi r2,sp,20
80040b8: f8 00 1c 94 calli 800b308 <_POSIX_Absolute_timeout_to_ticks>
80040bc: 29 62 00 00 lw r2,(r11+0)
80040c0: b8 20 68 00 mv r13,r1
80040c4: 78 01 08 02 mvhi r1,0x802
80040c8: 38 21 2a 3c ori r1,r1,0x2a3c
80040cc: 37 83 00 18 addi r3,sp,24
80040d0: f8 00 0a 49 calli 80069f4 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
80040d4: 2b 8c 00 18 lw r12,(sp+24)
80040d8: 45 80 00 08 be r12,r0,80040f8 <pthread_rwlock_timedrdlock+0x64>
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
80040dc: 34 01 00 16 mvi r1,22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
80040e0: 2b 9d 00 04 lw ra,(sp+4)
80040e4: 2b 8b 00 10 lw r11,(sp+16)
80040e8: 2b 8c 00 0c lw r12,(sp+12)
80040ec: 2b 8d 00 08 lw r13,(sp+8)
80040f0: 37 9c 00 18 addi sp,sp,24
80040f4: c3 a0 00 00 ret
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
80040f8: 29 62 00 00 lw r2,(r11+0)
80040fc: 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,
8004100: 65 ab 00 03 cmpei r11,r13,3
8004104: 34 21 00 10 addi r1,r1,16
8004108: b9 60 18 00 mv r3,r11
800410c: b9 80 28 00 mv r5,r12
8004110: f8 00 06 48 calli 8005a30 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
8004114: f8 00 0c 6c calli 80072c4 <_Thread_Enable_dispatch>
if ( !do_wait ) {
8004118: 5d 6c 00 12 bne r11,r12,8004160 <pthread_rwlock_timedrdlock+0xcc>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
800411c: 78 01 08 02 mvhi r1,0x802
8004120: 38 21 29 38 ori r1,r1,0x2938
8004124: 28 21 00 00 lw r1,(r1+0)
8004128: 34 02 00 02 mvi r2,2
800412c: 28 21 00 34 lw r1,(r1+52)
8004130: 44 22 00 08 be r1,r2,8004150 <pthread_rwlock_timedrdlock+0xbc>
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
8004134: f8 00 00 4a calli 800425c <_POSIX_RWLock_Translate_core_RWLock_return_code>
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
8004138: 2b 9d 00 04 lw ra,(sp+4)
800413c: 2b 8b 00 10 lw r11,(sp+16)
8004140: 2b 8c 00 0c lw r12,(sp+12)
8004144: 2b 8d 00 08 lw r13,(sp+8)
8004148: 37 9c 00 18 addi sp,sp,24
800414c: c3 a0 00 00 ret
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
switch (status) {
8004150: 45 ab ff e3 be r13,r11,80040dc <pthread_rwlock_timedrdlock+0x48><== NEVER TAKEN
8004154: 55 a1 ff f8 bgu r13,r1,8004134 <pthread_rwlock_timedrdlock+0xa0><== NEVER TAKEN
8004158: 34 01 00 74 mvi r1,116
800415c: e3 ff ff e1 bi 80040e0 <pthread_rwlock_timedrdlock+0x4c>
8004160: 78 01 08 02 mvhi r1,0x802
8004164: 38 21 29 38 ori r1,r1,0x2938
8004168: 28 21 00 00 lw r1,(r1+0)
800416c: 28 21 00 34 lw r1,(r1+52)
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
8004170: f8 00 00 3b calli 800425c <_POSIX_RWLock_Translate_core_RWLock_return_code>
8004174: e3 ff ff f1 bi 8004138 <pthread_rwlock_timedrdlock+0xa4>
08004178 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
8004178: 37 9c ff e8 addi sp,sp,-24
800417c: 5b 8b 00 10 sw (sp+16),r11
8004180: 5b 8c 00 0c sw (sp+12),r12
8004184: 5b 8d 00 08 sw (sp+8),r13
8004188: 5b 9d 00 04 sw (sp+4),ra
800418c: b8 20 58 00 mv r11,r1
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
8004190: 44 20 00 0c be r1,r0,80041c0 <pthread_rwlock_timedwrlock+0x48>
*
* 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 );
8004194: b8 40 08 00 mv r1,r2
8004198: 37 82 00 14 addi r2,sp,20
800419c: f8 00 1c 5b calli 800b308 <_POSIX_Absolute_timeout_to_ticks>
80041a0: 29 62 00 00 lw r2,(r11+0)
80041a4: b8 20 68 00 mv r13,r1
80041a8: 78 01 08 02 mvhi r1,0x802
80041ac: 38 21 2a 3c ori r1,r1,0x2a3c
80041b0: 37 83 00 18 addi r3,sp,24
80041b4: f8 00 0a 10 calli 80069f4 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
80041b8: 2b 8c 00 18 lw r12,(sp+24)
80041bc: 45 80 00 08 be r12,r0,80041dc <pthread_rwlock_timedwrlock+0x64>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
80041c0: 34 01 00 16 mvi r1,22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
80041c4: 2b 9d 00 04 lw ra,(sp+4)
80041c8: 2b 8b 00 10 lw r11,(sp+16)
80041cc: 2b 8c 00 0c lw r12,(sp+12)
80041d0: 2b 8d 00 08 lw r13,(sp+8)
80041d4: 37 9c 00 18 addi sp,sp,24
80041d8: c3 a0 00 00 ret
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
80041dc: 29 62 00 00 lw r2,(r11+0)
80041e0: 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,
80041e4: 65 ab 00 03 cmpei r11,r13,3
80041e8: 34 21 00 10 addi r1,r1,16
80041ec: b9 60 18 00 mv r3,r11
80041f0: b9 80 28 00 mv r5,r12
80041f4: f8 00 06 5e calli 8005b6c <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
80041f8: f8 00 0c 33 calli 80072c4 <_Thread_Enable_dispatch>
if ( !do_wait &&
80041fc: 5d 6c 00 12 bne r11,r12,8004244 <pthread_rwlock_timedwrlock+0xcc>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
8004200: 78 01 08 02 mvhi r1,0x802
8004204: 38 21 29 38 ori r1,r1,0x2938
8004208: 28 21 00 00 lw r1,(r1+0)
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
800420c: 34 02 00 02 mvi r2,2
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
8004210: 28 21 00 34 lw r1,(r1+52)
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
8004214: 44 22 00 08 be r1,r2,8004234 <pthread_rwlock_timedwrlock+0xbc>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
8004218: f8 00 00 11 calli 800425c <_POSIX_RWLock_Translate_core_RWLock_return_code>
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
800421c: 2b 9d 00 04 lw ra,(sp+4)
8004220: 2b 8b 00 10 lw r11,(sp+16)
8004224: 2b 8c 00 0c lw r12,(sp+12)
8004228: 2b 8d 00 08 lw r13,(sp+8)
800422c: 37 9c 00 18 addi sp,sp,24
8004230: c3 a0 00 00 ret
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
8004234: 45 ab ff e3 be r13,r11,80041c0 <pthread_rwlock_timedwrlock+0x48><== NEVER TAKEN
8004238: 55 a1 ff f8 bgu r13,r1,8004218 <pthread_rwlock_timedwrlock+0xa0><== NEVER TAKEN
800423c: 34 01 00 74 mvi r1,116
8004240: e3 ff ff e1 bi 80041c4 <pthread_rwlock_timedwrlock+0x4c>
8004244: 78 01 08 02 mvhi r1,0x802
8004248: 38 21 29 38 ori r1,r1,0x2938
800424c: 28 21 00 00 lw r1,(r1+0)
8004250: 28 21 00 34 lw r1,(r1+52)
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
8004254: f8 00 00 02 calli 800425c <_POSIX_RWLock_Translate_core_RWLock_return_code>
8004258: e3 ff ff f1 bi 800421c <pthread_rwlock_timedwrlock+0xa4>
08004bdc <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
if ( !attr )
8004bdc: 44 20 00 08 be r1,r0,8004bfc <pthread_rwlockattr_setpshared+0x20>
return EINVAL;
if ( !attr->is_initialized )
8004be0: 28 23 00 00 lw r3,(r1+0)
8004be4: 44 60 00 06 be r3,r0,8004bfc <pthread_rwlockattr_setpshared+0x20>
return EINVAL;
switch ( pshared ) {
8004be8: 34 03 00 01 mvi r3,1
8004bec: 54 43 00 04 bgu r2,r3,8004bfc <pthread_rwlockattr_setpshared+0x20><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
8004bf0: 58 22 00 04 sw (r1+4),r2
8004bf4: 34 01 00 00 mvi r1,0
return 0;
8004bf8: c3 a0 00 00 ret
8004bfc: 34 01 00 16 mvi r1,22
default:
return EINVAL;
}
}
8004c00: c3 a0 00 00 ret
08002488 <pthread_setcancelstate>:
int pthread_setcancelstate(
int state,
int *oldstate
)
{
8002488: 37 9c ff f8 addi sp,sp,-8
800248c: 5b 8b 00 08 sw (sp+8),r11
8002490: 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() )
8002494: 78 03 08 01 mvhi r3,0x801
8002498: 38 63 f9 04 ori r3,r3,0xf904
800249c: 28 6b 00 00 lw r11,(r3+0)
int pthread_setcancelstate(
int state,
int *oldstate
)
{
80024a0: b8 20 18 00 mv r3,r1
* 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() )
80024a4: 34 01 00 47 mvi r1,71
80024a8: 5d 60 00 18 bne r11,r0,8002508 <pthread_setcancelstate+0x80>
return EPROTO;
if ( !oldstate )
80024ac: 44 4b 00 16 be r2,r11,8002504 <pthread_setcancelstate+0x7c><== NEVER TAKEN
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
80024b0: 34 01 00 01 mvi r1,1
80024b4: 54 61 00 14 bgu r3,r1,8002504 <pthread_setcancelstate+0x7c><== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
80024b8: 78 04 08 01 mvhi r4,0x801
80024bc: 38 84 f8 6c ori r4,r4,0xf86c
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
80024c0: 78 01 08 01 mvhi r1,0x801
80024c4: 28 85 00 00 lw r5,(r4+0)
80024c8: 38 21 f9 28 ori r1,r1,0xf928
80024cc: 28 26 00 00 lw r6,(r1+0)
80024d0: 34 a5 00 01 addi r5,r5,1
80024d4: 58 85 00 00 sw (r4+0),r5
80024d8: 28 c4 01 2c lw r4,(r6+300)
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
80024dc: 28 85 00 d4 lw r5,(r4+212)
thread_support->cancelability_state = state;
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
80024e0: 28 21 00 00 lw r1,(r1+0)
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
80024e4: 58 45 00 00 sw (r2+0),r5
thread_support->cancelability_state = state;
80024e8: 58 83 00 d4 sw (r4+212),r3
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
80024ec: f8 00 13 61 calli 8007270 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
80024f0: b9 60 08 00 mv r1,r11
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
80024f4: 2b 9d 00 04 lw ra,(sp+4)
80024f8: 2b 8b 00 08 lw r11,(sp+8)
80024fc: 37 9c 00 08 addi sp,sp,8
8002500: c3 a0 00 00 ret
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
8002504: 34 01 00 16 mvi r1,22
}
8002508: 2b 9d 00 04 lw ra,(sp+4)
800250c: 2b 8b 00 08 lw r11,(sp+8)
8002510: 37 9c 00 08 addi sp,sp,8
8002514: c3 a0 00 00 ret
08006358 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
8006358: 37 9c ff dc addi sp,sp,-36
800635c: 5b 8b 00 18 sw (sp+24),r11
8006360: 5b 8c 00 14 sw (sp+20),r12
8006364: 5b 8d 00 10 sw (sp+16),r13
8006368: 5b 8e 00 0c sw (sp+12),r14
800636c: 5b 8f 00 08 sw (sp+8),r15
8006370: 5b 9d 00 04 sw (sp+4),ra
int rc;
/*
* Check all the parameters
*/
if ( !param )
8006374: 34 0c 00 16 mvi r12,22
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
8006378: b8 60 58 00 mv r11,r3
800637c: b8 20 68 00 mv r13,r1
8006380: b8 40 70 00 mv r14,r2
int rc;
/*
* Check all the parameters
*/
if ( !param )
8006384: 44 60 00 08 be r3,r0,80063a4 <pthread_setschedparam+0x4c>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
8006388: b8 40 08 00 mv r1,r2
800638c: 37 84 00 20 addi r4,sp,32
8006390: b8 60 10 00 mv r2,r3
8006394: 37 83 00 24 addi r3,sp,36
8006398: f8 00 19 ca calli 800cac0 <_POSIX_Thread_Translate_sched_param>
800639c: b8 20 60 00 mv r12,r1
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
80063a0: 44 20 00 0a be r1,r0,80063c8 <pthread_setschedparam+0x70>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
80063a4: b9 80 08 00 mv r1,r12
80063a8: 2b 9d 00 04 lw ra,(sp+4)
80063ac: 2b 8b 00 18 lw r11,(sp+24)
80063b0: 2b 8c 00 14 lw r12,(sp+20)
80063b4: 2b 8d 00 10 lw r13,(sp+16)
80063b8: 2b 8e 00 0c lw r14,(sp+12)
80063bc: 2b 8f 00 08 lw r15,(sp+8)
80063c0: 37 9c 00 24 addi sp,sp,36
80063c4: c3 a0 00 00 ret
80063c8: 78 01 08 02 mvhi r1,0x802
80063cc: 38 21 4a c4 ori r1,r1,0x4ac4
80063d0: b9 a0 10 00 mv r2,r13
80063d4: 37 83 00 1c addi r3,sp,28
80063d8: f8 00 07 1a calli 8008040 <_Objects_Get>
80063dc: b8 20 78 00 mv r15,r1
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
80063e0: 2b 81 00 1c lw r1,(sp+28)
80063e4: 44 2c 00 03 be r1,r12,80063f0 <pthread_setschedparam+0x98>
80063e8: 34 0c 00 03 mvi r12,3
80063ec: e3 ff ff ee bi 80063a4 <pthread_setschedparam+0x4c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
80063f0: 29 ed 01 2c lw r13,(r15+300)
if ( api->schedpolicy == SCHED_SPORADIC )
80063f4: 34 01 00 04 mvi r1,4
80063f8: 29 a2 00 80 lw r2,(r13+128)
80063fc: 44 41 00 32 be r2,r1,80064c4 <pthread_setschedparam+0x16c>
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
8006400: 2b 82 00 24 lw r2,(sp+36)
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
8006404: 59 ae 00 80 sw (r13+128),r14
api->schedparam = *param;
8006408: 29 61 00 00 lw r1,(r11+0)
the_thread->budget_algorithm = budget_algorithm;
800640c: 59 e2 00 7c sw (r15+124),r2
the_thread->budget_callout = budget_callout;
8006410: 2b 82 00 20 lw r2,(sp+32)
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
8006414: 59 a1 00 84 sw (r13+132),r1
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
8006418: 59 e2 00 80 sw (r15+128),r2
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
800641c: 29 62 00 04 lw r2,(r11+4)
8006420: 59 a2 00 88 sw (r13+136),r2
8006424: 29 62 00 08 lw r2,(r11+8)
8006428: 59 a2 00 8c sw (r13+140),r2
800642c: 29 62 00 0c lw r2,(r11+12)
8006430: 59 a2 00 90 sw (r13+144),r2
8006434: 29 62 00 10 lw r2,(r11+16)
8006438: 59 a2 00 94 sw (r13+148),r2
800643c: 29 62 00 14 lw r2,(r11+20)
8006440: 59 a2 00 98 sw (r13+152),r2
8006444: 29 6b 00 18 lw r11,(r11+24)
8006448: 59 ab 00 9c sw (r13+156),r11
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
800644c: 48 0e 00 05 bg r0,r14,8006460 <pthread_setschedparam+0x108><== NEVER TAKEN
8006450: 34 02 00 02 mvi r2,2
8006454: 4c 4e 00 0d bge r2,r14,8006488 <pthread_setschedparam+0x130>
8006458: 34 02 00 04 mvi r2,4
800645c: 45 c2 00 03 be r14,r2,8006468 <pthread_setschedparam+0x110><== ALWAYS TAKEN
_Watchdog_Remove( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
8006460: f8 00 09 63 calli 80089ec <_Thread_Enable_dispatch> <== NOT EXECUTED
return 0;
8006464: e3 ff ff d0 bi 80063a4 <pthread_setschedparam+0x4c> <== NOT EXECUTED
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
8006468: 59 a1 00 a0 sw (r13+160),r1
_Watchdog_Remove( &api->Sporadic_timer );
800646c: 35 a1 00 a4 addi r1,r13,164
8006470: f8 00 0f 5a calli 800a1d8 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
8006474: b9 e0 10 00 mv r2,r15
8006478: 34 01 00 00 mvi r1,0
800647c: fb ff ff 90 calli 80062bc <_POSIX_Threads_Sporadic_budget_TSR>
break;
}
_Thread_Enable_dispatch();
8006480: f8 00 09 5b calli 80089ec <_Thread_Enable_dispatch>
8006484: e3 ff ff c8 bi 80063a4 <pthread_setschedparam+0x4c>
switch ( api->schedpolicy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
8006488: 78 01 08 02 mvhi r1,0x802
800648c: 38 21 48 54 ori r1,r1,0x4854
8006490: 28 21 00 00 lw r1,(r1+0)
8006494: 29 a2 00 84 lw r2,(r13+132)
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
8006498: 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;
800649c: 59 e1 00 78 sw (r15+120),r1
80064a0: 78 01 08 02 mvhi r1,0x802
80064a4: 38 21 40 e4 ori r1,r1,0x40e4
80064a8: 40 24 00 00 lbu r4,(r1+0)
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
80064ac: b9 e0 08 00 mv r1,r15
80064b0: 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 =
80064b4: 59 e2 00 18 sw (r15+24),r2
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
80064b8: f8 00 07 c2 calli 80083c0 <_Thread_Change_priority>
_Watchdog_Remove( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
80064bc: f8 00 09 4c calli 80089ec <_Thread_Enable_dispatch>
80064c0: e3 ff ff b9 bi 80063a4 <pthread_setschedparam+0x4c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
80064c4: 35 a1 00 a4 addi r1,r13,164
80064c8: f8 00 0f 44 calli 800a1d8 <_Watchdog_Remove>
80064cc: e3 ff ff cd bi 8006400 <pthread_setschedparam+0xa8>
080030b0 <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
80030b0: 37 9c ff f8 addi sp,sp,-8
80030b4: 5b 8b 00 08 sw (sp+8),r11
80030b8: 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() )
80030bc: 78 01 08 02 mvhi r1,0x802
80030c0: 38 21 08 fc ori r1,r1,0x8fc
80030c4: 28 22 00 00 lw r2,(r1+0)
80030c8: 5c 40 00 12 bne r2,r0,8003110 <pthread_testcancel+0x60> <== NEVER TAKEN
80030cc: 78 01 08 02 mvhi r1,0x802
80030d0: 38 21 08 64 ori r1,r1,0x864
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
80030d4: 78 0b 08 02 mvhi r11,0x802
80030d8: 28 23 00 00 lw r3,(r1+0)
80030dc: 39 6b 09 20 ori r11,r11,0x920
80030e0: 29 64 00 00 lw r4,(r11+0)
80030e4: 34 63 00 01 addi r3,r3,1
80030e8: 58 23 00 00 sw (r1+0),r3
80030ec: 28 83 01 2c lw r3,(r4+300)
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
80030f0: 28 61 00 d4 lw r1,(r3+212)
80030f4: 5c 22 00 0b bne r1,r2,8003120 <pthread_testcancel+0x70> <== NEVER TAKEN
thread_support->cancelation_requested )
80030f8: 28 62 00 dc lw r2,(r3+220)
80030fc: 44 41 00 09 be r2,r1,8003120 <pthread_testcancel+0x70>
cancel = true;
_Thread_Enable_dispatch();
8003100: f8 00 08 2b calli 80051ac <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
8003104: 29 61 00 00 lw r1,(r11+0)
8003108: 34 02 ff ff mvi r2,-1
800310c: f8 00 18 a2 calli 8009394 <_POSIX_Thread_Exit>
}
8003110: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003114: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8003118: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
800311c: c3 a0 00 00 ret <== NOT EXECUTED
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
8003120: f8 00 08 23 calli 80051ac <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
}
8003124: 2b 9d 00 04 lw ra,(sp+4)
8003128: 2b 8b 00 08 lw r11,(sp+8)
800312c: 37 9c 00 08 addi sp,sp,8
8003130: c3 a0 00 00 ret
08001954 <putk>:
* putk
*
* Kernel putk (e.g. puts) function requiring minimal infrastrure.
*/
void putk(const char *s)
{
8001954: 37 9c ff f4 addi sp,sp,-12
8001958: 5b 8b 00 0c sw (sp+12),r11
800195c: 5b 8c 00 08 sw (sp+8),r12
8001960: 5b 9d 00 04 sw (sp+4),ra
8001964: b8 20 60 00 mv r12,r1
const char *p = s;
for (p=s ; *p ; p++ )
8001968: 40 21 00 00 lbu r1,(r1+0)
800196c: 44 20 00 10 be r1,r0,80019ac <putk+0x58> <== NEVER TAKEN
8001970: 78 0b 08 01 mvhi r11,0x801
8001974: 39 6b b5 ec ori r11,r11,0xb5ec
BSP_output_char(*p);
8001978: 29 62 00 00 lw r2,(r11+0)
*/
void putk(const char *s)
{
const char *p = s;
for (p=s ; *p ; p++ )
800197c: 35 8c 00 01 addi r12,r12,1
BSP_output_char(*p);
8001980: d8 40 00 00 call r2
*/
void putk(const char *s)
{
const char *p = s;
for (p=s ; *p ; p++ )
8001984: 41 81 00 00 lbu r1,(r12+0)
8001988: 5c 20 ff fc bne r1,r0,8001978 <putk+0x24>
BSP_output_char(*p);
BSP_output_char('\n');
800198c: 29 62 00 00 lw r2,(r11+0)
8001990: 34 01 00 0a mvi r1,10
8001994: d8 40 00 00 call r2
}
8001998: 2b 9d 00 04 lw ra,(sp+4)
800199c: 2b 8b 00 0c lw r11,(sp+12)
80019a0: 2b 8c 00 08 lw r12,(sp+8)
80019a4: 37 9c 00 0c addi sp,sp,12
80019a8: c3 a0 00 00 ret
80019ac: 78 0b 08 01 mvhi r11,0x801 <== NOT EXECUTED
80019b0: 39 6b b5 ec ori r11,r11,0xb5ec <== NOT EXECUTED
80019b4: e3 ff ff f6 bi 800198c <putk+0x38> <== NOT EXECUTED
0801baf4 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
801baf4: 37 9c ff e8 addi sp,sp,-24
801baf8: 5b 8b 00 14 sw (sp+20),r11
801bafc: 5b 8c 00 10 sw (sp+16),r12
801bb00: 5b 8d 00 0c sw (sp+12),r13
801bb04: 5b 8e 00 08 sw (sp+8),r14
801bb08: 5b 9d 00 04 sw (sp+4),ra
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
801bb0c: 78 04 08 01 mvhi r4,0x801
801bb10: 38 84 e0 10 ori r4,r4,0xe010
801bb14: 28 84 00 00 lw r4,(r4+0)
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
801bb18: b8 40 68 00 mv r13,r2
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
801bb1c: 54 81 00 06 bgu r4,r1,801bb34 <read+0x40> <== ALWAYS TAKEN
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
801bb20: fb ff c6 19 calli 800d384 <__errno>
801bb24: 34 02 00 09 mvi r2,9
801bb28: 58 22 00 00 sw (r1+0),r2
801bb2c: 34 0c ff ff mvi r12,-1
801bb30: e0 00 00 27 bi 801bbcc <read+0xd8>
{
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
801bb34: 34 02 00 03 mvi r2,3
801bb38: 5b 83 00 18 sw (sp+24),r3
801bb3c: 78 0c 08 01 mvhi r12,0x801
801bb40: fb ff 91 ac calli 80001f0 <__ashlsi3>
801bb44: 34 02 00 03 mvi r2,3
801bb48: 39 8c e7 1c ori r12,r12,0xe71c
801bb4c: b8 20 70 00 mv r14,r1
801bb50: fb ff 91 a8 calli 80001f0 <__ashlsi3>
801bb54: 29 8b 00 00 lw r11,(r12+0)
801bb58: b5 c1 08 00 add r1,r14,r1
rtems_libio_check_is_open( iop );
801bb5c: 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 );
801bb60: b5 61 58 00 add r11,r11,r1
rtems_libio_check_is_open( iop );
801bb64: 29 61 00 18 lw r1,(r11+24)
801bb68: 20 22 01 00 andi r2,r1,0x100
801bb6c: 44 40 ff ed be r2,r0,801bb20 <read+0x2c>
rtems_libio_check_buffer( buffer );
801bb70: 45 a0 00 1f be r13,r0,801bbec <read+0xf8> <== NEVER TAKEN
rtems_libio_check_count( count );
801bb74: b8 60 60 00 mv r12,r3
801bb78: 44 60 00 15 be r3,r0,801bbcc <read+0xd8> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
801bb7c: 20 21 00 02 andi r1,r1,0x2
801bb80: 44 20 00 1b be r1,r0,801bbec <read+0xf8> <== NEVER TAKEN
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
801bb84: 29 61 00 40 lw r1,(r11+64)
801bb88: 28 24 00 08 lw r4,(r1+8)
801bb8c: 44 80 00 1d be r4,r0,801bc00 <read+0x10c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->read_h)( iop, buffer, count );
801bb90: b9 a0 10 00 mv r2,r13
801bb94: b9 60 08 00 mv r1,r11
801bb98: d8 80 00 00 call r4
801bb9c: b8 20 60 00 mv r12,r1
if ( rc > 0 )
801bba0: 4c 01 00 0b bge r0,r1,801bbcc <read+0xd8>
iop->offset += rc;
801bba4: 34 02 00 1f mvi r2,31
801bba8: fb ff 91 e2 calli 8000330 <__ashrsi3>
801bbac: 29 62 00 14 lw r2,(r11+20)
801bbb0: 29 64 00 10 lw r4,(r11+16)
801bbb4: b5 82 10 00 add r2,r12,r2
801bbb8: f5 82 18 00 cmpgu r3,r12,r2
801bbbc: b4 24 08 00 add r1,r1,r4
801bbc0: b4 61 08 00 add r1,r3,r1
801bbc4: 59 62 00 14 sw (r11+20),r2
801bbc8: 59 61 00 10 sw (r11+16),r1
return rc;
}
801bbcc: b9 80 08 00 mv r1,r12
801bbd0: 2b 9d 00 04 lw ra,(sp+4)
801bbd4: 2b 8b 00 14 lw r11,(sp+20)
801bbd8: 2b 8c 00 10 lw r12,(sp+16)
801bbdc: 2b 8d 00 0c lw r13,(sp+12)
801bbe0: 2b 8e 00 08 lw r14,(sp+8)
801bbe4: 37 9c 00 18 addi sp,sp,24
801bbe8: c3 a0 00 00 ret
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
801bbec: fb ff c5 e6 calli 800d384 <__errno> <== NOT EXECUTED
801bbf0: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
801bbf4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
801bbf8: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
801bbfc: e3 ff ff f4 bi 801bbcc <read+0xd8> <== NOT EXECUTED
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
801bc00: fb ff c5 e1 calli 800d384 <__errno> <== NOT EXECUTED
801bc04: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
801bc08: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
801bc0c: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
801bc10: e3 ff ff ef bi 801bbcc <read+0xd8> <== NOT EXECUTED
08005408 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
8005408: 37 9c ff d8 addi sp,sp,-40
800540c: 5b 8b 00 14 sw (sp+20),r11
8005410: 5b 8c 00 10 sw (sp+16),r12
8005414: 5b 8d 00 0c sw (sp+12),r13
8005418: 5b 8e 00 08 sw (sp+8),r14
800541c: 5b 9d 00 04 sw (sp+4),ra
8005420: b8 40 68 00 mv r13,r2
8005424: b8 60 70 00 mv r14,r3
8005428: b8 20 60 00 mv r12,r1
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
800542c: 44 40 00 29 be r2,r0,80054d0 <readlink+0xc8> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
8005430: f8 00 3c bd calli 8014724 <strlen>
8005434: b8 20 20 00 mv r4,r1
8005438: 34 03 00 00 mvi r3,0
800543c: 37 8b 00 18 addi r11,sp,24
8005440: b9 80 08 00 mv r1,r12
8005444: b8 80 10 00 mv r2,r4
8005448: b8 60 28 00 mv r5,r3
800544c: b9 60 20 00 mv r4,r11
8005450: fb ff fa a7 calli 8003eec <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
8005454: 34 0c ff ff mvi r12,-1
8005458: 5c 20 00 16 bne r1,r0,80054b0 <readlink+0xa8> <== NEVER TAKEN
return -1;
if ( !loc.ops->node_type_h ){
800545c: 2b 83 00 24 lw r3,(sp+36)
8005460: 28 62 00 10 lw r2,(r3+16)
8005464: 44 41 00 32 be r2,r1,800552c <readlink+0x124> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
8005468: b9 60 08 00 mv r1,r11
800546c: d8 40 00 00 call r2
8005470: 34 02 00 04 mvi r2,4
8005474: 5c 22 00 23 bne r1,r2,8005500 <readlink+0xf8>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !loc.ops->readlink_h ){
8005478: 2b 81 00 24 lw r1,(sp+36)
800547c: 28 24 00 3c lw r4,(r1+60)
8005480: 44 80 00 34 be r4,r0,8005550 <readlink+0x148> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
8005484: b9 a0 10 00 mv r2,r13
8005488: b9 c0 18 00 mv r3,r14
800548c: b9 60 08 00 mv r1,r11
8005490: d8 80 00 00 call r4
8005494: b8 20 60 00 mv r12,r1
rtems_filesystem_freenode( &loc );
8005498: 2b 81 00 24 lw r1,(sp+36)
800549c: 44 20 00 05 be r1,r0,80054b0 <readlink+0xa8> <== NEVER TAKEN
80054a0: 28 22 00 1c lw r2,(r1+28)
80054a4: 44 40 00 03 be r2,r0,80054b0 <readlink+0xa8> <== NEVER TAKEN
80054a8: b9 60 08 00 mv r1,r11
80054ac: d8 40 00 00 call r2
return result;
}
80054b0: b9 80 08 00 mv r1,r12
80054b4: 2b 9d 00 04 lw ra,(sp+4)
80054b8: 2b 8b 00 14 lw r11,(sp+20)
80054bc: 2b 8c 00 10 lw r12,(sp+16)
80054c0: 2b 8d 00 0c lw r13,(sp+12)
80054c4: 2b 8e 00 08 lw r14,(sp+8)
80054c8: 37 9c 00 28 addi sp,sp,40
80054cc: c3 a0 00 00 ret
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
80054d0: f8 00 34 f0 calli 8012890 <__errno> <== NOT EXECUTED
80054d4: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
80054d8: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
80054dc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
80054e0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
80054e4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80054e8: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED
80054ec: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED
80054f0: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED
80054f4: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED
80054f8: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED
80054fc: c3 a0 00 00 ret <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
8005500: 2b 81 00 24 lw r1,(sp+36)
8005504: 44 20 00 05 be r1,r0,8005518 <readlink+0x110> <== NEVER TAKEN
8005508: 28 22 00 1c lw r2,(r1+28)
800550c: 44 40 00 03 be r2,r0,8005518 <readlink+0x110> <== NEVER TAKEN
8005510: b9 60 08 00 mv r1,r11
8005514: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( EINVAL );
8005518: f8 00 34 de calli 8012890 <__errno>
800551c: 34 02 00 16 mvi r2,22
8005520: 58 22 00 00 sw (r1+0),r2
8005524: 34 0c ff ff mvi r12,-1
8005528: e3 ff ff e2 bi 80054b0 <readlink+0xa8>
0, &loc, false );
if ( result != 0 )
return -1;
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
800552c: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED
8005530: 44 62 00 03 be r3,r2,800553c <readlink+0x134> <== NOT EXECUTED
8005534: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8005538: d8 60 00 00 call r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
800553c: f8 00 34 d5 calli 8012890 <__errno> <== NOT EXECUTED
8005540: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8005544: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8005548: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
800554c: e3 ff ff d9 bi 80054b0 <readlink+0xa8> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
8005550: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8005554: 44 44 ff fa be r2,r4,800553c <readlink+0x134> <== NOT EXECUTED
8005558: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800555c: d8 40 00 00 call r2 <== NOT EXECUTED
8005560: e3 ff ff f7 bi 800553c <readlink+0x134> <== NOT EXECUTED
080035d4 <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
80035d4: 37 9c ff e4 addi sp,sp,-28
80035d8: 5b 8b 00 1c sw (sp+28),r11
80035dc: 5b 8c 00 18 sw (sp+24),r12
80035e0: 5b 8d 00 14 sw (sp+20),r13
80035e4: 5b 8e 00 10 sw (sp+16),r14
80035e8: 5b 8f 00 0c sw (sp+12),r15
80035ec: 5b 90 00 08 sw (sp+8),r16
80035f0: 5b 9d 00 04 sw (sp+4),ra
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
80035f4: 78 04 08 02 mvhi r4,0x802
80035f8: 38 84 30 10 ori r4,r4,0x3010
80035fc: 28 84 00 00 lw r4,(r4+0)
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
8003600: b8 40 70 00 mv r14,r2
8003604: b8 60 60 00 mv r12,r3
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
8003608: 54 81 00 06 bgu r4,r1,8003620 <readv+0x4c> <== ALWAYS TAKEN
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
800360c: f8 00 32 18 calli 800fe6c <__errno> <== NOT EXECUTED
8003610: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
8003614: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8003618: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED
800361c: e0 00 00 16 bi 8003674 <readv+0xa0> <== NOT EXECUTED
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
8003620: 34 02 00 03 mvi r2,3
8003624: fb ff f6 24 calli 8000eb4 <__ashlsi3>
8003628: 78 0d 08 02 mvhi r13,0x802
800362c: 34 02 00 03 mvi r2,3
8003630: 39 ad 3e f0 ori r13,r13,0x3ef0
8003634: b8 20 78 00 mv r15,r1
8003638: fb ff f6 1f calli 8000eb4 <__ashlsi3>
800363c: 29 ab 00 00 lw r11,(r13+0)
8003640: b5 e1 08 00 add r1,r15,r1
8003644: b5 61 58 00 add r11,r11,r1
rtems_libio_check_is_open( iop );
8003648: 29 61 00 18 lw r1,(r11+24)
800364c: 20 22 01 00 andi r2,r1,0x100
8003650: 44 40 ff ef be r2,r0,800360c <readv+0x38> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
8003654: 20 21 00 02 andi r1,r1,0x2
8003658: 44 20 00 03 be r1,r0,8003664 <readv+0x90> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
800365c: 45 c0 00 02 be r14,r0,8003664 <readv+0x90>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
8003660: 49 80 00 0f bg r12,r0,800369c <readv+0xc8>
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
8003664: f8 00 32 02 calli 800fe6c <__errno>
8003668: 34 02 00 16 mvi r2,22
800366c: 58 22 00 00 sw (r1+0),r2
8003670: 34 0f ff ff mvi r15,-1
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
8003674: b9 e0 08 00 mv r1,r15
8003678: 2b 9d 00 04 lw ra,(sp+4)
800367c: 2b 8b 00 1c lw r11,(sp+28)
8003680: 2b 8c 00 18 lw r12,(sp+24)
8003684: 2b 8d 00 14 lw r13,(sp+20)
8003688: 2b 8e 00 10 lw r14,(sp+16)
800368c: 2b 8f 00 0c lw r15,(sp+12)
8003690: 2b 90 00 08 lw r16,(sp+8)
8003694: 37 9c 00 1c addi sp,sp,28
8003698: c3 a0 00 00 ret
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
800369c: 34 01 04 00 mvi r1,1024
80036a0: 4c 2c 00 02 bge r1,r12,80036a8 <readv+0xd4> <== ALWAYS TAKEN
80036a4: e3 ff ff f0 bi 8003664 <readv+0x90> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
80036a8: 29 61 00 40 lw r1,(r11+64)
80036ac: 28 29 00 08 lw r9,(r1+8)
80036b0: 45 20 00 34 be r9,r0,8003780 <readv+0x1ac> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
80036b4: 34 05 00 00 mvi r5,0
80036b8: b9 c0 20 00 mv r4,r14
80036bc: 34 07 00 01 mvi r7,1
80036c0: b8 a0 30 00 mv r6,r5
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ssize_t old;
if ( !iov[v].iov_base )
80036c4: 28 82 00 00 lw r2,(r4+0)
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
80036c8: 34 a5 00 01 addi r5,r5,1
ssize_t old;
if ( !iov[v].iov_base )
80036cc: 44 40 ff e6 be r2,r0,8003664 <readv+0x90>
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
80036d0: 28 88 00 04 lw r8,(r4+4)
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
80036d4: 34 84 00 08 addi r4,r4,8
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
80036d8: 65 03 00 00 cmpei r3,r8,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;
80036dc: b4 c8 40 00 add r8,r6,r8
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
80036e0: c8 03 18 00 sub r3,r0,r3
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
80036e4: 4d 06 00 02 bge r8,r6,80036ec <readv+0x118>
80036e8: e3 ff ff df bi 8003664 <readv+0x90>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
80036ec: a0 e3 38 00 and r7,r7,r3
* 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++ ) {
80036f0: 4c ac 00 03 bge r5,r12,80036fc <readv+0x128>
80036f4: b9 00 30 00 mv r6,r8
80036f8: e3 ff ff f3 bi 80036c4 <readv+0xf0>
/*
* 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 ) {
80036fc: b8 e0 80 00 mv r16,r7
8003700: b8 e0 78 00 mv r15,r7
8003704: 44 e0 00 06 be r7,r0,800371c <readv+0x148>
8003708: 34 0f 00 00 mvi r15,0
800370c: e3 ff ff da bi 8003674 <readv+0xa0>
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
8003710: 4e 0c ff d9 bge r16,r12,8003674 <readv+0xa0>
8003714: 29 61 00 40 lw r1,(r11+64)
8003718: 28 29 00 08 lw r9,(r1+8)
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
800371c: 29 c2 00 00 lw r2,(r14+0)
8003720: 29 c3 00 04 lw r3,(r14+4)
8003724: b9 60 08 00 mv r1,r11
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
8003728: 36 10 00 01 addi r16,r16,1
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
800372c: d9 20 00 00 call r9
8003730: b8 20 68 00 mv r13,r1
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
8003734: 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 )
8003738: 48 01 00 10 bg r0,r1,8003778 <readv+0x1a4> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
800373c: 44 20 00 0b be r1,r0,8003768 <readv+0x194> <== NEVER TAKEN
iop->offset += bytes;
8003740: fb ff f6 2d calli 8000ff4 <__ashrsi3>
8003744: 29 62 00 14 lw r2,(r11+20)
8003748: 29 64 00 10 lw r4,(r11+16)
total += bytes;
800374c: b5 ed 78 00 add r15,r15,r13
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
8003750: b5 a2 10 00 add r2,r13,r2
8003754: f5 a2 18 00 cmpgu r3,r13,r2
8003758: b4 24 08 00 add r1,r1,r4
800375c: b4 61 08 00 add r1,r3,r1
8003760: 59 61 00 10 sw (r11+16),r1
8003764: 59 62 00 14 sw (r11+20),r2
total += bytes;
}
if (bytes != iov[ v ].iov_len)
8003768: 29 c1 00 04 lw r1,(r14+4)
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
800376c: 35 ce 00 08 addi r14,r14,8
if ( bytes > 0 ) {
iop->offset += bytes;
total += bytes;
}
if (bytes != iov[ v ].iov_len)
8003770: 45 a1 ff e8 be r13,r1,8003710 <readv+0x13c> <== ALWAYS TAKEN
8003774: e3 ff ff c0 bi 8003674 <readv+0xa0> <== NOT EXECUTED
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
8003778: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED
800377c: e3 ff ff be bi 8003674 <readv+0xa0> <== NOT EXECUTED
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
8003780: f8 00 31 bb calli 800fe6c <__errno> <== NOT EXECUTED
8003784: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8003788: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800378c: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED
8003790: e3 ff ff b9 bi 8003674 <readv+0xa0> <== NOT EXECUTED
0801bcb4 <realloc>:
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
801bcb4: 37 9c ff e4 addi sp,sp,-28
801bcb8: 5b 8b 00 18 sw (sp+24),r11
801bcbc: 5b 8c 00 14 sw (sp+20),r12
801bcc0: 5b 8d 00 10 sw (sp+16),r13
801bcc4: 5b 8e 00 0c sw (sp+12),r14
801bcc8: 5b 8f 00 08 sw (sp+8),r15
801bccc: 5b 9d 00 04 sw (sp+4),ra
801bcd0: 78 0c 08 01 mvhi r12,0x801
801bcd4: 39 8c e7 28 ori r12,r12,0xe728
801bcd8: 29 84 00 10 lw r4,(r12+16)
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
801bcdc: 78 03 08 01 mvhi r3,0x801
801bce0: 38 63 ea 40 ori r3,r3,0xea40
801bce4: 28 63 00 00 lw r3,(r3+0)
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
801bce8: 34 84 00 01 addi r4,r4,1
801bcec: b8 20 58 00 mv r11,r1
801bcf0: 59 84 00 10 sw (r12+16),r4
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
801bcf4: 34 01 00 03 mvi r1,3
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
801bcf8: b8 40 70 00 mv r14,r2
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
801bcfc: 44 61 00 23 be r3,r1,801bd88 <realloc+0xd4> <== ALWAYS TAKEN
}
/*
* Continue with realloc().
*/
if ( !ptr )
801bd00: 45 60 00 2e be r11,r0,801bdb8 <realloc+0x104>
return malloc( size );
if ( !size ) {
801bd04: 45 c0 00 18 be r14,r0,801bd64 <realloc+0xb0> <== NEVER TAKEN
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
801bd08: 78 0d 08 01 mvhi r13,0x801
801bd0c: 39 ad e0 1c ori r13,r13,0xe01c
801bd10: 29 a1 00 00 lw r1,(r13+0)
801bd14: b9 60 10 00 mv r2,r11
801bd18: 37 83 00 1c addi r3,sp,28
801bd1c: f8 00 00 85 calli 801bf30 <_Protected_heap_Get_block_size>
801bd20: b8 20 78 00 mv r15,r1
801bd24: 44 20 00 14 be r1,r0,801bd74 <realloc+0xc0>
#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 ) ) {
801bd28: 29 a1 00 00 lw r1,(r13+0)
801bd2c: b9 60 10 00 mv r2,r11
801bd30: b9 c0 18 00 mv r3,r14
801bd34: f8 00 00 97 calli 801bf90 <_Protected_heap_Resize_block>
801bd38: b8 20 68 00 mv r13,r1
801bd3c: 44 20 00 23 be r1,r0,801bdc8 <realloc+0x114>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
801bd40: b9 60 08 00 mv r1,r11
801bd44: 2b 9d 00 04 lw ra,(sp+4)
801bd48: 2b 8b 00 18 lw r11,(sp+24)
801bd4c: 2b 8c 00 14 lw r12,(sp+20)
801bd50: 2b 8d 00 10 lw r13,(sp+16)
801bd54: 2b 8e 00 0c lw r14,(sp+12)
801bd58: 2b 8f 00 08 lw r15,(sp+8)
801bd5c: 37 9c 00 1c addi sp,sp,28
801bd60: c3 a0 00 00 ret
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
801bd64: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
801bd68: fb ff ae f9 calli 800794c <free> <== NOT EXECUTED
801bd6c: b9 c0 58 00 mv r11,r14 <== NOT EXECUTED
return (void *) 0;
801bd70: e3 ff ff f4 bi 801bd40 <realloc+0x8c> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
801bd74: fb ff c5 84 calli 800d384 <__errno>
801bd78: 34 02 00 16 mvi r2,22
801bd7c: 58 22 00 00 sw (r1+0),r2
801bd80: b9 e0 58 00 mv r11,r15
return (void *) 0;
801bd84: e3 ff ff ef bi 801bd40 <realloc+0x8c>
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
801bd88: 78 01 08 01 mvhi r1,0x801
801bd8c: 38 21 e8 a4 ori r1,r1,0xe8a4
801bd90: 28 21 00 00 lw r1,(r1+0)
801bd94: 44 20 00 03 be r1,r0,801bda0 <realloc+0xec> <== ALWAYS TAKEN
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
801bd98: 34 0b 00 00 mvi r11,0
801bd9c: e3 ff ff e9 bi 801bd40 <realloc+0x8c>
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
return (void *) 0;
if (_ISR_Nest_level > 0)
801bda0: 78 02 08 01 mvhi r2,0x801
801bda4: 38 42 e9 3c ori r2,r2,0xe93c
801bda8: 28 42 00 00 lw r2,(r2+0)
801bdac: 44 41 ff d5 be r2,r1,801bd00 <realloc+0x4c> <== ALWAYS TAKEN
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
801bdb0: 34 0b 00 00 mvi r11,0 <== NOT EXECUTED
801bdb4: e3 ff ff e3 bi 801bd40 <realloc+0x8c> <== NOT EXECUTED
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
801bdb8: b9 c0 08 00 mv r1,r14
801bdbc: fb ff b0 a6 calli 8008054 <malloc>
801bdc0: b8 20 58 00 mv r11,r1
801bdc4: e3 ff ff df bi 801bd40 <realloc+0x8c>
* 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 );
801bdc8: b9 c0 08 00 mv r1,r14
801bdcc: fb ff b0 a2 calli 8008054 <malloc>
801bdd0: b8 20 78 00 mv r15,r1
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
801bdd4: 29 81 00 04 lw r1,(r12+4)
801bdd8: 34 21 ff ff addi r1,r1,-1
801bddc: 59 81 00 04 sw (r12+4),r1
if ( !new_area ) {
801bde0: 45 ed ff ee be r15,r13,801bd98 <realloc+0xe4>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
801bde4: 2b 81 00 1c lw r1,(sp+28)
801bde8: b9 c0 18 00 mv r3,r14
801bdec: 50 2e 00 02 bgeu r1,r14,801bdf4 <realloc+0x140> <== NEVER TAKEN
801bdf0: b8 20 18 00 mv r3,r1
801bdf4: b9 60 10 00 mv r2,r11
801bdf8: b9 e0 08 00 mv r1,r15
801bdfc: fb ff c8 08 calli 800de1c <memcpy>
free( ptr );
801be00: b9 60 08 00 mv r1,r11
801be04: fb ff ae d2 calli 800794c <free>
801be08: b9 e0 58 00 mv r11,r15
return new_area;
801be0c: e3 ff ff cd bi 801bd40 <realloc+0x8c>
08006a0c <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
8006a0c: 37 9c ff c4 addi sp,sp,-60
8006a10: 5b 8b 00 14 sw (sp+20),r11
8006a14: 5b 8c 00 10 sw (sp+16),r12
8006a18: 5b 8d 00 0c sw (sp+12),r13
8006a1c: 5b 8e 00 08 sw (sp+8),r14
8006a20: 5b 9d 00 04 sw (sp+4),ra
8006a24: b8 20 60 00 mv r12,r1
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
8006a28: fb ff f8 93 calli 8004c74 <rtems_filesystem_dirname>
8006a2c: b8 20 58 00 mv r11,r1
if ( parentpathlen == 0 )
8006a30: 5c 20 00 80 bne r1,r0,8006c30 <rmdir+0x224>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
8006a34: 41 82 00 00 lbu r2,(r12+0)
8006a38: 64 43 00 5c cmpei r3,r2,92
8006a3c: 64 41 00 2f cmpei r1,r2,47
8006a40: b8 61 08 00 or r1,r3,r1
8006a44: 44 2b 00 4e be r1,r11,8006b7c <rmdir+0x170> <== NEVER TAKEN
8006a48: 78 01 08 02 mvhi r1,0x802
8006a4c: 38 21 a1 30 ori r1,r1,0xa130
8006a50: 28 22 00 00 lw r2,(r1+0)
8006a54: 34 0d 00 00 mvi r13,0
8006a58: 28 41 00 18 lw r1,(r2+24)
8006a5c: 5b 81 00 2c sw (sp+44),r1
8006a60: 28 41 00 1c lw r1,(r2+28)
8006a64: 5b 81 00 30 sw (sp+48),r1
8006a68: 28 41 00 20 lw r1,(r2+32)
8006a6c: 5b 81 00 34 sw (sp+52),r1
8006a70: 28 41 00 24 lw r1,(r2+36)
8006a74: 5b 81 00 38 sw (sp+56),r1
8006a78: 28 42 00 28 lw r2,(r2+40)
8006a7c: 5b 82 00 3c sw (sp+60),r2
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
8006a80: 2b 82 00 2c lw r2,(sp+44)
name = pathname + parentpathlen;
8006a84: b5 8b 58 00 add r11,r12,r11
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
8006a88: b9 60 08 00 mv r1,r11
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
8006a8c: 5b 82 00 18 sw (sp+24),r2
8006a90: 2b 82 00 30 lw r2,(sp+48)
8006a94: 5b 82 00 1c sw (sp+28),r2
8006a98: 2b 82 00 34 lw r2,(sp+52)
8006a9c: 5b 82 00 20 sw (sp+32),r2
8006aa0: 2b 82 00 38 lw r2,(sp+56)
8006aa4: 5b 82 00 24 sw (sp+36),r2
8006aa8: 2b 82 00 3c lw r2,(sp+60)
8006aac: 5b 82 00 28 sw (sp+40),r2
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
8006ab0: f8 00 41 a2 calli 8017138 <strlen>
8006ab4: b8 20 10 00 mv r2,r1
8006ab8: b9 60 08 00 mv r1,r11
8006abc: fb ff f8 55 calli 8004c10 <rtems_filesystem_prefix_separators>
8006ac0: b5 61 60 00 add r12,r11,r1
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
8006ac4: b9 80 08 00 mv r1,r12
8006ac8: f8 00 41 9c calli 8017138 <strlen>
8006acc: 34 03 00 00 mvi r3,0
8006ad0: 37 8b 00 18 addi r11,sp,24
8006ad4: b8 20 10 00 mv r2,r1
8006ad8: b9 60 20 00 mv r4,r11
8006adc: b9 80 08 00 mv r1,r12
8006ae0: b8 60 28 00 mv r5,r3
8006ae4: fb ff f8 81 calli 8004ce8 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
8006ae8: 5c 20 00 47 bne r1,r0,8006c04 <rmdir+0x1f8>
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
8006aec: 2b 83 00 24 lw r3,(sp+36)
8006af0: 28 62 00 10 lw r2,(r3+16)
8006af4: 44 41 00 6a be r2,r1,8006c9c <rmdir+0x290> <== NEVER TAKEN
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 ){
8006af8: b9 60 08 00 mv r1,r11
8006afc: d8 40 00 00 call r2
8006b00: 34 02 00 01 mvi r2,1
8006b04: 5c 22 00 2e bne r1,r2,8006bbc <rmdir+0x1b0>
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
8006b08: 2b 81 00 20 lw r1,(sp+32)
8006b0c: 28 23 00 34 lw r3,(r1+52)
8006b10: 44 60 00 51 be r3,r0,8006c54 <rmdir+0x248> <== NEVER TAKEN
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
8006b14: 37 8e 00 2c addi r14,sp,44
8006b18: b9 60 10 00 mv r2,r11
8006b1c: b9 c0 08 00 mv r1,r14
8006b20: d8 60 00 00 call r3
rtems_filesystem_freenode( &loc );
8006b24: 2b 82 00 24 lw r2,(sp+36)
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
8006b28: b8 20 60 00 mv r12,r1
rtems_filesystem_freenode( &loc );
8006b2c: 44 40 00 05 be r2,r0,8006b40 <rmdir+0x134> <== NEVER TAKEN
8006b30: 28 42 00 1c lw r2,(r2+28)
8006b34: 44 40 00 03 be r2,r0,8006b40 <rmdir+0x134> <== NEVER TAKEN
8006b38: b9 60 08 00 mv r1,r11
8006b3c: d8 40 00 00 call r2
if ( free_parentloc )
8006b40: 45 a0 00 07 be r13,r0,8006b5c <rmdir+0x150>
rtems_filesystem_freenode( &parentloc );
8006b44: 2b 81 00 38 lw r1,(sp+56)
8006b48: 44 20 00 05 be r1,r0,8006b5c <rmdir+0x150> <== NEVER TAKEN
8006b4c: 28 22 00 1c lw r2,(r1+28)
8006b50: 44 40 00 03 be r2,r0,8006b5c <rmdir+0x150> <== NEVER TAKEN
8006b54: b9 c0 08 00 mv r1,r14
8006b58: d8 40 00 00 call r2
return result;
}
8006b5c: b9 80 08 00 mv r1,r12
8006b60: 2b 9d 00 04 lw ra,(sp+4)
8006b64: 2b 8b 00 14 lw r11,(sp+20)
8006b68: 2b 8c 00 10 lw r12,(sp+16)
8006b6c: 2b 8d 00 0c lw r13,(sp+12)
8006b70: 2b 8e 00 08 lw r14,(sp+8)
8006b74: 37 9c 00 3c addi sp,sp,60
8006b78: c3 a0 00 00 ret
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
8006b7c: 44 40 ff b3 be r2,r0,8006a48 <rmdir+0x3c> <== NOT EXECUTED
8006b80: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8006b84: 38 21 a1 30 ori r1,r1,0xa130 <== NOT EXECUTED
8006b88: 28 21 00 00 lw r1,(r1+0) <== NOT EXECUTED
8006b8c: b9 60 68 00 mv r13,r11 <== NOT EXECUTED
8006b90: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED
8006b94: 5b 82 00 2c sw (sp+44),r2 <== NOT EXECUTED
8006b98: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED
8006b9c: 5b 82 00 30 sw (sp+48),r2 <== NOT EXECUTED
8006ba0: 28 22 00 0c lw r2,(r1+12) <== NOT EXECUTED
8006ba4: 5b 82 00 34 sw (sp+52),r2 <== NOT EXECUTED
8006ba8: 28 22 00 10 lw r2,(r1+16) <== NOT EXECUTED
8006bac: 5b 82 00 38 sw (sp+56),r2 <== NOT EXECUTED
8006bb0: 28 21 00 14 lw r1,(r1+20) <== NOT EXECUTED
8006bb4: 5b 81 00 3c sw (sp+60),r1 <== NOT EXECUTED
8006bb8: e3 ff ff b2 bi 8006a80 <rmdir+0x74> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
rtems_filesystem_freenode( &loc );
8006bbc: 2b 81 00 24 lw r1,(sp+36)
8006bc0: 44 20 00 05 be r1,r0,8006bd4 <rmdir+0x1c8> <== NEVER TAKEN
8006bc4: 28 22 00 1c lw r2,(r1+28)
8006bc8: 44 40 00 03 be r2,r0,8006bd4 <rmdir+0x1c8> <== NEVER TAKEN
8006bcc: b9 60 08 00 mv r1,r11
8006bd0: d8 40 00 00 call r2
if ( free_parentloc )
8006bd4: 45 a0 00 07 be r13,r0,8006bf0 <rmdir+0x1e4> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
8006bd8: 2b 81 00 38 lw r1,(sp+56)
8006bdc: 44 20 00 05 be r1,r0,8006bf0 <rmdir+0x1e4> <== NEVER TAKEN
8006be0: 28 22 00 1c lw r2,(r1+28)
8006be4: 44 40 00 03 be r2,r0,8006bf0 <rmdir+0x1e4> <== NEVER TAKEN
8006be8: 37 81 00 2c addi r1,sp,44
8006bec: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( ENOTDIR );
8006bf0: f8 00 32 e9 calli 8013794 <__errno>
8006bf4: 34 02 00 14 mvi r2,20
8006bf8: 58 22 00 00 sw (r1+0),r2
8006bfc: 34 0c ff ff mvi r12,-1
8006c00: e3 ff ff d7 bi 8006b5c <rmdir+0x150>
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
8006c04: 5d a0 00 03 bne r13,r0,8006c10 <rmdir+0x204> <== NEVER TAKEN
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
8006c08: 34 0c ff ff mvi r12,-1
8006c0c: e3 ff ff d4 bi 8006b5c <rmdir+0x150>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
8006c10: 2b 81 00 38 lw r1,(sp+56) <== NOT EXECUTED
8006c14: 44 20 ff fd be r1,r0,8006c08 <rmdir+0x1fc> <== NOT EXECUTED
8006c18: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8006c1c: 44 40 ff fb be r2,r0,8006c08 <rmdir+0x1fc> <== NOT EXECUTED
8006c20: 37 81 00 2c addi r1,sp,44 <== NOT EXECUTED
8006c24: d8 40 00 00 call r2 <== NOT EXECUTED
8006c28: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
8006c2c: e3 ff ff cc bi 8006b5c <rmdir+0x150> <== NOT EXECUTED
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
8006c30: b9 80 08 00 mv r1,r12
8006c34: b9 60 10 00 mv r2,r11
8006c38: 34 03 00 02 mvi r3,2
8006c3c: 37 84 00 2c addi r4,sp,44
8006c40: 34 05 00 00 mvi r5,0
8006c44: fb ff f8 6c calli 8004df4 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
8006c48: 5c 20 ff f0 bne r1,r0,8006c08 <rmdir+0x1fc> <== NEVER TAKEN
8006c4c: 34 0d 00 01 mvi r13,1
8006c50: e3 ff ff 8c bi 8006a80 <rmdir+0x74>
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
8006c54: 2b 81 00 24 lw r1,(sp+36) <== NOT EXECUTED
8006c58: 44 23 00 05 be r1,r3,8006c6c <rmdir+0x260> <== NOT EXECUTED
8006c5c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8006c60: 44 40 00 03 be r2,r0,8006c6c <rmdir+0x260> <== NOT EXECUTED
8006c64: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8006c68: d8 40 00 00 call r2 <== NOT EXECUTED
if ( free_parentloc )
8006c6c: 45 a0 00 07 be r13,r0,8006c88 <rmdir+0x27c> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
8006c70: 2b 81 00 38 lw r1,(sp+56) <== NOT EXECUTED
8006c74: 44 20 00 05 be r1,r0,8006c88 <rmdir+0x27c> <== NOT EXECUTED
8006c78: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8006c7c: 44 40 00 03 be r2,r0,8006c88 <rmdir+0x27c> <== NOT EXECUTED
8006c80: 37 81 00 2c addi r1,sp,44 <== NOT EXECUTED
8006c84: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8006c88: f8 00 32 c3 calli 8013794 <__errno> <== NOT EXECUTED
8006c8c: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8006c90: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8006c94: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
8006c98: e3 ff ff b1 bi 8006b5c <rmdir+0x150> <== NOT EXECUTED
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
8006c9c: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED
8006ca0: 44 62 ff f3 be r3,r2,8006c6c <rmdir+0x260> <== NOT EXECUTED
8006ca4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8006ca8: d8 60 00 00 call r3 <== NOT EXECUTED
8006cac: e3 ff ff f0 bi 8006c6c <rmdir+0x260> <== NOT EXECUTED
0800b57c <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
800b57c: 37 9c ff e4 addi sp,sp,-28
800b580: 5b 8b 00 1c sw (sp+28),r11
800b584: 5b 8c 00 18 sw (sp+24),r12
800b588: 5b 8d 00 14 sw (sp+20),r13
800b58c: 5b 8e 00 10 sw (sp+16),r14
800b590: 5b 8f 00 0c sw (sp+12),r15
800b594: 5b 90 00 08 sw (sp+8),r16
800b598: 5b 9d 00 04 sw (sp+4),ra
800b59c: 34 0c 00 00 mvi r12,0
800b5a0: b8 20 80 00 mv r16,r1
800b5a4: b8 40 70 00 mv r14,r2
800b5a8: b9 80 78 00 mv r15,r12
800b5ac: 34 0b 00 01 mvi r11,1
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
800b5b0: 34 0d 00 20 mvi r13,32
800b5b4: e0 00 00 03 bi 800b5c0 <rtems_assoc_local_by_remote_bitfield+0x44>
800b5b8: b5 6b 58 00 add r11,r11,r11
800b5bc: 45 8d 00 0a be r12,r13,800b5e4 <rtems_assoc_local_by_remote_bitfield+0x68>
if (b & remote_value)
800b5c0: a1 6e 18 00 and r3,r11,r14
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
800b5c4: 35 8c 00 01 addi r12,r12,1
if (b & remote_value)
800b5c8: 44 60 ff fc be r3,r0,800b5b8 <rtems_assoc_local_by_remote_bitfield+0x3c>
local_value |= rtems_assoc_local_by_remote(ap, b);
800b5cc: b9 60 10 00 mv r2,r11
800b5d0: ba 00 08 00 mv r1,r16
800b5d4: f8 00 00 0e calli 800b60c <rtems_assoc_local_by_remote>
800b5d8: b9 e1 78 00 or r15,r15,r1
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
800b5dc: b5 6b 58 00 add r11,r11,r11
800b5e0: 5d 8d ff f8 bne r12,r13,800b5c0 <rtems_assoc_local_by_remote_bitfield+0x44><== ALWAYS TAKEN
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
}
return local_value;
}
800b5e4: b9 e0 08 00 mv r1,r15
800b5e8: 2b 9d 00 04 lw ra,(sp+4)
800b5ec: 2b 8b 00 1c lw r11,(sp+28)
800b5f0: 2b 8c 00 18 lw r12,(sp+24)
800b5f4: 2b 8d 00 14 lw r13,(sp+20)
800b5f8: 2b 8e 00 10 lw r14,(sp+16)
800b5fc: 2b 8f 00 0c lw r15,(sp+12)
800b600: 2b 90 00 08 lw r16,(sp+8)
800b604: 37 9c 00 1c addi sp,sp,28
800b608: c3 a0 00 00 ret
08014a58 <rtems_assoc_name_bad>:
uint32_t bad_value
#else
uint32_t bad_value __attribute((unused))
#endif
)
{
8014a58: 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;
}
8014a5c: 38 21 b1 f0 ori r1,r1,0xb1f0 <== NOT EXECUTED
8014a60: c3 a0 00 00 ret <== NOT EXECUTED
080107bc <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
80107bc: 37 9c ff f8 addi sp,sp,-8
80107c0: 5b 8b 00 08 sw (sp+8),r11
80107c4: 5b 9d 00 04 sw (sp+4),ra
80107c8: b8 40 58 00 mv r11,r2
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
80107cc: f8 00 00 0d calli 8010800 <rtems_assoc_ptr_by_local>
if (nap)
80107d0: 44 20 00 06 be r1,r0,80107e8 <rtems_assoc_name_by_local+0x2c><== NEVER TAKEN
return nap->name;
80107d4: 28 21 00 00 lw r1,(r1+0)
return rtems_assoc_name_bad(local_value);
}
80107d8: 2b 9d 00 04 lw ra,(sp+4)
80107dc: 2b 8b 00 08 lw r11,(sp+8)
80107e0: 37 9c 00 08 addi sp,sp,8
80107e4: c3 a0 00 00 ret
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
80107e8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80107ec: f8 00 10 9b calli 8014a58 <rtems_assoc_name_bad> <== NOT EXECUTED
}
80107f0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80107f4: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
80107f8: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
80107fc: c3 a0 00 00 ret <== NOT EXECUTED
0800d2a8 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
800d2a8: 37 9c ff f4 addi sp,sp,-12
800d2ac: 5b 8b 00 0c sw (sp+12),r11
800d2b0: 5b 8c 00 08 sw (sp+8),r12
800d2b4: 5b 9d 00 04 sw (sp+4),ra
800d2b8: b8 20 58 00 mv r11,r1
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
800d2bc: 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
)
{
800d2c0: b8 40 60 00 mv r12,r2
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
800d2c4: 44 20 00 1f be r1,r0,800d340 <rtems_assoc_ptr_by_local+0x98><== NEVER TAKEN
800d2c8: 78 02 08 01 mvhi r2,0x801
800d2cc: 38 42 cf 2c ori r2,r2,0xcf2c
800d2d0: f8 00 04 ad calli 800e584 <strcmp>
800d2d4: 34 02 00 00 mvi r2,0
800d2d8: 5c 22 00 0b bne r1,r2,800d304 <rtems_assoc_ptr_by_local+0x5c><== ALWAYS TAKEN
default_ap = ap++;
for ( ; ap->name; ap++)
800d2dc: 29 62 00 0c lw r2,(r11+12) <== NOT EXECUTED
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
800d2e0: 35 63 00 0c addi r3,r11,12 <== NOT EXECUTED
for ( ; ap->name; ap++)
800d2e4: 44 41 00 0a be r2,r1,800d30c <rtems_assoc_ptr_by_local+0x64><== NOT EXECUTED
800d2e8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
800d2ec: b8 60 58 00 mv r11,r3 <== NOT EXECUTED
if (ap->local_value == local_value)
800d2f0: 29 61 00 04 lw r1,(r11+4) <== NOT EXECUTED
800d2f4: 44 2c 00 06 be r1,r12,800d30c <rtems_assoc_ptr_by_local+0x64><== NOT EXECUTED
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
800d2f8: 35 6b 00 0c addi r11,r11,12
800d2fc: 29 61 00 00 lw r1,(r11+0)
800d300: 44 20 00 09 be r1,r0,800d324 <rtems_assoc_ptr_by_local+0x7c>
if (ap->local_value == local_value)
800d304: 29 61 00 04 lw r1,(r11+4)
800d308: 5c 2c ff fc bne r1,r12,800d2f8 <rtems_assoc_ptr_by_local+0x50>
return ap;
return default_ap;
}
800d30c: b9 60 08 00 mv r1,r11
800d310: 2b 9d 00 04 lw ra,(sp+4)
800d314: 2b 8b 00 0c lw r11,(sp+12)
800d318: 2b 8c 00 08 lw r12,(sp+8)
800d31c: 37 9c 00 0c addi sp,sp,12
800d320: c3 a0 00 00 ret
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
800d324: b8 40 58 00 mv r11,r2
if (ap->local_value == local_value)
return ap;
return default_ap;
}
800d328: b9 60 08 00 mv r1,r11
800d32c: 2b 9d 00 04 lw ra,(sp+4)
800d330: 2b 8b 00 0c lw r11,(sp+12)
800d334: 2b 8c 00 08 lw r12,(sp+8)
800d338: 37 9c 00 0c addi sp,sp,12
800d33c: c3 a0 00 00 ret
uint32_t local_value
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
800d340: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
return ap;
return default_ap;
}
800d344: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800d348: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800d34c: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
800d350: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
800d354: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
800d358: c3 a0 00 00 ret <== NOT EXECUTED
0800b634 <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
800b634: 37 9c ff f4 addi sp,sp,-12
800b638: 5b 8b 00 0c sw (sp+12),r11
800b63c: 5b 8c 00 08 sw (sp+8),r12
800b640: 5b 9d 00 04 sw (sp+4),ra
800b644: b8 20 58 00 mv r11,r1
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
800b648: 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
)
{
800b64c: b8 40 60 00 mv r12,r2
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
800b650: 44 20 00 1f be r1,r0,800b6cc <rtems_assoc_ptr_by_remote+0x98><== NEVER TAKEN
800b654: 78 02 08 01 mvhi r2,0x801
800b658: 38 42 cf 2c ori r2,r2,0xcf2c
800b65c: f8 00 0b ca calli 800e584 <strcmp>
800b660: 34 02 00 00 mvi r2,0
800b664: 5c 22 00 0b bne r1,r2,800b690 <rtems_assoc_ptr_by_remote+0x5c><== ALWAYS TAKEN
default_ap = ap++;
for ( ; ap->name; ap++)
800b668: 29 62 00 0c lw r2,(r11+12) <== NOT EXECUTED
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
800b66c: 35 63 00 0c addi r3,r11,12 <== NOT EXECUTED
for ( ; ap->name; ap++)
800b670: 44 41 00 0a be r2,r1,800b698 <rtems_assoc_ptr_by_remote+0x64><== NOT EXECUTED
800b674: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
800b678: b8 60 58 00 mv r11,r3 <== NOT EXECUTED
if (ap->remote_value == remote_value)
800b67c: 29 61 00 08 lw r1,(r11+8) <== NOT EXECUTED
800b680: 44 2c 00 06 be r1,r12,800b698 <rtems_assoc_ptr_by_remote+0x64><== NOT EXECUTED
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
800b684: 35 6b 00 0c addi r11,r11,12
800b688: 29 61 00 00 lw r1,(r11+0)
800b68c: 44 20 00 09 be r1,r0,800b6b0 <rtems_assoc_ptr_by_remote+0x7c>
if (ap->remote_value == remote_value)
800b690: 29 61 00 08 lw r1,(r11+8)
800b694: 5c 2c ff fc bne r1,r12,800b684 <rtems_assoc_ptr_by_remote+0x50>
return ap;
return default_ap;
}
800b698: b9 60 08 00 mv r1,r11
800b69c: 2b 9d 00 04 lw ra,(sp+4)
800b6a0: 2b 8b 00 0c lw r11,(sp+12)
800b6a4: 2b 8c 00 08 lw r12,(sp+8)
800b6a8: 37 9c 00 0c addi sp,sp,12
800b6ac: c3 a0 00 00 ret
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
800b6b0: b8 40 58 00 mv r11,r2
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
800b6b4: b9 60 08 00 mv r1,r11
800b6b8: 2b 9d 00 04 lw ra,(sp+4)
800b6bc: 2b 8b 00 0c lw r11,(sp+12)
800b6c0: 2b 8c 00 08 lw r12,(sp+8)
800b6c4: 37 9c 00 0c addi sp,sp,12
800b6c8: c3 a0 00 00 ret
uint32_t remote_value
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
800b6cc: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
800b6d0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800b6d4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800b6d8: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
800b6dc: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
800b6e0: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
800b6e4: c3 a0 00 00 ret <== NOT EXECUTED
0800c86c <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
800c86c: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
800c870: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
800c874: f8 00 02 8d calli 800d2a8 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if (nap)
800c878: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
800c87c: 44 20 00 02 be r1,r0,800c884 <rtems_assoc_remote_by_local+0x18><== NOT EXECUTED
return nap->remote_value;
800c880: 28 22 00 08 lw r2,(r1+8) <== NOT EXECUTED
return 0;
}
800c884: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
800c888: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800c88c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
800c890: c3 a0 00 00 ret <== NOT EXECUTED
08000f30 <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
8000f30: 37 9c ff f0 addi sp,sp,-16
8000f34: 5b 8b 00 08 sw (sp+8),r11
8000f38: 5b 9d 00 04 sw (sp+4),ra
const char *p;
if ( !name )
8000f3c: 34 0b 00 00 mvi r11,0
8000f40: 5c 2b 00 07 bne r1,r11,8000f5c <rtems_bsp_cmdline_get_param+0x2c>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
8000f44: 34 02 00 00 mvi r2,0
return NULL;
copy_string( p, value, length );
return value;
}
8000f48: b8 40 08 00 mv r1,r2
8000f4c: 2b 9d 00 04 lw ra,(sp+4)
8000f50: 2b 8b 00 08 lw r11,(sp+8)
8000f54: 37 9c 00 10 addi sp,sp,16
8000f58: c3 a0 00 00 ret
const char *p;
if ( !name )
return NULL;
if ( !value )
8000f5c: 44 4b ff fb be r2,r11,8000f48 <rtems_bsp_cmdline_get_param+0x18>
return NULL;
if ( !length )
8000f60: 44 6b ff f9 be r3,r11,8000f44 <rtems_bsp_cmdline_get_param+0x14>
return NULL;
value[0] = '\0';
8000f64: 30 4b 00 00 sb (r2+0),r11
p = rtems_bsp_cmdline_get_param_raw( name );
8000f68: 5b 82 00 10 sw (sp+16),r2
8000f6c: 5b 83 00 0c sw (sp+12),r3
8000f70: f8 00 00 1e calli 8000fe8 <rtems_bsp_cmdline_get_param_raw>
if ( !p )
8000f74: 2b 82 00 10 lw r2,(sp+16)
8000f78: 2b 83 00 0c lw r3,(sp+12)
8000f7c: 44 2b ff f2 be r1,r11,8000f44 <rtems_bsp_cmdline_get_param+0x14>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
8000f80: 40 25 00 00 lbu r5,(r1+0)
8000f84: 44 ab ff f1 be r5,r11,8000f48 <rtems_bsp_cmdline_get_param+0x18><== NEVER TAKEN
8000f88: 34 63 ff ff addi r3,r3,-1
8000f8c: 44 6b ff ef be r3,r11,8000f48 <rtems_bsp_cmdline_get_param+0x18><== NEVER TAKEN
8000f90: b9 60 20 00 mv r4,r11
8000f94: b9 60 30 00 mv r6,r11
if ( *p == '\"' ) {
8000f98: 34 08 00 22 mvi r8,34
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
8000f9c: 34 09 00 20 mvi r9,32
8000fa0: 20 c7 00 01 andi r7,r6,0x1
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
8000fa4: 44 a8 00 0f be r5,r8,8000fe0 <rtems_bsp_cmdline_get_param+0xb0>
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
8000fa8: 5c e0 00 02 bne r7,r0,8000fb0 <rtems_bsp_cmdline_get_param+0x80>
8000fac: 44 a9 ff e7 be r5,r9,8000f48 <rtems_bsp_cmdline_get_param+0x18>
break;
value[i++] = *p++;
8000fb0: 34 84 00 01 addi r4,r4,1
8000fb4: b4 4b 58 00 add r11,r2,r11
8000fb8: 31 65 00 00 sb (r11+0),r5
value[i] = '\0';
8000fbc: 34 07 00 00 mvi r7,0
8000fc0: b4 44 28 00 add r5,r2,r4
8000fc4: 30 a7 00 00 sb (r5+0),r7
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
8000fc8: b4 24 28 00 add r5,r1,r4
8000fcc: 40 a5 00 00 lbu r5,(r5+0)
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
break;
value[i++] = *p++;
8000fd0: b8 80 58 00 mv r11,r4
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
8000fd4: 44 a7 ff dd be r5,r7,8000f48 <rtems_bsp_cmdline_get_param+0x18>
8000fd8: 54 64 ff f2 bgu r3,r4,8000fa0 <rtems_bsp_cmdline_get_param+0x70><== ALWAYS TAKEN
8000fdc: e3 ff ff db bi 8000f48 <rtems_bsp_cmdline_get_param+0x18> <== NOT EXECUTED
if ( *p == '\"' ) {
quotes++;
8000fe0: 34 c6 00 01 addi r6,r6,1
8000fe4: e3 ff ff f3 bi 8000fb0 <rtems_bsp_cmdline_get_param+0x80>
08000fe8 <rtems_bsp_cmdline_get_param_raw>:
extern const char *bsp_boot_cmdline;
const char *rtems_bsp_cmdline_get_param_raw(
const char *name
)
{
8000fe8: 37 9c ff fc addi sp,sp,-4
8000fec: 5b 9d 00 04 sw (sp+4),ra
8000ff0: b8 20 10 00 mv r2,r1
const char *p;
if ( !name )
8000ff4: 5c 20 00 05 bne r1,r0,8001008 <rtems_bsp_cmdline_get_param_raw+0x20><== NEVER TAKEN
if ( !bsp_boot_cmdline )
return NULL;
p = strstr(bsp_boot_cmdline, name);
/* printf( "raw: %p (%s)\n", p, p ); */
return p;
8000ff8: 34 01 00 00 mvi r1,0
}
8000ffc: 2b 9d 00 04 lw ra,(sp+4)
8001000: 37 9c 00 04 addi sp,sp,4
8001004: c3 a0 00 00 ret
const char *p;
if ( !name )
return NULL;
if ( !bsp_boot_cmdline )
8001008: 78 01 08 01 mvhi r1,0x801
800100c: 38 21 f7 04 ori r1,r1,0xf704
8001010: 28 21 00 00 lw r1,(r1+0)
8001014: 44 20 ff f9 be r1,r0,8000ff8 <rtems_bsp_cmdline_get_param_raw+0x10><== NEVER TAKEN
return NULL;
p = strstr(bsp_boot_cmdline, name);
8001018: f8 00 37 5d calli 800ed8c <strstr>
/* printf( "raw: %p (%s)\n", p, p ); */
return p;
}
800101c: 2b 9d 00 04 lw ra,(sp+4)
8001020: 37 9c 00 04 addi sp,sp,4
8001024: c3 a0 00 00 ret
08001028 <rtems_bsp_cmdline_get_param_rhs>:
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
8001028: 37 9c ff f0 addi sp,sp,-16
800102c: 5b 8b 00 10 sw (sp+16),r11
8001030: 5b 8c 00 0c sw (sp+12),r12
8001034: 5b 8d 00 08 sw (sp+8),r13
8001038: 5b 9d 00 04 sw (sp+4),ra
800103c: b8 20 68 00 mv r13,r1
8001040: b8 40 58 00 mv r11,r2
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
8001044: fb ff ff bb calli 8000f30 <rtems_bsp_cmdline_get_param>
8001048: b8 20 60 00 mv r12,r1
if ( !p )
800104c: 5c 20 00 09 bne r1,r0,8001070 <rtems_bsp_cmdline_get_param_rhs+0x48>
*d++ = *rhs++;
if ( *(d-1) == '\"' )
d--;
*d = '\0';
return value;
8001050: 34 0b 00 00 mvi r11,0
}
8001054: b9 60 08 00 mv r1,r11
8001058: 2b 9d 00 04 lw ra,(sp+4)
800105c: 2b 8b 00 10 lw r11,(sp+16)
8001060: 2b 8c 00 0c lw r12,(sp+12)
8001064: 2b 8d 00 08 lw r13,(sp+8)
8001068: 37 9c 00 10 addi sp,sp,16
800106c: c3 a0 00 00 ret
p = rtems_bsp_cmdline_get_param( name, value, length );
if ( !p )
return NULL;
rhs = &p[strlen(name)];
8001070: b9 a0 08 00 mv r1,r13
8001074: f8 00 35 a7 calli 800e710 <strlen>
8001078: b5 81 08 00 add r1,r12,r1
if ( *rhs != '=' )
800107c: 40 23 00 00 lbu r3,(r1+0)
8001080: 34 02 00 3d mvi r2,61
8001084: 5c 62 ff f3 bne r3,r2,8001050 <rtems_bsp_cmdline_get_param_rhs+0x28><== NEVER TAKEN
return NULL;
rhs++;
if ( *rhs == '\"' )
8001088: 40 24 00 01 lbu r4,(r1+1)
800108c: 34 02 00 22 mvi r2,34
rhs = &p[strlen(name)];
if ( *rhs != '=' )
return NULL;
rhs++;
8001090: 34 25 00 01 addi r5,r1,1
if ( *rhs == '\"' )
8001094: 44 82 00 16 be r4,r2,80010ec <rtems_bsp_cmdline_get_param_rhs+0xc4>
rhs++;
for ( d=value ; *rhs ; )
8001098: b9 60 18 00 mv r3,r11
800109c: 44 80 00 06 be r4,r0,80010b4 <rtems_bsp_cmdline_get_param_rhs+0x8c>
*d++ = *rhs++;
80010a0: 30 64 00 00 sb (r3+0),r4
80010a4: 34 a5 00 01 addi r5,r5,1
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
80010a8: 40 a4 00 00 lbu r4,(r5+0)
*d++ = *rhs++;
80010ac: 34 63 00 01 addi r3,r3,1
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
80010b0: 5c 80 ff fc bne r4,r0,80010a0 <rtems_bsp_cmdline_get_param_rhs+0x78>
*d++ = *rhs++;
if ( *(d-1) == '\"' )
80010b4: 40 64 ff ff lbu r4,(r3+-1)
80010b8: 34 02 00 22 mvi r2,34
80010bc: 34 61 ff ff addi r1,r3,-1
80010c0: 44 82 00 02 be r4,r2,80010c8 <rtems_bsp_cmdline_get_param_rhs+0xa0>
80010c4: b8 60 08 00 mv r1,r3
d--;
*d = '\0';
80010c8: 34 02 00 00 mvi r2,0
80010cc: 30 22 00 00 sb (r1+0),r2
return value;
}
80010d0: b9 60 08 00 mv r1,r11
80010d4: 2b 9d 00 04 lw ra,(sp+4)
80010d8: 2b 8b 00 10 lw r11,(sp+16)
80010dc: 2b 8c 00 0c lw r12,(sp+12)
80010e0: 2b 8d 00 08 lw r13,(sp+8)
80010e4: 37 9c 00 10 addi sp,sp,16
80010e8: c3 a0 00 00 ret
if ( *rhs != '=' )
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
80010ec: 40 24 00 02 lbu r4,(r1+2)
80010f0: 34 25 00 02 addi r5,r1,2
80010f4: e3 ff ff e9 bi 8001098 <rtems_bsp_cmdline_get_param_rhs+0x70>
08002a2c <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
8002a2c: 37 9c ff f8 addi sp,sp,-8
8002a30: 5b 9d 00 04 sw (sp+4),ra
8002a34: b8 20 18 00 mv r3,r1
if ( !time_buffer )
8002a38: 34 01 00 09 mvi r1,9
8002a3c: 44 40 00 0b be r2,r0,8002a68 <rtems_clock_get+0x3c> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
8002a40: 44 60 00 12 be r3,r0,8002a88 <rtems_clock_get+0x5c>
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
8002a44: 34 01 00 01 mvi r1,1
8002a48: 44 61 00 15 be r3,r1,8002a9c <rtems_clock_get+0x70>
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
8002a4c: 34 01 00 02 mvi r1,2
8002a50: 44 61 00 16 be r3,r1,8002aa8 <rtems_clock_get+0x7c>
*interval = rtems_clock_get_ticks_since_boot();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
8002a54: 34 01 00 03 mvi r1,3
8002a58: 44 61 00 1a be r3,r1,8002ac0 <rtems_clock_get+0x94>
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
8002a5c: 34 04 00 04 mvi r4,4
8002a60: 34 01 00 0a mvi r1,10
8002a64: 44 64 00 04 be r3,r4,8002a74 <rtems_clock_get+0x48> <== ALWAYS TAKEN
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
8002a68: 2b 9d 00 04 lw ra,(sp+4)
8002a6c: 37 9c 00 08 addi sp,sp,8
8002a70: c3 a0 00 00 ret
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
8002a74: b8 40 08 00 mv r1,r2
8002a78: f8 00 00 6b calli 8002c24 <rtems_clock_get_tod_timeval>
return RTEMS_INVALID_NUMBER;
}
8002a7c: 2b 9d 00 04 lw ra,(sp+4)
8002a80: 37 9c 00 08 addi sp,sp,8
8002a84: c3 a0 00 00 ret
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
8002a88: b8 40 08 00 mv r1,r2
8002a8c: f8 00 00 30 calli 8002b4c <rtems_clock_get_tod>
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
8002a90: 2b 9d 00 04 lw ra,(sp+4)
8002a94: 37 9c 00 08 addi sp,sp,8
8002a98: c3 a0 00 00 ret
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
8002a9c: b8 40 08 00 mv r1,r2
8002aa0: f8 00 00 0e calli 8002ad8 <rtems_clock_get_seconds_since_epoch>
8002aa4: e3 ff ff f1 bi 8002a68 <rtems_clock_get+0x3c>
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
8002aa8: 5b 82 00 08 sw (sp+8),r2
8002aac: f8 00 00 24 calli 8002b3c <rtems_clock_get_ticks_since_boot>
8002ab0: 2b 82 00 08 lw r2,(sp+8)
8002ab4: 58 41 00 00 sw (r2+0),r1
8002ab8: 34 01 00 00 mvi r1,0
return RTEMS_SUCCESSFUL;
8002abc: e3 ff ff eb bi 8002a68 <rtems_clock_get+0x3c>
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
8002ac0: 5b 82 00 08 sw (sp+8),r2
8002ac4: f8 00 00 13 calli 8002b10 <rtems_clock_get_ticks_per_second>
8002ac8: 2b 82 00 08 lw r2,(sp+8)
8002acc: 58 41 00 00 sw (r2+0),r1
8002ad0: 34 01 00 00 mvi r1,0
return RTEMS_SUCCESSFUL;
8002ad4: e3 ff ff e5 bi 8002a68 <rtems_clock_get+0x3c>
08003738 <rtems_clock_get_seconds_since_epoch>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_seconds_since_epoch(
rtems_interval *the_interval
)
{
8003738: b8 20 18 00 mv r3,r1
if ( !the_interval )
800373c: 34 01 00 09 mvi r1,9
8003740: 44 60 00 0b be r3,r0,800376c <rtems_clock_get_seconds_since_epoch+0x34><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
8003744: 78 02 08 02 mvhi r2,0x802
8003748: 38 42 c6 c0 ori r2,r2,0xc6c0
800374c: 40 42 00 00 lbu r2,(r2+0)
8003750: 34 01 00 0b mvi r1,11
8003754: 44 40 00 06 be r2,r0,800376c <rtems_clock_get_seconds_since_epoch+0x34><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
*the_interval = _TOD_Seconds_since_epoch();
8003758: 78 01 08 02 mvhi r1,0x802
800375c: 38 21 c7 3c ori r1,r1,0xc73c
8003760: 28 21 00 00 lw r1,(r1+0)
8003764: 58 61 00 00 sw (r3+0),r1
8003768: 34 01 00 00 mvi r1,0
return RTEMS_SUCCESSFUL;
}
800376c: c3 a0 00 00 ret
08003770 <rtems_clock_get_tod>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod(
rtems_time_of_day *time_buffer
)
{
8003770: 37 9c ff c0 addi sp,sp,-64
8003774: 5b 8b 00 0c sw (sp+12),r11
8003778: 5b 8c 00 08 sw (sp+8),r12
800377c: 5b 9d 00 04 sw (sp+4),ra
8003780: b8 20 58 00 mv r11,r1
rtems_time_of_day *tmbuf = time_buffer;
struct tm time;
struct timeval now;
if ( !time_buffer )
8003784: 34 01 00 09 mvi r1,9
8003788: 45 60 00 2b be r11,r0,8003834 <rtems_clock_get_tod+0xc4> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
800378c: 78 01 08 02 mvhi r1,0x802
8003790: 38 21 c6 c0 ori r1,r1,0xc6c0
8003794: 40 22 00 00 lbu r2,(r1+0)
8003798: 34 01 00 0b mvi r1,11
800379c: 44 40 00 26 be r2,r0,8003834 <rtems_clock_get_tod+0xc4> <== NEVER TAKEN
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
80037a0: 90 00 60 00 rcsr r12,IE
80037a4: 34 01 ff fe mvi r1,-2
80037a8: a1 81 08 00 and r1,r12,r1
80037ac: d0 01 00 00 wcsr IE,r1
_TOD_Get( &now );
80037b0: 37 81 00 34 addi r1,sp,52
80037b4: f8 00 05 cb calli 8004ee0 <_TOD_Get>
_ISR_Enable(level);
80037b8: 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;
80037bc: 2b 81 00 34 lw r1,(sp+52)
time->tv_usec = useconds;
80037c0: 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;
80037c4: 5b 81 00 3c sw (sp+60),r1
time->tv_usec = useconds;
80037c8: 2b 81 00 38 lw r1,(sp+56)
80037cc: f8 00 73 9d calli 8020640 <__divsi3>
80037d0: 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 );
80037d4: 37 82 00 10 addi r2,sp,16
80037d8: 37 81 00 3c addi r1,sp,60
80037dc: f8 00 32 4d calli 8010110 <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;
80037e0: 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;
80037e4: 2b 83 00 24 lw r3,(sp+36)
tmbuf->month = time.tm_mon + 1;
80037e8: 2b 82 00 20 lw r2,(sp+32)
tmbuf->day = time.tm_mday;
80037ec: 59 61 00 08 sw (r11+8),r1
tmbuf->hour = time.tm_hour;
80037f0: 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;
80037f4: 34 63 07 6c addi r3,r3,1900
tmbuf->month = time.tm_mon + 1;
80037f8: 34 42 00 01 addi r2,r2,1
tmbuf->day = time.tm_mday;
tmbuf->hour = time.tm_hour;
80037fc: 59 61 00 0c sw (r11+12),r1
tmbuf->minute = time.tm_min;
8003800: 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;
8003804: 59 63 00 00 sw (r11+0),r3
tmbuf->month = time.tm_mon + 1;
8003808: 59 62 00 04 sw (r11+4),r2
tmbuf->day = time.tm_mday;
tmbuf->hour = time.tm_hour;
tmbuf->minute = time.tm_min;
800380c: 59 61 00 10 sw (r11+16),r1
tmbuf->second = time.tm_sec;
8003810: 2b 81 00 10 lw r1,(sp+16)
8003814: 59 61 00 14 sw (r11+20),r1
tmbuf->ticks = now.tv_usec /
8003818: 78 01 08 02 mvhi r1,0x802
800381c: 38 21 40 c4 ori r1,r1,0x40c4
8003820: 28 22 00 0c lw r2,(r1+12)
8003824: 2b 81 00 40 lw r1,(sp+64)
8003828: f8 00 73 e5 calli 80207bc <__udivsi3>
800382c: 59 61 00 18 sw (r11+24),r1
8003830: 34 01 00 00 mvi r1,0
rtems_configuration_get_microseconds_per_tick();
return RTEMS_SUCCESSFUL;
}
8003834: 2b 9d 00 04 lw ra,(sp+4)
8003838: 2b 8b 00 0c lw r11,(sp+12)
800383c: 2b 8c 00 08 lw r12,(sp+8)
8003840: 37 9c 00 40 addi sp,sp,64
8003844: c3 a0 00 00 ret
08002c24 <rtems_clock_get_tod_timeval>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
8002c24: 37 9c ff ec addi sp,sp,-20
8002c28: 5b 8b 00 0c sw (sp+12),r11
8002c2c: 5b 8c 00 08 sw (sp+8),r12
8002c30: 5b 9d 00 04 sw (sp+4),ra
8002c34: b8 20 58 00 mv r11,r1
if ( !time )
8002c38: 34 01 00 09 mvi r1,9
8002c3c: 45 60 00 14 be r11,r0,8002c8c <rtems_clock_get_tod_timeval+0x68><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
8002c40: 78 02 08 02 mvhi r2,0x802
8002c44: 38 42 39 38 ori r2,r2,0x3938
8002c48: 40 42 00 00 lbu r2,(r2+0)
8002c4c: 34 01 00 0b mvi r1,11
8002c50: 44 40 00 0f be r2,r0,8002c8c <rtems_clock_get_tod_timeval+0x68><== NEVER TAKEN
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
8002c54: 90 00 60 00 rcsr r12,IE
8002c58: 34 01 ff fe mvi r1,-2
8002c5c: a1 81 08 00 and r1,r12,r1
8002c60: d0 01 00 00 wcsr IE,r1
_TOD_Get( &now );
8002c64: 37 81 00 10 addi r1,sp,16
8002c68: f8 00 05 27 calli 8004104 <_TOD_Get>
_ISR_Enable(level);
8002c6c: 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;
8002c70: 2b 82 00 10 lw r2,(sp+16)
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
8002c74: 2b 81 00 14 lw r1,(sp+20)
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
8002c78: 59 62 00 00 sw (r11+0),r2
time->tv_usec = useconds;
8002c7c: 34 02 03 e8 mvi r2,1000
8002c80: f8 00 71 24 calli 801f110 <__divsi3>
8002c84: 59 61 00 04 sw (r11+4),r1
8002c88: 34 01 00 00 mvi r1,0
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
}
8002c8c: 2b 9d 00 04 lw ra,(sp+4)
8002c90: 2b 8b 00 0c lw r11,(sp+12)
8002c94: 2b 8c 00 08 lw r12,(sp+8)
8002c98: 37 9c 00 14 addi sp,sp,20
8002c9c: c3 a0 00 00 ret
080023b4 <rtems_clock_get_uptime>:
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
80023b4: 37 9c ff fc addi sp,sp,-4
80023b8: 5b 9d 00 04 sw (sp+4),ra
if ( !uptime )
80023bc: 34 02 00 09 mvi r2,9
80023c0: 44 20 00 03 be r1,r0,80023cc <rtems_clock_get_uptime+0x18> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime_as_timespec( uptime );
80023c4: f8 00 03 7b calli 80031b0 <_TOD_Get_uptime_as_timespec>
80023c8: 34 02 00 00 mvi r2,0
return RTEMS_SUCCESSFUL;
}
80023cc: b8 40 08 00 mv r1,r2
80023d0: 2b 9d 00 04 lw ra,(sp+4)
80023d4: 37 9c 00 04 addi sp,sp,4
80023d8: c3 a0 00 00 ret
08003848 <rtems_clock_set>:
*/
rtems_status_code rtems_clock_set(
rtems_time_of_day *time_buffer
)
{
8003848: 37 9c ff f0 addi sp,sp,-16
800384c: 5b 8b 00 08 sw (sp+8),r11
8003850: 5b 9d 00 04 sw (sp+4),ra
struct timespec newtime;
if ( !time_buffer )
8003854: 34 02 00 09 mvi r2,9
*/
rtems_status_code rtems_clock_set(
rtems_time_of_day *time_buffer
)
{
8003858: b8 20 58 00 mv r11,r1
struct timespec newtime;
if ( !time_buffer )
800385c: 44 20 00 18 be r1,r0,80038bc <rtems_clock_set+0x74> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
8003860: f8 00 00 7c calli 8003a50 <_TOD_Validate>
8003864: 34 02 00 14 mvi r2,20
8003868: 44 20 00 15 be r1,r0,80038bc <rtems_clock_set+0x74> <== NEVER TAKEN
newtime.tv_sec = _TOD_To_seconds( time_buffer );
800386c: b9 60 08 00 mv r1,r11
8003870: f8 00 00 30 calli 8003930 <_TOD_To_seconds>
newtime.tv_nsec = time_buffer->ticks *
8003874: 78 02 08 02 mvhi r2,0x802
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
newtime.tv_sec = _TOD_To_seconds( time_buffer );
8003878: 5b 81 00 0c sw (sp+12),r1
newtime.tv_nsec = time_buffer->ticks *
800387c: 38 42 40 c4 ori r2,r2,0x40c4
8003880: 29 61 00 18 lw r1,(r11+24)
8003884: 28 42 00 0c lw r2,(r2+12)
8003888: f8 00 73 4e calli 80205c0 <__mulsi3>
800388c: 34 02 03 e8 mvi r2,1000
8003890: f8 00 73 4c calli 80205c0 <__mulsi3>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8003894: 78 02 08 02 mvhi r2,0x802
8003898: 38 42 c6 ac ori r2,r2,0xc6ac
800389c: 28 43 00 00 lw r3,(r2+0)
80038a0: 5b 81 00 10 sw (sp+16),r1
80038a4: 34 61 00 01 addi r1,r3,1
80038a8: 58 41 00 00 sw (r2+0),r1
rtems_configuration_get_nanoseconds_per_tick();
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
80038ac: 37 81 00 0c addi r1,sp,12
80038b0: f8 00 05 e7 calli 800504c <_TOD_Set>
_Thread_Enable_dispatch();
80038b4: f8 00 0b 9b calli 8006720 <_Thread_Enable_dispatch>
80038b8: 34 02 00 00 mvi r2,0
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
80038bc: b8 40 08 00 mv r1,r2
80038c0: 2b 9d 00 04 lw ra,(sp+4)
80038c4: 2b 8b 00 08 lw r11,(sp+8)
80038c8: 37 9c 00 10 addi sp,sp,16
80038cc: c3 a0 00 00 ret
08001a4c <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
8001a4c: 37 9c ff 84 addi sp,sp,-124
8001a50: 5b 8b 00 44 sw (sp+68),r11
8001a54: 5b 8c 00 40 sw (sp+64),r12
8001a58: 5b 8d 00 3c sw (sp+60),r13
8001a5c: 5b 8e 00 38 sw (sp+56),r14
8001a60: 5b 8f 00 34 sw (sp+52),r15
8001a64: 5b 90 00 30 sw (sp+48),r16
8001a68: 5b 91 00 2c sw (sp+44),r17
8001a6c: 5b 92 00 28 sw (sp+40),r18
8001a70: 5b 93 00 24 sw (sp+36),r19
8001a74: 5b 94 00 20 sw (sp+32),r20
8001a78: 5b 95 00 1c sw (sp+28),r21
8001a7c: 5b 96 00 18 sw (sp+24),r22
8001a80: 5b 97 00 14 sw (sp+20),r23
8001a84: 5b 98 00 10 sw (sp+16),r24
8001a88: 5b 99 00 0c sw (sp+12),r25
8001a8c: 5b 9b 00 08 sw (sp+8),fp
8001a90: 5b 9d 00 04 sw (sp+4),ra
8001a94: b8 40 78 00 mv r15,r2
8001a98: b8 20 80 00 mv r16,r1
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
8001a9c: 44 40 00 57 be r2,r0,8001bf8 <rtems_cpu_usage_report_with_plugin+0x1ac><== 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 );
8001aa0: 37 99 00 70 addi r25,sp,112
8001aa4: bb 20 08 00 mv r1,r25
8001aa8: f8 00 0d 34 calli 8004f78 <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
8001aac: 37 95 00 68 addi r21,sp,104
8001ab0: 78 01 08 02 mvhi r1,0x802
8001ab4: 38 21 cb ec ori r1,r1,0xcbec
8001ab8: bb 20 10 00 mv r2,r25
8001abc: ba a0 18 00 mv r3,r21
8001ac0: f8 00 18 55 calli 8007c14 <_Timespec_Subtract>
}
}
}
#endif
(*print)(
8001ac4: 78 02 08 02 mvhi r2,0x802
8001ac8: ba 00 08 00 mv r1,r16
8001acc: 78 13 08 02 mvhi r19,0x802
8001ad0: 38 42 1b 98 ori r2,r2,0x1b98
/*
* 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 ) {
8001ad4: 78 11 08 02 mvhi r17,0x802
}
}
}
#endif
(*print)(
8001ad8: d9 e0 00 00 call r15
8001adc: 3a 73 c6 48 ori r19,r19,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 ) {
8001ae0: 3a 31 c7 68 ori r17,r17,0xc768
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
8001ae4: 37 92 00 48 addi r18,sp,72
(*print)(
8001ae8: 78 18 08 02 mvhi r24,0x802
8001aec: 37 94 00 60 addi r20,sp,96
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
8001af0: 37 97 00 78 addi r23,sp,120
/*
* Print the information
*/
(*print)( context,
8001af4: 78 16 08 02 mvhi r22,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(
8001af8: 37 9b 00 58 addi fp,sp,88
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
8001afc: 2a 64 00 00 lw r4,(r19+0)
8001b00: 44 80 00 31 be r4,r0,8001bc4 <rtems_cpu_usage_report_with_plugin+0x178>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
8001b04: 28 8e 00 04 lw r14,(r4+4)
if ( information ) {
8001b08: 45 c0 00 2f be r14,r0,8001bc4 <rtems_cpu_usage_report_with_plugin+0x178><== NEVER TAKEN
for ( i=1 ; i <= information->maximum ; i++ ) {
8001b0c: 2d c5 00 10 lhu r5,(r14+16)
8001b10: 44 a0 00 2d be r5,r0,8001bc4 <rtems_cpu_usage_report_with_plugin+0x178>
8001b14: 34 0d 00 04 mvi r13,4
8001b18: 34 0c 00 01 mvi r12,1
the_thread = (Thread_Control *)information->local_table[ i ];
8001b1c: 29 c6 00 1c lw r6,(r14+28)
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
8001b20: 34 02 00 0d mvi r2,13
8001b24: ba 40 18 00 mv r3,r18
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
8001b28: b4 cd 30 00 add r6,r6,r13
8001b2c: 28 cb 00 00 lw r11,(r6+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++ ) {
8001b30: 35 8c 00 01 addi r12,r12,1
8001b34: 35 ad 00 04 addi r13,r13,4
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
8001b38: 45 60 00 22 be r11,r0,8001bc0 <rtems_cpu_usage_report_with_plugin+0x174><== NEVER TAKEN
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
8001b3c: 29 61 00 08 lw r1,(r11+8)
8001b40: f8 00 08 0a calli 8003b68 <rtems_object_get_name>
(*print)(
8001b44: 29 63 00 08 lw r3,(r11+8)
8001b48: bb 00 10 00 mv r2,r24
8001b4c: ba 40 20 00 mv r4,r18
8001b50: ba 00 08 00 mv r1,r16
8001b54: 38 42 1d 0c ori r2,r2,0x1d0c
8001b58: d9 e0 00 00 call r15
#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;
8001b5c: 29 61 00 84 lw r1,(r11+132)
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
8001b60: 2a 24 00 00 lw r4,(r17+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;
8001b64: 5b 81 00 60 sw (sp+96),r1
8001b68: 29 61 00 88 lw r1,(r11+136)
8001b6c: 5b 81 00 64 sw (sp+100),r1
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
8001b70: 28 86 00 08 lw r6,(r4+8)
8001b74: 29 65 00 08 lw r5,(r11+8)
8001b78: 44 c5 00 33 be r6,r5,8001c44 <rtems_cpu_usage_report_with_plugin+0x1f8>
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
8001b7c: 37 83 00 7c addi r3,sp,124
8001b80: ba e0 20 00 mv r4,r23
8001b84: ba 80 08 00 mv r1,r20
8001b88: ba a0 10 00 mv r2,r21
8001b8c: f8 00 17 cc calli 8007abc <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
8001b90: 2b 81 00 64 lw r1,(sp+100)
8001b94: 34 02 03 e8 mvi r2,1000
8001b98: f8 00 7b 09 calli 80207bc <__udivsi3>
8001b9c: 2b 85 00 7c lw r5,(sp+124)
8001ba0: 2b 86 00 78 lw r6,(sp+120)
8001ba4: 2b 83 00 60 lw r3,(sp+96)
8001ba8: ba c0 10 00 mv r2,r22
8001bac: b8 20 20 00 mv r4,r1
8001bb0: 38 42 1d 20 ori r2,r2,0x1d20
8001bb4: ba 00 08 00 mv r1,r16
8001bb8: d9 e0 00 00 call r15
8001bbc: 2d c5 00 10 lhu r5,(r14+16)
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++ ) {
8001bc0: 50 ac ff d7 bgeu r5,r12,8001b1c <rtems_cpu_usage_report_with_plugin+0xd0>
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
8001bc4: 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++ ) {
8001bc8: 36 73 00 04 addi r19,r19,4
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
8001bcc: 38 21 c6 58 ori r1,r1,0xc658
8001bd0: 5e 61 ff cb bne r19,r1,8001afc <rtems_cpu_usage_report_with_plugin+0xb0>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
8001bd4: 2b 81 00 6c lw r1,(sp+108)
8001bd8: 34 02 03 e8 mvi r2,1000
8001bdc: f8 00 7a f8 calli 80207bc <__udivsi3>
8001be0: 2b 83 00 68 lw r3,(sp+104)
8001be4: 78 02 08 02 mvhi r2,0x802
8001be8: b8 20 20 00 mv r4,r1
8001bec: 38 42 1d 38 ori r2,r2,0x1d38
8001bf0: ba 00 08 00 mv r1,r16
8001bf4: d9 e0 00 00 call r15
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
8001bf8: 2b 9d 00 04 lw ra,(sp+4)
8001bfc: 2b 8b 00 44 lw r11,(sp+68)
8001c00: 2b 8c 00 40 lw r12,(sp+64)
8001c04: 2b 8d 00 3c lw r13,(sp+60)
8001c08: 2b 8e 00 38 lw r14,(sp+56)
8001c0c: 2b 8f 00 34 lw r15,(sp+52)
8001c10: 2b 90 00 30 lw r16,(sp+48)
8001c14: 2b 91 00 2c lw r17,(sp+44)
8001c18: 2b 92 00 28 lw r18,(sp+40)
8001c1c: 2b 93 00 24 lw r19,(sp+36)
8001c20: 2b 94 00 20 lw r20,(sp+32)
8001c24: 2b 95 00 1c lw r21,(sp+28)
8001c28: 2b 96 00 18 lw r22,(sp+24)
8001c2c: 2b 97 00 14 lw r23,(sp+20)
8001c30: 2b 98 00 10 lw r24,(sp+16)
8001c34: 2b 99 00 0c lw r25,(sp+12)
8001c38: 2b 9b 00 08 lw fp,(sp+8)
8001c3c: 37 9c 00 7c addi sp,sp,124
8001c40: c3 a0 00 00 ret
* 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(
8001c44: 78 01 08 02 mvhi r1,0x802
8001c48: bb 20 10 00 mv r2,r25
8001c4c: bb 60 18 00 mv r3,fp
8001c50: 38 21 c7 70 ori r1,r1,0xc770
8001c54: f8 00 17 f0 calli 8007c14 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
8001c58: ba 80 08 00 mv r1,r20
8001c5c: bb 60 10 00 mv r2,fp
8001c60: f8 00 17 82 calli 8007a68 <_Timespec_Add_to>
8001c64: e3 ff ff c6 bi 8001b7c <rtems_cpu_usage_report_with_plugin+0x130>
0800c82c <rtems_deviceio_errno>:
{ 0, 0, 0 },
};
int
rtems_deviceio_errno(rtems_status_code code)
{
800c82c: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
800c830: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
800c834: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
800c838: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
800c83c: 78 01 08 01 mvhi r1,0x801 <== NOT EXECUTED
800c840: 38 21 cf c4 ori r1,r1,0xcfc4 <== NOT EXECUTED
800c844: f8 00 00 0a calli 800c86c <rtems_assoc_remote_by_local> <== NOT EXECUTED
800c848: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
800c84c: 44 20 00 03 be r1,r0,800c858 <rtems_deviceio_errno+0x2c> <== NOT EXECUTED
{
errno = rc;
800c850: f8 00 02 cd calli 800d384 <__errno> <== NOT EXECUTED
800c854: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
return -1;
}
return -1;
}
800c858: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
800c85c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800c860: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
800c864: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
800c868: c3 a0 00 00 ret <== NOT EXECUTED
0800735c <rtems_error>:
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
...
)
{
800735c: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED
8007360: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8007364: 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);
8007368: 37 83 00 0c addi r3,sp,12 <== NOT EXECUTED
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
...
)
{
800736c: 5b 84 00 10 sw (sp+16),r4 <== NOT EXECUTED
8007370: 5b 85 00 14 sw (sp+20),r5 <== NOT EXECUTED
8007374: 5b 86 00 18 sw (sp+24),r6 <== NOT EXECUTED
8007378: 5b 87 00 1c sw (sp+28),r7 <== NOT EXECUTED
800737c: 5b 88 00 20 sw (sp+32),r8 <== NOT EXECUTED
8007380: 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);
8007384: fb ff ff 65 calli 8007118 <rtems_verror> <== NOT EXECUTED
va_end(arglist);
return chars_written;
}
8007388: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800738c: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED
8007390: c3 a0 00 00 ret <== NOT EXECUTED
0800f010 <rtems_event_receive>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
800f010: 37 9c ff f8 addi sp,sp,-8
800f014: 5b 8b 00 08 sw (sp+8),r11
800f018: 5b 9d 00 04 sw (sp+4),ra
RTEMS_API_Control *api;
if ( !event_out )
800f01c: 34 05 00 09 mvi r5,9
800f020: 44 80 00 09 be r4,r0,800f044 <rtems_event_receive+0x34> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
800f024: 78 0b 08 02 mvhi r11,0x802
800f028: 39 6b 6a 00 ori r11,r11,0x6a00
800f02c: 29 65 00 00 lw r5,(r11+0)
800f030: 28 a5 01 28 lw r5,(r5+296)
if ( _Event_sets_Is_empty( event_in ) ) {
800f034: 5c 20 00 09 bne r1,r0,800f058 <rtems_event_receive+0x48>
*event_out = api->pending_events;
800f038: 28 a5 00 00 lw r5,(r5+0)
800f03c: 58 85 00 00 sw (r4+0),r5
800f040: b8 20 28 00 mv r5,r1
_Thread_Disable_dispatch();
_Event_Seize( event_in, option_set, ticks, event_out );
_Thread_Enable_dispatch();
return( _Thread_Executing->Wait.return_code );
}
800f044: b8 a0 08 00 mv r1,r5
800f048: 2b 9d 00 04 lw ra,(sp+4)
800f04c: 2b 8b 00 08 lw r11,(sp+8)
800f050: 37 9c 00 08 addi sp,sp,8
800f054: c3 a0 00 00 ret
800f058: 78 05 08 02 mvhi r5,0x802
800f05c: 38 a5 69 44 ori r5,r5,0x6944
800f060: 28 a6 00 00 lw r6,(r5+0)
800f064: 34 c6 00 01 addi r6,r6,1
800f068: 58 a6 00 00 sw (r5+0),r6
*event_out = api->pending_events;
return RTEMS_SUCCESSFUL;
}
_Thread_Disable_dispatch();
_Event_Seize( event_in, option_set, ticks, event_out );
800f06c: f8 00 00 09 calli 800f090 <_Event_Seize>
_Thread_Enable_dispatch();
800f070: fb ff df b4 calli 8006f40 <_Thread_Enable_dispatch>
return( _Thread_Executing->Wait.return_code );
800f074: 29 61 00 00 lw r1,(r11+0)
800f078: 28 25 00 34 lw r5,(r1+52)
}
800f07c: b8 a0 08 00 mv r1,r5
800f080: 2b 9d 00 04 lw ra,(sp+4)
800f084: 2b 8b 00 08 lw r11,(sp+8)
800f088: 37 9c 00 08 addi sp,sp,8
800f08c: c3 a0 00 00 ret
0800f1f4 <rtems_event_send>:
rtems_status_code rtems_event_send(
rtems_id id,
rtems_event_set event_in
)
{
800f1f4: 37 9c ff f4 addi sp,sp,-12
800f1f8: 5b 8b 00 08 sw (sp+8),r11
800f1fc: 5b 9d 00 04 sw (sp+4),ra
800f200: b8 40 58 00 mv r11,r2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
the_thread = _Thread_Get( id, &location );
800f204: 37 82 00 0c addi r2,sp,12
800f208: fb ff df 5b calli 8006f74 <_Thread_Get>
switch ( location ) {
800f20c: 2b 82 00 0c lw r2,(sp+12)
800f210: 34 03 00 04 mvi r3,4
800f214: 5c 40 00 0d bne r2,r0,800f248 <rtems_event_send+0x54> <== NEVER TAKEN
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
800f218: 28 23 01 28 lw r3,(r1+296)
rtems_event_set *the_event_set
)
{
ISR_Level level;
_ISR_Disable( level );
800f21c: 90 00 10 00 rcsr r2,IE
800f220: 34 04 ff fe mvi r4,-2
800f224: a0 44 20 00 and r4,r2,r4
800f228: d0 04 00 00 wcsr IE,r4
*the_event_set |= the_new_events;
800f22c: 28 64 00 00 lw r4,(r3+0)
800f230: b8 8b 58 00 or r11,r4,r11
800f234: 58 6b 00 00 sw (r3+0),r11
_ISR_Enable( level );
800f238: d0 02 00 00 wcsr IE,r2
_Event_sets_Post( event_in, &api->pending_events );
_Event_Surrender( the_thread );
800f23c: f8 00 00 08 calli 800f25c <_Event_Surrender>
_Thread_Enable_dispatch();
800f240: fb ff df 40 calli 8006f40 <_Thread_Enable_dispatch>
800f244: 34 03 00 00 mvi r3,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
800f248: b8 60 08 00 mv r1,r3
800f24c: 2b 9d 00 04 lw ra,(sp+4)
800f250: 2b 8b 00 08 lw r11,(sp+8)
800f254: 37 9c 00 0c addi sp,sp,12
800f258: c3 a0 00 00 ret
08000d90 <rtems_filesystem_dirname>:
}
int rtems_filesystem_dirname(
const char *pathname
)
{
8000d90: 37 9c ff f8 addi sp,sp,-8
8000d94: 5b 8b 00 08 sw (sp+8),r11
8000d98: 5b 9d 00 04 sw (sp+4),ra
8000d9c: b8 20 58 00 mv r11,r1
int len = strlen( pathname );
8000da0: f8 00 36 49 calli 800e6c4 <strlen>
8000da4: b8 20 18 00 mv r3,r1
while ( len ) {
8000da8: 44 20 00 13 be r1,r0,8000df4 <rtems_filesystem_dirname+0x64><== NEVER TAKEN
len--;
8000dac: 34 21 ff ff addi r1,r1,-1
if ( rtems_filesystem_is_separator( pathname[len] ) )
8000db0: b5 61 10 00 add r2,r11,r1
8000db4: 40 42 00 00 lbu r2,(r2+0)
8000db8: 64 45 00 5c cmpei r5,r2,92
8000dbc: 64 44 00 2f cmpei r4,r2,47
8000dc0: b8 a4 20 00 or r4,r5,r4
8000dc4: 5c 80 00 0c bne r4,r0,8000df4 <rtems_filesystem_dirname+0x64><== NEVER TAKEN
8000dc8: b5 63 18 00 add r3,r11,r3
8000dcc: 44 44 00 0a be r2,r4,8000df4 <rtems_filesystem_dirname+0x64><== NEVER TAKEN
const char *pathname
)
{
int len = strlen( pathname );
while ( len ) {
8000dd0: 44 20 00 09 be r1,r0,8000df4 <rtems_filesystem_dirname+0x64>
len--;
if ( rtems_filesystem_is_separator( pathname[len] ) )
8000dd4: 40 62 ff fe lbu r2,(r3+-2)
)
{
int len = strlen( pathname );
while ( len ) {
len--;
8000dd8: 34 21 ff ff addi r1,r1,-1
if ( rtems_filesystem_is_separator( pathname[len] ) )
8000ddc: 34 63 ff ff addi r3,r3,-1
8000de0: 64 45 00 5c cmpei r5,r2,92
8000de4: 64 44 00 2f cmpei r4,r2,47
8000de8: b8 a4 20 00 or r4,r5,r4
8000dec: 5c 80 00 02 bne r4,r0,8000df4 <rtems_filesystem_dirname+0x64>
8000df0: 5c 44 ff f8 bne r2,r4,8000dd0 <rtems_filesystem_dirname+0x40><== ALWAYS TAKEN
break;
}
return len;
}
8000df4: 2b 9d 00 04 lw ra,(sp+4)
8000df8: 2b 8b 00 08 lw r11,(sp+8)
8000dfc: 37 9c 00 08 addi sp,sp,8
8000e00: c3 a0 00 00 ret
08000f10 <rtems_filesystem_evaluate_path>:
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
8000f10: 37 9c ff fc addi sp,sp,-4
8000f14: 5b 9d 00 04 sw (sp+4),ra
/*
* Verify Input parameters.
*/
if ( !pathname )
8000f18: 44 20 00 31 be r1,r0,8000fdc <rtems_filesystem_evaluate_path+0xcc><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
8000f1c: 44 80 00 2b be r4,r0,8000fc8 <rtems_filesystem_evaluate_path+0xb8><== NEVER TAKEN
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
8000f20: 40 26 00 00 lbu r6,(r1+0)
8000f24: 64 c8 00 5c cmpei r8,r6,92
8000f28: 64 c7 00 2f cmpei r7,r6,47
8000f2c: b9 07 38 00 or r7,r8,r7
8000f30: 44 e0 00 16 be r7,r0,8000f88 <rtems_filesystem_evaluate_path+0x78>
8000f34: 78 06 08 01 mvhi r6,0x801
8000f38: 38 c6 e1 10 ori r6,r6,0xe110
8000f3c: 28 c6 00 00 lw r6,(r6+0)
8000f40: 34 07 00 01 mvi r7,1
8000f44: b8 e0 40 00 mv r8,r7
8000f48: 28 c9 00 18 lw r9,(r6+24)
8000f4c: 58 89 00 00 sw (r4+0),r9
8000f50: 28 c9 00 1c lw r9,(r6+28)
8000f54: 58 89 00 04 sw (r4+4),r9
8000f58: 28 c9 00 20 lw r9,(r6+32)
8000f5c: 58 89 00 08 sw (r4+8),r9
8000f60: 28 c9 00 24 lw r9,(r6+36)
8000f64: 58 89 00 0c sw (r4+12),r9
8000f68: 28 c6 00 28 lw r6,(r6+40)
8000f6c: 58 86 00 10 sw (r4+16),r6
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
8000f70: b4 27 08 00 add r1,r1,r7
8000f74: c8 48 10 00 sub r2,r2,r8
8000f78: fb ff ff a3 calli 8000e04 <rtems_filesystem_evaluate_relative_path>
pathnamelen - i,
flags,
pathloc,
follow_link );
}
8000f7c: 2b 9d 00 04 lw ra,(sp+4)
8000f80: 37 9c 00 04 addi sp,sp,4
8000f84: c3 a0 00 00 ret
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
8000f88: 44 c7 ff eb be r6,r7,8000f34 <rtems_filesystem_evaluate_path+0x24><== NEVER TAKEN
8000f8c: 78 06 08 01 mvhi r6,0x801
8000f90: 38 c6 e1 10 ori r6,r6,0xe110
8000f94: 28 c6 00 00 lw r6,(r6+0)
8000f98: b8 e0 40 00 mv r8,r7
8000f9c: 28 c9 00 04 lw r9,(r6+4)
8000fa0: 58 89 00 00 sw (r4+0),r9
8000fa4: 28 c9 00 08 lw r9,(r6+8)
8000fa8: 58 89 00 04 sw (r4+4),r9
8000fac: 28 c9 00 0c lw r9,(r6+12)
8000fb0: 58 89 00 08 sw (r4+8),r9
8000fb4: 28 c9 00 10 lw r9,(r6+16)
8000fb8: 58 89 00 0c sw (r4+12),r9
8000fbc: 28 c6 00 14 lw r6,(r6+20)
8000fc0: 58 86 00 10 sw (r4+16),r6
8000fc4: e3 ff ff eb bi 8000f70 <rtems_filesystem_evaluate_path+0x60>
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
8000fc8: f8 00 30 ef calli 800d384 <__errno> <== NOT EXECUTED
8000fcc: 34 02 00 05 mvi r2,5 <== NOT EXECUTED
8000fd0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8000fd4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000fd8: e3 ff ff e9 bi 8000f7c <rtems_filesystem_evaluate_path+0x6c><== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
8000fdc: f8 00 30 ea calli 800d384 <__errno> <== NOT EXECUTED
8000fe0: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
8000fe4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8000fe8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000fec: e3 ff ff e4 bi 8000f7c <rtems_filesystem_evaluate_path+0x6c><== NOT EXECUTED
08000e04 <rtems_filesystem_evaluate_relative_path>:
int pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
8000e04: 37 9c ff f0 addi sp,sp,-16
8000e08: 5b 8b 00 10 sw (sp+16),r11
8000e0c: 5b 8c 00 0c sw (sp+12),r12
8000e10: 5b 8d 00 08 sw (sp+8),r13
8000e14: 5b 9d 00 04 sw (sp+4),ra
8000e18: b8 a0 60 00 mv r12,r5
8000e1c: b8 60 68 00 mv r13,r3
8000e20: b8 80 58 00 mv r11,r4
/*
* Verify Input parameters.
*/
if ( !pathname )
8000e24: 44 20 00 33 be r1,r0,8000ef0 <rtems_filesystem_evaluate_relative_path+0xec><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
8000e28: 44 80 00 2d be r4,r0,8000edc <rtems_filesystem_evaluate_relative_path+0xd8><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
if ( !pathloc->ops->evalpath_h )
8000e2c: 28 85 00 0c lw r5,(r4+12)
8000e30: 28 a6 00 00 lw r6,(r5+0)
8000e34: 44 c0 00 25 be r6,r0,8000ec8 <rtems_filesystem_evaluate_relative_path+0xc4><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
8000e38: d8 c0 00 00 call r6
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
8000e3c: 7d 8c 00 00 cmpnei r12,r12,0
8000e40: 64 24 00 00 cmpei r4,r1,0
8000e44: a0 8c 60 00 and r12,r4,r12
8000e48: 45 80 00 0a be r12,r0,8000e70 <rtems_filesystem_evaluate_relative_path+0x6c>
if ( !pathloc->ops->node_type_h ){
8000e4c: 29 61 00 0c lw r1,(r11+12)
8000e50: 28 24 00 10 lw r4,(r1+16)
8000e54: 44 80 00 19 be r4,r0,8000eb8 <rtems_filesystem_evaluate_relative_path+0xb4><== NEVER TAKEN
rtems_filesystem_freenode( pathloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
type = (*pathloc->ops->node_type_h)( pathloc );
8000e58: b9 60 08 00 mv r1,r11
8000e5c: d8 80 00 00 call r4
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
8000e60: 34 21 ff fd addi r1,r1,-3
8000e64: 34 02 00 01 mvi r2,1
8000e68: 50 41 00 08 bgeu r2,r1,8000e88 <rtems_filesystem_evaluate_relative_path+0x84>
8000e6c: 34 01 00 00 mvi r1,0
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
8000e70: 2b 9d 00 04 lw ra,(sp+4)
8000e74: 2b 8b 00 10 lw r11,(sp+16)
8000e78: 2b 8c 00 0c lw r12,(sp+12)
8000e7c: 2b 8d 00 08 lw r13,(sp+8)
8000e80: 37 9c 00 10 addi sp,sp,16
8000e84: c3 a0 00 00 ret
type = (*pathloc->ops->node_type_h)( pathloc );
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
8000e88: 29 61 00 0c lw r1,(r11+12)
8000e8c: 28 23 00 34 lw r3,(r1+52)
8000e90: 44 60 00 1d be r3,r0,8000f04 <rtems_filesystem_evaluate_relative_path+0x100><== NEVER TAKEN
* 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 );
8000e94: b9 60 08 00 mv r1,r11
8000e98: b9 a0 10 00 mv r2,r13
8000e9c: d8 60 00 00 call r3
}
}
return result;
}
8000ea0: 2b 9d 00 04 lw ra,(sp+4)
8000ea4: 2b 8b 00 10 lw r11,(sp+16)
8000ea8: 2b 8c 00 0c lw r12,(sp+12)
8000eac: 2b 8d 00 08 lw r13,(sp+8)
8000eb0: 37 9c 00 10 addi sp,sp,16
8000eb4: c3 a0 00 00 ret
*/
if ( (result == 0) && follow_link ) {
if ( !pathloc->ops->node_type_h ){
rtems_filesystem_freenode( pathloc );
8000eb8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8000ebc: 44 44 00 03 be r2,r4,8000ec8 <rtems_filesystem_evaluate_relative_path+0xc4><== NOT EXECUTED
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
rtems_filesystem_freenode( pathloc );
8000ec0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8000ec4: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8000ec8: f8 00 31 2f calli 800d384 <__errno> <== NOT EXECUTED
8000ecc: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8000ed0: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8000ed4: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000ed8: e3 ff ff e6 bi 8000e70 <rtems_filesystem_evaluate_relative_path+0x6c><== NOT EXECUTED
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
8000edc: f8 00 31 2a calli 800d384 <__errno> <== NOT EXECUTED
8000ee0: 34 02 00 05 mvi r2,5 <== NOT EXECUTED
8000ee4: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8000ee8: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000eec: e3 ff ff e1 bi 8000e70 <rtems_filesystem_evaluate_relative_path+0x6c><== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
8000ef0: f8 00 31 25 calli 800d384 <__errno> <== NOT EXECUTED
8000ef4: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
8000ef8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8000efc: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000f00: e3 ff ff dc bi 8000e70 <rtems_filesystem_evaluate_relative_path+0x6c><== NOT EXECUTED
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
rtems_filesystem_freenode( pathloc );
8000f04: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8000f08: 5c 43 ff ee bne r2,r3,8000ec0 <rtems_filesystem_evaluate_relative_path+0xbc><== NOT EXECUTED
8000f0c: e3 ff ff ef bi 8000ec8 <rtems_filesystem_evaluate_relative_path+0xc4><== NOT EXECUTED
08000ba8 <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 )
{
8000ba8: 37 9c ff d8 addi sp,sp,-40
8000bac: 5b 8b 00 10 sw (sp+16),r11
8000bb0: 5b 8c 00 0c sw (sp+12),r12
8000bb4: 5b 8d 00 08 sw (sp+8),r13
8000bb8: 5b 9d 00 04 sw (sp+4),ra
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
8000bbc: 78 0b 08 01 mvhi r11,0x801
8000bc0: 39 6b e1 10 ori r11,r11,0xe110
8000bc4: 29 62 00 00 lw r2,(r11+0)
8000bc8: 34 01 00 12 mvi r1,18
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
8000bcc: 34 0c 00 00 mvi r12,0
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
8000bd0: 58 41 00 2c sw (r2+44),r1
init_fs_mount_table();
8000bd4: f8 00 01 ef calli 8001390 <init_fs_mount_table>
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
8000bd8: 78 01 08 01 mvhi r1,0x801
8000bdc: 38 21 c5 a4 ori r1,r1,0xc5a4
8000be0: 28 21 00 00 lw r1,(r1+0)
8000be4: 44 2c 00 49 be r1,r12,8000d08 <rtems_filesystem_initialize+0x160><== NEVER TAKEN
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
8000be8: 78 01 08 01 mvhi r1,0x801
8000bec: 38 21 e0 18 ori r1,r1,0xe018
8000bf0: 28 24 00 00 lw r4,(r1+0)
status = mount(
8000bf4: 37 81 00 28 addi r1,sp,40
8000bf8: 28 82 00 00 lw r2,(r4+0)
8000bfc: 28 85 00 0c lw r5,(r4+12)
8000c00: 28 83 00 04 lw r3,(r4+4)
8000c04: 28 84 00 08 lw r4,(r4+8)
8000c08: f8 00 01 ea calli 80013b0 <mount>
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
8000c0c: 34 02 ff ff mvi r2,-1
8000c10: 44 22 00 44 be r1,r2,8000d20 <rtems_filesystem_initialize+0x178><== NEVER TAKEN
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
8000c14: 2b 87 00 28 lw r7,(sp+40)
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
8000c18: 29 66 00 00 lw r6,(r11+0)
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8000c1c: 37 8d 00 14 addi r13,sp,20
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
8000c20: 28 e2 00 1c lw r2,(r7+28)
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8000c24: 78 01 08 01 mvhi r1,0x801
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
8000c28: 0c cc 00 30 sh (r6+48),r12
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
8000c2c: 58 c2 00 18 sw (r6+24),r2
8000c30: 28 e4 00 20 lw r4,(r7+32)
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8000c34: 34 02 00 01 mvi r2,1
8000c38: b9 80 18 00 mv r3,r12
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
8000c3c: 58 c4 00 1c sw (r6+28),r4
8000c40: 28 e8 00 24 lw r8,(r7+36)
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8000c44: b9 a0 20 00 mv r4,r13
8000c48: b9 80 28 00 mv r5,r12
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
8000c4c: 58 c8 00 20 sw (r6+32),r8
8000c50: 28 e8 00 28 lw r8,(r7+40)
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8000c54: 38 21 c8 00 ori r1,r1,0xc800
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
8000c58: 58 c8 00 24 sw (r6+36),r8
8000c5c: 28 e7 00 2c lw r7,(r7+44)
8000c60: 58 c7 00 28 sw (r6+40),r7
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8000c64: f8 00 00 ab calli 8000f10 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
8000c68: 2b 82 00 14 lw r2,(sp+20)
8000c6c: 29 66 00 00 lw r6,(r11+0)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8000c70: 78 01 08 01 mvhi r1,0x801
8000c74: b9 80 18 00 mv r3,r12
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
8000c78: 58 c2 00 18 sw (r6+24),r2
8000c7c: 2b 87 00 18 lw r7,(sp+24)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8000c80: b9 a0 20 00 mv r4,r13
8000c84: 34 02 00 01 mvi r2,1
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
8000c88: 58 c7 00 1c sw (r6+28),r7
8000c8c: 2b 88 00 1c lw r8,(sp+28)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8000c90: 38 21 c8 00 ori r1,r1,0xc800
8000c94: b9 80 28 00 mv r5,r12
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
8000c98: 58 c8 00 20 sw (r6+32),r8
8000c9c: 2b 87 00 20 lw r7,(sp+32)
8000ca0: 58 c7 00 24 sw (r6+36),r7
8000ca4: 2b 88 00 24 lw r8,(sp+36)
8000ca8: 58 c8 00 28 sw (r6+40),r8
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8000cac: f8 00 00 99 calli 8000f10 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
8000cb0: 2b 82 00 14 lw r2,(sp+20)
8000cb4: 29 63 00 00 lw r3,(r11+0)
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
8000cb8: 78 01 08 01 mvhi r1,0x801
8000cbc: 38 21 c8 04 ori r1,r1,0xc804
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
8000cc0: 58 62 00 04 sw (r3+4),r2
8000cc4: 2b 84 00 18 lw r4,(sp+24)
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
8000cc8: 34 02 01 ff mvi r2,511
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
8000ccc: 58 64 00 08 sw (r3+8),r4
8000cd0: 2b 87 00 1c lw r7,(sp+28)
8000cd4: 58 67 00 0c sw (r3+12),r7
8000cd8: 2b 88 00 20 lw r8,(sp+32)
8000cdc: 58 68 00 10 sw (r3+16),r8
8000ce0: 2b 84 00 24 lw r4,(sp+36)
8000ce4: 58 64 00 14 sw (r3+20),r4
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
8000ce8: f8 00 01 3f calli 80011e4 <mkdir>
if ( status != 0 )
8000cec: 5c 20 00 0a bne r1,r0,8000d14 <rtems_filesystem_initialize+0x16c><== NEVER TAKEN
* 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.
*/
}
8000cf0: 2b 9d 00 04 lw ra,(sp+4)
8000cf4: 2b 8b 00 10 lw r11,(sp+16)
8000cf8: 2b 8c 00 0c lw r12,(sp+12)
8000cfc: 2b 8d 00 08 lw r13,(sp+8)
8000d00: 37 9c 00 28 addi sp,sp,40
8000d04: c3 a0 00 00 ret
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
8000d08: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED
8000d0c: 38 21 00 01 ori r1,r1,0x1 <== NOT EXECUTED
8000d10: f8 00 07 1c calli 8002980 <rtems_fatal_error_occurred> <== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
8000d14: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED
8000d18: 38 21 00 03 ori r1,r1,0x3 <== NOT EXECUTED
8000d1c: f8 00 07 19 calli 8002980 <rtems_fatal_error_occurred> <== NOT EXECUTED
status = mount(
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
8000d20: 78 01 ab cd mvhi r1,0xabcd <== NOT EXECUTED
8000d24: 38 21 00 02 ori r1,r1,0x2 <== NOT EXECUTED
8000d28: f8 00 07 16 calli 8002980 <rtems_fatal_error_occurred> <== NOT EXECUTED
08007114 <rtems_filesystem_nodes_equal>:
);
bool rtems_filesystem_nodes_equal(
const rtems_filesystem_location_info_t *loc1,
const rtems_filesystem_location_info_t *loc2
){
8007114: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED
8007118: 28 41 00 00 lw r1,(r2+0) <== NOT EXECUTED
return ( loc1->node_access == loc2->node_access );
}
800711c: e4 61 08 00 cmpe r1,r3,r1 <== NOT EXECUTED
8007120: c3 a0 00 00 ret <== NOT EXECUTED
08000d2c <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
8000d2c: b8 20 38 00 mv r7,r1
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
8000d30: 40 21 00 00 lbu r1,(r1+0)
8000d34: 7c 44 00 00 cmpnei r4,r2,0
8000d38: 7c 23 00 00 cmpnei r3,r1,0
8000d3c: a0 83 18 00 and r3,r4,r3
8000d40: 44 60 00 12 be r3,r0,8000d88 <rtems_filesystem_prefix_separators+0x5c><== NEVER TAKEN
8000d44: 64 23 00 2f cmpei r3,r1,47
8000d48: 64 21 00 5c cmpei r1,r1,92
8000d4c: b8 23 08 00 or r1,r1,r3
8000d50: 44 20 00 0e be r1,r0,8000d88 <rtems_filesystem_prefix_separators+0x5c>
8000d54: 34 01 00 00 mvi r1,0
{
pathname++;
pathnamelen--;
stripped++;
8000d58: 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 ) )
8000d5c: b4 e1 18 00 add r3,r7,r1
8000d60: 40 63 00 00 lbu r3,(r3+0)
8000d64: fc 41 30 00 cmpne r6,r2,r1
8000d68: 7c 64 00 00 cmpnei r4,r3,0
8000d6c: 64 65 00 2f cmpei r5,r3,47
8000d70: 64 63 00 5c cmpei r3,r3,92
8000d74: a0 c4 20 00 and r4,r6,r4
8000d78: b8 65 18 00 or r3,r3,r5
8000d7c: 44 80 00 04 be r4,r0,8000d8c <rtems_filesystem_prefix_separators+0x60><== NEVER TAKEN
8000d80: 5c 60 ff f6 bne r3,r0,8000d58 <rtems_filesystem_prefix_separators+0x2c><== NEVER TAKEN
8000d84: c3 a0 00 00 ret
8000d88: 34 01 00 00 mvi r1,0
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
8000d8c: c3 a0 00 00 ret
08002168 <rtems_interrupt_catch>:
rtems_status_code rtems_interrupt_catch(
rtems_isr_entry new_isr_handler,
rtems_vector_number vector,
rtems_isr_entry *old_isr_handler
)
{
8002168: 37 9c ff fc addi sp,sp,-4
800216c: 5b 9d 00 04 sw (sp+4),ra
if ( !_ISR_Is_vector_number_valid( vector ) )
8002170: 34 05 00 1f mvi r5,31
rtems_status_code rtems_interrupt_catch(
rtems_isr_entry new_isr_handler,
rtems_vector_number vector,
rtems_isr_entry *old_isr_handler
)
{
8002174: b8 20 20 00 mv r4,r1
if ( !_ISR_Is_vector_number_valid( vector ) )
8002178: 50 a2 00 05 bgeu r5,r2,800218c <rtems_interrupt_catch+0x24><== ALWAYS TAKEN
800217c: 34 01 00 0a mvi r1,10 <== NOT EXECUTED
_ISR_Install_vector(
vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler );
return RTEMS_SUCCESSFUL;
}
8002180: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002184: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8002188: c3 a0 00 00 ret <== NOT EXECUTED
)
{
if ( !_ISR_Is_vector_number_valid( vector ) )
return RTEMS_INVALID_NUMBER;
if ( !_ISR_Is_valid_user_handler( (void *) new_isr_handler ) )
800218c: 44 80 00 09 be r4,r0,80021b0 <rtems_interrupt_catch+0x48> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) )
8002190: 44 60 00 08 be r3,r0,80021b0 <rtems_interrupt_catch+0x48> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_ISR_Install_vector(
8002194: b8 40 08 00 mv r1,r2
8002198: b8 80 10 00 mv r2,r4
800219c: f8 00 10 30 calli 800625c <_CPU_ISR_install_vector>
80021a0: 34 01 00 00 mvi r1,0
vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler );
return RTEMS_SUCCESSFUL;
}
80021a4: 2b 9d 00 04 lw ra,(sp+4)
80021a8: 37 9c 00 04 addi sp,sp,4
80021ac: c3 a0 00 00 ret
return RTEMS_INVALID_ADDRESS;
_ISR_Install_vector(
vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler );
return RTEMS_SUCCESSFUL;
80021b0: 34 01 00 09 mvi r1,9 <== NOT EXECUTED
}
80021b4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80021b8: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
80021bc: c3 a0 00 00 ret <== NOT EXECUTED
0800c068 <rtems_io_close>:
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
800c068: 37 9c ff ec addi sp,sp,-20
800c06c: 5b 8b 00 10 sw (sp+16),r11
800c070: 5b 8c 00 0c sw (sp+12),r12
800c074: 5b 8d 00 08 sw (sp+8),r13
800c078: 5b 9d 00 04 sw (sp+4),ra
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
800c07c: 78 04 08 01 mvhi r4,0x801
800c080: 38 84 f1 90 ori r4,r4,0xf190
800c084: 28 84 00 00 lw r4,(r4+0)
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
800c088: b8 20 58 00 mv r11,r1
800c08c: b8 40 60 00 mv r12,r2
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
800c090: 54 81 00 08 bgu r4,r1,800c0b0 <rtems_io_close+0x48> <== ALWAYS TAKEN
800c094: 34 01 00 0a mvi r1,10 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
800c098: 2b 9d 00 04 lw ra,(sp+4)
800c09c: 2b 8b 00 10 lw r11,(sp+16)
800c0a0: 2b 8c 00 0c lw r12,(sp+12)
800c0a4: 2b 8d 00 08 lw r13,(sp+8)
800c0a8: 37 9c 00 14 addi sp,sp,20
800c0ac: c3 a0 00 00 ret
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
800c0b0: 78 01 08 01 mvhi r1,0x801
800c0b4: 38 21 f1 94 ori r1,r1,0xf194
800c0b8: 28 2d 00 00 lw r13,(r1+0)
800c0bc: b5 6b 08 00 add r1,r11,r11
800c0c0: b4 2b 08 00 add r1,r1,r11
800c0c4: 34 02 00 03 mvi r2,3
800c0c8: 5b 83 00 14 sw (sp+20),r3
800c0cc: fb ff d0 49 calli 80001f0 <__ashlsi3>
800c0d0: b5 a1 08 00 add r1,r13,r1
800c0d4: 28 24 00 08 lw r4,(r1+8)
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
800c0d8: 2b 83 00 14 lw r3,(sp+20)
800c0dc: b8 80 08 00 mv r1,r4
800c0e0: 44 80 ff ee be r4,r0,800c098 <rtems_io_close+0x30>
800c0e4: b9 60 08 00 mv r1,r11
800c0e8: b9 80 10 00 mv r2,r12
800c0ec: d8 80 00 00 call r4
}
800c0f0: 2b 9d 00 04 lw ra,(sp+4)
800c0f4: 2b 8b 00 10 lw r11,(sp+16)
800c0f8: 2b 8c 00 0c lw r12,(sp+12)
800c0fc: 2b 8d 00 08 lw r13,(sp+8)
800c100: 37 9c 00 14 addi sp,sp,20
800c104: c3 a0 00 00 ret
0800c108 <rtems_io_control>:
rtems_status_code rtems_io_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
800c108: 37 9c ff ec addi sp,sp,-20
800c10c: 5b 8b 00 10 sw (sp+16),r11
800c110: 5b 8c 00 0c sw (sp+12),r12
800c114: 5b 8d 00 08 sw (sp+8),r13
800c118: 5b 9d 00 04 sw (sp+4),ra
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
800c11c: 78 04 08 01 mvhi r4,0x801
800c120: 38 84 f1 90 ori r4,r4,0xf190
800c124: 28 84 00 00 lw r4,(r4+0)
rtems_status_code rtems_io_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
800c128: b8 20 58 00 mv r11,r1
800c12c: b8 40 60 00 mv r12,r2
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
800c130: 54 81 00 08 bgu r4,r1,800c150 <rtems_io_control+0x48> <== ALWAYS TAKEN
800c134: 34 01 00 0a mvi r1,10 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
800c138: 2b 9d 00 04 lw ra,(sp+4)
800c13c: 2b 8b 00 10 lw r11,(sp+16)
800c140: 2b 8c 00 0c lw r12,(sp+12)
800c144: 2b 8d 00 08 lw r13,(sp+8)
800c148: 37 9c 00 14 addi sp,sp,20
800c14c: c3 a0 00 00 ret
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
800c150: 78 01 08 01 mvhi r1,0x801
800c154: 38 21 f1 94 ori r1,r1,0xf194
800c158: 28 2d 00 00 lw r13,(r1+0)
800c15c: b5 6b 08 00 add r1,r11,r11
800c160: b4 2b 08 00 add r1,r1,r11
800c164: 34 02 00 03 mvi r2,3
800c168: 5b 83 00 14 sw (sp+20),r3
800c16c: fb ff d0 21 calli 80001f0 <__ashlsi3>
800c170: b5 a1 08 00 add r1,r13,r1
800c174: 28 24 00 14 lw r4,(r1+20)
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
800c178: 2b 83 00 14 lw r3,(sp+20)
800c17c: b8 80 08 00 mv r1,r4
800c180: 44 80 ff ee be r4,r0,800c138 <rtems_io_control+0x30>
800c184: b9 60 08 00 mv r1,r11
800c188: b9 80 10 00 mv r2,r12
800c18c: d8 80 00 00 call r4
}
800c190: 2b 9d 00 04 lw ra,(sp+4)
800c194: 2b 8b 00 10 lw r11,(sp+16)
800c198: 2b 8c 00 0c lw r12,(sp+12)
800c19c: 2b 8d 00 08 lw r13,(sp+8)
800c1a0: 37 9c 00 14 addi sp,sp,20
800c1a4: c3 a0 00 00 ret
08000a4c <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
8000a4c: 37 9c ff d0 addi sp,sp,-48 <== NOT EXECUTED
8000a50: 5b 8b 00 1c sw (sp+28),r11 <== NOT EXECUTED
8000a54: 5b 8c 00 18 sw (sp+24),r12 <== NOT EXECUTED
8000a58: 5b 8d 00 14 sw (sp+20),r13 <== NOT EXECUTED
8000a5c: 5b 8e 00 10 sw (sp+16),r14 <== NOT EXECUTED
8000a60: 5b 8f 00 0c sw (sp+12),r15 <== NOT EXECUTED
8000a64: 5b 90 00 08 sw (sp+8),r16 <== NOT EXECUTED
8000a68: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8000a6c: b8 40 68 00 mv r13,r2 <== NOT EXECUTED
8000a70: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
8000a74: 37 8b 00 20 addi r11,sp,32 <== NOT EXECUTED
8000a78: f8 00 37 13 calli 800e6c4 <strlen> <== NOT EXECUTED
8000a7c: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
8000a80: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
8000a84: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8000a88: b9 60 20 00 mv r4,r11 <== NOT EXECUTED
8000a8c: 34 05 00 01 mvi r5,1 <== NOT EXECUTED
8000a90: f8 00 01 20 calli 8000f10 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
8000a94: 2b 82 00 2c lw r2,(sp+44) <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
8000a98: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
the_jnode = loc.node_access;
8000a9c: 2b 90 00 20 lw r16,(sp+32) <== NOT EXECUTED
if ( !loc.ops->node_type_h ) {
8000aa0: 28 43 00 10 lw r3,(r2+16) <== NOT EXECUTED
8000aa4: 44 60 00 17 be r3,r0,8000b00 <rtems_io_lookup_name+0xb4> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
node_type = (*loc.ops->node_type_h)( &loc );
8000aa8: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8000aac: d8 60 00 00 call r3 <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
8000ab0: 7c 21 00 02 cmpnei r1,r1,2 <== NOT EXECUTED
8000ab4: 7d ee 00 00 cmpnei r14,r15,0 <== NOT EXECUTED
8000ab8: b8 2e 70 00 or r14,r1,r14 <== NOT EXECUTED
8000abc: 45 c0 00 1a be r14,r0,8000b24 <rtems_io_lookup_name+0xd8> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
8000ac0: 2b 81 00 2c lw r1,(sp+44) <== NOT EXECUTED
8000ac4: 44 20 00 28 be r1,r0,8000b64 <rtems_io_lookup_name+0x118> <== NOT EXECUTED
8000ac8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8000acc: 44 40 00 26 be r2,r0,8000b64 <rtems_io_lookup_name+0x118> <== NOT EXECUTED
8000ad0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8000ad4: d8 40 00 00 call r2 <== NOT EXECUTED
8000ad8: 34 01 00 0d mvi r1,13 <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
}
8000adc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8000ae0: 2b 8b 00 1c lw r11,(sp+28) <== NOT EXECUTED
8000ae4: 2b 8c 00 18 lw r12,(sp+24) <== NOT EXECUTED
8000ae8: 2b 8d 00 14 lw r13,(sp+20) <== NOT EXECUTED
8000aec: 2b 8e 00 10 lw r14,(sp+16) <== NOT EXECUTED
8000af0: 2b 8f 00 0c lw r15,(sp+12) <== NOT EXECUTED
8000af4: 2b 90 00 08 lw r16,(sp+8) <== NOT EXECUTED
8000af8: 37 9c 00 30 addi sp,sp,48 <== NOT EXECUTED
8000afc: c3 a0 00 00 ret <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
8000b00: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED
8000b04: 44 43 00 03 be r2,r3,8000b10 <rtems_io_lookup_name+0xc4> <== NOT EXECUTED
8000b08: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8000b0c: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8000b10: f8 00 32 1d calli 800d384 <__errno> <== NOT EXECUTED
8000b14: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8000b18: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8000b1c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000b20: e3 ff ff ef bi 8000adc <rtems_io_lookup_name+0x90> <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
8000b24: 59 ac 00 00 sw (r13+0),r12 <== NOT EXECUTED
device_info->device_name_length = strlen( name );
8000b28: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8000b2c: f8 00 36 e6 calli 800e6c4 <strlen> <== NOT EXECUTED
8000b30: 59 a1 00 04 sw (r13+4),r1 <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
8000b34: 2a 01 00 50 lw r1,(r16+80) <== NOT EXECUTED
8000b38: 59 a1 00 08 sw (r13+8),r1 <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
8000b3c: 2a 10 00 54 lw r16,(r16+84) <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
8000b40: 2b 81 00 2c lw r1,(sp+44) <== NOT EXECUTED
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
8000b44: 59 b0 00 0c sw (r13+12),r16 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
8000b48: 44 2e 00 09 be r1,r14,8000b6c <rtems_io_lookup_name+0x120> <== NOT EXECUTED
8000b4c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
8000b50: 44 40 00 07 be r2,r0,8000b6c <rtems_io_lookup_name+0x120> <== NOT EXECUTED
8000b54: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8000b58: d8 40 00 00 call r2 <== NOT EXECUTED
8000b5c: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
8000b60: e3 ff ff df bi 8000adc <rtems_io_lookup_name+0x90> <== NOT EXECUTED
8000b64: 34 01 00 0d mvi r1,13 <== NOT EXECUTED
8000b68: e3 ff ff dd bi 8000adc <rtems_io_lookup_name+0x90> <== NOT EXECUTED
8000b6c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8000b70: e3 ff ff db bi 8000adc <rtems_io_lookup_name+0x90> <== NOT EXECUTED
0800c248 <rtems_io_read>:
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
800c248: 37 9c ff ec addi sp,sp,-20
800c24c: 5b 8b 00 10 sw (sp+16),r11
800c250: 5b 8c 00 0c sw (sp+12),r12
800c254: 5b 8d 00 08 sw (sp+8),r13
800c258: 5b 9d 00 04 sw (sp+4),ra
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
800c25c: 78 04 08 01 mvhi r4,0x801
800c260: 38 84 f1 90 ori r4,r4,0xf190
800c264: 28 84 00 00 lw r4,(r4+0)
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
800c268: b8 20 58 00 mv r11,r1
800c26c: b8 40 60 00 mv r12,r2
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
800c270: 54 81 00 08 bgu r4,r1,800c290 <rtems_io_read+0x48> <== ALWAYS TAKEN
800c274: 34 01 00 0a mvi r1,10 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
800c278: 2b 9d 00 04 lw ra,(sp+4)
800c27c: 2b 8b 00 10 lw r11,(sp+16)
800c280: 2b 8c 00 0c lw r12,(sp+12)
800c284: 2b 8d 00 08 lw r13,(sp+8)
800c288: 37 9c 00 14 addi sp,sp,20
800c28c: c3 a0 00 00 ret
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
800c290: 78 01 08 01 mvhi r1,0x801
800c294: 38 21 f1 94 ori r1,r1,0xf194
800c298: 28 2d 00 00 lw r13,(r1+0)
800c29c: b5 6b 08 00 add r1,r11,r11
800c2a0: b4 2b 08 00 add r1,r1,r11
800c2a4: 34 02 00 03 mvi r2,3
800c2a8: 5b 83 00 14 sw (sp+20),r3
800c2ac: fb ff cf d1 calli 80001f0 <__ashlsi3>
800c2b0: b5 a1 08 00 add r1,r13,r1
800c2b4: 28 24 00 0c lw r4,(r1+12)
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
800c2b8: 2b 83 00 14 lw r3,(sp+20)
800c2bc: b8 80 08 00 mv r1,r4
800c2c0: 44 80 ff ee be r4,r0,800c278 <rtems_io_read+0x30> <== NEVER TAKEN
800c2c4: b9 60 08 00 mv r1,r11
800c2c8: b9 80 10 00 mv r2,r12
800c2cc: d8 80 00 00 call r4
}
800c2d0: 2b 9d 00 04 lw ra,(sp+4)
800c2d4: 2b 8b 00 10 lw r11,(sp+16)
800c2d8: 2b 8c 00 0c lw r12,(sp+12)
800c2dc: 2b 8d 00 08 lw r13,(sp+8)
800c2e0: 37 9c 00 14 addi sp,sp,20
800c2e4: c3 a0 00 00 ret
08004e94 <rtems_io_register_driver>:
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
8004e94: 37 9c ff ec addi sp,sp,-20
8004e98: 5b 8b 00 10 sw (sp+16),r11
8004e9c: 5b 8c 00 0c sw (sp+12),r12
8004ea0: 5b 8d 00 08 sw (sp+8),r13
8004ea4: 5b 9d 00 04 sw (sp+4),ra
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
8004ea8: 78 04 08 02 mvhi r4,0x802
8004eac: 38 84 69 dc ori r4,r4,0x69dc
8004eb0: 28 85 00 00 lw r5,(r4+0)
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
8004eb4: 78 04 08 02 mvhi r4,0x802
8004eb8: 38 84 72 a4 ori r4,r4,0x72a4
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
8004ebc: b8 20 58 00 mv r11,r1
8004ec0: b8 40 60 00 mv r12,r2
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
8004ec4: 34 01 00 12 mvi r1,18
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
8004ec8: 28 82 00 00 lw r2,(r4+0)
if ( rtems_interrupt_is_in_progress() )
8004ecc: 5c a0 00 08 bne r5,r0,8004eec <rtems_io_register_driver+0x58>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
8004ed0: 44 65 00 52 be r3,r5,8005018 <rtems_io_register_driver+0x184>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
8004ed4: 58 62 00 00 sw (r3+0),r2
if ( driver_table == NULL )
8004ed8: 45 80 00 50 be r12,r0,8005018 <rtems_io_register_driver+0x184>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
8004edc: 29 81 00 00 lw r1,(r12+0)
8004ee0: 44 20 00 4c be r1,r0,8005010 <rtems_io_register_driver+0x17c>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
8004ee4: 54 4b 00 08 bgu r2,r11,8004f04 <rtems_io_register_driver+0x70>
8004ee8: 34 01 00 0a mvi r1,10
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
8004eec: 2b 9d 00 04 lw ra,(sp+4)
8004ef0: 2b 8b 00 10 lw r11,(sp+16)
8004ef4: 2b 8c 00 0c lw r12,(sp+12)
8004ef8: 2b 8d 00 08 lw r13,(sp+8)
8004efc: 37 9c 00 14 addi sp,sp,20
8004f00: c3 a0 00 00 ret
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8004f04: 78 01 08 02 mvhi r1,0x802
8004f08: 38 21 69 44 ori r1,r1,0x6944
8004f0c: 28 22 00 00 lw r2,(r1+0)
8004f10: 34 42 00 01 addi r2,r2,1
8004f14: 58 22 00 00 sw (r1+0),r2
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
8004f18: 5d 60 00 2a bne r11,r0,8004fc0 <rtems_io_register_driver+0x12c>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
8004f1c: 28 84 00 00 lw r4,(r4+0)
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
8004f20: 44 8b 00 48 be r4,r11,8005040 <rtems_io_register_driver+0x1ac><== NEVER TAKEN
8004f24: 78 01 08 02 mvhi r1,0x802
8004f28: 38 21 72 a8 ori r1,r1,0x72a8
8004f2c: 28 2d 00 00 lw r13,(r1+0)
8004f30: b9 a0 08 00 mv r1,r13
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
8004f34: 28 22 00 00 lw r2,(r1+0)
8004f38: 44 40 00 3f be r2,r0,8005034 <rtems_io_register_driver+0x1a0>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
8004f3c: 35 6b 00 01 addi r11,r11,1
8004f40: 34 21 00 18 addi r1,r1,24
8004f44: 54 8b ff fc bgu r4,r11,8004f34 <rtems_io_register_driver+0xa0>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
8004f48: 58 6b 00 00 sw (r3+0),r11
if ( m != n )
8004f4c: 44 8b 00 3e be r4,r11,8005044 <rtems_io_register_driver+0x1b0>
8004f50: b5 6b 08 00 add r1,r11,r11
8004f54: b4 2b 08 00 add r1,r1,r11
8004f58: 34 02 00 03 mvi r2,3
8004f5c: fb ff ef 22 calli 8000be4 <__ashlsi3>
8004f60: b5 a1 08 00 add r1,r13,r1
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
8004f64: 29 82 00 00 lw r2,(r12+0)
8004f68: 58 22 00 00 sw (r1+0),r2
8004f6c: 29 82 00 04 lw r2,(r12+4)
8004f70: 58 22 00 04 sw (r1+4),r2
8004f74: 29 82 00 08 lw r2,(r12+8)
8004f78: 58 22 00 08 sw (r1+8),r2
8004f7c: 29 82 00 0c lw r2,(r12+12)
8004f80: 58 22 00 0c sw (r1+12),r2
8004f84: 29 82 00 10 lw r2,(r12+16)
8004f88: 58 22 00 10 sw (r1+16),r2
8004f8c: 29 8c 00 14 lw r12,(r12+20)
8004f90: 58 2c 00 14 sw (r1+20),r12
_Thread_Enable_dispatch();
8004f94: f8 00 07 eb calli 8006f40 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
8004f98: 34 02 00 00 mvi r2,0
8004f9c: b9 60 08 00 mv r1,r11
8004fa0: b8 40 18 00 mv r3,r2
8004fa4: f8 00 2b 94 calli 800fdf4 <rtems_io_initialize>
}
8004fa8: 2b 9d 00 04 lw ra,(sp+4)
8004fac: 2b 8b 00 10 lw r11,(sp+16)
8004fb0: 2b 8c 00 0c lw r12,(sp+12)
8004fb4: 2b 8d 00 08 lw r13,(sp+8)
8004fb8: 37 9c 00 14 addi sp,sp,20
8004fbc: c3 a0 00 00 ret
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
8004fc0: b5 6b 08 00 add r1,r11,r11
8004fc4: 34 02 00 03 mvi r2,3
8004fc8: 78 0d 08 02 mvhi r13,0x802
8004fcc: b4 2b 08 00 add r1,r1,r11
8004fd0: 5b 83 00 14 sw (sp+20),r3
8004fd4: 39 ad 72 a8 ori r13,r13,0x72a8
8004fd8: fb ff ef 03 calli 8000be4 <__ashlsi3>
8004fdc: 29 a2 00 00 lw r2,(r13+0)
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
8004fe0: 2b 83 00 14 lw r3,(sp+20)
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
8004fe4: b4 41 08 00 add r1,r2,r1
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
8004fe8: 28 22 00 00 lw r2,(r1+0)
8004fec: 44 40 00 19 be r2,r0,8005050 <rtems_io_register_driver+0x1bc>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
8004ff0: f8 00 07 d4 calli 8006f40 <_Thread_Enable_dispatch>
8004ff4: 34 01 00 0c mvi r1,12
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
8004ff8: 2b 9d 00 04 lw ra,(sp+4)
8004ffc: 2b 8b 00 10 lw r11,(sp+16)
8005000: 2b 8c 00 0c lw r12,(sp+12)
8005004: 2b 8d 00 08 lw r13,(sp+8)
8005008: 37 9c 00 14 addi sp,sp,20
800500c: c3 a0 00 00 ret
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
8005010: 29 85 00 04 lw r5,(r12+4)
8005014: 5c a1 ff b4 bne r5,r1,8004ee4 <rtems_io_register_driver+0x50>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
8005018: 34 01 00 09 mvi r1,9
}
800501c: 2b 9d 00 04 lw ra,(sp+4)
8005020: 2b 8b 00 10 lw r11,(sp+16)
8005024: 2b 8c 00 0c lw r12,(sp+12)
8005028: 2b 8d 00 08 lw r13,(sp+8)
800502c: 37 9c 00 14 addi sp,sp,20
8005030: c3 a0 00 00 ret
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
8005034: 28 25 00 04 lw r5,(r1+4)
8005038: 5c a2 ff c1 bne r5,r2,8004f3c <rtems_io_register_driver+0xa8>
800503c: e3 ff ff c3 bi 8004f48 <rtems_io_register_driver+0xb4>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
8005040: 58 6b 00 00 sw (r3+0),r11 <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
8005044: f8 00 07 bf calli 8006f40 <_Thread_Enable_dispatch>
8005048: 34 01 00 05 mvi r1,5
return sc;
800504c: e3 ff ff a8 bi 8004eec <rtems_io_register_driver+0x58>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
8005050: 28 24 00 04 lw r4,(r1+4)
8005054: 5c 82 ff e7 bne r4,r2,8004ff0 <rtems_io_register_driver+0x15c>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
8005058: 58 6b 00 00 sw (r3+0),r11
800505c: e3 ff ff c2 bi 8004f64 <rtems_io_register_driver+0xd0>
0800c2e8 <rtems_io_write>:
rtems_status_code rtems_io_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
800c2e8: 37 9c ff ec addi sp,sp,-20
800c2ec: 5b 8b 00 10 sw (sp+16),r11
800c2f0: 5b 8c 00 0c sw (sp+12),r12
800c2f4: 5b 8d 00 08 sw (sp+8),r13
800c2f8: 5b 9d 00 04 sw (sp+4),ra
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
800c2fc: 78 04 08 01 mvhi r4,0x801
800c300: 38 84 f1 90 ori r4,r4,0xf190
800c304: 28 84 00 00 lw r4,(r4+0)
rtems_status_code rtems_io_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
800c308: b8 20 58 00 mv r11,r1
800c30c: b8 40 60 00 mv r12,r2
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
800c310: 54 81 00 08 bgu r4,r1,800c330 <rtems_io_write+0x48> <== ALWAYS TAKEN
800c314: 34 01 00 0a mvi r1,10 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
800c318: 2b 9d 00 04 lw ra,(sp+4)
800c31c: 2b 8b 00 10 lw r11,(sp+16)
800c320: 2b 8c 00 0c lw r12,(sp+12)
800c324: 2b 8d 00 08 lw r13,(sp+8)
800c328: 37 9c 00 14 addi sp,sp,20
800c32c: c3 a0 00 00 ret
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
800c330: 78 01 08 01 mvhi r1,0x801
800c334: 38 21 f1 94 ori r1,r1,0xf194
800c338: 28 2d 00 00 lw r13,(r1+0)
800c33c: b5 6b 08 00 add r1,r11,r11
800c340: b4 2b 08 00 add r1,r1,r11
800c344: 34 02 00 03 mvi r2,3
800c348: 5b 83 00 14 sw (sp+20),r3
800c34c: fb ff cf a9 calli 80001f0 <__ashlsi3>
800c350: b5 a1 08 00 add r1,r13,r1
800c354: 28 24 00 10 lw r4,(r1+16)
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
800c358: 2b 83 00 14 lw r3,(sp+20)
800c35c: b8 80 08 00 mv r1,r4
800c360: 44 80 ff ee be r4,r0,800c318 <rtems_io_write+0x30>
800c364: b9 60 08 00 mv r1,r11
800c368: b9 80 10 00 mv r2,r12
800c36c: d8 80 00 00 call r4
}
800c370: 2b 9d 00 04 lw ra,(sp+4)
800c374: 2b 8b 00 10 lw r11,(sp+16)
800c378: 2b 8c 00 0c lw r12,(sp+12)
800c37c: 2b 8d 00 08 lw r13,(sp+8)
800c380: 37 9c 00 14 addi sp,sp,20
800c384: c3 a0 00 00 ret
080056e8 <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)
{
80056e8: 37 9c ff e4 addi sp,sp,-28
80056ec: 5b 8b 00 1c sw (sp+28),r11
80056f0: 5b 8c 00 18 sw (sp+24),r12
80056f4: 5b 8d 00 14 sw (sp+20),r13
80056f8: 5b 8e 00 10 sw (sp+16),r14
80056fc: 5b 8f 00 0c sw (sp+12),r15
8005700: 5b 90 00 08 sw (sp+8),r16
8005704: 5b 9d 00 04 sw (sp+4),ra
8005708: b8 20 78 00 mv r15,r1
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
800570c: 44 20 00 18 be r1,r0,800576c <rtems_iterate_over_all_threads+0x84><== NEVER TAKEN
8005710: 78 0e 08 02 mvhi r14,0x802
8005714: 39 ce c6 48 ori r14,r14,0xc648
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
8005718: 35 d0 00 10 addi r16,r14,16
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
800571c: 29 c1 00 00 lw r1,(r14+0)
8005720: 44 20 00 11 be r1,r0,8005764 <rtems_iterate_over_all_threads+0x7c>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
8005724: 28 2d 00 04 lw r13,(r1+4)
if ( !information )
8005728: 45 a0 00 0f be r13,r0,8005764 <rtems_iterate_over_all_threads+0x7c>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
800572c: 2d a3 00 10 lhu r3,(r13+16)
8005730: 44 60 00 0d be r3,r0,8005764 <rtems_iterate_over_all_threads+0x7c>
8005734: 34 0c 00 04 mvi r12,4
8005738: 34 0b 00 01 mvi r11,1
the_thread = (Thread_Control *)information->local_table[ i ];
800573c: 29 a2 00 1c lw r2,(r13+28)
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
8005740: 35 6b 00 01 addi r11,r11,1
the_thread = (Thread_Control *)information->local_table[ i ];
8005744: b4 4c 10 00 add r2,r2,r12
8005748: 28 42 00 00 lw r2,(r2+0)
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
800574c: 35 8c 00 04 addi r12,r12,4
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
(*routine)(the_thread);
8005750: 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 )
8005754: 44 40 00 03 be r2,r0,8005760 <rtems_iterate_over_all_threads+0x78><== NEVER TAKEN
continue;
(*routine)(the_thread);
8005758: d9 e0 00 00 call r15
800575c: 2d a3 00 10 lhu r3,(r13+16)
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
8005760: 50 6b ff f7 bgeu r3,r11,800573c <rtems_iterate_over_all_threads+0x54>
8005764: 35 ce 00 04 addi r14,r14,4
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
8005768: 5d d0 ff ed bne r14,r16,800571c <rtems_iterate_over_all_threads+0x34>
(*routine)(the_thread);
}
}
}
800576c: 2b 9d 00 04 lw ra,(sp+4)
8005770: 2b 8b 00 1c lw r11,(sp+28)
8005774: 2b 8c 00 18 lw r12,(sp+24)
8005778: 2b 8d 00 14 lw r13,(sp+20)
800577c: 2b 8e 00 10 lw r14,(sp+16)
8005780: 2b 8f 00 0c lw r15,(sp+12)
8005784: 2b 90 00 08 lw r16,(sp+8)
8005788: 37 9c 00 1c addi sp,sp,28
800578c: c3 a0 00 00 ret
08007e78 <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 )
{
8007e78: 37 9c ff e8 addi sp,sp,-24
8007e7c: 5b 8b 00 14 sw (sp+20),r11
8007e80: 5b 8c 00 10 sw (sp+16),r12
8007e84: 5b 8d 00 0c sw (sp+12),r13
8007e88: 5b 8e 00 08 sw (sp+8),r14
8007e8c: 5b 9d 00 04 sw (sp+4),ra
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 );
8007e90: 78 0b 08 01 mvhi r11,0x801
8007e94: 39 6b e7 24 ori r11,r11,0xe724
8007e98: 29 61 00 00 lw r1,(r11+0)
8007e9c: 34 02 00 00 mvi r2,0
rtems_status_code rc;
rtems_id sema;
rtems_libio_lock();
if (rtems_libio_iop_freelist) {
8007ea0: 78 0c 08 01 mvhi r12,0x801
8007ea4: b8 40 18 00 mv r3,r2
8007ea8: 39 8c e7 20 ori r12,r12,0xe720
8007eac: f8 00 03 9f calli 8008d28 <rtems_semaphore_obtain>
8007eb0: 29 81 00 00 lw r1,(r12+0)
8007eb4: 5c 20 00 0c bne r1,r0,8007ee4 <rtems_libio_allocate+0x6c>
next = iop->data1;
(void) memset( iop, 0, sizeof(rtems_libio_t) );
iop->flags = LIBIO_FLAGS_OPEN;
iop->sem = sema;
rtems_libio_iop_freelist = next;
goto done;
8007eb8: 34 0d 00 00 mvi r13,0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
8007ebc: 29 61 00 00 lw r1,(r11+0)
8007ec0: f8 00 03 fb calli 8008eac <rtems_semaphore_release>
iop = 0;
done:
rtems_libio_unlock();
return iop;
}
8007ec4: b9 a0 08 00 mv r1,r13
8007ec8: 2b 9d 00 04 lw ra,(sp+4)
8007ecc: 2b 8b 00 14 lw r11,(sp+20)
8007ed0: 2b 8c 00 10 lw r12,(sp+16)
8007ed4: 2b 8d 00 0c lw r13,(sp+12)
8007ed8: 2b 8e 00 08 lw r14,(sp+8)
8007edc: 37 9c 00 18 addi sp,sp,24
8007ee0: c3 a0 00 00 ret
rtems_id sema;
rtems_libio_lock();
if (rtems_libio_iop_freelist) {
rc = rtems_semaphore_create(
8007ee4: 78 02 08 01 mvhi r2,0x801
8007ee8: 38 42 e7 1c ori r2,r2,0xe71c
8007eec: 28 43 00 00 lw r3,(r2+0)
8007ef0: 34 02 00 03 mvi r2,3
8007ef4: c8 23 08 00 sub r1,r1,r3
8007ef8: fb ff e1 0e calli 8000330 <__ashrsi3>
8007efc: 78 02 38 e3 mvhi r2,0x38e3
8007f00: 38 42 8e 39 ori r2,r2,0x8e39
8007f04: f8 00 4d 0c calli 801b334 <__mulsi3>
8007f08: 78 02 4c 42 mvhi r2,0x4c42
8007f0c: 38 42 49 00 ori r2,r2,0x4900
8007f10: b8 22 08 00 or r1,r1,r2
8007f14: 34 03 00 54 mvi r3,84
8007f18: 34 02 00 01 mvi r2,1
8007f1c: 34 04 00 00 mvi r4,0
8007f20: 37 85 00 18 addi r5,sp,24
8007f24: fb ff e8 a7 calli 80021c0 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
0,
&sema
);
if (rc != RTEMS_SUCCESSFUL)
8007f28: 5c 20 ff e4 bne r1,r0,8007eb8 <rtems_libio_allocate+0x40> <== NEVER TAKEN
goto failed;
iop = rtems_libio_iop_freelist;
8007f2c: 29 8d 00 00 lw r13,(r12+0)
next = iop->data1;
(void) memset( iop, 0, sizeof(rtems_libio_t) );
8007f30: b8 20 10 00 mv r2,r1
8007f34: 34 03 00 48 mvi r3,72
8007f38: b9 a0 08 00 mv r1,r13
&sema
);
if (rc != RTEMS_SUCCESSFUL)
goto failed;
iop = rtems_libio_iop_freelist;
next = iop->data1;
8007f3c: 29 ae 00 38 lw r14,(r13+56)
(void) memset( iop, 0, sizeof(rtems_libio_t) );
8007f40: f8 00 18 15 calli 800df94 <memset>
iop->flags = LIBIO_FLAGS_OPEN;
8007f44: 34 01 01 00 mvi r1,256
8007f48: 59 a1 00 18 sw (r13+24),r1
iop->sem = sema;
8007f4c: 2b 81 00 18 lw r1,(sp+24)
rtems_libio_iop_freelist = next;
8007f50: 59 8e 00 00 sw (r12+0),r14
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;
8007f54: 59 a1 00 30 sw (r13+48),r1
rtems_libio_iop_freelist = next;
goto done;
8007f58: e3 ff ff d9 bi 8007ebc <rtems_libio_allocate+0x44>
08007e00 <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
8007e00: 37 9c ff f4 addi sp,sp,-12
8007e04: 5b 8b 00 0c sw (sp+12),r11
8007e08: 5b 8c 00 08 sw (sp+8),r12
8007e0c: 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 );
8007e10: 78 0c 08 01 mvhi r12,0x801
8007e14: 39 8c e7 24 ori r12,r12,0xe724
8007e18: b8 20 58 00 mv r11,r1
8007e1c: 29 81 00 00 lw r1,(r12+0)
8007e20: 34 02 00 00 mvi r2,0
8007e24: b8 40 18 00 mv r3,r2
8007e28: f8 00 03 c0 calli 8008d28 <rtems_semaphore_obtain>
rtems_libio_lock();
if (iop->sem)
8007e2c: 29 61 00 30 lw r1,(r11+48)
8007e30: 44 20 00 02 be r1,r0,8007e38 <rtems_libio_free+0x38> <== NEVER TAKEN
rtems_semaphore_delete(iop->sem);
8007e34: f8 00 03 7a calli 8008c1c <rtems_semaphore_delete>
iop->flags &= ~LIBIO_FLAGS_OPEN;
8007e38: 29 63 00 18 lw r3,(r11+24)
iop->data1 = rtems_libio_iop_freelist;
8007e3c: 78 02 08 01 mvhi r2,0x801
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
8007e40: 34 01 fe ff mvi r1,-257
8007e44: a0 61 08 00 and r1,r3,r1
iop->data1 = rtems_libio_iop_freelist;
8007e48: 38 42 e7 20 ori r2,r2,0xe720
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
8007e4c: 59 61 00 18 sw (r11+24),r1
iop->data1 = rtems_libio_iop_freelist;
8007e50: 28 41 00 00 lw r1,(r2+0)
rtems_libio_iop_freelist = iop;
8007e54: 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;
8007e58: 59 61 00 38 sw (r11+56),r1
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
8007e5c: 29 81 00 00 lw r1,(r12+0)
8007e60: f8 00 04 13 calli 8008eac <rtems_semaphore_release>
rtems_libio_iop_freelist = iop;
rtems_libio_unlock();
}
8007e64: 2b 9d 00 04 lw ra,(sp+4)
8007e68: 2b 8b 00 0c lw r11,(sp+12)
8007e6c: 2b 8c 00 08 lw r12,(sp+8)
8007e70: 37 9c 00 0c addi sp,sp,12
8007e74: c3 a0 00 00 ret
08000ff0 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
8000ff0: 37 9c ff f4 addi sp,sp,-12
8000ff4: 5b 8b 00 0c sw (sp+12),r11
8000ff8: 5b 8c 00 08 sw (sp+8),r12
8000ffc: 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)
8001000: 78 0b 08 01 mvhi r11,0x801
8001004: 39 6b e0 10 ori r11,r11,0xe010
8001008: 29 61 00 00 lw r1,(r11+0)
800100c: 44 20 00 1e be r1,r0,8001084 <rtems_libio_init+0x94> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
8001010: 34 02 00 48 mvi r2,72
8001014: f8 00 19 f7 calli 80077f0 <calloc>
8001018: b8 20 60 00 mv r12,r1
800101c: 78 01 08 01 mvhi r1,0x801
8001020: 38 21 e7 1c ori r1,r1,0xe71c
8001024: 58 2c 00 00 sw (r1+0),r12
8001028: b9 80 10 00 mv r2,r12
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
800102c: 45 80 00 2b be r12,r0,80010d8 <rtems_libio_init+0xe8> <== NEVER TAKEN
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
8001030: 78 01 08 01 mvhi r1,0x801
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
8001034: 29 64 00 00 lw r4,(r11+0)
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
8001038: 38 21 e7 20 ori r1,r1,0xe720
800103c: 58 2c 00 00 sw (r1+0),r12
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
8001040: 34 03 00 01 mvi r3,1
8001044: 50 64 00 0e bgeu r3,r4,800107c <rtems_libio_init+0x8c> <== NEVER TAKEN
8001048: 35 82 00 48 addi r2,r12,72
iop->data1 = iop + 1;
800104c: 58 42 ff f0 sw (r2+-16),r2
8001050: 34 63 00 01 addi r3,r3,1
8001054: 34 42 00 48 addi r2,r2,72
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
8001058: 5c 64 ff fd bne r3,r4,800104c <rtems_libio_init+0x5c>
800105c: 34 61 ff ff addi r1,r3,-1
8001060: 34 02 00 03 mvi r2,3
8001064: fb ff fc 63 calli 80001f0 <__ashlsi3>
8001068: 34 02 00 03 mvi r2,3
800106c: b8 20 58 00 mv r11,r1
8001070: fb ff fc 60 calli 80001f0 <__ashlsi3>
8001074: b5 61 08 00 add r1,r11,r1
8001078: b5 81 10 00 add r2,r12,r1
iop->data1 = iop + 1;
iop->data1 = NULL;
800107c: 34 01 00 00 mvi r1,0
8001080: 58 41 00 38 sw (r2+56),r1
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
8001084: 78 01 4c 42 mvhi r1,0x4c42
8001088: 78 05 08 01 mvhi r5,0x801
800108c: 34 03 00 54 mvi r3,84
8001090: 38 21 49 4f ori r1,r1,0x494f
8001094: 38 a5 e7 24 ori r5,r5,0xe724
8001098: 34 02 00 01 mvi r2,1
800109c: 34 04 00 00 mvi r4,0
80010a0: f8 00 04 48 calli 80021c0 <rtems_semaphore_create>
80010a4: 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 )
80010a8: 5c 20 00 0b bne r1,r0,80010d4 <rtems_libio_init+0xe4> <== NEVER TAKEN
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
80010ac: 78 02 08 01 mvhi r2,0x801
80010b0: 38 42 e0 0c ori r2,r2,0xe00c
80010b4: 28 41 00 00 lw r1,(r2+0)
80010b8: 44 23 00 02 be r1,r3,80010c0 <rtems_libio_init+0xd0> <== NEVER TAKEN
(* rtems_fs_init_helper)();
80010bc: d8 20 00 00 call r1
}
80010c0: 2b 9d 00 04 lw ra,(sp+4)
80010c4: 2b 8b 00 0c lw r11,(sp+12)
80010c8: 2b 8c 00 08 lw r12,(sp+8)
80010cc: 37 9c 00 0c addi sp,sp,12
80010d0: c3 a0 00 00 ret
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
rtems_fatal_error_occurred( rc );
80010d4: f8 00 06 2b calli 8002980 <rtems_fatal_error_occurred> <== NOT EXECUTED
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
80010d8: 34 01 00 1a mvi r1,26 <== NOT EXECUTED
80010dc: f8 00 06 29 calli 8002980 <rtems_fatal_error_occurred> <== NOT EXECUTED
08007c90 <rtems_libio_is_file_open>:
*/
int rtems_libio_is_file_open(
void *node_access
)
{
8007c90: 37 9c ff f4 addi sp,sp,-12
8007c94: 5b 8b 00 0c sw (sp+12),r11
8007c98: 5b 8c 00 08 sw (sp+8),r12
8007c9c: 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 );
8007ca0: 78 0c 08 01 mvhi r12,0x801
8007ca4: 39 8c e7 24 ori r12,r12,0xe724
8007ca8: b8 20 58 00 mv r11,r1
8007cac: 29 81 00 00 lw r1,(r12+0)
8007cb0: 34 02 00 00 mvi r2,0
8007cb4: b8 40 18 00 mv r3,r2
8007cb8: f8 00 04 1c calli 8008d28 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
8007cbc: 78 01 08 01 mvhi r1,0x801
8007cc0: 38 21 e0 10 ori r1,r1,0xe010
8007cc4: 28 25 00 00 lw r5,(r1+0)
8007cc8: 78 01 08 01 mvhi r1,0x801
8007ccc: 38 21 e7 1c ori r1,r1,0xe71c
8007cd0: 28 22 00 00 lw r2,(r1+0)
8007cd4: 44 a0 00 0b be r5,r0,8007d00 <rtems_libio_is_file_open+0x70><== NEVER TAKEN
8007cd8: 34 03 00 00 mvi r3,0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
8007cdc: 28 44 00 18 lw r4,(r2+24)
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
8007ce0: 34 63 00 01 addi r3,r3,1
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
8007ce4: 20 84 01 00 andi r4,r4,0x100
8007ce8: 44 80 00 03 be r4,r0,8007cf4 <rtems_libio_is_file_open+0x64>
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.node_access == node_access ) {
8007cec: 28 41 00 1c lw r1,(r2+28)
8007cf0: 44 2b 00 0d be r1,r11,8007d24 <rtems_libio_is_file_open+0x94>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
8007cf4: 50 65 00 03 bgeu r3,r5,8007d00 <rtems_libio_is_file_open+0x70>
8007cf8: 34 42 00 48 addi r2,r2,72
8007cfc: e3 ff ff f8 bi 8007cdc <rtems_libio_is_file_open+0x4c>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
8007d00: 29 81 00 00 lw r1,(r12+0)
8007d04: 34 0b 00 00 mvi r11,0
8007d08: f8 00 04 69 calli 8008eac <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
8007d0c: b9 60 08 00 mv r1,r11
8007d10: 2b 9d 00 04 lw ra,(sp+4)
8007d14: 2b 8b 00 0c lw r11,(sp+12)
8007d18: 2b 8c 00 08 lw r12,(sp+8)
8007d1c: 37 9c 00 0c addi sp,sp,12
8007d20: c3 a0 00 00 ret
8007d24: 29 81 00 00 lw r1,(r12+0)
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
8007d28: 34 0b 00 01 mvi r11,1
8007d2c: f8 00 04 60 calli 8008eac <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
8007d30: b9 60 08 00 mv r1,r11
8007d34: 2b 9d 00 04 lw ra,(sp+4)
8007d38: 2b 8b 00 0c lw r11,(sp+12)
8007d3c: 2b 8c 00 08 lw r12,(sp+8)
8007d40: 37 9c 00 0c addi sp,sp,12
8007d44: c3 a0 00 00 ret
08007d48 <rtems_libio_is_open_files_in_fs>:
*/
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
8007d48: 37 9c ff f4 addi sp,sp,-12
8007d4c: 5b 8b 00 0c sw (sp+12),r11
8007d50: 5b 8c 00 08 sw (sp+8),r12
8007d54: 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 );
8007d58: 78 0c 08 01 mvhi r12,0x801
8007d5c: 39 8c e7 24 ori r12,r12,0xe724
8007d60: b8 20 58 00 mv r11,r1
8007d64: 29 81 00 00 lw r1,(r12+0)
8007d68: 34 02 00 00 mvi r2,0
8007d6c: b8 40 18 00 mv r3,r2
8007d70: f8 00 03 ee calli 8008d28 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
8007d74: 78 01 08 01 mvhi r1,0x801
8007d78: 38 21 e0 10 ori r1,r1,0xe010
8007d7c: 28 25 00 00 lw r5,(r1+0)
8007d80: 78 01 08 01 mvhi r1,0x801
8007d84: 38 21 e7 1c ori r1,r1,0xe71c
8007d88: 28 22 00 00 lw r2,(r1+0)
8007d8c: 44 a0 00 0b be r5,r0,8007db8 <rtems_libio_is_open_files_in_fs+0x70><== NEVER TAKEN
8007d90: 34 03 00 00 mvi r3,0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
8007d94: 28 44 00 18 lw r4,(r2+24)
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
8007d98: 34 63 00 01 addi r3,r3,1
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
8007d9c: 20 84 01 00 andi r4,r4,0x100
8007da0: 44 80 00 03 be r4,r0,8007dac <rtems_libio_is_open_files_in_fs+0x64>
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.mt_entry == fs_mt_entry ) {
8007da4: 28 41 00 2c lw r1,(r2+44)
8007da8: 44 2b 00 0d be r1,r11,8007ddc <rtems_libio_is_open_files_in_fs+0x94>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
8007dac: 50 65 00 03 bgeu r3,r5,8007db8 <rtems_libio_is_open_files_in_fs+0x70>
8007db0: 34 42 00 48 addi r2,r2,72
8007db4: e3 ff ff f8 bi 8007d94 <rtems_libio_is_open_files_in_fs+0x4c>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
8007db8: 29 81 00 00 lw r1,(r12+0)
8007dbc: 34 0b 00 00 mvi r11,0
8007dc0: f8 00 04 3b calli 8008eac <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
8007dc4: b9 60 08 00 mv r1,r11
8007dc8: 2b 9d 00 04 lw ra,(sp+4)
8007dcc: 2b 8b 00 0c lw r11,(sp+12)
8007dd0: 2b 8c 00 08 lw r12,(sp+8)
8007dd4: 37 9c 00 0c addi sp,sp,12
8007dd8: c3 a0 00 00 ret
8007ddc: 29 81 00 00 lw r1,(r12+0)
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
8007de0: 34 0b 00 01 mvi r11,1
8007de4: f8 00 04 32 calli 8008eac <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
8007de8: b9 60 08 00 mv r1,r11
8007dec: 2b 9d 00 04 lw ra,(sp+4)
8007df0: 2b 8b 00 0c lw r11,(sp+12)
8007df4: 2b 8c 00 08 lw r12,(sp+8)
8007df8: 37 9c 00 0c addi sp,sp,12
8007dfc: c3 a0 00 00 ret
08002fc0 <rtems_libio_set_private_env>:
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
8002fc0: 37 9c ff d0 addi sp,sp,-48
8002fc4: 5b 8b 00 18 sw (sp+24),r11
8002fc8: 5b 8c 00 14 sw (sp+20),r12
8002fcc: 5b 8d 00 10 sw (sp+16),r13
8002fd0: 5b 8e 00 0c sw (sp+12),r14
8002fd4: 5b 8f 00 08 sw (sp+8),r15
8002fd8: 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);
8002fdc: 34 01 00 00 mvi r1,0
8002fe0: b8 20 10 00 mv r2,r1
8002fe4: 37 83 00 30 addi r3,sp,48
8002fe8: f8 00 03 21 calli 8003c6c <rtems_task_ident>
8002fec: b8 20 70 00 mv r14,r1
if (sc != RTEMS_SUCCESSFUL) return sc;
8002ff0: b8 20 78 00 mv r15,r1
8002ff4: 5c 20 00 60 bne r1,r0,8003174 <rtems_libio_set_private_env+0x1b4><== NEVER TAKEN
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
8002ff8: 78 0d 08 02 mvhi r13,0x802
8002ffc: 39 ad 10 f8 ori r13,r13,0x10f8
8003000: 29 ab 00 00 lw r11,(r13+0)
8003004: 78 0c 08 02 mvhi r12,0x802
8003008: 39 8c 17 64 ori r12,r12,0x1764
800300c: 45 6c 00 63 be r11,r12,8003198 <rtems_libio_set_private_env+0x1d8>
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
8003010: 29 81 00 00 lw r1,(r12+0)
rtems_current_user_env->task_id=task_id; /* mark the local values*/
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
8003014: 78 06 08 02 mvhi r6,0x802
8003018: 38 c6 17 58 ori r6,r6,0x1758
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
800301c: 59 61 00 00 sw (r11+0),r1
8003020: 29 82 00 04 lw r2,(r12+4)
* code we must _not_ free the original locs because
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8003024: 34 03 00 00 mvi r3,0
8003028: 37 8e 00 1c addi r14,sp,28
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
800302c: 59 62 00 04 sw (r11+4),r2
8003030: 29 84 00 08 lw r4,(r12+8)
* code we must _not_ free the original locs because
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8003034: 78 01 08 01 mvhi r1,0x801
8003038: b8 60 28 00 mv r5,r3
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
800303c: 59 64 00 08 sw (r11+8),r4
8003040: 29 87 00 0c lw r7,(r12+12)
* code we must _not_ free the original locs because
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8003044: 34 02 00 01 mvi r2,1
8003048: 38 21 f1 58 ori r1,r1,0xf158
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
800304c: 59 67 00 0c sw (r11+12),r7
8003050: 29 84 00 10 lw r4,(r12+16)
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
8003054: b8 60 78 00 mv r15,r3
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
8003058: 59 64 00 10 sw (r11+16),r4
800305c: 29 87 00 14 lw r7,(r12+20)
* code we must _not_ free the original locs because
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8003060: b9 c0 20 00 mv r4,r14
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
8003064: 59 67 00 14 sw (r11+20),r7
8003068: 29 87 00 18 lw r7,(r12+24)
800306c: 59 67 00 18 sw (r11+24),r7
8003070: 29 87 00 1c lw r7,(r12+28)
8003074: 59 67 00 1c sw (r11+28),r7
8003078: 29 87 00 20 lw r7,(r12+32)
800307c: 59 67 00 20 sw (r11+32),r7
8003080: 29 87 00 24 lw r7,(r12+36)
8003084: 59 67 00 24 sw (r11+36),r7
8003088: 29 87 00 28 lw r7,(r12+40)
800308c: 59 67 00 28 sw (r11+40),r7
8003090: 29 87 00 2c lw r7,(r12+44)
8003094: 59 67 00 2c sw (r11+44),r7
8003098: 29 87 00 30 lw r7,(r12+48)
800309c: 59 67 00 30 sw (r11+48),r7
80030a0: 29 87 00 34 lw r7,(r12+52)
80030a4: 59 67 00 34 sw (r11+52),r7
80030a8: 29 87 00 38 lw r7,(r12+56)
80030ac: 59 67 00 38 sw (r11+56),r7
80030b0: 29 87 00 3c lw r7,(r12+60)
80030b4: 59 67 00 3c sw (r11+60),r7
80030b8: 29 87 00 40 lw r7,(r12+64)
80030bc: 59 67 00 40 sw (r11+64),r7
80030c0: 29 8c 00 44 lw r12,(r12+68)
80030c4: 59 6c 00 44 sw (r11+68),r12
rtems_current_user_env->task_id=task_id; /* mark the local values*/
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
80030c8: 28 c6 00 00 lw r6,(r6+0)
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
rtems_current_user_env->task_id=task_id; /* mark the local values*/
80030cc: 2b 87 00 30 lw r7,(sp+48)
80030d0: 59 67 00 00 sw (r11+0),r7
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
80030d4: 28 c7 00 1c lw r7,(r6+28)
80030d8: 59 67 00 18 sw (r11+24),r7
80030dc: 28 c7 00 20 lw r7,(r6+32)
80030e0: 59 67 00 1c sw (r11+28),r7
80030e4: 28 c7 00 24 lw r7,(r6+36)
80030e8: 59 67 00 20 sw (r11+32),r7
80030ec: 28 c7 00 28 lw r7,(r6+40)
80030f0: 59 67 00 24 sw (r11+36),r7
80030f4: 28 c6 00 2c lw r6,(r6+44)
80030f8: 59 66 00 28 sw (r11+40),r6
* code we must _not_ free the original locs because
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
80030fc: fb ff fa 25 calli 8001990 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
8003100: 2b 82 00 1c lw r2,(sp+28)
8003104: 29 a6 00 00 lw r6,(r13+0)
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8003108: 78 01 08 01 mvhi r1,0x801
800310c: b9 c0 20 00 mv r4,r14
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
8003110: 58 c2 00 18 sw (r6+24),r2
8003114: 2b 87 00 20 lw r7,(sp+32)
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8003118: 34 02 00 01 mvi r2,1
800311c: b9 e0 18 00 mv r3,r15
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
8003120: 58 c7 00 1c sw (r6+28),r7
8003124: 2b 87 00 24 lw r7,(sp+36)
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8003128: 38 21 f1 58 ori r1,r1,0xf158
800312c: b9 e0 28 00 mv r5,r15
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
8003130: 58 c7 00 20 sw (r6+32),r7
8003134: 2b 87 00 28 lw r7,(sp+40)
8003138: 58 c7 00 24 sw (r6+36),r7
800313c: 2b 87 00 2c lw r7,(sp+44)
8003140: 58 c7 00 28 sw (r6+40),r7
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
8003144: fb ff fa 13 calli 8001990 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
8003148: 2b 81 00 1c lw r1,(sp+28)
800314c: 29 a2 00 00 lw r2,(r13+0)
8003150: 58 41 00 04 sw (r2+4),r1
8003154: 2b 84 00 20 lw r4,(sp+32)
8003158: 58 44 00 08 sw (r2+8),r4
800315c: 2b 87 00 24 lw r7,(sp+36)
8003160: 58 47 00 0c sw (r2+12),r7
8003164: 2b 81 00 28 lw r1,(sp+40)
8003168: 58 41 00 10 sw (r2+16),r1
800316c: 2b 84 00 2c lw r4,(sp+44)
8003170: 58 44 00 14 sw (r2+20),r4
return RTEMS_SUCCESSFUL;
}
8003174: b9 e0 08 00 mv r1,r15
8003178: 2b 9d 00 04 lw ra,(sp+4)
800317c: 2b 8b 00 18 lw r11,(sp+24)
8003180: 2b 8c 00 14 lw r12,(sp+20)
8003184: 2b 8d 00 10 lw r13,(sp+16)
8003188: 2b 8e 00 0c lw r14,(sp+12)
800318c: 2b 8f 00 08 lw r15,(sp+8)
8003190: 37 9c 00 30 addi sp,sp,48
8003194: c3 a0 00 00 ret
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
if (sc != RTEMS_SUCCESSFUL) return sc;
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
8003198: 34 01 00 48 mvi r1,72
800319c: fb ff fc 1a calli 8002204 <malloc>
80031a0: b8 20 58 00 mv r11,r1
if (!tmp)
80031a4: 34 0f 00 1a mvi r15,26
80031a8: 44 20 ff f3 be r1,r0,8003174 <rtems_libio_set_private_env+0x1b4><== NEVER TAKEN
#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);
80031ac: 78 03 08 00 mvhi r3,0x800
80031b0: b9 c0 08 00 mv r1,r14
80031b4: 38 63 2e 88 ori r3,r3,0x2e88
80031b8: b9 a0 10 00 mv r2,r13
80031bc: f8 00 03 27 calli 8003e58 <rtems_task_variable_add>
80031c0: b8 20 78 00 mv r15,r1
if (sc != RTEMS_SUCCESSFUL) {
80031c4: 5c 20 00 03 bne r1,r0,80031d0 <rtems_libio_set_private_env+0x210><== NEVER TAKEN
* not initialized yet
*/
free(tmp);
return sc;
}
rtems_current_user_env = tmp;
80031c8: 59 ab 00 00 sw (r13+0),r11
80031cc: e3 ff ff 91 bi 8003010 <rtems_libio_set_private_env+0x50>
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
if (sc != RTEMS_SUCCESSFUL) {
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
80031d0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80031d4: fb ff fa 27 calli 8001a70 <free> <== NOT EXECUTED
return sc;
80031d8: e3 ff ff e7 bi 8003174 <rtems_libio_set_private_env+0x1b4> <== NOT EXECUTED
08002eec <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) {
8002eec: 37 9c ff e4 addi sp,sp,-28 <== NOT EXECUTED
8002ef0: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED
8002ef4: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED
8002ef8: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED
8002efc: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED
8002f00: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8002f04: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
rtems_status_code sc;
rtems_user_env_t * shared_user_env;
rtems_id current_task_id;
sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id);
8002f08: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8002f0c: 37 83 00 18 addi r3,sp,24 <== NOT EXECUTED
8002f10: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
8002f14: f8 00 03 56 calli 8003c6c <rtems_task_ident> <== NOT EXECUTED
8002f18: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
8002f1c: 5c 20 00 11 bne r1,r0,8002f60 <rtems_libio_share_private_env+0x74><== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
8002f20: 78 0b 08 02 mvhi r11,0x802 <== NOT EXECUTED
8002f24: 39 6b 10 f8 ori r11,r11,0x10f8 <== NOT EXECUTED
8002f28: 29 6d 00 00 lw r13,(r11+0) <== NOT EXECUTED
8002f2c: 2b 82 00 18 lw r2,(sp+24) <== NOT EXECUTED
8002f30: b9 60 60 00 mv r12,r11 <== NOT EXECUTED
8002f34: 29 a3 00 00 lw r3,(r13+0) <== NOT EXECUTED
8002f38: 44 62 00 12 be r3,r2,8002f80 <rtems_libio_share_private_env+0x94><== NOT EXECUTED
free_user_env(tmp);
};
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
8002f3c: 37 83 00 1c addi r3,sp,28 <== NOT EXECUTED
8002f40: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
8002f44: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
8002f48: f8 00 04 32 calli 8004010 <rtems_task_variable_get> <== NOT EXECUTED
8002f4c: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
8002f50: 44 20 00 13 be r1,r0,8002f9c <rtems_libio_share_private_env+0xb0><== NOT EXECUTED
return RTEMS_SUCCESSFUL;
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
8002f54: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8002f58: 38 21 17 64 ori r1,r1,0x1764 <== NOT EXECUTED
8002f5c: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED
return sc;
}
8002f60: b8 60 08 00 mv r1,r3 <== NOT EXECUTED
8002f64: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002f68: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED
8002f6c: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED
8002f70: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED
8002f74: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED
8002f78: 37 9c 00 1c addi sp,sp,28 <== NOT EXECUTED
8002f7c: c3 a0 00 00 ret <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
if (rtems_current_user_env->task_id==current_task_id) {
/* kill the current user env & task_var*/
rtems_user_env_t *tmp = rtems_current_user_env;
sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
8002f80: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8002f84: f8 00 03 f4 calli 8003f54 <rtems_task_variable_delete> <== NOT EXECUTED
8002f88: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
8002f8c: 5c 20 ff f5 bne r1,r0,8002f60 <rtems_libio_share_private_env+0x74><== NOT EXECUTED
free_user_env(tmp);
8002f90: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8002f94: fb ff ff bd calli 8002e88 <free_user_env> <== NOT EXECUTED
8002f98: e3 ff ff e9 bi 8002f3c <rtems_libio_share_private_env+0x50><== NOT EXECUTED
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
goto bailout;
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
8002f9c: 78 03 08 00 mvhi r3,0x800 <== NOT EXECUTED
8002fa0: 38 63 2e 88 ori r3,r3,0x2e88 <== NOT EXECUTED
8002fa4: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
8002fa8: f8 00 03 ac calli 8003e58 <rtems_task_variable_add> <== NOT EXECUTED
8002fac: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
8002fb0: 5c 20 ff e9 bne r1,r0,8002f54 <rtems_libio_share_private_env+0x68><== NOT EXECUTED
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
8002fb4: 2b 81 00 1c lw r1,(sp+28) <== NOT EXECUTED
8002fb8: 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;
8002fbc: e3 ff ff e9 bi 8002f60 <rtems_libio_share_private_env+0x74><== NOT EXECUTED
08007c1c <rtems_libio_to_fcntl_flags>:
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
8007c1c: 37 9c ff f8 addi sp,sp,-8
8007c20: 5b 8b 00 08 sw (sp+8),r11
8007c24: 5b 9d 00 04 sw (sp+4),ra
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
8007c28: 34 03 00 06 mvi r3,6
8007c2c: 20 24 00 06 andi r4,r1,0x6
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
8007c30: b8 20 58 00 mv r11,r1
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
8007c34: 34 02 00 02 mvi r2,2
8007c38: 44 83 00 04 be r4,r3,8007c48 <rtems_libio_to_fcntl_flags+0x2c><== NEVER TAKEN
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
8007c3c: a0 22 18 00 and r3,r1,r2
8007c40: 34 02 00 00 mvi r2,0
8007c44: 44 62 00 0f be r3,r2,8007c80 <rtems_libio_to_fcntl_flags+0x64><== NEVER TAKEN
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 ) {
8007c48: 21 61 00 01 andi r1,r11,0x1
8007c4c: 44 20 00 02 be r1,r0,8007c54 <rtems_libio_to_fcntl_flags+0x38>
fcntl_flags |= O_NONBLOCK;
8007c50: 38 42 40 00 ori r2,r2,0x4000
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
8007c54: 21 61 02 00 andi r1,r11,0x200
8007c58: 44 20 00 02 be r1,r0,8007c60 <rtems_libio_to_fcntl_flags+0x44>
fcntl_flags |= O_APPEND;
8007c5c: 38 42 00 08 ori r2,r2,0x8
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
8007c60: 21 6b 04 00 andi r11,r11,0x400
8007c64: 45 60 00 02 be r11,r0,8007c6c <rtems_libio_to_fcntl_flags+0x50>
fcntl_flags |= O_CREAT;
8007c68: 38 42 02 00 ori r2,r2,0x200
}
return fcntl_flags;
}
8007c6c: b8 40 08 00 mv r1,r2
8007c70: 2b 9d 00 04 lw ra,(sp+4)
8007c74: 2b 8b 00 08 lw r11,(sp+8)
8007c78: 37 9c 00 08 addi sp,sp,8
8007c7c: c3 a0 00 00 ret
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
8007c80: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8007c84: fb ff e1 83 calli 8000290 <__lshrsi3> <== NOT EXECUTED
8007c88: 20 22 00 01 andi r2,r1,0x1 <== NOT EXECUTED
8007c8c: e3 ff ff ef bi 8007c48 <rtems_libio_to_fcntl_flags+0x2c> <== NOT EXECUTED
0800e334 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
800e334: 37 9c ff f0 addi sp,sp,-16
800e338: 5b 8b 00 10 sw (sp+16),r11
800e33c: 5b 8c 00 0c sw (sp+12),r12
800e340: 5b 8d 00 08 sw (sp+8),r13
800e344: 5b 9d 00 04 sw (sp+4),ra
800e348: b8 20 58 00 mv r11,r1
800e34c: b8 40 60 00 mv r12,r2
800e350: b8 60 68 00 mv r13,r3
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
800e354: 44 20 00 24 be r1,r0,800e3e4 <rtems_memalign+0xb0>
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
800e358: 78 01 08 02 mvhi r1,0x802
800e35c: 38 21 6a e0 ori r1,r1,0x6ae0
800e360: 28 22 00 00 lw r2,(r1+0)
* Parameter error checks
*/
if ( !pointer )
return EINVAL;
*pointer = NULL;
800e364: 34 01 00 00 mvi r1,0
800e368: 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()) &&
800e36c: 34 01 00 03 mvi r1,3
800e370: 44 41 00 1b be r2,r1,800e3dc <rtems_memalign+0xa8> <== ALWAYS TAKEN
/*
*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
800e374: fb ff d2 e5 calli 8002f08 <malloc_deferred_frees_process>
uintptr_t size,
uintptr_t alignment
)
{
return
_Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 );
800e378: 78 01 08 02 mvhi r1,0x802
800e37c: 38 21 60 1c ori r1,r1,0x601c
800e380: 28 21 00 00 lw r1,(r1+0)
800e384: b9 80 18 00 mv r3,r12
800e388: b9 a0 10 00 mv r2,r13
800e38c: 34 04 00 00 mvi r4,0
800e390: fb ff e1 34 calli 8006860 <_Protected_heap_Allocate_aligned_with_boundary>
800e394: b8 20 60 00 mv r12,r1
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
800e398: 34 01 00 0c mvi r1,12
800e39c: 45 80 00 0a be r12,r0,800e3c4 <rtems_memalign+0x90>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
800e3a0: 78 02 08 02 mvhi r2,0x802
800e3a4: 38 42 66 80 ori r2,r2,0x6680
800e3a8: 28 41 00 00 lw r1,(r2+0)
800e3ac: 44 20 00 04 be r1,r0,800e3bc <rtems_memalign+0x88> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
800e3b0: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED
800e3b4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800e3b8: 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;
800e3bc: 59 6c 00 00 sw (r11+0),r12
800e3c0: 34 01 00 00 mvi r1,0
return 0;
}
800e3c4: 2b 9d 00 04 lw ra,(sp+4)
800e3c8: 2b 8b 00 10 lw r11,(sp+16)
800e3cc: 2b 8c 00 0c lw r12,(sp+12)
800e3d0: 2b 8d 00 08 lw r13,(sp+8)
800e3d4: 37 9c 00 10 addi sp,sp,16
800e3d8: c3 a0 00 00 ret
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
800e3dc: fb ff d2 b0 calli 8002e9c <malloc_is_system_state_OK>
800e3e0: 5c 20 ff e5 bne r1,r0,800e374 <rtems_memalign+0x40> <== ALWAYS TAKEN
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
return 0;
800e3e4: 34 01 00 16 mvi r1,22
}
800e3e8: 2b 9d 00 04 lw ra,(sp+4)
800e3ec: 2b 8b 00 10 lw r11,(sp+16)
800e3f0: 2b 8c 00 0c lw r12,(sp+12)
800e3f4: 2b 8d 00 08 lw r13,(sp+8)
800e3f8: 37 9c 00 10 addi sp,sp,16
800e3fc: c3 a0 00 00 ret
08005250 <rtems_message_queue_broadcast>:
rtems_id id,
const void *buffer,
size_t size,
uint32_t *count
)
{
8005250: 37 9c ff e4 addi sp,sp,-28
8005254: 5b 8b 00 14 sw (sp+20),r11
8005258: 5b 8c 00 10 sw (sp+16),r12
800525c: 5b 8d 00 0c sw (sp+12),r13
8005260: 5b 8e 00 08 sw (sp+8),r14
8005264: 5b 9d 00 04 sw (sp+4),ra
8005268: b8 40 58 00 mv r11,r2
800526c: b8 20 68 00 mv r13,r1
8005270: b8 60 70 00 mv r14,r3
8005274: b8 80 60 00 mv r12,r4
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status core_status;
if ( !buffer )
8005278: 44 40 00 1d be r2,r0,80052ec <rtems_message_queue_broadcast+0x9c><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !count )
800527c: 44 80 00 1c be r4,r0,80052ec <rtems_message_queue_broadcast+0x9c><== NEVER TAKEN
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
8005280: 78 01 08 02 mvhi r1,0x802
8005284: 38 21 81 f8 ori r1,r1,0x81f8
8005288: b9 a0 10 00 mv r2,r13
800528c: 37 83 00 1c addi r3,sp,28
8005290: f8 00 0a 3c calli 8007b80 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
8005294: 2b 85 00 1c lw r5,(sp+28)
8005298: 34 07 00 04 mvi r7,4
800529c: 5c a0 00 0c bne r5,r0,80052cc <rtems_message_queue_broadcast+0x7c>
case OBJECTS_LOCAL:
core_status = _CORE_message_queue_Broadcast(
80052a0: b9 60 10 00 mv r2,r11
80052a4: b9 c0 18 00 mv r3,r14
80052a8: b9 a0 20 00 mv r4,r13
80052ac: b9 80 30 00 mv r6,r12
80052b0: 34 21 00 14 addi r1,r1,20
80052b4: f8 00 04 bd calli 80065a8 <_CORE_message_queue_Broadcast>
NULL,
#endif
count
);
_Thread_Enable_dispatch();
80052b8: 5b 81 00 18 sw (sp+24),r1
80052bc: f8 00 0c cc calli 80085ec <_Thread_Enable_dispatch>
return
_Message_queue_Translate_core_message_queue_return_code( core_status );
80052c0: 2b 81 00 18 lw r1,(sp+24)
80052c4: f8 00 01 25 calli 8005758 <_Message_queue_Translate_core_message_queue_return_code>
80052c8: b8 20 38 00 mv r7,r1
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80052cc: b8 e0 08 00 mv r1,r7
80052d0: 2b 9d 00 04 lw ra,(sp+4)
80052d4: 2b 8b 00 14 lw r11,(sp+20)
80052d8: 2b 8c 00 10 lw r12,(sp+16)
80052dc: 2b 8d 00 0c lw r13,(sp+12)
80052e0: 2b 8e 00 08 lw r14,(sp+8)
80052e4: 37 9c 00 1c addi sp,sp,28
80052e8: c3 a0 00 00 ret
#endif
count
);
_Thread_Enable_dispatch();
return
80052ec: 34 07 00 09 mvi r7,9 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80052f0: b8 e0 08 00 mv r1,r7 <== NOT EXECUTED
80052f4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80052f8: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED
80052fc: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED
8005300: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED
8005304: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED
8005308: 37 9c 00 1c addi sp,sp,28 <== NOT EXECUTED
800530c: c3 a0 00 00 ret <== NOT EXECUTED
0800d240 <rtems_message_queue_create>:
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
800d240: 37 9c ff dc addi sp,sp,-36
800d244: 5b 8b 00 14 sw (sp+20),r11
800d248: 5b 8c 00 10 sw (sp+16),r12
800d24c: 5b 8d 00 0c sw (sp+12),r13
800d250: 5b 8e 00 08 sw (sp+8),r14
800d254: 5b 9d 00 04 sw (sp+4),ra
800d258: b8 20 58 00 mv r11,r1
800d25c: b8 60 60 00 mv r12,r3
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
800d260: 34 01 00 03 mvi r1,3
800d264: 45 60 00 07 be r11,r0,800d280 <rtems_message_queue_create+0x40><== NEVER TAKEN
return RTEMS_INVALID_NAME;
if ( !id )
800d268: 34 01 00 09 mvi r1,9
800d26c: 44 a0 00 05 be r5,r0,800d280 <rtems_message_queue_create+0x40><== NEVER TAKEN
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
800d270: 34 01 00 0a mvi r1,10
800d274: 44 40 00 03 be r2,r0,800d280 <rtems_message_queue_create+0x40><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
800d278: 34 01 00 08 mvi r1,8
800d27c: 5c 60 00 08 bne r3,r0,800d29c <rtems_message_queue_create+0x5c><== ALWAYS TAKEN
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
800d280: 2b 9d 00 04 lw ra,(sp+4)
800d284: 2b 8b 00 14 lw r11,(sp+20)
800d288: 2b 8c 00 10 lw r12,(sp+16)
800d28c: 2b 8d 00 0c lw r13,(sp+12)
800d290: 2b 8e 00 08 lw r14,(sp+8)
800d294: 37 9c 00 24 addi sp,sp,36
800d298: c3 a0 00 00 ret
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
800d29c: 78 01 08 02 mvhi r1,0x802
800d2a0: 38 21 da 4c ori r1,r1,0xda4c
800d2a4: 28 23 00 00 lw r3,(r1+0)
800d2a8: 34 63 00 01 addi r3,r3,1
800d2ac: 58 23 00 00 sw (r1+0),r3
#endif
#endif
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
800d2b0: 5b 82 00 20 sw (sp+32),r2
800d2b4: 5b 84 00 1c sw (sp+28),r4
800d2b8: 5b 85 00 18 sw (sp+24),r5
800d2bc: f8 00 1e ec calli 8014e6c <_Message_queue_Allocate>
800d2c0: b8 20 68 00 mv r13,r1
if ( !the_message_queue ) {
800d2c4: 2b 82 00 20 lw r2,(sp+32)
800d2c8: 2b 84 00 1c lw r4,(sp+28)
800d2cc: 2b 85 00 18 lw r5,(sp+24)
800d2d0: 44 20 00 27 be r1,r0,800d36c <rtems_message_queue_create+0x12c><== NEVER TAKEN
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_message_queue->attribute_set = attribute_set;
800d2d4: 58 24 00 10 sw (r1+16),r4
if (_Attributes_Is_priority( attribute_set ) )
800d2d8: 20 84 00 04 andi r4,r4,0x4
800d2dc: 44 80 00 12 be r4,r0,800d324 <rtems_message_queue_create+0xe4>
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
800d2e0: 34 01 00 01 mvi r1,1
800d2e4: 5b 81 00 24 sw (sp+36),r1
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
if ( ! _CORE_message_queue_Initialize(
800d2e8: b8 40 18 00 mv r3,r2
800d2ec: b9 80 20 00 mv r4,r12
800d2f0: 35 a1 00 14 addi r1,r13,20
800d2f4: 37 82 00 24 addi r2,sp,36
800d2f8: 5b 85 00 18 sw (sp+24),r5
800d2fc: f8 00 05 d2 calli 800ea44 <_CORE_message_queue_Initialize>
800d300: 2b 85 00 18 lw r5,(sp+24)
800d304: 5c 20 00 0a bne r1,r0,800d32c <rtems_message_queue_create+0xec><== ALWAYS TAKEN
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
800d308: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800d30c: 38 21 e2 f0 ori r1,r1,0xe2f0 <== NOT EXECUTED
800d310: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED
800d314: f8 00 0a b2 calli 800fddc <_Objects_Free> <== NOT EXECUTED
_Objects_MP_Close(
&_Message_queue_Information, the_message_queue->Object.id);
#endif
_Message_queue_Free( the_message_queue );
_Thread_Enable_dispatch();
800d318: f8 00 0e 79 calli 8010cfc <_Thread_Enable_dispatch> <== NOT EXECUTED
800d31c: 34 01 00 0d mvi r1,13 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
800d320: e3 ff ff d8 bi 800d280 <rtems_message_queue_create+0x40> <== NOT EXECUTED
the_message_queue->attribute_set = attribute_set;
if (_Attributes_Is_priority( attribute_set ) )
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
800d324: 5b 84 00 24 sw (sp+36),r4
800d328: e3 ff ff f0 bi 800d2e8 <rtems_message_queue_create+0xa8>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
800d32c: 29 ac 00 08 lw r12,(r13+8)
800d330: 78 01 08 02 mvhi r1,0x802
800d334: 38 21 e2 f0 ori r1,r1,0xe2f0
800d338: 28 2e 00 1c lw r14,(r1+28)
800d33c: 34 02 00 02 mvi r2,2
800d340: 21 81 ff ff andi r1,r12,0xffff
800d344: 5b 85 00 18 sw (sp+24),r5
800d348: fb ff e5 70 calli 8006908 <__ashlsi3>
&_Message_queue_Information,
&the_message_queue->Object,
(Objects_Name) name
);
*id = the_message_queue->Object.id;
800d34c: 2b 85 00 18 lw r5,(sp+24)
800d350: b5 c1 08 00 add r1,r14,r1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
800d354: 59 ab 00 0c sw (r13+12),r11
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
800d358: 58 2d 00 00 sw (r1+0),r13
800d35c: 58 ac 00 00 sw (r5+0),r12
name,
0
);
#endif
_Thread_Enable_dispatch();
800d360: f8 00 0e 67 calli 8010cfc <_Thread_Enable_dispatch>
800d364: 34 01 00 00 mvi r1,0
return RTEMS_SUCCESSFUL;
800d368: e3 ff ff c6 bi 800d280 <rtems_message_queue_create+0x40>
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
if ( !the_message_queue ) {
_Thread_Enable_dispatch();
800d36c: f8 00 0e 64 calli 8010cfc <_Thread_Enable_dispatch> <== NOT EXECUTED
800d370: 34 01 00 05 mvi r1,5 <== NOT EXECUTED
return RTEMS_TOO_MANY;
800d374: e3 ff ff c3 bi 800d280 <rtems_message_queue_create+0x40> <== NOT EXECUTED
08005448 <rtems_message_queue_delete>:
*/
rtems_status_code rtems_message_queue_delete(
rtems_id id
)
{
8005448: 37 9c ff f0 addi sp,sp,-16
800544c: 5b 8b 00 0c sw (sp+12),r11
8005450: 5b 8c 00 08 sw (sp+8),r12
8005454: 5b 9d 00 04 sw (sp+4),ra
8005458: b8 20 10 00 mv r2,r1
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
800545c: 78 01 08 02 mvhi r1,0x802
8005460: 38 21 81 f8 ori r1,r1,0x81f8
8005464: 37 83 00 10 addi r3,sp,16
8005468: f8 00 09 c6 calli 8007b80 <_Objects_Get>
register Message_queue_Control *the_message_queue;
Objects_Locations location;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
800546c: 2b 8b 00 10 lw r11,(sp+16)
8005470: b8 20 60 00 mv r12,r1
8005474: 34 01 00 04 mvi r1,4
8005478: 5d 60 00 0f bne r11,r0,80054b4 <rtems_message_queue_delete+0x6c><== NEVER TAKEN
case OBJECTS_LOCAL:
_Objects_Close( &_Message_queue_Information,
800547c: 78 01 08 02 mvhi r1,0x802
8005480: 38 21 81 f8 ori r1,r1,0x81f8
8005484: b9 80 10 00 mv r2,r12
8005488: f8 00 08 74 calli 8007658 <_Objects_Close>
&the_message_queue->Object );
_CORE_message_queue_Close(
800548c: 34 03 00 05 mvi r3,5
8005490: 35 81 00 14 addi r1,r12,20
8005494: b9 60 10 00 mv r2,r11
8005498: f8 00 04 6f calli 8006654 <_CORE_message_queue_Close>
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
800549c: 78 01 08 02 mvhi r1,0x802
80054a0: 38 21 81 f8 ori r1,r1,0x81f8
80054a4: b9 80 10 00 mv r2,r12
80054a8: f8 00 09 57 calli 8007a04 <_Objects_Free>
0, /* Not used */
0
);
}
#endif
_Thread_Enable_dispatch();
80054ac: f8 00 0c 50 calli 80085ec <_Thread_Enable_dispatch>
80054b0: b9 60 08 00 mv r1,r11
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80054b4: 2b 9d 00 04 lw ra,(sp+4)
80054b8: 2b 8b 00 0c lw r11,(sp+12)
80054bc: 2b 8c 00 08 lw r12,(sp+8)
80054c0: 37 9c 00 10 addi sp,sp,16
80054c4: c3 a0 00 00 ret
080054c8 <rtems_message_queue_flush>:
rtems_status_code rtems_message_queue_flush(
rtems_id id,
uint32_t *count
)
{
80054c8: 37 9c ff f0 addi sp,sp,-16
80054cc: 5b 8b 00 0c sw (sp+12),r11
80054d0: 5b 8c 00 08 sw (sp+8),r12
80054d4: 5b 9d 00 04 sw (sp+4),ra
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
80054d8: 34 03 00 09 mvi r3,9
rtems_status_code rtems_message_queue_flush(
rtems_id id,
uint32_t *count
)
{
80054dc: b8 40 58 00 mv r11,r2
80054e0: b8 20 20 00 mv r4,r1
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
80054e4: 44 40 00 0e be r2,r0,800551c <rtems_message_queue_flush+0x54><== NEVER TAKEN
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
80054e8: 78 01 08 02 mvhi r1,0x802
80054ec: 37 83 00 10 addi r3,sp,16
80054f0: 38 21 81 f8 ori r1,r1,0x81f8
80054f4: b8 80 10 00 mv r2,r4
80054f8: f8 00 09 a2 calli 8007b80 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
80054fc: 2b 8c 00 10 lw r12,(sp+16)
8005500: 34 03 00 04 mvi r3,4
8005504: 5d 80 00 06 bne r12,r0,800551c <rtems_message_queue_flush+0x54>
case OBJECTS_LOCAL:
*count = _CORE_message_queue_Flush( &the_message_queue->message_queue );
8005508: 34 21 00 14 addi r1,r1,20
800550c: f8 00 04 61 calli 8006690 <_CORE_message_queue_Flush>
8005510: 59 61 00 00 sw (r11+0),r1
_Thread_Enable_dispatch();
8005514: f8 00 0c 36 calli 80085ec <_Thread_Enable_dispatch>
8005518: b9 80 18 00 mv r3,r12
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
800551c: b8 60 08 00 mv r1,r3
8005520: 2b 9d 00 04 lw ra,(sp+4)
8005524: 2b 8b 00 0c lw r11,(sp+12)
8005528: 2b 8c 00 08 lw r12,(sp+8)
800552c: 37 9c 00 10 addi sp,sp,16
8005530: c3 a0 00 00 ret
08005534 <rtems_message_queue_get_number_pending>:
rtems_status_code rtems_message_queue_get_number_pending(
rtems_id id,
uint32_t *count
)
{
8005534: 37 9c ff f0 addi sp,sp,-16
8005538: 5b 8b 00 0c sw (sp+12),r11
800553c: 5b 8c 00 08 sw (sp+8),r12
8005540: 5b 9d 00 04 sw (sp+4),ra
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
8005544: 34 03 00 09 mvi r3,9
rtems_status_code rtems_message_queue_get_number_pending(
rtems_id id,
uint32_t *count
)
{
8005548: b8 40 58 00 mv r11,r2
800554c: b8 20 20 00 mv r4,r1
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
8005550: 44 40 00 0d be r2,r0,8005584 <rtems_message_queue_get_number_pending+0x50><== NEVER TAKEN
8005554: 78 01 08 02 mvhi r1,0x802
8005558: 37 83 00 10 addi r3,sp,16
800555c: 38 21 81 f8 ori r1,r1,0x81f8
8005560: b8 80 10 00 mv r2,r4
8005564: f8 00 09 87 calli 8007b80 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
8005568: 2b 8c 00 10 lw r12,(sp+16)
800556c: 34 03 00 04 mvi r3,4
8005570: 5d 80 00 05 bne r12,r0,8005584 <rtems_message_queue_get_number_pending+0x50><== NEVER TAKEN
case OBJECTS_LOCAL:
*count = the_message_queue->message_queue.number_of_pending_messages;
8005574: 28 21 00 5c lw r1,(r1+92)
8005578: 59 61 00 00 sw (r11+0),r1
_Thread_Enable_dispatch();
800557c: f8 00 0c 1c calli 80085ec <_Thread_Enable_dispatch>
8005580: b9 80 18 00 mv r3,r12
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8005584: b8 60 08 00 mv r1,r3
8005588: 2b 9d 00 04 lw ra,(sp+4)
800558c: 2b 8b 00 0c lw r11,(sp+12)
8005590: 2b 8c 00 08 lw r12,(sp+8)
8005594: 37 9c 00 10 addi sp,sp,16
8005598: c3 a0 00 00 ret
0800d3cc <rtems_message_queue_receive>:
void *buffer,
size_t *size,
rtems_option option_set,
rtems_interval timeout
)
{
800d3cc: 37 9c ff e8 addi sp,sp,-24
800d3d0: 5b 8b 00 14 sw (sp+20),r11
800d3d4: 5b 8c 00 10 sw (sp+16),r12
800d3d8: 5b 8d 00 0c sw (sp+12),r13
800d3dc: 5b 8e 00 08 sw (sp+8),r14
800d3e0: 5b 9d 00 04 sw (sp+4),ra
800d3e4: b8 40 58 00 mv r11,r2
800d3e8: b8 20 38 00 mv r7,r1
800d3ec: b8 60 60 00 mv r12,r3
800d3f0: b8 80 70 00 mv r14,r4
800d3f4: b8 a0 68 00 mv r13,r5
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
800d3f8: 44 40 00 20 be r2,r0,800d478 <rtems_message_queue_receive+0xac><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !size )
800d3fc: 44 60 00 1f be r3,r0,800d478 <rtems_message_queue_receive+0xac><== NEVER TAKEN
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
800d400: 78 01 08 02 mvhi r1,0x802
800d404: b8 e0 10 00 mv r2,r7
800d408: 38 21 e2 f0 ori r1,r1,0xe2f0
800d40c: 37 83 00 18 addi r3,sp,24
800d410: f8 00 0b 03 calli 801001c <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
800d414: 2b 82 00 18 lw r2,(sp+24)
800d418: b8 20 38 00 mv r7,r1
800d41c: 34 01 00 04 mvi r1,4
800d420: 5c 40 00 0f bne r2,r0,800d45c <rtems_message_queue_receive+0x90><== NEVER TAKEN
if ( _Options_Is_no_wait( option_set ) )
wait = false;
else
wait = true;
_CORE_message_queue_Seize(
800d424: 28 e2 00 08 lw r2,(r7+8)
800d428: 21 c5 00 01 andi r5,r14,0x1
800d42c: 34 e1 00 14 addi r1,r7,20
800d430: b9 60 18 00 mv r3,r11
800d434: b9 80 20 00 mv r4,r12
800d438: 18 a5 00 01 xori r5,r5,0x1
800d43c: b9 a0 30 00 mv r6,r13
800d440: f8 00 05 c3 calli 800eb4c <_CORE_message_queue_Seize>
buffer,
size,
wait,
timeout
);
_Thread_Enable_dispatch();
800d444: f8 00 0e 2e calli 8010cfc <_Thread_Enable_dispatch>
return _Message_queue_Translate_core_message_queue_return_code(
800d448: 78 01 08 02 mvhi r1,0x802
800d44c: 38 21 db 08 ori r1,r1,0xdb08
800d450: 28 21 00 00 lw r1,(r1+0)
800d454: 28 21 00 34 lw r1,(r1+52)
800d458: f8 00 00 37 calli 800d534 <_Message_queue_Translate_core_message_queue_return_code>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
800d45c: 2b 9d 00 04 lw ra,(sp+4)
800d460: 2b 8b 00 14 lw r11,(sp+20)
800d464: 2b 8c 00 10 lw r12,(sp+16)
800d468: 2b 8d 00 0c lw r13,(sp+12)
800d46c: 2b 8e 00 08 lw r14,(sp+8)
800d470: 37 9c 00 18 addi sp,sp,24
800d474: c3 a0 00 00 ret
size,
wait,
timeout
);
_Thread_Enable_dispatch();
return _Message_queue_Translate_core_message_queue_return_code(
800d478: 34 01 00 09 mvi r1,9 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
800d47c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800d480: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED
800d484: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED
800d488: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED
800d48c: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED
800d490: 37 9c 00 18 addi sp,sp,24 <== NOT EXECUTED
800d494: c3 a0 00 00 ret <== NOT EXECUTED
0800d498 <rtems_message_queue_send>:
rtems_status_code rtems_message_queue_send(
rtems_id id,
const void *buffer,
size_t size
)
{
800d498: 37 9c ff e8 addi sp,sp,-24
800d49c: 5b 8b 00 10 sw (sp+16),r11
800d4a0: 5b 8c 00 0c sw (sp+12),r12
800d4a4: 5b 8d 00 08 sw (sp+8),r13
800d4a8: 5b 9d 00 04 sw (sp+4),ra
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
800d4ac: 34 06 00 09 mvi r6,9
rtems_status_code rtems_message_queue_send(
rtems_id id,
const void *buffer,
size_t size
)
{
800d4b0: b8 40 58 00 mv r11,r2
800d4b4: b8 20 60 00 mv r12,r1
800d4b8: b8 60 68 00 mv r13,r3
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
800d4bc: 44 40 00 17 be r2,r0,800d518 <rtems_message_queue_send+0x80><== NEVER TAKEN
800d4c0: 78 01 08 02 mvhi r1,0x802
800d4c4: 38 21 e2 f0 ori r1,r1,0xe2f0
800d4c8: b9 80 10 00 mv r2,r12
800d4cc: 37 83 00 18 addi r3,sp,24
800d4d0: f8 00 0a d3 calli 801001c <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
800d4d4: 2b 85 00 18 lw r5,(sp+24)
800d4d8: 34 06 00 04 mvi r6,4
800d4dc: 5c a0 00 0f bne r5,r0,800d518 <rtems_message_queue_send+0x80><== NEVER TAKEN
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
800d4e0: 78 06 7f ff mvhi r6,0x7fff
800d4e4: 38 c6 ff ff ori r6,r6,0xffff
800d4e8: b9 60 10 00 mv r2,r11
800d4ec: b9 a0 18 00 mv r3,r13
800d4f0: b9 80 20 00 mv r4,r12
800d4f4: b8 a0 38 00 mv r7,r5
800d4f8: b8 a0 40 00 mv r8,r5
800d4fc: 34 21 00 14 addi r1,r1,20
800d500: f8 00 05 f2 calli 800ecc8 <_CORE_message_queue_Submit>
MESSAGE_QUEUE_MP_HANDLER,
false, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
800d504: 5b 81 00 14 sw (sp+20),r1
800d508: f8 00 0d fd calli 8010cfc <_Thread_Enable_dispatch>
/*
* Since this API does not allow for blocking sends, we can directly
* return the returned status.
*/
return _Message_queue_Translate_core_message_queue_return_code(status);
800d50c: 2b 81 00 14 lw r1,(sp+20)
800d510: f8 00 00 09 calli 800d534 <_Message_queue_Translate_core_message_queue_return_code>
800d514: b8 20 30 00 mv r6,r1
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
800d518: b8 c0 08 00 mv r1,r6
800d51c: 2b 9d 00 04 lw ra,(sp+4)
800d520: 2b 8b 00 10 lw r11,(sp+16)
800d524: 2b 8c 00 0c lw r12,(sp+12)
800d528: 2b 8d 00 08 lw r13,(sp+8)
800d52c: 37 9c 00 18 addi sp,sp,24
800d530: c3 a0 00 00 ret
0800578c <rtems_message_queue_urgent>:
rtems_status_code rtems_message_queue_urgent(
rtems_id id,
const void *buffer,
size_t size
)
{
800578c: 37 9c ff e8 addi sp,sp,-24
8005790: 5b 8b 00 10 sw (sp+16),r11
8005794: 5b 8c 00 0c sw (sp+12),r12
8005798: 5b 8d 00 08 sw (sp+8),r13
800579c: 5b 9d 00 04 sw (sp+4),ra
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
80057a0: 34 06 00 09 mvi r6,9
rtems_status_code rtems_message_queue_urgent(
rtems_id id,
const void *buffer,
size_t size
)
{
80057a4: b8 40 58 00 mv r11,r2
80057a8: b8 20 60 00 mv r12,r1
80057ac: b8 60 68 00 mv r13,r3
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
80057b0: 44 40 00 17 be r2,r0,800580c <rtems_message_queue_urgent+0x80><== NEVER TAKEN
80057b4: 78 01 08 02 mvhi r1,0x802
80057b8: 38 21 81 f8 ori r1,r1,0x81f8
80057bc: b9 80 10 00 mv r2,r12
80057c0: 37 83 00 18 addi r3,sp,24
80057c4: f8 00 08 ef calli 8007b80 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
80057c8: 2b 85 00 18 lw r5,(sp+24)
80057cc: 34 06 00 04 mvi r6,4
80057d0: 5c a0 00 0f bne r5,r0,800580c <rtems_message_queue_urgent+0x80><== NEVER TAKEN
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
80057d4: 78 06 80 00 mvhi r6,0x8000
80057d8: 38 c6 00 00 ori r6,r6,0x0
80057dc: b9 60 10 00 mv r2,r11
80057e0: b9 a0 18 00 mv r3,r13
80057e4: b9 80 20 00 mv r4,r12
80057e8: b8 a0 38 00 mv r7,r5
80057ec: b8 a0 40 00 mv r8,r5
80057f0: 34 21 00 14 addi r1,r1,20
80057f4: f8 00 04 6a calli 800699c <_CORE_message_queue_Submit>
id,
MESSAGE_QUEUE_MP_HANDLER,
false, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
80057f8: 5b 81 00 14 sw (sp+20),r1
80057fc: f8 00 0b 7c calli 80085ec <_Thread_Enable_dispatch>
/*
* Since this API does not allow for blocking sends, we can directly
* return the returned status.
*/
return _Message_queue_Translate_core_message_queue_return_code(status);
8005800: 2b 81 00 14 lw r1,(sp+20)
8005804: fb ff ff d5 calli 8005758 <_Message_queue_Translate_core_message_queue_return_code>
8005808: b8 20 30 00 mv r6,r1
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
800580c: b8 c0 08 00 mv r1,r6
8005810: 2b 9d 00 04 lw ra,(sp+4)
8005814: 2b 8b 00 10 lw r11,(sp+16)
8005818: 2b 8c 00 0c lw r12,(sp+12)
800581c: 2b 8d 00 08 lw r13,(sp+8)
8005820: 37 9c 00 18 addi sp,sp,24
8005824: c3 a0 00 00 ret
080044d8 <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
80044d8: 37 9c ff e8 addi sp,sp,-24
80044dc: 5b 8b 00 18 sw (sp+24),r11
80044e0: 5b 8c 00 14 sw (sp+20),r12
80044e4: 5b 8d 00 10 sw (sp+16),r13
80044e8: 5b 8e 00 0c sw (sp+12),r14
80044ec: 5b 8f 00 08 sw (sp+8),r15
80044f0: 5b 9d 00 04 sw (sp+4),ra
80044f4: b8 60 70 00 mv r14,r3
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
80044f8: 34 03 00 09 mvi r3,9
80044fc: 45 c0 00 1e be r14,r0,8004574 <rtems_object_get_class_information+0x9c>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
8004500: f8 00 07 0d calli 8006134 <_Objects_Get_information>
8004504: b8 20 10 00 mv r2,r1
if ( !obj_info )
8004508: 34 03 00 0a mvi r3,10
800450c: 44 20 00 1a be r1,r0,8004574 <rtems_object_get_class_information+0x9c>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
8004510: 28 21 00 08 lw r1,(r1+8)
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
8004514: 2c 4d 00 10 lhu r13,(r2+16)
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
8004518: 59 c1 00 00 sw (r14+0),r1
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
800451c: 40 41 00 12 lbu r1,(r2+18)
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
8004520: b9 a0 60 00 mv r12,r13
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
8004524: 31 c1 00 0c sb (r14+12),r1
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
8004528: 28 41 00 0c lw r1,(r2+12)
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
800452c: 59 cd 00 08 sw (r14+8),r13
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
8004530: 59 c1 00 04 sw (r14+4),r1
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
8004534: 45 a0 00 0e be r13,r0,800456c <rtems_object_get_class_information+0x94><== NEVER TAKEN
8004538: 28 4f 00 1c lw r15,(r2+28)
800453c: 34 01 00 01 mvi r1,1
8004540: b8 20 58 00 mv r11,r1
8004544: 34 0c 00 00 mvi r12,0
if ( !obj_info->local_table[i] )
8004548: 34 02 00 02 mvi r2,2
800454c: fb ff f6 92 calli 8001f94 <__ashlsi3>
8004550: b5 e1 08 00 add r1,r15,r1
8004554: 28 22 00 00 lw r2,(r1+0)
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
8004558: 35 6b 00 01 addi r11,r11,1
800455c: b9 60 08 00 mv r1,r11
if ( !obj_info->local_table[i] )
unallocated++;
8004560: 64 42 00 00 cmpei r2,r2,0
8004564: b5 82 60 00 add r12,r12,r2
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
8004568: 51 ab ff f8 bgeu r13,r11,8004548 <rtems_object_get_class_information+0x70>
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
800456c: 59 cc 00 10 sw (r14+16),r12
8004570: 34 03 00 00 mvi r3,0
return RTEMS_SUCCESSFUL;
}
8004574: b8 60 08 00 mv r1,r3
8004578: 2b 9d 00 04 lw ra,(sp+4)
800457c: 2b 8b 00 18 lw r11,(sp+24)
8004580: 2b 8c 00 14 lw r12,(sp+20)
8004584: 2b 8d 00 10 lw r13,(sp+16)
8004588: 2b 8e 00 0c lw r14,(sp+12)
800458c: 2b 8f 00 08 lw r15,(sp+8)
8004590: 37 9c 00 18 addi sp,sp,24
8004594: c3 a0 00 00 ret
08007310 <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
8007310: 37 9c ff dc addi sp,sp,-36 <== NOT EXECUTED
8007314: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8007318: b8 20 48 00 mv r9,r1 <== NOT EXECUTED
800731c: 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);
8007320: 78 01 20 00 mvhi r1,0x2000 <== NOT EXECUTED
void rtems_panic(
const char *printf_format,
...
)
{
8007324: 5b 82 00 0c sw (sp+12),r2 <== NOT EXECUTED
8007328: 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);
800732c: b9 20 10 00 mv r2,r9 <== NOT EXECUTED
8007330: 37 83 00 0c addi r3,sp,12 <== NOT EXECUTED
8007334: 38 21 00 00 ori r1,r1,0x0 <== NOT EXECUTED
void rtems_panic(
const char *printf_format,
...
)
{
8007338: 5b 84 00 14 sw (sp+20),r4 <== NOT EXECUTED
800733c: 5b 85 00 18 sw (sp+24),r5 <== NOT EXECUTED
8007340: 5b 86 00 1c sw (sp+28),r6 <== NOT EXECUTED
8007344: 5b 87 00 20 sw (sp+32),r7 <== NOT EXECUTED
8007348: 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);
800734c: fb ff ff 73 calli 8007118 <rtems_verror> <== NOT EXECUTED
va_end(arglist);
}
8007350: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8007354: 37 9c 00 24 addi sp,sp,36 <== NOT EXECUTED
8007358: c3 a0 00 00 ret <== NOT EXECUTED
0800312c <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
800312c: 37 9c ff d8 addi sp,sp,-40
8003130: 5b 8b 00 18 sw (sp+24),r11
8003134: 5b 8c 00 14 sw (sp+20),r12
8003138: 5b 8d 00 10 sw (sp+16),r13
800313c: 5b 8e 00 0c sw (sp+12),r14
8003140: 5b 8f 00 08 sw (sp+8),r15
8003144: 5b 9d 00 04 sw (sp+4),ra
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
8003148: 34 07 00 03 mvi r7,3
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
800314c: b8 20 60 00 mv r12,r1
8003150: b8 40 58 00 mv r11,r2
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
8003154: 44 20 00 3c be r1,r0,8003244 <rtems_partition_create+0x118><== NEVER TAKEN
return RTEMS_INVALID_NAME;
if ( !starting_address )
8003158: 44 40 00 46 be r2,r0,8003270 <rtems_partition_create+0x144><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !id )
800315c: 44 c0 00 45 be r6,r0,8003270 <rtems_partition_create+0x144><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
8003160: 64 82 00 00 cmpei r2,r4,0
8003164: 64 61 00 00 cmpei r1,r3,0
8003168: b8 41 08 00 or r1,r2,r1
800316c: 5c 20 00 3f bne r1,r0,8003268 <rtems_partition_create+0x13c><== NEVER TAKEN
8003170: 54 83 00 3e bgu r4,r3,8003268 <rtems_partition_create+0x13c><== NEVER TAKEN
8003174: 20 81 00 07 andi r1,r4,0x7
8003178: 5c 20 00 3c bne r1,r0,8003268 <rtems_partition_create+0x13c><== NEVER TAKEN
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
800317c: 21 6e 00 07 andi r14,r11,0x7
8003180: 5d c1 00 3c bne r14,r1,8003270 <rtems_partition_create+0x144><== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8003184: 78 01 08 02 mvhi r1,0x802
8003188: 38 21 4a 74 ori r1,r1,0x4a74
800318c: 28 22 00 00 lw r2,(r1+0)
8003190: 34 42 00 01 addi r2,r2,1
8003194: 58 22 00 00 sw (r1+0),r2
* 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 );
8003198: 78 01 08 02 mvhi r1,0x802
800319c: 38 21 49 3c ori r1,r1,0x493c
80031a0: 5b 83 00 28 sw (sp+40),r3
80031a4: 5b 84 00 20 sw (sp+32),r4
80031a8: 5b 85 00 24 sw (sp+36),r5
80031ac: 5b 86 00 1c sw (sp+28),r6
80031b0: f8 00 06 87 calli 8004bcc <_Objects_Allocate>
80031b4: b8 20 68 00 mv r13,r1
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
80031b8: 2b 83 00 28 lw r3,(sp+40)
80031bc: 2b 84 00 20 lw r4,(sp+32)
80031c0: 2b 85 00 24 lw r5,(sp+36)
80031c4: 2b 86 00 1c lw r6,(sp+28)
80031c8: 44 2e 00 2c be r1,r14,8003278 <rtems_partition_create+0x14c><== NEVER TAKEN
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
80031cc: 58 25 00 1c sw (r1+28),r5
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
80031d0: 58 2b 00 10 sw (r1+16),r11
the_partition->length = length;
80031d4: 58 23 00 14 sw (r1+20),r3
the_partition->buffer_size = buffer_size;
80031d8: 58 24 00 18 sw (r1+24),r4
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
80031dc: b8 80 10 00 mv r2,r4
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
80031e0: 58 2e 00 20 sw (r1+32),r14
_Chain_Initialize( &the_partition->Memory, starting_address,
80031e4: b8 60 08 00 mv r1,r3
80031e8: 5b 86 00 1c sw (sp+28),r6
80031ec: 5b 84 00 20 sw (sp+32),r4
80031f0: f8 00 6f 70 calli 801efb0 <__udivsi3>
80031f4: 2b 84 00 20 lw r4,(sp+32)
80031f8: 35 af 00 24 addi r15,r13,36
80031fc: b8 20 18 00 mv r3,r1
8003200: b9 60 10 00 mv r2,r11
8003204: b9 e0 08 00 mv r1,r15
8003208: f8 00 03 db calli 8004174 <_Chain_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
800320c: 29 ab 00 08 lw r11,(r13+8)
8003210: 78 01 08 02 mvhi r1,0x802
8003214: 38 21 49 3c ori r1,r1,0x493c
8003218: 28 2f 00 1c lw r15,(r1+28)
800321c: 34 02 00 02 mvi r2,2
8003220: 21 61 ff ff andi r1,r11,0xffff
8003224: fb ff f6 f9 calli 8000e08 <__ashlsi3>
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
8003228: 2b 86 00 1c lw r6,(sp+28)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
800322c: 59 ac 00 0c sw (r13+12),r12
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8003230: b5 e1 08 00 add r1,r15,r1
8003234: 58 cb 00 00 sw (r6+0),r11
8003238: 58 2d 00 00 sw (r1+0),r13
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
800323c: f8 00 0a 72 calli 8005c04 <_Thread_Enable_dispatch>
8003240: b9 c0 38 00 mv r7,r14
return RTEMS_SUCCESSFUL;
}
8003244: b8 e0 08 00 mv r1,r7
8003248: 2b 9d 00 04 lw ra,(sp+4)
800324c: 2b 8b 00 18 lw r11,(sp+24)
8003250: 2b 8c 00 14 lw r12,(sp+20)
8003254: 2b 8d 00 10 lw r13,(sp+16)
8003258: 2b 8e 00 0c lw r14,(sp+12)
800325c: 2b 8f 00 08 lw r15,(sp+8)
8003260: 37 9c 00 28 addi sp,sp,40
8003264: c3 a0 00 00 ret
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
8003268: 34 07 00 08 mvi r7,8 <== NOT EXECUTED
800326c: e3 ff ff f6 bi 8003244 <rtems_partition_create+0x118> <== NOT EXECUTED
8003270: 34 07 00 09 mvi r7,9 <== NOT EXECUTED
8003274: e3 ff ff f4 bi 8003244 <rtems_partition_create+0x118> <== NOT EXECUTED
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
8003278: f8 00 0a 63 calli 8005c04 <_Thread_Enable_dispatch> <== NOT EXECUTED
800327c: 34 07 00 05 mvi r7,5 <== NOT EXECUTED
return RTEMS_TOO_MANY;
8003280: e3 ff ff f1 bi 8003244 <rtems_partition_create+0x118> <== NOT EXECUTED
08003284 <rtems_partition_delete>:
*/
rtems_status_code rtems_partition_delete(
rtems_id id
)
{
8003284: 37 9c ff f0 addi sp,sp,-16
8003288: 5b 8b 00 0c sw (sp+12),r11
800328c: 5b 8c 00 08 sw (sp+8),r12
8003290: 5b 9d 00 04 sw (sp+4),ra
8003294: b8 20 10 00 mv r2,r1
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
8003298: 78 01 08 02 mvhi r1,0x802
800329c: 38 21 49 3c ori r1,r1,0x493c
80032a0: 37 83 00 10 addi r3,sp,16
80032a4: f8 00 07 ce calli 80051dc <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
80032a8: 2b 82 00 10 lw r2,(sp+16)
80032ac: b8 20 58 00 mv r11,r1
80032b0: 34 01 00 04 mvi r1,4
80032b4: 44 40 00 06 be r2,r0,80032cc <rtems_partition_delete+0x48> <== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80032b8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80032bc: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
80032c0: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
80032c4: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
80032c8: c3 a0 00 00 ret <== NOT EXECUTED
the_partition = _Partition_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_partition->number_of_used_blocks == 0 ) {
80032cc: 29 6c 00 20 lw r12,(r11+32)
80032d0: 45 82 00 08 be r12,r2,80032f0 <rtems_partition_delete+0x6c><== ALWAYS TAKEN
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
80032d4: f8 00 0a 4c calli 8005c04 <_Thread_Enable_dispatch> <== NOT EXECUTED
80032d8: 34 01 00 0c mvi r1,12 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80032dc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80032e0: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
80032e4: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
80032e8: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
80032ec: c3 a0 00 00 ret <== NOT EXECUTED
the_partition = _Partition_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_partition->number_of_used_blocks == 0 ) {
_Objects_Close( &_Partition_Information, &the_partition->Object );
80032f0: 78 01 08 02 mvhi r1,0x802
80032f4: b9 60 10 00 mv r2,r11
80032f8: 38 21 49 3c ori r1,r1,0x493c
80032fc: f8 00 06 6e calli 8004cb4 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Partition_Free (
Partition_Control *the_partition
)
{
_Objects_Free( &_Partition_Information, &the_partition->Object );
8003300: 78 01 08 02 mvhi r1,0x802
8003304: 38 21 49 3c ori r1,r1,0x493c
8003308: b9 60 10 00 mv r2,r11
800330c: f8 00 07 55 calli 8005060 <_Objects_Free>
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
8003310: f8 00 0a 3d calli 8005c04 <_Thread_Enable_dispatch>
8003314: b9 80 08 00 mv r1,r12
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003318: 2b 9d 00 04 lw ra,(sp+4)
800331c: 2b 8b 00 0c lw r11,(sp+12)
8003320: 2b 8c 00 08 lw r12,(sp+8)
8003324: 37 9c 00 10 addi sp,sp,16
8003328: c3 a0 00 00 ret
0800332c <rtems_partition_get_buffer>:
rtems_status_code rtems_partition_get_buffer(
rtems_id id,
void **buffer
)
{
800332c: 37 9c ff e8 addi sp,sp,-24
8003330: 5b 8b 00 14 sw (sp+20),r11
8003334: 5b 8c 00 10 sw (sp+16),r12
8003338: 5b 8d 00 0c sw (sp+12),r13
800333c: 5b 8e 00 08 sw (sp+8),r14
8003340: 5b 9d 00 04 sw (sp+4),ra
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
8003344: 34 03 00 09 mvi r3,9
rtems_status_code rtems_partition_get_buffer(
rtems_id id,
void **buffer
)
{
8003348: b8 40 68 00 mv r13,r2
800334c: b8 20 20 00 mv r4,r1
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
8003350: 44 40 00 0a be r2,r0,8003378 <rtems_partition_get_buffer+0x4c><== NEVER TAKEN
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
8003354: 78 01 08 02 mvhi r1,0x802
8003358: 37 83 00 18 addi r3,sp,24
800335c: 38 21 49 3c ori r1,r1,0x493c
8003360: b8 80 10 00 mv r2,r4
8003364: f8 00 07 9e calli 80051dc <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
8003368: 2b 8b 00 18 lw r11,(sp+24)
800336c: b8 20 60 00 mv r12,r1
8003370: 34 03 00 04 mvi r3,4
8003374: 45 60 00 09 be r11,r0,8003398 <rtems_partition_get_buffer+0x6c><== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003378: b8 60 08 00 mv r1,r3
800337c: 2b 9d 00 04 lw ra,(sp+4)
8003380: 2b 8b 00 14 lw r11,(sp+20)
8003384: 2b 8c 00 10 lw r12,(sp+16)
8003388: 2b 8d 00 0c lw r13,(sp+12)
800338c: 2b 8e 00 08 lw r14,(sp+8)
8003390: 37 9c 00 18 addi sp,sp,24
8003394: c3 a0 00 00 ret
*/
RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer (
Partition_Control *the_partition
)
{
return _Chain_Get( &the_partition->Memory );
8003398: 34 21 00 24 addi r1,r1,36
800339c: f8 00 03 65 calli 8004130 <_Chain_Get>
80033a0: b8 20 70 00 mv r14,r1
the_partition = _Partition_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_buffer = _Partition_Allocate_buffer( the_partition );
if ( the_buffer ) {
80033a4: 44 2b 00 0f be r1,r11,80033e0 <rtems_partition_get_buffer+0xb4>
the_partition->number_of_used_blocks += 1;
80033a8: 29 81 00 20 lw r1,(r12+32)
80033ac: 34 21 00 01 addi r1,r1,1
80033b0: 59 81 00 20 sw (r12+32),r1
_Thread_Enable_dispatch();
80033b4: f8 00 0a 14 calli 8005c04 <_Thread_Enable_dispatch>
*buffer = the_buffer;
80033b8: b9 60 18 00 mv r3,r11
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80033bc: b8 60 08 00 mv r1,r3
case OBJECTS_LOCAL:
the_buffer = _Partition_Allocate_buffer( the_partition );
if ( the_buffer ) {
the_partition->number_of_used_blocks += 1;
_Thread_Enable_dispatch();
*buffer = the_buffer;
80033c0: 59 ae 00 00 sw (r13+0),r14
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80033c4: 2b 9d 00 04 lw ra,(sp+4)
80033c8: 2b 8b 00 14 lw r11,(sp+20)
80033cc: 2b 8c 00 10 lw r12,(sp+16)
80033d0: 2b 8d 00 0c lw r13,(sp+12)
80033d4: 2b 8e 00 08 lw r14,(sp+8)
80033d8: 37 9c 00 18 addi sp,sp,24
80033dc: c3 a0 00 00 ret
the_partition->number_of_used_blocks += 1;
_Thread_Enable_dispatch();
*buffer = the_buffer;
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
80033e0: f8 00 0a 09 calli 8005c04 <_Thread_Enable_dispatch>
80033e4: 34 03 00 0d mvi r3,13
return RTEMS_UNSATISFIED;
80033e8: e3 ff ff e4 bi 8003378 <rtems_partition_get_buffer+0x4c>
08003440 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
8003440: 37 9c ff ec addi sp,sp,-20
8003444: 5b 8b 00 10 sw (sp+16),r11
8003448: 5b 8c 00 0c sw (sp+12),r12
800344c: 5b 8d 00 08 sw (sp+8),r13
8003450: 5b 9d 00 04 sw (sp+4),ra
8003454: b8 20 18 00 mv r3,r1
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
8003458: 78 01 08 02 mvhi r1,0x802
800345c: b8 40 60 00 mv r12,r2
8003460: 38 21 49 3c ori r1,r1,0x493c
8003464: b8 60 10 00 mv r2,r3
8003468: 37 83 00 14 addi r3,sp,20
800346c: f8 00 07 5c calli 80051dc <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
8003470: 2b 82 00 14 lw r2,(sp+20)
8003474: b8 20 58 00 mv r11,r1
8003478: 34 01 00 04 mvi r1,4
800347c: 44 40 00 07 be r2,r0,8003498 <rtems_partition_return_buffer+0x58><== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003480: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003484: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
8003488: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
800348c: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
8003490: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
8003494: c3 a0 00 00 ret <== NOT EXECUTED
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
8003498: 29 61 00 10 lw r1,(r11+16)
ending = _Addresses_Add_offset( starting, the_partition->length );
800349c: 29 63 00 14 lw r3,(r11+20)
80034a0: f1 81 20 00 cmpgeu r4,r12,r1
80034a4: b4 23 18 00 add r3,r1,r3
80034a8: f0 6c 18 00 cmpgeu r3,r3,r12
80034ac: a0 64 18 00 and r3,r3,r4
80034b0: 44 62 00 14 be r3,r2,8003500 <rtems_partition_return_buffer+0xc0><== NEVER TAKEN
return (
80034b4: 29 62 00 18 lw r2,(r11+24)
80034b8: c9 81 08 00 sub r1,r12,r1
80034bc: f8 00 6e cd calli 801eff0 <__umodsi3>
80034c0: b8 20 68 00 mv r13,r1
80034c4: 5c 20 00 0f bne r1,r0,8003500 <rtems_partition_return_buffer+0xc0><== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
80034c8: b9 80 10 00 mv r2,r12
80034cc: 35 61 00 24 addi r1,r11,36
80034d0: f8 00 03 0c calli 8004100 <_Chain_Append>
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
80034d4: 29 61 00 20 lw r1,(r11+32)
80034d8: 34 21 ff ff addi r1,r1,-1
80034dc: 59 61 00 20 sw (r11+32),r1
_Thread_Enable_dispatch();
80034e0: f8 00 09 c9 calli 8005c04 <_Thread_Enable_dispatch>
80034e4: b9 a0 08 00 mv r1,r13
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80034e8: 2b 9d 00 04 lw ra,(sp+4)
80034ec: 2b 8b 00 10 lw r11,(sp+16)
80034f0: 2b 8c 00 0c lw r12,(sp+12)
80034f4: 2b 8d 00 08 lw r13,(sp+8)
80034f8: 37 9c 00 14 addi sp,sp,20
80034fc: c3 a0 00 00 ret
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
8003500: f8 00 09 c1 calli 8005c04 <_Thread_Enable_dispatch> <== NOT EXECUTED
8003504: 34 01 00 09 mvi r1,9 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003508: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800350c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
8003510: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
8003514: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
8003518: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
800351c: c3 a0 00 00 ret <== NOT EXECUTED
0800a810 <rtems_pipe_initialize>:
/*
* Initialization of FIFO/pipe module.
*/
void rtems_pipe_initialize (void)
{
800a810: 37 9c ff f8 addi sp,sp,-8
800a814: 5b 8b 00 08 sw (sp+8),r11
800a818: 5b 9d 00 04 sw (sp+4),ra
if (!rtems_pipe_configured)
800a81c: 78 01 08 01 mvhi r1,0x801
800a820: 38 21 e6 4c ori r1,r1,0xe64c
800a824: 40 21 00 00 lbu r1,(r1+0)
800a828: 44 20 00 05 be r1,r0,800a83c <rtems_pipe_initialize+0x2c> <== ALWAYS TAKEN
return;
if (rtems_pipe_semaphore)
800a82c: 78 05 08 01 mvhi r5,0x801 <== NOT EXECUTED
800a830: 38 a5 e6 a8 ori r5,r5,0xe6a8 <== NOT EXECUTED
800a834: 28 ab 00 00 lw r11,(r5+0) <== NOT EXECUTED
800a838: 45 60 00 05 be r11,r0,800a84c <rtems_pipe_initialize+0x3c> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
rtems_pipe_no = now;
}
800a83c: 2b 9d 00 04 lw ra,(sp+4)
800a840: 2b 8b 00 08 lw r11,(sp+8)
800a844: 37 9c 00 08 addi sp,sp,8
800a848: c3 a0 00 00 ret
if (rtems_pipe_semaphore)
return;
rtems_status_code sc;
sc = rtems_semaphore_create(
800a84c: 78 01 50 49 mvhi r1,0x5049 <== NOT EXECUTED
800a850: 38 21 50 45 ori r1,r1,0x5045 <== NOT EXECUTED
800a854: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
800a858: 34 03 00 54 mvi r3,84 <== NOT EXECUTED
800a85c: b9 60 20 00 mv r4,r11 <== NOT EXECUTED
800a860: fb ff de 58 calli 80021c0 <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)
800a864: 5c 2b 00 09 bne r1,r11,800a888 <rtems_pipe_initialize+0x78><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
800a868: f8 00 05 81 calli 800be6c <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
rtems_pipe_no = now;
800a86c: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
800a870: 38 42 e6 ae ori r2,r2,0xe6ae <== NOT EXECUTED
800a874: 0c 41 00 00 sh (r2+0),r1 <== NOT EXECUTED
}
800a878: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800a87c: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
800a880: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
800a884: c3 a0 00 00 ret <== NOT EXECUTED
sc = rtems_semaphore_create(
rtems_build_name ('P', 'I', 'P', 'E'), 1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY, &rtems_pipe_semaphore);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
800a888: fb ff e0 3e calli 8002980 <rtems_fatal_error_occurred> <== NOT EXECUTED
08002ae4 <rtems_port_create>:
void *internal_start,
void *external_start,
uint32_t length,
rtems_id *id
)
{
8002ae4: 37 9c ff d8 addi sp,sp,-40
8002ae8: 5b 8b 00 18 sw (sp+24),r11
8002aec: 5b 8c 00 14 sw (sp+20),r12
8002af0: 5b 8d 00 10 sw (sp+16),r13
8002af4: 5b 8e 00 0c sw (sp+12),r14
8002af8: 5b 8f 00 08 sw (sp+8),r15
8002afc: 5b 9d 00 04 sw (sp+4),ra
8002b00: b8 20 58 00 mv r11,r1
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
8002b04: 34 01 00 03 mvi r1,3
8002b08: 45 60 00 06 be r11,r0,8002b20 <rtems_port_create+0x3c> <== NEVER TAKEN
return RTEMS_INVALID_NAME;
if ( !id )
8002b0c: 44 a0 00 04 be r5,r0,8002b1c <rtems_port_create+0x38> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( internal_start ) ||
8002b10: b8 62 68 00 or r13,r3,r2
8002b14: 21 ad 00 07 andi r13,r13,0x7
8002b18: 45 a0 00 0a be r13,r0,8002b40 <rtems_port_create+0x5c> <== ALWAYS TAKEN
(Objects_Name) name
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
8002b1c: 34 01 00 09 mvi r1,9 <== NOT EXECUTED
}
8002b20: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002b24: 2b 8b 00 18 lw r11,(sp+24) <== NOT EXECUTED
8002b28: 2b 8c 00 14 lw r12,(sp+20) <== NOT EXECUTED
8002b2c: 2b 8d 00 10 lw r13,(sp+16) <== NOT EXECUTED
8002b30: 2b 8e 00 0c lw r14,(sp+12) <== NOT EXECUTED
8002b34: 2b 8f 00 08 lw r15,(sp+8) <== NOT EXECUTED
8002b38: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED
8002b3c: c3 a0 00 00 ret <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8002b40: 78 01 08 02 mvhi r1,0x802
8002b44: 38 21 29 3c ori r1,r1,0x293c
8002b48: 28 26 00 00 lw r6,(r1+0)
8002b4c: 34 c6 00 01 addi r6,r6,1
8002b50: 58 26 00 00 sw (r1+0),r6
* of free port control blocks.
*/
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control
*_Dual_ported_memory_Allocate ( void )
{
return (Dual_ported_memory_Control *)
8002b54: 78 01 08 02 mvhi r1,0x802
8002b58: 38 21 28 04 ori r1,r1,0x2804
8002b5c: 5b 82 00 28 sw (sp+40),r2
8002b60: 5b 83 00 24 sw (sp+36),r3
8002b64: 5b 84 00 20 sw (sp+32),r4
8002b68: 5b 85 00 1c sw (sp+28),r5
8002b6c: f8 00 06 47 calli 8004488 <_Objects_Allocate>
8002b70: b8 20 60 00 mv r12,r1
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
8002b74: 2b 82 00 28 lw r2,(sp+40)
8002b78: 2b 83 00 24 lw r3,(sp+36)
8002b7c: 2b 84 00 20 lw r4,(sp+32)
8002b80: 2b 85 00 1c lw r5,(sp+28)
8002b84: 44 2d 00 1c be r1,r13,8002bf4 <rtems_port_create+0x110> <== NEVER TAKEN
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8002b88: 28 2e 00 08 lw r14,(r1+8)
8002b8c: 78 01 08 02 mvhi r1,0x802
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
the_port->external_base = external_start;
the_port->length = length - 1;
8002b90: 34 84 ff ff addi r4,r4,-1
8002b94: 38 21 28 04 ori r1,r1,0x2804
8002b98: 28 2f 00 1c lw r15,(r1+28)
if ( !the_port ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
8002b9c: 59 82 00 10 sw (r12+16),r2
the_port->external_base = external_start;
8002ba0: 59 83 00 14 sw (r12+20),r3
the_port->length = length - 1;
8002ba4: 59 84 00 18 sw (r12+24),r4
8002ba8: 34 02 00 02 mvi r2,2
8002bac: 21 c1 ff ff andi r1,r14,0xffff
8002bb0: 5b 85 00 1c sw (sp+28),r5
8002bb4: fb ff f7 19 calli 8000818 <__ashlsi3>
&_Dual_ported_memory_Information,
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
8002bb8: 2b 85 00 1c lw r5,(sp+28)
8002bbc: b5 e1 08 00 add r1,r15,r1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
8002bc0: 59 8b 00 0c sw (r12+12),r11
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8002bc4: 58 2c 00 00 sw (r1+0),r12
8002bc8: 58 ae 00 00 sw (r5+0),r14
_Thread_Enable_dispatch();
8002bcc: f8 00 0a 3d calli 80054c0 <_Thread_Enable_dispatch>
8002bd0: b9 a0 08 00 mv r1,r13
return RTEMS_SUCCESSFUL;
}
8002bd4: 2b 9d 00 04 lw ra,(sp+4)
8002bd8: 2b 8b 00 18 lw r11,(sp+24)
8002bdc: 2b 8c 00 14 lw r12,(sp+20)
8002be0: 2b 8d 00 10 lw r13,(sp+16)
8002be4: 2b 8e 00 0c lw r14,(sp+12)
8002be8: 2b 8f 00 08 lw r15,(sp+8)
8002bec: 37 9c 00 28 addi sp,sp,40
8002bf0: c3 a0 00 00 ret
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
_Thread_Enable_dispatch();
8002bf4: f8 00 0a 33 calli 80054c0 <_Thread_Enable_dispatch> <== NOT EXECUTED
8002bf8: 34 01 00 05 mvi r1,5 <== NOT EXECUTED
return RTEMS_TOO_MANY;
8002bfc: e3 ff ff c9 bi 8002b20 <rtems_port_create+0x3c> <== NOT EXECUTED
08002c00 <rtems_port_delete>:
*/
rtems_status_code rtems_port_delete(
rtems_id id
)
{
8002c00: 37 9c ff f0 addi sp,sp,-16
8002c04: 5b 8b 00 0c sw (sp+12),r11
8002c08: 5b 8c 00 08 sw (sp+8),r12
8002c0c: 5b 9d 00 04 sw (sp+4),ra
8002c10: b8 20 10 00 mv r2,r1
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Dual_ported_memory_Control *)
8002c14: 78 01 08 02 mvhi r1,0x802
8002c18: 38 21 28 04 ori r1,r1,0x2804
8002c1c: 37 83 00 10 addi r3,sp,16
8002c20: f8 00 07 9e calli 8004a98 <_Objects_Get>
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
8002c24: 2b 8b 00 10 lw r11,(sp+16)
8002c28: b8 20 60 00 mv r12,r1
8002c2c: 34 01 00 04 mvi r1,4
8002c30: 5d 60 00 0b bne r11,r0,8002c5c <rtems_port_delete+0x5c> <== NEVER TAKEN
case OBJECTS_LOCAL:
_Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
8002c34: 78 01 08 02 mvhi r1,0x802
8002c38: 38 21 28 04 ori r1,r1,0x2804
8002c3c: b9 80 10 00 mv r2,r12
8002c40: f8 00 06 4c calli 8004570 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free (
Dual_ported_memory_Control *the_port
)
{
_Objects_Free( &_Dual_ported_memory_Information, &the_port->Object );
8002c44: 78 01 08 02 mvhi r1,0x802
8002c48: 38 21 28 04 ori r1,r1,0x2804
8002c4c: b9 80 10 00 mv r2,r12
8002c50: f8 00 07 33 calli 800491c <_Objects_Free>
_Dual_ported_memory_Free( the_port );
_Thread_Enable_dispatch();
8002c54: f8 00 0a 1b calli 80054c0 <_Thread_Enable_dispatch>
8002c58: b9 60 08 00 mv r1,r11
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8002c5c: 2b 9d 00 04 lw ra,(sp+4)
8002c60: 2b 8b 00 0c lw r11,(sp+12)
8002c64: 2b 8c 00 08 lw r12,(sp+8)
8002c68: 37 9c 00 10 addi sp,sp,16
8002c6c: c3 a0 00 00 ret
08002c70 <rtems_port_external_to_internal>:
rtems_status_code rtems_port_external_to_internal(
rtems_id id,
void *external,
void **internal
)
{
8002c70: 37 9c ff f0 addi sp,sp,-16
8002c74: 5b 8b 00 0c sw (sp+12),r11
8002c78: 5b 8c 00 08 sw (sp+8),r12
8002c7c: 5b 9d 00 04 sw (sp+4),ra
8002c80: b8 60 58 00 mv r11,r3
8002c84: b8 40 60 00 mv r12,r2
8002c88: b8 20 18 00 mv r3,r1
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
8002c8c: 34 04 00 09 mvi r4,9
8002c90: 45 60 00 09 be r11,r0,8002cb4 <rtems_port_external_to_internal+0x44><== NEVER TAKEN
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Dual_ported_memory_Control *)
8002c94: 78 01 08 02 mvhi r1,0x802
8002c98: b8 60 10 00 mv r2,r3
8002c9c: 38 21 28 04 ori r1,r1,0x2804
8002ca0: 37 83 00 10 addi r3,sp,16
8002ca4: f8 00 07 7d calli 8004a98 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
8002ca8: 2b 82 00 10 lw r2,(sp+16)
8002cac: 34 04 00 04 mvi r4,4
8002cb0: 44 40 00 07 be r2,r0,8002ccc <rtems_port_external_to_internal+0x5c><== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8002cb4: b8 80 08 00 mv r1,r4 <== NOT EXECUTED
8002cb8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002cbc: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8002cc0: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8002cc4: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
8002cc8: c3 a0 00 00 ret <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
8002ccc: 28 22 00 14 lw r2,(r1+20)
if ( ending > the_port->length )
8002cd0: 28 23 00 18 lw r3,(r1+24)
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
8002cd4: c9 82 10 00 sub r2,r12,r2
if ( ending > the_port->length )
8002cd8: 50 62 00 03 bgeu r3,r2,8002ce4 <rtems_port_external_to_internal+0x74>
*internal = external;
8002cdc: 59 6c 00 00 sw (r11+0),r12
8002ce0: e0 00 00 04 bi 8002cf0 <rtems_port_external_to_internal+0x80>
else
*internal = _Addresses_Add_offset( the_port->internal_base,
8002ce4: 28 21 00 10 lw r1,(r1+16)
8002ce8: b4 22 10 00 add r2,r1,r2
8002cec: 59 62 00 00 sw (r11+0),r2
ending );
_Thread_Enable_dispatch();
8002cf0: f8 00 09 f4 calli 80054c0 <_Thread_Enable_dispatch>
8002cf4: 34 04 00 00 mvi r4,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8002cf8: b8 80 08 00 mv r1,r4
8002cfc: 2b 9d 00 04 lw ra,(sp+4)
8002d00: 2b 8b 00 0c lw r11,(sp+12)
8002d04: 2b 8c 00 08 lw r12,(sp+8)
8002d08: 37 9c 00 10 addi sp,sp,16
8002d0c: c3 a0 00 00 ret
08002d60 <rtems_port_internal_to_external>:
rtems_status_code rtems_port_internal_to_external(
rtems_id id,
void *internal,
void **external
)
{
8002d60: 37 9c ff f0 addi sp,sp,-16
8002d64: 5b 8b 00 0c sw (sp+12),r11
8002d68: 5b 8c 00 08 sw (sp+8),r12
8002d6c: 5b 9d 00 04 sw (sp+4),ra
8002d70: b8 60 58 00 mv r11,r3
8002d74: b8 40 60 00 mv r12,r2
8002d78: b8 20 18 00 mv r3,r1
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
8002d7c: 34 04 00 09 mvi r4,9
8002d80: 45 60 00 09 be r11,r0,8002da4 <rtems_port_internal_to_external+0x44><== NEVER TAKEN
8002d84: 78 01 08 02 mvhi r1,0x802
8002d88: b8 60 10 00 mv r2,r3
8002d8c: 38 21 28 04 ori r1,r1,0x2804
8002d90: 37 83 00 10 addi r3,sp,16
8002d94: f8 00 07 41 calli 8004a98 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
8002d98: 2b 82 00 10 lw r2,(sp+16)
8002d9c: 34 04 00 04 mvi r4,4
8002da0: 44 40 00 07 be r2,r0,8002dbc <rtems_port_internal_to_external+0x5c><== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8002da4: b8 80 08 00 mv r1,r4 <== NOT EXECUTED
8002da8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002dac: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8002db0: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8002db4: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
8002db8: c3 a0 00 00 ret <== NOT EXECUTED
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
8002dbc: 28 22 00 10 lw r2,(r1+16)
if ( ending > the_port->length )
8002dc0: 28 23 00 18 lw r3,(r1+24)
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
8002dc4: c9 82 10 00 sub r2,r12,r2
if ( ending > the_port->length )
8002dc8: 50 62 00 03 bgeu r3,r2,8002dd4 <rtems_port_internal_to_external+0x74>
*external = internal;
8002dcc: 59 6c 00 00 sw (r11+0),r12
8002dd0: e0 00 00 04 bi 8002de0 <rtems_port_internal_to_external+0x80>
else
*external = _Addresses_Add_offset( the_port->external_base,
8002dd4: 28 21 00 14 lw r1,(r1+20)
8002dd8: b4 22 10 00 add r2,r1,r2
8002ddc: 59 62 00 00 sw (r11+0),r2
ending );
_Thread_Enable_dispatch();
8002de0: f8 00 09 b8 calli 80054c0 <_Thread_Enable_dispatch>
8002de4: 34 04 00 00 mvi r4,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8002de8: b8 80 08 00 mv r1,r4
8002dec: 2b 9d 00 04 lw ra,(sp+4)
8002df0: 2b 8b 00 0c lw r11,(sp+12)
8002df4: 2b 8c 00 08 lw r12,(sp+8)
8002df8: 37 9c 00 10 addi sp,sp,16
8002dfc: c3 a0 00 00 ret
08002cb8 <rtems_rate_monotonic_cancel>:
*/
rtems_status_code rtems_rate_monotonic_cancel(
rtems_id id
)
{
8002cb8: 37 9c ff f0 addi sp,sp,-16
8002cbc: 5b 8b 00 0c sw (sp+12),r11
8002cc0: 5b 8c 00 08 sw (sp+8),r12
8002cc4: 5b 9d 00 04 sw (sp+4),ra
8002cc8: b8 20 10 00 mv r2,r1
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
8002ccc: 78 01 08 02 mvhi r1,0x802
8002cd0: 38 21 38 2c ori r1,r1,0x382c
8002cd4: 37 83 00 10 addi r3,sp,16
8002cd8: f8 00 07 ab calli 8004b84 <_Objects_Get>
Rate_monotonic_Control *the_period;
Objects_Locations location;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
8002cdc: 2b 8c 00 10 lw r12,(sp+16)
8002ce0: b8 20 58 00 mv r11,r1
8002ce4: 34 01 00 04 mvi r1,4
8002ce8: 45 80 00 06 be r12,r0,8002d00 <rtems_rate_monotonic_cancel+0x48><== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8002cec: 2b 9d 00 04 lw ra,(sp+4)
8002cf0: 2b 8b 00 0c lw r11,(sp+12)
8002cf4: 2b 8c 00 08 lw r12,(sp+8)
8002cf8: 37 9c 00 10 addi sp,sp,16
8002cfc: c3 a0 00 00 ret
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
8002d00: 78 01 08 02 mvhi r1,0x802
8002d04: 38 21 39 e0 ori r1,r1,0x39e0
8002d08: 28 21 00 00 lw r1,(r1+0)
8002d0c: 29 62 00 40 lw r2,(r11+64)
8002d10: 44 41 00 08 be r2,r1,8002d30 <rtems_rate_monotonic_cancel+0x78><== ALWAYS TAKEN
_Thread_Enable_dispatch();
8002d14: f8 00 09 69 calli 80052b8 <_Thread_Enable_dispatch> <== NOT EXECUTED
8002d18: 34 01 00 17 mvi r1,23 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8002d1c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002d20: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8002d24: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8002d28: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
8002d2c: c3 a0 00 00 ret <== NOT EXECUTED
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
(void) _Watchdog_Remove( &the_period->Timer );
8002d30: 35 61 00 10 addi r1,r11,16
8002d34: f8 00 0d 6a calli 80062dc <_Watchdog_Remove>
the_period->state = RATE_MONOTONIC_INACTIVE;
8002d38: 59 6c 00 38 sw (r11+56),r12
_Thread_Enable_dispatch();
8002d3c: f8 00 09 5f calli 80052b8 <_Thread_Enable_dispatch>
8002d40: b9 80 08 00 mv r1,r12
return RTEMS_SUCCESSFUL;
8002d44: e3 ff ff ea bi 8002cec <rtems_rate_monotonic_cancel+0x34>
08003540 <rtems_rate_monotonic_create>:
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
rtems_id *id
)
{
8003540: 37 9c ff e4 addi sp,sp,-28
8003544: 5b 8b 00 1c sw (sp+28),r11
8003548: 5b 8c 00 18 sw (sp+24),r12
800354c: 5b 8d 00 14 sw (sp+20),r13
8003550: 5b 8e 00 10 sw (sp+16),r14
8003554: 5b 8f 00 0c sw (sp+12),r15
8003558: 5b 90 00 08 sw (sp+8),r16
800355c: 5b 9d 00 04 sw (sp+4),ra
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
8003560: 34 0c 00 00 mvi r12,0
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
rtems_id *id
)
{
8003564: b8 20 68 00 mv r13,r1
8003568: b8 40 70 00 mv r14,r2
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
800356c: 34 01 00 03 mvi r1,3
8003570: 45 ac 00 34 be r13,r12,8003640 <rtems_rate_monotonic_create+0x100><== NEVER TAKEN
return RTEMS_INVALID_NAME;
if ( !id )
8003574: 34 01 00 09 mvi r1,9
8003578: 44 4c 00 32 be r2,r12,8003640 <rtems_rate_monotonic_create+0x100><== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
800357c: 78 03 08 02 mvhi r3,0x802
8003580: 38 63 49 cc ori r3,r3,0x49cc
8003584: 28 61 00 00 lw r1,(r3+0)
8003588: 34 21 00 01 addi r1,r1,1
800358c: 58 61 00 00 sw (r3+0),r1
* This function allocates a period control block from
* the inactive chain of free period control blocks.
*/
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void )
{
return (Rate_monotonic_Control *)
8003590: 78 01 08 02 mvhi r1,0x802
8003594: 38 21 48 94 ori r1,r1,0x4894
8003598: f8 00 08 e7 calli 8005934 <_Objects_Allocate>
800359c: b8 20 58 00 mv r11,r1
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
80035a0: 44 2c 00 31 be r1,r12,8003664 <rtems_rate_monotonic_create+0x124><== NEVER TAKEN
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
80035a4: 78 01 08 02 mvhi r1,0x802
80035a8: 38 21 4a 88 ori r1,r1,0x4a88
80035ac: 28 21 00 00 lw r1,(r1+0)
the_period->state = RATE_MONOTONIC_INACTIVE;
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
80035b0: 35 63 00 54 addi r3,r11,84
80035b4: 59 6c 00 54 sw (r11+84),r12
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
80035b8: 29 6f 00 08 lw r15,(r11+8)
if ( !the_period ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
80035bc: 59 61 00 40 sw (r11+64),r1
80035c0: 78 01 08 02 mvhi r1,0x802
the_period->state = RATE_MONOTONIC_INACTIVE;
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
80035c4: 58 6c 00 34 sw (r3+52),r12
80035c8: 58 6c 00 04 sw (r3+4),r12
80035cc: 58 6c 00 10 sw (r3+16),r12
80035d0: 58 6c 00 14 sw (r3+20),r12
80035d4: 58 6c 00 18 sw (r3+24),r12
80035d8: 58 6c 00 1c sw (r3+28),r12
80035dc: 58 6c 00 28 sw (r3+40),r12
80035e0: 58 6c 00 2c sw (r3+44),r12
80035e4: 58 6c 00 30 sw (r3+48),r12
80035e8: 38 21 48 94 ori r1,r1,0x4894
80035ec: 78 03 7f ff mvhi r3,0x7fff
80035f0: 38 63 ff ff ori r3,r3,0xffff
80035f4: 28 30 00 1c lw r16,(r1+28)
80035f8: 59 63 00 78 sw (r11+120),r3
80035fc: 59 63 00 5c sw (r11+92),r3
8003600: 59 63 00 60 sw (r11+96),r3
8003604: 59 63 00 74 sw (r11+116),r3
8003608: 34 02 00 02 mvi r2,2
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
the_period->state = RATE_MONOTONIC_INACTIVE;
800360c: 59 6c 00 38 sw (r11+56),r12
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
8003610: 59 6c 00 18 sw (r11+24),r12
the_watchdog->routine = routine;
8003614: 59 6c 00 2c sw (r11+44),r12
the_watchdog->id = id;
8003618: 59 6c 00 30 sw (r11+48),r12
the_watchdog->user_data = user_data;
800361c: 59 6c 00 34 sw (r11+52),r12
8003620: 21 e1 ff ff andi r1,r15,0xffff
8003624: fb ff f6 fe calli 800121c <__ashlsi3>
8003628: b6 01 08 00 add r1,r16,r1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
800362c: 59 6d 00 0c sw (r11+12),r13
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8003630: 58 2b 00 00 sw (r1+0),r11
&_Rate_monotonic_Information,
&the_period->Object,
(Objects_Name) name
);
*id = the_period->Object.id;
8003634: 59 cf 00 00 sw (r14+0),r15
_Thread_Enable_dispatch();
8003638: f8 00 0d 07 calli 8006a54 <_Thread_Enable_dispatch>
800363c: b9 80 08 00 mv r1,r12
return RTEMS_SUCCESSFUL;
}
8003640: 2b 9d 00 04 lw ra,(sp+4)
8003644: 2b 8b 00 1c lw r11,(sp+28)
8003648: 2b 8c 00 18 lw r12,(sp+24)
800364c: 2b 8d 00 14 lw r13,(sp+20)
8003650: 2b 8e 00 10 lw r14,(sp+16)
8003654: 2b 8f 00 0c lw r15,(sp+12)
8003658: 2b 90 00 08 lw r16,(sp+8)
800365c: 37 9c 00 1c addi sp,sp,28
8003660: c3 a0 00 00 ret
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
_Thread_Enable_dispatch();
8003664: f8 00 0c fc calli 8006a54 <_Thread_Enable_dispatch> <== NOT EXECUTED
8003668: 34 01 00 05 mvi r1,5 <== NOT EXECUTED
return RTEMS_TOO_MANY;
800366c: e3 ff ff f5 bi 8003640 <rtems_rate_monotonic_create+0x100> <== NOT EXECUTED
08002e78 <rtems_rate_monotonic_delete>:
*/
rtems_status_code rtems_rate_monotonic_delete(
rtems_id id
)
{
8002e78: 37 9c ff f0 addi sp,sp,-16
8002e7c: 5b 8b 00 0c sw (sp+12),r11
8002e80: 5b 8c 00 08 sw (sp+8),r12
8002e84: 5b 9d 00 04 sw (sp+4),ra
8002e88: b8 20 10 00 mv r2,r1
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
8002e8c: 78 01 08 02 mvhi r1,0x802
8002e90: 38 21 38 2c ori r1,r1,0x382c
8002e94: 37 83 00 10 addi r3,sp,16
8002e98: f8 00 07 3b calli 8004b84 <_Objects_Get>
Rate_monotonic_Control *the_period;
Objects_Locations location;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
8002e9c: 2b 8b 00 10 lw r11,(sp+16)
8002ea0: b8 20 60 00 mv r12,r1
8002ea4: 34 01 00 04 mvi r1,4
8002ea8: 5d 60 00 0e bne r11,r0,8002ee0 <rtems_rate_monotonic_delete+0x68><== NEVER TAKEN
case OBJECTS_LOCAL:
_Objects_Close( &_Rate_monotonic_Information, &the_period->Object );
8002eac: 78 01 08 02 mvhi r1,0x802
8002eb0: b9 80 10 00 mv r2,r12
8002eb4: 38 21 38 2c ori r1,r1,0x382c
8002eb8: f8 00 06 1d calli 800472c <_Objects_Close>
(void) _Watchdog_Remove( &the_period->Timer );
8002ebc: 35 81 00 10 addi r1,r12,16
8002ec0: f8 00 0d 07 calli 80062dc <_Watchdog_Remove>
*/
RTEMS_INLINE_ROUTINE void _Rate_monotonic_Free (
Rate_monotonic_Control *the_period
)
{
_Objects_Free( &_Rate_monotonic_Information, &the_period->Object );
8002ec4: 78 01 08 02 mvhi r1,0x802
8002ec8: 38 21 38 2c ori r1,r1,0x382c
8002ecc: b9 80 10 00 mv r2,r12
the_period->state = RATE_MONOTONIC_INACTIVE;
8002ed0: 59 8b 00 38 sw (r12+56),r11
8002ed4: f8 00 07 01 calli 8004ad8 <_Objects_Free>
_Rate_monotonic_Free( the_period );
_Thread_Enable_dispatch();
8002ed8: f8 00 08 f8 calli 80052b8 <_Thread_Enable_dispatch>
8002edc: b9 60 08 00 mv r1,r11
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8002ee0: 2b 9d 00 04 lw ra,(sp+4)
8002ee4: 2b 8b 00 0c lw r11,(sp+12)
8002ee8: 2b 8c 00 08 lw r12,(sp+8)
8002eec: 37 9c 00 10 addi sp,sp,16
8002ef0: c3 a0 00 00 ret
0800b324 <rtems_rate_monotonic_get_statistics>:
rtems_status_code rtems_rate_monotonic_get_statistics(
rtems_id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
800b324: 37 9c ff f0 addi sp,sp,-16
800b328: 5b 8b 00 0c sw (sp+12),r11
800b32c: 5b 8c 00 08 sw (sp+8),r12
800b330: 5b 9d 00 04 sw (sp+4),ra
800b334: b8 40 58 00 mv r11,r2
800b338: b8 20 10 00 mv r2,r1
Objects_Locations location;
Rate_monotonic_Control *the_period;
rtems_rate_monotonic_period_statistics *dst;
Rate_monotonic_Statistics *src;
if ( !statistics )
800b33c: 34 01 00 09 mvi r1,9
800b340: 45 60 00 27 be r11,r0,800b3dc <rtems_rate_monotonic_get_statistics+0xb8><== NEVER TAKEN
800b344: 78 01 08 02 mvhi r1,0x802
800b348: 38 21 48 94 ori r1,r1,0x4894
800b34c: 37 83 00 10 addi r3,sp,16
800b350: fb ff eb 37 calli 800602c <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
800b354: 2b 8c 00 10 lw r12,(sp+16)
800b358: b8 20 10 00 mv r2,r1
800b35c: 34 01 00 04 mvi r1,4
800b360: 5d 80 00 1f bne r12,r0,800b3dc <rtems_rate_monotonic_get_statistics+0xb8>
case OBJECTS_LOCAL:
dst = statistics;
src = &the_period->Statistics;
dst->count = src->count;
800b364: 28 41 00 54 lw r1,(r2+84)
800b368: 59 61 00 00 sw (r11+0),r1
dst->missed_count = src->missed_count;
800b36c: 28 41 00 58 lw r1,(r2+88)
800b370: 59 61 00 04 sw (r11+4),r1
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time );
800b374: 28 41 00 5c lw r1,(r2+92)
800b378: 59 61 00 08 sw (r11+8),r1
800b37c: 28 41 00 60 lw r1,(r2+96)
800b380: 59 61 00 0c sw (r11+12),r1
_Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time );
800b384: 28 41 00 64 lw r1,(r2+100)
800b388: 59 61 00 10 sw (r11+16),r1
800b38c: 28 41 00 68 lw r1,(r2+104)
800b390: 59 61 00 14 sw (r11+20),r1
_Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time );
800b394: 28 41 00 6c lw r1,(r2+108)
800b398: 59 61 00 18 sw (r11+24),r1
800b39c: 28 41 00 70 lw r1,(r2+112)
800b3a0: 59 61 00 1c sw (r11+28),r1
_Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time );
800b3a4: 28 41 00 74 lw r1,(r2+116)
800b3a8: 59 61 00 20 sw (r11+32),r1
800b3ac: 28 41 00 78 lw r1,(r2+120)
800b3b0: 59 61 00 24 sw (r11+36),r1
_Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time );
800b3b4: 28 41 00 7c lw r1,(r2+124)
800b3b8: 59 61 00 28 sw (r11+40),r1
800b3bc: 28 41 00 80 lw r1,(r2+128)
800b3c0: 59 61 00 2c sw (r11+44),r1
_Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time );
800b3c4: 28 41 00 84 lw r1,(r2+132)
800b3c8: 59 61 00 30 sw (r11+48),r1
800b3cc: 28 42 00 88 lw r2,(r2+136)
800b3d0: 59 62 00 34 sw (r11+52),r2
dst->min_wall_time = src->min_wall_time;
dst->max_wall_time = src->max_wall_time;
dst->total_wall_time = src->total_wall_time;
#endif
_Thread_Enable_dispatch();
800b3d4: fb ff ed a0 calli 8006a54 <_Thread_Enable_dispatch>
800b3d8: b9 80 08 00 mv r1,r12
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
800b3dc: 2b 9d 00 04 lw ra,(sp+4)
800b3e0: 2b 8b 00 0c lw r11,(sp+12)
800b3e4: 2b 8c 00 08 lw r12,(sp+8)
800b3e8: 37 9c 00 10 addi sp,sp,16
800b3ec: c3 a0 00 00 ret
0800b3f0 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
800b3f0: 37 9c ff e4 addi sp,sp,-28
800b3f4: 5b 8b 00 08 sw (sp+8),r11
800b3f8: 5b 9d 00 04 sw (sp+4),ra
800b3fc: b8 40 58 00 mv r11,r2
Objects_Locations location;
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
800b400: 34 03 00 09 mvi r3,9
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
800b404: b8 20 10 00 mv r2,r1
Objects_Locations location;
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
800b408: 45 60 00 08 be r11,r0,800b428 <rtems_rate_monotonic_get_status+0x38><== NEVER TAKEN
800b40c: 78 01 08 02 mvhi r1,0x802
800b410: 37 83 00 1c addi r3,sp,28
800b414: 38 21 48 94 ori r1,r1,0x4894
800b418: fb ff eb 05 calli 800602c <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
800b41c: 2b 84 00 1c lw r4,(sp+28)
800b420: 34 03 00 04 mvi r3,4
800b424: 44 80 00 06 be r4,r0,800b43c <rtems_rate_monotonic_get_status+0x4c><== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
800b428: b8 60 08 00 mv r1,r3
800b42c: 2b 9d 00 04 lw ra,(sp+4)
800b430: 2b 8b 00 08 lw r11,(sp+8)
800b434: 37 9c 00 1c addi sp,sp,28
800b438: c3 a0 00 00 ret
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
800b43c: 28 23 00 40 lw r3,(r1+64)
status->state = the_period->state;
800b440: 28 22 00 38 lw r2,(r1+56)
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
800b444: 28 63 00 08 lw r3,(r3+8)
status->state = the_period->state;
800b448: 59 62 00 04 sw (r11+4),r2
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
800b44c: 59 63 00 00 sw (r11+0),r3
status->state = the_period->state;
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
800b450: 5c 44 00 0c bne r2,r4,800b480 <rtems_rate_monotonic_get_status+0x90>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timespec_Set_to_zero( &status->since_last_period );
_Timespec_Set_to_zero( &status->executed_since_last_period );
800b454: 59 62 00 14 sw (r11+20),r2
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timespec_Set_to_zero( &status->since_last_period );
800b458: 59 62 00 08 sw (r11+8),r2
800b45c: 59 62 00 0c sw (r11+12),r2
_Timespec_Set_to_zero( &status->executed_since_last_period );
800b460: 59 62 00 10 sw (r11+16),r2
status->since_last_period = since_last_period;
status->executed_since_last_period = executed;
#endif
}
_Thread_Enable_dispatch();
800b464: fb ff ed 7c calli 8006a54 <_Thread_Enable_dispatch>
800b468: 34 03 00 00 mvi r3,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
800b46c: b8 60 08 00 mv r1,r3
800b470: 2b 9d 00 04 lw ra,(sp+4)
800b474: 2b 8b 00 08 lw r11,(sp+8)
800b478: 37 9c 00 1c addi sp,sp,28
800b47c: c3 a0 00 00 ret
/*
* Grab the current status.
*/
valid_status =
_Rate_monotonic_Get_status(
800b480: 37 82 00 0c addi r2,sp,12
800b484: 37 83 00 14 addi r3,sp,20
800b488: fb ff e0 ba calli 8003770 <_Rate_monotonic_Get_status>
the_period, &since_last_period, &executed
);
if (!valid_status) {
800b48c: 44 20 00 0a be r1,r0,800b4b4 <rtems_rate_monotonic_get_status+0xc4>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec(
&since_last_period, &status->since_last_period
);
_Timestamp_To_timespec(
800b490: 2b 81 00 18 lw r1,(sp+24)
800b494: 59 61 00 14 sw (r11+20),r1
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec(
800b498: 2b 81 00 0c lw r1,(sp+12)
800b49c: 59 61 00 08 sw (r11+8),r1
800b4a0: 2b 81 00 10 lw r1,(sp+16)
800b4a4: 59 61 00 0c sw (r11+12),r1
&since_last_period, &status->since_last_period
);
_Timestamp_To_timespec(
800b4a8: 2b 81 00 14 lw r1,(sp+20)
800b4ac: 59 61 00 10 sw (r11+16),r1
800b4b0: e3 ff ff ed bi 800b464 <rtems_rate_monotonic_get_status+0x74>
valid_status =
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
_Thread_Enable_dispatch();
800b4b4: fb ff ed 68 calli 8006a54 <_Thread_Enable_dispatch>
800b4b8: 34 03 00 0b mvi r3,11
return RTEMS_NOT_DEFINED;
800b4bc: e3 ff ff db bi 800b428 <rtems_rate_monotonic_get_status+0x38>
08003980 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
8003980: 37 9c ff e0 addi sp,sp,-32
8003984: 5b 8b 00 18 sw (sp+24),r11
8003988: 5b 8c 00 14 sw (sp+20),r12
800398c: 5b 8d 00 10 sw (sp+16),r13
8003990: 5b 8e 00 0c sw (sp+12),r14
8003994: 5b 8f 00 08 sw (sp+8),r15
8003998: 5b 9d 00 04 sw (sp+4),ra
800399c: 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 *)
80039a0: 78 01 08 02 mvhi r1,0x802
80039a4: b8 40 68 00 mv r13,r2
80039a8: 38 21 48 94 ori r1,r1,0x4894
80039ac: b9 c0 10 00 mv r2,r14
80039b0: 37 83 00 20 addi r3,sp,32
80039b4: f8 00 09 9e calli 800602c <_Objects_Get>
80039b8: 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 ) {
80039bc: 2b 81 00 20 lw r1,(sp+32)
80039c0: 44 20 00 0a be r1,r0,80039e8 <rtems_rate_monotonic_period+0x68><== ALWAYS TAKEN
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
80039c4: 34 01 00 04 mvi r1,4 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80039c8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80039cc: 2b 8b 00 18 lw r11,(sp+24) <== NOT EXECUTED
80039d0: 2b 8c 00 14 lw r12,(sp+20) <== NOT EXECUTED
80039d4: 2b 8d 00 10 lw r13,(sp+16) <== NOT EXECUTED
80039d8: 2b 8e 00 0c lw r14,(sp+12) <== NOT EXECUTED
80039dc: 2b 8f 00 08 lw r15,(sp+8) <== NOT EXECUTED
80039e0: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED
80039e4: c3 a0 00 00 ret <== NOT EXECUTED
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
80039e8: 78 0c 08 02 mvhi r12,0x802
80039ec: 39 8c 4a 88 ori r12,r12,0x4a88
80039f0: 29 62 00 40 lw r2,(r11+64)
80039f4: 29 81 00 00 lw r1,(r12+0)
80039f8: 44 41 00 0b be r2,r1,8003a24 <rtems_rate_monotonic_period+0xa4><== ALWAYS TAKEN
_Thread_Enable_dispatch();
80039fc: f8 00 0c 16 calli 8006a54 <_Thread_Enable_dispatch> <== NOT EXECUTED
8003a00: 34 01 00 17 mvi r1,23 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003a04: 2b 9d 00 04 lw ra,(sp+4)
8003a08: 2b 8b 00 18 lw r11,(sp+24)
8003a0c: 2b 8c 00 14 lw r12,(sp+20)
8003a10: 2b 8d 00 10 lw r13,(sp+16)
8003a14: 2b 8e 00 0c lw r14,(sp+12)
8003a18: 2b 8f 00 08 lw r15,(sp+8)
8003a1c: 37 9c 00 20 addi sp,sp,32
8003a20: c3 a0 00 00 ret
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
8003a24: 45 a0 00 32 be r13,r0,8003aec <rtems_rate_monotonic_period+0x16c>
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
8003a28: 90 00 78 00 rcsr r15,IE
8003a2c: 34 01 ff fe mvi r1,-2
8003a30: a1 e1 08 00 and r1,r15,r1
8003a34: d0 01 00 00 wcsr IE,r1
switch ( the_period->state ) {
8003a38: 29 61 00 38 lw r1,(r11+56)
8003a3c: 34 02 00 02 mvi r2,2
8003a40: 44 22 00 30 be r1,r2,8003b00 <rtems_rate_monotonic_period+0x180>
8003a44: 34 02 00 04 mvi r2,4
8003a48: 44 22 00 19 be r1,r2,8003aac <rtems_rate_monotonic_period+0x12c>
8003a4c: 5c 20 ff de bne r1,r0,80039c4 <rtems_rate_monotonic_period+0x44><== NEVER TAKEN
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
8003a50: d0 0f 00 00 wcsr IE,r15
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
8003a54: b9 60 08 00 mv r1,r11
8003a58: fb ff ff 1b calli 80036c4 <_Rate_monotonic_Initiate_statistics>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
8003a5c: 78 02 08 00 mvhi r2,0x800
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
8003a60: 34 0c 00 00 mvi r12,0
the_watchdog->routine = routine;
8003a64: 38 42 3f 0c ori r2,r2,0x3f0c
the_period->state = RATE_MONOTONIC_ACTIVE;
8003a68: 34 03 00 02 mvi r3,2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8003a6c: 78 01 08 02 mvhi r1,0x802
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
8003a70: 59 62 00 2c sw (r11+44),r2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8003a74: 38 21 4a a8 ori r1,r1,0x4aa8
8003a78: 59 63 00 38 sw (r11+56),r3
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
8003a7c: 59 6e 00 30 sw (r11+48),r14
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
8003a80: 59 6d 00 1c sw (r11+28),r13
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8003a84: 35 62 00 10 addi r2,r11,16
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
8003a88: 59 6c 00 18 sw (r11+24),r12
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
8003a8c: 59 6c 00 34 sw (r11+52),r12
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
8003a90: 59 6d 00 3c sw (r11+60),r13
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8003a94: f8 00 12 17 calli 80082f0 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
8003a98: b9 80 08 00 mv r1,r12
8003a9c: 5b 81 00 1c sw (sp+28),r1
8003aa0: f8 00 0b ed calli 8006a54 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
8003aa4: 2b 81 00 1c lw r1,(sp+28)
8003aa8: e3 ff ff d7 bi 8003a04 <rtems_rate_monotonic_period+0x84>
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
8003aac: b9 60 08 00 mv r1,r11
8003ab0: fb ff ff 6a calli 8003858 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
8003ab4: d0 0f 00 00 wcsr IE,r15
the_period->state = RATE_MONOTONIC_ACTIVE;
8003ab8: 34 02 00 02 mvi r2,2
8003abc: 78 01 08 02 mvhi r1,0x802
8003ac0: 59 62 00 38 sw (r11+56),r2
8003ac4: 38 21 4a a8 ori r1,r1,0x4aa8
8003ac8: 35 62 00 10 addi r2,r11,16
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
8003acc: 59 6d 00 1c sw (r11+28),r13
the_period->next_length = length;
8003ad0: 59 6d 00 3c sw (r11+60),r13
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8003ad4: f8 00 12 07 calli 80082f0 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
8003ad8: 34 01 00 06 mvi r1,6
8003adc: 5b 81 00 1c sw (sp+28),r1
8003ae0: f8 00 0b dd calli 8006a54 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
8003ae4: 2b 81 00 1c lw r1,(sp+28)
8003ae8: e3 ff ff c7 bi 8003a04 <rtems_rate_monotonic_period+0x84>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
8003aec: 29 61 00 38 lw r1,(r11+56)
8003af0: 34 02 00 04 mvi r2,4
8003af4: 50 41 00 1b bgeu r2,r1,8003b60 <rtems_rate_monotonic_period+0x1e0><== ALWAYS TAKEN
8003af8: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8003afc: e3 ff ff e8 bi 8003a9c <rtems_rate_monotonic_period+0x11c> <== NOT EXECUTED
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
8003b00: b9 60 08 00 mv r1,r11
8003b04: fb ff ff 55 calli 8003858 <_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;
8003b08: 34 01 00 01 mvi r1,1
the_period->next_length = length;
8003b0c: 59 6d 00 3c sw (r11+60),r13
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
8003b10: 59 61 00 38 sw (r11+56),r1
the_period->next_length = length;
_ISR_Enable( level );
8003b14: d0 0f 00 00 wcsr IE,r15
_Thread_Executing->Wait.id = the_period->Object.id;
8003b18: 29 81 00 00 lw r1,(r12+0)
8003b1c: 29 63 00 08 lw r3,(r11+8)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
8003b20: 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;
8003b24: 58 23 00 20 sw (r1+32),r3
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
8003b28: f8 00 0e c8 calli 8007648 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
8003b2c: 90 00 08 00 rcsr r1,IE
8003b30: 34 02 ff fe mvi r2,-2
8003b34: a0 22 10 00 and r2,r1,r2
8003b38: d0 02 00 00 wcsr IE,r2
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
8003b3c: 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;
8003b40: 29 62 00 38 lw r2,(r11+56)
the_period->state = RATE_MONOTONIC_ACTIVE;
8003b44: 59 63 00 38 sw (r11+56),r3
_ISR_Enable( level );
8003b48: 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 )
8003b4c: 34 01 00 03 mvi r1,3
8003b50: 44 41 00 0b be r2,r1,8003b7c <rtems_rate_monotonic_period+0x1fc>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
8003b54: f8 00 0b c0 calli 8006a54 <_Thread_Enable_dispatch>
8003b58: 34 01 00 00 mvi r1,0
return RTEMS_SUCCESSFUL;
8003b5c: e3 ff ff aa bi 8003a04 <rtems_rate_monotonic_period+0x84>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
8003b60: 78 0b 08 02 mvhi r11,0x802
8003b64: 34 02 00 02 mvi r2,2
8003b68: fb ff f5 ad calli 800121c <__ashlsi3>
8003b6c: 39 6b 1c 08 ori r11,r11,0x1c08
8003b70: b5 61 08 00 add r1,r11,r1
8003b74: 28 21 00 00 lw r1,(r1+0)
8003b78: e3 ff ff c9 bi 8003a9c <rtems_rate_monotonic_period+0x11c>
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
8003b7c: 29 81 00 00 lw r1,(r12+0)
8003b80: 34 02 40 00 mvi r2,16384
8003b84: f8 00 0a b6 calli 800665c <_Thread_Clear_state>
8003b88: e3 ff ff f3 bi 8003b54 <rtems_rate_monotonic_period+0x1d4>
08003b8c <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
8003b8c: 37 9c ff 5c addi sp,sp,-164
8003b90: 5b 8b 00 44 sw (sp+68),r11
8003b94: 5b 8c 00 40 sw (sp+64),r12
8003b98: 5b 8d 00 3c sw (sp+60),r13
8003b9c: 5b 8e 00 38 sw (sp+56),r14
8003ba0: 5b 8f 00 34 sw (sp+52),r15
8003ba4: 5b 90 00 30 sw (sp+48),r16
8003ba8: 5b 91 00 2c sw (sp+44),r17
8003bac: 5b 92 00 28 sw (sp+40),r18
8003bb0: 5b 93 00 24 sw (sp+36),r19
8003bb4: 5b 94 00 20 sw (sp+32),r20
8003bb8: 5b 95 00 1c sw (sp+28),r21
8003bbc: 5b 96 00 18 sw (sp+24),r22
8003bc0: 5b 97 00 14 sw (sp+20),r23
8003bc4: 5b 98 00 10 sw (sp+16),r24
8003bc8: 5b 99 00 0c sw (sp+12),r25
8003bcc: 5b 9b 00 08 sw (sp+8),fp
8003bd0: 5b 9d 00 04 sw (sp+4),ra
8003bd4: b8 40 68 00 mv r13,r2
8003bd8: b8 20 78 00 mv r15,r1
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
8003bdc: 44 40 00 2b be r2,r0,8003c88 <rtems_rate_monotonic_report_statistics_with_plugin+0xfc><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
8003be0: 78 02 08 02 mvhi r2,0x802
8003be4: 38 42 1c 1c ori r2,r2,0x1c1c
8003be8: d9 a0 00 00 call r13
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
8003bec: 78 02 08 02 mvhi r2,0x802
8003bf0: 38 42 1c 3c ori r2,r2,0x1c3c
8003bf4: b9 e0 08 00 mv r1,r15
8003bf8: d9 a0 00 00 call r13
(*print)( context, "--- Wall times are in seconds ---\n" );
8003bfc: 78 02 08 02 mvhi r2,0x802
8003c00: 38 42 1c 60 ori r2,r2,0x1c60
8003c04: b9 e0 08 00 mv r1,r15
8003c08: d9 a0 00 00 call r13
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
8003c0c: 78 02 08 02 mvhi r2,0x802
8003c10: 38 42 1c 84 ori r2,r2,0x1c84
8003c14: b9 e0 08 00 mv r1,r15
8003c18: d9 a0 00 00 call r13
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
8003c1c: 78 02 08 02 mvhi r2,0x802
8003c20: b9 e0 08 00 mv r1,r15
/*
* 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 ;
8003c24: 78 0c 08 02 mvhi r12,0x802
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
8003c28: 38 42 1c d0 ori r2,r2,0x1cd0
/*
* 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 ;
8003c2c: 39 8c 48 94 ori r12,r12,0x4894
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
8003c30: d9 a0 00 00 call r13
/*
* 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 ;
8003c34: 29 81 00 0c lw r1,(r12+12)
8003c38: 29 8b 00 08 lw r11,(r12+8)
8003c3c: 55 61 00 13 bgu r11,r1,8003c88 <rtems_rate_monotonic_report_statistics_with_plugin+0xfc><== NEVER TAKEN
8003c40: 37 90 00 48 addi r16,sp,72
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
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 );
8003c44: 37 96 00 80 addi r22,sp,128
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
8003c48: 37 91 00 a0 addi r17,sp,160
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
8003c4c: 78 15 08 02 mvhi r21,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 );
8003c50: 37 94 00 60 addi r20,sp,96
8003c54: 37 92 00 98 addi r18,sp,152
(*print)( context,
8003c58: 78 1b 08 02 mvhi fp,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);
8003c5c: 37 99 00 78 addi r25,sp,120
(*print)( context,
8003c60: 78 18 08 02 mvhi r24,0x802
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
8003c64: 78 13 08 02 mvhi r19,0x802
* 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++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
8003c68: b9 60 08 00 mv r1,r11
8003c6c: ba 00 10 00 mv r2,r16
8003c70: f8 00 1d ad calli 800b324 <rtems_rate_monotonic_get_statistics>
8003c74: b8 20 70 00 mv r14,r1
if ( status != RTEMS_SUCCESSFUL )
8003c78: 44 20 00 17 be r1,r0,8003cd4 <rtems_rate_monotonic_report_statistics_with_plugin+0x148>
/*
* 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 ;
8003c7c: 29 85 00 0c lw r5,(r12+12)
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
8003c80: 35 6b 00 01 addi r11,r11,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 ;
8003c84: 50 ab ff f9 bgeu r5,r11,8003c68 <rtems_rate_monotonic_report_statistics_with_plugin+0xdc>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
8003c88: 2b 9d 00 04 lw ra,(sp+4)
8003c8c: 2b 8b 00 44 lw r11,(sp+68)
8003c90: 2b 8c 00 40 lw r12,(sp+64)
8003c94: 2b 8d 00 3c lw r13,(sp+60)
8003c98: 2b 8e 00 38 lw r14,(sp+56)
8003c9c: 2b 8f 00 34 lw r15,(sp+52)
8003ca0: 2b 90 00 30 lw r16,(sp+48)
8003ca4: 2b 91 00 2c lw r17,(sp+44)
8003ca8: 2b 92 00 28 lw r18,(sp+40)
8003cac: 2b 93 00 24 lw r19,(sp+36)
8003cb0: 2b 94 00 20 lw r20,(sp+32)
8003cb4: 2b 95 00 1c lw r21,(sp+28)
8003cb8: 2b 96 00 18 lw r22,(sp+24)
8003cbc: 2b 97 00 14 lw r23,(sp+20)
8003cc0: 2b 98 00 10 lw r24,(sp+16)
8003cc4: 2b 99 00 0c lw r25,(sp+12)
8003cc8: 2b 9b 00 08 lw fp,(sp+8)
8003ccc: 37 9c 00 a4 addi sp,sp,164
8003cd0: c3 a0 00 00 ret
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
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 );
8003cd4: ba c0 10 00 mv r2,r22
8003cd8: b9 60 08 00 mv r1,r11
8003cdc: f8 00 1d c5 calli 800b3f0 <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 );
8003ce0: 2b 81 00 80 lw r1,(sp+128)
8003ce4: ba 20 18 00 mv r3,r17
8003ce8: 34 02 00 05 mvi r2,5
8003cec: f8 00 00 bb calli 8003fd8 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
8003cf0: 2b 85 00 48 lw r5,(sp+72)
8003cf4: 2b 86 00 4c lw r6,(sp+76)
8003cf8: ba a0 10 00 mv r2,r21
8003cfc: b9 60 18 00 mv r3,r11
8003d00: 38 42 1d 1c ori r2,r2,0x1d1c
8003d04: b9 e0 08 00 mv r1,r15
8003d08: ba 20 20 00 mv r4,r17
8003d0c: d9 a0 00 00 call r13
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
8003d10: 2b 85 00 48 lw r5,(sp+72)
(*print)( context, "\n" );
8003d14: ba 60 10 00 mv r2,r19
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 );
8003d18: ba 40 18 00 mv r3,r18
8003d1c: ba 80 08 00 mv r1,r20
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
8003d20: 38 42 12 10 ori r2,r2,0x1210
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
8003d24: 5c ae 00 04 bne r5,r14,8003d34 <rtems_rate_monotonic_report_statistics_with_plugin+0x1a8>
(*print)( context, "\n" );
8003d28: b9 e0 08 00 mv r1,r15
8003d2c: d9 a0 00 00 call r13
continue;
8003d30: e3 ff ff d3 bi 8003c7c <rtems_rate_monotonic_report_statistics_with_plugin+0xf0>
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 );
8003d34: b8 a0 10 00 mv r2,r5
8003d38: f8 00 10 23 calli 8007dc4 <_Timespec_Divide_by_integer>
(*print)( context,
8003d3c: 2b 81 00 54 lw r1,(sp+84)
8003d40: 34 02 03 e8 mvi r2,1000
8003d44: f8 00 71 33 calli 8020210 <__divsi3>
8003d48: b8 20 b8 00 mv r23,r1
8003d4c: 2b 81 00 5c lw r1,(sp+92)
8003d50: 34 02 03 e8 mvi r2,1000
8003d54: f8 00 71 2f calli 8020210 <__divsi3>
8003d58: b8 20 70 00 mv r14,r1
8003d5c: 2b 81 00 9c lw r1,(sp+156)
8003d60: 34 02 03 e8 mvi r2,1000
8003d64: f8 00 71 2b calli 8020210 <__divsi3>
8003d68: 2b 85 00 58 lw r5,(sp+88)
8003d6c: 2b 87 00 98 lw r7,(sp+152)
8003d70: 2b 83 00 50 lw r3,(sp+80)
8003d74: bb 60 10 00 mv r2,fp
8003d78: b8 20 40 00 mv r8,r1
8003d7c: ba e0 20 00 mv r4,r23
8003d80: b9 c0 30 00 mv r6,r14
8003d84: b9 e0 08 00 mv r1,r15
8003d88: 38 42 1d 34 ori r2,r2,0x1d34
8003d8c: d9 a0 00 00 call r13
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);
8003d90: 2b 82 00 48 lw r2,(sp+72)
8003d94: ba 40 18 00 mv r3,r18
8003d98: bb 20 08 00 mv r1,r25
8003d9c: f8 00 10 0a calli 8007dc4 <_Timespec_Divide_by_integer>
(*print)( context,
8003da0: 2b 81 00 6c lw r1,(sp+108)
8003da4: 34 02 03 e8 mvi r2,1000
8003da8: f8 00 71 1a calli 8020210 <__divsi3>
8003dac: b8 20 b8 00 mv r23,r1
8003db0: 2b 81 00 74 lw r1,(sp+116)
8003db4: 34 02 03 e8 mvi r2,1000
8003db8: f8 00 71 16 calli 8020210 <__divsi3>
8003dbc: b8 20 70 00 mv r14,r1
8003dc0: 2b 81 00 9c lw r1,(sp+156)
8003dc4: 34 02 03 e8 mvi r2,1000
8003dc8: f8 00 71 12 calli 8020210 <__divsi3>
8003dcc: 2b 83 00 68 lw r3,(sp+104)
8003dd0: 2b 85 00 70 lw r5,(sp+112)
8003dd4: 2b 87 00 98 lw r7,(sp+152)
8003dd8: bb 00 10 00 mv r2,r24
8003ddc: b8 20 40 00 mv r8,r1
8003de0: ba e0 20 00 mv r4,r23
8003de4: b9 e0 08 00 mv r1,r15
8003de8: b9 c0 30 00 mv r6,r14
8003dec: 38 42 1d 54 ori r2,r2,0x1d54
8003df0: d9 a0 00 00 call r13
8003df4: e3 ff ff a2 bi 8003c7c <rtems_rate_monotonic_report_statistics_with_plugin+0xf0>
08003e1c <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
8003e1c: 37 9c ff f4 addi sp,sp,-12
8003e20: 5b 8b 00 0c sw (sp+12),r11
8003e24: 5b 8c 00 08 sw (sp+8),r12
8003e28: 5b 9d 00 04 sw (sp+4),ra
8003e2c: 78 01 08 02 mvhi r1,0x802
8003e30: 38 21 49 cc ori r1,r1,0x49cc
8003e34: 28 22 00 00 lw r2,(r1+0)
8003e38: 34 42 00 01 addi r2,r2,1
8003e3c: 58 22 00 00 sw (r1+0),r2
/*
* Cycle through all possible ids and try to reset 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 ;
8003e40: 78 0c 08 02 mvhi r12,0x802
8003e44: 39 8c 48 94 ori r12,r12,0x4894
8003e48: 29 8b 00 08 lw r11,(r12+8)
8003e4c: 29 81 00 0c lw r1,(r12+12)
8003e50: 55 61 00 06 bgu r11,r1,8003e68 <rtems_rate_monotonic_reset_all_statistics+0x4c><== NEVER TAKEN
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
8003e54: b9 60 08 00 mv r1,r11
8003e58: f8 00 00 0a calli 8003e80 <rtems_rate_monotonic_reset_statistics>
/*
* Cycle through all possible ids and try to reset 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 ;
8003e5c: 29 81 00 0c lw r1,(r12+12)
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
8003e60: 35 6b 00 01 addi r11,r11,1
/*
* Cycle through all possible ids and try to reset 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 ;
8003e64: 50 2b ff fc bgeu r1,r11,8003e54 <rtems_rate_monotonic_reset_all_statistics+0x38>
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
8003e68: f8 00 0a fb calli 8006a54 <_Thread_Enable_dispatch>
}
8003e6c: 2b 9d 00 04 lw ra,(sp+4)
8003e70: 2b 8b 00 0c lw r11,(sp+12)
8003e74: 2b 8c 00 08 lw r12,(sp+8)
8003e78: 37 9c 00 0c addi sp,sp,12
8003e7c: c3 a0 00 00 ret
08004f0c <rtems_region_create>:
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
8004f0c: 37 9c ff d4 addi sp,sp,-44
8004f10: 5b 8b 00 24 sw (sp+36),r11
8004f14: 5b 8c 00 20 sw (sp+32),r12
8004f18: 5b 8d 00 1c sw (sp+28),r13
8004f1c: 5b 8e 00 18 sw (sp+24),r14
8004f20: 5b 8f 00 14 sw (sp+20),r15
8004f24: 5b 90 00 10 sw (sp+16),r16
8004f28: 5b 91 00 0c sw (sp+12),r17
8004f2c: 5b 92 00 08 sw (sp+8),r18
8004f30: 5b 9d 00 04 sw (sp+4),ra
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
8004f34: 34 0b 00 03 mvi r11,3
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
8004f38: b8 20 78 00 mv r15,r1
8004f3c: b8 40 60 00 mv r12,r2
8004f40: b8 60 90 00 mv r18,r3
8004f44: b8 80 88 00 mv r17,r4
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
8004f48: 44 20 00 06 be r1,r0,8004f60 <rtems_region_create+0x54> <== NEVER TAKEN
return RTEMS_INVALID_NAME;
if ( !starting_address )
8004f4c: 44 40 00 04 be r2,r0,8004f5c <rtems_region_create+0x50> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !id )
8004f50: 44 c0 00 03 be r6,r0,8004f5c <rtems_region_create+0x50> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
8004f54: 20 4e 00 07 andi r14,r2,0x7
8004f58: 45 c0 00 0e be r14,r0,8004f90 <rtems_region_create+0x84> <== ALWAYS TAKEN
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
return return_status;
8004f5c: 34 0b 00 09 mvi r11,9 <== NOT EXECUTED
}
8004f60: b9 60 08 00 mv r1,r11
8004f64: 2b 9d 00 04 lw ra,(sp+4)
8004f68: 2b 8b 00 24 lw r11,(sp+36)
8004f6c: 2b 8c 00 20 lw r12,(sp+32)
8004f70: 2b 8d 00 1c lw r13,(sp+28)
8004f74: 2b 8e 00 18 lw r14,(sp+24)
8004f78: 2b 8f 00 14 lw r15,(sp+20)
8004f7c: 2b 90 00 10 lw r16,(sp+16)
8004f80: 2b 91 00 0c lw r17,(sp+12)
8004f84: 2b 92 00 08 lw r18,(sp+8)
8004f88: 37 9c 00 2c addi sp,sp,44
8004f8c: c3 a0 00 00 ret
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
8004f90: 78 10 08 02 mvhi r16,0x802
8004f94: 3a 10 ba 30 ori r16,r16,0xba30
8004f98: 2a 01 00 00 lw r1,(r16+0)
8004f9c: 5b 85 00 2c sw (sp+44),r5
8004fa0: 5b 86 00 28 sw (sp+40),r6
8004fa4: f8 00 04 69 calli 8006148 <_API_Mutex_Lock>
* This function allocates a region control block from
* the inactive chain of free region control blocks.
*/
RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void )
{
return (Region_Control *) _Objects_Allocate( &_Region_Information );
8004fa8: 78 01 08 02 mvhi r1,0x802
8004fac: 38 21 b8 44 ori r1,r1,0xb844
8004fb0: f8 00 08 70 calli 8007170 <_Objects_Allocate>
the_region = _Region_Allocate();
if ( !the_region )
8004fb4: 34 0b 00 05 mvi r11,5
8004fb8: b8 20 68 00 mv r13,r1
8004fbc: 44 2e 00 0f be r1,r14,8004ff8 <rtems_region_create+0xec>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
8004fc0: 34 21 00 68 addi r1,r1,104
8004fc4: b9 80 10 00 mv r2,r12
8004fc8: ba 40 18 00 mv r3,r18
8004fcc: ba 20 20 00 mv r4,r17
8004fd0: f8 00 07 10 calli 8006c10 <_Heap_Initialize>
8004fd4: 59 a1 00 5c sw (r13+92),r1
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
8004fd8: 2b 85 00 2c lw r5,(sp+44)
8004fdc: 2b 86 00 28 lw r6,(sp+40)
8004fe0: 5c 20 00 09 bne r1,r0,8005004 <rtems_region_create+0xf8> <== ALWAYS TAKEN
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
8004fe4: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8004fe8: 38 21 b8 44 ori r1,r1,0xb844 <== NOT EXECUTED
8004fec: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED
8004ff0: f8 00 09 85 calli 8007604 <_Objects_Free> <== NOT EXECUTED
8004ff4: 34 0b 00 08 mvi r11,8 <== NOT EXECUTED
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
8004ff8: 2a 01 00 00 lw r1,(r16+0)
8004ffc: f8 00 04 6f calli 80061b8 <_API_Mutex_Unlock>
return return_status;
8005000: e3 ff ff d8 bi 8004f60 <rtems_region_create+0x54>
else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
8005004: 59 a5 00 60 sw (r13+96),r5
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
8005008: b8 a0 08 00 mv r1,r5
return_status = RTEMS_INVALID_SIZE;
}
else {
the_region->starting_address = starting_address;
800500c: 59 ac 00 50 sw (r13+80),r12
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
8005010: 34 02 00 02 mvi r2,2
}
else {
the_region->starting_address = starting_address;
the_region->length = length;
8005014: 59 b2 00 54 sw (r13+84),r18
the_region->page_size = page_size;
8005018: 59 b1 00 58 sw (r13+88),r17
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
800501c: 59 ae 00 64 sw (r13+100),r14
_Thread_queue_Initialize(
8005020: 5b 86 00 28 sw (sp+40),r6
8005024: fb ff f7 0e calli 8002c5c <__lshrsi3>
8005028: 20 22 00 01 andi r2,r1,0x1
800502c: 34 03 00 40 mvi r3,64
8005030: 35 a1 00 10 addi r1,r13,16
8005034: 34 04 00 06 mvi r4,6
8005038: f8 00 0e dd calli 8008bac <_Thread_queue_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
800503c: 29 ab 00 08 lw r11,(r13+8)
8005040: 78 01 08 02 mvhi r1,0x802
8005044: 38 21 b8 44 ori r1,r1,0xb844
8005048: 28 2c 00 1c lw r12,(r1+28)
800504c: 34 02 00 02 mvi r2,2
8005050: 21 61 ff ff andi r1,r11,0xffff
8005054: fb ff f6 da calli 8002bbc <__ashlsi3>
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
8005058: 2b 86 00 28 lw r6,(sp+40)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
800505c: 59 af 00 0c sw (r13+12),r15
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8005060: b5 81 08 00 add r1,r12,r1
8005064: 58 cb 00 00 sw (r6+0),r11
8005068: 58 2d 00 00 sw (r1+0),r13
800506c: b9 c0 58 00 mv r11,r14
8005070: e3 ff ff e2 bi 8004ff8 <rtems_region_create+0xec>
08005074 <rtems_region_delete>:
*/
rtems_status_code rtems_region_delete(
rtems_id id
)
{
8005074: 37 9c ff e8 addi sp,sp,-24
8005078: 5b 8b 00 14 sw (sp+20),r11
800507c: 5b 8c 00 10 sw (sp+16),r12
8005080: 5b 8d 00 0c sw (sp+12),r13
8005084: 5b 8e 00 08 sw (sp+8),r14
8005088: 5b 9d 00 04 sw (sp+4),ra
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
_RTEMS_Lock_allocator();
800508c: 78 0b 08 02 mvhi r11,0x802
8005090: 39 6b ba 30 ori r11,r11,0xba30
*/
rtems_status_code rtems_region_delete(
rtems_id id
)
{
8005094: b8 20 68 00 mv r13,r1
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
_RTEMS_Lock_allocator();
8005098: 29 61 00 00 lw r1,(r11+0)
the_region = _Region_Get( id, &location );
switch ( location ) {
800509c: 34 0c 00 04 mvi r12,4
{
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
_RTEMS_Lock_allocator();
80050a0: f8 00 04 2a calli 8006148 <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
80050a4: 78 01 08 02 mvhi r1,0x802
80050a8: b9 a0 10 00 mv r2,r13
80050ac: 38 21 b8 44 ori r1,r1,0xb844
80050b0: 37 83 00 18 addi r3,sp,24
80050b4: f8 00 09 b3 calli 8007780 <_Objects_Get_no_protection>
80050b8: b8 20 68 00 mv r13,r1
the_region = _Region_Get( id, &location );
switch ( location ) {
80050bc: 2b 81 00 18 lw r1,(sp+24)
80050c0: 44 20 00 0b be r1,r0,80050ec <rtems_region_delete+0x78> <== ALWAYS TAKEN
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
80050c4: 29 61 00 00 lw r1,(r11+0)
80050c8: f8 00 04 3c calli 80061b8 <_API_Mutex_Unlock>
return return_status;
}
80050cc: b9 80 08 00 mv r1,r12
80050d0: 2b 9d 00 04 lw ra,(sp+4)
80050d4: 2b 8b 00 14 lw r11,(sp+20)
80050d8: 2b 8c 00 10 lw r12,(sp+16)
80050dc: 2b 8d 00 0c lw r13,(sp+12)
80050e0: 2b 8e 00 08 lw r14,(sp+8)
80050e4: 37 9c 00 18 addi sp,sp,24
80050e8: c3 a0 00 00 ret
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 5 );
if ( the_region->number_of_used_blocks != 0 )
80050ec: 29 ae 00 64 lw r14,(r13+100)
80050f0: 34 0c 00 0c mvi r12,12
80050f4: 5d c1 ff f4 bne r14,r1,80050c4 <rtems_region_delete+0x50> <== NEVER TAKEN
return_status = RTEMS_RESOURCE_IN_USE;
else {
_Objects_Close( &_Region_Information, &the_region->Object );
80050f8: 78 01 08 02 mvhi r1,0x802
80050fc: 38 21 b8 44 ori r1,r1,0xb844
8005100: b9 a0 10 00 mv r2,r13
8005104: f8 00 08 55 calli 8007258 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
8005108: 78 01 08 02 mvhi r1,0x802
800510c: 38 21 b8 44 ori r1,r1,0xb844
8005110: b9 a0 10 00 mv r2,r13
8005114: f8 00 09 3c calli 8007604 <_Objects_Free>
8005118: b9 c0 60 00 mv r12,r14
800511c: e3 ff ff ea bi 80050c4 <rtems_region_delete+0x50>
08005120 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
8005120: 37 9c ff dc addi sp,sp,-36
8005124: 5b 8b 00 1c sw (sp+28),r11
8005128: 5b 8c 00 18 sw (sp+24),r12
800512c: 5b 8d 00 14 sw (sp+20),r13
8005130: 5b 8e 00 10 sw (sp+16),r14
8005134: 5b 8f 00 0c sw (sp+12),r15
8005138: 5b 90 00 08 sw (sp+8),r16
800513c: 5b 9d 00 04 sw (sp+4),ra
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
8005140: 34 0c 00 09 mvi r12,9
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
8005144: b8 40 70 00 mv r14,r2
8005148: b8 20 68 00 mv r13,r1
800514c: b8 60 80 00 mv r16,r3
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
8005150: 44 40 00 10 be r2,r0,8005190 <rtems_region_extend+0x70> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
8005154: 78 0b 08 02 mvhi r11,0x802
8005158: 39 6b ba 30 ori r11,r11,0xba30
800515c: 29 61 00 00 lw r1,(r11+0)
the_region = _Region_Get( id, &location );
switch ( location ) {
8005160: 34 0c 00 04 mvi r12,4
Region_Control *the_region;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
8005164: f8 00 03 f9 calli 8006148 <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
8005168: 78 01 08 02 mvhi r1,0x802
800516c: b9 a0 10 00 mv r2,r13
8005170: 38 21 b8 44 ori r1,r1,0xb844
8005174: 37 83 00 20 addi r3,sp,32
8005178: f8 00 09 82 calli 8007780 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
800517c: 2b 8f 00 20 lw r15,(sp+32)
8005180: b8 20 68 00 mv r13,r1
8005184: 45 e0 00 0d be r15,r0,80051b8 <rtems_region_extend+0x98> <== ALWAYS TAKEN
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
8005188: 29 61 00 00 lw r1,(r11+0)
800518c: f8 00 04 0b calli 80061b8 <_API_Mutex_Unlock>
return return_status;
}
8005190: b9 80 08 00 mv r1,r12
8005194: 2b 9d 00 04 lw ra,(sp+4)
8005198: 2b 8b 00 1c lw r11,(sp+28)
800519c: 2b 8c 00 18 lw r12,(sp+24)
80051a0: 2b 8d 00 14 lw r13,(sp+20)
80051a4: 2b 8e 00 10 lw r14,(sp+16)
80051a8: 2b 8f 00 0c lw r15,(sp+12)
80051ac: 2b 90 00 08 lw r16,(sp+8)
80051b0: 37 9c 00 24 addi sp,sp,36
80051b4: c3 a0 00 00 ret
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
heap_status = _Heap_Extend(
80051b8: b9 c0 10 00 mv r2,r14
80051bc: ba 00 18 00 mv r3,r16
80051c0: 34 21 00 68 addi r1,r1,104
80051c4: 37 84 00 24 addi r4,sp,36
80051c8: f8 00 05 d9 calli 800692c <_Heap_Extend>
starting_address,
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
80051cc: 5c 2f 00 0a bne r1,r15,80051f4 <rtems_region_extend+0xd4> <== NEVER TAKEN
the_region->length += amount_extended;
80051d0: 2b 82 00 24 lw r2,(sp+36)
80051d4: 29 a4 00 54 lw r4,(r13+84)
the_region->maximum_segment_size += amount_extended;
80051d8: 29 a3 00 5c lw r3,(r13+92)
80051dc: b8 20 60 00 mv r12,r1
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
80051e0: b4 82 08 00 add r1,r4,r2
the_region->maximum_segment_size += amount_extended;
80051e4: b4 62 10 00 add r2,r3,r2
80051e8: 59 a2 00 5c sw (r13+92),r2
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
80051ec: 59 a1 00 54 sw (r13+84),r1
80051f0: e3 ff ff e6 bi 8005188 <rtems_region_extend+0x68>
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
80051f4: 64 2c 00 01 cmpei r12,r1,1 <== NOT EXECUTED
80051f8: 34 02 ff f1 mvi r2,-15 <== NOT EXECUTED
80051fc: c8 0c 60 00 sub r12,r0,r12 <== NOT EXECUTED
8005200: a1 82 60 00 and r12,r12,r2 <== NOT EXECUTED
8005204: 35 8c 00 18 addi r12,r12,24 <== NOT EXECUTED
8005208: e3 ff ff e0 bi 8005188 <rtems_region_extend+0x68> <== NOT EXECUTED
08003888 <rtems_region_get_free_information>:
rtems_status_code rtems_region_get_free_information(
rtems_id id,
Heap_Information_block *the_info
)
{
8003888: 37 9c ff e8 addi sp,sp,-24
800388c: 5b 8b 00 14 sw (sp+20),r11
8003890: 5b 8c 00 10 sw (sp+16),r12
8003894: 5b 8d 00 0c sw (sp+12),r13
8003898: 5b 8e 00 08 sw (sp+8),r14
800389c: 5b 9d 00 04 sw (sp+4),ra
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
80038a0: 34 0c 00 09 mvi r12,9
rtems_status_code rtems_region_get_free_information(
rtems_id id,
Heap_Information_block *the_info
)
{
80038a4: b8 40 68 00 mv r13,r2
80038a8: b8 20 70 00 mv r14,r1
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
80038ac: 44 40 00 0f be r2,r0,80038e8 <rtems_region_get_free_information+0x60><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
80038b0: 78 0b 08 02 mvhi r11,0x802
80038b4: 39 6b 9a 10 ori r11,r11,0x9a10
80038b8: 29 61 00 00 lw r1,(r11+0)
the_region = _Region_Get( id, &location );
switch ( location ) {
80038bc: 34 0c 00 04 mvi r12,4
register Region_Control *the_region;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
80038c0: f8 00 03 e7 calli 800485c <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
80038c4: 78 01 08 02 mvhi r1,0x802
80038c8: b9 c0 10 00 mv r2,r14
80038cc: 38 21 98 24 ori r1,r1,0x9824
80038d0: 37 83 00 18 addi r3,sp,24
80038d4: f8 00 09 8d calli 8005f08 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
80038d8: 2b 8e 00 18 lw r14,(sp+24)
80038dc: 45 c0 00 0b be r14,r0,8003908 <rtems_region_get_free_information+0x80><== ALWAYS TAKEN
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
80038e0: 29 61 00 00 lw r1,(r11+0)
80038e4: f8 00 03 fa calli 80048cc <_API_Mutex_Unlock>
return return_status;
}
80038e8: b9 80 08 00 mv r1,r12
80038ec: 2b 9d 00 04 lw ra,(sp+4)
80038f0: 2b 8b 00 14 lw r11,(sp+20)
80038f4: 2b 8c 00 10 lw r12,(sp+16)
80038f8: 2b 8d 00 0c lw r13,(sp+12)
80038fc: 2b 8e 00 08 lw r14,(sp+8)
8003900: 37 9c 00 18 addi sp,sp,24
8003904: c3 a0 00 00 ret
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->Used.number = 0;
8003908: 59 ae 00 0c sw (r13+12),r14
the_info->Used.total = 0;
800390c: 59 ae 00 14 sw (r13+20),r14
the_info->Used.largest = 0;
8003910: 59 ae 00 10 sw (r13+16),r14
_Heap_Get_free_information( &the_region->Memory, &the_info->Free );
8003914: 34 21 00 68 addi r1,r1,104
8003918: b9 a0 10 00 mv r2,r13
800391c: f8 00 06 34 calli 80051ec <_Heap_Get_free_information>
8003920: b9 c0 60 00 mv r12,r14
return_status = RTEMS_SUCCESSFUL;
break;
8003924: e3 ff ff ef bi 80038e0 <rtems_region_get_free_information+0x58>
08003928 <rtems_region_get_information>:
rtems_status_code rtems_region_get_information(
rtems_id id,
Heap_Information_block *the_info
)
{
8003928: 37 9c ff e8 addi sp,sp,-24
800392c: 5b 8b 00 14 sw (sp+20),r11
8003930: 5b 8c 00 10 sw (sp+16),r12
8003934: 5b 8d 00 0c sw (sp+12),r13
8003938: 5b 8e 00 08 sw (sp+8),r14
800393c: 5b 9d 00 04 sw (sp+4),ra
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
8003940: 34 0c 00 09 mvi r12,9
rtems_status_code rtems_region_get_information(
rtems_id id,
Heap_Information_block *the_info
)
{
8003944: b8 40 68 00 mv r13,r2
8003948: b8 20 70 00 mv r14,r1
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
800394c: 44 40 00 0f be r2,r0,8003988 <rtems_region_get_information+0x60><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
8003950: 78 0b 08 02 mvhi r11,0x802
8003954: 39 6b 9a 10 ori r11,r11,0x9a10
8003958: 29 61 00 00 lw r1,(r11+0)
the_region = _Region_Get( id, &location );
switch ( location ) {
800395c: 34 0c 00 04 mvi r12,4
register Region_Control *the_region;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
8003960: f8 00 03 bf calli 800485c <_API_Mutex_Lock>
8003964: 78 01 08 02 mvhi r1,0x802
8003968: b9 c0 10 00 mv r2,r14
800396c: 38 21 98 24 ori r1,r1,0x9824
8003970: 37 83 00 18 addi r3,sp,24
8003974: f8 00 09 65 calli 8005f08 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
8003978: 2b 8e 00 18 lw r14,(sp+24)
800397c: 45 c0 00 0b be r14,r0,80039a8 <rtems_region_get_information+0x80><== ALWAYS TAKEN
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
8003980: 29 61 00 00 lw r1,(r11+0)
8003984: f8 00 03 d2 calli 80048cc <_API_Mutex_Unlock>
return return_status;
}
8003988: b9 80 08 00 mv r1,r12
800398c: 2b 9d 00 04 lw ra,(sp+4)
8003990: 2b 8b 00 14 lw r11,(sp+20)
8003994: 2b 8c 00 10 lw r12,(sp+16)
8003998: 2b 8d 00 0c lw r13,(sp+12)
800399c: 2b 8e 00 08 lw r14,(sp+8)
80039a0: 37 9c 00 18 addi sp,sp,24
80039a4: c3 a0 00 00 ret
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Heap_Get_information( &the_region->Memory, the_info );
80039a8: 34 21 00 68 addi r1,r1,104
80039ac: b9 a0 10 00 mv r2,r13
80039b0: f8 00 06 25 calli 8005244 <_Heap_Get_information>
80039b4: b9 c0 60 00 mv r12,r14
return_status = RTEMS_SUCCESSFUL;
break;
80039b8: e3 ff ff f2 bi 8003980 <rtems_region_get_information+0x58>
0800520c <rtems_region_get_segment>:
uintptr_t size,
rtems_option option_set,
rtems_interval timeout,
void **segment
)
{
800520c: 37 9c ff d0 addi sp,sp,-48
8005210: 5b 8b 00 28 sw (sp+40),r11
8005214: 5b 8c 00 24 sw (sp+36),r12
8005218: 5b 8d 00 20 sw (sp+32),r13
800521c: 5b 8e 00 1c sw (sp+28),r14
8005220: 5b 8f 00 18 sw (sp+24),r15
8005224: 5b 90 00 14 sw (sp+20),r16
8005228: 5b 91 00 10 sw (sp+16),r17
800522c: 5b 92 00 0c sw (sp+12),r18
8005230: 5b 93 00 08 sw (sp+8),r19
8005234: 5b 9d 00 04 sw (sp+4),ra
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
void *the_segment;
if ( !segment )
8005238: 34 0b 00 09 mvi r11,9
uintptr_t size,
rtems_option option_set,
rtems_interval timeout,
void **segment
)
{
800523c: b8 20 80 00 mv r16,r1
8005240: b8 40 60 00 mv r12,r2
8005244: b8 60 88 00 mv r17,r3
8005248: b8 80 90 00 mv r18,r4
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
void *the_segment;
if ( !segment )
800524c: 44 a0 00 05 be r5,r0,8005260 <rtems_region_get_segment+0x54><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
*segment = NULL;
8005250: 34 06 00 00 mvi r6,0
8005254: 58 a6 00 00 sw (r5+0),r6
if ( size == 0 )
8005258: 34 0b 00 08 mvi r11,8
800525c: 5c 46 00 0e bne r2,r6,8005294 <rtems_region_get_segment+0x88><== ALWAYS TAKEN
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
8005260: b9 60 08 00 mv r1,r11
8005264: 2b 9d 00 04 lw ra,(sp+4)
8005268: 2b 8b 00 28 lw r11,(sp+40)
800526c: 2b 8c 00 24 lw r12,(sp+36)
8005270: 2b 8d 00 20 lw r13,(sp+32)
8005274: 2b 8e 00 1c lw r14,(sp+28)
8005278: 2b 8f 00 18 lw r15,(sp+24)
800527c: 2b 90 00 14 lw r16,(sp+20)
8005280: 2b 91 00 10 lw r17,(sp+16)
8005284: 2b 92 00 0c lw r18,(sp+12)
8005288: 2b 93 00 08 lw r19,(sp+8)
800528c: 37 9c 00 30 addi sp,sp,48
8005290: c3 a0 00 00 ret
*segment = NULL;
if ( size == 0 )
return RTEMS_INVALID_SIZE;
_RTEMS_Lock_allocator();
8005294: 78 0d 08 02 mvhi r13,0x802
8005298: 39 ad ba 30 ori r13,r13,0xba30
800529c: 29 a1 00 00 lw r1,(r13+0)
80052a0: 5b 85 00 2c sw (sp+44),r5
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
_Thread_Enable_dispatch();
return (rtems_status_code) executing->Wait.return_code;
80052a4: 34 0b 00 04 mvi r11,4
*segment = NULL;
if ( size == 0 )
return RTEMS_INVALID_SIZE;
_RTEMS_Lock_allocator();
80052a8: f8 00 03 a8 calli 8006148 <_API_Mutex_Lock>
80052ac: 78 01 08 02 mvhi r1,0x802
executing = _Thread_Executing;
80052b0: 78 06 08 02 mvhi r6,0x802
80052b4: 38 c6 ba 38 ori r6,r6,0xba38
80052b8: 38 21 b8 44 ori r1,r1,0xb844
80052bc: ba 00 10 00 mv r2,r16
80052c0: 37 83 00 30 addi r3,sp,48
80052c4: 28 d3 00 00 lw r19,(r6+0)
80052c8: f8 00 09 2e calli 8007780 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
80052cc: 2b 8f 00 30 lw r15,(sp+48)
80052d0: b8 20 70 00 mv r14,r1
80052d4: 2b 85 00 2c lw r5,(sp+44)
80052d8: 45 e0 00 04 be r15,r0,80052e8 <rtems_region_get_segment+0xdc><== ALWAYS TAKEN
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
80052dc: 29 a1 00 00 lw r1,(r13+0)
80052e0: f8 00 03 b6 calli 80061b8 <_API_Mutex_Unlock>
return return_status;
80052e4: e3 ff ff df bi 8005260 <rtems_region_get_segment+0x54>
executing = _Thread_Executing;
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( size > the_region->maximum_segment_size )
80052e8: 28 21 00 5c lw r1,(r1+92)
80052ec: 50 2c 00 03 bgeu r1,r12,80052f8 <rtems_region_get_segment+0xec><== ALWAYS TAKEN
80052f0: 34 0b 00 08 mvi r11,8 <== NOT EXECUTED
80052f4: e3 ff ff fa bi 80052dc <rtems_region_get_segment+0xd0> <== NOT EXECUTED
* @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 );
80052f8: 35 c1 00 68 addi r1,r14,104
80052fc: b9 80 10 00 mv r2,r12
8005300: b9 e0 18 00 mv r3,r15
8005304: b9 e0 20 00 mv r4,r15
8005308: 5b 85 00 2c sw (sp+44),r5
800530c: f8 00 04 ff calli 8006708 <_Heap_Allocate_aligned_with_boundary>
the_segment = _Region_Allocate_segment( the_region, size );
_Region_Debug_Walk( the_region, 2 );
if ( the_segment ) {
8005310: 2b 85 00 2c lw r5,(sp+44)
8005314: 44 20 00 07 be r1,r0,8005330 <rtems_region_get_segment+0x124>
the_region->number_of_used_blocks += 1;
8005318: 29 c2 00 64 lw r2,(r14+100)
*segment = the_segment;
800531c: 58 a1 00 00 sw (r5+0),r1
8005320: b9 e0 58 00 mv r11,r15
the_segment = _Region_Allocate_segment( the_region, size );
_Region_Debug_Walk( the_region, 2 );
if ( the_segment ) {
the_region->number_of_used_blocks += 1;
8005324: 34 41 00 01 addi r1,r2,1
8005328: 59 c1 00 64 sw (r14+100),r1
800532c: e3 ff ff ec bi 80052dc <rtems_region_get_segment+0xd0>
*segment = the_segment;
return_status = RTEMS_SUCCESSFUL;
} else if ( _Options_Is_no_wait( option_set ) ) {
8005330: 22 31 00 01 andi r17,r17,0x1
8005334: 34 0b 00 0d mvi r11,13
8005338: 5e 21 ff e9 bne r17,r1,80052dc <rtems_region_get_segment+0xd0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
800533c: 78 01 08 02 mvhi r1,0x802
8005340: 38 21 b9 7c ori r1,r1,0xb97c
8005344: 28 22 00 00 lw r2,(r1+0)
8005348: 34 42 00 01 addi r2,r2,1
800534c: 58 22 00 00 sw (r1+0),r2
* Switch from using the memory allocation mutex to using a
* dispatching disabled critical section. We have to do this
* because this thread is going to block.
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
8005350: 29 a1 00 00 lw r1,(r13+0)
8005354: 5b 85 00 2c sw (sp+44),r5
8005358: f8 00 03 98 calli 80061b8 <_API_Mutex_Unlock>
executing->Wait.queue = &the_region->Wait_queue;
executing->Wait.id = id;
executing->Wait.count = size;
executing->Wait.return_argument = segment;
800535c: 2b 85 00 2c lw r5,(sp+44)
* because this thread is going to block.
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
executing->Wait.queue = &the_region->Wait_queue;
8005360: 35 c4 00 10 addi r4,r14,16
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;
8005364: 34 01 00 01 mvi r1,1
executing->Wait.count = size;
executing->Wait.return_argument = segment;
_Thread_queue_Enter_critical_section( &the_region->Wait_queue );
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
8005368: 78 03 08 00 mvhi r3,0x800
800536c: 59 c1 00 40 sw (r14+64),r1
_RTEMS_Unlock_allocator();
executing->Wait.queue = &the_region->Wait_queue;
executing->Wait.id = id;
executing->Wait.count = size;
executing->Wait.return_argument = segment;
8005370: 5a 65 00 28 sw (r19+40),r5
_Thread_queue_Enter_critical_section( &the_region->Wait_queue );
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
8005374: b8 80 08 00 mv r1,r4
8005378: ba 40 10 00 mv r2,r18
800537c: 38 63 8c ac ori r3,r3,0x8cac
* because this thread is going to block.
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
executing->Wait.queue = &the_region->Wait_queue;
8005380: 5a 64 00 44 sw (r19+68),r4
executing->Wait.id = id;
8005384: 5a 70 00 20 sw (r19+32),r16
executing->Wait.count = size;
8005388: 5a 6c 00 24 sw (r19+36),r12
executing->Wait.return_argument = segment;
_Thread_queue_Enter_critical_section( &the_region->Wait_queue );
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
800538c: f8 00 0d 37 calli 8008868 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
8005390: f8 00 0b 8a calli 80081b8 <_Thread_Enable_dispatch>
return (rtems_status_code) executing->Wait.return_code;
8005394: 2a 6b 00 34 lw r11,(r19+52)
8005398: e3 ff ff b2 bi 8005260 <rtems_region_get_segment+0x54>
08003b4c <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
8003b4c: 37 9c ff e8 addi sp,sp,-24
8003b50: 5b 8b 00 14 sw (sp+20),r11
8003b54: 5b 8c 00 10 sw (sp+16),r12
8003b58: 5b 8d 00 0c sw (sp+12),r13
8003b5c: 5b 8e 00 08 sw (sp+8),r14
8003b60: 5b 9d 00 04 sw (sp+4),ra
8003b64: b8 40 60 00 mv r12,r2
8003b68: b8 20 68 00 mv r13,r1
8003b6c: b8 60 70 00 mv r14,r3
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
8003b70: 44 40 00 1b be r2,r0,8003bdc <rtems_region_get_segment_size+0x90><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !size )
8003b74: 44 60 00 1a be r3,r0,8003bdc <rtems_region_get_segment_size+0x90><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
8003b78: 78 0b 08 02 mvhi r11,0x802
8003b7c: 39 6b 9a 10 ori r11,r11,0x9a10
8003b80: 29 61 00 00 lw r1,(r11+0)
8003b84: f8 00 03 36 calli 800485c <_API_Mutex_Lock>
8003b88: 78 01 08 02 mvhi r1,0x802
8003b8c: b9 a0 10 00 mv r2,r13
8003b90: 38 21 98 24 ori r1,r1,0x9824
8003b94: 37 83 00 18 addi r3,sp,24
8003b98: f8 00 08 dc calli 8005f08 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
8003b9c: 2b 8d 00 18 lw r13,(sp+24)
8003ba0: 45 a0 00 18 be r13,r0,8003c00 <rtems_region_get_segment_size+0xb4><== ALWAYS TAKEN
8003ba4: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
8003ba8: 34 0c 00 04 mvi r12,4 <== NOT EXECUTED
8003bac: 45 a1 00 02 be r13,r1,8003bb4 <rtems_region_get_segment_size+0x68><== NOT EXECUTED
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
8003bb0: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
8003bb4: 29 61 00 00 lw r1,(r11+0)
8003bb8: f8 00 03 45 calli 80048cc <_API_Mutex_Unlock>
return return_status;
}
8003bbc: b9 80 08 00 mv r1,r12
8003bc0: 2b 9d 00 04 lw ra,(sp+4)
8003bc4: 2b 8b 00 14 lw r11,(sp+20)
8003bc8: 2b 8c 00 10 lw r12,(sp+16)
8003bcc: 2b 8d 00 0c lw r13,(sp+12)
8003bd0: 2b 8e 00 08 lw r14,(sp+8)
8003bd4: 37 9c 00 18 addi sp,sp,24
8003bd8: c3 a0 00 00 ret
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
return return_status;
8003bdc: 34 0c 00 09 mvi r12,9 <== NOT EXECUTED
}
8003be0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8003be4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003be8: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED
8003bec: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED
8003bf0: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED
8003bf4: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED
8003bf8: 37 9c 00 18 addi sp,sp,24 <== NOT EXECUTED
8003bfc: c3 a0 00 00 ret <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
8003c00: b9 80 10 00 mv r2,r12
8003c04: 34 21 00 68 addi r1,r1,104
8003c08: b9 c0 18 00 mv r3,r14
8003c0c: f8 00 06 d6 calli 8005764 <_Heap_Size_of_alloc_area>
8003c10: 34 0c 00 09 mvi r12,9
8003c14: 44 2d ff e8 be r1,r13,8003bb4 <rtems_region_get_segment_size+0x68><== NEVER TAKEN
8003c18: 34 0c 00 00 mvi r12,0
8003c1c: e3 ff ff e6 bi 8003bb4 <rtems_region_get_segment_size+0x68>
08002da0 <rtems_region_resize_segment>:
rtems_id id,
void *segment,
uintptr_t size,
uintptr_t *old_size
)
{
8002da0: 37 9c ff d8 addi sp,sp,-40
8002da4: 5b 8b 00 1c sw (sp+28),r11
8002da8: 5b 8c 00 18 sw (sp+24),r12
8002dac: 5b 8d 00 14 sw (sp+20),r13
8002db0: 5b 8e 00 10 sw (sp+16),r14
8002db4: 5b 8f 00 0c sw (sp+12),r15
8002db8: 5b 90 00 08 sw (sp+8),r16
8002dbc: 5b 9d 00 04 sw (sp+4),ra
8002dc0: b8 80 60 00 mv r12,r4
8002dc4: b8 20 68 00 mv r13,r1
8002dc8: b8 40 80 00 mv r16,r2
8002dcc: b8 60 78 00 mv r15,r3
uintptr_t osize;
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
8002dd0: 44 80 00 28 be r4,r0,8002e70 <rtems_region_resize_segment+0xd0><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
8002dd4: 78 0b 08 02 mvhi r11,0x802
8002dd8: 39 6b 3d d8 ori r11,r11,0x3dd8
8002ddc: 29 61 00 00 lw r1,(r11+0)
8002de0: f8 00 02 f7 calli 80039bc <_API_Mutex_Lock>
8002de4: 78 01 08 02 mvhi r1,0x802
8002de8: b9 a0 10 00 mv r2,r13
8002dec: 38 21 3b ec ori r1,r1,0x3bec
8002df0: 37 83 00 24 addi r3,sp,36
8002df4: f8 00 08 0e calli 8004e2c <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
8002df8: 2b 8d 00 24 lw r13,(sp+36)
8002dfc: b8 20 70 00 mv r14,r1
8002e00: 45 a0 00 0d be r13,r0,8002e34 <rtems_region_resize_segment+0x94><== ALWAYS TAKEN
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
8002e04: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
8002e08: f8 00 03 09 calli 8003a2c <_API_Mutex_Unlock> <== NOT EXECUTED
8002e0c: 34 01 00 04 mvi r1,4 <== NOT EXECUTED
return return_status;
}
8002e10: 2b 9d 00 04 lw ra,(sp+4)
8002e14: 2b 8b 00 1c lw r11,(sp+28)
8002e18: 2b 8c 00 18 lw r12,(sp+24)
8002e1c: 2b 8d 00 14 lw r13,(sp+20)
8002e20: 2b 8e 00 10 lw r14,(sp+16)
8002e24: 2b 8f 00 0c lw r15,(sp+12)
8002e28: 2b 90 00 08 lw r16,(sp+8)
8002e2c: 37 9c 00 28 addi sp,sp,40
8002e30: c3 a0 00 00 ret
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
8002e34: b9 e0 18 00 mv r3,r15
8002e38: ba 00 10 00 mv r2,r16
8002e3c: 34 21 00 68 addi r1,r1,104
8002e40: 37 84 00 20 addi r4,sp,32
8002e44: 37 85 00 28 addi r5,sp,40
8002e48: f8 00 05 eb calli 80045f4 <_Heap_Resize_block>
8002e4c: b8 20 78 00 mv r15,r1
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
8002e50: 2b 81 00 20 lw r1,(sp+32)
8002e54: 59 81 00 00 sw (r12+0),r1
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
8002e58: 45 ed 00 08 be r15,r13,8002e78 <rtems_region_resize_segment+0xd8>
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
8002e5c: 29 61 00 00 lw r1,(r11+0)
8002e60: f8 00 02 f3 calli 8003a2c <_API_Mutex_Unlock>
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
if (status == HEAP_RESIZE_UNSATISFIED)
8002e64: 34 02 00 01 mvi r2,1
8002e68: 34 01 00 0d mvi r1,13
8002e6c: 45 e2 ff e9 be r15,r2,8002e10 <rtems_region_resize_segment+0x70><== ALWAYS TAKEN
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
return return_status;
8002e70: 34 01 00 09 mvi r1,9 <== NOT EXECUTED
8002e74: e3 ff ff e7 bi 8002e10 <rtems_region_resize_segment+0x70> <== NOT EXECUTED
*old_size = (uint32_t) osize;
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
_Region_Process_queue( the_region ); /* unlocks allocator */
8002e78: b9 c0 08 00 mv r1,r14
8002e7c: f8 00 1b a3 calli 8009d08 <_Region_Process_queue>
8002e80: b9 e0 08 00 mv r1,r15
8002e84: e3 ff ff e3 bi 8002e10 <rtems_region_resize_segment+0x70>
080053f0 <rtems_region_return_segment>:
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
80053f0: 37 9c ff e4 addi sp,sp,-28
80053f4: 5b 8b 00 18 sw (sp+24),r11
80053f8: 5b 8c 00 14 sw (sp+20),r12
80053fc: 5b 8d 00 10 sw (sp+16),r13
8005400: 5b 8e 00 0c sw (sp+12),r14
8005404: 5b 8f 00 08 sw (sp+8),r15
8005408: 5b 9d 00 04 sw (sp+4),ra
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
800540c: 78 0b 08 02 mvhi r11,0x802
8005410: 39 6b ba 30 ori r11,r11,0xba30
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
8005414: b8 20 68 00 mv r13,r1
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
8005418: 29 61 00 00 lw r1,(r11+0)
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
800541c: b8 40 78 00 mv r15,r2
register Region_Control *the_region;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
8005420: 34 0c 00 04 mvi r12,4
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
8005424: f8 00 03 49 calli 8006148 <_API_Mutex_Lock>
8005428: 78 01 08 02 mvhi r1,0x802
800542c: b9 a0 10 00 mv r2,r13
8005430: 38 21 b8 44 ori r1,r1,0xb844
8005434: 37 83 00 1c addi r3,sp,28
8005438: f8 00 08 d2 calli 8007780 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
800543c: 2b 8d 00 1c lw r13,(sp+28)
8005440: b8 20 70 00 mv r14,r1
8005444: 45 a0 00 0c be r13,r0,8005474 <rtems_region_return_segment+0x84><== ALWAYS TAKEN
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
8005448: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
800544c: f8 00 03 5b calli 80061b8 <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
}
8005450: b9 80 08 00 mv r1,r12
8005454: 2b 9d 00 04 lw ra,(sp+4)
8005458: 2b 8b 00 18 lw r11,(sp+24)
800545c: 2b 8c 00 14 lw r12,(sp+20)
8005460: 2b 8d 00 10 lw r13,(sp+16)
8005464: 2b 8e 00 0c lw r14,(sp+12)
8005468: 2b 8f 00 08 lw r15,(sp+8)
800546c: 37 9c 00 1c addi sp,sp,28
8005470: c3 a0 00 00 ret
RTEMS_INLINE_ROUTINE bool _Region_Free_segment (
Region_Control *the_region,
void *the_segment
)
{
return _Heap_Free( &the_region->Memory, the_segment );
8005474: b9 e0 10 00 mv r2,r15
8005478: 34 21 00 68 addi r1,r1,104
800547c: f8 00 05 71 calli 8006a40 <_Heap_Free>
else {
the_region->number_of_used_blocks -= 1;
_Region_Process_queue(the_region); /* unlocks allocator */
return RTEMS_SUCCESSFUL;
8005480: 34 0c 00 09 mvi r12,9
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
8005484: 44 2d ff f1 be r1,r13,8005448 <rtems_region_return_segment+0x58><== NEVER TAKEN
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
8005488: 29 c2 00 64 lw r2,(r14+100)
_Region_Process_queue(the_region); /* unlocks allocator */
800548c: b9 c0 08 00 mv r1,r14
8005490: b9 a0 60 00 mv r12,r13
_Region_Debug_Walk( the_region, 4 );
if ( !status )
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
8005494: 34 42 ff ff addi r2,r2,-1
8005498: 59 c2 00 64 sw (r14+100),r2
_Region_Process_queue(the_region); /* unlocks allocator */
800549c: f8 00 1c d7 calli 800c7f8 <_Region_Process_queue>
return RTEMS_SUCCESSFUL;
80054a0: e3 ff ff ec bi 8005450 <rtems_region_return_segment+0x60>
080021c0 <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
80021c0: 37 9c ff c4 addi sp,sp,-60
80021c4: 5b 8b 00 14 sw (sp+20),r11
80021c8: 5b 8c 00 10 sw (sp+16),r12
80021cc: 5b 8d 00 0c sw (sp+12),r13
80021d0: 5b 8e 00 08 sw (sp+8),r14
80021d4: 5b 9d 00 04 sw (sp+4),ra
80021d8: b8 20 58 00 mv r11,r1
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
80021dc: 34 01 00 03 mvi r1,3
80021e0: 45 60 00 09 be r11,r0,8002204 <rtems_semaphore_create+0x44><== NEVER TAKEN
return RTEMS_INVALID_NAME;
if ( !id )
80021e4: 34 01 00 09 mvi r1,9
80021e8: 44 a0 00 07 be r5,r0,8002204 <rtems_semaphore_create+0x44> <== NEVER TAKEN
* id - semaphore id
* RTEMS_SUCCESSFUL - if successful
* error code - if unsuccessful
*/
rtems_status_code rtems_semaphore_create(
80021ec: 20 61 00 c0 andi r1,r3,0xc0
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
80021f0: 44 20 00 15 be r1,r0,8002244 <rtems_semaphore_create+0x84>
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
80021f4: 20 66 00 30 andi r6,r3,0x30
80021f8: 34 07 00 10 mvi r7,16
80021fc: 44 c7 00 09 be r6,r7,8002220 <rtems_semaphore_create+0x60> <== ALWAYS TAKEN
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
8002200: 34 01 00 0b mvi r1,11 <== NOT EXECUTED
}
8002204: 2b 9d 00 04 lw ra,(sp+4)
8002208: 2b 8b 00 14 lw r11,(sp+20)
800220c: 2b 8c 00 10 lw r12,(sp+16)
8002210: 2b 8d 00 0c lw r13,(sp+12)
8002214: 2b 8e 00 08 lw r14,(sp+8)
8002218: 37 9c 00 3c addi sp,sp,60
800221c: c3 a0 00 00 ret
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
8002220: 20 67 00 04 andi r7,r3,0x4
8002224: 44 e0 ff f7 be r7,r0,8002200 <rtems_semaphore_create+0x40> <== NEVER TAKEN
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
8002228: b8 c0 68 00 mv r13,r6
800222c: 34 06 00 c0 mvi r6,192
8002230: 44 26 ff f4 be r1,r6,8002200 <rtems_semaphore_create+0x40> <== NEVER TAKEN
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
8002234: 34 01 00 01 mvi r1,1
8002238: 50 22 00 05 bgeu r1,r2,800224c <rtems_semaphore_create+0x8c><== ALWAYS TAKEN
800223c: 34 01 00 0a mvi r1,10 <== NOT EXECUTED
8002240: e3 ff ff f1 bi 8002204 <rtems_semaphore_create+0x44> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
8002244: 20 6d 00 30 andi r13,r3,0x30
8002248: 5d a1 ff fb bne r13,r1,8002234 <rtems_semaphore_create+0x74>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
800224c: 78 01 08 01 mvhi r1,0x801
8002250: 38 21 e8 a4 ori r1,r1,0xe8a4
8002254: 28 26 00 00 lw r6,(r1+0)
8002258: 34 c6 00 01 addi r6,r6,1
800225c: 58 26 00 00 sw (r1+0),r6
* This function allocates a semaphore control block from
* the inactive chain of free semaphore control blocks.
*/
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void )
{
return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information );
8002260: 78 01 08 01 mvhi r1,0x801
8002264: 38 21 e7 ac ori r1,r1,0xe7ac
8002268: 5b 82 00 24 sw (sp+36),r2
800226c: 5b 83 00 20 sw (sp+32),r3
8002270: 5b 84 00 1c sw (sp+28),r4
8002274: 5b 85 00 18 sw (sp+24),r5
8002278: f8 00 05 71 calli 800383c <_Objects_Allocate>
800227c: b8 20 60 00 mv r12,r1
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
8002280: 2b 82 00 24 lw r2,(sp+36)
8002284: 2b 83 00 20 lw r3,(sp+32)
8002288: 2b 84 00 1c lw r4,(sp+28)
800228c: 2b 85 00 18 lw r5,(sp+24)
8002290: 44 20 00 39 be r1,r0,8002374 <rtems_semaphore_create+0x1b4><== NEVER TAKEN
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
8002294: 58 23 00 10 sw (r1+16),r3
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
8002298: 45 a0 00 23 be r13,r0,8002324 <rtems_semaphore_create+0x164>
} else {
/*
* It is either simple binary semaphore or a more powerful mutex
* style binary semaphore. This is the mutex style.
*/
if ( _Attributes_Is_priority( attribute_set ) )
800229c: 20 61 00 04 andi r1,r3,0x4
80022a0: 44 20 00 31 be r1,r0,8002364 <rtems_semaphore_create+0x1a4>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
80022a4: 34 01 00 01 mvi r1,1
80022a8: 5b 81 00 30 sw (sp+48),r1
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
80022ac: 34 01 00 10 mvi r1,16
80022b0: 45 a1 00 34 be r13,r1,8002380 <rtems_semaphore_create+0x1c0>
the_mutex_attr.only_owner_release = true;
}
}
} else /* must be simple binary semaphore */ {
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
the_mutex_attr.only_owner_release = false;
80022b4: 34 01 00 00 mvi r1,0
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
the_mutex_attr.only_owner_release = true;
}
}
} else /* must be simple binary semaphore */ {
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
80022b8: 34 03 00 02 mvi r3,2
80022bc: 5b 83 00 28 sw (sp+40),r3
the_mutex_attr.only_owner_release = false;
80022c0: 33 81 00 2c sb (sp+44),r1
}
mutex_status = _CORE_mutex_Initialize(
80022c4: 64 43 00 01 cmpei r3,r2,1
80022c8: 35 81 00 14 addi r1,r12,20
80022cc: 37 82 00 28 addi r2,sp,40
80022d0: 5b 85 00 18 sw (sp+24),r5
80022d4: f8 00 02 d2 calli 8002e1c <_CORE_mutex_Initialize>
&the_semaphore->Core_control.mutex,
&the_mutex_attr,
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
80022d8: 34 02 00 06 mvi r2,6
80022dc: 2b 85 00 18 lw r5,(sp+24)
80022e0: 44 22 00 35 be r1,r2,80023b4 <rtems_semaphore_create+0x1f4>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
80022e4: 29 8d 00 08 lw r13,(r12+8)
80022e8: 78 01 08 01 mvhi r1,0x801
80022ec: 38 21 e7 ac ori r1,r1,0xe7ac
80022f0: 28 2e 00 1c lw r14,(r1+28)
80022f4: 34 02 00 02 mvi r2,2
80022f8: 21 a1 ff ff andi r1,r13,0xffff
80022fc: 5b 85 00 18 sw (sp+24),r5
8002300: fb ff f7 bc calli 80001f0 <__ashlsi3>
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
8002304: 2b 85 00 18 lw r5,(sp+24)
8002308: b5 c1 08 00 add r1,r14,r1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
800230c: 59 8b 00 0c sw (r12+12),r11
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8002310: 58 2c 00 00 sw (r1+0),r12
8002314: 58 ad 00 00 sw (r5+0),r13
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
8002318: f8 00 09 04 calli 8004728 <_Thread_Enable_dispatch>
800231c: 34 01 00 00 mvi r1,0
return RTEMS_SUCCESSFUL;
8002320: e3 ff ff b9 bi 8002204 <rtems_semaphore_create+0x44>
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
8002324: 34 01 ff ff mvi r1,-1
8002328: 5b 81 00 38 sw (sp+56),r1
if ( _Attributes_Is_priority( attribute_set ) )
800232c: 20 63 00 04 andi r3,r3,0x4
8002330: 44 6d 00 0f be r3,r13,800236c <rtems_semaphore_create+0x1ac>
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
8002334: 34 01 00 01 mvi r1,1
8002338: 5b 81 00 3c sw (sp+60),r1
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
800233c: 34 04 00 00 mvi r4,0
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
8002340: b8 40 18 00 mv r3,r2
8002344: 35 81 00 14 addi r1,r12,20
8002348: 37 82 00 38 addi r2,sp,56
800234c: 5b 85 00 18 sw (sp+24),r5
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
8002350: 5b 84 00 34 sw (sp+52),r4
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
8002354: 5b 84 00 28 sw (sp+40),r4
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
8002358: f8 00 03 9c calli 80031c8 <_CORE_semaphore_Initialize>
800235c: 2b 85 00 18 lw r5,(sp+24)
8002360: e3 ff ff e1 bi 80022e4 <rtems_semaphore_create+0x124>
* style binary semaphore. This is the mutex style.
*/
if ( _Attributes_Is_priority( attribute_set ) )
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
8002364: 5b 81 00 30 sw (sp+48),r1
8002368: e3 ff ff d1 bi 80022ac <rtems_semaphore_create+0xec>
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
else
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
800236c: 5b 8d 00 3c sw (sp+60),r13
8002370: e3 ff ff f3 bi 800233c <rtems_semaphore_create+0x17c>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
8002374: f8 00 08 ed calli 8004728 <_Thread_Enable_dispatch> <== NOT EXECUTED
8002378: 34 01 00 05 mvi r1,5 <== NOT EXECUTED
return RTEMS_TOO_MANY;
800237c: e3 ff ff a2 bi 8002204 <rtems_semaphore_create+0x44> <== NOT EXECUTED
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
8002380: 2b 81 00 30 lw r1,(sp+48)
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
8002384: 34 06 00 00 mvi r6,0
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
8002388: 5b 84 00 34 sw (sp+52),r4
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
800238c: 33 86 00 2c sb (sp+44),r6
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
8002390: 5b 86 00 28 sw (sp+40),r6
the_mutex_attr.only_owner_release = false;
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
8002394: 34 04 00 01 mvi r4,1
8002398: 5c 24 ff cb bne r1,r4,80022c4 <rtems_semaphore_create+0x104>
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
800239c: 20 64 00 40 andi r4,r3,0x40
80023a0: 44 86 00 0c be r4,r6,80023d0 <rtems_semaphore_create+0x210>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
80023a4: 34 03 00 02 mvi r3,2
80023a8: 5b 83 00 30 sw (sp+48),r3
the_mutex_attr.only_owner_release = true;
80023ac: 33 81 00 2c sb (sp+44),r1
80023b0: e3 ff ff c5 bi 80022c4 <rtems_semaphore_create+0x104>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
80023b4: 78 01 08 01 mvhi r1,0x801
80023b8: 38 21 e7 ac ori r1,r1,0xe7ac
80023bc: b9 80 10 00 mv r2,r12
80023c0: f8 00 06 2c calli 8003c70 <_Objects_Free>
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
80023c4: f8 00 08 d9 calli 8004728 <_Thread_Enable_dispatch>
80023c8: 34 01 00 13 mvi r1,19
return RTEMS_INVALID_PRIORITY;
80023cc: e3 ff ff 8e bi 8002204 <rtems_semaphore_create+0x44>
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
the_mutex_attr.only_owner_release = true;
} else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) {
80023d0: 20 63 00 80 andi r3,r3,0x80
80023d4: 44 64 ff bc be r3,r4,80022c4 <rtems_semaphore_create+0x104>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
80023d8: 34 03 00 03 mvi r3,3
80023dc: 5b 83 00 30 sw (sp+48),r3
the_mutex_attr.only_owner_release = true;
80023e0: 33 81 00 2c sb (sp+44),r1
80023e4: e3 ff ff b8 bi 80022c4 <rtems_semaphore_create+0x104>
08008c1c <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
8008c1c: 37 9c ff f4 addi sp,sp,-12
8008c20: 5b 8b 00 08 sw (sp+8),r11
8008c24: 5b 9d 00 04 sw (sp+4),ra
8008c28: b8 20 10 00 mv r2,r1
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
8008c2c: 78 01 08 01 mvhi r1,0x801
8008c30: 37 83 00 0c addi r3,sp,12
8008c34: 38 21 e7 ac ori r1,r1,0xe7ac
8008c38: f8 00 04 2f calli 8009cf4 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
8008c3c: 2b 83 00 0c lw r3,(sp+12)
8008c40: b8 20 58 00 mv r11,r1
8008c44: 34 01 00 04 mvi r1,4
8008c48: 44 60 00 05 be r3,r0,8008c5c <rtems_semaphore_delete+0x40> <== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8008c4c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8008c50: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8008c54: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8008c58: c3 a0 00 00 ret <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
8008c5c: 29 62 00 10 lw r2,(r11+16)
8008c60: 20 42 00 30 andi r2,r2,0x30
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
8008c64: 44 43 00 1d be r2,r3,8008cd8 <rtems_semaphore_delete+0xbc>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
8008c68: 29 61 00 64 lw r1,(r11+100)
8008c6c: 5c 20 00 09 bne r1,r0,8008c90 <rtems_semaphore_delete+0x74>
8008c70: 34 01 00 20 mvi r1,32
8008c74: 44 41 00 07 be r2,r1,8008c90 <rtems_semaphore_delete+0x74>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
8008c78: fb ff ee ac calli 8004728 <_Thread_Enable_dispatch>
8008c7c: 34 01 00 0c mvi r1,12
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8008c80: 2b 9d 00 04 lw ra,(sp+4)
8008c84: 2b 8b 00 08 lw r11,(sp+8)
8008c88: 37 9c 00 0c addi sp,sp,12
8008c8c: c3 a0 00 00 ret
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
8008c90: 35 61 00 14 addi r1,r11,20
8008c94: 34 02 00 00 mvi r2,0
8008c98: 34 03 00 04 mvi r3,4
8008c9c: f8 00 01 eb calli 8009448 <_CORE_mutex_Flush>
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
8008ca0: 78 01 08 01 mvhi r1,0x801
8008ca4: b9 60 10 00 mv r2,r11
8008ca8: 38 21 e7 ac ori r1,r1,0xe7ac
8008cac: f8 00 03 c9 calli 8009bd0 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
8008cb0: 78 01 08 01 mvhi r1,0x801
8008cb4: 38 21 e7 ac ori r1,r1,0xe7ac
8008cb8: b9 60 10 00 mv r2,r11
8008cbc: fb ff eb ed calli 8003c70 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
8008cc0: fb ff ee 9a calli 8004728 <_Thread_Enable_dispatch>
8008cc4: 34 01 00 00 mvi r1,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8008cc8: 2b 9d 00 04 lw ra,(sp+4)
8008ccc: 2b 8b 00 08 lw r11,(sp+8)
8008cd0: 37 9c 00 0c addi sp,sp,12
8008cd4: c3 a0 00 00 ret
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
8008cd8: 35 61 00 14 addi r1,r11,20
8008cdc: 34 03 00 02 mvi r3,2
8008ce0: f8 00 02 39 calli 80095c4 <_CORE_semaphore_Flush>
8008ce4: e3 ff ff ef bi 8008ca0 <rtems_semaphore_delete+0x84>
0800f5bc <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
800f5bc: 37 9c ff f8 addi sp,sp,-8
800f5c0: 5b 9d 00 04 sw (sp+4),ra
800f5c4: b8 20 10 00 mv r2,r1
800f5c8: 78 01 08 02 mvhi r1,0x802
800f5cc: 37 83 00 08 addi r3,sp,8
800f5d0: 38 21 68 8c ori r1,r1,0x688c
800f5d4: fb ff db c5 calli 80064e8 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
800f5d8: 2b 83 00 08 lw r3,(sp+8)
800f5dc: 34 02 00 04 mvi r2,4
800f5e0: 44 60 00 05 be r3,r0,800f5f4 <rtems_semaphore_flush+0x38> <== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
800f5e4: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
800f5e8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800f5ec: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
800f5f0: c3 a0 00 00 ret <== NOT EXECUTED
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
800f5f4: 28 22 00 10 lw r2,(r1+16)
800f5f8: 20 42 00 30 andi r2,r2,0x30
800f5fc: 5c 43 00 0a bne r2,r3,800f624 <rtems_semaphore_flush+0x68>
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
800f600: 34 21 00 14 addi r1,r1,20
800f604: 34 03 00 01 mvi r3,1
800f608: fb ff d8 76 calli 80057e0 <_CORE_semaphore_Flush>
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
800f60c: fb ff de 4d calli 8006f40 <_Thread_Enable_dispatch>
800f610: 34 02 00 00 mvi r2,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
800f614: b8 40 08 00 mv r1,r2
800f618: 2b 9d 00 04 lw ra,(sp+4)
800f61c: 37 9c 00 08 addi sp,sp,8
800f620: c3 a0 00 00 ret
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
_CORE_mutex_Flush(
800f624: b8 60 10 00 mv r2,r3
800f628: 34 21 00 14 addi r1,r1,20
800f62c: 34 03 00 01 mvi r3,1
800f630: fb ff d7 7b calli 800541c <_CORE_mutex_Flush>
800f634: e3 ff ff f6 bi 800f60c <rtems_semaphore_flush+0x50>
08008d28 <rtems_semaphore_obtain>:
rtems_status_code rtems_semaphore_obtain(
rtems_id id,
rtems_option option_set,
rtems_interval timeout
)
{
8008d28: 37 9c ff e4 addi sp,sp,-28
8008d2c: 5b 8b 00 14 sw (sp+20),r11
8008d30: 5b 8c 00 10 sw (sp+16),r12
8008d34: 5b 8d 00 0c sw (sp+12),r13
8008d38: 5b 8e 00 08 sw (sp+8),r14
8008d3c: 5b 9d 00 04 sw (sp+4),ra
8008d40: b8 20 58 00 mv r11,r1
Objects_Id id,
Objects_Locations *location,
ISR_Level *level
)
{
return (Semaphore_Control *)
8008d44: 78 01 08 01 mvhi r1,0x801
8008d48: b8 40 68 00 mv r13,r2
8008d4c: b8 60 70 00 mv r14,r3
8008d50: 38 21 e7 ac ori r1,r1,0xe7ac
8008d54: b9 60 10 00 mv r2,r11
8008d58: 37 83 00 1c addi r3,sp,28
8008d5c: 37 84 00 18 addi r4,sp,24
8008d60: f8 00 03 b4 calli 8009c30 <_Objects_Get_isr_disable>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
ISR_Level level;
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
8008d64: 2b 86 00 1c lw r6,(sp+28)
8008d68: 34 05 00 04 mvi r5,4
8008d6c: 44 c0 00 09 be r6,r0,8008d90 <rtems_semaphore_obtain+0x68>
break;
}
return RTEMS_INVALID_ID;
}
8008d70: b8 a0 08 00 mv r1,r5
8008d74: 2b 9d 00 04 lw ra,(sp+4)
8008d78: 2b 8b 00 14 lw r11,(sp+20)
8008d7c: 2b 8c 00 10 lw r12,(sp+16)
8008d80: 2b 8d 00 0c lw r13,(sp+12)
8008d84: 2b 8e 00 08 lw r14,(sp+8)
8008d88: 37 9c 00 1c addi sp,sp,28
8008d8c: c3 a0 00 00 ret
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
8008d90: 28 25 00 10 lw r5,(r1+16)
8008d94: 20 a5 00 30 andi r5,r5,0x30
8008d98: 44 a6 00 16 be r5,r6,8008df0 <rtems_semaphore_obtain+0xc8>
_CORE_mutex_Seize(
8008d9c: 2b 85 00 18 lw r5,(sp+24)
8008da0: 21 a3 00 01 andi r3,r13,0x1
8008da4: b9 60 10 00 mv r2,r11
8008da8: 18 63 00 01 xori r3,r3,0x1
8008dac: b9 c0 20 00 mv r4,r14
8008db0: 34 21 00 14 addi r1,r1,20
8008db4: fb ff e8 6c calli 8002f64 <_CORE_mutex_Seize>
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
8008db8: 78 01 08 01 mvhi r1,0x801
8008dbc: 38 21 e9 60 ori r1,r1,0xe960
8008dc0: 28 21 00 00 lw r1,(r1+0)
8008dc4: 28 21 00 34 lw r1,(r1+52)
8008dc8: f8 00 00 68 calli 8008f68 <_Semaphore_Translate_core_mutex_return_code>
8008dcc: b8 20 28 00 mv r5,r1
break;
}
return RTEMS_INVALID_ID;
}
8008dd0: b8 a0 08 00 mv r1,r5
8008dd4: 2b 9d 00 04 lw ra,(sp+4)
8008dd8: 2b 8b 00 14 lw r11,(sp+20)
8008ddc: 2b 8c 00 10 lw r12,(sp+16)
8008de0: 2b 8d 00 0c lw r13,(sp+12)
8008de4: 2b 8e 00 08 lw r14,(sp+8)
8008de8: 37 9c 00 1c addi sp,sp,28
8008dec: c3 a0 00 00 ret
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
8008df0: 78 0c 08 01 mvhi r12,0x801
8008df4: 39 8c e9 60 ori r12,r12,0xe960
8008df8: 29 82 00 00 lw r2,(r12+0)
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
8008dfc: 58 45 00 34 sw (r2+52),r5
if ( the_semaphore->count != 0 ) {
8008e00: 28 26 00 5c lw r6,(r1+92)
8008e04: 5c c5 00 13 bne r6,r5,8008e50 <rtems_semaphore_obtain+0x128>
the_semaphore->count -= 1;
_ISR_Enable( *level_p );
return;
}
if ( !wait ) {
8008e08: 21 ad 00 01 andi r13,r13,0x1
8008e0c: 45 a6 00 16 be r13,r6,8008e64 <rtems_semaphore_obtain+0x13c><== ALWAYS TAKEN
_ISR_Enable( *level_p );
8008e10: 2b 81 00 18 lw r1,(sp+24) <== NOT EXECUTED
8008e14: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
8008e18: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
8008e1c: 58 41 00 34 sw (r2+52),r1 <== NOT EXECUTED
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
8008e20: 29 81 00 00 lw r1,(r12+0)
8008e24: 28 21 00 34 lw r1,(r1+52)
8008e28: f8 00 00 5d calli 8008f9c <_Semaphore_Translate_core_semaphore_return_code>
8008e2c: b8 20 28 00 mv r5,r1
break;
}
return RTEMS_INVALID_ID;
}
8008e30: b8 a0 08 00 mv r1,r5
8008e34: 2b 9d 00 04 lw ra,(sp+4)
8008e38: 2b 8b 00 14 lw r11,(sp+20)
8008e3c: 2b 8c 00 10 lw r12,(sp+16)
8008e40: 2b 8d 00 0c lw r13,(sp+12)
8008e44: 2b 8e 00 08 lw r14,(sp+8)
8008e48: 37 9c 00 1c addi sp,sp,28
8008e4c: c3 a0 00 00 ret
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
the_semaphore->count -= 1;
8008e50: 34 c6 ff ff addi r6,r6,-1
8008e54: 58 26 00 5c sw (r1+92),r6
_ISR_Enable( *level_p );
8008e58: 2b 81 00 18 lw r1,(sp+24)
8008e5c: d0 01 00 00 wcsr IE,r1
8008e60: e3 ff ff f0 bi 8008e20 <rtems_semaphore_obtain+0xf8>
8008e64: 78 03 08 01 mvhi r3,0x801
8008e68: 38 63 e8 a4 ori r3,r3,0xe8a4
8008e6c: 28 64 00 00 lw r4,(r3+0)
8008e70: 34 84 00 01 addi r4,r4,1
8008e74: 58 64 00 00 sw (r3+0),r4
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;
8008e78: 34 03 00 01 mvi r3,1
8008e7c: 58 23 00 44 sw (r1+68),r3
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
executing->Wait.id = id;
8008e80: 58 4b 00 20 sw (r2+32),r11
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
8008e84: 34 21 00 14 addi r1,r1,20
8008e88: 58 41 00 44 sw (r2+68),r1
executing->Wait.id = id;
_ISR_Enable( *level_p );
8008e8c: 2b 82 00 18 lw r2,(sp+24)
8008e90: d0 02 00 00 wcsr IE,r2
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
8008e94: 78 03 08 00 mvhi r3,0x800
8008e98: b9 c0 10 00 mv r2,r14
8008e9c: 38 63 52 1c ori r3,r3,0x521c
8008ea0: fb ff ef ce calli 8004dd8 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
8008ea4: fb ff ee 21 calli 8004728 <_Thread_Enable_dispatch>
8008ea8: e3 ff ff de bi 8008e20 <rtems_semaphore_obtain+0xf8>
08008eac <rtems_semaphore_release>:
#endif
rtems_status_code rtems_semaphore_release(
rtems_id id
)
{
8008eac: 37 9c ff f0 addi sp,sp,-16
8008eb0: 5b 8b 00 08 sw (sp+8),r11
8008eb4: 5b 9d 00 04 sw (sp+4),ra
8008eb8: b8 20 58 00 mv r11,r1
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
8008ebc: 78 01 08 01 mvhi r1,0x801
8008ec0: 38 21 e7 ac ori r1,r1,0xe7ac
8008ec4: b9 60 10 00 mv r2,r11
8008ec8: 37 83 00 10 addi r3,sp,16
8008ecc: f8 00 03 8a calli 8009cf4 <_Objects_Get>
Objects_Locations location;
CORE_mutex_Status mutex_status;
CORE_semaphore_Status semaphore_status;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
8008ed0: 2b 85 00 10 lw r5,(sp+16)
8008ed4: 34 04 00 04 mvi r4,4
8008ed8: 44 a0 00 06 be r5,r0,8008ef0 <rtems_semaphore_release+0x44><== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8008edc: b8 80 08 00 mv r1,r4 <== NOT EXECUTED
8008ee0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8008ee4: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8008ee8: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
8008eec: c3 a0 00 00 ret <== NOT EXECUTED
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
8008ef0: 28 23 00 10 lw r3,(r1+16)
8008ef4: 20 63 00 30 andi r3,r3,0x30
8008ef8: 5c 65 00 0e bne r3,r5,8008f30 <rtems_semaphore_release+0x84>
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
} else {
semaphore_status = _CORE_semaphore_Surrender(
8008efc: b9 60 10 00 mv r2,r11
8008f00: 34 21 00 14 addi r1,r1,20
8008f04: f8 00 01 b6 calli 80095dc <_CORE_semaphore_Surrender>
&the_semaphore->Core_control.semaphore,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
8008f08: 5b 81 00 0c sw (sp+12),r1
8008f0c: fb ff ee 07 calli 8004728 <_Thread_Enable_dispatch>
return
_Semaphore_Translate_core_semaphore_return_code( semaphore_status );
8008f10: 2b 81 00 0c lw r1,(sp+12)
8008f14: f8 00 00 22 calli 8008f9c <_Semaphore_Translate_core_semaphore_return_code>
8008f18: b8 20 20 00 mv r4,r1
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8008f1c: b8 80 08 00 mv r1,r4
8008f20: 2b 9d 00 04 lw ra,(sp+4)
8008f24: 2b 8b 00 08 lw r11,(sp+8)
8008f28: 37 9c 00 10 addi sp,sp,16
8008f2c: c3 a0 00 00 ret
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
mutex_status = _CORE_mutex_Surrender(
8008f30: b9 60 10 00 mv r2,r11
8008f34: b8 a0 18 00 mv r3,r5
8008f38: 34 21 00 14 addi r1,r1,20
8008f3c: fb ff e8 4f calli 8003078 <_CORE_mutex_Surrender>
&the_semaphore->Core_control.mutex,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
8008f40: 5b 81 00 0c sw (sp+12),r1
8008f44: fb ff ed f9 calli 8004728 <_Thread_Enable_dispatch>
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
8008f48: 2b 81 00 0c lw r1,(sp+12)
8008f4c: f8 00 00 07 calli 8008f68 <_Semaphore_Translate_core_mutex_return_code>
8008f50: b8 20 20 00 mv r4,r1
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8008f54: b8 80 08 00 mv r1,r4
8008f58: 2b 9d 00 04 lw ra,(sp+4)
8008f5c: 2b 8b 00 08 lw r11,(sp+8)
8008f60: 37 9c 00 10 addi sp,sp,16
8008f64: c3 a0 00 00 ret
08003918 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
8003918: 37 9c ff f4 addi sp,sp,-12
800391c: 5b 8b 00 08 sw (sp+8),r11
8003920: 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 )
8003924: 34 03 00 0a mvi r3,10
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
8003928: 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 )
800392c: 5c 40 00 06 bne r2,r0,8003944 <rtems_signal_send+0x2c> <== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003930: b8 60 08 00 mv r1,r3 <== NOT EXECUTED
8003934: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003938: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
800393c: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8003940: c3 a0 00 00 ret <== NOT EXECUTED
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
8003944: 37 82 00 0c addi r2,sp,12
8003948: f8 00 0a 4e calli 8006280 <_Thread_Get>
switch ( location ) {
800394c: 2b 84 00 0c lw r4,(sp+12)
8003950: 34 03 00 04 mvi r3,4
8003954: 5c 80 ff f7 bne r4,r0,8003930 <rtems_signal_send+0x18> <== NEVER TAKEN
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
8003958: 28 22 01 28 lw r2,(r1+296)
asr = &api->Signal;
800395c: 28 43 00 0c lw r3,(r2+12)
8003960: 44 64 00 28 be r3,r4,8003a00 <rtems_signal_send+0xe8> <== NEVER TAKEN
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
8003964: 40 43 00 08 lbu r3,(r2+8)
8003968: 44 60 00 17 be r3,r0,80039c4 <rtems_signal_send+0xac>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
800396c: 90 00 18 00 rcsr r3,IE
8003970: 34 04 ff fe mvi r4,-2
8003974: a0 64 20 00 and r4,r3,r4
8003978: d0 04 00 00 wcsr IE,r4
*signal_set |= signals;
800397c: 28 44 00 14 lw r4,(r2+20)
8003980: b8 8b 58 00 or r11,r4,r11
8003984: 58 4b 00 14 sw (r2+20),r11
_ISR_Enable( _level );
8003988: d0 03 00 00 wcsr IE,r3
_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 ) )
800398c: 78 02 08 02 mvhi r2,0x802
8003990: 38 42 39 bc ori r2,r2,0x39bc
8003994: 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;
8003998: 34 03 00 01 mvi r3,1
800399c: 30 23 00 74 sb (r1+116),r3
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
80039a0: 44 40 00 11 be r2,r0,80039e4 <rtems_signal_send+0xcc>
80039a4: 78 02 08 02 mvhi r2,0x802
80039a8: 38 42 39 e0 ori r2,r2,0x39e0
80039ac: 28 42 00 00 lw r2,(r2+0)
80039b0: 5c 22 00 0d bne r1,r2,80039e4 <rtems_signal_send+0xcc> <== NEVER TAKEN
_ISR_Signals_to_thread_executing = true;
80039b4: 78 01 08 02 mvhi r1,0x802
80039b8: 38 21 3a 78 ori r1,r1,0x3a78
80039bc: 30 23 00 00 sb (r1+0),r3
80039c0: e0 00 00 09 bi 80039e4 <rtems_signal_send+0xcc>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
80039c4: 90 00 08 00 rcsr r1,IE
80039c8: 34 03 ff fe mvi r3,-2
80039cc: a0 23 18 00 and r3,r1,r3
80039d0: d0 03 00 00 wcsr IE,r3
*signal_set |= signals;
80039d4: 28 43 00 18 lw r3,(r2+24)
80039d8: b8 6b 58 00 or r11,r3,r11
80039dc: 58 4b 00 18 sw (r2+24),r11
_ISR_Enable( _level );
80039e0: d0 01 00 00 wcsr IE,r1
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
80039e4: f8 00 0a 07 calli 8006200 <_Thread_Enable_dispatch>
80039e8: 34 03 00 00 mvi r3,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80039ec: b8 60 08 00 mv r1,r3
80039f0: 2b 9d 00 04 lw ra,(sp+4)
80039f4: 2b 8b 00 08 lw r11,(sp+8)
80039f8: 37 9c 00 0c addi sp,sp,12
80039fc: c3 a0 00 00 ret
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
8003a00: f8 00 0a 00 calli 8006200 <_Thread_Enable_dispatch> <== NOT EXECUTED
8003a04: 34 03 00 0b mvi r3,11 <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
8003a08: e3 ff ff ca bi 8003930 <rtems_signal_send+0x18> <== NOT EXECUTED
0800088c <rtems_stack_checker_begin_extension>:
Thread_Control *the_thread
)
{
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
800088c: 28 22 00 08 lw r2,(r1+8)
8000890: 44 40 00 0c be r2,r0,80008c0 <rtems_stack_checker_begin_extension+0x34><== NEVER TAKEN
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
8000894: 28 22 00 c8 lw r2,(r1+200)
8000898: 78 01 08 01 mvhi r1,0x801
800089c: 38 21 e7 34 ori r1,r1,0xe734
80008a0: 28 23 00 00 lw r3,(r1+0)
80008a4: 58 43 00 08 sw (r2+8),r3
80008a8: 28 23 00 04 lw r3,(r1+4)
80008ac: 58 43 00 0c sw (r2+12),r3
80008b0: 28 23 00 08 lw r3,(r1+8)
80008b4: 58 43 00 10 sw (r2+16),r3
80008b8: 28 21 00 0c lw r1,(r1+12)
80008bc: 58 41 00 14 sw (r2+20),r1
80008c0: c3 a0 00 00 ret
08000e44 <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
8000e44: 37 9c ff f8 addi sp,sp,-8
8000e48: 5b 8b 00 08 sw (sp+8),r11
8000e4c: 5b 9d 00 04 sw (sp+4),ra
8000e50: b8 40 58 00 mv r11,r2
Stack_check_Initialize();
8000e54: fb ff ff c8 calli 8000d74 <Stack_check_Initialize>
if (the_thread)
8000e58: 45 60 00 05 be r11,r0,8000e6c <rtems_stack_checker_create_extension+0x28><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
8000e5c: 29 63 00 c4 lw r3,(r11+196)
8000e60: 29 61 00 c8 lw r1,(r11+200)
8000e64: 34 02 00 a5 mvi r2,165
8000e68: f8 00 34 b4 calli 800e138 <memset>
return true;
}
8000e6c: 34 01 00 01 mvi r1,1
8000e70: 2b 9d 00 04 lw ra,(sp+4)
8000e74: 2b 8b 00 08 lw r11,(sp+8)
8000e78: 37 9c 00 08 addi sp,sp,8
8000e7c: c3 a0 00 00 ret
08000c54 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
8000c54: 37 9c ff f0 addi sp,sp,-16
8000c58: 5b 9b 00 08 sw (sp+8),fp
8000c5c: 34 1b 00 10 mvi fp,16
8000c60: b7 7c d8 00 add fp,fp,sp
8000c64: 5b 8b 00 10 sw (sp+16),r11
8000c68: 5b 8c 00 0c sw (sp+12),r12
8000c6c: 5b 9d 00 04 sw (sp+4),ra
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
8000c70: 78 0b 08 01 mvhi r11,0x801
8000c74: 39 6b e9 50 ori r11,r11,0xe950
8000c78: 29 62 00 00 lw r2,(r11+0)
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
8000c7c: 28 41 00 c8 lw r1,(r2+200)
8000c80: 53 61 00 19 bgeu fp,r1,8000ce4 <rtems_stack_checker_is_blown+0x90><== ALWAYS TAKEN
8000c84: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
8000c88: 78 02 08 01 mvhi r2,0x801
8000c8c: 38 42 e6 a8 ori r2,r2,0xe6a8
8000c90: 28 43 00 00 lw r3,(r2+0)
8000c94: 34 02 00 01 mvi r2,1
8000c98: 44 60 00 07 be r3,r0,8000cb4 <rtems_stack_checker_is_blown+0x60><== NEVER TAKEN
pattern_ok = (!memcmp(
8000c9c: 78 02 08 01 mvhi r2,0x801
8000ca0: 38 42 e7 34 ori r2,r2,0xe734
8000ca4: 34 21 00 08 addi r1,r1,8
8000ca8: 34 03 00 10 mvi r3,16
8000cac: f8 00 34 a5 calli 800df40 <memcmp>
8000cb0: 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 )
8000cb4: 45 80 00 03 be r12,r0,8000cc0 <rtems_stack_checker_is_blown+0x6c><== NEVER TAKEN
8000cb8: 34 01 00 00 mvi r1,0
8000cbc: 5c 41 00 04 bne r2,r1,8000ccc <rtems_stack_checker_is_blown+0x78><== ALWAYS TAKEN
return false;
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
8000cc0: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
8000cc4: fb ff ff b5 calli 8000b98 <Stack_check_report_blown_task> <== NOT EXECUTED
8000cc8: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
return true;
}
8000ccc: 2b 9d 00 04 lw ra,(sp+4)
8000cd0: 2b 8b 00 10 lw r11,(sp+16)
8000cd4: 2b 8c 00 0c lw r12,(sp+12)
8000cd8: 2b 9b 00 08 lw fp,(sp+8)
8000cdc: 37 9c 00 10 addi sp,sp,16
8000ce0: c3 a0 00 00 ret
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
8000ce4: 28 4c 00 c4 lw r12,(r2+196)
8000ce8: b4 2c 60 00 add r12,r1,r12
8000cec: f1 9b 60 00 cmpgeu r12,r12,fp
8000cf0: e3 ff ff e6 bi 8000c88 <rtems_stack_checker_is_blown+0x34>
08000b74 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
8000b74: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8000b78: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
8000b7c: 78 02 08 00 mvhi r2,0x800 <== NOT EXECUTED
8000b80: 38 42 21 74 ori r2,r2,0x2174 <== NOT EXECUTED
8000b84: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8000b88: fb ff ff d7 calli 8000ae4 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
}
8000b8c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8000b90: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8000b94: c3 a0 00 00 ret <== NOT EXECUTED
08000ae4 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
8000ae4: 37 9c ff ec addi sp,sp,-20 <== NOT EXECUTED
8000ae8: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED
8000aec: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED
8000af0: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED
8000af4: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED
8000af8: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
print_context = context;
8000afc: 78 0b 08 01 mvhi r11,0x801 <== NOT EXECUTED
print_handler = print;
8000b00: 78 0c 08 01 mvhi r12,0x801 <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
8000b04: b8 40 68 00 mv r13,r2 <== NOT EXECUTED
print_context = context;
8000b08: 39 6b e6 ac ori r11,r11,0xe6ac <== NOT EXECUTED
print_handler = print;
8000b0c: 39 8c e6 b0 ori r12,r12,0xe6b0 <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
8000b10: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8000b14: 38 42 c7 90 ori r2,r2,0xc790 <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
print_context = context;
8000b18: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED
print_handler = print;
8000b1c: 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
)
{
8000b20: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
print_context = context;
print_handler = print;
(*print)( context, "Stack usage by thread\n");
8000b24: d9 a0 00 00 call r13 <== NOT EXECUTED
(*print)( context,
8000b28: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8000b2c: 38 42 c7 a8 ori r2,r2,0xc7a8 <== NOT EXECUTED
8000b30: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
8000b34: 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 );
8000b38: 78 01 08 00 mvhi r1,0x800 <== NOT EXECUTED
8000b3c: 38 21 09 4c ori r1,r1,0x94c <== NOT EXECUTED
8000b40: f8 00 0a 83 calli 800354c <rtems_iterate_over_all_threads> <== NOT EXECUTED
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
8000b44: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8000b48: fb ff ff 81 calli 800094c <Stack_check_Dump_threads_usage> <== NOT EXECUTED
print_context = NULL;
8000b4c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
print_handler = NULL;
8000b50: 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;
8000b54: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED
print_handler = NULL;
}
8000b58: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8000b5c: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED
8000b60: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED
8000b64: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED
8000b68: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED
8000b6c: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
8000b70: c3 a0 00 00 ret <== NOT EXECUTED
08000cf4 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
8000cf4: 37 9c ff f4 addi sp,sp,-12
8000cf8: 5b 9b 00 08 sw (sp+8),fp
8000cfc: 34 1b 00 0c mvi fp,12
8000d00: b7 7c d8 00 add fp,fp,sp
8000d04: 5b 8b 00 0c sw (sp+12),r11
8000d08: 5b 9d 00 04 sw (sp+4),ra
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
8000d0c: 28 22 00 c8 lw r2,(r1+200)
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
8000d10: 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;
8000d14: 34 41 00 08 addi r1,r2,8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
8000d18: 54 5b 00 04 bgu r2,fp,8000d28 <rtems_stack_checker_switch_extension+0x34><== NEVER TAKEN
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
Stack_Control *the_stack = &running->Start.Initial_stack;
8000d1c: 29 63 00 c4 lw r3,(r11+196)
8000d20: b4 43 10 00 add r2,r2,r3
8000d24: 50 5b 00 0d bgeu r2,fp,8000d58 <rtems_stack_checker_switch_extension+0x64><== ALWAYS TAKEN
/*
* 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,
8000d28: 78 02 08 01 mvhi r2,0x801 <== NOT EXECUTED
8000d2c: 38 42 e7 34 ori r2,r2,0xe734 <== NOT EXECUTED
8000d30: 34 03 00 10 mvi r3,16 <== NOT EXECUTED
8000d34: f8 00 34 83 calli 800df40 <memcmp> <== NOT EXECUTED
8000d38: 64 22 00 00 cmpei r2,r1,0 <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
8000d3c: b9 60 08 00 mv r1,r11
8000d40: fb ff ff 96 calli 8000b98 <Stack_check_report_blown_task>
}
}
8000d44: 2b 9d 00 04 lw ra,(sp+4)
8000d48: 2b 8b 00 0c lw r11,(sp+12)
8000d4c: 2b 9b 00 08 lw fp,(sp+8)
8000d50: 37 9c 00 0c addi sp,sp,12
8000d54: c3 a0 00 00 ret
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
8000d58: 78 02 08 01 mvhi r2,0x801
8000d5c: 38 42 e7 34 ori r2,r2,0xe734
8000d60: 34 03 00 10 mvi r3,16
8000d64: f8 00 34 77 calli 800df40 <memcmp>
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
8000d68: 34 02 00 00 mvi r2,0
8000d6c: 5c 22 ff f4 bne r1,r2,8000d3c <rtems_stack_checker_switch_extension+0x48>
8000d70: e3 ff ff f5 bi 8000d44 <rtems_stack_checker_switch_extension+0x50>
0800852c <rtems_string_to_double>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
800852c: 37 9c ff e4 addi sp,sp,-28
8008530: 5b 8b 00 18 sw (sp+24),r11
8008534: 5b 8c 00 14 sw (sp+20),r12
8008538: 5b 8d 00 10 sw (sp+16),r13
800853c: 5b 8e 00 0c sw (sp+12),r14
8008540: 5b 8f 00 08 sw (sp+8),r15
8008544: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8008548: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
800854c: b8 40 58 00 mv r11,r2
8008550: b8 20 68 00 mv r13,r1
8008554: b8 60 70 00 mv r14,r3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8008558: 34 04 00 09 mvi r4,9
800855c: 44 4c 00 19 be r2,r12,80085c0 <rtems_string_to_double+0x94>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8008560: f8 00 15 8b calli 800db8c <__errno>
8008564: 58 2c 00 00 sw (r1+0),r12
*n = 0;
8008568: 59 6c 00 04 sw (r11+4),r12
800856c: 59 6c 00 00 sw (r11+0),r12
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
8008570: b9 a0 08 00 mv r1,r13
8008574: 37 82 00 1c addi r2,sp,28
8008578: f8 00 21 a9 calli 8010c1c <strtod>
800857c: b8 20 60 00 mv r12,r1
8008580: b8 40 78 00 mv r15,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 )
8008584: 45 c0 00 1e be r14,r0,80085fc <rtems_string_to_double+0xd0>
*endptr = end;
8008588: 2b 85 00 1c lw r5,(sp+28)
800858c: 59 c5 00 00 sw (r14+0),r5
/* nothing was converted */
if ( end == s )
8008590: 34 04 00 0b mvi r4,11
8008594: 44 ad 00 0b be r5,r13,80085c0 <rtems_string_to_double+0x94>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
8008598: 78 03 7f ef mvhi r3,0x7fef
800859c: 38 63 ff ff ori r3,r3,0xffff
80085a0: b9 80 08 00 mv r1,r12
80085a4: b9 e0 10 00 mv r2,r15
80085a8: 34 04 ff ff mvi r4,-1
80085ac: f8 00 4f a5 calli 801c440 <__gedf2>
80085b0: 48 20 00 0d bg r1,r0,80085e4 <rtems_string_to_double+0xb8>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
80085b4: 59 6f 00 04 sw (r11+4),r15
80085b8: 59 6c 00 00 sw (r11+0),r12
80085bc: 34 04 00 00 mvi r4,0
#endif
return RTEMS_SUCCESSFUL;
}
80085c0: b8 80 08 00 mv r1,r4
80085c4: 2b 9d 00 04 lw ra,(sp+4)
80085c8: 2b 8b 00 18 lw r11,(sp+24)
80085cc: 2b 8c 00 14 lw r12,(sp+20)
80085d0: 2b 8d 00 10 lw r13,(sp+16)
80085d4: 2b 8e 00 0c lw r14,(sp+12)
80085d8: 2b 8f 00 08 lw r15,(sp+8)
80085dc: 37 9c 00 1c addi sp,sp,28
80085e0: c3 a0 00 00 ret
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
80085e4: f8 00 15 6a calli 800db8c <__errno>
80085e8: 28 22 00 00 lw r2,(r1+0)
80085ec: 34 01 00 22 mvi r1,34
80085f0: 34 04 00 0a mvi r4,10
80085f4: 5c 41 ff f0 bne r2,r1,80085b4 <rtems_string_to_double+0x88><== NEVER TAKEN
80085f8: e3 ff ff f2 bi 80085c0 <rtems_string_to_double+0x94>
80085fc: 2b 85 00 1c lw r5,(sp+28)
8008600: e3 ff ff e4 bi 8008590 <rtems_string_to_double+0x64>
08008604 <rtems_string_to_float>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008604: 37 9c ff e8 addi sp,sp,-24
8008608: 5b 8b 00 14 sw (sp+20),r11
800860c: 5b 8c 00 10 sw (sp+16),r12
8008610: 5b 8d 00 0c sw (sp+12),r13
8008614: 5b 8e 00 08 sw (sp+8),r14
8008618: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
800861c: 34 0d 00 00 mvi r13,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008620: b8 40 58 00 mv r11,r2
8008624: b8 20 60 00 mv r12,r1
8008628: b8 60 70 00 mv r14,r3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
800862c: 34 04 00 09 mvi r4,9
8008630: 44 4d 00 14 be r2,r13,8008680 <rtems_string_to_float+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8008634: f8 00 15 56 calli 800db8c <__errno>
8008638: 58 2d 00 00 sw (r1+0),r13
*n = 0;
800863c: 59 6d 00 00 sw (r11+0),r13
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
8008640: b9 80 08 00 mv r1,r12
8008644: 37 82 00 18 addi r2,sp,24
8008648: f8 00 21 58 calli 8010ba8 <strtof>
800864c: b8 20 68 00 mv r13,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 )
8008650: 45 c0 00 1a be r14,r0,80086b8 <rtems_string_to_float+0xb4>
*endptr = end;
8008654: 2b 82 00 18 lw r2,(sp+24)
8008658: 59 c2 00 00 sw (r14+0),r2
/* nothing was converted */
if ( end == s )
800865c: 34 04 00 0b mvi r4,11
8008660: 44 4c 00 08 be r2,r12,8008680 <rtems_string_to_float+0x7c>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
8008664: 78 02 7f 7f mvhi r2,0x7f7f
8008668: 38 42 ff ff ori r2,r2,0xffff
800866c: b9 a0 08 00 mv r1,r13
8008670: f8 00 49 33 calli 801ab3c <__gesf2>
8008674: 48 20 00 0b bg r1,r0,80086a0 <rtems_string_to_float+0x9c>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
8008678: 59 6d 00 00 sw (r11+0),r13
800867c: 34 04 00 00 mvi r4,0
#endif
return RTEMS_SUCCESSFUL;
}
8008680: b8 80 08 00 mv r1,r4
8008684: 2b 9d 00 04 lw ra,(sp+4)
8008688: 2b 8b 00 14 lw r11,(sp+20)
800868c: 2b 8c 00 10 lw r12,(sp+16)
8008690: 2b 8d 00 0c lw r13,(sp+12)
8008694: 2b 8e 00 08 lw r14,(sp+8)
8008698: 37 9c 00 18 addi sp,sp,24
800869c: c3 a0 00 00 ret
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
80086a0: f8 00 15 3b calli 800db8c <__errno>
80086a4: 28 22 00 00 lw r2,(r1+0)
80086a8: 34 01 00 22 mvi r1,34
80086ac: 34 04 00 0a mvi r4,10
80086b0: 5c 41 ff f2 bne r2,r1,8008678 <rtems_string_to_float+0x74> <== NEVER TAKEN
80086b4: e3 ff ff f3 bi 8008680 <rtems_string_to_float+0x7c>
80086b8: 2b 82 00 18 lw r2,(sp+24)
80086bc: e3 ff ff e8 bi 800865c <rtems_string_to_float+0x58>
080086c0 <rtems_string_to_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
80086c0: 37 9c ff e4 addi sp,sp,-28
80086c4: 5b 8b 00 18 sw (sp+24),r11
80086c8: 5b 8c 00 14 sw (sp+20),r12
80086cc: 5b 8d 00 10 sw (sp+16),r13
80086d0: 5b 8e 00 0c sw (sp+12),r14
80086d4: 5b 8f 00 08 sw (sp+8),r15
80086d8: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
80086dc: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
80086e0: b8 40 58 00 mv r11,r2
80086e4: b8 20 68 00 mv r13,r1
80086e8: b8 60 70 00 mv r14,r3
80086ec: b8 80 78 00 mv r15,r4
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
80086f0: 34 05 00 09 mvi r5,9
80086f4: 44 4c 00 13 be r2,r12,8008740 <rtems_string_to_int+0x80>
return RTEMS_INVALID_ADDRESS;
errno = 0;
80086f8: f8 00 15 25 calli 800db8c <__errno>
80086fc: 58 2c 00 00 sw (r1+0),r12
*n = 0;
8008700: 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 );
8008704: b9 e0 18 00 mv r3,r15
8008708: b9 a0 08 00 mv r1,r13
800870c: 37 82 00 1c addi r2,sp,28
8008710: f8 00 21 e6 calli 8010ea8 <strtol>
8008714: b8 20 60 00 mv r12,r1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
8008718: 45 c0 00 19 be r14,r0,800877c <rtems_string_to_int+0xbc>
*endptr = end;
800871c: 2b 82 00 1c lw r2,(sp+28)
8008720: 59 c2 00 00 sw (r14+0),r2
/* nothing was converted */
if ( end == s )
8008724: 34 05 00 0b mvi r5,11
8008728: 44 4d 00 06 be r2,r13,8008740 <rtems_string_to_int+0x80>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
800872c: 78 02 7f ff mvhi r2,0x7fff
8008730: 38 42 ff ff ori r2,r2,0xffff
8008734: 45 82 00 0c be r12,r2,8008764 <rtems_string_to_int+0xa4>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
8008738: 59 6c 00 00 sw (r11+0),r12
800873c: 34 05 00 00 mvi r5,0
#endif
return RTEMS_SUCCESSFUL;
}
8008740: b8 a0 08 00 mv r1,r5
8008744: 2b 9d 00 04 lw ra,(sp+4)
8008748: 2b 8b 00 18 lw r11,(sp+24)
800874c: 2b 8c 00 14 lw r12,(sp+20)
8008750: 2b 8d 00 10 lw r13,(sp+16)
8008754: 2b 8e 00 0c lw r14,(sp+12)
8008758: 2b 8f 00 08 lw r15,(sp+8)
800875c: 37 9c 00 1c addi sp,sp,28
8008760: c3 a0 00 00 ret
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
8008764: f8 00 15 0a calli 800db8c <__errno>
8008768: 28 22 00 00 lw r2,(r1+0)
800876c: 34 01 00 22 mvi r1,34
8008770: 34 05 00 0a mvi r5,10
8008774: 5c 41 ff f1 bne r2,r1,8008738 <rtems_string_to_int+0x78> <== NEVER TAKEN
8008778: e3 ff ff f2 bi 8008740 <rtems_string_to_int+0x80>
800877c: 2b 82 00 1c lw r2,(sp+28)
8008780: e3 ff ff e9 bi 8008724 <rtems_string_to_int+0x64>
08008874 <rtems_string_to_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008874: 37 9c ff e4 addi sp,sp,-28
8008878: 5b 8b 00 18 sw (sp+24),r11
800887c: 5b 8c 00 14 sw (sp+20),r12
8008880: 5b 8d 00 10 sw (sp+16),r13
8008884: 5b 8e 00 0c sw (sp+12),r14
8008888: 5b 8f 00 08 sw (sp+8),r15
800888c: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8008890: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008894: b8 40 58 00 mv r11,r2
8008898: b8 20 68 00 mv r13,r1
800889c: b8 60 70 00 mv r14,r3
80088a0: b8 80 78 00 mv r15,r4
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
80088a4: 34 05 00 09 mvi r5,9
80088a8: 44 4c 00 16 be r2,r12,8008900 <rtems_string_to_long+0x8c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
80088ac: f8 00 14 b8 calli 800db8c <__errno>
80088b0: 58 2c 00 00 sw (r1+0),r12
*n = 0;
80088b4: 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 );
80088b8: b9 e0 18 00 mv r3,r15
80088bc: b9 a0 08 00 mv r1,r13
80088c0: 37 82 00 1c addi r2,sp,28
80088c4: f8 00 21 79 calli 8010ea8 <strtol>
80088c8: b8 20 60 00 mv r12,r1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
80088cc: 45 c0 00 1c be r14,r0,800893c <rtems_string_to_long+0xc8>
*endptr = end;
80088d0: 2b 82 00 1c lw r2,(sp+28)
80088d4: 59 c2 00 00 sw (r14+0),r2
/* nothing was converted */
if ( end == s )
80088d8: 34 05 00 0b mvi r5,11
80088dc: 44 4d 00 09 be r2,r13,8008900 <rtems_string_to_long+0x8c>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
80088e0: 78 02 7f ff mvhi r2,0x7fff
80088e4: 38 42 ff ff ori r2,r2,0xffff
80088e8: 45 82 00 0f be r12,r2,8008924 <rtems_string_to_long+0xb0>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
80088ec: 78 01 80 00 mvhi r1,0x8000
80088f0: 38 21 00 00 ori r1,r1,0x0
80088f4: 45 81 00 0c be r12,r1,8008924 <rtems_string_to_long+0xb0>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
80088f8: 59 6c 00 00 sw (r11+0),r12
80088fc: 34 05 00 00 mvi r5,0
#endif
return RTEMS_SUCCESSFUL;
}
8008900: b8 a0 08 00 mv r1,r5
8008904: 2b 9d 00 04 lw ra,(sp+4)
8008908: 2b 8b 00 18 lw r11,(sp+24)
800890c: 2b 8c 00 14 lw r12,(sp+20)
8008910: 2b 8d 00 10 lw r13,(sp+16)
8008914: 2b 8e 00 0c lw r14,(sp+12)
8008918: 2b 8f 00 08 lw r15,(sp+8)
800891c: 37 9c 00 1c addi sp,sp,28
8008920: c3 a0 00 00 ret
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
8008924: f8 00 14 9a calli 800db8c <__errno>
8008928: 28 22 00 00 lw r2,(r1+0)
800892c: 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;
8008930: 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))
8008934: 5c 41 ff f1 bne r2,r1,80088f8 <rtems_string_to_long+0x84> <== NEVER TAKEN
8008938: e3 ff ff f2 bi 8008900 <rtems_string_to_long+0x8c>
800893c: 2b 82 00 1c lw r2,(sp+28)
8008940: e3 ff ff e6 bi 80088d8 <rtems_string_to_long+0x64>
08008784 <rtems_string_to_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008784: 37 9c ff e0 addi sp,sp,-32
8008788: 5b 8b 00 18 sw (sp+24),r11
800878c: 5b 8c 00 14 sw (sp+20),r12
8008790: 5b 8d 00 10 sw (sp+16),r13
8008794: 5b 8e 00 0c sw (sp+12),r14
8008798: 5b 8f 00 08 sw (sp+8),r15
800879c: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
80087a0: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
80087a4: b8 40 58 00 mv r11,r2
80087a8: b8 20 68 00 mv r13,r1
80087ac: b8 60 70 00 mv r14,r3
80087b0: b8 80 78 00 mv r15,r4
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
80087b4: 34 05 00 09 mvi r5,9
80087b8: 44 4c 00 18 be r2,r12,8008818 <rtems_string_to_long_long+0x94>
return RTEMS_INVALID_ADDRESS;
errno = 0;
80087bc: f8 00 14 f4 calli 800db8c <__errno>
80087c0: 58 2c 00 00 sw (r1+0),r12
*n = 0;
80087c4: 59 6c 00 04 sw (r11+4),r12
80087c8: 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 );
80087cc: b9 e0 18 00 mv r3,r15
80087d0: b9 a0 08 00 mv r1,r13
80087d4: 37 82 00 20 addi r2,sp,32
80087d8: f8 00 21 c2 calli 8010ee0 <strtoll>
80087dc: b8 20 60 00 mv r12,r1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
80087e0: 45 c0 00 23 be r14,r0,800886c <rtems_string_to_long_long+0xe8>
*endptr = end;
80087e4: 2b 84 00 20 lw r4,(sp+32)
80087e8: 59 c4 00 00 sw (r14+0),r4
/* nothing was converted */
if ( end == s )
80087ec: 34 05 00 0b mvi r5,11
80087f0: 44 8d 00 0a be r4,r13,8008818 <rtems_string_to_long_long+0x94>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
80087f4: 78 03 7f ff mvhi r3,0x7fff
80087f8: 38 63 ff ff ori r3,r3,0xffff
80087fc: 45 83 00 19 be r12,r3,8008860 <rtems_string_to_long_long+0xdc>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
8008800: 78 01 80 00 mvhi r1,0x8000
8008804: 38 21 00 00 ori r1,r1,0x0
8008808: 45 81 00 0d be r12,r1,800883c <rtems_string_to_long_long+0xb8>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
800880c: 59 62 00 04 sw (r11+4),r2
8008810: 59 6c 00 00 sw (r11+0),r12
8008814: 34 05 00 00 mvi r5,0
#endif
return RTEMS_SUCCESSFUL;
}
8008818: b8 a0 08 00 mv r1,r5
800881c: 2b 9d 00 04 lw ra,(sp+4)
8008820: 2b 8b 00 18 lw r11,(sp+24)
8008824: 2b 8c 00 14 lw r12,(sp+20)
8008828: 2b 8d 00 10 lw r13,(sp+16)
800882c: 2b 8e 00 0c lw r14,(sp+12)
8008830: 2b 8f 00 08 lw r15,(sp+8)
8008834: 37 9c 00 20 addi sp,sp,32
8008838: c3 a0 00 00 ret
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
800883c: 5c 40 ff f4 bne r2,r0,800880c <rtems_string_to_long_long+0x88><== NEVER TAKEN
8008840: 5b 82 00 1c sw (sp+28),r2
8008844: f8 00 14 d2 calli 800db8c <__errno>
8008848: 28 23 00 00 lw r3,(r1+0)
800884c: 34 01 00 22 mvi r1,34
8008850: 2b 82 00 1c lw r2,(sp+28)
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
8008854: 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))
8008858: 5c 61 ff ed bne r3,r1,800880c <rtems_string_to_long_long+0x88><== NEVER TAKEN
800885c: e3 ff ff ef bi 8008818 <rtems_string_to_long_long+0x94>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
8008860: 34 01 ff ff mvi r1,-1
8008864: 5c 41 ff e7 bne r2,r1,8008800 <rtems_string_to_long_long+0x7c><== NEVER TAKEN
8008868: e3 ff ff f6 bi 8008840 <rtems_string_to_long_long+0xbc>
800886c: 2b 84 00 20 lw r4,(sp+32)
8008870: e3 ff ff df bi 80087ec <rtems_string_to_long_long+0x68>
08008944 <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008944: 37 9c ff e8 addi sp,sp,-24
8008948: 5b 8b 00 14 sw (sp+20),r11
800894c: 5b 8c 00 10 sw (sp+16),r12
8008950: 5b 8d 00 0c sw (sp+12),r13
8008954: 5b 8e 00 08 sw (sp+8),r14
8008958: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
800895c: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008960: b8 40 58 00 mv r11,r2
8008964: b8 20 68 00 mv r13,r1
8008968: b8 60 70 00 mv r14,r3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
800896c: 34 04 00 09 mvi r4,9
8008970: 44 4c 00 12 be r2,r12,80089b8 <rtems_string_to_pointer+0x74>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8008974: f8 00 14 86 calli 800db8c <__errno>
8008978: 58 2c 00 00 sw (r1+0),r12
*n = 0;
800897c: 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 );
8008980: b9 a0 08 00 mv r1,r13
8008984: 37 82 00 18 addi r2,sp,24
8008988: 34 03 00 10 mvi r3,16
800898c: f8 00 22 b5 calli 8011460 <strtoul>
8008990: 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 )
8008994: 45 c0 00 17 be r14,r0,80089f0 <rtems_string_to_pointer+0xac>
*endptr = end;
8008998: 2b 82 00 18 lw r2,(sp+24)
800899c: 59 c2 00 00 sw (r14+0),r2
/* nothing was converted */
if ( end == s )
80089a0: 34 04 00 0b mvi r4,11
80089a4: 44 4d 00 05 be r2,r13,80089b8 <rtems_string_to_pointer+0x74>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
80089a8: 34 01 ff ff mvi r1,-1
80089ac: 45 81 00 0b be r12,r1,80089d8 <rtems_string_to_pointer+0x94><== NEVER TAKEN
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
80089b0: 59 6c 00 00 sw (r11+0),r12
80089b4: 34 04 00 00 mvi r4,0
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
80089b8: b8 80 08 00 mv r1,r4
80089bc: 2b 9d 00 04 lw ra,(sp+4)
80089c0: 2b 8b 00 14 lw r11,(sp+20)
80089c4: 2b 8c 00 10 lw r12,(sp+16)
80089c8: 2b 8d 00 0c lw r13,(sp+12)
80089cc: 2b 8e 00 08 lw r14,(sp+8)
80089d0: 37 9c 00 18 addi sp,sp,24
80089d4: c3 a0 00 00 ret
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
80089d8: f8 00 14 6d calli 800db8c <__errno> <== NOT EXECUTED
80089dc: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED
80089e0: 34 01 00 22 mvi r1,34 <== NOT EXECUTED
80089e4: 34 04 00 0a mvi r4,10 <== NOT EXECUTED
80089e8: 5c 41 ff f2 bne r2,r1,80089b0 <rtems_string_to_pointer+0x6c><== NOT EXECUTED
80089ec: e3 ff ff f3 bi 80089b8 <rtems_string_to_pointer+0x74> <== NOT EXECUTED
80089f0: 2b 82 00 18 lw r2,(sp+24)
80089f4: e3 ff ff eb bi 80089a0 <rtems_string_to_pointer+0x5c>
08008a94 <rtems_string_to_unsigned_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008a94: 37 9c ff e4 addi sp,sp,-28
8008a98: 5b 8b 00 18 sw (sp+24),r11
8008a9c: 5b 8c 00 14 sw (sp+20),r12
8008aa0: 5b 8d 00 10 sw (sp+16),r13
8008aa4: 5b 8e 00 0c sw (sp+12),r14
8008aa8: 5b 8f 00 08 sw (sp+8),r15
8008aac: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8008ab0: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008ab4: b8 40 58 00 mv r11,r2
8008ab8: b8 20 68 00 mv r13,r1
8008abc: b8 60 70 00 mv r14,r3
8008ac0: b8 80 78 00 mv r15,r4
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8008ac4: 34 05 00 09 mvi r5,9
8008ac8: 44 4c 00 12 be r2,r12,8008b10 <rtems_string_to_unsigned_int+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8008acc: f8 00 14 30 calli 800db8c <__errno>
8008ad0: 58 2c 00 00 sw (r1+0),r12
*n = 0;
8008ad4: 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 );
8008ad8: b9 e0 18 00 mv r3,r15
8008adc: b9 a0 08 00 mv r1,r13
8008ae0: 37 82 00 1c addi r2,sp,28
8008ae4: f8 00 22 5f calli 8011460 <strtoul>
8008ae8: b8 20 60 00 mv r12,r1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
8008aec: 45 c0 00 18 be r14,r0,8008b4c <rtems_string_to_unsigned_int+0xb8>
*endptr = end;
8008af0: 2b 82 00 1c lw r2,(sp+28)
8008af4: 59 c2 00 00 sw (r14+0),r2
/* nothing was converted */
if ( end == s )
8008af8: 34 05 00 0b mvi r5,11
8008afc: 44 4d 00 05 be r2,r13,8008b10 <rtems_string_to_unsigned_int+0x7c>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
8008b00: 34 01 ff ff mvi r1,-1
8008b04: 45 81 00 0c be r12,r1,8008b34 <rtems_string_to_unsigned_int+0xa0>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
8008b08: 59 6c 00 00 sw (r11+0),r12
8008b0c: 34 05 00 00 mvi r5,0
#endif
return RTEMS_SUCCESSFUL;
}
8008b10: b8 a0 08 00 mv r1,r5
8008b14: 2b 9d 00 04 lw ra,(sp+4)
8008b18: 2b 8b 00 18 lw r11,(sp+24)
8008b1c: 2b 8c 00 14 lw r12,(sp+20)
8008b20: 2b 8d 00 10 lw r13,(sp+16)
8008b24: 2b 8e 00 0c lw r14,(sp+12)
8008b28: 2b 8f 00 08 lw r15,(sp+8)
8008b2c: 37 9c 00 1c addi sp,sp,28
8008b30: c3 a0 00 00 ret
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
8008b34: f8 00 14 16 calli 800db8c <__errno>
8008b38: 28 22 00 00 lw r2,(r1+0)
8008b3c: 34 01 00 22 mvi r1,34
8008b40: 34 05 00 0a mvi r5,10
8008b44: 5c 41 ff f1 bne r2,r1,8008b08 <rtems_string_to_unsigned_int+0x74><== NEVER TAKEN
8008b48: e3 ff ff f2 bi 8008b10 <rtems_string_to_unsigned_int+0x7c>
8008b4c: 2b 82 00 1c lw r2,(sp+28)
8008b50: e3 ff ff ea bi 8008af8 <rtems_string_to_unsigned_int+0x64>
08008c28 <rtems_string_to_unsigned_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008c28: 37 9c ff e4 addi sp,sp,-28
8008c2c: 5b 8b 00 18 sw (sp+24),r11
8008c30: 5b 8c 00 14 sw (sp+20),r12
8008c34: 5b 8d 00 10 sw (sp+16),r13
8008c38: 5b 8e 00 0c sw (sp+12),r14
8008c3c: 5b 8f 00 08 sw (sp+8),r15
8008c40: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8008c44: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008c48: b8 40 58 00 mv r11,r2
8008c4c: b8 20 68 00 mv r13,r1
8008c50: b8 60 70 00 mv r14,r3
8008c54: b8 80 78 00 mv r15,r4
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8008c58: 34 05 00 09 mvi r5,9
8008c5c: 44 4c 00 12 be r2,r12,8008ca4 <rtems_string_to_unsigned_long+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8008c60: f8 00 13 cb calli 800db8c <__errno>
8008c64: 58 2c 00 00 sw (r1+0),r12
*n = 0;
8008c68: 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 );
8008c6c: b9 e0 18 00 mv r3,r15
8008c70: b9 a0 08 00 mv r1,r13
8008c74: 37 82 00 1c addi r2,sp,28
8008c78: f8 00 21 fa calli 8011460 <strtoul>
8008c7c: b8 20 60 00 mv r12,r1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
8008c80: 45 c0 00 18 be r14,r0,8008ce0 <rtems_string_to_unsigned_long+0xb8>
*endptr = end;
8008c84: 2b 82 00 1c lw r2,(sp+28)
8008c88: 59 c2 00 00 sw (r14+0),r2
/* nothing was converted */
if ( end == s )
8008c8c: 34 05 00 0b mvi r5,11
8008c90: 44 4d 00 05 be r2,r13,8008ca4 <rtems_string_to_unsigned_long+0x7c>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
8008c94: 34 01 ff ff mvi r1,-1
8008c98: 45 81 00 0c be r12,r1,8008cc8 <rtems_string_to_unsigned_long+0xa0>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
8008c9c: 59 6c 00 00 sw (r11+0),r12
8008ca0: 34 05 00 00 mvi r5,0
#endif
return RTEMS_SUCCESSFUL;
}
8008ca4: b8 a0 08 00 mv r1,r5
8008ca8: 2b 9d 00 04 lw ra,(sp+4)
8008cac: 2b 8b 00 18 lw r11,(sp+24)
8008cb0: 2b 8c 00 14 lw r12,(sp+20)
8008cb4: 2b 8d 00 10 lw r13,(sp+16)
8008cb8: 2b 8e 00 0c lw r14,(sp+12)
8008cbc: 2b 8f 00 08 lw r15,(sp+8)
8008cc0: 37 9c 00 1c addi sp,sp,28
8008cc4: c3 a0 00 00 ret
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
8008cc8: f8 00 13 b1 calli 800db8c <__errno>
8008ccc: 28 22 00 00 lw r2,(r1+0)
8008cd0: 34 01 00 22 mvi r1,34
8008cd4: 34 05 00 0a mvi r5,10
8008cd8: 5c 41 ff f1 bne r2,r1,8008c9c <rtems_string_to_unsigned_long+0x74><== NEVER TAKEN
8008cdc: e3 ff ff f2 bi 8008ca4 <rtems_string_to_unsigned_long+0x7c>
8008ce0: 2b 82 00 1c lw r2,(sp+28)
8008ce4: e3 ff ff ea bi 8008c8c <rtems_string_to_unsigned_long+0x64>
08008b54 <rtems_string_to_unsigned_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008b54: 37 9c ff e0 addi sp,sp,-32
8008b58: 5b 8b 00 18 sw (sp+24),r11
8008b5c: 5b 8c 00 14 sw (sp+20),r12
8008b60: 5b 8d 00 10 sw (sp+16),r13
8008b64: 5b 8e 00 0c sw (sp+12),r14
8008b68: 5b 8f 00 08 sw (sp+8),r15
8008b6c: 5b 9d 00 04 sw (sp+4),ra
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8008b70: 34 0c 00 00 mvi r12,0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
8008b74: b8 40 58 00 mv r11,r2
8008b78: b8 20 68 00 mv r13,r1
8008b7c: b8 60 70 00 mv r14,r3
8008b80: b8 80 78 00 mv r15,r4
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
8008b84: 34 05 00 09 mvi r5,9
8008b88: 44 4c 00 14 be r2,r12,8008bd8 <rtems_string_to_unsigned_long_long+0x84>
return RTEMS_INVALID_ADDRESS;
errno = 0;
8008b8c: f8 00 14 00 calli 800db8c <__errno>
8008b90: 58 2c 00 00 sw (r1+0),r12
*n = 0;
8008b94: 59 6c 00 04 sw (r11+4),r12
8008b98: 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 );
8008b9c: b9 e0 18 00 mv r3,r15
8008ba0: b9 a0 08 00 mv r1,r13
8008ba4: 37 82 00 20 addi r2,sp,32
8008ba8: f8 00 22 3c calli 8011498 <strtoull>
8008bac: b8 20 60 00 mv r12,r1
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
8008bb0: 45 c0 00 1c be r14,r0,8008c20 <rtems_string_to_unsigned_long_long+0xcc>
*endptr = end;
8008bb4: 2b 84 00 20 lw r4,(sp+32)
8008bb8: 59 c4 00 00 sw (r14+0),r4
/* nothing was converted */
if ( end == s )
8008bbc: 34 05 00 0b mvi r5,11
8008bc0: 44 8d 00 06 be r4,r13,8008bd8 <rtems_string_to_unsigned_long_long+0x84>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
8008bc4: 34 01 ff ff mvi r1,-1
8008bc8: 45 81 00 0d be r12,r1,8008bfc <rtems_string_to_unsigned_long_long+0xa8>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
8008bcc: 59 62 00 04 sw (r11+4),r2
8008bd0: 59 6c 00 00 sw (r11+0),r12
8008bd4: 34 05 00 00 mvi r5,0
#endif
return RTEMS_SUCCESSFUL;
}
8008bd8: b8 a0 08 00 mv r1,r5
8008bdc: 2b 9d 00 04 lw ra,(sp+4)
8008be0: 2b 8b 00 18 lw r11,(sp+24)
8008be4: 2b 8c 00 14 lw r12,(sp+20)
8008be8: 2b 8d 00 10 lw r13,(sp+16)
8008bec: 2b 8e 00 0c lw r14,(sp+12)
8008bf0: 2b 8f 00 08 lw r15,(sp+8)
8008bf4: 37 9c 00 20 addi sp,sp,32
8008bf8: c3 a0 00 00 ret
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
8008bfc: 5c 4c ff f4 bne r2,r12,8008bcc <rtems_string_to_unsigned_long_long+0x78><== NEVER TAKEN
8008c00: 5b 82 00 1c sw (sp+28),r2
8008c04: f8 00 13 e2 calli 800db8c <__errno>
8008c08: 28 23 00 00 lw r3,(r1+0)
8008c0c: 34 01 00 22 mvi r1,34
8008c10: 34 05 00 0a mvi r5,10
8008c14: 2b 82 00 1c lw r2,(sp+28)
8008c18: 5c 61 ff ed bne r3,r1,8008bcc <rtems_string_to_unsigned_long_long+0x78><== NEVER TAKEN
8008c1c: e3 ff ff ef bi 8008bd8 <rtems_string_to_unsigned_long_long+0x84>
8008c20: 2b 84 00 20 lw r4,(sp+32)
8008c24: e3 ff ff e6 bi 8008bbc <rtems_string_to_unsigned_long_long+0x68>
080023e8 <rtems_task_create>:
size_t stack_size,
rtems_mode initial_modes,
rtems_attribute attribute_set,
rtems_id *id
)
{
80023e8: 37 9c ff c8 addi sp,sp,-56
80023ec: 5b 8b 00 38 sw (sp+56),r11
80023f0: 5b 8c 00 34 sw (sp+52),r12
80023f4: 5b 8d 00 30 sw (sp+48),r13
80023f8: 5b 8e 00 2c sw (sp+44),r14
80023fc: 5b 8f 00 28 sw (sp+40),r15
8002400: 5b 90 00 24 sw (sp+36),r16
8002404: 5b 91 00 20 sw (sp+32),r17
8002408: 5b 92 00 1c sw (sp+28),r18
800240c: 5b 93 00 18 sw (sp+24),r19
8002410: 5b 94 00 14 sw (sp+20),r20
8002414: 5b 9d 00 10 sw (sp+16),ra
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
8002418: 34 07 00 09 mvi r7,9
size_t stack_size,
rtems_mode initial_modes,
rtems_attribute attribute_set,
rtems_id *id
)
{
800241c: b8 c0 80 00 mv r16,r6
8002420: b8 20 78 00 mv r15,r1
8002424: b8 40 60 00 mv r12,r2
8002428: b8 60 90 00 mv r18,r3
800242c: b8 80 58 00 mv r11,r4
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
8002430: 44 c0 00 39 be r6,r0,8002514 <rtems_task_create+0x12c> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
8002434: 34 07 00 03 mvi r7,3
8002438: 44 20 00 37 be r1,r0,8002514 <rtems_task_create+0x12c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE rtems_attribute _Attributes_Clear (
rtems_attribute attribute_set,
rtems_attribute mask
)
{
return attribute_set & ~mask;
800243c: 34 02 ff fe mvi r2,-2
/*
* Validate the RTEMS API priority and convert it to the core priority range.
*/
if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
8002440: 20 a1 80 00 andi r1,r5,0x8000
8002444: a0 a2 98 00 and r19,r5,r2
8002448: 5c 20 00 06 bne r1,r0,8002460 <rtems_task_create+0x78>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
800244c: 45 81 00 40 be r12,r1,800254c <rtems_task_create+0x164> <== NEVER TAKEN
8002450: 78 01 08 01 mvhi r1,0x801
8002454: 38 21 e0 c0 ori r1,r1,0xe0c0
8002458: 40 21 00 00 lbu r1,(r1+0)
800245c: 55 81 00 3c bgu r12,r1,800254c <rtems_task_create+0x164> <== NEVER TAKEN
*/
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
8002460: 78 0d 08 01 mvhi r13,0x801
8002464: 39 ad e9 58 ori r13,r13,0xe958
8002468: 29 a1 00 00 lw r1,(r13+0)
* the event of an error.
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
800246c: 34 11 00 00 mvi r17,0
*/
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
8002470: f8 00 02 34 calli 8002d40 <_API_Mutex_Lock>
* This function allocates a task control block from
* the inactive chain of free task control blocks.
*/
RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
8002474: 78 01 08 01 mvhi r1,0x801
8002478: 38 21 e7 ec ori r1,r1,0xe7ec
800247c: f8 00 04 f0 calli 800383c <_Objects_Allocate>
8002480: b8 20 70 00 mv r14,r1
* the event of an error.
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
8002484: 44 31 00 3c be r1,r17,8002574 <rtems_task_create+0x18c>
/*
* Initialize the core thread for this task.
*/
status = _Thread_Initialize(
8002488: 34 02 00 08 mvi r2,8
800248c: b9 60 08 00 mv r1,r11
8002490: fb ff f7 80 calli 8000290 <__lshrsi3>
8002494: 18 27 00 01 xori r7,r1,0x1
8002498: 34 02 00 09 mvi r2,9
800249c: b9 60 08 00 mv r1,r11
80024a0: 20 f4 00 01 andi r20,r7,0x1
80024a4: fb ff f7 7b calli 8000290 <__lshrsi3>
80024a8: 20 28 00 01 andi r8,r1,0x1
80024ac: 78 01 08 01 mvhi r1,0x801
80024b0: 21 69 00 01 andi r9,r11,0x1
80024b4: 22 65 00 01 andi r5,r19,0x1
80024b8: 38 21 e7 ec ori r1,r1,0xe7ec
80024bc: ba 40 20 00 mv r4,r18
80024c0: b9 80 30 00 mv r6,r12
80024c4: ba 80 38 00 mv r7,r20
80024c8: b9 c0 10 00 mv r2,r14
80024cc: ba 20 18 00 mv r3,r17
80024d0: 5b 89 00 08 sw (sp+8),r9
80024d4: 5b 8f 00 0c sw (sp+12),r15
80024d8: 5b 91 00 04 sw (sp+4),r17
80024dc: f8 00 08 f1 calli 80048a0 <_Thread_Initialize>
NULL, /* no budget algorithm callout */
_Modes_Get_interrupt_level(initial_modes),
(Objects_Name) name
);
if ( !status ) {
80024e0: 44 20 00 1d be r1,r0,8002554 <rtems_task_create+0x16c>
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
80024e4: 34 02 00 0a mvi r2,10
80024e8: b9 60 08 00 mv r1,r11
80024ec: fb ff f7 69 calli 8000290 <__lshrsi3>
80024f0: 29 c3 01 28 lw r3,(r14+296)
*id = the_thread->Object.id;
80024f4: 29 ce 00 08 lw r14,(r14+8)
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
80024f8: 18 22 00 01 xori r2,r1,0x1
);
}
#endif
_RTEMS_Unlock_allocator();
80024fc: 29 a1 00 00 lw r1,(r13+0)
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
8002500: 20 42 00 01 andi r2,r2,0x1
*id = the_thread->Object.id;
8002504: 5a 0e 00 00 sw (r16+0),r14
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
8002508: 30 62 00 08 sb (r3+8),r2
);
}
#endif
_RTEMS_Unlock_allocator();
800250c: f8 00 02 29 calli 8002db0 <_API_Mutex_Unlock>
8002510: ba 20 38 00 mv r7,r17
return RTEMS_SUCCESSFUL;
}
8002514: b8 e0 08 00 mv r1,r7
8002518: 2b 9d 00 10 lw ra,(sp+16)
800251c: 2b 8b 00 38 lw r11,(sp+56)
8002520: 2b 8c 00 34 lw r12,(sp+52)
8002524: 2b 8d 00 30 lw r13,(sp+48)
8002528: 2b 8e 00 2c lw r14,(sp+44)
800252c: 2b 8f 00 28 lw r15,(sp+40)
8002530: 2b 90 00 24 lw r16,(sp+36)
8002534: 2b 91 00 20 lw r17,(sp+32)
8002538: 2b 92 00 1c lw r18,(sp+28)
800253c: 2b 93 00 18 lw r19,(sp+24)
8002540: 2b 94 00 14 lw r20,(sp+20)
8002544: 37 9c 00 38 addi sp,sp,56
8002548: c3 a0 00 00 ret
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
800254c: 34 07 00 13 mvi r7,19 <== NOT EXECUTED
8002550: e3 ff ff f1 bi 8002514 <rtems_task_create+0x12c> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free (
Thread_Control *the_task
)
{
_Objects_Free(
8002554: 29 c1 00 08 lw r1,(r14+8)
8002558: f8 00 05 f1 calli 8003d1c <_Objects_Get_information_id>
800255c: b9 c0 10 00 mv r2,r14
8002560: f8 00 05 c4 calli 8003c70 <_Objects_Free>
#if defined(RTEMS_MULTIPROCESSING)
if ( is_global )
_Objects_MP_Free_global_object( the_global_object );
#endif
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
8002564: 29 a1 00 00 lw r1,(r13+0)
8002568: f8 00 02 12 calli 8002db0 <_API_Mutex_Unlock>
800256c: 34 07 00 0d mvi r7,13
return RTEMS_UNSATISFIED;
8002570: e3 ff ff e9 bi 8002514 <rtems_task_create+0x12c>
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
8002574: 29 a1 00 00 lw r1,(r13+0)
8002578: f8 00 02 0e calli 8002db0 <_API_Mutex_Unlock>
800257c: 34 07 00 05 mvi r7,5
return RTEMS_TOO_MANY;
8002580: e3 ff ff e5 bi 8002514 <rtems_task_create+0x12c>
08002584 <rtems_task_delete>:
*/
rtems_status_code rtems_task_delete(
rtems_id id
)
{
8002584: 37 9c ff ec addi sp,sp,-20
8002588: 5b 8b 00 10 sw (sp+16),r11
800258c: 5b 8c 00 0c sw (sp+12),r12
8002590: 5b 8d 00 08 sw (sp+8),r13
8002594: 5b 9d 00 04 sw (sp+4),ra
register Thread_Control *the_thread;
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
8002598: 78 0b 08 01 mvhi r11,0x801
800259c: 39 6b e9 58 ori r11,r11,0xe958
*/
rtems_status_code rtems_task_delete(
rtems_id id
)
{
80025a0: b8 20 60 00 mv r12,r1
register Thread_Control *the_thread;
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
80025a4: 29 61 00 00 lw r1,(r11+0)
80025a8: f8 00 01 e6 calli 8002d40 <_API_Mutex_Lock>
the_thread = _Thread_Get( id, &location );
80025ac: b9 80 08 00 mv r1,r12
80025b0: 37 82 00 14 addi r2,sp,20
80025b4: f8 00 08 6a calli 800475c <_Thread_Get>
switch ( location ) {
80025b8: 2b 8d 00 14 lw r13,(sp+20)
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
the_thread = _Thread_Get( id, &location );
80025bc: b8 20 60 00 mv r12,r1
switch ( location ) {
80025c0: 45 a0 00 0a be r13,r0,80025e8 <rtems_task_delete+0x64> <== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
_RTEMS_Unlock_allocator();
80025c4: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
80025c8: f8 00 01 fa calli 8002db0 <_API_Mutex_Unlock> <== NOT EXECUTED
80025cc: 34 01 00 04 mvi r1,4 <== NOT EXECUTED
return RTEMS_INVALID_ID;
}
80025d0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80025d4: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
80025d8: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
80025dc: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
80025e0: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
80025e4: c3 a0 00 00 ret <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_information = _Objects_Get_information_id( the_thread->Object.id );
80025e8: 28 21 00 08 lw r1,(r1+8)
80025ec: f8 00 05 cc calli 8003d1c <_Objects_Get_information_id>
0 /* Not used */
);
}
#endif
_Thread_Close( the_information, the_thread );
80025f0: b9 80 10 00 mv r2,r12
80025f4: f8 00 07 5d calli 8004368 <_Thread_Close>
80025f8: 29 81 00 08 lw r1,(r12+8)
80025fc: f8 00 05 c8 calli 8003d1c <_Objects_Get_information_id>
8002600: b9 80 10 00 mv r2,r12
8002604: f8 00 05 9b calli 8003c70 <_Objects_Free>
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
8002608: 29 61 00 00 lw r1,(r11+0)
800260c: f8 00 01 e9 calli 8002db0 <_API_Mutex_Unlock>
_Thread_Enable_dispatch();
8002610: f8 00 08 46 calli 8004728 <_Thread_Enable_dispatch>
8002614: b9 a0 08 00 mv r1,r13
break;
}
_RTEMS_Unlock_allocator();
return RTEMS_INVALID_ID;
}
8002618: 2b 9d 00 04 lw ra,(sp+4)
800261c: 2b 8b 00 10 lw r11,(sp+16)
8002620: 2b 8c 00 0c lw r12,(sp+12)
8002624: 2b 8d 00 08 lw r13,(sp+8)
8002628: 37 9c 00 14 addi sp,sp,20
800262c: c3 a0 00 00 ret
08004ae0 <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
8004ae0: 37 9c ff e8 addi sp,sp,-24
8004ae4: 5b 8b 00 10 sw (sp+16),r11
8004ae8: 5b 8c 00 0c sw (sp+12),r12
8004aec: 5b 8d 00 08 sw (sp+8),r13
8004af0: 5b 9d 00 04 sw (sp+4),ra
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
8004af4: 78 04 08 02 mvhi r4,0x802
8004af8: 38 84 50 8c ori r4,r4,0x508c
8004afc: 40 85 00 04 lbu r5,(r4+4)
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
8004b00: b8 40 58 00 mv r11,r2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
8004b04: 34 04 00 16 mvi r4,22
8004b08: 44 a0 00 06 be r5,r0,8004b20 <rtems_task_get_note+0x40>
return RTEMS_NOT_CONFIGURED;
if ( !note )
8004b0c: 34 04 00 09 mvi r4,9
8004b10: 44 60 00 04 be r3,r0,8004b20 <rtems_task_get_note+0x40> <== NEVER TAKEN
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
8004b14: 34 04 00 0f mvi r4,15
8004b18: 50 8b 00 09 bgeu r4,r11,8004b3c <rtems_task_get_note+0x5c> <== ALWAYS TAKEN
8004b1c: 34 04 00 0a mvi r4,10 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8004b20: b8 80 08 00 mv r1,r4
8004b24: 2b 9d 00 04 lw ra,(sp+4)
8004b28: 2b 8b 00 10 lw r11,(sp+16)
8004b2c: 2b 8c 00 0c lw r12,(sp+12)
8004b30: 2b 8d 00 08 lw r13,(sp+8)
8004b34: 37 9c 00 18 addi sp,sp,24
8004b38: c3 a0 00 00 ret
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
8004b3c: 44 20 00 17 be r1,r0,8004b98 <rtems_task_get_note+0xb8>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
8004b40: 78 04 08 02 mvhi r4,0x802
8004b44: 38 84 5c 08 ori r4,r4,0x5c08
8004b48: 28 84 00 00 lw r4,(r4+0)
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
8004b4c: 28 85 00 08 lw r5,(r4+8)
8004b50: 44 25 00 15 be r1,r5,8004ba4 <rtems_task_get_note+0xc4>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
8004b54: 37 82 00 18 addi r2,sp,24
8004b58: 5b 83 00 14 sw (sp+20),r3
8004b5c: f8 00 0a 1f calli 80073d8 <_Thread_Get>
switch ( location ) {
8004b60: 2b 8c 00 18 lw r12,(sp+24)
8004b64: 34 04 00 04 mvi r4,4
8004b68: 5d 80 ff ee bne r12,r0,8004b20 <rtems_task_get_note+0x40> <== NEVER TAKEN
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
8004b6c: 28 2d 01 28 lw r13,(r1+296)
8004b70: 34 02 00 02 mvi r2,2
8004b74: 35 61 00 08 addi r1,r11,8
8004b78: fb ff f5 f5 calli 800234c <__ashlsi3>
8004b7c: b5 a1 08 00 add r1,r13,r1
8004b80: 2b 83 00 14 lw r3,(sp+20)
8004b84: 28 21 00 00 lw r1,(r1+0)
8004b88: 58 61 00 00 sw (r3+0),r1
_Thread_Enable_dispatch();
8004b8c: f8 00 0a 06 calli 80073a4 <_Thread_Enable_dispatch>
8004b90: b9 80 20 00 mv r4,r12
return RTEMS_SUCCESSFUL;
8004b94: e3 ff ff e3 bi 8004b20 <rtems_task_get_note+0x40>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
8004b98: 78 01 08 02 mvhi r1,0x802
8004b9c: 38 21 5c 08 ori r1,r1,0x5c08
8004ba0: 28 24 00 00 lw r4,(r1+0)
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
8004ba4: 28 8c 01 28 lw r12,(r4+296)
8004ba8: 35 61 00 08 addi r1,r11,8
8004bac: 34 02 00 02 mvi r2,2
8004bb0: 5b 83 00 14 sw (sp+20),r3
8004bb4: fb ff f5 e6 calli 800234c <__ashlsi3>
8004bb8: b5 81 08 00 add r1,r12,r1
8004bbc: 28 21 00 00 lw r1,(r1+0)
8004bc0: 2b 83 00 14 lw r3,(sp+20)
8004bc4: 34 04 00 00 mvi r4,0
8004bc8: 58 61 00 00 sw (r3+0),r1
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8004bcc: b8 80 08 00 mv r1,r4
8004bd0: 2b 9d 00 04 lw ra,(sp+4)
8004bd4: 2b 8b 00 10 lw r11,(sp+16)
8004bd8: 2b 8c 00 0c lw r12,(sp+12)
8004bdc: 2b 8d 00 08 lw r13,(sp+8)
8004be0: 37 9c 00 18 addi sp,sp,24
8004be4: c3 a0 00 00 ret
08002630 <rtems_task_ident>:
rtems_status_code rtems_task_ident(
rtems_name name,
uint32_t node,
rtems_id *id
)
{
8002630: 37 9c ff f8 addi sp,sp,-8
8002634: 5b 8b 00 08 sw (sp+8),r11
8002638: 5b 9d 00 04 sw (sp+4),ra
800263c: b8 60 20 00 mv r4,r3
8002640: b8 20 28 00 mv r5,r1
8002644: b8 40 18 00 mv r3,r2
Objects_Name_or_id_lookup_errors status;
if ( !id )
8002648: 34 01 00 09 mvi r1,9
800264c: 44 80 00 08 be r4,r0,800266c <rtems_task_ident+0x3c> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( name == OBJECTS_ID_OF_SELF ) {
8002650: 5c a0 00 0b bne r5,r0,800267c <rtems_task_ident+0x4c>
*id = _Thread_Executing->Object.id;
8002654: 78 01 08 01 mvhi r1,0x801
8002658: 38 21 e9 60 ori r1,r1,0xe960
800265c: 28 22 00 00 lw r2,(r1+0)
8002660: b8 a0 08 00 mv r1,r5
8002664: 28 42 00 08 lw r2,(r2+8)
8002668: 58 82 00 00 sw (r4+0),r2
}
status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
return _Status_Object_name_errors_to_status[ status ];
}
800266c: 2b 9d 00 04 lw ra,(sp+4)
8002670: 2b 8b 00 08 lw r11,(sp+8)
8002674: 37 9c 00 08 addi sp,sp,8
8002678: c3 a0 00 00 ret
if ( name == OBJECTS_ID_OF_SELF ) {
*id = _Thread_Executing->Object.id;
return RTEMS_SUCCESSFUL;
}
status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
800267c: 78 01 08 01 mvhi r1,0x801
8002680: b8 a0 10 00 mv r2,r5
8002684: 38 21 e7 ec ori r1,r1,0xe7ec
8002688: f8 00 06 36 calli 8003f60 <_Objects_Name_to_id_u32>
return _Status_Object_name_errors_to_status[ status ];
800268c: 34 02 00 02 mvi r2,2
8002690: 78 0b 08 01 mvhi r11,0x801
8002694: fb ff f6 d7 calli 80001f0 <__ashlsi3>
8002698: 39 6b c9 70 ori r11,r11,0xc970
800269c: b5 61 08 00 add r1,r11,r1
80026a0: 28 21 00 00 lw r1,(r1+0)
}
80026a4: 2b 9d 00 04 lw ra,(sp+4)
80026a8: 2b 8b 00 08 lw r11,(sp+8)
80026ac: 37 9c 00 08 addi sp,sp,8
80026b0: c3 a0 00 00 ret
08003188 <rtems_task_is_suspended>:
*/
rtems_status_code rtems_task_is_suspended(
rtems_id id
)
{
8003188: 37 9c ff f4 addi sp,sp,-12
800318c: 5b 8b 00 08 sw (sp+8),r11
8003190: 5b 9d 00 04 sw (sp+4),ra
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
8003194: 37 82 00 0c addi r2,sp,12
8003198: f8 00 08 99 calli 80053fc <_Thread_Get>
switch ( location ) {
800319c: 2b 82 00 0c lw r2,(sp+12)
)
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
80031a0: b8 20 18 00 mv r3,r1
switch ( location ) {
80031a4: 34 01 00 04 mvi r1,4
80031a8: 44 40 00 05 be r2,r0,80031bc <rtems_task_is_suspended+0x34><== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80031ac: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80031b0: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
80031b4: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
80031b8: c3 a0 00 00 ret <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
80031bc: 28 6b 00 10 lw r11,(r3+16)
80031c0: 21 6b 00 02 andi r11,r11,0x2
80031c4: 45 62 00 07 be r11,r2,80031e0 <rtems_task_is_suspended+0x58>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
80031c8: f8 00 08 80 calli 80053c8 <_Thread_Enable_dispatch>
80031cc: 34 01 00 0f mvi r1,15
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80031d0: 2b 9d 00 04 lw ra,(sp+4)
80031d4: 2b 8b 00 08 lw r11,(sp+8)
80031d8: 37 9c 00 0c addi sp,sp,12
80031dc: c3 a0 00 00 ret
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Enable_dispatch();
80031e0: f8 00 08 7a calli 80053c8 <_Thread_Enable_dispatch>
80031e4: b9 60 08 00 mv r1,r11
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80031e8: 2b 9d 00 04 lw ra,(sp+4)
80031ec: 2b 8b 00 08 lw r11,(sp+8)
80031f0: 37 9c 00 0c addi sp,sp,12
80031f4: c3 a0 00 00 ret
0800be7c <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
800be7c: 37 9c ff e0 addi sp,sp,-32
800be80: 5b 8b 00 20 sw (sp+32),r11
800be84: 5b 8c 00 1c sw (sp+28),r12
800be88: 5b 8d 00 18 sw (sp+24),r13
800be8c: 5b 8e 00 14 sw (sp+20),r14
800be90: 5b 8f 00 10 sw (sp+16),r15
800be94: 5b 90 00 0c sw (sp+12),r16
800be98: 5b 91 00 08 sw (sp+8),r17
800be9c: 5b 9d 00 04 sw (sp+4),ra
800bea0: b8 40 68 00 mv r13,r2
800bea4: b8 60 80 00 mv r16,r3
800bea8: b8 20 78 00 mv r15,r1
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
800beac: 34 02 00 09 mvi r2,9
800beb0: 44 60 00 44 be r3,r0,800bfc0 <rtems_task_mode+0x144> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
800beb4: 78 02 08 01 mvhi r2,0x801
800beb8: 38 42 e9 60 ori r2,r2,0xe960
800bebc: 28 4b 00 00 lw r11,(r2+0)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
800bec0: 34 0e 00 00 mvi r14,0
800bec4: 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 ];
800bec8: 29 6c 01 28 lw r12,(r11+296)
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
800becc: 44 2e 00 55 be r1,r14,800c020 <rtems_task_mode+0x1a4>
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
800bed0: 29 61 00 7c lw r1,(r11+124)
800bed4: 5c 20 00 4e bne r1,r0,800c00c <rtems_task_mode+0x190>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
800bed8: 41 81 00 08 lbu r1,(r12+8)
800bedc: 34 11 00 00 mvi r17,0
800bee0: 44 31 00 43 be r1,r17,800bfec <rtems_task_mode+0x170>
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();
800bee4: fb ff e8 db calli 8006250 <_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;
800bee8: ba 21 88 00 or r17,r17,r1
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
800beec: ba 2e 88 00 or r17,r17,r14
800bef0: 5a 11 00 00 sw (r16+0),r17
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
800bef4: 21 a1 01 00 andi r1,r13,0x100
800bef8: 44 20 00 07 be r1,r0,800bf14 <rtems_task_mode+0x98>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
800befc: b9 e0 08 00 mv r1,r15
800bf00: 34 02 00 08 mvi r2,8
800bf04: fb ff d0 e3 calli 8000290 <__lshrsi3>
800bf08: 18 21 00 01 xori r1,r1,0x1
800bf0c: 20 21 00 01 andi r1,r1,0x1
800bf10: 31 61 00 75 sb (r11+117),r1
if ( mask & RTEMS_TIMESLICE_MASK ) {
800bf14: 21 a1 02 00 andi r1,r13,0x200
800bf18: 44 20 00 09 be r1,r0,800bf3c <rtems_task_mode+0xc0>
if ( _Modes_Is_timeslice(mode_set) ) {
800bf1c: 21 e1 02 00 andi r1,r15,0x200
800bf20: 44 20 00 44 be r1,r0,800c030 <rtems_task_mode+0x1b4>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
800bf24: 78 01 08 01 mvhi r1,0x801
800bf28: 38 21 e8 34 ori r1,r1,0xe834
800bf2c: 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;
800bf30: 34 02 00 01 mvi r2,1
800bf34: 59 62 00 7c sw (r11+124),r2
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
800bf38: 59 61 00 78 sw (r11+120),r1
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
800bf3c: 21 a1 00 01 andi r1,r13,0x1
800bf40: 44 20 00 04 be r1,r0,800bf50 <rtems_task_mode+0xd4>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
800bf44: 19 e1 00 01 xori r1,r15,0x1
800bf48: 20 21 00 01 andi r1,r1,0x1
800bf4c: d0 01 00 00 wcsr IE,r1
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
800bf50: 21 ad 04 00 andi r13,r13,0x400
800bf54: 45 a0 00 14 be r13,r0,800bfa4 <rtems_task_mode+0x128>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
800bf58: 34 02 00 0a mvi r2,10
800bf5c: b9 e0 08 00 mv r1,r15
800bf60: fb ff d0 cc calli 8000290 <__lshrsi3>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
800bf64: 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(
800bf68: 18 21 00 01 xori r1,r1,0x1
800bf6c: 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;
800bf70: 44 41 00 0d be r2,r1,800bfa4 <rtems_task_mode+0x128>
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;
800bf74: 31 81 00 08 sb (r12+8),r1
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
800bf78: 90 00 08 00 rcsr r1,IE
800bf7c: 34 02 ff fe mvi r2,-2
800bf80: a0 22 10 00 and r2,r1,r2
800bf84: d0 02 00 00 wcsr IE,r2
_signals = information->signals_pending;
800bf88: 29 82 00 18 lw r2,(r12+24)
information->signals_pending = information->signals_posted;
800bf8c: 29 83 00 14 lw r3,(r12+20)
information->signals_posted = _signals;
800bf90: 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;
800bf94: 59 83 00 18 sw (r12+24),r3
information->signals_posted = _signals;
_ISR_Enable( _level );
800bf98: 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;
800bf9c: 29 81 00 14 lw r1,(r12+20)
800bfa0: 5c 20 00 2e bne r1,r0,800c058 <rtems_task_mode+0x1dc>
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;
800bfa4: 34 0b 00 00 mvi r11,0
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
800bfa8: 78 01 08 01 mvhi r1,0x801
800bfac: 38 21 ea 40 ori r1,r1,0xea40
800bfb0: 28 22 00 00 lw r2,(r1+0)
800bfb4: 34 01 00 03 mvi r1,3
800bfb8: 44 41 00 22 be r2,r1,800c040 <rtems_task_mode+0x1c4> <== ALWAYS TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
800bfbc: 34 02 00 00 mvi r2,0
return RTEMS_SUCCESSFUL;
}
800bfc0: b8 40 08 00 mv r1,r2
800bfc4: 2b 9d 00 04 lw ra,(sp+4)
800bfc8: 2b 8b 00 20 lw r11,(sp+32)
800bfcc: 2b 8c 00 1c lw r12,(sp+28)
800bfd0: 2b 8d 00 18 lw r13,(sp+24)
800bfd4: 2b 8e 00 14 lw r14,(sp+20)
800bfd8: 2b 8f 00 10 lw r15,(sp+16)
800bfdc: 2b 90 00 0c lw r16,(sp+12)
800bfe0: 2b 91 00 08 lw r17,(sp+8)
800bfe4: 37 9c 00 20 addi sp,sp,32
800bfe8: c3 a0 00 00 ret
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();
800bfec: fb ff e8 99 calli 8006250 <_CPU_ISR_Get_level>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
800bff0: 34 11 04 00 mvi r17,1024
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;
800bff4: ba 21 88 00 or r17,r17,r1
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
800bff8: ba 2e 88 00 or r17,r17,r14
800bffc: 5a 11 00 00 sw (r16+0),r17
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
800c000: 21 a1 01 00 andi r1,r13,0x100
800c004: 44 20 ff c4 be r1,r0,800bf14 <rtems_task_mode+0x98>
800c008: e3 ff ff bd bi 800befc <rtems_task_mode+0x80>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
800c00c: 41 81 00 08 lbu r1,(r12+8)
800c010: 34 11 00 00 mvi r17,0
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
800c014: 39 ce 02 00 ori r14,r14,0x200
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
800c018: 5c 31 ff b3 bne r1,r17,800bee4 <rtems_task_mode+0x68>
800c01c: e3 ff ff f4 bi 800bfec <rtems_task_mode+0x170>
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
800c020: 29 61 00 7c lw r1,(r11+124)
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
800c024: 34 0e 01 00 mvi r14,256
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
800c028: 44 20 ff ac be r1,r0,800bed8 <rtems_task_mode+0x5c>
800c02c: e3 ff ff f8 bi 800c00c <rtems_task_mode+0x190>
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
800c030: 59 61 00 7c sw (r11+124),r1
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
800c034: 21 a1 00 01 andi r1,r13,0x1
800c038: 44 20 ff c6 be r1,r0,800bf50 <rtems_task_mode+0xd4>
800c03c: e3 ff ff c2 bi 800bf44 <rtems_task_mode+0xc8>
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
800c040: f8 00 01 23 calli 800c4cc <_Thread_Evaluate_mode>
800c044: 5c 20 00 02 bne r1,r0,800c04c <rtems_task_mode+0x1d0>
800c048: 45 61 ff dd be r11,r1,800bfbc <rtems_task_mode+0x140>
_Thread_Dispatch();
800c04c: fb ff e1 40 calli 800454c <_Thread_Dispatch>
800c050: 34 02 00 00 mvi r2,0
800c054: e3 ff ff db bi 800bfc0 <rtems_task_mode+0x144>
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;
800c058: 34 01 00 01 mvi r1,1
800c05c: 31 61 00 74 sb (r11+116),r1
800c060: b8 20 58 00 mv r11,r1
800c064: e3 ff ff d1 bi 800bfa8 <rtems_task_mode+0x12c>
0800352c <rtems_task_restart>:
rtems_status_code rtems_task_restart(
rtems_id id,
uint32_t argument
)
{
800352c: 37 9c ff f0 addi sp,sp,-16
8003530: 5b 8b 00 0c sw (sp+12),r11
8003534: 5b 8c 00 08 sw (sp+8),r12
8003538: 5b 9d 00 04 sw (sp+4),ra
800353c: b8 40 60 00 mv r12,r2
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
8003540: 37 82 00 10 addi r2,sp,16
8003544: f8 00 08 77 calli 8005720 <_Thread_Get>
switch ( location ) {
8003548: 2b 8b 00 10 lw r11,(sp+16)
800354c: 34 04 00 04 mvi r4,4
8003550: 45 60 00 07 be r11,r0,800356c <rtems_task_restart+0x40> <== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003554: b8 80 08 00 mv r1,r4 <== NOT EXECUTED
8003558: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800355c: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8003560: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8003564: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
8003568: c3 a0 00 00 ret <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Thread_Restart( the_thread, NULL, argument ) ) {
800356c: b9 80 18 00 mv r3,r12
8003570: b9 60 10 00 mv r2,r11
8003574: f8 00 0b 2a calli 800621c <_Thread_Restart>
8003578: 5c 2b 00 09 bne r1,r11,800359c <rtems_task_restart+0x70> <== ALWAYS TAKEN
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
800357c: f8 00 08 5c calli 80056ec <_Thread_Enable_dispatch> <== NOT EXECUTED
8003580: 34 04 00 0e mvi r4,14 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003584: b8 80 08 00 mv r1,r4 <== NOT EXECUTED
8003588: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800358c: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8003590: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8003594: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
8003598: c3 a0 00 00 ret <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Thread_Restart( the_thread, NULL, argument ) ) {
_Thread_Enable_dispatch();
800359c: f8 00 08 54 calli 80056ec <_Thread_Enable_dispatch>
80035a0: b9 60 20 00 mv r4,r11
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80035a4: b8 80 08 00 mv r1,r4
80035a8: 2b 9d 00 04 lw ra,(sp+4)
80035ac: 2b 8b 00 0c lw r11,(sp+12)
80035b0: 2b 8c 00 08 lw r12,(sp+8)
80035b4: 37 9c 00 10 addi sp,sp,16
80035b8: c3 a0 00 00 ret
08007a90 <rtems_task_resume>:
*/
rtems_status_code rtems_task_resume(
rtems_id id
)
{
8007a90: 37 9c ff f4 addi sp,sp,-12
8007a94: 5b 8b 00 08 sw (sp+8),r11
8007a98: 5b 9d 00 04 sw (sp+4),ra
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
8007a9c: 37 82 00 0c addi r2,sp,12
8007aa0: f8 00 09 b3 calli 800a16c <_Thread_Get>
switch ( location ) {
8007aa4: 2b 8b 00 0c lw r11,(sp+12)
8007aa8: 34 02 00 04 mvi r2,4
8007aac: 45 60 00 06 be r11,r0,8007ac4 <rtems_task_resume+0x34> <== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8007ab0: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
8007ab4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8007ab8: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8007abc: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8007ac0: c3 a0 00 00 ret <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
8007ac4: 28 22 00 10 lw r2,(r1+16)
8007ac8: 20 42 00 02 andi r2,r2,0x2
8007acc: 5c 4b 00 08 bne r2,r11,8007aec <rtems_task_resume+0x5c> <== ALWAYS TAKEN
_Thread_Resume( the_thread, true );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
8007ad0: f8 00 09 87 calli 800a0ec <_Thread_Enable_dispatch> <== NOT EXECUTED
8007ad4: 34 02 00 0e mvi r2,14 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8007ad8: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
8007adc: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8007ae0: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8007ae4: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8007ae8: c3 a0 00 00 ret <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
_Thread_Resume( the_thread, true );
8007aec: 34 02 00 01 mvi r2,1
8007af0: f8 00 0c 6e calli 800aca8 <_Thread_Resume>
_Thread_Enable_dispatch();
8007af4: f8 00 09 7e calli 800a0ec <_Thread_Enable_dispatch>
8007af8: b9 60 10 00 mv r2,r11
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8007afc: b8 40 08 00 mv r1,r2
8007b00: 2b 9d 00 04 lw ra,(sp+4)
8007b04: 2b 8b 00 08 lw r11,(sp+8)
8007b08: 37 9c 00 0c addi sp,sp,12
8007b0c: c3 a0 00 00 ret
08004d40 <rtems_task_set_note>:
rtems_status_code rtems_task_set_note(
rtems_id id,
uint32_t notepad,
uint32_t note
)
{
8004d40: 37 9c ff e8 addi sp,sp,-24
8004d44: 5b 8b 00 10 sw (sp+16),r11
8004d48: 5b 8c 00 0c sw (sp+12),r12
8004d4c: 5b 8d 00 08 sw (sp+8),r13
8004d50: 5b 9d 00 04 sw (sp+4),ra
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
8004d54: 78 04 08 02 mvhi r4,0x802
8004d58: 38 84 50 8c ori r4,r4,0x508c
8004d5c: 40 85 00 04 lbu r5,(r4+4)
rtems_status_code rtems_task_set_note(
rtems_id id,
uint32_t notepad,
uint32_t note
)
{
8004d60: b8 40 58 00 mv r11,r2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
8004d64: 34 04 00 16 mvi r4,22
8004d68: 44 a0 00 04 be r5,r0,8004d78 <rtems_task_set_note+0x38>
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
8004d6c: 34 04 00 0f mvi r4,15
8004d70: 50 8b 00 09 bgeu r4,r11,8004d94 <rtems_task_set_note+0x54> <== ALWAYS TAKEN
8004d74: 34 04 00 0a mvi r4,10 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8004d78: b8 80 08 00 mv r1,r4
8004d7c: 2b 9d 00 04 lw ra,(sp+4)
8004d80: 2b 8b 00 10 lw r11,(sp+16)
8004d84: 2b 8c 00 0c lw r12,(sp+12)
8004d88: 2b 8d 00 08 lw r13,(sp+8)
8004d8c: 37 9c 00 18 addi sp,sp,24
8004d90: c3 a0 00 00 ret
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
8004d94: 44 20 00 16 be r1,r0,8004dec <rtems_task_set_note+0xac>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
8004d98: 78 04 08 02 mvhi r4,0x802
8004d9c: 38 84 5c 08 ori r4,r4,0x5c08
8004da0: 28 84 00 00 lw r4,(r4+0)
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
8004da4: 28 85 00 08 lw r5,(r4+8)
8004da8: 44 25 00 14 be r1,r5,8004df8 <rtems_task_set_note+0xb8>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
8004dac: 37 82 00 18 addi r2,sp,24
8004db0: 5b 83 00 14 sw (sp+20),r3
8004db4: f8 00 09 89 calli 80073d8 <_Thread_Get>
switch ( location ) {
8004db8: 2b 8c 00 18 lw r12,(sp+24)
8004dbc: 34 04 00 04 mvi r4,4
8004dc0: 5d 80 ff ee bne r12,r0,8004d78 <rtems_task_set_note+0x38> <== NEVER TAKEN
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
8004dc4: 28 2d 01 28 lw r13,(r1+296)
8004dc8: 34 02 00 02 mvi r2,2
8004dcc: 35 61 00 08 addi r1,r11,8
8004dd0: fb ff f5 5f calli 800234c <__ashlsi3>
8004dd4: 2b 83 00 14 lw r3,(sp+20)
8004dd8: b5 a1 08 00 add r1,r13,r1
8004ddc: 58 23 00 00 sw (r1+0),r3
_Thread_Enable_dispatch();
8004de0: f8 00 09 71 calli 80073a4 <_Thread_Enable_dispatch>
8004de4: b9 80 20 00 mv r4,r12
return RTEMS_SUCCESSFUL;
8004de8: e3 ff ff e4 bi 8004d78 <rtems_task_set_note+0x38>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
8004dec: 78 01 08 02 mvhi r1,0x802
8004df0: 38 21 5c 08 ori r1,r1,0x5c08
8004df4: 28 24 00 00 lw r4,(r1+0)
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
8004df8: 35 61 00 08 addi r1,r11,8
8004dfc: 34 02 00 02 mvi r2,2
8004e00: 28 8c 01 28 lw r12,(r4+296)
8004e04: 5b 83 00 14 sw (sp+20),r3
8004e08: fb ff f5 51 calli 800234c <__ashlsi3>
8004e0c: 2b 83 00 14 lw r3,(sp+20)
8004e10: b5 81 08 00 add r1,r12,r1
8004e14: 34 04 00 00 mvi r4,0
8004e18: 58 23 00 00 sw (r1+0),r3
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8004e1c: b8 80 08 00 mv r1,r4
8004e20: 2b 9d 00 04 lw ra,(sp+4)
8004e24: 2b 8b 00 10 lw r11,(sp+16)
8004e28: 2b 8c 00 0c lw r12,(sp+12)
8004e2c: 2b 8d 00 08 lw r13,(sp+8)
8004e30: 37 9c 00 18 addi sp,sp,24
8004e34: c3 a0 00 00 ret
08009068 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
8009068: 37 9c ff f0 addi sp,sp,-16
800906c: 5b 8b 00 0c sw (sp+12),r11
8009070: 5b 8c 00 08 sw (sp+8),r12
8009074: 5b 9d 00 04 sw (sp+4),ra
8009078: b8 40 58 00 mv r11,r2
800907c: b8 60 60 00 mv r12,r3
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
8009080: 44 40 00 0c be r2,r0,80090b0 <rtems_task_set_priority+0x48>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
8009084: 78 02 08 02 mvhi r2,0x802
8009088: 38 42 70 c0 ori r2,r2,0x70c0
800908c: 40 42 00 00 lbu r2,(r2+0)
8009090: 50 4b 00 08 bgeu r2,r11,80090b0 <rtems_task_set_priority+0x48><== ALWAYS TAKEN
8009094: 34 04 00 13 mvi r4,19 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8009098: b8 80 08 00 mv r1,r4
800909c: 2b 9d 00 04 lw ra,(sp+4)
80090a0: 2b 8b 00 0c lw r11,(sp+12)
80090a4: 2b 8c 00 08 lw r12,(sp+8)
80090a8: 37 9c 00 10 addi sp,sp,16
80090ac: c3 a0 00 00 ret
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
80090b0: 34 04 00 09 mvi r4,9
80090b4: 45 80 ff f9 be r12,r0,8009098 <rtems_task_set_priority+0x30><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
80090b8: 37 82 00 10 addi r2,sp,16
80090bc: f8 00 0a 43 calli 800b9c8 <_Thread_Get>
switch ( location ) {
80090c0: 2b 82 00 10 lw r2,(sp+16)
80090c4: 34 04 00 04 mvi r4,4
80090c8: 5c 40 ff f4 bne r2,r0,8009098 <rtems_task_set_priority+0x30>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
80090cc: 28 23 00 14 lw r3,(r1+20)
80090d0: 59 83 00 00 sw (r12+0),r3
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
80090d4: 45 62 00 09 be r11,r2,80090f8 <rtems_task_set_priority+0x90>
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
80090d8: 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;
80090dc: 58 2b 00 18 sw (r1+24),r11
if ( the_thread->resource_count == 0 ||
80090e0: 44 40 00 03 be r2,r0,80090ec <rtems_task_set_priority+0x84>
the_thread->current_priority > new_priority )
80090e4: 28 22 00 14 lw r2,(r1+20)
80090e8: 51 62 00 04 bgeu r11,r2,80090f8 <rtems_task_set_priority+0x90><== ALWAYS TAKEN
_Thread_Change_priority( the_thread, new_priority, false );
80090ec: b9 60 10 00 mv r2,r11
80090f0: 34 03 00 00 mvi r3,0
80090f4: f8 00 08 56 calli 800b24c <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
80090f8: f8 00 0a 14 calli 800b948 <_Thread_Enable_dispatch>
80090fc: 34 04 00 00 mvi r4,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8009100: b8 80 08 00 mv r1,r4
8009104: 2b 9d 00 04 lw ra,(sp+4)
8009108: 2b 8b 00 0c lw r11,(sp+12)
800910c: 2b 8c 00 08 lw r12,(sp+8)
8009110: 37 9c 00 10 addi sp,sp,16
8009114: c3 a0 00 00 ret
08002768 <rtems_task_start>:
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
8002768: 37 9c ff ec addi sp,sp,-20
800276c: 5b 8b 00 10 sw (sp+16),r11
8002770: 5b 8c 00 0c sw (sp+12),r12
8002774: 5b 8d 00 08 sw (sp+8),r13
8002778: 5b 9d 00 04 sw (sp+4),ra
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
800277c: 34 06 00 09 mvi r6,9
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
8002780: b8 40 60 00 mv r12,r2
8002784: b8 60 68 00 mv r13,r3
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
8002788: 44 40 00 06 be r2,r0,80027a0 <rtems_task_start+0x38>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
800278c: 37 82 00 14 addi r2,sp,20
8002790: f8 00 07 f3 calli 800475c <_Thread_Get>
switch ( location ) {
8002794: 2b 8b 00 14 lw r11,(sp+20)
8002798: 34 06 00 04 mvi r6,4
800279c: 45 60 00 08 be r11,r0,80027bc <rtems_task_start+0x54> <== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80027a0: b8 c0 08 00 mv r1,r6
80027a4: 2b 9d 00 04 lw ra,(sp+4)
80027a8: 2b 8b 00 10 lw r11,(sp+16)
80027ac: 2b 8c 00 0c lw r12,(sp+12)
80027b0: 2b 8d 00 08 lw r13,(sp+8)
80027b4: 37 9c 00 14 addi sp,sp,20
80027b8: c3 a0 00 00 ret
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Thread_Start(
80027bc: b9 80 18 00 mv r3,r12
80027c0: b9 a0 28 00 mv r5,r13
80027c4: b9 60 10 00 mv r2,r11
80027c8: b9 60 20 00 mv r4,r11
80027cc: f8 00 0b bc calli 80056bc <_Thread_Start>
80027d0: 5c 2b 00 0a bne r1,r11,80027f8 <rtems_task_start+0x90> <== ALWAYS TAKEN
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
80027d4: f8 00 07 d5 calli 8004728 <_Thread_Enable_dispatch> <== NOT EXECUTED
80027d8: 34 06 00 0e mvi r6,14 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80027dc: b8 c0 08 00 mv r1,r6 <== NOT EXECUTED
80027e0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80027e4: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
80027e8: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
80027ec: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
80027f0: 37 9c 00 14 addi sp,sp,20 <== NOT EXECUTED
80027f4: c3 a0 00 00 ret <== NOT EXECUTED
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Thread_Start(
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
80027f8: f8 00 07 cc calli 8004728 <_Thread_Enable_dispatch>
80027fc: b9 60 30 00 mv r6,r11
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8002800: b8 c0 08 00 mv r1,r6
8002804: 2b 9d 00 04 lw ra,(sp+4)
8002808: 2b 8b 00 10 lw r11,(sp+16)
800280c: 2b 8c 00 0c lw r12,(sp+12)
8002810: 2b 8d 00 08 lw r13,(sp+8)
8002814: 37 9c 00 14 addi sp,sp,20
8002818: c3 a0 00 00 ret
08007dd4 <rtems_task_suspend>:
*/
rtems_status_code rtems_task_suspend(
rtems_id id
)
{
8007dd4: 37 9c ff f4 addi sp,sp,-12
8007dd8: 5b 8b 00 08 sw (sp+8),r11
8007ddc: 5b 9d 00 04 sw (sp+4),ra
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
8007de0: 37 82 00 0c addi r2,sp,12
8007de4: f8 00 09 61 calli 800a368 <_Thread_Get>
switch ( location ) {
8007de8: 2b 83 00 0c lw r3,(sp+12)
8007dec: 34 02 00 04 mvi r2,4
8007df0: 44 60 00 06 be r3,r0,8007e08 <rtems_task_suspend+0x34> <== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8007df4: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
8007df8: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8007dfc: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8007e00: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8007e04: c3 a0 00 00 ret <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
8007e08: 28 2b 00 10 lw r11,(r1+16)
8007e0c: 21 6b 00 02 andi r11,r11,0x2
8007e10: 45 63 00 08 be r11,r3,8007e30 <rtems_task_suspend+0x5c>
_Thread_Suspend( the_thread );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
8007e14: f8 00 09 35 calli 800a2e8 <_Thread_Enable_dispatch>
8007e18: 34 02 00 0f mvi r2,15
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8007e1c: b8 40 08 00 mv r1,r2
8007e20: 2b 9d 00 04 lw ra,(sp+4)
8007e24: 2b 8b 00 08 lw r11,(sp+8)
8007e28: 37 9c 00 0c addi sp,sp,12
8007e2c: c3 a0 00 00 ret
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Suspend( the_thread );
8007e30: f8 00 0d 4d calli 800b364 <_Thread_Suspend>
_Thread_Enable_dispatch();
8007e34: f8 00 09 2d calli 800a2e8 <_Thread_Enable_dispatch>
8007e38: b9 60 10 00 mv r2,r11
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8007e3c: b8 40 08 00 mv r1,r2
8007e40: 2b 9d 00 04 lw ra,(sp+4)
8007e44: 2b 8b 00 08 lw r11,(sp+8)
8007e48: 37 9c 00 0c addi sp,sp,12
8007e4c: c3 a0 00 00 ret
08003e58 <rtems_task_variable_add>:
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
8003e58: 37 9c ff ec addi sp,sp,-20
8003e5c: 5b 8b 00 10 sw (sp+16),r11
8003e60: 5b 8c 00 0c sw (sp+12),r12
8003e64: 5b 8d 00 08 sw (sp+8),r13
8003e68: 5b 9d 00 04 sw (sp+4),ra
8003e6c: b8 40 58 00 mv r11,r2
8003e70: b8 60 68 00 mv r13,r3
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
8003e74: 34 02 00 09 mvi r2,9
8003e78: 45 60 00 07 be r11,r0,8003e94 <rtems_task_variable_add+0x3c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
8003e7c: 37 82 00 14 addi r2,sp,20
8003e80: f8 00 08 ec calli 8006230 <_Thread_Get>
8003e84: b8 20 60 00 mv r12,r1
switch (location) {
8003e88: 2b 81 00 14 lw r1,(sp+20)
8003e8c: 34 02 00 04 mvi r2,4
8003e90: 44 20 00 08 be r1,r0,8003eb0 <rtems_task_variable_add+0x58>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003e94: b8 40 08 00 mv r1,r2
8003e98: 2b 9d 00 04 lw ra,(sp+4)
8003e9c: 2b 8b 00 10 lw r11,(sp+16)
8003ea0: 2b 8c 00 0c lw r12,(sp+12)
8003ea4: 2b 8d 00 08 lw r13,(sp+8)
8003ea8: 37 9c 00 14 addi sp,sp,20
8003eac: c3 a0 00 00 ret
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
8003eb0: 29 84 01 38 lw r4,(r12+312)
while (tvp) {
8003eb4: 44 81 00 08 be r4,r1,8003ed4 <rtems_task_variable_add+0x7c>
if (tvp->ptr == ptr) {
8003eb8: 28 81 00 04 lw r1,(r4+4)
8003ebc: 5c 2b 00 04 bne r1,r11,8003ecc <rtems_task_variable_add+0x74>
8003ec0: e0 00 00 18 bi 8003f20 <rtems_task_variable_add+0xc8>
8003ec4: 28 82 00 04 lw r2,(r4+4)
8003ec8: 44 4b 00 16 be r2,r11,8003f20 <rtems_task_variable_add+0xc8><== NEVER TAKEN
tvp->dtor = dtor;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
8003ecc: 28 84 00 00 lw r4,(r4+0)
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
8003ed0: 5c 80 ff fd bne r4,r0,8003ec4 <rtems_task_variable_add+0x6c>
}
/*
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
8003ed4: 34 01 00 14 mvi r1,20
8003ed8: f8 00 0e 81 calli 80078dc <_Workspace_Allocate>
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
8003edc: 44 20 00 1b be r1,r0,8003f48 <rtems_task_variable_add+0xf0>
}
new->gval = *ptr;
new->ptr = ptr;
new->dtor = dtor;
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
8003ee0: 29 82 01 38 lw r2,(r12+312)
if (new == NULL) {
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
new->ptr = ptr;
8003ee4: 58 2b 00 04 sw (r1+4),r11
new->dtor = dtor;
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
the_thread->task_variables = new;
8003ee8: 59 81 01 38 sw (r12+312),r1
}
new->gval = *ptr;
new->ptr = ptr;
new->dtor = dtor;
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
8003eec: 58 22 00 00 sw (r1+0),r2
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
8003ef0: 29 62 00 00 lw r2,(r11+0)
new->ptr = ptr;
new->dtor = dtor;
8003ef4: 58 2d 00 10 sw (r1+16),r13
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
8003ef8: 58 22 00 08 sw (r1+8),r2
new->ptr = ptr;
new->dtor = dtor;
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
the_thread->task_variables = new;
_Thread_Enable_dispatch();
8003efc: f8 00 08 c0 calli 80061fc <_Thread_Enable_dispatch>
8003f00: 34 02 00 00 mvi r2,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003f04: b8 40 08 00 mv r1,r2
8003f08: 2b 9d 00 04 lw ra,(sp+4)
8003f0c: 2b 8b 00 10 lw r11,(sp+16)
8003f10: 2b 8c 00 0c lw r12,(sp+12)
8003f14: 2b 8d 00 08 lw r13,(sp+8)
8003f18: 37 9c 00 14 addi sp,sp,20
8003f1c: c3 a0 00 00 ret
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
tvp->dtor = dtor;
8003f20: 58 8d 00 10 sw (r4+16),r13
_Thread_Enable_dispatch();
8003f24: f8 00 08 b6 calli 80061fc <_Thread_Enable_dispatch>
8003f28: 34 02 00 00 mvi r2,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003f2c: b8 40 08 00 mv r1,r2
8003f30: 2b 9d 00 04 lw ra,(sp+4)
8003f34: 2b 8b 00 10 lw r11,(sp+16)
8003f38: 2b 8c 00 0c lw r12,(sp+12)
8003f3c: 2b 8d 00 08 lw r13,(sp+8)
8003f40: 37 9c 00 14 addi sp,sp,20
8003f44: c3 a0 00 00 ret
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
8003f48: f8 00 08 ad calli 80061fc <_Thread_Enable_dispatch>
8003f4c: 34 02 00 1a mvi r2,26
return RTEMS_NO_MEMORY;
8003f50: e3 ff ff d1 bi 8003e94 <rtems_task_variable_add+0x3c>
08003f54 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
8003f54: 37 9c ff f4 addi sp,sp,-12
8003f58: 5b 8b 00 08 sw (sp+8),r11
8003f5c: 5b 9d 00 04 sw (sp+4),ra
8003f60: b8 40 58 00 mv r11,r2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
8003f64: 34 02 00 09 mvi r2,9
8003f68: 45 60 00 06 be r11,r0,8003f80 <rtems_task_variable_delete+0x2c>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
8003f6c: 37 82 00 0c addi r2,sp,12
8003f70: f8 00 08 b0 calli 8006230 <_Thread_Get>
switch (location) {
8003f74: 2b 84 00 0c lw r4,(sp+12)
8003f78: 34 02 00 04 mvi r2,4
8003f7c: 44 80 00 06 be r4,r0,8003f94 <rtems_task_variable_delete+0x40>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003f80: b8 40 08 00 mv r1,r2
8003f84: 2b 9d 00 04 lw ra,(sp+4)
8003f88: 2b 8b 00 08 lw r11,(sp+8)
8003f8c: 37 9c 00 0c addi sp,sp,12
8003f90: c3 a0 00 00 ret
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
8003f94: 28 23 01 38 lw r3,(r1+312)
while (tvp) {
8003f98: 44 64 00 09 be r3,r4,8003fbc <rtems_task_variable_delete+0x68>
if (tvp->ptr == ptr) {
8003f9c: 28 62 00 04 lw r2,(r3+4)
8003fa0: 5c 4b 00 04 bne r2,r11,8003fb0 <rtems_task_variable_delete+0x5c>
8003fa4: e0 00 00 18 bi 8004004 <rtems_task_variable_delete+0xb0>
8003fa8: 28 64 00 04 lw r4,(r3+4)
8003fac: 44 8b 00 0b be r4,r11,8003fd8 <rtems_task_variable_delete+0x84>
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
8003fb0: b8 60 10 00 mv r2,r3
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
8003fb4: 28 63 00 00 lw r3,(r3+0)
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
8003fb8: 5c 60 ff fc bne r3,r0,8003fa8 <rtems_task_variable_delete+0x54><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
8003fbc: f8 00 08 90 calli 80061fc <_Thread_Enable_dispatch>
8003fc0: 34 02 00 09 mvi r2,9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003fc4: b8 40 08 00 mv r1,r2
8003fc8: 2b 9d 00 04 lw ra,(sp+4)
8003fcc: 2b 8b 00 08 lw r11,(sp+8)
8003fd0: 37 9c 00 0c addi sp,sp,12
8003fd4: c3 a0 00 00 ret
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
8003fd8: 28 64 00 00 lw r4,(r3+0)
8003fdc: 58 44 00 00 sw (r2+0),r4
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
8003fe0: b8 60 10 00 mv r2,r3
8003fe4: f8 00 00 3b calli 80040d0 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
8003fe8: f8 00 08 85 calli 80061fc <_Thread_Enable_dispatch>
8003fec: 34 02 00 00 mvi r2,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003ff0: b8 40 08 00 mv r1,r2
8003ff4: 2b 9d 00 04 lw ra,(sp+4)
8003ff8: 2b 8b 00 08 lw r11,(sp+8)
8003ffc: 37 9c 00 0c addi sp,sp,12
8004000: c3 a0 00 00 ret
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
8004004: 28 62 00 00 lw r2,(r3+0)
8004008: 58 22 01 38 sw (r1+312),r2
800400c: e3 ff ff f5 bi 8003fe0 <rtems_task_variable_delete+0x8c>
08004010 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
8004010: 37 9c ff f0 addi sp,sp,-16
8004014: 5b 8b 00 0c sw (sp+12),r11
8004018: 5b 8c 00 08 sw (sp+8),r12
800401c: 5b 9d 00 04 sw (sp+4),ra
8004020: b8 40 58 00 mv r11,r2
8004024: b8 60 60 00 mv r12,r3
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
8004028: 44 40 00 1d be r2,r0,800409c <rtems_task_variable_get+0x8c>
return RTEMS_INVALID_ADDRESS;
if ( !result )
800402c: 44 60 00 1c be r3,r0,800409c <rtems_task_variable_get+0x8c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
8004030: 37 82 00 10 addi r2,sp,16
8004034: f8 00 08 7f calli 8006230 <_Thread_Get>
switch (location) {
8004038: 2b 82 00 10 lw r2,(sp+16)
return RTEMS_INVALID_ADDRESS;
if ( !result )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
800403c: b8 20 18 00 mv r3,r1
switch (location) {
8004040: 34 01 00 04 mvi r1,4
8004044: 44 40 00 06 be r2,r0,800405c <rtems_task_variable_get+0x4c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8004048: 2b 9d 00 04 lw ra,(sp+4)
800404c: 2b 8b 00 0c lw r11,(sp+12)
8004050: 2b 8c 00 08 lw r12,(sp+8)
8004054: 37 9c 00 10 addi sp,sp,16
8004058: c3 a0 00 00 ret
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
800405c: 28 61 01 38 lw r1,(r3+312)
while (tvp) {
8004060: 5c 22 00 04 bne r1,r2,8004070 <rtems_task_variable_get+0x60>
8004064: e0 00 00 14 bi 80040b4 <rtems_task_variable_get+0xa4>
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
8004068: 28 21 00 00 lw r1,(r1+0)
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
800406c: 44 20 00 12 be r1,r0,80040b4 <rtems_task_variable_get+0xa4><== NEVER TAKEN
if (tvp->ptr == ptr) {
8004070: 28 22 00 04 lw r2,(r1+4)
8004074: 5c 4b ff fd bne r2,r11,8004068 <rtems_task_variable_get+0x58>
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
8004078: 28 21 00 0c lw r1,(r1+12)
800407c: 59 81 00 00 sw (r12+0),r1
_Thread_Enable_dispatch();
8004080: f8 00 08 5f calli 80061fc <_Thread_Enable_dispatch>
8004084: 34 01 00 00 mvi r1,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8004088: 2b 9d 00 04 lw ra,(sp+4)
800408c: 2b 8b 00 0c lw r11,(sp+12)
8004090: 2b 8c 00 08 lw r12,(sp+8)
8004094: 37 9c 00 10 addi sp,sp,16
8004098: c3 a0 00 00 ret
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
800409c: 34 01 00 09 mvi r1,9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80040a0: 2b 9d 00 04 lw ra,(sp+4)
80040a4: 2b 8b 00 0c lw r11,(sp+12)
80040a8: 2b 8c 00 08 lw r12,(sp+8)
80040ac: 37 9c 00 10 addi sp,sp,16
80040b0: c3 a0 00 00 ret
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
80040b4: f8 00 08 52 calli 80061fc <_Thread_Enable_dispatch>
80040b8: 34 01 00 09 mvi r1,9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80040bc: 2b 9d 00 04 lw ra,(sp+4)
80040c0: 2b 8b 00 0c lw r11,(sp+12)
80040c4: 2b 8c 00 08 lw r12,(sp+8)
80040c8: 37 9c 00 10 addi sp,sp,16
80040cc: c3 a0 00 00 ret
08003d8c <rtems_task_wake_when>:
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
8003d8c: 37 9c ff ec addi sp,sp,-20
8003d90: 5b 8b 00 14 sw (sp+20),r11
8003d94: 5b 8c 00 10 sw (sp+16),r12
8003d98: 5b 8d 00 0c sw (sp+12),r13
8003d9c: 5b 8e 00 08 sw (sp+8),r14
8003da0: 5b 9d 00 04 sw (sp+4),ra
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
8003da4: 78 02 08 02 mvhi r2,0x802
8003da8: 38 42 39 68 ori r2,r2,0x3968
8003dac: 40 43 00 00 lbu r3,(r2+0)
8003db0: 34 0c 00 00 mvi r12,0
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
8003db4: b8 20 58 00 mv r11,r1
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
8003db8: 34 02 00 0b mvi r2,11
8003dbc: 44 6c 00 07 be r3,r12,8003dd8 <rtems_task_wake_when+0x4c> <== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
8003dc0: 34 02 00 09 mvi r2,9
8003dc4: 44 2c 00 05 be r1,r12,8003dd8 <rtems_task_wake_when+0x4c> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
time_buffer->ticks = 0;
8003dc8: 58 2c 00 18 sw (r1+24),r12
if ( !_TOD_Validate( time_buffer ) )
8003dcc: fb ff fe 04 calli 80035dc <_TOD_Validate>
8003dd0: 5c 2c 00 0a bne r1,r12,8003df8 <rtems_task_wake_when+0x6c> <== ALWAYS TAKEN
_Watchdog_Insert_seconds(
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
8003dd4: 34 02 00 14 mvi r2,20 <== NOT EXECUTED
}
8003dd8: b8 40 08 00 mv r1,r2
8003ddc: 2b 9d 00 04 lw ra,(sp+4)
8003de0: 2b 8b 00 14 lw r11,(sp+20)
8003de4: 2b 8c 00 10 lw r12,(sp+16)
8003de8: 2b 8d 00 0c lw r13,(sp+12)
8003dec: 2b 8e 00 08 lw r14,(sp+8)
8003df0: 37 9c 00 14 addi sp,sp,20
8003df4: c3 a0 00 00 ret
if ( !_TOD_Validate( time_buffer ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
if ( seconds <= _TOD_Seconds_since_epoch() )
8003df8: 78 0d 08 02 mvhi r13,0x802
time_buffer->ticks = 0;
if ( !_TOD_Validate( time_buffer ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
8003dfc: b9 60 08 00 mv r1,r11
8003e00: fb ff fd af calli 80034bc <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
8003e04: 39 ad 39 e4 ori r13,r13,0x39e4
time_buffer->ticks = 0;
if ( !_TOD_Validate( time_buffer ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
8003e08: b8 20 70 00 mv r14,r1
if ( seconds <= _TOD_Seconds_since_epoch() )
8003e0c: 29 a1 00 00 lw r1,(r13+0)
8003e10: 50 2e ff f1 bgeu r1,r14,8003dd4 <rtems_task_wake_when+0x48><== NEVER TAKEN
8003e14: 78 02 08 02 mvhi r2,0x802
8003e18: 38 42 39 54 ori r2,r2,0x3954
8003e1c: 28 41 00 00 lw r1,(r2+0)
8003e20: 34 21 00 01 addi r1,r1,1
8003e24: 58 41 00 00 sw (r2+0),r1
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
8003e28: 78 0b 08 02 mvhi r11,0x802
8003e2c: 39 6b 3a 10 ori r11,r11,0x3a10
8003e30: 29 61 00 00 lw r1,(r11+0)
8003e34: 34 02 00 10 mvi r2,16
8003e38: f8 00 0b 1d calli 8006aac <_Thread_Set_state>
_Watchdog_Initialize(
&_Thread_Executing->Timer,
8003e3c: 29 63 00 00 lw r3,(r11+0)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
8003e40: 78 02 08 00 mvhi r2,0x800
8003e44: 38 42 5c a8 ori r2,r2,0x5ca8
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
_Watchdog_Initialize(
8003e48: 28 64 00 08 lw r4,(r3+8)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
8003e4c: 78 01 08 02 mvhi r1,0x802
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
8003e50: 58 62 00 64 sw (r3+100),r2
the_watchdog->id = id;
8003e54: 58 64 00 68 sw (r3+104),r4
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
8003e58: 29 a4 00 00 lw r4,(r13+0)
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
8003e5c: 34 62 00 48 addi r2,r3,72
8003e60: 38 21 3a 24 ori r1,r1,0x3a24
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
8003e64: c9 c4 70 00 sub r14,r14,r4
8003e68: 58 6e 00 54 sw (r3+84),r14
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
8003e6c: 58 6c 00 50 sw (r3+80),r12
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
8003e70: 58 6c 00 6c sw (r3+108),r12
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
8003e74: f8 00 0d c6 calli 800758c <_Watchdog_Insert>
);
_Watchdog_Insert_seconds(
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
8003e78: f8 00 08 14 calli 8005ec8 <_Thread_Enable_dispatch>
8003e7c: b9 80 10 00 mv r2,r12
return RTEMS_SUCCESSFUL;
8003e80: e3 ff ff d6 bi 8003dd8 <rtems_task_wake_when+0x4c>
08003884 <rtems_termios_baud_to_index>:
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
8003884: 34 03 00 09 mvi r3,9
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
8003888: b8 20 10 00 mv r2,r1
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
800388c: 44 23 00 0a be r1,r3,80038b4 <rtems_termios_baud_to_index+0x30><== NEVER TAKEN
8003890: 48 23 00 0b bg r1,r3,80038bc <rtems_termios_baud_to_index+0x38><== NEVER TAKEN
8003894: 34 03 00 04 mvi r3,4
8003898: 44 23 00 07 be r1,r3,80038b4 <rtems_termios_baud_to_index+0x30><== NEVER TAKEN
800389c: 48 23 00 22 bg r1,r3,8003924 <rtems_termios_baud_to_index+0xa0><== NEVER TAKEN
80038a0: 34 01 00 01 mvi r1,1
80038a4: 44 41 00 04 be r2,r1,80038b4 <rtems_termios_baud_to_index+0x30><== NEVER TAKEN
80038a8: 48 41 00 2a bg r2,r1,8003950 <rtems_termios_baud_to_index+0xcc><== NEVER TAKEN
80038ac: 44 40 00 02 be r2,r0,80038b4 <rtems_termios_baud_to_index+0x30><== NEVER TAKEN
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;
80038b0: 34 02 ff ff mvi r2,-1
default: baud_index = -1; break;
}
return baud_index;
}
80038b4: b8 40 08 00 mv r1,r2
80038b8: c3 a0 00 00 ret
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
80038bc: 34 03 00 0e mvi r3,14 <== NOT EXECUTED
80038c0: 44 23 ff fd be r1,r3,80038b4 <rtems_termios_baud_to_index+0x30><== NOT EXECUTED
80038c4: 48 23 00 0c bg r1,r3,80038f4 <rtems_termios_baud_to_index+0x70><== NOT EXECUTED
80038c8: 34 03 00 0b mvi r3,11 <== NOT EXECUTED
80038cc: 44 23 ff fa be r1,r3,80038b4 <rtems_termios_baud_to_index+0x30><== 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;
80038d0: 34 02 00 0a mvi r2,10 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
80038d4: 48 61 ff f8 bg r3,r1,80038b4 <rtems_termios_baud_to_index+0x30><== 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;
80038d8: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
80038dc: 34 01 00 0c mvi r1,12 <== NOT EXECUTED
80038e0: 44 41 ff f5 be r2,r1,80038b4 <rtems_termios_baud_to_index+0x30><== NOT EXECUTED
80038e4: 34 01 00 0d mvi r1,13 <== NOT EXECUTED
80038e8: 44 41 ff f3 be r2,r1,80038b4 <rtems_termios_baud_to_index+0x30><== 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;
80038ec: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
80038f0: e3 ff ff f1 bi 80038b4 <rtems_termios_baud_to_index+0x30> <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
80038f4: 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;
80038f8: 34 02 00 11 mvi r2,17 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
80038fc: 44 23 ff ee be r1,r3,80038b4 <rtems_termios_baud_to_index+0x30><== NOT EXECUTED
8003900: 48 23 00 19 bg r1,r3,8003964 <rtems_termios_baud_to_index+0xe0><== NOT EXECUTED
8003904: 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;
8003908: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
800390c: 44 23 ff ea be r1,r3,80038b4 <rtems_termios_baud_to_index+0x30><== NOT EXECUTED
8003910: 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;
8003914: 34 02 00 10 mvi r2,16 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
8003918: 44 23 ff e7 be r1,r3,80038b4 <rtems_termios_baud_to_index+0x30><== 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;
800391c: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
8003920: e3 ff ff e5 bi 80038b4 <rtems_termios_baud_to_index+0x30> <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
8003924: 34 03 00 06 mvi r3,6 <== NOT EXECUTED
8003928: 44 23 ff e3 be r1,r3,80038b4 <rtems_termios_baud_to_index+0x30><== 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;
800392c: 34 02 00 05 mvi r2,5 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
8003930: 48 61 ff e1 bg r3,r1,80038b4 <rtems_termios_baud_to_index+0x30><== 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;
8003934: b8 20 10 00 mv r2,r1 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
8003938: 34 01 00 07 mvi r1,7 <== NOT EXECUTED
800393c: 44 41 ff de be r2,r1,80038b4 <rtems_termios_baud_to_index+0x30><== NOT EXECUTED
8003940: 34 01 00 08 mvi r1,8 <== NOT EXECUTED
8003944: 44 41 ff dc be r2,r1,80038b4 <rtems_termios_baud_to_index+0x30><== 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;
8003948: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
800394c: e3 ff ff da bi 80038b4 <rtems_termios_baud_to_index+0x30> <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
8003950: 34 01 00 02 mvi r1,2 <== NOT EXECUTED
8003954: 44 41 ff d8 be r2,r1,80038b4 <rtems_termios_baud_to_index+0x30><== NOT EXECUTED
8003958: 34 01 00 03 mvi r1,3 <== NOT EXECUTED
800395c: 5c 41 ff d5 bne r2,r1,80038b0 <rtems_termios_baud_to_index+0x2c><== NOT EXECUTED
8003960: e3 ff ff d5 bi 80038b4 <rtems_termios_baud_to_index+0x30> <== NOT EXECUTED
8003964: 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;
8003968: 34 02 00 12 mvi r2,18 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
800396c: 44 23 ff d2 be r1,r3,80038b4 <rtems_termios_baud_to_index+0x30><== NOT EXECUTED
8003970: 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;
8003974: 34 02 00 13 mvi r2,19 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
8003978: 5c 23 ff ce bne r1,r3,80038b0 <rtems_termios_baud_to_index+0x2c><== NOT EXECUTED
800397c: e3 ff ff ce bi 80038b4 <rtems_termios_baud_to_index+0x30> <== NOT EXECUTED
08003980 <rtems_termios_baud_to_number>:
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
8003980: 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;
8003984: 34 02 04 b0 mvi r2,1200
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
8003988: 44 23 00 0d be r1,r3,80039bc <rtems_termios_baud_to_number+0x3c>
800398c: 48 23 00 0e bg r1,r3,80039c4 <rtems_termios_baud_to_number+0x44>
8003990: 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;
8003994: 34 02 00 86 mvi r2,134
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
8003998: 44 23 00 09 be r1,r3,80039bc <rtems_termios_baud_to_number+0x3c>
800399c: 48 23 00 26 bg r1,r3,8003a34 <rtems_termios_baud_to_number+0xb4>
80039a0: 34 03 00 01 mvi r3,1
80039a4: 34 02 00 32 mvi r2,50
80039a8: 44 23 00 05 be r1,r3,80039bc <rtems_termios_baud_to_number+0x3c>
80039ac: 48 23 00 2f bg r1,r3,8003a68 <rtems_termios_baud_to_number+0xe8>
80039b0: b8 20 10 00 mv r2,r1
80039b4: 44 20 00 02 be r1,r0,80039bc <rtems_termios_baud_to_number+0x3c>
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
80039b8: 34 02 ff ff mvi r2,-1
default: baud = -1; break;
}
return baud;
}
80039bc: b8 40 08 00 mv r1,r2
80039c0: c3 a0 00 00 ret
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
80039c4: 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;
80039c8: 34 02 4b 00 mvi r2,19200
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
80039cc: 44 23 ff fc be r1,r3,80039bc <rtems_termios_baud_to_number+0x3c>
80039d0: 48 23 00 0e bg r1,r3,8003a08 <rtems_termios_baud_to_number+0x88>
80039d4: 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;
80039d8: 34 02 09 60 mvi r2,2400
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
80039dc: 44 23 ff f8 be r1,r3,80039bc <rtems_termios_baud_to_number+0x3c>
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;
80039e0: 34 02 07 08 mvi r2,1800
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
80039e4: 48 61 ff f6 bg r3,r1,80039bc <rtems_termios_baud_to_number+0x3c>
80039e8: 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;
80039ec: 34 02 12 c0 mvi r2,4800
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
80039f0: 44 23 ff f3 be r1,r3,80039bc <rtems_termios_baud_to_number+0x3c>
80039f4: 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;
80039f8: 34 02 25 80 mvi r2,9600
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
80039fc: 44 23 ff f0 be r1,r3,80039bc <rtems_termios_baud_to_number+0x3c><== ALWAYS TAKEN
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
8003a00: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
8003a04: e3 ff ff ee bi 80039bc <rtems_termios_baud_to_number+0x3c> <== NOT EXECUTED
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
8003a08: 34 02 10 02 mvi r2,4098
8003a0c: 44 22 00 25 be r1,r2,8003aa0 <rtems_termios_baud_to_number+0x120>
8003a10: 48 22 00 1d bg r1,r2,8003a84 <rtems_termios_baud_to_number+0x104>
8003a14: 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;
8003a18: 38 02 96 00 mvu r2,0x9600
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
8003a1c: 44 23 ff e8 be r1,r3,80039bc <rtems_termios_baud_to_number+0x3c>
8003a20: 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;
8003a24: 38 02 e1 00 mvu r2,0xe100
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
8003a28: 44 23 ff e5 be r1,r3,80039bc <rtems_termios_baud_to_number+0x3c><== ALWAYS TAKEN
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
8003a2c: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
8003a30: e3 ff ff e3 bi 80039bc <rtems_termios_baud_to_number+0x3c> <== NOT EXECUTED
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
8003a34: 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;
8003a38: 34 02 00 c8 mvi r2,200
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
8003a3c: 44 23 ff e0 be r1,r3,80039bc <rtems_termios_baud_to_number+0x3c>
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;
8003a40: 34 02 00 96 mvi r2,150
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
8003a44: 48 61 ff de bg r3,r1,80039bc <rtems_termios_baud_to_number+0x3c>
8003a48: 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;
8003a4c: 34 02 01 2c mvi r2,300
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
8003a50: 44 23 ff db be r1,r3,80039bc <rtems_termios_baud_to_number+0x3c>
8003a54: 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;
8003a58: 34 02 02 58 mvi r2,600
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
8003a5c: 44 23 ff d8 be r1,r3,80039bc <rtems_termios_baud_to_number+0x3c><== ALWAYS TAKEN
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
8003a60: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
8003a64: e3 ff ff d6 bi 80039bc <rtems_termios_baud_to_number+0x3c> <== NOT EXECUTED
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
8003a68: 34 03 00 02 mvi r3,2
8003a6c: 34 02 00 4b mvi r2,75
8003a70: 44 23 ff d3 be r1,r3,80039bc <rtems_termios_baud_to_number+0x3c>
8003a74: 34 03 00 03 mvi r3,3
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
8003a78: 34 02 00 6e mvi r2,110
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
8003a7c: 5c 23 ff cf bne r1,r3,80039b8 <rtems_termios_baud_to_number+0x38><== NEVER TAKEN
8003a80: e3 ff ff cf bi 80039bc <rtems_termios_baud_to_number+0x3c>
8003a84: 34 02 10 03 mvi r2,4099
8003a88: 44 22 00 09 be r1,r2,8003aac <rtems_termios_baud_to_number+0x12c>
8003a8c: 34 02 10 04 mvi r2,4100
8003a90: 5c 22 ff ca bne r1,r2,80039b8 <rtems_termios_baud_to_number+0x38><== NEVER TAKEN
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
8003a94: 78 02 00 07 mvhi r2,0x7
8003a98: 38 42 08 00 ori r2,r2,0x800
case B460800: baud = 460800; break;
8003a9c: e3 ff ff c8 bi 80039bc <rtems_termios_baud_to_number+0x3c>
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;
8003aa0: 78 02 00 01 mvhi r2,0x1
8003aa4: 38 42 c2 00 ori r2,r2,0xc200
case B115200: baud = 115200; break;
8003aa8: e3 ff ff c5 bi 80039bc <rtems_termios_baud_to_number+0x3c>
8003aac: 78 02 00 03 mvhi r2,0x3
8003ab0: 38 42 84 00 ori r2,r2,0x8400
case B230400: baud = 230400; break;
8003ab4: e3 ff ff c2 bi 80039bc <rtems_termios_baud_to_number+0x3c>
08003c48 <rtems_termios_bufsize>:
int cbufsize,
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
8003c48: 78 06 08 02 mvhi r6,0x802 <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
8003c4c: 78 05 08 02 mvhi r5,0x802 <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
8003c50: 78 04 08 02 mvhi r4,0x802 <== NOT EXECUTED
int cbufsize,
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
8003c54: 38 c6 62 34 ori r6,r6,0x6234 <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
8003c58: 38 a5 62 38 ori r5,r5,0x6238 <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
8003c5c: 38 84 62 3c ori r4,r4,0x623c <== NOT EXECUTED
int cbufsize,
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
8003c60: 58 c1 00 00 sw (r6+0),r1 <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
8003c64: 58 a2 00 00 sw (r5+0),r2 <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
8003c68: 58 83 00 00 sw (r4+0),r3 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
8003c6c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8003c70: c3 a0 00 00 ret <== NOT EXECUTED
080054e0 <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
80054e0: 37 9c ff e8 addi sp,sp,-24
80054e4: 5b 8b 00 18 sw (sp+24),r11
80054e8: 5b 8c 00 14 sw (sp+20),r12
80054ec: 5b 8d 00 10 sw (sp+16),r13
80054f0: 5b 8e 00 0c sw (sp+12),r14
80054f4: 5b 8f 00 08 sw (sp+8),r15
80054f8: 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);
80054fc: 78 0c 08 02 mvhi r12,0x802
8005500: 39 8c 69 cc ori r12,r12,0x69cc
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
8005504: 28 24 00 00 lw r4,(r1+0)
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
8005508: b8 20 78 00 mv r15,r1
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
800550c: 29 81 00 00 lw r1,(r12+0)
8005510: 34 02 00 00 mvi r2,0
8005514: 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;
8005518: 28 8b 00 38 lw r11,(r4+56)
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
800551c: f8 00 04 fb calli 8006908 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
8005520: 5c 20 00 62 bne r1,r0,80056a8 <rtems_termios_close+0x1c8> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
8005524: 29 6d 00 08 lw r13,(r11+8)
8005528: 35 ad ff ff addi r13,r13,-1
800552c: 59 6d 00 08 sw (r11+8),r13
8005530: 5d a1 00 2e bne r13,r1,80055e8 <rtems_termios_close+0x108> <== NEVER TAKEN
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
8005534: 29 61 00 cc lw r1,(r11+204)
8005538: 78 0e 08 02 mvhi r14,0x802
800553c: 34 02 00 05 mvi r2,5
8005540: 39 ce 67 f8 ori r14,r14,0x67f8
8005544: fb ff ef e1 calli 80014c8 <__ashlsi3>
8005548: b5 c1 08 00 add r1,r14,r1
800554c: 28 2e 00 04 lw r14,(r1+4)
8005550: 45 cd 00 43 be r14,r13,800565c <rtems_termios_close+0x17c> <== ALWAYS TAKEN
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
8005554: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8005558: d9 c0 00 00 call r14 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
}
if (tty->device.outputUsesInterrupts
800555c: 29 62 00 b4 lw r2,(r11+180) <== NOT EXECUTED
8005560: 34 01 00 02 mvi r1,2 <== NOT EXECUTED
8005564: 44 41 00 48 be r2,r1,8005684 <rtems_termios_close+0x1a4> <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
8005568: 29 64 00 9c lw r4,(r11+156)
800556c: 44 80 00 05 be r4,r0,8005580 <rtems_termios_close+0xa0> <== ALWAYS TAKEN
(*tty->device.lastClose)(tty->major, tty->minor, arg);
8005570: 29 61 00 0c lw r1,(r11+12) <== NOT EXECUTED
8005574: 29 62 00 10 lw r2,(r11+16) <== NOT EXECUTED
8005578: b9 e0 18 00 mv r3,r15 <== NOT EXECUTED
800557c: d8 80 00 00 call r4 <== NOT EXECUTED
if (tty->forw == NULL) {
8005580: 29 61 00 00 lw r1,(r11+0)
8005584: 44 20 00 27 be r1,r0,8005620 <rtems_termios_close+0x140> <== ALWAYS TAKEN
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
}
else {
tty->forw->back = tty->back;
8005588: 29 62 00 04 lw r2,(r11+4) <== NOT EXECUTED
800558c: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED
}
if (tty->back == NULL) {
8005590: 29 62 00 04 lw r2,(r11+4) <== NOT EXECUTED
8005594: 44 40 00 2c be r2,r0,8005644 <rtems_termios_close+0x164> <== NOT EXECUTED
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
}
else {
tty->back->forw = tty->forw;
8005598: 58 41 00 00 sw (r2+0),r1 <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
800559c: 29 61 00 14 lw r1,(r11+20)
80055a0: f8 00 04 a7 calli 800683c <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
80055a4: 29 61 00 18 lw r1,(r11+24)
80055a8: f8 00 04 a5 calli 800683c <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
80055ac: 29 61 00 8c lw r1,(r11+140)
80055b0: f8 00 04 a3 calli 800683c <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
80055b4: 29 61 00 a0 lw r1,(r11+160)
80055b8: 44 20 00 17 be r1,r0,8005614 <rtems_termios_close+0x134> <== NEVER TAKEN
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
80055bc: 29 62 00 b4 lw r2,(r11+180)
80055c0: 34 01 00 02 mvi r1,2
80055c4: 44 41 00 14 be r2,r1,8005614 <rtems_termios_close+0x134> <== NEVER TAKEN
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
80055c8: 29 61 00 58 lw r1,(r11+88)
80055cc: f8 00 1c e9 calli 800c970 <free>
free (tty->rawOutBuf.theBuf);
80055d0: 29 61 00 7c lw r1,(r11+124)
80055d4: f8 00 1c e7 calli 800c970 <free>
free (tty->cbuf);
80055d8: 29 61 00 1c lw r1,(r11+28)
80055dc: f8 00 1c e5 calli 800c970 <free>
free (tty);
80055e0: b9 60 08 00 mv r1,r11
80055e4: f8 00 1c e3 calli 800c970 <free>
}
rtems_semaphore_release (rtems_termios_ttyMutex);
80055e8: 29 81 00 00 lw r1,(r12+0)
80055ec: f8 00 05 28 calli 8006a8c <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
80055f0: 34 01 00 00 mvi r1,0
80055f4: 2b 9d 00 04 lw ra,(sp+4)
80055f8: 2b 8b 00 18 lw r11,(sp+24)
80055fc: 2b 8c 00 14 lw r12,(sp+20)
8005600: 2b 8d 00 10 lw r13,(sp+16)
8005604: 2b 8e 00 0c lw r14,(sp+12)
8005608: 2b 8f 00 08 lw r15,(sp+8)
800560c: 37 9c 00 18 addi sp,sp,24
8005610: c3 a0 00 00 ret
rtems_semaphore_delete (tty->isem);
rtems_semaphore_delete (tty->osem);
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
8005614: 29 61 00 68 lw r1,(r11+104) <== NOT EXECUTED
8005618: f8 00 04 89 calli 800683c <rtems_semaphore_delete> <== NOT EXECUTED
800561c: e3 ff ff eb bi 80055c8 <rtems_termios_close+0xe8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
8005620: 29 62 00 04 lw r2,(r11+4)
8005624: 78 03 08 02 mvhi r3,0x802
8005628: 38 63 69 d0 ori r3,r3,0x69d0
800562c: 58 62 00 00 sw (r3+0),r2
if ( rtems_termios_ttyTail != NULL ) {
8005630: 44 41 00 1f be r2,r1,80056ac <rtems_termios_close+0x1cc> <== ALWAYS TAKEN
rtems_termios_ttyTail->forw = NULL;
8005634: 58 41 00 00 sw (r2+0),r1 <== NOT EXECUTED
}
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
8005638: 29 62 00 04 lw r2,(r11+4) <== NOT EXECUTED
800563c: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
8005640: 5c 40 ff d6 bne r2,r0,8005598 <rtems_termios_close+0xb8> <== NOT EXECUTED
rtems_termios_ttyHead = tty->forw;
8005644: 78 03 08 02 mvhi r3,0x802 <== NOT EXECUTED
8005648: 38 63 69 d4 ori r3,r3,0x69d4 <== NOT EXECUTED
800564c: 58 61 00 00 sw (r3+0),r1 <== NOT EXECUTED
if ( rtems_termios_ttyHead != NULL ) {
8005650: 44 22 ff d3 be r1,r2,800559c <rtems_termios_close+0xbc> <== NOT EXECUTED
rtems_termios_ttyHead->back = NULL;
8005654: 58 22 00 04 sw (r1+4),r2 <== NOT EXECUTED
8005658: e3 ff ff d1 bi 800559c <rtems_termios_close+0xbc> <== NOT EXECUTED
}
else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
800565c: 29 61 00 18 lw r1,(r11+24)
8005660: b9 c0 10 00 mv r2,r14
8005664: b9 c0 18 00 mv r3,r14
8005668: f8 00 04 a8 calli 8006908 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
800566c: 5d c1 00 0f bne r14,r1,80056a8 <rtems_termios_close+0x1c8> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
8005670: b9 60 08 00 mv r1,r11
8005674: fb ff fd 71 calli 8004c38 <drainOutput>
}
if (tty->device.outputUsesInterrupts
8005678: 29 62 00 b4 lw r2,(r11+180)
800567c: 34 01 00 02 mvi r1,2
8005680: 5c 41 ff ba bne r2,r1,8005568 <rtems_termios_close+0x88> <== ALWAYS TAKEN
== TERMIOS_TASK_DRIVEN) {
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send(
8005684: 29 61 00 c4 lw r1,(r11+196) <== NOT EXECUTED
8005688: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
800568c: f8 00 03 2e calli 8006344 <rtems_event_send> <== NOT EXECUTED
8005690: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
tty->rxTaskId,
TERMIOS_RX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
8005694: 5c 20 00 05 bne r1,r0,80056a8 <rtems_termios_close+0x1c8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send(
8005698: 29 61 00 c8 lw r1,(r11+200) <== NOT EXECUTED
800569c: 34 02 00 01 mvi r2,1 <== NOT EXECUTED
80056a0: f8 00 03 29 calli 8006344 <rtems_event_send> <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
80056a4: 44 2d ff b1 be r1,r13,8005568 <rtems_termios_close+0x88> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
80056a8: f8 00 06 c5 calli 80071bc <rtems_fatal_error_occurred> <== NOT EXECUTED
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
80056ac: 78 01 08 02 mvhi r1,0x802
80056b0: 38 21 69 d4 ori r1,r1,0x69d4
80056b4: 58 22 00 00 sw (r1+0),r2
80056b8: e3 ff ff b9 bi 800559c <rtems_termios_close+0xbc>
08003f04 <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)
{
8003f04: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8003f08: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
8003f0c: 28 25 00 90 lw r5,(r1+144) <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
8003f10: 28 24 00 b4 lw r4,(r1+180) <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
8003f14: b4 a2 10 00 add r2,r5,r2 <== NOT EXECUTED
8003f18: 58 22 00 90 sw (r1+144),r2 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
8003f1c: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8003f20: 44 82 00 11 be r4,r2,8003f64 <rtems_termios_dequeue_characters+0x60><== NOT EXECUTED
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
else if (tty->t_line == PPPDISC ) {
8003f24: 28 23 00 cc lw r3,(r1+204) <== NOT EXECUTED
8003f28: 34 02 00 05 mvi r2,5 <== NOT EXECUTED
8003f2c: 44 62 00 05 be r3,r2,8003f40 <rtems_termios_dequeue_characters+0x3c><== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
8003f30: fb ff ff 59 calli 8003c94 <rtems_termios_refill_transmitter><== NOT EXECUTED
}
}
8003f34: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003f38: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8003f3c: c3 a0 00 00 ret <== NOT EXECUTED
}
else if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
8003f40: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8003f44: 38 42 67 f8 ori r2,r2,0x67f8 <== NOT EXECUTED
8003f48: 28 42 00 b4 lw r2,(r2+180) <== NOT EXECUTED
8003f4c: 44 40 00 0a be r2,r0,8003f74 <rtems_termios_dequeue_characters+0x70><== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
8003f50: d8 40 00 00 call r2 <== NOT EXECUTED
8003f54: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
}
}
8003f58: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003f5c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8003f60: c3 a0 00 00 ret <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId,
8003f64: 28 21 00 c8 lw r1,(r1+200) <== NOT EXECUTED
8003f68: b8 80 10 00 mv r2,r4 <== NOT EXECUTED
8003f6c: f8 00 08 f6 calli 8006344 <rtems_event_send> <== NOT EXECUTED
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
8003f70: 5c 20 00 05 bne r1,r0,8003f84 <rtems_termios_dequeue_characters+0x80><== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
8003f74: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
}
8003f78: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003f7c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8003f80: c3 a0 00 00 ret <== NOT EXECUTED
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId,
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
8003f84: f8 00 0c 8e calli 80071bc <rtems_fatal_error_occurred> <== NOT EXECUTED
08003f88 <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)
{
8003f88: 37 9c ff b8 addi sp,sp,-72 <== NOT EXECUTED
8003f8c: 5b 8b 00 44 sw (sp+68),r11 <== NOT EXECUTED
8003f90: 5b 8c 00 40 sw (sp+64),r12 <== NOT EXECUTED
8003f94: 5b 8d 00 3c sw (sp+60),r13 <== NOT EXECUTED
8003f98: 5b 8e 00 38 sw (sp+56),r14 <== NOT EXECUTED
8003f9c: 5b 8f 00 34 sw (sp+52),r15 <== NOT EXECUTED
8003fa0: 5b 90 00 30 sw (sp+48),r16 <== NOT EXECUTED
8003fa4: 5b 91 00 2c sw (sp+44),r17 <== NOT EXECUTED
8003fa8: 5b 92 00 28 sw (sp+40),r18 <== NOT EXECUTED
8003fac: 5b 93 00 24 sw (sp+36),r19 <== NOT EXECUTED
8003fb0: 5b 94 00 20 sw (sp+32),r20 <== NOT EXECUTED
8003fb4: 5b 95 00 1c sw (sp+28),r21 <== NOT EXECUTED
8003fb8: 5b 96 00 18 sw (sp+24),r22 <== NOT EXECUTED
8003fbc: 5b 97 00 14 sw (sp+20),r23 <== NOT EXECUTED
8003fc0: 5b 98 00 10 sw (sp+16),r24 <== NOT EXECUTED
8003fc4: 5b 99 00 0c sw (sp+12),r25 <== NOT EXECUTED
8003fc8: 5b 9b 00 08 sw (sp+8),fp <== NOT EXECUTED
8003fcc: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8003fd0: 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) {
8003fd4: 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)
{
8003fd8: 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) {
8003fdc: 78 0e 08 02 mvhi r14,0x802 <== NOT EXECUTED
8003fe0: b4 21 08 00 add r1,r1,r1 <== NOT EXECUTED
8003fe4: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED
8003fe8: 34 02 00 04 mvi r2,4 <== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
8003fec: b8 60 78 00 mv r15,r3 <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
8003ff0: 39 ce 67 f8 ori r14,r14,0x67f8 <== NOT EXECUTED
8003ff4: fb ff f5 35 calli 80014c8 <__ashlsi3> <== NOT EXECUTED
8003ff8: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED
8003ffc: 28 24 00 00 lw r4,(r1+0) <== NOT EXECUTED
8004000: 44 80 00 31 be r4,r0,80040c4 <rtems_termios_enqueue_raw_characters+0x13c><== NOT EXECUTED
while (len--) {
8004004: 45 e0 00 10 be r15,r0,8004044 <rtems_termios_enqueue_raw_characters+0xbc><== NOT EXECUTED
8004008: 34 0c 00 00 mvi r12,0 <== NOT EXECUTED
800400c: e0 00 00 07 bi 8004028 <rtems_termios_enqueue_raw_characters+0xa0><== NOT EXECUTED
8004010: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED
8004014: b4 21 08 00 add r1,r1,r1 <== NOT EXECUTED
8004018: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED
800401c: fb ff f5 2b calli 80014c8 <__ashlsi3> <== NOT EXECUTED
8004020: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED
8004024: 28 24 00 00 lw r4,(r1+0) <== NOT EXECUTED
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
8004028: b5 ac 08 00 add r1,r13,r12 <== NOT EXECUTED
800402c: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED
8004030: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8004034: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED
8004038: d8 80 00 00 call r4 <== NOT EXECUTED
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
800403c: 34 02 00 04 mvi r2,4 <== NOT EXECUTED
8004040: 5d ec ff f4 bne r15,r12,8004010 <rtems_termios_enqueue_raw_characters+0x88><== NOT EXECUTED
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
8004044: 29 63 00 e4 lw r3,(r11+228) <== NOT EXECUTED
8004048: 5c 60 00 1d bne r3,r0,80040bc <rtems_termios_enqueue_raw_characters+0x134><== NOT EXECUTED
800404c: 29 64 00 dc lw r4,(r11+220) <== NOT EXECUTED
8004050: 44 83 00 1b be r4,r3,80040bc <rtems_termios_enqueue_raw_characters+0x134><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
8004054: 29 62 00 e0 lw r2,(r11+224) <== NOT EXECUTED
8004058: 35 61 00 30 addi r1,r11,48 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
800405c: b8 60 80 00 mv r16,r3 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
8004060: d8 80 00 00 call r4 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
8004064: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
8004068: 59 61 00 e4 sw (r11+228),r1 <== NOT EXECUTED
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
800406c: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
8004070: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8004074: 2b 8b 00 44 lw r11,(sp+68) <== NOT EXECUTED
8004078: 2b 8c 00 40 lw r12,(sp+64) <== NOT EXECUTED
800407c: 2b 8d 00 3c lw r13,(sp+60) <== NOT EXECUTED
8004080: 2b 8e 00 38 lw r14,(sp+56) <== NOT EXECUTED
8004084: 2b 8f 00 34 lw r15,(sp+52) <== NOT EXECUTED
8004088: 2b 90 00 30 lw r16,(sp+48) <== NOT EXECUTED
800408c: 2b 91 00 2c lw r17,(sp+44) <== NOT EXECUTED
8004090: 2b 92 00 28 lw r18,(sp+40) <== NOT EXECUTED
8004094: 2b 93 00 24 lw r19,(sp+36) <== NOT EXECUTED
8004098: 2b 94 00 20 lw r20,(sp+32) <== NOT EXECUTED
800409c: 2b 95 00 1c lw r21,(sp+28) <== NOT EXECUTED
80040a0: 2b 96 00 18 lw r22,(sp+24) <== NOT EXECUTED
80040a4: 2b 97 00 14 lw r23,(sp+20) <== NOT EXECUTED
80040a8: 2b 98 00 10 lw r24,(sp+16) <== NOT EXECUTED
80040ac: 2b 99 00 0c lw r25,(sp+12) <== NOT EXECUTED
80040b0: 2b 9b 00 08 lw fp,(sp+8) <== NOT EXECUTED
80040b4: 37 9c 00 48 addi sp,sp,72 <== NOT EXECUTED
80040b8: c3 a0 00 00 ret <== NOT EXECUTED
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
80040bc: 34 10 00 00 mvi r16,0 <== NOT EXECUTED
80040c0: e3 ff ff eb bi 800406c <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,
80040c4: 35 61 00 4a addi r1,r11,74 <== NOT EXECUTED
80040c8: 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);
80040cc: b8 80 88 00 mv r17,r4 <== NOT EXECUTED
80040d0: 35 78 00 30 addi r24,r11,48 <== NOT EXECUTED
80040d4: b8 80 80 00 mv r16,r4 <== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
80040d8: 34 14 00 20 mvi r20,32 <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
80040dc: 34 13 ff fe mvi r19,-2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
80040e0: 34 15 ff df mvi r21,-33 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
80040e4: 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))
80040e8: 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))
80040ec: 34 1b 01 00 mvi fp,256 <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
80040f0: 34 19 ff ef mvi r25,-17 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
80040f4: 45 e0 00 38 be r15,r0,80041d4 <rtems_termios_enqueue_raw_characters+0x24c><== NOT EXECUTED
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
80040f8: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
80040fc: 41 ae 00 00 lbu r14,(r13+0) <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
8004100: 20 63 02 00 andi r3,r3,0x200 <== NOT EXECUTED
8004104: 44 60 00 05 be r3,r0,8004118 <rtems_termios_enqueue_raw_characters+0x190><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
8004108: 41 63 00 4a lbu r3,(r11+74) <== NOT EXECUTED
800410c: 44 6e 00 52 be r3,r14,8004254 <rtems_termios_enqueue_raw_characters+0x2cc><== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
8004110: 41 63 00 49 lbu r3,(r11+73) <== NOT EXECUTED
8004114: 44 6e 00 36 be r3,r14,80041ec <rtems_termios_enqueue_raw_characters+0x264><== NOT EXECUTED
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
8004118: 5e 20 00 39 bne r17,r0,80041fc <rtems_termios_enqueue_raw_characters+0x274><== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
800411c: 29 63 00 60 lw r3,(r11+96) <== NOT EXECUTED
8004120: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED
8004124: 34 61 00 01 addi r1,r3,1 <== NOT EXECUTED
8004128: f8 00 77 c1 calli 802202c <__umodsi3> <== NOT EXECUTED
800412c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
8004130: 90 00 90 00 rcsr r18,IE <== NOT EXECUTED
8004134: a2 53 18 00 and r3,r18,r19 <== NOT EXECUTED
8004138: d0 03 00 00 wcsr IE,r3 <== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
800413c: 29 63 00 5c lw r3,(r11+92) <== NOT EXECUTED
8004140: 29 64 00 64 lw r4,(r11+100) <== NOT EXECUTED
8004144: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED
8004148: c8 83 18 00 sub r3,r4,r3 <== NOT EXECUTED
800414c: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED
8004150: f8 00 77 b7 calli 802202c <__umodsi3> <== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
8004154: 29 63 00 c0 lw r3,(r11+192) <== NOT EXECUTED
8004158: 50 61 00 0d bgeu r3,r1,800418c <rtems_termios_enqueue_raw_characters+0x204><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
800415c: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
8004160: 20 63 00 01 andi r3,r3,0x1 <== NOT EXECUTED
8004164: 5c 60 00 0a bne r3,r0,800418c <rtems_termios_enqueue_raw_characters+0x204><== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
8004168: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED
800416c: 38 63 00 01 ori r3,r3,0x1 <== NOT EXECUTED
8004170: 59 63 00 b8 sw (r11+184),r3 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
8004174: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED
8004178: 20 63 04 02 andi r3,r3,0x402 <== NOT EXECUTED
800417c: 44 76 00 42 be r3,r22,8004284 <rtems_termios_enqueue_raw_characters+0x2fc><== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]),
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
8004180: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8004184: 20 21 01 04 andi r1,r1,0x104 <== NOT EXECUTED
8004188: 44 3b 00 4d be r1,fp,80042bc <rtems_termios_enqueue_raw_characters+0x334><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
800418c: d0 12 00 00 wcsr IE,r18 <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
8004190: 29 63 00 5c lw r3,(r11+92) <== NOT EXECUTED
8004194: 44 6c 00 36 be r3,r12,800426c <rtems_termios_enqueue_raw_characters+0x2e4><== NOT EXECUTED
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
8004198: 29 63 00 58 lw r3,(r11+88) <== NOT EXECUTED
800419c: b4 6c 18 00 add r3,r3,r12 <== NOT EXECUTED
80041a0: 30 6e 00 00 sb (r3+0),r14 <== NOT EXECUTED
tty->rawInBuf.Tail = newTail;
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
80041a4: 29 63 00 e4 lw r3,(r11+228) <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
80041a8: 59 6c 00 60 sw (r11+96),r12 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
80041ac: 5c 60 00 07 bne r3,r0,80041c8 <rtems_termios_enqueue_raw_characters+0x240><== NOT EXECUTED
80041b0: 29 64 00 dc lw r4,(r11+220) <== NOT EXECUTED
80041b4: 44 83 00 05 be r4,r3,80041c8 <rtems_termios_enqueue_raw_characters+0x240><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
80041b8: 29 62 00 e0 lw r2,(r11+224) <== NOT EXECUTED
80041bc: bb 00 08 00 mv r1,r24 <== NOT EXECUTED
80041c0: d8 80 00 00 call r4 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
80041c4: 59 77 00 e4 sw (r11+228),r23 <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
80041c8: 35 ef ff ff addi r15,r15,-1 <== NOT EXECUTED
80041cc: 35 ad 00 01 addi r13,r13,1 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
80041d0: 5d e0 ff ca bne r15,r0,80040f8 <rtems_termios_enqueue_raw_characters+0x170><== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
}
}
}
tty->rawInBufDropped += dropped;
80041d4: 29 62 00 78 lw r2,(r11+120) <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
80041d8: 29 61 00 68 lw r1,(r11+104) <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
}
}
}
tty->rawInBufDropped += dropped;
80041dc: b4 50 10 00 add r2,r2,r16 <== NOT EXECUTED
80041e0: 59 62 00 78 sw (r11+120),r2 <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
80041e4: f8 00 0a 2a calli 8006a8c <rtems_semaphore_release> <== NOT EXECUTED
return dropped;
80041e8: e3 ff ff a1 bi 800406c <rtems_termios_enqueue_raw_characters+0xe4><== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
80041ec: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
80041f0: a0 39 08 00 and r1,r1,r25 <== NOT EXECUTED
80041f4: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
80041f8: 34 11 00 01 mvi r17,1 <== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
80041fc: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED
8004200: 20 63 00 30 andi r3,r3,0x30 <== NOT EXECUTED
8004204: 5c 74 ff f1 bne r3,r20,80041c8 <rtems_termios_enqueue_raw_characters+0x240><== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
8004208: 90 00 60 00 rcsr r12,IE <== NOT EXECUTED
800420c: a1 93 18 00 and r3,r12,r19 <== NOT EXECUTED
8004210: d0 03 00 00 wcsr IE,r3 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
8004214: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
8004218: 29 61 00 94 lw r1,(r11+148) <== NOT EXECUTED
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
800421c: a0 75 18 00 and r3,r3,r21 <== NOT EXECUTED
8004220: 59 63 00 b8 sw (r11+184),r3 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
8004224: 5c 20 00 03 bne r1,r0,8004230 <rtems_termios_enqueue_raw_characters+0x2a8><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
8004228: d0 0c 00 00 wcsr IE,r12 <== NOT EXECUTED
800422c: e3 ff ff e7 bi 80041c8 <rtems_termios_enqueue_raw_characters+0x240><== 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,
8004230: 29 63 00 7c lw r3,(r11+124) <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
8004234: 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,
8004238: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED
800423c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8004240: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED
8004244: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
8004248: d8 80 00 00 call r4 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
800424c: d0 0c 00 00 wcsr IE,r12 <== NOT EXECUTED
8004250: e3 ff ff de bi 80041c8 <rtems_termios_enqueue_raw_characters+0x240><== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
8004254: 41 64 00 49 lbu r4,(r11+73) <== NOT EXECUTED
8004258: 44 83 00 07 be r4,r3,8004274 <rtems_termios_enqueue_raw_characters+0x2ec><== NOT EXECUTED
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
800425c: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8004260: 38 21 00 10 ori r1,r1,0x10 <== NOT EXECUTED
8004264: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
8004268: e3 ff ff e4 bi 80041f8 <rtems_termios_enqueue_raw_characters+0x270><== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
dropped++;
800426c: 36 10 00 01 addi r16,r16,1 <== NOT EXECUTED
8004270: e3 ff ff d6 bi 80041c8 <rtems_termios_enqueue_raw_characters+0x240><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
8004274: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8004278: 18 21 00 10 xori r1,r1,0x10 <== NOT EXECUTED
800427c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
8004280: e3 ff ff de bi 80041f8 <rtems_termios_enqueue_raw_characters+0x270><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
== (FL_MDXOF ) ){
if ((tty->flow_ctrl & FL_OSTOP) ||
8004284: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8004288: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED
800428c: 5c 20 00 03 bne r1,r0,8004298 <rtems_termios_enqueue_raw_characters+0x310><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
8004290: 29 62 00 94 lw r2,(r11+148) <== NOT EXECUTED
8004294: 5c 41 ff be bne r2,r1,800418c <rtems_termios_enqueue_raw_characters+0x204><== NOT EXECUTED
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
8004298: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
800429c: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED
80042a0: 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;
80042a4: 38 42 00 02 ori r2,r2,0x2 <== NOT EXECUTED
80042a8: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
80042ac: 2b 82 00 48 lw r2,(sp+72) <== NOT EXECUTED
80042b0: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
80042b4: d8 80 00 00 call r4 <== NOT EXECUTED
80042b8: e3 ff ff b5 bi 800418c <rtems_termios_enqueue_raw_characters+0x204><== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
80042bc: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
80042c0: 29 62 00 ac lw r2,(r11+172) <== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
80042c4: 38 21 00 04 ori r1,r1,0x4 <== NOT EXECUTED
80042c8: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
80042cc: 44 40 ff b0 be r2,r0,800418c <rtems_termios_enqueue_raw_characters+0x204><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
80042d0: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
80042d4: d8 40 00 00 call r2 <== NOT EXECUTED
80042d8: e3 ff ff ad bi 800418c <rtems_termios_enqueue_raw_characters+0x204><== NOT EXECUTED
08003ab8 <rtems_termios_initialize>:
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
8003ab8: 37 9c ff f8 addi sp,sp,-8
8003abc: 5b 8b 00 08 sw (sp+8),r11
8003ac0: 5b 9d 00 04 sw (sp+4),ra
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
8003ac4: 78 05 08 02 mvhi r5,0x802
8003ac8: 38 a5 69 cc ori r5,r5,0x69cc
8003acc: 28 ab 00 00 lw r11,(r5+0)
8003ad0: 45 60 00 05 be r11,r0,8003ae4 <rtems_termios_initialize+0x2c><== ALWAYS TAKEN
RTEMS_NO_PRIORITY,
&rtems_termios_ttyMutex);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
8003ad4: 2b 9d 00 04 lw ra,(sp+4)
8003ad8: 2b 8b 00 08 lw r11,(sp+8)
8003adc: 37 9c 00 08 addi sp,sp,8
8003ae0: c3 a0 00 00 ret
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
sc = rtems_semaphore_create (
8003ae4: 78 01 54 52 mvhi r1,0x5452
8003ae8: 38 21 6d 69 ori r1,r1,0x6d69
8003aec: 34 02 00 01 mvi r2,1
8003af0: 34 03 00 54 mvi r3,84
8003af4: b9 60 20 00 mv r4,r11
8003af8: f8 00 0a c7 calli 8006614 <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)
8003afc: 44 2b ff f6 be r1,r11,8003ad4 <rtems_termios_initialize+0x1c><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
8003b00: f8 00 0d af calli 80071bc <rtems_fatal_error_occurred> <== NOT EXECUTED
0800507c <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
800507c: 37 9c ff e8 addi sp,sp,-24
8005080: 5b 8b 00 18 sw (sp+24),r11
8005084: 5b 8c 00 14 sw (sp+20),r12
8005088: 5b 8d 00 10 sw (sp+16),r13
800508c: 5b 8e 00 0c sw (sp+12),r14
8005090: 5b 8f 00 08 sw (sp+8),r15
8005094: 5b 9d 00 04 sw (sp+4),ra
8005098: b8 20 60 00 mv r12,r1
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
800509c: 28 21 00 00 lw r1,(r1+0)
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
80050a0: 34 02 00 00 mvi r2,0
80050a4: 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;
80050a8: 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);
80050ac: 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;
80050b0: 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);
80050b4: 29 61 00 18 lw r1,(r11+24)
80050b8: f8 00 06 14 calli 8006908 <rtems_semaphore_obtain>
80050bc: b8 20 68 00 mv r13,r1
if (sc != RTEMS_SUCCESSFUL) {
80050c0: 5c 20 00 1e bne r1,r0,8005138 <rtems_termios_ioctl+0xbc> <== NEVER TAKEN
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
80050c4: 29 81 00 04 lw r1,(r12+4)
80050c8: 34 02 00 04 mvi r2,4
80050cc: 44 22 00 15 be r1,r2,8005120 <rtems_termios_ioctl+0xa4> <== NEVER TAKEN
80050d0: 54 22 00 24 bgu r1,r2,8005160 <rtems_termios_ioctl+0xe4> <== NEVER TAKEN
80050d4: 34 02 00 02 mvi r2,2
80050d8: 44 22 00 2d be r1,r2,800518c <rtems_termios_ioctl+0x110>
80050dc: 54 22 00 d9 bgu r1,r2,8005440 <rtems_termios_ioctl+0x3c4> <== NEVER TAKEN
80050e0: 34 02 00 01 mvi r2,1
80050e4: 44 22 00 c3 be r1,r2,80053f0 <rtems_termios_ioctl+0x374> <== ALWAYS TAKEN
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
80050e8: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED
80050ec: 78 0d 08 02 mvhi r13,0x802 <== NOT EXECUTED
80050f0: 34 02 00 05 mvi r2,5 <== NOT EXECUTED
80050f4: 39 ad 67 f8 ori r13,r13,0x67f8 <== NOT EXECUTED
80050f8: fb ff f0 f4 calli 80014c8 <__ashlsi3> <== NOT EXECUTED
80050fc: b5 a1 08 00 add r1,r13,r1 <== NOT EXECUTED
8005100: 28 23 00 18 lw r3,(r1+24) <== NOT EXECUTED
8005104: 34 0d 00 0a mvi r13,10 <== NOT EXECUTED
8005108: 44 60 00 0a be r3,r0,8005130 <rtems_termios_ioctl+0xb4> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
800510c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8005110: b9 80 10 00 mv r2,r12 <== NOT EXECUTED
8005114: d8 60 00 00 call r3 <== NOT EXECUTED
8005118: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
800511c: e0 00 00 05 bi 8005130 <rtems_termios_ioctl+0xb4> <== NOT EXECUTED
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
8005120: 29 c2 00 00 lw r2,(r14+0) <== NOT EXECUTED
8005124: 59 62 00 dc sw (r11+220),r2 <== NOT EXECUTED
8005128: 29 ce 00 04 lw r14,(r14+4) <== NOT EXECUTED
800512c: 59 6e 00 e0 sw (r11+224),r14 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
8005130: 29 61 00 18 lw r1,(r11+24)
8005134: f8 00 06 56 calli 8006a8c <rtems_semaphore_release>
args->ioctl_return = sc;
return sc;
}
8005138: 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;
800513c: 59 8d 00 0c sw (r12+12),r13
return sc;
}
8005140: 2b 9d 00 04 lw ra,(sp+4)
8005144: 2b 8b 00 18 lw r11,(sp+24)
8005148: 2b 8c 00 14 lw r12,(sp+20)
800514c: 2b 8d 00 10 lw r13,(sp+16)
8005150: 2b 8e 00 0c lw r14,(sp+12)
8005154: 2b 8f 00 08 lw r15,(sp+8)
8005158: 37 9c 00 18 addi sp,sp,24
800515c: c3 a0 00 00 ret
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
8005160: 78 02 40 04 mvhi r2,0x4004 <== NOT EXECUTED
8005164: 38 42 66 7f ori r2,r2,0x667f <== NOT EXECUTED
8005168: 44 22 00 72 be r1,r2,8005330 <rtems_termios_ioctl+0x2b4> <== NOT EXECUTED
800516c: 54 22 00 7e bgu r1,r2,8005364 <rtems_termios_ioctl+0x2e8> <== NOT EXECUTED
8005170: 34 02 00 05 mvi r2,5 <== NOT EXECUTED
8005174: 5c 22 ff dd bne r1,r2,80050e8 <rtems_termios_ioctl+0x6c> <== NOT EXECUTED
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
8005178: 29 c1 00 00 lw r1,(r14+0) <== NOT EXECUTED
800517c: 59 61 00 d4 sw (r11+212),r1 <== NOT EXECUTED
8005180: 29 ce 00 04 lw r14,(r14+4) <== NOT EXECUTED
8005184: 59 6e 00 d8 sw (r11+216),r14 <== NOT EXECUTED
break;
8005188: e3 ff ff ea bi 8005130 <rtems_termios_ioctl+0xb4> <== NOT EXECUTED
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
800518c: 29 81 00 08 lw r1,(r12+8)
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
8005190: 29 63 00 b8 lw r3,(r11+184)
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
8005194: 28 22 00 00 lw r2,(r1+0)
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
8005198: 20 63 02 00 andi r3,r3,0x200
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
800519c: 59 62 00 30 sw (r11+48),r2
80051a0: 28 24 00 04 lw r4,(r1+4)
80051a4: 59 64 00 34 sw (r11+52),r4
80051a8: 28 24 00 08 lw r4,(r1+8)
80051ac: 59 64 00 38 sw (r11+56),r4
80051b0: 28 24 00 0c lw r4,(r1+12)
80051b4: 59 64 00 3c sw (r11+60),r4
80051b8: 28 24 00 10 lw r4,(r1+16)
80051bc: 59 64 00 40 sw (r11+64),r4
80051c0: 28 24 00 14 lw r4,(r1+20)
80051c4: 59 64 00 44 sw (r11+68),r4
80051c8: 28 24 00 18 lw r4,(r1+24)
80051cc: 59 64 00 48 sw (r11+72),r4
80051d0: 28 24 00 1c lw r4,(r1+28)
80051d4: 59 64 00 4c sw (r11+76),r4
80051d8: 28 21 00 20 lw r1,(r1+32)
80051dc: 59 61 00 50 sw (r11+80),r1
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
80051e0: 44 60 00 15 be r3,r0,8005234 <rtems_termios_ioctl+0x1b8>
80051e4: 20 42 04 00 andi r2,r2,0x400
80051e8: 5c 40 00 13 bne r2,r0,8005234 <rtems_termios_ioctl+0x1b8> <== ALWAYS TAKEN
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
80051ec: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
80051f0: 34 01 fd ef mvi r1,-529 <== NOT EXECUTED
80051f4: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED
80051f8: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
80051fc: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8005200: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED
8005204: 44 20 00 0c be r1,r0,8005234 <rtems_termios_ioctl+0x1b8> <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
8005208: 90 00 70 00 rcsr r14,IE <== NOT EXECUTED
800520c: 34 01 ff fe mvi r1,-2 <== NOT EXECUTED
8005210: a1 c1 08 00 and r1,r14,r1 <== NOT EXECUTED
8005214: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
8005218: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
800521c: 34 01 ff df mvi r1,-33 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
8005220: 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;
8005224: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED
8005228: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
800522c: 5c 60 00 8a bne r3,r0,8005454 <rtems_termios_ioctl+0x3d8> <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
8005230: d0 0e 00 00 wcsr IE,r14 <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) &&
8005234: 29 61 00 b8 lw r1,(r11+184)
8005238: 20 21 04 00 andi r1,r1,0x400
800523c: 44 20 00 0c be r1,r0,800526c <rtems_termios_ioctl+0x1f0> <== ALWAYS TAKEN
8005240: 29 61 00 30 lw r1,(r11+48) <== NOT EXECUTED
8005244: 20 21 10 00 andi r1,r1,0x1000 <== NOT EXECUTED
8005248: 5c 20 00 09 bne r1,r0,800526c <rtems_termios_ioctl+0x1f0> <== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
800524c: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
8005250: 34 01 fb ff mvi r1,-1025 <== NOT EXECUTED
8005254: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED
8005258: 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);
800525c: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
8005260: 34 01 ff fd mvi r1,-3 <== NOT EXECUTED
8005264: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED
8005268: 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) &&
800526c: 29 61 00 b8 lw r1,(r11+184)
8005270: 20 21 01 00 andi r1,r1,0x100
8005274: 44 20 00 76 be r1,r0,800544c <rtems_termios_ioctl+0x3d0> <== ALWAYS TAKEN
8005278: 29 62 00 38 lw r2,(r11+56) <== NOT EXECUTED
800527c: 48 02 00 12 bg r0,r2,80052c4 <rtems_termios_ioctl+0x248> <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
8005280: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED
8005284: 34 01 fe ff mvi r1,-257 <== NOT EXECUTED
8005288: a0 61 08 00 and r1,r3,r1 <== NOT EXECUTED
800528c: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
8005290: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8005294: 20 21 00 04 andi r1,r1,0x4 <== NOT EXECUTED
8005298: 44 20 00 06 be r1,r0,80052b0 <rtems_termios_ioctl+0x234> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
800529c: 29 63 00 b0 lw r3,(r11+176) <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
80052a0: 44 60 00 04 be r3,r0,80052b0 <rtems_termios_ioctl+0x234> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
tty->device.startRemoteTx(tty->minor);
80052a4: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
80052a8: d8 60 00 00 call r3 <== NOT EXECUTED
80052ac: 29 62 00 38 lw r2,(r11+56) <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
80052b0: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED
80052b4: 34 01 ff fb mvi r1,-5 <== NOT EXECUTED
80052b8: a0 61 08 00 and r1,r3,r1 <== NOT EXECUTED
80052bc: 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) {
80052c0: 4c 40 00 04 bge r2,r0,80052d0 <rtems_termios_ioctl+0x254> <== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDRTS;
80052c4: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
80052c8: 38 21 01 00 ori r1,r1,0x100 <== NOT EXECUTED
80052cc: 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) {
80052d0: 29 61 00 30 lw r1,(r11+48)
80052d4: 20 22 10 00 andi r2,r1,0x1000
80052d8: 44 40 00 04 be r2,r0,80052e8 <rtems_termios_ioctl+0x26c> <== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDXOF;
80052dc: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
80052e0: 38 42 04 00 ori r2,r2,0x400 <== NOT EXECUTED
80052e4: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
80052e8: 20 21 04 00 andi r1,r1,0x400
80052ec: 44 20 00 04 be r1,r0,80052fc <rtems_termios_ioctl+0x280> <== NEVER TAKEN
tty->flow_ctrl |= FL_MDXON;
80052f0: 29 61 00 b8 lw r1,(r11+184)
80052f4: 38 21 02 00 ori r1,r1,0x200
80052f8: 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) {
80052fc: 29 6e 00 3c lw r14,(r11+60)
8005300: 34 01 00 00 mvi r1,0
8005304: 21 ce 00 02 andi r14,r14,0x2
8005308: 45 c1 00 5c be r14,r1,8005478 <rtems_termios_ioctl+0x3fc> <== NEVER TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
800530c: 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;
8005310: 59 61 00 6c sw (r11+108),r1
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
8005314: 59 61 00 70 sw (r11+112),r1
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
8005318: 29 63 00 a8 lw r3,(r11+168)
800531c: 44 60 ff 85 be r3,r0,8005130 <rtems_termios_ioctl+0xb4> <== NEVER TAKEN
(*tty->device.setAttributes)(tty->minor, &tty->termios);
8005320: 29 61 00 10 lw r1,(r11+16)
8005324: 35 62 00 30 addi r2,r11,48
8005328: d8 60 00 00 call r3
800532c: e3 ff ff 81 bi 8005130 <rtems_termios_ioctl+0xb4>
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
8005330: 29 62 00 60 lw r2,(r11+96) <== NOT EXECUTED
8005334: 29 61 00 5c lw r1,(r11+92) <== NOT EXECUTED
8005338: c8 41 08 00 sub r1,r2,r1 <== NOT EXECUTED
if ( rawnc < 0 )
800533c: 4c 20 00 03 bge r1,r0,8005348 <rtems_termios_ioctl+0x2cc> <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
8005340: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED
8005344: 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;
8005348: 29 64 00 20 lw r4,(r11+32) <== NOT EXECUTED
800534c: 29 62 00 24 lw r2,(r11+36) <== NOT EXECUTED
8005350: 29 83 00 08 lw r3,(r12+8) <== NOT EXECUTED
8005354: c8 82 10 00 sub r2,r4,r2 <== NOT EXECUTED
8005358: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED
800535c: 58 61 00 00 sw (r3+0),r1 <== NOT EXECUTED
8005360: e3 ff ff 74 bi 8005130 <rtems_termios_ioctl+0xb4> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
8005364: 78 02 40 04 mvhi r2,0x4004 <== NOT EXECUTED
8005368: 38 42 74 1a ori r2,r2,0x741a <== NOT EXECUTED
800536c: 44 22 00 1d be r1,r2,80053e0 <rtems_termios_ioctl+0x364> <== NOT EXECUTED
8005370: 78 02 80 04 mvhi r2,0x8004 <== NOT EXECUTED
8005374: 38 42 74 1b ori r2,r2,0x741b <== NOT EXECUTED
8005378: 5c 22 ff 5c bne r1,r2,80050e8 <rtems_termios_ioctl+0x6c> <== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
800537c: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED
8005380: 34 02 00 05 mvi r2,5 <== NOT EXECUTED
8005384: 78 0e 08 02 mvhi r14,0x802 <== NOT EXECUTED
8005388: fb ff f0 50 calli 80014c8 <__ashlsi3> <== NOT EXECUTED
800538c: 39 ce 67 f8 ori r14,r14,0x67f8 <== NOT EXECUTED
8005390: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED
8005394: 28 22 00 04 lw r2,(r1+4) <== NOT EXECUTED
8005398: 44 40 00 04 be r2,r0,80053a8 <rtems_termios_ioctl+0x32c> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
800539c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80053a0: d8 40 00 00 call r2 <== NOT EXECUTED
80053a4: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
}
tty->t_line=*(int*)(args->buffer);
80053a8: 29 81 00 08 lw r1,(r12+8) <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
80053ac: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
80053b0: 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);
80053b4: 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) {
80053b8: 34 02 00 05 mvi r2,5 <== NOT EXECUTED
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
80053bc: 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) {
80053c0: fb ff f0 42 calli 80014c8 <__ashlsi3> <== NOT EXECUTED
80053c4: b5 c1 08 00 add r1,r14,r1 <== NOT EXECUTED
80053c8: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED
80053cc: 44 40 ff 59 be r2,r0,8005130 <rtems_termios_ioctl+0xb4> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
80053d0: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
80053d4: d8 40 00 00 call r2 <== NOT EXECUTED
80053d8: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
80053dc: e3 ff ff 55 bi 8005130 <rtems_termios_ioctl+0xb4> <== NOT EXECUTED
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
80053e0: 29 81 00 08 lw r1,(r12+8) <== NOT EXECUTED
80053e4: 29 64 00 cc lw r4,(r11+204) <== NOT EXECUTED
80053e8: 58 24 00 00 sw (r1+0),r4 <== NOT EXECUTED
break;
80053ec: e3 ff ff 51 bi 8005130 <rtems_termios_ioctl+0xb4> <== NOT EXECUTED
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
80053f0: 29 62 00 30 lw r2,(r11+48)
80053f4: 29 81 00 08 lw r1,(r12+8)
80053f8: 58 22 00 00 sw (r1+0),r2
80053fc: 29 64 00 34 lw r4,(r11+52)
8005400: 58 24 00 04 sw (r1+4),r4
8005404: 29 62 00 38 lw r2,(r11+56)
8005408: 58 22 00 08 sw (r1+8),r2
800540c: 29 64 00 3c lw r4,(r11+60)
8005410: 58 24 00 0c sw (r1+12),r4
8005414: 29 62 00 40 lw r2,(r11+64)
8005418: 58 22 00 10 sw (r1+16),r2
800541c: 29 64 00 44 lw r4,(r11+68)
8005420: 58 24 00 14 sw (r1+20),r4
8005424: 29 62 00 48 lw r2,(r11+72)
8005428: 58 22 00 18 sw (r1+24),r2
800542c: 29 64 00 4c lw r4,(r11+76)
8005430: 58 24 00 1c sw (r1+28),r4
8005434: 29 62 00 50 lw r2,(r11+80)
8005438: 58 22 00 20 sw (r1+32),r2
break;
800543c: e3 ff ff 3d bi 8005130 <rtems_termios_ioctl+0xb4>
if (tty->device.setAttributes)
(*tty->device.setAttributes)(tty->minor, &tty->termios);
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
8005440: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8005444: fb ff fd fd calli 8004c38 <drainOutput> <== NOT EXECUTED
break;
8005448: e3 ff ff 3a bi 8005130 <rtems_termios_ioctl+0xb4> <== NOT EXECUTED
800544c: 29 62 00 38 lw r2,(r11+56)
8005450: e3 ff ff 9c bi 80052c0 <rtems_termios_ioctl+0x244>
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,
8005454: 29 63 00 7c lw r3,(r11+124) <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
8005458: 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,
800545c: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED
8005460: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8005464: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED
8005468: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
800546c: d8 80 00 00 call r4 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
8005470: d0 0e 00 00 wcsr IE,r14 <== NOT EXECUTED
8005474: e3 ff ff 70 bi 8005234 <rtems_termios_ioctl+0x1b8> <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
8005478: 41 6f 00 46 lbu r15,(r11+70) <== NOT EXECUTED
800547c: f8 00 03 12 calli 80060c4 <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] *
8005480: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED
8005484: f8 00 72 5b calli 8021df0 <__mulsi3> <== NOT EXECUTED
8005488: 34 02 00 0a mvi r2,10 <== NOT EXECUTED
800548c: f8 00 72 d8 calli 8021fec <__udivsi3> <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
8005490: 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] *
8005494: 59 61 00 54 sw (r11+84),r1 <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
8005498: 44 4e 00 07 be r2,r14,80054b4 <rtems_termios_ioctl+0x438> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
800549c: 41 62 00 47 lbu r2,(r11+71) <== NOT EXECUTED
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
80054a0: 59 6e 00 6c sw (r11+108),r14 <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
80054a4: 59 61 00 70 sw (r11+112),r1 <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
80054a8: 44 40 00 09 be r2,r0,80054cc <rtems_termios_ioctl+0x450> <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
80054ac: 59 6e 00 74 sw (r11+116),r14 <== NOT EXECUTED
80054b0: e3 ff ff 9a bi 8005318 <rtems_termios_ioctl+0x29c> <== NOT EXECUTED
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
80054b4: 41 61 00 47 lbu r1,(r11+71) <== NOT EXECUTED
80054b8: 44 22 00 07 be r1,r2,80054d4 <rtems_termios_ioctl+0x458> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
80054bc: 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;
80054c0: 59 62 00 6c sw (r11+108),r2 <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
80054c4: 59 62 00 70 sw (r11+112),r2 <== NOT EXECUTED
80054c8: e3 ff ff 94 bi 8005318 <rtems_termios_ioctl+0x29c> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
80054cc: 59 61 00 74 sw (r11+116),r1 <== NOT EXECUTED
80054d0: e3 ff ff 92 bi 8005318 <rtems_termios_ioctl+0x29c> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
80054d4: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
80054d8: 59 61 00 6c sw (r11+108),r1 <== NOT EXECUTED
80054dc: e3 ff ff 8f bi 8005318 <rtems_termios_ioctl+0x29c> <== NOT EXECUTED
08003b04 <rtems_termios_number_to_baud>:
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003b04: 34 03 04 b0 mvi r3,1200
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
8003b08: 34 02 00 09 mvi r2,9
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003b0c: 44 23 00 0d be r1,r3,8003b40 <rtems_termios_number_to_baud+0x3c>
8003b10: 48 23 00 0e bg r1,r3,8003b48 <rtems_termios_number_to_baud+0x44>
8003b14: 34 03 00 86 mvi r3,134
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
8003b18: 34 02 00 04 mvi r2,4
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003b1c: 44 23 00 09 be r1,r3,8003b40 <rtems_termios_number_to_baud+0x3c>
8003b20: 48 23 00 24 bg r1,r3,8003bb0 <rtems_termios_number_to_baud+0xac>
8003b24: 34 03 00 32 mvi r3,50
8003b28: 34 02 00 01 mvi r2,1
8003b2c: 44 23 00 05 be r1,r3,8003b40 <rtems_termios_number_to_baud+0x3c>
8003b30: 48 23 00 2f bg r1,r3,8003bec <rtems_termios_number_to_baud+0xe8>
8003b34: b8 20 10 00 mv r2,r1
8003b38: 44 20 00 02 be r1,r0,8003b40 <rtems_termios_number_to_baud+0x3c>
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
case 230400: termios_baud = B230400; break;
case 460800: termios_baud = B460800; break;
8003b3c: 34 02 ff ff mvi r2,-1
default: termios_baud = -1; break;
}
return termios_baud;
}
8003b40: b8 40 08 00 mv r1,r2
8003b44: c3 a0 00 00 ret
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003b48: 34 03 4b 00 mvi r3,19200
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
8003b4c: 34 02 00 0e mvi r2,14
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003b50: 44 23 ff fc be r1,r3,8003b40 <rtems_termios_number_to_baud+0x3c>
8003b54: 48 23 00 0a bg r1,r3,8003b7c <rtems_termios_number_to_baud+0x78>
8003b58: 34 03 09 60 mvi r3,2400
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
8003b5c: 34 02 00 0b mvi r2,11
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003b60: 44 23 ff f8 be r1,r3,8003b40 <rtems_termios_number_to_baud+0x3c>
8003b64: 48 23 00 32 bg r1,r3,8003c2c <rtems_termios_number_to_baud+0x128>
8003b68: 34 03 07 08 mvi r3,1800
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
8003b6c: 34 02 00 0a mvi r2,10
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003b70: 44 23 ff f4 be r1,r3,8003b40 <rtems_termios_number_to_baud+0x3c><== ALWAYS TAKEN
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
case 230400: termios_baud = B230400; break;
case 460800: termios_baud = B460800; break;
8003b74: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
8003b78: e3 ff ff f2 bi 8003b40 <rtems_termios_number_to_baud+0x3c> <== NOT EXECUTED
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003b7c: 78 03 00 01 mvhi r3,0x1
8003b80: 38 63 c2 00 ori r3,r3,0xc200
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
8003b84: 34 02 10 02 mvi r2,4098
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003b88: 44 23 ff ee be r1,r3,8003b40 <rtems_termios_number_to_baud+0x3c>
8003b8c: 48 23 00 1f bg r1,r3,8003c08 <rtems_termios_number_to_baud+0x104>
8003b90: 38 03 96 00 mvu r3,0x9600
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
8003b94: 34 02 00 0f mvi r2,15
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003b98: 44 23 ff ea be r1,r3,8003b40 <rtems_termios_number_to_baud+0x3c>
8003b9c: 38 03 e1 00 mvu r3,0xe100
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
8003ba0: 34 02 10 01 mvi r2,4097
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003ba4: 44 23 ff e7 be r1,r3,8003b40 <rtems_termios_number_to_baud+0x3c><== ALWAYS TAKEN
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
case 230400: termios_baud = B230400; break;
case 460800: termios_baud = B460800; break;
8003ba8: 34 02 ff ff mvi r2,-1 <== NOT EXECUTED
8003bac: e3 ff ff e5 bi 8003b40 <rtems_termios_number_to_baud+0x3c> <== NOT EXECUTED
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003bb0: 34 03 00 c8 mvi r3,200
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
8003bb4: 34 02 00 06 mvi r2,6
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003bb8: 44 23 ff e2 be r1,r3,8003b40 <rtems_termios_number_to_baud+0x3c>
8003bbc: 48 23 00 05 bg r1,r3,8003bd0 <rtems_termios_number_to_baud+0xcc>
8003bc0: 34 03 00 96 mvi r3,150
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
8003bc4: 34 02 00 05 mvi r2,5
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003bc8: 5c 23 ff dd bne r1,r3,8003b3c <rtems_termios_number_to_baud+0x38><== NEVER TAKEN
8003bcc: e3 ff ff dd bi 8003b40 <rtems_termios_number_to_baud+0x3c>
8003bd0: 34 03 01 2c mvi r3,300
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
8003bd4: 34 02 00 07 mvi r2,7
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003bd8: 44 23 ff da be r1,r3,8003b40 <rtems_termios_number_to_baud+0x3c>
8003bdc: 34 03 02 58 mvi r3,600
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
8003be0: 34 02 00 08 mvi r2,8
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003be4: 5c 23 ff d6 bne r1,r3,8003b3c <rtems_termios_number_to_baud+0x38><== NEVER TAKEN
8003be8: e3 ff ff d6 bi 8003b40 <rtems_termios_number_to_baud+0x3c>
8003bec: 34 03 00 4b mvi r3,75
8003bf0: 34 02 00 02 mvi r2,2
8003bf4: 44 23 ff d3 be r1,r3,8003b40 <rtems_termios_number_to_baud+0x3c>
8003bf8: 34 03 00 6e mvi r3,110
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
8003bfc: 34 02 00 03 mvi r2,3
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003c00: 5c 23 ff cf bne r1,r3,8003b3c <rtems_termios_number_to_baud+0x38><== NEVER TAKEN
8003c04: e3 ff ff cf bi 8003b40 <rtems_termios_number_to_baud+0x3c>
8003c08: 78 03 00 03 mvhi r3,0x3
8003c0c: 38 63 84 00 ori r3,r3,0x8400
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
8003c10: 34 02 10 03 mvi r2,4099
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003c14: 44 23 ff cb be r1,r3,8003b40 <rtems_termios_number_to_baud+0x3c>
8003c18: 78 03 00 07 mvhi r3,0x7
8003c1c: 38 63 08 00 ori r3,r3,0x800
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
case 230400: termios_baud = B230400; break;
8003c20: 34 02 10 04 mvi r2,4100
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003c24: 5c 23 ff c6 bne r1,r3,8003b3c <rtems_termios_number_to_baud+0x38><== NEVER TAKEN
8003c28: e3 ff ff c6 bi 8003b40 <rtems_termios_number_to_baud+0x3c>
8003c2c: 34 03 12 c0 mvi r3,4800
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
8003c30: 34 02 00 0c mvi r2,12
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003c34: 44 23 ff c3 be r1,r3,8003b40 <rtems_termios_number_to_baud+0x3c>
8003c38: 34 03 25 80 mvi r3,9600
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
8003c3c: 34 02 00 0d mvi r2,13
int32_t baud
)
{
int termios_baud;
switch (baud) {
8003c40: 5c 23 ff bf bne r1,r3,8003b3c <rtems_termios_number_to_baud+0x38>
8003c44: e3 ff ff bf bi 8003b40 <rtems_termios_number_to_baud+0x3c>
080056bc <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
80056bc: 37 9c ff c4 addi sp,sp,-60
80056c0: 5b 8b 00 3c sw (sp+60),r11
80056c4: 5b 8c 00 38 sw (sp+56),r12
80056c8: 5b 8d 00 34 sw (sp+52),r13
80056cc: 5b 8e 00 30 sw (sp+48),r14
80056d0: 5b 8f 00 2c sw (sp+44),r15
80056d4: 5b 90 00 28 sw (sp+40),r16
80056d8: 5b 91 00 24 sw (sp+36),r17
80056dc: 5b 92 00 20 sw (sp+32),r18
80056e0: 5b 93 00 1c sw (sp+28),r19
80056e4: 5b 94 00 18 sw (sp+24),r20
80056e8: 5b 95 00 14 sw (sp+20),r21
80056ec: 5b 96 00 10 sw (sp+16),r22
80056f0: 5b 97 00 0c sw (sp+12),r23
80056f4: 5b 98 00 08 sw (sp+8),r24
80056f8: 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,
80056fc: 78 0d 08 02 mvhi r13,0x802
8005700: 39 ad 69 cc ori r13,r13,0x69cc
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
8005704: b8 20 60 00 mv r12,r1
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
8005708: 29 a1 00 00 lw r1,(r13+0)
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
800570c: b8 40 78 00 mv r15,r2
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
8005710: 34 02 00 00 mvi r2,0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
8005714: b8 60 90 00 mv r18,r3
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
8005718: b8 40 18 00 mv r3,r2
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
800571c: b8 80 98 00 mv r19,r4
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
8005720: f8 00 04 7a calli 8006908 <rtems_semaphore_obtain>
8005724: b8 20 70 00 mv r14,r1
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
8005728: 5c 20 00 1d bne r1,r0,800579c <rtems_termios_open+0xe0> <== NEVER TAKEN
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
800572c: 78 10 08 02 mvhi r16,0x802
8005730: 3a 10 69 d4 ori r16,r16,0x69d4
8005734: 2a 0b 00 00 lw r11,(r16+0)
8005738: 5d 61 00 04 bne r11,r1,8005748 <rtems_termios_open+0x8c> <== NEVER TAKEN
800573c: e0 00 00 38 bi 800581c <rtems_termios_open+0x160>
8005740: 29 6b 00 00 lw r11,(r11+0) <== NOT EXECUTED
8005744: 45 60 00 36 be r11,r0,800581c <rtems_termios_open+0x160> <== NOT EXECUTED
if ((tty->major == major) && (tty->minor == minor))
8005748: 29 65 00 0c lw r5,(r11+12) <== NOT EXECUTED
800574c: 5c ac ff fd bne r5,r12,8005740 <rtems_termios_open+0x84> <== NOT EXECUTED
8005750: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8005754: 5c 2f ff fb bne r1,r15,8005740 <rtems_termios_open+0x84> <== NOT EXECUTED
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
if (!tty->refcount++) {
8005758: 29 62 00 08 lw r2,(r11+8)
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
800575c: 2a 43 00 00 lw r3,(r18+0)
if (!tty->refcount++) {
8005760: 34 41 00 01 addi r1,r2,1
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
8005764: 58 6b 00 38 sw (r3+56),r11
if (!tty->refcount++) {
8005768: 59 61 00 08 sw (r11+8),r1
800576c: 5c 40 00 0a bne r2,r0,8005794 <rtems_termios_open+0xd8> <== NEVER TAKEN
if (tty->device.firstOpen)
8005770: 29 64 00 98 lw r4,(r11+152)
8005774: 44 82 00 05 be r4,r2,8005788 <rtems_termios_open+0xcc> <== ALWAYS TAKEN
(*tty->device.firstOpen)(major, minor, arg);
8005778: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
800577c: b9 e0 10 00 mv r2,r15 <== NOT EXECUTED
8005780: ba 40 18 00 mv r3,r18 <== NOT EXECUTED
8005784: d8 80 00 00 call r4 <== NOT EXECUTED
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
8005788: 29 62 00 b4 lw r2,(r11+180)
800578c: 34 01 00 02 mvi r1,2
8005790: 44 41 00 15 be r2,r1,80057e4 <rtems_termios_open+0x128> <== NEVER TAKEN
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
8005794: 29 a1 00 00 lw r1,(r13+0)
8005798: f8 00 04 bd calli 8006a8c <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
800579c: b9 c0 08 00 mv r1,r14
80057a0: 2b 9d 00 04 lw ra,(sp+4)
80057a4: 2b 8b 00 3c lw r11,(sp+60)
80057a8: 2b 8c 00 38 lw r12,(sp+56)
80057ac: 2b 8d 00 34 lw r13,(sp+52)
80057b0: 2b 8e 00 30 lw r14,(sp+48)
80057b4: 2b 8f 00 2c lw r15,(sp+44)
80057b8: 2b 90 00 28 lw r16,(sp+40)
80057bc: 2b 91 00 24 lw r17,(sp+36)
80057c0: 2b 92 00 20 lw r18,(sp+32)
80057c4: 2b 93 00 1c lw r19,(sp+28)
80057c8: 2b 94 00 18 lw r20,(sp+24)
80057cc: 2b 95 00 14 lw r21,(sp+20)
80057d0: 2b 96 00 10 lw r22,(sp+16)
80057d4: 2b 97 00 0c lw r23,(sp+12)
80057d8: 2b 98 00 08 lw r24,(sp+8)
80057dc: 37 9c 00 3c addi sp,sp,60
80057e0: c3 a0 00 00 ret
(*tty->device.firstOpen)(major, minor, arg);
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(tty->rxTaskId,
80057e4: 29 61 00 c4 lw r1,(r11+196) <== NOT EXECUTED
80057e8: 78 02 08 00 mvhi r2,0x800 <== NOT EXECUTED
80057ec: 38 42 5c 08 ori r2,r2,0x5c08 <== NOT EXECUTED
80057f0: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
80057f4: f8 00 05 ae calli 8006eac <rtems_task_start> <== NOT EXECUTED
80057f8: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
rtems_termios_rxdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
80057fc: 5c 20 00 c0 bne r1,r0,8005afc <rtems_termios_open+0x440> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(tty->txTaskId,
8005800: 29 61 00 c8 lw r1,(r11+200) <== NOT EXECUTED
8005804: 78 02 08 00 mvhi r2,0x800 <== NOT EXECUTED
8005808: 38 42 5b 7c ori r2,r2,0x5b7c <== NOT EXECUTED
800580c: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
8005810: f8 00 05 a7 calli 8006eac <rtems_task_start> <== NOT EXECUTED
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
8005814: 44 2c ff e0 be r1,r12,8005794 <rtems_termios_open+0xd8> <== NOT EXECUTED
8005818: e0 00 00 b9 bi 8005afc <rtems_termios_open+0x440> <== NOT EXECUTED
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
800581c: 34 01 00 01 mvi r1,1
8005820: 34 02 00 e8 mvi r2,232
8005824: f8 00 1c 34 calli 800c8f4 <calloc>
if (tty == NULL) {
8005828: 34 14 00 00 mvi r20,0
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
800582c: b8 20 88 00 mv r17,r1
8005830: b8 20 58 00 mv r11,r1
if (tty == NULL) {
8005834: 44 34 00 9c be r1,r20,8005aa4 <rtems_termios_open+0x3e8> <== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
8005838: 78 01 08 02 mvhi r1,0x802
800583c: 38 21 62 38 ori r1,r1,0x6238
8005840: 28 21 00 00 lw r1,(r1+0)
8005844: 5a 21 00 64 sw (r17+100),r1
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
8005848: 2a 21 00 64 lw r1,(r17+100)
800584c: f8 00 1d 5b calli 800cdb8 <malloc>
8005850: 5a 21 00 58 sw (r17+88),r1
if (tty->rawInBuf.theBuf == NULL) {
8005854: 44 20 00 92 be r1,r0,8005a9c <rtems_termios_open+0x3e0> <== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
8005858: 78 01 08 02 mvhi r1,0x802
800585c: 38 21 62 3c ori r1,r1,0x623c
8005860: 28 21 00 00 lw r1,(r1+0)
8005864: 5a 21 00 88 sw (r17+136),r1
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
8005868: 2a 21 00 88 lw r1,(r17+136)
800586c: f8 00 1d 53 calli 800cdb8 <malloc>
8005870: 5a 21 00 7c sw (r17+124),r1
if (tty->rawOutBuf.theBuf == NULL) {
8005874: 44 20 00 90 be r1,r0,8005ab4 <rtems_termios_open+0x3f8> <== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
8005878: 78 01 08 02 mvhi r1,0x802
800587c: 38 21 62 34 ori r1,r1,0x6234
8005880: 28 21 00 00 lw r1,(r1+0)
8005884: f8 00 1d 4d calli 800cdb8 <malloc>
8005888: 5a 21 00 1c sw (r17+28),r1
if (tty->cbuf == NULL) {
800588c: 44 20 00 9d be r1,r0,8005b00 <rtems_termios_open+0x444> <== NEVER TAKEN
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
8005890: 2a 01 00 00 lw r1,(r16+0)
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
8005894: 5a 34 00 d4 sw (r17+212),r20
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
8005898: 5a 34 00 04 sw (r17+4),r20
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
tty->tty_snd.sw_arg = NULL;
800589c: 5a 34 00 d8 sw (r17+216),r20
tty->tty_rcv.sw_pfn = NULL;
80058a0: 5a 34 00 dc sw (r17+220),r20
tty->tty_rcv.sw_arg = NULL;
80058a4: 5a 34 00 e0 sw (r17+224),r20
tty->tty_rcvwakeup = 0;
80058a8: 5a 34 00 e4 sw (r17+228),r20
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
80058ac: 5a 21 00 00 sw (r17+0),r1
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
80058b0: 44 20 00 02 be r1,r0,80058b8 <rtems_termios_open+0x1fc> <== ALWAYS TAKEN
rtems_termios_ttyHead->back = tty;
80058b4: 58 31 00 04 sw (r1+4),r17 <== NOT EXECUTED
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
80058b8: 78 01 08 02 mvhi r1,0x802
80058bc: 38 21 69 d0 ori r1,r1,0x69d0
80058c0: 28 22 00 00 lw r2,(r1+0)
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
80058c4: 5a 11 00 00 sw (r16+0),r17
if (rtems_termios_ttyTail == NULL)
80058c8: 44 40 00 ab be r2,r0,8005b74 <rtems_termios_open+0x4b8> <== ALWAYS TAKEN
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
80058cc: 78 10 08 02 mvhi r16,0x802
80058d0: 3a 10 62 40 ori r16,r16,0x6240
80058d4: 42 02 00 00 lbu r2,(r16+0)
80058d8: 78 01 54 52 mvhi r1,0x5452
80058dc: 38 21 69 00 ori r1,r1,0x6900
80058e0: b8 41 08 00 or r1,r2,r1
80058e4: 34 03 00 54 mvi r3,84
80058e8: 34 02 00 01 mvi r2,1
80058ec: 34 04 00 00 mvi r4,0
80058f0: 36 25 00 14 addi r5,r17,20
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
80058f4: 5a 2f 00 10 sw (r17+16),r15
tty->major = major;
80058f8: 5a 2c 00 0c sw (r17+12),r12
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
80058fc: f8 00 03 46 calli 8006614 <rtems_semaphore_create>
8005900: b8 20 a0 00 mv r20,r1
rtems_build_name ('T', 'R', 'i', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
8005904: 5c 20 00 7e bne r1,r0,8005afc <rtems_termios_open+0x440> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
8005908: 42 01 00 00 lbu r1,(r16+0)
800590c: 78 02 54 52 mvhi r2,0x5452
8005910: 38 42 6f 00 ori r2,r2,0x6f00
8005914: b8 22 08 00 or r1,r1,r2
8005918: 34 03 00 54 mvi r3,84
800591c: 34 02 00 01 mvi r2,1
8005920: ba 80 20 00 mv r4,r20
8005924: 36 25 00 18 addi r5,r17,24
8005928: f8 00 03 3b calli 8006614 <rtems_semaphore_create>
800592c: b8 20 a8 00 mv r21,r1
rtems_build_name ('T', 'R', 'o', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
8005930: 5c 34 00 73 bne r1,r20,8005afc <rtems_termios_open+0x440> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
8005934: 42 02 00 00 lbu r2,(r16+0)
8005938: 78 01 54 52 mvhi r1,0x5452
800593c: 38 21 78 00 ori r1,r1,0x7800
8005940: b8 41 08 00 or r1,r2,r1
8005944: 34 03 00 20 mvi r3,32
8005948: ba a0 10 00 mv r2,r21
800594c: ba a0 20 00 mv r4,r21
8005950: 36 25 00 8c addi r5,r17,140
8005954: f8 00 03 30 calli 8006614 <rtems_semaphore_create>
8005958: b8 20 a0 00 mv r20,r1
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
800595c: 5c 35 00 68 bne r1,r21,8005afc <rtems_termios_open+0x440> <== NEVER TAKEN
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
8005960: 2a 62 00 00 lw r2,(r19+0)
8005964: 2a 61 00 1c lw r1,(r19+28)
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
8005968: 5a 34 00 94 sw (r17+148),r20
/*
* Set callbacks
*/
tty->device = *callbacks;
800596c: 5a 22 00 98 sw (r17+152),r2
8005970: 2a 62 00 04 lw r2,(r19+4)
8005974: 5a 22 00 9c sw (r17+156),r2
8005978: 2a 62 00 08 lw r2,(r19+8)
800597c: 5a 22 00 a0 sw (r17+160),r2
8005980: 2a 62 00 0c lw r2,(r19+12)
8005984: 5a 22 00 a4 sw (r17+164),r2
8005988: 2a 62 00 10 lw r2,(r19+16)
800598c: 5a 22 00 a8 sw (r17+168),r2
8005990: 2a 62 00 14 lw r2,(r19+20)
8005994: 5a 22 00 ac sw (r17+172),r2
8005998: 2a 73 00 18 lw r19,(r19+24)
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
800599c: 34 02 00 02 mvi r2,2
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
80059a0: 5a 21 00 b4 sw (r17+180),r1
80059a4: 5a 33 00 b0 sw (r17+176),r19
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
80059a8: 44 22 00 5b be r1,r2,8005b14 <rtems_termios_open+0x458> <== NEVER TAKEN
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
80059ac: 2a 21 00 a0 lw r1,(r17+160)
80059b0: 44 20 00 49 be r1,r0,8005ad4 <rtems_termios_open+0x418> <== NEVER TAKEN
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
80059b4: 2a 22 00 b4 lw r2,(r17+180)
80059b8: 34 01 00 02 mvi r1,2
80059bc: 44 41 00 46 be r2,r1,8005ad4 <rtems_termios_open+0x418> <== NEVER TAKEN
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;
80059c0: 34 01 00 00 mvi r1,0
80059c4: 5a 21 00 b8 sw (r17+184),r1
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
80059c8: 34 18 25 02 mvi r24,9474
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
80059cc: 2a 21 00 64 lw r1,(r17+100)
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
80059d0: 5a 38 00 30 sw (r17+48),r24
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
80059d4: 34 18 18 05 mvi r24,6149
80059d8: 5a 38 00 34 sw (r17+52),r24
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
80059dc: 34 18 08 bd mvi r24,2237
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
80059e0: 34 03 00 00 mvi r3,0
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
80059e4: 34 0a 00 11 mvi r10,17
tty->termios.c_cc[VSTOP] = '\023';
80059e8: 34 09 00 13 mvi r9,19
tty->termios.c_cc[VSUSP] = '\032';
80059ec: 34 08 00 1a mvi r8,26
tty->termios.c_cc[VREPRINT] = '\022';
80059f0: 34 07 00 12 mvi r7,18
tty->termios.c_cc[VDISCARD] = '\017';
80059f4: 34 06 00 0f mvi r6,15
tty->termios.c_cc[VWERASE] = '\027';
80059f8: 34 05 00 17 mvi r5,23
tty->termios.c_cc[VLNEXT] = '\026';
80059fc: 34 04 00 16 mvi r4,22
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
8005a00: 34 02 00 01 mvi r2,1
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
8005a04: 5a 38 00 38 sw (r17+56),r24
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
8005a08: 34 17 00 03 mvi r23,3
tty->termios.c_cc[VQUIT] = '\034';
8005a0c: 34 16 00 1c mvi r22,28
tty->termios.c_cc[VERASE] = '\177';
8005a10: 34 15 00 7f mvi r21,127
tty->termios.c_cc[VKILL] = '\025';
8005a14: 34 14 00 15 mvi r20,21
tty->termios.c_cc[VEOF] = '\004';
8005a18: 34 13 00 04 mvi r19,4
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
8005a1c: 38 18 82 3b mvu r24,0x823b
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
8005a20: 32 23 00 51 sb (r17+81),r3
tty->termios.c_cc[VSTART] = '\021';
8005a24: 32 2a 00 49 sb (r17+73),r10
tty->termios.c_cc[VSTOP] = '\023';
8005a28: 32 29 00 4a sb (r17+74),r9
tty->termios.c_cc[VSUSP] = '\032';
8005a2c: 32 28 00 4b sb (r17+75),r8
tty->termios.c_cc[VREPRINT] = '\022';
8005a30: 32 27 00 4d sb (r17+77),r7
tty->termios.c_cc[VDISCARD] = '\017';
8005a34: 32 26 00 4e sb (r17+78),r6
tty->termios.c_cc[VWERASE] = '\027';
8005a38: 32 25 00 4f sb (r17+79),r5
tty->termios.c_cc[VLNEXT] = '\026';
8005a3c: 32 24 00 50 sb (r17+80),r4
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
8005a40: 32 23 00 4c sb (r17+76),r3
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
8005a44: 5a 38 00 3c sw (r17+60),r24
tty->termios.c_cc[VINTR] = '\003';
8005a48: 32 37 00 41 sb (r17+65),r23
tty->termios.c_cc[VQUIT] = '\034';
8005a4c: 32 36 00 42 sb (r17+66),r22
tty->termios.c_cc[VERASE] = '\177';
8005a50: 32 35 00 43 sb (r17+67),r21
tty->termios.c_cc[VKILL] = '\025';
8005a54: 32 34 00 44 sb (r17+68),r20
tty->termios.c_cc[VEOF] = '\004';
8005a58: 32 33 00 45 sb (r17+69),r19
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
8005a5c: fb ff ee c3 calli 8001568 <__lshrsi3>
tty->highwater = tty->rawInBuf.Size * 3/4;
8005a60: 2a 23 00 64 lw r3,(r17+100)
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
8005a64: 5a 21 00 bc sw (r17+188),r1
tty->highwater = tty->rawInBuf.Size * 3/4;
8005a68: 34 02 00 02 mvi r2,2
8005a6c: b4 63 08 00 add r1,r3,r3
8005a70: b4 23 08 00 add r1,r1,r3
8005a74: fb ff ee bd calli 8001568 <__lshrsi3>
/*
* Bump name characer
*/
if (c++ == 'z')
8005a78: 42 02 00 00 lbu r2,(r16+0)
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
8005a7c: 5a 21 00 c0 sw (r17+192),r1
/*
* Bump name characer
*/
if (c++ == 'z')
8005a80: 34 41 00 01 addi r1,r2,1
8005a84: 32 01 00 00 sb (r16+0),r1
8005a88: 34 01 00 7a mvi r1,122
8005a8c: 5c 41 ff 33 bne r2,r1,8005758 <rtems_termios_open+0x9c> <== ALWAYS TAKEN
c = 'a';
8005a90: 34 01 00 61 mvi r1,97 <== NOT EXECUTED
8005a94: 32 01 00 00 sb (r16+0),r1 <== NOT EXECUTED
8005a98: e3 ff ff 30 bi 8005758 <rtems_termios_open+0x9c> <== NOT EXECUTED
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
free(tty);
8005a9c: ba 20 08 00 mv r1,r17 <== NOT EXECUTED
8005aa0: f8 00 1b b4 calli 800c970 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
8005aa4: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED
8005aa8: 34 0e 00 1a mvi r14,26 <== NOT EXECUTED
8005aac: f8 00 03 f8 calli 8006a8c <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
8005ab0: e3 ff ff 3b bi 800579c <rtems_termios_open+0xe0> <== NOT EXECUTED
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
if (tty->rawOutBuf.theBuf == NULL) {
free((void *)(tty->rawInBuf.theBuf));
8005ab4: 2a 21 00 58 lw r1,(r17+88) <== NOT EXECUTED
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
8005ab8: 34 0e 00 1a mvi r14,26 <== NOT EXECUTED
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
free((void *)(tty->rawInBuf.theBuf));
8005abc: f8 00 1b ad calli 800c970 <free> <== NOT EXECUTED
free(tty);
8005ac0: ba 20 08 00 mv r1,r17 <== NOT EXECUTED
8005ac4: f8 00 1b ab calli 800c970 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
8005ac8: 29 a1 00 00 lw r1,(r13+0) <== NOT EXECUTED
8005acc: f8 00 03 f0 calli 8006a8c <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
8005ad0: e3 ff ff 33 bi 800579c <rtems_termios_open+0xe0> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
8005ad4: 42 03 00 00 lbu r3,(r16+0) <== NOT EXECUTED
8005ad8: 78 01 54 52 mvhi r1,0x5452 <== NOT EXECUTED
8005adc: 38 21 72 00 ori r1,r1,0x7200 <== NOT EXECUTED
8005ae0: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8005ae4: b8 61 08 00 or r1,r3,r1 <== NOT EXECUTED
8005ae8: b8 40 20 00 mv r4,r2 <== NOT EXECUTED
8005aec: 34 03 00 24 mvi r3,36 <== NOT EXECUTED
8005af0: 36 25 00 68 addi r5,r17,104 <== NOT EXECUTED
8005af4: f8 00 02 c8 calli 8006614 <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)
8005af8: 44 20 ff b2 be r1,r0,80059c0 <rtems_termios_open+0x304> <== NOT EXECUTED
sc = rtems_task_start(tty->txTaskId,
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
8005afc: f8 00 05 b0 calli 80071bc <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
8005b00: 2a 21 00 7c lw r1,(r17+124) <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
8005b04: 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));
8005b08: f8 00 1b 9a calli 800c970 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
8005b0c: 2a 21 00 58 lw r1,(r17+88) <== NOT EXECUTED
8005b10: e3 ff ff eb bi 8005abc <rtems_termios_open+0x400> <== NOT EXECUTED
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
8005b14: 42 02 00 00 lbu r2,(r16+0) <== NOT EXECUTED
8005b18: 78 01 54 78 mvhi r1,0x5478 <== NOT EXECUTED
8005b1c: 38 21 54 00 ori r1,r1,0x5400 <== NOT EXECUTED
8005b20: b8 41 08 00 or r1,r2,r1 <== NOT EXECUTED
8005b24: 34 03 04 00 mvi r3,1024 <== NOT EXECUTED
8005b28: 34 02 00 0a mvi r2,10 <== NOT EXECUTED
8005b2c: 34 04 05 00 mvi r4,1280 <== NOT EXECUTED
8005b30: ba 80 28 00 mv r5,r20 <== NOT EXECUTED
8005b34: 36 26 00 c8 addi r6,r17,200 <== NOT EXECUTED
8005b38: f8 00 04 1e calli 8006bb0 <rtems_task_create> <== NOT EXECUTED
8005b3c: b8 20 98 00 mv r19,r1 <== NOT EXECUTED
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
8005b40: 5c 34 ff ef bne r1,r20,8005afc <rtems_termios_open+0x440> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
8005b44: 42 01 00 00 lbu r1,(r16+0) <== NOT EXECUTED
8005b48: 78 02 52 78 mvhi r2,0x5278 <== NOT EXECUTED
8005b4c: 38 42 54 00 ori r2,r2,0x5400 <== NOT EXECUTED
8005b50: b8 22 08 00 or r1,r1,r2 <== NOT EXECUTED
8005b54: 34 03 04 00 mvi r3,1024 <== NOT EXECUTED
8005b58: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
8005b5c: 34 04 05 00 mvi r4,1280 <== NOT EXECUTED
8005b60: ba 60 28 00 mv r5,r19 <== NOT EXECUTED
8005b64: 36 26 00 c4 addi r6,r17,196 <== NOT EXECUTED
8005b68: f8 00 04 12 calli 8006bb0 <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)
8005b6c: 44 33 ff 90 be r1,r19,80059ac <rtems_termios_open+0x2f0> <== NOT EXECUTED
8005b70: e3 ff ff e3 bi 8005afc <rtems_termios_open+0x440> <== NOT EXECUTED
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
8005b74: 58 31 00 00 sw (r1+0),r17
8005b78: e3 ff ff 55 bi 80058cc <rtems_termios_open+0x210>
080042dc <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
80042dc: 37 9c ff d8 addi sp,sp,-40 <== NOT EXECUTED
80042e0: 5b 8b 00 28 sw (sp+40),r11 <== NOT EXECUTED
80042e4: 5b 8c 00 24 sw (sp+36),r12 <== NOT EXECUTED
80042e8: 5b 8d 00 20 sw (sp+32),r13 <== NOT EXECUTED
80042ec: 5b 8e 00 1c sw (sp+28),r14 <== NOT EXECUTED
80042f0: 5b 8f 00 18 sw (sp+24),r15 <== NOT EXECUTED
80042f4: 5b 90 00 14 sw (sp+20),r16 <== NOT EXECUTED
80042f8: 5b 91 00 10 sw (sp+16),r17 <== NOT EXECUTED
80042fc: 5b 92 00 0c sw (sp+12),r18 <== NOT EXECUTED
8004300: 5b 93 00 08 sw (sp+8),r19 <== NOT EXECUTED
8004304: 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) {
8004308: 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)
{
800430c: b8 60 58 00 mv r11,r3 <== NOT EXECUTED
8004310: b8 40 80 00 mv r16,r2 <== NOT EXECUTED
8004314: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
const unsigned char *buf = _buf;
8004318: b8 20 88 00 mv r17,r1 <== NOT EXECUTED
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
800431c: 44 80 00 39 be r4,r0,8004400 <rtems_termios_puts+0x124> <== NOT EXECUTED
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
8004320: 29 6f 00 80 lw r15,(r11+128) <== NOT EXECUTED
while (len) {
8004324: 44 40 00 3c be r2,r0,8004414 <rtems_termios_puts+0x138> <== NOT EXECUTED
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
8004328: 34 0d ff fe mvi r13,-2 <== NOT EXECUTED
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
800432c: 34 0e 00 02 mvi r14,2 <== NOT EXECUTED
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
8004330: 34 13 00 01 mvi r19,1 <== NOT EXECUTED
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
8004334: 29 62 00 88 lw r2,(r11+136) <== NOT EXECUTED
8004338: 35 e1 00 01 addi r1,r15,1 <== NOT EXECUTED
800433c: f8 00 77 3c calli 802202c <__umodsi3> <== NOT EXECUTED
8004340: b8 20 78 00 mv r15,r1 <== NOT EXECUTED
rtems_interrupt_disable (level);
8004344: 90 00 20 00 rcsr r4,IE <== NOT EXECUTED
8004348: a0 8d 08 00 and r1,r4,r13 <== NOT EXECUTED
800434c: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
while (newHead == tty->rawOutBuf.Tail) {
8004350: 29 6c 00 84 lw r12,(r11+132) <== NOT EXECUTED
8004354: b8 80 90 00 mv r18,r4 <== NOT EXECUTED
8004358: 5d 8f 00 0e bne r12,r15,8004390 <rtems_termios_puts+0xb4> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
800435c: 59 6e 00 94 sw (r11+148),r14 <== NOT EXECUTED
rtems_interrupt_enable (level);
8004360: d0 04 00 00 wcsr IE,r4 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
8004364: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED
8004368: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
800436c: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
8004370: f8 00 09 66 calli 8006908 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
8004374: 5c 20 00 34 bne r1,r0,8004444 <rtems_termios_puts+0x168> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
8004378: 90 00 20 00 rcsr r4,IE <== NOT EXECUTED
800437c: a0 8d 28 00 and r5,r4,r13 <== NOT EXECUTED
8004380: d0 05 00 00 wcsr IE,r5 <== NOT EXECUTED
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
8004384: 29 65 00 84 lw r5,(r11+132) <== NOT EXECUTED
8004388: 44 ac ff f5 be r5,r12,800435c <rtems_termios_puts+0x80> <== NOT EXECUTED
800438c: b8 80 90 00 mv r18,r4 <== NOT EXECUTED
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
8004390: 29 61 00 80 lw r1,(r11+128) <== NOT EXECUTED
8004394: 29 62 00 7c lw r2,(r11+124) <== NOT EXECUTED
8004398: b4 41 08 00 add r1,r2,r1 <== NOT EXECUTED
800439c: 42 22 00 00 lbu r2,(r17+0) <== NOT EXECUTED
80043a0: 30 22 00 00 sb (r1+0),r2 <== NOT EXECUTED
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
80043a4: 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;
80043a8: 59 6f 00 80 sw (r11+128),r15 <== NOT EXECUTED
if (tty->rawOutBufState == rob_idle) {
80043ac: 5c 20 00 08 bne r1,r0,80043cc <rtems_termios_puts+0xf0> <== NOT EXECUTED
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
80043b0: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
80043b4: 20 42 00 10 andi r2,r2,0x10 <== NOT EXECUTED
80043b8: 44 41 00 0a be r2,r1,80043e0 <rtems_termios_puts+0x104> <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
80043bc: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
80043c0: 38 21 00 20 ori r1,r1,0x20 <== NOT EXECUTED
80043c4: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
80043c8: 59 73 00 94 sw (r11+148),r19 <== NOT EXECUTED
}
rtems_interrupt_enable (level);
80043cc: d0 12 00 00 wcsr IE,r18 <== NOT EXECUTED
len--;
80043d0: 36 10 ff ff addi r16,r16,-1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
80043d4: 46 00 00 10 be r16,r0,8004414 <rtems_termios_puts+0x138> <== 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++;
80043d8: 36 31 00 01 addi r17,r17,1 <== NOT EXECUTED
80043dc: e3 ff ff d6 bi 8004334 <rtems_termios_puts+0x58> <== NOT EXECUTED
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(tty->minor,
80043e0: 29 63 00 7c lw r3,(r11+124) <== NOT EXECUTED
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
80043e4: 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,
80043e8: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED
80043ec: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
80043f0: b4 62 10 00 add r2,r3,r2 <== NOT EXECUTED
80043f4: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
80043f8: d8 80 00 00 call r4 <== NOT EXECUTED
80043fc: e3 ff ff f3 bi 80043c8 <rtems_termios_puts+0xec> <== NOT EXECUTED
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
8004400: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8004404: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED
8004408: b8 60 10 00 mv r2,r3 <== NOT EXECUTED
800440c: ba 00 18 00 mv r3,r16 <== NOT EXECUTED
8004410: d8 80 00 00 call r4 <== NOT EXECUTED
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
8004414: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8004418: 2b 8b 00 28 lw r11,(sp+40) <== NOT EXECUTED
800441c: 2b 8c 00 24 lw r12,(sp+36) <== NOT EXECUTED
8004420: 2b 8d 00 20 lw r13,(sp+32) <== NOT EXECUTED
8004424: 2b 8e 00 1c lw r14,(sp+28) <== NOT EXECUTED
8004428: 2b 8f 00 18 lw r15,(sp+24) <== NOT EXECUTED
800442c: 2b 90 00 14 lw r16,(sp+20) <== NOT EXECUTED
8004430: 2b 91 00 10 lw r17,(sp+16) <== NOT EXECUTED
8004434: 2b 92 00 0c lw r18,(sp+12) <== NOT EXECUTED
8004438: 2b 93 00 08 lw r19,(sp+8) <== NOT EXECUTED
800443c: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED
8004440: c3 a0 00 00 ret <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
8004444: f8 00 0b 5e calli 80071bc <rtems_fatal_error_occurred> <== NOT EXECUTED
08004cd8 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
8004cd8: 37 9c ff cc addi sp,sp,-52 <== NOT EXECUTED
8004cdc: 5b 8b 00 34 sw (sp+52),r11 <== NOT EXECUTED
8004ce0: 5b 8c 00 30 sw (sp+48),r12 <== NOT EXECUTED
8004ce4: 5b 8d 00 2c sw (sp+44),r13 <== NOT EXECUTED
8004ce8: 5b 8e 00 28 sw (sp+40),r14 <== NOT EXECUTED
8004cec: 5b 8f 00 24 sw (sp+36),r15 <== NOT EXECUTED
8004cf0: 5b 90 00 20 sw (sp+32),r16 <== NOT EXECUTED
8004cf4: 5b 91 00 1c sw (sp+28),r17 <== NOT EXECUTED
8004cf8: 5b 92 00 18 sw (sp+24),r18 <== NOT EXECUTED
8004cfc: 5b 93 00 14 sw (sp+20),r19 <== NOT EXECUTED
8004d00: 5b 94 00 10 sw (sp+16),r20 <== NOT EXECUTED
8004d04: 5b 95 00 0c sw (sp+12),r21 <== NOT EXECUTED
8004d08: 5b 96 00 08 sw (sp+8),r22 <== NOT EXECUTED
8004d0c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8004d10: b8 20 80 00 mv r16,r1 <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
8004d14: 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);
8004d18: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8004d1c: 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;
8004d20: 28 2b 00 38 lw r11,(r1+56) <== NOT EXECUTED
uint32_t count = args->count;
8004d24: 2a 0e 00 14 lw r14,(r16+20) <== NOT EXECUTED
char *buffer = args->buffer;
8004d28: 2a 0f 00 10 lw r15,(r16+16) <== NOT EXECUTED
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
8004d2c: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
8004d30: f8 00 06 f6 calli 8006908 <rtems_semaphore_obtain> <== NOT EXECUTED
8004d34: b8 20 88 00 mv r17,r1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
8004d38: 5c 20 00 14 bne r1,r0,8004d88 <rtems_termios_read+0xb0> <== NOT EXECUTED
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
8004d3c: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED
8004d40: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8004d44: 78 0c 08 02 mvhi r12,0x802 <== NOT EXECUTED
8004d48: fb ff f1 e0 calli 80014c8 <__ashlsi3> <== NOT EXECUTED
8004d4c: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED
8004d50: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
8004d54: fb ff f1 dd calli 80014c8 <__ashlsi3> <== NOT EXECUTED
8004d58: 39 8c 67 f8 ori r12,r12,0x67f8 <== NOT EXECUTED
8004d5c: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED
8004d60: 28 23 00 00 lw r3,(r1+0) <== NOT EXECUTED
8004d64: 44 71 00 19 be r3,r17,8004dc8 <rtems_termios_read+0xf0> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
8004d68: ba 00 10 00 mv r2,r16 <== NOT EXECUTED
8004d6c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8004d70: d8 60 00 00 call r3 <== NOT EXECUTED
8004d74: b8 20 88 00 mv r17,r1 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
8004d78: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
tty->tty_rcvwakeup = 0;
8004d7c: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8004d80: 59 62 00 e4 sw (r11+228),r2 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
8004d84: f8 00 07 42 calli 8006a8c <rtems_semaphore_release> <== NOT EXECUTED
}
args->bytes_moved = args->count - count;
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
8004d88: ba 20 08 00 mv r1,r17 <== NOT EXECUTED
8004d8c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8004d90: 2b 8b 00 34 lw r11,(sp+52) <== NOT EXECUTED
8004d94: 2b 8c 00 30 lw r12,(sp+48) <== NOT EXECUTED
8004d98: 2b 8d 00 2c lw r13,(sp+44) <== NOT EXECUTED
8004d9c: 2b 8e 00 28 lw r14,(sp+40) <== NOT EXECUTED
8004da0: 2b 8f 00 24 lw r15,(sp+36) <== NOT EXECUTED
8004da4: 2b 90 00 20 lw r16,(sp+32) <== NOT EXECUTED
8004da8: 2b 91 00 1c lw r17,(sp+28) <== NOT EXECUTED
8004dac: 2b 92 00 18 lw r18,(sp+24) <== NOT EXECUTED
8004db0: 2b 93 00 14 lw r19,(sp+20) <== NOT EXECUTED
8004db4: 2b 94 00 10 lw r20,(sp+16) <== NOT EXECUTED
8004db8: 2b 95 00 0c lw r21,(sp+12) <== NOT EXECUTED
8004dbc: 2b 96 00 08 lw r22,(sp+8) <== NOT EXECUTED
8004dc0: 37 9c 00 34 addi sp,sp,52 <== NOT EXECUTED
8004dc4: c3 a0 00 00 ret <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
8004dc8: 29 62 00 24 lw r2,(r11+36) <== NOT EXECUTED
8004dcc: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED
8004dd0: 44 41 00 16 be r2,r1,8004e28 <rtems_termios_read+0x150> <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
8004dd4: 45 c0 00 0d be r14,r0,8004e08 <rtems_termios_read+0x130> <== NOT EXECUTED
8004dd8: 29 63 00 24 lw r3,(r11+36) <== NOT EXECUTED
8004ddc: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED
8004de0: 4c 61 00 0a bge r3,r1,8004e08 <rtems_termios_read+0x130> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
8004de4: 29 61 00 1c lw r1,(r11+28) <== NOT EXECUTED
count--;
8004de8: 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++];
8004dec: b4 23 08 00 add r1,r1,r3 <== NOT EXECUTED
8004df0: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED
8004df4: 34 63 00 01 addi r3,r3,1 <== NOT EXECUTED
8004df8: 31 e1 00 00 sb (r15+0),r1 <== NOT EXECUTED
8004dfc: 59 63 00 24 sw (r11+36),r3 <== NOT EXECUTED
8004e00: 35 ef 00 01 addi r15,r15,1 <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
8004e04: 5d c0 ff f6 bne r14,r0,8004ddc <rtems_termios_read+0x104> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
8004e08: 2a 02 00 14 lw r2,(r16+20) <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
8004e0c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8004e10: 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;
8004e14: c8 4e 70 00 sub r14,r2,r14 <== NOT EXECUTED
8004e18: 5a 0e 00 1c sw (r16+28),r14 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
8004e1c: 29 61 00 14 lw r1,(r11+20) <== NOT EXECUTED
8004e20: f8 00 07 1b calli 8006a8c <rtems_semaphore_release> <== NOT EXECUTED
return sc;
8004e24: e3 ff ff d9 bi 8004d88 <rtems_termios_read+0xb0> <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
8004e28: 29 61 00 28 lw r1,(r11+40) <== NOT EXECUTED
if (tty->device.pollRead != NULL
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
8004e2c: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
8004e30: 59 71 00 20 sw (r11+32),r17 <== NOT EXECUTED
tty->read_start_column = tty->column;
8004e34: 59 61 00 2c sw (r11+44),r1 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
8004e38: 59 71 00 24 sw (r11+36),r17 <== NOT EXECUTED
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL
8004e3c: 44 40 00 03 be r2,r0,8004e48 <rtems_termios_read+0x170> <== NOT EXECUTED
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
8004e40: 29 61 00 b4 lw r1,(r11+180) <== NOT EXECUTED
8004e44: 44 20 00 5a be r1,r0,8004fac <rtems_termios_read+0x2d4> <== 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;
8004e48: 29 6d 00 74 lw r13,(r11+116) <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
8004e4c: 78 0c 08 02 mvhi r12,0x802 <== NOT EXECUTED
8004e50: 39 8c 62 34 ori r12,r12,0x6234 <== NOT EXECUTED
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
8004e54: 35 76 00 49 addi r22,r11,73 <== NOT EXECUTED
8004e58: 34 12 00 01 mvi r18,1 <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
8004e5c: 34 14 ff fe mvi r20,-2 <== NOT EXECUTED
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
8004e60: 34 13 02 02 mvi r19,514 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
8004e64: 34 15 ff fb mvi r21,-5 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
8004e68: 29 63 00 5c lw r3,(r11+92) <== NOT EXECUTED
8004e6c: 29 61 00 60 lw r1,(r11+96) <== NOT EXECUTED
8004e70: 44 61 00 05 be r3,r1,8004e84 <rtems_termios_read+0x1ac> <== NOT EXECUTED
8004e74: 29 81 00 00 lw r1,(r12+0) <== NOT EXECUTED
8004e78: 29 62 00 20 lw r2,(r11+32) <== NOT EXECUTED
8004e7c: 34 21 ff ff addi r1,r1,-1 <== NOT EXECUTED
8004e80: 48 22 00 08 bg r1,r2,8004ea0 <rtems_termios_read+0x1c8> <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
8004e84: 46 40 ff d4 be r18,r0,8004dd4 <rtems_termios_read+0xfc> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
8004e88: 29 61 00 68 lw r1,(r11+104) <== NOT EXECUTED
8004e8c: 29 62 00 6c lw r2,(r11+108) <== NOT EXECUTED
8004e90: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED
8004e94: f8 00 06 9d calli 8006908 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions,
timeout);
if (sc != RTEMS_SUCCESSFUL)
8004e98: 44 20 ff f4 be r1,r0,8004e68 <rtems_termios_read+0x190> <== NOT EXECUTED
8004e9c: e3 ff ff ce bi 8004dd4 <rtems_termios_read+0xfc> <== 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;
8004ea0: 29 63 00 5c lw r3,(r11+92) <== NOT EXECUTED
8004ea4: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED
8004ea8: 34 61 00 01 addi r1,r3,1 <== NOT EXECUTED
8004eac: f8 00 74 60 calli 802202c <__umodsi3> <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
8004eb0: 29 64 00 58 lw r4,(r11+88) <== NOT EXECUTED
8004eb4: b4 81 20 00 add r4,r4,r1 <== NOT EXECUTED
8004eb8: 40 8d 00 00 lbu r13,(r4+0) <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
8004ebc: 59 61 00 5c sw (r11+92),r1 <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
8004ec0: 29 64 00 60 lw r4,(r11+96) <== NOT EXECUTED
8004ec4: 29 65 00 64 lw r5,(r11+100) <== NOT EXECUTED
8004ec8: 29 62 00 64 lw r2,(r11+100) <== NOT EXECUTED
8004ecc: b4 a4 20 00 add r4,r5,r4 <== NOT EXECUTED
8004ed0: c8 81 08 00 sub r1,r4,r1 <== NOT EXECUTED
8004ed4: f8 00 74 56 calli 802202c <__umodsi3> <== NOT EXECUTED
8004ed8: 29 63 00 bc lw r3,(r11+188) <== NOT EXECUTED
8004edc: 50 23 00 11 bgeu r1,r3,8004f20 <rtems_termios_read+0x248> <== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
8004ee0: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED
8004ee4: a0 74 18 00 and r3,r3,r20 <== NOT EXECUTED
8004ee8: 59 63 00 b8 sw (r11+184),r3 <== NOT EXECUTED
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
8004eec: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED
8004ef0: 20 63 02 02 andi r3,r3,0x202 <== NOT EXECUTED
8004ef4: 44 73 00 23 be r3,r19,8004f80 <rtems_termios_read+0x2a8> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
8004ef8: 29 63 00 b8 lw r3,(r11+184) <== NOT EXECUTED
8004efc: 20 63 01 00 andi r3,r3,0x100 <== NOT EXECUTED
8004f00: 44 60 00 08 be r3,r0,8004f20 <rtems_termios_read+0x248> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
8004f04: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
8004f08: 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;
8004f0c: a0 35 08 00 and r1,r1,r21 <== NOT EXECUTED
8004f10: 59 61 00 b8 sw (r11+184),r1 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
8004f14: 44 60 00 03 be r3,r0,8004f20 <rtems_termios_read+0x248> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
8004f18: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8004f1c: d8 60 00 00 call r3 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
8004f20: 29 63 00 3c lw r3,(r11+60) <== NOT EXECUTED
8004f24: 20 63 00 02 andi r3,r3,0x2 <== NOT EXECUTED
8004f28: 44 60 00 0e be r3,r0,8004f60 <rtems_termios_read+0x288> <== NOT EXECUTED
if (siproc (c, tty))
8004f2c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8004f30: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8004f34: fb ff fe db calli 8004aa0 <siproc> <== NOT EXECUTED
8004f38: 5c 20 00 10 bne r1,r0,8004f78 <rtems_termios_read+0x2a0> <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
8004f3c: 29 65 00 5c lw r5,(r11+92) <== NOT EXECUTED
8004f40: 29 64 00 60 lw r4,(r11+96) <== NOT EXECUTED
else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
8004f44: 29 6d 00 70 lw r13,(r11+112) <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
8004f48: 44 a4 ff cf be r5,r4,8004e84 <rtems_termios_read+0x1ac> <== NOT EXECUTED
8004f4c: 29 84 00 00 lw r4,(r12+0) <== NOT EXECUTED
8004f50: 29 63 00 20 lw r3,(r11+32) <== NOT EXECUTED
8004f54: 34 84 ff ff addi r4,r4,-1 <== NOT EXECUTED
8004f58: 48 83 ff d2 bg r4,r3,8004ea0 <rtems_termios_read+0x1c8> <== NOT EXECUTED
8004f5c: e3 ff ff ca bi 8004e84 <rtems_termios_read+0x1ac> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
}
else {
siproc (c, tty);
8004f60: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8004f64: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8004f68: fb ff fe ce calli 8004aa0 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
8004f6c: 41 63 00 47 lbu r3,(r11+71) <== NOT EXECUTED
8004f70: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED
8004f74: 48 61 ff f2 bg r3,r1,8004f3c <rtems_termios_read+0x264> <== NOT EXECUTED
8004f78: 34 12 00 00 mvi r18,0 <== NOT EXECUTED
8004f7c: e3 ff ff f0 bi 8004f3c <rtems_termios_read+0x264> <== 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))
8004f80: 29 61 00 94 lw r1,(r11+148) <== NOT EXECUTED
8004f84: 44 20 00 04 be r1,r0,8004f94 <rtems_termios_read+0x2bc> <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
8004f88: 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))
8004f8c: 20 21 00 20 andi r1,r1,0x20 <== NOT EXECUTED
8004f90: 44 20 ff da be r1,r0,8004ef8 <rtems_termios_read+0x220> <== 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,
8004f94: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED
8004f98: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8004f9c: ba c0 10 00 mv r2,r22 <== NOT EXECUTED
8004fa0: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
8004fa4: d8 80 00 00 call r4 <== NOT EXECUTED
8004fa8: e3 ff ff de bi 8004f20 <rtems_termios_read+0x248> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
8004fac: 29 61 00 3c lw r1,(r11+60) <== NOT EXECUTED
8004fb0: 20 21 00 02 andi r1,r1,0x2 <== NOT EXECUTED
8004fb4: 44 20 00 14 be r1,r0,8005004 <rtems_termios_read+0x32c> <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
8004fb8: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8004fbc: d8 40 00 00 call r2 <== NOT EXECUTED
8004fc0: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
if (n < 0) {
rtems_task_wake_after (1);
}
else {
if (siproc (n, tty))
8004fc4: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8004fc8: 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) {
8004fcc: 4c 60 00 21 bge r3,r0,8005050 <rtems_termios_read+0x378> <== NOT EXECUTED
rtems_task_wake_after (1);
8004fd0: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
8004fd4: f8 00 07 e3 calli 8006f60 <rtems_task_wake_after> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
8004fd8: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED
8004fdc: e3 ff ff f7 bi 8004fb8 <rtems_termios_read+0x2e0> <== NOT EXECUTED
}
}
rtems_task_wake_after (1);
}
else {
siproc (n, tty);
8004fe0: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8004fe4: 20 21 00 ff andi r1,r1,0xff <== NOT EXECUTED
8004fe8: fb ff fe ae calli 8004aa0 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
8004fec: 41 62 00 47 lbu r2,(r11+71) <== NOT EXECUTED
8004ff0: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED
8004ff4: 4c 22 ff 78 bge r1,r2,8004dd4 <rtems_termios_read+0xfc> <== NOT EXECUTED
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
8004ff8: 44 40 00 05 be r2,r0,800500c <rtems_termios_read+0x334> <== NOT EXECUTED
8004ffc: 41 61 00 46 lbu r1,(r11+70) <== NOT EXECUTED
8005000: 44 20 00 03 be r1,r0,800500c <rtems_termios_read+0x334> <== NOT EXECUTED
}
}
}
else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
8005004: f8 00 04 3b calli 80060f0 <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
8005008: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
800500c: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED
8005010: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8005014: d8 40 00 00 call r2 <== NOT EXECUTED
if (n < 0) {
8005018: 4c 20 ff f2 bge r1,r0,8004fe0 <rtems_termios_read+0x308> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
800501c: 41 62 00 47 lbu r2,(r11+71) <== NOT EXECUTED
8005020: 44 40 00 10 be r2,r0,8005060 <rtems_termios_read+0x388> <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
8005024: 41 61 00 46 lbu r1,(r11+70) <== NOT EXECUTED
8005028: 44 20 00 03 be r1,r0,8005034 <rtems_termios_read+0x35c> <== NOT EXECUTED
800502c: 29 61 00 20 lw r1,(r11+32) <== NOT EXECUTED
8005030: 5c 20 00 0e bne r1,r0,8005068 <rtems_termios_read+0x390> <== NOT EXECUTED
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
8005034: 34 01 00 01 mvi r1,1 <== NOT EXECUTED
8005038: f8 00 07 ca calli 8006f60 <rtems_task_wake_after> <== NOT EXECUTED
}
else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
800503c: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED
8005040: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8005044: d8 40 00 00 call r2 <== NOT EXECUTED
if (n < 0) {
8005048: 4c 20 ff e6 bge r1,r0,8004fe0 <rtems_termios_read+0x308> <== NOT EXECUTED
800504c: e3 ff ff f4 bi 800501c <rtems_termios_read+0x344> <== NOT EXECUTED
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
}
else {
if (siproc (n, tty))
8005050: fb ff fe 94 calli 8004aa0 <siproc> <== NOT EXECUTED
8005054: 5c 20 ff 60 bne r1,r0,8004dd4 <rtems_termios_read+0xfc> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
8005058: 29 62 00 a0 lw r2,(r11+160) <== NOT EXECUTED
800505c: e3 ff ff d7 bi 8004fb8 <rtems_termios_read+0x2e0> <== NOT EXECUTED
break;
}
}
}
else {
if (!tty->termios.c_cc[VTIME])
8005060: 41 61 00 46 lbu r1,(r11+70) <== NOT EXECUTED
8005064: 44 22 ff 5c be r1,r2,8004dd4 <rtems_termios_read+0xfc> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
8005068: f8 00 04 22 calli 80060f0 <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
800506c: 29 62 00 54 lw r2,(r11+84) <== NOT EXECUTED
8005070: c8 2c 08 00 sub r1,r1,r12 <== NOT EXECUTED
8005074: 54 22 ff 58 bgu r1,r2,8004dd4 <rtems_termios_read+0xfc> <== NOT EXECUTED
8005078: e3 ff ff ef bi 8005034 <rtems_termios_read+0x35c> <== NOT EXECUTED
08003c94 <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)
{
8003c94: 37 9c ff f0 addi sp,sp,-16 <== NOT EXECUTED
8003c98: 5b 8b 00 10 sw (sp+16),r11 <== NOT EXECUTED
8003c9c: 5b 8c 00 0c sw (sp+12),r12 <== NOT EXECUTED
8003ca0: 5b 8d 00 08 sw (sp+8),r13 <== NOT EXECUTED
8003ca4: 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))
8003ca8: 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)
{
8003cac: 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))
8003cb0: 34 01 04 01 mvi r1,1025 <== NOT EXECUTED
8003cb4: 20 42 04 03 andi r2,r2,0x403 <== NOT EXECUTED
8003cb8: 44 41 00 52 be r2,r1,8003e00 <rtems_termios_refill_transmitter+0x16c><== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
}
else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
8003cbc: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
8003cc0: 34 01 00 02 mvi r1,2 <== NOT EXECUTED
8003cc4: 20 42 00 03 andi r2,r2,0x3 <== NOT EXECUTED
8003cc8: 44 41 00 66 be r2,r1,8003e60 <rtems_termios_refill_transmitter+0x1cc><== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
}
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
8003ccc: 29 63 00 80 lw r3,(r11+128) <== NOT EXECUTED
8003cd0: 29 62 00 84 lw r2,(r11+132) <== NOT EXECUTED
8003cd4: 44 62 00 1d be r3,r2,8003d48 <rtems_termios_refill_transmitter+0xb4><== NOT EXECUTED
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
}
rtems_interrupt_disable(level);
8003cd8: 90 00 10 00 rcsr r2,IE <== NOT EXECUTED
8003cdc: 34 01 ff fe mvi r1,-2 <== NOT EXECUTED
8003ce0: a0 41 08 00 and r1,r2,r1 <== NOT EXECUTED
8003ce4: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
len = tty->t_dqlen;
tty->t_dqlen = 0;
8003ce8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
8003cec: 29 63 00 90 lw r3,(r11+144) <== NOT EXECUTED
tty->t_dqlen = 0;
8003cf0: 59 61 00 90 sw (r11+144),r1 <== NOT EXECUTED
rtems_interrupt_enable(level);
8003cf4: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
8003cf8: 29 61 00 84 lw r1,(r11+132) <== NOT EXECUTED
8003cfc: 29 62 00 88 lw r2,(r11+136) <== NOT EXECUTED
8003d00: b4 61 08 00 add r1,r3,r1 <== NOT EXECUTED
8003d04: f8 00 78 ca calli 802202c <__umodsi3> <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
8003d08: 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;
8003d0c: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
8003d10: 59 61 00 84 sw (r11+132),r1 <== NOT EXECUTED
if (tty->rawOutBufState == rob_wait) {
8003d14: 34 01 00 02 mvi r1,2 <== NOT EXECUTED
8003d18: 44 41 00 37 be r2,r1,8003df4 <rtems_termios_refill_transmitter+0x160><== NOT EXECUTED
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
8003d1c: 29 61 00 80 lw r1,(r11+128) <== NOT EXECUTED
8003d20: 44 2c 00 14 be r1,r12,8003d70 <rtems_termios_refill_transmitter+0xdc><== NOT EXECUTED
if ( tty->tty_snd.sw_pfn != NULL) {
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
8003d24: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
8003d28: 34 01 02 10 mvi r1,528 <== NOT EXECUTED
8003d2c: 20 42 02 10 andi r2,r2,0x210 <== NOT EXECUTED
8003d30: 44 41 00 65 be r2,r1,8003ec4 <rtems_termios_refill_transmitter+0x230><== NOT EXECUTED
}
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
8003d34: 29 61 00 80 lw r1,(r11+128) <== NOT EXECUTED
8003d38: 50 2c 00 1f bgeu r1,r12,8003db4 <rtems_termios_refill_transmitter+0x120><== NOT EXECUTED
nToSend = tty->rawOutBuf.Size - newTail;
8003d3c: 29 6d 00 88 lw r13,(r11+136) <== NOT EXECUTED
8003d40: c9 ac 68 00 sub r13,r13,r12 <== NOT EXECUTED
8003d44: e0 00 00 1e bi 8003dbc <rtems_termios_refill_transmitter+0x128><== NOT EXECUTED
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
8003d48: 29 62 00 94 lw r2,(r11+148) <== NOT EXECUTED
8003d4c: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED
8003d50: 44 41 00 6a be r2,r1,8003ef8 <rtems_termios_refill_transmitter+0x264><== NOT EXECUTED
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
8003d54: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8003d58: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003d5c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
8003d60: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
8003d64: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
8003d68: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
8003d6c: c3 a0 00 00 ret <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
8003d70: 29 63 00 d4 lw r3,(r11+212) <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
8003d74: 34 04 00 00 mvi r4,0 <== NOT EXECUTED
8003d78: 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) {
8003d7c: b8 60 68 00 mv r13,r3 <== NOT EXECUTED
8003d80: 44 64 00 05 be r3,r4,8003d94 <rtems_termios_refill_transmitter+0x100><== NOT EXECUTED
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
8003d84: 29 62 00 d8 lw r2,(r11+216) <== NOT EXECUTED
8003d88: 35 61 00 30 addi r1,r11,48 <== NOT EXECUTED
8003d8c: b8 80 68 00 mv r13,r4 <== NOT EXECUTED
8003d90: d8 60 00 00 call r3 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[newTail],
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
8003d94: 59 6c 00 84 sw (r11+132),r12 <== NOT EXECUTED
}
return nToSend;
}
8003d98: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8003d9c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003da0: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
8003da4: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
8003da8: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
8003dac: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
8003db0: c3 a0 00 00 ret <== NOT EXECUTED
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
8003db4: 29 6d 00 80 lw r13,(r11+128) <== NOT EXECUTED
8003db8: c9 ac 68 00 sub r13,r13,r12 <== NOT EXECUTED
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
8003dbc: 29 61 00 b8 lw r1,(r11+184) <== NOT EXECUTED
8003dc0: 20 21 06 00 andi r1,r1,0x600 <== NOT EXECUTED
8003dc4: 44 20 00 02 be r1,r0,8003dcc <rtems_termios_refill_transmitter+0x138><== NOT EXECUTED
8003dc8: 34 0d 00 01 mvi r13,1 <== NOT EXECUTED
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(tty->minor,
8003dcc: 29 62 00 7c lw r2,(r11+124) <== NOT EXECUTED
8003dd0: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED
8003dd4: 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*/
8003dd8: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
8003ddc: 59 63 00 94 sw (r11+148),r3 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
8003de0: b4 4c 10 00 add r2,r2,r12 <== NOT EXECUTED
8003de4: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED
8003de8: d8 80 00 00 call r4 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[newTail],
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
8003dec: 59 6c 00 84 sw (r11+132),r12 <== NOT EXECUTED
8003df0: e3 ff ff ea bi 8003d98 <rtems_termios_refill_transmitter+0x104><== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
8003df4: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED
8003df8: f8 00 0b 25 calli 8006a8c <rtems_semaphore_release> <== NOT EXECUTED
8003dfc: e3 ff ff c8 bi 8003d1c <rtems_termios_refill_transmitter+0x88><== NOT EXECUTED
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
8003e00: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED
8003e04: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8003e08: 35 62 00 4a addi r2,r11,74 <== NOT EXECUTED
8003e0c: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
8003e10: d8 80 00 00 call r4 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
8003e14: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED
8003e18: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED
8003e1c: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED
8003e20: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
tty->t_dqlen--;
8003e24: 29 62 00 90 lw r2,(r11+144) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
8003e28: 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--;
8003e2c: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
8003e30: 38 63 00 02 ori r3,r3,0x2 <== NOT EXECUTED
8003e34: 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--;
8003e38: 59 62 00 90 sw (r11+144),r2 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
8003e3c: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
8003e40: 34 0d 00 01 mvi r13,1 <== NOT EXECUTED
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
8003e44: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8003e48: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003e4c: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
8003e50: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
8003e54: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
8003e58: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
8003e5c: c3 a0 00 00 ret <== NOT EXECUTED
* FIXME: this .write call will generate another
* dequeue callback. This will advance the "Tail" in the data
* buffer, although the corresponding data is not yet out!
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor,
8003e60: 29 64 00 a4 lw r4,(r11+164) <== NOT EXECUTED
8003e64: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8003e68: 35 62 00 49 addi r2,r11,73 <== NOT EXECUTED
8003e6c: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
8003e70: d8 80 00 00 call r4 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
8003e74: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED
8003e78: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED
8003e7c: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED
8003e80: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
tty->t_dqlen--;
8003e84: 29 62 00 90 lw r2,(r11+144) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
8003e88: 29 64 00 b8 lw r4,(r11+184) <== NOT EXECUTED
8003e8c: 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--;
8003e90: 34 42 ff ff addi r2,r2,-1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
8003e94: a0 83 18 00 and r3,r4,r3 <== NOT EXECUTED
8003e98: 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--;
8003e9c: 59 62 00 90 sw (r11+144),r2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
8003ea0: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
8003ea4: 34 0d 00 01 mvi r13,1 <== NOT EXECUTED
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
8003ea8: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8003eac: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003eb0: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
8003eb4: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
8003eb8: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
8003ebc: 37 9c 00 10 addi sp,sp,16 <== NOT EXECUTED
8003ec0: c3 a0 00 00 ret <== NOT EXECUTED
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
8003ec4: 90 00 08 00 rcsr r1,IE <== NOT EXECUTED
8003ec8: 34 02 ff fe mvi r2,-2 <== NOT EXECUTED
8003ecc: a0 22 10 00 and r2,r1,r2 <== NOT EXECUTED
8003ed0: d0 02 00 00 wcsr IE,r2 <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
8003ed4: 29 62 00 b8 lw r2,(r11+184) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
8003ed8: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
8003edc: 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;
8003ee0: 38 42 00 20 ori r2,r2,0x20 <== NOT EXECUTED
8003ee4: 59 62 00 b8 sw (r11+184),r2 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
rtems_interrupt_enable(level);
8003ee8: d0 01 00 00 wcsr IE,r1 <== NOT EXECUTED
8003eec: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[newTail],
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
8003ef0: 59 6c 00 84 sw (r11+132),r12 <== NOT EXECUTED
8003ef4: e3 ff ff a9 bi 8003d98 <rtems_termios_refill_transmitter+0x104><== NOT EXECUTED
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
8003ef8: 29 61 00 8c lw r1,(r11+140) <== NOT EXECUTED
8003efc: f8 00 0a e4 calli 8006a8c <rtems_semaphore_release> <== NOT EXECUTED
8003f00: e3 ff ff 95 bi 8003d54 <rtems_termios_refill_transmitter+0xc0><== NOT EXECUTED
08005c08 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
8005c08: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED
8005c0c: 5b 8b 00 18 sw (sp+24),r11 <== NOT EXECUTED
8005c10: 5b 8c 00 14 sw (sp+20),r12 <== NOT EXECUTED
8005c14: 5b 8d 00 10 sw (sp+16),r13 <== NOT EXECUTED
8005c18: 5b 8e 00 0c sw (sp+12),r14 <== NOT EXECUTED
8005c1c: 5b 8f 00 08 sw (sp+8),r15 <== NOT EXECUTED
8005c20: 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 |
8005c24: 34 0f 00 00 mvi r15,0 <== NOT EXECUTED
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
8005c28: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
8005c2c: 37 8c 00 1c addi r12,sp,28 <== NOT EXECUTED
8005c30: 37 8e 00 23 addi r14,sp,35 <== NOT EXECUTED
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
8005c34: 34 0d ff ff mvi r13,-1 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
8005c38: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
8005c3c: b9 80 20 00 mv r4,r12 <== NOT EXECUTED
8005c40: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8005c44: 34 01 00 03 mvi r1,3 <== NOT EXECUTED
8005c48: f8 00 01 46 calli 8006160 <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) {
8005c4c: 2b 83 00 1c lw r3,(sp+28) <== NOT EXECUTED
8005c50: 20 63 00 01 andi r3,r3,0x1 <== NOT EXECUTED
8005c54: 5c 60 00 13 bne r3,r0,8005ca0 <rtems_termios_rxdaemon+0x98><== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
8005c58: 29 63 00 a0 lw r3,(r11+160) <== NOT EXECUTED
8005c5c: 29 61 00 10 lw r1,(r11+16) <== NOT EXECUTED
8005c60: d8 60 00 00 call r3 <== NOT EXECUTED
8005c64: 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 (
8005c68: b9 c0 10 00 mv r2,r14 <== NOT EXECUTED
8005c6c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8005c70: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
8005c74: 44 ad ff f1 be r5,r13,8005c38 <rtems_termios_rxdaemon+0x30><== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
8005c78: 33 85 00 23 sb (sp+35),r5 <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
8005c7c: fb ff f8 c3 calli 8003f88 <rtems_termios_enqueue_raw_characters><== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
8005c80: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
8005c84: b9 80 20 00 mv r4,r12 <== NOT EXECUTED
8005c88: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8005c8c: 34 01 00 03 mvi r1,3 <== NOT EXECUTED
8005c90: f8 00 01 34 calli 8006160 <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) {
8005c94: 2b 83 00 1c lw r3,(sp+28) <== NOT EXECUTED
8005c98: 20 63 00 01 andi r3,r3,0x1 <== NOT EXECUTED
8005c9c: 44 60 ff ef be r3,r0,8005c58 <rtems_termios_rxdaemon+0x50> <== NOT EXECUTED
tty->rxTaskId = 0;
8005ca0: 59 6f 00 c4 sw (r11+196),r15 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
8005ca4: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
8005ca8: f8 00 04 29 calli 8006d4c <rtems_task_delete> <== NOT EXECUTED
8005cac: e3 ff ff e3 bi 8005c38 <rtems_termios_rxdaemon+0x30> <== NOT EXECUTED
08003c74 <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)
{
8003c74: 37 9c ff fc addi sp,sp,-4 <== NOT EXECUTED
8003c78: 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);
8003c7c: 28 21 00 c4 lw r1,(r1+196) <== NOT EXECUTED
8003c80: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8003c84: f8 00 09 b0 calli 8006344 <rtems_event_send> <== NOT EXECUTED
}
8003c88: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003c8c: 37 9c 00 04 addi sp,sp,4 <== NOT EXECUTED
8003c90: c3 a0 00 00 ret <== NOT EXECUTED
08005b7c <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
8005b7c: 37 9c ff e8 addi sp,sp,-24 <== NOT EXECUTED
8005b80: 5b 8b 00 14 sw (sp+20),r11 <== NOT EXECUTED
8005b84: 5b 8c 00 10 sw (sp+16),r12 <== NOT EXECUTED
8005b88: 5b 8d 00 0c sw (sp+12),r13 <== NOT EXECUTED
8005b8c: 5b 8e 00 08 sw (sp+8),r14 <== NOT EXECUTED
8005b90: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8005b94: 78 0d 08 02 mvhi r13,0x802 <== NOT EXECUTED
8005b98: b8 20 58 00 mv r11,r1 <== NOT EXECUTED
8005b9c: 39 ad 67 f8 ori r13,r13,0x67f8 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
8005ba0: 34 0e 00 00 mvi r14,0 <== NOT EXECUTED
8005ba4: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8005ba8: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
8005bac: 37 84 00 18 addi r4,sp,24 <== NOT EXECUTED
8005bb0: 34 01 00 03 mvi r1,3 <== NOT EXECUTED
8005bb4: f8 00 01 6b calli 8006160 <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) {
8005bb8: 2b 8c 00 18 lw r12,(sp+24) <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
8005bbc: 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) {
8005bc0: 21 8c 00 01 andi r12,r12,0x1 <== NOT EXECUTED
8005bc4: 5d 80 00 0d bne r12,r0,8005bf8 <rtems_termios_txdaemon+0x7c><== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
8005bc8: 29 63 00 cc lw r3,(r11+204) <== NOT EXECUTED
8005bcc: b4 63 18 00 add r3,r3,r3 <== NOT EXECUTED
8005bd0: 34 61 00 01 addi r1,r3,1 <== NOT EXECUTED
8005bd4: fb ff ee 3d calli 80014c8 <__ashlsi3> <== NOT EXECUTED
8005bd8: b5 a1 10 00 add r2,r13,r1 <== NOT EXECUTED
8005bdc: 28 42 00 04 lw r2,(r2+4) <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
8005be0: 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) {
8005be4: 44 4c 00 02 be r2,r12,8005bec <rtems_termios_txdaemon+0x70><== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
8005be8: d8 40 00 00 call r2 <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
8005bec: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8005bf0: fb ff f8 29 calli 8003c94 <rtems_termios_refill_transmitter><== NOT EXECUTED
8005bf4: e3 ff ff ec bi 8005ba4 <rtems_termios_txdaemon+0x28> <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
tty->txTaskId = 0;
8005bf8: 59 6e 00 c8 sw (r11+200),r14 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
8005bfc: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
8005c00: f8 00 04 53 calli 8006d4c <rtems_task_delete> <== NOT EXECUTED
8005c04: e3 ff ff e8 bi 8005ba4 <rtems_termios_txdaemon+0x28> <== NOT EXECUTED
08004b28 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
8004b28: 37 9c ff e4 addi sp,sp,-28 <== NOT EXECUTED
8004b2c: 5b 8b 00 1c sw (sp+28),r11 <== NOT EXECUTED
8004b30: 5b 8c 00 18 sw (sp+24),r12 <== NOT EXECUTED
8004b34: 5b 8d 00 14 sw (sp+20),r13 <== NOT EXECUTED
8004b38: 5b 8e 00 10 sw (sp+16),r14 <== NOT EXECUTED
8004b3c: 5b 8f 00 0c sw (sp+12),r15 <== NOT EXECUTED
8004b40: 5b 90 00 08 sw (sp+8),r16 <== NOT EXECUTED
8004b44: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
8004b48: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
8004b4c: 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);
8004b50: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8004b54: 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;
8004b58: 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);
8004b5c: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED
8004b60: f8 00 07 6a calli 8006908 <rtems_semaphore_obtain> <== NOT EXECUTED
8004b64: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
8004b68: 5c 20 00 12 bne r1,r0,8004bb0 <rtems_termios_write+0x88> <== NOT EXECUTED
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
8004b6c: 29 61 00 cc lw r1,(r11+204) <== NOT EXECUTED
8004b70: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8004b74: 78 0c 08 02 mvhi r12,0x802 <== NOT EXECUTED
8004b78: fb ff f2 54 calli 80014c8 <__ashlsi3> <== NOT EXECUTED
8004b7c: 34 21 00 01 addi r1,r1,1 <== NOT EXECUTED
8004b80: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
8004b84: fb ff f2 51 calli 80014c8 <__ashlsi3> <== NOT EXECUTED
8004b88: 39 8c 67 f8 ori r12,r12,0x67f8 <== NOT EXECUTED
8004b8c: b5 81 08 00 add r1,r12,r1 <== NOT EXECUTED
8004b90: 28 23 00 04 lw r3,(r1+4) <== NOT EXECUTED
8004b94: 44 6e 00 11 be r3,r14,8004bd8 <rtems_termios_write+0xb0> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
8004b98: b9 a0 10 00 mv r2,r13 <== NOT EXECUTED
8004b9c: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8004ba0: d8 60 00 00 call r3 <== NOT EXECUTED
8004ba4: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
8004ba8: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED
8004bac: f8 00 07 b8 calli 8006a8c <rtems_semaphore_release> <== NOT EXECUTED
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
return sc;
}
8004bb0: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
8004bb4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8004bb8: 2b 8b 00 1c lw r11,(sp+28) <== NOT EXECUTED
8004bbc: 2b 8c 00 18 lw r12,(sp+24) <== NOT EXECUTED
8004bc0: 2b 8d 00 14 lw r13,(sp+20) <== NOT EXECUTED
8004bc4: 2b 8e 00 10 lw r14,(sp+16) <== NOT EXECUTED
8004bc8: 2b 8f 00 0c lw r15,(sp+12) <== NOT EXECUTED
8004bcc: 2b 90 00 08 lw r16,(sp+8) <== NOT EXECUTED
8004bd0: 37 9c 00 1c addi sp,sp,28 <== NOT EXECUTED
8004bd4: c3 a0 00 00 ret <== NOT EXECUTED
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
8004bd8: 29 61 00 34 lw r1,(r11+52) <== NOT EXECUTED
8004bdc: 20 21 00 01 andi r1,r1,0x1 <== NOT EXECUTED
8004be0: 44 20 00 11 be r1,r0,8004c24 <rtems_termios_write+0xfc> <== NOT EXECUTED
uint32_t count = args->count;
8004be4: 29 af 00 14 lw r15,(r13+20) <== NOT EXECUTED
char *buffer = args->buffer;
8004be8: 29 b0 00 10 lw r16,(r13+16) <== NOT EXECUTED
while (count--)
8004bec: b9 c0 60 00 mv r12,r14 <== NOT EXECUTED
8004bf0: b9 c0 08 00 mv r1,r14 <== NOT EXECUTED
8004bf4: 45 e0 00 08 be r15,r0,8004c14 <rtems_termios_write+0xec> <== NOT EXECUTED
oproc (*buffer++, tty);
8004bf8: b6 0c 08 00 add r1,r16,r12 <== NOT EXECUTED
8004bfc: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED
8004c00: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED
8004c04: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8004c08: fb ff fe 10 calli 8004448 <oproc> <== NOT EXECUTED
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
8004c0c: 5d ec ff fb bne r15,r12,8004bf8 <rtems_termios_write+0xd0> <== NOT EXECUTED
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
8004c10: 29 a1 00 14 lw r1,(r13+20) <== NOT EXECUTED
8004c14: 59 a1 00 1c sw (r13+28),r1 <== NOT EXECUTED
}
rtems_semaphore_release (tty->osem);
8004c18: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED
8004c1c: f8 00 07 9c calli 8006a8c <rtems_semaphore_release> <== NOT EXECUTED
return sc;
8004c20: e3 ff ff e4 bi 8004bb0 <rtems_termios_write+0x88> <== NOT EXECUTED
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
8004c24: 29 a1 00 10 lw r1,(r13+16) <== NOT EXECUTED
8004c28: 29 a2 00 14 lw r2,(r13+20) <== NOT EXECUTED
8004c2c: b9 60 18 00 mv r3,r11 <== NOT EXECUTED
8004c30: fb ff fd ab calli 80042dc <rtems_termios_puts> <== NOT EXECUTED
8004c34: e3 ff ff f7 bi 8004c10 <rtems_termios_write+0xe8> <== NOT EXECUTED
080064b4 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
80064b4: 37 9c ff f8 addi sp,sp,-8
80064b8: 5b 9d 00 04 sw (sp+4),ra
80064bc: b8 20 10 00 mv r2,r1
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
80064c0: 78 01 08 02 mvhi r1,0x802
80064c4: 37 83 00 08 addi r3,sp,8
80064c8: 38 21 82 2c ori r1,r1,0x822c
80064cc: f8 00 06 dd calli 8008040 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
80064d0: 2b 83 00 08 lw r3,(sp+8)
80064d4: 34 02 00 04 mvi r2,4
80064d8: 44 60 00 05 be r3,r0,80064ec <rtems_timer_cancel+0x38> <== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80064dc: b8 40 08 00 mv r1,r2 <== NOT EXECUTED
80064e0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
80064e4: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
80064e8: c3 a0 00 00 ret <== NOT EXECUTED
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
80064ec: 28 23 00 38 lw r3,(r1+56)
80064f0: 44 62 00 03 be r3,r2,80064fc <rtems_timer_cancel+0x48> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
80064f4: 34 21 00 10 addi r1,r1,16
80064f8: f8 00 0f a4 calli 800a388 <_Watchdog_Remove>
_Thread_Enable_dispatch();
80064fc: f8 00 09 8b calli 8008b28 <_Thread_Enable_dispatch>
8006500: 34 02 00 00 mvi r2,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8006504: b8 40 08 00 mv r1,r2
8006508: 2b 9d 00 04 lw ra,(sp+4)
800650c: 37 9c 00 08 addi sp,sp,8
8006510: c3 a0 00 00 ret
08002898 <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
8002898: 37 9c ff e4 addi sp,sp,-28
800289c: 5b 8b 00 1c sw (sp+28),r11
80028a0: 5b 8c 00 18 sw (sp+24),r12
80028a4: 5b 8d 00 14 sw (sp+20),r13
80028a8: 5b 8e 00 10 sw (sp+16),r14
80028ac: 5b 8f 00 0c sw (sp+12),r15
80028b0: 5b 90 00 08 sw (sp+8),r16
80028b4: 5b 9d 00 04 sw (sp+4),ra
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
80028b8: 34 0c 00 00 mvi r12,0
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
80028bc: b8 20 68 00 mv r13,r1
80028c0: b8 40 70 00 mv r14,r2
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
80028c4: 34 01 00 03 mvi r1,3
80028c8: 45 ac 00 20 be r13,r12,8002948 <rtems_timer_create+0xb0> <== NEVER TAKEN
return RTEMS_INVALID_NAME;
if ( !id )
80028cc: 34 01 00 09 mvi r1,9
80028d0: 44 4c 00 1e be r2,r12,8002948 <rtems_timer_create+0xb0> <== NEVER TAKEN
80028d4: 78 03 08 01 mvhi r3,0x801
80028d8: 38 63 f8 6c ori r3,r3,0xf86c
80028dc: 28 61 00 00 lw r1,(r3+0)
80028e0: 34 21 00 01 addi r1,r1,1
80028e4: 58 61 00 00 sw (r3+0),r1
* This function allocates a timer control block from
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void )
{
return (Timer_Control *) _Objects_Allocate( &_Timer_Information );
80028e8: 78 01 08 02 mvhi r1,0x802
80028ec: 38 21 01 18 ori r1,r1,0x118
80028f0: f8 00 03 91 calli 8003734 <_Objects_Allocate>
80028f4: b8 20 58 00 mv r11,r1
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
80028f8: 44 2c 00 1d be r1,r12,800296c <rtems_timer_create+0xd4> <== NEVER TAKEN
80028fc: 28 2f 00 08 lw r15,(r1+8)
8002900: 78 01 08 02 mvhi r1,0x802
8002904: 38 21 01 18 ori r1,r1,0x118
8002908: 28 30 00 1c lw r16,(r1+28)
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
800290c: 34 01 00 04 mvi r1,4
8002910: 59 61 00 38 sw (r11+56),r1
8002914: 34 02 00 02 mvi r2,2
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
8002918: 59 6c 00 18 sw (r11+24),r12
the_watchdog->routine = routine;
800291c: 59 6c 00 2c sw (r11+44),r12
the_watchdog->id = id;
8002920: 59 6c 00 30 sw (r11+48),r12
the_watchdog->user_data = user_data;
8002924: 59 6c 00 34 sw (r11+52),r12
8002928: 21 e1 ff ff andi r1,r15,0xffff
800292c: fb ff f6 bf calli 8000428 <__ashlsi3>
8002930: b6 01 08 00 add r1,r16,r1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
8002934: 59 6d 00 0c sw (r11+12),r13
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8002938: 58 2b 00 00 sw (r1+0),r11
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
800293c: 59 cf 00 00 sw (r14+0),r15
_Thread_Enable_dispatch();
8002940: f8 00 06 40 calli 8004240 <_Thread_Enable_dispatch>
8002944: b9 80 08 00 mv r1,r12
return RTEMS_SUCCESSFUL;
}
8002948: 2b 9d 00 04 lw ra,(sp+4)
800294c: 2b 8b 00 1c lw r11,(sp+28)
8002950: 2b 8c 00 18 lw r12,(sp+24)
8002954: 2b 8d 00 14 lw r13,(sp+20)
8002958: 2b 8e 00 10 lw r14,(sp+16)
800295c: 2b 8f 00 0c lw r15,(sp+12)
8002960: 2b 90 00 08 lw r16,(sp+8)
8002964: 37 9c 00 1c addi sp,sp,28
8002968: c3 a0 00 00 ret
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
_Thread_Enable_dispatch();
800296c: f8 00 06 35 calli 8004240 <_Thread_Enable_dispatch> <== NOT EXECUTED
8002970: 34 01 00 05 mvi r1,5 <== NOT EXECUTED
return RTEMS_TOO_MANY;
8002974: e3 ff ff f5 bi 8002948 <rtems_timer_create+0xb0> <== NOT EXECUTED
080042c0 <rtems_timer_delete>:
*/
rtems_status_code rtems_timer_delete(
rtems_id id
)
{
80042c0: 37 9c ff f0 addi sp,sp,-16
80042c4: 5b 8b 00 0c sw (sp+12),r11
80042c8: 5b 8c 00 08 sw (sp+8),r12
80042cc: 5b 9d 00 04 sw (sp+4),ra
80042d0: b8 20 10 00 mv r2,r1
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
80042d4: 78 01 08 02 mvhi r1,0x802
80042d8: 38 21 52 10 ori r1,r1,0x5210
80042dc: 37 83 00 10 addi r3,sp,16
80042e0: f8 00 06 d6 calli 8005e38 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
80042e4: 2b 8c 00 10 lw r12,(sp+16)
80042e8: b8 20 58 00 mv r11,r1
80042ec: 34 01 00 04 mvi r1,4
80042f0: 5d 80 00 0d bne r12,r0,8004324 <rtems_timer_delete+0x64> <== NEVER TAKEN
case OBJECTS_LOCAL:
_Objects_Close( &_Timer_Information, &the_timer->Object );
80042f4: 78 01 08 02 mvhi r1,0x802
80042f8: b9 60 10 00 mv r2,r11
80042fc: 38 21 52 10 ori r1,r1,0x5210
8004300: f8 00 05 84 calli 8005910 <_Objects_Close>
(void) _Watchdog_Remove( &the_timer->Ticker );
8004304: 35 61 00 10 addi r1,r11,16
8004308: f8 00 10 2c calli 80083b8 <_Watchdog_Remove>
*/
RTEMS_INLINE_ROUTINE void _Timer_Free (
Timer_Control *the_timer
)
{
_Objects_Free( &_Timer_Information, &the_timer->Object );
800430c: 78 01 08 02 mvhi r1,0x802
8004310: 38 21 52 10 ori r1,r1,0x5210
8004314: b9 60 10 00 mv r2,r11
8004318: f8 00 06 69 calli 8005cbc <_Objects_Free>
_Timer_Free( the_timer );
_Thread_Enable_dispatch();
800431c: f8 00 09 62 calli 80068a4 <_Thread_Enable_dispatch>
8004320: b9 80 08 00 mv r1,r12
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8004324: 2b 9d 00 04 lw ra,(sp+4)
8004328: 2b 8b 00 0c lw r11,(sp+12)
800432c: 2b 8c 00 08 lw r12,(sp+8)
8004330: 37 9c 00 10 addi sp,sp,16
8004334: c3 a0 00 00 ret
08002978 <rtems_timer_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
8002978: 37 9c ff e0 addi sp,sp,-32
800297c: 5b 8b 00 1c sw (sp+28),r11
8002980: 5b 8c 00 18 sw (sp+24),r12
8002984: 5b 8d 00 14 sw (sp+20),r13
8002988: 5b 8e 00 10 sw (sp+16),r14
800298c: 5b 8f 00 0c sw (sp+12),r15
8002990: 5b 90 00 08 sw (sp+8),r16
8002994: 5b 9d 00 04 sw (sp+4),ra
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
8002998: 34 05 00 0a mvi r5,10
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
800299c: b8 40 60 00 mv r12,r2
80029a0: b8 20 70 00 mv r14,r1
80029a4: b8 60 68 00 mv r13,r3
80029a8: b8 80 78 00 mv r15,r4
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
80029ac: 44 40 00 0c be r2,r0,80029dc <rtems_timer_fire_after+0x64> <== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
if ( !routine )
80029b0: 34 05 00 09 mvi r5,9
80029b4: 44 60 00 0a be r3,r0,80029dc <rtems_timer_fire_after+0x64> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
80029b8: 78 01 08 02 mvhi r1,0x802
80029bc: 38 21 01 18 ori r1,r1,0x118
80029c0: b9 c0 10 00 mv r2,r14
80029c4: 37 83 00 20 addi r3,sp,32
80029c8: f8 00 04 93 calli 8003c14 <_Objects_Get>
80029cc: b8 20 58 00 mv r11,r1
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
80029d0: 2b 81 00 20 lw r1,(sp+32)
80029d4: 34 05 00 04 mvi r5,4
80029d8: 44 20 00 0b be r1,r0,8002a04 <rtems_timer_fire_after+0x8c> <== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80029dc: b8 a0 08 00 mv r1,r5
80029e0: 2b 9d 00 04 lw ra,(sp+4)
80029e4: 2b 8b 00 1c lw r11,(sp+28)
80029e8: 2b 8c 00 18 lw r12,(sp+24)
80029ec: 2b 8d 00 14 lw r13,(sp+20)
80029f0: 2b 8e 00 10 lw r14,(sp+16)
80029f4: 2b 8f 00 0c lw r15,(sp+12)
80029f8: 2b 90 00 08 lw r16,(sp+8)
80029fc: 37 9c 00 20 addi sp,sp,32
8002a00: c3 a0 00 00 ret
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
8002a04: 35 70 00 10 addi r16,r11,16
8002a08: ba 00 08 00 mv r1,r16
8002a0c: f8 00 09 35 calli 8004ee0 <_Watchdog_Remove>
_ISR_Disable( level );
8002a10: 90 00 20 00 rcsr r4,IE
8002a14: 34 01 ff fe mvi r1,-2
8002a18: a0 81 08 00 and r1,r4,r1
8002a1c: d0 01 00 00 wcsr IE,r1
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
8002a20: 29 63 00 18 lw r3,(r11+24)
8002a24: 5c 60 00 0f bne r3,r0,8002a60 <rtems_timer_fire_after+0xe8><== NEVER TAKEN
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
8002a28: 59 63 00 18 sw (r11+24),r3
the_watchdog->routine = routine;
8002a2c: 59 6d 00 2c sw (r11+44),r13
the_watchdog->id = id;
8002a30: 59 6e 00 30 sw (r11+48),r14
the_watchdog->user_data = user_data;
8002a34: 59 6f 00 34 sw (r11+52),r15
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL;
8002a38: 59 63 00 38 sw (r11+56),r3
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
8002a3c: d0 04 00 00 wcsr IE,r4
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8002a40: 78 01 08 01 mvhi r1,0x801
8002a44: 38 21 f9 48 ori r1,r1,0xf948
8002a48: ba 00 10 00 mv r2,r16
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
8002a4c: 59 6c 00 1c sw (r11+28),r12
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
8002a50: f8 00 08 bd calli 8004d44 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
8002a54: f8 00 05 fb calli 8004240 <_Thread_Enable_dispatch>
8002a58: 34 05 00 00 mvi r5,0
return RTEMS_SUCCESSFUL;
8002a5c: e3 ff ff e0 bi 80029dc <rtems_timer_fire_after+0x64>
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
8002a60: d0 04 00 00 wcsr IE,r4 <== NOT EXECUTED
_Thread_Enable_dispatch();
8002a64: f8 00 05 f7 calli 8004240 <_Thread_Enable_dispatch> <== NOT EXECUTED
8002a68: 34 05 00 00 mvi r5,0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
8002a6c: e3 ff ff dc bi 80029dc <rtems_timer_fire_after+0x64> <== NOT EXECUTED
080066ec <rtems_timer_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
80066ec: 37 9c ff d4 addi sp,sp,-44
80066f0: 5b 8b 00 24 sw (sp+36),r11
80066f4: 5b 8c 00 20 sw (sp+32),r12
80066f8: 5b 8d 00 1c sw (sp+28),r13
80066fc: 5b 8e 00 18 sw (sp+24),r14
8006700: 5b 8f 00 14 sw (sp+20),r15
8006704: 5b 90 00 10 sw (sp+16),r16
8006708: 5b 91 00 0c sw (sp+12),r17
800670c: 5b 92 00 08 sw (sp+8),r18
8006710: 5b 9d 00 04 sw (sp+4),ra
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
8006714: 78 05 08 02 mvhi r5,0x802
8006718: 38 a5 79 90 ori r5,r5,0x7990
800671c: 40 a6 00 00 lbu r6,(r5+0)
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
8006720: b8 20 68 00 mv r13,r1
8006724: b8 60 60 00 mv r12,r3
8006728: b8 80 70 00 mv r14,r4
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
800672c: 34 05 00 0b mvi r5,11
8006730: 5c c0 00 0d bne r6,r0,8006764 <rtems_timer_fire_when+0x78> <== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8006734: b8 a0 08 00 mv r1,r5
8006738: 2b 9d 00 04 lw ra,(sp+4)
800673c: 2b 8b 00 24 lw r11,(sp+36)
8006740: 2b 8c 00 20 lw r12,(sp+32)
8006744: 2b 8d 00 1c lw r13,(sp+28)
8006748: 2b 8e 00 18 lw r14,(sp+24)
800674c: 2b 8f 00 14 lw r15,(sp+20)
8006750: 2b 90 00 10 lw r16,(sp+16)
8006754: 2b 91 00 0c lw r17,(sp+12)
8006758: 2b 92 00 08 lw r18,(sp+8)
800675c: 37 9c 00 2c addi sp,sp,44
8006760: c3 a0 00 00 ret
rtems_interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
8006764: b8 40 08 00 mv r1,r2
8006768: 5b 82 00 28 sw (sp+40),r2
800676c: fb ff fc 4f calli 80058a8 <_TOD_Validate>
8006770: 2b 82 00 28 lw r2,(sp+40)
8006774: 44 20 00 26 be r1,r0,800680c <rtems_timer_fire_when+0x120> <== NEVER TAKEN
return RTEMS_INVALID_CLOCK;
if ( !routine )
8006778: 34 05 00 09 mvi r5,9
800677c: 45 80 ff ee be r12,r0,8006734 <rtems_timer_fire_when+0x48> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
8006780: 78 0b 08 02 mvhi r11,0x802
return RTEMS_INVALID_CLOCK;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
8006784: b8 40 08 00 mv r1,r2
8006788: fb ff fc 00 calli 8005788 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
800678c: 39 6b 7a 0c ori r11,r11,0x7a0c
return RTEMS_INVALID_CLOCK;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
8006790: b8 20 80 00 mv r16,r1
if ( seconds <= _TOD_Seconds_since_epoch() )
8006794: 29 61 00 00 lw r1,(r11+0)
8006798: 50 30 00 1d bgeu r1,r16,800680c <rtems_timer_fire_when+0x120><== NEVER TAKEN
800679c: 78 01 08 02 mvhi r1,0x802
80067a0: 38 21 82 2c ori r1,r1,0x822c
80067a4: b9 a0 10 00 mv r2,r13
80067a8: 37 83 00 2c addi r3,sp,44
80067ac: f8 00 06 25 calli 8008040 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
80067b0: 2b 91 00 2c lw r17,(sp+44)
80067b4: b8 20 78 00 mv r15,r1
80067b8: 34 05 00 04 mvi r5,4
80067bc: 5e 20 ff de bne r17,r0,8006734 <rtems_timer_fire_when+0x48><== NEVER TAKEN
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
80067c0: 34 32 00 10 addi r18,r1,16
80067c4: ba 40 08 00 mv r1,r18
80067c8: f8 00 0e f0 calli 800a388 <_Watchdog_Remove>
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
80067cc: 59 ed 00 30 sw (r15+48),r13
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
80067d0: 29 62 00 00 lw r2,(r11+0)
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
80067d4: 78 01 08 02 mvhi r1,0x802
80067d8: 38 21 7a 4c ori r1,r1,0x7a4c
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
80067dc: ca 02 80 00 sub r16,r16,r2
the_timer->the_class = TIMER_TIME_OF_DAY;
80067e0: 34 02 00 02 mvi r2,2
80067e4: 59 e2 00 38 sw (r15+56),r2
80067e8: 59 f0 00 1c sw (r15+28),r16
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
80067ec: ba 40 10 00 mv r2,r18
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
80067f0: 59 ec 00 2c sw (r15+44),r12
the_watchdog->id = id;
the_watchdog->user_data = user_data;
80067f4: 59 ee 00 34 sw (r15+52),r14
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
80067f8: 59 f1 00 18 sw (r15+24),r17
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
80067fc: f8 00 0e 7c calli 800a1ec <_Watchdog_Insert>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
8006800: f8 00 08 ca calli 8008b28 <_Thread_Enable_dispatch>
8006804: ba 20 28 00 mv r5,r17
return RTEMS_SUCCESSFUL;
8006808: e3 ff ff cb bi 8006734 <rtems_timer_fire_when+0x48>
800680c: 34 05 00 14 mvi r5,20 <== NOT EXECUTED
8006810: e3 ff ff c9 bi 8006734 <rtems_timer_fire_when+0x48> <== NOT EXECUTED
08006058 <rtems_timer_get_information>:
rtems_status_code rtems_timer_get_information(
rtems_id id,
rtems_timer_information *the_info
)
{
8006058: 37 9c ff f0 addi sp,sp,-16
800605c: 5b 8b 00 0c sw (sp+12),r11
8006060: 5b 8c 00 08 sw (sp+8),r12
8006064: 5b 9d 00 04 sw (sp+4),ra
8006068: b8 40 58 00 mv r11,r2
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
800606c: 34 03 00 09 mvi r3,9
rtems_status_code rtems_timer_get_information(
rtems_id id,
rtems_timer_information *the_info
)
{
8006070: b8 20 10 00 mv r2,r1
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
8006074: 45 60 00 12 be r11,r0,80060bc <rtems_timer_get_information+0x64><== NEVER TAKEN
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
8006078: 78 01 08 02 mvhi r1,0x802
800607c: 37 83 00 10 addi r3,sp,16
8006080: 38 21 78 fc ori r1,r1,0x78fc
8006084: f8 00 08 78 calli 8008264 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
8006088: 2b 8c 00 10 lw r12,(sp+16)
800608c: 34 03 00 04 mvi r3,4
8006090: 5d 80 00 0b bne r12,r0,80060bc <rtems_timer_get_information+0x64><== NEVER TAKEN
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
the_info->initial = the_timer->Ticker.initial;
8006094: 28 22 00 1c lw r2,(r1+28)
8006098: 59 62 00 04 sw (r11+4),r2
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
800609c: 28 22 00 38 lw r2,(r1+56)
80060a0: 59 62 00 00 sw (r11+0),r2
the_info->initial = the_timer->Ticker.initial;
the_info->start_time = the_timer->Ticker.start_time;
80060a4: 28 22 00 24 lw r2,(r1+36)
80060a8: 59 62 00 08 sw (r11+8),r2
the_info->stop_time = the_timer->Ticker.stop_time;
80060ac: 28 21 00 28 lw r1,(r1+40)
80060b0: 59 61 00 0c sw (r11+12),r1
_Thread_Enable_dispatch();
80060b4: f8 00 0b 07 calli 8008cd0 <_Thread_Enable_dispatch>
80060b8: b9 80 18 00 mv r3,r12
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
80060bc: b8 60 08 00 mv r1,r3
80060c0: 2b 9d 00 04 lw ra,(sp+4)
80060c4: 2b 8b 00 0c lw r11,(sp+12)
80060c8: 2b 8c 00 08 lw r12,(sp+8)
80060cc: 37 9c 00 10 addi sp,sp,16
80060d0: c3 a0 00 00 ret
08003dd8 <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
8003dd8: 37 9c ff e0 addi sp,sp,-32
8003ddc: 5b 8b 00 1c sw (sp+28),r11
8003de0: 5b 8c 00 18 sw (sp+24),r12
8003de4: 5b 8d 00 14 sw (sp+20),r13
8003de8: 5b 8e 00 10 sw (sp+16),r14
8003dec: 5b 8f 00 0c sw (sp+12),r15
8003df0: 5b 90 00 08 sw (sp+8),r16
8003df4: 5b 9d 00 04 sw (sp+4),ra
8003df8: b8 40 70 00 mv r14,r2
8003dfc: b8 60 78 00 mv r15,r3
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
8003e00: 5c 20 00 0c bne r1,r0,8003e30 <rtems_timer_initiate_server+0x58><== ALWAYS TAKEN
if (status) {
initialized = false;
}
#endif
return status;
8003e04: 34 0b 00 13 mvi r11,19
}
8003e08: b9 60 08 00 mv r1,r11
8003e0c: 2b 9d 00 04 lw ra,(sp+4)
8003e10: 2b 8b 00 1c lw r11,(sp+28)
8003e14: 2b 8c 00 18 lw r12,(sp+24)
8003e18: 2b 8d 00 14 lw r13,(sp+20)
8003e1c: 2b 8e 00 10 lw r14,(sp+16)
8003e20: 2b 8f 00 0c lw r15,(sp+12)
8003e24: 2b 90 00 08 lw r16,(sp+8)
8003e28: 37 9c 00 20 addi sp,sp,32
8003e2c: c3 a0 00 00 ret
8003e30: 78 04 08 02 mvhi r4,0x802
8003e34: 38 84 40 c0 ori r4,r4,0x40c0
8003e38: 40 82 00 00 lbu r2,(r4+0)
8003e3c: 54 22 00 03 bgu r1,r2,8003e48 <rtems_timer_initiate_server+0x70>
8003e40: b8 20 80 00 mv r16,r1
8003e44: e0 00 00 04 bi 8003e54 <rtems_timer_initiate_server+0x7c>
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
8003e48: 34 02 ff ff mvi r2,-1
8003e4c: 34 10 00 00 mvi r16,0
8003e50: 5c 22 ff ed bne r1,r2,8003e04 <rtems_timer_initiate_server+0x2c>
8003e54: 78 01 08 02 mvhi r1,0x802
8003e58: 38 21 49 f4 ori r1,r1,0x49f4
8003e5c: 28 23 00 00 lw r3,(r1+0)
8003e60: 34 63 00 01 addi r3,r3,1
8003e64: 58 23 00 00 sw (r1+0),r3
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
8003e68: 78 0c 08 02 mvhi r12,0x802
8003e6c: 39 8c 47 18 ori r12,r12,0x4718
8003e70: 41 8d 00 00 lbu r13,(r12+0)
initialized = true;
8003e74: 34 01 00 01 mvi r1,1
8003e78: 31 81 00 00 sb (r12+0),r1
_Thread_Enable_dispatch();
if ( tmpInitialized )
8003e7c: 34 0b 00 0e mvi r11,14
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
_Thread_Enable_dispatch();
8003e80: f8 00 09 d0 calli 80065c0 <_Thread_Enable_dispatch>
if ( tmpInitialized )
8003e84: 5d a0 ff e1 bne r13,r0,8003e08 <rtems_timer_initiate_server+0x30>
* other library rules. For example, if using a TSR written in Ada the
* Server should run at the same priority as the priority Ada task.
* Otherwise, the priority ceiling for the mutex used to protect the
* GNAT run-time is violated.
*/
status = rtems_task_create(
8003e88: 78 01 54 49 mvhi r1,0x5449
8003e8c: 38 21 4d 45 ori r1,r1,0x4d45
8003e90: ba 00 10 00 mv r2,r16
8003e94: b9 c0 18 00 mv r3,r14
8003e98: 39 e5 80 00 ori r5,r15,0x8000
8003e9c: 34 04 01 00 mvi r4,256
8003ea0: 37 86 00 20 addi r6,sp,32
8003ea4: fb ff fe 06 calli 80036bc <rtems_task_create>
8003ea8: b8 20 58 00 mv r11,r1
/* user may want floating point but we need */
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
8003eac: 44 2d 00 03 be r1,r13,8003eb8 <rtems_timer_initiate_server+0xe0><== ALWAYS TAKEN
initialized = false;
8003eb0: 31 8d 00 00 sb (r12+0),r13 <== NOT EXECUTED
return status;
8003eb4: e3 ff ff d5 bi 8003e08 <rtems_timer_initiate_server+0x30> <== NOT EXECUTED
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
&_RTEMS_tasks_Information,
_Objects_Get_index(id)
8003eb8: 2b 8c 00 20 lw r12,(sp+32)
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
8003ebc: 78 03 08 02 mvhi r3,0x802
8003ec0: 38 63 49 3c ori r3,r3,0x493c
8003ec4: 34 02 00 02 mvi r2,2
8003ec8: 21 81 ff ff andi r1,r12,0xffff
8003ecc: 28 6d 00 1c lw r13,(r3+28)
8003ed0: fb ff f3 ad calli 8000d84 <__ashlsi3>
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
8003ed4: 78 03 08 02 mvhi r3,0x802
8003ed8: 38 63 4b 44 ori r3,r3,0x4b44
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
8003edc: 78 02 08 02 mvhi r2,0x802
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
8003ee0: 28 63 00 00 lw r3,(r3+0)
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
8003ee4: 38 42 4a 84 ori r2,r2,0x4a84
8003ee8: 28 42 00 00 lw r2,(r2+0)
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
8003eec: 78 04 08 02 mvhi r4,0x802
8003ef0: 38 84 47 1c ori r4,r4,0x471c
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
8003ef4: 58 83 00 3c sw (r4+60),r3
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
8003ef8: b5 a1 40 00 add r8,r13,r1
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
8003efc: 58 82 00 74 sw (r4+116),r2
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
8003f00: 29 08 00 00 lw r8,(r8+0)
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ts->insert_chain = NULL;
8003f04: 58 8b 00 78 sw (r4+120),r11
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
8003f08: 78 05 08 00 mvhi r5,0x800
/*
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
8003f0c: 78 07 08 00 mvhi r7,0x800
ts->active = false;
/*
* The default timer server is now available.
*/
_Timer_server = ts;
8003f10: 78 06 08 02 mvhi r6,0x802
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ts->insert_chain = NULL;
ts->active = false;
8003f14: 30 8b 00 7c sb (r4+124),r11
8003f18: 38 a5 63 a0 ori r5,r5,0x63a0
/*
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
8003f1c: 38 e7 42 a4 ori r7,r7,0x42a4
ts->active = false;
/*
* The default timer server is now available.
*/
_Timer_server = ts;
8003f20: 38 c6 52 e0 ori r6,r6,0x52e0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
8003f24: 34 8e 00 34 addi r14,r4,52
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
8003f28: 34 8d 00 30 addi r13,r4,48
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
8003f2c: 34 8a 00 6c addi r10,r4,108
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
8003f30: 34 89 00 68 addi r9,r4,104
/*
* Start the timer server
*/
status = rtems_task_start(
8003f34: 78 02 08 00 mvhi r2,0x800
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
8003f38: 58 8b 00 34 sw (r4+52),r11
8003f3c: 58 8b 00 6c sw (r4+108),r11
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
8003f40: 58 8b 00 10 sw (r4+16),r11
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
8003f44: 58 8b 00 2c sw (r4+44),r11
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
8003f48: 58 8b 00 48 sw (r4+72),r11
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
8003f4c: 58 8b 00 64 sw (r4+100),r11
8003f50: b9 80 08 00 mv r1,r12
8003f54: 38 42 40 9c ori r2,r2,0x409c
8003f58: b8 80 18 00 mv r3,r4
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
8003f5c: 58 88 00 00 sw (r4+0),r8
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
8003f60: 58 8e 00 30 sw (r4+48),r14
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
8003f64: 58 8d 00 38 sw (r4+56),r13
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
8003f68: 58 8a 00 68 sw (r4+104),r10
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
8003f6c: 58 89 00 70 sw (r4+112),r9
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
8003f70: 58 85 00 5c sw (r4+92),r5
/*
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
8003f74: 58 87 00 04 sw (r4+4),r7
ts->active = false;
/*
* The default timer server is now available.
*/
_Timer_server = ts;
8003f78: 58 c4 00 00 sw (r6+0),r4
8003f7c: 58 85 00 24 sw (r4+36),r5
the_watchdog->id = id;
8003f80: 58 8c 00 28 sw (r4+40),r12
8003f84: 58 8c 00 60 sw (r4+96),r12
/*
* Start the timer server
*/
status = rtems_task_start(
8003f88: fb ff fe cd calli 8003abc <rtems_task_start>
8003f8c: b8 20 58 00 mv r11,r1
if (status) {
initialized = false;
}
#endif
return status;
8003f90: e3 ff ff 9e bi 8003e08 <rtems_timer_initiate_server+0x30>
08006814 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
8006814: 37 9c ff e8 addi sp,sp,-24
8006818: 5b 8b 00 14 sw (sp+20),r11
800681c: 5b 8c 00 10 sw (sp+16),r12
8006820: 5b 8d 00 0c sw (sp+12),r13
8006824: 5b 8e 00 08 sw (sp+8),r14
8006828: 5b 9d 00 04 sw (sp+4),ra
800682c: b8 20 10 00 mv r2,r1
8006830: 78 01 08 02 mvhi r1,0x802
8006834: 38 21 82 2c ori r1,r1,0x822c
8006838: 37 83 00 18 addi r3,sp,24
800683c: f8 00 06 01 calli 8008040 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
8006840: 2b 8c 00 18 lw r12,(sp+24)
8006844: b8 20 58 00 mv r11,r1
8006848: 34 0d 00 04 mvi r13,4
800684c: 45 80 00 09 be r12,r0,8006870 <rtems_timer_reset+0x5c> <== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8006850: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8006854: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8006858: 2b 8b 00 14 lw r11,(sp+20) <== NOT EXECUTED
800685c: 2b 8c 00 10 lw r12,(sp+16) <== NOT EXECUTED
8006860: 2b 8d 00 0c lw r13,(sp+12) <== NOT EXECUTED
8006864: 2b 8e 00 08 lw r14,(sp+8) <== NOT EXECUTED
8006868: 37 9c 00 18 addi sp,sp,24 <== NOT EXECUTED
800686c: c3 a0 00 00 ret <== NOT EXECUTED
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
8006870: 28 2e 00 38 lw r14,(r1+56)
8006874: 45 cc 00 0d be r14,r12,80068a8 <rtems_timer_reset+0x94>
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
8006878: 34 01 00 01 mvi r1,1
800687c: 34 0d 00 0b mvi r13,11
8006880: 45 c1 00 14 be r14,r1,80068d0 <rtems_timer_reset+0xbc> <== ALWAYS TAKEN
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
8006884: f8 00 08 a9 calli 8008b28 <_Thread_Enable_dispatch> <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8006888: b9 a0 08 00 mv r1,r13
800688c: 2b 9d 00 04 lw ra,(sp+4)
8006890: 2b 8b 00 14 lw r11,(sp+20)
8006894: 2b 8c 00 10 lw r12,(sp+16)
8006898: 2b 8d 00 0c lw r13,(sp+12)
800689c: 2b 8e 00 08 lw r14,(sp+8)
80068a0: 37 9c 00 18 addi sp,sp,24
80068a4: c3 a0 00 00 ret
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
80068a8: 34 2b 00 10 addi r11,r1,16
80068ac: b9 60 08 00 mv r1,r11
80068b0: f8 00 0e b6 calli 800a388 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
80068b4: 78 01 08 02 mvhi r1,0x802
80068b8: 38 21 7a 58 ori r1,r1,0x7a58
80068bc: b9 60 10 00 mv r2,r11
80068c0: f8 00 0e 4b calli 800a1ec <_Watchdog_Insert>
80068c4: b9 c0 68 00 mv r13,r14
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
80068c8: f8 00 08 98 calli 8008b28 <_Thread_Enable_dispatch>
80068cc: e3 ff ff ef bi 8006888 <rtems_timer_reset+0x74>
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
Timer_server_Control *timer_server = _Timer_server;
80068d0: 78 01 08 02 mvhi r1,0x802
80068d4: 38 21 82 6c ori r1,r1,0x826c
80068d8: 28 2d 00 00 lw r13,(r1+0)
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
80068dc: 35 61 00 10 addi r1,r11,16
80068e0: f8 00 0e aa calli 800a388 <_Watchdog_Remove>
(*timer_server->schedule_operation)( timer_server, the_timer );
80068e4: 29 a3 00 04 lw r3,(r13+4)
80068e8: b9 a0 08 00 mv r1,r13
80068ec: b9 60 10 00 mv r2,r11
80068f0: d8 60 00 00 call r3
80068f4: b9 80 68 00 mv r13,r12
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
80068f8: f8 00 08 8c calli 8008b28 <_Thread_Enable_dispatch>
80068fc: e3 ff ff e3 bi 8006888 <rtems_timer_reset+0x74>
08003ccc <rtems_timer_server_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
8003ccc: 37 9c ff e0 addi sp,sp,-32
8003cd0: 5b 8b 00 1c sw (sp+28),r11
8003cd4: 5b 8c 00 18 sw (sp+24),r12
8003cd8: 5b 8d 00 14 sw (sp+20),r13
8003cdc: 5b 8e 00 10 sw (sp+16),r14
8003ce0: 5b 8f 00 0c sw (sp+12),r15
8003ce4: 5b 90 00 08 sw (sp+8),r16
8003ce8: 5b 9d 00 04 sw (sp+4),ra
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
8003cec: 78 05 08 02 mvhi r5,0x802
8003cf0: 38 a5 52 e0 ori r5,r5,0x52e0
8003cf4: 28 ab 00 00 lw r11,(r5+0)
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
8003cf8: b8 20 78 00 mv r15,r1
8003cfc: b8 40 70 00 mv r14,r2
8003d00: b8 60 68 00 mv r13,r3
8003d04: b8 80 80 00 mv r16,r4
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
8003d08: 34 05 00 0e mvi r5,14
8003d0c: 45 60 00 05 be r11,r0,8003d20 <rtems_timer_server_fire_after+0x54><== NEVER TAKEN
return RTEMS_INCORRECT_STATE;
if ( !routine )
8003d10: 34 05 00 09 mvi r5,9
8003d14: 44 60 00 03 be r3,r0,8003d20 <rtems_timer_server_fire_after+0x54><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
8003d18: 34 05 00 0a mvi r5,10
8003d1c: 5c 40 00 0b bne r2,r0,8003d48 <rtems_timer_server_fire_after+0x7c><== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8003d20: b8 a0 08 00 mv r1,r5
8003d24: 2b 9d 00 04 lw ra,(sp+4)
8003d28: 2b 8b 00 1c lw r11,(sp+28)
8003d2c: 2b 8c 00 18 lw r12,(sp+24)
8003d30: 2b 8d 00 14 lw r13,(sp+20)
8003d34: 2b 8e 00 10 lw r14,(sp+16)
8003d38: 2b 8f 00 0c lw r15,(sp+12)
8003d3c: 2b 90 00 08 lw r16,(sp+8)
8003d40: 37 9c 00 20 addi sp,sp,32
8003d44: c3 a0 00 00 ret
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
8003d48: 78 01 08 02 mvhi r1,0x802
8003d4c: 38 21 52 a0 ori r1,r1,0x52a0
8003d50: b9 e0 10 00 mv r2,r15
8003d54: 37 83 00 20 addi r3,sp,32
8003d58: f8 00 07 8d calli 8005b8c <_Objects_Get>
8003d5c: b8 20 60 00 mv r12,r1
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
8003d60: 2b 81 00 20 lw r1,(sp+32)
8003d64: 34 05 00 04 mvi r5,4
8003d68: 5c 20 ff ee bne r1,r0,8003d20 <rtems_timer_server_fire_after+0x54><== NEVER TAKEN
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
8003d6c: 35 81 00 10 addi r1,r12,16
8003d70: f8 00 10 da calli 80080d8 <_Watchdog_Remove>
_ISR_Disable( level );
8003d74: 90 00 08 00 rcsr r1,IE
8003d78: 34 02 ff fe mvi r2,-2
8003d7c: a0 22 10 00 and r2,r1,r2
8003d80: d0 02 00 00 wcsr IE,r2
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
8003d84: 29 82 00 18 lw r2,(r12+24)
8003d88: 5c 40 00 10 bne r2,r0,8003dc8 <rtems_timer_server_fire_after+0xfc>
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL_ON_TASK;
8003d8c: 34 03 00 01 mvi r3,1
8003d90: 59 83 00 38 sw (r12+56),r3
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
8003d94: 59 82 00 18 sw (r12+24),r2
the_watchdog->routine = routine;
8003d98: 59 8d 00 2c sw (r12+44),r13
the_watchdog->id = id;
8003d9c: 59 8f 00 30 sw (r12+48),r15
the_watchdog->user_data = user_data;
8003da0: 59 90 00 34 sw (r12+52),r16
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
8003da4: 59 8e 00 1c sw (r12+28),r14
_ISR_Enable( level );
8003da8: d0 01 00 00 wcsr IE,r1
(*timer_server->schedule_operation)( timer_server, the_timer );
8003dac: 29 63 00 04 lw r3,(r11+4)
8003db0: b9 60 08 00 mv r1,r11
8003db4: b9 80 10 00 mv r2,r12
8003db8: d8 60 00 00 call r3
_Thread_Enable_dispatch();
8003dbc: f8 00 0a 01 calli 80065c0 <_Thread_Enable_dispatch>
8003dc0: 34 05 00 00 mvi r5,0
return RTEMS_SUCCESSFUL;
8003dc4: e3 ff ff d7 bi 8003d20 <rtems_timer_server_fire_after+0x54>
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
8003dc8: d0 01 00 00 wcsr IE,r1
_Thread_Enable_dispatch();
8003dcc: f8 00 09 fd calli 80065c0 <_Thread_Enable_dispatch>
8003dd0: 34 05 00 00 mvi r5,0
return RTEMS_SUCCESSFUL;
8003dd4: e3 ff ff d3 bi 8003d20 <rtems_timer_server_fire_after+0x54>
08006320 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
8006320: 37 9c ff d8 addi sp,sp,-40
8006324: 5b 8b 00 24 sw (sp+36),r11
8006328: 5b 8c 00 20 sw (sp+32),r12
800632c: 5b 8d 00 1c sw (sp+28),r13
8006330: 5b 8e 00 18 sw (sp+24),r14
8006334: 5b 8f 00 14 sw (sp+20),r15
8006338: 5b 90 00 10 sw (sp+16),r16
800633c: 5b 91 00 0c sw (sp+12),r17
8006340: 5b 92 00 08 sw (sp+8),r18
8006344: 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;
8006348: 78 05 08 02 mvhi r5,0x802
800634c: 38 a5 79 3c ori r5,r5,0x793c
8006350: 28 ab 00 00 lw r11,(r5+0)
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
8006354: b8 20 78 00 mv r15,r1
8006358: b8 40 68 00 mv r13,r2
800635c: b8 60 70 00 mv r14,r3
8006360: b8 80 80 00 mv r16,r4
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
8006364: 34 05 00 0e mvi r5,14
8006368: 45 60 00 0c be r11,r0,8006398 <rtems_timer_server_fire_when+0x78><== NEVER TAKEN
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
800636c: 78 05 08 02 mvhi r5,0x802
8006370: 38 a5 7a 48 ori r5,r5,0x7a48
8006374: 40 a6 00 00 lbu r6,(r5+0)
8006378: 34 05 00 0b mvi r5,11
800637c: 44 c0 00 07 be r6,r0,8006398 <rtems_timer_server_fire_when+0x78><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
8006380: 34 05 00 09 mvi r5,9
8006384: 44 60 00 05 be r3,r0,8006398 <rtems_timer_server_fire_when+0x78><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
8006388: b8 40 08 00 mv r1,r2
800638c: fb ff fc 9a calli 80055f4 <_TOD_Validate>
8006390: 5c 20 00 0e bne r1,r0,80063c8 <rtems_timer_server_fire_when+0xa8><== ALWAYS TAKEN
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
8006394: 34 05 00 14 mvi r5,20 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
8006398: b8 a0 08 00 mv r1,r5
800639c: 2b 9d 00 04 lw ra,(sp+4)
80063a0: 2b 8b 00 24 lw r11,(sp+36)
80063a4: 2b 8c 00 20 lw r12,(sp+32)
80063a8: 2b 8d 00 1c lw r13,(sp+28)
80063ac: 2b 8e 00 18 lw r14,(sp+24)
80063b0: 2b 8f 00 14 lw r15,(sp+20)
80063b4: 2b 90 00 10 lw r16,(sp+16)
80063b8: 2b 91 00 0c lw r17,(sp+12)
80063bc: 2b 92 00 08 lw r18,(sp+8)
80063c0: 37 9c 00 28 addi sp,sp,40
80063c4: c3 a0 00 00 ret
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
80063c8: 78 0c 08 02 mvhi r12,0x802
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
80063cc: b9 a0 08 00 mv r1,r13
80063d0: fb ff fc 41 calli 80054d4 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
80063d4: 39 8c 7a c4 ori r12,r12,0x7ac4
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
80063d8: b8 20 88 00 mv r17,r1
if ( seconds <= _TOD_Seconds_since_epoch() )
80063dc: 29 81 00 00 lw r1,(r12+0)
80063e0: 50 31 ff ed bgeu r1,r17,8006394 <rtems_timer_server_fire_when+0x74><== NEVER TAKEN
80063e4: 78 01 08 02 mvhi r1,0x802
80063e8: 38 21 78 fc ori r1,r1,0x78fc
80063ec: b9 e0 10 00 mv r2,r15
80063f0: 37 83 00 28 addi r3,sp,40
80063f4: f8 00 07 9c calli 8008264 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
80063f8: 2b 92 00 28 lw r18,(sp+40)
80063fc: b8 20 68 00 mv r13,r1
8006400: 34 05 00 04 mvi r5,4
8006404: 5e 40 ff e5 bne r18,r0,8006398 <rtems_timer_server_fire_when+0x78><== NEVER TAKEN
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
8006408: 34 21 00 10 addi r1,r1,16
800640c: f8 00 11 20 calli 800a88c <_Watchdog_Remove>
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
8006410: 59 af 00 30 sw (r13+48),r15
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();
8006414: 29 81 00 00 lw r1,(r12+0)
(*timer_server->schedule_operation)( timer_server, the_timer );
8006418: 29 63 00 04 lw r3,(r11+4)
800641c: b9 a0 10 00 mv r2,r13
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();
8006420: ca 21 88 00 sub r17,r17,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;
8006424: 34 01 00 03 mvi r1,3
8006428: 59 a1 00 38 sw (r13+56),r1
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
800642c: 59 ae 00 2c sw (r13+44),r14
_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 );
8006430: b9 60 08 00 mv r1,r11
the_watchdog->id = id;
the_watchdog->user_data = user_data;
8006434: 59 b0 00 34 sw (r13+52),r16
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();
8006438: 59 b1 00 1c sw (r13+28),r17
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
800643c: 59 b2 00 18 sw (r13+24),r18
(*timer_server->schedule_operation)( timer_server, the_timer );
8006440: d8 60 00 00 call r3
_Thread_Enable_dispatch();
8006444: f8 00 0a 23 calli 8008cd0 <_Thread_Enable_dispatch>
8006448: ba 40 28 00 mv r5,r18
return RTEMS_SUCCESSFUL;
800644c: e3 ff ff d3 bi 8006398 <rtems_timer_server_fire_when+0x78>
08007118 <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
8007118: 37 9c ff e0 addi sp,sp,-32 <== NOT EXECUTED
800711c: 5b 8b 00 20 sw (sp+32),r11 <== NOT EXECUTED
8007120: 5b 8c 00 1c sw (sp+28),r12 <== NOT EXECUTED
8007124: 5b 8d 00 18 sw (sp+24),r13 <== NOT EXECUTED
8007128: 5b 8e 00 14 sw (sp+20),r14 <== NOT EXECUTED
800712c: 5b 8f 00 10 sw (sp+16),r15 <== NOT EXECUTED
8007130: 5b 90 00 0c sw (sp+12),r16 <== NOT EXECUTED
8007134: 5b 91 00 08 sw (sp+8),r17 <== NOT EXECUTED
8007138: 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)
800713c: 78 04 20 00 mvhi r4,0x2000 <== NOT EXECUTED
8007140: 38 84 00 00 ori r4,r4,0x0 <== NOT EXECUTED
8007144: a0 24 78 00 and r15,r1,r4 <== NOT EXECUTED
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
8007148: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
800714c: b8 40 80 00 mv r16,r2 <== NOT EXECUTED
8007150: b8 60 70 00 mv r14,r3 <== NOT EXECUTED
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC)
8007154: 45 e0 00 0f be r15,r0,8007190 <rtems_verror+0x78> <== NOT EXECUTED
{
if (rtems_panic_in_progress++)
8007158: 78 05 08 02 mvhi r5,0x802 <== NOT EXECUTED
800715c: 38 a5 b8 98 ori r5,r5,0xb898 <== NOT EXECUTED
8007160: 28 a4 00 00 lw r4,(r5+0) <== NOT EXECUTED
8007164: 34 81 00 01 addi r1,r4,1 <== NOT EXECUTED
8007168: 58 a1 00 00 sw (r5+0),r1 <== NOT EXECUTED
800716c: 44 80 00 07 be r4,r0,8007188 <rtems_verror+0x70> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
8007170: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8007174: 38 21 ba 34 ori r1,r1,0xba34 <== NOT EXECUTED
8007178: 28 22 00 00 lw r2,(r1+0) <== NOT EXECUTED
800717c: 34 42 00 01 addi r2,r2,1 <== NOT EXECUTED
8007180: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
RTEMS_COMPILER_MEMORY_BARRIER();
8007184: 28 a1 00 00 lw r1,(r5+0) <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
8007188: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
800718c: 48 22 00 37 bg r1,r2,8007268 <rtems_verror+0x150> <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
8007190: 78 0b 08 02 mvhi r11,0x802 <== NOT EXECUTED
8007194: 39 6b b2 28 ori r11,r11,0xb228 <== NOT EXECUTED
8007198: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
800719c: 28 21 00 08 lw r1,(r1+8) <== NOT EXECUTED
80071a0: f8 00 3b c7 calli 80160bc <fflush> <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
80071a4: 78 06 40 00 mvhi r6,0x4000 <== NOT EXECUTED
80071a8: 38 c6 00 00 ori r6,r6,0x0 <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
80071ac: 78 05 8f ff mvhi r5,0x8fff <== NOT EXECUTED
80071b0: 38 a5 ff ff ori r5,r5,0xffff <== NOT EXECUTED
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
80071b4: a1 86 30 00 and r6,r12,r6 <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
80071b8: a1 85 88 00 and r17,r12,r5 <== NOT EXECUTED
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
80071bc: b8 c0 68 00 mv r13,r6 <== NOT EXECUTED
80071c0: 5c c0 00 46 bne r6,r0,80072d8 <rtems_verror+0x1c0> <== 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);
80071c4: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
80071c8: b9 c0 18 00 mv r3,r14 <== NOT EXECUTED
80071cc: ba 00 10 00 mv r2,r16 <== NOT EXECUTED
80071d0: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED
80071d4: f8 00 52 15 calli 801ba28 <vfprintf> <== NOT EXECUTED
80071d8: b8 20 70 00 mv r14,r1 <== NOT EXECUTED
if (status)
80071dc: 5e 20 00 2e bne r17,r0,8007294 <rtems_verror+0x17c> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
80071e0: 45 a0 00 0d be r13,r0,8007214 <rtems_verror+0xfc> <== NOT EXECUTED
{
if ((local_errno > 0) && *strerror(local_errno))
80071e4: 4c 0d 00 05 bge r0,r13,80071f8 <rtems_verror+0xe0> <== NOT EXECUTED
80071e8: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
80071ec: f8 00 40 94 calli 801743c <strerror> <== NOT EXECUTED
80071f0: 40 21 00 00 lbu r1,(r1+0) <== NOT EXECUTED
80071f4: 5c 20 00 3c bne r1,r0,80072e4 <rtems_verror+0x1cc> <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
80071f8: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
80071fc: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8007200: 38 42 8d 74 ori r2,r2,0x8d74 <== NOT EXECUTED
8007204: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED
8007208: b9 a0 18 00 mv r3,r13 <== NOT EXECUTED
800720c: f8 00 3c b9 calli 80164f0 <fprintf> <== NOT EXECUTED
8007210: b5 c1 70 00 add r14,r14,r1 <== NOT EXECUTED
}
chars_written += fprintf(stderr, "\n");
8007214: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
8007218: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
800721c: 38 42 85 94 ori r2,r2,0x8594 <== NOT EXECUTED
8007220: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED
8007224: f8 00 3c b3 calli 80164f0 <fprintf> <== NOT EXECUTED
8007228: b8 20 80 00 mv r16,r1 <== NOT EXECUTED
(void) fflush(stderr);
800722c: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
8007230: 28 21 00 0c lw r1,(r1+12) <== NOT EXECUTED
8007234: f8 00 3b a2 calli 80160bc <fflush> <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
8007238: 78 02 30 00 mvhi r2,0x3000 <== NOT EXECUTED
800723c: 38 42 00 00 ori r2,r2,0x0 <== NOT EXECUTED
8007240: a1 82 60 00 and r12,r12,r2 <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
8007244: b6 0e 08 00 add r1,r16,r14 <== NOT EXECUTED
(void) fflush(stderr);
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
8007248: 45 80 00 09 be r12,r0,800726c <rtems_verror+0x154> <== NOT EXECUTED
{
if (error_flag & RTEMS_ERROR_PANIC)
800724c: 45 e0 00 1e be r15,r0,80072c4 <rtems_verror+0x1ac> <== NOT EXECUTED
{
rtems_error(0, "fatal error, exiting");
8007250: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8007254: 38 42 8d 88 ori r2,r2,0x8d88 <== NOT EXECUTED
8007258: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
800725c: f8 00 00 40 calli 800735c <rtems_error> <== NOT EXECUTED
_exit(local_errno);
8007260: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8007264: f8 00 03 88 calli 8008084 <_exit> <== NOT EXECUTED
}
else
{
rtems_error(0, "fatal error, aborting");
abort();
8007268: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
}
return chars_written;
}
800726c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8007270: 2b 8b 00 20 lw r11,(sp+32) <== NOT EXECUTED
8007274: 2b 8c 00 1c lw r12,(sp+28) <== NOT EXECUTED
8007278: 2b 8d 00 18 lw r13,(sp+24) <== NOT EXECUTED
800727c: 2b 8e 00 14 lw r14,(sp+20) <== NOT EXECUTED
8007280: 2b 8f 00 10 lw r15,(sp+16) <== NOT EXECUTED
8007284: 2b 90 00 0c lw r16,(sp+12) <== NOT EXECUTED
8007288: 2b 91 00 08 lw r17,(sp+8) <== NOT EXECUTED
800728c: 37 9c 00 20 addi sp,sp,32 <== NOT EXECUTED
8007290: c3 a0 00 00 ret <== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
8007294: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED
8007298: ba 20 08 00 mv r1,r17 <== NOT EXECUTED
800729c: 28 50 00 0c lw r16,(r2+12) <== NOT EXECUTED
80072a0: fb ff ff 95 calli 80070f4 <rtems_status_text> <== NOT EXECUTED
80072a4: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
80072a8: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
80072ac: 38 42 8d 54 ori r2,r2,0x8d54 <== NOT EXECUTED
80072b0: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
80072b4: f8 00 3c 8f calli 80164f0 <fprintf> <== NOT EXECUTED
80072b8: b5 c1 70 00 add r14,r14,r1 <== NOT EXECUTED
if (local_errno)
80072bc: 45 a0 ff d6 be r13,r0,8007214 <rtems_verror+0xfc> <== NOT EXECUTED
80072c0: e3 ff ff c9 bi 80071e4 <rtems_verror+0xcc> <== NOT EXECUTED
rtems_error(0, "fatal error, exiting");
_exit(local_errno);
}
else
{
rtems_error(0, "fatal error, aborting");
80072c4: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
80072c8: 38 42 8d a0 ori r2,r2,0x8da0 <== NOT EXECUTED
80072cc: b9 e0 08 00 mv r1,r15 <== NOT EXECUTED
80072d0: f8 00 00 23 calli 800735c <rtems_error> <== NOT EXECUTED
abort();
80072d4: f8 00 3a 5a calli 8015c3c <abort> <== NOT EXECUTED
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
local_errno = errno;
80072d8: f8 00 3a 69 calli 8015c7c <__errno> <== NOT EXECUTED
80072dc: 28 2d 00 00 lw r13,(r1+0) <== NOT EXECUTED
80072e0: e3 ff ff b9 bi 80071c4 <rtems_verror+0xac> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
{
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
80072e4: 29 62 00 00 lw r2,(r11+0) <== NOT EXECUTED
80072e8: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
80072ec: 28 50 00 0c lw r16,(r2+12) <== NOT EXECUTED
80072f0: f8 00 40 53 calli 801743c <strerror> <== NOT EXECUTED
80072f4: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
80072f8: b8 20 18 00 mv r3,r1 <== NOT EXECUTED
80072fc: 38 42 8d 64 ori r2,r2,0x8d64 <== NOT EXECUTED
8007300: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
8007304: f8 00 3c 7b calli 80164f0 <fprintf> <== NOT EXECUTED
8007308: b5 c1 70 00 add r14,r14,r1 <== NOT EXECUTED
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
{
if ((local_errno > 0) && *strerror(local_errno))
800730c: e3 ff ff c2 bi 8007214 <rtems_verror+0xfc> <== NOT EXECUTED
08001a00 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
8001a00: 37 9c ff d4 addi sp,sp,-44
8001a04: 5b 8b 00 2c sw (sp+44),r11
8001a08: 5b 8c 00 28 sw (sp+40),r12
8001a0c: 5b 8d 00 24 sw (sp+36),r13
8001a10: 5b 8e 00 20 sw (sp+32),r14
8001a14: 5b 8f 00 1c sw (sp+28),r15
8001a18: 5b 90 00 18 sw (sp+24),r16
8001a1c: 5b 91 00 14 sw (sp+20),r17
8001a20: 5b 92 00 10 sw (sp+16),r18
8001a24: 5b 93 00 0c sw (sp+12),r19
8001a28: 5b 94 00 08 sw (sp+8),r20
8001a2c: 5b 9d 00 04 sw (sp+4),ra
8001a30: 78 10 7f ff mvhi r16,0x7fff
8001a34: 34 0c 00 00 mvi r12,0
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
8001a38: 78 13 08 02 mvhi r19,0x802
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
8001a3c: 78 0e 08 02 mvhi r14,0x802
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
8001a40: b8 20 58 00 mv r11,r1
8001a44: b8 40 a0 00 mv r20,r2
8001a48: 3a 10 ff ff ori r16,r16,0xffff
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
8001a4c: 3a 73 21 b8 ori r19,r19,0x21b8
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
8001a50: 39 ce 21 b0 ori r14,r14,0x21b0
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
8001a54: b9 80 78 00 mv r15,r12
int sign = 0;
int d;
for (;;) {
c = getc(fp);
if (c == ':')
8001a58: 34 11 00 3a mvi r17,58
break;
if (sign == 0) {
if (c == '-') {
8001a5c: 34 12 00 2d mvi r18,45
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
8001a60: 29 63 00 04 lw r3,(r11+4)
8001a64: 34 63 ff ff addi r3,r3,-1
8001a68: 59 63 00 04 sw (r11+4),r3
8001a6c: 4c 60 00 1b bge r3,r0,8001ad8 <scanInt+0xd8> <== ALWAYS TAKEN
8001a70: 2a 61 00 00 lw r1,(r19+0) <== NOT EXECUTED
8001a74: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8001a78: f8 00 3e 6c calli 8011428 <__srget_r> <== NOT EXECUTED
8001a7c: b8 20 68 00 mv r13,r1 <== NOT EXECUTED
if (c == ':')
8001a80: 45 b1 00 1b be r13,r17,8001aec <scanInt+0xec> <== NOT EXECUTED
break;
if (sign == 0) {
8001a84: 5d e0 00 03 bne r15,r0,8001a90 <scanInt+0x90> <== NEVER TAKEN
if (c == '-') {
sign = -1;
limit++;
continue;
8001a88: 34 0f 00 01 mvi r15,1
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
8001a8c: 45 b2 00 32 be r13,r18,8001b54 <scanInt+0x154> <== NEVER TAKEN
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
8001a90: 29 c1 00 00 lw r1,(r14+0)
8001a94: b4 2d 08 00 add r1,r1,r13
8001a98: 40 21 00 01 lbu r1,(r1+1)
8001a9c: 20 21 00 04 andi r1,r1,0x4
8001aa0: 44 20 00 1f be r1,r0,8001b1c <scanInt+0x11c> <== NEVER TAKEN
return 0;
d = c - '0';
if ((i > (limit / 10))
8001aa4: ba 00 08 00 mv r1,r16
8001aa8: 34 02 00 0a mvi r2,10
8001aac: f8 00 75 5b calli 801f018 <__udivsi3>
8001ab0: 55 81 00 1b bgu r12,r1,8001b1c <scanInt+0x11c> <== NEVER TAKEN
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
8001ab4: 35 ad ff d0 addi r13,r13,-48
if ((i > (limit / 10))
8001ab8: 45 81 00 14 be r12,r1,8001b08 <scanInt+0x108> <== NEVER TAKEN
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
8001abc: b5 8c 60 00 add r12,r12,r12
8001ac0: b9 80 08 00 mv r1,r12
8001ac4: 34 02 00 02 mvi r2,2
8001ac8: fb ff fa 36 calli 80003a0 <__ashlsi3>
8001acc: b5 81 60 00 add r12,r12,r1
8001ad0: b5 ac 60 00 add r12,r13,r12
8001ad4: e3 ff ff e3 bi 8001a60 <scanInt+0x60>
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
8001ad8: 29 63 00 00 lw r3,(r11+0)
8001adc: 40 6d 00 00 lbu r13,(r3+0)
8001ae0: 34 61 00 01 addi r1,r3,1
8001ae4: 59 61 00 00 sw (r11+0),r1
if (c == ':')
8001ae8: 5d b1 ff e7 bne r13,r17,8001a84 <scanInt+0x84>
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
8001aec: 45 e0 00 0c be r15,r0,8001b1c <scanInt+0x11c> <== NEVER TAKEN
return 0;
*val = i * sign;
8001af0: b9 e0 08 00 mv r1,r15
8001af4: b9 80 10 00 mv r2,r12
8001af8: f8 00 74 c9 calli 801ee1c <__mulsi3>
8001afc: 5a 81 00 00 sw (r20+0),r1
8001b00: 34 01 00 01 mvi r1,1
return 1;
8001b04: e0 00 00 07 bi 8001b20 <scanInt+0x120>
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
8001b08: ba 00 08 00 mv r1,r16 <== NOT EXECUTED
8001b0c: 34 02 00 0a mvi r2,10 <== NOT EXECUTED
8001b10: f8 00 75 52 calli 801f058 <__umodsi3> <== NOT EXECUTED
8001b14: 55 a1 00 02 bgu r13,r1,8001b1c <scanInt+0x11c> <== NOT EXECUTED
8001b18: e3 ff ff e9 bi 8001abc <scanInt+0xbc> <== NOT EXECUTED
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
8001b1c: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
8001b20: 2b 9d 00 04 lw ra,(sp+4)
8001b24: 2b 8b 00 2c lw r11,(sp+44)
8001b28: 2b 8c 00 28 lw r12,(sp+40)
8001b2c: 2b 8d 00 24 lw r13,(sp+36)
8001b30: 2b 8e 00 20 lw r14,(sp+32)
8001b34: 2b 8f 00 1c lw r15,(sp+28)
8001b38: 2b 90 00 18 lw r16,(sp+24)
8001b3c: 2b 91 00 14 lw r17,(sp+20)
8001b40: 2b 92 00 10 lw r18,(sp+16)
8001b44: 2b 93 00 0c lw r19,(sp+12)
8001b48: 2b 94 00 08 lw r20,(sp+8)
8001b4c: 37 9c 00 2c addi sp,sp,44
8001b50: c3 a0 00 00 ret
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
limit++;
8001b54: b6 0f 80 00 add r16,r16,r15 <== NOT EXECUTED
8001b58: 34 0f ff ff mvi r15,-1 <== NOT EXECUTED
continue;
8001b5c: e3 ff ff c1 bi 8001a60 <scanInt+0x60> <== NOT EXECUTED
08001b60 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
8001b60: 37 9c ff d8 addi sp,sp,-40
8001b64: 5b 8b 00 28 sw (sp+40),r11
8001b68: 5b 8c 00 24 sw (sp+36),r12
8001b6c: 5b 8d 00 20 sw (sp+32),r13
8001b70: 5b 8e 00 1c sw (sp+28),r14
8001b74: 5b 8f 00 18 sw (sp+24),r15
8001b78: 5b 90 00 14 sw (sp+20),r16
8001b7c: 5b 91 00 10 sw (sp+16),r17
8001b80: 5b 92 00 0c sw (sp+12),r18
8001b84: 5b 93 00 08 sw (sp+8),r19
8001b88: 5b 9d 00 04 sw (sp+4),ra
8001b8c: b8 60 58 00 mv r11,r3
int c;
*name = *bufp;
8001b90: 28 63 00 00 lw r3,(r3+0)
for (;;) {
c = getc(fp);
8001b94: 78 12 08 02 mvhi r18,0x802
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
8001b98: b8 20 60 00 mv r12,r1
int c;
*name = *bufp;
8001b9c: 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)
{
8001ba0: b8 80 68 00 mv r13,r4
8001ba4: b8 a0 98 00 mv r19,r5
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
8001ba8: 3a 52 21 b8 ori r18,r18,0x21b8
if (c == ':') {
8001bac: 34 0e 00 3a mvi r14,58
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
8001bb0: 34 0f 00 0a mvi r15,10
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
8001bb4: 34 10 ff ff mvi r16,-1
return 0;
if (*nleft < 2)
8001bb8: 34 11 00 01 mvi r17,1
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
8001bbc: 29 81 00 04 lw r1,(r12+4)
8001bc0: 34 21 ff ff addi r1,r1,-1
8001bc4: 59 81 00 04 sw (r12+4),r1
8001bc8: 4c 20 00 12 bge r1,r0,8001c10 <scanString+0xb0>
8001bcc: 2a 41 00 00 lw r1,(r18+0)
8001bd0: b9 80 10 00 mv r2,r12
8001bd4: f8 00 3e 15 calli 8011428 <__srget_r>
if (c == ':') {
8001bd8: 44 2e 00 13 be r1,r14,8001c24 <scanString+0xc4> <== NEVER TAKEN
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
8001bdc: 44 2f 00 1e be r1,r15,8001c54 <scanString+0xf4>
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
8001be0: 44 30 00 1e be r1,r16,8001c58 <scanString+0xf8> <== NEVER TAKEN
return 0;
if (*nleft < 2)
8001be4: 29 a2 00 00 lw r2,(r13+0)
8001be8: 52 22 00 1c bgeu r17,r2,8001c58 <scanString+0xf8> <== NEVER TAKEN
return 0;
**bufp = c;
8001bec: 29 62 00 00 lw r2,(r11+0)
8001bf0: 30 41 00 00 sb (r2+0),r1
++(*bufp);
8001bf4: 29 62 00 00 lw r2,(r11+0)
--(*nleft);
8001bf8: 29 a1 00 00 lw r1,(r13+0)
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
8001bfc: 34 42 00 01 addi r2,r2,1
--(*nleft);
8001c00: 34 21 ff ff addi r1,r1,-1
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
8001c04: 59 62 00 00 sw (r11+0),r2
--(*nleft);
8001c08: 59 a1 00 00 sw (r13+0),r1
}
8001c0c: e3 ff ff ec bi 8001bbc <scanString+0x5c>
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
8001c10: 29 81 00 00 lw r1,(r12+0)
8001c14: 34 22 00 01 addi r2,r1,1
8001c18: 40 21 00 00 lbu r1,(r1+0)
8001c1c: 59 82 00 00 sw (r12+0),r2
if (c == ':') {
8001c20: 5c 2e ff ef bne r1,r14,8001bdc <scanString+0x7c>
if (nlFlag)
8001c24: 5e 60 00 0d bne r19,r0,8001c58 <scanString+0xf8> <== NEVER TAKEN
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
8001c28: 29 63 00 00 lw r3,(r11+0)
8001c2c: 34 02 00 00 mvi r2,0
++(*bufp);
--(*nleft);
8001c30: 34 01 00 01 mvi r1,1
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
8001c34: 30 62 00 00 sb (r3+0),r2
++(*bufp);
8001c38: 29 63 00 00 lw r3,(r11+0)
--(*nleft);
8001c3c: 29 a2 00 00 lw r2,(r13+0)
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
8001c40: b4 61 18 00 add r3,r3,r1
--(*nleft);
8001c44: 34 42 ff ff addi r2,r2,-1
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
8001c48: 59 63 00 00 sw (r11+0),r3
--(*nleft);
8001c4c: 59 a2 00 00 sw (r13+0),r2
return 1;
8001c50: e0 00 00 03 bi 8001c5c <scanString+0xfc>
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
8001c54: 5e 60 ff f5 bne r19,r0,8001c28 <scanString+0xc8> <== ALWAYS TAKEN
--(*nleft);
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
8001c58: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
8001c5c: 2b 9d 00 04 lw ra,(sp+4)
8001c60: 2b 8b 00 28 lw r11,(sp+40)
8001c64: 2b 8c 00 24 lw r12,(sp+36)
8001c68: 2b 8d 00 20 lw r13,(sp+32)
8001c6c: 2b 8e 00 1c lw r14,(sp+28)
8001c70: 2b 8f 00 18 lw r15,(sp+24)
8001c74: 2b 90 00 14 lw r16,(sp+20)
8001c78: 2b 91 00 10 lw r17,(sp+16)
8001c7c: 2b 92 00 0c lw r18,(sp+12)
8001c80: 2b 93 00 08 lw r19,(sp+8)
8001c84: 37 9c 00 28 addi sp,sp,40
8001c88: c3 a0 00 00 ret
08001c8c <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
8001c8c: 37 9c ff d8 addi sp,sp,-40
8001c90: 5b 8b 00 18 sw (sp+24),r11
8001c94: 5b 8c 00 14 sw (sp+20),r12
8001c98: 5b 8d 00 10 sw (sp+16),r13
8001c9c: 5b 8e 00 0c sw (sp+12),r14
8001ca0: 5b 8f 00 08 sw (sp+8),r15
8001ca4: 5b 9d 00 04 sw (sp+4),ra
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
8001ca8: 37 8c 00 20 addi r12,sp,32
8001cac: 37 8b 00 1c addi r11,sp,28
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
8001cb0: 5b 83 00 20 sw (sp+32),r3
8001cb4: 5b 84 00 1c sw (sp+28),r4
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
8001cb8: b9 80 18 00 mv r3,r12
8001cbc: b9 60 20 00 mv r4,r11
8001cc0: 34 05 00 00 mvi r5,0
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
8001cc4: b8 20 68 00 mv r13,r1
8001cc8: b8 40 70 00 mv r14,r2
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
8001ccc: fb ff ff a5 calli 8001b60 <scanString>
8001cd0: 5c 20 00 0a bne r1,r0,8001cf8 <scangr+0x6c> <== ALWAYS TAKEN
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
8001cd4: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
8001cd8: 2b 9d 00 04 lw ra,(sp+4)
8001cdc: 2b 8b 00 18 lw r11,(sp+24)
8001ce0: 2b 8c 00 14 lw r12,(sp+20)
8001ce4: 2b 8d 00 10 lw r13,(sp+16)
8001ce8: 2b 8e 00 0c lw r14,(sp+12)
8001cec: 2b 8f 00 08 lw r15,(sp+8)
8001cf0: 37 9c 00 28 addi sp,sp,40
8001cf4: c3 a0 00 00 ret
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
8001cf8: b9 a0 08 00 mv r1,r13
8001cfc: 35 c2 00 04 addi r2,r14,4
8001d00: b9 80 18 00 mv r3,r12
8001d04: b9 60 20 00 mv r4,r11
8001d08: 34 05 00 00 mvi r5,0
8001d0c: fb ff ff 95 calli 8001b60 <scanString>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
8001d10: 44 20 ff f1 be r1,r0,8001cd4 <scangr+0x48> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
8001d14: b9 a0 08 00 mv r1,r13
8001d18: 37 82 00 28 addi r2,sp,40
8001d1c: fb ff ff 39 calli 8001a00 <scanInt>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
8001d20: 44 20 ff ed be r1,r0,8001cd4 <scangr+0x48> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
8001d24: b9 a0 08 00 mv r1,r13
8001d28: b9 80 18 00 mv r3,r12
8001d2c: b9 60 20 00 mv r4,r11
8001d30: 37 82 00 24 addi r2,sp,36
8001d34: 34 05 00 01 mvi r5,1
8001d38: fb ff ff 8a calli 8001b60 <scanString>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
8001d3c: 44 20 ff e6 be r1,r0,8001cd4 <scangr+0x48> <== 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;
8001d40: 2f 82 00 2a lhu r2,(sp+42)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
8001d44: 2b 8b 00 24 lw r11,(sp+36)
8001d48: 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;
8001d4c: 0d c2 00 08 sh (r14+8),r2
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
8001d50: 41 62 00 00 lbu r2,(r11+0)
8001d54: b9 60 18 00 mv r3,r11
8001d58: 34 04 00 17 mvi r4,23
8001d5c: 44 40 00 0a be r2,r0,8001d84 <scangr+0xf8> <== NEVER TAKEN
8001d60: 34 63 00 01 addi r3,r3,1
if(*cp == ',')
memcount++;
8001d64: 64 44 00 2c cmpei r4,r2,44
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
8001d68: 40 62 00 00 lbu r2,(r3+0)
if(*cp == ',')
memcount++;
8001d6c: b4 24 08 00 add r1,r1,r4
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
8001d70: 5c 40 ff fc bne r2,r0,8001d60 <scangr+0xd4>
8001d74: 34 21 00 01 addi r1,r1,1
8001d78: 34 02 00 02 mvi r2,2
8001d7c: fb ff f9 89 calli 80003a0 <__ashlsi3>
8001d80: 34 24 00 0f addi r4,r1,15
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
8001d84: 2b 81 00 1c lw r1,(sp+28)
8001d88: 54 81 ff d3 bgu r4,r1,8001cd4 <scangr+0x48> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
8001d8c: 2b 82 00 20 lw r2,(sp+32)
8001d90: 34 01 ff f0 mvi r1,-16
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
8001d94: 34 0c 00 01 mvi r12,1
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
8001d98: 34 42 00 0f addi r2,r2,15
8001d9c: a0 41 08 00 and r1,r2,r1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
8001da0: 58 2b 00 00 sw (r1+0),r11
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
8001da4: 2b 8b 00 24 lw r11,(sp+36)
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
8001da8: 59 c1 00 0c sw (r14+12),r1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
8001dac: 34 03 00 04 mvi r3,4
8001db0: 41 62 00 00 lbu r2,(r11+0)
8001db4: b5 6c 58 00 add r11,r11,r12
8001db8: 44 40 00 0a be r2,r0,8001de0 <scangr+0x154> <== NEVER TAKEN
if(*cp == ',') {
8001dbc: 34 0d 00 2c mvi r13,44
8001dc0: 44 4d 00 0e be r2,r13,8001df8 <scangr+0x16c> <== NEVER TAKEN
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
8001dc4: 41 62 00 00 lbu r2,(r11+0)
8001dc8: 35 6b 00 01 addi r11,r11,1
8001dcc: 5c 40 ff fd bne r2,r0,8001dc0 <scangr+0x134>
8001dd0: b9 80 08 00 mv r1,r12
8001dd4: 34 02 00 02 mvi r2,2
8001dd8: fb ff f9 72 calli 80003a0 <__ashlsi3>
8001ddc: b8 20 18 00 mv r3,r1
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
8001de0: 29 c2 00 0c lw r2,(r14+12)
8001de4: 34 01 00 01 mvi r1,1
8001de8: b4 43 18 00 add r3,r2,r3
8001dec: 34 02 00 00 mvi r2,0
8001df0: 58 62 00 00 sw (r3+0),r2
return 1;
8001df4: e3 ff ff b9 bi 8001cd8 <scangr+0x4c>
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',') {
*cp = '\0';
8001df8: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
8001dfc: 31 61 ff ff sb (r11+-1),r1 <== NOT EXECUTED
grp->gr_mem[memcount++] = cp + 1;
8001e00: 29 cf 00 0c lw r15,(r14+12) <== NOT EXECUTED
8001e04: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8001e08: 34 02 00 02 mvi r2,2 <== NOT EXECUTED
8001e0c: fb ff f9 65 calli 80003a0 <__ashlsi3> <== NOT EXECUTED
8001e10: b5 e1 08 00 add r1,r15,r1 <== NOT EXECUTED
8001e14: 58 2b 00 00 sw (r1+0),r11 <== NOT EXECUTED
8001e18: 35 8c 00 01 addi r12,r12,1 <== NOT EXECUTED
8001e1c: e3 ff ff ea bi 8001dc4 <scangr+0x138> <== NOT EXECUTED
08001e78 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
8001e78: 37 9c ff dc addi sp,sp,-36
8001e7c: 5b 8b 00 14 sw (sp+20),r11
8001e80: 5b 8c 00 10 sw (sp+16),r12
8001e84: 5b 8d 00 0c sw (sp+12),r13
8001e88: 5b 8e 00 08 sw (sp+8),r14
8001e8c: 5b 9d 00 04 sw (sp+4),ra
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001e90: 37 8c 00 1c addi r12,sp,28
8001e94: 37 8b 00 18 addi r11,sp,24
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
8001e98: 5b 83 00 1c sw (sp+28),r3
8001e9c: 5b 84 00 18 sw (sp+24),r4
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001ea0: b9 80 18 00 mv r3,r12
8001ea4: b9 60 20 00 mv r4,r11
8001ea8: 34 05 00 00 mvi r5,0
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
8001eac: b8 20 68 00 mv r13,r1
8001eb0: b8 40 70 00 mv r14,r2
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001eb4: fb ff ff 2b calli 8001b60 <scanString>
8001eb8: 5c 20 00 09 bne r1,r0,8001edc <scanpw+0x64> <== ALWAYS TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
8001ebc: 34 01 00 00 mvi r1,0 <== NOT EXECUTED
}
8001ec0: 2b 9d 00 04 lw ra,(sp+4)
8001ec4: 2b 8b 00 14 lw r11,(sp+20)
8001ec8: 2b 8c 00 10 lw r12,(sp+16)
8001ecc: 2b 8d 00 0c lw r13,(sp+12)
8001ed0: 2b 8e 00 08 lw r14,(sp+8)
8001ed4: 37 9c 00 24 addi sp,sp,36
8001ed8: c3 a0 00 00 ret
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
8001edc: b9 a0 08 00 mv r1,r13
8001ee0: 35 c2 00 04 addi r2,r14,4
8001ee4: b9 80 18 00 mv r3,r12
8001ee8: b9 60 20 00 mv r4,r11
8001eec: 34 05 00 00 mvi r5,0
8001ef0: fb ff ff 1c calli 8001b60 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001ef4: 44 20 ff f2 be r1,r0,8001ebc <scanpw+0x44> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
8001ef8: b9 a0 08 00 mv r1,r13
8001efc: 37 82 00 24 addi r2,sp,36
8001f00: fb ff fe c0 calli 8001a00 <scanInt>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001f04: 44 20 ff ee be r1,r0,8001ebc <scanpw+0x44> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
8001f08: b9 a0 08 00 mv r1,r13
8001f0c: 37 82 00 20 addi r2,sp,32
8001f10: fb ff fe bc calli 8001a00 <scanInt>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001f14: 44 20 ff ea be r1,r0,8001ebc <scanpw+0x44> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
8001f18: b9 a0 08 00 mv r1,r13
8001f1c: 35 c2 00 0c addi r2,r14,12
8001f20: b9 80 18 00 mv r3,r12
8001f24: b9 60 20 00 mv r4,r11
8001f28: 34 05 00 00 mvi r5,0
8001f2c: fb ff ff 0d calli 8001b60 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001f30: 44 20 ff e3 be r1,r0,8001ebc <scanpw+0x44> <== 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)
8001f34: b9 a0 08 00 mv r1,r13
8001f38: 35 c2 00 10 addi r2,r14,16
8001f3c: b9 80 18 00 mv r3,r12
8001f40: b9 60 20 00 mv r4,r11
8001f44: 34 05 00 00 mvi r5,0
8001f48: fb ff ff 06 calli 8001b60 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001f4c: 44 20 ff dc be r1,r0,8001ebc <scanpw+0x44> <== 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)
8001f50: b9 a0 08 00 mv r1,r13
8001f54: 35 c2 00 14 addi r2,r14,20
8001f58: b9 80 18 00 mv r3,r12
8001f5c: b9 60 20 00 mv r4,r11
8001f60: 34 05 00 00 mvi r5,0
8001f64: fb ff fe ff calli 8001b60 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001f68: 44 20 ff d5 be r1,r0,8001ebc <scanpw+0x44> <== 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))
8001f6c: b9 a0 08 00 mv r1,r13
8001f70: b9 80 18 00 mv r3,r12
8001f74: b9 60 20 00 mv r4,r11
8001f78: 35 c2 00 18 addi r2,r14,24
8001f7c: 34 05 00 01 mvi r5,1
8001f80: fb ff fe f8 calli 8001b60 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
8001f84: 44 20 ff ce be r1,r0,8001ebc <scanpw+0x44> <== 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;
8001f88: 2f 82 00 26 lhu r2,(sp+38)
pwd->pw_gid = pwgid;
8001f8c: 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;
8001f90: 0d c2 00 08 sh (r14+8),r2
pwd->pw_gid = pwgid;
8001f94: 2b 82 00 20 lw r2,(sp+32)
8001f98: 0d c2 00 0a sh (r14+10),r2
return 1;
8001f9c: e3 ff ff c9 bi 8001ec0 <scanpw+0x48>
08003590 <sched_get_priority_max>:
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
8003590: 37 9c ff fc addi sp,sp,-4
8003594: 5b 9d 00 04 sw (sp+4),ra
switch ( policy ) {
8003598: 48 01 00 05 bg r0,r1,80035ac <sched_get_priority_max+0x1c>
800359c: 34 02 00 02 mvi r2,2
80035a0: 4c 41 00 08 bge r2,r1,80035c0 <sched_get_priority_max+0x30>
80035a4: 34 02 00 04 mvi r2,4
80035a8: 44 22 00 06 be r1,r2,80035c0 <sched_get_priority_max+0x30> <== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
80035ac: f8 00 2b 69 calli 800e350 <__errno>
80035b0: 34 02 00 16 mvi r2,22
80035b4: 58 22 00 00 sw (r1+0),r2
80035b8: 34 01 ff ff mvi r1,-1
80035bc: e0 00 00 05 bi 80035d0 <sched_get_priority_max+0x40>
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
80035c0: 78 01 08 01 mvhi r1,0x801
80035c4: 38 21 f0 e4 ori r1,r1,0xf0e4
80035c8: 40 21 00 00 lbu r1,(r1+0)
80035cc: 34 21 ff ff addi r1,r1,-1
}
80035d0: 2b 9d 00 04 lw ra,(sp+4)
80035d4: 37 9c 00 04 addi sp,sp,4
80035d8: c3 a0 00 00 ret
080035dc <sched_get_priority_min>:
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
80035dc: 37 9c ff fc addi sp,sp,-4
80035e0: 5b 9d 00 04 sw (sp+4),ra
switch ( policy ) {
80035e4: 48 01 00 05 bg r0,r1,80035f8 <sched_get_priority_min+0x1c>
80035e8: 34 02 00 02 mvi r2,2
80035ec: 4c 41 00 08 bge r2,r1,800360c <sched_get_priority_min+0x30><== ALWAYS TAKEN
80035f0: 34 02 00 04 mvi r2,4 <== NOT EXECUTED
80035f4: 44 22 00 06 be r1,r2,800360c <sched_get_priority_min+0x30> <== NOT EXECUTED
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
80035f8: f8 00 2b 56 calli 800e350 <__errno>
80035fc: 34 02 00 16 mvi r2,22
8003600: 58 22 00 00 sw (r1+0),r2
8003604: 34 01 ff ff mvi r1,-1
8003608: e0 00 00 02 bi 8003610 <sched_get_priority_min+0x34>
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
800360c: 34 01 00 01 mvi r1,1
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
8003610: 2b 9d 00 04 lw ra,(sp+4)
8003614: 37 9c 00 04 addi sp,sp,4
8003618: c3 a0 00 00 ret
0800361c <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
800361c: 37 9c ff f4 addi sp,sp,-12
8003620: 5b 8b 00 08 sw (sp+8),r11
8003624: 5b 9d 00 04 sw (sp+4),ra
8003628: b8 20 58 00 mv r11,r1
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
800362c: 5c 20 00 0b bne r1,r0,8003658 <sched_rr_get_interval+0x3c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
8003630: 44 40 00 13 be r2,r0,800367c <sched_rr_get_interval+0x60>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
8003634: 78 01 08 01 mvhi r1,0x801
8003638: 38 21 f7 f4 ori r1,r1,0xf7f4
800363c: 28 21 00 00 lw r1,(r1+0)
8003640: f8 00 0d 19 calli 8006aa4 <_Timespec_From_ticks>
8003644: 34 01 00 00 mvi r1,0
return 0;
}
8003648: 2b 9d 00 04 lw ra,(sp+4)
800364c: 2b 8b 00 08 lw r11,(sp+8)
8003650: 37 9c 00 0c addi sp,sp,12
8003654: c3 a0 00 00 ret
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
8003658: 5b 82 00 0c sw (sp+12),r2
800365c: fb ff f8 fc calli 8001a4c <getpid>
8003660: 2b 82 00 0c lw r2,(sp+12)
8003664: 44 2b ff f3 be r1,r11,8003630 <sched_rr_get_interval+0x14>
rtems_set_errno_and_return_minus_one( ESRCH );
8003668: f8 00 2b 3a calli 800e350 <__errno>
800366c: 34 02 00 03 mvi r2,3
8003670: 58 22 00 00 sw (r1+0),r2
8003674: 34 01 ff ff mvi r1,-1
8003678: e3 ff ff f4 bi 8003648 <sched_rr_get_interval+0x2c>
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
800367c: f8 00 2b 35 calli 800e350 <__errno>
8003680: 34 02 00 16 mvi r2,22
8003684: 58 22 00 00 sw (r1+0),r2
8003688: 34 01 ff ff mvi r1,-1
800368c: e3 ff ff ef bi 8003648 <sched_rr_get_interval+0x2c>
080058e0 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
80058e0: 37 9c ff c0 addi sp,sp,-64
80058e4: 5b 8b 00 18 sw (sp+24),r11
80058e8: 5b 8c 00 14 sw (sp+20),r12
80058ec: 5b 8d 00 10 sw (sp+16),r13
80058f0: 5b 8e 00 0c sw (sp+12),r14
80058f4: 5b 8f 00 08 sw (sp+8),r15
80058f8: 5b 9d 00 04 sw (sp+4),ra
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
80058fc: 78 09 08 02 mvhi r9,0x802
8005900: 39 29 4a 64 ori r9,r9,0x4a64
8005904: 29 2a 00 00 lw r10,(r9+0)
8005908: 5b 83 00 2c sw (sp+44),r3
800590c: 5b 84 00 30 sw (sp+48),r4
8005910: 35 43 00 01 addi r3,r10,1
8005914: 59 23 00 00 sw (r9+0),r3
8005918: 5b 85 00 34 sw (sp+52),r5
800591c: 5b 86 00 38 sw (sp+56),r6
8005920: 5b 87 00 3c sw (sp+60),r7
8005924: 5b 88 00 40 sw (sp+64),r8
8005928: b8 20 70 00 mv r14,r1
800592c: 5b 82 00 28 sw (sp+40),r2
8005930: b8 40 68 00 mv r13,r2
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
8005934: 20 4b 02 00 andi r11,r2,0x200
8005938: b9 60 78 00 mv r15,r11
800593c: 5d 60 00 2d bne r11,r0,80059f0 <sem_open+0x110>
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
va_end(arg);
}
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
8005940: b9 c0 08 00 mv r1,r14
8005944: 37 82 00 24 addi r2,sp,36
8005948: f8 00 17 f3 calli 800b914 <_POSIX_Semaphore_Name_to_id>
800594c: b8 20 60 00 mv r12,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 ) {
8005950: 44 20 00 10 be r1,r0,8005990 <sem_open+0xb0>
/*
* 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) ) ) {
8005954: 34 01 00 02 mvi r1,2
8005958: 5d 81 00 02 bne r12,r1,8005960 <sem_open+0x80> <== NEVER TAKEN
800595c: 5d 60 00 27 bne r11,r0,80059f8 <sem_open+0x118>
_Thread_Enable_dispatch();
8005960: f8 00 07 f7 calli 800793c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
8005964: f8 00 2f 4e calli 801169c <__errno>
8005968: 58 2c 00 00 sw (r1+0),r12
800596c: 34 01 ff ff mvi r1,-1
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
8005970: 2b 9d 00 04 lw ra,(sp+4)
8005974: 2b 8b 00 18 lw r11,(sp+24)
8005978: 2b 8c 00 14 lw r12,(sp+20)
800597c: 2b 8d 00 10 lw r13,(sp+16)
8005980: 2b 8e 00 0c lw r14,(sp+12)
8005984: 2b 8f 00 08 lw r15,(sp+8)
8005988: 37 9c 00 40 addi sp,sp,64
800598c: c3 a0 00 00 ret
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
8005990: 21 ad 0a 00 andi r13,r13,0xa00
8005994: 34 01 0a 00 mvi r1,2560
8005998: 45 a1 00 23 be r13,r1,8005a24 <sem_open+0x144>
800599c: 2b 82 00 24 lw r2,(sp+36)
80059a0: 78 01 08 02 mvhi r1,0x802
80059a4: 37 83 00 1c addi r3,sp,28
80059a8: 38 21 4c e4 ori r1,r1,0x4ce4
80059ac: f8 00 05 fe calli 80071a4 <_Objects_Get>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
the_semaphore->open_count += 1;
80059b0: 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 );
80059b4: 5b 81 00 20 sw (sp+32),r1
the_semaphore->open_count += 1;
80059b8: 34 42 00 01 addi r2,r2,1
80059bc: 58 22 00 18 sw (r1+24),r2
_Thread_Enable_dispatch();
80059c0: f8 00 07 df calli 800793c <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
80059c4: f8 00 07 de calli 800793c <_Thread_Enable_dispatch>
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;
80059c8: 2b 81 00 20 lw r1,(sp+32)
80059cc: 34 21 00 08 addi r1,r1,8
#endif
return id;
}
80059d0: 2b 9d 00 04 lw ra,(sp+4)
80059d4: 2b 8b 00 18 lw r11,(sp+24)
80059d8: 2b 8c 00 14 lw r12,(sp+20)
80059dc: 2b 8d 00 10 lw r13,(sp+16)
80059e0: 2b 8e 00 0c lw r14,(sp+12)
80059e4: 2b 8f 00 08 lw r15,(sp+8)
80059e8: 37 9c 00 40 addi sp,sp,64
80059ec: c3 a0 00 00 ret
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
80059f0: 2b 8f 00 30 lw r15,(sp+48)
80059f4: e3 ff ff d3 bi 8005940 <sem_open+0x60>
/*
* 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(
80059f8: 34 02 00 00 mvi r2,0
80059fc: b9 e0 18 00 mv r3,r15
8005a00: 37 84 00 20 addi r4,sp,32
8005a04: b9 c0 08 00 mv r1,r14
8005a08: f8 00 17 52 calli 800b750 <_POSIX_Semaphore_Create_support>
8005a0c: b8 20 58 00 mv r11,r1
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
8005a10: f8 00 07 cb calli 800793c <_Thread_Enable_dispatch>
if ( status == -1 )
8005a14: 34 02 ff ff mvi r2,-1
8005a18: b9 60 08 00 mv r1,r11
8005a1c: 5d 62 ff eb bne r11,r2,80059c8 <sem_open+0xe8>
8005a20: e3 ff ff ec bi 80059d0 <sem_open+0xf0>
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
8005a24: f8 00 07 c6 calli 800793c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
8005a28: f8 00 2f 1d calli 801169c <__errno>
8005a2c: 34 02 00 11 mvi r2,17
8005a30: 58 22 00 00 sw (r1+0),r2
8005a34: 34 01 ff ff mvi r1,-1
8005a38: e3 ff ff e6 bi 80059d0 <sem_open+0xf0>
08005aac <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
8005aac: 37 9c ff f4 addi sp,sp,-12
8005ab0: 5b 8b 00 08 sw (sp+8),r11
8005ab4: 5b 9d 00 04 sw (sp+4),ra
8005ab8: b8 20 58 00 mv r11,r1
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
8005abc: b8 40 08 00 mv r1,r2
8005ac0: 37 82 00 0c addi r2,sp,12
8005ac4: f8 00 14 3c calli 800abb4 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
8005ac8: 34 02 00 03 mvi r2,3
8005acc: 44 22 00 09 be r1,r2,8005af0 <sem_timedwait+0x44> <== ALWAYS TAKEN
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
8005ad0: 2b 83 00 0c lw r3,(sp+12) <== NOT EXECUTED
8005ad4: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8005ad8: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8005adc: f8 00 17 b8 calli 800b9bc <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
break;
}
}
return lock_status;
}
8005ae0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8005ae4: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8005ae8: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8005aec: c3 a0 00 00 ret <== NOT EXECUTED
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
8005af0: 2b 83 00 0c lw r3,(sp+12)
8005af4: b9 60 08 00 mv r1,r11
8005af8: 34 02 00 01 mvi r2,1
8005afc: f8 00 17 b0 calli 800b9bc <_POSIX_Semaphore_Wait_support>
break;
}
}
return lock_status;
}
8005b00: 2b 9d 00 04 lw ra,(sp+4)
8005b04: 2b 8b 00 08 lw r11,(sp+8)
8005b08: 37 9c 00 0c addi sp,sp,12
8005b0c: c3 a0 00 00 ret
08002114 <setgrent>:
return NULL;
return &grent;
}
void setgrent(void)
{
8002114: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
8002118: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
800211c: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
init_etc_passwd_group();
if (group_fp != NULL)
8002120: 78 0b 08 02 mvhi r11,0x802 <== NOT EXECUTED
8002124: 39 6b 27 9c ori r11,r11,0x279c <== NOT EXECUTED
return &grent;
}
void setgrent(void)
{
init_etc_passwd_group();
8002128: fb ff ff b4 calli 8001ff8 <init_etc_passwd_group> <== NOT EXECUTED
if (group_fp != NULL)
800212c: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
8002130: 44 20 00 02 be r1,r0,8002138 <setgrent+0x24> <== NOT EXECUTED
fclose(group_fp);
8002134: f8 00 36 b0 calli 800fbf4 <fclose> <== NOT EXECUTED
group_fp = fopen("/etc/group", "r");
8002138: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
800213c: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8002140: 38 42 0c 9c ori r2,r2,0xc9c <== NOT EXECUTED
8002144: 38 21 05 10 ori r1,r1,0x510 <== NOT EXECUTED
8002148: f8 00 38 cb calli 8010474 <fopen> <== NOT EXECUTED
800214c: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED
}
8002150: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002154: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8002158: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
800215c: c3 a0 00 00 ret <== NOT EXECUTED
08002358 <setpwent>:
return NULL;
return &pwent;
}
void setpwent(void)
{
8002358: 37 9c ff f8 addi sp,sp,-8 <== NOT EXECUTED
800235c: 5b 8b 00 08 sw (sp+8),r11 <== NOT EXECUTED
8002360: 5b 9d 00 04 sw (sp+4),ra <== NOT EXECUTED
init_etc_passwd_group();
if (passwd_fp != NULL)
8002364: 78 0b 08 02 mvhi r11,0x802 <== NOT EXECUTED
8002368: 39 6b 26 b4 ori r11,r11,0x26b4 <== NOT EXECUTED
return &pwent;
}
void setpwent(void)
{
init_etc_passwd_group();
800236c: fb ff ff 23 calli 8001ff8 <init_etc_passwd_group> <== NOT EXECUTED
if (passwd_fp != NULL)
8002370: 29 61 00 00 lw r1,(r11+0) <== NOT EXECUTED
8002374: 44 20 00 02 be r1,r0,800237c <setpwent+0x24> <== NOT EXECUTED
fclose(passwd_fp);
8002378: f8 00 36 1f calli 800fbf4 <fclose> <== NOT EXECUTED
passwd_fp = fopen("/etc/passwd", "r");
800237c: 78 01 08 02 mvhi r1,0x802 <== NOT EXECUTED
8002380: 78 02 08 02 mvhi r2,0x802 <== NOT EXECUTED
8002384: 38 42 0c 9c ori r2,r2,0xc9c <== NOT EXECUTED
8002388: 38 21 04 98 ori r1,r1,0x498 <== NOT EXECUTED
800238c: f8 00 38 3a calli 8010474 <fopen> <== NOT EXECUTED
8002390: 59 61 00 00 sw (r11+0),r1 <== NOT EXECUTED
}
8002394: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002398: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
800239c: 37 9c 00 08 addi sp,sp,8 <== NOT EXECUTED
80023a0: c3 a0 00 00 ret <== NOT EXECUTED
08003430 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
8003430: 37 9c ff ec addi sp,sp,-20
8003434: 5b 8b 00 14 sw (sp+20),r11
8003438: 5b 8c 00 10 sw (sp+16),r12
800343c: 5b 8d 00 0c sw (sp+12),r13
8003440: 5b 8e 00 08 sw (sp+8),r14
8003444: 5b 9d 00 04 sw (sp+4),ra
8003448: b8 60 68 00 mv r13,r3
800344c: b8 20 58 00 mv r11,r1
8003450: b8 40 60 00 mv r12,r2
ISR_Level level;
if ( oact )
8003454: 44 60 00 0e be r3,r0,800348c <sigaction+0x5c>
*oact = _POSIX_signals_Vectors[ sig ];
8003458: b4 21 08 00 add r1,r1,r1
800345c: 34 02 00 02 mvi r2,2
8003460: b4 2b 08 00 add r1,r1,r11
8003464: 78 0e 08 02 mvhi r14,0x802
8003468: fb ff f5 47 calli 8000984 <__ashlsi3>
800346c: 39 ce 0d c0 ori r14,r14,0xdc0
8003470: b5 c1 08 00 add r1,r14,r1
8003474: 28 22 00 00 lw r2,(r1+0)
8003478: 59 a2 00 00 sw (r13+0),r2
800347c: 28 23 00 04 lw r3,(r1+4)
8003480: 59 a3 00 04 sw (r13+4),r3
8003484: 28 21 00 08 lw r1,(r1+8)
8003488: 59 a1 00 08 sw (r13+8),r1
if ( !sig )
800348c: 45 60 00 04 be r11,r0,800349c <sigaction+0x6c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
8003490: 35 61 ff ff addi r1,r11,-1
8003494: 34 02 00 1f mvi r2,31
8003498: 50 41 00 06 bgeu r2,r1,80034b0 <sigaction+0x80>
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
800349c: f8 00 2c 4c calli 800e5cc <__errno>
80034a0: 34 02 00 16 mvi r2,22
80034a4: 58 22 00 00 sw (r1+0),r2
80034a8: 34 01 ff ff mvi r1,-1
80034ac: e0 00 00 1c bi 800351c <sigaction+0xec>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
80034b0: 34 01 00 09 mvi r1,9
80034b4: 45 61 ff fa be r11,r1,800349c <sigaction+0x6c>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
80034b8: b9 80 08 00 mv r1,r12
80034bc: 45 80 00 18 be r12,r0,800351c <sigaction+0xec> <== 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 );
80034c0: 90 00 68 00 rcsr r13,IE
80034c4: 34 01 ff fe mvi r1,-2
80034c8: a1 a1 08 00 and r1,r13,r1
80034cc: d0 01 00 00 wcsr IE,r1
if ( act->sa_handler == SIG_DFL ) {
80034d0: 29 81 00 08 lw r1,(r12+8)
80034d4: 44 20 00 19 be r1,r0,8003538 <sigaction+0x108> <== NEVER TAKEN
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
80034d8: b9 60 08 00 mv r1,r11
80034dc: f8 00 19 0f calli 8009918 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
80034e0: b5 6b 08 00 add r1,r11,r11
80034e4: b4 2b 08 00 add r1,r1,r11
80034e8: 34 02 00 02 mvi r2,2
80034ec: fb ff f5 26 calli 8000984 <__ashlsi3>
80034f0: 29 82 00 00 lw r2,(r12+0)
80034f4: 78 0b 08 02 mvhi r11,0x802
80034f8: 39 6b 0d c0 ori r11,r11,0xdc0
80034fc: b5 61 08 00 add r1,r11,r1
8003500: 58 22 00 00 sw (r1+0),r2
8003504: 29 83 00 04 lw r3,(r12+4)
8003508: 58 23 00 04 sw (r1+4),r3
800350c: 29 8c 00 08 lw r12,(r12+8)
8003510: 58 2c 00 08 sw (r1+8),r12
}
_ISR_Enable( level );
8003514: d0 0d 00 00 wcsr IE,r13
8003518: 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;
}
800351c: 2b 9d 00 04 lw ra,(sp+4)
8003520: 2b 8b 00 14 lw r11,(sp+20)
8003524: 2b 8c 00 10 lw r12,(sp+16)
8003528: 2b 8d 00 0c lw r13,(sp+12)
800352c: 2b 8e 00 08 lw r14,(sp+8)
8003530: 37 9c 00 14 addi sp,sp,20
8003534: c3 a0 00 00 ret
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
8003538: b5 6b 08 00 add r1,r11,r11
800353c: 34 02 00 02 mvi r2,2
8003540: b4 2b 08 00 add r1,r1,r11
8003544: fb ff f5 10 calli 8000984 <__ashlsi3>
8003548: 78 02 08 01 mvhi r2,0x801
800354c: 78 03 08 02 mvhi r3,0x802
8003550: 38 42 ef 08 ori r2,r2,0xef08
8003554: b4 41 10 00 add r2,r2,r1
8003558: 38 63 0d c0 ori r3,r3,0xdc0
800355c: b4 61 08 00 add r1,r3,r1
8003560: 28 43 00 08 lw r3,(r2+8)
8003564: 58 23 00 08 sw (r1+8),r3
8003568: 28 43 00 00 lw r3,(r2+0)
800356c: 28 42 00 04 lw r2,(r2+4)
8003570: 58 23 00 00 sw (r1+0),r3
8003574: 58 22 00 04 sw (r1+4),r2
8003578: e3 ff ff e7 bi 8003514 <sigaction+0xe4>
08005df8 <sigsuspend>:
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
8005df8: 37 9c ff f0 addi sp,sp,-16
8005dfc: 5b 8b 00 08 sw (sp+8),r11
8005e00: 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 );
8005e04: b8 20 10 00 mv r2,r1
8005e08: 37 83 00 10 addi r3,sp,16
8005e0c: 34 01 00 01 mvi r1,1
8005e10: fb ff ff ec calli 8005dc0 <sigprocmask>
(void) sigfillset( &all_signals );
8005e14: 37 8b 00 0c addi r11,sp,12
8005e18: b9 60 08 00 mv r1,r11
8005e1c: fb ff ff ac calli 8005ccc <sigfillset>
status = sigtimedwait( &all_signals, NULL, NULL );
8005e20: 34 02 00 00 mvi r2,0
8005e24: b8 40 18 00 mv r3,r2
8005e28: b9 60 08 00 mv r1,r11
8005e2c: f8 00 00 31 calli 8005ef0 <sigtimedwait>
8005e30: b8 20 58 00 mv r11,r1
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
8005e34: 34 01 00 00 mvi r1,0
8005e38: 37 82 00 10 addi r2,sp,16
8005e3c: b8 20 18 00 mv r3,r1
8005e40: fb ff ff e0 calli 8005dc0 <sigprocmask>
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
8005e44: 34 02 ff ff mvi r2,-1
8005e48: 5d 62 00 06 bne r11,r2,8005e60 <sigsuspend+0x68> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINTR );
return status;
}
8005e4c: 34 01 ff ff mvi r1,-1
8005e50: 2b 9d 00 04 lw ra,(sp+4)
8005e54: 2b 8b 00 08 lw r11,(sp+8)
8005e58: 37 9c 00 10 addi sp,sp,16
8005e5c: c3 a0 00 00 ret
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
rtems_set_errno_and_return_minus_one( EINTR );
8005e60: f8 00 2b 24 calli 8010af0 <__errno>
8005e64: 34 02 00 04 mvi r2,4
8005e68: 58 22 00 00 sw (r1+0),r2
8005e6c: e3 ff ff f8 bi 8005e4c <sigsuspend+0x54>
08003a68 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
8003a68: 37 9c ff d8 addi sp,sp,-40
8003a6c: 5b 8b 00 1c sw (sp+28),r11
8003a70: 5b 8c 00 18 sw (sp+24),r12
8003a74: 5b 8d 00 14 sw (sp+20),r13
8003a78: 5b 8e 00 10 sw (sp+16),r14
8003a7c: 5b 8f 00 0c sw (sp+12),r15
8003a80: 5b 90 00 08 sw (sp+8),r16
8003a84: 5b 9d 00 04 sw (sp+4),ra
8003a88: b8 20 68 00 mv r13,r1
8003a8c: b8 40 60 00 mv r12,r2
8003a90: b8 60 58 00 mv r11,r3
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
8003a94: 44 20 00 6b be r1,r0,8003c40 <sigtimedwait+0x1d8> <== NEVER TAKEN
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
8003a98: 44 60 00 59 be r3,r0,8003bfc <sigtimedwait+0x194>
if ( !_Timespec_Is_valid( timeout ) )
8003a9c: b8 60 08 00 mv r1,r3
8003aa0: f8 00 0d 37 calli 8006f7c <_Timespec_Is_valid>
8003aa4: 44 20 00 67 be r1,r0,8003c40 <sigtimedwait+0x1d8> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
8003aa8: b9 60 08 00 mv r1,r11
8003aac: f8 00 0d 54 calli 8006ffc <_Timespec_To_ticks>
8003ab0: b8 20 28 00 mv r5,r1
if ( !interval )
8003ab4: 44 20 00 63 be r1,r0,8003c40 <sigtimedwait+0x1d8> <== NEVER TAKEN
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
8003ab8: 37 8b 00 20 addi r11,sp,32
8003abc: 45 80 00 02 be r12,r0,8003ac4 <sigtimedwait+0x5c>
8003ac0: b9 80 58 00 mv r11,r12
the_thread = _Thread_Executing;
8003ac4: 78 0c 08 02 mvhi r12,0x802
8003ac8: 39 8c 19 70 ori r12,r12,0x1970
8003acc: 29 84 00 00 lw r4,(r12+0)
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
8003ad0: 28 8f 01 2c lw r15,(r4+300)
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
8003ad4: 90 00 80 00 rcsr r16,IE
8003ad8: 34 01 ff fe mvi r1,-2
8003adc: a2 01 08 00 and r1,r16,r1
8003ae0: d0 01 00 00 wcsr IE,r1
if ( *set & api->signals_pending ) {
8003ae4: 29 a2 00 00 lw r2,(r13+0)
8003ae8: 29 e1 00 d0 lw r1,(r15+208)
8003aec: a0 41 70 00 and r14,r2,r1
8003af0: 5d c0 00 45 bne r14,r0,8003c04 <sigtimedwait+0x19c>
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
8003af4: 78 03 08 02 mvhi r3,0x802
8003af8: 38 63 1f b4 ori r3,r3,0x1fb4
8003afc: 28 61 00 00 lw r1,(r3+0)
8003b00: a0 41 10 00 and r2,r2,r1
8003b04: 5c 4e 00 2f bne r2,r14,8003bc0 <sigtimedwait+0x158>
8003b08: 78 01 08 02 mvhi r1,0x802
8003b0c: 38 21 18 b4 ori r1,r1,0x18b4
8003b10: 28 22 00 00 lw r2,(r1+0)
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
return signo;
}
the_info->si_signo = -1;
8003b14: 34 03 ff ff mvi r3,-1
8003b18: 59 63 00 00 sw (r11+0),r3
8003b1c: 34 42 00 01 addi r2,r2,1
8003b20: 58 22 00 00 sw (r1+0),r2
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
8003b24: 34 01 00 04 mvi r1,4
8003b28: 58 81 00 34 sw (r4+52),r1
the_thread->Wait.option = *set;
8003b2c: 29 ad 00 00 lw r13,(r13+0)
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
8003b30: 78 01 08 02 mvhi r1,0x802
8003b34: 38 21 1f 4c ori r1,r1,0x1f4c
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;
8003b38: 34 02 00 01 mvi r2,1
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
8003b3c: 58 8d 00 30 sw (r4+48),r13
8003b40: 58 22 00 30 sw (r1+48),r2
the_thread->Wait.return_argument = the_info;
8003b44: 58 8b 00 28 sw (r4+40),r11
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
8003b48: 58 81 00 44 sw (r4+68),r1
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 );
8003b4c: d0 10 00 00 wcsr IE,r16
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
8003b50: 78 01 08 02 mvhi r1,0x802
8003b54: 78 03 08 00 mvhi r3,0x800
8003b58: b8 a0 10 00 mv r2,r5
8003b5c: 38 63 69 98 ori r3,r3,0x6998
8003b60: 38 21 1f 4c ori r1,r1,0x1f4c
8003b64: f8 00 0a 7c calli 8006554 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
8003b68: f8 00 09 20 calli 8005fe8 <_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 );
8003b6c: 29 62 00 00 lw r2,(r11+0)
8003b70: 34 04 00 00 mvi r4,0
8003b74: b9 60 18 00 mv r3,r11
8003b78: b8 80 28 00 mv r5,r4
8003b7c: b9 e0 08 00 mv r1,r15
8003b80: f8 00 19 bf calli 800a27c <_POSIX_signals_Clear_signals>
errno = _Thread_Executing->Wait.return_code;
8003b84: f8 00 2b 75 calli 800e958 <__errno>
8003b88: 29 82 00 00 lw r2,(r12+0)
8003b8c: 28 42 00 34 lw r2,(r2+52)
8003b90: 58 22 00 00 sw (r1+0),r2
return the_info->si_signo;
8003b94: 29 6c 00 00 lw r12,(r11+0)
}
8003b98: b9 80 08 00 mv r1,r12
8003b9c: 2b 9d 00 04 lw ra,(sp+4)
8003ba0: 2b 8b 00 1c lw r11,(sp+28)
8003ba4: 2b 8c 00 18 lw r12,(sp+24)
8003ba8: 2b 8d 00 14 lw r13,(sp+20)
8003bac: 2b 8e 00 10 lw r14,(sp+16)
8003bb0: 2b 8f 00 0c lw r15,(sp+12)
8003bb4: 2b 90 00 08 lw r16,(sp+8)
8003bb8: 37 9c 00 28 addi sp,sp,40
8003bbc: c3 a0 00 00 ret
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
8003bc0: fb ff ff 8a calli 80039e8 <_POSIX_signals_Get_highest>
8003bc4: b8 20 60 00 mv r12,r1
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
8003bc8: b9 80 10 00 mv r2,r12
8003bcc: b9 e0 08 00 mv r1,r15
8003bd0: b9 60 18 00 mv r3,r11
8003bd4: b9 c0 28 00 mv r5,r14
8003bd8: 34 04 00 01 mvi r4,1
8003bdc: f8 00 19 a8 calli 800a27c <_POSIX_signals_Clear_signals>
_ISR_Enable( level );
8003be0: d0 10 00 00 wcsr IE,r16
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
8003be4: 34 01 00 00 mvi r1,0
8003be8: 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;
8003bec: 34 01 00 01 mvi r1,1
8003bf0: 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;
8003bf4: 59 6c 00 00 sw (r11+0),r12
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
return signo;
8003bf8: e3 ff ff e8 bi 8003b98 <sigtimedwait+0x130>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
8003bfc: b8 60 28 00 mv r5,r3
8003c00: e3 ff ff ae bi 8003ab8 <sigtimedwait+0x50>
/* 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 );
8003c04: fb ff ff 79 calli 80039e8 <_POSIX_signals_Get_highest>
_POSIX_signals_Clear_signals(
8003c08: 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 );
8003c0c: b8 20 10 00 mv r2,r1
8003c10: 59 61 00 00 sw (r11+0),r1
_POSIX_signals_Clear_signals(
8003c14: b9 60 18 00 mv r3,r11
8003c18: b9 e0 08 00 mv r1,r15
8003c1c: b8 80 28 00 mv r5,r4
8003c20: f8 00 19 97 calli 800a27c <_POSIX_signals_Clear_signals>
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
8003c24: d0 10 00 00 wcsr IE,r16
the_info->si_code = SI_USER;
8003c28: 34 01 00 01 mvi r1,1
8003c2c: 59 61 00 04 sw (r11+4),r1
the_info->si_value.sival_int = 0;
8003c30: 34 01 00 00 mvi r1,0
8003c34: 59 61 00 08 sw (r11+8),r1
return the_info->si_signo;
8003c38: 29 6c 00 00 lw r12,(r11+0)
8003c3c: e3 ff ff d7 bi 8003b98 <sigtimedwait+0x130>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
8003c40: f8 00 2b 46 calli 800e958 <__errno>
8003c44: 34 02 00 16 mvi r2,22
8003c48: 58 22 00 00 sw (r1+0),r2
8003c4c: 34 0c ff ff mvi r12,-1
8003c50: e3 ff ff d2 bi 8003b98 <sigtimedwait+0x130>
080060f8 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
80060f8: 37 9c ff f8 addi sp,sp,-8
80060fc: 5b 8b 00 08 sw (sp+8),r11
8006100: 5b 9d 00 04 sw (sp+4),ra
8006104: b8 40 58 00 mv r11,r2
int status;
status = sigtimedwait( set, NULL, NULL );
8006108: 34 02 00 00 mvi r2,0
800610c: b8 40 18 00 mv r3,r2
8006110: fb ff ff 78 calli 8005ef0 <sigtimedwait>
8006114: b8 20 10 00 mv r2,r1
if ( status != -1 ) {
8006118: 34 01 ff ff mvi r1,-1
800611c: 44 41 00 09 be r2,r1,8006140 <sigwait+0x48>
if ( sig )
8006120: b9 60 08 00 mv r1,r11
8006124: 45 60 00 03 be r11,r0,8006130 <sigwait+0x38> <== NEVER TAKEN
*sig = status;
8006128: 59 62 00 00 sw (r11+0),r2
800612c: 34 01 00 00 mvi r1,0
return 0;
}
return errno;
}
8006130: 2b 9d 00 04 lw ra,(sp+4)
8006134: 2b 8b 00 08 lw r11,(sp+8)
8006138: 37 9c 00 08 addi sp,sp,8
800613c: c3 a0 00 00 ret
if ( sig )
*sig = status;
return 0;
}
return errno;
8006140: f8 00 2a 6c calli 8010af0 <__errno>
8006144: 28 21 00 00 lw r1,(r1+0)
}
8006148: 2b 9d 00 04 lw ra,(sp+4)
800614c: 2b 8b 00 08 lw r11,(sp+8)
8006150: 37 9c 00 08 addi sp,sp,8
8006154: c3 a0 00 00 ret
08004aa0 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
8004aa0: 37 9c ff f4 addi sp,sp,-12 <== NOT EXECUTED
8004aa4: 5b 8b 00 0c sw (sp+12),r11 <== NOT EXECUTED
8004aa8: 5b 8c 00 08 sw (sp+8),r12 <== NOT EXECUTED
8004aac: 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)) {
8004ab0: 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)
{
8004ab4: 20 2c 00 ff andi r12,r1,0xff <== NOT EXECUTED
8004ab8: 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)) {
8004abc: 20 61 0e 78 andi r1,r3,0xe78 <== NOT EXECUTED
8004ac0: 5c 20 00 0a bne r1,r0,8004ae8 <siproc+0x48> <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
8004ac4: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8004ac8: fb ff ff 7b calli 80048b4 <iproc> <== NOT EXECUTED
8004acc: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
}
return i;
}
8004ad0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8004ad4: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8004ad8: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8004adc: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8004ae0: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8004ae4: c3 a0 00 00 ret <== NOT EXECUTED
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
8004ae8: 28 41 00 18 lw r1,(r2+24) <== NOT EXECUTED
8004aec: 34 02 00 00 mvi r2,0 <== NOT EXECUTED
8004af0: b8 40 18 00 mv r3,r2 <== NOT EXECUTED
8004af4: f8 00 07 85 calli 8006908 <rtems_semaphore_obtain> <== NOT EXECUTED
i = iproc (c, tty);
8004af8: b9 60 10 00 mv r2,r11 <== NOT EXECUTED
8004afc: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8004b00: fb ff ff 6d calli 80048b4 <iproc> <== NOT EXECUTED
8004b04: b8 20 60 00 mv r12,r1 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
8004b08: 29 61 00 18 lw r1,(r11+24) <== NOT EXECUTED
8004b0c: f8 00 07 e0 calli 8006a8c <rtems_semaphore_release> <== NOT EXECUTED
}
else {
i = iproc (c, tty);
}
return i;
}
8004b10: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8004b14: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8004b18: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
8004b1c: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8004b20: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8004b24: c3 a0 00 00 ret <== NOT EXECUTED
08003f5c <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
8003f5c: 37 9c ff dc addi sp,sp,-36
8003f60: 5b 8b 00 10 sw (sp+16),r11
8003f64: 5b 8c 00 0c sw (sp+12),r12
8003f68: 5b 8d 00 08 sw (sp+8),r13
8003f6c: 5b 9d 00 04 sw (sp+4),ra
8003f70: b8 40 60 00 mv r12,r2
8003f74: b8 20 58 00 mv r11,r1
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
8003f78: 44 40 00 26 be r2,r0,8004010 <stat+0xb4>
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
8003f7c: f8 00 39 48 calli 801249c <strlen>
8003f80: 37 8d 00 14 addi r13,sp,20
8003f84: b8 20 10 00 mv r2,r1
8003f88: 34 03 00 00 mvi r3,0
8003f8c: b9 60 08 00 mv r1,r11
8003f90: b9 a0 20 00 mv r4,r13
8003f94: 34 05 00 01 mvi r5,1
8003f98: fb ff f8 87 calli 80021b4 <rtems_filesystem_evaluate_path>
8003f9c: b8 20 18 00 mv r3,r1
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
8003fa0: 34 0b ff ff mvi r11,-1
8003fa4: 5c 20 00 14 bne r1,r0,8003ff4 <stat+0x98>
return -1;
if ( !loc.handlers->fstat_h ){
8003fa8: 2b 81 00 1c lw r1,(sp+28)
8003fac: 28 22 00 18 lw r2,(r1+24)
8003fb0: 44 43 00 23 be r2,r3,800403c <stat+0xe0> <== NEVER TAKEN
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
8003fb4: b8 60 10 00 mv r2,r3
8003fb8: b9 80 08 00 mv r1,r12
8003fbc: 34 03 00 48 mvi r3,72
8003fc0: f8 00 36 82 calli 80119c8 <memset>
status = (*loc.handlers->fstat_h)( &loc, buf );
8003fc4: 2b 83 00 1c lw r3,(sp+28)
8003fc8: b9 80 10 00 mv r2,r12
8003fcc: b9 a0 08 00 mv r1,r13
8003fd0: 28 63 00 18 lw r3,(r3+24)
8003fd4: d8 60 00 00 call r3
8003fd8: b8 20 58 00 mv r11,r1
rtems_filesystem_freenode( &loc );
8003fdc: 2b 81 00 20 lw r1,(sp+32)
8003fe0: 44 20 00 05 be r1,r0,8003ff4 <stat+0x98> <== NEVER TAKEN
8003fe4: 28 22 00 1c lw r2,(r1+28)
8003fe8: 44 40 00 03 be r2,r0,8003ff4 <stat+0x98> <== NEVER TAKEN
8003fec: b9 a0 08 00 mv r1,r13
8003ff0: d8 40 00 00 call r2
return status;
}
8003ff4: b9 60 08 00 mv r1,r11
8003ff8: 2b 9d 00 04 lw ra,(sp+4)
8003ffc: 2b 8b 00 10 lw r11,(sp+16)
8004000: 2b 8c 00 0c lw r12,(sp+12)
8004004: 2b 8d 00 08 lw r13,(sp+8)
8004008: 37 9c 00 24 addi sp,sp,36
800400c: c3 a0 00 00 ret
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
8004010: f8 00 30 d2 calli 8010358 <__errno>
8004014: 34 02 00 0e mvi r2,14
8004018: 34 0b ff ff mvi r11,-1
800401c: 58 22 00 00 sw (r1+0),r2
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
8004020: b9 60 08 00 mv r1,r11
8004024: 2b 9d 00 04 lw ra,(sp+4)
8004028: 2b 8b 00 10 lw r11,(sp+16)
800402c: 2b 8c 00 0c lw r12,(sp+12)
8004030: 2b 8d 00 08 lw r13,(sp+8)
8004034: 37 9c 00 24 addi sp,sp,36
8004038: c3 a0 00 00 ret
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
return -1;
if ( !loc.handlers->fstat_h ){
rtems_filesystem_freenode( &loc );
800403c: 2b 81 00 20 lw r1,(sp+32) <== NOT EXECUTED
8004040: 44 22 00 05 be r1,r2,8004054 <stat+0xf8> <== NOT EXECUTED
8004044: 28 23 00 1c lw r3,(r1+28) <== NOT EXECUTED
8004048: 44 62 00 03 be r3,r2,8004054 <stat+0xf8> <== NOT EXECUTED
800404c: b9 a0 08 00 mv r1,r13 <== NOT EXECUTED
8004050: d8 60 00 00 call r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8004054: f8 00 30 c1 calli 8010358 <__errno> <== NOT EXECUTED
8004058: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
800405c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8004060: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
8004064: e3 ff ff e4 bi 8003ff4 <stat+0x98> <== NOT EXECUTED
0800a394 <symlink>:
int symlink(
const char *actualpath,
const char *sympath
)
{
800a394: 37 9c ff d8 addi sp,sp,-40
800a398: 5b 8b 00 10 sw (sp+16),r11
800a39c: 5b 8c 00 0c sw (sp+12),r12
800a3a0: 5b 8d 00 08 sw (sp+8),r13
800a3a4: 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 );
800a3a8: 40 43 00 00 lbu r3,(r2+0)
int symlink(
const char *actualpath,
const char *sympath
)
{
800a3ac: b8 20 68 00 mv r13,r1
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
800a3b0: 64 65 00 5c cmpei r5,r3,92
800a3b4: 64 64 00 2f cmpei r4,r3,47
800a3b8: b8 a4 20 00 or r4,r5,r4
800a3bc: 5c 80 00 02 bne r4,r0,800a3c4 <symlink+0x30>
800a3c0: 5c 64 00 2f bne r3,r4,800a47c <symlink+0xe8> <== ALWAYS TAKEN
800a3c4: 78 03 08 02 mvhi r3,0x802
800a3c8: 38 63 78 f8 ori r3,r3,0x78f8
800a3cc: 28 63 00 00 lw r3,(r3+0)
800a3d0: 34 04 00 01 mvi r4,1
800a3d4: 28 61 00 18 lw r1,(r3+24)
800a3d8: 5b 81 00 14 sw (sp+20),r1
800a3dc: 28 61 00 1c lw r1,(r3+28)
800a3e0: 5b 81 00 18 sw (sp+24),r1
800a3e4: 28 61 00 20 lw r1,(r3+32)
800a3e8: 5b 81 00 1c sw (sp+28),r1
800a3ec: 28 61 00 24 lw r1,(r3+36)
800a3f0: 5b 81 00 20 sw (sp+32),r1
if ( !loc.ops->evalformake_h ) {
800a3f4: 2b 81 00 20 lw r1,(sp+32)
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
800a3f8: 28 63 00 28 lw r3,(r3+40)
if ( !loc.ops->evalformake_h ) {
800a3fc: 28 25 00 04 lw r5,(r1+4)
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
800a400: 5b 83 00 24 sw (sp+36),r3
if ( !loc.ops->evalformake_h ) {
800a404: 44 a0 00 2e be r5,r0,800a4bc <symlink+0x128> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
800a408: 37 8c 00 14 addi r12,sp,20
800a40c: b4 44 08 00 add r1,r2,r4
800a410: 37 83 00 28 addi r3,sp,40
800a414: b9 80 10 00 mv r2,r12
800a418: d8 a0 00 00 call r5
800a41c: b8 20 18 00 mv r3,r1
if ( result != 0 )
800a420: 34 0b ff ff mvi r11,-1
800a424: 5c 20 00 0f bne r1,r0,800a460 <symlink+0xcc>
return -1;
if ( !loc.ops->symlink_h ) {
800a428: 2b 81 00 20 lw r1,(sp+32)
800a42c: 28 24 00 38 lw r4,(r1+56)
800a430: 44 83 00 2e be r4,r3,800a4e8 <symlink+0x154> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
800a434: 2b 83 00 28 lw r3,(sp+40)
800a438: b9 a0 10 00 mv r2,r13
800a43c: b9 80 08 00 mv r1,r12
800a440: d8 80 00 00 call r4
800a444: b8 20 58 00 mv r11,r1
rtems_filesystem_freenode( &loc );
800a448: 2b 81 00 20 lw r1,(sp+32)
800a44c: 44 20 00 05 be r1,r0,800a460 <symlink+0xcc> <== NEVER TAKEN
800a450: 28 22 00 1c lw r2,(r1+28)
800a454: 44 40 00 03 be r2,r0,800a460 <symlink+0xcc> <== NEVER TAKEN
800a458: b9 80 08 00 mv r1,r12
800a45c: d8 40 00 00 call r2
return result;
}
800a460: b9 60 08 00 mv r1,r11
800a464: 2b 9d 00 04 lw ra,(sp+4)
800a468: 2b 8b 00 10 lw r11,(sp+16)
800a46c: 2b 8c 00 0c lw r12,(sp+12)
800a470: 2b 8d 00 08 lw r13,(sp+8)
800a474: 37 9c 00 28 addi sp,sp,40
800a478: c3 a0 00 00 ret
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
800a47c: 78 01 08 02 mvhi r1,0x802
800a480: 38 21 78 f8 ori r1,r1,0x78f8
800a484: 28 23 00 00 lw r3,(r1+0)
800a488: 28 61 00 04 lw r1,(r3+4)
800a48c: 5b 81 00 14 sw (sp+20),r1
800a490: 28 61 00 08 lw r1,(r3+8)
800a494: 5b 81 00 18 sw (sp+24),r1
800a498: 28 61 00 0c lw r1,(r3+12)
800a49c: 5b 81 00 1c sw (sp+28),r1
800a4a0: 28 61 00 10 lw r1,(r3+16)
800a4a4: 5b 81 00 20 sw (sp+32),r1
if ( !loc.ops->evalformake_h ) {
800a4a8: 2b 81 00 20 lw r1,(sp+32)
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
800a4ac: 28 63 00 14 lw r3,(r3+20)
if ( !loc.ops->evalformake_h ) {
800a4b0: 28 25 00 04 lw r5,(r1+4)
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
800a4b4: 5b 83 00 24 sw (sp+36),r3
if ( !loc.ops->evalformake_h ) {
800a4b8: 5c a0 ff d4 bne r5,r0,800a408 <symlink+0x74> <== ALWAYS TAKEN
if ( result != 0 )
return -1;
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
800a4bc: f8 00 15 55 calli 800fa10 <__errno> <== NOT EXECUTED
800a4c0: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
800a4c4: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
800a4c8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
rtems_filesystem_freenode( &loc );
return result;
}
800a4cc: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800a4d0: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800a4d4: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
800a4d8: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
800a4dc: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
800a4e0: 37 9c 00 28 addi sp,sp,40 <== NOT EXECUTED
800a4e4: c3 a0 00 00 ret <== NOT EXECUTED
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
if ( result != 0 )
return -1;
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
800a4e8: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
800a4ec: 44 44 ff f4 be r2,r4,800a4bc <symlink+0x128> <== NOT EXECUTED
800a4f0: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
800a4f4: d8 40 00 00 call r2 <== NOT EXECUTED
800a4f8: e3 ff ff f1 bi 800a4bc <symlink+0x128> <== NOT EXECUTED
08004088 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
8004088: 37 9c ff f4 addi sp,sp,-12
800408c: 5b 8b 00 0c sw (sp+12),r11
8004090: 5b 8c 00 08 sw (sp+8),r12
8004094: 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;
8004098: 28 23 01 24 lw r3,(r1+292)
if ( this_reent ) {
800409c: 44 60 00 0c be r3,r0,80040cc <sync_per_thread+0x44> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
80040a0: 78 0b 08 02 mvhi r11,0x802
80040a4: 39 6b 29 38 ori r11,r11,0x2938
80040a8: 29 64 00 00 lw r4,(r11+0)
_Thread_Executing->libc_reent = this_reent;
_fwalk (t->libc_reent, sync_wrapper);
80040ac: 78 02 08 00 mvhi r2,0x800
80040b0: 38 42 41 18 ori r2,r2,0x4118
* 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;
80040b4: 28 8c 01 24 lw r12,(r4+292)
_Thread_Executing->libc_reent = this_reent;
80040b8: 58 83 01 24 sw (r4+292),r3
_fwalk (t->libc_reent, sync_wrapper);
80040bc: 28 21 01 24 lw r1,(r1+292)
80040c0: f8 00 34 dc calli 8011430 <_fwalk>
_Thread_Executing->libc_reent = current_reent;
80040c4: 29 61 00 00 lw r1,(r11+0)
80040c8: 58 2c 01 24 sw (r1+292),r12
}
}
80040cc: 2b 9d 00 04 lw ra,(sp+4)
80040d0: 2b 8b 00 0c lw r11,(sp+12)
80040d4: 2b 8c 00 08 lw r12,(sp+8)
80040d8: 37 9c 00 0c addi sp,sp,12
80040dc: c3 a0 00 00 ret
08003800 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
8003800: 37 9c ff f4 addi sp,sp,-12
8003804: 5b 8b 00 0c sw (sp+12),r11
8003808: 5b 8c 00 08 sw (sp+8),r12
800380c: 5b 9d 00 04 sw (sp+4),ra
8003810: b8 60 58 00 mv r11,r3
8003814: b8 20 60 00 mv r12,r1
switch (opt) {
8003818: 44 40 00 0c be r2,r0,8003848 <tcsetattr+0x48> <== ALWAYS TAKEN
800381c: 34 03 00 01 mvi r3,1 <== NOT EXECUTED
8003820: 44 43 00 13 be r2,r3,800386c <tcsetattr+0x6c> <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
8003824: f8 00 37 c6 calli 801173c <__errno> <== NOT EXECUTED
8003828: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
800382c: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8003830: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
8003834: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8003838: 2b 8b 00 0c lw r11,(sp+12) <== NOT EXECUTED
800383c: 2b 8c 00 08 lw r12,(sp+8) <== NOT EXECUTED
8003840: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8003844: c3 a0 00 00 ret <== NOT EXECUTED
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
8003848: b9 80 08 00 mv r1,r12
800384c: b9 60 18 00 mv r3,r11
8003850: 34 02 00 02 mvi r2,2
8003854: f8 00 24 fb calli 800cc40 <ioctl>
}
}
8003858: 2b 9d 00 04 lw ra,(sp+4)
800385c: 2b 8b 00 0c lw r11,(sp+12)
8003860: 2b 8c 00 08 lw r12,(sp+8)
8003864: 37 9c 00 0c addi sp,sp,12
8003868: c3 a0 00 00 ret
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
800386c: 34 02 00 03 mvi r2,3 <== NOT EXECUTED
8003870: 34 03 00 00 mvi r3,0 <== NOT EXECUTED
8003874: f8 00 24 f3 calli 800cc40 <ioctl> <== NOT EXECUTED
8003878: 4c 20 ff f4 bge r1,r0,8003848 <tcsetattr+0x48> <== NOT EXECUTED
800387c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8003880: e3 ff ff ed bi 8003834 <tcsetattr+0x34> <== NOT EXECUTED
08002828 <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
8002828: 37 9c ff e8 addi sp,sp,-24
800282c: 5b 8b 00 18 sw (sp+24),r11
8002830: 5b 8c 00 14 sw (sp+20),r12
8002834: 5b 8d 00 10 sw (sp+16),r13
8002838: 5b 8e 00 0c sw (sp+12),r14
800283c: 5b 8f 00 08 sw (sp+8),r15
8002840: 5b 9d 00 04 sw (sp+4),ra
8002844: b8 40 60 00 mv r12,r2
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
8002848: 34 02 00 01 mvi r2,1
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
800284c: b8 60 68 00 mv r13,r3
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
8002850: 5c 22 00 06 bne r1,r2,8002868 <timer_create+0x40> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
8002854: 44 60 00 05 be r3,r0,8002868 <timer_create+0x40> <== NEVER TAKEN
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
8002858: 45 80 00 16 be r12,r0,80028b0 <timer_create+0x88>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
800285c: 29 82 00 00 lw r2,(r12+0)
8002860: 34 42 ff ff addi r2,r2,-1
8002864: 50 22 00 0d bgeu r1,r2,8002898 <timer_create+0x70> <== ALWAYS TAKEN
if ( !evp->sigev_signo )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
8002868: f8 00 2e 19 calli 800e0cc <__errno> <== NOT EXECUTED
800286c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8002870: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8002874: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
_Thread_Enable_dispatch();
return 0;
}
8002878: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800287c: 2b 8b 00 18 lw r11,(sp+24) <== NOT EXECUTED
8002880: 2b 8c 00 14 lw r12,(sp+20) <== NOT EXECUTED
8002884: 2b 8d 00 10 lw r13,(sp+16) <== NOT EXECUTED
8002888: 2b 8e 00 0c lw r14,(sp+12) <== NOT EXECUTED
800288c: 2b 8f 00 08 lw r15,(sp+8) <== NOT EXECUTED
8002890: 37 9c 00 18 addi sp,sp,24 <== NOT EXECUTED
8002894: c3 a0 00 00 ret <== 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 )
8002898: 29 81 00 04 lw r1,(r12+4)
800289c: 44 20 ff f3 be r1,r0,8002868 <timer_create+0x40> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
80028a0: 34 21 ff ff addi r1,r1,-1
80028a4: 34 02 00 1f mvi r2,31
80028a8: 50 41 00 02 bgeu r2,r1,80028b0 <timer_create+0x88> <== ALWAYS TAKEN
80028ac: e3 ff ff ef bi 8002868 <timer_create+0x40> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
80028b0: 78 01 08 02 mvhi r1,0x802
80028b4: 38 21 28 bc ori r1,r1,0x28bc
80028b8: 28 22 00 00 lw r2,(r1+0)
80028bc: 34 42 00 01 addi r2,r2,1
80028c0: 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 );
80028c4: 78 01 08 02 mvhi r1,0x802
80028c8: 38 21 2b 7c ori r1,r1,0x2b7c
80028cc: f8 00 05 e8 calli 800406c <_Objects_Allocate>
80028d0: b8 20 58 00 mv r11,r1
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
80028d4: 44 20 00 2e be r1,r0,800298c <timer_create+0x164> <== NEVER TAKEN
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;
80028d8: 34 02 00 02 mvi r2,2
ptimer->thread_id = _Thread_Executing->Object.id;
80028dc: 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;
80028e0: 31 62 00 3c sb (r11+60),r2
ptimer->thread_id = _Thread_Executing->Object.id;
80028e4: 38 21 29 78 ori r1,r1,0x2978
80028e8: 28 21 00 00 lw r1,(r1+0)
80028ec: 28 21 00 08 lw r1,(r1+8)
80028f0: 59 61 00 38 sw (r11+56),r1
if ( evp != NULL ) {
80028f4: 45 80 00 07 be r12,r0,8002910 <timer_create+0xe8>
ptimer->inf.sigev_notify = evp->sigev_notify;
ptimer->inf.sigev_signo = evp->sigev_signo;
ptimer->inf.sigev_value = evp->sigev_value;
80028f8: 29 81 00 08 lw r1,(r12+8)
80028fc: 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;
8002900: 29 81 00 00 lw r1,(r12+0)
ptimer->inf.sigev_signo = evp->sigev_signo;
8002904: 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;
8002908: 59 61 00 40 sw (r11+64),r1
ptimer->inf.sigev_signo = evp->sigev_signo;
800290c: 59 6c 00 44 sw (r11+68),r12
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
8002910: 29 6e 00 08 lw r14,(r11+8)
8002914: 78 01 08 02 mvhi r1,0x802
8002918: 38 21 2b 7c ori r1,r1,0x2b7c
ptimer->inf.sigev_value = evp->sigev_value;
}
ptimer->overrun = 0;
800291c: 34 0c 00 00 mvi r12,0
8002920: 28 2f 00 1c lw r15,(r1+28)
8002924: 34 02 00 02 mvi r2,2
8002928: 59 6c 00 68 sw (r11+104),r12
ptimer->timer_data.it_value.tv_sec = 0;
800292c: 59 6c 00 5c sw (r11+92),r12
ptimer->timer_data.it_value.tv_nsec = 0;
8002930: 59 6c 00 60 sw (r11+96),r12
ptimer->timer_data.it_interval.tv_sec = 0;
8002934: 59 6c 00 54 sw (r11+84),r12
ptimer->timer_data.it_interval.tv_nsec = 0;
8002938: 59 6c 00 58 sw (r11+88),r12
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
800293c: 59 6c 00 18 sw (r11+24),r12
the_watchdog->routine = routine;
8002940: 59 6c 00 2c sw (r11+44),r12
the_watchdog->id = id;
8002944: 59 6c 00 30 sw (r11+48),r12
the_watchdog->user_data = user_data;
8002948: 59 6c 00 34 sw (r11+52),r12
800294c: 21 c1 ff ff andi r1,r14,0xffff
8002950: fb ff f7 1b calli 80005bc <__ashlsi3>
8002954: b5 e1 08 00 add r1,r15,r1
8002958: 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;
800295c: 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;
8002960: 59 ae 00 00 sw (r13+0),r14
_Thread_Enable_dispatch();
8002964: f8 00 08 85 calli 8004b78 <_Thread_Enable_dispatch>
8002968: b9 80 08 00 mv r1,r12
return 0;
}
800296c: 2b 9d 00 04 lw ra,(sp+4)
8002970: 2b 8b 00 18 lw r11,(sp+24)
8002974: 2b 8c 00 14 lw r12,(sp+20)
8002978: 2b 8d 00 10 lw r13,(sp+16)
800297c: 2b 8e 00 0c lw r14,(sp+12)
8002980: 2b 8f 00 08 lw r15,(sp+8)
8002984: 37 9c 00 18 addi sp,sp,24
8002988: c3 a0 00 00 ret
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
_Thread_Enable_dispatch();
800298c: f8 00 08 7b calli 8004b78 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EAGAIN );
8002990: f8 00 2d cf calli 800e0cc <__errno> <== NOT EXECUTED
8002994: 34 02 00 0b mvi r2,11 <== NOT EXECUTED
8002998: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800299c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
80029a0: e3 ff ff f3 bi 800296c <timer_create+0x144> <== NOT EXECUTED
0800413c <timer_getoverrun>:
* its execution, _POSIX_Timer_TSR will have to set this counter to 0.
*/
int timer_getoverrun(
timer_t timerid
)
{
800413c: 37 9c ff f4 addi sp,sp,-12
8004140: 5b 8b 00 08 sw (sp+8),r11
8004144: 5b 9d 00 04 sw (sp+4),ra
8004148: b8 20 10 00 mv r2,r1
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
800414c: 78 01 08 02 mvhi r1,0x802
8004150: 38 21 2b b4 ori r1,r1,0x2bb4
8004154: 37 83 00 0c addi r3,sp,12
8004158: f8 00 07 5e calli 8005ed0 <_Objects_Get>
int overrun;
POSIX_Timer_Control *ptimer;
Objects_Locations location;
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
800415c: 2b 82 00 0c lw r2,(sp+12)
8004160: 44 40 00 0a be r2,r0,8004188 <timer_getoverrun+0x4c> <== ALWAYS TAKEN
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
8004164: f8 00 2c fa calli 800f54c <__errno> <== NOT EXECUTED
8004168: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
800416c: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
8004170: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
}
8004174: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
8004178: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
800417c: 2b 8b 00 08 lw r11,(sp+8) <== NOT EXECUTED
8004180: 37 9c 00 0c addi sp,sp,12 <== NOT EXECUTED
8004184: c3 a0 00 00 ret <== NOT EXECUTED
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
overrun = ptimer->overrun;
8004188: 28 2b 00 68 lw r11,(r1+104)
ptimer->overrun = 0;
800418c: 58 22 00 68 sw (r1+104),r2
_Thread_Enable_dispatch();
8004190: f8 00 09 76 calli 8006768 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
8004194: b9 60 08 00 mv r1,r11
8004198: 2b 9d 00 04 lw ra,(sp+4)
800419c: 2b 8b 00 08 lw r11,(sp+8)
80041a0: 37 9c 00 0c addi sp,sp,12
80041a4: c3 a0 00 00 ret
080041a8 <timer_gettime>:
int timer_gettime(
timer_t timerid,
struct itimerspec *value
)
{
80041a8: 37 9c ff e4 addi sp,sp,-28
80041ac: 5b 8b 00 10 sw (sp+16),r11
80041b0: 5b 8c 00 0c sw (sp+12),r12
80041b4: 5b 8d 00 08 sw (sp+8),r13
80041b8: 5b 9d 00 04 sw (sp+4),ra
80041bc: b8 40 60 00 mv r12,r2
80041c0: b8 20 58 00 mv r11,r1
POSIX_Timer_Control *ptimer;
Objects_Locations location;
struct timespec current_time;
Watchdog_Interval left;
if ( !value )
80041c4: 44 40 00 0b be r2,r0,80041f0 <timer_gettime+0x48> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
/* Reads the current time */
_TOD_Get( ¤t_time );
80041c8: 37 81 00 14 addi r1,sp,20
80041cc: f8 00 04 16 calli 8005224 <_TOD_Get>
80041d0: 78 01 08 02 mvhi r1,0x802
80041d4: b9 60 10 00 mv r2,r11
80041d8: 38 21 2b b4 ori r1,r1,0x2bb4
80041dc: 37 83 00 1c addi r3,sp,28
80041e0: f8 00 07 3c calli 8005ed0 <_Objects_Get>
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
80041e4: 2b 8d 00 1c lw r13,(sp+28)
80041e8: b8 20 58 00 mv r11,r1
80041ec: 45 a0 00 0b be r13,r0,8004218 <timer_gettime+0x70> <== ALWAYS TAKEN
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
80041f0: f8 00 2c d7 calli 800f54c <__errno> <== NOT EXECUTED
80041f4: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
80041f8: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
80041fc: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
}
8004200: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8004204: 2b 8b 00 10 lw r11,(sp+16) <== NOT EXECUTED
8004208: 2b 8c 00 0c lw r12,(sp+12) <== NOT EXECUTED
800420c: 2b 8d 00 08 lw r13,(sp+8) <== NOT EXECUTED
8004210: 37 9c 00 1c addi sp,sp,28 <== NOT EXECUTED
8004214: c3 a0 00 00 ret <== NOT EXECUTED
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
8004218: 78 02 08 02 mvhi r2,0x802
_Watchdog_Ticks_since_boot; /* now */
_Timespec_From_ticks( left, &value->it_value );
800421c: 28 24 00 1c lw r4,(r1+28)
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
8004220: 38 42 2a 44 ori r2,r2,0x2a44
_Watchdog_Ticks_since_boot; /* now */
_Timespec_From_ticks( left, &value->it_value );
8004224: 28 21 00 24 lw r1,(r1+36)
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
8004228: 28 43 00 00 lw r3,(r2+0)
_Watchdog_Ticks_since_boot; /* now */
_Timespec_From_ticks( left, &value->it_value );
800422c: 35 82 00 08 addi r2,r12,8
8004230: b4 81 08 00 add r1,r4,r1
8004234: c8 23 08 00 sub r1,r1,r3
8004238: f8 00 0d 22 calli 80076c0 <_Timespec_From_ticks>
value->it_interval = ptimer->timer_data.it_interval;
800423c: 29 61 00 54 lw r1,(r11+84)
8004240: 59 81 00 00 sw (r12+0),r1
8004244: 29 6b 00 58 lw r11,(r11+88)
8004248: 59 8b 00 04 sw (r12+4),r11
_Thread_Enable_dispatch();
800424c: f8 00 09 47 calli 8006768 <_Thread_Enable_dispatch>
8004250: b9 a0 08 00 mv r1,r13
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
8004254: 2b 9d 00 04 lw ra,(sp+4)
8004258: 2b 8b 00 10 lw r11,(sp+16)
800425c: 2b 8c 00 0c lw r12,(sp+12)
8004260: 2b 8d 00 08 lw r13,(sp+8)
8004264: 37 9c 00 1c addi sp,sp,28
8004268: c3 a0 00 00 ret
080029a4 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
80029a4: 37 9c ff c8 addi sp,sp,-56
80029a8: 5b 8b 00 18 sw (sp+24),r11
80029ac: 5b 8c 00 14 sw (sp+20),r12
80029b0: 5b 8d 00 10 sw (sp+16),r13
80029b4: 5b 8e 00 0c sw (sp+12),r14
80029b8: 5b 8f 00 08 sw (sp+8),r15
80029bc: 5b 9d 00 04 sw (sp+4),ra
80029c0: b8 60 60 00 mv r12,r3
80029c4: b8 20 58 00 mv r11,r1
80029c8: b8 80 68 00 mv r13,r4
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
80029cc: 44 60 00 1c be r3,r0,8002a3c <timer_settime+0x98> <== 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 ) ||
80029d0: 28 64 00 0c lw r4,(r3+12)
80029d4: 78 03 3b 9a mvhi r3,0x3b9a
80029d8: 38 63 c9 ff ori r3,r3,0xc9ff
80029dc: 54 83 00 18 bgu r4,r3,8002a3c <timer_settime+0x98> <== NEVER TAKEN
( value->it_value.tv_nsec < 0 ) ||
( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) ||
80029e0: 29 85 00 04 lw r5,(r12+4)
80029e4: 50 65 00 02 bgeu r3,r5,80029ec <timer_settime+0x48> <== ALWAYS TAKEN
80029e8: e0 00 00 15 bi 8002a3c <timer_settime+0x98> <== 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 ) {
80029ec: 7c 43 00 00 cmpnei r3,r2,0
80029f0: 7c 41 00 04 cmpnei r1,r2,4
80029f4: a0 61 08 00 and r1,r3,r1
80029f8: 5c 20 00 11 bne r1,r0,8002a3c <timer_settime+0x98> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
80029fc: 29 81 00 00 lw r1,(r12+0)
8002a00: 5b 81 00 20 sw (sp+32),r1
8002a04: 29 83 00 08 lw r3,(r12+8)
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
8002a08: 34 01 00 04 mvi r1,4
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
8002a0c: 5b 85 00 24 sw (sp+36),r5
8002a10: 5b 83 00 28 sw (sp+40),r3
8002a14: 5b 84 00 2c sw (sp+44),r4
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
8002a18: 44 41 00 45 be r2,r1,8002b2c <timer_settime+0x188>
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
8002a1c: 78 01 08 02 mvhi r1,0x802
8002a20: b9 60 10 00 mv r2,r11
8002a24: 38 21 2b 7c ori r1,r1,0x2b7c
8002a28: 37 83 00 38 addi r3,sp,56
8002a2c: f8 00 06 c8 calli 800454c <_Objects_Get>
8002a30: b8 20 58 00 mv r11,r1
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
8002a34: 2b 81 00 38 lw r1,(sp+56)
8002a38: 44 20 00 0d be r1,r0,8002a6c <timer_settime+0xc8> <== ALWAYS TAKEN
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
8002a3c: f8 00 2d a4 calli 800e0cc <__errno> <== NOT EXECUTED
8002a40: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
8002a44: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8002a48: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
}
8002a4c: 2b 9d 00 04 lw ra,(sp+4) <== NOT EXECUTED
8002a50: 2b 8b 00 18 lw r11,(sp+24) <== NOT EXECUTED
8002a54: 2b 8c 00 14 lw r12,(sp+20) <== NOT EXECUTED
8002a58: 2b 8d 00 10 lw r13,(sp+16) <== NOT EXECUTED
8002a5c: 2b 8e 00 0c lw r14,(sp+12) <== NOT EXECUTED
8002a60: 2b 8f 00 08 lw r15,(sp+8) <== NOT EXECUTED
8002a64: 37 9c 00 38 addi sp,sp,56 <== NOT EXECUTED
8002a68: c3 a0 00 00 ret <== NOT EXECUTED
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
8002a6c: 2b 82 00 28 lw r2,(sp+40)
8002a70: 5c 41 00 03 bne r2,r1,8002a7c <timer_settime+0xd8>
8002a74: 2b 8e 00 2c lw r14,(sp+44)
8002a78: 45 c2 00 3a be r14,r2,8002b60 <timer_settime+0x1bc>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
8002a7c: b9 80 08 00 mv r1,r12
8002a80: f8 00 0a 78 calli 8005460 <_Timespec_To_ticks>
8002a84: 59 61 00 64 sw (r11+100),r1
initial_period = _Timespec_To_ticks( &normalize.it_value );
8002a88: 37 81 00 28 addi r1,sp,40
8002a8c: f8 00 0a 75 calli 8005460 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
8002a90: 29 63 00 08 lw r3,(r11+8)
8002a94: 78 04 08 00 mvhi r4,0x800
8002a98: b8 20 10 00 mv r2,r1
8002a9c: 38 84 2c 08 ori r4,r4,0x2c08
8002aa0: 35 61 00 10 addi r1,r11,16
8002aa4: b9 60 28 00 mv r5,r11
8002aa8: f8 00 17 7c calli 8008898 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
8002aac: 44 20 00 4c be r1,r0,8002bdc <timer_settime+0x238>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
8002ab0: 45 a0 00 09 be r13,r0,8002ad4 <timer_settime+0x130>
*ovalue = ptimer->timer_data;
8002ab4: 29 61 00 54 lw r1,(r11+84)
8002ab8: 59 a1 00 00 sw (r13+0),r1
8002abc: 29 62 00 58 lw r2,(r11+88)
8002ac0: 59 a2 00 04 sw (r13+4),r2
8002ac4: 29 63 00 5c lw r3,(r11+92)
8002ac8: 59 a3 00 08 sw (r13+8),r3
8002acc: 29 61 00 60 lw r1,(r11+96)
8002ad0: 59 a1 00 0c sw (r13+12),r1
ptimer->timer_data = normalize;
8002ad4: 2b 82 00 20 lw r2,(sp+32)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
_TOD_Get( &ptimer->time );
8002ad8: 35 61 00 6c addi r1,r11,108
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
*ovalue = ptimer->timer_data;
ptimer->timer_data = normalize;
8002adc: 59 62 00 54 sw (r11+84),r2
8002ae0: 2b 83 00 24 lw r3,(sp+36)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
8002ae4: 34 02 00 03 mvi r2,3
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
*ovalue = ptimer->timer_data;
ptimer->timer_data = normalize;
8002ae8: 59 63 00 58 sw (r11+88),r3
8002aec: 2b 83 00 28 lw r3,(sp+40)
8002af0: 59 63 00 5c sw (r11+92),r3
8002af4: 2b 83 00 2c lw r3,(sp+44)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
8002af8: 31 62 00 3c sb (r11+60),r2
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
*ovalue = ptimer->timer_data;
ptimer->timer_data = normalize;
8002afc: 59 63 00 60 sw (r11+96),r3
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
_TOD_Get( &ptimer->time );
8002b00: f8 00 03 a7 calli 800399c <_TOD_Get>
_Thread_Enable_dispatch();
8002b04: f8 00 08 1d calli 8004b78 <_Thread_Enable_dispatch>
8002b08: 34 01 00 00 mvi r1,0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
8002b0c: 2b 9d 00 04 lw ra,(sp+4)
8002b10: 2b 8b 00 18 lw r11,(sp+24)
8002b14: 2b 8c 00 14 lw r12,(sp+20)
8002b18: 2b 8d 00 10 lw r13,(sp+16)
8002b1c: 2b 8e 00 0c lw r14,(sp+12)
8002b20: 2b 8f 00 08 lw r15,(sp+8)
8002b24: 37 9c 00 38 addi sp,sp,56
8002b28: c3 a0 00 00 ret
normalize = *value;
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
8002b2c: 37 8e 00 30 addi r14,sp,48
8002b30: b9 c0 08 00 mv r1,r14
8002b34: f8 00 03 9a calli 800399c <_TOD_Get>
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
8002b38: 37 8f 00 28 addi r15,sp,40
8002b3c: b9 c0 08 00 mv r1,r14
8002b40: b9 e0 10 00 mv r2,r15
8002b44: f8 00 0a 26 calli 80053dc <_Timespec_Greater_than>
8002b48: 5c 20 ff bd bne r1,r0,8002a3c <timer_settime+0x98> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
8002b4c: b9 e0 10 00 mv r2,r15
8002b50: b9 c0 08 00 mv r1,r14
8002b54: b9 e0 18 00 mv r3,r15
8002b58: f8 00 0a 2d calli 800540c <_Timespec_Subtract>
8002b5c: e3 ff ff b0 bi 8002a1c <timer_settime+0x78>
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
8002b60: 35 61 00 10 addi r1,r11,16
8002b64: f8 00 0b ad calli 8005a18 <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
8002b68: 45 ae 00 09 be r13,r14,8002b8c <timer_settime+0x1e8>
*ovalue = ptimer->timer_data;
8002b6c: 29 61 00 54 lw r1,(r11+84)
8002b70: 59 a1 00 00 sw (r13+0),r1
8002b74: 29 62 00 58 lw r2,(r11+88)
8002b78: 59 a2 00 04 sw (r13+4),r2
8002b7c: 29 63 00 5c lw r3,(r11+92)
8002b80: 59 a3 00 08 sw (r13+8),r3
8002b84: 29 61 00 60 lw r1,(r11+96)
8002b88: 59 a1 00 0c sw (r13+12),r1
/* The new data are set */
ptimer->timer_data = normalize;
8002b8c: 2b 82 00 20 lw r2,(sp+32)
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
8002b90: 34 01 00 04 mvi r1,4
(void) _Watchdog_Remove( &ptimer->Timer );
/* The old data of the timer are returned */
if ( ovalue )
*ovalue = ptimer->timer_data;
/* The new data are set */
ptimer->timer_data = normalize;
8002b94: 59 62 00 54 sw (r11+84),r2
8002b98: 2b 83 00 24 lw r3,(sp+36)
8002b9c: 59 63 00 58 sw (r11+88),r3
8002ba0: 2b 82 00 28 lw r2,(sp+40)
8002ba4: 59 62 00 5c sw (r11+92),r2
8002ba8: 2b 83 00 2c lw r3,(sp+44)
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
8002bac: 31 61 00 3c sb (r11+60),r1
(void) _Watchdog_Remove( &ptimer->Timer );
/* The old data of the timer are returned */
if ( ovalue )
*ovalue = ptimer->timer_data;
/* The new data are set */
ptimer->timer_data = normalize;
8002bb0: 59 63 00 60 sw (r11+96),r3
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
/* Returns with success */
_Thread_Enable_dispatch();
8002bb4: f8 00 07 f1 calli 8004b78 <_Thread_Enable_dispatch>
8002bb8: 34 01 00 00 mvi r1,0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
8002bbc: 2b 9d 00 04 lw ra,(sp+4)
8002bc0: 2b 8b 00 18 lw r11,(sp+24)
8002bc4: 2b 8c 00 14 lw r12,(sp+20)
8002bc8: 2b 8d 00 10 lw r13,(sp+16)
8002bcc: 2b 8e 00 0c lw r14,(sp+12)
8002bd0: 2b 8f 00 08 lw r15,(sp+8)
8002bd4: 37 9c 00 38 addi sp,sp,56
8002bd8: c3 a0 00 00 ret
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
_Thread_Enable_dispatch();
8002bdc: 5b 81 00 1c sw (sp+28),r1
8002be0: f8 00 07 e6 calli 8004b78 <_Thread_Enable_dispatch>
8002be4: 2b 81 00 1c lw r1,(sp+28)
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
8002be8: 2b 9d 00 04 lw ra,(sp+4)
8002bec: 2b 8b 00 18 lw r11,(sp+24)
8002bf0: 2b 8c 00 14 lw r12,(sp+20)
8002bf4: 2b 8d 00 10 lw r13,(sp+16)
8002bf8: 2b 8e 00 0c lw r14,(sp+12)
8002bfc: 2b 8f 00 08 lw r15,(sp+8)
8002c00: 37 9c 00 38 addi sp,sp,56
8002c04: c3 a0 00 00 ret
08002744 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
8002744: 37 9c ff e8 addi sp,sp,-24
8002748: 5b 8b 00 10 sw (sp+16),r11
800274c: 5b 8c 00 0c sw (sp+12),r12
8002750: 5b 8d 00 08 sw (sp+8),r13
8002754: 5b 9d 00 04 sw (sp+4),ra
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
8002758: 78 0b 08 02 mvhi r11,0x802
800275c: 39 6b 11 48 ori r11,r11,0x1148
8002760: 29 62 00 1c lw r2,(r11+28)
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
8002764: b8 20 60 00 mv r12,r1
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
8002768: 44 40 00 25 be r2,r0,80027fc <ualarm+0xb8>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
800276c: b9 60 08 00 mv r1,r11
8002770: f8 00 0a 96 calli 80051c8 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
8002774: 34 21 ff fe addi r1,r1,-2
8002778: 34 02 00 01 mvi r2,1
800277c: 50 41 00 28 bgeu r2,r1,800281c <ualarm+0xd8> <== ALWAYS TAKEN
8002780: 34 0d 00 00 mvi r13,0 <== NOT EXECUTED
/*
* If useconds is non-zero, then the caller wants to schedule
* the alarm repeatedly at that interval. If the interval is
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
8002784: 45 80 00 17 be r12,r0,80027e0 <ualarm+0x9c>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
8002788: 78 02 00 0f mvhi r2,0xf
800278c: 38 42 42 40 ori r2,r2,0x4240
8002790: b9 80 08 00 mv r1,r12
8002794: f8 00 69 a2 calli 801ce1c <__udivsi3>
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
8002798: 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;
800279c: 5b 81 00 14 sw (sp+20),r1
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
80027a0: 38 42 42 40 ori r2,r2,0x4240
80027a4: b9 80 08 00 mv r1,r12
80027a8: f8 00 69 ad calli 801ce5c <__umodsi3>
80027ac: 34 02 03 e8 mvi r2,1000
80027b0: f8 00 69 1c calli 801cc20 <__mulsi3>
ticks = _Timespec_To_ticks( &tp );
80027b4: 37 8c 00 14 addi r12,sp,20
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
80027b8: 5b 81 00 18 sw (sp+24),r1
ticks = _Timespec_To_ticks( &tp );
80027bc: b9 80 08 00 mv r1,r12
80027c0: f8 00 08 d6 calli 8004b18 <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
80027c4: b9 80 08 00 mv r1,r12
80027c8: f8 00 08 d4 calli 8004b18 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
80027cc: 59 61 00 0c sw (r11+12),r1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
80027d0: 78 01 08 02 mvhi r1,0x802
80027d4: 38 21 09 a0 ori r1,r1,0x9a0
80027d8: b9 60 10 00 mv r2,r11
80027dc: f8 00 0a 14 calli 800502c <_Watchdog_Insert>
}
return remaining;
}
80027e0: b9 a0 08 00 mv r1,r13
80027e4: 2b 9d 00 04 lw ra,(sp+4)
80027e8: 2b 8b 00 10 lw r11,(sp+16)
80027ec: 2b 8c 00 0c lw r12,(sp+12)
80027f0: 2b 8d 00 08 lw r13,(sp+8)
80027f4: 37 9c 00 18 addi sp,sp,24
80027f8: c3 a0 00 00 ret
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
80027fc: 78 01 08 00 mvhi r1,0x800
8002800: 38 21 28 60 ori r1,r1,0x2860
8002804: 59 61 00 1c sw (r11+28),r1
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
8002808: 59 62 00 08 sw (r11+8),r2
the_watchdog->routine = routine;
the_watchdog->id = id;
800280c: 59 62 00 20 sw (r11+32),r2
the_watchdog->user_data = user_data;
8002810: 59 62 00 24 sw (r11+36),r2
8002814: b8 40 68 00 mv r13,r2
8002818: e3 ff ff db bi 8002784 <ualarm+0x40>
* 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);
800281c: 29 64 00 14 lw r4,(r11+20)
8002820: 29 61 00 0c lw r1,(r11+12)
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
8002824: 29 63 00 18 lw r3,(r11+24)
8002828: 37 82 00 14 addi r2,sp,20
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
800282c: b4 81 08 00 add r1,r4,r1
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
8002830: c8 23 08 00 sub r1,r1,r3
8002834: f8 00 08 8a calli 8004a5c <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
8002838: 2b 81 00 14 lw r1,(sp+20)
800283c: 78 02 00 0f mvhi r2,0xf
8002840: 38 42 42 40 ori r2,r2,0x4240
8002844: f8 00 68 f7 calli 801cc20 <__mulsi3>
8002848: b8 20 68 00 mv r13,r1
remaining += tp.tv_nsec / 1000;
800284c: 2b 81 00 18 lw r1,(sp+24)
8002850: 34 02 03 e8 mvi r2,1000
8002854: f8 00 69 13 calli 801cca0 <__divsi3>
8002858: b4 2d 68 00 add r13,r1,r13
800285c: e3 ff ff ca bi 8002784 <ualarm+0x40>
0800c8b8 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
800c8b8: 37 9c ff c4 addi sp,sp,-60
800c8bc: 5b 8b 00 14 sw (sp+20),r11
800c8c0: 5b 8c 00 10 sw (sp+16),r12
800c8c4: 5b 8d 00 0c sw (sp+12),r13
800c8c8: 5b 8e 00 08 sw (sp+8),r14
800c8cc: 5b 9d 00 04 sw (sp+4),ra
800c8d0: b8 20 60 00 mv r12,r1
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
800c8d4: fb ff d1 2f calli 8000d90 <rtems_filesystem_dirname>
800c8d8: b8 20 58 00 mv r11,r1
if ( parentpathlen == 0 )
800c8dc: 5c 20 00 6e bne r1,r0,800ca94 <unlink+0x1dc>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
800c8e0: 41 82 00 00 lbu r2,(r12+0)
800c8e4: 64 43 00 5c cmpei r3,r2,92
800c8e8: 64 41 00 2f cmpei r1,r2,47
800c8ec: b8 61 08 00 or r1,r3,r1
800c8f0: 44 2b 00 4e be r1,r11,800ca28 <unlink+0x170>
800c8f4: 78 01 08 01 mvhi r1,0x801
800c8f8: 38 21 e1 10 ori r1,r1,0xe110
800c8fc: 28 22 00 00 lw r2,(r1+0)
800c900: 34 0d 00 00 mvi r13,0
800c904: 28 41 00 18 lw r1,(r2+24)
800c908: 5b 81 00 2c sw (sp+44),r1
800c90c: 28 41 00 1c lw r1,(r2+28)
800c910: 5b 81 00 30 sw (sp+48),r1
800c914: 28 41 00 20 lw r1,(r2+32)
800c918: 5b 81 00 34 sw (sp+52),r1
800c91c: 28 41 00 24 lw r1,(r2+36)
800c920: 5b 81 00 38 sw (sp+56),r1
800c924: 28 42 00 28 lw r2,(r2+40)
800c928: 5b 82 00 3c sw (sp+60),r2
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
800c92c: 2b 82 00 2c lw r2,(sp+44)
name = path + parentpathlen;
800c930: b5 8b 58 00 add r11,r12,r11
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
800c934: b9 60 08 00 mv r1,r11
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
800c938: 5b 82 00 18 sw (sp+24),r2
800c93c: 2b 82 00 30 lw r2,(sp+48)
800c940: 5b 82 00 1c sw (sp+28),r2
800c944: 2b 82 00 34 lw r2,(sp+52)
800c948: 5b 82 00 20 sw (sp+32),r2
800c94c: 2b 82 00 38 lw r2,(sp+56)
800c950: 5b 82 00 24 sw (sp+36),r2
800c954: 2b 82 00 3c lw r2,(sp+60)
800c958: 5b 82 00 28 sw (sp+40),r2
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
800c95c: f8 00 07 5a calli 800e6c4 <strlen>
800c960: b8 20 10 00 mv r2,r1
800c964: b9 60 08 00 mv r1,r11
800c968: fb ff d0 f1 calli 8000d2c <rtems_filesystem_prefix_separators>
800c96c: b5 61 60 00 add r12,r11,r1
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
800c970: b9 80 08 00 mv r1,r12
800c974: f8 00 07 54 calli 800e6c4 <strlen>
800c978: 34 03 00 00 mvi r3,0
800c97c: 37 8b 00 18 addi r11,sp,24
800c980: b8 20 10 00 mv r2,r1
800c984: b9 60 20 00 mv r4,r11
800c988: b9 80 08 00 mv r1,r12
800c98c: b8 60 28 00 mv r5,r3
800c990: fb ff d1 1d calli 8000e04 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
800c994: 5c 20 00 35 bne r1,r0,800ca68 <unlink+0x1b0> <== NEVER TAKEN
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( !loc.ops->node_type_h ) {
800c998: 2b 83 00 24 lw r3,(sp+36)
800c99c: 28 62 00 10 lw r2,(r3+16)
800c9a0: 44 41 00 58 be r2,r1,800cb00 <unlink+0x248> <== NEVER TAKEN
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 ) {
800c9a4: b9 60 08 00 mv r1,r11
800c9a8: d8 40 00 00 call r2
800c9ac: 34 02 00 01 mvi r2,1
800c9b0: 44 22 00 42 be r1,r2,800cab8 <unlink+0x200> <== NEVER TAKEN
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
800c9b4: 2b 81 00 24 lw r1,(sp+36)
800c9b8: 28 23 00 0c lw r3,(r1+12)
800c9bc: 44 60 00 61 be r3,r0,800cb40 <unlink+0x288> <== NEVER TAKEN
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
800c9c0: 37 8e 00 2c addi r14,sp,44
800c9c4: b9 60 10 00 mv r2,r11
800c9c8: b9 c0 08 00 mv r1,r14
800c9cc: d8 60 00 00 call r3
rtems_filesystem_freenode( &loc );
800c9d0: 2b 82 00 24 lw r2,(sp+36)
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
800c9d4: b8 20 60 00 mv r12,r1
rtems_filesystem_freenode( &loc );
800c9d8: 44 40 00 05 be r2,r0,800c9ec <unlink+0x134> <== NEVER TAKEN
800c9dc: 28 42 00 1c lw r2,(r2+28)
800c9e0: 44 40 00 03 be r2,r0,800c9ec <unlink+0x134> <== NEVER TAKEN
800c9e4: b9 60 08 00 mv r1,r11
800c9e8: d8 40 00 00 call r2
if ( free_parentloc )
800c9ec: 45 a0 00 07 be r13,r0,800ca08 <unlink+0x150>
rtems_filesystem_freenode( &parentloc );
800c9f0: 2b 81 00 38 lw r1,(sp+56)
800c9f4: 44 20 00 05 be r1,r0,800ca08 <unlink+0x150> <== NEVER TAKEN
800c9f8: 28 22 00 1c lw r2,(r1+28)
800c9fc: 44 40 00 03 be r2,r0,800ca08 <unlink+0x150> <== NEVER TAKEN
800ca00: b9 c0 08 00 mv r1,r14
800ca04: d8 40 00 00 call r2
return result;
}
800ca08: b9 80 08 00 mv r1,r12
800ca0c: 2b 9d 00 04 lw ra,(sp+4)
800ca10: 2b 8b 00 14 lw r11,(sp+20)
800ca14: 2b 8c 00 10 lw r12,(sp+16)
800ca18: 2b 8d 00 0c lw r13,(sp+12)
800ca1c: 2b 8e 00 08 lw r14,(sp+8)
800ca20: 37 9c 00 3c addi sp,sp,60
800ca24: c3 a0 00 00 ret
*/
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
800ca28: 44 40 ff b3 be r2,r0,800c8f4 <unlink+0x3c> <== NEVER TAKEN
800ca2c: 78 01 08 01 mvhi r1,0x801
800ca30: 38 21 e1 10 ori r1,r1,0xe110
800ca34: 28 21 00 00 lw r1,(r1+0)
800ca38: b9 60 68 00 mv r13,r11
800ca3c: 28 22 00 04 lw r2,(r1+4)
800ca40: 5b 82 00 2c sw (sp+44),r2
800ca44: 28 22 00 08 lw r2,(r1+8)
800ca48: 5b 82 00 30 sw (sp+48),r2
800ca4c: 28 22 00 0c lw r2,(r1+12)
800ca50: 5b 82 00 34 sw (sp+52),r2
800ca54: 28 22 00 10 lw r2,(r1+16)
800ca58: 5b 82 00 38 sw (sp+56),r2
800ca5c: 28 21 00 14 lw r1,(r1+20)
800ca60: 5b 81 00 3c sw (sp+60),r1
800ca64: e3 ff ff b2 bi 800c92c <unlink+0x74>
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
800ca68: 5d a0 00 03 bne r13,r0,800ca74 <unlink+0x1bc> <== ALWAYS TAKEN
result = (*loc.ops->unlink_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
800ca6c: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
800ca70: e3 ff ff e6 bi 800ca08 <unlink+0x150> <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
800ca74: 2b 81 00 38 lw r1,(sp+56)
800ca78: 44 20 ff fd be r1,r0,800ca6c <unlink+0x1b4> <== NEVER TAKEN
800ca7c: 28 22 00 1c lw r2,(r1+28)
800ca80: 44 40 ff fb be r2,r0,800ca6c <unlink+0x1b4> <== NEVER TAKEN
800ca84: 37 81 00 2c addi r1,sp,44
800ca88: d8 40 00 00 call r2
800ca8c: 34 0c ff ff mvi r12,-1
800ca90: e3 ff ff de bi 800ca08 <unlink+0x150>
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
800ca94: b9 80 08 00 mv r1,r12
800ca98: b9 60 10 00 mv r2,r11
800ca9c: 34 03 00 02 mvi r3,2
800caa0: 37 84 00 2c addi r4,sp,44
800caa4: 34 05 00 00 mvi r5,0
800caa8: fb ff d1 1a calli 8000f10 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
800caac: 5c 20 ff f0 bne r1,r0,800ca6c <unlink+0x1b4> <== NEVER TAKEN
800cab0: 34 0d 00 01 mvi r13,1
800cab4: e3 ff ff 9e bi 800c92c <unlink+0x74>
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
800cab8: 2b 81 00 24 lw r1,(sp+36)
800cabc: 44 20 00 05 be r1,r0,800cad0 <unlink+0x218> <== NEVER TAKEN
800cac0: 28 22 00 1c lw r2,(r1+28)
800cac4: 44 40 00 03 be r2,r0,800cad0 <unlink+0x218> <== NEVER TAKEN
800cac8: b9 60 08 00 mv r1,r11
800cacc: d8 40 00 00 call r2
if ( free_parentloc )
800cad0: 45 a0 00 07 be r13,r0,800caec <unlink+0x234> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
800cad4: 2b 81 00 38 lw r1,(sp+56) <== NOT EXECUTED
800cad8: 44 20 00 05 be r1,r0,800caec <unlink+0x234> <== NOT EXECUTED
800cadc: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
800cae0: 44 40 00 03 be r2,r0,800caec <unlink+0x234> <== NOT EXECUTED
800cae4: 37 81 00 2c addi r1,sp,44 <== NOT EXECUTED
800cae8: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
800caec: f8 00 02 26 calli 800d384 <__errno>
800caf0: 34 02 00 15 mvi r2,21
800caf4: 58 22 00 00 sw (r1+0),r2
800caf8: 34 0c ff ff mvi r12,-1
800cafc: e3 ff ff c3 bi 800ca08 <unlink+0x150>
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
800cb00: 28 63 00 1c lw r3,(r3+28) <== NOT EXECUTED
800cb04: 44 62 00 03 be r3,r2,800cb10 <unlink+0x258> <== NOT EXECUTED
800cb08: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800cb0c: d8 60 00 00 call r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
800cb10: 45 a0 00 07 be r13,r0,800cb2c <unlink+0x274> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
800cb14: 2b 81 00 38 lw r1,(sp+56) <== NOT EXECUTED
800cb18: 44 20 00 05 be r1,r0,800cb2c <unlink+0x274> <== NOT EXECUTED
800cb1c: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
800cb20: 44 40 00 03 be r2,r0,800cb2c <unlink+0x274> <== NOT EXECUTED
800cb24: 37 81 00 2c addi r1,sp,44 <== NOT EXECUTED
800cb28: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
800cb2c: f8 00 02 16 calli 800d384 <__errno> <== NOT EXECUTED
800cb30: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
800cb34: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800cb38: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
800cb3c: e3 ff ff b3 bi 800ca08 <unlink+0x150> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
rtems_filesystem_freenode( &loc );
800cb40: 28 22 00 1c lw r2,(r1+28) <== NOT EXECUTED
800cb44: 44 43 ff f3 be r2,r3,800cb10 <unlink+0x258> <== NOT EXECUTED
800cb48: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800cb4c: d8 40 00 00 call r2 <== NOT EXECUTED
800cb50: e3 ff ff f0 bi 800cb10 <unlink+0x258> <== NOT EXECUTED
08007168 <unmount>:
*/
int unmount(
const char *path
)
{
8007168: 37 9c ff dc addi sp,sp,-36
800716c: 5b 8b 00 10 sw (sp+16),r11
8007170: 5b 8c 00 0c sw (sp+12),r12
8007174: 5b 8d 00 08 sw (sp+8),r13
8007178: 5b 9d 00 04 sw (sp+4),ra
800717c: 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 ) )
8007180: 37 8c 00 14 addi r12,sp,20
8007184: f8 00 3f ed calli 8017138 <strlen>
8007188: b8 20 10 00 mv r2,r1
800718c: 34 03 00 00 mvi r3,0
8007190: b9 60 08 00 mv r1,r11
8007194: b9 80 20 00 mv r4,r12
8007198: 34 05 00 01 mvi r5,1
800719c: fb ff f7 16 calli 8004df4 <rtems_filesystem_evaluate_path>
80071a0: 5c 20 00 2d bne r1,r0,8007254 <unmount+0xec>
return -1;
mt_entry = loc.mt_entry;
80071a4: 2b 8b 00 24 lw r11,(sp+36)
fs_mount_loc = &mt_entry->mt_point_node;
fs_root_loc = &mt_entry->mt_fs_root;
80071a8: 2b 81 00 14 lw r1,(sp+20)
80071ac: 29 62 00 1c lw r2,(r11+28)
80071b0: 5c 41 00 51 bne r2,r1,80072f4 <unmount+0x18c>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
80071b4: 2b 81 00 20 lw r1,(sp+32)
80071b8: 44 20 00 05 be r1,r0,80071cc <unmount+0x64> <== NEVER TAKEN
80071bc: 28 22 00 1c lw r2,(r1+28)
80071c0: 44 40 00 03 be r2,r0,80071cc <unmount+0x64> <== NEVER TAKEN
80071c4: b9 80 08 00 mv r1,r12
80071c8: 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;
80071cc: 29 61 00 14 lw r1,(r11+20)
80071d0: 28 21 00 28 lw r1,(r1+40)
80071d4: 44 20 00 5f be r1,r0,8007350 <unmount+0x1e8> <== NEVER TAKEN
fs_root_loc = &mt_entry->mt_fs_root;
80071d8: 29 61 00 28 lw r1,(r11+40)
80071dc: 28 21 00 2c lw r1,(r1+44)
80071e0: 44 20 00 5c be r1,r0,8007350 <unmount+0x1e8> <== NEVER TAKEN
* 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 )
80071e4: 78 01 08 02 mvhi r1,0x802
80071e8: 38 21 a1 30 ori r1,r1,0xa130
80071ec: 28 21 00 00 lw r1,(r1+0)
80071f0: 28 21 00 14 lw r1,(r1+20)
80071f4: 44 2b 00 1f be r1,r11,8007270 <unmount+0x108>
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
80071f8: 78 01 08 02 mvhi r1,0x802
80071fc: 38 21 b0 70 ori r1,r1,0xb070
8007200: 28 22 00 00 lw r2,(r1+0)
8007204: 34 21 00 04 addi r1,r1,4
8007208: 44 41 00 09 be r2,r1,800722c <unmount+0xc4> <== NEVER TAKEN
!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 ) {
800720c: 29 63 00 2c lw r3,(r11+44)
8007210: 28 44 00 18 lw r4,(r2+24)
8007214: 5c 83 00 04 bne r4,r3,8007224 <unmount+0xbc> <== ALWAYS TAKEN
8007218: e0 00 00 16 bi 8007270 <unmount+0x108> <== NOT EXECUTED
800721c: 28 44 00 18 lw r4,(r2+24)
8007220: 44 64 00 14 be r3,r4,8007270 <unmount+0x108>
* 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 ) {
8007224: 28 42 00 00 lw r2,(r2+0)
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
8007228: 5c 41 ff fd bne r2,r1,800721c <unmount+0xb4>
* 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 )
800722c: b9 60 08 00 mv r1,r11
8007230: fb ff f8 0a calli 8005258 <rtems_libio_is_open_files_in_fs>
8007234: 34 02 00 01 mvi r2,1
8007238: 44 22 00 0e be r1,r2,8007270 <unmount+0x108>
* 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 )
800723c: 29 62 00 14 lw r2,(r11+20)
8007240: b9 60 08 00 mv r1,r11
8007244: 28 42 00 28 lw r2,(r2+40)
8007248: d8 40 00 00 call r2
800724c: b8 20 60 00 mv r12,r1
8007250: 44 20 00 12 be r1,r0,8007298 <unmount+0x130> <== ALWAYS TAKEN
*/
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
8007254: 34 01 ff ff mvi r1,-1
}
8007258: 2b 9d 00 04 lw ra,(sp+4)
800725c: 2b 8b 00 10 lw r11,(sp+16)
8007260: 2b 8c 00 0c lw r12,(sp+12)
8007264: 2b 8d 00 08 lw r13,(sp+8)
8007268: 37 9c 00 24 addi sp,sp,36
800726c: c3 a0 00 00 ret
* descriptors that are currently active and reference nodes in the
* file system that we are trying to unmount
*/
if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
rtems_set_errno_and_return_minus_one( EBUSY );
8007270: f8 00 31 49 calli 8013794 <__errno>
8007274: 34 02 00 10 mvi r2,16
8007278: 58 22 00 00 sw (r1+0),r2
800727c: 34 01 ff ff mvi r1,-1
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
8007280: 2b 9d 00 04 lw ra,(sp+4)
8007284: 2b 8b 00 10 lw r11,(sp+16)
8007288: 2b 8c 00 0c lw r12,(sp+12)
800728c: 2b 8d 00 08 lw r13,(sp+8)
8007290: 37 9c 00 24 addi sp,sp,36
8007294: c3 a0 00 00 ret
* NOTE: Fatal error is called in a case which should never happen
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
8007298: 29 62 00 28 lw r2,(r11+40)
800729c: b9 60 08 00 mv r1,r11
80072a0: 28 42 00 2c lw r2,(r2+44)
80072a4: d8 40 00 00 call r2
80072a8: b8 20 68 00 mv r13,r1
80072ac: 5c 2c 00 22 bne r1,r12,8007334 <unmount+0x1cc> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
80072b0: b9 60 08 00 mv r1,r11
80072b4: f8 00 05 8d calli 80088e8 <_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 );
80072b8: 29 61 00 14 lw r1,(r11+20)
80072bc: 44 2d 00 05 be r1,r13,80072d0 <unmount+0x168> <== NEVER TAKEN
80072c0: 28 22 00 1c lw r2,(r1+28)
80072c4: 44 4d 00 03 be r2,r13,80072d0 <unmount+0x168> <== NEVER TAKEN
80072c8: 35 61 00 08 addi r1,r11,8
80072cc: d8 40 00 00 call r2
free( mt_entry );
80072d0: b9 60 08 00 mv r1,r11
80072d4: fb ff f7 00 calli 8004ed4 <free>
80072d8: 34 01 00 00 mvi r1,0
return 0;
}
80072dc: 2b 9d 00 04 lw ra,(sp+4)
80072e0: 2b 8b 00 10 lw r11,(sp+16)
80072e4: 2b 8c 00 0c lw r12,(sp+12)
80072e8: 2b 8d 00 08 lw r13,(sp+8)
80072ec: 37 9c 00 24 addi sp,sp,36
80072f0: c3 a0 00 00 ret
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){
rtems_filesystem_freenode( &loc );
80072f4: 2b 81 00 20 lw r1,(sp+32)
80072f8: 44 20 00 05 be r1,r0,800730c <unmount+0x1a4> <== NEVER TAKEN
80072fc: 28 22 00 1c lw r2,(r1+28)
8007300: 44 40 00 03 be r2,r0,800730c <unmount+0x1a4> <== NEVER TAKEN
8007304: b9 80 08 00 mv r1,r12
8007308: d8 40 00 00 call r2
rtems_set_errno_and_return_minus_one( EACCES );
800730c: f8 00 31 22 calli 8013794 <__errno>
8007310: 34 02 00 0d mvi r2,13
8007314: 58 22 00 00 sw (r1+0),r2
8007318: 34 01 ff ff mvi r1,-1
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
800731c: 2b 9d 00 04 lw ra,(sp+4)
8007320: 2b 8b 00 10 lw r11,(sp+16)
8007324: 2b 8c 00 0c lw r12,(sp+12)
8007328: 2b 8d 00 08 lw r13,(sp+8)
800732c: 37 9c 00 24 addi sp,sp,36
8007330: c3 a0 00 00 ret
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
8007334: 29 62 00 14 lw r2,(r11+20) <== NOT EXECUTED
8007338: b9 60 08 00 mv r1,r11 <== NOT EXECUTED
800733c: 28 42 00 20 lw r2,(r2+32) <== NOT EXECUTED
8007340: d8 40 00 00 call r2 <== NOT EXECUTED
8007344: 44 20 ff c4 be r1,r0,8007254 <unmount+0xec> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
8007348: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
800734c: f8 00 04 5d calli 80084c0 <rtems_fatal_error_occurred> <== NOT EXECUTED
if ( !fs_mount_loc->ops->unmount_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( !fs_root_loc->ops->fsunmount_me_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
8007350: f8 00 31 11 calli 8013794 <__errno> <== NOT EXECUTED
8007354: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8007358: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
800735c: 34 01 ff ff mvi r1,-1 <== NOT EXECUTED
8007360: e3 ff ff be bi 8007258 <unmount+0xf0> <== NOT EXECUTED
08004164 <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
8004164: 37 9c ff dc addi sp,sp,-36
8004168: 5b 8b 00 10 sw (sp+16),r11
800416c: 5b 8c 00 0c sw (sp+12),r12
8004170: 5b 8d 00 08 sw (sp+8),r13
8004174: 5b 9d 00 04 sw (sp+4),ra
8004178: b8 20 58 00 mv r11,r1
800417c: 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 ) )
8004180: 37 8c 00 14 addi r12,sp,20
8004184: f8 00 38 c6 calli 801249c <strlen>
8004188: b8 20 10 00 mv r2,r1
800418c: 34 03 00 00 mvi r3,0
8004190: b9 60 08 00 mv r1,r11
8004194: b9 80 20 00 mv r4,r12
8004198: 34 05 00 01 mvi r5,1
800419c: fb ff f8 06 calli 80021b4 <rtems_filesystem_evaluate_path>
80041a0: 34 0b ff ff mvi r11,-1
80041a4: 5c 20 00 0f bne r1,r0,80041e0 <utime+0x7c>
return -1;
if ( !temp_loc.ops->utime_h ){
80041a8: 2b 82 00 20 lw r2,(sp+32)
80041ac: 28 44 00 30 lw r4,(r2+48)
80041b0: 44 81 00 13 be r4,r1,80041fc <utime+0x98> <== NEVER TAKEN
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
80041b4: 29 a3 00 04 lw r3,(r13+4)
80041b8: 29 a2 00 00 lw r2,(r13+0)
80041bc: b9 80 08 00 mv r1,r12
80041c0: d8 80 00 00 call r4
80041c4: b8 20 58 00 mv r11,r1
rtems_filesystem_freenode( &temp_loc );
80041c8: 2b 81 00 20 lw r1,(sp+32)
80041cc: 44 20 00 05 be r1,r0,80041e0 <utime+0x7c> <== NEVER TAKEN
80041d0: 28 22 00 1c lw r2,(r1+28)
80041d4: 44 40 00 03 be r2,r0,80041e0 <utime+0x7c> <== NEVER TAKEN
80041d8: b9 80 08 00 mv r1,r12
80041dc: d8 40 00 00 call r2
return result;
}
80041e0: b9 60 08 00 mv r1,r11
80041e4: 2b 9d 00 04 lw ra,(sp+4)
80041e8: 2b 8b 00 10 lw r11,(sp+16)
80041ec: 2b 8c 00 0c lw r12,(sp+12)
80041f0: 2b 8d 00 08 lw r13,(sp+8)
80041f4: 37 9c 00 24 addi sp,sp,36
80041f8: c3 a0 00 00 ret
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
if ( !temp_loc.ops->utime_h ){
rtems_filesystem_freenode( &temp_loc );
80041fc: 28 42 00 1c lw r2,(r2+28) <== NOT EXECUTED
8004200: 44 44 00 03 be r2,r4,800420c <utime+0xa8> <== NOT EXECUTED
8004204: b9 80 08 00 mv r1,r12 <== NOT EXECUTED
8004208: d8 40 00 00 call r2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
800420c: f8 00 30 53 calli 8010358 <__errno> <== NOT EXECUTED
8004210: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8004214: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8004218: 34 0b ff ff mvi r11,-1 <== NOT EXECUTED
800421c: e3 ff ff f1 bi 80041e0 <utime+0x7c> <== NOT EXECUTED
08001d40 <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
8001d40: 37 9c ff a4 addi sp,sp,-92
8001d44: 5b 8b 00 44 sw (sp+68),r11
8001d48: 5b 8c 00 40 sw (sp+64),r12
8001d4c: 5b 8d 00 3c sw (sp+60),r13
8001d50: 5b 8e 00 38 sw (sp+56),r14
8001d54: 5b 8f 00 34 sw (sp+52),r15
8001d58: 5b 90 00 30 sw (sp+48),r16
8001d5c: 5b 91 00 2c sw (sp+44),r17
8001d60: 5b 92 00 28 sw (sp+40),r18
8001d64: 5b 93 00 24 sw (sp+36),r19
8001d68: 5b 94 00 20 sw (sp+32),r20
8001d6c: 5b 95 00 1c sw (sp+28),r21
8001d70: 5b 96 00 18 sw (sp+24),r22
8001d74: 5b 97 00 14 sw (sp+20),r23
8001d78: 5b 98 00 10 sw (sp+16),r24
8001d7c: 5b 99 00 0c sw (sp+12),r25
8001d80: 5b 9b 00 08 sw (sp+8),fp
8001d84: 5b 9d 00 04 sw (sp+4),ra
8001d88: b8 20 60 00 mv r12,r1
for (; *fmt != '\0'; fmt++) {
8001d8c: 40 21 00 00 lbu r1,(r1+0)
*/
void vprintk(
const char *fmt,
va_list ap
)
{
8001d90: b8 40 88 00 mv r17,r2
for (; *fmt != '\0'; fmt++) {
8001d94: 44 20 00 70 be r1,r0,8001f54 <vprintk+0x214> <== NEVER TAKEN
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
8001d98: 78 02 08 01 mvhi r2,0x801
8001d9c: 38 42 c7 d8 ori r2,r2,0xc7d8
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
BSP_output_char(*fmt);
8001da0: 78 0e 08 01 mvhi r14,0x801
8001da4: 78 14 08 01 mvhi r20,0x801
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
8001da8: 5b 82 00 48 sw (sp+72),r2
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
8001dac: 34 18 00 25 mvi r24,37
BSP_output_char(*fmt);
8001db0: 39 ce e1 08 ori r14,r14,0xe108
8001db4: 3a 94 c8 10 ori r20,r20,0xc810
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
8001db8: 34 15 00 09 mvi r21,9
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
8001dbc: 34 1b 00 6c mvi fp,108
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
8001dc0: 34 19 00 63 mvi r25,99
8001dc4: 37 93 00 4c addi r19,sp,76
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
8001dc8: 44 38 00 09 be r1,r24,8001dec <vprintk+0xac>
BSP_output_char(*fmt);
8001dcc: 29 c2 00 00 lw r2,(r14+0)
8001dd0: ba 20 b8 00 mv r23,r17
8001dd4: d8 40 00 00 call r2
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
8001dd8: 35 8c 00 01 addi r12,r12,1
8001ddc: 41 81 00 00 lbu r1,(r12+0)
8001de0: 44 20 00 5d be r1,r0,8001f54 <vprintk+0x214>
8001de4: ba e0 88 00 mv r17,r23
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
8001de8: 5c 38 ff f9 bne r1,r24,8001dcc <vprintk+0x8c>
BSP_output_char(*fmt);
continue;
}
fmt++;
8001dec: 35 8c 00 01 addi r12,r12,1
if (*fmt == '0' ) {
8001df0: 41 8d 00 00 lbu r13,(r12+0)
8001df4: 34 01 00 30 mvi r1,48
8001df8: 34 16 00 20 mvi r22,32
8001dfc: 45 a1 00 83 be r13,r1,8002008 <vprintk+0x2c8>
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
8001e00: 34 02 00 2d mvi r2,45
8001e04: 34 12 00 00 mvi r18,0
8001e08: 45 a2 00 7c be r13,r2,8001ff8 <vprintk+0x2b8>
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
8001e0c: 35 a1 ff d0 addi r1,r13,-48
8001e10: 20 21 00 ff andi r1,r1,0xff
8001e14: 34 0b 00 00 mvi r11,0
8001e18: 52 a1 00 62 bgeu r21,r1,8001fa0 <vprintk+0x260>
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
8001e1c: 45 bb 00 6e be r13,fp,8001fd4 <vprintk+0x294>
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
8001e20: 45 b9 00 70 be r13,r25,8001fe0 <vprintk+0x2a0>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
BSP_output_char(chr);
continue;
}
if ( c == 's' ) {
8001e24: 34 01 00 73 mvi r1,115
8001e28: 45 a1 00 7c be r13,r1,8002018 <vprintk+0x2d8>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
8001e2c: 65 a4 00 4f cmpei r4,r13,79
8001e30: 65 a3 00 6f cmpei r3,r13,111
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
8001e34: 34 01 00 00 mvi r1,0
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
8001e38: b8 83 18 00 or r3,r4,r3
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
8001e3c: 34 12 00 08 mvi r18,8
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
8001e40: 5c 61 00 0b bne r3,r1,8001e6c <vprintk+0x12c>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
8001e44: 65 a4 00 49 cmpei r4,r13,73
8001e48: 65 a3 00 69 cmpei r3,r13,105
8001e4c: b8 83 18 00 or r3,r4,r3
8001e50: 5c 61 00 05 bne r3,r1,8001e64 <vprintk+0x124>
8001e54: 65 a4 00 44 cmpei r4,r13,68
8001e58: 65 a3 00 64 cmpei r3,r13,100
8001e5c: b8 83 18 00 or r3,r4,r3
8001e60: 44 61 00 97 be r3,r1,80020bc <vprintk+0x37c>
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
8001e64: 34 01 00 01 mvi r1,1
8001e68: 34 12 00 0a mvi r18,10
}
printNum(
8001e6c: 2a 30 00 00 lw r16,(r17+0)
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
8001e70: 36 37 00 04 addi r23,r17,4
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
8001e74: 44 20 00 08 be r1,r0,8001e94 <vprintk+0x154>
8001e78: 4e 00 00 07 bge r16,r0,8001e94 <vprintk+0x154>
BSP_output_char('-');
8001e7c: 29 c2 00 00 lw r2,(r14+0)
8001e80: 34 01 00 2d mvi r1,45
unsigned_num = (unsigned long) -num;
8001e84: c8 10 80 00 sub r16,r0,r16
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
8001e88: d8 40 00 00 call r2
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
8001e8c: 7d 61 00 00 cmpnei r1,r11,0
8001e90: c9 61 58 00 sub r11,r11,r1
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
8001e94: ba 00 08 00 mv r1,r16
8001e98: ba 40 10 00 mv r2,r18
8001e9c: f8 00 65 a5 calli 801b530 <__udivsi3>
8001ea0: b8 20 68 00 mv r13,r1
8001ea4: 34 11 00 01 mvi r17,1
8001ea8: b8 20 78 00 mv r15,r1
8001eac: 44 20 00 13 be r1,r0,8001ef8 <vprintk+0x1b8>
8001eb0: 22 51 00 ff andi r17,r18,0xff
8001eb4: 34 0f 00 00 mvi r15,0
8001eb8: e0 00 00 03 bi 8001ec4 <vprintk+0x184>
8001ebc: b9 a0 80 00 mv r16,r13
8001ec0: b8 20 68 00 mv r13,r1
toPrint[count++] = (char) (unsigned_num - (n * base));
8001ec4: b9 a0 10 00 mv r2,r13
8001ec8: ba 20 08 00 mv r1,r17
8001ecc: f8 00 65 1a calli 801b334 <__mulsi3>
8001ed0: b6 6f 18 00 add r3,r19,r15
8001ed4: ca 01 80 00 sub r16,r16,r1
8001ed8: 30 70 00 00 sb (r3+0),r16
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
8001edc: b9 a0 08 00 mv r1,r13
8001ee0: ba 40 10 00 mv r2,r18
8001ee4: f8 00 65 93 calli 801b530 <__udivsi3>
toPrint[count++] = (char) (unsigned_num - (n * base));
8001ee8: 35 ef 00 01 addi r15,r15,1
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
8001eec: 5c 20 ff f4 bne r1,r0,8001ebc <vprintk+0x17c>
8001ef0: b9 a0 80 00 mv r16,r13
8001ef4: 35 f1 00 01 addi r17,r15,1
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
8001ef8: b6 6f 78 00 add r15,r19,r15
8001efc: 31 f0 00 00 sb (r15+0),r16
for (n=maxwidth ; n > count; n-- )
8001f00: 52 2b 00 06 bgeu r17,r11,8001f18 <vprintk+0x1d8>
BSP_output_char(lead);
8001f04: 29 c2 00 00 lw r2,(r14+0)
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
8001f08: 35 6b ff ff addi r11,r11,-1
BSP_output_char(lead);
8001f0c: ba c0 08 00 mv r1,r22
8001f10: d8 40 00 00 call r2
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
8001f14: 55 71 ff fc bgu r11,r17,8001f04 <vprintk+0x1c4>
BSP_output_char(lead);
for (n = 0; n < count; n++) {
8001f18: 46 20 ff b0 be r17,r0,8001dd8 <vprintk+0x98> <== NEVER TAKEN
8001f1c: 36 2d ff ff addi r13,r17,-1
8001f20: b6 6d 68 00 add r13,r19,r13
8001f24: 34 0b 00 00 mvi r11,0
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
8001f28: 41 a1 00 00 lbu r1,(r13+0)
8001f2c: 29 c3 00 00 lw r3,(r14+0)
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
8001f30: 35 6b 00 01 addi r11,r11,1
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
8001f34: b6 81 08 00 add r1,r20,r1
8001f38: 40 21 00 00 lbu r1,(r1+0)
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
8001f3c: 35 ad ff ff addi r13,r13,-1
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
8001f40: d8 60 00 00 call r3
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
8001f44: 56 2b ff f9 bgu r17,r11,8001f28 <vprintk+0x1e8>
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
8001f48: 35 8c 00 01 addi r12,r12,1
8001f4c: 41 81 00 00 lbu r1,(r12+0)
8001f50: 5c 20 ff a5 bne r1,r0,8001de4 <vprintk+0xa4> <== ALWAYS TAKEN
sign,
width,
lead
);
}
}
8001f54: 2b 9d 00 04 lw ra,(sp+4)
8001f58: 2b 8b 00 44 lw r11,(sp+68)
8001f5c: 2b 8c 00 40 lw r12,(sp+64)
8001f60: 2b 8d 00 3c lw r13,(sp+60)
8001f64: 2b 8e 00 38 lw r14,(sp+56)
8001f68: 2b 8f 00 34 lw r15,(sp+52)
8001f6c: 2b 90 00 30 lw r16,(sp+48)
8001f70: 2b 91 00 2c lw r17,(sp+44)
8001f74: 2b 92 00 28 lw r18,(sp+40)
8001f78: 2b 93 00 24 lw r19,(sp+36)
8001f7c: 2b 94 00 20 lw r20,(sp+32)
8001f80: 2b 95 00 1c lw r21,(sp+28)
8001f84: 2b 96 00 18 lw r22,(sp+24)
8001f88: 2b 97 00 14 lw r23,(sp+20)
8001f8c: 2b 98 00 10 lw r24,(sp+16)
8001f90: 2b 99 00 0c lw r25,(sp+12)
8001f94: 2b 9b 00 08 lw fp,(sp+8)
8001f98: 37 9c 00 5c addi sp,sp,92
8001f9c: c3 a0 00 00 ret
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
width += ((unsigned) *fmt - '0');
8001fa0: b5 6b 58 00 add r11,r11,r11
8001fa4: b9 60 08 00 mv r1,r11
8001fa8: 34 02 00 02 mvi r2,2
8001fac: fb ff f8 91 calli 80001f0 <__ashlsi3>
8001fb0: b5 61 58 00 add r11,r11,r1
fmt++;
8001fb4: 35 8c 00 01 addi r12,r12,1
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
width += ((unsigned) *fmt - '0');
8001fb8: b5 6d 58 00 add r11,r11,r13
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
8001fbc: 41 8d 00 00 lbu r13,(r12+0)
width *= 10;
width += ((unsigned) *fmt - '0');
8001fc0: 35 6b ff d0 addi r11,r11,-48
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
8001fc4: 35 a3 ff d0 addi r3,r13,-48
8001fc8: 20 63 00 ff andi r3,r3,0xff
8001fcc: 52 a3 ff f5 bgeu r21,r3,8001fa0 <vprintk+0x260>
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
8001fd0: 5d bb ff 94 bne r13,fp,8001e20 <vprintk+0xe0>
lflag = true;
c = *++fmt;
8001fd4: 35 8c 00 01 addi r12,r12,1
8001fd8: 41 8d 00 00 lbu r13,(r12+0)
}
if ( c == 'c' ) {
8001fdc: 5d b9 ff 92 bne r13,r25,8001e24 <vprintk+0xe4> <== ALWAYS TAKEN
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
BSP_output_char(chr);
8001fe0: 2a 21 00 00 lw r1,(r17+0)
8001fe4: 29 c2 00 00 lw r2,(r14+0)
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
8001fe8: 36 37 00 04 addi r23,r17,4
BSP_output_char(chr);
8001fec: 20 21 00 ff andi r1,r1,0xff
8001ff0: d8 40 00 00 call r2
continue;
8001ff4: e3 ff ff 79 bi 8001dd8 <vprintk+0x98>
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
fmt++;
8001ff8: 35 8c 00 01 addi r12,r12,1
8001ffc: 41 8d 00 00 lbu r13,(r12+0)
8002000: 34 12 00 01 mvi r18,1
8002004: e3 ff ff 82 bi 8001e0c <vprintk+0xcc>
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
8002008: 35 8c 00 01 addi r12,r12,1
800200c: 41 8d 00 00 lbu r13,(r12+0)
8002010: b8 20 b0 00 mv r22,r1
8002014: e3 ff ff 7b bi 8001e00 <vprintk+0xc0>
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
8002018: 2a 2f 00 00 lw r15,(r17+0)
800201c: 36 37 00 04 addi r23,r17,4
if ( str == NULL ) {
8002020: 45 e0 00 38 be r15,r0,8002100 <vprintk+0x3c0>
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
8002024: 41 e1 00 00 lbu r1,(r15+0)
8002028: 34 0d 00 00 mvi r13,0
800202c: 44 2d 00 05 be r1,r13,8002040 <vprintk+0x300>
8002030: 35 ad 00 01 addi r13,r13,1
8002034: b5 ed 08 00 add r1,r15,r13
8002038: 40 21 00 00 lbu r1,(r1+0)
800203c: 5c 20 ff fd bne r1,r0,8002030 <vprintk+0x2f0>
;
/* leading spaces */
if ( !minus )
8002040: 5e 40 00 08 bne r18,r0,8002060 <vprintk+0x320>
for ( i=len ; i<width ; i++ )
8002044: 51 ab 00 07 bgeu r13,r11,8002060 <vprintk+0x320>
8002048: b9 a0 80 00 mv r16,r13
BSP_output_char(' ');
800204c: 29 c2 00 00 lw r2,(r14+0)
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
8002050: 36 10 00 01 addi r16,r16,1
BSP_output_char(' ');
8002054: 34 01 00 20 mvi r1,32
8002058: d8 40 00 00 call r2
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
800205c: 55 70 ff fc bgu r11,r16,800204c <vprintk+0x30c>
BSP_output_char(' ');
/* no width option */
if (width == 0) {
8002060: 5d 60 00 03 bne r11,r0,800206c <vprintk+0x32c>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
8002064: 45 ab 00 0e be r13,r11,800209c <vprintk+0x35c>
8002068: b9 a0 58 00 mv r11,r13
800206c: 41 e1 00 00 lbu r1,(r15+0)
8002070: 44 20 00 0b be r1,r0,800209c <vprintk+0x35c> <== NEVER TAKEN
BSP_output_char(*str);
8002074: 29 c2 00 00 lw r2,(r14+0)
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
8002078: 35 ef 00 01 addi r15,r15,1
BSP_output_char(*str);
800207c: d8 40 00 00 call r2
8002080: e0 00 00 03 bi 800208c <vprintk+0x34c>
8002084: 29 c2 00 00 lw r2,(r14+0)
8002088: d8 40 00 00 call r2
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
800208c: 41 e2 00 00 lbu r2,(r15+0)
8002090: 35 ef 00 01 addi r15,r15,1
BSP_output_char(*str);
8002094: b8 40 08 00 mv r1,r2
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
8002098: 5c 40 ff fb bne r2,r0,8002084 <vprintk+0x344>
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
800209c: 46 40 ff 4f be r18,r0,8001dd8 <vprintk+0x98>
for ( i=len ; i<width ; i++ )
80020a0: 51 ab ff 4e bgeu r13,r11,8001dd8 <vprintk+0x98>
BSP_output_char(' ');
80020a4: 29 c2 00 00 lw r2,(r14+0)
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
80020a8: 35 ad 00 01 addi r13,r13,1
BSP_output_char(' ');
80020ac: 34 01 00 20 mvi r1,32
80020b0: d8 40 00 00 call r2
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
80020b4: 55 6d ff fc bgu r11,r13,80020a4 <vprintk+0x364>
80020b8: e3 ff ff 48 bi 8001dd8 <vprintk+0x98>
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
80020bc: 65 a4 00 55 cmpei r4,r13,85
80020c0: 65 a3 00 75 cmpei r3,r13,117
80020c4: 34 12 00 0a mvi r18,10
80020c8: b8 83 18 00 or r3,r4,r3
80020cc: 5c 61 ff 68 bne r3,r1,8001e6c <vprintk+0x12c>
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
80020d0: 65 a4 00 58 cmpei r4,r13,88
80020d4: 65 a3 00 78 cmpei r3,r13,120
80020d8: 34 12 00 10 mvi r18,16
80020dc: b8 83 18 00 or r3,r4,r3
80020e0: 5c 61 ff 63 bne r3,r1,8001e6c <vprintk+0x12c>
base = 16; sign = false;
} else if ( c == 'p' ) {
80020e4: 34 02 00 70 mvi r2,112
80020e8: 45 a2 ff 61 be r13,r2,8001e6c <vprintk+0x12c>
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
80020ec: 29 c2 00 00 lw r2,(r14+0)
80020f0: b9 a0 08 00 mv r1,r13
80020f4: ba 20 b8 00 mv r23,r17
80020f8: d8 40 00 00 call r2
continue;
80020fc: e3 ff ff 37 bi 8001dd8 <vprintk+0x98>
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
8002100: 2b 8f 00 48 lw r15,(sp+72)
8002104: e3 ff ff c8 bi 8002024 <vprintk+0x2e4>
0801be10 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
801be10: 37 9c ff e8 addi sp,sp,-24
801be14: 5b 8b 00 14 sw (sp+20),r11
801be18: 5b 8c 00 10 sw (sp+16),r12
801be1c: 5b 8d 00 0c sw (sp+12),r13
801be20: 5b 8e 00 08 sw (sp+8),r14
801be24: 5b 9d 00 04 sw (sp+4),ra
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
801be28: 78 04 08 01 mvhi r4,0x801
801be2c: 38 84 e0 10 ori r4,r4,0xe010
801be30: 28 84 00 00 lw r4,(r4+0)
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
801be34: b8 40 68 00 mv r13,r2
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
801be38: 54 81 00 06 bgu r4,r1,801be50 <write+0x40> <== ALWAYS TAKEN
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
801be3c: fb ff c5 52 calli 800d384 <__errno> <== NOT EXECUTED
801be40: 34 02 00 09 mvi r2,9 <== NOT EXECUTED
801be44: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
801be48: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
801be4c: e0 00 00 27 bi 801bee8 <write+0xd8> <== NOT EXECUTED
{
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
801be50: 34 02 00 03 mvi r2,3
801be54: 5b 83 00 18 sw (sp+24),r3
801be58: 78 0c 08 01 mvhi r12,0x801
801be5c: fb ff 90 e5 calli 80001f0 <__ashlsi3>
801be60: 34 02 00 03 mvi r2,3
801be64: 39 8c e7 1c ori r12,r12,0xe71c
801be68: b8 20 70 00 mv r14,r1
801be6c: fb ff 90 e1 calli 80001f0 <__ashlsi3>
801be70: 29 8b 00 00 lw r11,(r12+0)
801be74: b5 c1 08 00 add r1,r14,r1
rtems_libio_check_is_open( iop );
801be78: 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 );
801be7c: b5 61 58 00 add r11,r11,r1
rtems_libio_check_is_open( iop );
801be80: 29 61 00 18 lw r1,(r11+24)
801be84: 20 22 01 00 andi r2,r1,0x100
801be88: 44 40 ff ed be r2,r0,801be3c <write+0x2c> <== NEVER TAKEN
rtems_libio_check_buffer( buffer );
801be8c: 45 a0 00 1f be r13,r0,801bf08 <write+0xf8> <== NEVER TAKEN
rtems_libio_check_count( count );
801be90: b8 60 60 00 mv r12,r3
801be94: 44 60 00 15 be r3,r0,801bee8 <write+0xd8>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
801be98: 20 21 00 04 andi r1,r1,0x4
801be9c: 44 20 00 1b be r1,r0,801bf08 <write+0xf8> <== NEVER TAKEN
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
801bea0: 29 61 00 40 lw r1,(r11+64)
801bea4: 28 24 00 0c lw r4,(r1+12)
801bea8: 44 80 00 1d be r4,r0,801bf1c <write+0x10c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->write_h)( iop, buffer, count );
801beac: b9 a0 10 00 mv r2,r13
801beb0: b9 60 08 00 mv r1,r11
801beb4: d8 80 00 00 call r4
801beb8: b8 20 60 00 mv r12,r1
if ( rc > 0 )
801bebc: 4c 01 00 0b bge r0,r1,801bee8 <write+0xd8> <== NEVER TAKEN
iop->offset += rc;
801bec0: 34 02 00 1f mvi r2,31
801bec4: fb ff 91 1b calli 8000330 <__ashrsi3>
801bec8: 29 62 00 14 lw r2,(r11+20)
801becc: 29 64 00 10 lw r4,(r11+16)
801bed0: b5 82 10 00 add r2,r12,r2
801bed4: f5 82 18 00 cmpgu r3,r12,r2
801bed8: b4 24 08 00 add r1,r1,r4
801bedc: b4 61 08 00 add r1,r3,r1
801bee0: 59 62 00 14 sw (r11+20),r2
801bee4: 59 61 00 10 sw (r11+16),r1
return rc;
}
801bee8: b9 80 08 00 mv r1,r12
801beec: 2b 9d 00 04 lw ra,(sp+4)
801bef0: 2b 8b 00 14 lw r11,(sp+20)
801bef4: 2b 8c 00 10 lw r12,(sp+16)
801bef8: 2b 8d 00 0c lw r13,(sp+12)
801befc: 2b 8e 00 08 lw r14,(sp+8)
801bf00: 37 9c 00 18 addi sp,sp,24
801bf04: c3 a0 00 00 ret
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
801bf08: fb ff c5 1f calli 800d384 <__errno> <== NOT EXECUTED
801bf0c: 34 02 00 16 mvi r2,22 <== NOT EXECUTED
801bf10: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
801bf14: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
801bf18: e3 ff ff f4 bi 801bee8 <write+0xd8> <== NOT EXECUTED
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
801bf1c: fb ff c5 1a calli 800d384 <__errno> <== NOT EXECUTED
801bf20: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
801bf24: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
801bf28: 34 0c ff ff mvi r12,-1 <== NOT EXECUTED
801bf2c: e3 ff ff ef bi 801bee8 <write+0xd8> <== NOT EXECUTED
08003e14 <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
8003e14: 37 9c ff e4 addi sp,sp,-28
8003e18: 5b 8b 00 1c sw (sp+28),r11
8003e1c: 5b 8c 00 18 sw (sp+24),r12
8003e20: 5b 8d 00 14 sw (sp+20),r13
8003e24: 5b 8e 00 10 sw (sp+16),r14
8003e28: 5b 8f 00 0c sw (sp+12),r15
8003e2c: 5b 90 00 08 sw (sp+8),r16
8003e30: 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 );
8003e34: 78 04 08 02 mvhi r4,0x802
8003e38: 38 84 30 10 ori r4,r4,0x3010
8003e3c: 28 84 00 00 lw r4,(r4+0)
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
8003e40: b8 40 58 00 mv r11,r2
8003e44: b8 60 68 00 mv r13,r3
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
8003e48: 54 81 00 06 bgu r4,r1,8003e60 <writev+0x4c> <== ALWAYS TAKEN
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
8003e4c: f8 00 30 08 calli 800fe6c <__errno>
8003e50: 34 02 00 09 mvi r2,9
8003e54: 58 22 00 00 sw (r1+0),r2
8003e58: 34 0e ff ff mvi r14,-1
8003e5c: e0 00 00 16 bi 8003eb4 <writev+0xa0>
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
8003e60: 34 02 00 03 mvi r2,3
8003e64: fb ff f4 14 calli 8000eb4 <__ashlsi3>
8003e68: 78 0c 08 02 mvhi r12,0x802
8003e6c: 34 02 00 03 mvi r2,3
8003e70: 39 8c 3e f0 ori r12,r12,0x3ef0
8003e74: b8 20 70 00 mv r14,r1
8003e78: fb ff f4 0f calli 8000eb4 <__ashlsi3>
8003e7c: 29 8f 00 00 lw r15,(r12+0)
8003e80: b5 c1 08 00 add r1,r14,r1
8003e84: b5 e1 78 00 add r15,r15,r1
rtems_libio_check_is_open( iop );
8003e88: 29 e1 00 18 lw r1,(r15+24)
8003e8c: 20 22 01 00 andi r2,r1,0x100
8003e90: 44 40 ff ef be r2,r0,8003e4c <writev+0x38>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
8003e94: 20 21 00 04 andi r1,r1,0x4
8003e98: 44 20 00 03 be r1,r0,8003ea4 <writev+0x90> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
8003e9c: 45 60 00 02 be r11,r0,8003ea4 <writev+0x90>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
8003ea0: 49 a0 00 0f bg r13,r0,8003edc <writev+0xc8>
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
8003ea4: f8 00 2f f2 calli 800fe6c <__errno>
8003ea8: 34 02 00 16 mvi r2,22
8003eac: 58 22 00 00 sw (r1+0),r2
8003eb0: 34 0e ff ff mvi r14,-1
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
8003eb4: b9 c0 08 00 mv r1,r14
8003eb8: 2b 9d 00 04 lw ra,(sp+4)
8003ebc: 2b 8b 00 1c lw r11,(sp+28)
8003ec0: 2b 8c 00 18 lw r12,(sp+24)
8003ec4: 2b 8d 00 14 lw r13,(sp+20)
8003ec8: 2b 8e 00 10 lw r14,(sp+16)
8003ecc: 2b 8f 00 0c lw r15,(sp+12)
8003ed0: 2b 90 00 08 lw r16,(sp+8)
8003ed4: 37 9c 00 1c addi sp,sp,28
8003ed8: c3 a0 00 00 ret
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
8003edc: 34 01 04 00 mvi r1,1024
8003ee0: 4c 2d 00 02 bge r1,r13,8003ee8 <writev+0xd4> <== ALWAYS TAKEN
8003ee4: e3 ff ff f0 bi 8003ea4 <writev+0x90> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
8003ee8: 29 e1 00 40 lw r1,(r15+64)
8003eec: 28 21 00 0c lw r1,(r1+12)
8003ef0: 44 20 00 39 be r1,r0,8003fd4 <writev+0x1c0> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
8003ef4: 34 06 00 00 mvi r6,0
8003ef8: b9 60 20 00 mv r4,r11
8003efc: 34 08 00 01 mvi r8,1
8003f00: b8 c0 38 00 mv r7,r6
8003f04: e0 00 00 0d bi 8003f38 <writev+0x124>
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 )
8003f08: 28 82 00 04 lw r2,(r4+4)
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
8003f0c: 34 84 00 08 addi r4,r4,8
if ( iov[v].iov_len )
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
8003f10: b4 e2 28 00 add r5,r7,r2
if ( total < old || total > SSIZE_MAX )
8003f14: e8 e5 38 00 cmpg r7,r7,r5
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
8003f18: 64 42 00 00 cmpei r2,r2,0
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
8003f1c: 68 a3 7f ff cmpgi r3,r5,32767
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
8003f20: c8 02 10 00 sub r2,r0,r2
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
8003f24: b8 67 38 00 or r7,r3,r7
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
8003f28: a1 02 40 00 and r8,r8,r2
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
8003f2c: 5c e0 ff de bne r7,r0,8003ea4 <writev+0x90>
* 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++ ) {
8003f30: 4c cd 00 06 bge r6,r13,8003f48 <writev+0x134>
8003f34: b8 a0 38 00 mv r7,r5
if ( !iov[v].iov_base )
8003f38: 28 82 00 00 lw r2,(r4+0)
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
8003f3c: 34 c6 00 01 addi r6,r6,1
if ( !iov[v].iov_base )
8003f40: 5c 40 ff f2 bne r2,r0,8003f08 <writev+0xf4>
8003f44: e3 ff ff d8 bi 8003ea4 <writev+0x90>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
8003f48: b9 00 60 00 mv r12,r8
8003f4c: b9 00 70 00 mv r14,r8
8003f50: 5d 00 00 07 bne r8,r0,8003f6c <writev+0x158>
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
8003f54: 29 63 00 04 lw r3,(r11+4)
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
8003f58: 35 8c 00 01 addi r12,r12,1
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
8003f5c: 5c 60 00 06 bne r3,r0,8003f74 <writev+0x160> <== ALWAYS TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
8003f60: 35 6b 00 08 addi r11,r11,8
8003f64: 49 ac ff fc bg r13,r12,8003f54 <writev+0x140>
8003f68: e3 ff ff d3 bi 8003eb4 <writev+0xa0>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
8003f6c: b8 e0 70 00 mv r14,r7
8003f70: e3 ff ff d1 bi 8003eb4 <writev+0xa0>
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
continue;
bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
8003f74: 29 e1 00 40 lw r1,(r15+64)
8003f78: 29 62 00 00 lw r2,(r11+0)
8003f7c: 28 24 00 0c lw r4,(r1+12)
8003f80: b9 e0 08 00 mv r1,r15
8003f84: d8 80 00 00 call r4
8003f88: b8 20 80 00 mv r16,r1
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
8003f8c: 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 )
8003f90: 4c 20 00 03 bge r1,r0,8003f9c <writev+0x188> <== ALWAYS TAKEN
8003f94: 34 0e ff ff mvi r14,-1 <== NOT EXECUTED
8003f98: e3 ff ff c7 bi 8003eb4 <writev+0xa0> <== NOT EXECUTED
return -1;
if ( bytes > 0 ) {
8003f9c: 44 20 00 0b be r1,r0,8003fc8 <writev+0x1b4> <== NEVER TAKEN
iop->offset += bytes;
8003fa0: fb ff f4 15 calli 8000ff4 <__ashrsi3>
8003fa4: 29 e2 00 14 lw r2,(r15+20)
8003fa8: 29 e4 00 10 lw r4,(r15+16)
total += bytes;
8003fac: b5 d0 70 00 add r14,r14,r16
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
8003fb0: b6 02 10 00 add r2,r16,r2
8003fb4: f6 02 18 00 cmpgu r3,r16,r2
8003fb8: b4 24 08 00 add r1,r1,r4
8003fbc: b4 61 08 00 add r1,r3,r1
8003fc0: 59 e1 00 10 sw (r15+16),r1
8003fc4: 59 e2 00 14 sw (r15+20),r2
total += bytes;
}
if (bytes != iov[ v ].iov_len)
8003fc8: 29 61 00 04 lw r1,(r11+4)
8003fcc: 46 01 ff e5 be r16,r1,8003f60 <writev+0x14c> <== ALWAYS TAKEN
8003fd0: e3 ff ff b9 bi 8003eb4 <writev+0xa0> <== NOT EXECUTED
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
8003fd4: f8 00 2f a6 calli 800fe6c <__errno> <== NOT EXECUTED
8003fd8: 34 02 00 86 mvi r2,134 <== NOT EXECUTED
8003fdc: 58 22 00 00 sw (r1+0),r2 <== NOT EXECUTED
8003fe0: 34 0e ff ff mvi r14,-1 <== NOT EXECUTED
8003fe4: e3 ff ff b4 bi 8003eb4 <writev+0xa0> <== NOT EXECUTED