RTEMS 4.11Annotated Report
Wed Jul 27 17:42:07 2011
ffc0c024 <IMFS_Set_handlers>:
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
ffc0c024: 81 63 00 00 lwz r11,0(r3)
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
ffc0c028: 81 23 00 10 lwz r9,16(r3)
switch( node->type ) {
ffc0c02c: 81 6b 00 4c lwz r11,76(r11)
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
ffc0c030: 81 29 00 34 lwz r9,52(r9)
switch( node->type ) {
ffc0c034: 38 0b ff ff addi r0,r11,-1
ffc0c038: 2b 80 00 06 cmplwi cr7,r0,6
ffc0c03c: 41 9d 00 50 bgt- cr7,ffc0c08c <IMFS_Set_handlers+0x68> <== NEVER TAKEN
ffc0c040: 3d 60 ff c2 lis r11,-62
ffc0c044: 39 6b c4 14 addi r11,r11,-15340
ffc0c048: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0c04c: 7c 0b 00 2e lwzx r0,r11,r0
ffc0c050: 7d 60 5a 14 add r11,r0,r11
ffc0c054: 7d 69 03 a6 mtctr r11
ffc0c058: 4e 80 04 20 bctr
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
ffc0c05c: 80 09 00 0c lwz r0,12(r9)
ffc0c060: 48 00 00 28 b ffc0c088 <IMFS_Set_handlers+0x64>
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
ffc0c064: 3d 20 ff c2 lis r9,-62
ffc0c068: 38 09 c4 3c addi r0,r9,-15300
ffc0c06c: 48 00 00 1c b ffc0c088 <IMFS_Set_handlers+0x64>
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
ffc0c070: 3d 20 ff c2 lis r9,-62
ffc0c074: 38 09 c4 ac addi r0,r9,-15188
ffc0c078: 48 00 00 10 b ffc0c088 <IMFS_Set_handlers+0x64>
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
ffc0c07c: 80 09 00 08 lwz r0,8(r9)
ffc0c080: 48 00 00 08 b ffc0c088 <IMFS_Set_handlers+0x64>
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
ffc0c084: 80 09 00 10 lwz r0,16(r9)
ffc0c088: 90 03 00 08 stw r0,8(r3)
break;
}
return 0;
}
ffc0c08c: 38 60 00 00 li r3,0
ffc0c090: 4e 80 00 20 blr
ffc0be18 <IMFS_create_node>:
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
ffc0be18: 2c 03 00 00 cmpwi r3,0
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
ffc0be1c: 94 21 ff e0 stwu r1,-32(r1)
ffc0be20: 7c 08 02 a6 mflr r0
ffc0be24: bf 61 00 0c stmw r27,12(r1)
ffc0be28: 7c 9f 23 78 mr r31,r4
ffc0be2c: 7c fe 3b 78 mr r30,r7
ffc0be30: 90 01 00 24 stw r0,36(r1)
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
return NULL;
ffc0be34: 3b 60 00 00 li r27,0
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
ffc0be38: 41 82 01 24 beq- ffc0bf5c <IMFS_create_node+0x144> <== NEVER TAKEN
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
ffc0be3c: 2f 84 00 07 cmpwi cr7,r4,7
*/
if ( parent_loc == NULL )
return NULL;
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
ffc0be40: 81 23 00 10 lwz r9,16(r3)
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
return NULL;
parent = parent_loc->node_access;
ffc0be44: 83 83 00 00 lwz r28,0(r3)
fs_info = parent_loc->mt_entry->fs_info;
ffc0be48: 83 a9 00 34 lwz r29,52(r9)
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
ffc0be4c: 40 9e 00 18 bne- cr7,ffc0be64 <IMFS_create_node+0x4c>
ffc0be50: 81 3d 00 10 lwz r9,16(r29)
ffc0be54: 3d 60 ff c2 lis r11,-62
ffc0be58: 38 0b c3 ac addi r0,r11,-15444
ffc0be5c: 7f 89 00 00 cmpw cr7,r9,r0
ffc0be60: 41 9e 00 fc beq- cr7,ffc0bf5c <IMFS_create_node+0x144>
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
ffc0be64: 3d 20 00 00 lis r9,0
ffc0be68: 81 29 27 3c lwz r9,10044(r9)
ffc0be6c: 7c a4 2b 78 mr r4,r5
ffc0be70: 7f e3 fb 78 mr r3,r31
ffc0be74: 80 09 00 2c lwz r0,44(r9)
ffc0be78: 7c c5 00 78 andc r5,r6,r0
ffc0be7c: 4b ff ff 19 bl ffc0bd94 <IMFS_allocate_node>
if ( !node )
ffc0be80: 7c 7b 1b 79 mr. r27,r3
ffc0be84: 41 82 00 d8 beq- ffc0bf5c <IMFS_create_node+0x144>
return NULL;
/*
* Set the type specific information
*/
if ( type == IMFS_DIRECTORY ) {
ffc0be88: 2f 9f 00 01 cmpwi cr7,r31,1
ffc0be8c: 40 be 00 1c bne+ cr7,ffc0bea8 <IMFS_create_node+0x90>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
ffc0be90: 39 3b 00 54 addi r9,r27,84
head->next = tail;
ffc0be94: 91 3b 00 50 stw r9,80(r27)
head->previous = NULL;
ffc0be98: 39 20 00 00 li r9,0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
ffc0be9c: 38 1b 00 50 addi r0,r27,80
head->next = tail;
head->previous = NULL;
ffc0bea0: 91 3b 00 54 stw r9,84(r27)
ffc0bea4: 48 00 00 54 b ffc0bef8 <IMFS_create_node+0xe0>
rtems_chain_initialize_empty(&node->info.directory.Entries);
} else if ( type == IMFS_HARD_LINK ) {
ffc0bea8: 2f 9f 00 03 cmpwi cr7,r31,3
ffc0beac: 41 9e 00 0c beq- cr7,ffc0beb8 <IMFS_create_node+0xa0>
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
ffc0beb0: 2f 9f 00 04 cmpwi cr7,r31,4
ffc0beb4: 40 be 00 0c bne+ cr7,ffc0bec0 <IMFS_create_node+0xa8>
node->info.sym_link.name = info->sym_link.name;
ffc0beb8: 80 1e 00 00 lwz r0,0(r30)
ffc0bebc: 48 00 00 7c b ffc0bf38 <IMFS_create_node+0x120>
} else if ( type == IMFS_DEVICE ) {
ffc0bec0: 2f 9f 00 02 cmpwi cr7,r31,2
ffc0bec4: 40 be 00 18 bne+ cr7,ffc0bedc <IMFS_create_node+0xc4>
node->info.device.major = info->device.major;
ffc0bec8: 80 1e 00 00 lwz r0,0(r30)
ffc0becc: 90 1b 00 50 stw r0,80(r27)
node->info.device.minor = info->device.minor;
ffc0bed0: 80 1e 00 04 lwz r0,4(r30)
ffc0bed4: 90 1b 00 54 stw r0,84(r27)
ffc0bed8: 48 00 00 64 b ffc0bf3c <IMFS_create_node+0x124>
} else if ( type == IMFS_LINEAR_FILE ) {
ffc0bedc: 2f 9f 00 06 cmpwi cr7,r31,6
ffc0bee0: 40 be 00 20 bne+ cr7,ffc0bf00 <IMFS_create_node+0xe8>
node->info.linearfile.size = 0;
ffc0bee4: 39 40 00 00 li r10,0
ffc0bee8: 39 60 00 00 li r11,0
ffc0beec: 91 5b 00 50 stw r10,80(r27)
node->info.linearfile.direct = 0;
ffc0bef0: 38 00 00 00 li r0,0
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
ffc0bef4: 91 7b 00 54 stw r11,84(r27)
node->info.linearfile.direct = 0;
ffc0bef8: 90 1b 00 58 stw r0,88(r27)
ffc0befc: 48 00 00 40 b ffc0bf3c <IMFS_create_node+0x124>
} else if ( type == IMFS_MEMORY_FILE ) {
ffc0bf00: 2f 9f 00 05 cmpwi cr7,r31,5
ffc0bf04: 40 be 00 28 bne+ cr7,ffc0bf2c <IMFS_create_node+0x114>
node->info.file.size = 0;
node->info.file.indirect = 0;
ffc0bf08: 38 00 00 00 li r0,0
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
} else if ( type == IMFS_MEMORY_FILE ) {
node->info.file.size = 0;
ffc0bf0c: 39 40 00 00 li r10,0
node->info.file.indirect = 0;
ffc0bf10: 90 1b 00 58 stw r0,88(r27)
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
} else if ( type == IMFS_MEMORY_FILE ) {
node->info.file.size = 0;
ffc0bf14: 39 60 00 00 li r11,0
ffc0bf18: 91 5b 00 50 stw r10,80(r27)
ffc0bf1c: 91 7b 00 54 stw r11,84(r27)
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
ffc0bf20: 90 1b 00 5c stw r0,92(r27)
node->info.file.triply_indirect = 0;
ffc0bf24: 90 1b 00 60 stw r0,96(r27)
ffc0bf28: 48 00 00 14 b ffc0bf3c <IMFS_create_node+0x124>
} else if ( type == IMFS_FIFO ) {
ffc0bf2c: 2f 9f 00 07 cmpwi cr7,r31,7
ffc0bf30: 40 be 00 0c bne+ cr7,ffc0bf3c <IMFS_create_node+0x124> <== NEVER TAKEN
node->info.fifo.pipe = NULL;
ffc0bf34: 38 00 00 00 li r0,0
ffc0bf38: 90 1b 00 50 stw r0,80(r27)
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
ffc0bf3c: 81 3d 00 04 lwz r9,4(r29)
ffc0bf40: 38 7c 00 50 addi r3,r28,80
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
ffc0bf44: 93 9b 00 08 stw r28,8(r27)
ffc0bf48: 7f 64 db 78 mr r4,r27
node->st_ino = ++fs_info->ino_count;
ffc0bf4c: 38 09 00 01 addi r0,r9,1
ffc0bf50: 90 1d 00 04 stw r0,4(r29)
ffc0bf54: 90 1b 00 38 stw r0,56(r27)
ffc0bf58: 4b ff cc 01 bl ffc08b58 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
ffc0bf5c: 39 61 00 20 addi r11,r1,32
ffc0bf60: 7f 63 db 78 mr r3,r27
ffc0bf64: 4b ff 45 c0 b ffc00524 <_restgpr_27_x>
ffc0c148 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
ffc0c148: 94 21 ff a8 stwu r1,-88(r1)
ffc0c14c: 7c 08 02 a6 mflr r0
ffc0c150: 90 01 00 5c stw r0,92(r1)
int i = 0;
ffc0c154: 38 00 00 00 li r0,0
ffc0c158: 90 01 00 0c stw r0,12(r1)
IMFS_token_types type = IMFS_CURRENT_DIR;
char token[ IMFS_NAME_MAX + 1 ];
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
ffc0c15c: 54 a0 00 39 rlwinm. r0,r5,0,0,28
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
ffc0c160: bf 41 00 40 stmw r26,64(r1)
ffc0c164: 7c 7e 1b 78 mr r30,r3
ffc0c168: 7c bd 2b 78 mr r29,r5
ffc0c16c: 90 81 00 38 stw r4,56(r1)
ffc0c170: 7c df 33 78 mr r31,r6
IMFS_token_types type = IMFS_CURRENT_DIR;
char token[ IMFS_NAME_MAX + 1 ];
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
ffc0c174: 41 a2 00 10 beq+ ffc0c184 <IMFS_eval_path+0x3c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EIO );
ffc0c178: 48 00 3a 25 bl ffc0fb9c <__errno> <== NOT EXECUTED
ffc0c17c: 38 00 00 05 li r0,5 <== NOT EXECUTED
ffc0c180: 48 00 02 78 b ffc0c3f8 <IMFS_eval_path+0x2b0> <== NOT EXECUTED
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
ffc0c184: 83 86 00 00 lwz r28,0(r6)
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
ffc0c188: 3f 60 00 00 lis r27,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 );
ffc0c18c: 80 61 00 0c lwz r3,12(r1)
ffc0c190: 38 a1 00 10 addi r5,r1,16
ffc0c194: 80 81 00 38 lwz r4,56(r1)
ffc0c198: 38 c1 00 08 addi r6,r1,8
ffc0c19c: 7c 7e 1a 14 add r3,r30,r3
ffc0c1a0: 48 00 07 f1 bl ffc0c990 <IMFS_get_token>
pathnamelen -= len;
ffc0c1a4: 80 01 00 08 lwz r0,8(r1)
ffc0c1a8: 81 21 00 38 lwz r9,56(r1)
* 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 );
ffc0c1ac: 7c 7a 1b 78 mr r26,r3
pathnamelen -= len;
ffc0c1b0: 7d 20 48 50 subf r9,r0,r9
ffc0c1b4: 91 21 00 38 stw r9,56(r1)
i += len;
ffc0c1b8: 81 21 00 0c lwz r9,12(r1)
ffc0c1bc: 7c 09 02 14 add r0,r9,r0
ffc0c1c0: 90 01 00 0c stw r0,12(r1)
if ( !pathloc->node_access )
ffc0c1c4: 80 1f 00 00 lwz r0,0(r31)
ffc0c1c8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c1cc: 41 9e 00 f8 beq- cr7,ffc0c2c4 <IMFS_eval_path+0x17c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
ffc0c1d0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c1d4: 41 9e 00 24 beq- cr7,ffc0c1f8 <IMFS_eval_path+0xb0>
if ( node->type == IMFS_DIRECTORY )
ffc0c1d8: 80 1c 00 4c lwz r0,76(r28)
ffc0c1dc: 2f 80 00 01 cmpwi cr7,r0,1
ffc0c1e0: 40 be 00 18 bne+ cr7,ffc0c1f8 <IMFS_eval_path+0xb0>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
ffc0c1e4: 7f e3 fb 78 mr r3,r31
ffc0c1e8: 38 80 00 01 li r4,1
ffc0c1ec: 4b ff fe a9 bl ffc0c094 <IMFS_evaluate_permission>
ffc0c1f0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c1f4: 41 9e 01 fc beq- cr7,ffc0c3f0 <IMFS_eval_path+0x2a8>
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
ffc0c1f8: 2f 9a 00 03 cmpwi cr7,r26,3
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;
ffc0c1fc: 83 9f 00 00 lwz r28,0(r31)
switch( type ) {
ffc0c200: 41 9e 00 54 beq- cr7,ffc0c254 <IMFS_eval_path+0x10c>
ffc0c204: 2f 9a 00 04 cmpwi cr7,r26,4
ffc0c208: 41 9e 01 54 beq- cr7,ffc0c35c <IMFS_eval_path+0x214>
ffc0c20c: 2f 1a 00 02 cmpwi cr6,r26,2
ffc0c210: 40 ba 01 58 bne+ cr6,ffc0c368 <IMFS_eval_path+0x220>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
ffc0c214: 81 3b 27 3c lwz r9,10044(r27)
ffc0c218: 80 09 00 18 lwz r0,24(r9)
ffc0c21c: 7f 9c 00 00 cmpw cr7,r28,r0
ffc0c220: 41 be ff 6c beq- cr7,ffc0c18c <IMFS_eval_path+0x44>
static inline bool rtems_filesystem_is_root_location(
const rtems_filesystem_location_info_t *loc
)
{
return loc->mt_entry->mt_fs_root.node_access == loc->node_access;
ffc0c224: 81 7f 00 10 lwz r11,16(r31)
/*
* Am I at the root of this mounted filesystem?
*/
if ( rtems_filesystem_is_root_location( pathloc ) ) {
ffc0c228: 80 0b 00 1c lwz r0,28(r11)
ffc0c22c: 7f 80 e0 00 cmpw cr7,r0,r28
ffc0c230: 40 be 00 0c bne+ cr7,ffc0c23c <IMFS_eval_path+0xf4>
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
ffc0c234: 39 6b 00 08 addi r11,r11,8
ffc0c238: 48 00 01 58 b ffc0c390 <IMFS_eval_path+0x248>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
ffc0c23c: 83 9c 00 08 lwz r28,8(r28)
ffc0c240: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0c244: 40 be 01 10 bne+ cr7,ffc0c354 <IMFS_eval_path+0x20c>
rtems_set_errno_and_return_minus_one( ENOENT );
ffc0c248: 48 00 39 55 bl ffc0fb9c <__errno>
ffc0c24c: 93 43 00 00 stw r26,0(r3)
ffc0c250: 48 00 01 ac b ffc0c3fc <IMFS_eval_path+0x2b4>
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
ffc0c254: 80 1c 00 4c lwz r0,76(r28)
ffc0c258: 2f 80 00 03 cmpwi cr7,r0,3
ffc0c25c: 40 be 00 18 bne+ cr7,ffc0c274 <IMFS_eval_path+0x12c>
IMFS_evaluate_hard_link( pathloc, 0 );
ffc0c260: 7f e3 fb 78 mr r3,r31
ffc0c264: 38 80 00 00 li r4,0
ffc0c268: 4b ff fe 81 bl ffc0c0e8 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
ffc0c26c: 83 9f 00 00 lwz r28,0(r31)
ffc0c270: 48 00 00 28 b ffc0c298 <IMFS_eval_path+0x150>
* It would be a design error if we evaluated the link and
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
ffc0c274: 2f 80 00 04 cmpwi cr7,r0,4
ffc0c278: 40 be 00 20 bne+ cr7,ffc0c298 <IMFS_eval_path+0x150>
result = IMFS_evaluate_sym_link( pathloc, 0 );
ffc0c27c: 7f e3 fb 78 mr r3,r31
ffc0c280: 38 80 00 00 li r4,0
ffc0c284: 48 00 01 89 bl ffc0c40c <IMFS_evaluate_sym_link>
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
ffc0c288: 83 9f 00 00 lwz r28,0(r31)
if ( result == -1 )
ffc0c28c: 2f 83 ff ff cmpwi cr7,r3,-1
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
ffc0c290: 7c 7a 1b 78 mr r26,r3
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
if ( result == -1 )
ffc0c294: 41 9e 01 6c beq- cr7,ffc0c400 <IMFS_eval_path+0x2b8> <== NEVER TAKEN
}
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
ffc0c298: 80 1c 00 4c lwz r0,76(r28)
ffc0c29c: 2f 80 00 01 cmpwi cr7,r0,1
ffc0c2a0: 41 be 00 10 beq+ cr7,ffc0c2b0 <IMFS_eval_path+0x168>
rtems_set_errno_and_return_minus_one( ENOTDIR );
ffc0c2a4: 48 00 38 f9 bl ffc0fb9c <__errno>
ffc0c2a8: 38 00 00 14 li r0,20
ffc0c2ac: 48 00 01 4c b ffc0c3f8 <IMFS_eval_path+0x2b0>
/*
* Find the token name in the current node.
*/
node = IMFS_find_match_in_dir( node, token );
ffc0c2b0: 7f 83 e3 78 mr r3,r28
ffc0c2b4: 38 81 00 10 addi r4,r1,16
ffc0c2b8: 48 00 06 45 bl ffc0c8fc <IMFS_find_match_in_dir>
if ( !node )
ffc0c2bc: 7c 7c 1b 79 mr. r28,r3
ffc0c2c0: 40 a2 00 10 bne+ ffc0c2d0 <IMFS_eval_path+0x188>
rtems_set_errno_and_return_minus_one( ENOENT );
ffc0c2c4: 48 00 38 d9 bl ffc0fb9c <__errno>
ffc0c2c8: 38 00 00 02 li r0,2
ffc0c2cc: 48 00 01 2c b ffc0c3f8 <IMFS_eval_path+0x2b0>
* file system and not the IMFS. For example the IMFS length is
* limited. If the token is a parent directory move back up otherwise
* set loc to the new fs root node and let them finish evaluating the
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
ffc0c2d0: 80 1c 00 4c lwz r0,76(r28)
ffc0c2d4: 2f 80 00 01 cmpwi cr7,r0,1
ffc0c2d8: 40 be 00 7c bne+ cr7,ffc0c354 <IMFS_eval_path+0x20c>
ffc0c2dc: 80 1c 00 5c lwz r0,92(r28)
ffc0c2e0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c2e4: 41 9e 00 70 beq- cr7,ffc0c354 <IMFS_eval_path+0x20c>
IMFS_skip_separator( pathname, &pathnamelen, &i);
ffc0c2e8: 7f c3 f3 78 mr r3,r30
ffc0c2ec: 38 81 00 38 addi r4,r1,56
ffc0c2f0: 38 a1 00 0c addi r5,r1,12
ffc0c2f4: 4b ff fc c5 bl ffc0bfb8 <IMFS_skip_separator>
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
ffc0c2f8: 81 21 00 0c lwz r9,12(r1)
ffc0c2fc: 7c 1e 48 ae lbzx r0,r30,r9
ffc0c300: 7d 7e 4a 14 add r11,r30,r9
ffc0c304: 2f 80 00 2e cmpwi cr7,r0,46
ffc0c308: 40 9e 00 10 bne- cr7,ffc0c318 <IMFS_eval_path+0x1d0>
ffc0c30c: 88 0b 00 01 lbz r0,1(r11)
ffc0c310: 2f 80 00 2e cmpwi cr7,r0,46
ffc0c314: 41 be 00 28 beq+ cr7,ffc0c33c <IMFS_eval_path+0x1f4>
*pathloc = node->info.directory.mt_fs->mt_fs_root;
ffc0c318: 80 9c 00 5c lwz r4,92(r28)
return (*pathloc->ops->evalpath_h)( &pathname[i],
ffc0c31c: 7d 63 5b 78 mr r3,r11
* path.
*/
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
IMFS_skip_separator( pathname, &pathnamelen, &i);
if ((pathname[i] != '.') || (pathname[i + 1] != '.')) {
*pathloc = node->info.directory.mt_fs->mt_fs_root;
ffc0c320: 38 84 00 1c addi r4,r4,28
ffc0c324: 7c a4 a4 aa lswi r5,r4,20
ffc0c328: 7c bf a5 aa stswi r5,r31,20
return (*pathloc->ops->evalpath_h)( &pathname[i],
ffc0c32c: 81 3f 00 0c lwz r9,12(r31)
ffc0c330: 80 81 00 38 lwz r4,56(r1)
ffc0c334: 80 09 00 00 lwz r0,0(r9)
ffc0c338: 48 00 00 80 b ffc0c3b8 <IMFS_eval_path+0x270>
pathnamelen,
flags, pathloc );
}
i += 2;
ffc0c33c: 39 29 00 02 addi r9,r9,2
pathnamelen -= 2;
node = node->Parent;
ffc0c340: 83 9c 00 08 lwz r28,8(r28)
*pathloc = node->info.directory.mt_fs->mt_fs_root;
return (*pathloc->ops->evalpath_h)( &pathname[i],
pathnamelen,
flags, pathloc );
}
i += 2;
ffc0c344: 91 21 00 0c stw r9,12(r1)
pathnamelen -= 2;
ffc0c348: 81 21 00 38 lwz r9,56(r1)
ffc0c34c: 38 09 ff fe addi r0,r9,-2
ffc0c350: 90 01 00 38 stw r0,56(r1)
}
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
ffc0c354: 93 9f 00 00 stw r28,0(r31)
break;
ffc0c358: 4b ff fe 34 b ffc0c18c <IMFS_eval_path+0x44>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
ffc0c35c: 48 00 38 41 bl ffc0fb9c <__errno>
ffc0c360: 38 00 00 5b li r0,91
ffc0c364: 48 00 00 94 b ffc0c3f8 <IMFS_eval_path+0x2b0>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
ffc0c368: 2f 1a 00 00 cmpwi cr6,r26,0
ffc0c36c: 41 9a 00 08 beq- cr6,ffc0c374 <IMFS_eval_path+0x22c>
ffc0c370: 40 9e fe 1c bne+ cr7,ffc0c18c <IMFS_eval_path+0x44> <== ALWAYS TAKEN
* 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 ) {
ffc0c374: 80 1c 00 4c lwz r0,76(r28)
ffc0c378: 2f 80 00 01 cmpwi cr7,r0,1
ffc0c37c: 40 9e 00 54 bne- cr7,ffc0c3d0 <IMFS_eval_path+0x288>
if ( node->info.directory.mt_fs != NULL ) {
ffc0c380: 81 7c 00 5c lwz r11,92(r28)
ffc0c384: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0c388: 41 9e 00 48 beq- cr7,ffc0c3d0 <IMFS_eval_path+0x288> <== ALWAYS TAKEN
*pathloc = node->info.directory.mt_fs->mt_fs_root;
ffc0c38c: 39 6b 00 1c addi r11,r11,28 <== NOT EXECUTED
ffc0c390: 7c ab a4 aa lswi r5,r11,20
ffc0c394: 7c bf a5 aa stswi r5,r31,20
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
ffc0c398: 80 61 00 0c lwz r3,12(r1)
ffc0c39c: 81 21 00 08 lwz r9,8(r1)
ffc0c3a0: 81 7f 00 0c lwz r11,12(r31)
ffc0c3a4: 80 81 00 38 lwz r4,56(r1)
ffc0c3a8: 7c 69 18 50 subf r3,r9,r3
ffc0c3ac: 80 0b 00 00 lwz r0,0(r11)
ffc0c3b0: 7c 7e 1a 14 add r3,r30,r3
ffc0c3b4: 7c 89 22 14 add r4,r9,r4
ffc0c3b8: 7f a5 eb 78 mr r5,r29
ffc0c3bc: 7c 09 03 a6 mtctr r0
ffc0c3c0: 7f e6 fb 78 mr r6,r31
ffc0c3c4: 4e 80 04 21 bctrl
ffc0c3c8: 7c 7a 1b 78 mr r26,r3
ffc0c3cc: 48 00 00 34 b ffc0c400 <IMFS_eval_path+0x2b8>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
ffc0c3d0: 7f e3 fb 78 mr r3,r31
ffc0c3d4: 4b ff fc 51 bl ffc0c024 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
ffc0c3d8: 7f a4 eb 78 mr r4,r29
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
ffc0c3dc: 7c 7a 1b 78 mr r26,r3
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
ffc0c3e0: 7f e3 fb 78 mr r3,r31
ffc0c3e4: 4b ff fc b1 bl ffc0c094 <IMFS_evaluate_permission>
ffc0c3e8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c3ec: 40 be 00 14 bne+ cr7,ffc0c400 <IMFS_eval_path+0x2b8>
rtems_set_errno_and_return_minus_one( EACCES );
ffc0c3f0: 48 00 37 ad bl ffc0fb9c <__errno>
ffc0c3f4: 38 00 00 0d li r0,13
ffc0c3f8: 90 03 00 00 stw r0,0(r3)
ffc0c3fc: 3b 40 ff ff li r26,-1
return result;
}
ffc0c400: 39 61 00 58 addi r11,r1,88
ffc0c404: 7f 43 d3 78 mr r3,r26
ffc0c408: 4b ff 41 18 b ffc00520 <_restgpr_26_x>
ffc0c560 <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 */
)
{
ffc0c560: 94 21 ff b0 stwu r1,-80(r1)
ffc0c564: 7c 08 02 a6 mflr r0
ffc0c568: 90 01 00 54 stw r0,84(r1)
int i = 0;
ffc0c56c: 38 00 00 00 li r0,0
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
ffc0c570: bf 41 00 38 stmw r26,56(r1)
ffc0c574: 7c 7e 1b 78 mr r30,r3
ffc0c578: 7c 9f 23 78 mr r31,r4
ffc0c57c: 7c bd 2b 78 mr r29,r5
int i = 0;
ffc0c580: 90 01 00 10 stw r0,16(r1)
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
ffc0c584: 3f 60 00 00 lis r27,0
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
ffc0c588: 83 84 00 00 lwz r28,0(r4)
/*
* Get the path length.
*/
pathlen = strlen( path );
ffc0c58c: 48 00 4f 3d bl ffc114c8 <strlen>
ffc0c590: 90 61 00 08 stw r3,8(r1)
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
ffc0c594: 80 61 00 10 lwz r3,16(r1)
ffc0c598: 38 a1 00 14 addi r5,r1,20
ffc0c59c: 80 81 00 08 lwz r4,8(r1)
ffc0c5a0: 38 c1 00 0c addi r6,r1,12
ffc0c5a4: 7c 7e 1a 14 add r3,r30,r3
ffc0c5a8: 48 00 03 e9 bl ffc0c990 <IMFS_get_token>
pathlen -= len;
ffc0c5ac: 80 01 00 0c lwz r0,12(r1)
ffc0c5b0: 81 21 00 08 lwz r9,8(r1)
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
ffc0c5b4: 7c 7a 1b 78 mr r26,r3
pathlen -= len;
ffc0c5b8: 7d 20 48 50 subf r9,r0,r9
ffc0c5bc: 91 21 00 08 stw r9,8(r1)
i += len;
ffc0c5c0: 81 21 00 10 lwz r9,16(r1)
ffc0c5c4: 7c 09 02 14 add r0,r9,r0
ffc0c5c8: 90 01 00 10 stw r0,16(r1)
if ( !pathloc->node_access )
ffc0c5cc: 80 1f 00 00 lwz r0,0(r31)
ffc0c5d0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c5d4: 41 9e 01 e8 beq- cr7,ffc0c7bc <IMFS_evaluate_for_make+0x25c><== NEVER TAKEN
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
ffc0c5d8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c5dc: 41 9e 00 24 beq- cr7,ffc0c600 <IMFS_evaluate_for_make+0xa0>
if ( node->type == IMFS_DIRECTORY )
ffc0c5e0: 80 1c 00 4c lwz r0,76(r28)
ffc0c5e4: 2f 80 00 01 cmpwi cr7,r0,1
ffc0c5e8: 40 be 00 18 bne+ cr7,ffc0c600 <IMFS_evaluate_for_make+0xa0>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
ffc0c5ec: 7f e3 fb 78 mr r3,r31
ffc0c5f0: 38 80 00 01 li r4,1
ffc0c5f4: 4b ff fa a1 bl ffc0c094 <IMFS_evaluate_permission>
ffc0c5f8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c5fc: 41 9e 02 24 beq- cr7,ffc0c820 <IMFS_evaluate_for_make+0x2c0>
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
ffc0c600: 2f 9a 00 02 cmpwi cr7,r26,2
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;
ffc0c604: 83 9f 00 00 lwz r28,0(r31)
switch( type ) {
ffc0c608: 41 9e 00 2c beq- cr7,ffc0c634 <IMFS_evaluate_for_make+0xd4>
ffc0c60c: 2b 9a 00 02 cmplwi cr7,r26,2
ffc0c610: 41 9d 00 10 bgt- cr7,ffc0c620 <IMFS_evaluate_for_make+0xc0>
ffc0c614: 2f 9a 00 00 cmpwi cr7,r26,0
ffc0c618: 41 9e 01 68 beq- cr7,ffc0c780 <IMFS_evaluate_for_make+0x220>
ffc0c61c: 4b ff ff 78 b ffc0c594 <IMFS_evaluate_for_make+0x34>
ffc0c620: 2f 9a 00 03 cmpwi cr7,r26,3
ffc0c624: 41 9e 00 70 beq- cr7,ffc0c694 <IMFS_evaluate_for_make+0x134>
ffc0c628: 2f 9a 00 04 cmpwi cr7,r26,4
ffc0c62c: 40 9e ff 68 bne+ cr7,ffc0c594 <IMFS_evaluate_for_make+0x34><== NEVER TAKEN
ffc0c630: 48 00 01 5c b ffc0c78c <IMFS_evaluate_for_make+0x22c>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
ffc0c634: 81 3b 27 3c lwz r9,10044(r27)
ffc0c638: 80 09 00 18 lwz r0,24(r9)
ffc0c63c: 7f 9c 00 00 cmpw cr7,r28,r0
ffc0c640: 41 be ff 54 beq- cr7,ffc0c594 <IMFS_evaluate_for_make+0x34>
ffc0c644: 81 7f 00 10 lwz r11,16(r31)
/*
* Am I at the root of this mounted filesystem?
*/
if ( rtems_filesystem_is_root_location( pathloc ) ) {
ffc0c648: 80 0b 00 1c lwz r0,28(r11)
ffc0c64c: 7f 80 e0 00 cmpw cr7,r0,r28
ffc0c650: 40 be 00 2c bne+ cr7,ffc0c67c <IMFS_evaluate_for_make+0x11c>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
ffc0c654: 39 6b 00 08 addi r11,r11,8
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
ffc0c658: 80 01 00 0c lwz r0,12(r1)
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
ffc0c65c: 7c ab a4 aa lswi r5,r11,20
ffc0c660: 7c bf a5 aa stswi r5,r31,20
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
ffc0c664: 80 61 00 10 lwz r3,16(r1)
ffc0c668: 81 3f 00 0c lwz r9,12(r31)
ffc0c66c: 7c 60 18 50 subf r3,r0,r3
ffc0c670: 7c 7e 1a 14 add r3,r30,r3
ffc0c674: 80 09 00 04 lwz r0,4(r9)
ffc0c678: 48 00 00 d0 b ffc0c748 <IMFS_evaluate_for_make+0x1e8>
}
} else {
if ( !node->Parent )
ffc0c67c: 83 9c 00 08 lwz r28,8(r28)
ffc0c680: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0c684: 40 be 00 f4 bne+ cr7,ffc0c778 <IMFS_evaluate_for_make+0x218>
rtems_set_errno_and_return_minus_one( ENOENT );
ffc0c688: 48 00 35 15 bl ffc0fb9c <__errno>
ffc0c68c: 93 43 00 00 stw r26,0(r3)
ffc0c690: 48 00 01 9c b ffc0c82c <IMFS_evaluate_for_make+0x2cc>
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
ffc0c694: 80 1c 00 4c lwz r0,76(r28)
ffc0c698: 2f 80 00 03 cmpwi cr7,r0,3
ffc0c69c: 41 9e 00 0c beq- cr7,ffc0c6a8 <IMFS_evaluate_for_make+0x148>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
ffc0c6a0: 2f 80 00 04 cmpwi cr7,r0,4
ffc0c6a4: 40 be 00 1c bne+ cr7,ffc0c6c0 <IMFS_evaluate_for_make+0x160>
result = IMFS_evaluate_link( pathloc, 0 );
ffc0c6a8: 7f e3 fb 78 mr r3,r31
ffc0c6ac: 38 80 00 00 li r4,0
ffc0c6b0: 4b ff fd f5 bl ffc0c4a4 <IMFS_evaluate_link>
if ( result == -1 )
ffc0c6b4: 2f 83 ff ff cmpwi cr7,r3,-1
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
ffc0c6b8: 7c 7c 1b 78 mr r28,r3
if ( result == -1 )
ffc0c6bc: 41 9e 01 74 beq- cr7,ffc0c830 <IMFS_evaluate_for_make+0x2d0><== NEVER TAKEN
return -1;
}
node = pathloc->node_access;
ffc0c6c0: 80 7f 00 00 lwz r3,0(r31)
if ( !node )
ffc0c6c4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c6c8: 41 9e 01 38 beq- cr7,ffc0c800 <IMFS_evaluate_for_make+0x2a0><== NEVER TAKEN
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
ffc0c6cc: 80 03 00 4c lwz r0,76(r3)
ffc0c6d0: 2f 80 00 01 cmpwi cr7,r0,1
ffc0c6d4: 40 9e 01 2c bne- cr7,ffc0c800 <IMFS_evaluate_for_make+0x2a0>
/*
* Find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
ffc0c6d8: 38 81 00 14 addi r4,r1,20
ffc0c6dc: 48 00 02 21 bl ffc0c8fc <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
ffc0c6e0: 7c 7c 1b 79 mr. r28,r3
ffc0c6e4: 41 82 00 b4 beq- ffc0c798 <IMFS_evaluate_for_make+0x238>
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
ffc0c6e8: 80 1c 00 4c lwz r0,76(r28)
ffc0c6ec: 2f 80 00 01 cmpwi cr7,r0,1
ffc0c6f0: 40 be 00 88 bne+ cr7,ffc0c778 <IMFS_evaluate_for_make+0x218>
ffc0c6f4: 80 1c 00 5c lwz r0,92(r28)
ffc0c6f8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c6fc: 41 9e 00 7c beq- cr7,ffc0c778 <IMFS_evaluate_for_make+0x218>
IMFS_skip_separator( path, &pathlen, &i);
ffc0c700: 7f c3 f3 78 mr r3,r30
ffc0c704: 38 81 00 08 addi r4,r1,8
ffc0c708: 38 a1 00 10 addi r5,r1,16
ffc0c70c: 4b ff f8 ad bl ffc0bfb8 <IMFS_skip_separator>
if ((path[i] != '.') || (path[i + 1] != '.')) {
ffc0c710: 81 21 00 10 lwz r9,16(r1)
ffc0c714: 7c 1e 48 ae lbzx r0,r30,r9
ffc0c718: 7c 7e 4a 14 add r3,r30,r9
ffc0c71c: 2f 80 00 2e cmpwi cr7,r0,46
ffc0c720: 40 9e 00 10 bne- cr7,ffc0c730 <IMFS_evaluate_for_make+0x1d0>
ffc0c724: 88 03 00 01 lbz r0,1(r3)
ffc0c728: 2f 80 00 2e cmpwi cr7,r0,46
ffc0c72c: 41 be 00 34 beq+ cr7,ffc0c760 <IMFS_evaluate_for_make+0x200><== ALWAYS TAKEN
*pathloc = node->info.directory.mt_fs->mt_fs_root;
ffc0c730: 81 7c 00 5c lwz r11,92(r28)
ffc0c734: 39 6b 00 1c addi r11,r11,28
ffc0c738: 7c ab a4 aa lswi r5,r11,20
ffc0c73c: 7c bf a5 aa stswi r5,r31,20
return (*pathloc->ops->evalformake_h)( &path[i],
ffc0c740: 81 3f 00 0c lwz r9,12(r31)
ffc0c744: 80 09 00 04 lwz r0,4(r9)
ffc0c748: 7f e4 fb 78 mr r4,r31
ffc0c74c: 7c 09 03 a6 mtctr r0
ffc0c750: 7f a5 eb 78 mr r5,r29
ffc0c754: 4e 80 04 21 bctrl
ffc0c758: 7c 7c 1b 78 mr r28,r3
ffc0c75c: 48 00 00 d4 b ffc0c830 <IMFS_evaluate_for_make+0x2d0>
pathloc,
name );
}
i += 2;
ffc0c760: 39 29 00 02 addi r9,r9,2
pathlen -= 2;
node = node->Parent;
ffc0c764: 83 9c 00 08 lwz r28,8(r28)
*pathloc = node->info.directory.mt_fs->mt_fs_root;
return (*pathloc->ops->evalformake_h)( &path[i],
pathloc,
name );
}
i += 2;
ffc0c768: 91 21 00 10 stw r9,16(r1)
pathlen -= 2;
ffc0c76c: 81 21 00 08 lwz r9,8(r1)
ffc0c770: 38 09 ff fe addi r0,r9,-2
ffc0c774: 90 01 00 08 stw r0,8(r1)
node = node->Parent;
}
pathloc->node_access = node;
ffc0c778: 93 9f 00 00 stw r28,0(r31)
ffc0c77c: 4b ff fe 18 b ffc0c594 <IMFS_evaluate_for_make+0x34>
}
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
ffc0c780: 48 00 34 1d bl ffc0fb9c <__errno>
ffc0c784: 38 00 00 11 li r0,17
ffc0c788: 48 00 00 a0 b ffc0c828 <IMFS_evaluate_for_make+0x2c8>
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
ffc0c78c: 48 00 34 11 bl ffc0fb9c <__errno>
ffc0c790: 38 00 00 5b li r0,91
ffc0c794: 48 00 00 94 b ffc0c828 <IMFS_evaluate_for_make+0x2c8>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
ffc0c798: 80 01 00 0c lwz r0,12(r1)
ffc0c79c: 81 21 00 10 lwz r9,16(r1)
ffc0c7a0: 7c 00 48 50 subf r0,r0,r9
ffc0c7a4: 7c 1e 02 14 add r0,r30,r0
ffc0c7a8: 90 1d 00 00 stw r0,0(r29)
/*
* 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++) {
ffc0c7ac: 48 00 00 28 b ffc0c7d4 <IMFS_evaluate_for_make+0x274>
if ( !IMFS_is_separator( path[ i ] ) )
ffc0c7b0: 4b ff 91 31 bl ffc058e0 <rtems_filesystem_is_separator>
ffc0c7b4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c7b8: 40 be 00 10 bne+ cr7,ffc0c7c8 <IMFS_evaluate_for_make+0x268>
rtems_set_errno_and_return_minus_one( ENOENT );
ffc0c7bc: 48 00 33 e1 bl ffc0fb9c <__errno>
ffc0c7c0: 38 00 00 02 li r0,2
ffc0c7c4: 48 00 00 64 b ffc0c828 <IMFS_evaluate_for_make+0x2c8>
/*
* 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++) {
ffc0c7c8: 81 21 00 10 lwz r9,16(r1)
ffc0c7cc: 38 09 00 01 addi r0,r9,1
ffc0c7d0: 90 01 00 10 stw r0,16(r1)
ffc0c7d4: 80 01 00 10 lwz r0,16(r1)
ffc0c7d8: 7c 7e 00 ae lbzx r3,r30,r0
ffc0c7dc: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c7e0: 40 9e ff d0 bne+ cr7,ffc0c7b0 <IMFS_evaluate_for_make+0x250>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
ffc0c7e4: 7f e3 fb 78 mr r3,r31
ffc0c7e8: 4b ff f8 3d bl ffc0c024 <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
ffc0c7ec: 81 3f 00 00 lwz r9,0(r31)
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
ffc0c7f0: 7c 7c 1b 78 mr r28,r3
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
ffc0c7f4: 80 09 00 4c lwz r0,76(r9)
ffc0c7f8: 2f 80 00 01 cmpwi cr7,r0,1
ffc0c7fc: 41 be 00 10 beq+ cr7,ffc0c80c <IMFS_evaluate_for_make+0x2ac><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
ffc0c800: 48 00 33 9d bl ffc0fb9c <__errno>
ffc0c804: 38 00 00 14 li r0,20
ffc0c808: 48 00 00 20 b ffc0c828 <IMFS_evaluate_for_make+0x2c8>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
ffc0c80c: 7f e3 fb 78 mr r3,r31
ffc0c810: 38 80 00 03 li r4,3
ffc0c814: 4b ff f8 81 bl ffc0c094 <IMFS_evaluate_permission>
ffc0c818: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c81c: 40 be 00 14 bne+ cr7,ffc0c830 <IMFS_evaluate_for_make+0x2d0>
rtems_set_errno_and_return_minus_one( EACCES );
ffc0c820: 48 00 33 7d bl ffc0fb9c <__errno>
ffc0c824: 38 00 00 0d li r0,13
ffc0c828: 90 03 00 00 stw r0,0(r3)
ffc0c82c: 3b 80 ff ff li r28,-1
return result;
}
ffc0c830: 39 61 00 50 addi r11,r1,80
ffc0c834: 7f 83 e3 78 mr r3,r28
ffc0c838: 4b ff 3c e8 b ffc00520 <_restgpr_26_x>
ffc0c094 <IMFS_evaluate_permission>:
*/
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
ffc0c094: 7c 08 02 a6 mflr r0
ffc0c098: 94 21 ff f8 stwu r1,-8(r1)
ffc0c09c: 90 01 00 0c stw r0,12(r1)
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
ffc0c0a0: 54 80 00 39 rlwinm. r0,r4,0,0,28
ffc0c0a4: 41 a2 00 18 beq+ ffc0c0bc <IMFS_evaluate_permission+0x28><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
ffc0c0a8: 48 00 3a f5 bl ffc0fb9c <__errno> <== NOT EXECUTED
ffc0c0ac: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc0c0b0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
ffc0c0b4: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc0c0b8: 48 00 00 20 b ffc0c0d8 <IMFS_evaluate_permission+0x44><== NOT EXECUTED
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
ffc0c0bc: 81 23 00 00 lwz r9,0(r3)
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
ffc0c0c0: 54 84 30 32 rlwinm r4,r4,6,0,25
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
ffc0c0c4: 80 69 00 30 lwz r3,48(r9)
ffc0c0c8: 7c 83 18 38 and r3,r4,r3
return 1;
ffc0c0cc: 7c 63 22 78 xor r3,r3,r4
ffc0c0d0: 7c 63 00 34 cntlzw r3,r3
ffc0c0d4: 54 63 d9 7e rlwinm r3,r3,27,5,31
return 0;
}
ffc0c0d8: 80 01 00 0c lwz r0,12(r1)
ffc0c0dc: 38 21 00 08 addi r1,r1,8
ffc0c0e0: 7c 08 03 a6 mtlr r0
ffc0c0e4: 4e 80 00 20 blr
ffc04de0 <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
ffc04de0: 94 21 ff f0 stwu r1,-16(r1)
ffc04de4: 7c 08 02 a6 mflr r0
ffc04de8: 7c 68 1b 78 mr r8,r3
ffc04dec: 90 01 00 14 stw r0,20(r1)
ffc04df0: bf c1 00 08 stmw r30,8(r1)
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
ffc04df4: 81 23 00 1c lwz r9,28(r3)
ffc04df8: 80 69 00 50 lwz r3,80(r9)
ffc04dfc: 48 00 a2 95 bl ffc0f090 <pipe_lseek>
ffc04e00: 7c 7e fe 70 srawi r30,r3,31
IMFS_FIFO_RETURN(err);
ffc04e04: 2f 9e 00 00 cmpwi cr7,r30,0
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
ffc04e08: 7c 7f 1b 78 mr r31,r3
IMFS_FIFO_RETURN(err);
ffc04e0c: 40 bc 00 18 bge+ cr7,ffc04e24 <IMFS_fifo_lseek+0x44> <== NEVER TAKEN
ffc04e10: 48 00 c5 09 bl ffc11318 <__errno>
ffc04e14: 7c 1f 00 d0 neg r0,r31
ffc04e18: 90 03 00 00 stw r0,0(r3)
ffc04e1c: 3b c0 ff ff li r30,-1
ffc04e20: 3b e0 ff ff li r31,-1
}
ffc04e24: 39 61 00 10 addi r11,r1,16
ffc04e28: 7f c3 f3 78 mr r3,r30
ffc04e2c: 7f e4 fb 78 mr r4,r31
ffc04e30: 48 01 ac 9c b ffc1facc <_restgpr_30_x>
ffc04e34 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
ffc04e34: 94 21 ff e0 stwu r1,-32(r1)
ffc04e38: 7c 08 02 a6 mflr r0
ffc04e3c: 7c 66 1b 78 mr r6,r3
ffc04e40: 90 01 00 24 stw r0,36(r1)
ffc04e44: bf c1 00 18 stmw r30,24(r1)
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
ffc04e48: 83 e3 00 1c lwz r31,28(r3)
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
ffc04e4c: 80 7f 00 50 lwz r3,80(r31)
ffc04e50: 48 00 a0 05 bl ffc0ee54 <pipe_write>
if (err > 0) {
ffc04e54: 7c 7e 1b 79 mr. r30,r3
ffc04e58: 40 81 00 20 ble- ffc04e78 <IMFS_fifo_write+0x44>
IMFS_mtime_ctime_update(jnode);
ffc04e5c: 38 61 00 08 addi r3,r1,8
ffc04e60: 38 80 00 00 li r4,0
ffc04e64: 48 00 12 35 bl ffc06098 <gettimeofday>
ffc04e68: 80 01 00 08 lwz r0,8(r1)
ffc04e6c: 90 1f 00 44 stw r0,68(r31)
ffc04e70: 90 1f 00 48 stw r0,72(r31)
ffc04e74: 48 00 00 18 b ffc04e8c <IMFS_fifo_write+0x58>
}
IMFS_FIFO_RETURN(err);
ffc04e78: 41 a2 00 14 beq+ ffc04e8c <IMFS_fifo_write+0x58> <== NEVER TAKEN
ffc04e7c: 7f de 00 d0 neg r30,r30
ffc04e80: 48 00 c4 99 bl ffc11318 <__errno>
ffc04e84: 93 c3 00 00 stw r30,0(r3)
ffc04e88: 3b c0 ff ff li r30,-1
}
ffc04e8c: 39 61 00 20 addi r11,r1,32
ffc04e90: 7f c3 f3 78 mr r3,r30
ffc04e94: 48 01 ac 38 b ffc1facc <_restgpr_30_x>
ffc0c8fc <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
ffc0c8fc: 94 21 ff e8 stwu r1,-24(r1)
ffc0c900: 7c 08 02 a6 mflr r0
ffc0c904: bf a1 00 0c stmw r29,12(r1)
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
ffc0c908: 3f c0 ff c2 lis r30,-62
ffc0c90c: 3b de c4 30 addi r30,r30,-15312
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
ffc0c910: 7c 7f 1b 78 mr r31,r3
ffc0c914: 90 01 00 1c stw r0,28(r1)
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
ffc0c918: 7c 83 23 78 mr r3,r4
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
ffc0c91c: 7c 9d 23 78 mr r29,r4
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
ffc0c920: 7f c4 f3 78 mr r4,r30
ffc0c924: 48 00 45 c9 bl ffc10eec <strcmp>
ffc0c928: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c92c: 41 9e 00 58 beq- cr7,ffc0c984 <IMFS_find_match_in_dir+0x88><== NEVER TAKEN
return directory;
if ( !strcmp( name, dotdotname ) )
ffc0c930: 7f a3 eb 78 mr r3,r29
ffc0c934: 38 9e 00 04 addi r4,r30,4
ffc0c938: 48 00 45 b5 bl ffc10eec <strcmp>
ffc0c93c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c940: 40 be 00 0c bne+ cr7,ffc0c94c <IMFS_find_match_in_dir+0x50><== ALWAYS TAKEN
return directory->Parent;
ffc0c944: 83 ff 00 08 lwz r31,8(r31) <== NOT EXECUTED
ffc0c948: 48 00 00 3c b ffc0c984 <IMFS_find_match_in_dir+0x88> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0c94c: 83 df 00 50 lwz r30,80(r31)
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
ffc0c950: 3b ff 00 54 addi r31,r31,84
the_chain = &directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
ffc0c954: 48 00 00 1c b ffc0c970 <IMFS_find_match_in_dir+0x74>
!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 ) )
ffc0c958: 7f a3 eb 78 mr r3,r29
ffc0c95c: 38 9e 00 0c addi r4,r30,12
ffc0c960: 48 00 45 8d bl ffc10eec <strcmp>
ffc0c964: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c968: 41 9e 00 18 beq- cr7,ffc0c980 <IMFS_find_match_in_dir+0x84>
the_chain = &directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
ffc0c96c: 83 de 00 00 lwz r30,0(r30)
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
ffc0c970: 7f 9e f8 00 cmpw cr7,r30,r31
ffc0c974: 40 9e ff e4 bne+ cr7,ffc0c958 <IMFS_find_match_in_dir+0x5c>
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
ffc0c978: 3b e0 00 00 li r31,0
ffc0c97c: 48 00 00 08 b ffc0c984 <IMFS_find_match_in_dir+0x88>
!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 ) )
ffc0c980: 7f df f3 78 mr r31,r30
return the_jnode;
}
return 0;
}
ffc0c984: 39 61 00 18 addi r11,r1,24
ffc0c988: 7f e3 fb 78 mr r3,r31
ffc0c98c: 4b ff 3b a0 b ffc0052c <_restgpr_29_x>
ffc0c83c <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
)
{
ffc0c83c: 94 21 ff c8 stwu r1,-56(r1)
ffc0c840: 7c 08 02 a6 mflr r0
/*
* 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;
ffc0c844: 7c 6b 1b 78 mr r11,r3
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
ffc0c848: 90 01 00 3c stw r0,60(r1)
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
loc = temp_mt_entry->mt_fs_root;
ffc0c84c: 38 81 00 08 addi r4,r1,8
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
ffc0c850: 38 00 00 00 li r0,0
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
ffc0c854: bf a1 00 2c stmw r29,44(r1)
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
ffc0c858: 7c 9e 23 78 mr r30,r4
/*
* 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;
ffc0c85c: 87 eb 00 1c lwzu r31,28(r11)
loc = temp_mt_entry->mt_fs_root;
ffc0c860: 7c ab a4 aa lswi r5,r11,20
ffc0c864: 7c a4 a5 aa stswi r5,r4,20
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
ffc0c868: 90 03 00 1c stw r0,28(r3)
ffc0c86c: 48 00 00 08 b ffc0c874 <IMFS_fsunmount+0x38>
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
ffc0c870: 7c 1f 03 78 mr r31,r0
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
ffc0c874: 7f c3 f3 78 mr r3,r30
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
ffc0c878: 83 bf 00 08 lwz r29,8(r31)
loc.node_access = (void *)jnode;
ffc0c87c: 93 e1 00 08 stw r31,8(r1)
IMFS_Set_handlers( &loc );
ffc0c880: 4b ff f7 a5 bl ffc0c024 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
ffc0c884: 80 1f 00 4c lwz r0,76(r31)
ffc0c888: 2f 80 00 01 cmpwi cr7,r0,1
ffc0c88c: 40 9e 00 14 bne- cr7,ffc0c8a0 <IMFS_fsunmount+0x64>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
ffc0c890: 81 3f 00 50 lwz r9,80(r31)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0c894: 38 1f 00 54 addi r0,r31,84
ffc0c898: 7f 89 00 00 cmpw cr7,r9,r0
ffc0c89c: 40 be 00 1c bne+ cr7,ffc0c8b8 <IMFS_fsunmount+0x7c>
result = IMFS_unlink( NULL, &loc );
ffc0c8a0: 38 60 00 00 li r3,0
ffc0c8a4: 7f c4 f3 78 mr r4,r30
ffc0c8a8: 4b ff 77 51 bl ffc03ff8 <IMFS_unlink>
if (result != 0)
ffc0c8ac: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c8b0: 40 9e 00 38 bne- cr7,ffc0c8e8 <IMFS_fsunmount+0xac> <== NEVER TAKEN
return -1;
jnode = next;
ffc0c8b4: 7f bf eb 78 mr r31,r29
}
if ( jnode != NULL ) {
ffc0c8b8: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0c8bc: 41 9e 00 34 beq- cr7,ffc0c8f0 <IMFS_fsunmount+0xb4>
if ( jnode->type == IMFS_DIRECTORY ) {
ffc0c8c0: 80 1f 00 4c lwz r0,76(r31)
ffc0c8c4: 2f 80 00 01 cmpwi cr7,r0,1
ffc0c8c8: 40 9e ff ac bne+ cr7,ffc0c874 <IMFS_fsunmount+0x38> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0c8cc: 80 1f 00 50 lwz r0,80(r31)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0c8d0: 39 3f 00 54 addi r9,r31,84
if ( jnode_has_children( jnode ) )
ffc0c8d4: 7f 80 48 00 cmpw cr7,r0,r9
ffc0c8d8: 41 be ff 9c beq- cr7,ffc0c874 <IMFS_fsunmount+0x38>
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
ffc0c8dc: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c8e0: 40 9e ff 90 bne+ cr7,ffc0c870 <IMFS_fsunmount+0x34> <== ALWAYS TAKEN
ffc0c8e4: 48 00 00 0c b ffc0c8f0 <IMFS_fsunmount+0xb4> <== NOT EXECUTED
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
ffc0c8e8: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc0c8ec: 48 00 00 08 b ffc0c8f4 <IMFS_fsunmount+0xb8> <== NOT EXECUTED
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
return 0;
ffc0c8f0: 38 60 00 00 li r3,0
}
ffc0c8f4: 39 61 00 38 addi r11,r1,56
ffc0c8f8: 4b ff 3c 34 b ffc0052c <_restgpr_29_x>
ffc0c990 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
ffc0c990: 94 21 ff e0 stwu r1,-32(r1)
ffc0c994: 7c 08 02 a6 mflr r0
ffc0c998: bf 41 00 08 stmw r26,8(r1)
ffc0c99c: 7c 7f 1b 78 mr r31,r3
ffc0c9a0: 7c 9d 23 78 mr r29,r4
ffc0c9a4: 90 01 00 24 stw r0,36(r1)
ffc0c9a8: 7c be 2b 78 mr r30,r5
ffc0c9ac: 7c da 33 78 mr r26,r6
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
ffc0c9b0: 8b 63 00 00 lbz r27,0(r3)
int pathlen,
char *token,
int *token_len
)
{
register int i = 0;
ffc0c9b4: 3b 80 00 00 li r28,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) ) {
ffc0c9b8: 48 00 00 18 b ffc0c9d0 <IMFS_get_token+0x40>
token[i] = c;
if ( i == IMFS_NAME_MAX )
ffc0c9bc: 2f 9c 00 20 cmpwi cr7,r28,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;
ffc0c9c0: 7f 7e e1 ae stbx r27,r30,r28
if ( i == IMFS_NAME_MAX )
ffc0c9c4: 41 9e 00 b4 beq- cr7,ffc0ca78 <IMFS_get_token+0xe8>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
ffc0c9c8: 3b 9c 00 01 addi r28,r28,1
ffc0c9cc: 7f 7f e0 ae lbzx r27,r31,r28
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
ffc0c9d0: 7f 63 db 78 mr r3,r27
ffc0c9d4: 4b ff 8f 0d bl ffc058e0 <rtems_filesystem_is_separator>
ffc0c9d8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c9dc: 40 9e 00 0c bne- cr7,ffc0c9e8 <IMFS_get_token+0x58>
ffc0c9e0: 7f 9c e8 00 cmpw cr7,r28,r29
ffc0c9e4: 41 9c ff d8 blt+ cr7,ffc0c9bc <IMFS_get_token+0x2c>
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
ffc0c9e8: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0c9ec: 40 9e 00 30 bne- cr7,ffc0ca1c <IMFS_get_token+0x8c>
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
ffc0c9f0: 2f 9b 00 00 cmpwi cr7,r27,0
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
token[i] = c;
ffc0c9f4: 9b 7e 00 00 stb r27,0(r30)
if ( (token[i] != '\0') && pathlen ) {
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
ffc0c9f8: 3b e0 00 00 li r31,0
*/
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
ffc0c9fc: 41 9e 00 3c beq- cr7,ffc0ca38 <IMFS_get_token+0xa8>
ffc0ca00: 2f 9d 00 00 cmpwi cr7,r29,0
i++;
type = IMFS_CURRENT_DIR;
ffc0ca04: 3b e0 00 01 li r31,1
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
i++;
ffc0ca08: 3b 80 00 01 li r28,1
*/
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
ffc0ca0c: 40 9e 00 2c bne- cr7,ffc0ca38 <IMFS_get_token+0xa8>
ffc0ca10: 3b 80 00 00 li r28,0
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
ffc0ca14: 3b e0 00 00 li r31,0
ffc0ca18: 48 00 00 20 b ffc0ca38 <IMFS_get_token+0xa8>
}
} else if (token[ i-1 ] != '\0') {
ffc0ca1c: 7d 3e e2 14 add r9,r30,r28
ffc0ca20: 88 09 ff ff lbz r0,-1(r9)
char *token,
int *token_len
)
{
register int i = 0;
IMFS_token_types type = IMFS_NAME;
ffc0ca24: 3b e0 00 03 li r31,3
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
ffc0ca28: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ca2c: 41 9e 00 0c beq- cr7,ffc0ca38 <IMFS_get_token+0xa8> <== NEVER TAKEN
token[i] = '\0';
ffc0ca30: 38 00 00 00 li r0,0
ffc0ca34: 7c 1e e1 ae stbx r0,r30,r28
/*
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
ffc0ca38: 2f 9f 00 03 cmpwi cr7,r31,3
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
ffc0ca3c: 93 9a 00 00 stw r28,0(r26)
/*
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
ffc0ca40: 40 be 00 4c bne+ cr7,ffc0ca8c <IMFS_get_token+0xfc>
if ( strcmp( token, "..") == 0 )
ffc0ca44: 3c 80 ff c2 lis r4,-62
ffc0ca48: 7f c3 f3 78 mr r3,r30
ffc0ca4c: 38 84 c4 37 addi r4,r4,-15305
ffc0ca50: 48 00 44 9d bl ffc10eec <strcmp>
ffc0ca54: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ca58: 41 9e 00 28 beq- cr7,ffc0ca80 <IMFS_get_token+0xf0>
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
ffc0ca5c: 3c 80 ff c2 lis r4,-62
ffc0ca60: 7f c3 f3 78 mr r3,r30
ffc0ca64: 38 84 c4 38 addi r4,r4,-15304
ffc0ca68: 48 00 44 85 bl ffc10eec <strcmp>
ffc0ca6c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ca70: 41 9e 00 18 beq- cr7,ffc0ca88 <IMFS_get_token+0xf8>
ffc0ca74: 48 00 00 18 b ffc0ca8c <IMFS_get_token+0xfc>
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
token[i] = c;
if ( i == IMFS_NAME_MAX )
return IMFS_INVALID_TOKEN;
ffc0ca78: 3b e0 00 04 li r31,4
ffc0ca7c: 48 00 00 10 b ffc0ca8c <IMFS_get_token+0xfc>
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
ffc0ca80: 3b e0 00 02 li r31,2
ffc0ca84: 48 00 00 08 b ffc0ca8c <IMFS_get_token+0xfc>
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
ffc0ca88: 3b e0 00 01 li r31,1
}
return type;
}
ffc0ca8c: 39 61 00 20 addi r11,r1,32
ffc0ca90: 7f e3 fb 78 mr r3,r31
ffc0ca94: 4b ff 3a 8c b ffc00520 <_restgpr_26_x>
ffc0ea5c <IMFS_memfile_extend>:
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
ffc0ea5c: 94 21 ff d8 stwu r1,-40(r1)
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
ffc0ea60: 3d 20 00 00 lis r9,0
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
ffc0ea64: 7c 08 02 a6 mflr r0
ffc0ea68: bf 01 00 08 stmw r24,8(r1)
ffc0ea6c: 7c 7f 1b 78 mr r31,r3
ffc0ea70: 7c bc 2b 78 mr r28,r5
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
ffc0ea74: 83 c9 27 a4 lwz r30,10148(r9)
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
ffc0ea78: 7c dd 33 78 mr r29,r6
ffc0ea7c: 90 01 00 2c stw r0,44(r1)
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
ffc0ea80: 57 c9 f0 be rlwinm r9,r30,30,2,31
ffc0ea84: 39 69 00 01 addi r11,r9,1
ffc0ea88: 7d 6b 49 d6 mullw r11,r11,r9
ffc0ea8c: 38 0b 00 01 addi r0,r11,1
ffc0ea90: 7d 20 49 d6 mullw r9,r0,r9
ffc0ea94: 38 00 00 00 li r0,0
ffc0ea98: 7f 80 28 00 cmpw cr7,r0,r5
ffc0ea9c: 39 29 ff ff addi r9,r9,-1
ffc0eaa0: 7d 29 f1 d6 mullw r9,r9,r30
ffc0eaa4: 41 bd 00 1c bgt+ cr7,ffc0eac0 <IMFS_memfile_extend+0x64><== NEVER TAKEN
ffc0eaa8: 40 9e 00 0c bne- cr7,ffc0eab4 <IMFS_memfile_extend+0x58><== NEVER TAKEN
ffc0eaac: 7f 89 30 40 cmplw cr7,r9,r6
ffc0eab0: 41 bd 00 10 bgt+ cr7,ffc0eac0 <IMFS_memfile_extend+0x64>
rtems_set_errno_and_return_minus_one( EINVAL );
ffc0eab4: 48 00 10 e9 bl ffc0fb9c <__errno>
ffc0eab8: 38 00 00 16 li r0,22
ffc0eabc: 48 00 00 94 b ffc0eb50 <IMFS_memfile_extend+0xf4>
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
ffc0eac0: 83 3f 00 50 lwz r25,80(r31)
ffc0eac4: 83 5f 00 54 lwz r26,84(r31)
ffc0eac8: 7f 9c c8 00 cmpw cr7,r28,r25
ffc0eacc: 41 bd 00 10 bgt+ cr7,ffc0eadc <IMFS_memfile_extend+0x80><== NEVER TAKEN
ffc0ead0: 40 9e 00 a0 bne- cr7,ffc0eb70 <IMFS_memfile_extend+0x114><== NEVER TAKEN
ffc0ead4: 7f 9d d0 40 cmplw cr7,r29,r26
ffc0ead8: 40 9d 00 98 ble- cr7,ffc0eb70 <IMFS_memfile_extend+0x114>
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0eadc: 7f db fe 70 srawi r27,r30,31
ffc0eae0: 7f 65 db 78 mr r5,r27
ffc0eae4: 7f c6 f3 78 mr r6,r30
ffc0eae8: 7f 83 e3 78 mr r3,r28
ffc0eaec: 7f a4 eb 78 mr r4,r29
ffc0eaf0: 48 00 a7 e1 bl ffc192d0 <__divdi3>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0eaf4: 7f 65 db 78 mr r5,r27
ffc0eaf8: 7f c6 f3 78 mr r6,r30
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0eafc: 7c 98 23 78 mr r24,r4
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0eb00: 7f 23 cb 78 mr r3,r25
ffc0eb04: 7f 44 d3 78 mr r4,r26
ffc0eb08: 48 00 a7 c9 bl ffc192d0 <__divdi3>
ffc0eb0c: 7c 9b 23 78 mr r27,r4
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
ffc0eb10: 7c 9e 23 78 mr r30,r4
ffc0eb14: 48 00 00 4c b ffc0eb60 <IMFS_memfile_extend+0x104>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
ffc0eb18: 7f e3 fb 78 mr r3,r31
ffc0eb1c: 7f c4 f3 78 mr r4,r30
ffc0eb20: 4b ff fc e9 bl ffc0e808 <IMFS_memfile_addblock>
ffc0eb24: 2f 83 00 00 cmpwi cr7,r3,0
ffc0eb28: 41 be 00 34 beq+ cr7,ffc0eb5c <IMFS_memfile_extend+0x100>
ffc0eb2c: 48 00 00 14 b ffc0eb40 <IMFS_memfile_extend+0xe4>
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
ffc0eb30: 7f c4 f3 78 mr r4,r30
ffc0eb34: 7f e3 fb 78 mr r3,r31
ffc0eb38: 4b ff fe e9 bl ffc0ea20 <IMFS_memfile_remove_block>
/*
* 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-- ) {
ffc0eb3c: 3b de ff ff addi r30,r30,-1
ffc0eb40: 7f 9e d8 40 cmplw cr7,r30,r27
ffc0eb44: 40 9c ff ec bge+ cr7,ffc0eb30 <IMFS_memfile_extend+0xd4>
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
ffc0eb48: 48 00 10 55 bl ffc0fb9c <__errno>
ffc0eb4c: 38 00 00 1c li r0,28
ffc0eb50: 90 03 00 00 stw r0,0(r3)
ffc0eb54: 38 60 ff ff li r3,-1
ffc0eb58: 48 00 00 1c b ffc0eb74 <IMFS_memfile_extend+0x118>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
ffc0eb5c: 3b de 00 01 addi r30,r30,1
ffc0eb60: 7f 9e c0 40 cmplw cr7,r30,r24
ffc0eb64: 40 9d ff b4 ble+ cr7,ffc0eb18 <IMFS_memfile_extend+0xbc>
}
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
ffc0eb68: 93 9f 00 50 stw r28,80(r31)
ffc0eb6c: 93 bf 00 54 stw r29,84(r31)
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
return 0;
ffc0eb70: 38 60 00 00 li r3,0
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
ffc0eb74: 39 61 00 28 addi r11,r1,40
ffc0eb78: 4b ff 19 a0 b ffc00518 <_restgpr_24_x>
ffc0e41c <IMFS_memfile_get_block_pointer>:
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
ffc0e41c: 3d 20 00 00 lis r9,0
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
ffc0e420: 94 21 ff e0 stwu r1,-32(r1)
ffc0e424: 7c 08 02 a6 mflr r0
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
ffc0e428: 81 29 27 a4 lwz r9,10148(r9)
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
ffc0e42c: 90 01 00 24 stw r0,36(r1)
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
ffc0e430: 55 29 f0 be rlwinm r9,r9,30,2,31
ffc0e434: 38 09 ff ff addi r0,r9,-1
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
ffc0e438: bf 61 00 0c stmw r27,12(r1)
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
ffc0e43c: 7f 84 00 40 cmplw cr7,r4,r0
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
ffc0e440: 7c 7f 1b 78 mr r31,r3
ffc0e444: 7c 9e 23 78 mr r30,r4
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
ffc0e448: 41 9d 00 44 bgt- cr7,ffc0e48c <IMFS_memfile_get_block_pointer+0x70>
p = info->indirect;
if ( malloc_it ) {
ffc0e44c: 2f 05 00 00 cmpwi cr6,r5,0
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
p = info->indirect;
ffc0e450: 80 03 00 58 lwz r0,88(r3)
ffc0e454: 2f 80 00 00 cmpwi cr7,r0,0
if ( malloc_it ) {
ffc0e458: 41 9a 00 2c beq- cr6,ffc0e484 <IMFS_memfile_get_block_pointer+0x68>
if ( !p ) {
ffc0e45c: 40 be 00 18 bne+ cr7,ffc0e474 <IMFS_memfile_get_block_pointer+0x58>
p = memfile_alloc_block();
ffc0e460: 4b ff ff 79 bl ffc0e3d8 <memfile_alloc_block>
if ( !p )
return 0;
ffc0e464: 3b a0 00 00 li r29,0
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
ffc0e468: 2c 03 00 00 cmpwi r3,0
ffc0e46c: 41 82 01 78 beq- ffc0e5e4 <IMFS_memfile_get_block_pointer+0x1c8><== NEVER TAKEN
return 0;
info->indirect = p;
ffc0e470: 90 7f 00 58 stw r3,88(r31)
}
return &info->indirect[ my_block ];
ffc0e474: 83 bf 00 58 lwz r29,88(r31)
ffc0e478: 57 de 10 3a rlwinm r30,r30,2,0,29
ffc0e47c: 7f bd f2 14 add r29,r29,r30
ffc0e480: 48 00 01 64 b ffc0e5e4 <IMFS_memfile_get_block_pointer+0x1c8>
}
if ( !p )
ffc0e484: 40 be 01 50 bne+ cr7,ffc0e5d4 <IMFS_memfile_get_block_pointer+0x1b8><== ALWAYS TAKEN
ffc0e488: 48 00 01 58 b ffc0e5e0 <IMFS_memfile_get_block_pointer+0x1c4><== NOT EXECUTED
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
ffc0e48c: 39 69 00 01 addi r11,r9,1
ffc0e490: 7d 6b 49 d6 mullw r11,r11,r9
ffc0e494: 38 0b ff ff addi r0,r11,-1
ffc0e498: 7f 84 00 40 cmplw cr7,r4,r0
ffc0e49c: 41 9d 00 60 bgt- cr7,ffc0e4fc <IMFS_memfile_get_block_pointer+0xe0>
my_block -= FIRST_DOUBLY_INDIRECT;
ffc0e4a0: 7f c9 20 50 subf r30,r9,r4
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
ffc0e4a4: 80 63 00 5c lwz r3,92(r3)
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
ffc0e4a8: 7f 9e 4b 96 divwu r28,r30,r9
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
if ( malloc_it ) {
ffc0e4ac: 2f 05 00 00 cmpwi cr6,r5,0
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
ffc0e4b0: 7d 3c 49 d6 mullw r9,r28,r9
ffc0e4b4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e4b8: 7f c9 f0 50 subf r30,r9,r30
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
if ( malloc_it ) {
ffc0e4bc: 41 9a 00 2c beq- cr6,ffc0e4e8 <IMFS_memfile_get_block_pointer+0xcc>
if ( !p ) {
ffc0e4c0: 40 be 00 18 bne+ cr7,ffc0e4d8 <IMFS_memfile_get_block_pointer+0xbc>
p = memfile_alloc_block();
ffc0e4c4: 4b ff ff 15 bl ffc0e3d8 <memfile_alloc_block>
if ( !p )
return 0;
ffc0e4c8: 3b a0 00 00 li r29,0
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
ffc0e4cc: 2c 03 00 00 cmpwi r3,0
ffc0e4d0: 41 82 01 14 beq- ffc0e5e4 <IMFS_memfile_get_block_pointer+0x1c8><== NEVER TAKEN
return 0;
info->doubly_indirect = p;
ffc0e4d4: 90 7f 00 5c stw r3,92(r31)
}
p1 = (block_p *)p[ doubly ];
ffc0e4d8: 57 9c 10 3a rlwinm r28,r28,2,0,29
ffc0e4dc: 7f e3 e2 14 add r31,r3,r28
ffc0e4e0: 7c 63 e0 2e lwzx r3,r3,r28
ffc0e4e4: 48 00 00 a4 b ffc0e588 <IMFS_memfile_get_block_pointer+0x16c>
}
return (block_p *)&p1[ singly ];
}
if ( !p )
ffc0e4e8: 41 9e 00 f8 beq- cr7,ffc0e5e0 <IMFS_memfile_get_block_pointer+0x1c4><== NEVER TAKEN
return 0;
p = (block_p *)p[ doubly ];
ffc0e4ec: 57 9c 10 3a rlwinm r28,r28,2,0,29
ffc0e4f0: 7c 03 e0 2e lwzx r0,r3,r28
if ( !p )
return 0;
ffc0e4f4: 3b a0 00 00 li r29,0
ffc0e4f8: 48 00 00 d4 b ffc0e5cc <IMFS_memfile_get_block_pointer+0x1b0>
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
ffc0e4fc: 39 4b 00 01 addi r10,r11,1
ffc0e500: 7d 4a 49 d6 mullw r10,r10,r9
}
/*
* This means the requested block number is out of range.
*/
return 0;
ffc0e504: 3b a0 00 00 li r29,0
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
ffc0e508: 38 0a ff ff addi r0,r10,-1
ffc0e50c: 7f 84 00 40 cmplw cr7,r4,r0
ffc0e510: 41 9d 00 d4 bgt- cr7,ffc0e5e4 <IMFS_memfile_get_block_pointer+0x1c8><== NEVER TAKEN
my_block -= FIRST_TRIPLY_INDIRECT;
ffc0e514: 7f cb 20 50 subf r30,r11,r4
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
ffc0e518: 80 63 00 60 lwz r3,96(r3)
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
ffc0e51c: 7c 1e 4b 96 divwu r0,r30,r9
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
ffc0e520: 7f 80 4b 96 divwu r28,r0,r9
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
if ( malloc_it ) {
ffc0e524: 2f 05 00 00 cmpwi cr6,r5,0
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
ffc0e528: 7d 60 49 d6 mullw r11,r0,r9
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
ffc0e52c: 7f 7c 49 d6 mullw r27,r28,r9
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
ffc0e530: 7f cb f0 50 subf r30,r11,r30
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
ffc0e534: 7f 7b 00 50 subf r27,r27,r0
ffc0e538: 2f 83 00 00 cmpwi cr7,r3,0
p = info->triply_indirect;
if ( malloc_it ) {
ffc0e53c: 41 9a 00 74 beq- cr6,ffc0e5b0 <IMFS_memfile_get_block_pointer+0x194>
if ( !p ) {
ffc0e540: 40 be 00 14 bne+ cr7,ffc0e554 <IMFS_memfile_get_block_pointer+0x138>
p = memfile_alloc_block();
ffc0e544: 4b ff fe 95 bl ffc0e3d8 <memfile_alloc_block>
if ( !p )
ffc0e548: 2c 03 00 00 cmpwi r3,0
ffc0e54c: 41 82 00 98 beq- ffc0e5e4 <IMFS_memfile_get_block_pointer+0x1c8><== NEVER TAKEN
return 0;
info->triply_indirect = p;
ffc0e550: 90 7f 00 60 stw r3,96(r31)
}
p1 = (block_p *) p[ triply ];
ffc0e554: 57 9c 10 3a rlwinm r28,r28,2,0,29
ffc0e558: 7f e3 e2 14 add r31,r3,r28
ffc0e55c: 7c 63 e0 2e lwzx r3,r3,r28
if ( !p1 ) {
ffc0e560: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e564: 40 be 00 18 bne+ cr7,ffc0e57c <IMFS_memfile_get_block_pointer+0x160>
p1 = memfile_alloc_block();
ffc0e568: 4b ff fe 71 bl ffc0e3d8 <memfile_alloc_block>
if ( !p1 )
return 0;
ffc0e56c: 3b a0 00 00 li r29,0
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
if ( !p1 )
ffc0e570: 2c 03 00 00 cmpwi r3,0
ffc0e574: 41 82 00 70 beq- ffc0e5e4 <IMFS_memfile_get_block_pointer+0x1c8><== NEVER TAKEN
return 0;
p[ triply ] = (block_p) p1;
ffc0e578: 90 7f 00 00 stw r3,0(r31)
}
p2 = (block_p *)p1[ doubly ];
ffc0e57c: 57 7b 10 3a rlwinm r27,r27,2,0,29
ffc0e580: 7f e3 da 14 add r31,r3,r27
ffc0e584: 7c 63 d8 2e lwzx r3,r3,r27
if ( !p2 ) {
ffc0e588: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e58c: 40 be 00 18 bne+ cr7,ffc0e5a4 <IMFS_memfile_get_block_pointer+0x188>
p2 = memfile_alloc_block();
ffc0e590: 4b ff fe 49 bl ffc0e3d8 <memfile_alloc_block>
if ( !p2 )
return 0;
ffc0e594: 3b a0 00 00 li r29,0
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
ffc0e598: 2c 03 00 00 cmpwi r3,0
ffc0e59c: 41 82 00 48 beq- ffc0e5e4 <IMFS_memfile_get_block_pointer+0x1c8><== NEVER TAKEN
return 0;
p1[ doubly ] = (block_p) p2;
ffc0e5a0: 90 7f 00 00 stw r3,0(r31)
}
return (block_p *)&p2[ singly ];
ffc0e5a4: 57 de 10 3a rlwinm r30,r30,2,0,29
ffc0e5a8: 7f a3 f2 14 add r29,r3,r30
ffc0e5ac: 48 00 00 38 b ffc0e5e4 <IMFS_memfile_get_block_pointer+0x1c8>
}
if ( !p )
ffc0e5b0: 41 9e 00 34 beq- cr7,ffc0e5e4 <IMFS_memfile_get_block_pointer+0x1c8><== NEVER TAKEN
return 0;
p1 = (block_p *) p[ triply ];
ffc0e5b4: 57 9c 10 3a rlwinm r28,r28,2,0,29
ffc0e5b8: 7d 23 e0 2e lwzx r9,r3,r28
if ( !p1 )
ffc0e5bc: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e5c0: 41 9e 00 24 beq- cr7,ffc0e5e4 <IMFS_memfile_get_block_pointer+0x1c8><== NEVER TAKEN
return 0;
p2 = (block_p *)p1[ doubly ];
ffc0e5c4: 57 7b 10 3a rlwinm r27,r27,2,0,29
ffc0e5c8: 7c 09 d8 2e lwzx r0,r9,r27
if ( !p2 )
ffc0e5cc: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e5d0: 41 9e 00 14 beq- cr7,ffc0e5e4 <IMFS_memfile_get_block_pointer+0x1c8><== NEVER TAKEN
return 0;
return (block_p *)&p2[ singly ];
ffc0e5d4: 57 de 10 3a rlwinm r30,r30,2,0,29
ffc0e5d8: 7f a0 f2 14 add r29,r0,r30
ffc0e5dc: 48 00 00 08 b ffc0e5e4 <IMFS_memfile_get_block_pointer+0x1c8>
}
return &info->indirect[ my_block ];
}
if ( !p )
return 0;
ffc0e5e0: 3b a0 00 00 li r29,0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
ffc0e5e4: 39 61 00 20 addi r11,r1,32
ffc0e5e8: 7f a3 eb 78 mr r3,r29
ffc0e5ec: 4b ff 1f 38 b ffc00524 <_restgpr_27_x>
ffc0e5f0 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
ffc0e5f0: 94 21 ff c8 stwu r1,-56(r1)
ffc0e5f4: 7c 08 02 a6 mflr r0
ffc0e5f8: 90 01 00 3c stw r0,60(r1)
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
ffc0e5fc: 80 03 00 4c lwz r0,76(r3)
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
ffc0e600: bf 01 00 18 stmw r24,24(r1)
ffc0e604: 7c 7d 1b 78 mr r29,r3
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
ffc0e608: 2f 80 00 06 cmpwi cr7,r0,6
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
ffc0e60c: 7c df 33 78 mr r31,r6
ffc0e610: 7c be 2b 78 mr r30,r5
ffc0e614: 7c fc 3b 78 mr r28,r7
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
ffc0e618: 40 be 00 68 bne+ cr7,ffc0e680 <IMFS_memfile_read+0x90>
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
ffc0e61c: 81 43 00 50 lwz r10,80(r3)
ffc0e620: 38 00 00 00 li r0,0
ffc0e624: 81 63 00 54 lwz r11,84(r3)
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
ffc0e628: 80 83 00 58 lwz r4,88(r3)
if (my_length > (the_jnode->info.linearfile.size - start))
ffc0e62c: 7c ff 58 10 subfc r7,r31,r11
ffc0e630: 7c de 51 10 subfe r6,r30,r10
ffc0e634: 7f 80 30 00 cmpw cr7,r0,r6
ffc0e638: 41 bd 00 10 bgt+ cr7,ffc0e648 <IMFS_memfile_read+0x58> <== NEVER TAKEN
ffc0e63c: 40 9e 00 14 bne- cr7,ffc0e650 <IMFS_memfile_read+0x60> <== NEVER TAKEN
ffc0e640: 7f 88 38 40 cmplw cr7,r8,r7
ffc0e644: 40 9d 00 0c ble- cr7,ffc0e650 <IMFS_memfile_read+0x60> <== NEVER TAKEN
my_length = the_jnode->info.linearfile.size - start;
ffc0e648: 7f 7f 58 50 subf r27,r31,r11
ffc0e64c: 48 00 00 08 b ffc0e654 <IMFS_memfile_read+0x64>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
ffc0e650: 7d 1b 43 78 mr r27,r8 <== NOT EXECUTED
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
ffc0e654: 7c 84 fa 14 add r4,r4,r31
ffc0e658: 7f 65 db 78 mr r5,r27
ffc0e65c: 7f 83 e3 78 mr r3,r28
ffc0e660: 48 00 22 79 bl ffc108d8 <memcpy>
IMFS_update_atime( the_jnode );
ffc0e664: 38 61 00 08 addi r3,r1,8
ffc0e668: 38 80 00 00 li r4,0
ffc0e66c: 4b ff 63 11 bl ffc0497c <gettimeofday>
ffc0e670: 80 01 00 08 lwz r0,8(r1)
return my_length;
ffc0e674: 7f 7e db 78 mr r30,r27
if (my_length > (the_jnode->info.linearfile.size - start))
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
IMFS_update_atime( the_jnode );
ffc0e678: 90 1d 00 40 stw r0,64(r29)
return my_length;
ffc0e67c: 48 00 01 64 b ffc0e7e0 <IMFS_memfile_read+0x1f0>
/*
* 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 )
ffc0e680: 81 63 00 50 lwz r11,80(r3)
ffc0e684: 39 40 00 00 li r10,0
/*
* 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;
ffc0e688: 7c c0 33 78 mr r0,r6
if ( last_byte > the_jnode->info.file.size )
ffc0e68c: 83 63 00 54 lwz r27,84(r3)
ffc0e690: 7f 8a 58 00 cmpw cr7,r10,r11
/*
* 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;
ffc0e694: 7d 28 32 14 add r9,r8,r6
if ( last_byte > the_jnode->info.file.size )
ffc0e698: 41 9d 00 10 bgt- cr7,ffc0e6a8 <IMFS_memfile_read+0xb8> <== NEVER TAKEN
ffc0e69c: 40 9e 00 14 bne- cr7,ffc0e6b0 <IMFS_memfile_read+0xc0> <== NEVER TAKEN
ffc0e6a0: 7f 89 d8 40 cmplw cr7,r9,r27
ffc0e6a4: 40 9d 00 0c ble- cr7,ffc0e6b0 <IMFS_memfile_read+0xc0>
my_length = the_jnode->info.file.size - start;
ffc0e6a8: 7f 60 d8 50 subf r27,r0,r27
ffc0e6ac: 48 00 00 08 b ffc0e6b4 <IMFS_memfile_read+0xc4>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
ffc0e6b0: 7d 1b 43 78 mr r27,r8
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0e6b4: 3d 20 00 00 lis r9,0
ffc0e6b8: 83 49 27 a4 lwz r26,10148(r9)
ffc0e6bc: 7f c3 f3 78 mr r3,r30
ffc0e6c0: 7f e4 fb 78 mr r4,r31
ffc0e6c4: 7f 58 fe 70 srawi r24,r26,31
ffc0e6c8: 7f 05 c3 78 mr r5,r24
ffc0e6cc: 7f 46 d3 78 mr r6,r26
ffc0e6d0: 48 00 b0 41 bl ffc19710 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0e6d4: 7f c3 f3 78 mr r3,r30
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0e6d8: 7c 99 23 78 mr r25,r4
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0e6dc: 7f 05 c3 78 mr r5,r24
ffc0e6e0: 7f e4 fb 78 mr r4,r31
ffc0e6e4: 7f 46 d3 78 mr r6,r26
ffc0e6e8: 48 00 ab e9 bl ffc192d0 <__divdi3>
if ( start_offset ) {
ffc0e6ec: 2f 99 00 00 cmpwi cr7,r25,0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0e6f0: 7c 98 23 78 mr r24,r4
unsigned int last_byte;
unsigned int copied;
unsigned int start_offset;
unsigned char *dest;
dest = destination;
ffc0e6f4: 7f 9f e3 78 mr r31,r28
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
my_length = the_jnode->info.file.size - start;
copied = 0;
ffc0e6f8: 3b c0 00 00 li r30,0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
ffc0e6fc: 41 9e 00 4c beq- cr7,ffc0e748 <IMFS_memfile_read+0x158>
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 );
ffc0e700: 7f a3 eb 78 mr r3,r29
ffc0e704: 38 a0 00 00 li r5,0
ffc0e708: 4b ff fd 15 bl ffc0e41c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
ffc0e70c: 2c 03 00 00 cmpwi r3,0
ffc0e710: 41 82 00 d0 beq- ffc0e7e0 <IMFS_memfile_read+0x1f0> <== NEVER TAKEN
* Phase 1: possibly the last part of one block
*/
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;
ffc0e714: 7f 59 d0 50 subf r26,r25,r26
ffc0e718: 7f 9b d0 40 cmplw cr7,r27,r26
ffc0e71c: 7f 7e db 78 mr r30,r27
ffc0e720: 40 9d 00 08 ble- cr7,ffc0e728 <IMFS_memfile_read+0x138>
ffc0e724: 7f 5e d3 78 mr r30,r26
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
ffc0e728: 80 83 00 00 lwz r4,0(r3)
ffc0e72c: 7f c5 f3 78 mr r5,r30
ffc0e730: 7f 83 e3 78 mr r3,r28
ffc0e734: 7c 84 ca 14 add r4,r4,r25
ffc0e738: 48 00 21 a1 bl ffc108d8 <memcpy>
dest += to_copy;
ffc0e73c: 7f fc f2 14 add r31,r28,r30
block++;
ffc0e740: 3b 18 00 01 addi r24,r24,1
my_length -= to_copy;
ffc0e744: 7f 7e d8 50 subf r27,r30,r27
}
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0e748: 3f 40 00 00 lis r26,0
ffc0e74c: 83 9a 27 a4 lwz r28,10148(r26)
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ffc0e750: 48 00 00 3c b ffc0e78c <IMFS_memfile_read+0x19c>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ffc0e754: 7f a3 eb 78 mr r3,r29
ffc0e758: 7f 04 c3 78 mr r4,r24
ffc0e75c: 38 a0 00 00 li r5,0
ffc0e760: 4b ff fc bd bl ffc0e41c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
ffc0e764: 7c 69 1b 79 mr. r9,r3
ffc0e768: 41 82 00 78 beq- ffc0e7e0 <IMFS_memfile_read+0x1f0> <== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
ffc0e76c: 80 89 00 00 lwz r4,0(r9)
ffc0e770: 7f e3 fb 78 mr r3,r31
ffc0e774: 7f 85 e3 78 mr r5,r28
ffc0e778: 48 00 21 61 bl ffc108d8 <memcpy>
dest += to_copy;
ffc0e77c: 7f ff e2 14 add r31,r31,r28
block++;
ffc0e780: 3b 18 00 01 addi r24,r24,1
my_length -= to_copy;
ffc0e784: 7f 7c d8 50 subf r27,r28,r27
copied += to_copy;
ffc0e788: 7f de e2 14 add r30,r30,r28
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ffc0e78c: 80 1a 27 a4 lwz r0,10148(r26)
ffc0e790: 7f 9b 00 40 cmplw cr7,r27,r0
ffc0e794: 40 9c ff c0 bge+ cr7,ffc0e754 <IMFS_memfile_read+0x164>
/*
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
ffc0e798: 2f 9b 00 00 cmpwi cr7,r27,0
ffc0e79c: 41 9e 00 30 beq- cr7,ffc0e7cc <IMFS_memfile_read+0x1dc>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ffc0e7a0: 7f a3 eb 78 mr r3,r29
ffc0e7a4: 7f 04 c3 78 mr r4,r24
ffc0e7a8: 38 a0 00 00 li r5,0
ffc0e7ac: 4b ff fc 71 bl ffc0e41c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
ffc0e7b0: 7c 69 1b 79 mr. r9,r3
ffc0e7b4: 41 82 00 2c beq- ffc0e7e0 <IMFS_memfile_read+0x1f0> <== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
ffc0e7b8: 80 89 00 00 lwz r4,0(r9)
ffc0e7bc: 7f e3 fb 78 mr r3,r31
ffc0e7c0: 7f 65 db 78 mr r5,r27
ffc0e7c4: 48 00 21 15 bl ffc108d8 <memcpy>
copied += my_length;
ffc0e7c8: 7f db f2 14 add r30,r27,r30
}
IMFS_update_atime( the_jnode );
ffc0e7cc: 38 61 00 08 addi r3,r1,8
ffc0e7d0: 38 80 00 00 li r4,0
ffc0e7d4: 4b ff 61 a9 bl ffc0497c <gettimeofday>
ffc0e7d8: 80 01 00 08 lwz r0,8(r1)
ffc0e7dc: 90 1d 00 40 stw r0,64(r29)
return copied;
}
ffc0e7e0: 39 61 00 38 addi r11,r1,56
ffc0e7e4: 7f c3 f3 78 mr r3,r30
ffc0e7e8: 4b ff 1d 30 b ffc00518 <_restgpr_24_x>
ffc0e8f0 <IMFS_memfile_remove>:
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
ffc0e8f0: 94 21 ff d8 stwu r1,-40(r1)
ffc0e8f4: 7c 08 02 a6 mflr r0
/*
* 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;
ffc0e8f8: 3d 20 00 00 lis r9,0
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
ffc0e8fc: 90 01 00 2c stw r0,44(r1)
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
ffc0e900: 80 03 00 58 lwz r0,88(r3)
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
ffc0e904: bf 21 00 0c stmw r25,12(r1)
ffc0e908: 7c 7f 1b 78 mr r31,r3
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
ffc0e90c: 2f 80 00 00 cmpwi cr7,r0,0
/*
* 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;
ffc0e910: 83 c9 27 a4 lwz r30,10148(r9)
ffc0e914: 57 de f0 be rlwinm r30,r30,30,2,31
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
ffc0e918: 41 9e 00 10 beq- cr7,ffc0e928 <IMFS_memfile_remove+0x38>
memfile_free_blocks_in_table( &info->indirect, to_free );
ffc0e91c: 38 63 00 58 addi r3,r3,88
ffc0e920: 7f c4 f3 78 mr r4,r30
ffc0e924: 4b ff ff 69 bl ffc0e88c <memfile_free_blocks_in_table>
}
if ( info->doubly_indirect ) {
ffc0e928: 80 1f 00 5c lwz r0,92(r31)
ffc0e92c: 3b a0 00 00 li r29,0
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
ffc0e930: 3f 80 00 00 lis r28,0
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
ffc0e934: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e938: 40 be 00 2c bne+ cr7,ffc0e964 <IMFS_memfile_remove+0x74>
ffc0e93c: 48 00 00 44 b ffc0e980 <IMFS_memfile_remove+0x90>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
ffc0e940: 81 3f 00 5c lwz r9,92(r31)
* a significant difference in the performance of this routine.
*
* Regardless until the IMFS implementation is proven, it
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
ffc0e944: 57 a0 10 3a rlwinm r0,r29,2,0,29
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
ffc0e948: 7c 69 02 14 add r3,r9,r0
ffc0e94c: 7c 09 00 2e lwzx r0,r9,r0
ffc0e950: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e954: 41 9e 00 0c beq- cr7,ffc0e960 <IMFS_memfile_remove+0x70><== NEVER TAKEN
memfile_free_blocks_in_table(
ffc0e958: 7f c4 f3 78 mr r4,r30
ffc0e95c: 4b ff ff 31 bl ffc0e88c <memfile_free_blocks_in_table>
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
ffc0e960: 3b bd 00 01 addi r29,r29,1
ffc0e964: 80 1c 27 a4 lwz r0,10148(r28)
ffc0e968: 54 00 f0 be rlwinm r0,r0,30,2,31
ffc0e96c: 7f 9d 00 40 cmplw cr7,r29,r0
ffc0e970: 41 9c ff d0 blt+ cr7,ffc0e940 <IMFS_memfile_remove+0x50>
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 );
ffc0e974: 38 7f 00 5c addi r3,r31,92
ffc0e978: 7f c4 f3 78 mr r4,r30
ffc0e97c: 4b ff ff 11 bl ffc0e88c <memfile_free_blocks_in_table>
}
if ( info->triply_indirect ) {
ffc0e980: 80 1f 00 60 lwz r0,96(r31)
ffc0e984: 3b a0 00 00 li r29,0
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
ffc0e988: 3f 40 00 00 lis r26,0
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
ffc0e98c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e990: 40 be 00 68 bne+ cr7,ffc0e9f8 <IMFS_memfile_remove+0x108>
ffc0e994: 48 00 00 80 b ffc0ea14 <IMFS_memfile_remove+0x124>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
ffc0e998: 81 3f 00 60 lwz r9,96(r31)
* a significant difference in the performance of this routine.
*
* Regardless until the IMFS implementation is proven, it
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
ffc0e99c: 57 b9 10 3a rlwinm r25,r29,2,0,29
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
ffc0e9a0: 7f 89 c8 2e lwzx r28,r9,r25
if ( !p ) /* ensure we have a valid pointer */
ffc0e9a4: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0e9a8: 41 9e 00 60 beq- cr7,ffc0ea08 <IMFS_memfile_remove+0x118><== NEVER TAKEN
ffc0e9ac: 3b 60 00 00 li r27,0
ffc0e9b0: 48 00 00 24 b ffc0e9d4 <IMFS_memfile_remove+0xe4>
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
ffc0e9b4: 80 1c 00 00 lwz r0,0(r28)
ffc0e9b8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e9bc: 41 9e 00 10 beq- cr7,ffc0e9cc <IMFS_memfile_remove+0xdc><== NEVER TAKEN
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
ffc0e9c0: 7f 83 e3 78 mr r3,r28
ffc0e9c4: 7f c4 f3 78 mr r4,r30
ffc0e9c8: 4b ff fe c5 bl ffc0e88c <memfile_free_blocks_in_table>
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++ ) {
ffc0e9cc: 3b 7b 00 01 addi r27,r27,1
ffc0e9d0: 3b 9c 00 04 addi r28,r28,4
ffc0e9d4: 80 1a 27 a4 lwz r0,10148(r26)
ffc0e9d8: 54 00 f0 be rlwinm r0,r0,30,2,31
ffc0e9dc: 7f 9b 00 40 cmplw cr7,r27,r0
ffc0e9e0: 41 9c ff d4 blt+ cr7,ffc0e9b4 <IMFS_memfile_remove+0xc4>
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
ffc0e9e4: 80 7f 00 60 lwz r3,96(r31)
ffc0e9e8: 7f c4 f3 78 mr r4,r30
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
ffc0e9ec: 3b bd 00 01 addi r29,r29,1
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
ffc0e9f0: 7c 63 ca 14 add r3,r3,r25
ffc0e9f4: 4b ff fe 99 bl ffc0e88c <memfile_free_blocks_in_table>
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
ffc0e9f8: 80 1a 27 a4 lwz r0,10148(r26)
ffc0e9fc: 54 00 f0 be rlwinm r0,r0,30,2,31
ffc0ea00: 7f 9d 00 40 cmplw cr7,r29,r0
ffc0ea04: 41 9c ff 94 blt+ cr7,ffc0e998 <IMFS_memfile_remove+0xa8>
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
ffc0ea08: 38 7f 00 60 addi r3,r31,96
ffc0ea0c: 7f c4 f3 78 mr r4,r30
ffc0ea10: 4b ff fe 7d bl ffc0e88c <memfile_free_blocks_in_table>
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
ffc0ea14: 39 61 00 28 addi r11,r1,40
ffc0ea18: 38 60 00 00 li r3,0
ffc0ea1c: 4b ff 1b 00 b ffc0051c <_restgpr_25_x>
ffc0eb7c <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
ffc0eb7c: 94 21 ff c8 stwu r1,-56(r1)
ffc0eb80: 7c 08 02 a6 mflr r0
ffc0eb84: bf 01 00 18 stmw r24,24(r1)
ffc0eb88: 7c de 33 78 mr r30,r6
ffc0eb8c: 7c 7f 1b 78 mr r31,r3
ffc0eb90: 90 01 00 3c stw r0,60(r1)
ffc0eb94: 7c bd 2b 78 mr r29,r5
ffc0eb98: 7c fc 3b 78 mr r28,r7
* 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 + my_length;
if ( last_byte > the_jnode->info.file.size ) {
ffc0eb9c: 80 03 00 50 lwz r0,80(r3)
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
ffc0eba0: 7d 1b 43 78 mr r27,r8
/*
* 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 + my_length;
ffc0eba4: 7c c8 32 14 add r6,r8,r6
if ( last_byte > the_jnode->info.file.size ) {
ffc0eba8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ebac: 41 9c 00 14 blt- cr7,ffc0ebc0 <IMFS_memfile_write+0x44> <== NEVER TAKEN
ffc0ebb0: 40 be 00 38 bne+ cr7,ffc0ebe8 <IMFS_memfile_write+0x6c> <== NEVER TAKEN
ffc0ebb4: 80 03 00 54 lwz r0,84(r3)
ffc0ebb8: 7f 80 30 40 cmplw cr7,r0,r6
ffc0ebbc: 40 bc 00 2c bge+ cr7,ffc0ebe8 <IMFS_memfile_write+0x6c> <== NEVER TAKEN
status = IMFS_memfile_extend( the_jnode, last_byte );
ffc0ebc0: 7f e3 fb 78 mr r3,r31
ffc0ebc4: 38 a0 00 00 li r5,0
ffc0ebc8: 4b ff fe 95 bl ffc0ea5c <IMFS_memfile_extend>
if ( status )
ffc0ebcc: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ebd0: 41 be 00 18 beq+ cr7,ffc0ebe8 <IMFS_memfile_write+0x6c>
rtems_set_errno_and_return_minus_one( ENOSPC );
ffc0ebd4: 48 00 0f c9 bl ffc0fb9c <__errno>
ffc0ebd8: 38 00 00 1c li r0,28
ffc0ebdc: 90 03 00 00 stw r0,0(r3)
ffc0ebe0: 3b c0 ff ff li r30,-1
ffc0ebe4: 48 00 01 30 b ffc0ed14 <IMFS_memfile_write+0x198>
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0ebe8: 3d 20 00 00 lis r9,0
ffc0ebec: 83 49 27 a4 lwz r26,10148(r9)
ffc0ebf0: 7f a3 eb 78 mr r3,r29
ffc0ebf4: 7f c4 f3 78 mr r4,r30
ffc0ebf8: 7f 58 fe 70 srawi r24,r26,31
ffc0ebfc: 7f 05 c3 78 mr r5,r24
ffc0ec00: 7f 46 d3 78 mr r6,r26
ffc0ec04: 48 00 ab 0d bl ffc19710 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0ec08: 7f a3 eb 78 mr r3,r29
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0ec0c: 7c 99 23 78 mr r25,r4
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0ec10: 7f 05 c3 78 mr r5,r24
ffc0ec14: 7f c4 f3 78 mr r4,r30
ffc0ec18: 7f 46 d3 78 mr r6,r26
ffc0ec1c: 48 00 a6 b5 bl ffc192d0 <__divdi3>
if ( start_offset ) {
ffc0ec20: 2f 99 00 00 cmpwi cr7,r25,0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0ec24: 7c 9d 23 78 mr r29,r4
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
rtems_set_errno_and_return_minus_one( ENOSPC );
}
copied = 0;
ffc0ec28: 3b c0 00 00 li r30,0
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
ffc0ec2c: 41 9e 00 4c beq- cr7,ffc0ec78 <IMFS_memfile_write+0xfc>
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 );
ffc0ec30: 7f e3 fb 78 mr r3,r31
ffc0ec34: 38 a0 00 00 li r5,0
ffc0ec38: 4b ff f7 e5 bl ffc0e41c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
return copied;
ffc0ec3c: 3b c0 00 00 li r30,0
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 );
if ( !block_ptr )
ffc0ec40: 2c 03 00 00 cmpwi r3,0
ffc0ec44: 41 82 00 d0 beq- ffc0ed14 <IMFS_memfile_write+0x198> <== NEVER TAKEN
* Phase 1: possibly the last part of one block
*/
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;
ffc0ec48: 7f d9 d0 50 subf r30,r25,r26
ffc0ec4c: 7f 9e d8 40 cmplw cr7,r30,r27
ffc0ec50: 40 9d 00 08 ble- cr7,ffc0ec58 <IMFS_memfile_write+0xdc>
ffc0ec54: 7f 7e db 78 mr r30,r27
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
ffc0ec58: 80 63 00 00 lwz r3,0(r3)
ffc0ec5c: 7f 84 e3 78 mr r4,r28
ffc0ec60: 7f c5 f3 78 mr r5,r30
ffc0ec64: 7c 63 ca 14 add r3,r3,r25
ffc0ec68: 48 00 1c 71 bl ffc108d8 <memcpy>
src += to_copy;
ffc0ec6c: 7f 9c f2 14 add r28,r28,r30
block++;
ffc0ec70: 3b bd 00 01 addi r29,r29,1
my_length -= to_copy;
ffc0ec74: 7f 7e d8 50 subf r27,r30,r27
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc0ec78: 3f 20 00 00 lis r25,0
ffc0ec7c: 83 59 27 a4 lwz r26,10148(r25)
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ffc0ec80: 48 00 00 3c b ffc0ecbc <IMFS_memfile_write+0x140>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ffc0ec84: 7f e3 fb 78 mr r3,r31
ffc0ec88: 7f a4 eb 78 mr r4,r29
ffc0ec8c: 38 a0 00 00 li r5,0
ffc0ec90: 4b ff f7 8d bl ffc0e41c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
ffc0ec94: 2c 03 00 00 cmpwi r3,0
ffc0ec98: 41 82 00 7c beq- ffc0ed14 <IMFS_memfile_write+0x198> <== NEVER TAKEN
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 );
ffc0ec9c: 80 63 00 00 lwz r3,0(r3)
ffc0eca0: 7f 84 e3 78 mr r4,r28
ffc0eca4: 7f 45 d3 78 mr r5,r26
ffc0eca8: 48 00 1c 31 bl ffc108d8 <memcpy>
src += to_copy;
ffc0ecac: 7f 9c d2 14 add r28,r28,r26
block++;
ffc0ecb0: 3b bd 00 01 addi r29,r29,1
my_length -= to_copy;
ffc0ecb4: 7f 7a d8 50 subf r27,r26,r27
* IMFS_memfile_write
*
* 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(
ffc0ecb8: 7f de d2 14 add r30,r30,r26
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ffc0ecbc: 80 19 27 a4 lwz r0,10148(r25)
ffc0ecc0: 7f 9b 00 40 cmplw cr7,r27,r0
ffc0ecc4: 40 9c ff c0 bge+ cr7,ffc0ec84 <IMFS_memfile_write+0x108>
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
ffc0ecc8: 2f 9b 00 00 cmpwi cr7,r27,0
ffc0eccc: 41 9e 00 30 beq- cr7,ffc0ecfc <IMFS_memfile_write+0x180>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ffc0ecd0: 7f e3 fb 78 mr r3,r31
ffc0ecd4: 7f a4 eb 78 mr r4,r29
ffc0ecd8: 38 a0 00 00 li r5,0
ffc0ecdc: 4b ff f7 41 bl ffc0e41c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
ffc0ece0: 2c 03 00 00 cmpwi r3,0
ffc0ece4: 41 82 00 30 beq- ffc0ed14 <IMFS_memfile_write+0x198> <== NEVER TAKEN
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 );
ffc0ece8: 80 63 00 00 lwz r3,0(r3)
ffc0ecec: 7f 84 e3 78 mr r4,r28
ffc0ecf0: 7f 65 db 78 mr r5,r27
ffc0ecf4: 48 00 1b e5 bl ffc108d8 <memcpy>
my_length = 0;
copied += to_copy;
ffc0ecf8: 7f de da 14 add r30,r30,r27
}
IMFS_mtime_ctime_update( the_jnode );
ffc0ecfc: 38 61 00 08 addi r3,r1,8
ffc0ed00: 38 80 00 00 li r4,0
ffc0ed04: 4b ff 5c 79 bl ffc0497c <gettimeofday>
ffc0ed08: 80 01 00 08 lwz r0,8(r1)
ffc0ed0c: 90 1f 00 44 stw r0,68(r31)
ffc0ed10: 90 1f 00 48 stw r0,72(r31)
return copied;
}
ffc0ed14: 39 61 00 38 addi r11,r1,56
ffc0ed18: 7f c3 f3 78 mr r3,r30
ffc0ed1c: 4b ff 17 fc b ffc00518 <_restgpr_24_x>
ffc03e68 <IMFS_mount>:
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
ffc03e68: 7c 08 02 a6 mflr r0
ffc03e6c: 94 21 ff f8 stwu r1,-8(r1)
ffc03e70: 90 01 00 0c stw r0,12(r1)
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
ffc03e74: 81 23 00 08 lwz r9,8(r3)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
ffc03e78: 80 09 00 4c lwz r0,76(r9)
ffc03e7c: 2f 80 00 01 cmpwi cr7,r0,1
ffc03e80: 41 be 00 18 beq+ cr7,ffc03e98 <IMFS_mount+0x30> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
ffc03e84: 48 00 bd 19 bl ffc0fb9c <__errno> <== NOT EXECUTED
ffc03e88: 38 00 00 14 li r0,20 <== NOT EXECUTED
ffc03e8c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
ffc03e90: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc03e94: 48 00 00 0c b ffc03ea0 <IMFS_mount+0x38> <== NOT EXECUTED
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
ffc03e98: 90 69 00 5c stw r3,92(r9)
return 0;
ffc03e9c: 38 60 00 00 li r3,0
}
ffc03ea0: 80 01 00 0c lwz r0,12(r1)
ffc03ea4: 38 21 00 08 addi r1,r1,8
ffc03ea8: 7c 08 03 a6 mtlr r0
ffc03eac: 4e 80 00 20 blr
ffc06ba4 <IMFS_print_jnode>:
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
ffc06ba4: 94 21 ff f0 stwu r1,-16(r1)
ffc06ba8: 7c 08 02 a6 mflr r0
ffc06bac: bf c1 00 08 stmw r30,8(r1)
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
ffc06bb0: 3f c0 00 00 lis r30,0
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
ffc06bb4: 7c 7f 1b 78 mr r31,r3
ffc06bb8: 90 01 00 14 stw r0,20(r1)
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
ffc06bbc: 38 63 00 0c addi r3,r3,12
ffc06bc0: 81 3e 27 94 lwz r9,10132(r30)
ffc06bc4: 80 89 00 08 lwz r4,8(r9)
ffc06bc8: 48 00 e1 45 bl ffc14d0c <fputs>
switch( the_jnode->type ) {
ffc06bcc: 80 bf 00 4c lwz r5,76(r31)
ffc06bd0: 38 05 ff ff addi r0,r5,-1
ffc06bd4: 2b 80 00 06 cmplwi cr7,r0,6
ffc06bd8: 41 9d 00 a8 bgt- cr7,ffc06c80 <IMFS_print_jnode+0xdc> <== NEVER TAKEN
ffc06bdc: 3d 20 ff c2 lis r9,-62
ffc06be0: 39 29 3d 24 addi r9,r9,15652
ffc06be4: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc06be8: 7c 09 00 2e lwzx r0,r9,r0
ffc06bec: 7d 20 4a 14 add r9,r0,r9
ffc06bf0: 7d 29 03 a6 mtctr r9
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
ffc06bf4: 81 3e 27 94 lwz r9,10132(r30)
)
{
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
ffc06bf8: 4e 80 04 20 bctr
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
ffc06bfc: 80 89 00 08 lwz r4,8(r9)
ffc06c00: 38 60 00 2f li r3,47
ffc06c04: 48 00 df ed bl ffc14bf0 <fputc>
break;
ffc06c08: 48 00 00 94 b ffc06c9c <IMFS_print_jnode+0xf8>
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
ffc06c0c: 3c 80 ff c2 lis r4,-62
ffc06c10: 80 69 00 08 lwz r3,8(r9)
ffc06c14: 38 84 3d 40 addi r4,r4,15680
ffc06c18: 80 bf 00 50 lwz r5,80(r31)
ffc06c1c: 80 df 00 54 lwz r6,84(r31)
ffc06c20: 48 00 00 18 b ffc06c38 <IMFS_print_jnode+0x94>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
ffc06c24: 3c 80 ff c2 lis r4,-62
ffc06c28: 80 69 00 08 lwz r3,8(r9)
ffc06c2c: 80 bf 00 54 lwz r5,84(r31)
ffc06c30: 38 84 3d 53 addi r4,r4,15699
ffc06c34: 80 df 00 58 lwz r6,88(r31)
ffc06c38: 4c c6 31 82 crclr 4*cr1+eq
ffc06c3c: 48 00 de cd bl ffc14b08 <fprintf>
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
ffc06c40: 48 00 00 5c b ffc06c9c <IMFS_print_jnode+0xf8>
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
ffc06c44: 80 69 00 08 lwz r3,8(r9)
ffc06c48: 3c 80 ff c2 lis r4,-62
ffc06c4c: 80 bf 00 54 lwz r5,84(r31)
ffc06c50: 38 84 3d 62 addi r4,r4,15714
ffc06c54: 4c c6 31 82 crclr 4*cr1+eq
ffc06c58: 48 00 de b1 bl ffc14b08 <fprintf>
(uint32_t)the_jnode->info.file.size );
#endif
break;
ffc06c5c: 48 00 00 40 b ffc06c9c <IMFS_print_jnode+0xf8>
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
ffc06c60: 3c 60 ff c2 lis r3,-62
ffc06c64: 38 63 3d 6e addi r3,r3,15726
ffc06c68: 48 00 00 0c b ffc06c74 <IMFS_print_jnode+0xd0>
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
ffc06c6c: 3c 60 ff c2 lis r3,-62
ffc06c70: 38 63 3d 82 addi r3,r3,15746
ffc06c74: 80 89 00 08 lwz r4,8(r9)
ffc06c78: 48 00 e0 95 bl ffc14d0c <fputs>
return;
ffc06c7c: 48 00 00 2c b ffc06ca8 <IMFS_print_jnode+0x104>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
ffc06c80: 81 3e 27 94 lwz r9,10132(r30) <== NOT EXECUTED
ffc06c84: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED
ffc06c88: 38 84 3d 95 addi r4,r4,15765 <== NOT EXECUTED
ffc06c8c: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED
ffc06c90: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc06c94: 48 00 de 75 bl ffc14b08 <fprintf> <== NOT EXECUTED
return;
ffc06c98: 48 00 00 10 b ffc06ca8 <IMFS_print_jnode+0x104> <== NOT EXECUTED
}
puts("");
ffc06c9c: 3c 60 ff c2 lis r3,-62
ffc06ca0: 38 63 44 2f addi r3,r3,17455
ffc06ca4: 48 01 00 19 bl ffc16cbc <puts>
}
ffc06ca8: 39 61 00 10 addi r11,r1,16
ffc06cac: 4b ff c8 74 b ffc03520 <_restgpr_30_x>
ffc03ef0 <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 */
)
{
ffc03ef0: 94 21 ff e0 stwu r1,-32(r1)
ffc03ef4: 7c 08 02 a6 mflr r0
ffc03ef8: 90 01 00 24 stw r0,36(r1)
ffc03efc: bf c1 00 18 stmw r30,24(r1)
ffc03f00: 7c be 2b 78 mr r30,r5
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 );
ffc03f04: 38 a0 00 20 li r5,32
)
{
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
ffc03f08: 83 e4 00 00 lwz r31,0(r4)
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
ffc03f0c: 7c c4 33 78 mr r4,r6
ffc03f10: 38 7f 00 0c addi r3,r31,12
ffc03f14: 48 00 d6 71 bl ffc11584 <strncpy>
if ( the_jnode->Parent != NULL )
ffc03f18: 80 1f 00 08 lwz r0,8(r31)
ffc03f1c: 2f 80 00 00 cmpwi cr7,r0,0
ffc03f20: 41 9e 00 0c beq- cr7,ffc03f2c <IMFS_rename+0x3c> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
ffc03f24: 7f e3 fb 78 mr r3,r31
ffc03f28: 48 00 4c 61 bl ffc08b88 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
ffc03f2c: 80 7e 00 00 lwz r3,0(r30)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
ffc03f30: 7f e4 fb 78 mr r4,r31
the_jnode->Parent = new_parent;
ffc03f34: 90 7f 00 08 stw r3,8(r31)
ffc03f38: 38 63 00 50 addi r3,r3,80
ffc03f3c: 48 00 4c 1d bl ffc08b58 <_Chain_Append>
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
ffc03f40: 38 61 00 08 addi r3,r1,8
ffc03f44: 38 80 00 00 li r4,0
ffc03f48: 48 00 0a 35 bl ffc0497c <gettimeofday>
ffc03f4c: 80 01 00 08 lwz r0,8(r1)
return 0;
}
ffc03f50: 39 61 00 20 addi r11,r1,32
ffc03f54: 38 60 00 00 li r3,0
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
ffc03f58: 90 1f 00 48 stw r0,72(r31)
return 0;
}
ffc03f5c: 4b ff c5 d4 b ffc00530 <_restgpr_30_x>
ffc0bfb8 <IMFS_skip_separator>:
static void IMFS_skip_separator (
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
ffc0bfb8: 94 21 ff e8 stwu r1,-24(r1)
ffc0bfbc: 7c 08 02 a6 mflr r0
ffc0bfc0: bf a1 00 0c stmw r29,12(r1)
ffc0bfc4: 7c 7f 1b 78 mr r31,r3
ffc0bfc8: 7c 9e 23 78 mr r30,r4
ffc0bfcc: 90 01 00 1c stw r0,28(r1)
ffc0bfd0: 7c bd 2b 78 mr r29,r5
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
ffc0bfd4: 48 00 00 18 b ffc0bfec <IMFS_skip_separator+0x34>
++(*index);
ffc0bfd8: 39 29 00 01 addi r9,r9,1
ffc0bfdc: 91 3d 00 00 stw r9,0(r29)
--(*len);
ffc0bfe0: 81 3e 00 00 lwz r9,0(r30)
ffc0bfe4: 38 09 ff ff addi r0,r9,-1
ffc0bfe8: 90 1e 00 00 stw r0,0(r30)
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
ffc0bfec: 80 1d 00 00 lwz r0,0(r29)
ffc0bff0: 7c 7f 00 ae lbzx r3,r31,r0
ffc0bff4: 4b ff 98 ed bl ffc058e0 <rtems_filesystem_is_separator>
ffc0bff8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0bffc: 41 9e 00 20 beq- cr7,ffc0c01c <IMFS_skip_separator+0x64>
ffc0c000: 81 3d 00 00 lwz r9,0(r29)
ffc0c004: 7c 1f 48 ae lbzx r0,r31,r9
ffc0c008: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c00c: 41 9e 00 10 beq- cr7,ffc0c01c <IMFS_skip_separator+0x64>
ffc0c010: 80 1e 00 00 lwz r0,0(r30)
ffc0c014: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c018: 40 9e ff c0 bne+ cr7,ffc0bfd8 <IMFS_skip_separator+0x20><== ALWAYS TAKEN
++(*index);
--(*len);
}
}
ffc0c01c: 39 61 00 18 addi r11,r1,24
ffc0c020: 4b ff 45 0c b ffc0052c <_restgpr_29_x>
ffc0cba4 <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
ffc0cba4: 7c 08 02 a6 mflr r0
ffc0cba8: 94 21 ff f8 stwu r1,-8(r1)
ffc0cbac: 90 01 00 0c stw r0,12(r1)
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
ffc0cbb0: 81 23 00 00 lwz r9,0(r3)
switch ( the_jnode->type ) {
ffc0cbb4: 81 69 00 4c lwz r11,76(r9)
ffc0cbb8: 38 0b ff fe addi r0,r11,-2
ffc0cbbc: 2b 80 00 05 cmplwi cr7,r0,5
ffc0cbc0: 41 9d 00 54 bgt- cr7,ffc0cc14 <IMFS_stat+0x70> <== NEVER TAKEN
ffc0cbc4: 3d 60 ff c2 lis r11,-62
ffc0cbc8: 39 6b c5 1c addi r11,r11,-15076
ffc0cbcc: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0cbd0: 7c 0b 00 2e lwzx r0,r11,r0
ffc0cbd4: 7d 60 5a 14 add r11,r0,r11
ffc0cbd8: 7d 69 03 a6 mtctr r11
ffc0cbdc: 4e 80 04 20 bctr
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
ffc0cbe0: 80 09 00 54 lwz r0,84(r9)
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
ffc0cbe4: 81 69 00 50 lwz r11,80(r9)
ffc0cbe8: 90 04 00 1c stw r0,28(r4)
ffc0cbec: 91 64 00 18 stw r11,24(r4)
break;
ffc0cbf0: 48 00 00 38 b ffc0cc28 <IMFS_stat+0x84>
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
ffc0cbf4: 81 49 00 50 lwz r10,80(r9)
ffc0cbf8: 81 69 00 54 lwz r11,84(r9)
ffc0cbfc: 48 00 00 0c b ffc0cc08 <IMFS_stat+0x64>
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
ffc0cc00: 39 40 00 00 li r10,0
ffc0cc04: 39 60 00 00 li r11,0
ffc0cc08: 91 44 00 20 stw r10,32(r4)
ffc0cc0c: 91 64 00 24 stw r11,36(r4)
break;
ffc0cc10: 48 00 00 18 b ffc0cc28 <IMFS_stat+0x84>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
ffc0cc14: 48 00 2f 89 bl ffc0fb9c <__errno>
ffc0cc18: 38 00 00 86 li r0,134
ffc0cc1c: 90 03 00 00 stw r0,0(r3)
ffc0cc20: 38 60 ff ff li r3,-1
ffc0cc24: 48 00 00 70 b ffc0cc94 <IMFS_stat+0xf0>
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
ffc0cc28: 81 63 00 10 lwz r11,16(r3)
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
return 0;
ffc0cc2c: 38 60 00 00 li r3,0
* 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 );
ffc0cc30: 81 6b 00 34 lwz r11,52(r11)
ffc0cc34: 80 0b 00 00 lwz r0,0(r11)
ffc0cc38: 39 60 00 00 li r11,0
ffc0cc3c: 61 6b ff fe ori r11,r11,65534
/*
* 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 =
ffc0cc40: 90 04 00 04 stw r0,4(r4)
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
ffc0cc44: 80 09 00 30 lwz r0,48(r9)
/*
* 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 =
ffc0cc48: 91 64 00 00 stw r11,0(r4)
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
ffc0cc4c: 90 04 00 0c stw r0,12(r4)
buf->st_nlink = the_jnode->st_nlink;
ffc0cc50: a0 09 00 34 lhz r0,52(r9)
ffc0cc54: b0 04 00 10 sth r0,16(r4)
buf->st_ino = the_jnode->st_ino;
ffc0cc58: 80 09 00 38 lwz r0,56(r9)
ffc0cc5c: 90 04 00 08 stw r0,8(r4)
buf->st_uid = the_jnode->st_uid;
ffc0cc60: a0 09 00 3c lhz r0,60(r9)
ffc0cc64: b0 04 00 12 sth r0,18(r4)
buf->st_gid = the_jnode->st_gid;
ffc0cc68: a0 09 00 3e lhz r0,62(r9)
ffc0cc6c: b0 04 00 14 sth r0,20(r4)
buf->st_atime = the_jnode->stat_atime;
ffc0cc70: 80 09 00 40 lwz r0,64(r9)
ffc0cc74: 90 04 00 28 stw r0,40(r4)
buf->st_mtime = the_jnode->stat_mtime;
ffc0cc78: 80 09 00 44 lwz r0,68(r9)
ffc0cc7c: 90 04 00 30 stw r0,48(r4)
buf->st_ctime = the_jnode->stat_ctime;
ffc0cc80: 80 09 00 48 lwz r0,72(r9)
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
ffc0cc84: 3d 20 00 00 lis r9,0
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;
ffc0cc88: 90 04 00 38 stw r0,56(r4)
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
ffc0cc8c: 80 09 26 f8 lwz r0,9976(r9)
ffc0cc90: 90 04 00 40 stw r0,64(r4)
return 0;
}
ffc0cc94: 80 01 00 0c lwz r0,12(r1)
ffc0cc98: 38 21 00 08 addi r1,r1,8
ffc0cc9c: 7c 08 03 a6 mtlr r0
ffc0cca0: 4e 80 00 20 blr
ffc03ff8 <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
ffc03ff8: 94 21 ff c8 stwu r1,-56(r1)
ffc03ffc: 7c 08 02 a6 mflr r0
ffc04000: 90 01 00 3c stw r0,60(r1)
ffc04004: bf 81 00 28 stmw r28,40(r1)
ffc04008: 7c 7d 1b 78 mr r29,r3
ffc0400c: 7c 9f 23 78 mr r31,r4
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
ffc04010: 83 c4 00 00 lwz r30,0(r4)
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
ffc04014: 80 1e 00 4c lwz r0,76(r30)
ffc04018: 2f 80 00 03 cmpwi cr7,r0,3
ffc0401c: 40 9e 00 94 bne- cr7,ffc040b0 <IMFS_unlink+0xb8>
if ( !node->info.hard_link.link_node )
ffc04020: 80 1e 00 50 lwz r0,80(r30)
ffc04024: 2f 80 00 00 cmpwi cr7,r0,0
ffc04028: 40 be 00 18 bne+ cr7,ffc04040 <IMFS_unlink+0x48> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
ffc0402c: 48 00 bb 71 bl ffc0fb9c <__errno> <== NOT EXECUTED
ffc04030: 38 00 00 16 li r0,22 <== NOT EXECUTED
ffc04034: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
ffc04038: 38 00 ff ff li r0,-1 <== NOT EXECUTED
ffc0403c: 48 00 00 90 b ffc040cc <IMFS_unlink+0xd4> <== NOT EXECUTED
the_link = *loc;
ffc04040: 3b 81 00 10 addi r28,r1,16
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
ffc04044: 7f 83 e3 78 mr r3,r28
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
ffc04048: 7c a4 a4 aa lswi r5,r4,20
ffc0404c: 7c bc a5 aa stswi r5,r28,20
the_link.node_access = node->info.hard_link.link_node;
ffc04050: 90 01 00 10 stw r0,16(r1)
IMFS_Set_handlers( &the_link );
ffc04054: 48 00 7f d1 bl ffc0c024 <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)
ffc04058: 81 3e 00 50 lwz r9,80(r30)
ffc0405c: a1 69 00 34 lhz r11,52(r9)
ffc04060: 2f 8b 00 01 cmpwi cr7,r11,1
ffc04064: 40 be 00 2c bne+ cr7,ffc04090 <IMFS_unlink+0x98>
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
ffc04068: 81 21 00 18 lwz r9,24(r1)
ffc0406c: 7f a3 eb 78 mr r3,r29
ffc04070: 7f 84 e3 78 mr r4,r28
ffc04074: 80 09 00 34 lwz r0,52(r9)
ffc04078: 7c 09 03 a6 mtctr r0
ffc0407c: 4e 80 04 21 bctrl
if ( result != 0 )
return -1;
ffc04080: 38 00 ff ff li r0,-1
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
if ( result != 0 )
ffc04084: 2f 83 00 00 cmpwi cr7,r3,0
ffc04088: 41 be 00 28 beq+ cr7,ffc040b0 <IMFS_unlink+0xb8>
ffc0408c: 48 00 00 40 b ffc040cc <IMFS_unlink+0xd4>
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
ffc04090: 39 6b ff ff addi r11,r11,-1
ffc04094: b1 69 00 34 sth r11,52(r9)
IMFS_update_ctime( node->info.hard_link.link_node );
ffc04098: 38 61 00 08 addi r3,r1,8
ffc0409c: 38 80 00 00 li r4,0
ffc040a0: 48 00 08 dd bl ffc0497c <gettimeofday>
ffc040a4: 81 3e 00 50 lwz r9,80(r30)
ffc040a8: 80 01 00 08 lwz r0,8(r1)
ffc040ac: 90 09 00 48 stw r0,72(r9)
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
ffc040b0: 81 3f 00 08 lwz r9,8(r31)
ffc040b4: 7f a3 eb 78 mr r3,r29
ffc040b8: 7f e4 fb 78 mr r4,r31
ffc040bc: 80 09 00 34 lwz r0,52(r9)
ffc040c0: 7c 09 03 a6 mtctr r0
ffc040c4: 4e 80 04 21 bctrl
ffc040c8: 7c 60 1b 78 mr r0,r3
return result;
}
ffc040cc: 39 61 00 38 addi r11,r1,56
ffc040d0: 7c 03 03 78 mr r3,r0
ffc040d4: 4b ff c4 54 b ffc00528 <_restgpr_28_x>
ffc040d8 <IMFS_unmount>:
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
ffc040d8: 7c 08 02 a6 mflr r0
ffc040dc: 94 21 ff f8 stwu r1,-8(r1)
ffc040e0: 90 01 00 0c stw r0,12(r1)
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
ffc040e4: 81 23 00 08 lwz r9,8(r3)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
ffc040e8: 80 09 00 4c lwz r0,76(r9)
ffc040ec: 2f 80 00 01 cmpwi cr7,r0,1
ffc040f0: 41 be 00 10 beq+ cr7,ffc04100 <IMFS_unmount+0x28> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
ffc040f4: 48 00 ba a9 bl ffc0fb9c <__errno> <== NOT EXECUTED
ffc040f8: 38 00 00 14 li r0,20 <== NOT EXECUTED
ffc040fc: 48 00 00 18 b ffc04114 <IMFS_unmount+0x3c> <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
ffc04100: 80 09 00 5c lwz r0,92(r9)
ffc04104: 2f 80 00 00 cmpwi cr7,r0,0
ffc04108: 40 be 00 18 bne+ cr7,ffc04120 <IMFS_unmount+0x48> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
ffc0410c: 48 00 ba 91 bl ffc0fb9c <__errno> <== NOT EXECUTED
ffc04110: 38 00 00 16 li r0,22 <== NOT EXECUTED
ffc04114: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
ffc04118: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc0411c: 48 00 00 10 b ffc0412c <IMFS_unmount+0x54> <== NOT EXECUTED
/*
* Set the mt_fs pointer to indicate that there is no longer
* a file system mounted to this point.
*/
node->info.directory.mt_fs = NULL;
ffc04120: 38 00 00 00 li r0,0
ffc04124: 90 09 00 5c stw r0,92(r9)
return 0;
ffc04128: 38 60 00 00 li r3,0
}
ffc0412c: 80 01 00 0c lwz r0,12(r1)
ffc04130: 38 21 00 08 addi r1,r1,8
ffc04134: 7c 08 03 a6 mtlr r0
ffc04138: 4e 80 00 20 blr
ffc03578 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
ffc03578: 94 21 ff c0 stwu r1,-64(r1)
ffc0357c: 7c 08 02 a6 mflr r0
ffc03580: 90 01 00 44 stw r0,68(r1)
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
ffc03584: 3c 00 a5 a5 lis r0,-23131
ffc03588: 60 00 a5 a5 ori r0,r0,42405
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
ffc0358c: be e1 00 1c stmw r23,28(r1)
ffc03590: 7c 7b 1b 78 mr r27,r3
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
ffc03594: 83 83 00 b4 lwz r28,180(r3)
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
ffc03598: 81 63 00 b8 lwz r11,184(r3)
size = Stack_check_usable_stack_size(stack);
ffc0359c: 3b 9c ff 80 addi r28,r28,-128
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
ffc035a0: 83 43 00 c4 lwz r26,196(r3)
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
ffc035a4: 39 2b 01 00 addi r9,r11,256
for (ebase = base + length; base < ebase; base++)
ffc035a8: 57 8a 00 3a rlwinm r10,r28,0,0,29
ffc035ac: 7d 49 52 14 add r10,r9,r10
ffc035b0: 48 00 00 14 b ffc035c4 <Stack_check_Dump_threads_usage+0x4c>
if (*base != U32_PATTERN)
ffc035b4: 81 09 00 00 lwz r8,0(r9)
ffc035b8: 7f 88 00 00 cmpw cr7,r8,r0
ffc035bc: 40 9e 00 18 bne- cr7,ffc035d4 <Stack_check_Dump_threads_usage+0x5c>
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
ffc035c0: 39 29 00 04 addi r9,r9,4
ffc035c4: 7f 89 50 40 cmplw cr7,r9,r10
ffc035c8: 41 9c ff ec blt+ cr7,ffc035b4 <Stack_check_Dump_threads_usage+0x3c><== ALWAYS TAKEN
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
ffc035cc: 3b a0 00 00 li r29,0 <== NOT EXECUTED
ffc035d0: 48 00 00 1c b ffc035ec <Stack_check_Dump_threads_usage+0x74><== 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 )
ffc035d4: 2f 89 00 00 cmpwi cr7,r9,0
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
ffc035d8: 3b a0 00 00 li r29,0
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 )
ffc035dc: 41 9e 00 10 beq- cr7,ffc035ec <Stack_check_Dump_threads_usage+0x74><== NEVER TAKEN
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
ffc035e0: 3b ab 00 80 addi r29,r11,128
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
used = Stack_check_Calculate_used( low, size, high_water_mark );
ffc035e4: 7f bd e2 14 add r29,r29,r28
ffc035e8: 7f a9 e8 50 subf r29,r9,r29
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
#endif
{
(*print_handler)(
ffc035ec: 3f c0 00 00 lis r30,0
ffc035f0: 83 1b 00 08 lwz r24,8(r27)
ffc035f4: 3b fe 28 50 addi r31,r30,10320
ffc035f8: 83 3e 28 50 lwz r25,10320(r30)
ffc035fc: 82 ff 00 04 lwz r23,4(r31)
ffc03600: 38 80 00 05 li r4,5
ffc03604: 38 a1 00 08 addi r5,r1,8
ffc03608: 7f 03 c3 78 mr r3,r24
ffc0360c: 48 00 42 25 bl ffc07830 <rtems_object_get_name>
ffc03610: 3c 80 ff c1 lis r4,-63
ffc03614: 7c 66 1b 78 mr r6,r3
ffc03618: 7f 29 03 a6 mtctr r25
ffc0361c: 38 84 60 40 addi r4,r4,24640
ffc03620: 7f 05 c3 78 mr r5,r24
ffc03624: 7e e3 bb 78 mr r3,r23
ffc03628: 4c c6 31 82 crclr 4*cr1+eq
ffc0362c: 4e 80 04 21 bctrl
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
ffc03630: 80 db 00 b4 lwz r6,180(r27)
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
ffc03634: 80 1e 28 50 lwz r0,10320(r30)
ffc03638: 3c 80 ff c1 lis r4,-63
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
ffc0363c: 80 bb 00 b8 lwz r5,184(r27)
ffc03640: 38 c6 ff ff addi r6,r6,-1
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
ffc03644: 7c 09 03 a6 mtctr r0
ffc03648: 80 7f 00 04 lwz r3,4(r31)
ffc0364c: 38 84 60 4d addi r4,r4,24653
ffc03650: 7c c5 32 14 add r6,r5,r6
ffc03654: 7f 47 d3 78 mr r7,r26
ffc03658: 7f 88 e3 78 mr r8,r28
ffc0365c: 4c c6 31 82 crclr 4*cr1+eq
ffc03660: 4e 80 04 21 bctrl
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
ffc03664: 80 1f 00 08 lwz r0,8(r31)
(*print_handler)( print_context, "Unavailable\n" );
ffc03668: 80 7f 00 04 lwz r3,4(r31)
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
ffc0366c: 2f 80 00 00 cmpwi cr7,r0,0
(*print_handler)( print_context, "Unavailable\n" );
ffc03670: 80 1e 28 50 lwz r0,10320(r30)
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
ffc03674: 40 be 00 1c bne+ cr7,ffc03690 <Stack_check_Dump_threads_usage+0x118><== ALWAYS TAKEN
(*print_handler)( print_context, "Unavailable\n" );
ffc03678: 3c 80 ff c1 lis r4,-63 <== NOT EXECUTED
ffc0367c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc03680: 38 84 60 6b addi r4,r4,24683 <== NOT EXECUTED
ffc03684: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc03688: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc0368c: 48 00 00 1c b ffc036a8 <Stack_check_Dump_threads_usage+0x130><== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
ffc03690: 3c 80 ff c1 lis r4,-63
ffc03694: 7c 09 03 a6 mtctr r0
ffc03698: 38 84 60 78 addi r4,r4,24696
ffc0369c: 7f a5 eb 78 mr r5,r29
ffc036a0: 4c c6 31 82 crclr 4*cr1+eq
ffc036a4: 4e 80 04 21 bctrl
}
}
ffc036a8: 39 61 00 40 addi r11,r1,64
ffc036ac: 48 01 0d 88 b ffc14434 <_restgpr_23_x>
ffc03780 <Stack_check_report_blown_task>:
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
ffc03780: 94 21 ff c8 stwu r1,-56(r1)
ffc03784: 7c 08 02 a6 mflr r0
ffc03788: 90 01 00 3c stw r0,60(r1)
ffc0378c: bf a1 00 2c stmw r29,44(r1)
ffc03790: 7c 7d 1b 78 mr r29,r3
ffc03794: 7c 9e 23 78 mr r30,r4
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
ffc03798: 83 e3 00 b8 lwz r31,184(r3)
char name[32];
printk("BLOWN STACK!!!\n");
ffc0379c: 3c 60 ff c1 lis r3,-63
ffc037a0: 38 63 60 7e addi r3,r3,24702
ffc037a4: 4c c6 31 82 crclr 4*cr1+eq
ffc037a8: 48 00 1a e5 bl ffc0528c <printk>
printk("task control block: 0x%08" PRIxPTR "\n", running);
ffc037ac: 3c 60 ff c1 lis r3,-63
ffc037b0: 38 63 60 8e addi r3,r3,24718
ffc037b4: 7f a4 eb 78 mr r4,r29
ffc037b8: 4c c6 31 82 crclr 4*cr1+eq
ffc037bc: 48 00 1a d1 bl ffc0528c <printk>
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
ffc037c0: 80 9d 00 08 lwz r4,8(r29)
ffc037c4: 3c 60 ff c1 lis r3,-63
ffc037c8: 38 63 60 ab addi r3,r3,24747
ffc037cc: 4c c6 31 82 crclr 4*cr1+eq
ffc037d0: 48 00 1a bd bl ffc0528c <printk>
printk(
ffc037d4: 80 9d 00 0c lwz r4,12(r29)
ffc037d8: 3c 60 ff c1 lis r3,-63
ffc037dc: 38 63 60 bd addi r3,r3,24765
ffc037e0: 4c c6 31 82 crclr 4*cr1+eq
ffc037e4: 48 00 1a a9 bl ffc0528c <printk>
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
ffc037e8: 80 7d 00 08 lwz r3,8(r29)
ffc037ec: 38 a1 00 08 addi r5,r1,8
ffc037f0: 38 80 00 20 li r4,32
ffc037f4: 48 00 40 3d bl ffc07830 <rtems_object_get_name>
ffc037f8: 7c 64 1b 78 mr r4,r3
ffc037fc: 3c 60 ff c1 lis r3,-63
ffc03800: 38 63 60 d1 addi r3,r3,24785
ffc03804: 4c c6 31 82 crclr 4*cr1+eq
ffc03808: 48 00 1a 85 bl ffc0528c <printk>
);
printk(
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
ffc0380c: 80 bd 00 b8 lwz r5,184(r29)
ffc03810: 80 9d 00 b4 lwz r4,180(r29)
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
ffc03814: 3c 60 ff c1 lis r3,-63
ffc03818: 38 63 60 e7 addi r3,r3,24807
ffc0381c: 7c c5 22 14 add r6,r5,r4
ffc03820: 4c c6 31 82 crclr 4*cr1+eq
ffc03824: 48 00 1a 69 bl ffc0528c <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) {
ffc03828: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0382c: 40 be 00 20 bne+ cr7,ffc0384c <Stack_check_report_blown_task+0xcc><== NEVER TAKEN
printk(
ffc03830: 3c 60 ff c1 lis r3,-63
ffc03834: 38 63 61 18 addi r3,r3,24856
ffc03838: 38 80 00 80 li r4,128
ffc0383c: 38 bf 00 08 addi r5,r31,8
ffc03840: 38 df 00 88 addi r6,r31,136
ffc03844: 4c c6 31 82 crclr 4*cr1+eq
ffc03848: 48 00 1a 45 bl ffc0528c <printk>
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
ffc0384c: 38 60 00 81 li r3,129
ffc03850: 48 00 49 fd bl ffc0824c <rtems_fatal_error_occurred>
ffc11a98 <_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
)
{
ffc11a98: 94 21 ff e0 stwu r1,-32(r1)
ffc11a9c: 7c 08 02 a6 mflr r0
ffc11aa0: 90 01 00 24 stw r0,36(r1)
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
ffc11aa4: 38 00 00 00 li r0,0
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
)
{
ffc11aa8: bf 81 00 10 stmw r28,16(r1)
ffc11aac: 7c 7f 1b 78 mr r31,r3
ffc11ab0: 7c 9d 23 78 mr r29,r4
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
ffc11ab4: 90 03 00 48 stw r0,72(r3)
/*
* 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)) {
ffc11ab8: 70 c0 00 03 andi. r0,r6,3
ffc11abc: 7c dc 33 78 mr r28,r6
)
{
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
ffc11ac0: 90 a3 00 44 stw r5,68(r3)
the_message_queue->number_of_pending_messages = 0;
the_message_queue->maximum_message_size = maximum_message_size;
ffc11ac4: 90 c3 00 4c stw r6,76(r3)
/*
* 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)) {
ffc11ac8: 41 82 00 18 beq- ffc11ae0 <_CORE_message_queue_Initialize+0x48>
allocated_message_size += sizeof(uint32_t);
ffc11acc: 3b 86 00 04 addi r28,r6,4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
ffc11ad0: 57 9c 00 3a rlwinm r28,r28,0,0,29
}
if (allocated_message_size < maximum_message_size)
ffc11ad4: 7f 9c 30 40 cmplw cr7,r28,r6
return false;
ffc11ad8: 3b c0 00 00 li r30,0
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
allocated_message_size += sizeof(uint32_t);
allocated_message_size &= ~(sizeof(uint32_t) - 1);
}
if (allocated_message_size < maximum_message_size)
ffc11adc: 41 bc 00 80 blt+ cr7,ffc11b5c <_CORE_message_queue_Initialize+0xc4><== NEVER TAKEN
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
if ( !size_t_mult32_with_overflow(
ffc11ae0: 3b 9c 00 10 addi r28,r28,16
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
ffc11ae4: 7d 45 e0 16 mulhwu r10,r5,r28
ffc11ae8: 7d 65 e1 d6 mullw r11,r5,r28
if ( x > SIZE_MAX )
ffc11aec: 2f 8a 00 00 cmpwi cr7,r10,0
*/
if ( !size_t_mult32_with_overflow(
(size_t) maximum_pending_messages,
allocated_message_size + sizeof(CORE_message_queue_Buffer_control),
&message_buffering_required ) )
return false;
ffc11af0: 3b c0 00 00 li r30,0
size_t *c
)
{
long long x = (long long)a*b;
if ( x > SIZE_MAX )
ffc11af4: 41 9d 00 68 bgt- cr7,ffc11b5c <_CORE_message_queue_Initialize+0xc4>
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
ffc11af8: 7d 63 5b 78 mr r3,r11
ffc11afc: 90 a1 00 08 stw r5,8(r1)
ffc11b00: 48 00 32 35 bl ffc14d34 <_Workspace_Allocate>
if (the_message_queue->message_buffers == 0)
ffc11b04: 2f 83 00 00 cmpwi cr7,r3,0
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
ffc11b08: 90 7f 00 5c stw r3,92(r31)
_Workspace_Allocate( message_buffering_required );
ffc11b0c: 7c 64 1b 78 mr r4,r3
if (the_message_queue->message_buffers == 0)
ffc11b10: 80 a1 00 08 lwz r5,8(r1)
ffc11b14: 41 9e 00 48 beq- cr7,ffc11b5c <_CORE_message_queue_Initialize+0xc4>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
ffc11b18: 38 7f 00 60 addi r3,r31,96
ffc11b1c: 7f 86 e3 78 mr r6,r28
ffc11b20: 48 00 50 8d bl ffc16bac <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
ffc11b24: 80 9d 00 00 lwz r4,0(r29)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
ffc11b28: 38 1f 00 50 addi r0,r31,80
head->next = tail;
head->previous = NULL;
ffc11b2c: 93 df 00 54 stw r30,84(r31)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
ffc11b30: 39 3f 00 54 addi r9,r31,84
ffc11b34: 68 84 00 01 xori r4,r4,1
head->next = tail;
ffc11b38: 91 3f 00 50 stw r9,80(r31)
ffc11b3c: 7c 84 00 34 cntlzw r4,r4
head->previous = NULL;
tail->previous = head;
ffc11b40: 90 1f 00 58 stw r0,88(r31)
ffc11b44: 7f e3 fb 78 mr r3,r31
ffc11b48: 54 84 d9 7e rlwinm r4,r4,27,5,31
ffc11b4c: 38 a0 00 80 li r5,128
ffc11b50: 38 c0 00 06 li r6,6
ffc11b54: 48 00 27 75 bl ffc142c8 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
ffc11b58: 3b c0 00 01 li r30,1
}
ffc11b5c: 39 61 00 20 addi r11,r1,32
ffc11b60: 7f c3 f3 78 mr r3,r30
ffc11b64: 4b ff 3e 64 b ffc059c8 <_restgpr_28_x>
ffc08fd0 <_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
)
{
ffc08fd0: 7c 08 02 a6 mflr r0
ffc08fd4: 7c 2b 0b 78 mr r11,r1
ffc08fd8: 94 21 ff f0 stwu r1,-16(r1)
ffc08fdc: 90 01 00 14 stw r0,20(r1)
ffc08fe0: 48 01 13 55 bl ffc1a334 <_savegpr_31>
ffc08fe4: 7c 7f 1b 78 mr r31,r3
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
ffc08fe8: 48 00 1c ad bl ffc0ac94 <_Thread_queue_Dequeue>
ffc08fec: 2f 83 00 00 cmpwi cr7,r3,0
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
ffc08ff0: 38 00 00 00 li r0,0
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
ffc08ff4: 40 be 00 38 bne+ cr7,ffc0902c <_CORE_semaphore_Surrender+0x5c>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc08ff8: 7d 60 00 a6 mfmsr r11
ffc08ffc: 7c 10 42 a6 mfsprg r0,0
ffc09000: 7d 60 00 78 andc r0,r11,r0
ffc09004: 7c 00 01 24 mtmsr r0
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
ffc09008: 81 3f 00 48 lwz r9,72(r31)
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
ffc0900c: 38 00 00 04 li r0,4
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
ffc09010: 81 5f 00 40 lwz r10,64(r31)
ffc09014: 7f 89 50 40 cmplw cr7,r9,r10
ffc09018: 40 9c 00 10 bge- cr7,ffc09028 <_CORE_semaphore_Surrender+0x58><== NEVER TAKEN
the_semaphore->count += 1;
ffc0901c: 39 29 00 01 addi r9,r9,1
ffc09020: 91 3f 00 48 stw r9,72(r31)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
ffc09024: 38 00 00 00 li r0,0
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc09028: 7d 60 01 24 mtmsr r11
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
ffc0902c: 39 61 00 10 addi r11,r1,16
ffc09030: 7c 03 03 78 mr r3,r0
ffc09034: 4b ff 75 00 b ffc00534 <_restgpr_31_x>
ffc07bc8 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
ffc07bc8: 7c 2b 0b 78 mr r11,r1
ffc07bcc: 7c 08 02 a6 mflr r0
ffc07bd0: 94 21 ff f0 stwu r1,-16(r1)
ffc07bd4: 90 01 00 14 stw r0,20(r1)
ffc07bd8: 48 01 27 5d bl ffc1a334 <_savegpr_31>
ffc07bdc: 7c 7f 1b 78 mr r31,r3
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 ];
ffc07be0: 81 03 01 2c lwz r8,300(r3)
option_set = (rtems_option) the_thread->Wait.option;
ffc07be4: 80 e3 00 30 lwz r7,48(r3)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc07be8: 7c 00 00 a6 mfmsr r0
ffc07bec: 7d 30 42 a6 mfsprg r9,0
ffc07bf0: 7c 09 48 78 andc r9,r0,r9
ffc07bf4: 7d 20 01 24 mtmsr r9
_ISR_Disable( level );
pending_events = api->pending_events;
ffc07bf8: 81 68 00 00 lwz r11,0(r8)
event_condition = (rtems_event_set) the_thread->Wait.count;
ffc07bfc: 81 43 00 24 lwz r10,36(r3)
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
ffc07c00: 7d 49 58 39 and. r9,r10,r11
ffc07c04: 41 82 00 f4 beq- ffc07cf8 <_Event_Surrender+0x130>
/*
* 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() &&
ffc07c08: 3c c0 00 00 lis r6,0
ffc07c0c: 38 c6 2d b8 addi r6,r6,11704
ffc07c10: 80 a6 00 08 lwz r5,8(r6)
ffc07c14: 2f 85 00 00 cmpwi cr7,r5,0
ffc07c18: 41 9e 00 64 beq- cr7,ffc07c7c <_Event_Surrender+0xb4>
ffc07c1c: 80 c6 00 0c lwz r6,12(r6)
ffc07c20: 7f 83 30 00 cmpw cr7,r3,r6
ffc07c24: 40 be 00 58 bne+ cr7,ffc07c7c <_Event_Surrender+0xb4>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
ffc07c28: 3c c0 00 00 lis r6,0
ffc07c2c: 80 a6 28 0c lwz r5,10252(r6)
/*
* 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 ) &&
ffc07c30: 2f 85 00 02 cmpwi cr7,r5,2
ffc07c34: 41 9e 00 10 beq- cr7,ffc07c44 <_Event_Surrender+0x7c> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
ffc07c38: 80 c6 28 0c lwz r6,10252(r6)
* 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) ||
ffc07c3c: 2f 86 00 01 cmpwi cr7,r6,1
ffc07c40: 40 be 00 3c bne+ cr7,ffc07c7c <_Event_Surrender+0xb4>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
ffc07c44: 7f 89 50 00 cmpw cr7,r9,r10
ffc07c48: 41 9e 00 0c beq- cr7,ffc07c54 <_Event_Surrender+0x8c>
ffc07c4c: 70 e5 00 02 andi. r5,r7,2
ffc07c50: 41 82 00 a8 beq- ffc07cf8 <_Event_Surrender+0x130> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
ffc07c54: 7d 6b 48 78 andc r11,r11,r9
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
ffc07c58: 91 68 00 00 stw r11,0(r8)
the_thread->Wait.count = 0;
ffc07c5c: 39 60 00 00 li r11,0
ffc07c60: 91 7f 00 24 stw r11,36(r31)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc07c64: 81 7f 00 28 lwz r11,40(r31)
ffc07c68: 91 2b 00 00 stw r9,0(r11)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
ffc07c6c: 39 60 00 03 li r11,3
ffc07c70: 3d 20 00 00 lis r9,0
ffc07c74: 91 69 28 0c stw r11,10252(r9)
ffc07c78: 48 00 00 80 b ffc07cf8 <_Event_Surrender+0x130>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_EVENT);
ffc07c7c: 80 df 00 10 lwz r6,16(r31)
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
ffc07c80: 70 c5 01 00 andi. r5,r6,256
ffc07c84: 41 82 00 74 beq- ffc07cf8 <_Event_Surrender+0x130>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
ffc07c88: 7f 89 50 00 cmpw cr7,r9,r10
ffc07c8c: 41 9e 00 0c beq- cr7,ffc07c98 <_Event_Surrender+0xd0>
ffc07c90: 70 ea 00 02 andi. r10,r7,2
ffc07c94: 41 82 00 64 beq- ffc07cf8 <_Event_Surrender+0x130> <== NEVER TAKEN
ffc07c98: 7d 6b 48 78 andc r11,r11,r9
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
ffc07c9c: 91 68 00 00 stw r11,0(r8)
the_thread->Wait.count = 0;
ffc07ca0: 39 60 00 00 li r11,0
ffc07ca4: 91 7f 00 24 stw r11,36(r31)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc07ca8: 81 7f 00 28 lwz r11,40(r31)
ffc07cac: 91 2b 00 00 stw r9,0(r11)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc07cb0: 7d 20 00 a6 mfmsr r9
ffc07cb4: 7c 00 01 24 mtmsr r0
ffc07cb8: 7d 20 01 24 mtmsr r9
_ISR_Flash( level );
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
ffc07cbc: 81 3f 00 50 lwz r9,80(r31)
ffc07cc0: 2f 89 00 02 cmpwi cr7,r9,2
ffc07cc4: 41 9e 00 0c beq- cr7,ffc07cd0 <_Event_Surrender+0x108>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc07cc8: 7c 00 01 24 mtmsr r0
ffc07ccc: 48 00 00 18 b ffc07ce4 <_Event_Surrender+0x11c>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
ffc07cd0: 39 20 00 03 li r9,3
ffc07cd4: 91 3f 00 50 stw r9,80(r31)
ffc07cd8: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
ffc07cdc: 38 7f 00 48 addi r3,r31,72
ffc07ce0: 48 00 3c cd bl ffc0b9ac <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc07ce4: 3c 80 10 03 lis r4,4099
ffc07ce8: 7f e3 fb 78 mr r3,r31
ffc07cec: 60 84 ff f8 ori r4,r4,65528
ffc07cf0: 48 00 28 69 bl ffc0a558 <_Thread_Clear_state>
ffc07cf4: 48 00 00 08 b ffc07cfc <_Event_Surrender+0x134>
ffc07cf8: 7c 00 01 24 mtmsr r0
}
return;
}
}
_ISR_Enable( level );
}
ffc07cfc: 39 61 00 10 addi r11,r1,16
ffc07d00: 4b ff 88 34 b ffc00534 <_restgpr_31_x>
ffc07d04 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
ffc07d04: 94 21 ff e8 stwu r1,-24(r1)
ffc07d08: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
ffc07d0c: 38 81 00 08 addi r4,r1,8
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
ffc07d10: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
ffc07d14: 48 00 2c 3d bl ffc0a950 <_Thread_Get>
switch ( location ) {
ffc07d18: 80 01 00 08 lwz r0,8(r1)
ffc07d1c: 2f 80 00 00 cmpwi cr7,r0,0
ffc07d20: 40 9e 00 6c bne- cr7,ffc07d8c <_Event_Timeout+0x88> <== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc07d24: 7d 60 00 a6 mfmsr r11
ffc07d28: 7d 30 42 a6 mfsprg r9,0
ffc07d2c: 7d 69 48 78 andc r9,r11,r9
ffc07d30: 7d 20 01 24 mtmsr r9
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc07d34: 3d 20 00 00 lis r9,0
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
ffc07d38: 90 03 00 24 stw r0,36(r3)
if ( _Thread_Is_executing( the_thread ) ) {
ffc07d3c: 80 09 2d c4 lwz r0,11716(r9)
ffc07d40: 7f 83 00 00 cmpw cr7,r3,r0
ffc07d44: 40 be 00 1c bne+ cr7,ffc07d60 <_Event_Timeout+0x5c>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
ffc07d48: 3d 20 00 00 lis r9,0
ffc07d4c: 80 09 28 0c lwz r0,10252(r9)
ffc07d50: 2f 80 00 01 cmpwi cr7,r0,1
ffc07d54: 40 be 00 0c bne+ cr7,ffc07d60 <_Event_Timeout+0x5c>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
ffc07d58: 38 00 00 02 li r0,2
ffc07d5c: 90 09 28 0c stw r0,10252(r9)
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
ffc07d60: 38 00 00 06 li r0,6
ffc07d64: 90 03 00 34 stw r0,52(r3)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc07d68: 7d 60 01 24 mtmsr r11
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc07d6c: 3c 80 10 03 lis r4,4099
ffc07d70: 60 84 ff f8 ori r4,r4,65528
ffc07d74: 48 00 27 e5 bl ffc0a558 <_Thread_Clear_state>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
ffc07d78: 3d 20 00 00 lis r9,0
ffc07d7c: 81 69 27 c8 lwz r11,10184(r9)
ffc07d80: 38 0b ff ff addi r0,r11,-1
ffc07d84: 90 09 27 c8 stw r0,10184(r9)
return _Thread_Dispatch_disable_level;
ffc07d88: 80 09 27 c8 lwz r0,10184(r9)
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
ffc07d8c: 80 01 00 1c lwz r0,28(r1)
ffc07d90: 38 21 00 18 addi r1,r1,24
ffc07d94: 7c 08 03 a6 mtlr r0
ffc07d98: 4e 80 00 20 blr
ffc0da8c <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
ffc0da8c: 94 21 ff c0 stwu r1,-64(r1)
ffc0da90: 7c 08 02 a6 mflr r0
ffc0da94: be c1 00 18 stmw r22,24(r1)
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
ffc0da98: 7f c4 2a 14 add r30,r4,r5
uintptr_t const free_size = stats->free_size;
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
ffc0da9c: 7f 9e 20 40 cmplw cr7,r30,r4
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
ffc0daa0: 90 01 00 44 stw r0,68(r1)
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
ffc0daa4: 3b 40 00 00 li r26,0
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
ffc0daa8: 7c d9 33 78 mr r25,r6
ffc0daac: 7c 7f 1b 78 mr r31,r3
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
ffc0dab0: 83 83 00 20 lwz r28,32(r3)
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
ffc0dab4: 7c 9d 23 78 mr r29,r4
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
ffc0dab8: 93 41 00 0c stw r26,12(r1)
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
return false;
ffc0dabc: 38 00 00 00 li r0,0
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
ffc0dac0: 93 41 00 08 stw r26,8(r1)
uintptr_t const page_size = heap->page_size;
ffc0dac4: 83 63 00 10 lwz r27,16(r3)
uintptr_t const min_block_size = heap->min_block_size;
ffc0dac8: 80 c3 00 14 lwz r6,20(r3)
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
ffc0dacc: 83 03 00 30 lwz r24,48(r3)
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
ffc0dad0: 41 bc 02 70 blt+ cr7,ffc0dd40 <_Heap_Extend+0x2b4>
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
ffc0dad4: 7c 83 23 78 mr r3,r4
ffc0dad8: 38 e1 00 0c addi r7,r1,12
ffc0dadc: 7c a4 2b 78 mr r4,r5
ffc0dae0: 39 01 00 08 addi r8,r1,8
ffc0dae4: 7f 65 db 78 mr r5,r27
ffc0dae8: 4b ff b4 65 bl ffc08f4c <_Heap_Get_first_and_last_block>
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
/* For simplicity we reject extend areas that are too small */
return false;
ffc0daec: 7f 40 d3 78 mr r0,r26
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
ffc0daf0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0daf4: 41 9e 02 4c beq- cr7,ffc0dd40 <_Heap_Extend+0x2b4>
ffc0daf8: 7f 89 e3 78 mr r9,r28
ffc0dafc: 3a c0 00 00 li r22,0
ffc0db00: 39 40 00 00 li r10,0
ffc0db04: 3a e0 00 00 li r23,0
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
ffc0db08: 7f 89 e0 00 cmpw cr7,r9,r28
ffc0db0c: 7d 2b 4b 78 mr r11,r9
ffc0db10: 40 be 00 08 bne+ cr7,ffc0db18 <_Heap_Extend+0x8c>
ffc0db14: 81 7f 00 18 lwz r11,24(r31)
uintptr_t const sub_area_end = start_block->prev_size;
ffc0db18: 80 09 00 00 lwz r0,0(r9)
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
ffc0db1c: 7f 80 e8 40 cmplw cr7,r0,r29
ffc0db20: 40 9d 00 0c ble- cr7,ffc0db2c <_Heap_Extend+0xa0>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
ffc0db24: 7f 9e 58 40 cmplw cr7,r30,r11
ffc0db28: 41 9d 02 14 bgt- cr7,ffc0dd3c <_Heap_Extend+0x2b0>
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
ffc0db2c: 7f 9e 58 00 cmpw cr7,r30,r11
ffc0db30: 41 9e 00 10 beq- cr7,ffc0db40 <_Heap_Extend+0xb4>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
ffc0db34: 7f 9e 00 40 cmplw cr7,r30,r0
ffc0db38: 41 9c 00 10 blt- cr7,ffc0db48 <_Heap_Extend+0xbc>
ffc0db3c: 48 00 00 10 b ffc0db4c <_Heap_Extend+0xc0>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
ffc0db40: 7d 37 4b 78 mr r23,r9
ffc0db44: 48 00 00 08 b ffc0db4c <_Heap_Extend+0xc0>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
ffc0db48: 7d 2a 4b 78 mr r10,r9
ffc0db4c: 7d 60 db 96 divwu r11,r0,r27
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
ffc0db50: 7f 80 e8 00 cmpw cr7,r0,r29
ffc0db54: 7d 6b d9 d6 mullw r11,r11,r27
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc0db58: 39 6b ff f8 addi r11,r11,-8
ffc0db5c: 40 be 00 10 bne+ cr7,ffc0db6c <_Heap_Extend+0xe0>
start_block->prev_size = extend_area_end;
ffc0db60: 93 c9 00 00 stw r30,0(r9)
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 )
ffc0db64: 7d 7a 5b 78 mr r26,r11
ffc0db68: 48 00 00 10 b ffc0db78 <_Heap_Extend+0xec>
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
ffc0db6c: 7f 80 e8 40 cmplw cr7,r0,r29
ffc0db70: 40 9c 00 08 bge- cr7,ffc0db78 <_Heap_Extend+0xec>
ffc0db74: 7d 76 5b 78 mr r22,r11
- 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;
ffc0db78: 81 2b 00 04 lwz r9,4(r11)
ffc0db7c: 55 29 00 3c rlwinm r9,r9,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc0db80: 7d 29 5a 14 add r9,r9,r11
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
ffc0db84: 7f 89 e0 00 cmpw cr7,r9,r28
ffc0db88: 40 9e ff 80 bne+ cr7,ffc0db08 <_Heap_Extend+0x7c>
if ( extend_area_begin < heap->area_begin ) {
ffc0db8c: 80 1f 00 18 lwz r0,24(r31)
ffc0db90: 7f 9d 00 40 cmplw cr7,r29,r0
ffc0db94: 40 9c 00 0c bge- cr7,ffc0dba0 <_Heap_Extend+0x114>
heap->area_begin = extend_area_begin;
ffc0db98: 93 bf 00 18 stw r29,24(r31)
ffc0db9c: 48 00 00 14 b ffc0dbb0 <_Heap_Extend+0x124>
} else if ( heap->area_end < extend_area_end ) {
ffc0dba0: 80 1f 00 1c lwz r0,28(r31)
ffc0dba4: 7f 80 f0 40 cmplw cr7,r0,r30
ffc0dba8: 40 9c 00 08 bge- cr7,ffc0dbb0 <_Heap_Extend+0x124>
heap->area_end = extend_area_end;
ffc0dbac: 93 df 00 1c stw r30,28(r31)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
ffc0dbb0: 81 61 00 0c lwz r11,12(r1)
ffc0dbb4: 81 21 00 08 lwz r9,8(r1)
extend_first_block->prev_size = extend_area_end;
ffc0dbb8: 93 cb 00 00 stw r30,0(r11)
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
ffc0dbbc: 7c 0b 48 50 subf r0,r11,r9
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
ffc0dbc0: 60 08 00 01 ori r8,r0,1
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
ffc0dbc4: 90 09 00 00 stw r0,0(r9)
extend_last_block->size_and_flag = 0;
ffc0dbc8: 38 00 00 00 li r0,0
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
ffc0dbcc: 91 0b 00 04 stw r8,4(r11)
extend_first_block_size | HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
ffc0dbd0: 90 09 00 04 stw r0,4(r9)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
ffc0dbd4: 80 1f 00 20 lwz r0,32(r31)
ffc0dbd8: 7f 80 58 40 cmplw cr7,r0,r11
ffc0dbdc: 40 9d 00 0c ble- cr7,ffc0dbe8 <_Heap_Extend+0x15c>
heap->first_block = extend_first_block;
ffc0dbe0: 91 7f 00 20 stw r11,32(r31)
ffc0dbe4: 48 00 00 14 b ffc0dbf8 <_Heap_Extend+0x16c>
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
ffc0dbe8: 80 1f 00 24 lwz r0,36(r31)
ffc0dbec: 7f 80 48 40 cmplw cr7,r0,r9
ffc0dbf0: 40 9c 00 08 bge- cr7,ffc0dbf8 <_Heap_Extend+0x16c>
heap->last_block = extend_last_block;
ffc0dbf4: 91 3f 00 24 stw r9,36(r31)
}
if ( merge_below_block != NULL ) {
ffc0dbf8: 2f 97 00 00 cmpwi cr7,r23,0
ffc0dbfc: 41 9e 00 48 beq- cr7,ffc0dc44 <_Heap_Extend+0x1b8>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
ffc0dc00: 80 1f 00 10 lwz r0,16(r31)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
ffc0dc04: 3b bd 00 08 addi r29,r29,8
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
ffc0dc08: 7d 3d 03 96 divwu r9,r29,r0
ffc0dc0c: 7d 29 01 d6 mullw r9,r9,r0
if ( remainder != 0 ) {
ffc0dc10: 7d 29 e8 51 subf. r9,r9,r29
ffc0dc14: 41 82 00 0c beq- ffc0dc20 <_Heap_Extend+0x194> <== NEVER TAKEN
return value - remainder + alignment;
ffc0dc18: 7f bd 02 14 add r29,r29,r0
ffc0dc1c: 7f a9 e8 50 subf r29,r9,r29
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
ffc0dc20: 80 17 00 00 lwz r0,0(r23)
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
ffc0dc24: 38 9d ff f8 addi r4,r29,-8
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
_Heap_Free_block( heap, new_first_block );
ffc0dc28: 7f e3 fb 78 mr r3,r31
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
ffc0dc2c: 90 1d ff f8 stw r0,-8(r29)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
ffc0dc30: 7c 04 b8 50 subf r0,r4,r23
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
ffc0dc34: 60 00 00 01 ori r0,r0,1
ffc0dc38: 90 04 00 04 stw r0,4(r4)
_Heap_Free_block( heap, new_first_block );
ffc0dc3c: 4b ff fe 15 bl ffc0da50 <_Heap_Free_block>
ffc0dc40: 48 00 00 1c b ffc0dc5c <_Heap_Extend+0x1d0>
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
ffc0dc44: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0dc48: 41 9e 00 14 beq- cr7,ffc0dc5c <_Heap_Extend+0x1d0>
_Heap_Link_below(
ffc0dc4c: 81 21 00 08 lwz r9,8(r1)
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
ffc0dc50: 7d 49 50 50 subf r10,r9,r10
ffc0dc54: 61 4a 00 01 ori r10,r10,1
)
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
ffc0dc58: 91 49 00 04 stw r10,4(r9)
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
ffc0dc5c: 2f 9a 00 00 cmpwi cr7,r26,0
ffc0dc60: 41 9e 00 4c beq- cr7,ffc0dcac <_Heap_Extend+0x220>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc0dc64: 80 1f 00 10 lwz r0,16(r31)
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
ffc0dc68: 3b de ff f8 addi r30,r30,-8
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
ffc0dc6c: 7f da f0 50 subf r30,r26,r30
ffc0dc70: 7f de 03 96 divwu r30,r30,r0
ffc0dc74: 7f de 01 d6 mullw r30,r30,r0
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
ffc0dc78: 80 1a 00 04 lwz r0,4(r26)
| HEAP_PREV_BLOCK_USED;
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
ffc0dc7c: 7f e3 fb 78 mr r3,r31
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
ffc0dc80: 7c 1e 00 50 subf r0,r30,r0
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
ffc0dc84: 7d 3e d2 14 add r9,r30,r26
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
ffc0dc88: 60 00 00 01 ori r0,r0,1
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
ffc0dc8c: 90 09 00 04 stw r0,4(r9)
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
ffc0dc90: 7f 44 d3 78 mr r4,r26
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
ffc0dc94: 80 1a 00 04 lwz r0,4(r26)
ffc0dc98: 54 00 07 fe clrlwi r0,r0,31
block->size_and_flag = size | flag;
ffc0dc9c: 7f de 03 78 or r30,r30,r0
ffc0dca0: 93 da 00 04 stw r30,4(r26)
ffc0dca4: 4b ff fd ad bl ffc0da50 <_Heap_Free_block>
ffc0dca8: 48 00 00 34 b ffc0dcdc <_Heap_Extend+0x250>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
ffc0dcac: 2f 96 00 00 cmpwi cr7,r22,0
ffc0dcb0: 41 9e 00 2c beq- cr7,ffc0dcdc <_Heap_Extend+0x250>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
ffc0dcb4: 81 76 00 04 lwz r11,4(r22)
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
ffc0dcb8: 80 01 00 0c lwz r0,12(r1)
ffc0dcbc: 55 6b 07 fe clrlwi r11,r11,31
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
_Heap_Link_above(
ffc0dcc0: 81 21 00 08 lwz r9,8(r1)
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
ffc0dcc4: 7c 16 00 50 subf r0,r22,r0
block->size_and_flag = size | flag;
ffc0dcc8: 7d 60 03 78 or r0,r11,r0
ffc0dccc: 90 16 00 04 stw r0,4(r22)
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
ffc0dcd0: 80 09 00 04 lwz r0,4(r9)
ffc0dcd4: 60 00 00 01 ori r0,r0,1
ffc0dcd8: 90 09 00 04 stw r0,4(r9)
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
ffc0dcdc: 2f 97 00 00 cmpwi cr7,r23,0
ffc0dce0: 40 be 00 18 bne+ cr7,ffc0dcf8 <_Heap_Extend+0x26c>
ffc0dce4: 2f 9a 00 00 cmpwi cr7,r26,0
ffc0dce8: 40 be 00 10 bne+ cr7,ffc0dcf8 <_Heap_Extend+0x26c>
_Heap_Free_block( heap, extend_first_block );
ffc0dcec: 80 81 00 0c lwz r4,12(r1)
ffc0dcf0: 7f e3 fb 78 mr r3,r31
ffc0dcf4: 4b ff fd 5d bl ffc0da50 <_Heap_Free_block>
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
ffc0dcf8: 81 3f 00 24 lwz r9,36(r31)
extended_size = stats->free_size - free_size;
/* Statistics */
stats->size += extended_size;
if ( extended_size_ptr != NULL )
ffc0dcfc: 2f 99 00 00 cmpwi cr7,r25,0
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
ffc0dd00: 80 1f 00 20 lwz r0,32(r31)
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
ffc0dd04: 81 69 00 04 lwz r11,4(r9)
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
ffc0dd08: 7c 09 00 50 subf r0,r9,r0
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
ffc0dd0c: 55 6b 07 fe clrlwi r11,r11,31
block->size_and_flag = size | flag;
ffc0dd10: 7d 60 03 78 or r0,r11,r0
ffc0dd14: 90 09 00 04 stw r0,4(r9)
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
ffc0dd18: 80 1f 00 30 lwz r0,48(r31)
ffc0dd1c: 7f 18 00 50 subf r24,r24,r0
/* Statistics */
stats->size += extended_size;
ffc0dd20: 80 1f 00 2c lwz r0,44(r31)
ffc0dd24: 7c 00 c2 14 add r0,r0,r24
ffc0dd28: 90 1f 00 2c stw r0,44(r31)
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
ffc0dd2c: 38 00 00 01 li r0,1
extended_size = stats->free_size - free_size;
/* Statistics */
stats->size += extended_size;
if ( extended_size_ptr != NULL )
ffc0dd30: 41 9e 00 10 beq- cr7,ffc0dd40 <_Heap_Extend+0x2b4> <== NEVER TAKEN
*extended_size_ptr = extended_size;
ffc0dd34: 93 19 00 00 stw r24,0(r25)
ffc0dd38: 48 00 00 08 b ffc0dd40 <_Heap_Extend+0x2b4>
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
ffc0dd3c: 38 00 00 00 li r0,0
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
ffc0dd40: 39 61 00 40 addi r11,r1,64
ffc0dd44: 7c 03 03 78 mr r3,r0
ffc0dd48: 4b ff 27 80 b ffc004c8 <_restgpr_22_x>
ffc0ddcc <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
ffc0ddcc: 7c 2b 0b 78 mr r11,r1
ffc0ddd0: 94 21 ff f0 stwu r1,-16(r1)
ffc0ddd4: 7c 08 02 a6 mflr r0
ffc0ddd8: 7c 69 1b 78 mr r9,r3
ffc0dddc: 48 00 c5 59 bl ffc1a334 <_savegpr_31>
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
ffc0dde0: 7c 8b 23 79 mr. r11,r4
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
ffc0dde4: 90 01 00 14 stw r0,20(r1)
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
return true;
ffc0dde8: 38 60 00 01 li r3,1
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
ffc0ddec: 41 82 01 e8 beq- ffc0dfd4 <_Heap_Free+0x208>
ffc0ddf0: 80 09 00 10 lwz r0,16(r9)
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
ffc0ddf4: 80 a9 00 20 lwz r5,32(r9)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc0ddf8: 7d 6b 03 96 divwu r11,r11,r0
ffc0ddfc: 7d 6b 01 d6 mullw r11,r11,r0
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;
ffc0de00: 38 00 00 00 li r0,0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc0de04: 39 6b ff f8 addi r11,r11,-8
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;
ffc0de08: 7f 8b 28 40 cmplw cr7,r11,r5
ffc0de0c: 41 9c 00 14 blt- cr7,ffc0de20 <_Heap_Free+0x54>
ffc0de10: 80 09 00 24 lwz r0,36(r9)
ffc0de14: 7c 0b 00 10 subfc r0,r11,r0
ffc0de18: 38 00 00 00 li r0,0
ffc0de1c: 7c 00 01 14 adde r0,r0,r0
}
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
ffc0de20: 2f 80 00 00 cmpwi cr7,r0,0
return false;
ffc0de24: 38 60 00 00 li r3,0
}
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
ffc0de28: 41 9e 01 ac beq- cr7,ffc0dfd4 <_Heap_Free+0x208>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0de2c: 80 cb 00 04 lwz r6,4(r11)
ffc0de30: 38 00 00 00 li r0,0
- 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;
ffc0de34: 54 c8 00 3c rlwinm r8,r6,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc0de38: 7d 48 5a 14 add r10,r8,r11
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;
ffc0de3c: 7f 8a 28 40 cmplw cr7,r10,r5
ffc0de40: 41 9c 00 14 blt- cr7,ffc0de54 <_Heap_Free+0x88> <== NEVER TAKEN
ffc0de44: 80 09 00 24 lwz r0,36(r9)
ffc0de48: 7c 0a 00 10 subfc r0,r10,r0
ffc0de4c: 38 00 00 00 li r0,0
ffc0de50: 7c 00 01 14 adde r0,r0,r0
_Heap_Protection_block_check( heap, block );
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
ffc0de54: 2f 80 00 00 cmpwi cr7,r0,0
return false;
ffc0de58: 38 60 00 00 li r3,0
_Heap_Protection_block_check( heap, block );
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
ffc0de5c: 41 9e 01 78 beq- cr7,ffc0dfd4 <_Heap_Free+0x208> <== NEVER TAKEN
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0de60: 80 0a 00 04 lwz r0,4(r10)
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
ffc0de64: 70 04 00 01 andi. r4,r0,1
ffc0de68: 41 82 01 6c beq- ffc0dfd4 <_Heap_Free+0x208>
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
ffc0de6c: 80 69 00 24 lwz r3,36(r9)
- 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;
ffc0de70: 54 00 00 3c rlwinm r0,r0,0,0,30
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
ffc0de74: 38 80 00 00 li r4,0
ffc0de78: 7f 8a 18 00 cmpw cr7,r10,r3
ffc0de7c: 41 9e 00 18 beq- cr7,ffc0de94 <_Heap_Free+0xc8>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0de80: 7c ea 02 14 add r7,r10,r0
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;
ffc0de84: 80 e7 00 04 lwz r7,4(r7)
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
ffc0de88: 70 ff 00 01 andi. r31,r7,1
ffc0de8c: 7c 80 00 26 mfcr r4
ffc0de90: 54 84 1f fe rlwinm r4,r4,3,31,31
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 ) ) {
ffc0de94: 70 c7 00 01 andi. r7,r6,1
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
ffc0de98: 54 84 06 3e clrlwi r4,r4,24
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
ffc0de9c: 40 82 00 94 bne- ffc0df30 <_Heap_Free+0x164>
uintptr_t const prev_size = block->prev_size;
ffc0dea0: 80 cb 00 00 lwz r6,0(r11)
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;
ffc0dea4: 39 80 00 00 li r12,0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc0dea8: 7c e6 58 50 subf r7,r6,r11
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;
ffc0deac: 7f 87 28 40 cmplw cr7,r7,r5
ffc0deb0: 41 9c 00 10 blt- cr7,ffc0dec0 <_Heap_Free+0xf4> <== NEVER TAKEN
ffc0deb4: 7d 87 18 10 subfc r12,r7,r3
ffc0deb8: 39 80 00 00 li r12,0
ffc0debc: 7d 8c 61 14 adde r12,r12,r12
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
ffc0dec0: 2f 8c 00 00 cmpwi cr7,r12,0
_HAssert( false );
return( false );
ffc0dec4: 38 60 00 00 li r3,0
if ( !_Heap_Is_prev_used( block ) ) {
uintptr_t const prev_size = block->prev_size;
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
ffc0dec8: 41 9e 01 0c beq- cr7,ffc0dfd4 <_Heap_Free+0x208> <== 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;
ffc0decc: 80 a7 00 04 lwz r5,4(r7)
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) ) {
ffc0ded0: 70 bf 00 01 andi. r31,r5,1
ffc0ded4: 41 82 01 00 beq- ffc0dfd4 <_Heap_Free+0x208> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
ffc0ded8: 2f 84 00 00 cmpwi cr7,r4,0
ffc0dedc: 7c c8 32 14 add r6,r8,r6
ffc0dee0: 41 9e 00 34 beq- cr7,ffc0df14 <_Heap_Free+0x148>
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
ffc0dee4: 81 6a 00 08 lwz r11,8(r10)
uintptr_t const size = block_size + prev_size + next_block_size;
ffc0dee8: 7c c6 02 14 add r6,r6,r0
Heap_Block *prev = block->prev;
ffc0deec: 81 4a 00 0c lwz r10,12(r10)
prev->next = next;
ffc0def0: 91 6a 00 08 stw r11,8(r10)
next->prev = prev;
ffc0def4: 91 4b 00 0c stw r10,12(r11)
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
ffc0def8: 81 69 00 38 lwz r11,56(r9)
ffc0defc: 38 0b ff ff addi r0,r11,-1
ffc0df00: 90 09 00 38 stw r0,56(r9)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0df04: 60 c0 00 01 ori r0,r6,1
ffc0df08: 90 07 00 04 stw r0,4(r7)
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
ffc0df0c: 7c c6 39 2e stwx r6,r6,r7
ffc0df10: 48 00 00 9c b ffc0dfac <_Heap_Free+0x1e0>
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0df14: 60 c0 00 01 ori r0,r6,1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
ffc0df18: 7c c8 59 2e stwx r6,r8,r11
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;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0df1c: 90 07 00 04 stw r0,4(r7)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
ffc0df20: 80 0a 00 04 lwz r0,4(r10)
ffc0df24: 54 00 00 3c rlwinm r0,r0,0,0,30
ffc0df28: 90 0a 00 04 stw r0,4(r10)
ffc0df2c: 48 00 00 80 b ffc0dfac <_Heap_Free+0x1e0>
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
ffc0df30: 2f 84 00 00 cmpwi cr7,r4,0
ffc0df34: 41 9e 00 30 beq- cr7,ffc0df64 <_Heap_Free+0x198>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
ffc0df38: 80 ca 00 08 lwz r6,8(r10)
uintptr_t const size = block_size + next_block_size;
ffc0df3c: 7c e0 42 14 add r7,r0,r8
Heap_Block *prev = old_block->prev;
ffc0df40: 81 4a 00 0c lwz r10,12(r10)
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0df44: 60 e0 00 01 ori r0,r7,1
new_block->next = next;
ffc0df48: 90 cb 00 08 stw r6,8(r11)
new_block->prev = prev;
ffc0df4c: 91 4b 00 0c stw r10,12(r11)
next->prev = new_block;
prev->next = new_block;
ffc0df50: 91 6a 00 08 stw r11,8(r10)
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
ffc0df54: 91 66 00 0c stw r11,12(r6)
ffc0df58: 90 0b 00 04 stw r0,4(r11)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
ffc0df5c: 7c e7 59 2e stwx r7,r7,r11
ffc0df60: 48 00 00 4c b ffc0dfac <_Heap_Free+0x1e0>
} 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;
ffc0df64: 61 00 00 01 ori r0,r8,1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
ffc0df68: 80 e9 00 08 lwz r7,8(r9)
ffc0df6c: 90 0b 00 04 stw r0,4(r11)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
ffc0df70: 80 0a 00 04 lwz r0,4(r10)
new_block->next = next;
ffc0df74: 90 eb 00 08 stw r7,8(r11)
ffc0df78: 54 00 00 3c rlwinm r0,r0,0,0,30
new_block->prev = block_before;
ffc0df7c: 91 2b 00 0c stw r9,12(r11)
next_block->prev_size = block_size;
ffc0df80: 7d 08 59 2e stwx r8,r8,r11
block_before->next = new_block;
next->prev = new_block;
ffc0df84: 91 67 00 0c stw r11,12(r7)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
ffc0df88: 91 69 00 08 stw r11,8(r9)
/* Statistics */
++stats->free_blocks;
ffc0df8c: 81 69 00 38 lwz r11,56(r9)
} 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;
ffc0df90: 90 0a 00 04 stw r0,4(r10)
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
ffc0df94: 38 0b 00 01 addi r0,r11,1
if ( stats->max_free_blocks < stats->free_blocks ) {
ffc0df98: 81 69 00 3c lwz r11,60(r9)
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;
ffc0df9c: 90 09 00 38 stw r0,56(r9)
if ( stats->max_free_blocks < stats->free_blocks ) {
ffc0dfa0: 7f 8b 00 40 cmplw cr7,r11,r0
ffc0dfa4: 40 9c 00 08 bge- cr7,ffc0dfac <_Heap_Free+0x1e0>
stats->max_free_blocks = stats->free_blocks;
ffc0dfa8: 90 09 00 3c stw r0,60(r9)
}
}
/* Statistics */
--stats->used_blocks;
ffc0dfac: 81 69 00 40 lwz r11,64(r9)
++stats->frees;
stats->free_size += block_size;
return( true );
ffc0dfb0: 38 60 00 01 li r3,1
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc0dfb4: 38 0b ff ff addi r0,r11,-1
++stats->frees;
ffc0dfb8: 81 69 00 50 lwz r11,80(r9)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc0dfbc: 90 09 00 40 stw r0,64(r9)
++stats->frees;
ffc0dfc0: 38 0b 00 01 addi r0,r11,1
ffc0dfc4: 90 09 00 50 stw r0,80(r9)
stats->free_size += block_size;
ffc0dfc8: 80 09 00 30 lwz r0,48(r9)
ffc0dfcc: 7d 00 42 14 add r8,r0,r8
ffc0dfd0: 91 09 00 30 stw r8,48(r9)
return( true );
}
ffc0dfd4: 39 61 00 10 addi r11,r1,16
ffc0dfd8: 4b ff 25 5c b ffc00534 <_restgpr_31_x>
ffc1ae40 <_Heap_Size_of_alloc_area>:
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc1ae40: 80 03 00 10 lwz r0,16(r3)
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
ffc1ae44: 7c 69 1b 78 mr r9,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
ffc1ae48: 81 03 00 20 lwz r8,32(r3)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc1ae4c: 7d 44 03 96 divwu r10,r4,r0
ffc1ae50: 7d 4a 01 d6 mullw r10,r10,r0
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;
ffc1ae54: 38 00 00 00 li r0,0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc1ae58: 39 4a ff f8 addi r10,r10,-8
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;
ffc1ae5c: 7f 8a 40 40 cmplw cr7,r10,r8
ffc1ae60: 41 9c 00 14 blt- cr7,ffc1ae74 <_Heap_Size_of_alloc_area+0x34>
ffc1ae64: 80 03 00 24 lwz r0,36(r3)
ffc1ae68: 7c 0a 00 10 subfc r0,r10,r0
ffc1ae6c: 38 00 00 00 li r0,0
ffc1ae70: 7c 00 01 14 adde r0,r0,r0
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
ffc1ae74: 2f 80 00 00 cmpwi cr7,r0,0
return false;
ffc1ae78: 38 60 00 00 li r3,0
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
ffc1ae7c: 4d 9e 00 20 beqlr cr7
- 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;
ffc1ae80: 81 6a 00 04 lwz r11,4(r10)
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;
ffc1ae84: 38 00 00 00 li r0,0
- 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;
ffc1ae88: 55 6b 00 3c rlwinm r11,r11,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc1ae8c: 7d 6b 52 14 add r11,r11,r10
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;
ffc1ae90: 7f 8b 40 40 cmplw cr7,r11,r8
ffc1ae94: 41 9c 00 14 blt- cr7,ffc1aea8 <_Heap_Size_of_alloc_area+0x68><== NEVER TAKEN
ffc1ae98: 80 09 00 24 lwz r0,36(r9)
ffc1ae9c: 7c 0b 00 10 subfc r0,r11,r0
ffc1aea0: 38 00 00 00 li r0,0
ffc1aea4: 7c 00 01 14 adde r0,r0,r0
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
ffc1aea8: 2f 80 00 00 cmpwi cr7,r0,0
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
ffc1aeac: 38 60 00 00 li r3,0
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
ffc1aeb0: 4d 9e 00 20 beqlr cr7
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;
ffc1aeb4: 80 0b 00 04 lwz r0,4(r11)
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
ffc1aeb8: 70 09 00 01 andi. r9,r0,1
ffc1aebc: 4d 82 00 20 beqlr
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
ffc1aec0: 20 84 00 04 subfic r4,r4,4
ffc1aec4: 7d 64 5a 14 add r11,r4,r11
ffc1aec8: 91 65 00 00 stw r11,0(r5)
return true;
ffc1aecc: 38 60 00 01 li r3,1
}
ffc1aed0: 4e 80 00 20 blr
ffc09bb8 <_Heap_Walk>:
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
ffc09bb8: 2f 85 00 00 cmpwi cr7,r5,0
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
ffc09bbc: 94 21 ff 98 stwu r1,-104(r1)
ffc09bc0: 7c 08 02 a6 mflr r0
ffc09bc4: bd c1 00 20 stmw r14,32(r1)
ffc09bc8: 7c 7e 1b 78 mr r30,r3
ffc09bcc: 7c 9f 23 78 mr r31,r4
ffc09bd0: 90 01 00 6c stw r0,108(r1)
uintptr_t const page_size = heap->page_size;
ffc09bd4: 83 43 00 10 lwz r26,16(r3)
uintptr_t const min_block_size = heap->min_block_size;
ffc09bd8: 83 23 00 14 lwz r25,20(r3)
Heap_Block *const first_block = heap->first_block;
ffc09bdc: 83 03 00 20 lwz r24,32(r3)
Heap_Block *const last_block = heap->last_block;
ffc09be0: 82 e3 00 24 lwz r23,36(r3)
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
ffc09be4: 41 9e 00 10 beq- cr7,ffc09bf4 <_Heap_Walk+0x3c>
ffc09be8: 3d 20 ff c1 lis r9,-63
ffc09bec: 39 29 9b 08 addi r9,r9,-25848
ffc09bf0: 48 00 00 0c b ffc09bfc <_Heap_Walk+0x44>
ffc09bf4: 3d 20 ff c1 lis r9,-63
ffc09bf8: 39 29 9b 04 addi r9,r9,-25852
ffc09bfc: 91 21 00 18 stw r9,24(r1)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
ffc09c00: 3d 20 00 00 lis r9,0
return true;
ffc09c04: 38 60 00 01 li r3,1
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
ffc09c08: 80 09 27 e0 lwz r0,10208(r9)
ffc09c0c: 2f 80 00 03 cmpwi cr7,r0,3
ffc09c10: 40 be 04 bc bne+ cr7,ffc0a0cc <_Heap_Walk+0x514>
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)(
ffc09c14: 80 1e 00 08 lwz r0,8(r30)
ffc09c18: 3c a0 ff c1 lis r5,-63
ffc09c1c: 81 1e 00 18 lwz r8,24(r30)
ffc09c20: 7f e3 fb 78 mr r3,r31
ffc09c24: 90 01 00 0c stw r0,12(r1)
ffc09c28: 38 80 00 00 li r4,0
ffc09c2c: 38 a5 74 ad addi r5,r5,29869
ffc09c30: 80 1e 00 0c lwz r0,12(r30)
ffc09c34: 7f 46 d3 78 mr r6,r26
ffc09c38: 81 3e 00 1c lwz r9,28(r30)
ffc09c3c: 7f 27 cb 78 mr r7,r25
ffc09c40: 90 01 00 10 stw r0,16(r1)
ffc09c44: 7f 0a c3 78 mr r10,r24
ffc09c48: 80 01 00 18 lwz r0,24(r1)
ffc09c4c: 92 e1 00 08 stw r23,8(r1)
ffc09c50: 7c 09 03 a6 mtctr r0
ffc09c54: 4c c6 31 82 crclr 4*cr1+eq
ffc09c58: 4e 80 04 21 bctrl
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
ffc09c5c: 2f 9a 00 00 cmpwi cr7,r26,0
ffc09c60: 40 be 00 18 bne+ cr7,ffc09c78 <_Heap_Walk+0xc0>
(*printer)( source, true, "page size is zero\n" );
ffc09c64: 3c a0 ff c1 lis r5,-63
ffc09c68: 7f e3 fb 78 mr r3,r31
ffc09c6c: 38 80 00 01 li r4,1
ffc09c70: 38 a5 75 3e addi r5,r5,30014
ffc09c74: 48 00 00 c0 b ffc09d34 <_Heap_Walk+0x17c>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
ffc09c78: 73 49 00 07 andi. r9,r26,7
ffc09c7c: 41 a2 00 1c beq+ ffc09c98 <_Heap_Walk+0xe0>
(*printer)(
ffc09c80: 3c a0 ff c1 lis r5,-63
ffc09c84: 7f e3 fb 78 mr r3,r31
ffc09c88: 38 80 00 01 li r4,1
ffc09c8c: 38 a5 75 51 addi r5,r5,30033
ffc09c90: 7f 46 d3 78 mr r6,r26
ffc09c94: 48 00 04 54 b ffc0a0e8 <_Heap_Walk+0x530>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc09c98: 7c 19 d3 96 divwu r0,r25,r26
ffc09c9c: 7c 00 d1 d6 mullw r0,r0,r26
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
ffc09ca0: 7f 99 00 00 cmpw cr7,r25,r0
ffc09ca4: 41 be 00 1c beq+ cr7,ffc09cc0 <_Heap_Walk+0x108>
(*printer)(
ffc09ca8: 3c a0 ff c1 lis r5,-63
ffc09cac: 7f e3 fb 78 mr r3,r31
ffc09cb0: 38 80 00 01 li r4,1
ffc09cb4: 38 a5 75 6f addi r5,r5,30063
ffc09cb8: 7f 26 cb 78 mr r6,r25
ffc09cbc: 48 00 04 2c b ffc0a0e8 <_Heap_Walk+0x530>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc09cc0: 38 18 00 08 addi r0,r24,8
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc09cc4: 7d 20 d3 96 divwu r9,r0,r26
ffc09cc8: 7d 29 d1 d6 mullw r9,r9,r26
);
return false;
}
if (
ffc09ccc: 7f 80 48 00 cmpw cr7,r0,r9
ffc09cd0: 41 be 00 1c beq+ cr7,ffc09cec <_Heap_Walk+0x134>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
ffc09cd4: 3c a0 ff c1 lis r5,-63
ffc09cd8: 7f e3 fb 78 mr r3,r31
ffc09cdc: 38 80 00 01 li r4,1
ffc09ce0: 38 a5 75 93 addi r5,r5,30099
ffc09ce4: 7f 06 c3 78 mr r6,r24
ffc09ce8: 48 00 04 00 b ffc0a0e8 <_Heap_Walk+0x530>
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;
ffc09cec: 80 18 00 04 lwz r0,4(r24)
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
ffc09cf0: 70 09 00 01 andi. r9,r0,1
ffc09cf4: 40 a2 00 18 bne+ ffc09d0c <_Heap_Walk+0x154>
(*printer)(
ffc09cf8: 3c a0 ff c1 lis r5,-63
ffc09cfc: 7f e3 fb 78 mr r3,r31
ffc09d00: 38 80 00 01 li r4,1
ffc09d04: 38 a5 75 c4 addi r5,r5,30148
ffc09d08: 48 00 00 2c b ffc09d34 <_Heap_Walk+0x17c>
- 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;
ffc09d0c: 83 b7 00 04 lwz r29,4(r23)
ffc09d10: 57 bd 00 3c rlwinm r29,r29,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc09d14: 7f b7 ea 14 add r29,r23,r29
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;
ffc09d18: 80 1d 00 04 lwz r0,4(r29)
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
ffc09d1c: 70 09 00 01 andi. r9,r0,1
ffc09d20: 40 a2 00 28 bne+ ffc09d48 <_Heap_Walk+0x190>
(*printer)(
ffc09d24: 3c a0 ff c1 lis r5,-63
ffc09d28: 7f e3 fb 78 mr r3,r31
ffc09d2c: 38 80 00 01 li r4,1
ffc09d30: 38 a5 75 f2 addi r5,r5,30194
ffc09d34: 80 01 00 18 lwz r0,24(r1)
ffc09d38: 7c 09 03 a6 mtctr r0
ffc09d3c: 4c c6 31 82 crclr 4*cr1+eq
ffc09d40: 4e 80 04 21 bctrl
ffc09d44: 48 00 00 ec b ffc09e30 <_Heap_Walk+0x278>
);
return false;
}
if (
ffc09d48: 7f 9d c0 00 cmpw cr7,r29,r24
ffc09d4c: 41 9e 00 18 beq- cr7,ffc09d64 <_Heap_Walk+0x1ac>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
ffc09d50: 3c a0 ff c1 lis r5,-63
ffc09d54: 7f e3 fb 78 mr r3,r31
ffc09d58: 38 80 00 01 li r4,1
ffc09d5c: 38 a5 76 07 addi r5,r5,30215
ffc09d60: 4b ff ff d4 b ffc09d34 <_Heap_Walk+0x17c>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
ffc09d64: 81 3e 00 10 lwz r9,16(r30)
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
ffc09d68: 7f c0 f3 78 mr r0,r30
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc09d6c: 80 de 00 08 lwz r6,8(r30)
ffc09d70: 48 00 00 d0 b ffc09e40 <_Heap_Walk+0x288>
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;
ffc09d74: 81 5e 00 20 lwz r10,32(r30)
ffc09d78: 39 60 00 00 li r11,0
ffc09d7c: 7f 8a 30 40 cmplw cr7,r10,r6
ffc09d80: 41 9d 00 14 bgt- cr7,ffc09d94 <_Heap_Walk+0x1dc>
ffc09d84: 81 7e 00 24 lwz r11,36(r30)
ffc09d88: 7d 66 58 10 subfc r11,r6,r11
ffc09d8c: 39 60 00 00 li r11,0
ffc09d90: 7d 6b 59 14 adde r11,r11,r11
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
ffc09d94: 2f 8b 00 00 cmpwi cr7,r11,0
ffc09d98: 40 be 00 18 bne+ cr7,ffc09db0 <_Heap_Walk+0x1f8>
(*printer)(
ffc09d9c: 3c a0 ff c1 lis r5,-63
ffc09da0: 7f e3 fb 78 mr r3,r31
ffc09da4: 38 80 00 01 li r4,1
ffc09da8: 38 a5 76 36 addi r5,r5,30262
ffc09dac: 48 00 03 3c b ffc0a0e8 <_Heap_Walk+0x530>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc09db0: 39 66 00 08 addi r11,r6,8
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc09db4: 7d 4b 4b 96 divwu r10,r11,r9
ffc09db8: 7d 4a 49 d6 mullw r10,r10,r9
);
return false;
}
if (
ffc09dbc: 7f 8b 50 00 cmpw cr7,r11,r10
ffc09dc0: 41 be 00 18 beq+ cr7,ffc09dd8 <_Heap_Walk+0x220>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
ffc09dc4: 3c a0 ff c1 lis r5,-63
ffc09dc8: 7f e3 fb 78 mr r3,r31
ffc09dcc: 38 80 00 01 li r4,1
ffc09dd0: 38 a5 76 56 addi r5,r5,30294
ffc09dd4: 48 00 03 14 b ffc0a0e8 <_Heap_Walk+0x530>
- 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;
ffc09dd8: 81 66 00 04 lwz r11,4(r6)
ffc09ddc: 55 6b 00 3c rlwinm r11,r11,0,0,30
block = next_block;
} while ( block != first_block );
return true;
}
ffc09de0: 7d 66 5a 14 add r11,r6,r11
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;
ffc09de4: 81 6b 00 04 lwz r11,4(r11)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc09de8: 71 6a 00 01 andi. r10,r11,1
ffc09dec: 41 a2 00 18 beq+ ffc09e04 <_Heap_Walk+0x24c>
(*printer)(
ffc09df0: 3c a0 ff c1 lis r5,-63
ffc09df4: 7f e3 fb 78 mr r3,r31
ffc09df8: 38 80 00 01 li r4,1
ffc09dfc: 38 a5 76 86 addi r5,r5,30342
ffc09e00: 48 00 02 e8 b ffc0a0e8 <_Heap_Walk+0x530>
);
return false;
}
if ( free_block->prev != prev_block ) {
ffc09e04: 80 e6 00 0c lwz r7,12(r6)
ffc09e08: 7f 87 00 00 cmpw cr7,r7,r0
ffc09e0c: 41 be 00 2c beq+ cr7,ffc09e38 <_Heap_Walk+0x280>
(*printer)(
ffc09e10: 3c a0 ff c1 lis r5,-63
ffc09e14: 7f e3 fb 78 mr r3,r31
ffc09e18: 38 80 00 01 li r4,1
ffc09e1c: 38 a5 76 a2 addi r5,r5,30370
ffc09e20: 80 01 00 18 lwz r0,24(r1)
ffc09e24: 7c 09 03 a6 mtctr r0
ffc09e28: 4c c6 31 82 crclr 4*cr1+eq
ffc09e2c: 4e 80 04 21 bctrl
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
ffc09e30: 38 60 00 00 li r3,0
ffc09e34: 48 00 02 98 b ffc0a0cc <_Heap_Walk+0x514>
return false;
}
prev_block = free_block;
free_block = free_block->next;
ffc09e38: 7c c0 33 78 mr r0,r6
ffc09e3c: 80 c6 00 08 lwz r6,8(r6)
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 ) {
ffc09e40: 7f 86 f0 00 cmpw cr7,r6,r30
ffc09e44: 40 9e ff 30 bne+ cr7,ffc09d74 <_Heap_Walk+0x1bc>
ffc09e48: 48 00 00 0c b ffc09e54 <_Heap_Walk+0x29c>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
ffc09e4c: 7f 7d db 78 mr r29,r27
ffc09e50: 48 00 00 30 b ffc09e80 <_Heap_Walk+0x2c8>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc09e54: 3e 60 ff c1 lis r19,-63
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
ffc09e58: 3e 80 ff c1 lis r20,-63
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)(
ffc09e5c: 3e 40 ff c1 lis r18,-63
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc09e60: 3a 73 78 42 addi r19,r19,30786
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
ffc09e64: 3a 94 78 2b addi r20,r20,30763
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)(
ffc09e68: 3a 52 77 8e addi r18,r18,30606
ffc09e6c: 3e 20 ff c1 lis r17,-63
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc09e70: 3e c0 ff c1 lis r22,-63
ffc09e74: 3e 00 ff c1 lis r16,-63
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)(
ffc09e78: 3d e0 ff c1 lis r15,-63
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc09e7c: 3d c0 ff c1 lis r14,-63
block = next_block;
} while ( block != first_block );
return true;
}
ffc09e80: 82 bd 00 04 lwz r21,4(r29)
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;
ffc09e84: 38 00 00 00 li r0,0
ffc09e88: 81 3e 00 20 lwz r9,32(r30)
- 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;
ffc09e8c: 56 bc 00 3c rlwinm r28,r21,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc09e90: 7f 7c ea 14 add r27,r28,r29
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;
ffc09e94: 7f 89 d8 40 cmplw cr7,r9,r27
ffc09e98: 41 9d 00 14 bgt- cr7,ffc09eac <_Heap_Walk+0x2f4> <== NEVER TAKEN
ffc09e9c: 80 1e 00 24 lwz r0,36(r30)
ffc09ea0: 7c 1b 00 10 subfc r0,r27,r0
ffc09ea4: 38 00 00 00 li r0,0
ffc09ea8: 7c 00 01 14 adde r0,r0,r0
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;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
ffc09eac: 2f 80 00 00 cmpwi cr7,r0,0
ffc09eb0: 40 be 00 18 bne+ cr7,ffc09ec8 <_Heap_Walk+0x310>
(*printer)(
ffc09eb4: 3c a0 ff c1 lis r5,-63
ffc09eb8: 7f e3 fb 78 mr r3,r31
ffc09ebc: 38 80 00 01 li r4,1
ffc09ec0: 38 a5 76 d4 addi r5,r5,30420
ffc09ec4: 48 00 00 a8 b ffc09f6c <_Heap_Walk+0x3b4>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc09ec8: 7d 3c d3 96 divwu r9,r28,r26
ffc09ecc: 7d 29 d1 d6 mullw r9,r9,r26
uintptr_t const block_begin = (uintptr_t) block;
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;
bool const is_not_last_block = block != last_block;
ffc09ed0: 7f a0 ba 78 xor r0,r29,r23
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
ffc09ed4: 7f 9c 48 00 cmpw cr7,r28,r9
uintptr_t const block_begin = (uintptr_t) block;
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;
bool const is_not_last_block = block != last_block;
ffc09ed8: 7c 00 00 34 cntlzw r0,r0
ffc09edc: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc09ee0: 68 00 00 01 xori r0,r0,1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
ffc09ee4: 41 9e 00 28 beq- cr7,ffc09f0c <_Heap_Walk+0x354>
ffc09ee8: 2f 80 00 00 cmpwi cr7,r0,0
ffc09eec: 41 be 00 20 beq+ cr7,ffc09f0c <_Heap_Walk+0x354>
(*printer)(
ffc09ef0: 3c a0 ff c1 lis r5,-63
ffc09ef4: 7f e3 fb 78 mr r3,r31
ffc09ef8: 38 80 00 01 li r4,1
ffc09efc: 38 a5 77 01 addi r5,r5,30465
ffc09f00: 7f a6 eb 78 mr r6,r29
ffc09f04: 7f 87 e3 78 mr r7,r28
ffc09f08: 4b ff ff 18 b ffc09e20 <_Heap_Walk+0x268>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
ffc09f0c: 7f 9c c8 40 cmplw cr7,r28,r25
ffc09f10: 40 9c 00 3c bge- cr7,ffc09f4c <_Heap_Walk+0x394>
ffc09f14: 2f 80 00 00 cmpwi cr7,r0,0
ffc09f18: 41 be 00 34 beq+ cr7,ffc09f4c <_Heap_Walk+0x394> <== NEVER TAKEN
(*printer)(
ffc09f1c: 80 01 00 18 lwz r0,24(r1)
ffc09f20: 3c a0 ff c1 lis r5,-63
ffc09f24: 7f e3 fb 78 mr r3,r31
ffc09f28: 38 80 00 01 li r4,1
ffc09f2c: 7c 09 03 a6 mtctr r0
ffc09f30: 38 a5 77 2f addi r5,r5,30511
ffc09f34: 7f a6 eb 78 mr r6,r29
ffc09f38: 7f 87 e3 78 mr r7,r28
ffc09f3c: 7f 28 cb 78 mr r8,r25
ffc09f40: 4c c6 31 82 crclr 4*cr1+eq
ffc09f44: 4e 80 04 21 bctrl
ffc09f48: 4b ff fe e8 b ffc09e30 <_Heap_Walk+0x278>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
ffc09f4c: 7f 9b e8 40 cmplw cr7,r27,r29
ffc09f50: 41 9d 00 28 bgt- cr7,ffc09f78 <_Heap_Walk+0x3c0>
ffc09f54: 2f 80 00 00 cmpwi cr7,r0,0
ffc09f58: 41 be 00 20 beq+ cr7,ffc09f78 <_Heap_Walk+0x3c0>
(*printer)(
ffc09f5c: 3c a0 ff c1 lis r5,-63
ffc09f60: 7f e3 fb 78 mr r3,r31
ffc09f64: 38 80 00 01 li r4,1
ffc09f68: 38 a5 77 5a addi r5,r5,30554
ffc09f6c: 7f a6 eb 78 mr r6,r29
ffc09f70: 7f 67 db 78 mr r7,r27
ffc09f74: 4b ff fe ac b ffc09e20 <_Heap_Walk+0x268>
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;
ffc09f78: 80 1b 00 04 lwz r0,4(r27)
ffc09f7c: 56 b5 07 fe clrlwi r21,r21,31
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
ffc09f80: 70 09 00 01 andi. r9,r0,1
ffc09f84: 40 a2 00 ec bne+ ffc0a070 <_Heap_Walk+0x4b8>
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
ffc09f88: 81 1d 00 0c lwz r8,12(r29)
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)(
ffc09f8c: 39 2f 74 7a addi r9,r15,29818
ffc09f90: 80 1e 00 08 lwz r0,8(r30)
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;
ffc09f94: 81 7e 00 0c lwz r11,12(r30)
ffc09f98: 7f 88 00 00 cmpw cr7,r8,r0
ffc09f9c: 41 9e 00 14 beq- cr7,ffc09fb0 <_Heap_Walk+0x3f8>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc09fa0: 7f 88 f0 00 cmpw cr7,r8,r30
ffc09fa4: 39 36 73 c3 addi r9,r22,29635
ffc09fa8: 40 be 00 08 bne+ cr7,ffc09fb0 <_Heap_Walk+0x3f8>
ffc09fac: 39 2e 74 8a addi r9,r14,29834
block->next,
block->next == last_free_block ?
ffc09fb0: 81 5d 00 08 lwz r10,8(r29)
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)(
ffc09fb4: 38 11 74 94 addi r0,r17,29844
ffc09fb8: 7f 8a 58 00 cmpw cr7,r10,r11
ffc09fbc: 41 9e 00 14 beq- cr7,ffc09fd0 <_Heap_Walk+0x418>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc09fc0: 7f 8a f0 00 cmpw cr7,r10,r30
ffc09fc4: 38 16 73 c3 addi r0,r22,29635
ffc09fc8: 40 be 00 08 bne+ cr7,ffc09fd0 <_Heap_Walk+0x418>
ffc09fcc: 38 10 74 a3 addi r0,r16,29859
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)(
ffc09fd0: 90 01 00 08 stw r0,8(r1)
ffc09fd4: 7f e3 fb 78 mr r3,r31
ffc09fd8: 38 80 00 00 li r4,0
ffc09fdc: 80 01 00 18 lwz r0,24(r1)
ffc09fe0: 7e 45 93 78 mr r5,r18
ffc09fe4: 7f a6 eb 78 mr r6,r29
ffc09fe8: 7f 87 e3 78 mr r7,r28
ffc09fec: 7c 09 03 a6 mtctr r0
ffc09ff0: 4c c6 31 82 crclr 4*cr1+eq
ffc09ff4: 4e 80 04 21 bctrl
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
ffc09ff8: 81 1b 00 00 lwz r8,0(r27)
ffc09ffc: 7f 9c 40 00 cmpw cr7,r28,r8
ffc0a000: 41 be 00 34 beq+ cr7,ffc0a034 <_Heap_Walk+0x47c>
(*printer)(
ffc0a004: 80 01 00 18 lwz r0,24(r1)
ffc0a008: 3c a0 ff c1 lis r5,-63
ffc0a00c: 7f e3 fb 78 mr r3,r31
ffc0a010: 38 80 00 01 li r4,1
ffc0a014: 7c 09 03 a6 mtctr r0
ffc0a018: 38 a5 77 c3 addi r5,r5,30659
ffc0a01c: 7f a6 eb 78 mr r6,r29
ffc0a020: 7f 87 e3 78 mr r7,r28
ffc0a024: 7f 69 db 78 mr r9,r27
ffc0a028: 4c c6 31 82 crclr 4*cr1+eq
ffc0a02c: 4e 80 04 21 bctrl
ffc0a030: 4b ff fe 00 b ffc09e30 <_Heap_Walk+0x278>
);
return false;
}
if ( !prev_used ) {
ffc0a034: 2f 95 00 00 cmpwi cr7,r21,0
ffc0a038: 40 be 00 18 bne+ cr7,ffc0a050 <_Heap_Walk+0x498>
(*printer)(
ffc0a03c: 3c a0 ff c1 lis r5,-63
ffc0a040: 7f e3 fb 78 mr r3,r31
ffc0a044: 38 80 00 01 li r4,1
ffc0a048: 38 a5 77 fc addi r5,r5,30716
ffc0a04c: 48 00 00 98 b ffc0a0e4 <_Heap_Walk+0x52c>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0a050: 81 3e 00 08 lwz r9,8(r30)
ffc0a054: 48 00 00 10 b ffc0a064 <_Heap_Walk+0x4ac>
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
if ( free_block == block ) {
ffc0a058: 7f 89 e8 00 cmpw cr7,r9,r29
ffc0a05c: 41 9e 00 64 beq- cr7,ffc0a0c0 <_Heap_Walk+0x508>
return true;
}
free_block = free_block->next;
ffc0a060: 81 29 00 08 lwz r9,8(r9)
)
{
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 ) {
ffc0a064: 7f 89 f0 00 cmpw cr7,r9,r30
ffc0a068: 40 9e ff f0 bne+ cr7,ffc0a058 <_Heap_Walk+0x4a0>
ffc0a06c: 48 00 00 68 b ffc0a0d4 <_Heap_Walk+0x51c>
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
ffc0a070: 2f 95 00 00 cmpwi cr7,r21,0
(*printer)(
ffc0a074: 7f e3 fb 78 mr r3,r31
ffc0a078: 38 80 00 00 li r4,0
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
ffc0a07c: 41 9e 00 24 beq- cr7,ffc0a0a0 <_Heap_Walk+0x4e8>
(*printer)(
ffc0a080: 80 01 00 18 lwz r0,24(r1)
ffc0a084: 7e 85 a3 78 mr r5,r20
ffc0a088: 7f a6 eb 78 mr r6,r29
ffc0a08c: 7f 87 e3 78 mr r7,r28
ffc0a090: 7c 09 03 a6 mtctr r0
ffc0a094: 4c c6 31 82 crclr 4*cr1+eq
ffc0a098: 4e 80 04 21 bctrl
ffc0a09c: 48 00 00 24 b ffc0a0c0 <_Heap_Walk+0x508>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0a0a0: 80 01 00 18 lwz r0,24(r1)
ffc0a0a4: 7e 65 9b 78 mr r5,r19
ffc0a0a8: 7f a6 eb 78 mr r6,r29
ffc0a0ac: 81 1d 00 00 lwz r8,0(r29)
ffc0a0b0: 7f 87 e3 78 mr r7,r28
ffc0a0b4: 7c 09 03 a6 mtctr r0
ffc0a0b8: 4c c6 31 82 crclr 4*cr1+eq
ffc0a0bc: 4e 80 04 21 bctrl
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
ffc0a0c0: 7f 9b c0 00 cmpw cr7,r27,r24
ffc0a0c4: 40 9e fd 88 bne+ cr7,ffc09e4c <_Heap_Walk+0x294>
return true;
ffc0a0c8: 38 60 00 01 li r3,1
}
ffc0a0cc: 39 61 00 68 addi r11,r1,104
ffc0a0d0: 4b ff 6a 1c b ffc00aec <_restgpr_14_x>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
ffc0a0d4: 3c a0 ff c1 lis r5,-63
ffc0a0d8: 7f e3 fb 78 mr r3,r31
ffc0a0dc: 38 80 00 01 li r4,1
ffc0a0e0: 38 a5 78 67 addi r5,r5,30823
ffc0a0e4: 7f a6 eb 78 mr r6,r29
ffc0a0e8: 80 01 00 18 lwz r0,24(r1)
ffc0a0ec: 7c 09 03 a6 mtctr r0
ffc0a0f0: 4c c6 31 82 crclr 4*cr1+eq
ffc0a0f4: 4e 80 04 21 bctrl
ffc0a0f8: 4b ff fd 38 b ffc09e30 <_Heap_Walk+0x278>
ffc09b08 <_Heap_Walk_print>:
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
ffc09b08: 7c 08 02 a6 mflr r0
ffc09b0c: 7c 2b 0b 78 mr r11,r1
ffc09b10: 94 21 ff 88 stwu r1,-120(r1)
ffc09b14: 90 01 00 7c stw r0,124(r1)
ffc09b18: 4b ff 6f cd bl ffc00ae4 <_savegpr_31>
ffc09b1c: 7c 60 1b 78 mr r0,r3
ffc09b20: 90 c1 00 1c stw r6,28(r1)
ffc09b24: 90 e1 00 20 stw r7,32(r1)
ffc09b28: 91 01 00 24 stw r8,36(r1)
ffc09b2c: 91 21 00 28 stw r9,40(r1)
ffc09b30: 91 41 00 2c stw r10,44(r1)
ffc09b34: 40 86 00 24 bne- cr1,ffc09b58 <_Heap_Walk_print+0x50> <== ALWAYS TAKEN
ffc09b38: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED
ffc09b3c: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc09b40: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc09b44: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc09b48: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc09b4c: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc09b50: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc09b54: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
va_list ap;
if ( error ) {
ffc09b58: 2f 84 00 00 cmpwi cr7,r4,0
{
/* Do nothing */
}
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
ffc09b5c: 7c bf 2b 78 mr r31,r5
va_list ap;
if ( error ) {
ffc09b60: 41 be 00 10 beq+ cr7,ffc09b70 <_Heap_Walk_print+0x68>
printk( "FAIL[%d]: ", source );
ffc09b64: 3c 60 ff c1 lis r3,-63
ffc09b68: 38 63 74 64 addi r3,r3,29796
ffc09b6c: 48 00 00 0c b ffc09b78 <_Heap_Walk_print+0x70>
} else {
printk( "PASS[%d]: ", source );
ffc09b70: 3c 60 ff c1 lis r3,-63
ffc09b74: 38 63 74 6f addi r3,r3,29807
ffc09b78: 7c 04 03 78 mr r4,r0
ffc09b7c: 4c c6 31 82 crclr 4*cr1+eq
ffc09b80: 4b ff be d1 bl ffc05a50 <printk>
}
va_start( ap, fmt );
ffc09b84: 38 00 00 03 li r0,3
ffc09b88: 98 01 00 08 stb r0,8(r1)
ffc09b8c: 38 00 00 00 li r0,0
vprintk( fmt, ap );
ffc09b90: 7f e3 fb 78 mr r3,r31
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc09b94: 98 01 00 09 stb r0,9(r1)
ffc09b98: 38 01 00 80 addi r0,r1,128
vprintk( fmt, ap );
ffc09b9c: 38 81 00 08 addi r4,r1,8
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc09ba0: 90 01 00 0c stw r0,12(r1)
ffc09ba4: 38 01 00 10 addi r0,r1,16
ffc09ba8: 90 01 00 10 stw r0,16(r1)
vprintk( fmt, ap );
ffc09bac: 4b ff dc 45 bl ffc077f0 <vprintk>
va_end( ap );
}
ffc09bb0: 39 61 00 78 addi r11,r1,120
ffc09bb4: 4b ff 6f 7c b ffc00b30 <_restgpr_31_x>
ffc09560 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc09560: 7c 2b 0b 78 mr r11,r1
ffc09564: 94 21 ff f0 stwu r1,-16(r1)
ffc09568: 7c 08 02 a6 mflr r0
ffc0956c: 48 01 0d c9 bl ffc1a334 <_savegpr_31>
_Internal_errors_What_happened.the_source = the_source;
ffc09570: 3d 60 00 00 lis r11,0
ffc09574: 39 2b 2c d0 addi r9,r11,11472
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc09578: 90 01 00 14 stw r0,20(r1)
ffc0957c: 7c bf 2b 78 mr r31,r5
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
ffc09580: 98 89 00 04 stb r4,4(r9)
_Internal_errors_What_happened.the_error = the_error;
ffc09584: 90 a9 00 08 stw r5,8(r9)
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
ffc09588: 90 6b 2c d0 stw r3,11472(r11)
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
ffc0958c: 48 00 20 e5 bl ffc0b670 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
ffc09590: 38 00 00 05 li r0,5
ffc09594: 3d 20 00 00 lis r9,0
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
ffc09598: 7f e3 fb 78 mr r3,r31
ffc0959c: 90 09 28 04 stw r0,10244(r9)
ffc095a0: 4b ff a3 5d bl ffc038fc <_BSP_Fatal_error>
ffc095a4: 48 00 00 00 b ffc095a4 <_Internal_error_Occurred+0x44><== NOT EXECUTED
ffc095bc <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc095bc: 94 21 ff f0 stwu r1,-16(r1)
ffc095c0: 7c 08 02 a6 mflr r0
ffc095c4: 90 01 00 14 stw r0,20(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 )
ffc095c8: 80 03 00 18 lwz r0,24(r3)
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc095cc: bf c1 00 08 stmw r30,8(r1)
ffc095d0: 7c 7f 1b 78 mr r31,r3
* 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 )
ffc095d4: 2f 80 00 00 cmpwi cr7,r0,0
return NULL;
ffc095d8: 38 60 00 00 li r3,0
* 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 )
ffc095dc: 41 9e 00 70 beq- cr7,ffc0964c <_Objects_Allocate+0x90> <== NEVER TAKEN
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
ffc095e0: 3b df 00 20 addi r30,r31,32
ffc095e4: 7f c3 f3 78 mr r3,r30
ffc095e8: 4b ff f5 c9 bl ffc08bb0 <_Chain_Get>
if ( information->auto_extend ) {
ffc095ec: 88 1f 00 12 lbz r0,18(r31)
ffc095f0: 2f 80 00 00 cmpwi cr7,r0,0
ffc095f4: 41 9e 00 58 beq- cr7,ffc0964c <_Objects_Allocate+0x90>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
ffc095f8: 2f 83 00 00 cmpwi cr7,r3,0
ffc095fc: 40 be 00 1c bne+ cr7,ffc09618 <_Objects_Allocate+0x5c>
_Objects_Extend_information( information );
ffc09600: 7f e3 fb 78 mr r3,r31
ffc09604: 48 00 00 85 bl ffc09688 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
ffc09608: 7f c3 f3 78 mr r3,r30
ffc0960c: 4b ff f5 a5 bl ffc08bb0 <_Chain_Get>
}
if ( the_object ) {
ffc09610: 2c 03 00 00 cmpwi r3,0
ffc09614: 41 a2 00 38 beq+ ffc0964c <_Objects_Allocate+0x90>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
ffc09618: a1 23 00 0a lhz r9,10(r3)
ffc0961c: a0 1f 00 0a lhz r0,10(r31)
ffc09620: 7c 00 48 50 subf r0,r0,r9
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
ffc09624: a1 3f 00 14 lhz r9,20(r31)
ffc09628: 7c 00 4b 96 divwu r0,r0,r9
information->inactive_per_block[ block ]--;
ffc0962c: 81 3f 00 30 lwz r9,48(r31)
ffc09630: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc09634: 7d 69 00 2e lwzx r11,r9,r0
ffc09638: 39 6b ff ff addi r11,r11,-1
ffc0963c: 7d 69 01 2e stwx r11,r9,r0
information->inactive--;
ffc09640: a1 3f 00 2c lhz r9,44(r31)
ffc09644: 38 09 ff ff addi r0,r9,-1
ffc09648: b0 1f 00 2c sth r0,44(r31)
);
}
#endif
return the_object;
}
ffc0964c: 39 61 00 10 addi r11,r1,16
ffc09650: 4b ff 6e e0 b ffc00530 <_restgpr_30_x>
ffc09688 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc09688: 94 21 ff b8 stwu r1,-72(r1)
ffc0968c: 7c 08 02 a6 mflr r0
ffc09690: 90 01 00 4c stw r0,76(r1)
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc09694: 81 63 00 34 lwz r11,52(r3)
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc09698: be a1 00 1c stmw r21,28(r1)
ffc0969c: 7c 7f 1b 78 mr r31,r3
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc096a0: 2f 8b 00 00 cmpwi cr7,r11,0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
ffc096a4: a3 83 00 0a lhz r28,10(r3)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc096a8: 41 9e 00 58 beq- cr7,ffc09700 <_Objects_Extend_information+0x78>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
ffc096ac: a1 43 00 14 lhz r10,20(r3)
for ( ; block < block_count; block++ ) {
ffc096b0: 39 20 00 00 li r9,0
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
ffc096b4: a3 63 00 10 lhz r27,16(r3)
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
ffc096b8: 3b a0 00 00 li r29,0
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
ffc096bc: 7f 7b 53 96 divwu r27,r27,r10
ffc096c0: 2f 9b 00 00 cmpwi cr7,r27,0
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
ffc096c4: 38 1b 00 01 addi r0,r27,1
ffc096c8: 40 be 00 24 bne+ cr7,ffc096ec <_Objects_Extend_information+0x64><== ALWAYS TAKEN
ffc096cc: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc096d0: 48 00 00 1c b ffc096ec <_Objects_Extend_information+0x64><== NOT EXECUTED
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc096d4: 57 a8 10 3a rlwinm r8,r29,2,0,29
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
ffc096d8: 7d 0b 40 2e lwzx r8,r11,r8
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
ffc096dc: 7d 29 52 14 add r9,r9,r10
if ( information->object_blocks[ block ] == NULL ) {
ffc096e0: 2f 88 00 00 cmpwi cr7,r8,0
ffc096e4: 41 9e 00 30 beq- cr7,ffc09714 <_Objects_Extend_information+0x8c>
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
ffc096e8: 3b bd 00 01 addi r29,r29,1
ffc096ec: 34 00 ff ff addic. r0,r0,-1
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc096f0: 7f c9 e2 14 add r30,r9,r28
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
ffc096f4: 40 82 ff e0 bne+ ffc096d4 <_Objects_Extend_information+0x4c>
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
ffc096f8: 3b 40 00 01 li r26,1
ffc096fc: 48 00 00 1c b ffc09718 <_Objects_Extend_information+0x90>
minimum_index = _Objects_Get_index( information->minimum_id );
ffc09700: 7f 9e e3 78 mr r30,r28
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
ffc09704: 3b 40 00 01 li r26,1
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
ffc09708: 3b a0 00 00 li r29,0
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
ffc0970c: 3b 60 00 00 li r27,0
ffc09710: 48 00 00 08 b ffc09718 <_Objects_Extend_information+0x90>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
ffc09714: 3b 40 00 00 li r26,0
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
ffc09718: a0 1f 00 14 lhz r0,20(r31)
ffc0971c: a2 ff 00 10 lhz r23,16(r31)
ffc09720: 7e e0 ba 14 add r23,r0,r23
/*
* 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 ) {
ffc09724: 2b 97 ff ff cmplwi cr7,r23,65535
ffc09728: 41 9d 02 10 bgt- cr7,ffc09938 <_Objects_Extend_information+0x2b0>
/*
* 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;
ffc0972c: 80 7f 00 18 lwz r3,24(r31)
ffc09730: 7c 60 19 d6 mullw r3,r0,r3
if ( information->auto_extend ) {
ffc09734: 88 1f 00 12 lbz r0,18(r31)
ffc09738: 2f 80 00 00 cmpwi cr7,r0,0
ffc0973c: 41 9e 00 14 beq- cr7,ffc09750 <_Objects_Extend_information+0xc8>
new_object_block = _Workspace_Allocate( block_size );
ffc09740: 48 00 24 2d bl ffc0bb6c <_Workspace_Allocate>
if ( !new_object_block )
ffc09744: 7c 78 1b 79 mr. r24,r3
ffc09748: 40 a2 00 10 bne+ ffc09758 <_Objects_Extend_information+0xd0>
ffc0974c: 48 00 01 ec b ffc09938 <_Objects_Extend_information+0x2b0>
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
ffc09750: 48 00 24 7d bl ffc0bbcc <_Workspace_Allocate_or_fatal_error>
ffc09754: 7c 78 1b 78 mr r24,r3
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
ffc09758: 2f 9a 00 00 cmpwi cr7,r26,0
ffc0975c: 41 9e 01 58 beq- cr7,ffc098b4 <_Objects_Extend_information+0x22c>
*/
/*
* Up the block count and maximum
*/
block_count++;
ffc09760: 3b 5b 00 01 addi r26,r27,1
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
ffc09764: 1c 1a 00 03 mulli r0,r26,3
((maximum + minimum_index) * sizeof(Objects_Control *));
ffc09768: 7c 77 e2 14 add r3,r23,r28
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
ffc0976c: 7c 63 02 14 add r3,r3,r0
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
ffc09770: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc09774: 48 00 23 f9 bl ffc0bb6c <_Workspace_Allocate>
if ( !object_blocks ) {
ffc09778: 7c 76 1b 79 mr. r22,r3
ffc0977c: 40 a2 00 10 bne+ ffc0978c <_Objects_Extend_information+0x104>
_Workspace_Free( new_object_block );
ffc09780: 7f 03 c3 78 mr r3,r24
ffc09784: 48 00 24 1d bl ffc0bba0 <_Workspace_Free>
return;
ffc09788: 48 00 01 b0 b ffc09938 <_Objects_Extend_information+0x2b0>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc0978c: a0 1f 00 10 lhz r0,16(r31)
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
ffc09790: 57 5a 10 3a rlwinm r26,r26,2,0,29
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
ffc09794: 7f 36 d2 14 add r25,r22,r26
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc09798: 7f 80 e0 40 cmplw cr7,r0,r28
ffc0979c: 7f 59 d2 14 add r26,r25,r26
ffc097a0: 39 20 00 00 li r9,0
ffc097a4: 40 bd 00 50 ble+ cr7,ffc097f4 <_Objects_Extend_information+0x16c>
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
information->object_blocks,
block_count * sizeof(void*) );
ffc097a8: 57 75 10 3a rlwinm r21,r27,2,0,29
/*
* 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,
ffc097ac: 80 9f 00 34 lwz r4,52(r31)
ffc097b0: 7e a5 ab 78 mr r5,r21
ffc097b4: 48 00 71 25 bl ffc108d8 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
ffc097b8: 80 9f 00 30 lwz r4,48(r31)
ffc097bc: 7e a5 ab 78 mr r5,r21
ffc097c0: 7f 23 cb 78 mr r3,r25
ffc097c4: 48 00 71 15 bl ffc108d8 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
ffc097c8: a0 1f 00 10 lhz r0,16(r31)
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
ffc097cc: 80 9f 00 1c lwz r4,28(r31)
ffc097d0: 7f 43 d3 78 mr r3,r26
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
ffc097d4: 7f 9c 02 14 add r28,r28,r0
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
ffc097d8: 57 85 10 3a rlwinm r5,r28,2,0,29
ffc097dc: 48 00 70 fd bl ffc108d8 <memcpy>
ffc097e0: 48 00 00 30 b ffc09810 <_Objects_Extend_information+0x188>
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc097e4: 55 2a 10 3a rlwinm r10,r9,2,0,29
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
ffc097e8: 7d 6a d1 2e stwx r11,r10,r26
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
ffc097ec: 39 29 00 01 addi r9,r9,1
ffc097f0: 48 00 00 18 b ffc09808 <_Objects_Extend_information+0x180>
ffc097f4: 2f 9c 00 00 cmpwi cr7,r28,0
local_table[ index ] = NULL;
ffc097f8: 39 60 00 00 li r11,0
ffc097fc: 38 1c 00 01 addi r0,r28,1
ffc09800: 40 be 00 08 bne+ cr7,ffc09808 <_Objects_Extend_information+0x180><== ALWAYS TAKEN
ffc09804: 38 00 00 01 li r0,1 <== NOT EXECUTED
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
ffc09808: 34 00 ff ff addic. r0,r0,-1
ffc0980c: 40 82 ff d8 bne+ ffc097e4 <_Objects_Extend_information+0x15c>
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
ffc09810: a1 5f 00 14 lhz r10,20(r31)
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
ffc09814: 38 00 00 00 li r0,0
ffc09818: 57 7b 10 3a rlwinm r27,r27,2,0,29
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
ffc0981c: 7d 7e 52 14 add r11,r30,r10
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
ffc09820: 7c 16 d9 2e stwx r0,r22,r27
ffc09824: 7f 9e 58 40 cmplw cr7,r30,r11
inactive_per_block[block_count] = 0;
ffc09828: 7c 19 d9 2e stwx r0,r25,r27
for ( index=index_base ;
ffc0982c: 39 20 00 00 li r9,0
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc09830: 57 c8 10 3a rlwinm r8,r30,2,0,29
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
ffc09834: 38 e0 00 00 li r7,0
ffc09838: 38 0a 00 01 addi r0,r10,1
ffc0983c: 41 9d 00 0c bgt- cr7,ffc09848 <_Objects_Extend_information+0x1c0><== NEVER TAKEN
ffc09840: 2f 8b 00 00 cmpwi cr7,r11,0
ffc09844: 40 be 00 18 bne+ cr7,ffc0985c <_Objects_Extend_information+0x1d4><== ALWAYS TAKEN
ffc09848: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc0984c: 48 00 00 10 b ffc0985c <_Objects_Extend_information+0x1d4><== NOT EXECUTED
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc09850: 7d 7a 42 14 add r11,r26,r8
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
ffc09854: 7c eb 49 2e stwx r7,r11,r9
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
ffc09858: 39 29 00 04 addi r9,r9,4
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
ffc0985c: 34 00 ff ff addic. r0,r0,-1
ffc09860: 40 82 ff f0 bne+ ffc09850 <_Objects_Extend_information+0x1c8>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc09864: 7c 00 00 a6 mfmsr r0
ffc09868: 7d 30 42 a6 mfsprg r9,0
ffc0986c: 7c 09 48 78 andc r9,r0,r9
ffc09870: 7d 20 01 24 mtmsr r9
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc09874: 81 3f 00 00 lwz r9,0(r31)
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;
ffc09878: 56 f7 04 3e clrlwi r23,r23,16
information->maximum_id = _Objects_Build_id(
ffc0987c: a1 7f 00 04 lhz r11,4(r31)
ffc09880: 55 29 c0 0e rlwinm r9,r9,24,0,7
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;
ffc09884: b2 ff 00 10 sth r23,16(r31)
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc09888: 55 6b d8 08 rlwinm r11,r11,27,0,4
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc0988c: 65 29 00 01 oris r9,r9,1
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
ffc09890: 80 7f 00 34 lwz r3,52(r31)
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc09894: 7d 29 5b 78 or r9,r9,r11
information->object_blocks = object_blocks;
ffc09898: 92 df 00 34 stw r22,52(r31)
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc0989c: 7d 37 bb 78 or r23,r9,r23
information->inactive_per_block = inactive_per_block;
ffc098a0: 93 3f 00 30 stw r25,48(r31)
information->local_table = local_table;
ffc098a4: 93 5f 00 1c stw r26,28(r31)
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
ffc098a8: 92 ff 00 0c stw r23,12(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc098ac: 7c 00 01 24 mtmsr r0
information->maximum
);
_ISR_Enable( level );
_Workspace_Free( old_tables );
ffc098b0: 48 00 22 f1 bl ffc0bba0 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
ffc098b4: 81 3f 00 34 lwz r9,52(r31)
ffc098b8: 57 bd 10 3a rlwinm r29,r29,2,0,29
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc098bc: 3b 81 00 08 addi r28,r1,8
ffc098c0: a0 bf 00 14 lhz r5,20(r31)
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
ffc098c4: 7f 09 e9 2e stwx r24,r9,r29
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc098c8: 7f 83 e3 78 mr r3,r28
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc098cc: 3b 7f 00 20 addi r27,r31,32
information->object_blocks[ block ] = new_object_block;
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc098d0: 81 3f 00 34 lwz r9,52(r31)
ffc098d4: 80 df 00 18 lwz r6,24(r31)
ffc098d8: 7c 89 e8 2e lwzx r4,r9,r29
ffc098dc: 48 00 41 8d bl ffc0da68 <_Chain_Initialize>
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
ffc098e0: 48 00 00 30 b ffc09910 <_Objects_Extend_information+0x288>
ffc098e4: 81 3f 00 00 lwz r9,0(r31)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc098e8: 7f 63 db 78 mr r3,r27
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
ffc098ec: a0 1f 00 04 lhz r0,4(r31)
ffc098f0: 55 29 c0 0e rlwinm r9,r9,24,0,7
ffc098f4: 65 29 00 01 oris r9,r9,1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc098f8: 54 00 d8 08 rlwinm r0,r0,27,0,4
ffc098fc: 7d 20 03 78 or r0,r9,r0
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc09900: 7c 00 f3 78 or r0,r0,r30
ffc09904: 90 04 00 08 stw r0,8(r4)
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
ffc09908: 3b de 00 01 addi r30,r30,1
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0990c: 4b ff f2 4d bl ffc08b58 <_Chain_Append>
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
ffc09910: 7f 83 e3 78 mr r3,r28
ffc09914: 4b ff f2 9d bl ffc08bb0 <_Chain_Get>
ffc09918: 7c 64 1b 79 mr. r4,r3
ffc0991c: 40 82 ff c8 bne+ ffc098e4 <_Objects_Extend_information+0x25c>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
ffc09920: a0 1f 00 14 lhz r0,20(r31)
ffc09924: 81 3f 00 30 lwz r9,48(r31)
ffc09928: 7c 09 e9 2e stwx r0,r9,r29
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
ffc0992c: a1 3f 00 2c lhz r9,44(r31)
ffc09930: 7c 00 4a 14 add r0,r0,r9
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
ffc09934: b0 1f 00 2c sth r0,44(r31)
(Objects_Maximum)(information->inactive + information->allocation_size);
}
ffc09938: 39 61 00 48 addi r11,r1,72
ffc0993c: 4b ff 6b d0 b ffc0050c <_restgpr_21_x>
ffc099f4 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
ffc099f4: 94 21 ff e8 stwu r1,-24(r1)
ffc099f8: 7c 08 02 a6 mflr r0
ffc099fc: bf a1 00 0c stmw r29,12(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
ffc09a00: 7c 9d 23 79 mr. r29,r4
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
ffc09a04: 7c 7e 1b 78 mr r30,r3
ffc09a08: 90 01 00 1c stw r0,28(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
return NULL;
ffc09a0c: 3b e0 00 00 li r31,0
)
{
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
ffc09a10: 41 82 00 50 beq- ffc09a60 <_Objects_Get_information+0x6c>
/*
* 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 );
ffc09a14: 48 00 45 c9 bl ffc0dfdc <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
ffc09a18: 2c 03 00 00 cmpwi r3,0
ffc09a1c: 41 82 00 44 beq- ffc09a60 <_Objects_Get_information+0x6c>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
ffc09a20: 7f 9d 18 40 cmplw cr7,r29,r3
ffc09a24: 41 9d 00 3c bgt- cr7,ffc09a60 <_Objects_Get_information+0x6c>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
ffc09a28: 3d 20 00 00 lis r9,0
ffc09a2c: 57 de 10 3a rlwinm r30,r30,2,0,29
ffc09a30: 39 29 2b e0 addi r9,r9,11232
ffc09a34: 7d 29 f0 2e lwzx r9,r9,r30
ffc09a38: 2f 89 00 00 cmpwi cr7,r9,0
ffc09a3c: 41 9e 00 24 beq- cr7,ffc09a60 <_Objects_Get_information+0x6c><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
ffc09a40: 57 bd 10 3a rlwinm r29,r29,2,0,29
ffc09a44: 7f e9 e8 2e lwzx r31,r9,r29
if ( !info )
ffc09a48: 2f 9f 00 00 cmpwi cr7,r31,0
ffc09a4c: 41 9e 00 14 beq- cr7,ffc09a60 <_Objects_Get_information+0x6c><== NEVER TAKEN
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
ffc09a50: a0 1f 00 10 lhz r0,16(r31)
ffc09a54: 2f 80 00 00 cmpwi cr7,r0,0
ffc09a58: 40 be 00 08 bne+ cr7,ffc09a60 <_Objects_Get_information+0x6c>
return NULL;
ffc09a5c: 3b e0 00 00 li r31,0
#endif
return info;
}
ffc09a60: 39 61 00 18 addi r11,r1,24
ffc09a64: 7f e3 fb 78 mr r3,r31
ffc09a68: 4b ff 6a c4 b ffc0052c <_restgpr_29_x>
ffc0a494 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
ffc0a494: 94 21 ff e0 stwu r1,-32(r1)
ffc0a498: 7c 08 02 a6 mflr r0
ffc0a49c: bf c1 00 18 stmw r30,24(r1)
ffc0a4a0: 7c 9e 23 78 mr r30,r4
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
ffc0a4a4: 7c 64 1b 79 mr. r4,r3
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
ffc0a4a8: 90 01 00 24 stw r0,36(r1)
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
ffc0a4ac: 40 82 00 10 bne- ffc0a4bc <_Objects_Id_to_name+0x28>
ffc0a4b0: 3d 20 00 00 lis r9,0
ffc0a4b4: 81 29 2e 24 lwz r9,11812(r9)
ffc0a4b8: 80 89 00 08 lwz r4,8(r9)
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
ffc0a4bc: 54 89 47 7e rlwinm r9,r4,8,29,31
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
ffc0a4c0: 38 09 ff ff addi r0,r9,-1
ffc0a4c4: 2b 80 00 02 cmplwi cr7,r0,2
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
ffc0a4c8: 3b e0 00 03 li r31,3
ffc0a4cc: 41 9d 00 38 bgt- cr7,ffc0a504 <_Objects_Id_to_name+0x70>
ffc0a4d0: 48 00 00 40 b ffc0a510 <_Objects_Id_to_name+0x7c>
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
ffc0a4d4: 54 80 3e 7a rlwinm r0,r4,7,25,29
ffc0a4d8: 7c 69 00 2e lwzx r3,r9,r0
if ( !information )
ffc0a4dc: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a4e0: 41 9e 00 24 beq- cr7,ffc0a504 <_Objects_Id_to_name+0x70><== NEVER TAKEN
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
ffc0a4e4: 38 a1 00 08 addi r5,r1,8
ffc0a4e8: 4b ff ff 2d bl ffc0a414 <_Objects_Get>
if ( !the_object )
ffc0a4ec: 2c 03 00 00 cmpwi r3,0
ffc0a4f0: 41 82 00 14 beq- ffc0a504 <_Objects_Id_to_name+0x70>
return OBJECTS_INVALID_ID;
*name = the_object->name;
ffc0a4f4: 80 03 00 0c lwz r0,12(r3)
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
ffc0a4f8: 3b e0 00 00 li r31,0
the_object = _Objects_Get( information, tmpId, &ignored_location );
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
ffc0a4fc: 90 1e 00 00 stw r0,0(r30)
_Thread_Enable_dispatch();
ffc0a500: 48 00 0d e5 bl ffc0b2e4 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
ffc0a504: 39 61 00 20 addi r11,r1,32
ffc0a508: 7f e3 fb 78 mr r3,r31
ffc0a50c: 4b ff 65 d0 b ffc00adc <_restgpr_30_x>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
ffc0a510: 3d 60 00 00 lis r11,0
ffc0a514: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0a518: 39 6b 2c 40 addi r11,r11,11328
ffc0a51c: 7d 2b 48 2e lwzx r9,r11,r9
ffc0a520: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a524: 40 9e ff b0 bne+ cr7,ffc0a4d4 <_Objects_Id_to_name+0x40>
ffc0a528: 4b ff ff dc b ffc0a504 <_Objects_Id_to_name+0x70>
ffc0a4d8 <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc0a4d8: 94 21 ff e8 stwu r1,-24(r1)
ffc0a4dc: 7c 08 02 a6 mflr r0
ffc0a4e0: bf 81 00 08 stmw r28,8(r1)
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if(!the_node) return;
ffc0a4e4: 7c 9e 23 79 mr. r30,r4
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc0a4e8: 7c 7f 1b 78 mr r31,r3
ffc0a4ec: 90 01 00 1c stw r0,28(r1)
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if(!the_node) return;
ffc0a4f0: 41 82 01 cc beq- ffc0a6bc <_RBTree_Extract_unprotected+0x1e4>
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
ffc0a4f4: 80 03 00 08 lwz r0,8(r3)
ffc0a4f8: 7f 9e 00 00 cmpw cr7,r30,r0
ffc0a4fc: 40 be 00 24 bne+ cr7,ffc0a520 <_RBTree_Extract_unprotected+0x48>
if (the_node->child[RBT_RIGHT])
ffc0a500: 80 1e 00 08 lwz r0,8(r30)
ffc0a504: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a508: 40 be 00 14 bne+ cr7,ffc0a51c <_RBTree_Extract_unprotected+0x44>
the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT];
else {
the_rbtree->first[RBT_LEFT] = the_node->parent;
ffc0a50c: 81 3e 00 00 lwz r9,0(r30)
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
ffc0a510: 7f 83 48 00 cmpw cr7,r3,r9
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
if (the_node->child[RBT_RIGHT])
the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT];
else {
the_rbtree->first[RBT_LEFT] = the_node->parent;
ffc0a514: 91 23 00 08 stw r9,8(r3)
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
ffc0a518: 40 be 00 08 bne+ cr7,ffc0a520 <_RBTree_Extract_unprotected+0x48>
the_rbtree->first[RBT_LEFT]))
the_rbtree->first[RBT_LEFT] = NULL;
ffc0a51c: 90 1f 00 08 stw r0,8(r31)
}
}
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
ffc0a520: 80 1f 00 0c lwz r0,12(r31)
ffc0a524: 83 9e 00 04 lwz r28,4(r30)
ffc0a528: 7f 9e 00 00 cmpw cr7,r30,r0
ffc0a52c: 40 be 00 20 bne+ cr7,ffc0a54c <_RBTree_Extract_unprotected+0x74>
if (the_node->child[RBT_LEFT])
ffc0a530: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0a534: 40 be 00 14 bne+ cr7,ffc0a548 <_RBTree_Extract_unprotected+0x70>
the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT];
else {
the_rbtree->first[RBT_RIGHT] = the_node->parent;
ffc0a538: 80 1e 00 00 lwz r0,0(r30)
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
ffc0a53c: 7f 9f 00 00 cmpw cr7,r31,r0
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
if (the_node->child[RBT_LEFT])
the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT];
else {
the_rbtree->first[RBT_RIGHT] = the_node->parent;
ffc0a540: 90 1f 00 0c stw r0,12(r31)
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
ffc0a544: 40 be 00 08 bne+ cr7,ffc0a54c <_RBTree_Extract_unprotected+0x74>
the_rbtree->first[RBT_RIGHT]))
the_rbtree->first[RBT_RIGHT] = NULL;
ffc0a548: 93 9f 00 0c stw r28,12(r31)
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
ffc0a54c: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0a550: 80 1e 00 08 lwz r0,8(r30)
ffc0a554: 7f 9d e3 78 mr r29,r28
ffc0a558: 41 9e 00 d0 beq- cr7,ffc0a628 <_RBTree_Extract_unprotected+0x150>
ffc0a55c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a560: 40 be 00 0c bne+ cr7,ffc0a56c <_RBTree_Extract_unprotected+0x94>
ffc0a564: 48 00 00 d0 b ffc0a634 <_RBTree_Extract_unprotected+0x15c>
target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */
while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT];
ffc0a568: 7c 1d 03 78 mr r29,r0
ffc0a56c: 80 1d 00 08 lwz r0,8(r29)
ffc0a570: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a574: 40 9e ff f4 bne+ cr7,ffc0a568 <_RBTree_Extract_unprotected+0x90>
* target's position (target is the right child of target->parent)
* when target vacates it. if there is no child, then target->parent
* should become NULL. This may cause the coloring to be violated.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = target->child[RBT_LEFT];
ffc0a578: 83 9d 00 04 lwz r28,4(r29)
if(leaf) {
ffc0a57c: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0a580: 41 9e 00 10 beq- cr7,ffc0a590 <_RBTree_Extract_unprotected+0xb8><== ALWAYS TAKEN
leaf->parent = target->parent;
ffc0a584: 80 1d 00 00 lwz r0,0(r29) <== NOT EXECUTED
ffc0a588: 90 1c 00 00 stw r0,0(r28) <== NOT EXECUTED
ffc0a58c: 48 00 00 0c b ffc0a598 <_RBTree_Extract_unprotected+0xc0><== NOT EXECUTED
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
ffc0a590: 7f a3 eb 78 mr r3,r29
ffc0a594: 4b ff fd 65 bl ffc0a2f8 <_RBTree_Extract_validate_unprotected>
}
victim_color = target->color;
dir = target != target->parent->child[0];
ffc0a598: 81 7d 00 00 lwz r11,0(r29)
leaf->parent = target->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
ffc0a59c: 81 3d 00 10 lwz r9,16(r29)
dir = target != target->parent->child[0];
ffc0a5a0: 80 0b 00 04 lwz r0,4(r11)
ffc0a5a4: 7f a0 02 78 xor r0,r29,r0
ffc0a5a8: 7c 00 00 34 cntlzw r0,r0
ffc0a5ac: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc0a5b0: 68 00 00 01 xori r0,r0,1
target->parent->child[dir] = leaf;
ffc0a5b4: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0a5b8: 7d 6b 02 14 add r11,r11,r0
ffc0a5bc: 93 8b 00 04 stw r28,4(r11)
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
ffc0a5c0: 81 7e 00 00 lwz r11,0(r30)
ffc0a5c4: 80 0b 00 04 lwz r0,4(r11)
ffc0a5c8: 7f c0 02 78 xor r0,r30,r0
ffc0a5cc: 7c 00 00 34 cntlzw r0,r0
ffc0a5d0: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc0a5d4: 68 00 00 01 xori r0,r0,1
the_node->parent->child[dir] = target;
ffc0a5d8: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0a5dc: 7d 6b 02 14 add r11,r11,r0
ffc0a5e0: 93 ab 00 04 stw r29,4(r11)
/* set target's new children to the original node's children */
target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT];
ffc0a5e4: 80 1e 00 08 lwz r0,8(r30)
ffc0a5e8: 90 1d 00 08 stw r0,8(r29)
if (the_node->child[RBT_RIGHT])
ffc0a5ec: 81 7e 00 08 lwz r11,8(r30)
ffc0a5f0: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0a5f4: 41 9e 00 08 beq- cr7,ffc0a5fc <_RBTree_Extract_unprotected+0x124><== NEVER TAKEN
the_node->child[RBT_RIGHT]->parent = target;
ffc0a5f8: 93 ab 00 00 stw r29,0(r11)
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
ffc0a5fc: 80 1e 00 04 lwz r0,4(r30)
ffc0a600: 90 1d 00 04 stw r0,4(r29)
if (the_node->child[RBT_LEFT])
ffc0a604: 81 7e 00 04 lwz r11,4(r30)
ffc0a608: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0a60c: 41 9e 00 08 beq- cr7,ffc0a614 <_RBTree_Extract_unprotected+0x13c>
the_node->child[RBT_LEFT]->parent = target;
ffc0a610: 93 ab 00 00 stw r29,0(r11)
/* finally, update the parent node and recolor. target has completely
* replaced the_node, and target's child has moved up the tree if needed.
* the_node is no longer part of the tree, although it has valid pointers
* still.
*/
target->parent = the_node->parent;
ffc0a614: 80 1e 00 00 lwz r0,0(r30)
ffc0a618: 90 1d 00 00 stw r0,0(r29)
target->color = the_node->color;
ffc0a61c: 80 1e 00 10 lwz r0,16(r30)
ffc0a620: 90 1d 00 10 stw r0,16(r29)
ffc0a624: 48 00 00 4c b ffc0a670 <_RBTree_Extract_unprotected+0x198>
* violated. We will fix it later.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
if( leaf ) {
ffc0a628: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a62c: 7c 1c 03 78 mr r28,r0
ffc0a630: 41 9e 00 10 beq- cr7,ffc0a640 <_RBTree_Extract_unprotected+0x168>
leaf->parent = the_node->parent;
ffc0a634: 80 1e 00 00 lwz r0,0(r30)
ffc0a638: 90 1c 00 00 stw r0,0(r28)
ffc0a63c: 48 00 00 0c b ffc0a648 <_RBTree_Extract_unprotected+0x170>
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
ffc0a640: 7f c3 f3 78 mr r3,r30
ffc0a644: 4b ff fc b5 bl ffc0a2f8 <_RBTree_Extract_validate_unprotected>
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
ffc0a648: 81 7e 00 00 lwz r11,0(r30)
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
ffc0a64c: 81 3e 00 10 lwz r9,16(r30)
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
ffc0a650: 80 0b 00 04 lwz r0,4(r11)
ffc0a654: 7f c0 02 78 xor r0,r30,r0
ffc0a658: 7c 00 00 34 cntlzw r0,r0
ffc0a65c: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc0a660: 68 00 00 01 xori r0,r0,1
the_node->parent->child[dir] = leaf;
ffc0a664: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0a668: 7d 6b 02 14 add r11,r11,r0
ffc0a66c: 93 8b 00 04 stw r28,4(r11)
* 1. Deleted a red node, its child must be black. Nothing must be done.
* 2. Deleted a black node and the child is red. Paint child black.
* 3. Deleted a black node and its child is black. This requires some
* care and rotations.
*/
if (victim_color == RBT_BLACK) { /* eliminate case 1 */
ffc0a670: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a674: 40 9e 00 28 bne- cr7,ffc0a69c <_RBTree_Extract_unprotected+0x1c4>
ffc0a678: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0a67c: 41 9e 00 20 beq- cr7,ffc0a69c <_RBTree_Extract_unprotected+0x1c4>
ffc0a680: 80 1c 00 10 lwz r0,16(r28)
ffc0a684: 2f 80 00 01 cmpwi cr7,r0,1
ffc0a688: 40 be 00 0c bne+ cr7,ffc0a694 <_RBTree_Extract_unprotected+0x1bc><== NEVER TAKEN
if (_RBTree_Is_red(leaf))
leaf->color = RBT_BLACK; /* case 2 */
ffc0a68c: 91 3c 00 10 stw r9,16(r28)
ffc0a690: 48 00 00 0c b ffc0a69c <_RBTree_Extract_unprotected+0x1c4>
else if(leaf)
_RBTree_Extract_validate_unprotected(leaf); /* case 3 */
ffc0a694: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc0a698: 4b ff fc 61 bl ffc0a2f8 <_RBTree_Extract_validate_unprotected><== NOT EXECUTED
/* Wipe the_node */
_RBTree_Set_off_rbtree(the_node);
/* set root to black, if it exists */
if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK;
ffc0a69c: 81 3f 00 04 lwz r9,4(r31)
*/
RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
RBTree_Node *node
)
{
node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL;
ffc0a6a0: 38 00 00 00 li r0,0
ffc0a6a4: 90 1e 00 08 stw r0,8(r30)
ffc0a6a8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a6ac: 90 1e 00 04 stw r0,4(r30)
ffc0a6b0: 90 1e 00 00 stw r0,0(r30)
ffc0a6b4: 41 9e 00 08 beq- cr7,ffc0a6bc <_RBTree_Extract_unprotected+0x1e4>
ffc0a6b8: 90 09 00 10 stw r0,16(r9)
}
ffc0a6bc: 39 61 00 18 addi r11,r1,24
ffc0a6c0: 4b ff 6a 8c b ffc0114c <_restgpr_28_x>
ffc0a2f8 <_RBTree_Extract_validate_unprotected>:
* of the extract operation.
*/
void _RBTree_Extract_validate_unprotected(
RBTree_Node *the_node
)
{
ffc0a2f8: 94 21 ff e0 stwu r1,-32(r1)
ffc0a2fc: 7c 08 02 a6 mflr r0
ffc0a300: 90 01 00 24 stw r0,36(r1)
ffc0a304: bf 41 00 08 stmw r26,8(r1)
ffc0a308: 7c 7e 1b 78 mr r30,r3
RBTree_Node *parent, *sibling;
RBTree_Direction dir;
parent = the_node->parent;
ffc0a30c: 83 e3 00 00 lwz r31,0(r3)
if(!parent->parent) return;
ffc0a310: 80 1f 00 00 lwz r0,0(r31)
ffc0a314: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a318: 41 9e 01 b8 beq- cr7,ffc0a4d0 <_RBTree_Extract_validate_unprotected+0x1d8>
sibling = _RBTree_Sibling(the_node);
ffc0a31c: 4b ff ff 29 bl ffc0a244 <_RBTree_Sibling>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
ffc0a320: 3b 40 00 00 li r26,0
/* sibling is black, see if both of its children are also black. */
if (sibling &&
!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
sibling->color = RBT_RED;
ffc0a324: 3b 60 00 01 li r27,1
if(!parent->parent) return;
sibling = _RBTree_Sibling(the_node);
/* continue to correct tree as long as the_node is black and not the root */
while (!_RBTree_Is_red(the_node) && parent->parent) {
ffc0a328: 48 00 01 60 b ffc0a488 <_RBTree_Extract_validate_unprotected+0x190>
ffc0a32c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a330: 41 9e 01 58 beq- cr7,ffc0a488 <_RBTree_Extract_validate_unprotected+0x190><== NEVER TAKEN
ffc0a334: 80 03 00 10 lwz r0,16(r3)
ffc0a338: 2f 80 00 01 cmpwi cr7,r0,1
ffc0a33c: 40 be 00 44 bne+ cr7,ffc0a380 <_RBTree_Extract_validate_unprotected+0x88>
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
sibling->color = RBT_BLACK;
dir = the_node != parent->child[0];
ffc0a340: 83 bf 00 04 lwz r29,4(r31)
* then rotate parent left, making the sibling be the_node's grandparent.
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
ffc0a344: 90 1f 00 10 stw r0,16(r31)
sibling->color = RBT_BLACK;
dir = the_node != parent->child[0];
ffc0a348: 7f dd ea 78 xor r29,r30,r29
ffc0a34c: 7f bd 00 34 cntlzw r29,r29
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
sibling->color = RBT_BLACK;
ffc0a350: 93 43 00 10 stw r26,16(r3)
dir = the_node != parent->child[0];
ffc0a354: 57 bd d9 7e rlwinm r29,r29,27,5,31
ffc0a358: 6b bd 00 01 xori r29,r29,1
_RBTree_Rotate(parent, dir);
ffc0a35c: 7f a4 eb 78 mr r4,r29
sibling = parent->child[!dir];
ffc0a360: 6b bd 00 01 xori r29,r29,1
ffc0a364: 57 bd 10 3a rlwinm r29,r29,2,0,29
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
sibling->color = RBT_BLACK;
dir = the_node != parent->child[0];
_RBTree_Rotate(parent, dir);
ffc0a368: 7f e3 fb 78 mr r3,r31
sibling = parent->child[!dir];
ffc0a36c: 7f bf ea 14 add r29,r31,r29
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
sibling->color = RBT_BLACK;
dir = the_node != parent->child[0];
_RBTree_Rotate(parent, dir);
ffc0a370: 4b ff ff 11 bl ffc0a280 <_RBTree_Rotate>
sibling = parent->child[!dir];
ffc0a374: 80 7d 00 04 lwz r3,4(r29)
}
/* sibling is black, see if both of its children are also black. */
if (sibling &&
ffc0a378: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a37c: 41 9e 01 0c beq- cr7,ffc0a488 <_RBTree_Extract_validate_unprotected+0x190><== NEVER TAKEN
!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
ffc0a380: 81 23 00 08 lwz r9,8(r3)
ffc0a384: 38 00 00 00 li r0,0
ffc0a388: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a38c: 41 9e 00 14 beq- cr7,ffc0a3a0 <_RBTree_Extract_validate_unprotected+0xa8>
* This function maintains the properties of the red-black tree.
*
* @note It does NOT disable interrupts to ensure the atomicity
* of the extract operation.
*/
void _RBTree_Extract_validate_unprotected(
ffc0a390: 80 09 00 10 lwz r0,16(r9)
ffc0a394: 68 00 00 01 xori r0,r0,1
ffc0a398: 7c 00 00 34 cntlzw r0,r0
ffc0a39c: 54 00 d9 7e rlwinm r0,r0,27,5,31
_RBTree_Rotate(parent, dir);
sibling = parent->child[!dir];
}
/* sibling is black, see if both of its children are also black. */
if (sibling &&
ffc0a3a0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a3a4: 40 9e 00 40 bne- cr7,ffc0a3e4 <_RBTree_Extract_validate_unprotected+0xec>
!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
ffc0a3a8: 81 23 00 04 lwz r9,4(r3)
ffc0a3ac: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a3b0: 41 9e 00 14 beq- cr7,ffc0a3c4 <_RBTree_Extract_validate_unprotected+0xcc>
* This function maintains the properties of the red-black tree.
*
* @note It does NOT disable interrupts to ensure the atomicity
* of the extract operation.
*/
void _RBTree_Extract_validate_unprotected(
ffc0a3b4: 80 09 00 10 lwz r0,16(r9)
ffc0a3b8: 68 00 00 01 xori r0,r0,1
ffc0a3bc: 7c 00 00 34 cntlzw r0,r0
ffc0a3c0: 54 00 d9 7e rlwinm r0,r0,27,5,31
sibling = parent->child[!dir];
}
/* sibling is black, see if both of its children are also black. */
if (sibling &&
!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
ffc0a3c4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a3c8: 40 9e 00 1c bne- cr7,ffc0a3e4 <_RBTree_Extract_validate_unprotected+0xec>
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
sibling->color = RBT_RED;
ffc0a3cc: 93 63 00 10 stw r27,16(r3)
ffc0a3d0: 81 3f 00 10 lwz r9,16(r31)
ffc0a3d4: 2f 89 00 01 cmpwi cr7,r9,1
ffc0a3d8: 40 be 00 e0 bne+ cr7,ffc0a4b8 <_RBTree_Extract_validate_unprotected+0x1c0>
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
ffc0a3dc: 90 1f 00 10 stw r0,16(r31)
break;
ffc0a3e0: 48 00 00 c0 b ffc0a4a0 <_RBTree_Extract_validate_unprotected+0x1a8>
* cases, either the_node is to the left or the right of the parent.
* In both cases, first check if one of sibling's children is black,
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
ffc0a3e4: 83 bf 00 04 lwz r29,4(r31)
ffc0a3e8: 38 00 00 00 li r0,0
ffc0a3ec: 7f dd ea 78 xor r29,r30,r29
ffc0a3f0: 7f bd 00 34 cntlzw r29,r29
ffc0a3f4: 57 bd d9 7e rlwinm r29,r29,27,5,31
ffc0a3f8: 6b bd 00 01 xori r29,r29,1
if (!_RBTree_Is_red(sibling->child[!dir])) {
ffc0a3fc: 6b bc 00 01 xori r28,r29,1
ffc0a400: 57 89 10 3a rlwinm r9,r28,2,0,29
ffc0a404: 7d 23 4a 14 add r9,r3,r9
ffc0a408: 81 29 00 04 lwz r9,4(r9)
ffc0a40c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a410: 41 9e 00 14 beq- cr7,ffc0a424 <_RBTree_Extract_validate_unprotected+0x12c>
* This function maintains the properties of the red-black tree.
*
* @note It does NOT disable interrupts to ensure the atomicity
* of the extract operation.
*/
void _RBTree_Extract_validate_unprotected(
ffc0a414: 80 09 00 10 lwz r0,16(r9)
ffc0a418: 68 00 00 01 xori r0,r0,1
ffc0a41c: 7c 00 00 34 cntlzw r0,r0
ffc0a420: 54 00 d9 7e rlwinm r0,r0,27,5,31
* In both cases, first check if one of sibling's children is black,
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
if (!_RBTree_Is_red(sibling->child[!dir])) {
ffc0a424: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a428: 40 be 00 30 bne+ cr7,ffc0a458 <_RBTree_Extract_validate_unprotected+0x160>
sibling->color = RBT_RED;
ffc0a42c: 39 20 00 01 li r9,1
ffc0a430: 91 23 00 10 stw r9,16(r3)
sibling->child[dir]->color = RBT_BLACK;
ffc0a434: 57 a9 10 3a rlwinm r9,r29,2,0,29
ffc0a438: 7d 23 4a 14 add r9,r3,r9
ffc0a43c: 81 29 00 04 lwz r9,4(r9)
_RBTree_Rotate(sibling, !dir);
ffc0a440: 6b a4 00 01 xori r4,r29,1
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
if (!_RBTree_Is_red(sibling->child[!dir])) {
sibling->color = RBT_RED;
sibling->child[dir]->color = RBT_BLACK;
ffc0a444: 90 09 00 10 stw r0,16(r9)
_RBTree_Rotate(sibling, !dir);
ffc0a448: 4b ff fe 39 bl ffc0a280 <_RBTree_Rotate>
sibling = parent->child[!dir];
ffc0a44c: 57 89 10 3a rlwinm r9,r28,2,0,29
ffc0a450: 7d 3f 4a 14 add r9,r31,r9
ffc0a454: 80 69 00 04 lwz r3,4(r9)
}
sibling->color = parent->color;
ffc0a458: 80 1f 00 10 lwz r0,16(r31)
parent->color = RBT_BLACK;
sibling->child[!dir]->color = RBT_BLACK;
ffc0a45c: 57 9c 10 3a rlwinm r28,r28,2,0,29
_RBTree_Rotate(parent, dir);
ffc0a460: 7f a4 eb 78 mr r4,r29
sibling->color = RBT_RED;
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, !dir);
sibling = parent->child[!dir];
}
sibling->color = parent->color;
ffc0a464: 90 03 00 10 stw r0,16(r3)
parent->color = RBT_BLACK;
sibling->child[!dir]->color = RBT_BLACK;
ffc0a468: 7c 63 e2 14 add r3,r3,r28
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, !dir);
sibling = parent->child[!dir];
}
sibling->color = parent->color;
parent->color = RBT_BLACK;
ffc0a46c: 38 00 00 00 li r0,0
sibling->child[!dir]->color = RBT_BLACK;
ffc0a470: 81 23 00 04 lwz r9,4(r3)
_RBTree_Rotate(parent, dir);
ffc0a474: 7f e3 fb 78 mr r3,r31
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, !dir);
sibling = parent->child[!dir];
}
sibling->color = parent->color;
parent->color = RBT_BLACK;
ffc0a478: 90 1f 00 10 stw r0,16(r31)
sibling->child[!dir]->color = RBT_BLACK;
ffc0a47c: 90 09 00 10 stw r0,16(r9)
_RBTree_Rotate(parent, dir);
ffc0a480: 4b ff fe 01 bl ffc0a280 <_RBTree_Rotate>
break; /* done */
ffc0a484: 48 00 00 1c b ffc0a4a0 <_RBTree_Extract_validate_unprotected+0x1a8>
if(!parent->parent) return;
sibling = _RBTree_Sibling(the_node);
/* continue to correct tree as long as the_node is black and not the root */
while (!_RBTree_Is_red(the_node) && parent->parent) {
ffc0a488: 80 1e 00 10 lwz r0,16(r30)
ffc0a48c: 2f 80 00 01 cmpwi cr7,r0,1
ffc0a490: 41 9e 00 10 beq- cr7,ffc0a4a0 <_RBTree_Extract_validate_unprotected+0x1a8>
ffc0a494: 80 1f 00 00 lwz r0,0(r31)
ffc0a498: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a49c: 40 9e fe 90 bne+ cr7,ffc0a32c <_RBTree_Extract_validate_unprotected+0x34>
sibling->child[!dir]->color = RBT_BLACK;
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
ffc0a4a0: 81 3e 00 00 lwz r9,0(r30)
ffc0a4a4: 80 09 00 00 lwz r0,0(r9)
ffc0a4a8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a4ac: 40 be 00 24 bne+ cr7,ffc0a4d0 <_RBTree_Extract_validate_unprotected+0x1d8>
ffc0a4b0: 90 1e 00 10 stw r0,16(r30)
ffc0a4b4: 48 00 00 1c b ffc0a4d0 <_RBTree_Extract_validate_unprotected+0x1d8>
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
break;
}
the_node = parent; /* done if parent is red */
parent = the_node->parent;
ffc0a4b8: 83 bf 00 00 lwz r29,0(r31)
sibling = _RBTree_Sibling(the_node);
ffc0a4bc: 7f e3 fb 78 mr r3,r31
ffc0a4c0: 7f fe fb 78 mr r30,r31
ffc0a4c4: 4b ff fd 81 bl ffc0a244 <_RBTree_Sibling>
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
break;
}
the_node = parent; /* done if parent is red */
parent = the_node->parent;
ffc0a4c8: 7f bf eb 78 mr r31,r29
sibling = _RBTree_Sibling(the_node);
ffc0a4cc: 4b ff ff bc b ffc0a488 <_RBTree_Extract_validate_unprotected+0x190>
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
}
ffc0a4d0: 39 61 00 20 addi r11,r1,32
ffc0a4d4: 4b ff 6c 70 b ffc01144 <_restgpr_26_x>
ffc0a744 <_RBTree_Find>:
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a744: 7d 20 00 a6 mfmsr r9
ffc0a748: 7c 10 42 a6 mfsprg r0,0
ffc0a74c: 7d 20 00 78 andc r0,r9,r0
ffc0a750: 7c 00 01 24 mtmsr r0
{
ISR_Level level;
RBTree_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
ffc0a754: 48 00 00 24 b ffc0a778 <_RBTree_Find+0x34>
unsigned int the_value
)
{
RBTree_Node* iter_node = the_rbtree->root;
while (iter_node) {
if (the_value == iter_node->value) return(iter_node);
ffc0a758: 80 03 00 0c lwz r0,12(r3)
ffc0a75c: 7f 84 00 00 cmpw cr7,r4,r0
ffc0a760: 41 9e 00 24 beq- cr7,ffc0a784 <_RBTree_Find+0x40>
RBTree_Direction dir = the_value > iter_node->value;
ffc0a764: 7c 04 00 10 subfc r0,r4,r0
ffc0a768: 7c 00 01 10 subfe r0,r0,r0
ffc0a76c: 7c 00 00 d0 neg r0,r0
iter_node = iter_node->child[dir];
ffc0a770: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0a774: 7c 63 02 14 add r3,r3,r0
ffc0a778: 80 63 00 04 lwz r3,4(r3)
RBTree_Control *the_rbtree,
unsigned int the_value
)
{
RBTree_Node* iter_node = the_rbtree->root;
while (iter_node) {
ffc0a77c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a780: 40 9e ff d8 bne+ cr7,ffc0a758 <_RBTree_Find+0x14> <== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a784: 7d 20 01 24 mtmsr r9
return_node = _RBTree_Find_unprotected( the_rbtree, the_value );
_ISR_Enable( level );
return return_node;
}
ffc0a788: 4e 80 00 20 blr
ffc0a6f8 <_RBTree_Find_header>:
*/
RBTree_Control *_RBTree_Find_header(
RBTree_Node *the_node
)
{
ffc0a6f8: 7c 69 1b 78 mr r9,r3
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a6fc: 7d 60 00 a6 mfmsr r11
ffc0a700: 7c 10 42 a6 mfsprg r0,0
ffc0a704: 7d 60 00 78 andc r0,r11,r0
ffc0a708: 7c 00 01 24 mtmsr r0
*/
RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected(
RBTree_Node *the_node
)
{
if(!the_node) return NULL;
ffc0a70c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a710: 38 60 00 00 li r3,0
ffc0a714: 41 9e 00 28 beq- cr7,ffc0a73c <_RBTree_Find_header+0x44><== NEVER TAKEN
if(!(the_node->parent)) return NULL;
ffc0a718: 80 09 00 00 lwz r0,0(r9)
ffc0a71c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a720: 40 be 00 0c bne+ cr7,ffc0a72c <_RBTree_Find_header+0x34><== ALWAYS TAKEN
ffc0a724: 48 00 00 18 b ffc0a73c <_RBTree_Find_header+0x44> <== NOT EXECUTED
while(the_node->parent) the_node = the_node->parent;
ffc0a728: 7c 09 03 78 mr r9,r0
ffc0a72c: 80 09 00 00 lwz r0,0(r9)
ffc0a730: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a734: 40 9e ff f4 bne+ cr7,ffc0a728 <_RBTree_Find_header+0x30>
ffc0a738: 7d 23 4b 78 mr r3,r9
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a73c: 7d 60 01 24 mtmsr r11
return_header = NULL;
_ISR_Disable( level );
return_header = _RBTree_Find_header_unprotected( the_node );
_ISR_Enable( level );
return return_header;
}
ffc0a740: 4e 80 00 20 blr
ffc0a93c <_RBTree_Insert_unprotected>:
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc0a93c: 7c 6b 1b 78 mr r11,r3
ffc0a940: 94 21 ff f8 stwu r1,-8(r1)
if(!the_node) return (RBTree_Node*)-1;
ffc0a944: 7c 83 23 79 mr. r3,r4
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc0a948: 7c 08 02 a6 mflr r0
if(!the_node) return (RBTree_Node*)-1;
ffc0a94c: 39 20 ff ff li r9,-1
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc0a950: 90 01 00 0c stw r0,12(r1)
if(!the_node) return (RBTree_Node*)-1;
ffc0a954: 41 82 00 a4 beq- ffc0a9f8 <_RBTree_Insert_unprotected+0xbc><== NEVER TAKEN
RBTree_Node *iter_node = the_rbtree->root;
ffc0a958: 81 2b 00 04 lwz r9,4(r11)
if (!iter_node) { /* special case: first node inserted */
ffc0a95c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a960: 40 be 00 74 bne+ cr7,ffc0a9d4 <_RBTree_Insert_unprotected+0x98>
the_node->color = RBT_BLACK;
ffc0a964: 91 23 00 10 stw r9,16(r3)
the_rbtree->root = the_node;
ffc0a968: 90 6b 00 04 stw r3,4(r11)
the_rbtree->first[0] = the_rbtree->first[1] = the_node;
ffc0a96c: 90 6b 00 0c stw r3,12(r11)
ffc0a970: 90 6b 00 08 stw r3,8(r11)
the_node->parent = (RBTree_Node *) the_rbtree;
ffc0a974: 91 63 00 00 stw r11,0(r3)
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
ffc0a978: 91 23 00 08 stw r9,8(r3)
ffc0a97c: 91 23 00 04 stw r9,4(r3)
ffc0a980: 48 00 00 78 b ffc0a9f8 <_RBTree_Insert_unprotected+0xbc>
} else {
/* typical binary search tree insert, descend tree to leaf and insert */
while (iter_node) {
if(the_node->value == iter_node->value) return(iter_node);
RBTree_Direction dir = the_node->value > iter_node->value;
ffc0a984: 7c 0a 00 10 subfc r0,r10,r0
ffc0a988: 7c 00 01 10 subfe r0,r0,r0
ffc0a98c: 7c 00 00 d0 neg r0,r0
if (!iter_node->child[dir]) {
ffc0a990: 54 08 10 3a rlwinm r8,r0,2,0,29
ffc0a994: 7c e9 42 14 add r7,r9,r8
ffc0a998: 80 07 00 04 lwz r0,4(r7)
ffc0a99c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a9a0: 40 be 00 3c bne+ cr7,ffc0a9dc <_RBTree_Insert_unprotected+0xa0>
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
ffc0a9a4: 90 03 00 08 stw r0,8(r3)
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
ffc0a9a8: 7d 6b 42 14 add r11,r11,r8
ffc0a9ac: 90 03 00 04 stw r0,4(r3)
the_node->color = RBT_RED;
ffc0a9b0: 38 00 00 01 li r0,1
ffc0a9b4: 90 03 00 10 stw r0,16(r3)
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
/* update min/max */
if (_RBTree_Is_first(the_rbtree, iter_node, dir)) {
ffc0a9b8: 80 0b 00 08 lwz r0,8(r11)
if(the_node->value == iter_node->value) return(iter_node);
RBTree_Direction dir = the_node->value > iter_node->value;
if (!iter_node->child[dir]) {
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
the_node->color = RBT_RED;
iter_node->child[dir] = the_node;
ffc0a9bc: 90 67 00 04 stw r3,4(r7)
the_node->parent = iter_node;
/* update min/max */
if (_RBTree_Is_first(the_rbtree, iter_node, dir)) {
ffc0a9c0: 7f 89 00 00 cmpw cr7,r9,r0
RBTree_Direction dir = the_node->value > iter_node->value;
if (!iter_node->child[dir]) {
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
the_node->color = RBT_RED;
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
ffc0a9c4: 91 23 00 00 stw r9,0(r3)
/* update min/max */
if (_RBTree_Is_first(the_rbtree, iter_node, dir)) {
ffc0a9c8: 40 be 00 28 bne+ cr7,ffc0a9f0 <_RBTree_Insert_unprotected+0xb4>
the_rbtree->first[dir] = the_node;
ffc0a9cc: 90 6b 00 08 stw r3,8(r11)
ffc0a9d0: 48 00 00 20 b ffc0a9f0 <_RBTree_Insert_unprotected+0xb4>
the_node->parent = (RBTree_Node *) the_rbtree;
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
} else {
/* typical binary search tree insert, descend tree to leaf and insert */
while (iter_node) {
if(the_node->value == iter_node->value) return(iter_node);
ffc0a9d4: 81 43 00 0c lwz r10,12(r3)
ffc0a9d8: 48 00 00 08 b ffc0a9e0 <_RBTree_Insert_unprotected+0xa4>
RBTree_Direction dir = the_node->value > iter_node->value;
if (!iter_node->child[dir]) {
ffc0a9dc: 7c 09 03 78 mr r9,r0
the_node->parent = (RBTree_Node *) the_rbtree;
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
} else {
/* typical binary search tree insert, descend tree to leaf and insert */
while (iter_node) {
if(the_node->value == iter_node->value) return(iter_node);
ffc0a9e0: 80 09 00 0c lwz r0,12(r9)
ffc0a9e4: 7f 8a 00 00 cmpw cr7,r10,r0
ffc0a9e8: 40 9e ff 9c bne+ cr7,ffc0a984 <_RBTree_Insert_unprotected+0x48>
ffc0a9ec: 48 00 00 0c b ffc0a9f8 <_RBTree_Insert_unprotected+0xbc>
}
} /* while(iter_node) */
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
ffc0a9f0: 4b ff fe 59 bl ffc0a848 <_RBTree_Validate_insert_unprotected>
}
return (RBTree_Node*)0;
ffc0a9f4: 39 20 00 00 li r9,0
}
ffc0a9f8: 80 01 00 0c lwz r0,12(r1)
ffc0a9fc: 7d 23 4b 78 mr r3,r9
ffc0aa00: 38 21 00 08 addi r1,r1,8
ffc0aa04: 7c 08 03 a6 mtlr r0
ffc0aa08: 4e 80 00 20 blr
ffc0a244 <_RBTree_Sibling>:
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
RBTree_Node *the_node
)
{
if(!the_node) return NULL;
ffc0a244: 2c 03 00 00 cmpwi r3,0
ffc0a248: 38 00 00 00 li r0,0
ffc0a24c: 41 82 00 2c beq- ffc0a278 <_RBTree_Sibling+0x34> <== NEVER TAKEN
if(!(the_node->parent)) return NULL;
ffc0a250: 81 23 00 00 lwz r9,0(r3)
ffc0a254: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a258: 41 9e 00 20 beq- cr7,ffc0a278 <_RBTree_Sibling+0x34> <== NEVER TAKEN
if(!(the_node->parent->parent)) return NULL;
ffc0a25c: 81 69 00 00 lwz r11,0(r9)
ffc0a260: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0a264: 41 9e 00 14 beq- cr7,ffc0a278 <_RBTree_Sibling+0x34>
if(the_node == the_node->parent->child[RBT_LEFT])
ffc0a268: 80 09 00 04 lwz r0,4(r9)
ffc0a26c: 7f 83 00 00 cmpw cr7,r3,r0
ffc0a270: 40 be 00 08 bne+ cr7,ffc0a278 <_RBTree_Sibling+0x34>
return the_node->parent->child[RBT_RIGHT];
ffc0a274: 80 09 00 08 lwz r0,8(r9)
else
return the_node->parent->child[RBT_LEFT];
}
ffc0a278: 7c 03 03 78 mr r3,r0
ffc0a27c: 4e 80 00 20 blr
ffc0a848 <_RBTree_Validate_insert_unprotected>:
* append operation.
*/
void _RBTree_Validate_insert_unprotected(
RBTree_Node *the_node
)
{
ffc0a848: 94 21 ff e0 stwu r1,-32(r1)
ffc0a84c: 7c 08 02 a6 mflr r0
ffc0a850: bf 61 00 0c stmw r27,12(r1)
ffc0a854: 7c 7e 1b 78 mr r30,r3
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
}
the_node->parent->color = RBT_BLACK;
ffc0a858: 3b 80 00 00 li r28,0
* append operation.
*/
void _RBTree_Validate_insert_unprotected(
RBTree_Node *the_node
)
{
ffc0a85c: 90 01 00 24 stw r0,36(r1)
if (dir != pdir) {
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
}
the_node->parent->color = RBT_BLACK;
g->color = RBT_RED;
ffc0a860: 3b 60 00 01 li r27,1
RBTree_Node *u,*g;
/* note: the insert root case is handled already */
/* if the parent is black, nothing needs to be done
* otherwise may need to loop a few times */
while (_RBTree_Is_red(_RBTree_Parent(the_node))) {
ffc0a864: 48 00 00 74 b ffc0a8d8 <_RBTree_Validate_insert_unprotected+0x90>
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(!(the_node->parent->parent->parent)) return NULL;
ffc0a868: 80 1f 00 00 lwz r0,0(r31)
ffc0a86c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a870: 41 9e 00 90 beq- cr7,ffc0a900 <_RBTree_Validate_insert_unprotected+0xb8><== NEVER TAKEN
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
ffc0a874: 81 3f 00 04 lwz r9,4(r31)
ffc0a878: 7f 83 48 00 cmpw cr7,r3,r9
ffc0a87c: 40 be 00 08 bne+ cr7,ffc0a884 <_RBTree_Validate_insert_unprotected+0x3c>
return the_node->parent->child[RBT_RIGHT];
ffc0a880: 81 3f 00 08 lwz r9,8(r31)
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
ffc0a884: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a888: 41 9e 00 78 beq- cr7,ffc0a900 <_RBTree_Validate_insert_unprotected+0xb8>
ffc0a88c: 80 09 00 10 lwz r0,16(r9)
ffc0a890: 2f 80 00 01 cmpwi cr7,r0,1
ffc0a894: 40 be 00 6c bne+ cr7,ffc0a900 <_RBTree_Validate_insert_unprotected+0xb8>
u = _RBTree_Parent_sibling(the_node);
g = the_node->parent->parent;
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
the_node->parent->color = RBT_BLACK;
ffc0a898: 93 83 00 10 stw r28,16(r3)
u->color = RBT_BLACK;
g->color = RBT_RED;
ffc0a89c: 7f fe fb 78 mr r30,r31
g = the_node->parent->parent;
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
ffc0a8a0: 93 89 00 10 stw r28,16(r9)
g->color = RBT_RED;
ffc0a8a4: 90 1f 00 10 stw r0,16(r31)
ffc0a8a8: 48 00 00 30 b ffc0a8d8 <_RBTree_Validate_insert_unprotected+0x90>
RBTree_Direction dir = the_node != the_node->parent->child[0];
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
_RBTree_Rotate(the_node->parent, pdir);
ffc0a8ac: 7f a4 eb 78 mr r4,r29
ffc0a8b0: 4b ff ff 21 bl ffc0a7d0 <_RBTree_Rotate>
the_node = the_node->child[pdir];
ffc0a8b4: 57 a0 10 3a rlwinm r0,r29,2,0,29
ffc0a8b8: 7f de 02 14 add r30,r30,r0
ffc0a8bc: 83 de 00 04 lwz r30,4(r30)
}
the_node->parent->color = RBT_BLACK;
ffc0a8c0: 81 3e 00 00 lwz r9,0(r30)
g->color = RBT_RED;
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
ffc0a8c4: 7f e3 fb 78 mr r3,r31
ffc0a8c8: 20 9d 00 01 subfic r4,r29,1
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
}
the_node->parent->color = RBT_BLACK;
ffc0a8cc: 93 89 00 10 stw r28,16(r9)
g->color = RBT_RED;
ffc0a8d0: 93 7f 00 10 stw r27,16(r31)
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
ffc0a8d4: 4b ff fe fd bl ffc0a7d0 <_RBTree_Rotate>
ISR_Level level;
_ISR_Disable( level );
_RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
}
ffc0a8d8: 80 7e 00 00 lwz r3,0(r30)
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
ffc0a8dc: 83 e3 00 00 lwz r31,0(r3)
ffc0a8e0: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0a8e4: 41 9e 00 14 beq- cr7,ffc0a8f8 <_RBTree_Validate_insert_unprotected+0xb0>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
ffc0a8e8: 80 03 00 10 lwz r0,16(r3)
ffc0a8ec: 2f 80 00 01 cmpwi cr7,r0,1
ffc0a8f0: 40 be 00 44 bne+ cr7,ffc0a934 <_RBTree_Validate_insert_unprotected+0xec>
ffc0a8f4: 4b ff ff 74 b ffc0a868 <_RBTree_Validate_insert_unprotected+0x20>
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
}
}
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
ffc0a8f8: 93 fe 00 10 stw r31,16(r30)
ffc0a8fc: 48 00 00 38 b ffc0a934 <_RBTree_Validate_insert_unprotected+0xec>
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc0a900: 83 bf 00 04 lwz r29,4(r31)
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
ffc0a904: 80 03 00 04 lwz r0,4(r3)
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc0a908: 7c 7d ea 78 xor r29,r3,r29
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
ffc0a90c: 7f c0 02 78 xor r0,r30,r0
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc0a910: 7f bd 00 34 cntlzw r29,r29
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
ffc0a914: 7c 00 00 34 cntlzw r0,r0
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc0a918: 57 bd d9 7e rlwinm r29,r29,27,5,31
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
ffc0a91c: 54 00 d9 7e rlwinm r0,r0,27,5,31
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc0a920: 6b bd 00 01 xori r29,r29,1
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
ffc0a924: 68 00 00 01 xori r0,r0,1
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
ffc0a928: 7f 80 e8 00 cmpw cr7,r0,r29
ffc0a92c: 40 be ff 80 bne- cr7,ffc0a8ac <_RBTree_Validate_insert_unprotected+0x64>
ffc0a930: 4b ff ff 90 b ffc0a8c0 <_RBTree_Validate_insert_unprotected+0x78>
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
}
}
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
}
ffc0a934: 39 61 00 20 addi r11,r1,32
ffc0a938: 4b ff 68 10 b ffc01148 <_restgpr_27_x>
ffc0d768 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
ffc0d768: 94 21 ff e0 stwu r1,-32(r1)
ffc0d76c: 7c 08 02 a6 mflr r0
ffc0d770: 90 01 00 24 stw r0,36(r1)
ffc0d774: bf c1 00 18 stmw r30,24(r1)
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
ffc0d778: 83 e3 01 2c lwz r31,300(r3)
if ( !api )
ffc0d77c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0d780: 41 9e 00 7c beq- cr7,ffc0d7fc <_RTEMS_tasks_Post_switch_extension+0x94><== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0d784: 7c 00 00 a6 mfmsr r0
ffc0d788: 7d 30 42 a6 mfsprg r9,0
ffc0d78c: 7c 09 48 78 andc r9,r0,r9
ffc0d790: 7d 20 01 24 mtmsr r9
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
asr->signals_posted = 0;
ffc0d794: 39 20 00 00 li r9,0
*/
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
ffc0d798: 83 df 00 14 lwz r30,20(r31)
asr->signals_posted = 0;
ffc0d79c: 91 3f 00 14 stw r9,20(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0d7a0: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
ffc0d7a4: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0d7a8: 41 be 00 54 beq+ cr7,ffc0d7fc <_RTEMS_tasks_Post_switch_extension+0x94>
return;
asr->nest_level += 1;
ffc0d7ac: 81 3f 00 1c lwz r9,28(r31)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0d7b0: 38 80 00 00 li r4,0
ffc0d7b4: 80 7f 00 10 lwz r3,16(r31)
ffc0d7b8: 60 84 ff ff ori r4,r4,65535
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
ffc0d7bc: 38 09 00 01 addi r0,r9,1
ffc0d7c0: 90 1f 00 1c stw r0,28(r31)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0d7c4: 38 a1 00 08 addi r5,r1,8
ffc0d7c8: 48 00 1e 99 bl ffc0f660 <rtems_task_mode>
(*asr->handler)( signal_set );
ffc0d7cc: 80 1f 00 0c lwz r0,12(r31)
ffc0d7d0: 7f c3 f3 78 mr r3,r30
ffc0d7d4: 7c 09 03 a6 mtctr r0
ffc0d7d8: 4e 80 04 21 bctrl
asr->nest_level -= 1;
ffc0d7dc: 81 3f 00 1c lwz r9,28(r31)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0d7e0: 38 80 00 00 li r4,0
ffc0d7e4: 80 61 00 08 lwz r3,8(r1)
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
(*asr->handler)( signal_set );
asr->nest_level -= 1;
ffc0d7e8: 38 09 ff ff addi r0,r9,-1
ffc0d7ec: 90 1f 00 1c stw r0,28(r31)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0d7f0: 60 84 ff ff ori r4,r4,65535
ffc0d7f4: 38 a1 00 08 addi r5,r1,8
ffc0d7f8: 48 00 1e 69 bl ffc0f660 <rtems_task_mode>
}
ffc0d7fc: 39 61 00 20 addi r11,r1,32
ffc0d800: 4b ff 2d 30 b ffc00530 <_restgpr_30_x>
ffc08b8c <_Rate_monotonic_Get_status>:
bool _Rate_monotonic_Get_status(
Rate_monotonic_Control *the_period,
Rate_monotonic_Period_time_t *wall_since_last_period,
Thread_CPU_usage_t *cpu_since_last_period
)
{
ffc08b8c: 94 21 ff c8 stwu r1,-56(r1)
ffc08b90: 7c 08 02 a6 mflr r0
ffc08b94: 90 01 00 3c stw r0,60(r1)
ffc08b98: bf 81 00 28 stmw r28,40(r1)
ffc08b9c: 7c 9c 23 78 mr r28,r4
ffc08ba0: 7c 7f 1b 78 mr r31,r3
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
#endif
Thread_Control *owning_thread = the_period->owner;
ffc08ba4: 83 c3 00 40 lwz r30,64(r3)
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
ffc08ba8: 38 61 00 18 addi r3,r1,24
bool _Rate_monotonic_Get_status(
Rate_monotonic_Control *the_period,
Rate_monotonic_Period_time_t *wall_since_last_period,
Thread_CPU_usage_t *cpu_since_last_period
)
{
ffc08bac: 7c bd 2b 78 mr r29,r5
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
ffc08bb0: 48 00 1c 61 bl ffc0a810 <_TOD_Get_uptime>
_Timestamp_Subtract(
ffc08bb4: 38 7f 00 4c addi r3,r31,76
ffc08bb8: 38 81 00 18 addi r4,r1,24
ffc08bbc: 7f 85 e3 78 mr r5,r28
ffc08bc0: 48 00 42 e1 bl ffc0cea0 <_Timespec_Subtract>
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
ffc08bc4: 3c 60 00 00 lis r3,0
ffc08bc8: 38 63 2e 98 addi r3,r3,11928
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
ffc08bcc: 81 5e 00 84 lwz r10,132(r30)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
ffc08bd0: 81 23 00 0c lwz r9,12(r3)
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
ffc08bd4: 38 00 00 01 li r0,1
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
ffc08bd8: 81 7e 00 88 lwz r11,136(r30)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
ffc08bdc: 7f 9e 48 00 cmpw cr7,r30,r9
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
ffc08be0: 91 41 00 10 stw r10,16(r1)
ffc08be4: 91 61 00 14 stw r11,20(r1)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
ffc08be8: 40 be 00 50 bne+ cr7,ffc08c38 <_Rate_monotonic_Get_status+0xac><== NEVER TAKEN
Thread_CPU_usage_t ran;
/* How much time time since last context switch */
_Timestamp_Subtract(
ffc08bec: 38 a1 00 08 addi r5,r1,8
ffc08bf0: 38 63 00 1c addi r3,r3,28
ffc08bf4: 38 81 00 18 addi r4,r1,24
ffc08bf8: 48 00 42 a9 bl ffc0cea0 <_Timespec_Subtract>
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
ffc08bfc: 3b ff 00 44 addi r31,r31,68
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &ran
);
/* cpu usage += ran */
_Timestamp_Add_to( &used, &ran );
ffc08c00: 38 81 00 08 addi r4,r1,8
ffc08c04: 38 61 00 10 addi r3,r1,16
ffc08c08: 48 00 41 41 bl ffc0cd48 <_Timespec_Add_to>
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
ffc08c0c: 38 61 00 10 addi r3,r1,16
ffc08c10: 7f e4 fb 78 mr r4,r31
ffc08c14: 48 00 42 51 bl ffc0ce64 <_Timespec_Less_than>
return false;
ffc08c18: 38 00 00 00 li r0,0
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
ffc08c1c: 2f 83 00 00 cmpwi cr7,r3,0
ffc08c20: 40 be 00 18 bne+ cr7,ffc08c38 <_Rate_monotonic_Get_status+0xac>
return false;
/* used = current cpu usage - cpu usage at start of period */
_Timestamp_Subtract(
ffc08c24: 7f e3 fb 78 mr r3,r31
ffc08c28: 38 81 00 10 addi r4,r1,16
ffc08c2c: 7f a5 eb 78 mr r5,r29
ffc08c30: 48 00 42 71 bl ffc0cea0 <_Timespec_Subtract>
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
ffc08c34: 38 00 00 01 li r0,1
}
ffc08c38: 39 61 00 38 addi r11,r1,56
ffc08c3c: 7c 03 03 78 mr r3,r0
ffc08c40: 4b ff 85 b0 b ffc011f0 <_restgpr_28_x>
ffc09260 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
ffc09260: 7c 2b 0b 78 mr r11,r1
ffc09264: 94 21 ff e0 stwu r1,-32(r1)
ffc09268: 7c 08 02 a6 mflr r0
ffc0926c: 7c 64 1b 78 mr r4,r3
ffc09270: 3c 60 00 00 lis r3,0
ffc09274: 48 01 2a 79 bl ffc1bcec <_savegpr_31>
ffc09278: 38 63 2c 00 addi r3,r3,11264
ffc0927c: 90 01 00 24 stw r0,36(r1)
ffc09280: 38 a1 00 08 addi r5,r1,8
ffc09284: 48 00 21 25 bl ffc0b3a8 <_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 ) {
ffc09288: 80 01 00 08 lwz r0,8(r1)
ffc0928c: 7c 7f 1b 78 mr r31,r3
ffc09290: 2f 80 00 00 cmpwi cr7,r0,0
ffc09294: 40 9e 00 88 bne- cr7,ffc0931c <_Rate_monotonic_Timeout+0xbc><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
ffc09298: 80 63 00 40 lwz r3,64(r3)
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_PERIOD);
ffc0929c: 80 03 00 10 lwz r0,16(r3)
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
ffc092a0: 70 09 40 00 andi. r9,r0,16384
ffc092a4: 41 82 00 24 beq- ffc092c8 <_Rate_monotonic_Timeout+0x68>
ffc092a8: 81 23 00 20 lwz r9,32(r3)
ffc092ac: 80 1f 00 08 lwz r0,8(r31)
ffc092b0: 7f 89 00 00 cmpw cr7,r9,r0
ffc092b4: 40 be 00 14 bne+ cr7,ffc092c8 <_Rate_monotonic_Timeout+0x68>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc092b8: 3c 80 10 03 lis r4,4099
ffc092bc: 60 84 ff f8 ori r4,r4,65528
ffc092c0: 48 00 2b 65 bl ffc0be24 <_Thread_Clear_state>
ffc092c4: 48 00 00 18 b ffc092dc <_Rate_monotonic_Timeout+0x7c>
_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 ) {
ffc092c8: 80 1f 00 38 lwz r0,56(r31)
ffc092cc: 2f 80 00 01 cmpwi cr7,r0,1
ffc092d0: 40 be 00 30 bne+ cr7,ffc09300 <_Rate_monotonic_Timeout+0xa0>
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
ffc092d4: 38 00 00 03 li r0,3
ffc092d8: 90 1f 00 38 stw r0,56(r31)
_Rate_monotonic_Initiate_statistics( the_period );
ffc092dc: 7f e3 fb 78 mr r3,r31
ffc092e0: 4b ff f9 65 bl ffc08c44 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc092e4: 80 1f 00 3c lwz r0,60(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc092e8: 3c 60 00 00 lis r3,0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc092ec: 90 1f 00 1c stw r0,28(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc092f0: 38 63 2d c8 addi r3,r3,11720
ffc092f4: 38 9f 00 10 addi r4,r31,16
ffc092f8: 48 00 3f 25 bl ffc0d21c <_Watchdog_Insert>
ffc092fc: 48 00 00 0c b ffc09308 <_Rate_monotonic_Timeout+0xa8>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
ffc09300: 38 00 00 04 li r0,4
ffc09304: 90 1f 00 38 stw r0,56(r31)
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
ffc09308: 3d 20 00 00 lis r9,0
ffc0930c: 81 69 28 08 lwz r11,10248(r9)
ffc09310: 38 0b ff ff addi r0,r11,-1
ffc09314: 90 09 28 08 stw r0,10248(r9)
return _Thread_Dispatch_disable_level;
ffc09318: 80 09 28 08 lwz r0,10248(r9)
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
ffc0931c: 39 61 00 20 addi r11,r1,32
ffc09320: 4b ff 7e dc b ffc011fc <_restgpr_31_x>
ffc09ea8 <_Scheduler_priority_Block>:
)
{
Scheduler_priority_Per_thread *sched_info;
Chain_Control *ready;
sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
ffc09ea8: 81 63 00 8c lwz r11,140(r3)
ready = sched_info->ready_chain;
ffc09eac: 81 2b 00 00 lwz r9,0(r11)
if ( _Chain_Has_only_one_node( ready ) ) {
ffc09eb0: 81 49 00 00 lwz r10,0(r9)
ffc09eb4: 80 09 00 08 lwz r0,8(r9)
ffc09eb8: 7f 8a 00 00 cmpw cr7,r10,r0
ffc09ebc: 40 be 00 4c bne+ cr7,ffc09f08 <_Scheduler_priority_Block+0x60>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
ffc09ec0: 38 09 00 04 addi r0,r9,4
head->next = tail;
head->previous = NULL;
tail->previous = head;
ffc09ec4: 91 29 00 08 stw r9,8(r9)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc09ec8: 90 09 00 00 stw r0,0(r9)
head->previous = NULL;
ffc09ecc: 38 00 00 00 li r0,0
ffc09ed0: 90 09 00 04 stw r0,4(r9)
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
ffc09ed4: 81 2b 00 04 lwz r9,4(r11)
ffc09ed8: 80 0b 00 14 lwz r0,20(r11)
ffc09edc: 81 49 00 00 lwz r10,0(r9)
ffc09ee0: 7d 40 00 38 and r0,r10,r0
if ( *the_priority_map->minor == 0 )
ffc09ee4: 2f 80 00 00 cmpwi cr7,r0,0
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
ffc09ee8: 90 09 00 00 stw r0,0(r9)
if ( *the_priority_map->minor == 0 )
ffc09eec: 40 9e 00 2c bne- cr7,ffc09f18 <_Scheduler_priority_Block+0x70>
_Priority_Major_bit_map &= the_priority_map->block_major;
ffc09ef0: 3d 20 00 00 lis r9,0
ffc09ef4: 80 0b 00 10 lwz r0,16(r11)
ffc09ef8: 81 49 28 08 lwz r10,10248(r9)
ffc09efc: 7d 40 00 38 and r0,r10,r0
ffc09f00: 90 09 28 08 stw r0,10248(r9)
ffc09f04: 48 00 00 14 b ffc09f18 <_Scheduler_priority_Block+0x70>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc09f08: 81 63 00 00 lwz r11,0(r3)
previous = the_node->previous;
ffc09f0c: 81 23 00 04 lwz r9,4(r3)
next->previous = previous;
ffc09f10: 91 2b 00 04 stw r9,4(r11)
previous->next = next;
ffc09f14: 91 69 00 00 stw r11,0(r9)
RTEMS_INLINE_ROUTINE bool _Thread_Is_heir (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Heir );
ffc09f18: 3d 20 00 00 lis r9,0
{
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
ffc09f1c: 80 09 2d c8 lwz r0,11720(r9)
ffc09f20: 7f 83 00 00 cmpw cr7,r3,r0
ffc09f24: 40 be 00 60 bne+ cr7,ffc09f84 <_Scheduler_priority_Block+0xdc>
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc09f28: 3d 40 00 00 lis r10,0
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
(Chain_Control *) _Scheduler.information
ffc09f2c: 3d 20 00 00 lis r9,0
ffc09f30: 80 0a 28 08 lwz r0,10248(r10)
ffc09f34: 81 29 20 e0 lwz r9,8416(r9)
ffc09f38: 7c 0b 00 34 cntlzw r11,r0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc09f3c: 3d 00 00 00 lis r8,0
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc09f40: 90 0a 28 08 stw r0,10248(r10)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc09f44: 39 08 2d e0 addi r8,r8,11744
ffc09f48: 55 6a 10 3a rlwinm r10,r11,2,0,29
ffc09f4c: 7c 08 50 2e lwzx r0,r8,r10
ffc09f50: 7c 07 00 34 cntlzw r7,r0
ffc09f54: 7c 08 51 2e stwx r0,r8,r10
return (_Priority_Bits_index( major ) << 4) +
ffc09f58: 55 60 20 36 rlwinm r0,r11,4,0,27
ffc09f5c: 7c 00 3a 14 add r0,r0,r7
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
ffc09f60: 1c 00 00 0c mulli r0,r0,12
ffc09f64: 7d 69 02 14 add r11,r9,r0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc09f68: 7c 09 00 2e lwzx r0,r9,r0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc09f6c: 39 2b 00 04 addi r9,r11,4
ffc09f70: 7f 80 48 00 cmpw cr7,r0,r9
ffc09f74: 40 be 00 08 bne+ cr7,ffc09f7c <_Scheduler_priority_Block+0xd4><== ALWAYS TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
ffc09f78: 38 00 00 00 li r0,0 <== NOT EXECUTED
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
ffc09f7c: 3d 20 00 00 lis r9,0
ffc09f80: 90 09 2d c8 stw r0,11720(r9)
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc09f84: 3d 20 00 00 lis r9,0
ffc09f88: 39 29 2d b8 addi r9,r9,11704
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
ffc09f8c: 80 09 00 0c lwz r0,12(r9)
ffc09f90: 7f 83 00 00 cmpw cr7,r3,r0
ffc09f94: 4c be 00 20 bnelr+ cr7
_Thread_Dispatch_necessary = true;
ffc09f98: 38 00 00 01 li r0,1
ffc09f9c: 98 09 00 18 stb r0,24(r9)
ffc09fa0: 4e 80 00 20 blr
ffc0a168 <_Scheduler_priority_Schedule>:
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc0a168: 3d 40 00 00 lis r10,0
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
(Chain_Control *) _Scheduler.information
ffc0a16c: 3d 20 00 00 lis r9,0
ffc0a170: 80 0a 28 08 lwz r0,10248(r10)
ffc0a174: 81 29 20 e0 lwz r9,8416(r9)
ffc0a178: 7c 0b 00 34 cntlzw r11,r0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0a17c: 3d 00 00 00 lis r8,0
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc0a180: 90 0a 28 08 stw r0,10248(r10)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0a184: 39 08 2d e0 addi r8,r8,11744
ffc0a188: 55 6a 10 3a rlwinm r10,r11,2,0,29
ffc0a18c: 7c 08 50 2e lwzx r0,r8,r10
ffc0a190: 7c 07 00 34 cntlzw r7,r0
ffc0a194: 7c 08 51 2e stwx r0,r8,r10
return (_Priority_Bits_index( major ) << 4) +
ffc0a198: 55 60 20 36 rlwinm r0,r11,4,0,27
ffc0a19c: 7c 00 3a 14 add r0,r0,r7
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
ffc0a1a0: 1c 00 00 0c mulli r0,r0,12
ffc0a1a4: 7d 69 02 14 add r11,r9,r0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0a1a8: 7c 09 00 2e lwzx r0,r9,r0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0a1ac: 39 2b 00 04 addi r9,r11,4
ffc0a1b0: 7f 80 48 00 cmpw cr7,r0,r9
ffc0a1b4: 40 be 00 08 bne+ cr7,ffc0a1bc <_Scheduler_priority_Schedule+0x54><== ALWAYS TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
ffc0a1b8: 38 00 00 00 li r0,0 <== NOT EXECUTED
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
ffc0a1bc: 3d 20 00 00 lis r9,0
ffc0a1c0: 90 09 2d c8 stw r0,11720(r9)
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Schedule(void)
{
_Scheduler_priority_Schedule_body();
}
ffc0a1c4: 4e 80 00 20 blr
ffc0a334 <_Scheduler_priority_Yield>:
Scheduler_priority_Per_thread *sched_info;
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ffc0a334: 3d 40 00 00 lis r10,0
ffc0a338: 39 4a 2d b8 addi r10,r10,11704
ffc0a33c: 81 2a 00 0c lwz r9,12(r10)
sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info;
ready = sched_info->ready_chain;
ffc0a340: 81 69 00 8c lwz r11,140(r9)
ffc0a344: 81 6b 00 00 lwz r11,0(r11)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a348: 7c 00 00 a6 mfmsr r0
ffc0a34c: 7d 10 42 a6 mfsprg r8,0
ffc0a350: 7c 08 40 78 andc r8,r0,r8
ffc0a354: 7d 00 01 24 mtmsr r8
_ISR_Disable( level );
if ( !_Chain_Has_only_one_node( ready ) ) {
ffc0a358: 80 eb 00 00 lwz r7,0(r11)
ffc0a35c: 81 0b 00 08 lwz r8,8(r11)
ffc0a360: 7f 87 40 00 cmpw cr7,r7,r8
ffc0a364: 41 9e 00 60 beq- cr7,ffc0a3c4 <_Scheduler_priority_Yield+0x90>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0a368: 80 e9 00 00 lwz r7,0(r9)
previous = the_node->previous;
ffc0a36c: 81 09 00 04 lwz r8,4(r9)
next->previous = previous;
ffc0a370: 91 07 00 04 stw r8,4(r7)
previous->next = next;
ffc0a374: 90 e8 00 00 stw r7,0(r8)
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
ffc0a378: 38 eb 00 04 addi r7,r11,4
Chain_Node *old_last = tail->previous;
ffc0a37c: 81 0b 00 08 lwz r8,8(r11)
the_node->next = tail;
ffc0a380: 90 e9 00 00 stw r7,0(r9)
tail->previous = the_node;
ffc0a384: 91 2b 00 08 stw r9,8(r11)
old_last->next = the_node;
ffc0a388: 91 28 00 00 stw r9,0(r8)
the_node->previous = old_last;
ffc0a38c: 91 09 00 04 stw r8,4(r9)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc0a390: 7d 00 00 a6 mfmsr r8
ffc0a394: 7c 00 01 24 mtmsr r0
ffc0a398: 7d 00 01 24 mtmsr r8
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
ffc0a39c: 81 0a 00 10 lwz r8,16(r10)
ffc0a3a0: 7f 89 40 00 cmpw cr7,r9,r8
ffc0a3a4: 40 be 00 0c bne+ cr7,ffc0a3b0 <_Scheduler_priority_Yield+0x7c><== NEVER TAKEN
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
ffc0a3a8: 81 2b 00 00 lwz r9,0(r11)
ffc0a3ac: 91 2a 00 10 stw r9,16(r10)
_Thread_Dispatch_necessary = true;
ffc0a3b0: 3d 20 00 00 lis r9,0
ffc0a3b4: 39 60 00 01 li r11,1
ffc0a3b8: 39 29 2d b8 addi r9,r9,11704
ffc0a3bc: 99 69 00 18 stb r11,24(r9)
ffc0a3c0: 48 00 00 18 b ffc0a3d8 <_Scheduler_priority_Yield+0xa4>
}
else if ( !_Thread_Is_heir( executing ) )
ffc0a3c4: 81 6a 00 10 lwz r11,16(r10)
ffc0a3c8: 7f 89 58 00 cmpw cr7,r9,r11
ffc0a3cc: 41 9e 00 0c beq- cr7,ffc0a3d8 <_Scheduler_priority_Yield+0xa4>
_Thread_Dispatch_necessary = true;
ffc0a3d0: 39 20 00 01 li r9,1
ffc0a3d4: 99 2a 00 18 stb r9,24(r10)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a3d8: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
}
ffc0a3dc: 4e 80 00 20 blr
ffc08cbc <_TOD_Validate>:
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) ||
ffc08cbc: 2c 03 00 00 cmpwi r3,0
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
ffc08cc0: 3d 20 00 00 lis r9,0
ffc08cc4: 81 29 20 30 lwz r9,8240(r9)
(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) )
return false;
ffc08cc8: 38 00 00 00 li r0,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) ||
ffc08ccc: 41 82 00 94 beq- ffc08d60 <_TOD_Validate+0xa4> <== NEVER TAKEN
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
ffc08cd0: 3d 60 00 0f lis r11,15
ffc08cd4: 61 6b 42 40 ori r11,r11,16960
ffc08cd8: 7d 2b 4b 96 divwu r9,r11,r9
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
ffc08cdc: 81 63 00 18 lwz r11,24(r3)
ffc08ce0: 7f 8b 48 40 cmplw cr7,r11,r9
ffc08ce4: 40 9c 00 7c bge- cr7,ffc08d60 <_TOD_Validate+0xa4>
(the_tod->ticks >= ticks_per_second) ||
ffc08ce8: 81 23 00 14 lwz r9,20(r3)
ffc08cec: 2b 89 00 3b cmplwi cr7,r9,59
ffc08cf0: 41 9d 00 70 bgt- cr7,ffc08d60 <_TOD_Validate+0xa4>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
ffc08cf4: 81 23 00 10 lwz r9,16(r3)
ffc08cf8: 2b 89 00 3b cmplwi cr7,r9,59
ffc08cfc: 41 9d 00 64 bgt- cr7,ffc08d60 <_TOD_Validate+0xa4>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
ffc08d00: 81 23 00 0c lwz r9,12(r3)
ffc08d04: 2b 89 00 17 cmplwi cr7,r9,23
ffc08d08: 41 9d 00 58 bgt- cr7,ffc08d60 <_TOD_Validate+0xa4>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
ffc08d0c: 81 23 00 04 lwz r9,4(r3)
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
ffc08d10: 2f 89 00 00 cmpwi cr7,r9,0
ffc08d14: 41 9e 00 4c beq- cr7,ffc08d60 <_TOD_Validate+0xa4> <== NEVER TAKEN
(the_tod->month == 0) ||
ffc08d18: 2b 89 00 0c cmplwi cr7,r9,12
ffc08d1c: 41 9d 00 44 bgt- cr7,ffc08d60 <_TOD_Validate+0xa4>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
ffc08d20: 81 43 00 00 lwz r10,0(r3)
(the_tod->ticks >= ticks_per_second) ||
(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) ||
ffc08d24: 2b 8a 07 c3 cmplwi cr7,r10,1987
ffc08d28: 40 9d 00 38 ble- cr7,ffc08d60 <_TOD_Validate+0xa4>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
ffc08d2c: 81 63 00 08 lwz r11,8(r3)
(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) ||
ffc08d30: 2f 8b 00 00 cmpwi cr7,r11,0
ffc08d34: 41 9e 00 2c beq- cr7,ffc08d60 <_TOD_Validate+0xa4> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
ffc08d38: 71 40 00 03 andi. r0,r10,3
ffc08d3c: 3d 40 ff c2 lis r10,-62
ffc08d40: 39 4a e9 2c addi r10,r10,-5844
ffc08d44: 40 82 00 08 bne- ffc08d4c <_TOD_Validate+0x90>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
ffc08d48: 39 29 00 0d addi r9,r9,13
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
ffc08d4c: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc08d50: 7c 0a 48 2e lwzx r0,r10,r9
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
ffc08d54: 7c 0b 00 10 subfc r0,r11,r0
ffc08d58: 38 00 00 00 li r0,0
ffc08d5c: 7c 00 01 14 adde r0,r0,r0
if ( the_tod->day > days_in_month )
return false;
return true;
}
ffc08d60: 7c 03 03 78 mr r3,r0
ffc08d64: 4e 80 00 20 blr
ffc0a440 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
ffc0a440: 94 21 ff e0 stwu r1,-32(r1)
ffc0a444: 7c 08 02 a6 mflr r0
ffc0a448: 90 01 00 24 stw r0,36(r1)
ffc0a44c: bf 81 00 10 stmw r28,16(r1)
ffc0a450: 7c 7f 1b 78 mr r31,r3
ffc0a454: 7c be 2b 78 mr r30,r5
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
ffc0a458: 83 a3 00 10 lwz r29,16(r3)
/*
* 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 );
ffc0a45c: 90 81 00 08 stw r4,8(r1)
ffc0a460: 48 00 0e 4d bl ffc0b2ac <_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 )
ffc0a464: 80 1f 00 14 lwz r0,20(r31)
ffc0a468: 80 81 00 08 lwz r4,8(r1)
ffc0a46c: 7f 80 20 00 cmpw cr7,r0,r4
ffc0a470: 41 9e 00 0c beq- cr7,ffc0a47c <_Thread_Change_priority+0x3c>
_Thread_Set_priority( the_thread, new_priority );
ffc0a474: 7f e3 fb 78 mr r3,r31
ffc0a478: 48 00 0d a9 bl ffc0b220 <_Thread_Set_priority>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a47c: 7f 80 00 a6 mfmsr r28
ffc0a480: 7c 10 42 a6 mfsprg r0,0
ffc0a484: 7f 80 00 78 andc r0,r28,r0
ffc0a488: 7c 00 01 24 mtmsr r0
/*
* 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;
ffc0a48c: 80 1f 00 10 lwz r0,16(r31)
ffc0a490: 57 bd 07 7a rlwinm r29,r29,0,29,29
if ( state != STATES_TRANSIENT ) {
ffc0a494: 2f 80 00 04 cmpwi cr7,r0,4
ffc0a498: 41 9e 00 38 beq- cr7,ffc0a4d0 <_Thread_Change_priority+0x90>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
ffc0a49c: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0a4a0: 40 9e 00 0c bne- cr7,ffc0a4ac <_Thread_Change_priority+0x6c><== NEVER TAKEN
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
ffc0a4a4: 54 09 07 b8 rlwinm r9,r0,0,30,28
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
ffc0a4a8: 91 3f 00 10 stw r9,16(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a4ac: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
ffc0a4b0: 3d 20 00 03 lis r9,3
ffc0a4b4: 61 29 be e0 ori r9,r9,48864
ffc0a4b8: 7c 0b 48 39 and. r11,r0,r9
ffc0a4bc: 41 a2 00 94 beq+ ffc0a550 <_Thread_Change_priority+0x110>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
ffc0a4c0: 80 7f 00 44 lwz r3,68(r31)
ffc0a4c4: 7f e4 fb 78 mr r4,r31
ffc0a4c8: 48 00 0c 9d bl ffc0b164 <_Thread_queue_Requeue>
ffc0a4cc: 48 00 00 84 b ffc0a550 <_Thread_Change_priority+0x110>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
ffc0a4d0: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0a4d4: 40 9e 00 30 bne- cr7,ffc0a504 <_Thread_Change_priority+0xc4><== NEVER TAKEN
* 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 );
if ( prepend_it )
ffc0a4d8: 2f 9e 00 00 cmpwi cr7,r30,0
* 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 );
ffc0a4dc: 93 bf 00 10 stw r29,16(r31)
ffc0a4e0: 3d 20 00 00 lis r9,0
ffc0a4e4: 39 29 20 e0 addi r9,r9,8416
if ( prepend_it )
ffc0a4e8: 41 9e 00 0c beq- cr7,ffc0a4f4 <_Thread_Change_priority+0xb4>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
ffc0a4ec: 80 09 00 28 lwz r0,40(r9)
ffc0a4f0: 48 00 00 08 b ffc0a4f8 <_Thread_Change_priority+0xb8>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
ffc0a4f4: 80 09 00 24 lwz r0,36(r9)
ffc0a4f8: 7f e3 fb 78 mr r3,r31
ffc0a4fc: 7c 09 03 a6 mtctr r0
ffc0a500: 4e 80 04 21 bctrl
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc0a504: 7c 00 00 a6 mfmsr r0
ffc0a508: 7f 80 01 24 mtmsr r28
ffc0a50c: 7c 00 01 24 mtmsr r0
* This kernel routine implements the scheduling decision logic for
* the scheduler. It does NOT dispatch.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
{
_Scheduler.Operations.schedule();
ffc0a510: 3d 20 00 00 lis r9,0
ffc0a514: 80 09 20 e8 lwz r0,8424(r9)
ffc0a518: 7c 09 03 a6 mtctr r0
ffc0a51c: 4e 80 04 21 bctrl
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
ffc0a520: 3d 20 00 00 lis r9,0
ffc0a524: 39 29 2d b8 addi r9,r9,11704
ffc0a528: 81 69 00 0c lwz r11,12(r9)
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Scheduler_Schedule();
if ( !_Thread_Is_executing_also_the_heir() &&
ffc0a52c: 80 09 00 10 lwz r0,16(r9)
ffc0a530: 7f 8b 00 00 cmpw cr7,r11,r0
ffc0a534: 41 9e 00 18 beq- cr7,ffc0a54c <_Thread_Change_priority+0x10c>
ffc0a538: 88 0b 00 74 lbz r0,116(r11)
ffc0a53c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a540: 41 9e 00 0c beq- cr7,ffc0a54c <_Thread_Change_priority+0x10c>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
ffc0a544: 38 00 00 01 li r0,1
ffc0a548: 98 09 00 18 stb r0,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a54c: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
}
ffc0a550: 39 61 00 20 addi r11,r1,32
ffc0a554: 4b ff 5f d4 b ffc00528 <_restgpr_28_x>
ffc0a770 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0a770: 94 21 ff e8 stwu r1,-24(r1)
ffc0a774: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0a778: 38 81 00 08 addi r4,r1,8
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0a77c: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0a780: 48 00 01 d1 bl ffc0a950 <_Thread_Get>
switch ( location ) {
ffc0a784: 80 01 00 08 lwz r0,8(r1)
ffc0a788: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a78c: 40 9e 00 24 bne- cr7,ffc0a7b0 <_Thread_Delay_ended+0x40><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
ffc0a790: 3c 80 10 00 lis r4,4096
ffc0a794: 60 84 00 18 ori r4,r4,24
ffc0a798: 4b ff fd c1 bl ffc0a558 <_Thread_Clear_state>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
ffc0a79c: 3d 20 00 00 lis r9,0
ffc0a7a0: 81 69 27 c8 lwz r11,10184(r9)
ffc0a7a4: 38 0b ff ff addi r0,r11,-1
ffc0a7a8: 90 09 27 c8 stw r0,10184(r9)
return _Thread_Dispatch_disable_level;
ffc0a7ac: 80 09 27 c8 lwz r0,10184(r9)
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
ffc0a7b0: 80 01 00 1c lwz r0,28(r1)
ffc0a7b4: 38 21 00 18 addi r1,r1,24
ffc0a7b8: 7c 08 03 a6 mtlr r0
ffc0a7bc: 4e 80 00 20 blr
ffc0a7c0 <_Thread_Dispatch>:
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc0a7c0: 3d 20 00 00 lis r9,0
* INTERRUPT LATENCY:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
ffc0a7c4: 94 21 ff c8 stwu r1,-56(r1)
ffc0a7c8: 7c 08 02 a6 mflr r0
ffc0a7cc: 81 69 27 c8 lwz r11,10184(r9)
ffc0a7d0: 90 01 00 3c stw r0,60(r1)
ffc0a7d4: 38 0b 00 01 addi r0,r11,1
ffc0a7d8: 90 09 27 c8 stw r0,10184(r9)
ffc0a7dc: bf 21 00 1c stmw r25,28(r1)
return _Thread_Dispatch_disable_level;
ffc0a7e0: 80 09 27 c8 lwz r0,10184(r9)
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
ffc0a7e4: 3f 80 00 00 lis r28,0
ffc0a7e8: 3b bc 2d b8 addi r29,r28,11704
ffc0a7ec: 83 fd 00 0c lwz r31,12(r29)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a7f0: 7c 00 00 a6 mfmsr r0
ffc0a7f4: 7d 30 42 a6 mfsprg r9,0
ffc0a7f8: 7c 09 48 78 andc r9,r0,r9
ffc0a7fc: 7d 20 01 24 mtmsr r9
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_necessary = false;
ffc0a800: 3b 20 00 00 li r25,0
#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;
ffc0a804: 3f 40 00 00 lis r26,0
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
ffc0a808: 3b bd 00 1c addi r29,r29,28
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0a80c: 3f 60 00 00 lis r27,0
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
ffc0a810: 48 00 00 d8 b ffc0a8e8 <_Thread_Dispatch+0x128>
heir = _Thread_Heir;
ffc0a814: 83 c9 00 10 lwz r30,16(r9)
_Thread_Dispatch_necessary = false;
ffc0a818: 9b 29 00 18 stb r25,24(r9)
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
ffc0a81c: 7f 9e f8 00 cmpw cr7,r30,r31
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_necessary = false;
_Thread_Executing = heir;
ffc0a820: 93 c9 00 0c stw r30,12(r9)
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
ffc0a824: 41 9e 00 d4 beq- cr7,ffc0a8f8 <_Thread_Dispatch+0x138>
*/
#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 )
ffc0a828: 81 3e 00 7c lwz r9,124(r30)
ffc0a82c: 2f 89 00 01 cmpwi cr7,r9,1
ffc0a830: 40 be 00 0c bne+ cr7,ffc0a83c <_Thread_Dispatch+0x7c>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0a834: 81 3a 27 c4 lwz r9,10180(r26)
ffc0a838: 91 3e 00 78 stw r9,120(r30)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a83c: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
ffc0a840: 38 61 00 10 addi r3,r1,16
ffc0a844: 48 00 33 7d bl ffc0dbc0 <_TOD_Get_uptime>
_Timestamp_Subtract(
ffc0a848: 7f a3 eb 78 mr r3,r29
ffc0a84c: 38 81 00 10 addi r4,r1,16
ffc0a850: 38 a1 00 08 addi r5,r1,8
ffc0a854: 48 00 0c 85 bl ffc0b4d8 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
ffc0a858: 38 7f 00 84 addi r3,r31,132
ffc0a85c: 38 81 00 08 addi r4,r1,8
ffc0a860: 48 00 0c 1d bl ffc0b47c <_Timespec_Add_to>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0a864: 81 3b 27 dc lwz r9,10204(r27)
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
ffc0a868: 81 41 00 10 lwz r10,16(r1)
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0a86c: 2f 89 00 00 cmpwi cr7,r9,0
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
ffc0a870: 81 61 00 14 lwz r11,20(r1)
ffc0a874: 91 5d 00 00 stw r10,0(r29)
ffc0a878: 91 7d 00 04 stw r11,4(r29)
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0a87c: 41 9e 00 14 beq- cr7,ffc0a890 <_Thread_Dispatch+0xd0> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
ffc0a880: 80 09 00 00 lwz r0,0(r9)
ffc0a884: 90 1f 01 28 stw r0,296(r31)
*_Thread_libc_reent = heir->libc_reent;
ffc0a888: 80 1e 01 28 lwz r0,296(r30)
ffc0a88c: 90 09 00 00 stw r0,0(r9)
}
_User_extensions_Thread_switch( executing, heir );
ffc0a890: 7f e3 fb 78 mr r3,r31
ffc0a894: 7f c4 f3 78 mr r4,r30
ffc0a898: 48 00 0f 69 bl ffc0b800 <_User_extensions_Thread_switch>
* operations.
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE )
if ( executing->fp_context != NULL )
ffc0a89c: 80 1f 01 24 lwz r0,292(r31)
ffc0a8a0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a8a4: 41 9e 00 0c beq- cr7,ffc0a8b0 <_Thread_Dispatch+0xf0>
_Context_Save_fp( &executing->fp_context );
ffc0a8a8: 38 7f 01 24 addi r3,r31,292
ffc0a8ac: 48 00 fb 55 bl ffc1a400 <_CPU_Context_save_fp>
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
ffc0a8b0: 38 7f 00 c4 addi r3,r31,196
ffc0a8b4: 38 9e 00 c4 addi r4,r30,196
ffc0a8b8: 48 00 fc c9 bl ffc1a580 <_CPU_Context_switch>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
_Context_Restore_fp( &executing->fp_context );
_Thread_Allocated_fp = executing;
}
#else
if ( executing->fp_context != NULL )
ffc0a8bc: 80 1f 01 24 lwz r0,292(r31)
ffc0a8c0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a8c4: 41 9e 00 0c beq- cr7,ffc0a8d0 <_Thread_Dispatch+0x110>
_Context_Restore_fp( &executing->fp_context );
ffc0a8c8: 38 7f 01 24 addi r3,r31,292
ffc0a8cc: 48 00 fb f5 bl ffc1a4c0 <_CPU_Context_restore_fp>
#endif
#endif
executing = _Thread_Executing;
ffc0a8d0: 39 3c 2d b8 addi r9,r28,11704
ffc0a8d4: 83 e9 00 0c lwz r31,12(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a8d8: 7c 00 00 a6 mfmsr r0
ffc0a8dc: 7d 30 42 a6 mfsprg r9,0
ffc0a8e0: 7c 09 48 78 andc r9,r0,r9
ffc0a8e4: 7d 20 01 24 mtmsr r9
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
ffc0a8e8: 39 3c 2d b8 addi r9,r28,11704
ffc0a8ec: 89 69 00 18 lbz r11,24(r9)
ffc0a8f0: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0a8f4: 40 9e ff 20 bne+ cr7,ffc0a814 <_Thread_Dispatch+0x54>
* This routine sets thread dispatch level to the
* value passed in.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value)
{
_Thread_Dispatch_disable_level = value;
ffc0a8f8: 39 60 00 00 li r11,0
ffc0a8fc: 3d 20 00 00 lis r9,0
ffc0a900: 91 69 27 c8 stw r11,10184(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a904: 7c 00 01 24 mtmsr r0
post_switch:
_Thread_Dispatch_set_disable_level( 0 );
_ISR_Enable( level );
_API_extensions_Run_postswitch();
ffc0a908: 4b ff e0 c1 bl ffc089c8 <_API_extensions_Run_postswitch>
}
ffc0a90c: 39 61 00 38 addi r11,r1,56
ffc0a910: 4b ff 5c 0c b ffc0051c <_restgpr_25_x>
ffc0f9f0 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc0f9f0: 94 21 ff f0 stwu r1,-16(r1)
ffc0f9f4: 7c 08 02 a6 mflr r0
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
ffc0f9f8: 3d 20 00 00 lis r9,0
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc0f9fc: 90 01 00 14 stw r0,20(r1)
ffc0fa00: bf c1 00 08 stmw r30,8(r1)
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
ffc0fa04: 83 e9 2d c4 lwz r31,11716(r9)
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
ffc0fa08: 81 3f 00 ac lwz r9,172(r31)
}
static inline void _CPU_ISR_Set_level( uint32_t level )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc0fa0c: 38 00 00 00 li r0,0
ffc0fa10: 7c 00 00 a6 mfmsr r0
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
ffc0fa14: 71 2b 00 01 andi. r11,r9,1
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
__asm__ volatile (
ffc0fa18: 7d 30 42 a6 mfsprg r9,0
ffc0fa1c: 40 82 00 0c bne- ffc0fa28 <_Thread_Handler+0x38>
msr |= ppc_interrupt_get_disable_mask();
ffc0fa20: 7d 20 03 78 or r0,r9,r0
ffc0fa24: 48 00 00 08 b ffc0fa2c <_Thread_Handler+0x3c>
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
ffc0fa28: 7c 00 48 78 andc r0,r0,r9
}
_CPU_MSR_SET(msr);
ffc0fa2c: 7c 00 01 24 mtmsr r0
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
ffc0fa30: 3d 20 00 00 lis r9,0
ffc0fa34: 8b c9 29 80 lbz r30,10624(r9)
doneConstructors = 1;
ffc0fa38: 38 00 00 01 li r0,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 );
ffc0fa3c: 7f e3 fb 78 mr r3,r31
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
doneConstructors = 1;
ffc0fa40: 98 09 29 80 stb r0,10624(r9)
/*
* 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 );
ffc0fa44: 4b ff bb 89 bl ffc0b5cc <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
ffc0fa48: 4b ff ae cd bl ffc0a914 <_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) */ {
ffc0fa4c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0fa50: 40 be 00 08 bne+ cr7,ffc0fa58 <_Thread_Handler+0x68>
INIT_NAME ();
ffc0fa54: 48 00 b6 e9 bl ffc1b13c <_init>
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
ffc0fa58: 80 1f 00 94 lwz r0,148(r31)
ffc0fa5c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0fa60: 40 be 00 18 bne+ cr7,ffc0fa78 <_Thread_Handler+0x88> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
ffc0fa64: 80 1f 00 90 lwz r0,144(r31)
ffc0fa68: 80 7f 00 9c lwz r3,156(r31)
ffc0fa6c: 7c 09 03 a6 mtctr r0
ffc0fa70: 4e 80 04 21 bctrl
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
ffc0fa74: 90 7f 00 28 stw r3,40(r31)
* 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 );
ffc0fa78: 7f e3 fb 78 mr r3,r31
ffc0fa7c: 4b ff bb a5 bl ffc0b620 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
ffc0fa80: 38 60 00 00 li r3,0
ffc0fa84: 38 80 00 01 li r4,1
ffc0fa88: 38 a0 00 05 li r5,5
ffc0fa8c: 4b ff 9a d5 bl ffc09560 <_Internal_error_Occurred>
ffc0aa00 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0aa00: 94 21 ff d0 stwu r1,-48(r1)
ffc0aa04: 7c 08 02 a6 mflr r0
ffc0aa08: be e1 00 0c stmw r23,12(r1)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0aa0c: 3b 20 00 00 li r25,0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0aa10: 7d 3a 4b 78 mr r26,r9
ffc0aa14: 90 01 00 34 stw r0,52(r1)
ffc0aa18: 7c 7e 1b 78 mr r30,r3
ffc0aa1c: 7c 9f 23 78 mr r31,r4
ffc0aa20: 81 21 00 40 lwz r9,64(r1)
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
ffc0aa24: 7c 83 23 78 mr r3,r4
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0aa28: 93 24 01 2c stw r25,300(r4)
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0aa2c: 7c dd 33 78 mr r29,r6
ffc0aa30: 7c fc 3b 78 mr r28,r7
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0aa34: 93 24 01 30 stw r25,304(r4)
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0aa38: 7d 1b 43 78 mr r27,r8
ffc0aa3c: 7d 57 53 78 mr r23,r10
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
the_thread->libc_reent = NULL;
ffc0aa40: 93 24 01 28 stw r25,296(r4)
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
ffc0aa44: 7c c4 33 78 mr r4,r6
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0aa48: 83 09 00 00 lwz r24,0(r9)
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
ffc0aa4c: 48 00 08 b5 bl ffc0b300 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
ffc0aa50: 2c 03 00 00 cmpwi r3,0
return false; /* stack allocation failed */
ffc0aa54: 38 00 00 00 li r0,0
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
ffc0aa58: 41 82 01 80 beq- ffc0abd8 <_Thread_Initialize+0x1d8>
ffc0aa5c: 7f 83 e8 40 cmplw cr7,r3,r29
ffc0aa60: 41 9c 01 78 blt- cr7,ffc0abd8 <_Thread_Initialize+0x1d8><== NEVER TAKEN
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
ffc0aa64: 2f 9c 00 00 cmpwi cr7,r28,0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
ffc0aa68: 80 1f 00 c0 lwz r0,192(r31)
the_stack->size = size;
ffc0aa6c: 90 7f 00 b4 stw r3,180(r31)
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
ffc0aa70: 90 1f 00 b8 stw r0,184(r31)
ffc0aa74: 41 be 00 14 beq+ cr7,ffc0aa88 <_Thread_Initialize+0x88>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
ffc0aa78: 38 60 01 08 li r3,264
ffc0aa7c: 48 00 10 f1 bl ffc0bb6c <_Workspace_Allocate>
if ( !fp_area )
ffc0aa80: 7c 79 1b 79 mr. r25,r3
ffc0aa84: 41 82 01 10 beq- ffc0ab94 <_Thread_Initialize+0x194>
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0aa88: 3d 20 00 00 lis r9,0
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
ffc0aa8c: 93 3f 01 24 stw r25,292(r31)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0aa90: 38 00 00 00 li r0,0
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0aa94: 80 69 27 e8 lwz r3,10216(r9)
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
ffc0aa98: 3b a0 00 00 li r29,0
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
the_thread->Start.fp_context = fp_area;
ffc0aa9c: 93 3f 00 bc stw r25,188(r31)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0aaa0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0aaa4: 90 1f 00 50 stw r0,80(r31)
the_watchdog->routine = routine;
ffc0aaa8: 90 1f 00 64 stw r0,100(r31)
the_watchdog->id = id;
ffc0aaac: 90 1f 00 68 stw r0,104(r31)
the_watchdog->user_data = user_data;
ffc0aab0: 90 1f 00 6c stw r0,108(r31)
ffc0aab4: 41 be 00 18 beq+ cr7,ffc0aacc <_Thread_Initialize+0xcc>
extensions_area = _Workspace_Allocate(
ffc0aab8: 38 63 00 01 addi r3,r3,1
ffc0aabc: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc0aac0: 48 00 10 ad bl ffc0bb6c <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
ffc0aac4: 7c 7d 1b 79 mr. r29,r3
ffc0aac8: 41 82 00 d0 beq- ffc0ab98 <_Thread_Initialize+0x198>
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
ffc0aacc: 2f 9d 00 00 cmpwi cr7,r29,0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
ffc0aad0: 93 bf 01 34 stw r29,308(r31)
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
ffc0aad4: 41 9e 00 30 beq- cr7,ffc0ab04 <_Thread_Initialize+0x104>
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
ffc0aad8: 3d 20 00 00 lis r9,0
ffc0aadc: 81 69 27 e8 lwz r11,10216(r9)
the_thread->extensions[i] = NULL;
ffc0aae0: 38 00 00 00 li r0,0
* 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++ )
ffc0aae4: 39 20 00 00 li r9,0
ffc0aae8: 48 00 00 14 b ffc0aafc <_Thread_Initialize+0xfc>
the_thread->extensions[i] = NULL;
ffc0aaec: 81 1f 01 34 lwz r8,308(r31)
ffc0aaf0: 55 2a 10 3a rlwinm r10,r9,2,0,29
* 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++ )
ffc0aaf4: 39 29 00 01 addi r9,r9,1
the_thread->extensions[i] = NULL;
ffc0aaf8: 7c 08 51 2e stwx r0,r8,r10
* 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++ )
ffc0aafc: 7f 89 58 40 cmplw cr7,r9,r11
ffc0ab00: 40 9d ff ec ble+ cr7,ffc0aaec <_Thread_Initialize+0xec>
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
ffc0ab04: 80 01 00 38 lwz r0,56(r1)
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
ffc0ab08: 3d 20 00 00 lis r9,0
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
ffc0ab0c: 3b 80 00 00 li r28,0
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
ffc0ab10: 9b 5f 00 a0 stb r26,160(r31)
ffc0ab14: 7f e3 fb 78 mr r3,r31
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
ffc0ab18: 90 1f 00 a8 stw r0,168(r31)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
ffc0ab1c: 80 01 00 3c lwz r0,60(r1)
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
ffc0ab20: 92 ff 00 a4 stw r23,164(r31)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
ffc0ab24: 90 1f 00 ac stw r0,172(r31)
the_thread->current_state = STATES_DORMANT;
ffc0ab28: 38 00 00 01 li r0,1
ffc0ab2c: 90 1f 00 10 stw r0,16(r31)
ffc0ab30: 80 09 20 f8 lwz r0,8440(r9)
the_thread->Wait.queue = NULL;
ffc0ab34: 93 9f 00 44 stw r28,68(r31)
ffc0ab38: 7c 09 03 a6 mtctr r0
the_thread->resource_count = 0;
ffc0ab3c: 93 9f 00 1c stw r28,28(r31)
the_thread->real_priority = priority;
ffc0ab40: 93 7f 00 18 stw r27,24(r31)
the_thread->Start.initial_priority = priority;
ffc0ab44: 93 7f 00 b0 stw r27,176(r31)
ffc0ab48: 4e 80 04 21 bctrl
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
ffc0ab4c: 7c 7a 1b 79 mr. r26,r3
ffc0ab50: 41 82 00 4c beq- ffc0ab9c <_Thread_Initialize+0x19c>
goto failed;
_Thread_Set_priority( the_thread, priority );
ffc0ab54: 7f e3 fb 78 mr r3,r31
ffc0ab58: 7f 64 db 78 mr r4,r27
ffc0ab5c: 48 00 06 c5 bl ffc0b220 <_Thread_Set_priority>
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
ffc0ab60: a0 1f 00 0a lhz r0,10(r31)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc0ab64: 81 3e 00 1c lwz r9,28(r30)
* 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 );
ffc0ab68: 7f e3 fb 78 mr r3,r31
ffc0ab6c: 54 00 10 3a rlwinm r0,r0,2,0,29
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
ffc0ab70: 93 9f 00 84 stw r28,132(r31)
ffc0ab74: 93 9f 00 88 stw r28,136(r31)
ffc0ab78: 7f e9 01 2e stwx r31,r9,r0
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc0ab7c: 93 1f 00 0c stw r24,12(r31)
* 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 );
ffc0ab80: 48 00 0b 51 bl ffc0b6d0 <_User_extensions_Thread_create>
if ( extension_status )
return true;
ffc0ab84: 38 00 00 01 li r0,1
* 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 );
if ( extension_status )
ffc0ab88: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ab8c: 41 be 00 10 beq+ cr7,ffc0ab9c <_Thread_Initialize+0x19c>
ffc0ab90: 48 00 00 48 b ffc0abd8 <_Thread_Initialize+0x1d8>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
ffc0ab94: 3b a0 00 00 li r29,0
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
ffc0ab98: 3b 40 00 00 li r26,0
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
ffc0ab9c: 80 7f 01 28 lwz r3,296(r31)
ffc0aba0: 48 00 10 01 bl ffc0bba0 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
ffc0aba4: 80 7f 01 2c lwz r3,300(r31)
ffc0aba8: 48 00 0f f9 bl ffc0bba0 <_Workspace_Free>
ffc0abac: 80 7f 01 30 lwz r3,304(r31)
ffc0abb0: 48 00 0f f1 bl ffc0bba0 <_Workspace_Free>
_Workspace_Free( extensions_area );
ffc0abb4: 7f a3 eb 78 mr r3,r29
ffc0abb8: 48 00 0f e9 bl ffc0bba0 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
ffc0abbc: 7f 23 cb 78 mr r3,r25
ffc0abc0: 48 00 0f e1 bl ffc0bba0 <_Workspace_Free>
#endif
_Workspace_Free( sched );
ffc0abc4: 7f 43 d3 78 mr r3,r26
ffc0abc8: 48 00 0f d9 bl ffc0bba0 <_Workspace_Free>
_Thread_Stack_Free( the_thread );
ffc0abcc: 7f e3 fb 78 mr r3,r31
ffc0abd0: 48 00 07 a5 bl ffc0b374 <_Thread_Stack_Free>
return false;
ffc0abd4: 38 00 00 00 li r0,0
}
ffc0abd8: 39 61 00 30 addi r11,r1,48
ffc0abdc: 7c 03 03 78 mr r3,r0
ffc0abe0: 4b ff 59 34 b ffc00514 <_restgpr_23_x>
ffc0bb9c <_Thread_Restart>:
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
ffc0bb9c: 94 21 ff e8 stwu r1,-24(r1)
ffc0bba0: 7c 08 02 a6 mflr r0
ffc0bba4: 90 01 00 1c stw r0,28(r1)
_Thread_Restart_self();
return true;
}
return false;
ffc0bba8: 38 00 00 00 li r0,0
*/
RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
States_Control the_states
)
{
return (the_states & STATES_DORMANT);
ffc0bbac: 81 23 00 10 lwz r9,16(r3)
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
ffc0bbb0: bf c1 00 10 stmw r30,16(r1)
ffc0bbb4: 7c 7f 1b 78 mr r31,r3
if ( !_States_Is_dormant( the_thread->current_state ) ) {
ffc0bbb8: 71 2b 00 01 andi. r11,r9,1
ffc0bbbc: 40 a2 00 70 bne+ ffc0bc2c <_Thread_Restart+0x90>
_Thread_Set_transient( the_thread );
ffc0bbc0: 90 81 00 08 stw r4,8(r1)
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc0bbc4: 3f c0 00 00 lis r30,0
ffc0bbc8: 3b de 2d d8 addi r30,r30,11736
ffc0bbcc: 90 a1 00 0c stw r5,12(r1)
ffc0bbd0: 48 00 00 f5 bl ffc0bcc4 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
ffc0bbd4: 7f e3 fb 78 mr r3,r31
ffc0bbd8: 80 81 00 08 lwz r4,8(r1)
ffc0bbdc: 80 a1 00 0c lwz r5,12(r1)
ffc0bbe0: 48 00 31 d1 bl ffc0edb0 <_Thread_Reset>
_Thread_Load_environment( the_thread );
ffc0bbe4: 7f e3 fb 78 mr r3,r31
ffc0bbe8: 48 00 2e 8d bl ffc0ea74 <_Thread_Load_environment>
_Thread_Ready( the_thread );
ffc0bbec: 7f e3 fb 78 mr r3,r31
ffc0bbf0: 48 00 31 79 bl ffc0ed68 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
ffc0bbf4: 7f e3 fb 78 mr r3,r31
ffc0bbf8: 48 00 05 c1 bl ffc0c1b8 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
ffc0bbfc: 81 3e 00 0c lwz r9,12(r30)
_Thread_Restart_self();
return true;
ffc0bc00: 38 00 00 01 li r0,1
_Thread_Ready( the_thread );
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
ffc0bc04: 7f 9f 48 00 cmpw cr7,r31,r9
ffc0bc08: 40 be 00 24 bne+ cr7,ffc0bc2c <_Thread_Restart+0x90>
*/
RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
{
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
ffc0bc0c: 80 1f 01 24 lwz r0,292(r31)
ffc0bc10: 2f 80 00 00 cmpwi cr7,r0,0
ffc0bc14: 41 9e 00 0c beq- cr7,ffc0bc20 <_Thread_Restart+0x84> <== NEVER TAKEN
_Context_Restore_fp( &_Thread_Executing->fp_context );
ffc0bc18: 38 7f 01 24 addi r3,r31,292
ffc0bc1c: 48 00 f3 a5 bl ffc1afc0 <_CPU_Context_restore_fp>
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
ffc0bc20: 80 7e 00 0c lwz r3,12(r30)
ffc0bc24: 38 63 00 c4 addi r3,r3,196
ffc0bc28: 48 00 f5 59 bl ffc1b180 <_CPU_Context_restore>
return true;
}
return false;
}
ffc0bc2c: 39 61 00 18 addi r11,r1,24
ffc0bc30: 7c 03 03 78 mr r3,r0
ffc0bc34: 4b ff 51 70 b ffc00da4 <_restgpr_30_x>
ffc0b164 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
ffc0b164: 94 21 ff d8 stwu r1,-40(r1)
ffc0b168: 7c 08 02 a6 mflr r0
ffc0b16c: bf a1 00 1c stmw r29,28(r1)
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
ffc0b170: 7c 7f 1b 79 mr. r31,r3
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
ffc0b174: 7c 9e 23 78 mr r30,r4
ffc0b178: 90 01 00 2c stw r0,44(r1)
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
ffc0b17c: 41 82 00 54 beq- ffc0b1d0 <_Thread_queue_Requeue+0x6c> <== 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 ) {
ffc0b180: 80 1f 00 34 lwz r0,52(r31)
ffc0b184: 2f 80 00 01 cmpwi cr7,r0,1
ffc0b188: 40 be 00 48 bne+ cr7,ffc0b1d0 <_Thread_queue_Requeue+0x6c><== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0b18c: 7f a0 00 a6 mfmsr r29
ffc0b190: 7d 30 42 a6 mfsprg r9,0
ffc0b194: 7f a9 48 78 andc r9,r29,r9
ffc0b198: 7d 20 01 24 mtmsr r9
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
ffc0b19c: 3d 60 00 03 lis r11,3
ffc0b1a0: 81 24 00 10 lwz r9,16(r4)
ffc0b1a4: 61 6b be e0 ori r11,r11,48864
ffc0b1a8: 7d 6a 48 39 and. r10,r11,r9
ffc0b1ac: 41 a2 00 20 beq+ ffc0b1cc <_Thread_queue_Requeue+0x68> <== NEVER TAKEN
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;
ffc0b1b0: 90 1f 00 30 stw r0,48(r31)
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
ffc0b1b4: 38 a0 00 01 li r5,1
ffc0b1b8: 48 00 2f e1 bl ffc0e198 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
ffc0b1bc: 7f e3 fb 78 mr r3,r31
ffc0b1c0: 7f c4 f3 78 mr r4,r30
ffc0b1c4: 38 a1 00 08 addi r5,r1,8
ffc0b1c8: 4b ff fd 19 bl ffc0aee0 <_Thread_queue_Enqueue_priority>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0b1cc: 7f a0 01 24 mtmsr r29
}
_ISR_Enable( level );
}
}
ffc0b1d0: 39 61 00 28 addi r11,r1,40
ffc0b1d4: 4b ff 53 58 b ffc0052c <_restgpr_29_x>
ffc0b1d8 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0b1d8: 94 21 ff e8 stwu r1,-24(r1)
ffc0b1dc: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0b1e0: 38 81 00 08 addi r4,r1,8
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0b1e4: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0b1e8: 4b ff f7 69 bl ffc0a950 <_Thread_Get>
switch ( location ) {
ffc0b1ec: 80 01 00 08 lwz r0,8(r1)
ffc0b1f0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0b1f4: 40 9e 00 1c bne- cr7,ffc0b210 <_Thread_queue_Timeout+0x38><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
ffc0b1f8: 48 00 30 91 bl ffc0e288 <_Thread_queue_Process_timeout>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
ffc0b1fc: 3d 20 00 00 lis r9,0
ffc0b200: 81 69 27 c8 lwz r11,10184(r9)
ffc0b204: 38 0b ff ff addi r0,r11,-1
ffc0b208: 90 09 27 c8 stw r0,10184(r9)
return _Thread_Dispatch_disable_level;
ffc0b20c: 80 09 27 c8 lwz r0,10184(r9)
_Thread_Unnest_dispatch();
break;
}
}
ffc0b210: 80 01 00 1c lwz r0,28(r1)
ffc0b214: 38 21 00 18 addi r1,r1,24
ffc0b218: 7c 08 03 a6 mtlr r0
ffc0b21c: 4e 80 00 20 blr
ffc18de8 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc18de8: 94 21 ff 98 stwu r1,-104(r1)
ffc18dec: 7c 08 02 a6 mflr r0
ffc18df0: be 21 00 2c stmw r17,44(r1)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc18df4: 3a 21 00 14 addi r17,r1,20
ffc18df8: 3a 81 00 18 addi r20,r1,24
ffc18dfc: 90 01 00 6c stw r0,108(r1)
ffc18e00: 3b 61 00 0c addi r27,r1,12
head->previous = NULL;
ffc18e04: 38 00 00 00 li r0,0
tail->previous = head;
ffc18e08: 3b 81 00 08 addi r28,r1,8
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc18e0c: 92 81 00 14 stw r20,20(r1)
ffc18e10: 7c 7f 1b 78 mr r31,r3
head->previous = NULL;
ffc18e14: 90 01 00 18 stw r0,24(r1)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
ffc18e18: 3e 40 00 00 lis r18,0
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc18e1c: 3b 43 00 30 addi r26,r3,48
tail->previous = head;
ffc18e20: 92 21 00 1c stw r17,28(r1)
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ffc18e24: 3e 60 00 00 lis r19,0
/*
* 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 );
ffc18e28: 3b a3 00 68 addi r29,r3,104
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc18e2c: 93 61 00 08 stw r27,8(r1)
* 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;
ffc18e30: 3a a0 00 00 li r21,0
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
ffc18e34: 3a c0 00 00 li r22,0
head->previous = NULL;
ffc18e38: 90 01 00 0c stw r0,12(r1)
_Thread_Set_state( ts->thread, STATES_DELAYING );
_Timer_server_Reset_interval_system_watchdog( ts );
_Timer_server_Reset_tod_system_watchdog( ts );
_Thread_Enable_dispatch();
ts->active = true;
ffc18e3c: 3a e0 00 01 li r23,1
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
ffc18e40: 3b 03 00 08 addi r24,r3,8
tail->previous = head;
ffc18e44: 93 81 00 10 stw r28,16(r1)
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
ffc18e48: 3b 23 00 40 addi r25,r3,64
{
/*
* 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;
ffc18e4c: 92 3f 00 78 stw r17,120(r31)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
ffc18e50: 80 12 28 d0 lwz r0,10448(r18)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc18e54: 7f 85 e3 78 mr r5,r28
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
ffc18e58: 80 9f 00 3c lwz r4,60(r31)
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc18e5c: 7f 43 d3 78 mr r3,r26
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
ffc18e60: 90 1f 00 3c stw r0,60(r31)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc18e64: 7c 84 00 50 subf r4,r4,r0
ffc18e68: 48 00 49 5d bl ffc1d7c4 <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ffc18e6c: 83 d3 28 b4 lwz r30,10420(r19)
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
ffc18e70: 80 bf 00 74 lwz r5,116(r31)
/*
* 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 ) {
ffc18e74: 7f 9e 28 40 cmplw cr7,r30,r5
ffc18e78: 40 bd 00 18 ble+ cr7,ffc18e90 <_Timer_server_Body+0xa8>
/*
* 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 );
ffc18e7c: 7c 85 f0 50 subf r4,r5,r30
ffc18e80: 7f a3 eb 78 mr r3,r29
ffc18e84: 7f 85 e3 78 mr r5,r28
ffc18e88: 48 00 49 3d bl ffc1d7c4 <_Watchdog_Adjust_to_chain>
ffc18e8c: 48 00 00 18 b ffc18ea4 <_Timer_server_Body+0xbc>
} else if ( snapshot < last_snapshot ) {
ffc18e90: 40 bc 00 14 bge+ cr7,ffc18ea4 <_Timer_server_Body+0xbc>
/*
* 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 );
ffc18e94: 7f a3 eb 78 mr r3,r29
ffc18e98: 38 80 00 01 li r4,1
ffc18e9c: 7c be 28 50 subf r5,r30,r5
ffc18ea0: 48 00 48 6d bl ffc1d70c <_Watchdog_Adjust>
}
watchdogs->last_snapshot = snapshot;
ffc18ea4: 93 df 00 74 stw r30,116(r31)
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
ffc18ea8: 80 7f 00 78 lwz r3,120(r31)
ffc18eac: 48 00 0b 7d bl ffc19a28 <_Chain_Get>
if ( timer == NULL ) {
ffc18eb0: 7c 7e 1b 79 mr. r30,r3
ffc18eb4: 41 82 00 2c beq- ffc18ee0 <_Timer_server_Body+0xf8> <== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc18eb8: 80 1e 00 38 lwz r0,56(r30) <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
ffc18ebc: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc18ec0: 2f 80 00 01 cmpwi cr7,r0,1 <== NOT EXECUTED
ffc18ec4: 41 9e 00 10 beq- cr7,ffc18ed4 <_Timer_server_Body+0xec> <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc18ec8: 2f 80 00 03 cmpwi cr7,r0,3 <== NOT EXECUTED
ffc18ecc: 40 9e ff dc bne+ cr7,ffc18ea8 <_Timer_server_Body+0xc0> <== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
ffc18ed0: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc18ed4: 38 9e 00 10 addi r4,r30,16 <== NOT EXECUTED
ffc18ed8: 48 00 49 9d bl ffc1d874 <_Watchdog_Insert> <== NOT EXECUTED
ffc18edc: 4b ff ff cc b ffc18ea8 <_Timer_server_Body+0xc0> <== 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 );
ffc18ee0: 4b ff fe 1d bl ffc18cfc <ppc_interrupt_disable>
if ( _Chain_Is_empty( insert_chain ) ) {
ffc18ee4: 80 01 00 14 lwz r0,20(r1)
ffc18ee8: 7f 80 a0 00 cmpw cr7,r0,r20
ffc18eec: 40 be 00 1c bne+ cr7,ffc18f08 <_Timer_server_Body+0x120><== NEVER TAKEN
ts->insert_chain = NULL;
ffc18ef0: 93 df 00 78 stw r30,120(r31)
ffc18ef4: 7c 60 01 24 mtmsr r3
_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 ) ) {
ffc18ef8: 80 01 00 08 lwz r0,8(r1)
ffc18efc: 7f 80 d8 00 cmpw cr7,r0,r27
ffc18f00: 40 be 00 10 bne+ cr7,ffc18f10 <_Timer_server_Body+0x128>
ffc18f04: 48 00 00 50 b ffc18f54 <_Timer_server_Body+0x16c>
ffc18f08: 7c 60 01 24 mtmsr r3 <== NOT EXECUTED
ffc18f0c: 4b ff ff 44 b ffc18e50 <_Timer_server_Body+0x68> <== NOT EXECUTED
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
ffc18f10: 4b ff fd ed bl ffc18cfc <ppc_interrupt_disable>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc18f14: 81 21 00 08 lwz r9,8(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
ffc18f18: 7f 89 d8 00 cmpw cr7,r9,r27
ffc18f1c: 41 9e 00 30 beq- cr7,ffc18f4c <_Timer_server_Body+0x164>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
ffc18f20: 81 69 00 00 lwz r11,0(r9)
head->next = new_first;
new_first->previous = head;
ffc18f24: 93 8b 00 04 stw r28,4(r11)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
ffc18f28: 91 61 00 08 stw r11,8(r1)
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
ffc18f2c: 92 a9 00 08 stw r21,8(r9)
ffc18f30: 7c 60 01 24 mtmsr r3
/*
* 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 );
ffc18f34: 80 09 00 1c lwz r0,28(r9)
ffc18f38: 80 69 00 20 lwz r3,32(r9)
ffc18f3c: 80 89 00 24 lwz r4,36(r9)
ffc18f40: 7c 09 03 a6 mtctr r0
ffc18f44: 4e 80 04 21 bctrl
}
ffc18f48: 4b ff ff c8 b ffc18f10 <_Timer_server_Body+0x128>
ffc18f4c: 7c 60 01 24 mtmsr r3
ffc18f50: 4b ff fe fc b ffc18e4c <_Timer_server_Body+0x64>
} else {
ts->active = false;
ffc18f54: 9a df 00 7c stb r22,124(r31)
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
ffc18f58: 4b ff fd b9 bl ffc18d10 <_Thread_Disable_dispatch>
_Thread_Set_state( ts->thread, STATES_DELAYING );
ffc18f5c: 80 7f 00 00 lwz r3,0(r31)
ffc18f60: 38 80 00 08 li r4,8
ffc18f64: 48 00 40 cd bl ffc1d030 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
ffc18f68: 7f e3 fb 78 mr r3,r31
ffc18f6c: 4b ff fd bd bl ffc18d28 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
ffc18f70: 7f e3 fb 78 mr r3,r31
ffc18f74: 4b ff fe 15 bl ffc18d88 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
ffc18f78: 48 00 36 e1 bl ffc1c658 <_Thread_Enable_dispatch>
ts->active = true;
ffc18f7c: 9a ff 00 7c stb r23,124(r31)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
ffc18f80: 7f 03 c3 78 mr r3,r24
ffc18f84: 48 00 4a 49 bl ffc1d9cc <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
ffc18f88: 7f 23 cb 78 mr r3,r25
ffc18f8c: 48 00 4a 41 bl ffc1d9cc <_Watchdog_Remove>
ffc18f90: 4b ff fe bc b ffc18e4c <_Timer_server_Body+0x64>
ffc18f94 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
ffc18f94: 94 21 ff f0 stwu r1,-16(r1)
ffc18f98: 7c 08 02 a6 mflr r0
ffc18f9c: 90 01 00 14 stw r0,20(r1)
if ( ts->insert_chain == NULL ) {
ffc18fa0: 80 03 00 78 lwz r0,120(r3)
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
ffc18fa4: bf c1 00 08 stmw r30,8(r1)
ffc18fa8: 7c 7f 1b 78 mr r31,r3
if ( ts->insert_chain == NULL ) {
ffc18fac: 2f 80 00 00 cmpwi cr7,r0,0
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
ffc18fb0: 7c 9e 23 78 mr r30,r4
if ( ts->insert_chain == NULL ) {
ffc18fb4: 40 be 01 00 bne+ cr7,ffc190b4 <_Timer_server_Schedule_operation_method+0x120><== NEVER TAKEN
* is the reference point for the delta chain. Thus if we do not update the
* reference point we have to add DT to the initial delta of the watchdog
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
ffc18fb8: 4b ff fd 59 bl ffc18d10 <_Thread_Disable_dispatch>
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc18fbc: 80 1e 00 38 lwz r0,56(r30)
ffc18fc0: 2f 80 00 01 cmpwi cr7,r0,1
ffc18fc4: 40 be 00 6c bne+ cr7,ffc19030 <_Timer_server_Schedule_operation_method+0x9c>
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
ffc18fc8: 4b ff fd 35 bl ffc18cfc <ppc_interrupt_disable>
snapshot = _Watchdog_Ticks_since_boot;
ffc18fcc: 3d 20 00 00 lis r9,0
ffc18fd0: 80 09 28 d0 lwz r0,10448(r9)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc18fd4: 39 7f 00 34 addi r11,r31,52
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc18fd8: 81 3f 00 30 lwz r9,48(r31)
last_snapshot = ts->Interval_watchdogs.last_snapshot;
ffc18fdc: 81 5f 00 3c lwz r10,60(r31)
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
ffc18fe0: 7f 89 58 00 cmpw cr7,r9,r11
ffc18fe4: 41 9e 00 20 beq- cr7,ffc19004 <_Timer_server_Schedule_operation_method+0x70>
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
ffc18fe8: 81 09 00 10 lwz r8,16(r9)
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
ffc18fec: 7d 4a 00 50 subf r10,r10,r0
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
ffc18ff0: 39 60 00 00 li r11,0
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
ffc18ff4: 7f 88 50 40 cmplw cr7,r8,r10
ffc18ff8: 40 9d 00 08 ble- cr7,ffc19000 <_Timer_server_Schedule_operation_method+0x6c>
delta_interval -= delta;
ffc18ffc: 7d 6a 40 50 subf r11,r10,r8
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
ffc19000: 91 69 00 10 stw r11,16(r9)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
ffc19004: 90 1f 00 3c stw r0,60(r31)
ffc19008: 7c 60 01 24 mtmsr r3
_ISR_Enable( level );
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
ffc1900c: 38 7f 00 30 addi r3,r31,48
ffc19010: 38 9e 00 10 addi r4,r30,16
ffc19014: 48 00 48 61 bl ffc1d874 <_Watchdog_Insert>
if ( !ts->active ) {
ffc19018: 88 1f 00 7c lbz r0,124(r31)
ffc1901c: 2f 80 00 00 cmpwi cr7,r0,0
ffc19020: 40 be 00 8c bne+ cr7,ffc190ac <_Timer_server_Schedule_operation_method+0x118>
_Timer_server_Reset_interval_system_watchdog( ts );
ffc19024: 7f e3 fb 78 mr r3,r31
ffc19028: 4b ff fd 01 bl ffc18d28 <_Timer_server_Reset_interval_system_watchdog>
ffc1902c: 48 00 00 80 b ffc190ac <_Timer_server_Schedule_operation_method+0x118>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc19030: 2f 80 00 03 cmpwi cr7,r0,3
ffc19034: 40 be 00 78 bne+ cr7,ffc190ac <_Timer_server_Schedule_operation_method+0x118>
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
ffc19038: 4b ff fc c5 bl ffc18cfc <ppc_interrupt_disable>
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ffc1903c: 3d 20 00 00 lis r9,0
last_snapshot = ts->TOD_watchdogs.last_snapshot;
ffc19040: 81 1f 00 74 lwz r8,116(r31)
/*
* 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();
ffc19044: 80 09 28 b4 lwz r0,10420(r9)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc19048: 39 7f 00 6c addi r11,r31,108
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc1904c: 81 3f 00 68 lwz r9,104(r31)
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
ffc19050: 7f 89 58 00 cmpw cr7,r9,r11
ffc19054: 41 9e 00 30 beq- cr7,ffc19084 <_Timer_server_Schedule_operation_method+0xf0>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
if ( snapshot > last_snapshot ) {
ffc19058: 7f 80 40 40 cmplw cr7,r0,r8
_ISR_Disable( level );
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;
ffc1905c: 81 49 00 10 lwz r10,16(r9)
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
ffc19060: 7d 6a 42 14 add r11,r10,r8
delta_interval += delta;
ffc19064: 7d 60 58 50 subf r11,r0,r11
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 ) {
ffc19068: 40 9d 00 18 ble- cr7,ffc19080 <_Timer_server_Schedule_operation_method+0xec>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
ffc1906c: 7d 08 00 50 subf r8,r8,r0
if (delta_interval > delta) {
ffc19070: 7f 8a 40 40 cmplw cr7,r10,r8
delta_interval -= delta;
} else {
delta_interval = 0;
ffc19074: 39 60 00 00 li r11,0
if ( snapshot > last_snapshot ) {
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
ffc19078: 40 9d 00 08 ble- cr7,ffc19080 <_Timer_server_Schedule_operation_method+0xec><== NEVER TAKEN
delta_interval -= delta;
ffc1907c: 7d 68 50 50 subf r11,r8,r10
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
ffc19080: 91 69 00 10 stw r11,16(r9)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
ffc19084: 90 1f 00 74 stw r0,116(r31)
ffc19088: 7c 60 01 24 mtmsr r3
_ISR_Enable( level );
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
ffc1908c: 38 7f 00 68 addi r3,r31,104
ffc19090: 38 9e 00 10 addi r4,r30,16
ffc19094: 48 00 47 e1 bl ffc1d874 <_Watchdog_Insert>
if ( !ts->active ) {
ffc19098: 88 1f 00 7c lbz r0,124(r31)
ffc1909c: 2f 80 00 00 cmpwi cr7,r0,0
ffc190a0: 40 be 00 0c bne+ cr7,ffc190ac <_Timer_server_Schedule_operation_method+0x118>
_Timer_server_Reset_tod_system_watchdog( ts );
ffc190a4: 7f e3 fb 78 mr r3,r31
ffc190a8: 4b ff fc e1 bl ffc18d88 <_Timer_server_Reset_tod_system_watchdog>
}
}
_Thread_Enable_dispatch();
ffc190ac: 48 00 35 ad bl ffc1c658 <_Thread_Enable_dispatch>
ffc190b0: 48 00 00 0c b ffc190bc <_Timer_server_Schedule_operation_method+0x128>
* 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 );
ffc190b4: 80 63 00 78 lwz r3,120(r3) <== NOT EXECUTED
ffc190b8: 48 00 09 19 bl ffc199d0 <_Chain_Append> <== NOT EXECUTED
}
}
ffc190bc: 39 61 00 10 addi r11,r1,16
ffc190c0: 4b ff 50 cc b ffc0e18c <_restgpr_30_x>
ffc0cda4 <_Timespec_Divide_by_integer>:
void _Timespec_Divide_by_integer(
const struct timespec *time,
uint32_t iterations,
struct timespec *result
)
{
ffc0cda4: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED
ffc0cda8: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc0cdac: 7c 86 23 78 mr r6,r4 <== NOT EXECUTED
ffc0cdb0: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
t *= TOD_NANOSECONDS_PER_SECOND;
ffc0cdb4: 3c 00 3b 9a lis r0,15258 <== NOT EXECUTED
ffc0cdb8: 60 00 ca 00 ori r0,r0,51712 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
ffc0cdbc: 81 63 00 00 lwz r11,0(r3) <== NOT EXECUTED
void _Timespec_Divide_by_integer(
const struct timespec *time,
uint32_t iterations,
struct timespec *result
)
{
ffc0cdc0: bf a1 00 0c stmw r29,12(r1) <== NOT EXECUTED
ffc0cdc4: 7c bf 2b 78 mr r31,r5 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
t *= TOD_NANOSECONDS_PER_SECOND;
ffc0cdc8: 7d 0b 00 96 mulhw r8,r11,r0 <== NOT EXECUTED
ffc0cdcc: 7d 2b 01 d6 mullw r9,r11,r0 <== NOT EXECUTED
t += time->tv_nsec;
ffc0cdd0: 81 63 00 04 lwz r11,4(r3) <== NOT EXECUTED
ffc0cdd4: 7d 6a fe 70 srawi r10,r11,31 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
ffc0cdd8: 7c 89 58 14 addc r4,r9,r11 <== NOT EXECUTED
ffc0cddc: 7c 68 51 14 adde r3,r8,r10 <== NOT EXECUTED
ffc0cde0: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc0cde4: 48 00 e7 0d bl ffc1b4f0 <__udivdi3> <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
ffc0cde8: 3c c0 3b 9a lis r6,15258 <== NOT EXECUTED
ffc0cdec: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc0cdf0: 60 c6 ca 00 ori r6,r6,51712 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
ffc0cdf4: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED
ffc0cdf8: 7c 9e 23 78 mr r30,r4 <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
ffc0cdfc: 48 00 e6 f5 bl ffc1b4f0 <__udivdi3> <== NOT EXECUTED
ffc0ce00: 90 9f 00 00 stw r4,0(r31) <== NOT EXECUTED
result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND;
ffc0ce04: 3c c0 3b 9a lis r6,15258 <== NOT EXECUTED
ffc0ce08: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc0ce0c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc0ce10: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc0ce14: 60 c6 ca 00 ori r6,r6,51712 <== NOT EXECUTED
ffc0ce18: 48 00 ea cd bl ffc1b8e4 <__umoddi3> <== NOT EXECUTED
}
ffc0ce1c: 39 61 00 18 addi r11,r1,24 <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND;
ffc0ce20: 90 9f 00 04 stw r4,4(r31) <== NOT EXECUTED
}
ffc0ce24: 4b ff 43 d0 b ffc011f4 <_restgpr_29_x> <== NOT EXECUTED
ffc0ce64 <_Timespec_Less_than>:
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
ffc0ce64: 81 63 00 00 lwz r11,0(r3)
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
ffc0ce68: 7c 69 1b 78 mr r9,r3
if ( lhs->tv_sec < rhs->tv_sec )
ffc0ce6c: 80 04 00 00 lwz r0,0(r4)
return true;
ffc0ce70: 38 60 00 01 li r3,1
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
ffc0ce74: 7f 8b 00 00 cmpw cr7,r11,r0
ffc0ce78: 4d 9c 00 20 bltlr cr7
return true;
if ( lhs->tv_sec > rhs->tv_sec )
ffc0ce7c: 41 9d 00 1c bgt- cr7,ffc0ce98 <_Timespec_Less_than+0x34><== NEVER TAKEN
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Less_than(
ffc0ce80: 81 29 00 04 lwz r9,4(r9)
ffc0ce84: 80 04 00 04 lwz r0,4(r4)
ffc0ce88: 7f 89 00 00 cmpw cr7,r9,r0
ffc0ce8c: 7c 60 00 26 mfcr r3
ffc0ce90: 54 63 ef fe rlwinm r3,r3,29,31,31
ffc0ce94: 4e 80 00 20 blr
{
if ( lhs->tv_sec < rhs->tv_sec )
return true;
if ( lhs->tv_sec > rhs->tv_sec )
return false;
ffc0ce98: 38 60 00 00 li r3,0 <== NOT EXECUTED
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec < rhs->tv_nsec )
return true;
return false;
}
ffc0ce9c: 4e 80 00 20 blr <== NOT EXECUTED
ffc0b518 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
ffc0b518: 94 21 ff e8 stwu r1,-24(r1)
ffc0b51c: 7c 08 02 a6 mflr r0
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;
ffc0b520: 3d 20 00 00 lis r9,0
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
ffc0b524: 90 01 00 1c stw r0,28(r1)
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;
ffc0b528: 39 29 20 04 addi r9,r9,8196
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0b52c: 3d 60 00 00 lis r11,0
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
ffc0b530: bf 81 00 08 stmw r28,8(r1)
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
initial_extensions = Configuration.User_extension_table;
ffc0b534: 83 a9 00 3c lwz r29,60(r9)
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;
ffc0b538: 83 c9 00 38 lwz r30,56(r9)
ffc0b53c: 39 2b 2d 74 addi r9,r11,11636
initial_extensions = Configuration.User_extension_table;
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
ffc0b540: 2f 9d 00 00 cmpwi cr7,r29,0
head->previous = NULL;
tail->previous = head;
ffc0b544: 91 29 00 08 stw r9,8(r9)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0b548: 38 09 00 04 addi r0,r9,4
ffc0b54c: 90 0b 2d 74 stw r0,11636(r11)
head->previous = NULL;
ffc0b550: 38 00 00 00 li r0,0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0b554: 3d 60 00 00 lis r11,0
head->previous = NULL;
ffc0b558: 90 09 00 04 stw r0,4(r9)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0b55c: 39 2b 2c 50 addi r9,r11,11344
ffc0b560: 39 49 00 04 addi r10,r9,4
ffc0b564: 91 4b 2c 50 stw r10,11344(r11)
head->previous = NULL;
ffc0b568: 90 09 00 04 stw r0,4(r9)
tail->previous = head;
ffc0b56c: 91 29 00 08 stw r9,8(r9)
ffc0b570: 41 9e 00 54 beq- cr7,ffc0b5c4 <_User_extensions_Handler_initialization+0xac><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
ffc0b574: 1f 9e 00 34 mulli r28,r30,52
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
ffc0b578: 7f 83 e3 78 mr r3,r28
ffc0b57c: 48 00 06 51 bl ffc0bbcc <_Workspace_Allocate_or_fatal_error>
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
ffc0b580: 7f 85 e3 78 mr r5,r28
ffc0b584: 38 80 00 00 li r4,0
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
ffc0b588: 7c 7f 1b 78 mr r31,r3
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
ffc0b58c: 48 00 54 31 bl ffc109bc <memset>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
ffc0b590: 3b 80 00 00 li r28,0
ffc0b594: 48 00 00 28 b ffc0b5bc <_User_extensions_Handler_initialization+0xa4>
#include <rtems/config.h>
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
ffc0b598: 57 83 28 34 rlwinm r3,r28,5,0,26
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
ffc0b59c: 38 9f 00 14 addi r4,r31,20
ffc0b5a0: 7c 7d 1a 14 add r3,r29,r3
ffc0b5a4: 7c a3 04 aa lswi r5,r3,32
ffc0b5a8: 7c a4 05 aa stswi r5,r4,32
_User_extensions_Add_set( extension );
ffc0b5ac: 7f e3 fb 78 mr r3,r31
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
ffc0b5b0: 3b 9c 00 01 addi r28,r28,1
ffc0b5b4: 48 00 2d 85 bl ffc0e338 <_User_extensions_Add_set>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
ffc0b5b8: 3b ff 00 34 addi r31,r31,52
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
ffc0b5bc: 7f 9c f0 00 cmpw cr7,r28,r30
ffc0b5c0: 40 9e ff d8 bne+ cr7,ffc0b598 <_User_extensions_Handler_initialization+0x80>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
ffc0b5c4: 39 61 00 18 addi r11,r1,24
ffc0b5c8: 4b ff 4f 60 b ffc00528 <_restgpr_28_x>
ffc0d268 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
ffc0d268: 94 21 ff e8 stwu r1,-24(r1)
ffc0d26c: 7c 08 02 a6 mflr r0
ffc0d270: 90 01 00 1c stw r0,28(r1)
ffc0d274: bf 81 00 08 stmw r28,8(r1)
ffc0d278: 7c 7f 1b 78 mr r31,r3
ffc0d27c: 7c be 2b 78 mr r30,r5
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0d280: 7c 00 00 a6 mfmsr r0
ffc0d284: 7d 30 42 a6 mfsprg r9,0
ffc0d288: 7c 09 48 78 andc r9,r0,r9
ffc0d28c: 7d 20 01 24 mtmsr r9
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0d290: 81 23 00 00 lwz r9,0(r3)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0d294: 3b a3 00 04 addi r29,r3,4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
ffc0d298: 7f 89 e8 00 cmpw cr7,r9,r29
ffc0d29c: 41 9e 00 78 beq- cr7,ffc0d314 <_Watchdog_Adjust+0xac>
switch ( direction ) {
ffc0d2a0: 2f 84 00 00 cmpwi cr7,r4,0
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
ffc0d2a4: 3b 80 00 01 li r28,1
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
ffc0d2a8: 41 9e 00 64 beq- cr7,ffc0d30c <_Watchdog_Adjust+0xa4>
ffc0d2ac: 2f 84 00 01 cmpwi cr7,r4,1
ffc0d2b0: 40 be 00 64 bne+ cr7,ffc0d314 <_Watchdog_Adjust+0xac> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
ffc0d2b4: 81 69 00 10 lwz r11,16(r9)
ffc0d2b8: 7f cb 2a 14 add r30,r11,r5
ffc0d2bc: 48 00 00 18 b ffc0d2d4 <_Watchdog_Adjust+0x6c>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0d2c0: 81 3f 00 00 lwz r9,0(r31)
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
ffc0d2c4: 81 69 00 10 lwz r11,16(r9)
ffc0d2c8: 7f 9e 58 40 cmplw cr7,r30,r11
ffc0d2cc: 40 bc 00 10 bge+ cr7,ffc0d2dc <_Watchdog_Adjust+0x74>
_Watchdog_First( header )->delta_interval -= units;
ffc0d2d0: 7f de 58 50 subf r30,r30,r11
ffc0d2d4: 93 c9 00 10 stw r30,16(r9)
break;
ffc0d2d8: 48 00 00 3c b ffc0d314 <_Watchdog_Adjust+0xac>
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
ffc0d2dc: 93 89 00 10 stw r28,16(r9)
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
ffc0d2e0: 7f cb f0 50 subf r30,r11,r30
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0d2e4: 7c 00 01 24 mtmsr r0
_Watchdog_First( header )->delta_interval = 1;
_ISR_Enable( level );
_Watchdog_Tickle( header );
ffc0d2e8: 7f e3 fb 78 mr r3,r31
ffc0d2ec: 48 00 02 35 bl ffc0d520 <_Watchdog_Tickle>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0d2f0: 7c 00 00 a6 mfmsr r0
ffc0d2f4: 7d 30 42 a6 mfsprg r9,0
ffc0d2f8: 7c 09 48 78 andc r9,r0,r9
ffc0d2fc: 7d 20 01 24 mtmsr r9
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
ffc0d300: 81 3f 00 00 lwz r9,0(r31)
ffc0d304: 7f 89 e8 00 cmpw cr7,r9,r29
ffc0d308: 41 9e 00 0c beq- cr7,ffc0d314 <_Watchdog_Adjust+0xac>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
ffc0d30c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0d310: 40 9e ff b0 bne+ cr7,ffc0d2c0 <_Watchdog_Adjust+0x58> <== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0d314: 7c 00 01 24 mtmsr r0
}
}
_ISR_Enable( level );
}
ffc0d318: 39 61 00 18 addi r11,r1,24
ffc0d31c: 4b ff 40 14 b ffc01330 <_restgpr_28_x>
ffc0b9ac <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
ffc0b9ac: 7c 69 1b 78 mr r9,r3
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0b9b0: 7c 00 00 a6 mfmsr r0
ffc0b9b4: 7d 70 42 a6 mfsprg r11,0
ffc0b9b8: 7c 0b 58 78 andc r11,r0,r11
ffc0b9bc: 7d 60 01 24 mtmsr r11
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
ffc0b9c0: 80 63 00 08 lwz r3,8(r3)
switch ( previous_state ) {
ffc0b9c4: 2f 83 00 01 cmpwi cr7,r3,1
ffc0b9c8: 41 9e 00 18 beq- cr7,ffc0b9e0 <_Watchdog_Remove+0x34>
ffc0b9cc: 2b 83 00 01 cmplwi cr7,r3,1
ffc0b9d0: 41 9c 00 70 blt- cr7,ffc0ba40 <_Watchdog_Remove+0x94>
ffc0b9d4: 2b 83 00 03 cmplwi cr7,r3,3
ffc0b9d8: 41 9d 00 68 bgt- cr7,ffc0ba40 <_Watchdog_Remove+0x94> <== NEVER TAKEN
ffc0b9dc: 48 00 00 10 b ffc0b9ec <_Watchdog_Remove+0x40>
/*
* 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;
ffc0b9e0: 39 60 00 00 li r11,0
ffc0b9e4: 91 69 00 08 stw r11,8(r9)
break;
ffc0b9e8: 48 00 00 58 b ffc0ba40 <_Watchdog_Remove+0x94>
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0b9ec: 39 60 00 00 li r11,0
ffc0b9f0: 91 69 00 08 stw r11,8(r9)
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
ffc0b9f4: 81 69 00 00 lwz r11,0(r9)
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
ffc0b9f8: 81 4b 00 00 lwz r10,0(r11)
ffc0b9fc: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0ba00: 41 9e 00 14 beq- cr7,ffc0ba14 <_Watchdog_Remove+0x68>
next_watchdog->delta_interval += the_watchdog->delta_interval;
ffc0ba04: 81 0b 00 10 lwz r8,16(r11)
ffc0ba08: 81 49 00 10 lwz r10,16(r9)
ffc0ba0c: 7d 48 52 14 add r10,r8,r10
ffc0ba10: 91 4b 00 10 stw r10,16(r11)
if ( _Watchdog_Sync_count )
ffc0ba14: 3d 40 00 00 lis r10,0
ffc0ba18: 81 4a 27 f8 lwz r10,10232(r10)
ffc0ba1c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0ba20: 41 9e 00 14 beq- cr7,ffc0ba34 <_Watchdog_Remove+0x88>
_Watchdog_Sync_level = _ISR_Nest_level;
ffc0ba24: 3d 40 00 00 lis r10,0
ffc0ba28: 81 0a 2d c0 lwz r8,11712(r10)
ffc0ba2c: 3d 40 00 00 lis r10,0
ffc0ba30: 91 0a 27 f0 stw r8,10224(r10)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
ffc0ba34: 81 49 00 04 lwz r10,4(r9)
next->previous = previous;
ffc0ba38: 91 4b 00 04 stw r10,4(r11)
previous->next = next;
ffc0ba3c: 91 6a 00 00 stw r11,0(r10)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
ffc0ba40: 3d 60 00 00 lis r11,0
ffc0ba44: 81 6b 27 fc lwz r11,10236(r11)
ffc0ba48: 91 69 00 18 stw r11,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0ba4c: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
return( previous_state );
}
ffc0ba50: 4e 80 00 20 blr
ffc1a824 <__kill>:
#endif
int __kill( pid_t pid, int sig )
{
return 0;
}
ffc1a824: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1a828: 4e 80 00 20 blr <== NOT EXECUTED
ffc049f4 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
ffc049f4: 4b ff ff 88 b ffc0497c <gettimeofday> <== NOT EXECUTED
ffc093e4 <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
ffc093e4: 94 21 ff 90 stwu r1,-112(r1)
ffc093e8: 7c 08 02 a6 mflr r0
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
ffc093ec: 7c 83 23 78 mr r3,r4
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
ffc093f0: bf 41 00 58 stmw r26,88(r1)
ffc093f4: 7c 9d 23 78 mr r29,r4
ffc093f8: 7c bb 2b 78 mr r27,r5
ffc093fc: 90 01 00 74 stw r0,116(r1)
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
ffc09400: 4b ff e7 69 bl ffc07b68 <rtems_filesystem_dirname>
if ( old_parent_pathlen == 0 )
ffc09404: 7c 7a 1b 79 mr. r26,r3
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
ffc09408: 7f a3 eb 78 mr r3,r29
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
ffc0940c: 40 82 00 18 bne- ffc09424 <_rename_r+0x40>
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
ffc09410: 38 81 00 0c addi r4,r1,12
ffc09414: 38 a1 00 24 addi r5,r1,36
ffc09418: 48 00 03 71 bl ffc09788 <rtems_filesystem_get_start_loc>
rtems_filesystem_location_info_t old_parent_loc;
rtems_filesystem_location_info_t new_parent_loc;
int i;
int result;
const char *name;
bool free_old_parentloc = false;
ffc0941c: 3b c0 00 00 li r30,0
ffc09420: 48 00 00 28 b ffc09448 <_rename_r+0x64>
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,
ffc09424: 7f 44 d3 78 mr r4,r26
ffc09428: 38 a0 00 02 li r5,2
ffc0942c: 38 c1 00 24 addi r6,r1,36
ffc09430: 38 e0 00 00 li r7,0
ffc09434: 4b ff e6 d9 bl ffc07b0c <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
return -1;
ffc09438: 3b 80 ff ff li r28,-1
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
ffc0943c: 2f 83 00 00 cmpwi cr7,r3,0
ffc09440: 40 9e 01 5c bne- cr7,ffc0959c <_rename_r+0x1b8> <== NEVER TAKEN
return -1;
free_old_parentloc = true;
ffc09444: 3b c0 00 01 li r30,1
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
ffc09448: 3b 81 00 38 addi r28,r1,56
ffc0944c: 3b e1 00 24 addi r31,r1,36
ffc09450: 7c bf a4 aa lswi r5,r31,20
ffc09454: 7c bc a5 aa stswi r5,r28,20
name = old + old_parent_pathlen;
ffc09458: 7f bd d2 14 add r29,r29,r26
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
ffc0945c: 7f a3 eb 78 mr r3,r29
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
ffc09460: 93 a1 00 08 stw r29,8(r1)
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
ffc09464: 48 00 e5 55 bl ffc179b8 <strlen>
ffc09468: 7c 64 1b 78 mr r4,r3
ffc0946c: 7f a3 eb 78 mr r3,r29
ffc09470: 4b ff e7 41 bl ffc07bb0 <rtems_filesystem_prefix_separators>
ffc09474: 7f bd 1a 14 add r29,r29,r3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
ffc09478: 7f a3 eb 78 mr r3,r29
* 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 ) );
ffc0947c: 93 a1 00 08 stw r29,8(r1)
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
ffc09480: 48 00 e5 39 bl ffc179b8 <strlen>
ffc09484: 38 a0 00 00 li r5,0
ffc09488: 7c 64 1b 78 mr r4,r3
ffc0948c: 7f 86 e3 78 mr r6,r28
ffc09490: 7f a3 eb 78 mr r3,r29
ffc09494: 38 e0 00 00 li r7,0
ffc09498: 4b ff e5 f1 bl ffc07a88 <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false );
if ( result != 0 ) {
ffc0949c: 2f 83 00 00 cmpwi cr7,r3,0
ffc094a0: 41 9e 00 18 beq- cr7,ffc094b8 <_rename_r+0xd4>
if ( free_old_parentloc )
ffc094a4: 2f 9e 00 00 cmpwi cr7,r30,0
rtems_filesystem_freenode( &old_parent_loc );
return -1;
ffc094a8: 3b 80 ff ff li r28,-1
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 );
ffc094ac: 7f e3 fb 78 mr r3,r31
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 )
ffc094b0: 41 be 00 ec beq+ cr7,ffc0959c <_rename_r+0x1b8> <== NEVER TAKEN
ffc094b4: 48 00 00 e4 b ffc09598 <_rename_r+0x1b4>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
ffc094b8: 7f 63 db 78 mr r3,r27
ffc094bc: 38 81 00 0c addi r4,r1,12
ffc094c0: 38 a1 00 10 addi r5,r1,16
ffc094c4: 48 00 02 c5 bl ffc09788 <rtems_filesystem_get_start_loc>
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
ffc094c8: 81 21 00 1c lwz r9,28(r1)
ffc094cc: 80 61 00 0c lwz r3,12(r1)
ffc094d0: 38 81 00 10 addi r4,r1,16
ffc094d4: 80 09 00 04 lwz r0,4(r9)
ffc094d8: 38 a1 00 08 addi r5,r1,8
ffc094dc: 7c 7b 1a 14 add r3,r27,r3
ffc094e0: 7c 09 03 a6 mtctr r0
ffc094e4: 4e 80 04 21 bctrl
if ( result != 0 ) {
ffc094e8: 2f 83 00 00 cmpwi cr7,r3,0
ffc094ec: 41 be 00 28 beq+ cr7,ffc09514 <_rename_r+0x130>
rtems_filesystem_freenode( &new_parent_loc );
ffc094f0: 38 61 00 10 addi r3,r1,16
ffc094f4: 4b ff e9 55 bl ffc07e48 <rtems_filesystem_freenode>
if ( free_old_parentloc )
ffc094f8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc094fc: 41 be 00 0c beq+ cr7,ffc09508 <_rename_r+0x124> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
ffc09500: 7f e3 fb 78 mr r3,r31
ffc09504: 4b ff e9 45 bl ffc07e48 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &old_loc );
ffc09508: 38 61 00 38 addi r3,r1,56
ffc0950c: 4b ff e9 3d bl ffc07e48 <rtems_filesystem_freenode>
ffc09510: 48 00 00 40 b ffc09550 <_rename_r+0x16c>
/*
* 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 ) {
ffc09514: 80 01 00 20 lwz r0,32(r1)
ffc09518: 81 21 00 34 lwz r9,52(r1)
ffc0951c: 7f 89 00 00 cmpw cr7,r9,r0
ffc09520: 41 be 00 38 beq+ cr7,ffc09558 <_rename_r+0x174>
rtems_filesystem_freenode( &new_parent_loc );
ffc09524: 38 61 00 10 addi r3,r1,16
ffc09528: 4b ff e9 21 bl ffc07e48 <rtems_filesystem_freenode>
if ( free_old_parentloc )
ffc0952c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc09530: 41 be 00 0c beq+ cr7,ffc0953c <_rename_r+0x158>
rtems_filesystem_freenode( &old_parent_loc );
ffc09534: 7f e3 fb 78 mr r3,r31
ffc09538: 4b ff e9 11 bl ffc07e48 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &old_loc );
ffc0953c: 38 61 00 38 addi r3,r1,56
ffc09540: 4b ff e9 09 bl ffc07e48 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EXDEV );
ffc09544: 48 00 a8 4d bl ffc13d90 <__errno>
ffc09548: 38 00 00 12 li r0,18
ffc0954c: 90 03 00 00 stw r0,0(r3)
ffc09550: 3b 80 ff ff li r28,-1
ffc09554: 48 00 00 48 b ffc0959c <_rename_r+0x1b8>
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
ffc09558: 81 21 00 1c lwz r9,28(r1)
ffc0955c: 7f 84 e3 78 mr r4,r28
ffc09560: 38 a1 00 10 addi r5,r1,16
ffc09564: 80 c1 00 08 lwz r6,8(r1)
ffc09568: 80 09 00 40 lwz r0,64(r9)
ffc0956c: 7f e3 fb 78 mr r3,r31
ffc09570: 7c 09 03 a6 mtctr r0
ffc09574: 4e 80 04 21 bctrl
ffc09578: 7c 7c 1b 78 mr r28,r3
rtems_filesystem_freenode( &new_parent_loc );
ffc0957c: 38 61 00 10 addi r3,r1,16
ffc09580: 4b ff e8 c9 bl ffc07e48 <rtems_filesystem_freenode>
if ( free_old_parentloc )
ffc09584: 2f 9e 00 00 cmpwi cr7,r30,0
ffc09588: 41 be 00 0c beq+ cr7,ffc09594 <_rename_r+0x1b0>
rtems_filesystem_freenode( &old_parent_loc );
ffc0958c: 7f e3 fb 78 mr r3,r31
ffc09590: 4b ff e8 b9 bl ffc07e48 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &old_loc );
ffc09594: 38 61 00 38 addi r3,r1,56
ffc09598: 4b ff e8 b1 bl ffc07e48 <rtems_filesystem_freenode>
return result;
}
ffc0959c: 39 61 00 70 addi r11,r1,112
ffc095a0: 7f 83 e3 78 mr r3,r28
ffc095a4: 4b ff 9f 6c b ffc03510 <_restgpr_26_x>
ffc04258 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
ffc04258: 94 21 ff c8 stwu r1,-56(r1)
ffc0425c: 7c 08 02 a6 mflr r0
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) {
ffc04260: 3d 20 00 00 lis r9,0
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
ffc04264: bf a1 00 2c stmw r29,44(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) {
ffc04268: 3f c0 00 00 lis r30,0
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
ffc0426c: 7c 7d 1b 78 mr r29,r3
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) {
ffc04270: 83 fe 26 f4 lwz r31,9972(r30)
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
ffc04274: 90 01 00 3c stw r0,60(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) {
ffc04278: 38 09 2a d8 addi r0,r9,10968
ffc0427c: 7f 9f 00 00 cmpw cr7,r31,r0
ffc04280: 40 be 00 24 bne+ cr7,ffc042a4 <chroot+0x4c>
rtems_libio_set_private_env(); /* try to set a new private env*/
ffc04284: 48 00 15 35 bl ffc057b8 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
ffc04288: 80 1e 26 f4 lwz r0,9972(r30)
ffc0428c: 7f 80 f8 00 cmpw cr7,r0,r31
ffc04290: 40 be 00 14 bne+ cr7,ffc042a4 <chroot+0x4c>
rtems_set_errno_and_return_minus_one( ENOTSUP );
ffc04294: 48 00 b7 05 bl ffc0f998 <__errno>
ffc04298: 38 00 00 86 li r0,134
ffc0429c: 90 03 00 00 stw r0,0(r3)
ffc042a0: 48 00 00 28 b ffc042c8 <chroot+0x70>
}
result = chdir(pathname);
ffc042a4: 7f a3 eb 78 mr r3,r29
ffc042a8: 48 00 8c 0d bl ffc0ceb4 <chdir>
if (result) {
ffc042ac: 2f 83 00 00 cmpwi cr7,r3,0
ffc042b0: 41 be 00 20 beq+ cr7,ffc042d0 <chroot+0x78>
rtems_set_errno_and_return_minus_one( errno );
ffc042b4: 48 00 b6 e5 bl ffc0f998 <__errno>
ffc042b8: 7c 7f 1b 78 mr r31,r3
ffc042bc: 48 00 b6 dd bl ffc0f998 <__errno>
ffc042c0: 80 03 00 00 lwz r0,0(r3)
ffc042c4: 90 1f 00 00 stw r0,0(r31)
ffc042c8: 38 60 ff ff li r3,-1
ffc042cc: 48 00 00 50 b ffc0431c <chroot+0xc4>
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
ffc042d0: 3c 60 ff c1 lis r3,-63
ffc042d4: 3b e1 00 08 addi r31,r1,8
ffc042d8: 38 63 68 30 addi r3,r3,26672
ffc042dc: 38 80 00 01 li r4,1
ffc042e0: 38 a0 00 00 li r5,0
ffc042e4: 7f e6 fb 78 mr r6,r31
ffc042e8: 38 e0 00 00 li r7,0
ffc042ec: 48 00 01 49 bl ffc04434 <rtems_filesystem_evaluate_path>
ffc042f0: 2f 83 00 00 cmpwi cr7,r3,0
ffc042f4: 40 be ff c0 bne- cr7,ffc042b4 <chroot+0x5c> <== NEVER TAKEN
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
}
rtems_filesystem_freenode(&rtems_filesystem_root);
ffc042f8: 3f c0 00 00 lis r30,0
ffc042fc: 80 7e 26 f4 lwz r3,9972(r30)
ffc04300: 38 63 00 18 addi r3,r3,24
ffc04304: 48 00 02 25 bl ffc04528 <rtems_filesystem_freenode>
rtems_filesystem_root = loc;
ffc04308: 81 7e 26 f4 lwz r11,9972(r30)
return 0;
ffc0430c: 38 60 00 00 li r3,0
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 );
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
ffc04310: 39 6b 00 18 addi r11,r11,24
ffc04314: 7c bf a4 aa lswi r5,r31,20
ffc04318: 7c ab a5 aa stswi r5,r11,20
return 0;
}
ffc0431c: 39 61 00 38 addi r11,r1,56
ffc04320: 48 01 05 4c b ffc1486c <_restgpr_29_x>
ffc0be94 <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
ffc0be94: 94 21 ff d8 stwu r1,-40(r1)
ffc0be98: 7c 08 02 a6 mflr r0
ffc0be9c: 90 01 00 2c stw r0,44(r1)
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
ffc0bea0: 54 a0 00 39 rlwinm. r0,r5,0,0,28
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
ffc0bea4: bf 21 00 0c stmw r25,12(r1)
ffc0bea8: 7c 7e 1b 78 mr r30,r3
ffc0beac: 7c 9f 23 78 mr r31,r4
ffc0beb0: 7c dd 33 78 mr r29,r6
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
ffc0beb4: 41 a2 00 10 beq+ ffc0bec4 <devFS_evaluate_path+0x30> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
ffc0beb8: 48 00 1b d9 bl ffc0da90 <__errno> <== NOT EXECUTED
ffc0bebc: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc0bec0: 48 00 00 a0 b ffc0bf60 <devFS_evaluate_path+0xcc> <== NOT EXECUTED
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
ffc0bec4: 83 86 00 00 lwz r28,0(r6)
if (!device_name_table)
ffc0bec8: 3b 60 00 00 li r27,0
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
ffc0becc: 3f 20 00 00 lis r25,0
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
ffc0bed0: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0bed4: 40 be 00 78 bne+ cr7,ffc0bf4c <devFS_evaluate_path+0xb8>
rtems_set_errno_and_return_minus_one( EFAULT );
ffc0bed8: 48 00 1b b9 bl ffc0da90 <__errno>
ffc0bedc: 38 00 00 0e li r0,14
ffc0bee0: 48 00 00 80 b ffc0bf60 <devFS_evaluate_path+0xcc>
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
ffc0bee4: 83 5c 00 00 lwz r26,0(r28)
ffc0bee8: 2f 9a 00 00 cmpwi cr7,r26,0
ffc0beec: 41 9e 00 58 beq- cr7,ffc0bf44 <devFS_evaluate_path+0xb0>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
ffc0bef0: 7f c3 f3 78 mr r3,r30
ffc0bef4: 7f 44 d3 78 mr r4,r26
ffc0bef8: 7f e5 fb 78 mr r5,r31
ffc0befc: 48 00 35 11 bl ffc0f40c <strncmp>
ffc0bf00: 2f 83 00 00 cmpwi cr7,r3,0
ffc0bf04: 40 9e 00 40 bne- cr7,ffc0bf44 <devFS_evaluate_path+0xb0>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
ffc0bf08: 7c 1a f8 ae lbzx r0,r26,r31
ffc0bf0c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0bf10: 40 be 00 34 bne+ cr7,ffc0bf44 <devFS_evaluate_path+0xb0><== NEVER TAKEN
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
ffc0bf14: 3d 20 00 00 lis r9,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];
ffc0bf18: 93 9d 00 00 stw r28,0(r29)
pathloc->handlers = &devFS_file_handlers;
ffc0bf1c: 38 09 21 7c addi r0,r9,8572
pathloc->ops = &devFS_ops;
ffc0bf20: 3d 20 00 00 lis r9,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;
ffc0bf24: 90 1d 00 08 stw r0,8(r29)
pathloc->ops = &devFS_ops;
ffc0bf28: 38 09 21 b4 addi r0,r9,8628
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
ffc0bf2c: 3d 20 00 00 lis r9,0
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
ffc0bf30: 90 1d 00 0c stw r0,12(r29)
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
ffc0bf34: 81 29 27 74 lwz r9,10100(r9)
ffc0bf38: 80 09 00 28 lwz r0,40(r9)
ffc0bf3c: 90 1d 00 10 stw r0,16(r29)
return 0;
ffc0bf40: 48 00 00 28 b ffc0bf68 <devFS_evaluate_path+0xd4>
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
ffc0bf44: 3b 7b 00 01 addi r27,r27,1
ffc0bf48: 3b 9c 00 14 addi r28,r28,20
ffc0bf4c: 80 19 27 38 lwz r0,10040(r25)
ffc0bf50: 7f 9b 00 40 cmplw cr7,r27,r0
ffc0bf54: 41 9c ff 90 blt+ cr7,ffc0bee4 <devFS_evaluate_path+0x50>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
ffc0bf58: 48 00 1b 39 bl ffc0da90 <__errno>
ffc0bf5c: 38 00 00 02 li r0,2
ffc0bf60: 90 03 00 00 stw r0,0(r3)
ffc0bf64: 38 60 ff ff li r3,-1
}
ffc0bf68: 39 61 00 28 addi r11,r1,40
ffc0bf6c: 48 00 b3 28 b ffc17294 <_restgpr_25_x>
ffc0438c <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
ffc0438c: 94 21 ff d8 stwu r1,-40(r1)
ffc04390: 7c 08 02 a6 mflr r0
ffc04394: bf 01 00 08 stmw r24,8(r1)
ffc04398: 7c 7f 1b 78 mr r31,r3
ffc0439c: 7c 9e 23 78 mr r30,r4
ffc043a0: 90 01 00 2c stw r0,44(r1)
ffc043a4: 7c bd 2b 78 mr r29,r5
ffc043a8: 7c dc 33 78 mr r28,r6
* 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') &&
ffc043ac: 88 03 00 00 lbz r0,0(r3)
ffc043b0: 2f 80 00 64 cmpwi cr7,r0,100
ffc043b4: 40 be 00 2c bne+ cr7,ffc043e0 <devFS_mknod+0x54>
ffc043b8: 88 03 00 01 lbz r0,1(r3)
ffc043bc: 2f 80 00 65 cmpwi cr7,r0,101
ffc043c0: 40 be 00 20 bne+ cr7,ffc043e0 <devFS_mknod+0x54> <== NEVER TAKEN
ffc043c4: 88 03 00 02 lbz r0,2(r3)
ffc043c8: 2f 80 00 76 cmpwi cr7,r0,118
ffc043cc: 40 be 00 14 bne+ cr7,ffc043e0 <devFS_mknod+0x54> <== NEVER TAKEN
(path[2] == 'v') && (path[3] == '\0'))
ffc043d0: 88 03 00 03 lbz r0,3(r3)
return 0;
ffc043d4: 38 60 00 00 li r3,0
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
(path[2] == 'v') && (path[3] == '\0'))
ffc043d8: 2f 80 00 00 cmpwi cr7,r0,0
ffc043dc: 41 9e 00 e0 beq- cr7,ffc044bc <devFS_mknod+0x130>
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
ffc043e0: 57 c0 04 26 rlwinm r0,r30,0,16,19
ffc043e4: 2f 80 60 00 cmpwi cr7,r0,24576
ffc043e8: 41 9e 00 18 beq- cr7,ffc04400 <devFS_mknod+0x74>
ffc043ec: 2f 80 20 00 cmpwi cr7,r0,8192
ffc043f0: 41 be 00 10 beq+ cr7,ffc04400 <devFS_mknod+0x74>
rtems_set_errno_and_return_minus_one( EINVAL );
ffc043f4: 48 00 96 9d bl ffc0da90 <__errno>
ffc043f8: 38 00 00 16 li r0,22
ffc043fc: 48 00 00 24 b ffc04420 <devFS_mknod+0x94>
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;
ffc04400: 83 47 00 00 lwz r26,0(r7)
if (!device_name_table)
ffc04404: 3b 20 ff ff li r25,-1
ffc04408: 3b 60 00 00 li r27,0
ffc0440c: 2f 9a 00 00 cmpwi cr7,r26,0
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
ffc04410: 3f 00 00 00 lis r24,0
else
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
ffc04414: 40 be 00 4c bne+ cr7,ffc04460 <devFS_mknod+0xd4>
rtems_set_errno_and_return_minus_one( EFAULT );
ffc04418: 48 00 96 79 bl ffc0da90 <__errno>
ffc0441c: 38 00 00 0e li r0,14
ffc04420: 90 03 00 00 stw r0,0(r3)
ffc04424: 38 60 ff ff li r3,-1
ffc04428: 48 00 00 94 b ffc044bc <devFS_mknod+0x130>
#include <stdlib.h>
#include <rtems/seterr.h>
#include "devfs.h"
int devFS_mknod(
ffc0442c: 1c 1b 00 14 mulli r0,r27,20
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)
ffc04430: 7c 9a 00 2e lwzx r4,r26,r0
ffc04434: 2f 84 00 00 cmpwi cr7,r4,0
ffc04438: 41 9e 00 20 beq- cr7,ffc04458 <devFS_mknod+0xcc>
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
ffc0443c: 7f e3 fb 78 mr r3,r31
ffc04440: 48 00 ae 49 bl ffc0f288 <strcmp>
ffc04444: 2f 83 00 00 cmpwi cr7,r3,0
ffc04448: 40 be 00 14 bne+ cr7,ffc0445c <devFS_mknod+0xd0>
rtems_set_errno_and_return_minus_one( EEXIST );
ffc0444c: 48 00 96 45 bl ffc0da90 <__errno>
ffc04450: 38 00 00 11 li r0,17
ffc04454: 4b ff ff cc b ffc04420 <devFS_mknod+0x94>
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)
slot = i;
ffc04458: 7f 79 db 78 mr r25,r27
/* 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++){
ffc0445c: 3b 7b 00 01 addi r27,r27,1
ffc04460: 80 18 27 38 lwz r0,10040(r24)
ffc04464: 7f 9b 00 40 cmplw cr7,r27,r0
ffc04468: 41 9c ff c4 blt+ cr7,ffc0442c <devFS_mknod+0xa0>
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
ffc0446c: 2f 99 ff ff cmpwi cr7,r25,-1
ffc04470: 40 be 00 10 bne+ cr7,ffc04480 <devFS_mknod+0xf4>
rtems_set_errno_and_return_minus_one( ENOMEM );
ffc04474: 48 00 96 1d bl ffc0da90 <__errno>
ffc04478: 38 00 00 0c li r0,12
ffc0447c: 4b ff ff a4 b ffc04420 <devFS_mknod+0x94>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc04480: 7f 00 00 a6 mfmsr r24
ffc04484: 7c 10 42 a6 mfsprg r0,0
ffc04488: 7f 00 00 78 andc r0,r24,r0
ffc0448c: 7c 00 01 24 mtmsr r0
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
ffc04490: 1f 39 00 14 mulli r25,r25,20
ffc04494: 7f fa c9 2e stwx r31,r26,r25
device_name_table[slot].device_name_length = strlen(path);
ffc04498: 7f e3 fb 78 mr r3,r31
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
ffc0449c: 7f 7a ca 14 add r27,r26,r25
device_name_table[slot].device_name_length = strlen(path);
ffc044a0: 48 00 ae b1 bl ffc0f350 <strlen>
device_name_table[slot].major = major;
ffc044a4: 93 bb 00 08 stw r29,8(r27)
if (slot == -1)
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);
ffc044a8: 90 7b 00 04 stw r3,4(r27)
device_name_table[slot].major = major;
device_name_table[slot].minor = minor;
ffc044ac: 93 9b 00 0c stw r28,12(r27)
device_name_table[slot].mode = mode;
ffc044b0: 93 db 00 10 stw r30,16(r27)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc044b4: 7f 00 01 24 mtmsr r24
_ISR_Enable(level);
return 0;
ffc044b8: 38 60 00 00 li r3,0
}
ffc044bc: 39 61 00 28 addi r11,r1,40
ffc044c0: 48 01 2d d0 b ffc17290 <_restgpr_24_x>
ffc0596c <drainOutput.part.0>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
ffc0596c: 94 21 ff f0 stwu r1,-16(r1)
ffc05970: 7c 08 02 a6 mflr r0
ffc05974: bf c1 00 08 stmw r30,8(r1)
ffc05978: 7c 7f 1b 78 mr r31,r3
ffc0597c: 90 01 00 14 stw r0,20(r1)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
ffc05980: 4b ff ff d9 bl ffc05958 <ppc_interrupt_disable>
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
ffc05984: 3b c0 00 02 li r30,2
ffc05988: 48 00 00 2c b ffc059b4 <drainOutput.part.0+0x48>
ffc0598c: 93 df 00 94 stw r30,148(r31) <== NOT EXECUTED
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc05990: 7c 60 01 24 mtmsr r3 <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
ffc05994: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED
ffc05998: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc0599c: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc059a0: 48 00 26 71 bl ffc08010 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc059a4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc059a8: 41 be 00 08 beq+ cr7,ffc059b0 <drainOutput.part.0+0x44> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
ffc059ac: 48 00 2e 39 bl ffc087e4 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
ffc059b0: 4b ff ff a9 bl ffc05958 <ppc_interrupt_disable> <== 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) {
ffc059b4: 81 3f 00 84 lwz r9,132(r31)
ffc059b8: 80 1f 00 80 lwz r0,128(r31)
ffc059bc: 7f 89 00 00 cmpw cr7,r9,r0
ffc059c0: 40 9e ff cc bne+ cr7,ffc0598c <drainOutput.part.0+0x20> <== NEVER TAKEN
ffc059c4: 7c 60 01 24 mtmsr r3
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
}
}
ffc059c8: 39 61 00 10 addi r11,r1,16
ffc059cc: 4b ff ab 64 b ffc00530 <_restgpr_30_x>
ffc06644 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
ffc06644: 7c 08 02 a6 mflr r0
ffc06648: 7c 2b 0b 78 mr r11,r1
ffc0664c: 94 21 ff e0 stwu r1,-32(r1)
ffc06650: 90 01 00 24 stw r0,36(r1)
ffc06654: 48 01 3c e1 bl ffc1a334 <_savegpr_31>
ffc06658: 7c 9f 23 78 mr r31,r4
if ((tty->termios.c_lflag & ECHOCTL) &&
ffc0665c: 80 04 00 3c lwz r0,60(r4)
ffc06660: 70 09 02 00 andi. r9,r0,512
ffc06664: 41 82 00 5c beq- ffc066c0 <echo+0x7c> <== NEVER TAKEN
iscntrl(c) && (c != '\t') && (c != '\n')) {
ffc06668: 3d 20 00 00 lis r9,0
ffc0666c: 81 29 27 44 lwz r9,10052(r9)
ffc06670: 7d 29 1a 14 add r9,r9,r3
ffc06674: 88 09 00 01 lbz r0,1(r9)
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
ffc06678: 70 09 00 20 andi. r9,r0,32
ffc0667c: 41 82 00 44 beq- ffc066c0 <echo+0x7c>
iscntrl(c) && (c != '\t') && (c != '\n')) {
ffc06680: 2f 83 00 09 cmpwi cr7,r3,9
ffc06684: 41 9e 00 3c beq- cr7,ffc066c0 <echo+0x7c>
ffc06688: 2f 83 00 0a cmpwi cr7,r3,10
ffc0668c: 41 be 00 34 beq+ cr7,ffc066c0 <echo+0x7c>
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
ffc06690: 68 63 00 40 xori r3,r3,64
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
ffc06694: 38 00 00 5e li r0,94
echobuf[1] = c ^ 0x40;
ffc06698: 98 61 00 09 stb r3,9(r1)
rtems_termios_puts (echobuf, 2, tty);
ffc0669c: 38 80 00 02 li r4,2
ffc066a0: 38 61 00 08 addi r3,r1,8
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
ffc066a4: 98 01 00 08 stb r0,8(r1)
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
ffc066a8: 7f e5 fb 78 mr r5,r31
ffc066ac: 4b ff fd 0d bl ffc063b8 <rtems_termios_puts>
tty->column += 2;
ffc066b0: 81 3f 00 28 lwz r9,40(r31)
ffc066b4: 38 09 00 02 addi r0,r9,2
ffc066b8: 90 1f 00 28 stw r0,40(r31)
ffc066bc: 48 00 00 0c b ffc066c8 <echo+0x84>
} else {
oproc (c, tty);
ffc066c0: 7f e4 fb 78 mr r4,r31
ffc066c4: 4b ff fe 15 bl ffc064d8 <oproc>
}
}
ffc066c8: 39 61 00 20 addi r11,r1,32
ffc066cc: 4b ff 9e 68 b ffc00534 <_restgpr_31_x>
ffc05548 <endgrent>:
void endgrent(void)
{
if (group_fp != NULL)
ffc05548: 3d 20 00 00 lis r9,0
fclose(group_fp);
group_fp = fopen("/etc/group", "r");
}
void endgrent(void)
{
ffc0554c: 94 21 ff f8 stwu r1,-8(r1)
ffc05550: 7c 08 02 a6 mflr r0
if (group_fp != NULL)
ffc05554: 80 69 2a 1c lwz r3,10780(r9)
fclose(group_fp);
group_fp = fopen("/etc/group", "r");
}
void endgrent(void)
{
ffc05558: 90 01 00 0c stw r0,12(r1)
if (group_fp != NULL)
ffc0555c: 2f 83 00 00 cmpwi cr7,r3,0
ffc05560: 41 9e 00 08 beq- cr7,ffc05568 <endgrent+0x20> <== NEVER TAKEN
fclose(group_fp);
ffc05564: 48 00 b2 a9 bl ffc1080c <fclose>
}
ffc05568: 80 01 00 0c lwz r0,12(r1)
ffc0556c: 38 21 00 08 addi r1,r1,8
ffc05570: 7c 08 03 a6 mtlr r0
ffc05574: 4e 80 00 20 blr
ffc05388 <endpwent>:
void endpwent(void)
{
if (passwd_fp != NULL)
ffc05388: 3d 20 00 00 lis r9,0
fclose(passwd_fp);
passwd_fp = fopen("/etc/passwd", "r");
}
void endpwent(void)
{
ffc0538c: 94 21 ff f8 stwu r1,-8(r1)
ffc05390: 7c 08 02 a6 mflr r0
if (passwd_fp != NULL)
ffc05394: 80 69 29 40 lwz r3,10560(r9)
fclose(passwd_fp);
passwd_fp = fopen("/etc/passwd", "r");
}
void endpwent(void)
{
ffc05398: 90 01 00 0c stw r0,12(r1)
if (passwd_fp != NULL)
ffc0539c: 2f 83 00 00 cmpwi cr7,r3,0
ffc053a0: 41 9e 00 08 beq- cr7,ffc053a8 <endpwent+0x20> <== NEVER TAKEN
fclose(passwd_fp);
ffc053a4: 48 00 b4 69 bl ffc1080c <fclose>
}
ffc053a8: 80 01 00 0c lwz r0,12(r1)
ffc053ac: 38 21 00 08 addi r1,r1,8
ffc053b0: 7c 08 03 a6 mtlr r0
ffc053b4: 4e 80 00 20 blr
ffc066d0 <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)
{
ffc066d0: 94 21 ff e0 stwu r1,-32(r1)
ffc066d4: 7c 08 02 a6 mflr r0
ffc066d8: 7d 80 00 26 mfcr r12
ffc066dc: 90 01 00 24 stw r0,36(r1)
if (tty->ccount == 0)
ffc066e0: 80 03 00 20 lwz r0,32(r3)
* 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)
{
ffc066e4: bf 61 00 0c stmw r27,12(r1)
ffc066e8: 7c 7f 1b 78 mr r31,r3
if (tty->ccount == 0)
ffc066ec: 2f 80 00 00 cmpwi cr7,r0,0
* 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)
{
ffc066f0: 91 81 00 08 stw r12,8(r1)
if (tty->ccount == 0)
ffc066f4: 41 9e 01 d8 beq- cr7,ffc068cc <erase+0x1fc>
return;
if (lineFlag) {
ffc066f8: 2f 84 00 00 cmpwi cr7,r4,0
ffc066fc: 41 9e 01 ac beq- cr7,ffc068a8 <erase+0x1d8>
if (!(tty->termios.c_lflag & ECHO)) {
ffc06700: 80 03 00 3c lwz r0,60(r3)
ffc06704: 70 09 00 08 andi. r9,r0,8
ffc06708: 40 a2 00 0c bne+ ffc06714 <erase+0x44> <== ALWAYS TAKEN
tty->ccount = 0;
ffc0670c: 91 23 00 20 stw r9,32(r3) <== NOT EXECUTED
return;
ffc06710: 48 00 01 bc b ffc068cc <erase+0x1fc> <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
ffc06714: 70 00 00 10 andi. r0,r0,16
ffc06718: 40 a2 01 90 bne+ ffc068a8 <erase+0x1d8> <== ALWAYS TAKEN
tty->ccount = 0;
ffc0671c: 90 03 00 20 stw r0,32(r3) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
ffc06720: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc06724: 88 63 00 44 lbz r3,68(r3) <== NOT EXECUTED
ffc06728: 4b ff ff 1d bl ffc06644 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
ffc0672c: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED
echo ('\n', tty);
ffc06730: 38 60 00 0a li r3,10 <== NOT EXECUTED
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
ffc06734: 70 07 00 20 andi. r7,r0,32 <== NOT EXECUTED
ffc06738: 41 a2 01 94 beq+ ffc068cc <erase+0x1fc> <== NOT EXECUTED
ffc0673c: 48 00 00 30 b ffc0676c <erase+0x9c> <== NOT EXECUTED
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
ffc06740: 80 1f 00 3c lwz r0,60(r31)
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
ffc06744: 39 29 ff ff addi r9,r9,-1
ffc06748: 81 5f 00 1c lwz r10,28(r31)
if (tty->termios.c_lflag & ECHO) {
ffc0674c: 70 0b 00 08 andi. r11,r0,8
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
ffc06750: 91 3f 00 20 stw r9,32(r31)
ffc06754: 7f ca 48 ae lbzx r30,r10,r9
if (tty->termios.c_lflag & ECHO) {
ffc06758: 41 82 01 48 beq- ffc068a0 <erase+0x1d0> <== NEVER TAKEN
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
ffc0675c: 40 92 00 30 bne- cr4,ffc0678c <erase+0xbc>
ffc06760: 70 07 00 10 andi. r7,r0,16
ffc06764: 40 a2 00 28 bne+ ffc0678c <erase+0xbc> <== ALWAYS TAKEN
echo (tty->termios.c_cc[VERASE], tty);
ffc06768: 88 7f 00 43 lbz r3,67(r31) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
ffc0676c: 80 01 00 24 lwz r0,36(r1) <== 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);
ffc06770: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
ffc06774: 81 81 00 08 lwz r12,8(r1) <== NOT EXECUTED
ffc06778: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc0677c: bb 61 00 0c lmw r27,12(r1) <== NOT EXECUTED
ffc06780: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED
ffc06784: 7d 80 81 20 mtcrf 8,r12 <== 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);
ffc06788: 4b ff fe bc b ffc06644 <echo> <== NOT EXECUTED
} else if (c == '\t') {
ffc0678c: 2f 9e 00 09 cmpwi cr7,r30,9
ffc06790: 40 be 00 90 bne+ cr7,ffc06820 <erase+0x150>
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
ffc06794: 39 29 00 01 addi r9,r9,1
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;
ffc06798: 83 df 00 2c lwz r30,44(r31)
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
ffc0679c: 81 1d 27 44 lwz r8,10052(r29)
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;
int i = 0;
ffc067a0: 39 60 00 00 li r11,0
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
ffc067a4: 70 07 02 00 andi. r7,r0,512
ffc067a8: 7d 29 03 a6 mtctr r9
ffc067ac: 48 00 00 40 b ffc067ec <erase+0x11c>
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
ffc067b0: 7c 0a 58 ae lbzx r0,r10,r11
ffc067b4: 39 6b 00 01 addi r11,r11,1
if (c == '\t') {
ffc067b8: 2f 80 00 09 cmpwi cr7,r0,9
ffc067bc: 40 be 00 0c bne+ cr7,ffc067c8 <erase+0xf8>
col = (col | 7) + 1;
ffc067c0: 63 de 00 07 ori r30,r30,7
ffc067c4: 48 00 00 24 b ffc067e8 <erase+0x118>
} else if (iscntrl (c)) {
ffc067c8: 7d 28 02 14 add r9,r8,r0
ffc067cc: 88 09 00 01 lbz r0,1(r9)
ffc067d0: 54 09 df fe rlwinm r9,r0,27,31,31
ffc067d4: 2f 89 00 00 cmpwi cr7,r9,0
ffc067d8: 41 9e 00 10 beq- cr7,ffc067e8 <erase+0x118> <== ALWAYS TAKEN
if (tty->termios.c_lflag & ECHOCTL)
ffc067dc: 41 82 00 10 beq- ffc067ec <erase+0x11c> <== NOT EXECUTED
col += 2;
ffc067e0: 3b de 00 02 addi r30,r30,2 <== NOT EXECUTED
ffc067e4: 48 00 00 08 b ffc067ec <erase+0x11c> <== NOT EXECUTED
} else {
col++;
ffc067e8: 3b de 00 01 addi r30,r30,1
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
ffc067ec: 42 00 ff c4 bdnz+ ffc067b0 <erase+0xe0>
ffc067f0: 48 00 00 20 b ffc06810 <erase+0x140>
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
ffc067f4: 7f 63 db 78 mr r3,r27
ffc067f8: 38 80 00 01 li r4,1
ffc067fc: 7f e5 fb 78 mr r5,r31
ffc06800: 4b ff fb b9 bl ffc063b8 <rtems_termios_puts>
tty->column--;
ffc06804: 81 3f 00 28 lwz r9,40(r31)
ffc06808: 38 09 ff ff addi r0,r9,-1
ffc0680c: 90 1f 00 28 stw r0,40(r31)
}
/*
* Back up over the tab
*/
while (tty->column > col) {
ffc06810: 80 1f 00 28 lwz r0,40(r31)
ffc06814: 7f 80 f0 00 cmpw cr7,r0,r30
ffc06818: 41 9d ff dc bgt+ cr7,ffc067f4 <erase+0x124>
ffc0681c: 48 00 00 84 b ffc068a0 <erase+0x1d0>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
ffc06820: 81 3d 27 44 lwz r9,10052(r29)
ffc06824: 3b de 00 01 addi r30,r30,1
ffc06828: 7d 29 f0 ae lbzx r9,r9,r30
ffc0682c: 71 2b 00 20 andi. r11,r9,32
ffc06830: 41 82 00 30 beq- ffc06860 <erase+0x190> <== ALWAYS TAKEN
ffc06834: 70 07 02 00 andi. r7,r0,512 <== NOT EXECUTED
ffc06838: 41 a2 00 28 beq+ ffc06860 <erase+0x190> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
ffc0683c: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc06840: 38 80 00 03 li r4,3 <== NOT EXECUTED
ffc06844: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED
ffc06848: 4b ff fb 71 bl ffc063b8 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
ffc0684c: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED
ffc06850: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc06854: 41 9e 00 0c beq- cr7,ffc06860 <erase+0x190> <== NOT EXECUTED
tty->column--;
ffc06858: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED
ffc0685c: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
ffc06860: 81 3d 27 44 lwz r9,10052(r29)
ffc06864: 7c 09 f0 ae lbzx r0,r9,r30
ffc06868: 70 09 00 20 andi. r9,r0,32
ffc0686c: 41 82 00 10 beq- ffc0687c <erase+0x1ac> <== ALWAYS TAKEN
ffc06870: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED
ffc06874: 70 0b 02 00 andi. r11,r0,512 <== NOT EXECUTED
ffc06878: 41 82 00 28 beq- ffc068a0 <erase+0x1d0> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
ffc0687c: 7f 83 e3 78 mr r3,r28
ffc06880: 38 80 00 03 li r4,3
ffc06884: 7f e5 fb 78 mr r5,r31
ffc06888: 4b ff fb 31 bl ffc063b8 <rtems_termios_puts>
if (tty->column)
ffc0688c: 81 3f 00 28 lwz r9,40(r31)
ffc06890: 2f 89 00 00 cmpwi cr7,r9,0
ffc06894: 41 9e 00 0c beq- cr7,ffc068a0 <erase+0x1d0> <== NEVER TAKEN
tty->column--;
ffc06898: 39 29 ff ff addi r9,r9,-1
ffc0689c: 91 3f 00 28 stw r9,40(r31)
}
}
}
if (!lineFlag)
ffc068a0: 40 b2 00 20 bne+ cr4,ffc068c0 <erase+0x1f0>
ffc068a4: 48 00 00 28 b ffc068cc <erase+0x1fc>
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
ffc068a8: 2e 04 00 00 cmpwi cr4,r4,0
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);
ffc068ac: 3f 80 ff c2 lis r28,-62
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
ffc068b0: 3f 60 ff c2 lis r27,-62
ffc068b4: 3f a0 00 00 lis r29,0
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);
ffc068b8: 3b 9c c3 08 addi r28,r28,-15608
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
ffc068bc: 3b 7b c3 0a addi r27,r27,-15606
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
ffc068c0: 81 3f 00 20 lwz r9,32(r31)
ffc068c4: 2f 89 00 00 cmpwi cr7,r9,0
ffc068c8: 40 9e fe 78 bne+ cr7,ffc06740 <erase+0x70>
}
}
if (!lineFlag)
break;
}
}
ffc068cc: 81 81 00 08 lwz r12,8(r1)
ffc068d0: 39 61 00 20 addi r11,r1,32
ffc068d4: 7d 80 81 20 mtcrf 8,r12
ffc068d8: 4b ff 9c 4c b ffc00524 <_restgpr_27_x>
ffc04e3c <fcntl>:
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
ffc04e3c: 3d 20 00 00 lis r9,0
int fcntl(
int fd,
int cmd,
...
)
{
ffc04e40: 94 21 ff c8 stwu r1,-56(r1)
ffc04e44: 7c 08 02 a6 mflr r0
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
ffc04e48: 81 09 26 dc lwz r8,9948(r9)
int fcntl(
int fd,
int cmd,
...
)
{
ffc04e4c: 90 01 00 3c stw r0,60(r1)
int ret;
va_list ap;
va_start( ap, cmd );
ffc04e50: 38 00 00 02 li r0,2
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
ffc04e54: 7f 83 40 40 cmplw cr7,r3,r8
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
ffc04e58: 98 01 00 08 stb r0,8(r1)
ffc04e5c: 38 01 00 40 addi r0,r1,64
ffc04e60: 90 01 00 0c stw r0,12(r1)
ffc04e64: 38 01 00 10 addi r0,r1,16
int fcntl(
int fd,
int cmd,
...
)
{
ffc04e68: bf a1 00 2c stmw r29,44(r1)
ffc04e6c: 7c 9e 23 78 mr r30,r4
ffc04e70: 90 a1 00 18 stw r5,24(r1)
ffc04e74: 90 c1 00 1c stw r6,28(r1)
ffc04e78: 90 e1 00 20 stw r7,32(r1)
int ret;
va_list ap;
va_start( ap, cmd );
ffc04e7c: 90 01 00 10 stw r0,16(r1)
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
ffc04e80: 40 9c 00 20 bge- cr7,ffc04ea0 <fcntl+0x64>
iop = rtems_libio_iop( fd );
ffc04e84: 3d 20 00 00 lis r9,0
ffc04e88: 81 49 27 88 lwz r10,10120(r9)
ffc04e8c: 54 7f 30 32 rlwinm r31,r3,6,0,25
ffc04e90: 7f ea fa 14 add r31,r10,r31
rtems_libio_check_is_open(iop);
ffc04e94: 80 7f 00 18 lwz r3,24(r31)
ffc04e98: 70 60 01 00 andi. r0,r3,256
ffc04e9c: 40 a2 00 10 bne+ ffc04eac <fcntl+0x70>
ffc04ea0: 48 00 b9 25 bl ffc107c4 <__errno>
ffc04ea4: 38 00 00 09 li r0,9
ffc04ea8: 48 00 01 80 b ffc05028 <fcntl+0x1ec>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
ffc04eac: 2b 84 00 09 cmplwi cr7,r4,9
ffc04eb0: 41 9d 01 70 bgt- cr7,ffc05020 <fcntl+0x1e4>
ffc04eb4: 3d 20 ff c2 lis r9,-62
ffc04eb8: 39 29 80 d4 addi r9,r9,-32556
ffc04ebc: 54 80 10 3a rlwinm r0,r4,2,0,29
ffc04ec0: 7c 09 00 2e lwzx r0,r9,r0
ffc04ec4: 7d 20 4a 14 add r9,r0,r9
ffc04ec8: 7d 29 03 a6 mtctr r9
ffc04ecc: 4e 80 04 20 bctr
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
ffc04ed0: 89 61 00 08 lbz r11,8(r1)
ffc04ed4: 2b 8b 00 07 cmplwi cr7,r11,7
ffc04ed8: 41 9d 00 1c bgt- cr7,ffc04ef4 <fcntl+0xb8> <== NEVER TAKEN
ffc04edc: 81 21 00 10 lwz r9,16(r1)
ffc04ee0: 55 60 10 3a rlwinm r0,r11,2,0,29
ffc04ee4: 39 6b 00 01 addi r11,r11,1
ffc04ee8: 7d 29 02 14 add r9,r9,r0
ffc04eec: 99 61 00 08 stb r11,8(r1)
ffc04ef0: 48 00 00 10 b ffc04f00 <fcntl+0xc4>
ffc04ef4: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED
ffc04ef8: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED
ffc04efc: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED
ffc04f00: 80 09 00 00 lwz r0,0(r9)
if ( fd2 )
ffc04f04: 2f 80 00 00 cmpwi cr7,r0,0
ffc04f08: 41 9e 00 1c beq- cr7,ffc04f24 <fcntl+0xe8>
diop = rtems_libio_iop( fd2 );
ffc04f0c: 7f 80 40 40 cmplw cr7,r0,r8
ffc04f10: 38 60 00 00 li r3,0
ffc04f14: 40 9c 00 1c bge- cr7,ffc04f30 <fcntl+0xf4> <== NEVER TAKEN
ffc04f18: 54 03 30 32 rlwinm r3,r0,6,0,25
ffc04f1c: 7c 6a 1a 14 add r3,r10,r3
ffc04f20: 48 00 00 10 b ffc04f30 <fcntl+0xf4>
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
ffc04f24: 48 00 06 e1 bl ffc05604 <rtems_libio_allocate>
if ( diop == 0 ) {
ffc04f28: 2c 03 00 00 cmpwi r3,0
ffc04f2c: 41 82 01 34 beq- ffc05060 <fcntl+0x224> <== NEVER TAKEN
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ffc04f30: 39 63 00 1c addi r11,r3,28
ret = -1;
break;
}
}
diop->flags = iop->flags;
ffc04f34: 80 1f 00 18 lwz r0,24(r31)
diop->pathinfo = iop->pathinfo;
ffc04f38: 38 9f 00 1c addi r4,r31,28
ffc04f3c: 7c a4 a4 aa lswi r5,r4,20
ffc04f40: 7c ab a5 aa stswi r5,r11,20
ret = (int) (diop - rtems_libio_iops);
ffc04f44: 3d 20 00 00 lis r9,0
ffc04f48: 83 a9 27 88 lwz r29,10120(r9)
ret = -1;
break;
}
}
diop->flags = iop->flags;
ffc04f4c: 90 03 00 18 stw r0,24(r3)
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
ffc04f50: 7c 7d 18 50 subf r3,r29,r3
ffc04f54: 7c 7d 36 70 srawi r29,r3,6
ffc04f58: 48 00 00 d8 b ffc05030 <fcntl+0x1f4>
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
ffc04f5c: 54 7d af fe rlwinm r29,r3,21,31,31
ffc04f60: 48 00 00 d8 b ffc05038 <fcntl+0x1fc>
* 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 ) )
ffc04f64: 89 61 00 08 lbz r11,8(r1)
ffc04f68: 2b 8b 00 07 cmplwi cr7,r11,7
ffc04f6c: 41 9d 00 1c bgt- cr7,ffc04f88 <fcntl+0x14c> <== NEVER TAKEN
ffc04f70: 81 21 00 10 lwz r9,16(r1)
ffc04f74: 55 60 10 3a rlwinm r0,r11,2,0,29
ffc04f78: 39 6b 00 01 addi r11,r11,1
ffc04f7c: 7d 29 02 14 add r9,r9,r0
ffc04f80: 99 61 00 08 stb r11,8(r1)
ffc04f84: 48 00 00 10 b ffc04f94 <fcntl+0x158>
ffc04f88: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED
ffc04f8c: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED
ffc04f90: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED
ffc04f94: 80 09 00 00 lwz r0,0(r9)
ffc04f98: 2f 80 00 00 cmpwi cr7,r0,0
ffc04f9c: 41 9e 00 0c beq- cr7,ffc04fa8 <fcntl+0x16c>
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
ffc04fa0: 60 63 08 00 ori r3,r3,2048
ffc04fa4: 48 00 00 64 b ffc05008 <fcntl+0x1cc>
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
ffc04fa8: 54 63 05 66 rlwinm r3,r3,0,21,19
ffc04fac: 48 00 00 5c b ffc05008 <fcntl+0x1cc>
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
ffc04fb0: 48 00 06 09 bl ffc055b8 <rtems_libio_to_fcntl_flags>
ffc04fb4: 7c 7d 1b 78 mr r29,r3
ffc04fb8: 48 00 00 78 b ffc05030 <fcntl+0x1f4>
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
ffc04fbc: 89 61 00 08 lbz r11,8(r1)
ffc04fc0: 2b 8b 00 07 cmplwi cr7,r11,7
ffc04fc4: 41 9d 00 1c bgt- cr7,ffc04fe0 <fcntl+0x1a4> <== NEVER TAKEN
ffc04fc8: 81 21 00 10 lwz r9,16(r1)
ffc04fcc: 55 60 10 3a rlwinm r0,r11,2,0,29
ffc04fd0: 39 6b 00 01 addi r11,r11,1
ffc04fd4: 7d 29 02 14 add r9,r9,r0
ffc04fd8: 99 61 00 08 stb r11,8(r1)
ffc04fdc: 48 00 00 10 b ffc04fec <fcntl+0x1b0>
ffc04fe0: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED
ffc04fe4: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED
ffc04fe8: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED
ffc04fec: 80 69 00 00 lwz r3,0(r9)
ffc04ff0: 48 00 05 85 bl ffc05574 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
ffc04ff4: 80 1f 00 18 lwz r0,24(r31)
ffc04ff8: 70 63 02 01 andi. r3,r3,513
ffc04ffc: 39 20 fd fe li r9,-514
ffc05000: 7d 20 00 38 and r0,r9,r0
ffc05004: 7c 63 03 78 or r3,r3,r0
ffc05008: 90 7f 00 18 stw r3,24(r31)
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
ffc0500c: 3b a0 00 00 li r29,0
ffc05010: 48 00 00 28 b ffc05038 <fcntl+0x1fc>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
ffc05014: 48 00 b7 b1 bl ffc107c4 <__errno>
ffc05018: 38 00 00 86 li r0,134
ffc0501c: 48 00 00 0c b ffc05028 <fcntl+0x1ec>
ret = -1;
break;
default:
errno = EINVAL;
ffc05020: 48 00 b7 a5 bl ffc107c4 <__errno>
ffc05024: 38 00 00 16 li r0,22
ffc05028: 90 03 00 00 stw r0,0(r3)
ffc0502c: 48 00 00 34 b ffc05060 <fcntl+0x224>
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
ffc05030: 2f 9d 00 00 cmpwi cr7,r29,0
ffc05034: 41 9c 00 30 blt- cr7,ffc05064 <fcntl+0x228> <== NEVER TAKEN
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
ffc05038: 81 3f 00 24 lwz r9,36(r31)
ffc0503c: 7f e4 fb 78 mr r4,r31
ffc05040: 7f c3 f3 78 mr r3,r30
ffc05044: 80 09 00 30 lwz r0,48(r9)
ffc05048: 7c 09 03 a6 mtctr r0
ffc0504c: 4e 80 04 21 bctrl
if (err) {
ffc05050: 7c 7f 1b 79 mr. r31,r3
ffc05054: 41 a2 00 10 beq+ ffc05064 <fcntl+0x228> <== ALWAYS TAKEN
errno = err;
ffc05058: 48 00 b7 6d bl ffc107c4 <__errno> <== NOT EXECUTED
ffc0505c: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED
ret = -1;
ffc05060: 3b a0 ff ff li r29,-1
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
ffc05064: 39 61 00 38 addi r11,r1,56
ffc05068: 7f a3 eb 78 mr r3,r29
ffc0506c: 4b ff bc 5c b ffc00cc8 <_restgpr_29_x>
ffc0e8e8 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
ffc0e8e8: 94 21 ff d0 stwu r1,-48(r1)
ffc0e8ec: 7c 08 02 a6 mflr r0
ffc0e8f0: bf 61 00 1c stmw r27,28(r1)
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
ffc0e8f4: 3f c0 00 00 lis r30,0
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
ffc0e8f8: 7c 7d 1b 78 mr r29,r3
ffc0e8fc: 90 01 00 34 stw r0,52(r1)
ffc0e900: 7c 9c 23 78 mr r28,r4
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
ffc0e904: 3b fe 29 60 addi r31,r30,10592
ffc0e908: 80 1e 29 60 lwz r0,10592(r30)
ffc0e90c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e910: 40 be 00 60 bne+ cr7,ffc0e970 <fifo_open+0x88>
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 );
ffc0e914: 3d 20 00 00 lis r9,0
ffc0e918: 80 69 27 90 lwz r3,10128(r9)
ffc0e91c: 38 80 00 00 li r4,0
ffc0e920: 38 a0 00 00 li r5,0
ffc0e924: 4b ff b3 25 bl ffc09c48 <rtems_semaphore_obtain>
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
ffc0e928: 80 1e 29 60 lwz r0,10592(r30)
free(pipe);
}
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
ffc0e92c: 3b 60 00 00 li r27,0
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
ffc0e930: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e934: 40 be 00 24 bne+ cr7,ffc0e958 <fifo_open+0x70> <== NEVER TAKEN
sc = rtems_semaphore_create(
ffc0e938: 3c 60 50 49 lis r3,20553
ffc0e93c: 60 63 50 45 ori r3,r3,20549
ffc0e940: 38 80 00 01 li r4,1
ffc0e944: 38 a0 00 54 li r5,84
ffc0e948: 38 c0 00 00 li r6,0
ffc0e94c: 7f e7 fb 78 mr r7,r31
ffc0e950: 4b ff b0 85 bl ffc099d4 <rtems_semaphore_create>
ffc0e954: 7c 7b 1b 78 mr r27,r3
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
ffc0e958: 3d 20 00 00 lis r9,0
ffc0e95c: 80 69 27 90 lwz r3,10128(r9)
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
ffc0e960: 3b c0 ff f4 li r30,-12
ffc0e964: 4b ff b4 11 bl ffc09d74 <rtems_semaphore_release>
ffc0e968: 2f 9b 00 00 cmpwi cr7,r27,0
ffc0e96c: 40 be 03 3c bne+ cr7,ffc0eca8 <fifo_open+0x3c0>
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc0e970: 3d 20 00 00 lis r9,0
ffc0e974: 80 69 29 60 lwz r3,10592(r9)
ffc0e978: 38 80 00 00 li r4,0
ffc0e97c: 38 a0 00 00 li r5,0
ffc0e980: 4b ff b2 c9 bl ffc09c48 <rtems_semaphore_obtain>
}
if (sc == RTEMS_SUCCESSFUL) {
ffc0e984: 3b c0 ff f4 li r30,-12
ffc0e988: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e98c: 40 9e 03 1c bne- cr7,ffc0eca8 <fifo_open+0x3c0> <== NEVER TAKEN
err = pipe_lock();
if (err)
return err;
pipe = *pipep;
ffc0e990: 83 fd 00 00 lwz r31,0(r29)
if (pipe == NULL) {
ffc0e994: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0e998: 40 be 00 f8 bne+ cr7,ffc0ea90 <fifo_open+0x1a8>
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
ffc0e99c: 38 60 00 34 li r3,52
ffc0e9a0: 4b ff 7e 7d bl ffc0681c <malloc>
if (pipe == NULL)
ffc0e9a4: 7c 7f 1b 79 mr. r31,r3
ffc0e9a8: 41 82 00 e0 beq- ffc0ea88 <fifo_open+0x1a0>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
ffc0e9ac: 38 80 00 00 li r4,0
ffc0e9b0: 38 a0 00 34 li r5,52
ffc0e9b4: 48 00 40 9d bl ffc12a50 <memset>
pipe->Size = PIPE_BUF;
ffc0e9b8: 38 00 02 00 li r0,512
ffc0e9bc: 90 1f 00 04 stw r0,4(r31)
pipe->Buffer = malloc(pipe->Size);
ffc0e9c0: 38 60 02 00 li r3,512
ffc0e9c4: 4b ff 7e 59 bl ffc0681c <malloc>
if (! pipe->Buffer)
ffc0e9c8: 2f 83 00 00 cmpwi cr7,r3,0
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
ffc0e9cc: 90 7f 00 00 stw r3,0(r31)
if (! pipe->Buffer)
ffc0e9d0: 41 9e 00 b0 beq- cr7,ffc0ea80 <fifo_open+0x198> <== NEVER TAKEN
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
ffc0e9d4: 3f c0 00 00 lis r30,0
ffc0e9d8: 88 7e 21 b5 lbz r3,8629(r30)
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
ffc0e9dc: 38 80 00 00 li r4,0
ffc0e9e0: 38 a0 00 00 li r5,0
ffc0e9e4: 64 63 50 49 oris r3,r3,20553
ffc0e9e8: 60 63 72 00 ori r3,r3,29184
ffc0e9ec: 38 df 00 2c addi r6,r31,44
ffc0e9f0: 48 00 11 09 bl ffc0faf8 <rtems_barrier_create>
ffc0e9f4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e9f8: 40 9e 00 80 bne- cr7,ffc0ea78 <fifo_open+0x190>
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
ffc0e9fc: 88 7e 21 b5 lbz r3,8629(r30)
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
ffc0ea00: 38 80 00 00 li r4,0
ffc0ea04: 38 a0 00 00 li r5,0
ffc0ea08: 64 63 50 49 oris r3,r3,20553
ffc0ea0c: 60 63 77 00 ori r3,r3,30464
ffc0ea10: 38 df 00 30 addi r6,r31,48
ffc0ea14: 48 00 10 e5 bl ffc0faf8 <rtems_barrier_create>
ffc0ea18: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ea1c: 40 9e 00 54 bne- cr7,ffc0ea70 <fifo_open+0x188>
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
rtems_build_name ('P', 'I', 's', c), 1,
ffc0ea20: 88 7e 21 b5 lbz r3,8629(r30)
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
ffc0ea24: 38 80 00 01 li r4,1
ffc0ea28: 38 a0 00 10 li r5,16
ffc0ea2c: 64 63 50 49 oris r3,r3,20553
ffc0ea30: 60 63 73 00 ori r3,r3,29440
ffc0ea34: 38 c0 00 00 li r6,0
ffc0ea38: 38 ff 00 28 addi r7,r31,40
ffc0ea3c: 4b ff af 99 bl ffc099d4 <rtems_semaphore_create>
ffc0ea40: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ea44: 40 9e 00 24 bne- cr7,ffc0ea68 <fifo_open+0x180>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
ffc0ea48: 89 3e 21 b5 lbz r9,8629(r30)
ffc0ea4c: 2f 89 00 7a cmpwi cr7,r9,122
ffc0ea50: 38 09 00 01 addi r0,r9,1
ffc0ea54: 98 1e 21 b5 stb r0,8629(r30)
ffc0ea58: 40 be 00 38 bne+ cr7,ffc0ea90 <fifo_open+0x1a8>
c = 'a';
ffc0ea5c: 38 00 00 61 li r0,97
ffc0ea60: 98 1e 21 b5 stb r0,8629(r30)
ffc0ea64: 48 00 00 2c b ffc0ea90 <fifo_open+0x1a8>
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
ffc0ea68: 80 7f 00 30 lwz r3,48(r31)
ffc0ea6c: 48 00 11 5d bl ffc0fbc8 <rtems_barrier_delete>
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
ffc0ea70: 80 7f 00 2c lwz r3,44(r31)
ffc0ea74: 48 00 11 55 bl ffc0fbc8 <rtems_barrier_delete>
err_rbar:
free(pipe->Buffer);
ffc0ea78: 80 7f 00 00 lwz r3,0(r31)
ffc0ea7c: 4b ff 75 69 bl ffc05fe4 <free>
err_buf:
free(pipe);
ffc0ea80: 7f e3 fb 78 mr r3,r31
ffc0ea84: 4b ff 75 61 bl ffc05fe4 <free>
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
ffc0ea88: 3b c0 ff f4 li r30,-12
ffc0ea8c: 48 00 00 48 b ffc0ead4 <fifo_open+0x1ec>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
ffc0ea90: 80 7f 00 28 lwz r3,40(r31)
ffc0ea94: 38 80 00 00 li r4,0
ffc0ea98: 38 a0 00 00 li r5,0
ffc0ea9c: 4b ff b1 ad bl ffc09c48 <rtems_semaphore_obtain>
err = -EINTR;
ffc0eaa0: 3b c0 ff fc li r30,-4
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
ffc0eaa4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0eaa8: 40 9e 00 08 bne- cr7,ffc0eab0 <fifo_open+0x1c8> <== NEVER TAKEN
ffc0eaac: 3b c0 00 00 li r30,0
err = -EINTR;
if (*pipep == NULL) {
ffc0eab0: 80 1d 00 00 lwz r0,0(r29)
ffc0eab4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0eab8: 40 be 00 1c bne+ cr7,ffc0ead4 <fifo_open+0x1ec>
if (err)
ffc0eabc: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0eac0: 41 be 00 10 beq+ cr7,ffc0ead0 <fifo_open+0x1e8> <== ALWAYS TAKEN
pipe_free(pipe);
ffc0eac4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0eac8: 4b ff fd 1d bl ffc0e7e4 <pipe_free> <== NOT EXECUTED
ffc0eacc: 48 00 00 08 b ffc0ead4 <fifo_open+0x1ec> <== NOT EXECUTED
else
*pipep = pipe;
ffc0ead0: 93 fd 00 00 stw r31,0(r29)
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
ffc0ead4: 3d 20 00 00 lis r9,0
ffc0ead8: 80 69 29 60 lwz r3,10592(r9)
ffc0eadc: 4b ff b2 99 bl ffc09d74 <rtems_semaphore_release>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
ffc0eae0: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0eae4: 40 9e 01 c4 bne- cr7,ffc0eca8 <fifo_open+0x3c0>
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
ffc0eae8: 80 1c 00 18 lwz r0,24(r28)
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
ffc0eaec: 83 fd 00 00 lwz r31,0(r29)
switch (LIBIO_ACCMODE(iop)) {
ffc0eaf0: 54 00 07 7c rlwinm r0,r0,0,29,30
ffc0eaf4: 2f 80 00 04 cmpwi cr7,r0,4
ffc0eaf8: 41 9e 00 a0 beq- cr7,ffc0eb98 <fifo_open+0x2b0>
ffc0eafc: 2f 80 00 06 cmpwi cr7,r0,6
ffc0eb00: 41 9e 01 34 beq- cr7,ffc0ec34 <fifo_open+0x34c>
ffc0eb04: 2f 80 00 02 cmpwi cr7,r0,2
ffc0eb08: 40 be 01 84 bne+ cr7,ffc0ec8c <fifo_open+0x3a4> <== NEVER TAKEN
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
ffc0eb0c: 81 3f 00 20 lwz r9,32(r31)
ffc0eb10: 38 09 00 01 addi r0,r9,1
if (pipe->Readers ++ == 0)
ffc0eb14: 81 3f 00 10 lwz r9,16(r31)
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
ffc0eb18: 90 1f 00 20 stw r0,32(r31)
if (pipe->Readers ++ == 0)
ffc0eb1c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0eb20: 38 09 00 01 addi r0,r9,1
ffc0eb24: 90 1f 00 10 stw r0,16(r31)
ffc0eb28: 40 be 00 10 bne+ cr7,ffc0eb38 <fifo_open+0x250> <== NEVER TAKEN
PIPE_WAKEUPWRITERS(pipe);
ffc0eb2c: 80 7f 00 30 lwz r3,48(r31)
ffc0eb30: 38 81 00 08 addi r4,r1,8
ffc0eb34: 48 00 11 4d bl ffc0fc80 <rtems_barrier_release>
if (pipe->Writers == 0) {
ffc0eb38: 80 1f 00 14 lwz r0,20(r31)
ffc0eb3c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0eb40: 40 9e 01 4c bne- cr7,ffc0ec8c <fifo_open+0x3a4>
/* Not an error */
if (LIBIO_NODELAY(iop))
ffc0eb44: 80 1c 00 18 lwz r0,24(r28)
ffc0eb48: 70 09 00 01 andi. r9,r0,1
ffc0eb4c: 40 82 01 40 bne- ffc0ec8c <fifo_open+0x3a4>
break;
prevCounter = pipe->writerCounter;
ffc0eb50: 83 7f 00 24 lwz r27,36(r31)
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
ffc0eb54: 80 7f 00 28 lwz r3,40(r31)
ffc0eb58: 4b ff b2 1d bl ffc09d74 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
ffc0eb5c: 80 7f 00 2c lwz r3,44(r31)
ffc0eb60: 38 80 00 00 li r4,0
ffc0eb64: 48 00 11 89 bl ffc0fcec <rtems_barrier_wait>
ffc0eb68: 2f 83 00 00 cmpwi cr7,r3,0
ffc0eb6c: 40 9e 01 2c bne- cr7,ffc0ec98 <fifo_open+0x3b0> <== NEVER TAKEN
goto out_error;
if (! PIPE_LOCK(pipe))
ffc0eb70: 80 7f 00 28 lwz r3,40(r31)
ffc0eb74: 38 80 00 00 li r4,0
ffc0eb78: 38 a0 00 00 li r5,0
ffc0eb7c: 4b ff b0 cd bl ffc09c48 <rtems_semaphore_obtain>
ffc0eb80: 2f 83 00 00 cmpwi cr7,r3,0
ffc0eb84: 40 9e 01 14 bne- cr7,ffc0ec98 <fifo_open+0x3b0> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->writerCounter);
ffc0eb88: 80 1f 00 24 lwz r0,36(r31)
ffc0eb8c: 7f 9b 00 00 cmpw cr7,r27,r0
ffc0eb90: 41 9e ff c4 beq+ cr7,ffc0eb54 <fifo_open+0x26c> <== NEVER TAKEN
ffc0eb94: 48 00 00 f8 b ffc0ec8c <fifo_open+0x3a4>
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
ffc0eb98: 81 3f 00 24 lwz r9,36(r31)
ffc0eb9c: 38 09 00 01 addi r0,r9,1
if (pipe->Writers ++ == 0)
ffc0eba0: 81 3f 00 14 lwz r9,20(r31)
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
ffc0eba4: 90 1f 00 24 stw r0,36(r31)
if (pipe->Writers ++ == 0)
ffc0eba8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ebac: 38 09 00 01 addi r0,r9,1
ffc0ebb0: 90 1f 00 14 stw r0,20(r31)
ffc0ebb4: 40 be 00 10 bne+ cr7,ffc0ebc4 <fifo_open+0x2dc> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
ffc0ebb8: 80 7f 00 2c lwz r3,44(r31)
ffc0ebbc: 38 81 00 08 addi r4,r1,8
ffc0ebc0: 48 00 10 c1 bl ffc0fc80 <rtems_barrier_release>
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
ffc0ebc4: 80 1f 00 10 lwz r0,16(r31)
ffc0ebc8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ebcc: 40 9e 00 c0 bne- cr7,ffc0ec8c <fifo_open+0x3a4>
ffc0ebd0: 80 1c 00 18 lwz r0,24(r28)
ffc0ebd4: 70 09 00 01 andi. r9,r0,1
ffc0ebd8: 41 a2 00 14 beq+ ffc0ebec <fifo_open+0x304>
PIPE_UNLOCK(pipe);
ffc0ebdc: 80 7f 00 28 lwz r3,40(r31)
err = -ENXIO;
ffc0ebe0: 3b c0 ff fa li r30,-6
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
ffc0ebe4: 4b ff b1 91 bl ffc09d74 <rtems_semaphore_release>
err = -ENXIO;
goto out_error;
ffc0ebe8: 48 00 00 b4 b ffc0ec9c <fifo_open+0x3b4>
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
ffc0ebec: 83 7f 00 20 lwz r27,32(r31)
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
ffc0ebf0: 80 7f 00 28 lwz r3,40(r31)
ffc0ebf4: 4b ff b1 81 bl ffc09d74 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
ffc0ebf8: 80 7f 00 30 lwz r3,48(r31)
ffc0ebfc: 38 80 00 00 li r4,0
ffc0ec00: 48 00 10 ed bl ffc0fcec <rtems_barrier_wait>
ffc0ec04: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ec08: 40 9e 00 90 bne- cr7,ffc0ec98 <fifo_open+0x3b0> <== NEVER TAKEN
goto out_error;
if (! PIPE_LOCK(pipe))
ffc0ec0c: 80 7f 00 28 lwz r3,40(r31)
ffc0ec10: 38 80 00 00 li r4,0
ffc0ec14: 38 a0 00 00 li r5,0
ffc0ec18: 4b ff b0 31 bl ffc09c48 <rtems_semaphore_obtain>
ffc0ec1c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ec20: 40 9e 00 78 bne- cr7,ffc0ec98 <fifo_open+0x3b0> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->readerCounter);
ffc0ec24: 80 1f 00 20 lwz r0,32(r31)
ffc0ec28: 7f 9b 00 00 cmpw cr7,r27,r0
ffc0ec2c: 41 9e ff c4 beq+ cr7,ffc0ebf0 <fifo_open+0x308> <== NEVER TAKEN
ffc0ec30: 48 00 00 5c b ffc0ec8c <fifo_open+0x3a4>
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
ffc0ec34: 81 3f 00 20 lwz r9,32(r31)
ffc0ec38: 38 09 00 01 addi r0,r9,1
if (pipe->Readers ++ == 0)
ffc0ec3c: 81 3f 00 10 lwz r9,16(r31)
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
ffc0ec40: 90 1f 00 20 stw r0,32(r31)
if (pipe->Readers ++ == 0)
ffc0ec44: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ec48: 38 09 00 01 addi r0,r9,1
ffc0ec4c: 90 1f 00 10 stw r0,16(r31)
ffc0ec50: 40 be 00 10 bne+ cr7,ffc0ec60 <fifo_open+0x378> <== NEVER TAKEN
PIPE_WAKEUPWRITERS(pipe);
ffc0ec54: 80 7f 00 30 lwz r3,48(r31)
ffc0ec58: 38 81 00 08 addi r4,r1,8
ffc0ec5c: 48 00 10 25 bl ffc0fc80 <rtems_barrier_release>
pipe->writerCounter ++;
ffc0ec60: 81 3f 00 24 lwz r9,36(r31)
ffc0ec64: 38 09 00 01 addi r0,r9,1
if (pipe->Writers ++ == 0)
ffc0ec68: 81 3f 00 14 lwz r9,20(r31)
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
ffc0ec6c: 90 1f 00 24 stw r0,36(r31)
if (pipe->Writers ++ == 0)
ffc0ec70: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ec74: 38 09 00 01 addi r0,r9,1
ffc0ec78: 90 1f 00 14 stw r0,20(r31)
ffc0ec7c: 40 be 00 10 bne+ cr7,ffc0ec8c <fifo_open+0x3a4> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
ffc0ec80: 80 7f 00 2c lwz r3,44(r31)
ffc0ec84: 38 81 00 08 addi r4,r1,8
ffc0ec88: 48 00 0f f9 bl ffc0fc80 <rtems_barrier_release>
break;
}
PIPE_UNLOCK(pipe);
ffc0ec8c: 80 7f 00 28 lwz r3,40(r31)
ffc0ec90: 4b ff b0 e5 bl ffc09d74 <rtems_semaphore_release>
return 0;
ffc0ec94: 48 00 00 14 b ffc0eca8 <fifo_open+0x3c0>
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
ffc0ec98: 3b c0 ff fc li r30,-4 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
ffc0ec9c: 7f a3 eb 78 mr r3,r29
ffc0eca0: 7f 84 e3 78 mr r4,r28
ffc0eca4: 4b ff fb 89 bl ffc0e82c <pipe_release>
return err;
}
ffc0eca8: 39 61 00 30 addi r11,r1,48
ffc0ecac: 7f c3 f3 78 mr r3,r30
ffc0ecb0: 48 01 0e 10 b ffc1fac0 <_restgpr_27_x>
ffc050f8 <fpathconf>:
long fpathconf(
int fd,
int name
)
{
ffc050f8: 7c 08 02 a6 mflr r0
ffc050fc: 94 21 ff f8 stwu r1,-8(r1)
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
ffc05100: 3d 20 00 00 lis r9,0
long fpathconf(
int fd,
int name
)
{
ffc05104: 90 01 00 0c stw r0,12(r1)
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
ffc05108: 80 09 26 dc lwz r0,9948(r9)
ffc0510c: 7f 83 00 40 cmplw cr7,r3,r0
ffc05110: 40 9c 00 20 bge- cr7,ffc05130 <fpathconf+0x38>
iop = rtems_libio_iop(fd);
ffc05114: 3d 20 00 00 lis r9,0
ffc05118: 80 09 27 88 lwz r0,10120(r9)
ffc0511c: 54 63 30 32 rlwinm r3,r3,6,0,25
ffc05120: 7c 60 1a 14 add r3,r0,r3
rtems_libio_check_is_open(iop);
ffc05124: 80 03 00 18 lwz r0,24(r3)
ffc05128: 70 09 01 00 andi. r9,r0,256
ffc0512c: 40 a2 00 10 bne+ ffc0513c <fpathconf+0x44> <== ALWAYS TAKEN
ffc05130: 48 00 b6 95 bl ffc107c4 <__errno>
ffc05134: 38 00 00 09 li r0,9
ffc05138: 48 00 00 94 b ffc051cc <fpathconf+0xd4>
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
ffc0513c: 2b 84 00 0b cmplwi cr7,r4,11
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
ffc05140: 81 23 00 2c lwz r9,44(r3)
switch ( name ) {
ffc05144: 41 9d 00 80 bgt- cr7,ffc051c4 <fpathconf+0xcc>
ffc05148: 3d 60 ff c2 lis r11,-62
ffc0514c: 39 6b 80 fc addi r11,r11,-32516
ffc05150: 54 84 10 3a rlwinm r4,r4,2,0,29
ffc05154: 7c 0b 20 2e lwzx r0,r11,r4
ffc05158: 7d 60 5a 14 add r11,r0,r11
ffc0515c: 7d 69 03 a6 mtctr r11
ffc05160: 4e 80 04 20 bctr
case _PC_LINK_MAX:
return_value = the_limits->link_max;
ffc05164: 80 69 00 38 lwz r3,56(r9)
break;
ffc05168: 48 00 00 6c b ffc051d4 <fpathconf+0xdc>
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
ffc0516c: 80 69 00 3c lwz r3,60(r9)
break;
ffc05170: 48 00 00 64 b ffc051d4 <fpathconf+0xdc>
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
ffc05174: 80 69 00 40 lwz r3,64(r9)
break;
ffc05178: 48 00 00 5c b ffc051d4 <fpathconf+0xdc>
case _PC_NAME_MAX:
return_value = the_limits->name_max;
ffc0517c: 80 69 00 44 lwz r3,68(r9)
break;
ffc05180: 48 00 00 54 b ffc051d4 <fpathconf+0xdc>
case _PC_PATH_MAX:
return_value = the_limits->path_max;
ffc05184: 80 69 00 48 lwz r3,72(r9)
break;
ffc05188: 48 00 00 4c b ffc051d4 <fpathconf+0xdc>
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
ffc0518c: 80 69 00 4c lwz r3,76(r9)
break;
ffc05190: 48 00 00 44 b ffc051d4 <fpathconf+0xdc>
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
ffc05194: 80 69 00 54 lwz r3,84(r9)
break;
ffc05198: 48 00 00 3c b ffc051d4 <fpathconf+0xdc>
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
ffc0519c: 80 69 00 58 lwz r3,88(r9)
break;
ffc051a0: 48 00 00 34 b ffc051d4 <fpathconf+0xdc>
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
ffc051a4: 80 69 00 64 lwz r3,100(r9)
break;
ffc051a8: 48 00 00 2c b ffc051d4 <fpathconf+0xdc>
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
ffc051ac: 80 69 00 50 lwz r3,80(r9)
break;
ffc051b0: 48 00 00 24 b ffc051d4 <fpathconf+0xdc>
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
ffc051b4: 80 69 00 5c lwz r3,92(r9)
break;
ffc051b8: 48 00 00 1c b ffc051d4 <fpathconf+0xdc>
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
ffc051bc: 80 69 00 60 lwz r3,96(r9)
break;
ffc051c0: 48 00 00 14 b ffc051d4 <fpathconf+0xdc>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
ffc051c4: 48 00 b6 01 bl ffc107c4 <__errno>
ffc051c8: 38 00 00 16 li r0,22
ffc051cc: 90 03 00 00 stw r0,0(r3)
ffc051d0: 38 60 ff ff li r3,-1
break;
}
return return_value;
}
ffc051d4: 80 01 00 0c lwz r0,12(r1)
ffc051d8: 38 21 00 08 addi r1,r1,8
ffc051dc: 7c 08 03 a6 mtlr r0
ffc051e0: 4e 80 00 20 blr
ffc048c8 <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
ffc048c8: 94 21 ff f0 stwu r1,-16(r1)
ffc048cc: 7c 08 02 a6 mflr r0
MSBUMP(free_calls, 1);
ffc048d0: 3d 20 00 00 lis r9,0
#include <stdlib.h>
void free(
void *ptr
)
{
ffc048d4: 90 01 00 14 stw r0,20(r1)
MSBUMP(free_calls, 1);
ffc048d8: 39 29 2a e8 addi r9,r9,10984
#include <stdlib.h>
void free(
void *ptr
)
{
ffc048dc: bf c1 00 08 stmw r30,8(r1)
MSBUMP(free_calls, 1);
if ( !ptr )
ffc048e0: 7c 7f 1b 79 mr. r31,r3
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
ffc048e4: 81 69 00 0c lwz r11,12(r9)
ffc048e8: 38 0b 00 01 addi r0,r11,1
ffc048ec: 90 09 00 0c stw r0,12(r9)
if ( !ptr )
ffc048f0: 41 82 00 84 beq- ffc04974 <free+0xac>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
ffc048f4: 3d 20 00 00 lis r9,0
ffc048f8: 80 09 28 04 lwz r0,10244(r9)
ffc048fc: 2f 80 00 03 cmpwi cr7,r0,3
ffc04900: 40 be 00 1c bne+ cr7,ffc0491c <free+0x54> <== NEVER TAKEN
!malloc_is_system_state_OK() ) {
ffc04904: 48 00 01 c5 bl ffc04ac8 <malloc_is_system_state_OK>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
ffc04908: 2f 83 00 00 cmpwi cr7,r3,0
ffc0490c: 40 be 00 10 bne+ cr7,ffc0491c <free+0x54>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
ffc04910: 7f e3 fb 78 mr r3,r31
ffc04914: 48 00 02 39 bl ffc04b4c <malloc_deferred_free>
return;
ffc04918: 48 00 00 5c b ffc04974 <free+0xac>
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
ffc0491c: 3d 20 00 00 lis r9,0
ffc04920: 81 29 27 68 lwz r9,10088(r9)
ffc04924: 2f 89 00 00 cmpwi cr7,r9,0
ffc04928: 41 9e 00 14 beq- cr7,ffc0493c <free+0x74>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
ffc0492c: 80 09 00 08 lwz r0,8(r9)
ffc04930: 7f e3 fb 78 mr r3,r31
ffc04934: 7c 09 03 a6 mtctr r0
ffc04938: 4e 80 04 21 bctrl
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
ffc0493c: 3f c0 00 00 lis r30,0
ffc04940: 80 7e 26 ec lwz r3,9964(r30)
ffc04944: 7f e4 fb 78 mr r4,r31
ffc04948: 48 00 54 b9 bl ffc09e00 <_Protected_heap_Free>
ffc0494c: 2f 83 00 00 cmpwi cr7,r3,0
ffc04950: 40 be 00 24 bne+ cr7,ffc04974 <free+0xac>
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
ffc04954: 81 3e 26 ec lwz r9,9964(r30)
*/
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",
ffc04958: 3c 60 ff c2 lis r3,-62
ffc0495c: 38 63 c2 9c addi r3,r3,-15716
ffc04960: 80 a9 00 18 lwz r5,24(r9)
ffc04964: 7f e4 fb 78 mr r4,r31
ffc04968: 80 c9 00 1c lwz r6,28(r9)
ffc0496c: 4c c6 31 82 crclr 4*cr1+eq
ffc04970: 48 00 0e 8d bl ffc057fc <printk>
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
ffc04974: 39 61 00 10 addi r11,r1,16
ffc04978: 4b ff bb b8 b ffc00530 <_restgpr_30_x>
ffc05770 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
ffc05770: 7c 08 02 a6 mflr r0
ffc05774: 7c 2b 0b 78 mr r11,r1
ffc05778: 94 21 ff f0 stwu r1,-16(r1)
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
ffc0577c: 3d 20 00 00 lis r9,0
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
ffc05780: 90 01 00 14 stw r0,20(r1)
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
ffc05784: 38 09 2a d8 addi r0,r9,10968
ffc05788: 7f 83 00 00 cmpw cr7,r3,r0
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
ffc0578c: 48 00 f0 9d bl ffc14828 <_savegpr_31>
ffc05790: 7c 7f 1b 78 mr r31,r3
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
ffc05794: 41 9e 00 1c beq- cr7,ffc057b0 <free_user_env+0x40> <== NEVER TAKEN
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
ffc05798: 38 63 00 04 addi r3,r3,4
ffc0579c: 4b ff ed 8d bl ffc04528 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &env->root_directory);
ffc057a0: 38 7f 00 18 addi r3,r31,24
ffc057a4: 4b ff ed 85 bl ffc04528 <rtems_filesystem_freenode>
free(env);
ffc057a8: 7f e3 fb 78 mr r3,r31
ffc057ac: 4b ff ed a9 bl ffc04554 <free>
}
}
ffc057b0: 39 61 00 10 addi r11,r1,16
ffc057b4: 48 00 f0 c0 b ffc14874 <_restgpr_31_x>
ffc16520 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
ffc16520: 94 21 ff c8 stwu r1,-56(r1)
ffc16524: 7c 08 02 a6 mflr r0
rtems_filesystem_location_info_t loc;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
ffc16528: 3d 20 00 00 lis r9,0
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
ffc1652c: 90 01 00 3c stw r0,60(r1)
rtems_filesystem_location_info_t loc;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
ffc16530: 80 09 27 5c lwz r0,10076(r9)
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
ffc16534: bf c1 00 30 stmw r30,48(r1)
ffc16538: 7c bf 2b 78 mr r31,r5
rtems_filesystem_location_info_t loc;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
ffc1653c: 7f 83 00 40 cmplw cr7,r3,r0
ffc16540: 3b c0 00 00 li r30,0
ffc16544: 40 9c 00 14 bge- cr7,ffc16558 <getdents+0x38> <== NEVER TAKEN
ffc16548: 3d 20 00 00 lis r9,0
ffc1654c: 83 c9 28 14 lwz r30,10260(r9)
ffc16550: 54 63 30 32 rlwinm r3,r3,6,0,25
ffc16554: 7f de 1a 14 add r30,r30,r3
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
ffc16558: 39 7e 00 1c addi r11,r30,28
ffc1655c: 38 61 00 08 addi r3,r1,8
ffc16560: 7c ab a4 aa lswi r5,r11,20
ffc16564: 7c a3 a5 aa stswi r5,r3,20
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
ffc16568: 81 21 00 14 lwz r9,20(r1)
ffc1656c: 80 09 00 10 lwz r0,16(r9)
ffc16570: 90 81 00 28 stw r4,40(r1)
ffc16574: 7c 09 03 a6 mtctr r0
ffc16578: 4e 80 04 21 bctrl
ffc1657c: 80 81 00 28 lwz r4,40(r1)
ffc16580: 2f 83 00 01 cmpwi cr7,r3,1
ffc16584: 41 be 00 18 beq+ cr7,ffc1659c <getdents+0x7c>
rtems_set_errno_and_return_minus_one( ENOTDIR );
ffc16588: 4b ff 9d a1 bl ffc10328 <__errno>
ffc1658c: 38 00 00 14 li r0,20
ffc16590: 90 03 00 00 stw r0,0(r3)
ffc16594: 38 60 ff ff li r3,-1
ffc16598: 48 00 00 1c b ffc165b4 <getdents+0x94>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
ffc1659c: 81 3e 00 24 lwz r9,36(r30)
ffc165a0: 7f c3 f3 78 mr r3,r30
ffc165a4: 7f e5 fb 78 mr r5,r31
ffc165a8: 80 09 00 08 lwz r0,8(r9)
ffc165ac: 7c 09 03 a6 mtctr r0
ffc165b0: 4e 80 04 21 bctrl
}
ffc165b4: 39 61 00 38 addi r11,r1,56
ffc165b8: 4b ff f8 80 b ffc15e38 <_restgpr_30_x>
ffc0497c <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
ffc0497c: 94 21 ff e0 stwu r1,-32(r1)
ffc04980: 7c 08 02 a6 mflr r0
ffc04984: bf c1 00 18 stmw r30,24(r1)
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
ffc04988: 7c 7f 1b 79 mr. r31,r3
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
ffc0498c: 90 01 00 24 stw r0,36(r1)
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
ffc04990: 40 a2 00 18 bne+ ffc049a8 <gettimeofday+0x2c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
ffc04994: 48 00 b2 09 bl ffc0fb9c <__errno> <== NOT EXECUTED
ffc04998: 38 00 00 0e li r0,14 <== NOT EXECUTED
ffc0499c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
ffc049a0: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc049a4: 48 00 00 3c b ffc049e0 <gettimeofday+0x64> <== NOT EXECUTED
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc049a8: 7f c0 00 a6 mfmsr r30
ffc049ac: 7c 10 42 a6 mfsprg r0,0
ffc049b0: 7f c0 00 78 andc r0,r30,r0
ffc049b4: 7c 00 01 24 mtmsr r0
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
_TOD_Get( &now );
ffc049b8: 38 61 00 08 addi r3,r1,8
ffc049bc: 48 00 46 7d bl ffc09038 <_TOD_Get>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc049c0: 7f c0 01 24 mtmsr r30
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
ffc049c4: 80 01 00 08 lwz r0,8(r1)
* Timezone information ignored by the OS proper. Per email
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
ffc049c8: 38 60 00 00 li r3,0
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
ffc049cc: 81 21 00 0c lwz r9,12(r1)
time->tv_sec = now.tv_sec;
ffc049d0: 90 1f 00 00 stw r0,0(r31)
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
ffc049d4: 38 00 03 e8 li r0,1000
ffc049d8: 7c 09 03 d6 divw r0,r9,r0
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
ffc049dc: 90 1f 00 04 stw r0,4(r31)
}
ffc049e0: 39 61 00 20 addi r11,r1,32
ffc049e4: 4b ff bb 4c b ffc00530 <_restgpr_30_x>
ffc0f240 <imfs_dir_open>:
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
ffc0f240: 81 23 00 1c lwz r9,28(r3)
return -1; /* It wasn't a directory --> return error */
ffc0f244: 38 00 ff ff li r0,-1
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
ffc0f248: 81 29 00 4c lwz r9,76(r9)
ffc0f24c: 2f 89 00 01 cmpwi cr7,r9,1
ffc0f250: 40 9e 00 18 bne- cr7,ffc0f268 <imfs_dir_open+0x28> <== NEVER TAKEN
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
ffc0f254: 39 40 00 00 li r10,0
ffc0f258: 39 60 00 00 li r11,0
ffc0f25c: 91 43 00 10 stw r10,16(r3)
return 0;
ffc0f260: 38 00 00 00 li r0,0
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
ffc0f264: 91 63 00 14 stw r11,20(r3)
return 0;
}
ffc0f268: 7c 03 03 78 mr r3,r0
ffc0f26c: 4e 80 00 20 blr
ffc0f47c <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
ffc0f47c: 7c 08 02 a6 mflr r0
ffc0f480: 7c 2b 0b 78 mr r11,r1
ffc0f484: 94 21 ff f0 stwu r1,-16(r1)
ffc0f488: 90 01 00 14 stw r0,20(r1)
ffc0f48c: 48 00 ae a9 bl ffc1a334 <_savegpr_31>
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
ffc0f490: 83 e4 00 00 lwz r31,0(r4)
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
ffc0f494: 81 3f 00 50 lwz r9,80(r31)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0f498: 38 1f 00 54 addi r0,r31,84
ffc0f49c: 7f 89 00 00 cmpw cr7,r9,r0
ffc0f4a0: 41 be 00 10 beq+ cr7,ffc0f4b0 <imfs_dir_rmnod+0x34>
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
ffc0f4a4: 48 00 06 f9 bl ffc0fb9c <__errno>
ffc0f4a8: 38 00 00 5a li r0,90
ffc0f4ac: 48 00 00 1c b ffc0f4c8 <imfs_dir_rmnod+0x4c>
ffc0f4b0: 81 24 00 10 lwz r9,16(r4)
/*
* You cannot remove the file system root node.
*/
if ( rtems_filesystem_is_root_location(pathloc) )
ffc0f4b4: 80 09 00 1c lwz r0,28(r9)
ffc0f4b8: 7f 80 f8 00 cmpw cr7,r0,r31
ffc0f4bc: 40 be 00 18 bne+ cr7,ffc0f4d4 <imfs_dir_rmnod+0x58>
rtems_set_errno_and_return_minus_one( EBUSY );
ffc0f4c0: 48 00 06 dd bl ffc0fb9c <__errno>
ffc0f4c4: 38 00 00 10 li r0,16
ffc0f4c8: 90 03 00 00 stw r0,0(r3)
ffc0f4cc: 38 60 ff ff li r3,-1
ffc0f4d0: 48 00 00 24 b ffc0f4f4 <imfs_dir_rmnod+0x78>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
ffc0f4d4: 80 1f 00 5c lwz r0,92(r31)
ffc0f4d8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0f4dc: 40 be ff e4 bne- cr7,ffc0f4c0 <imfs_dir_rmnod+0x44> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBUSY );
IMFS_create_orphan( the_jnode );
ffc0f4e0: 7f e3 fb 78 mr r3,r31
ffc0f4e4: 4b ff d5 b5 bl ffc0ca98 <IMFS_create_orphan>
IMFS_check_node_remove( the_jnode );
ffc0f4e8: 7f e3 fb 78 mr r3,r31
ffc0f4ec: 4b ff d6 05 bl ffc0caf0 <IMFS_check_node_remove>
return 0;
ffc0f4f0: 38 60 00 00 li r3,0
}
ffc0f4f4: 39 61 00 10 addi r11,r1,16
ffc0f4f8: 4b ff 10 3c b ffc00534 <_restgpr_31_x>
ffc04f64 <init_etc_passwd_group>:
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
ffc04f64: 7c 08 02 a6 mflr r0
ffc04f68: 7c 2b 0b 78 mr r11,r1
ffc04f6c: 94 21 ff f0 stwu r1,-16(r1)
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
ffc04f70: 3d 20 00 00 lis r9,0
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
ffc04f74: 90 01 00 14 stw r0,20(r1)
ffc04f78: 48 01 11 b5 bl ffc1612c <_savegpr_31>
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
ffc04f7c: 88 09 28 58 lbz r0,10328(r9)
ffc04f80: 2f 80 00 00 cmpwi cr7,r0,0
ffc04f84: 40 be 00 bc bne+ cr7,ffc05040 <init_etc_passwd_group+0xdc>
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
ffc04f88: 3c 60 ff c1 lis r3,-63
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
ffc04f8c: 38 00 00 01 li r0,1
mkdir("/etc", 0777);
ffc04f90: 38 80 01 ff li r4,511
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
ffc04f94: 98 09 28 58 stb r0,10328(r9)
mkdir("/etc", 0777);
ffc04f98: 38 63 7f 73 addi r3,r3,32627
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
ffc04f9c: 3f e0 ff c1 lis r31,-63
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
ffc04fa0: 48 00 09 e1 bl ffc05980 <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
ffc04fa4: 3b ff 7f 78 addi r31,r31,32632
ffc04fa8: 3c 80 ff c1 lis r4,-63
ffc04fac: 7f e3 fb 78 mr r3,r31
ffc04fb0: 38 84 77 9c addi r4,r4,30620
ffc04fb4: 48 00 c2 01 bl ffc111b4 <fopen>
ffc04fb8: 2f 83 00 00 cmpwi cr7,r3,0
ffc04fbc: 40 be 00 30 bne+ cr7,ffc04fec <init_etc_passwd_group+0x88>
fclose(fp);
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
ffc04fc0: 3c 80 ff c1 lis r4,-63
ffc04fc4: 7f e3 fb 78 mr r3,r31
ffc04fc8: 38 84 7f 84 addi r4,r4,32644
ffc04fcc: 48 00 c1 e9 bl ffc111b4 <fopen>
ffc04fd0: 7c 7f 1b 79 mr. r31,r3
ffc04fd4: 41 82 00 1c beq- ffc04ff0 <init_etc_passwd_group+0x8c> <== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
ffc04fd8: 3c 60 ff c1 lis r3,-63
ffc04fdc: 38 63 7f 86 addi r3,r3,32646
ffc04fe0: 7f e4 fb 78 mr r4,r31
ffc04fe4: 48 00 c2 95 bl ffc11278 <fputs>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
ffc04fe8: 7f e3 fb 78 mr r3,r31
ffc04fec: 48 00 b8 21 bl ffc1080c <fclose>
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
ffc04ff0: 3f e0 ff c1 lis r31,-63
ffc04ff4: 3b ff 7f ed addi r31,r31,32749
ffc04ff8: 3c 80 ff c1 lis r4,-63
ffc04ffc: 7f e3 fb 78 mr r3,r31
ffc05000: 38 84 77 9c addi r4,r4,30620
ffc05004: 48 00 c1 b1 bl ffc111b4 <fopen>
ffc05008: 2f 83 00 00 cmpwi cr7,r3,0
ffc0500c: 40 be 00 30 bne+ cr7,ffc0503c <init_etc_passwd_group+0xd8>
fclose(fp);
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
ffc05010: 3c 80 ff c1 lis r4,-63
ffc05014: 7f e3 fb 78 mr r3,r31
ffc05018: 38 84 7f 84 addi r4,r4,32644
ffc0501c: 48 00 c1 99 bl ffc111b4 <fopen>
ffc05020: 7c 7f 1b 79 mr. r31,r3
ffc05024: 41 82 00 1c beq- ffc05040 <init_etc_passwd_group+0xdc> <== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
ffc05028: 3c 60 ff c1 lis r3,-63
ffc0502c: 38 63 7f f8 addi r3,r3,32760
ffc05030: 7f e4 fb 78 mr r4,r31
ffc05034: 48 00 c2 45 bl ffc11278 <fputs>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
ffc05038: 7f e3 fb 78 mr r3,r31
ffc0503c: 48 00 b7 d1 bl ffc1080c <fclose>
}
}
ffc05040: 39 61 00 10 addi r11,r1,16
ffc05044: 4b ff b8 6c b ffc008b0 <_restgpr_31_x>
ffc068dc <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc068dc: 94 21 ff f0 stwu r1,-16(r1)
ffc068e0: 7c 08 02 a6 mflr r0
ffc068e4: 90 01 00 14 stw r0,20(r1)
if (tty->termios.c_iflag & ISTRIP)
ffc068e8: 80 04 00 30 lwz r0,48(r4)
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc068ec: bf c1 00 08 stmw r30,8(r1)
ffc068f0: 7c 7e 1b 78 mr r30,r3
if (tty->termios.c_iflag & ISTRIP)
ffc068f4: 70 09 00 20 andi. r9,r0,32
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc068f8: 7c 9f 23 78 mr r31,r4
if (tty->termios.c_iflag & ISTRIP)
ffc068fc: 41 82 00 08 beq- ffc06904 <iproc+0x28> <== ALWAYS TAKEN
c &= 0x7f;
ffc06900: 54 7e 06 7e clrlwi r30,r3,25 <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
ffc06904: 70 09 02 00 andi. r9,r0,512
ffc06908: 41 82 00 28 beq- ffc06930 <iproc+0x54>
c = tolower (c);
ffc0690c: 3d 20 00 00 lis r9,0
ffc06910: 81 29 27 44 lwz r9,10052(r9)
ffc06914: 7d 29 f2 14 add r9,r9,r30
ffc06918: 89 29 00 01 lbz r9,1(r9)
ffc0691c: 55 29 07 be clrlwi r9,r9,30
ffc06920: 2f 89 00 01 cmpwi cr7,r9,1
ffc06924: 40 be 00 08 bne+ cr7,ffc0692c <iproc+0x50>
ffc06928: 3b de 00 20 addi r30,r30,32
ffc0692c: 57 de 06 3e clrlwi r30,r30,24
if (c == '\r') {
ffc06930: 2f 9e 00 0d cmpwi cr7,r30,13
ffc06934: 40 be 00 20 bne+ cr7,ffc06954 <iproc+0x78>
if (tty->termios.c_iflag & IGNCR)
ffc06938: 70 09 00 80 andi. r9,r0,128
return 0;
ffc0693c: 38 60 00 00 li r3,0
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
ffc06940: 40 82 01 44 bne- ffc06a84 <iproc+0x1a8> <== NEVER TAKEN
return 0;
if (tty->termios.c_iflag & ICRNL)
ffc06944: 70 09 01 00 andi. r9,r0,256
ffc06948: 41 82 00 2c beq- ffc06974 <iproc+0x98> <== NEVER TAKEN
c = '\n';
ffc0694c: 3b c0 00 0a li r30,10
ffc06950: 48 00 00 24 b ffc06974 <iproc+0x98>
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
ffc06954: 2f 9e 00 0a cmpwi cr7,r30,10
ffc06958: 40 be 00 14 bne+ cr7,ffc0696c <iproc+0x90>
ffc0695c: 70 09 00 40 andi. r9,r0,64
ffc06960: 41 82 00 14 beq- ffc06974 <iproc+0x98> <== ALWAYS TAKEN
c = '\r';
ffc06964: 3b c0 00 0d li r30,13 <== NOT EXECUTED
ffc06968: 48 00 00 0c b ffc06974 <iproc+0x98> <== NOT EXECUTED
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
ffc0696c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc06970: 41 be 00 c8 beq+ cr7,ffc06a38 <iproc+0x15c> <== NEVER TAKEN
ffc06974: 80 1f 00 3c lwz r0,60(r31)
ffc06978: 70 09 00 02 andi. r9,r0,2
ffc0697c: 41 82 00 bc beq- ffc06a38 <iproc+0x15c>
if (c == tty->termios.c_cc[VERASE]) {
ffc06980: 89 3f 00 43 lbz r9,67(r31)
erase (tty, 0);
ffc06984: 7f e3 fb 78 mr r3,r31
ffc06988: 38 80 00 00 li r4,0
} 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]) {
ffc0698c: 7f 89 f0 00 cmpw cr7,r9,r30
ffc06990: 41 9e 00 18 beq- cr7,ffc069a8 <iproc+0xcc>
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
ffc06994: 89 3f 00 44 lbz r9,68(r31)
ffc06998: 7f 89 f0 00 cmpw cr7,r9,r30
ffc0699c: 40 be 00 14 bne+ cr7,ffc069b0 <iproc+0xd4>
erase (tty, 1);
ffc069a0: 7f e3 fb 78 mr r3,r31
ffc069a4: 38 80 00 01 li r4,1
ffc069a8: 4b ff fd 29 bl ffc066d0 <erase>
ffc069ac: 48 00 00 d4 b ffc06a80 <iproc+0x1a4>
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
ffc069b0: 89 3f 00 45 lbz r9,69(r31)
return 1;
ffc069b4: 38 60 00 01 li r3,1
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
ffc069b8: 7f 89 f0 00 cmpw cr7,r9,r30
ffc069bc: 41 9e 00 c8 beq- cr7,ffc06a84 <iproc+0x1a8> <== NEVER TAKEN
return 1;
} else if (c == '\n') {
ffc069c0: 2f 9e 00 0a cmpwi cr7,r30,10
ffc069c4: 40 be 00 2c bne+ cr7,ffc069f0 <iproc+0x114>
if (tty->termios.c_lflag & (ECHO | ECHONL))
ffc069c8: 70 09 00 48 andi. r9,r0,72
ffc069cc: 41 a2 00 10 beq+ ffc069dc <iproc+0x100> <== NEVER TAKEN
echo (c, tty);
ffc069d0: 38 60 00 0a li r3,10
ffc069d4: 7f e4 fb 78 mr r4,r31
ffc069d8: 4b ff fc 6d bl ffc06644 <echo>
tty->cbuf[tty->ccount++] = c;
ffc069dc: 81 3f 00 20 lwz r9,32(r31)
ffc069e0: 38 00 00 0a li r0,10
ffc069e4: 81 7f 00 1c lwz r11,28(r31)
ffc069e8: 7c 0b 49 ae stbx r0,r11,r9
ffc069ec: 48 00 00 3c b ffc06a28 <iproc+0x14c>
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
ffc069f0: 89 3f 00 4c lbz r9,76(r31)
ffc069f4: 7f 89 f0 00 cmpw cr7,r9,r30
ffc069f8: 41 9e 00 10 beq- cr7,ffc06a08 <iproc+0x12c> <== NEVER TAKEN
ffc069fc: 89 3f 00 51 lbz r9,81(r31)
ffc06a00: 7f 89 f0 00 cmpw cr7,r9,r30
ffc06a04: 40 be 00 34 bne+ cr7,ffc06a38 <iproc+0x15c> <== ALWAYS TAKEN
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
ffc06a08: 70 09 00 08 andi. r9,r0,8 <== NOT EXECUTED
ffc06a0c: 41 a2 00 10 beq+ ffc06a1c <iproc+0x140> <== NOT EXECUTED
echo (c, tty);
ffc06a10: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc06a14: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc06a18: 4b ff fc 2d bl ffc06644 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
ffc06a1c: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED
ffc06a20: 81 7f 00 1c lwz r11,28(r31) <== NOT EXECUTED
ffc06a24: 7f cb 49 ae stbx r30,r11,r9 <== NOT EXECUTED
ffc06a28: 39 29 00 01 addi r9,r9,1
ffc06a2c: 91 3f 00 20 stw r9,32(r31)
return 1;
ffc06a30: 38 60 00 01 li r3,1
ffc06a34: 48 00 00 50 b ffc06a84 <iproc+0x1a8>
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
ffc06a38: 3d 20 00 00 lis r9,0
ffc06a3c: 81 29 21 b0 lwz r9,8624(r9)
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
ffc06a40: 38 60 00 00 li r3,0
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
ffc06a44: 38 09 ff ff addi r0,r9,-1
ffc06a48: 81 3f 00 20 lwz r9,32(r31)
ffc06a4c: 7f 89 00 00 cmpw cr7,r9,r0
ffc06a50: 40 9c 00 34 bge- cr7,ffc06a84 <iproc+0x1a8> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHO)
ffc06a54: 80 1f 00 3c lwz r0,60(r31)
ffc06a58: 70 09 00 08 andi. r9,r0,8
ffc06a5c: 41 a2 00 10 beq+ ffc06a6c <iproc+0x190> <== NEVER TAKEN
echo (c, tty);
ffc06a60: 7f c3 f3 78 mr r3,r30
ffc06a64: 7f e4 fb 78 mr r4,r31
ffc06a68: 4b ff fb dd bl ffc06644 <echo>
tty->cbuf[tty->ccount++] = c;
ffc06a6c: 81 3f 00 20 lwz r9,32(r31)
ffc06a70: 81 7f 00 1c lwz r11,28(r31)
ffc06a74: 7f cb 49 ae stbx r30,r11,r9
ffc06a78: 39 29 00 01 addi r9,r9,1
ffc06a7c: 91 3f 00 20 stw r9,32(r31)
}
return 0;
ffc06a80: 38 60 00 00 li r3,0
}
ffc06a84: 39 61 00 10 addi r11,r1,16
ffc06a88: 4b ff 9a a8 b ffc00530 <_restgpr_30_x>
ffc1a814 <kill>:
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
return 0;
}
ffc1a814: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc1a818: 4e 80 00 20 blr <== NOT EXECUTED
ffc051fc <libc_wrapup>:
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
ffc051fc: 94 21 ff f0 stwu r1,-16(r1)
ffc05200: 7c 08 02 a6 mflr r0
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
ffc05204: 3d 20 00 00 lis r9,0
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
ffc05208: 90 01 00 14 stw r0,20(r1)
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
ffc0520c: 80 09 28 04 lwz r0,10244(r9)
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
ffc05210: bf c1 00 08 stmw r30,8(r1)
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
ffc05214: 2f 80 00 03 cmpwi cr7,r0,3
ffc05218: 40 be 00 4c bne+ cr7,ffc05264 <libc_wrapup+0x68> <== NEVER TAKEN
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
ffc0521c: 3d 20 00 00 lis r9,0
ffc05220: 3f e0 00 00 lis r31,0
ffc05224: 83 c9 27 48 lwz r30,10056(r9)
ffc05228: 80 1f 27 4c lwz r0,10060(r31)
ffc0522c: 7f 80 f0 00 cmpw cr7,r0,r30
ffc05230: 41 9e 00 10 beq- cr7,ffc05240 <libc_wrapup+0x44>
_wrapup_reent(_global_impure_ptr);
ffc05234: 7f c3 f3 78 mr r3,r30
ffc05238: 48 00 ba 79 bl ffc10cb0 <_wrapup_reent>
/* Don't reclaim this one, just in case we do printfs
* on the way out to ROM.
*/
_reclaim_reent(&libc_global_reent);
#endif
_REENT = _global_impure_ptr;
ffc0523c: 93 df 27 4c stw r30,10060(r31)
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
ffc05240: 81 3f 27 4c lwz r9,10060(r31)
ffc05244: 80 69 00 04 lwz r3,4(r9)
ffc05248: 48 00 aa e1 bl ffc0fd28 <fclose>
fclose (stdout);
ffc0524c: 81 3f 27 4c lwz r9,10060(r31)
ffc05250: 80 69 00 08 lwz r3,8(r9)
ffc05254: 48 00 aa d5 bl ffc0fd28 <fclose>
fclose (stderr);
ffc05258: 81 3f 27 4c lwz r9,10060(r31)
ffc0525c: 80 69 00 0c lwz r3,12(r9)
ffc05260: 48 00 aa c9 bl ffc0fd28 <fclose>
}
ffc05264: 39 61 00 10 addi r11,r1,16
ffc05268: 4b ff b2 c8 b ffc00530 <_restgpr_30_x>
ffc1a82c <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
ffc1a82c: 94 21 ff e8 stwu r1,-24(r1)
ffc1a830: 7c 08 02 a6 mflr r0
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
ffc1a834: 3d 20 00 00 lis r9,0
off_t lseek(
int fd,
off_t offset,
int whence
)
{
ffc1a838: 90 01 00 1c stw r0,28(r1)
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
ffc1a83c: 80 09 26 fc lwz r0,9980(r9)
off_t lseek(
int fd,
off_t offset,
int whence
)
{
ffc1a840: bf a1 00 0c stmw r29,12(r1)
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
ffc1a844: 7f 83 00 40 cmplw cr7,r3,r0
ffc1a848: 40 9c 00 20 bge- cr7,ffc1a868 <lseek+0x3c>
iop = rtems_libio_iop( fd );
ffc1a84c: 3d 20 00 00 lis r9,0
ffc1a850: 83 a9 27 ac lwz r29,10156(r9)
ffc1a854: 54 63 30 32 rlwinm r3,r3,6,0,25
ffc1a858: 7f bd 1a 14 add r29,r29,r3
rtems_libio_check_is_open(iop);
ffc1a85c: 80 1d 00 18 lwz r0,24(r29)
ffc1a860: 70 09 01 00 andi. r9,r0,256
ffc1a864: 40 a2 00 10 bne+ ffc1a874 <lseek+0x48>
ffc1a868: 4b ff 53 35 bl ffc0fb9c <__errno>
ffc1a86c: 38 00 00 09 li r0,9
ffc1a870: 48 00 00 60 b ffc1a8d0 <lseek+0xa4>
/*
* Now process the lseek().
*/
old_offset = iop->offset;
switch ( whence ) {
ffc1a874: 2f 87 00 01 cmpwi cr7,r7,1
/*
* Now process the lseek().
*/
old_offset = iop->offset;
ffc1a878: 83 dd 00 10 lwz r30,16(r29)
ffc1a87c: 83 fd 00 14 lwz r31,20(r29)
switch ( whence ) {
ffc1a880: 41 9e 00 20 beq- cr7,ffc1a8a0 <lseek+0x74>
ffc1a884: 2f 87 00 02 cmpwi cr7,r7,2
ffc1a888: 41 9e 00 24 beq- cr7,ffc1a8ac <lseek+0x80>
ffc1a88c: 2f 87 00 00 cmpwi cr7,r7,0
ffc1a890: 40 9e 00 38 bne- cr7,ffc1a8c8 <lseek+0x9c>
case SEEK_SET:
iop->offset = offset;
ffc1a894: 90 bd 00 10 stw r5,16(r29)
ffc1a898: 90 dd 00 14 stw r6,20(r29)
break;
ffc1a89c: 48 00 00 44 b ffc1a8e0 <lseek+0xb4>
case SEEK_CUR:
iop->offset += offset;
ffc1a8a0: 7d 7f 30 14 addc r11,r31,r6
ffc1a8a4: 7d 5e 29 14 adde r10,r30,r5
ffc1a8a8: 48 00 00 14 b ffc1a8bc <lseek+0x90>
break;
case SEEK_END:
iop->offset = iop->size + offset;
ffc1a8ac: 81 5d 00 08 lwz r10,8(r29)
ffc1a8b0: 81 7d 00 0c lwz r11,12(r29)
ffc1a8b4: 7d 6b 30 14 addc r11,r11,r6
ffc1a8b8: 7d 4a 29 14 adde r10,r10,r5
ffc1a8bc: 91 5d 00 10 stw r10,16(r29)
ffc1a8c0: 91 7d 00 14 stw r11,20(r29)
break;
ffc1a8c4: 48 00 00 1c b ffc1a8e0 <lseek+0xb4>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
ffc1a8c8: 4b ff 52 d5 bl ffc0fb9c <__errno>
ffc1a8cc: 38 00 00 16 li r0,22
ffc1a8d0: 90 03 00 00 stw r0,0(r3)
ffc1a8d4: 39 40 ff ff li r10,-1
ffc1a8d8: 39 60 ff ff li r11,-1
ffc1a8dc: 48 00 00 38 b ffc1a914 <lseek+0xe8>
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
ffc1a8e0: 81 3d 00 24 lwz r9,36(r29)
ffc1a8e4: 7f a3 eb 78 mr r3,r29
ffc1a8e8: 80 09 00 14 lwz r0,20(r9)
ffc1a8ec: 7c 09 03 a6 mtctr r0
ffc1a8f0: 4e 80 04 21 bctrl
ffc1a8f4: 7c 6a 1b 78 mr r10,r3
if ( status == (off_t) -1 )
ffc1a8f8: 2f 8a ff ff cmpwi cr7,r10,-1
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
ffc1a8fc: 7c 8b 23 78 mr r11,r4
if ( status == (off_t) -1 )
ffc1a900: 40 be 00 14 bne+ cr7,ffc1a914 <lseek+0xe8>
ffc1a904: 2f 84 ff ff cmpwi cr7,r4,-1
ffc1a908: 40 be 00 0c bne+ cr7,ffc1a914 <lseek+0xe8> <== NEVER TAKEN
iop->offset = old_offset;
ffc1a90c: 93 dd 00 10 stw r30,16(r29)
ffc1a910: 93 fd 00 14 stw r31,20(r29)
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
ffc1a914: 7d 64 5b 78 mr r4,r11
ffc1a918: 39 61 00 18 addi r11,r1,24
ffc1a91c: 7d 43 53 78 mr r3,r10
ffc1a920: 4b fe 5c 0c b ffc0052c <_restgpr_29_x>
ffc04c70 <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
ffc04c70: 94 21 ff f0 stwu r1,-16(r1)
ffc04c74: 7c 08 02 a6 mflr r0
void *return_this;
MSBUMP(malloc_calls, 1);
ffc04c78: 3d 20 00 00 lis r9,0
#include "malloc_p.h"
void *malloc(
size_t size
)
{
ffc04c7c: 90 01 00 14 stw r0,20(r1)
void *return_this;
MSBUMP(malloc_calls, 1);
ffc04c80: 39 29 2a e8 addi r9,r9,10984
ffc04c84: 81 69 00 04 lwz r11,4(r9)
#include "malloc_p.h"
void *malloc(
size_t size
)
{
ffc04c88: bf c1 00 08 stmw r30,8(r1)
ffc04c8c: 7c 7f 1b 78 mr r31,r3
void *return_this;
MSBUMP(malloc_calls, 1);
ffc04c90: 38 0b 00 01 addi r0,r11,1
ffc04c94: 90 09 00 04 stw r0,4(r9)
/*
* Validate the parameters
*/
if ( !size )
return (void *) 0;
ffc04c98: 3b c0 00 00 li r30,0
MSBUMP(malloc_calls, 1);
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
ffc04c9c: 4b ff fe 75 bl ffc04b10 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
ffc04ca0: 2f 9f 00 00 cmpwi cr7,r31,0
ffc04ca4: 41 9e 00 bc beq- cr7,ffc04d60 <malloc+0xf0>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
ffc04ca8: 3d 20 00 00 lis r9,0
ffc04cac: 80 09 28 04 lwz r0,10244(r9)
ffc04cb0: 2f 80 00 03 cmpwi cr7,r0,3
ffc04cb4: 40 be 00 10 bne+ cr7,ffc04cc4 <malloc+0x54>
!malloc_is_system_state_OK() )
ffc04cb8: 4b ff fe 11 bl ffc04ac8 <malloc_is_system_state_OK>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
ffc04cbc: 2f 83 00 00 cmpwi cr7,r3,0
ffc04cc0: 41 9e 00 a0 beq- cr7,ffc04d60 <malloc+0xf0> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
ffc04cc4: 3d 20 00 00 lis r9,0
ffc04cc8: 80 69 26 ec lwz r3,9964(r9)
ffc04ccc: 7f e4 fb 78 mr r4,r31
ffc04cd0: 38 a0 00 00 li r5,0
ffc04cd4: 38 c0 00 00 li r6,0
ffc04cd8: 48 00 50 d1 bl ffc09da8 <_Protected_heap_Allocate_aligned_with_boundary>
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
ffc04cdc: 7c 7e 1b 79 mr. r30,r3
ffc04ce0: 40 a2 00 40 bne+ ffc04d20 <malloc+0xb0>
if (rtems_malloc_sbrk_helpers)
ffc04ce4: 3d 20 00 00 lis r9,0
ffc04ce8: 81 29 27 64 lwz r9,10084(r9)
ffc04cec: 2f 89 00 00 cmpwi cr7,r9,0
ffc04cf0: 41 9e 00 1c beq- cr7,ffc04d0c <malloc+0x9c>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
ffc04cf4: 80 09 00 04 lwz r0,4(r9)
ffc04cf8: 7f e3 fb 78 mr r3,r31
ffc04cfc: 7c 09 03 a6 mtctr r0
ffc04d00: 4e 80 04 21 bctrl
if ( !return_this ) {
ffc04d04: 7c 7e 1b 79 mr. r30,r3
ffc04d08: 40 a2 00 18 bne+ ffc04d20 <malloc+0xb0> <== NEVER TAKEN
errno = ENOMEM;
ffc04d0c: 48 00 ae 91 bl ffc0fb9c <__errno>
ffc04d10: 38 00 00 0c li r0,12
ffc04d14: 90 03 00 00 stw r0,0(r3)
return (void *) 0;
ffc04d18: 3b c0 00 00 li r30,0
ffc04d1c: 48 00 00 44 b ffc04d60 <malloc+0xf0>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
ffc04d20: 3d 20 00 00 lis r9,0
ffc04d24: 80 09 27 60 lwz r0,10080(r9)
ffc04d28: 2f 80 00 00 cmpwi cr7,r0,0
ffc04d2c: 41 9e 00 14 beq- cr7,ffc04d40 <malloc+0xd0>
(*rtems_malloc_dirty_helper)( return_this, size );
ffc04d30: 7f c3 f3 78 mr r3,r30
ffc04d34: 7c 09 03 a6 mtctr r0
ffc04d38: 7f e4 fb 78 mr r4,r31
ffc04d3c: 4e 80 04 21 bctrl
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
ffc04d40: 3d 20 00 00 lis r9,0
ffc04d44: 81 29 27 68 lwz r9,10088(r9)
ffc04d48: 2f 89 00 00 cmpwi cr7,r9,0
ffc04d4c: 41 9e 00 14 beq- cr7,ffc04d60 <malloc+0xf0>
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
ffc04d50: 80 09 00 04 lwz r0,4(r9)
ffc04d54: 7f c3 f3 78 mr r3,r30
ffc04d58: 7c 09 03 a6 mtctr r0
ffc04d5c: 4e 80 04 21 bctrl
return return_this;
}
ffc04d60: 39 61 00 10 addi r11,r1,16
ffc04d64: 7f c3 f3 78 mr r3,r30
ffc04d68: 4b ff b7 c8 b ffc00530 <_restgpr_30_x>
ffc04a18 <malloc_sbrk_extend_and_allocate>:
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
ffc04a18: 94 21 ff e8 stwu r1,-24(r1)
ffc04a1c: 7c 08 02 a6 mflr r0
* Round to the "requested sbrk amount" so hopefully we won't have
* to grow again for a while. This effectively does sbrk() calls
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
ffc04a20: 3d 20 00 00 lis r9,0
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
ffc04a24: 90 01 00 1c stw r0,28(r1)
* Round to the "requested sbrk amount" so hopefully we won't have
* to grow again for a while. This effectively does sbrk() calls
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
ffc04a28: 80 09 27 9c lwz r0,10140(r9)
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
ffc04a2c: bf 81 00 08 stmw r28,8(r1)
ffc04a30: 7c 7d 1b 78 mr r29,r3
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
ffc04a34: 2f 80 00 00 cmpwi cr7,r0,0
return (void *) 0;
ffc04a38: 3b c0 00 00 li r30,0
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
ffc04a3c: 41 9e 00 7c beq- cr7,ffc04ab8 <malloc_sbrk_extend_and_allocate+0xa0><== NEVER TAKEN
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
ffc04a40: 7f e3 02 14 add r31,r3,r0
ffc04a44: 7f ff 03 96 divwu r31,r31,r0
ffc04a48: 7f ff 01 d6 mullw r31,r31,r0
starting_address = (void *) sbrk(the_size);
ffc04a4c: 7f e3 fb 78 mr r3,r31
ffc04a50: 4b ff b9 61 bl ffc003b0 <sbrk>
if ( starting_address == (void*) -1 )
ffc04a54: 2f 83 ff ff cmpwi cr7,r3,-1
if ( sbrk_amount == 0 )
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
starting_address = (void *) sbrk(the_size);
ffc04a58: 7c 64 1b 78 mr r4,r3
if ( starting_address == (void*) -1 )
ffc04a5c: 41 9e 00 5c beq- cr7,ffc04ab8 <malloc_sbrk_extend_and_allocate+0xa0>
return (void *) 0;
if ( !_Protected_heap_Extend(
ffc04a60: 3f 80 00 00 lis r28,0
ffc04a64: 80 7c 26 cc lwz r3,9932(r28)
ffc04a68: 7f e5 fb 78 mr r5,r31
ffc04a6c: 48 00 50 71 bl ffc09adc <_Protected_heap_Extend>
ffc04a70: 2f 83 00 00 cmpwi cr7,r3,0
ffc04a74: 40 be 00 1c bne+ cr7,ffc04a90 <malloc_sbrk_extend_and_allocate+0x78>
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
ffc04a78: 7c 7f 00 d0 neg r3,r31
ffc04a7c: 4b ff b9 35 bl ffc003b0 <sbrk>
errno = ENOMEM;
ffc04a80: 48 00 b0 75 bl ffc0faf4 <__errno>
ffc04a84: 38 00 00 0c li r0,12
ffc04a88: 90 03 00 00 stw r0,0(r3)
return (void *) 0;
ffc04a8c: 48 00 00 2c b ffc04ab8 <malloc_sbrk_extend_and_allocate+0xa0>
}
MSBUMP(space_available, the_size);
ffc04a90: 3d 20 00 00 lis r9,0
ffc04a94: 80 7c 26 cc lwz r3,9932(r28)
ffc04a98: 80 09 2c 28 lwz r0,11304(r9)
ffc04a9c: 7f a4 eb 78 mr r4,r29
ffc04aa0: 38 a0 00 00 li r5,0
ffc04aa4: 7f ff 02 14 add r31,r31,r0
ffc04aa8: 38 c0 00 00 li r6,0
ffc04aac: 93 e9 2c 28 stw r31,11304(r9)
ffc04ab0: 48 00 4f d5 bl ffc09a84 <_Protected_heap_Allocate_aligned_with_boundary>
ffc04ab4: 7c 7e 1b 78 mr r30,r3
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
ffc04ab8: 39 61 00 18 addi r11,r1,24
ffc04abc: 7f c3 f3 78 mr r3,r30
ffc04ac0: 4b ff ba 20 b ffc004e0 <_restgpr_28_x>
ffc04ac4 <malloc_sbrk_initialize>:
* If the starting address is 0 then we are to attempt to
* get length worth of memory using sbrk. Make sure we
* align the address that we get back.
*/
if (!starting_address) {
ffc04ac4: 2c 03 00 00 cmpwi r3,0
void *malloc_sbrk_initialize(
void *starting_address,
size_t length
)
{
ffc04ac8: 94 21 ff f8 stwu r1,-8(r1)
ffc04acc: 7c 08 02 a6 mflr r0
uintptr_t old_address;
uintptr_t uaddress;
RTEMS_Malloc_Sbrk_amount = length;
ffc04ad0: 3d 20 00 00 lis r9,0
ffc04ad4: 90 89 27 9c stw r4,10140(r9)
void *malloc_sbrk_initialize(
void *starting_address,
size_t length
)
{
ffc04ad8: 90 01 00 0c stw r0,12(r1)
* If the starting address is 0 then we are to attempt to
* get length worth of memory using sbrk. Make sure we
* align the address that we get back.
*/
if (!starting_address) {
ffc04adc: 40 a2 00 2c bne+ ffc04b08 <malloc_sbrk_initialize+0x44>
uaddress = (uintptr_t)sbrk(length);
ffc04ae0: 7c 83 23 78 mr r3,r4
ffc04ae4: 4b ff b8 cd bl ffc003b0 <sbrk>
if (uaddress == (uintptr_t) -1) {
ffc04ae8: 2f 83 ff ff cmpwi cr7,r3,-1
ffc04aec: 40 be 00 0c bne+ cr7,ffc04af8 <malloc_sbrk_initialize+0x34><== NEVER TAKEN
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
ffc04af0: 38 60 00 1a li r3,26
ffc04af4: 48 00 39 cd bl ffc084c0 <rtems_fatal_error_occurred>
/* DOES NOT RETURN!!! */
}
if (uaddress & (CPU_HEAP_ALIGNMENT-1)) {
ffc04af8: 70 60 00 07 andi. r0,r3,7 <== NOT EXECUTED
ffc04afc: 41 82 00 0c beq- ffc04b08 <malloc_sbrk_initialize+0x44> <== NOT EXECUTED
old_address = uaddress;
uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1);
ffc04b00: 38 63 00 08 addi r3,r3,8 <== NOT EXECUTED
ffc04b04: 54 63 00 38 rlwinm r3,r3,0,0,28 <== NOT EXECUTED
}
starting_address = (void *)uaddress;
}
return starting_address;
}
ffc04b08: 80 01 00 0c lwz r0,12(r1)
ffc04b0c: 38 21 00 08 addi r1,r1,8
ffc04b10: 7c 08 03 a6 mtlr r0
ffc04b14: 4e 80 00 20 blr
ffc0ee28 <memfile_ftruncate>:
*/
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
ffc0ee28: 7c 08 02 a6 mflr r0
ffc0ee2c: 7c 2b 0b 78 mr r11,r1
ffc0ee30: 94 21 ff e0 stwu r1,-32(r1)
ffc0ee34: 90 01 00 24 stw r0,36(r1)
ffc0ee38: 48 00 b4 fd bl ffc1a334 <_savegpr_31>
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
ffc0ee3c: 83 e3 00 1c lwz r31,28(r3)
* 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 )
ffc0ee40: 80 1f 00 50 lwz r0,80(r31)
ffc0ee44: 7f 80 28 00 cmpw cr7,r0,r5
ffc0ee48: 41 9c 00 14 blt- cr7,ffc0ee5c <memfile_ftruncate+0x34> <== NEVER TAKEN
ffc0ee4c: 40 be 00 1c bne+ cr7,ffc0ee68 <memfile_ftruncate+0x40> <== NEVER TAKEN
ffc0ee50: 80 1f 00 54 lwz r0,84(r31)
ffc0ee54: 7f 80 30 40 cmplw cr7,r0,r6
ffc0ee58: 40 bc 00 10 bge+ cr7,ffc0ee68 <memfile_ftruncate+0x40>
return IMFS_memfile_extend( the_jnode, length );
ffc0ee5c: 7f e3 fb 78 mr r3,r31
ffc0ee60: 4b ff fb fd bl ffc0ea5c <IMFS_memfile_extend>
ffc0ee64: 48 00 00 2c b ffc0ee90 <memfile_ftruncate+0x68>
/*
* 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;
ffc0ee68: 90 bf 00 50 stw r5,80(r31)
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
ffc0ee6c: 38 80 00 00 li r4,0
/*
* 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;
ffc0ee70: 90 df 00 54 stw r6,84(r31)
iop->size = the_jnode->info.file.size;
ffc0ee74: 90 a3 00 08 stw r5,8(r3)
ffc0ee78: 90 c3 00 0c stw r6,12(r3)
IMFS_update_atime( the_jnode );
ffc0ee7c: 38 61 00 08 addi r3,r1,8
ffc0ee80: 4b ff 5a fd bl ffc0497c <gettimeofday>
ffc0ee84: 80 01 00 08 lwz r0,8(r1)
return 0;
ffc0ee88: 38 60 00 00 li r3,0
* future use and just set the length.
*/
the_jnode->info.file.size = length;
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
ffc0ee8c: 90 1f 00 40 stw r0,64(r31)
return 0;
}
ffc0ee90: 39 61 00 20 addi r11,r1,32
ffc0ee94: 4b ff 16 a0 b ffc00534 <_restgpr_31_x>
ffc0ee98 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
ffc0ee98: 94 21 ff f0 stwu r1,-16(r1)
ffc0ee9c: 7c 08 02 a6 mflr r0
ffc0eea0: 90 01 00 14 stw r0,20(r1)
ffc0eea4: bf c1 00 08 stmw r30,8(r1)
ffc0eea8: 7c 7f 1b 78 mr r31,r3
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
ffc0eeac: 83 c3 00 1c lwz r30,28(r3)
if (the_jnode->type == IMFS_LINEAR_FILE) {
ffc0eeb0: 80 1e 00 4c lwz r0,76(r30)
ffc0eeb4: 2f 80 00 06 cmpwi cr7,r0,6
ffc0eeb8: 40 9e 00 34 bne- cr7,ffc0eeec <memfile_lseek+0x54>
if (iop->offset > the_jnode->info.linearfile.size)
ffc0eebc: 81 3e 00 50 lwz r9,80(r30)
ffc0eec0: 81 63 00 10 lwz r11,16(r3)
ffc0eec4: 80 1e 00 54 lwz r0,84(r30)
ffc0eec8: 7f 8b 48 00 cmpw cr7,r11,r9
ffc0eecc: 41 9d 00 14 bgt- cr7,ffc0eee0 <memfile_lseek+0x48> <== NEVER TAKEN
ffc0eed0: 40 9e 00 5c bne- cr7,ffc0ef2c <memfile_lseek+0x94> <== NEVER TAKEN
ffc0eed4: 81 63 00 14 lwz r11,20(r3)
ffc0eed8: 7f 8b 00 40 cmplw cr7,r11,r0
ffc0eedc: 40 9d 00 50 ble- cr7,ffc0ef2c <memfile_lseek+0x94> <== ALWAYS TAKEN
iop->offset = the_jnode->info.linearfile.size;
ffc0eee0: 91 3f 00 10 stw r9,16(r31) <== NOT EXECUTED
ffc0eee4: 90 1f 00 14 stw r0,20(r31) <== NOT EXECUTED
ffc0eee8: 48 00 00 44 b ffc0ef2c <memfile_lseek+0x94> <== NOT EXECUTED
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
ffc0eeec: 80 bf 00 10 lwz r5,16(r31)
ffc0eef0: 7f c3 f3 78 mr r3,r30
ffc0eef4: 80 df 00 14 lwz r6,20(r31)
ffc0eef8: 4b ff fb 65 bl ffc0ea5c <IMFS_memfile_extend>
ffc0eefc: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ef00: 41 be 00 1c beq+ cr7,ffc0ef1c <memfile_lseek+0x84>
rtems_set_errno_and_return_minus_one( ENOSPC );
ffc0ef04: 48 00 0c 99 bl ffc0fb9c <__errno>
ffc0ef08: 38 00 00 1c li r0,28
ffc0ef0c: 90 03 00 00 stw r0,0(r3)
ffc0ef10: 39 40 ff ff li r10,-1
ffc0ef14: 39 60 ff ff li r11,-1
ffc0ef18: 48 00 00 1c b ffc0ef34 <memfile_lseek+0x9c>
iop->size = the_jnode->info.file.size;
ffc0ef1c: 81 5e 00 50 lwz r10,80(r30)
ffc0ef20: 81 7e 00 54 lwz r11,84(r30)
ffc0ef24: 91 5f 00 08 stw r10,8(r31)
ffc0ef28: 91 7f 00 0c stw r11,12(r31)
}
return iop->offset;
ffc0ef2c: 81 5f 00 10 lwz r10,16(r31)
ffc0ef30: 81 7f 00 14 lwz r11,20(r31)
}
ffc0ef34: 7d 64 5b 78 mr r4,r11
ffc0ef38: 39 61 00 10 addi r11,r1,16
ffc0ef3c: 7d 43 53 78 mr r3,r10
ffc0ef40: 4b ff 15 f0 b ffc00530 <_restgpr_30_x>
ffc0ed68 <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
ffc0ed68: 94 21 ff f0 stwu r1,-16(r1)
ffc0ed6c: 7c 08 02 a6 mflr r0
ffc0ed70: 90 01 00 14 stw r0,20(r1)
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
ffc0ed74: 80 03 00 18 lwz r0,24(r3)
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
ffc0ed78: bf c1 00 08 stmw r30,8(r1)
ffc0ed7c: 7c 7e 1b 78 mr r30,r3
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
ffc0ed80: 70 09 02 04 andi. r9,r0,516
uint32_t mode
)
{
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
ffc0ed84: 83 e3 00 1c lwz r31,28(r3)
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
ffc0ed88: 41 82 00 64 beq- ffc0edec <memfile_open+0x84>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
ffc0ed8c: 80 1f 00 4c lwz r0,76(r31)
ffc0ed90: 2f 80 00 06 cmpwi cr7,r0,6
ffc0ed94: 40 be 00 58 bne+ cr7,ffc0edec <memfile_open+0x84> <== ALWAYS TAKEN
uint32_t count = the_jnode->info.linearfile.size;
ffc0ed98: 81 1f 00 54 lwz r8,84(r31) <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
ffc0ed9c: 38 00 00 05 li r0,5 <== NOT EXECUTED
ffc0eda0: 90 1f 00 4c stw r0,76(r31) <== NOT EXECUTED
the_jnode->info.file.size = 0;
ffc0eda4: 39 40 00 00 li r10,0 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
ffc0eda8: 2f 88 00 00 cmpwi cr7,r8,0 <== 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;
ffc0edac: 38 00 00 00 li r0,0 <== 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;
ffc0edb0: 80 ff 00 58 lwz r7,88(r31) <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
ffc0edb4: 39 60 00 00 li r11,0 <== NOT EXECUTED
ffc0edb8: 91 5f 00 50 stw r10,80(r31) <== NOT EXECUTED
ffc0edbc: 91 7f 00 54 stw r11,84(r31) <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
ffc0edc0: 90 1f 00 58 stw r0,88(r31) <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
ffc0edc4: 90 1f 00 5c stw r0,92(r31) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
ffc0edc8: 90 1f 00 60 stw r0,96(r31) <== NOT EXECUTED
if ((count != 0)
ffc0edcc: 41 be 00 20 beq+ cr7,ffc0edec <memfile_open+0x84> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
ffc0edd0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0edd4: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc0edd8: 38 c0 00 00 li r6,0 <== NOT EXECUTED
ffc0eddc: 4b ff fd a1 bl ffc0eb7c <IMFS_memfile_write> <== NOT EXECUTED
return -1;
ffc0ede0: 38 00 ff ff li r0,-1 <== NOT EXECUTED
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)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
ffc0ede4: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED
ffc0ede8: 41 9e 00 34 beq- cr7,ffc0ee1c <memfile_open+0xb4> <== NOT EXECUTED
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
ffc0edec: 80 1e 00 18 lwz r0,24(r30)
ffc0edf0: 70 09 02 00 andi. r9,r0,512
ffc0edf4: 41 82 00 14 beq- ffc0ee08 <memfile_open+0xa0>
iop->offset = the_jnode->info.file.size;
ffc0edf8: 81 5f 00 50 lwz r10,80(r31)
ffc0edfc: 81 7f 00 54 lwz r11,84(r31)
ffc0ee00: 91 5e 00 10 stw r10,16(r30)
ffc0ee04: 91 7e 00 14 stw r11,20(r30)
iop->size = the_jnode->info.file.size;
ffc0ee08: 81 5f 00 50 lwz r10,80(r31)
return 0;
ffc0ee0c: 38 00 00 00 li r0,0
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = the_jnode->info.file.size;
iop->size = the_jnode->info.file.size;
ffc0ee10: 81 7f 00 54 lwz r11,84(r31)
ffc0ee14: 91 5e 00 08 stw r10,8(r30)
ffc0ee18: 91 7e 00 0c stw r11,12(r30)
return 0;
}
ffc0ee1c: 39 61 00 10 addi r11,r1,16
ffc0ee20: 7c 03 03 78 mr r3,r0
ffc0ee24: 4b ff 17 0c b ffc00530 <_restgpr_30_x>
ffc04f38 <mount>:
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
ffc04f38: 2b 86 00 01 cmplwi cr7,r6,1
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
ffc04f3c: 94 21 ff a0 stwu r1,-96(r1)
ffc04f40: 7c 08 02 a6 mflr r0
ffc04f44: be 41 00 28 stmw r18,40(r1)
ffc04f48: 7c 7c 1b 78 mr r28,r3
ffc04f4c: 7c 9f 23 78 mr r31,r4
ffc04f50: 90 01 00 64 stw r0,100(r1)
ffc04f54: 7c b9 2b 78 mr r25,r5
ffc04f58: 7c d8 33 78 mr r24,r6
ffc04f5c: 7c fa 3b 78 mr r26,r7
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
ffc04f60: 41 9d 00 14 bgt- cr7,ffc04f74 <mount+0x3c>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
ffc04f64: 7c a3 2b 78 mr r3,r5
ffc04f68: 48 00 83 51 bl ffc0d2b8 <rtems_filesystem_get_mount_handler>
if ( !mount_h )
ffc04f6c: 7c 7b 1b 79 mr. r27,r3
ffc04f70: 40 a2 00 10 bne+ ffc04f80 <mount+0x48>
rtems_set_errno_and_return_minus_one( EINVAL );
ffc04f74: 48 00 ac 29 bl ffc0fb9c <__errno>
ffc04f78: 38 00 00 16 li r0,22
ffc04f7c: 48 00 00 f0 b ffc0506c <mount+0x134>
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
bool has_target = target != NULL;
ffc04f80: 7f fd 00 34 cntlzw r29,r31
ffc04f84: 57 bd d9 7e rlwinm r29,r29,27,5,31
ffc04f88: 6b bd 00 01 xori r29,r29,1
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
ffc04f8c: 2f 9d 00 00 cmpwi cr7,r29,0
ffc04f90: 7f f6 fb 78 mr r22,r31
ffc04f94: 40 be 00 0c bne+ cr7,ffc04fa0 <mount+0x68>
ffc04f98: 3e c0 ff c2 lis r22,-62
ffc04f9c: 3a d6 be 20 addi r22,r22,-16864
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
ffc04fa0: 7f 23 cb 78 mr r3,r25
ffc04fa4: 48 00 c5 25 bl ffc114c8 <strlen>
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
ffc04fa8: 2f 9c 00 00 cmpwi cr7,r28,0
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
ffc04fac: 7c 72 1b 78 mr r18,r3
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
ffc04fb0: 3a e0 00 00 li r23,0
ffc04fb4: 41 9e 00 10 beq- cr7,ffc04fc4 <mount+0x8c>
ffc04fb8: 7f 83 e3 78 mr r3,r28
ffc04fbc: 48 00 c5 0d bl ffc114c8 <strlen>
ffc04fc0: 3a e3 00 01 addi r23,r3,1
size_t target_size = strlen( target ) + 1;
ffc04fc4: 7e c3 b3 78 mr r3,r22
ffc04fc8: 48 00 c5 01 bl ffc114c8 <strlen>
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
ffc04fcc: 38 92 00 75 addi r4,r18,117
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
ffc04fd0: 3a 63 00 01 addi r19,r3,1
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
ffc04fd4: 7c 84 ba 14 add r4,r4,r23
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
ffc04fd8: 7c 74 1b 78 mr r20,r3
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
ffc04fdc: 7c 84 9a 14 add r4,r4,r19
ffc04fe0: 38 60 00 01 li r3,1
ffc04fe4: 4b ff f3 cd bl ffc043b0 <calloc>
if ( mt_entry != NULL ) {
ffc04fe8: 7c 7e 1b 79 mr. r30,r3
ffc04fec: 41 82 00 78 beq- ffc05064 <mount+0x12c> <== NEVER TAKEN
char *str = (char *) mt_entry + sizeof( *mt_entry );
ffc04ff0: 3a be 00 74 addi r21,r30,116
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
ffc04ff4: 3a 52 00 01 addi r18,r18,1
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
memcpy( str, filesystemtype, filesystemtype_size );
ffc04ff8: 7f 24 cb 78 mr r4,r25
ffc04ffc: 7e 45 93 78 mr r5,r18
ffc05000: 7e a3 ab 78 mr r3,r21
ffc05004: 48 00 b8 d5 bl ffc108d8 <memcpy>
mt_entry->type = str;
str += filesystemtype_size;
ffc05008: 7f 35 92 14 add r25,r21,r18
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
ffc0500c: 92 be 00 6c stw r21,108(r30)
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
ffc05010: 7e e5 bb 78 mr r5,r23
ffc05014: 7f 84 e3 78 mr r4,r28
ffc05018: 7f 23 cb 78 mr r3,r25
ffc0501c: 48 00 b8 bd bl ffc108d8 <memcpy>
mt_entry->dev = str;
str += source_size;
ffc05020: 7e f9 ba 14 add r23,r25,r23
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
ffc05024: 93 3e 00 70 stw r25,112(r30)
str += source_size;
memcpy( str, target, target_size );
ffc05028: 7e c4 b3 78 mr r4,r22
ffc0502c: 7e 65 9b 78 mr r5,r19
ffc05030: 7e e3 bb 78 mr r3,r23
ffc05034: 48 00 b8 a5 bl ffc108d8 <memcpy>
mt_entry->target = str;
ffc05038: 92 fe 00 68 stw r23,104(r30)
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
ffc0503c: 3c 80 ff c2 lis r4,-62
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
ffc05040: 93 de 00 2c stw r30,44(r30)
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
ffc05044: 38 7e 00 38 addi r3,r30,56
ffc05048: 38 84 c2 d4 addi r4,r4,-15660
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
ffc0504c: 93 1e 00 30 stw r24,48(r30)
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
ffc05050: 38 a0 00 30 li r5,48
ffc05054: 48 00 b8 85 bl ffc108d8 <memcpy>
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
ffc05058: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0505c: 41 be 00 d0 beq+ cr7,ffc0512c <mount+0x1f4>
ffc05060: 48 00 00 18 b ffc05078 <mount+0x140>
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
ffc05064: 48 00 ab 39 bl ffc0fb9c <__errno> <== NOT EXECUTED
ffc05068: 38 00 00 0c li r0,12 <== NOT EXECUTED
ffc0506c: 90 03 00 00 stw r0,0(r3)
ffc05070: 3b e0 ff ff li r31,-1
ffc05074: 48 00 01 7c b ffc051f0 <mount+0x2b8>
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
ffc05078: 7f e3 fb 78 mr r3,r31
ffc0507c: 7e 84 a3 78 mr r4,r20
ffc05080: 38 a0 00 07 li r5,7
ffc05084: 38 c1 00 08 addi r6,r1,8
ffc05088: 38 e0 00 01 li r7,1
ffc0508c: 4b ff f7 1d bl ffc047a8 <rtems_filesystem_evaluate_path>
ffc05090: 2f 83 ff ff cmpwi cr7,r3,-1
ffc05094: 41 9e 01 3c beq- cr7,ffc051d0 <mount+0x298> <== NEVER TAKEN
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
ffc05098: 81 21 00 14 lwz r9,20(r1)
ffc0509c: 38 61 00 08 addi r3,r1,8
ffc050a0: 80 09 00 10 lwz r0,16(r9)
ffc050a4: 7c 09 03 a6 mtctr r0
ffc050a8: 4e 80 04 21 bctrl
ffc050ac: 2f 83 00 01 cmpwi cr7,r3,1
ffc050b0: 41 9e 00 10 beq- cr7,ffc050c0 <mount+0x188>
errno = ENOTDIR;
ffc050b4: 48 00 aa e9 bl ffc0fb9c <__errno>
ffc050b8: 38 00 00 14 li r0,20
ffc050bc: 48 00 00 24 b ffc050e0 <mount+0x1a8>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
ffc050c0: 3c 60 ff c0 lis r3,-64
ffc050c4: 80 81 00 08 lwz r4,8(r1)
ffc050c8: 38 63 4e 80 addi r3,r3,20096
ffc050cc: 4b ff fd f9 bl ffc04ec4 <rtems_filesystem_mount_iterate>
ffc050d0: 2f 83 00 00 cmpwi cr7,r3,0
ffc050d4: 41 9e 00 18 beq- cr7,ffc050ec <mount+0x1b4>
errno = EBUSY;
ffc050d8: 48 00 aa c5 bl ffc0fb9c <__errno>
ffc050dc: 38 00 00 10 li r0,16
ffc050e0: 90 03 00 00 stw r0,0(r3)
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
target, target_length, RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
goto cleanup_and_bail;
loc_to_free = &loc;
ffc050e4: 3b 81 00 08 addi r28,r1,8
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
errno = EBUSY;
goto cleanup_and_bail;
ffc050e8: 48 00 00 ec b ffc051d4 <mount+0x29c>
* 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.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
ffc050ec: 80 01 00 08 lwz r0,8(r1)
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( loc.ops->mount_h( mt_entry ) ) {
ffc050f0: 7f c3 f3 78 mr r3,r30
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
ffc050f4: 81 21 00 14 lwz r9,20(r1)
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
target, target_length, RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
goto cleanup_and_bail;
loc_to_free = &loc;
ffc050f8: 3b 81 00 08 addi r28,r1,8
* 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.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
ffc050fc: 90 1e 00 08 stw r0,8(r30)
mt_entry->mt_point_node.handlers = loc.handlers;
ffc05100: 80 01 00 10 lwz r0,16(r1)
mt_entry->mt_point_node.ops = loc.ops;
ffc05104: 91 3e 00 14 stw r9,20(r30)
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
ffc05108: 90 1e 00 10 stw r0,16(r30)
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
ffc0510c: 80 01 00 18 lwz r0,24(r1)
ffc05110: 90 1e 00 18 stw r0,24(r30)
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( loc.ops->mount_h( mt_entry ) ) {
ffc05114: 80 09 00 20 lwz r0,32(r9)
ffc05118: 7c 09 03 a6 mtctr r0
ffc0511c: 4e 80 04 21 bctrl
ffc05120: 2f 83 00 00 cmpwi cr7,r3,0
ffc05124: 40 9e 00 b0 bne- cr7,ffc051d4 <mount+0x29c> <== NEVER TAKEN
ffc05128: 48 00 00 30 b ffc05158 <mount+0x220>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0512c: 3d 20 00 00 lis r9,0
ffc05130: 39 69 21 9c addi r11,r9,8604
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
ffc05134: 81 29 21 9c lwz r9,8604(r9)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc05138: 38 0b 00 04 addi r0,r11,4
ffc0513c: 7f 89 00 00 cmpw cr7,r9,r0
ffc05140: 41 9e 00 14 beq- cr7,ffc05154 <mount+0x21c> <== ALWAYS TAKEN
errno = EINVAL;
ffc05144: 48 00 aa 59 bl ffc0fb9c <__errno> <== NOT EXECUTED
ffc05148: 38 00 00 16 li r0,22 <== NOT EXECUTED
ffc0514c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
ffc05150: 48 00 00 80 b ffc051d0 <mount+0x298> <== NOT EXECUTED
)
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
ffc05154: 3b 80 00 00 li r28,0
* mt_point_node.node_access will be left to null to indicate that this
* is the root of the entire file system.
*/
}
if ( (*mount_h)( mt_entry, data ) ) {
ffc05158: 7f c3 f3 78 mr r3,r30
ffc0515c: 7f 69 03 a6 mtctr r27
ffc05160: 7f 44 d3 78 mr r4,r26
ffc05164: 4e 80 04 21 bctrl
ffc05168: 2f 83 00 00 cmpwi cr7,r3,0
ffc0516c: 41 9e 00 1c beq- cr7,ffc05188 <mount+0x250>
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
ffc05170: 81 21 00 14 lwz r9,20(r1)
ffc05174: 7f c3 f3 78 mr r3,r30
ffc05178: 80 09 00 28 lwz r0,40(r9)
ffc0517c: 7c 09 03 a6 mtctr r0
ffc05180: 4e 80 04 21 bctrl
goto cleanup_and_bail;
ffc05184: 48 00 00 50 b ffc051d4 <mount+0x29c>
}
/*
* Add the mount table entry to the mount table chain
*/
rtems_libio_lock();
ffc05188: 4b ff fd 0d bl ffc04e94 <rtems_libio_lock>
ffc0518c: 3c 60 00 00 lis r3,0
ffc05190: 38 63 21 9c addi r3,r3,8604
ffc05194: 7f c4 f3 78 mr r4,r30
ffc05198: 48 00 39 c1 bl ffc08b58 <_Chain_Append>
ffc0519c: 3d 20 00 00 lis r9,0
ffc051a0: 80 69 27 b4 lwz r3,10164(r9)
rtems_libio_unlock();
if ( !has_target )
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
ffc051a4: 3b e0 00 00 li r31,0
ffc051a8: 48 00 2f 95 bl ffc0813c <rtems_semaphore_release>
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
ffc051ac: 2f 9d 00 00 cmpwi cr7,r29,0
ffc051b0: 40 9e 00 40 bne- cr7,ffc051f0 <mount+0x2b8>
rtems_filesystem_root = mt_entry->mt_fs_root;
ffc051b4: 3d 20 00 00 lis r9,0
ffc051b8: 81 69 27 3c lwz r11,10044(r9)
ffc051bc: 38 7e 00 1c addi r3,r30,28
ffc051c0: 39 6b 00 18 addi r11,r11,24
ffc051c4: 7c a3 a4 aa lswi r5,r3,20
ffc051c8: 7c ab a5 aa stswi r5,r11,20
ffc051cc: 48 00 00 24 b ffc051f0 <mount+0x2b8>
)
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
ffc051d0: 3b 80 00 00 li r28,0 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
ffc051d4: 7f c3 f3 78 mr r3,r30
ffc051d8: 4b ff f6 f1 bl ffc048c8 <free>
if ( loc_to_free )
ffc051dc: 2f 9c 00 00 cmpwi cr7,r28,0
rtems_filesystem_freenode( loc_to_free );
return -1;
ffc051e0: 3b e0 ff ff li r31,-1
cleanup_and_bail:
free( mt_entry );
if ( loc_to_free )
ffc051e4: 41 9e 00 0c beq- cr7,ffc051f0 <mount+0x2b8> <== NEVER TAKEN
rtems_filesystem_freenode( loc_to_free );
ffc051e8: 7f 83 e3 78 mr r3,r28
ffc051ec: 4b ff f6 b1 bl ffc0489c <rtems_filesystem_freenode>
return -1;
}
ffc051f0: 39 61 00 60 addi r11,r1,96
ffc051f4: 7f e3 fb 78 mr r3,r31
ffc051f8: 4b ff b3 08 b ffc00500 <_restgpr_18_x>
ffc04dc0 <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
ffc04dc0: 94 21 ff e0 stwu r1,-32(r1)
ffc04dc4: 7c 08 02 a6 mflr r0
ffc04dc8: bf c1 00 18 stmw r30,24(r1)
int rv = -1;
if (target != NULL) {
ffc04dcc: 7c 9e 23 79 mr. r30,r4
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
ffc04dd0: 7c 7f 1b 78 mr r31,r3
ffc04dd4: 90 01 00 24 stw r0,36(r1)
int rv = -1;
if (target != NULL) {
ffc04dd8: 41 82 00 40 beq- ffc04e18 <mount_and_make_target_path+0x58>
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
ffc04ddc: 7f c3 f3 78 mr r3,r30
ffc04de0: 90 a1 00 08 stw r5,8(r1)
ffc04de4: 38 80 01 ff li r4,511
ffc04de8: 90 c1 00 0c stw r6,12(r1)
ffc04dec: 90 e1 00 10 stw r7,16(r1)
ffc04df0: 48 00 09 b1 bl ffc057a0 <rtems_mkdir>
if (rv == 0) {
ffc04df4: 2c 03 00 00 cmpwi r3,0
ffc04df8: 80 a1 00 08 lwz r5,8(r1)
ffc04dfc: 80 c1 00 0c lwz r6,12(r1)
ffc04e00: 80 e1 00 10 lwz r7,16(r1)
ffc04e04: 40 a2 00 24 bne+ ffc04e28 <mount_and_make_target_path+0x68><== NEVER TAKEN
rv = mount(
ffc04e08: 7f e3 fb 78 mr r3,r31
ffc04e0c: 7f c4 f3 78 mr r4,r30
ffc04e10: 48 00 00 d9 bl ffc04ee8 <mount>
ffc04e14: 48 00 00 14 b ffc04e28 <mount_and_make_target_path+0x68>
options,
data
);
}
} else {
errno = EINVAL;
ffc04e18: 48 00 aa 0d bl ffc0f824 <__errno>
ffc04e1c: 38 00 00 16 li r0,22
ffc04e20: 90 03 00 00 stw r0,0(r3)
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
ffc04e24: 38 60 ff ff li r3,-1
} else {
errno = EINVAL;
}
return rv;
}
ffc04e28: 39 61 00 20 addi r11,r1,32
ffc04e2c: 48 00 f8 d0 b ffc146fc <_restgpr_30_x>
ffc054a8 <newlib_delete_hook>:
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ffc054a8: 7f 83 20 00 cmpw cr7,r3,r4
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
ffc054ac: 94 21 ff e8 stwu r1,-24(r1)
ffc054b0: 7c 08 02 a6 mflr r0
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
ffc054b4: 3d 20 00 00 lis r9,0
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
ffc054b8: bf a1 00 0c stmw r29,12(r1)
ffc054bc: 7c 7d 1b 78 mr r29,r3
ffc054c0: 7c 9e 23 78 mr r30,r4
ffc054c4: 90 01 00 1c stw r0,28(r1)
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
ffc054c8: 83 e9 27 4c lwz r31,10060(r9)
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ffc054cc: 41 9e 00 08 beq- cr7,ffc054d4 <newlib_delete_hook+0x2c>
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
ffc054d0: 83 e4 01 28 lwz r31,296(r4)
}
if (ptr && ptr != _global_impure_ptr) {
ffc054d4: 2f 9f 00 00 cmpwi cr7,r31,0
ffc054d8: 41 9e 00 2c beq- cr7,ffc05504 <newlib_delete_hook+0x5c> <== NEVER TAKEN
ffc054dc: 3d 20 00 00 lis r9,0
ffc054e0: 80 09 27 48 lwz r0,10056(r9)
ffc054e4: 7f 9f 00 00 cmpw cr7,r31,r0
ffc054e8: 41 9e 00 1c beq- cr7,ffc05504 <newlib_delete_hook+0x5c>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
ffc054ec: 3c 80 ff c0 lis r4,-64
ffc054f0: 7f e3 fb 78 mr r3,r31
ffc054f4: 38 84 52 90 addi r4,r4,21136
ffc054f8: 48 00 b1 c5 bl ffc106bc <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
ffc054fc: 7f e3 fb 78 mr r3,r31
ffc05500: 48 00 66 a1 bl ffc0bba0 <_Workspace_Free>
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
ffc05504: 7f 9d f0 00 cmpw cr7,r29,r30
#else
_Workspace_Free(ptr);
#endif
}
deleted_task->libc_reent = NULL;
ffc05508: 38 00 00 00 li r0,0
ffc0550c: 90 1e 01 28 stw r0,296(r30)
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
ffc05510: 40 be 00 0c bne+ cr7,ffc0551c <newlib_delete_hook+0x74>
_REENT = 0;
ffc05514: 3d 20 00 00 lis r9,0
ffc05518: 90 09 27 4c stw r0,10060(r9)
}
}
ffc0551c: 39 61 00 18 addi r11,r1,24
ffc05520: 4b ff b0 0c b ffc0052c <_restgpr_29_x>
ffc05290 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
ffc05290: 7c 2b 0b 78 mr r11,r1
ffc05294: 7c 08 02 a6 mflr r0
ffc05298: 94 21 ff f0 stwu r1,-16(r1)
ffc0529c: 48 01 50 99 bl ffc1a334 <_savegpr_31>
ffc052a0: 90 01 00 14 stw r0,20(r1)
ffc052a4: 7c 7f 1b 78 mr r31,r3
switch ( fileno(fp) ) {
ffc052a8: 48 00 ae 19 bl ffc100c0 <fileno>
ffc052ac: 2b 83 00 02 cmplwi cr7,r3,2
ffc052b0: 41 9d 00 34 bgt- cr7,ffc052e4 <newlib_free_buffers+0x54><== NEVER TAKEN
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
ffc052b4: a0 1f 00 0c lhz r0,12(r31)
ffc052b8: 70 09 00 80 andi. r9,r0,128
ffc052bc: 41 a2 00 30 beq+ ffc052ec <newlib_free_buffers+0x5c> <== ALWAYS TAKEN
free( fp->_bf._base );
ffc052c0: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc052c4: 4b ff f6 05 bl ffc048c8 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
ffc052c8: a0 1f 00 0c lhz r0,12(r31) <== NOT EXECUTED
ffc052cc: 54 00 06 6e rlwinm r0,r0,0,25,23 <== NOT EXECUTED
ffc052d0: b0 1f 00 0c sth r0,12(r31) <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
ffc052d4: 38 00 00 00 li r0,0 <== NOT EXECUTED
ffc052d8: 90 1f 00 00 stw r0,0(r31) <== NOT EXECUTED
ffc052dc: 90 1f 00 10 stw r0,16(r31) <== NOT EXECUTED
ffc052e0: 48 00 00 0c b ffc052ec <newlib_free_buffers+0x5c> <== NOT EXECUTED
}
break;
default:
fclose(fp);
ffc052e4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc052e8: 48 00 aa 41 bl ffc0fd28 <fclose> <== NOT EXECUTED
}
return 0;
}
ffc052ec: 39 61 00 10 addi r11,r1,16
ffc052f0: 38 60 00 00 li r3,0
ffc052f4: 4b ff b2 40 b ffc00534 <_restgpr_31_x>
ffc055b4 <open>:
int open(
const char *pathname,
int flags,
...
)
{
ffc055b4: 94 21 ff b8 stwu r1,-72(r1)
ffc055b8: 7c 08 02 a6 mflr r0
ffc055bc: 90 01 00 4c stw r0,76(r1)
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
ffc055c0: 38 04 00 01 addi r0,r4,1
if ( ( status & _FREAD ) == _FREAD )
ffc055c4: 70 09 00 01 andi. r9,r0,1
int open(
const char *pathname,
int flags,
...
)
{
ffc055c8: bf 41 00 30 stmw r26,48(r1)
ffc055cc: 7c 7d 1b 78 mr r29,r3
ffc055d0: 7c 9e 23 78 mr r30,r4
ffc055d4: 90 a1 00 28 stw r5,40(r1)
int eval_flags;
/*
* Set the Evaluation flags
*/
eval_flags = 0;
ffc055d8: 3b 80 00 00 li r28,0
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
ffc055dc: 41 82 00 08 beq- ffc055e4 <open+0x30>
eval_flags |= RTEMS_LIBIO_PERMS_READ;
ffc055e0: 3b 80 00 04 li r28,4
if ( ( status & _FWRITE ) == _FWRITE )
ffc055e4: 70 09 00 02 andi. r9,r0,2
ffc055e8: 41 82 00 08 beq- ffc055f0 <open+0x3c>
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
ffc055ec: 63 9c 00 02 ori r28,r28,2
va_start(ap, flags);
ffc055f0: 38 01 00 50 addi r0,r1,80
mode = va_arg( ap, int );
ffc055f4: 83 61 00 28 lwz r27,40(r1)
if ( ( status & _FREAD ) == _FREAD )
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
va_start(ap, flags);
ffc055f8: 90 01 00 0c stw r0,12(r1)
ffc055fc: 39 21 00 20 addi r9,r1,32
mode = va_arg( ap, int );
ffc05600: 38 00 00 03 li r0,3
if ( ( status & _FREAD ) == _FREAD )
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
va_start(ap, flags);
ffc05604: 91 21 00 10 stw r9,16(r1)
mode = va_arg( ap, int );
ffc05608: 98 01 00 08 stb r0,8(r1)
* 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();
ffc0560c: 48 00 79 7d bl ffc0cf88 <rtems_libio_allocate>
if ( iop == 0 ) {
ffc05610: 7c 7f 1b 79 mr. r31,r3
ffc05614: 41 82 01 70 beq- ffc05784 <open+0x1d0>
}
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
ffc05618: 7f a3 eb 78 mr r3,r29
ffc0561c: 48 00 be ad bl ffc114c8 <strlen>
ffc05620: 7f 85 e3 78 mr r5,r28
ffc05624: 7c 64 1b 78 mr r4,r3
ffc05628: 38 c1 00 14 addi r6,r1,20
ffc0562c: 7f a3 eb 78 mr r3,r29
ffc05630: 38 e0 00 01 li r7,1
ffc05634: 4b ff f1 75 bl ffc047a8 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
ffc05638: 2f 83 ff ff cmpwi cr7,r3,-1
ffc0563c: 40 be 00 80 bne+ cr7,ffc056bc <open+0x108>
if ( errno != ENOENT ) {
ffc05640: 48 00 a5 5d bl ffc0fb9c <__errno>
ffc05644: 80 03 00 00 lwz r0,0(r3)
ffc05648: 2f 80 00 02 cmpwi cr7,r0,2
ffc0564c: 41 9e 00 14 beq- cr7,ffc05660 <open+0xac>
rc = errno;
ffc05650: 48 00 a5 4d bl ffc0fb9c <__errno>
int mode;
int rc;
rtems_libio_t *iop = 0;
int status;
rtems_filesystem_location_info_t loc;
rtems_filesystem_location_info_t *loc_to_free = NULL;
ffc05654: 3b 80 00 00 li r28,0
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
rc = errno;
ffc05658: 83 43 00 00 lwz r26,0(r3)
goto done;
ffc0565c: 48 00 01 3c b ffc05798 <open+0x1e4>
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
ffc05660: 73 c0 02 00 andi. r0,r30,512
int mode;
int rc;
rtems_libio_t *iop = 0;
int status;
rtems_filesystem_location_info_t loc;
rtems_filesystem_location_info_t *loc_to_free = NULL;
ffc05664: 3b 80 00 00 li r28,0
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
rc = ENOENT;
ffc05668: 3b 40 00 02 li r26,2
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
ffc0566c: 41 a2 01 34 beq+ ffc057a0 <open+0x1ec>
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
ffc05670: 7f a3 eb 78 mr r3,r29
ffc05674: 63 64 80 00 ori r4,r27,32768
ffc05678: 38 a0 00 00 li r5,0
ffc0567c: 38 c0 00 00 li r6,0
ffc05680: 4b ff f7 19 bl ffc04d98 <mknod>
if ( rc ) {
ffc05684: 2f 83 00 00 cmpwi cr7,r3,0
ffc05688: 40 9e 00 8c bne- cr7,ffc05714 <open+0x160> <== NEVER TAKEN
/*
* After we do the mknod(), we have to evaluate the path to get the
* "loc" structure needed to actually have the file itself open.
* So we created it, and then we need to have "look it up."
*/
status = rtems_filesystem_evaluate_path(
ffc0568c: 7f a3 eb 78 mr r3,r29
ffc05690: 48 00 be 39 bl ffc114c8 <strlen>
ffc05694: 38 a0 00 00 li r5,0
ffc05698: 7c 64 1b 78 mr r4,r3
ffc0569c: 38 c1 00 14 addi r6,r1,20
ffc056a0: 7f a3 eb 78 mr r3,r29
ffc056a4: 38 e0 00 01 li r7,1
ffc056a8: 4b ff f1 01 bl ffc047a8 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
ffc056ac: 3b 40 00 0d li r26,13
* "loc" structure needed to actually have the file itself open.
* So we created it, and then we need to have "look it up."
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
ffc056b0: 2f 83 00 00 cmpwi cr7,r3,0
ffc056b4: 40 9e 00 ec bne- cr7,ffc057a0 <open+0x1ec> <== NEVER TAKEN
ffc056b8: 48 00 00 10 b ffc056c8 <open+0x114>
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
ffc056bc: 73 c0 0a 00 andi. r0,r30,2560
ffc056c0: 2f 80 0a 00 cmpwi cr7,r0,2560
ffc056c4: 41 9e 00 c8 beq- cr7,ffc0578c <open+0x1d8>
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
ffc056c8: 83 9f 00 18 lwz r28,24(r31)
ffc056cc: 7f c3 f3 78 mr r3,r30
ffc056d0: 48 00 78 29 bl ffc0cef8 <rtems_libio_fcntl_flags>
iop->pathinfo = loc;
ffc056d4: 39 7f 00 1c addi r11,r31,28
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
ffc056d8: 7c 63 e3 78 or r3,r3,r28
iop->pathinfo = loc;
ffc056dc: 3b 81 00 14 addi r28,r1,20
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
ffc056e0: 90 7f 00 18 stw r3,24(r31)
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
ffc056e4: 7f a4 eb 78 mr r4,r29
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
ffc056e8: 7c bc a4 aa lswi r5,r28,20
ffc056ec: 7c ab a5 aa stswi r5,r11,20
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
ffc056f0: 7f e3 fb 78 mr r3,r31
ffc056f4: 7f c5 f3 78 mr r5,r30
ffc056f8: 81 3f 00 24 lwz r9,36(r31)
ffc056fc: 7f 66 db 78 mr r6,r27
ffc05700: 80 09 00 00 lwz r0,0(r9)
ffc05704: 7c 09 03 a6 mtctr r0
ffc05708: 4e 80 04 21 bctrl
if ( rc ) {
ffc0570c: 2f 83 00 00 cmpwi cr7,r3,0
ffc05710: 41 be 00 10 beq+ cr7,ffc05720 <open+0x16c>
rc = errno;
ffc05714: 48 00 a4 89 bl ffc0fb9c <__errno>
ffc05718: 83 43 00 00 lwz r26,0(r3)
goto done;
ffc0571c: 48 00 00 7c b ffc05798 <open+0x1e4>
}
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
ffc05720: 73 c0 04 00 andi. r0,r30,1024
ffc05724: 41 a2 00 ac beq+ ffc057d0 <open+0x21c>
rc = ftruncate( iop - rtems_libio_iops, 0 );
ffc05728: 3d 20 00 00 lis r9,0
ffc0572c: 80 69 27 ac lwz r3,10156(r9)
ffc05730: 38 a0 00 00 li r5,0
ffc05734: 38 c0 00 00 li r6,0
ffc05738: 7c 63 f8 50 subf r3,r3,r31
ffc0573c: 7c 63 36 70 srawi r3,r3,6
ffc05740: 48 00 76 9d bl ffc0cddc <ftruncate>
if ( rc ) {
ffc05744: 7c 7a 1b 79 mr. r26,r3
ffc05748: 41 a2 00 88 beq+ ffc057d0 <open+0x21c>
if(errno) rc = errno;
ffc0574c: 48 00 a4 51 bl ffc0fb9c <__errno>
ffc05750: 80 03 00 00 lwz r0,0(r3)
ffc05754: 2f 80 00 00 cmpwi cr7,r0,0
ffc05758: 41 be 00 0c beq+ cr7,ffc05764 <open+0x1b0> <== NEVER TAKEN
ffc0575c: 48 00 a4 41 bl ffc0fb9c <__errno>
ffc05760: 83 43 00 00 lwz r26,0(r3)
close( iop - rtems_libio_iops );
ffc05764: 3d 20 00 00 lis r9,0
ffc05768: 80 09 27 ac lwz r0,10156(r9)
/* those are released by close(): */
iop = 0;
loc_to_free = NULL;
ffc0576c: 3b 80 00 00 li r28,0
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
close( iop - rtems_libio_iops );
ffc05770: 7f e0 f8 50 subf r31,r0,r31
ffc05774: 7f e3 36 70 srawi r3,r31,6
ffc05778: 48 00 75 d9 bl ffc0cd50 <close>
/* those are released by close(): */
iop = 0;
ffc0577c: 3b e0 00 00 li r31,0
ffc05780: 48 00 00 18 b ffc05798 <open+0x1e4>
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
if ( iop == 0 ) {
rc = ENFILE;
ffc05784: 3b 40 00 17 li r26,23
ffc05788: 48 00 00 38 b ffc057c0 <open+0x20c>
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
/* We were trying to create a file that already exists */
rc = EEXIST;
loc_to_free = &loc;
ffc0578c: 3b 81 00 14 addi r28,r1,20
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
/* We were trying to create a file that already exists */
rc = EEXIST;
ffc05790: 3b 40 00 11 li r26,17
ffc05794: 48 00 00 0c b ffc057a0 <open+0x1ec>
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
ffc05798: 2f 9a 00 00 cmpwi cr7,r26,0
ffc0579c: 41 be 00 34 beq+ cr7,ffc057d0 <open+0x21c> <== NEVER TAKEN
if ( iop )
ffc057a0: 2f 9f 00 00 cmpwi cr7,r31,0
ffc057a4: 41 9e 00 0c beq- cr7,ffc057b0 <open+0x1fc>
rtems_libio_free( iop );
ffc057a8: 7f e3 fb 78 mr r3,r31
ffc057ac: 48 00 78 75 bl ffc0d020 <rtems_libio_free>
if ( loc_to_free )
ffc057b0: 2f 9c 00 00 cmpwi cr7,r28,0
ffc057b4: 41 9e 00 0c beq- cr7,ffc057c0 <open+0x20c>
rtems_filesystem_freenode( loc_to_free );
ffc057b8: 7f 83 e3 78 mr r3,r28
ffc057bc: 4b ff f0 e1 bl ffc0489c <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( rc );
ffc057c0: 48 00 a3 dd bl ffc0fb9c <__errno>
ffc057c4: 93 43 00 00 stw r26,0(r3)
ffc057c8: 38 60 ff ff li r3,-1
ffc057cc: 48 00 00 14 b ffc057e0 <open+0x22c>
}
return iop - rtems_libio_iops;
ffc057d0: 3d 20 00 00 lis r9,0
ffc057d4: 80 69 27 ac lwz r3,10156(r9)
ffc057d8: 7f e3 f8 50 subf r31,r3,r31
ffc057dc: 7f e3 36 70 srawi r3,r31,6
}
ffc057e0: 39 61 00 48 addi r11,r1,72
ffc057e4: 4b ff ad 3c b ffc00520 <_restgpr_26_x>
ffc064d8 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc064d8: 7c 08 02 a6 mflr r0
ffc064dc: 7c 2b 0b 78 mr r11,r1
ffc064e0: 94 21 ff e8 stwu r1,-24(r1)
ffc064e4: 90 01 00 1c stw r0,28(r1)
ffc064e8: 48 01 3e 4d bl ffc1a334 <_savegpr_31>
ffc064ec: 7c 9f 23 78 mr r31,r4
int i;
if (tty->termios.c_oflag & OPOST) {
ffc064f0: 80 04 00 34 lwz r0,52(r4)
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc064f4: 98 61 00 08 stb r3,8(r1)
int i;
if (tty->termios.c_oflag & OPOST) {
ffc064f8: 70 09 00 01 andi. r9,r0,1
ffc064fc: 41 82 01 30 beq- ffc0662c <oproc+0x154> <== NEVER TAKEN
switch (c) {
ffc06500: 2f 83 00 09 cmpwi cr7,r3,9
ffc06504: 41 9e 00 90 beq- cr7,ffc06594 <oproc+0xbc>
ffc06508: 2b 83 00 09 cmplwi cr7,r3,9
ffc0650c: 41 9d 00 10 bgt- cr7,ffc0651c <oproc+0x44> <== ALWAYS TAKEN
ffc06510: 2f 83 00 08 cmpwi cr7,r3,8 <== NOT EXECUTED
ffc06514: 40 be 00 c4 bne+ cr7,ffc065d8 <oproc+0x100> <== NOT EXECUTED
ffc06518: 48 00 00 a8 b ffc065c0 <oproc+0xe8> <== NOT EXECUTED
ffc0651c: 2f 83 00 0a cmpwi cr7,r3,10
ffc06520: 41 9e 00 10 beq- cr7,ffc06530 <oproc+0x58>
ffc06524: 2f 83 00 0d cmpwi cr7,r3,13
ffc06528: 40 be 00 b0 bne+ cr7,ffc065d8 <oproc+0x100> <== ALWAYS TAKEN
ffc0652c: 48 00 00 34 b ffc06560 <oproc+0x88> <== NOT EXECUTED
case '\n':
if (tty->termios.c_oflag & ONLRET)
ffc06530: 70 09 00 20 andi. r9,r0,32
ffc06534: 41 82 00 0c beq- ffc06540 <oproc+0x68> <== ALWAYS TAKEN
tty->column = 0;
ffc06538: 39 20 00 00 li r9,0 <== NOT EXECUTED
ffc0653c: 91 24 00 28 stw r9,40(r4) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
ffc06540: 70 09 00 04 andi. r9,r0,4
ffc06544: 41 a2 00 e8 beq+ ffc0662c <oproc+0x154> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
ffc06548: 3c 60 ff c2 lis r3,-62
ffc0654c: 38 63 c3 06 addi r3,r3,-15610
ffc06550: 38 80 00 01 li r4,1
ffc06554: 7f e5 fb 78 mr r5,r31
ffc06558: 4b ff fe 61 bl ffc063b8 <rtems_termios_puts>
ffc0655c: 48 00 00 30 b ffc0658c <oproc+0xb4>
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
ffc06560: 70 09 00 10 andi. r9,r0,16 <== NOT EXECUTED
ffc06564: 41 82 00 10 beq- ffc06574 <oproc+0x9c> <== NOT EXECUTED
ffc06568: 81 24 00 28 lwz r9,40(r4) <== NOT EXECUTED
ffc0656c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc06570: 41 9e 00 cc beq- cr7,ffc0663c <oproc+0x164> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
ffc06574: 70 09 00 08 andi. r9,r0,8 <== NOT EXECUTED
ffc06578: 41 82 00 58 beq- ffc065d0 <oproc+0xf8> <== NOT EXECUTED
c = '\n';
ffc0657c: 39 20 00 0a li r9,10 <== NOT EXECUTED
ffc06580: 99 21 00 08 stb r9,8(r1) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
ffc06584: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED
ffc06588: 41 82 00 a4 beq- ffc0662c <oproc+0x154> <== NOT EXECUTED
tty->column = 0;
ffc0658c: 38 00 00 00 li r0,0
ffc06590: 48 00 00 98 b ffc06628 <oproc+0x150>
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
ffc06594: 54 00 04 e8 rlwinm r0,r0,0,19,20
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
ffc06598: 81 24 00 28 lwz r9,40(r4)
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
ffc0659c: 2f 80 18 00 cmpwi cr7,r0,6144
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
ffc065a0: 55 24 07 7e clrlwi r4,r9,29
ffc065a4: 20 84 00 08 subfic r4,r4,8
ffc065a8: 7c 09 22 14 add r0,r9,r4
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
ffc065ac: 90 1f 00 28 stw r0,40(r31)
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
ffc065b0: 40 be 00 7c bne+ cr7,ffc0662c <oproc+0x154> <== NEVER TAKEN
tty->column += i;
rtems_termios_puts ( " ", i, tty);
ffc065b4: 3c 60 ff c2 lis r3,-62
ffc065b8: 38 63 bb 36 addi r3,r3,-17610
ffc065bc: 48 00 00 78 b ffc06634 <oproc+0x15c>
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
ffc065c0: 81 24 00 28 lwz r9,40(r4) <== NOT EXECUTED
ffc065c4: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc065c8: 40 9d 00 64 ble- cr7,ffc0662c <oproc+0x154> <== NOT EXECUTED
tty->column--;
ffc065cc: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED
ffc065d0: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED
ffc065d4: 48 00 00 58 b ffc0662c <oproc+0x154> <== NOT EXECUTED
break;
default:
if (tty->termios.c_oflag & OLCUC)
ffc065d8: 70 09 00 02 andi. r9,r0,2
ffc065dc: 41 82 00 28 beq- ffc06604 <oproc+0x12c> <== ALWAYS TAKEN
c = toupper(c);
ffc065e0: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
ffc065e4: 81 29 27 44 lwz r9,10052(r9) <== NOT EXECUTED
ffc065e8: 7d 29 1a 14 add r9,r9,r3 <== NOT EXECUTED
ffc065ec: 88 09 00 01 lbz r0,1(r9) <== NOT EXECUTED
ffc065f0: 54 00 07 be clrlwi r0,r0,30 <== NOT EXECUTED
ffc065f4: 2f 80 00 02 cmpwi cr7,r0,2 <== NOT EXECUTED
ffc065f8: 40 be 00 08 bne+ cr7,ffc06600 <oproc+0x128> <== NOT EXECUTED
ffc065fc: 38 63 ff e0 addi r3,r3,-32 <== NOT EXECUTED
ffc06600: 98 61 00 08 stb r3,8(r1) <== NOT EXECUTED
if (!iscntrl(c))
ffc06604: 3d 20 00 00 lis r9,0
ffc06608: 88 01 00 08 lbz r0,8(r1)
ffc0660c: 81 29 27 44 lwz r9,10052(r9)
ffc06610: 7d 29 02 14 add r9,r9,r0
ffc06614: 88 09 00 01 lbz r0,1(r9)
ffc06618: 70 09 00 20 andi. r9,r0,32
ffc0661c: 40 82 00 10 bne- ffc0662c <oproc+0x154> <== NEVER TAKEN
tty->column++;
ffc06620: 81 3f 00 28 lwz r9,40(r31)
ffc06624: 38 09 00 01 addi r0,r9,1
ffc06628: 90 1f 00 28 stw r0,40(r31)
break;
}
}
rtems_termios_puts (&c, 1, tty);
ffc0662c: 38 61 00 08 addi r3,r1,8
ffc06630: 38 80 00 01 li r4,1
ffc06634: 7f e5 fb 78 mr r5,r31
ffc06638: 4b ff fd 81 bl ffc063b8 <rtems_termios_puts>
}
ffc0663c: 39 61 00 18 addi r11,r1,24
ffc06640: 4b ff 9e f4 b ffc00534 <_restgpr_31_x>
ffc0d9d4 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
ffc0d9d4: 94 21 ff d8 stwu r1,-40(r1)
ffc0d9d8: 7c 08 02 a6 mflr r0
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
ffc0d9dc: 38 80 01 ff li r4,511
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
ffc0d9e0: bf 81 00 18 stmw r28,24(r1)
ffc0d9e4: 7c 7d 1b 78 mr r29,r3
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
ffc0d9e8: 3c 60 ff c2 lis r3,-62
ffc0d9ec: 38 63 e5 4c addi r3,r3,-6836
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
ffc0d9f0: 90 01 00 2c stw r0,44(r1)
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
ffc0d9f4: 48 00 17 b5 bl ffc0f1a8 <rtems_mkdir>
return -1;
ffc0d9f8: 3b c0 ff ff li r30,-1
)
{
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
ffc0d9fc: 2f 83 00 00 cmpwi cr7,r3,0
ffc0da00: 40 9e 01 04 bne- cr7,ffc0db04 <pipe_create+0x130> <== NEVER TAKEN
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
ffc0da04: 3d 20 ff c2 lis r9,-62
ffc0da08: 3b e1 00 08 addi r31,r1,8
ffc0da0c: 39 29 e5 51 addi r9,r9,-6831
ffc0da10: 7c a9 54 aa lswi r5,r9,10
ffc0da14: 7c bf 55 aa stswi r5,r31,10
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
ffc0da18: 3d 20 00 00 lis r9,0
ffc0da1c: 3c 80 ff c2 lis r4,-62
ffc0da20: a0 a9 29 60 lhz r5,10592(r9)
ffc0da24: 38 84 e5 5c addi r4,r4,-6820
ffc0da28: 38 61 00 12 addi r3,r1,18
ffc0da2c: 38 05 00 01 addi r0,r5,1
ffc0da30: b0 09 29 60 sth r0,10592(r9)
ffc0da34: 4c c6 31 82 crclr 4*cr1+eq
ffc0da38: 48 00 40 d9 bl ffc11b10 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
ffc0da3c: 7f e3 fb 78 mr r3,r31
ffc0da40: 38 80 01 80 li r4,384
ffc0da44: 48 00 14 61 bl ffc0eea4 <mkfifo>
ffc0da48: 2f 83 00 00 cmpwi cr7,r3,0
ffc0da4c: 41 be 00 0c beq+ cr7,ffc0da58 <pipe_create+0x84>
if (errno != EEXIST){
ffc0da50: 48 00 31 ed bl ffc10c3c <__errno>
ffc0da54: 48 00 00 b0 b ffc0db04 <pipe_create+0x130>
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);
ffc0da58: 7f e3 fb 78 mr r3,r31
ffc0da5c: 38 80 40 00 li r4,16384
ffc0da60: 4c c6 31 82 crclr 4*cr1+eq
ffc0da64: 4b ff 8b 89 bl ffc065ec <open>
if (filsdes[0] < 0) {
ffc0da68: 2f 83 00 00 cmpwi cr7,r3,0
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);
ffc0da6c: 90 7d 00 00 stw r3,0(r29)
if (filsdes[0] < 0) {
ffc0da70: 40 bc 00 14 bge+ cr7,ffc0da84 <pipe_create+0xb0>
err = errno;
ffc0da74: 48 00 31 c9 bl ffc10c3c <__errno>
ffc0da78: 83 83 00 00 lwz r28,0(r3)
/* 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);
ffc0da7c: 7f e3 fb 78 mr r3,r31
ffc0da80: 48 00 00 68 b ffc0dae8 <pipe_create+0x114>
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
ffc0da84: 3d 20 00 00 lis r9,0
ffc0da88: 80 09 26 dc lwz r0,9948(r9)
ffc0da8c: 39 20 00 00 li r9,0
ffc0da90: 7f 83 00 40 cmplw cr7,r3,r0
ffc0da94: 40 9c 00 14 bge- cr7,ffc0daa8 <pipe_create+0xd4> <== NEVER TAKEN
ffc0da98: 3d 20 00 00 lis r9,0
ffc0da9c: 81 29 27 88 lwz r9,10120(r9)
ffc0daa0: 54 63 30 32 rlwinm r3,r3,6,0,25
ffc0daa4: 7d 29 1a 14 add r9,r9,r3
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
ffc0daa8: 80 09 00 18 lwz r0,24(r9)
filsdes[1] = open(fifopath, O_WRONLY);
ffc0daac: 38 61 00 08 addi r3,r1,8
ffc0dab0: 38 80 00 01 li r4,1
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
ffc0dab4: 54 00 00 3c rlwinm r0,r0,0,0,30
ffc0dab8: 90 09 00 18 stw r0,24(r9)
int pipe_create(
int filsdes[2]
)
{
rtems_libio_t *iop;
int err = 0;
ffc0dabc: 3b 80 00 00 li r28,0
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
ffc0dac0: 4c c6 31 82 crclr 4*cr1+eq
ffc0dac4: 4b ff 8b 29 bl ffc065ec <open>
if (filsdes[1] < 0) {
ffc0dac8: 2f 83 00 00 cmpwi cr7,r3,0
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
ffc0dacc: 90 7d 00 04 stw r3,4(r29)
if (filsdes[1] < 0) {
ffc0dad0: 40 bc 00 14 bge+ cr7,ffc0dae4 <pipe_create+0x110>
err = errno;
ffc0dad4: 48 00 31 69 bl ffc10c3c <__errno>
ffc0dad8: 83 83 00 00 lwz r28,0(r3)
close(filsdes[0]);
ffc0dadc: 80 7d 00 00 lwz r3,0(r29)
ffc0dae0: 4b ff 79 8d bl ffc0546c <close>
}
unlink(fifopath);
ffc0dae4: 38 61 00 08 addi r3,r1,8
ffc0dae8: 4b ff ab 7d bl ffc08664 <unlink>
}
if(err != 0)
ffc0daec: 2f 9c 00 00 cmpwi cr7,r28,0
rtems_set_errno_and_return_minus_one(err);
return 0;
ffc0daf0: 3b c0 00 00 li r30,0
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
ffc0daf4: 41 be 00 10 beq+ cr7,ffc0db04 <pipe_create+0x130>
rtems_set_errno_and_return_minus_one(err);
ffc0daf8: 48 00 31 45 bl ffc10c3c <__errno>
ffc0dafc: 3b c0 ff ff li r30,-1
ffc0db00: 93 83 00 00 stw r28,0(r3)
return 0;
}
ffc0db04: 39 61 00 28 addi r11,r1,40
ffc0db08: 7f c3 f3 78 mr r3,r30
ffc0db0c: 48 00 e9 6c b ffc1c478 <_restgpr_28_x>
ffc0f020 <pipe_ioctl>:
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
ffc0f020: 6c 89 40 04 xoris r9,r4,16388
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
ffc0f024: 94 21 ff f0 stwu r1,-16(r1)
if (cmd == FIONREAD) {
ffc0f028: 2f 89 66 7f cmpwi cr7,r9,26239
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
ffc0f02c: 7c 08 02 a6 mflr r0
ffc0f030: bf c1 00 08 stmw r30,8(r1)
ffc0f034: 7c 7f 1b 78 mr r31,r3
ffc0f038: 7c be 2b 78 mr r30,r5
ffc0f03c: 90 01 00 14 stw r0,20(r1)
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
ffc0f040: 38 00 ff ea li r0,-22
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
ffc0f044: 40 9e 00 40 bne- cr7,ffc0f084 <pipe_ioctl+0x64>
if (buffer == NULL)
ffc0f048: 2f 85 00 00 cmpwi cr7,r5,0
return -EFAULT;
ffc0f04c: 38 00 ff f2 li r0,-14
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
ffc0f050: 41 9e 00 34 beq- cr7,ffc0f084 <pipe_ioctl+0x64>
return -EFAULT;
if (! PIPE_LOCK(pipe))
ffc0f054: 80 63 00 28 lwz r3,40(r3)
ffc0f058: 38 80 00 00 li r4,0
ffc0f05c: 38 a0 00 00 li r5,0
ffc0f060: 4b ff ab e9 bl ffc09c48 <rtems_semaphore_obtain>
return -EINTR;
ffc0f064: 38 00 ff fc li r0,-4
{
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
if (! PIPE_LOCK(pipe))
ffc0f068: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f06c: 40 9e 00 18 bne- cr7,ffc0f084 <pipe_ioctl+0x64> <== NEVER TAKEN
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
ffc0f070: 80 1f 00 0c lwz r0,12(r31)
PIPE_UNLOCK(pipe);
ffc0f074: 80 7f 00 28 lwz r3,40(r31)
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
ffc0f078: 90 1e 00 00 stw r0,0(r30)
PIPE_UNLOCK(pipe);
ffc0f07c: 4b ff ac f9 bl ffc09d74 <rtems_semaphore_release>
return 0;
ffc0f080: 38 00 00 00 li r0,0
}
return -EINVAL;
}
ffc0f084: 39 61 00 10 addi r11,r1,16
ffc0f088: 7c 03 03 78 mr r3,r0
ffc0f08c: 48 01 0a 40 b ffc1facc <_restgpr_30_x>
ffc0ecb4 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ffc0ecb4: 94 21 ff c8 stwu r1,-56(r1)
ffc0ecb8: 7c 08 02 a6 mflr r0
ffc0ecbc: 90 01 00 3c stw r0,60(r1)
ffc0ecc0: bf 21 00 1c stmw r25,28(r1)
ffc0ecc4: 7c 7f 1b 78 mr r31,r3
ffc0ecc8: 7c 9e 23 78 mr r30,r4
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
ffc0eccc: 80 63 00 28 lwz r3,40(r3)
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ffc0ecd0: 7c bd 2b 78 mr r29,r5
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
ffc0ecd4: 38 80 00 00 li r4,0
ffc0ecd8: 38 a0 00 00 li r5,0
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ffc0ecdc: 7c d9 33 78 mr r25,r6
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
ffc0ece0: 4b ff af 69 bl ffc09c48 <rtems_semaphore_obtain>
ffc0ece4: 2f 83 00 00 cmpwi cr7,r3,0
return -EINTR;
ffc0ece8: 3b 80 ff fc li r28,-4
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
ffc0ecec: 40 9e 01 5c bne- cr7,ffc0ee48 <pipe_read+0x194> <== NEVER TAKEN
ffc0ecf0: 3b 80 00 00 li r28,0
ffc0ecf4: 48 00 01 24 b ffc0ee18 <pipe_read+0x164>
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
ffc0ecf8: 80 1f 00 14 lwz r0,20(r31)
ffc0ecfc: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ed00: 41 9e 01 20 beq- cr7,ffc0ee20 <pipe_read+0x16c>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ffc0ed04: 80 19 00 18 lwz r0,24(r25)
ffc0ed08: 70 09 00 01 andi. r9,r0,1
ffc0ed0c: 40 82 01 1c bne- ffc0ee28 <pipe_read+0x174>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
ffc0ed10: 81 3f 00 18 lwz r9,24(r31)
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
ffc0ed14: 3b 60 ff fc li r27,-4
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
ffc0ed18: 80 7f 00 28 lwz r3,40(r31)
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
ffc0ed1c: 38 09 00 01 addi r0,r9,1
ffc0ed20: 90 1f 00 18 stw r0,24(r31)
PIPE_UNLOCK(pipe);
ffc0ed24: 4b ff b0 51 bl ffc09d74 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
ffc0ed28: 80 7f 00 2c lwz r3,44(r31)
ffc0ed2c: 38 80 00 00 li r4,0
ffc0ed30: 48 00 0f bd bl ffc0fcec <rtems_barrier_wait>
ffc0ed34: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ed38: 40 9e 00 08 bne- cr7,ffc0ed40 <pipe_read+0x8c> <== NEVER TAKEN
ffc0ed3c: 3b 60 00 00 li r27,0
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
ffc0ed40: 80 7f 00 28 lwz r3,40(r31)
ffc0ed44: 38 80 00 00 li r4,0
ffc0ed48: 38 a0 00 00 li r5,0
ffc0ed4c: 4b ff ae fd bl ffc09c48 <rtems_semaphore_obtain>
ffc0ed50: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ed54: 40 9e 00 e4 bne- cr7,ffc0ee38 <pipe_read+0x184> <== NEVER TAKEN
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
if (ret != 0)
ffc0ed58: 2f 9b 00 00 cmpwi cr7,r27,0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
ffc0ed5c: 81 3f 00 18 lwz r9,24(r31)
ffc0ed60: 38 09 ff ff addi r0,r9,-1
ffc0ed64: 90 1f 00 18 stw r0,24(r31)
if (ret != 0)
ffc0ed68: 40 9e 00 c4 bne- cr7,ffc0ee2c <pipe_read+0x178> <== NEVER TAKEN
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
ffc0ed6c: 83 7f 00 0c lwz r27,12(r31)
ffc0ed70: 2f 9b 00 00 cmpwi cr7,r27,0
ffc0ed74: 41 9e ff 84 beq+ cr7,ffc0ecf8 <pipe_read+0x44>
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
ffc0ed78: 7c 1c e8 50 subf r0,r28,r29
ffc0ed7c: 7f 9b 00 40 cmplw cr7,r27,r0
ffc0ed80: 40 9d 00 08 ble- cr7,ffc0ed88 <pipe_read+0xd4>
ffc0ed84: 7c 1b 03 78 mr r27,r0
chunk1 = pipe->Size - pipe->Start;
ffc0ed88: 80 1f 00 08 lwz r0,8(r31)
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);
ffc0ed8c: 7f 65 db 78 mr r5,r27
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
ffc0ed90: 83 5f 00 04 lwz r26,4(r31)
ffc0ed94: 7c 7e e2 14 add r3,r30,r28
ffc0ed98: 80 9f 00 00 lwz r4,0(r31)
ffc0ed9c: 7f 40 d0 50 subf r26,r0,r26
if (chunk > chunk1) {
ffc0eda0: 7f 9b d0 00 cmpw cr7,r27,r26
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
ffc0eda4: 7c 84 02 14 add r4,r4,r0
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
ffc0eda8: 40 9d 00 1c ble- cr7,ffc0edc4 <pipe_read+0x110>
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
ffc0edac: 7f 45 d3 78 mr r5,r26
ffc0edb0: 48 00 3a 89 bl ffc12838 <memcpy>
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
ffc0edb4: 7c 7c d2 14 add r3,r28,r26
ffc0edb8: 80 9f 00 00 lwz r4,0(r31)
ffc0edbc: 7c 7e 1a 14 add r3,r30,r3
ffc0edc0: 7c ba d8 50 subf r5,r26,r27
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
ffc0edc4: 48 00 3a 75 bl ffc12838 <memcpy>
pipe->Start += chunk;
ffc0edc8: 80 1f 00 08 lwz r0,8(r31)
pipe->Start %= pipe->Size;
ffc0edcc: 81 3f 00 04 lwz r9,4(r31)
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
ffc0edd0: 7c 1b 02 14 add r0,r27,r0
pipe->Start %= pipe->Size;
ffc0edd4: 7d 60 4b 96 divwu r11,r0,r9
ffc0edd8: 7d 2b 49 d6 mullw r9,r11,r9
ffc0eddc: 7c 09 00 50 subf r0,r9,r0
ffc0ede0: 90 1f 00 08 stw r0,8(r31)
pipe->Length -= chunk;
ffc0ede4: 80 1f 00 0c lwz r0,12(r31)
ffc0ede8: 7c 1b 00 50 subf r0,r27,r0
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
ffc0edec: 2f 80 00 00 cmpwi cr7,r0,0
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
pipe->Length -= chunk;
ffc0edf0: 90 1f 00 0c stw r0,12(r31)
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
ffc0edf4: 40 9e 00 08 bne- cr7,ffc0edfc <pipe_read+0x148>
pipe->Start = 0;
ffc0edf8: 90 1f 00 08 stw r0,8(r31)
if (pipe->waitingWriters > 0)
ffc0edfc: 80 1f 00 1c lwz r0,28(r31)
ffc0ee00: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ee04: 41 be 00 10 beq+ cr7,ffc0ee14 <pipe_read+0x160>
PIPE_WAKEUPWRITERS(pipe);
ffc0ee08: 80 7f 00 30 lwz r3,48(r31)
ffc0ee0c: 38 81 00 08 addi r4,r1,8
ffc0ee10: 48 00 0e 71 bl ffc0fc80 <rtems_barrier_release>
read += chunk;
ffc0ee14: 7f 9c da 14 add r28,r28,r27
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
ffc0ee18: 7f 9c e8 40 cmplw cr7,r28,r29
ffc0ee1c: 41 9c ff 50 blt+ cr7,ffc0ed6c <pipe_read+0xb8>
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
ffc0ee20: 3b 60 00 00 li r27,0
ffc0ee24: 48 00 00 08 b ffc0ee2c <pipe_read+0x178>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
ffc0ee28: 3b 60 ff f5 li r27,-11
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
ffc0ee2c: 80 7f 00 28 lwz r3,40(r31)
ffc0ee30: 4b ff af 45 bl ffc09d74 <rtems_semaphore_release>
ffc0ee34: 48 00 00 08 b ffc0ee3c <pipe_read+0x188>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
ffc0ee38: 3b 60 ff fc li r27,-4 <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
ffc0ee3c: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0ee40: 41 bd 00 08 bgt+ cr7,ffc0ee48 <pipe_read+0x194>
return read;
return ret;
ffc0ee44: 7f 7c db 78 mr r28,r27
}
ffc0ee48: 39 61 00 38 addi r11,r1,56
ffc0ee4c: 7f 83 e3 78 mr r3,r28
ffc0ee50: 48 01 0c 68 b ffc1fab8 <_restgpr_25_x>
ffc0e82c <pipe_release>:
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
ffc0e82c: 94 21 ff d8 stwu r1,-40(r1)
ffc0e830: 7c 08 02 a6 mflr r0
ffc0e834: 90 01 00 2c stw r0,44(r1)
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
ffc0e838: 80 04 00 18 lwz r0,24(r4)
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
ffc0e83c: bf 81 00 18 stmw r28,24(r1)
ffc0e840: 7c 7e 1b 78 mr r30,r3
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
ffc0e844: 70 09 00 02 andi. r9,r0,2
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
pipe_control_t *pipe = *pipep;
ffc0e848: 83 e3 00 00 lwz r31,0(r3)
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
ffc0e84c: 54 1d 07 7c rlwinm r29,r0,0,29,30
if (mode & LIBIO_FLAGS_READ)
ffc0e850: 41 82 00 10 beq- ffc0e860 <pipe_release+0x34>
pipe->Readers --;
ffc0e854: 81 3f 00 10 lwz r9,16(r31)
ffc0e858: 38 09 ff ff addi r0,r9,-1
ffc0e85c: 90 1f 00 10 stw r0,16(r31)
if (mode & LIBIO_FLAGS_WRITE)
ffc0e860: 73 a0 00 04 andi. r0,r29,4
ffc0e864: 41 82 00 10 beq- ffc0e874 <pipe_release+0x48>
pipe->Writers --;
ffc0e868: 81 3f 00 14 lwz r9,20(r31)
ffc0e86c: 38 09 ff ff addi r0,r9,-1
ffc0e870: 90 1f 00 14 stw r0,20(r31)
PIPE_UNLOCK(pipe);
ffc0e874: 80 7f 00 28 lwz r3,40(r31)
ffc0e878: 4b ff b4 fd bl ffc09d74 <rtems_semaphore_release>
if (pipe->Readers == 0 && pipe->Writers == 0) {
ffc0e87c: 80 1f 00 10 lwz r0,16(r31)
ffc0e880: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e884: 40 9e 00 30 bne- cr7,ffc0e8b4 <pipe_release+0x88>
ffc0e888: 83 9f 00 14 lwz r28,20(r31)
ffc0e88c: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0e890: 40 be 00 14 bne+ cr7,ffc0e8a4 <pipe_release+0x78>
#if 0
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
ffc0e894: 7f e3 fb 78 mr r3,r31
ffc0e898: 4b ff ff 4d bl ffc0e7e4 <pipe_free>
*pipep = NULL;
ffc0e89c: 93 9e 00 00 stw r28,0(r30)
ffc0e8a0: 48 00 00 34 b ffc0e8d4 <pipe_release+0xa8>
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
ffc0e8a4: 2f 9d 00 04 cmpwi cr7,r29,4
ffc0e8a8: 41 be 00 0c beq+ cr7,ffc0e8b4 <pipe_release+0x88> <== NEVER TAKEN
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
ffc0e8ac: 80 7f 00 30 lwz r3,48(r31)
ffc0e8b0: 48 00 00 1c b ffc0e8cc <pipe_release+0xa0>
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
ffc0e8b4: 80 1f 00 14 lwz r0,20(r31)
ffc0e8b8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e8bc: 40 9e 00 18 bne- cr7,ffc0e8d4 <pipe_release+0xa8> <== NEVER TAKEN
ffc0e8c0: 2f 9d 00 02 cmpwi cr7,r29,2
ffc0e8c4: 41 9e 00 10 beq- cr7,ffc0e8d4 <pipe_release+0xa8> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
ffc0e8c8: 80 7f 00 2c lwz r3,44(r31)
ffc0e8cc: 38 81 00 08 addi r4,r1,8
ffc0e8d0: 48 00 13 b1 bl ffc0fc80 <rtems_barrier_release>
static void pipe_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
ffc0e8d4: 3d 20 00 00 lis r9,0
ffc0e8d8: 80 69 29 60 lwz r3,10592(r9)
ffc0e8dc: 4b ff b4 99 bl ffc09d74 <rtems_semaphore_release>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
ffc0e8e0: 39 61 00 28 addi r11,r1,40
ffc0e8e4: 48 01 11 e0 b ffc1fac4 <_restgpr_28_x>
ffc0ee54 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ffc0ee54: 94 21 ff c8 stwu r1,-56(r1)
ffc0ee58: 7c 08 02 a6 mflr r0
ffc0ee5c: bf 01 00 18 stmw r24,24(r1)
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
ffc0ee60: 7c bb 2b 79 mr. r27,r5
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ffc0ee64: 7c 7f 1b 78 mr r31,r3
ffc0ee68: 90 01 00 3c stw r0,60(r1)
ffc0ee6c: 7c 9e 23 78 mr r30,r4
ffc0ee70: 7c d8 33 78 mr r24,r6
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
return 0;
ffc0ee74: 3b a0 00 00 li r29,0
)
{
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
ffc0ee78: 41 a2 01 9c beq+ ffc0f014 <pipe_write+0x1c0> <== NEVER TAKEN
return 0;
if (! PIPE_LOCK(pipe))
ffc0ee7c: 80 63 00 28 lwz r3,40(r3)
ffc0ee80: 38 80 00 00 li r4,0
ffc0ee84: 38 a0 00 00 li r5,0
ffc0ee88: 4b ff ad c1 bl ffc09c48 <rtems_semaphore_obtain>
return -EINTR;
ffc0ee8c: 3b a0 ff fc li r29,-4
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
ffc0ee90: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ee94: 40 9e 01 80 bne- cr7,ffc0f014 <pipe_write+0x1c0> <== NEVER TAKEN
return -EINTR;
if (pipe->Readers == 0) {
ffc0ee98: 80 1f 00 10 lwz r0,16(r31)
ffc0ee9c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0eea0: 41 9e 01 40 beq- cr7,ffc0efe0 <pipe_write+0x18c>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
ffc0eea4: 80 1f 00 04 lwz r0,4(r31)
ffc0eea8: 3b 20 00 01 li r25,1
ffc0eeac: 7f 9b 00 40 cmplw cr7,r27,r0
ffc0eeb0: 41 9d 00 08 bgt- cr7,ffc0eeb8 <pipe_write+0x64> <== NEVER TAKEN
ffc0eeb4: 7f 79 db 78 mr r25,r27
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
ffc0eeb8: 3b a0 00 00 li r29,0
ffc0eebc: 48 00 01 14 b ffc0efd0 <pipe_write+0x17c>
/* 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)) {
ffc0eec0: 80 18 00 18 lwz r0,24(r24)
ffc0eec4: 70 09 00 01 andi. r9,r0,1
ffc0eec8: 40 82 01 24 bne- ffc0efec <pipe_write+0x198>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
ffc0eecc: 81 3f 00 1c lwz r9,28(r31)
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
ffc0eed0: 3b 80 ff fc li r28,-4
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
ffc0eed4: 80 7f 00 28 lwz r3,40(r31)
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
ffc0eed8: 38 09 00 01 addi r0,r9,1
ffc0eedc: 90 1f 00 1c stw r0,28(r31)
PIPE_UNLOCK(pipe);
ffc0eee0: 4b ff ae 95 bl ffc09d74 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
ffc0eee4: 80 7f 00 30 lwz r3,48(r31)
ffc0eee8: 38 80 00 00 li r4,0
ffc0eeec: 48 00 0e 01 bl ffc0fcec <rtems_barrier_wait>
ffc0eef0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0eef4: 40 9e 00 08 bne- cr7,ffc0eefc <pipe_write+0xa8> <== NEVER TAKEN
ffc0eef8: 3b 80 00 00 li r28,0
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
ffc0eefc: 80 7f 00 28 lwz r3,40(r31)
ffc0ef00: 38 80 00 00 li r4,0
ffc0ef04: 38 a0 00 00 li r5,0
ffc0ef08: 4b ff ad 41 bl ffc09c48 <rtems_semaphore_obtain>
ffc0ef0c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ef10: 40 9e 00 f4 bne- cr7,ffc0f004 <pipe_write+0x1b0> <== NEVER TAKEN
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
if (ret != 0)
ffc0ef14: 2f 9c 00 00 cmpwi cr7,r28,0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
ffc0ef18: 81 3f 00 1c lwz r9,28(r31)
ffc0ef1c: 38 09 ff ff addi r0,r9,-1
ffc0ef20: 90 1f 00 1c stw r0,28(r31)
if (ret != 0)
ffc0ef24: 40 9e 00 d4 bne- cr7,ffc0eff8 <pipe_write+0x1a4> <== NEVER TAKEN
goto out_locked;
if (pipe->Readers == 0) {
ffc0ef28: 80 1f 00 10 lwz r0,16(r31)
ffc0ef2c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ef30: 41 9e 00 c4 beq- cr7,ffc0eff4 <pipe_write+0x1a0> <== NEVER TAKEN
/* 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) {
ffc0ef34: 83 5f 00 04 lwz r26,4(r31)
ffc0ef38: 80 1f 00 0c lwz r0,12(r31)
ffc0ef3c: 7f 80 d0 50 subf r28,r0,r26
ffc0ef40: 7f 9c c8 40 cmplw cr7,r28,r25
ffc0ef44: 41 9c ff 7c blt+ cr7,ffc0eec0 <pipe_write+0x6c>
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
ffc0ef48: 7d 3d d8 50 subf r9,r29,r27
ffc0ef4c: 7f 9c 48 40 cmplw cr7,r28,r9
ffc0ef50: 40 9d 00 08 ble- cr7,ffc0ef58 <pipe_write+0x104>
ffc0ef54: 7d 3c 4b 78 mr r28,r9
chunk1 = pipe->Size - PIPE_WSTART(pipe);
ffc0ef58: 81 3f 00 08 lwz r9,8(r31)
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);
ffc0ef5c: 7f 85 e3 78 mr r5,r28
ffc0ef60: 80 7f 00 00 lwz r3,0(r31)
ffc0ef64: 7c 9e ea 14 add r4,r30,r29
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
ffc0ef68: 7d 20 4a 14 add r9,r0,r9
ffc0ef6c: 7c 09 d3 96 divwu r0,r9,r26
ffc0ef70: 7c 00 d1 d6 mullw r0,r0,r26
ffc0ef74: 7c 00 48 50 subf r0,r0,r9
ffc0ef78: 7f 40 d0 50 subf r26,r0,r26
if (chunk > chunk1) {
ffc0ef7c: 7f 9c d0 00 cmpw cr7,r28,r26
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
ffc0ef80: 7c 63 02 14 add r3,r3,r0
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
if (chunk > chunk1) {
ffc0ef84: 40 9d 00 1c ble- cr7,ffc0efa0 <pipe_write+0x14c>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
ffc0ef88: 7f 45 d3 78 mr r5,r26
ffc0ef8c: 48 00 38 ad bl ffc12838 <memcpy>
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
ffc0ef90: 7c 9a ea 14 add r4,r26,r29
ffc0ef94: 80 7f 00 00 lwz r3,0(r31)
ffc0ef98: 7c 9e 22 14 add r4,r30,r4
ffc0ef9c: 7c ba e0 50 subf r5,r26,r28
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
ffc0efa0: 48 00 38 99 bl ffc12838 <memcpy>
pipe->Length += chunk;
ffc0efa4: 80 1f 00 0c lwz r0,12(r31)
ffc0efa8: 7c 00 e2 14 add r0,r0,r28
ffc0efac: 90 1f 00 0c stw r0,12(r31)
if (pipe->waitingReaders > 0)
ffc0efb0: 80 1f 00 18 lwz r0,24(r31)
ffc0efb4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0efb8: 41 be 00 10 beq+ cr7,ffc0efc8 <pipe_write+0x174>
PIPE_WAKEUPREADERS(pipe);
ffc0efbc: 80 7f 00 2c lwz r3,44(r31)
ffc0efc0: 38 81 00 08 addi r4,r1,8
ffc0efc4: 48 00 0c bd bl ffc0fc80 <rtems_barrier_release>
written += chunk;
ffc0efc8: 7f bd e2 14 add r29,r29,r28
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
ffc0efcc: 3b 20 00 01 li r25,1
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
ffc0efd0: 7f 9d d8 40 cmplw cr7,r29,r27
ffc0efd4: 41 9c ff 60 blt+ cr7,ffc0ef34 <pipe_write+0xe0>
ffc0efd8: 3b 80 00 00 li r28,0
ffc0efdc: 48 00 00 1c b ffc0eff8 <pipe_write+0x1a4>
if (! PIPE_LOCK(pipe))
return -EINTR;
if (pipe->Readers == 0) {
ret = -EPIPE;
ffc0efe0: 3b 80 ff e0 li r28,-32
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
int chunk, chunk1, written = 0, ret = 0;
ffc0efe4: 3b a0 00 00 li r29,0
ffc0efe8: 48 00 00 10 b ffc0eff8 <pipe_write+0x1a4>
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
ffc0efec: 3b 80 ff f5 li r28,-11
ffc0eff0: 48 00 00 08 b ffc0eff8 <pipe_write+0x1a4>
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
ffc0eff4: 3b 80 ff e0 li r28,-32 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
ffc0eff8: 80 7f 00 28 lwz r3,40(r31)
ffc0effc: 4b ff ad 79 bl ffc09d74 <rtems_semaphore_release>
ffc0f000: 48 00 00 08 b ffc0f008 <pipe_write+0x1b4>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
ffc0f004: 3b 80 ff fc li r28,-4 <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
ffc0f008: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0f00c: 41 bd 00 08 bgt+ cr7,ffc0f014 <pipe_write+0x1c0>
return written;
return ret;
ffc0f010: 7f 9d e3 78 mr r29,r28
}
ffc0f014: 39 61 00 38 addi r11,r1,56
ffc0f018: 7f a3 eb 78 mr r3,r29
ffc0f01c: 48 01 0a 98 b ffc1fab4 <_restgpr_24_x>
ffc0891c <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
ffc0891c: 94 21 ff f8 stwu r1,-8(r1)
ffc08920: 7c 08 02 a6 mflr r0
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
ffc08924: 3d 60 00 00 lis r11,0
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
ffc08928: 90 01 00 0c stw r0,12(r1)
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
ffc0892c: 39 6b 33 d0 addi r11,r11,13264
ffc08930: 81 4b 00 08 lwz r10,8(r11)
ffc08934: 38 0a 00 01 addi r0,r10,1
ffc08938: 90 0b 00 08 stw r0,8(r11)
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
ffc0893c: 39 64 ff ff addi r11,r4,-1
ffc08940: 7d 6a 20 39 and. r10,r11,r4
return EINVAL;
ffc08944: 38 00 00 16 li r0,22
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
ffc08948: 40 a2 00 14 bne+ ffc0895c <posix_memalign+0x40> <== NEVER TAKEN
ffc0894c: 2b 84 00 03 cmplwi cr7,r4,3
ffc08950: 40 bd 00 0c ble+ cr7,ffc0895c <posix_memalign+0x40>
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
ffc08954: 48 00 02 e9 bl ffc08c3c <rtems_memalign>
ffc08958: 7c 60 1b 78 mr r0,r3
}
ffc0895c: 7c 03 03 78 mr r3,r0
ffc08960: 80 01 00 0c lwz r0,12(r1)
ffc08964: 38 21 00 08 addi r1,r1,8
ffc08968: 7c 08 03 a6 mtlr r0
ffc0896c: 4e 80 00 20 blr
ffc057fc <printk>:
* printk
*
* Kernel printf function requiring minimal infrastructure.
*/
void printk(const char *fmt, ...)
{
ffc057fc: 94 21 ff 88 stwu r1,-120(r1)
ffc05800: 7c 08 02 a6 mflr r0
ffc05804: 90 81 00 1c stw r4,28(r1)
ffc05808: 90 01 00 7c stw r0,124(r1)
ffc0580c: 90 a1 00 20 stw r5,32(r1)
ffc05810: 90 c1 00 24 stw r6,36(r1)
ffc05814: 90 e1 00 28 stw r7,40(r1)
ffc05818: 91 01 00 2c stw r8,44(r1)
ffc0581c: 91 21 00 30 stw r9,48(r1)
ffc05820: 91 41 00 34 stw r10,52(r1)
ffc05824: 40 86 00 24 bne- cr1,ffc05848 <printk+0x4c> <== ALWAYS TAKEN
ffc05828: d8 21 00 38 stfd f1,56(r1) <== NOT EXECUTED
ffc0582c: d8 41 00 40 stfd f2,64(r1) <== NOT EXECUTED
ffc05830: d8 61 00 48 stfd f3,72(r1) <== NOT EXECUTED
ffc05834: d8 81 00 50 stfd f4,80(r1) <== NOT EXECUTED
ffc05838: d8 a1 00 58 stfd f5,88(r1) <== NOT EXECUTED
ffc0583c: d8 c1 00 60 stfd f6,96(r1) <== NOT EXECUTED
ffc05840: d8 e1 00 68 stfd f7,104(r1) <== NOT EXECUTED
ffc05844: d9 01 00 70 stfd f8,112(r1) <== NOT EXECUTED
va_list ap; /* points to each unnamed argument in turn */
va_start(ap, fmt); /* make ap point to 1st unnamed arg */
ffc05848: 38 00 00 01 li r0,1
ffc0584c: 98 01 00 08 stb r0,8(r1)
ffc05850: 38 00 00 00 li r0,0
vprintk(fmt, ap);
ffc05854: 38 81 00 08 addi r4,r1,8
*/
void printk(const char *fmt, ...)
{
va_list ap; /* points to each unnamed argument in turn */
va_start(ap, fmt); /* make ap point to 1st unnamed arg */
ffc05858: 98 01 00 09 stb r0,9(r1)
ffc0585c: 38 01 00 80 addi r0,r1,128
ffc05860: 90 01 00 0c stw r0,12(r1)
ffc05864: 38 01 00 18 addi r0,r1,24
ffc05868: 90 01 00 10 stw r0,16(r1)
vprintk(fmt, ap);
ffc0586c: 48 00 1d 31 bl ffc0759c <vprintk>
va_end(ap); /* clean up when done */
}
ffc05870: 80 01 00 7c lwz r0,124(r1)
ffc05874: 38 21 00 78 addi r1,r1,120
ffc05878: 7c 08 03 a6 mtlr r0
ffc0587c: 4e 80 00 20 blr
ffc068e0 <printk_plugin>:
int printk_plugin(
void *ignored __attribute__((unused)),
const char *format,
...
)
{
ffc068e0: 94 21 ff 90 stwu r1,-112(r1)
ffc068e4: 7c 08 02 a6 mflr r0
ffc068e8: 90 a1 00 18 stw r5,24(r1)
ffc068ec: 90 01 00 74 stw r0,116(r1)
ffc068f0: 90 c1 00 1c stw r6,28(r1)
ffc068f4: 90 e1 00 20 stw r7,32(r1)
ffc068f8: 91 01 00 24 stw r8,36(r1)
ffc068fc: 91 21 00 28 stw r9,40(r1)
ffc06900: 91 41 00 2c stw r10,44(r1)
ffc06904: 40 86 00 24 bne- cr1,ffc06928 <printk_plugin+0x48> <== ALWAYS TAKEN
ffc06908: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED
ffc0690c: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc06910: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc06914: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc06918: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc0691c: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc06920: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc06924: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
va_list arg_pointer;
va_start (arg_pointer, format);
ffc06928: 38 00 00 02 li r0,2
ffc0692c: 98 01 00 08 stb r0,8(r1)
ffc06930: 38 00 00 00 li r0,0
vprintk( format, arg_pointer );
ffc06934: 7c 83 23 78 mr r3,r4
...
)
{
va_list arg_pointer;
va_start (arg_pointer, format);
ffc06938: 98 01 00 09 stb r0,9(r1)
ffc0693c: 38 01 00 78 addi r0,r1,120
vprintk( format, arg_pointer );
ffc06940: 38 81 00 08 addi r4,r1,8
...
)
{
va_list arg_pointer;
va_start (arg_pointer, format);
ffc06944: 90 01 00 0c stw r0,12(r1)
ffc06948: 38 01 00 10 addi r0,r1,16
ffc0694c: 90 01 00 10 stw r0,16(r1)
vprintk( format, arg_pointer );
ffc06950: 48 00 1d 35 bl ffc08684 <vprintk>
va_end(arg_pointer); /* clean up when done */
return 0;
}
ffc06954: 38 60 00 00 li r3,0
ffc06958: 80 01 00 74 lwz r0,116(r1)
ffc0695c: 38 21 00 70 addi r1,r1,112
ffc06960: 7c 08 03 a6 mtlr r0
ffc06964: 4e 80 00 20 blr
ffc1a950 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
ffc1a950: 7c 08 02 a6 mflr r0
ffc1a954: 7c 2b 0b 78 mr r11,r1
ffc1a958: 94 21 ff f0 stwu r1,-16(r1)
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc1a95c: 3d 40 00 00 lis r10,0
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
ffc1a960: 90 01 00 14 stw r0,20(r1)
ffc1a964: 4b ff f9 d1 bl ffc1a334 <_savegpr_31>
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc1a968: 80 0a 26 fc lwz r0,9980(r10)
ffc1a96c: 7f 83 00 40 cmplw cr7,r3,r0
ffc1a970: 40 9c 00 48 bge- cr7,ffc1a9b8 <read+0x68> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
ffc1a974: 3d 40 00 00 lis r10,0
ffc1a978: 83 ea 27 ac lwz r31,10156(r10)
ffc1a97c: 54 63 30 32 rlwinm r3,r3,6,0,25
ffc1a980: 7f ff 1a 14 add r31,r31,r3
rtems_libio_check_is_open( iop );
ffc1a984: 80 1f 00 18 lwz r0,24(r31)
ffc1a988: 70 0a 01 00 andi. r10,r0,256
ffc1a98c: 41 82 00 2c beq- ffc1a9b8 <read+0x68>
rtems_libio_check_buffer( buffer );
ffc1a990: 2f 84 00 00 cmpwi cr7,r4,0
ffc1a994: 40 be 00 10 bne+ cr7,ffc1a9a4 <read+0x54> <== ALWAYS TAKEN
ffc1a998: 4b ff 52 05 bl ffc0fb9c <__errno> <== NOT EXECUTED
ffc1a99c: 38 00 00 16 li r0,22 <== NOT EXECUTED
ffc1a9a0: 48 00 00 20 b ffc1a9c0 <read+0x70> <== NOT EXECUTED
rtems_libio_check_count( count );
ffc1a9a4: 2f 85 00 00 cmpwi cr7,r5,0
ffc1a9a8: 38 60 00 00 li r3,0
ffc1a9ac: 41 9e 00 5c beq- cr7,ffc1aa08 <read+0xb8>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
ffc1a9b0: 70 09 00 02 andi. r9,r0,2
ffc1a9b4: 40 a2 00 18 bne+ ffc1a9cc <read+0x7c>
ffc1a9b8: 4b ff 51 e5 bl ffc0fb9c <__errno>
ffc1a9bc: 38 00 00 09 li r0,9
ffc1a9c0: 90 03 00 00 stw r0,0(r3)
ffc1a9c4: 38 60 ff ff li r3,-1
ffc1a9c8: 48 00 00 40 b ffc1aa08 <read+0xb8>
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
ffc1a9cc: 81 3f 00 24 lwz r9,36(r31)
ffc1a9d0: 7f e3 fb 78 mr r3,r31
ffc1a9d4: 80 09 00 08 lwz r0,8(r9)
ffc1a9d8: 7c 09 03 a6 mtctr r0
ffc1a9dc: 4e 80 04 21 bctrl
if ( rc > 0 )
ffc1a9e0: 2c 03 00 00 cmpwi r3,0
ffc1a9e4: 40 81 00 24 ble- ffc1aa08 <read+0xb8>
iop->offset += rc;
ffc1a9e8: 81 1f 00 10 lwz r8,16(r31)
ffc1a9ec: 7c 6b 1b 78 mr r11,r3
ffc1a9f0: 81 3f 00 14 lwz r9,20(r31)
ffc1a9f4: 7c 6a fe 70 srawi r10,r3,31
ffc1a9f8: 7d 6b 48 14 addc r11,r11,r9
ffc1a9fc: 7d 4a 41 14 adde r10,r10,r8
ffc1aa00: 91 5f 00 10 stw r10,16(r31)
ffc1aa04: 91 7f 00 14 stw r11,20(r31)
return rc;
}
ffc1aa08: 39 61 00 10 addi r11,r1,16
ffc1aa0c: 4b fe 5b 28 b ffc00534 <_restgpr_31_x>
ffc07abc <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
ffc07abc: 94 21 ff c8 stwu r1,-56(r1)
ffc07ac0: 7c 08 02 a6 mflr r0
ffc07ac4: bf a1 00 2c stmw r29,44(r1)
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
ffc07ac8: 7c 9e 23 79 mr. r30,r4
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
ffc07acc: 7c 7d 1b 78 mr r29,r3
ffc07ad0: 90 01 00 3c stw r0,60(r1)
ffc07ad4: 7c bf 2b 78 mr r31,r5
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
ffc07ad8: 40 a2 00 18 bne+ ffc07af0 <readlink+0x34>
rtems_set_errno_and_return_minus_one( EFAULT );
ffc07adc: 48 00 ac 35 bl ffc12710 <__errno>
ffc07ae0: 38 00 00 0e li r0,14
ffc07ae4: 90 03 00 00 stw r0,0(r3)
ffc07ae8: 3b a0 ff ff li r29,-1
ffc07aec: 48 00 00 88 b ffc07b74 <readlink+0xb8>
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
ffc07af0: 48 00 cc 69 bl ffc14758 <strlen>
ffc07af4: 38 a0 00 00 li r5,0
ffc07af8: 7c 64 1b 78 mr r4,r3
ffc07afc: 38 c1 00 08 addi r6,r1,8
ffc07b00: 7f a3 eb 78 mr r3,r29
ffc07b04: 38 e0 00 00 li r7,0
ffc07b08: 4b ff ec ed bl ffc067f4 <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
return -1;
ffc07b0c: 3b a0 ff ff li r29,-1
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
0, &loc, false );
if ( result != 0 )
ffc07b10: 2f 83 00 00 cmpwi cr7,r3,0
ffc07b14: 40 9e 00 60 bne- cr7,ffc07b74 <readlink+0xb8> <== NEVER TAKEN
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
ffc07b18: 81 21 00 14 lwz r9,20(r1)
ffc07b1c: 38 61 00 08 addi r3,r1,8
ffc07b20: 80 09 00 10 lwz r0,16(r9)
ffc07b24: 7c 09 03 a6 mtctr r0
ffc07b28: 4e 80 04 21 bctrl
ffc07b2c: 2f 83 00 04 cmpwi cr7,r3,4
ffc07b30: 41 be 00 1c beq+ cr7,ffc07b4c <readlink+0x90>
rtems_filesystem_freenode( &loc );
ffc07b34: 38 61 00 08 addi r3,r1,8
ffc07b38: 4b ff ed b1 bl ffc068e8 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EINVAL );
ffc07b3c: 48 00 ab d5 bl ffc12710 <__errno>
ffc07b40: 38 00 00 16 li r0,22
ffc07b44: 90 03 00 00 stw r0,0(r3)
ffc07b48: 48 00 00 2c b ffc07b74 <readlink+0xb8>
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
ffc07b4c: 81 21 00 14 lwz r9,20(r1)
ffc07b50: 38 61 00 08 addi r3,r1,8
ffc07b54: 7f c4 f3 78 mr r4,r30
ffc07b58: 80 09 00 3c lwz r0,60(r9)
ffc07b5c: 7f e5 fb 78 mr r5,r31
ffc07b60: 7c 09 03 a6 mtctr r0
ffc07b64: 4e 80 04 21 bctrl
ffc07b68: 7c 7d 1b 78 mr r29,r3
rtems_filesystem_freenode( &loc );
ffc07b6c: 38 61 00 08 addi r3,r1,8
ffc07b70: 4b ff ed 79 bl ffc068e8 <rtems_filesystem_freenode>
return result;
}
ffc07b74: 39 61 00 38 addi r11,r1,56
ffc07b78: 7f a3 eb 78 mr r3,r29
ffc07b7c: 4b ff aa e4 b ffc02660 <_restgpr_29_x>
ffc0648c <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc0648c: 94 21 ff d8 stwu r1,-40(r1)
ffc06490: 7c 08 02 a6 mflr r0
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc06494: 3d 20 00 00 lis r9,0
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc06498: 90 01 00 2c stw r0,44(r1)
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc0649c: 80 09 26 dc lwz r0,9948(r9)
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc064a0: bf 01 00 08 stmw r24,8(r1)
ffc064a4: 7c 9a 23 78 mr r26,r4
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc064a8: 7f 83 00 40 cmplw cr7,r3,r0
ffc064ac: 40 9c 00 28 bge- cr7,ffc064d4 <readv+0x48>
iop = rtems_libio_iop( fd );
ffc064b0: 3d 20 00 00 lis r9,0
ffc064b4: 83 69 27 88 lwz r27,10120(r9)
ffc064b8: 54 63 30 32 rlwinm r3,r3,6,0,25
ffc064bc: 7f 7b 1a 14 add r27,r27,r3
rtems_libio_check_is_open( iop );
ffc064c0: 80 1b 00 18 lwz r0,24(r27)
ffc064c4: 70 09 01 00 andi. r9,r0,256
ffc064c8: 41 82 00 0c beq- ffc064d4 <readv+0x48>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
ffc064cc: 70 09 00 02 andi. r9,r0,2
ffc064d0: 40 a2 00 10 bne+ ffc064e0 <readv+0x54> <== ALWAYS TAKEN
ffc064d4: 48 00 a1 19 bl ffc105ec <__errno>
ffc064d8: 38 00 00 09 li r0,9
ffc064dc: 48 00 00 5c b ffc06538 <readv+0xac>
/*
* Argument validation on IO vector
*/
if ( !iov )
ffc064e0: 2f 84 00 00 cmpwi cr7,r4,0
ffc064e4: 41 9e 00 4c beq- cr7,ffc06530 <readv+0xa4>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
ffc064e8: 2f 85 00 00 cmpwi cr7,r5,0
ffc064ec: 40 9d 00 44 ble- cr7,ffc06530 <readv+0xa4>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
ffc064f0: 2f 85 04 00 cmpwi cr7,r5,1024
ffc064f4: 41 9d 00 3c bgt- cr7,ffc06530 <readv+0xa4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
ffc064f8: 7c 89 23 78 mr r9,r4
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
ffc064fc: 7c a9 03 a6 mtctr r5
ffc06500: 38 00 00 01 li r0,1
ffc06504: 3b 00 00 00 li r24,0
ffc06508: 39 60 00 00 li r11,0
ffc0650c: 48 00 00 08 b ffc06514 <readv+0x88>
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
ffc06510: 7d 0b 43 78 mr r11,r8
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
ffc06514: 81 49 00 00 lwz r10,0(r9)
ffc06518: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0651c: 41 9e 00 14 beq- cr7,ffc06530 <readv+0xa4>
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
ffc06520: 81 49 00 04 lwz r10,4(r9)
ffc06524: 7d 0a 5a 14 add r8,r10,r11
if ( total < old )
ffc06528: 7f 88 58 00 cmpw cr7,r8,r11
ffc0652c: 40 bc 00 14 bge+ cr7,ffc06540 <readv+0xb4>
rtems_set_errno_and_return_minus_one( EINVAL );
ffc06530: 48 00 a0 bd bl ffc105ec <__errno>
ffc06534: 38 00 00 16 li r0,22
ffc06538: 90 03 00 00 stw r0,0(r3)
ffc0653c: 48 00 00 9c b ffc065d8 <readv+0x14c>
if ( iov[v].iov_len )
all_zeros = false;
ffc06540: 31 4a ff ff addic r10,r10,-1
ffc06544: 7d 4a 51 10 subfe r10,r10,r10
ffc06548: 7c 00 50 38 and r0,r0,r10
* 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++ ) {
ffc0654c: 3b 18 00 01 addi r24,r24,1
ffc06550: 39 29 00 08 addi r9,r9,8
ffc06554: 42 00 ff bc bdnz+ ffc06510 <readv+0x84>
/*
* 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 ) {
ffc06558: 2f 80 00 00 cmpwi cr7,r0,0
return 0;
ffc0655c: 3b a0 00 00 li r29,0
/*
* 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 ) {
ffc06560: 40 9e 00 7c bne- cr7,ffc065dc <readv+0x150>
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t readv(
ffc06564: 57 18 18 38 rlwinm r24,r24,3,0,28
ffc06568: 3b 80 00 00 li r28,0
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
ffc0656c: 81 3b 00 24 lwz r9,36(r27)
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t readv(
ffc06570: 7f 3a e2 14 add r25,r26,r28
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
ffc06574: 7f 63 db 78 mr r3,r27
ffc06578: 7c 9a e0 2e lwzx r4,r26,r28
ffc0657c: 80 09 00 08 lwz r0,8(r9)
ffc06580: 80 b9 00 04 lwz r5,4(r25)
ffc06584: 7c 09 03 a6 mtctr r0
ffc06588: 4e 80 04 21 bctrl
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
ffc0658c: 2c 03 00 00 cmpwi r3,0
ffc06590: 41 80 00 48 blt- ffc065d8 <readv+0x14c> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
ffc06594: 41 82 00 28 beq- ffc065bc <readv+0x130> <== NEVER TAKEN
iop->offset += bytes;
ffc06598: 81 5b 00 10 lwz r10,16(r27)
ffc0659c: 7c 7f 1b 78 mr r31,r3
ffc065a0: 81 7b 00 14 lwz r11,20(r27)
ffc065a4: 7c 7e fe 70 srawi r30,r3,31
total += bytes;
ffc065a8: 7f bd 1a 14 add r29,r29,r3
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
ffc065ac: 7d 6b f8 14 addc r11,r11,r31
ffc065b0: 7d 4a f1 14 adde r10,r10,r30
ffc065b4: 91 5b 00 10 stw r10,16(r27)
ffc065b8: 91 7b 00 14 stw r11,20(r27)
total += bytes;
}
if (bytes != iov[ v ].iov_len)
ffc065bc: 80 19 00 04 lwz r0,4(r25)
ffc065c0: 7f 83 00 00 cmpw cr7,r3,r0
ffc065c4: 40 9e 00 18 bne- cr7,ffc065dc <readv+0x150> <== NEVER TAKEN
ffc065c8: 3b 9c 00 08 addi r28,r28,8
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ffc065cc: 7f 9c c0 00 cmpw cr7,r28,r24
ffc065d0: 40 9e ff 9c bne+ cr7,ffc0656c <readv+0xe0>
ffc065d4: 48 00 00 08 b ffc065dc <readv+0x150>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
ffc065d8: 3b a0 ff ff li r29,-1
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
ffc065dc: 39 61 00 28 addi r11,r1,40
ffc065e0: 7f a3 eb 78 mr r3,r29
ffc065e4: 4b ff a5 80 b ffc00b64 <_restgpr_24_x>
ffc1aa74 <realloc>:
void *realloc(
void *ptr,
size_t size
)
{
ffc1aa74: 94 21 ff d8 stwu r1,-40(r1)
ffc1aa78: 7c 08 02 a6 mflr r0
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
ffc1aa7c: 3d 20 00 00 lis r9,0
void *realloc(
void *ptr,
size_t size
)
{
ffc1aa80: 90 01 00 2c stw r0,44(r1)
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
ffc1aa84: 39 29 2a e8 addi r9,r9,10984
ffc1aa88: 81 69 00 10 lwz r11,16(r9)
void *realloc(
void *ptr,
size_t size
)
{
ffc1aa8c: bf a1 00 1c stmw r29,28(r1)
ffc1aa90: 7c 7f 1b 78 mr r31,r3
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
ffc1aa94: 38 0b 00 01 addi r0,r11,1
ffc1aa98: 90 09 00 10 stw r0,16(r9)
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
ffc1aa9c: 3d 20 00 00 lis r9,0
void *realloc(
void *ptr,
size_t size
)
{
ffc1aaa0: 7c 9e 23 78 mr r30,r4
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
ffc1aaa4: 80 09 28 04 lwz r0,10244(r9)
ffc1aaa8: 2f 80 00 03 cmpwi cr7,r0,3
ffc1aaac: 40 be 00 24 bne+ cr7,ffc1aad0 <realloc+0x5c> <== NEVER TAKEN
* This routine returns true if thread dispatch indicates
* that we are in a critical section.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void)
{
if ( _Thread_Dispatch_disable_level == 0 )
ffc1aab0: 3d 20 00 00 lis r9,0
ffc1aab4: 80 09 27 c8 lwz r0,10184(r9)
ffc1aab8: 2f 80 00 00 cmpwi cr7,r0,0
ffc1aabc: 40 9e 00 d8 bne- cr7,ffc1ab94 <realloc+0x120> <== NEVER TAKEN
if (_Thread_Dispatch_in_critical_section())
return (void *) 0;
if (_ISR_Nest_level > 0)
ffc1aac0: 3d 20 00 00 lis r9,0
ffc1aac4: 80 09 2d c0 lwz r0,11712(r9)
ffc1aac8: 2f 80 00 00 cmpwi cr7,r0,0
ffc1aacc: 40 9e 00 c8 bne- cr7,ffc1ab94 <realloc+0x120> <== NEVER TAKEN
}
/*
* Continue with realloc().
*/
if ( !ptr )
ffc1aad0: 2f 9f 00 00 cmpwi cr7,r31,0
ffc1aad4: 40 be 00 14 bne+ cr7,ffc1aae8 <realloc+0x74>
return malloc( size );
ffc1aad8: 7f c3 f3 78 mr r3,r30
ffc1aadc: 4b fe a1 95 bl ffc04c70 <malloc>
ffc1aae0: 7c 7f 1b 78 mr r31,r3
ffc1aae4: 48 00 00 b4 b ffc1ab98 <realloc+0x124>
if ( !size ) {
ffc1aae8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc1aaec: 40 be 00 10 bne+ cr7,ffc1aafc <realloc+0x88> <== ALWAYS TAKEN
free( ptr );
ffc1aaf0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1aaf4: 4b fe 9d d5 bl ffc048c8 <free> <== NOT EXECUTED
ffc1aaf8: 48 00 00 9c b ffc1ab94 <realloc+0x120> <== NOT EXECUTED
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
ffc1aafc: 3f a0 00 00 lis r29,0
ffc1ab00: 80 7d 26 ec lwz r3,9964(r29)
ffc1ab04: 7f e4 fb 78 mr r4,r31
ffc1ab08: 38 a1 00 08 addi r5,r1,8
ffc1ab0c: 48 00 01 59 bl ffc1ac64 <_Protected_heap_Get_block_size>
ffc1ab10: 2f 83 00 00 cmpwi cr7,r3,0
ffc1ab14: 40 be 00 14 bne+ cr7,ffc1ab28 <realloc+0xb4>
errno = EINVAL;
ffc1ab18: 4b ff 50 85 bl ffc0fb9c <__errno>
ffc1ab1c: 38 00 00 16 li r0,22
ffc1ab20: 90 03 00 00 stw r0,0(r3)
ffc1ab24: 48 00 00 70 b ffc1ab94 <realloc+0x120>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
ffc1ab28: 80 7d 26 ec lwz r3,9964(r29)
ffc1ab2c: 7f e4 fb 78 mr r4,r31
ffc1ab30: 7f c5 f3 78 mr r5,r30
ffc1ab34: 48 00 01 81 bl ffc1acb4 <_Protected_heap_Resize_block>
ffc1ab38: 2f 83 00 00 cmpwi cr7,r3,0
ffc1ab3c: 40 be 00 5c bne+ cr7,ffc1ab98 <realloc+0x124>
* 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 );
ffc1ab40: 7f c3 f3 78 mr r3,r30
ffc1ab44: 4b fe a1 2d bl ffc04c70 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
ffc1ab48: 3d 20 00 00 lis r9,0
if ( !new_area ) {
ffc1ab4c: 7c 7d 1b 79 mr. r29,r3
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
ffc1ab50: 39 29 2a e8 addi r9,r9,10984
ffc1ab54: 81 69 00 04 lwz r11,4(r9)
ffc1ab58: 38 0b ff ff addi r0,r11,-1
ffc1ab5c: 90 09 00 04 stw r0,4(r9)
if ( !new_area ) {
ffc1ab60: 41 82 00 34 beq- ffc1ab94 <realloc+0x120>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
ffc1ab64: 80 01 00 08 lwz r0,8(r1)
ffc1ab68: 7f c5 f3 78 mr r5,r30
ffc1ab6c: 7f 9e 00 40 cmplw cr7,r30,r0
ffc1ab70: 40 9d 00 08 ble- cr7,ffc1ab78 <realloc+0x104> <== NEVER TAKEN
ffc1ab74: 7c 05 03 78 mr r5,r0
ffc1ab78: 7f e4 fb 78 mr r4,r31
ffc1ab7c: 7f a3 eb 78 mr r3,r29
ffc1ab80: 4b ff 5d 59 bl ffc108d8 <memcpy>
free( ptr );
ffc1ab84: 7f e3 fb 78 mr r3,r31
ffc1ab88: 4b fe 9d 41 bl ffc048c8 <free>
return new_area;
ffc1ab8c: 7f bf eb 78 mr r31,r29
ffc1ab90: 48 00 00 08 b ffc1ab98 <realloc+0x124>
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
ffc1ab94: 3b e0 00 00 li r31,0
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
ffc1ab98: 39 61 00 28 addi r11,r1,40
ffc1ab9c: 7f e3 fb 78 mr r3,r31
ffc1aba0: 4b fe 59 8c b ffc0052c <_restgpr_29_x>
ffc056d0 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
ffc056d0: 94 21 ff b0 stwu r1,-80(r1)
ffc056d4: 7c 08 02 a6 mflr r0
ffc056d8: bf 41 00 38 stmw r26,56(r1)
ffc056dc: 7c 7c 1b 78 mr r28,r3
ffc056e0: 90 01 00 54 stw r0,84(r1)
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
ffc056e4: 4b ff f0 01 bl ffc046e4 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
ffc056e8: 7c 7b 1b 79 mr. r27,r3
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
ffc056ec: 7f 83 e3 78 mr r3,r28
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
ffc056f0: 40 82 00 18 bne- ffc05708 <rmdir+0x38>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
ffc056f4: 38 81 00 08 addi r4,r1,8
ffc056f8: 38 a1 00 20 addi r5,r1,32
ffc056fc: 48 00 01 11 bl ffc0580c <rtems_filesystem_get_start_loc>
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
ffc05700: 3b a0 00 00 li r29,0
ffc05704: 48 00 00 28 b ffc0572c <rmdir+0x5c>
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
ffc05708: 7f 64 db 78 mr r4,r27
ffc0570c: 38 a0 00 02 li r5,2
ffc05710: 38 c1 00 20 addi r6,r1,32
ffc05714: 38 e0 00 00 li r7,0
ffc05718: 4b ff ef 71 bl ffc04688 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
return -1;
ffc0571c: 3b 40 ff ff li r26,-1
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
ffc05720: 2f 83 00 00 cmpwi cr7,r3,0
ffc05724: 40 9e 00 dc bne- cr7,ffc05800 <rmdir+0x130> <== NEVER TAKEN
return -1;
free_parentloc = true;
ffc05728: 3b a0 00 01 li r29,1
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
ffc0572c: 3b e1 00 0c addi r31,r1,12
ffc05730: 3b c1 00 20 addi r30,r1,32
ffc05734: 7c be a4 aa lswi r5,r30,20
ffc05738: 7c bf a5 aa stswi r5,r31,20
name = pathname + parentpathlen;
ffc0573c: 7f 9c da 14 add r28,r28,r27
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
ffc05740: 7f 83 e3 78 mr r3,r28
ffc05744: 48 00 b8 89 bl ffc10fcc <strlen>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
ffc05748: 3b 40 ff ff li r26,-1
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
ffc0574c: 7c 64 1b 78 mr r4,r3
ffc05750: 7f 83 e3 78 mr r3,r28
ffc05754: 4b ff ef d9 bl ffc0472c <rtems_filesystem_prefix_separators>
ffc05758: 7f 9c 1a 14 add r28,r28,r3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
ffc0575c: 7f 83 e3 78 mr r3,r28
ffc05760: 48 00 b8 6d bl ffc10fcc <strlen>
ffc05764: 38 a0 00 00 li r5,0
ffc05768: 7c 64 1b 78 mr r4,r3
ffc0576c: 7f e6 fb 78 mr r6,r31
ffc05770: 7f 83 e3 78 mr r3,r28
ffc05774: 38 e0 00 00 li r7,0
ffc05778: 4b ff ee 8d bl ffc04604 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
ffc0577c: 2f 83 00 00 cmpwi cr7,r3,0
ffc05780: 40 be 00 70 bne+ cr7,ffc057f0 <rmdir+0x120>
}
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
ffc05784: 81 21 00 18 lwz r9,24(r1)
ffc05788: 7f e3 fb 78 mr r3,r31
ffc0578c: 80 09 00 10 lwz r0,16(r9)
ffc05790: 7c 09 03 a6 mtctr r0
ffc05794: 4e 80 04 21 bctrl
ffc05798: 2f 83 00 01 cmpwi cr7,r3,1
ffc0579c: 41 be 00 30 beq+ cr7,ffc057cc <rmdir+0xfc>
rtems_filesystem_freenode( &loc );
ffc057a0: 7f e3 fb 78 mr r3,r31
ffc057a4: 4b ff ef d9 bl ffc0477c <rtems_filesystem_freenode>
if ( free_parentloc )
ffc057a8: 2f 9d 00 00 cmpwi cr7,r29,0
ffc057ac: 41 be 00 0c beq+ cr7,ffc057b8 <rmdir+0xe8> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
ffc057b0: 7f c3 f3 78 mr r3,r30
ffc057b4: 4b ff ef c9 bl ffc0477c <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( ENOTDIR );
ffc057b8: 48 00 a6 99 bl ffc0fe50 <__errno>
ffc057bc: 38 00 00 14 li r0,20
ffc057c0: 90 03 00 00 stw r0,0(r3)
ffc057c4: 3b 40 ff ff li r26,-1
ffc057c8: 48 00 00 38 b ffc05800 <rmdir+0x130>
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
ffc057cc: 81 21 00 14 lwz r9,20(r1)
ffc057d0: 7f c3 f3 78 mr r3,r30
ffc057d4: 7f e4 fb 78 mr r4,r31
ffc057d8: 80 09 00 34 lwz r0,52(r9)
ffc057dc: 7c 09 03 a6 mtctr r0
ffc057e0: 4e 80 04 21 bctrl
ffc057e4: 7c 7a 1b 78 mr r26,r3
rtems_filesystem_freenode( &loc );
ffc057e8: 7f e3 fb 78 mr r3,r31
ffc057ec: 4b ff ef 91 bl ffc0477c <rtems_filesystem_freenode>
if ( free_parentloc )
ffc057f0: 2f 9d 00 00 cmpwi cr7,r29,0
ffc057f4: 41 be 00 0c beq+ cr7,ffc05800 <rmdir+0x130>
rtems_filesystem_freenode( &parentloc );
ffc057f8: 7f c3 f3 78 mr r3,r30
ffc057fc: 4b ff ef 81 bl ffc0477c <rtems_filesystem_freenode>
return result;
}
ffc05800: 39 61 00 50 addi r11,r1,80
ffc05804: 7f 43 d3 78 mr r3,r26
ffc05808: 48 00 f6 58 b ffc14e60 <_restgpr_26_x>
ffc088e8 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
ffc088e8: 94 21 ff d0 stwu r1,-48(r1)
ffc088ec: 7c 08 02 a6 mflr r0
ffc088f0: bf 61 00 1c stmw r27,28(r1)
ffc088f4: 7c 7b 1b 78 mr r27,r3
ffc088f8: 7c 9c 23 78 mr r28,r4
ffc088fc: 90 01 00 34 stw r0,52(r1)
ffc08900: 7c bd 2b 78 mr r29,r5
ffc08904: 7c df 33 78 mr r31,r6
ffc08908: 48 00 00 20 b ffc08928 <rtems_chain_get_with_wait+0x40>
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
ffc0890c: 7f 83 e3 78 mr r3,r28
ffc08910: 38 80 00 00 li r4,0
ffc08914: 7f a5 eb 78 mr r5,r29
ffc08918: 38 c1 00 08 addi r6,r1,8
ffc0891c: 4b ff f2 bd bl ffc07bd8 <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
ffc08920: 2c 03 00 00 cmpwi r3,0
ffc08924: 40 82 00 18 bne- ffc0893c <rtems_chain_get_with_wait+0x54><== ALWAYS TAKEN
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
ffc08928: 7f 63 db 78 mr r3,r27
ffc0892c: 48 00 06 29 bl ffc08f54 <_Chain_Get>
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
ffc08930: 7c 7e 1b 79 mr. r30,r3
ffc08934: 41 82 ff d8 beq+ ffc0890c <rtems_chain_get_with_wait+0x24>
ffc08938: 38 60 00 00 li r3,0
}
*node_ptr = node;
return sc;
}
ffc0893c: 39 61 00 30 addi r11,r1,48
timeout,
&out
);
}
*node_ptr = node;
ffc08940: 93 df 00 00 stw r30,0(r31)
return sc;
}
ffc08944: 48 00 c4 5c b ffc14da0 <_restgpr_27_x>
ffc049bc <rtems_cpu_usage_report_with_plugin>:
*/
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc049bc: 94 21 ff 78 stwu r1,-136(r1)
ffc049c0: 7c 08 02 a6 mflr r0
ffc049c4: 90 01 00 8c stw r0,140(r1)
Timestamp_Control uptime, total, ran, uptime_at_last_reset;
#else
uint32_t total_units = 0;
#endif
if ( !print )
ffc049c8: 7c 80 23 79 mr. r0,r4
*/
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc049cc: be e1 00 64 stmw r23,100(r1)
ffc049d0: 7c 7d 1b 78 mr r29,r3
Timestamp_Control uptime, total, ran, uptime_at_last_reset;
#else
uint32_t total_units = 0;
#endif
if ( !print )
ffc049d4: 90 01 00 58 stw r0,88(r1)
ffc049d8: 41 82 01 c4 beq- ffc04b9c <rtems_cpu_usage_report_with_plugin+0x1e0><== NEVER TAKEN
* 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__
_Timestamp_Set_to_zero( &total );
uptime_at_last_reset = CPU_usage_Uptime_at_last_reset;
ffc049dc: 3d 20 00 00 lis r9,0
* 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__
_Timestamp_Set_to_zero( &total );
ffc049e0: 38 00 00 00 li r0,0
uptime_at_last_reset = CPU_usage_Uptime_at_last_reset;
ffc049e4: 39 29 28 94 addi r9,r9,10388
* 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__
_Timestamp_Set_to_zero( &total );
ffc049e8: 90 01 00 30 stw r0,48(r1)
}
}
}
#endif
(*print)(
ffc049ec: 3c 80 ff c2 lis r4,-62
* 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__
_Timestamp_Set_to_zero( &total );
ffc049f0: 90 01 00 34 stw r0,52(r1)
}
}
}
#endif
(*print)(
ffc049f4: 38 84 e0 eb addi r4,r4,-7957
ffc049f8: 3f e0 00 00 lis r31,0
* 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__
_Timestamp_Set_to_zero( &total );
uptime_at_last_reset = CPU_usage_Uptime_at_last_reset;
ffc049fc: 81 49 00 00 lwz r10,0(r9)
}
}
}
#endif
(*print)(
ffc04a00: 3b ff 30 00 addi r31,r31,12288
* 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__
_Timestamp_Set_to_zero( &total );
uptime_at_last_reset = CPU_usage_Uptime_at_last_reset;
ffc04a04: 81 69 00 04 lwz r11,4(r9)
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
(*print)(
ffc04a08: 3f 20 ff c2 lis r25,-62
}
}
}
#endif
(*print)(
ffc04a0c: 80 01 00 58 lwz r0,88(r1)
/*
* Print the information
*/
(*print)( context,
ffc04a10: 3f 60 ff c2 lis r27,-62
* 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__
_Timestamp_Set_to_zero( &total );
uptime_at_last_reset = CPU_usage_Uptime_at_last_reset;
ffc04a14: 91 41 00 20 stw r10,32(r1)
#endif
/*
* rtems_cpu_usage_report
*/
void rtems_cpu_usage_report_with_plugin(
ffc04a18: 3b 1f 00 0c addi r24,r31,12
}
}
}
#endif
(*print)(
ffc04a1c: 7c 09 03 a6 mtctr r0
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
(*print)(
ffc04a20: 3b 39 e2 5d addi r25,r25,-7587
* 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__
_Timestamp_Set_to_zero( &total );
uptime_at_last_reset = CPU_usage_Uptime_at_last_reset;
ffc04a24: 91 61 00 24 stw r11,36(r1)
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
ffc04a28: 3f 40 00 00 lis r26,0
/*
* Print the information
*/
(*print)( context,
ffc04a2c: 3b 7b e2 70 addi r27,r27,-7568
}
}
}
#endif
(*print)(
ffc04a30: 4c c6 31 82 crclr 4*cr1+eq
ffc04a34: 4e 80 04 21 bctrl
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
ffc04a38: 85 3f 00 04 lwzu r9,4(r31)
ffc04a3c: 2f 89 00 00 cmpwi cr7,r9,0
ffc04a40: 41 9e 01 28 beq- cr7,ffc04b68 <rtems_cpu_usage_report_with_plugin+0x1ac>
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
ffc04a44: 83 89 00 04 lwz r28,4(r9)
if ( information ) {
ffc04a48: 3b c0 00 01 li r30,1
ffc04a4c: 2f 9c 00 00 cmpwi cr7,r28,0
ffc04a50: 40 be 01 0c bne+ cr7,ffc04b5c <rtems_cpu_usage_report_with_plugin+0x1a0><== ALWAYS TAKEN
ffc04a54: 48 00 01 14 b ffc04b68 <rtems_cpu_usage_report_with_plugin+0x1ac><== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
ffc04a58: 81 3c 00 1c lwz r9,28(r28)
ffc04a5c: 57 c0 10 3a rlwinm r0,r30,2,0,29
ffc04a60: 7e e9 00 2e lwzx r23,r9,r0
if ( !the_thread )
ffc04a64: 2f 97 00 00 cmpwi cr7,r23,0
ffc04a68: 41 9e 00 f0 beq- cr7,ffc04b58 <rtems_cpu_usage_report_with_plugin+0x19c><== NEVER TAKEN
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
ffc04a6c: 80 77 00 08 lwz r3,8(r23)
ffc04a70: 38 80 00 0d li r4,13
ffc04a74: 38 a1 00 40 addi r5,r1,64
ffc04a78: 48 00 46 cd bl ffc09144 <rtems_object_get_name>
(*print)(
ffc04a7c: 80 01 00 58 lwz r0,88(r1)
ffc04a80: 7f a3 eb 78 mr r3,r29
ffc04a84: 80 b7 00 08 lwz r5,8(r23)
ffc04a88: 7c 09 03 a6 mtctr r0
ffc04a8c: 7f 24 cb 78 mr r4,r25
ffc04a90: 38 c1 00 40 addi r6,r1,64
ffc04a94: 4c c6 31 82 crclr 4*cr1+eq
ffc04a98: 4e 80 04 21 bctrl
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
ffc04a9c: 81 77 00 88 lwz r11,136(r23)
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
ffc04aa0: 39 3a 32 18 addi r9,r26,12824
ffc04aa4: 80 17 00 08 lwz r0,8(r23)
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
ffc04aa8: 91 61 00 2c stw r11,44(r1)
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
ffc04aac: 81 69 00 0c lwz r11,12(r9)
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
ffc04ab0: 81 57 00 84 lwz r10,132(r23)
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
ffc04ab4: 81 6b 00 08 lwz r11,8(r11)
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
ffc04ab8: 91 41 00 28 stw r10,40(r1)
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
ffc04abc: 7f 8b 00 00 cmpw cr7,r11,r0
ffc04ac0: 40 be 00 3c bne+ cr7,ffc04afc <rtems_cpu_usage_report_with_plugin+0x140>
*time_of_context_switch = _Thread_Time_of_last_context_switch;
ffc04ac4: 81 49 00 1c lwz r10,28(r9)
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( is_executing_on_a_core( the_thread, &last ) ) {
Timestamp_Control used;
_TOD_Get_uptime( &uptime );
ffc04ac8: 38 61 00 38 addi r3,r1,56
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
*time_of_context_switch = _Thread_Time_of_last_context_switch;
ffc04acc: 81 69 00 20 lwz r11,32(r9)
ffc04ad0: 91 41 00 18 stw r10,24(r1)
ffc04ad4: 91 61 00 1c stw r11,28(r1)
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( is_executing_on_a_core( the_thread, &last ) ) {
Timestamp_Control used;
_TOD_Get_uptime( &uptime );
ffc04ad8: 48 00 5c 5d bl ffc0a734 <_TOD_Get_uptime>
_Timestamp_Subtract( &last, &uptime, &used );
ffc04adc: 38 61 00 18 addi r3,r1,24
ffc04ae0: 38 81 00 38 addi r4,r1,56
ffc04ae4: 38 a1 00 10 addi r5,r1,16
ffc04ae8: 48 00 83 b5 bl ffc0ce9c <_Timespec_Subtract>
_Timestamp_Add_to( &ran, &used );
ffc04aec: 38 61 00 28 addi r3,r1,40
ffc04af0: 38 81 00 10 addi r4,r1,16
ffc04af4: 48 00 82 89 bl ffc0cd7c <_Timespec_Add_to>
ffc04af8: 48 00 00 0c b ffc04b04 <rtems_cpu_usage_report_with_plugin+0x148>
} else {
_TOD_Get_uptime( &uptime );
ffc04afc: 38 61 00 38 addi r3,r1,56
ffc04b00: 48 00 5c 35 bl ffc0a734 <_TOD_Get_uptime>
}
_Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total );
ffc04b04: 38 61 00 20 addi r3,r1,32
ffc04b08: 38 81 00 38 addi r4,r1,56
ffc04b0c: 38 a1 00 30 addi r5,r1,48
ffc04b10: 48 00 83 8d bl ffc0ce9c <_Timespec_Subtract>
_Timestamp_Divide( &ran, &total, &ival, &fval );
ffc04b14: 38 61 00 28 addi r3,r1,40
ffc04b18: 38 81 00 30 addi r4,r1,48
ffc04b1c: 38 a1 00 0c addi r5,r1,12
ffc04b20: 38 c1 00 08 addi r6,r1,8
ffc04b24: 48 00 82 b5 bl ffc0cdd8 <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
ffc04b28: 80 c1 00 2c lwz r6,44(r1)
ffc04b2c: 38 00 03 e8 li r0,1000
ffc04b30: 80 a1 00 28 lwz r5,40(r1)
ffc04b34: 7c c6 03 96 divwu r6,r6,r0
ffc04b38: 80 01 00 58 lwz r0,88(r1)
ffc04b3c: 80 e1 00 0c lwz r7,12(r1)
ffc04b40: 81 01 00 08 lwz r8,8(r1)
ffc04b44: 7c 09 03 a6 mtctr r0
ffc04b48: 7f a3 eb 78 mr r3,r29
ffc04b4c: 7f 64 db 78 mr r4,r27
ffc04b50: 4c c6 31 82 crclr 4*cr1+eq
ffc04b54: 4e 80 04 21 bctrl
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc04b58: 3b de 00 01 addi r30,r30,1
ffc04b5c: a0 1c 00 10 lhz r0,16(r28)
ffc04b60: 7f 9e 00 40 cmplw cr7,r30,r0
ffc04b64: 40 9d fe f4 ble+ cr7,ffc04a58 <rtems_cpu_usage_report_with_plugin+0x9c>
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
ffc04b68: 7f 9f c0 00 cmpw cr7,r31,r24
ffc04b6c: 40 9e fe cc bne+ cr7,ffc04a38 <rtems_cpu_usage_report_with_plugin+0x7c>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
ffc04b70: 80 c1 00 34 lwz r6,52(r1)
ffc04b74: 38 00 03 e8 li r0,1000
ffc04b78: 3c 80 ff c2 lis r4,-62
ffc04b7c: 80 a1 00 30 lwz r5,48(r1)
ffc04b80: 7c c6 03 96 divwu r6,r6,r0
ffc04b84: 80 01 00 58 lwz r0,88(r1)
ffc04b88: 7c 09 03 a6 mtctr r0
ffc04b8c: 7f a3 eb 78 mr r3,r29
ffc04b90: 38 84 e2 88 addi r4,r4,-7544
ffc04b94: 4c c6 31 82 crclr 4*cr1+eq
ffc04b98: 4e 80 04 21 bctrl
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
ffc04b9c: 39 61 00 88 addi r11,r1,136
ffc04ba0: 4b ff c7 7c b ffc0131c <_restgpr_23_x>
ffc0fb2c <rtems_deviceio_errno>:
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
ffc0fb2c: 2c 03 00 00 cmpwi r3,0
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
ffc0fb30: 7c 08 02 a6 mflr r0
ffc0fb34: 7c 2b 0b 78 mr r11,r1
ffc0fb38: 94 21 ff f0 stwu r1,-16(r1)
ffc0fb3c: 90 01 00 14 stw r0,20(r1)
ffc0fb40: 48 00 a7 f5 bl ffc1a334 <_savegpr_31>
if (sc == RTEMS_SUCCESSFUL) {
return 0;
ffc0fb44: 38 00 00 00 li r0,0
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
ffc0fb48: 41 a2 00 2c beq+ ffc0fb74 <rtems_deviceio_errno+0x48>
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
ffc0fb4c: 2b 83 00 1c cmplwi cr7,r3,28
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
ffc0fb50: 3b e0 00 16 li r31,22
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
ffc0fb54: 41 9d 00 14 bgt- cr7,ffc0fb68 <rtems_deviceio_errno+0x3c><== NEVER TAKEN
eno = status_code_to_errno [sc];
ffc0fb58: 3d 20 ff c2 lis r9,-62
ffc0fb5c: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc0fb60: 39 29 c5 cc addi r9,r9,-14900
ffc0fb64: 7f e9 18 2e lwzx r31,r9,r3
}
errno = eno;
ffc0fb68: 48 00 00 35 bl ffc0fb9c <__errno>
return -1;
ffc0fb6c: 38 00 ff ff li r0,-1
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
ffc0fb70: 93 e3 00 00 stw r31,0(r3)
return -1;
}
}
ffc0fb74: 39 61 00 10 addi r11,r1,16
ffc0fb78: 7c 03 03 78 mr r3,r0
ffc0fb7c: 4b ff 09 b8 b ffc00534 <_restgpr_31_x>
ffc045b8 <rtems_error>:
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
...
)
{
ffc045b8: 7c 2b 0b 78 mr r11,r1
ffc045bc: 7c 08 02 a6 mflr r0
ffc045c0: 94 21 ff 88 stwu r1,-120(r1)
ffc045c4: 48 01 5d 71 bl ffc1a334 <_savegpr_31>
ffc045c8: 90 01 00 7c stw r0,124(r1)
ffc045cc: 7c 7f 1b 78 mr r31,r3
ffc045d0: 90 a1 00 18 stw r5,24(r1)
ffc045d4: 90 c1 00 1c stw r6,28(r1)
ffc045d8: 90 e1 00 20 stw r7,32(r1)
ffc045dc: 91 01 00 24 stw r8,36(r1)
ffc045e0: 91 21 00 28 stw r9,40(r1)
ffc045e4: 91 41 00 2c stw r10,44(r1)
ffc045e8: 40 86 00 24 bne- cr1,ffc0460c <rtems_error+0x54> <== ALWAYS TAKEN
ffc045ec: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED
ffc045f0: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc045f4: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc045f8: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc045fc: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc04600: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc04604: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc04608: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
ffc0460c: 38 00 00 02 li r0,2
ffc04610: 98 01 00 08 stb r0,8(r1)
ffc04614: 38 00 00 00 li r0,0
chars_written = rtems_verror(error_flag, printf_format, arglist);
ffc04618: 7f e3 fb 78 mr r3,r31
)
{
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
ffc0461c: 98 01 00 09 stb r0,9(r1)
ffc04620: 38 01 00 80 addi r0,r1,128
chars_written = rtems_verror(error_flag, printf_format, arglist);
ffc04624: 38 a1 00 08 addi r5,r1,8
)
{
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
ffc04628: 90 01 00 0c stw r0,12(r1)
ffc0462c: 38 01 00 10 addi r0,r1,16
ffc04630: 90 01 00 10 stw r0,16(r1)
chars_written = rtems_verror(error_flag, printf_format, arglist);
ffc04634: 4b ff fe 05 bl ffc04438 <rtems_verror>
va_end(arglist);
if (error_flag & RTEMS_ERROR_PANIC) {
ffc04638: 77 e0 20 00 andis. r0,r31,8192
ffc0463c: 41 a2 00 24 beq+ ffc04660 <rtems_error+0xa8>
rtems_error(0, "fatal error, exiting");
ffc04640: 3c 80 ff c2 lis r4,-62
ffc04644: 38 84 bf bf addi r4,r4,-16449
ffc04648: 38 60 00 00 li r3,0
ffc0464c: 4c c6 31 82 crclr 4*cr1+eq
ffc04650: 4b ff ff 69 bl ffc045b8 <rtems_error>
_exit(errno);
ffc04654: 48 00 b5 49 bl ffc0fb9c <__errno>
ffc04658: 80 63 00 00 lwz r3,0(r3)
ffc0465c: 48 00 0c 11 bl ffc0526c <_exit>
}
if (error_flag & RTEMS_ERROR_ABORT) {
ffc04660: 77 e0 10 00 andis. r0,r31,4096
ffc04664: 41 a2 00 1c beq+ ffc04680 <rtems_error+0xc8>
rtems_error(0, "fatal error, aborting");
ffc04668: 3c 80 ff c2 lis r4,-62
ffc0466c: 38 84 bf d4 addi r4,r4,-16428
ffc04670: 38 60 00 00 li r3,0
ffc04674: 4c c6 31 82 crclr 4*cr1+eq
ffc04678: 4b ff ff 41 bl ffc045b8 <rtems_error>
abort();
ffc0467c: 48 00 b5 05 bl ffc0fb80 <abort>
}
return chars_written;
}
ffc04680: 39 61 00 78 addi r11,r1,120
ffc04684: 4b ff be b0 b ffc00534 <_restgpr_31_x>
ffc0d2b8 <rtems_filesystem_get_mount_handler>:
find_arg fa = {
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
ffc0d2b8: 2f 83 00 00 cmpwi cr7,r3,0
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
ffc0d2bc: 94 21 ff e8 stwu r1,-24(r1)
ffc0d2c0: 7c 08 02 a6 mflr r0
find_arg fa = {
ffc0d2c4: 90 61 00 08 stw r3,8(r1)
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
ffc0d2c8: 90 01 00 1c stw r0,28(r1)
find_arg fa = {
ffc0d2cc: 38 00 00 00 li r0,0
ffc0d2d0: 90 01 00 0c stw r0,12(r1)
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
ffc0d2d4: 41 9e 00 14 beq- cr7,ffc0d2e8 <rtems_filesystem_get_mount_handler+0x30><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
ffc0d2d8: 3c 60 ff c1 lis r3,-63
ffc0d2dc: 38 63 d1 64 addi r3,r3,-11932
ffc0d2e0: 38 81 00 08 addi r4,r1,8
ffc0d2e4: 4b ff ff 21 bl ffc0d204 <rtems_filesystem_iterate>
}
return fa.mount_h;
}
ffc0d2e8: 80 01 00 1c lwz r0,28(r1)
ffc0d2ec: 80 61 00 0c lwz r3,12(r1)
ffc0d2f0: 38 21 00 18 addi r1,r1,24
ffc0d2f4: 7c 08 03 a6 mtlr r0
ffc0d2f8: 4e 80 00 20 blr
ffc042b0 <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 )
{
ffc042b0: 94 21 ff c8 stwu r1,-56(r1)
ffc042b4: 7c 08 02 a6 mflr r0
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
ffc042b8: 3c 60 ab cd lis r3,-21555
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
ffc042bc: bf a1 00 2c stmw r29,44(r1)
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
ffc042c0: 3f c0 00 00 lis r30,0
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
ffc042c4: 60 63 00 01 ori r3,r3,1
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
ffc042c8: 81 3e 27 3c lwz r9,10044(r30)
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
ffc042cc: 90 01 00 3c stw r0,60(r1)
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
ffc042d0: 38 00 00 12 li r0,18
ffc042d4: 90 09 00 2c stw r0,44(r9)
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
ffc042d8: 3d 20 00 00 lis r9,0
ffc042dc: 80 09 26 f0 lwz r0,9968(r9)
ffc042e0: 2f 80 00 00 cmpwi cr7,r0,0
ffc042e4: 41 9e 00 34 beq- cr7,ffc04318 <rtems_filesystem_initialize+0x68><== NEVER TAKEN
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
ffc042e8: 3d 20 00 00 lis r9,0
ffc042ec: 81 29 26 f4 lwz r9,9972(r9)
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
ffc042f0: 38 e0 00 00 li r7,0
ffc042f4: 80 69 00 08 lwz r3,8(r9)
ffc042f8: 80 89 00 0c lwz r4,12(r9)
ffc042fc: 80 a9 00 00 lwz r5,0(r9)
ffc04300: 80 c9 00 04 lwz r6,4(r9)
ffc04304: 48 00 0c 35 bl ffc04f38 <mount>
if ( status == -1 )
ffc04308: 2f 83 ff ff cmpwi cr7,r3,-1
ffc0430c: 40 be 00 10 bne+ cr7,ffc0431c <rtems_filesystem_initialize+0x6c><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0002 );
ffc04310: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED
ffc04314: 60 63 00 02 ori r3,r3,2 <== NOT EXECUTED
ffc04318: 48 00 44 cd bl ffc087e4 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_filesystem_link_counts = 0;
ffc0431c: 81 3e 27 3c lwz r9,10044(r30)
ffc04320: 38 00 00 00 li r0,0
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
ffc04324: 3f a0 ff c2 lis r29,-62
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
ffc04328: b0 09 00 30 sth r0,48(r9)
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
ffc0432c: 3b e1 00 08 addi r31,r1,8
ffc04330: 3b bd be 20 addi r29,r29,-16864
ffc04334: 38 a0 00 00 li r5,0
ffc04338: 7f e6 fb 78 mr r6,r31
ffc0433c: 38 e0 00 00 li r7,0
ffc04340: 38 80 00 01 li r4,1
ffc04344: 7f a3 eb 78 mr r3,r29
ffc04348: 48 00 04 61 bl ffc047a8 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
ffc0434c: 81 7e 27 3c lwz r11,10044(r30)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
ffc04350: 38 80 00 01 li r4,1
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
ffc04354: 39 6b 00 18 addi r11,r11,24
ffc04358: 7c bf a4 aa lswi r5,r31,20
ffc0435c: 7c ab a5 aa stswi r5,r11,20
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
ffc04360: 7f a3 eb 78 mr r3,r29
ffc04364: 38 a0 00 00 li r5,0
ffc04368: 7f e6 fb 78 mr r6,r31
ffc0436c: 38 e0 00 00 li r7,0
ffc04370: 48 00 04 39 bl ffc047a8 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
ffc04374: 81 7e 27 3c lwz r11,10044(r30)
*
* 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);
ffc04378: 3c 60 ff c2 lis r3,-62
/* 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;
ffc0437c: 39 6b 00 04 addi r11,r11,4
ffc04380: 7c bf a4 aa lswi r5,r31,20
ffc04384: 7c ab a5 aa stswi r5,r11,20
*
* 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);
ffc04388: 38 63 be 22 addi r3,r3,-16862
ffc0438c: 38 80 01 ff li r4,511
ffc04390: 48 00 09 dd bl ffc04d6c <mkdir>
if ( status != 0 )
ffc04394: 2f 83 00 00 cmpwi cr7,r3,0
ffc04398: 41 be 00 10 beq+ cr7,ffc043a8 <rtems_filesystem_initialize+0xf8><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0003 );
ffc0439c: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED
ffc043a0: 60 63 00 03 ori r3,r3,3 <== NOT EXECUTED
ffc043a4: 4b ff ff 74 b ffc04318 <rtems_filesystem_initialize+0x68><== NOT EXECUTED
* it will be mounted onto is created. Moreover, if it is going to
* use a device, then it is REALLY unfair to attempt this
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
}
ffc043a8: 39 61 00 38 addi r11,r1,56
ffc043ac: 4b ff c1 80 b ffc0052c <_restgpr_29_x>
ffc0d204 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
ffc0d204: 94 21 ff e0 stwu r1,-32(r1)
ffc0d208: 7c 08 02 a6 mflr r0
ffc0d20c: bf 81 00 10 stmw r28,16(r1)
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
ffc0d210: 3f e0 ff c2 lis r31,-62
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
ffc0d214: 7c 9e 23 78 mr r30,r4
ffc0d218: 90 01 00 24 stw r0,36(r1)
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
ffc0d21c: 3b 80 00 00 li r28,0
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
ffc0d220: 3b ff b1 a8 addi r31,r31,-20056
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
ffc0d224: 90 61 00 08 stw r3,8(r1)
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
ffc0d228: 48 00 00 20 b ffc0d248 <rtems_filesystem_iterate+0x44>
stop = (*routine)( table_entry, routine_arg );
ffc0d22c: 80 01 00 08 lwz r0,8(r1)
ffc0d230: 7f e3 fb 78 mr r3,r31
ffc0d234: 7f c4 f3 78 mr r4,r30
ffc0d238: 7c 09 03 a6 mtctr r0
++table_entry;
ffc0d23c: 3b ff 00 08 addi r31,r31,8
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
stop = (*routine)( table_entry, routine_arg );
ffc0d240: 4e 80 04 21 bctrl
ffc0d244: 7c 7c 1b 78 mr r28,r3
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
ffc0d248: 80 1f 00 00 lwz r0,0(r31)
ffc0d24c: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0d250: 2f 00 00 00 cmpwi cr6,r0,0
ffc0d254: 41 9a 00 0c beq- cr6,ffc0d260 <rtems_filesystem_iterate+0x5c>
ffc0d258: 41 9e ff d4 beq+ cr7,ffc0d22c <rtems_filesystem_iterate+0x28>
ffc0d25c: 48 00 00 50 b ffc0d2ac <rtems_filesystem_iterate+0xa8>
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
ffc0d260: 40 9e 00 4c bne- cr7,ffc0d2ac <rtems_filesystem_iterate+0xa8>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0d264: 3f a0 00 00 lis r29,0
rtems_libio_lock();
ffc0d268: 4b ff ff 45 bl ffc0d1ac <rtems_libio_lock>
ffc0d26c: 83 fd 21 b8 lwz r31,8632(r29)
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
ffc0d270: 3b bd 21 b8 addi r29,r29,8632
ffc0d274: 3b bd 00 04 addi r29,r29,4
for (
ffc0d278: 48 00 00 20 b ffc0d298 <rtems_filesystem_iterate+0x94>
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
ffc0d27c: 80 01 00 08 lwz r0,8(r1)
ffc0d280: 38 7f 00 08 addi r3,r31,8
ffc0d284: 7f c4 f3 78 mr r4,r30
ffc0d288: 7c 09 03 a6 mtctr r0
ffc0d28c: 4e 80 04 21 bctrl
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
ffc0d290: 83 ff 00 00 lwz r31,0(r31)
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
ffc0d294: 7c 7c 1b 78 mr r28,r3
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
ffc0d298: 7f 9f e8 00 cmpw cr7,r31,r29
ffc0d29c: 41 9e 00 0c beq- cr7,ffc0d2a8 <rtems_filesystem_iterate+0xa4>
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
ffc0d2a0: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0d2a4: 41 9e ff d8 beq+ cr7,ffc0d27c <rtems_filesystem_iterate+0x78><== ALWAYS TAKEN
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
}
rtems_libio_unlock();
ffc0d2a8: 4b ff ff 35 bl ffc0d1dc <rtems_libio_unlock>
}
return stop;
}
ffc0d2ac: 39 61 00 20 addi r11,r1,32
ffc0d2b0: 7f 83 e3 78 mr r3,r28
ffc0d2b4: 4b ff 32 74 b ffc00528 <_restgpr_28_x>
ffc04ec4 <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
ffc04ec4: 94 21 ff e0 stwu r1,-32(r1)
ffc04ec8: 7c 08 02 a6 mflr r0
ffc04ecc: bf 61 00 0c stmw r27,12(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc04ed0: 3f c0 00 00 lis r30,0
ffc04ed4: 7c 7c 1b 78 mr r28,r3
ffc04ed8: 90 01 00 24 stw r0,36(r1)
ffc04edc: 7c 9d 23 78 mr r29,r4
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
ffc04ee0: 4b ff ff b5 bl ffc04e94 <rtems_libio_lock>
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
rtems_chain_node *node = NULL;
bool stop = false;
ffc04ee4: 3b 60 00 00 li r27,0
ffc04ee8: 83 fe 21 9c lwz r31,8604(r30)
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
ffc04eec: 3b de 21 9c addi r30,r30,8604
ffc04ef0: 3b de 00 04 addi r30,r30,4
rtems_libio_lock();
for (
ffc04ef4: 48 00 00 1c b ffc04f10 <rtems_filesystem_mount_iterate+0x4c>
node = rtems_chain_next( node )
) {
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
ffc04ef8: 7f e3 fb 78 mr r3,r31
ffc04efc: 7f 89 03 a6 mtctr r28
ffc04f00: 7f a4 eb 78 mr r4,r29
ffc04f04: 4e 80 04 21 bctrl
}
rtems_libio_unlock();
return stop;
}
ffc04f08: 83 ff 00 00 lwz r31,0(r31)
node = rtems_chain_next( node )
) {
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
ffc04f0c: 7c 7b 1b 78 mr r27,r3
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
ffc04f10: 7f 9f f0 00 cmpw cr7,r31,r30
ffc04f14: 41 9e 00 0c beq- cr7,ffc04f20 <rtems_filesystem_mount_iterate+0x5c>
node = rtems_chain_first( &mount_chain );
!rtems_chain_is_tail( &mount_chain, node ) && !stop;
ffc04f18: 2f 9b 00 00 cmpwi cr7,r27,0
ffc04f1c: 41 9e ff dc beq+ cr7,ffc04ef8 <rtems_filesystem_mount_iterate+0x34><== ALWAYS TAKEN
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
ffc04f20: 3d 20 00 00 lis r9,0
ffc04f24: 80 69 27 b4 lwz r3,10164(r9)
ffc04f28: 48 00 32 15 bl ffc0813c <rtems_semaphore_release>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
ffc04f2c: 39 61 00 20 addi r11,r1,32
ffc04f30: 7f 63 db 78 mr r3,r27
ffc04f34: 4b ff b5 f0 b ffc00524 <_restgpr_27_x>
ffc0484c <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
ffc0484c: 94 21 ff e8 stwu r1,-24(r1)
ffc04850: 7c 08 02 a6 mflr r0
ffc04854: bf a1 00 0c stmw r29,12(r1)
ffc04858: 7c 7f 1b 78 mr r31,r3
ffc0485c: 7c 9d 23 78 mr r29,r4
ffc04860: 90 01 00 1c stw r0,28(r1)
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
ffc04864: 3b c0 00 00 li r30,0
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
ffc04868: 48 00 00 08 b ffc04870 <rtems_filesystem_prefix_separators+0x24>
{
pathname++;
pathnamelen--;
stripped++;
ffc0486c: 3b de 00 01 addi r30,r30,1
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
ffc04870: 7c 7f f0 ae lbzx r3,r31,r30
ffc04874: 2f 83 00 00 cmpwi cr7,r3,0
ffc04878: 41 9e 00 18 beq- cr7,ffc04890 <rtems_filesystem_prefix_separators+0x44><== NEVER TAKEN
ffc0487c: 7f 9e e8 00 cmpw cr7,r30,r29
ffc04880: 41 9e 00 10 beq- cr7,ffc04890 <rtems_filesystem_prefix_separators+0x44><== NEVER TAKEN
ffc04884: 48 00 10 5d bl ffc058e0 <rtems_filesystem_is_separator>
ffc04888: 2f 83 00 00 cmpwi cr7,r3,0
ffc0488c: 40 9e ff e0 bne+ cr7,ffc0486c <rtems_filesystem_prefix_separators+0x20>
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
ffc04890: 39 61 00 18 addi r11,r1,24
ffc04894: 7f c3 f3 78 mr r3,r30
ffc04898: 4b ff bc 94 b ffc0052c <_restgpr_29_x>
ffc04e80 <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
ffc04e80: 94 21 ff e8 stwu r1,-24(r1)
ffc04e84: 7c 08 02 a6 mflr r0
ffc04e88: bf a1 00 0c stmw r29,12(r1)
ffc04e8c: 7c 7d 1b 78 mr r29,r3
* pointer to the buffer that will hold the value of the key itself.
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
ffc04e90: 38 60 00 08 li r3,8
}
return 0;
}
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
ffc04e94: 7c 9e 23 78 mr r30,r4
ffc04e98: 90 01 00 1c stw r0,28(r1)
* pointer to the buffer that will hold the value of the key itself.
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
ffc04e9c: 48 00 05 31 bl ffc053cc <malloc>
*key = new_key;
new_key->val = NULL;
ffc04ea0: 38 00 00 00 li r0,0
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
*key = new_key;
ffc04ea4: 90 7d 00 00 stw r3,0(r29)
* pointer to the buffer that will hold the value of the key itself.
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
ffc04ea8: 7c 7f 1b 78 mr r31,r3
"gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
ffc04eac: 7f e4 fb 78 mr r4,r31
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
*key = new_key;
new_key->val = NULL;
ffc04eb0: 90 03 00 00 stw r0,0(r3)
"gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
ffc04eb4: 7f c5 f3 78 mr r5,r30
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
*key = new_key;
new_key->val = NULL;
new_key->dtor = dtor;
ffc04eb8: 93 c3 00 04 stw r30,4(r3)
"gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
ffc04ebc: 38 60 00 00 li r3,0
ffc04ec0: 48 00 3f 51 bl ffc08e10 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL )
return 0;
ffc04ec4: 38 00 00 00 li r0,0
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
if ( status == RTEMS_SUCCESSFUL )
ffc04ec8: 2f 83 00 00 cmpwi cr7,r3,0
ffc04ecc: 41 be 00 10 beq+ cr7,ffc04edc <rtems_gxx_key_create+0x5c><== ALWAYS TAKEN
return 0;
free( new_key );
ffc04ed0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc04ed4: 4b ff fe 09 bl ffc04cdc <free> <== NOT EXECUTED
return -1;
ffc04ed8: 38 00 ff ff li r0,-1 <== NOT EXECUTED
}
ffc04edc: 39 61 00 18 addi r11,r1,24
ffc04ee0: 7c 03 03 78 mr r3,r0
ffc04ee4: 4b ff bd 74 b ffc00c58 <_restgpr_29_x>
ffc04ef8 <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
ffc04ef8: 7c 2b 0b 78 mr r11,r1
ffc04efc: 94 21 ff f0 stwu r1,-16(r1)
ffc04f00: 7c 08 02 a6 mflr r0
ffc04f04: 48 01 02 b5 bl ffc151b8 <_savegpr_31>
ffc04f08: 7c 7f 1b 78 mr r31,r3
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: delete key=%x\n", key );
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_delete( RTEMS_SELF, (void **)key );
ffc04f0c: 7f e4 fb 78 mr r4,r31
key->val = 0;
return 0;
}
int rtems_gxx_key_delete (__gthread_key_t key)
{
ffc04f10: 90 01 00 14 stw r0,20(r1)
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: delete key=%x\n", key );
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_delete( RTEMS_SELF, (void **)key );
ffc04f14: 38 60 00 00 li r3,0
ffc04f18: 48 00 3f ad bl ffc08ec4 <rtems_task_variable_delete>
if ( status == RTEMS_SUCCESSFUL ) {
ffc04f1c: 2f 83 00 00 cmpwi cr7,r3,0
ffc04f20: 40 9e 00 14 bne- cr7,ffc04f34 <rtems_gxx_key_delete+0x3c><== NEVER TAKEN
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( *(void **)key );
ffc04f24: 2f 9f 00 00 cmpwi cr7,r31,0
ffc04f28: 41 9e 00 0c beq- cr7,ffc04f34 <rtems_gxx_key_delete+0x3c><== NEVER TAKEN
ffc04f2c: 80 7f 00 00 lwz r3,0(r31)
ffc04f30: 4b ff fd ad bl ffc04cdc <free>
return 0;
}
key = NULL;
return 0;
}
ffc04f34: 39 61 00 10 addi r11,r1,16
ffc04f38: 38 60 00 00 li r3,0
ffc04f3c: 4b ff bd 24 b ffc00c60 <_restgpr_31_x>
ffc05054 <rtems_gxx_mutex_lock>:
int rtems_gxx_mutex_lock (__gthread_mutex_t *mutex)
{
ffc05054: 7c 08 02 a6 mflr r0
ffc05058: 94 21 ff f8 stwu r1,-8(r1)
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: lock mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_obtain(
ffc0505c: 38 80 00 00 li r4,0
printk( "gxx_wrappers: mutex init complete =%X\n", *mutex );
#endif
}
int rtems_gxx_mutex_lock (__gthread_mutex_t *mutex)
{
ffc05060: 90 01 00 0c stw r0,12(r1)
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: lock mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_obtain(
ffc05064: 38 a0 00 00 li r5,0
ffc05068: 80 63 00 00 lwz r3,0(r3)
ffc0506c: 48 00 36 71 bl ffc086dc <rtems_semaphore_obtain>
RTEMS_WAIT,
RTEMS_NO_TIMEOUT
);
if ( status == RTEMS_SUCCESSFUL )
return 0;
return -1;
ffc05070: 38 00 ff ff li r0,-1
status = rtems_semaphore_obtain(
*(rtems_id *)mutex,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT
);
if ( status == RTEMS_SUCCESSFUL )
ffc05074: 2f 83 00 00 cmpwi cr7,r3,0
ffc05078: 40 9e 00 08 bne- cr7,ffc05080 <rtems_gxx_mutex_lock+0x2c><== NEVER TAKEN
return 0;
ffc0507c: 38 00 00 00 li r0,0
return -1;
}
ffc05080: 7c 03 03 78 mr r3,r0
ffc05084: 80 01 00 0c lwz r0,12(r1)
ffc05088: 38 21 00 08 addi r1,r1,8
ffc0508c: 7c 08 03 a6 mtlr r0
ffc05090: 4e 80 00 20 blr
ffc050cc <rtems_gxx_mutex_trylock>:
int rtems_gxx_mutex_trylock (__gthread_mutex_t *mutex)
{
ffc050cc: 7c 08 02 a6 mflr r0
ffc050d0: 94 21 ff f8 stwu r1,-8(r1)
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: trylock mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_obtain (*(rtems_id *)mutex, RTEMS_NO_WAIT, 0);
ffc050d4: 38 80 00 01 li r4,1
return 0;
return -1;
}
int rtems_gxx_mutex_trylock (__gthread_mutex_t *mutex)
{
ffc050d8: 90 01 00 0c stw r0,12(r1)
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: trylock mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_obtain (*(rtems_id *)mutex, RTEMS_NO_WAIT, 0);
ffc050dc: 38 a0 00 00 li r5,0
ffc050e0: 80 63 00 00 lwz r3,0(r3)
ffc050e4: 48 00 35 f9 bl ffc086dc <rtems_semaphore_obtain>
if ( status == RTEMS_SUCCESSFUL )
return 0;
return -1;
ffc050e8: 38 00 ff ff li r0,-1
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: trylock mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_obtain (*(rtems_id *)mutex, RTEMS_NO_WAIT, 0);
if ( status == RTEMS_SUCCESSFUL )
ffc050ec: 2f 83 00 00 cmpwi cr7,r3,0
ffc050f0: 40 9e 00 08 bne- cr7,ffc050f8 <rtems_gxx_mutex_trylock+0x2c><== NEVER TAKEN
return 0;
ffc050f4: 38 00 00 00 li r0,0
return -1;
}
ffc050f8: 7c 03 03 78 mr r3,r0
ffc050fc: 80 01 00 0c lwz r0,12(r1)
ffc05100: 38 21 00 08 addi r1,r1,8
ffc05104: 7c 08 03 a6 mtlr r0
ffc05108: 4e 80 00 20 blr
ffc0510c <rtems_gxx_mutex_unlock>:
int rtems_gxx_mutex_unlock (__gthread_mutex_t *mutex)
{
ffc0510c: 7c 08 02 a6 mflr r0
ffc05110: 94 21 ff f8 stwu r1,-8(r1)
ffc05114: 90 01 00 0c stw r0,12(r1)
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: unlock mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_release( *(rtems_id *)mutex );
ffc05118: 80 63 00 00 lwz r3,0(r3)
ffc0511c: 48 00 36 ed bl ffc08808 <rtems_semaphore_release>
if ( status == RTEMS_SUCCESSFUL )
return 0;
return -1;
ffc05120: 38 00 ff ff li r0,-1
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: unlock mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_release( *(rtems_id *)mutex );
if ( status == RTEMS_SUCCESSFUL )
ffc05124: 2f 83 00 00 cmpwi cr7,r3,0
ffc05128: 40 9e 00 08 bne- cr7,ffc05130 <rtems_gxx_mutex_unlock+0x24><== NEVER TAKEN
return 0;
ffc0512c: 38 00 00 00 li r0,0
return -1;
}
ffc05130: 7c 03 03 78 mr r3,r0
ffc05134: 80 01 00 0c lwz r0,12(r1)
ffc05138: 38 21 00 08 addi r1,r1,8
ffc0513c: 7c 08 03 a6 mtlr r0
ffc05140: 4e 80 00 20 blr
ffc04e0c <rtems_gxx_once>:
/* uncomment this if you need to debug this interface */
/*#define DEBUG_GXX_WRAPPERS 1*/
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
ffc04e0c: 94 21 ff d8 stwu r1,-40(r1)
ffc04e10: 7c 08 02 a6 mflr r0
ffc04e14: 90 01 00 2c stw r0,44(r1)
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
ffc04e18: 80 03 00 00 lwz r0,0(r3)
/* uncomment this if you need to debug this interface */
/*#define DEBUG_GXX_WRAPPERS 1*/
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
ffc04e1c: bf a1 00 1c stmw r29,28(r1)
ffc04e20: 7c 7f 1b 78 mr r31,r3
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
ffc04e24: 2f 80 00 00 cmpwi cr7,r0,0
/* uncomment this if you need to debug this interface */
/*#define DEBUG_GXX_WRAPPERS 1*/
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
ffc04e28: 7c 9d 23 78 mr r29,r4
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
ffc04e2c: 40 be 00 48 bne+ cr7,ffc04e74 <rtems_gxx_once+0x68>
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
ffc04e30: 38 60 01 00 li r3,256
ffc04e34: 38 80 01 00 li r4,256
ffc04e38: 38 a1 00 08 addi r5,r1,8
ffc04e3c: 48 00 3d 4d bl ffc08b88 <rtems_task_mode>
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
ffc04e40: 83 df 00 00 lwz r30,0(r31)
ffc04e44: 2f 9e 00 00 cmpwi cr7,r30,0
ffc04e48: 40 9e 00 0c bne- cr7,ffc04e54 <rtems_gxx_once+0x48> <== NEVER TAKEN
*(volatile __gthread_once_t *)once = 1;
ffc04e4c: 38 00 00 01 li r0,1
ffc04e50: 90 1f 00 00 stw r0,0(r31)
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
ffc04e54: 7c 25 0b 78 mr r5,r1
ffc04e58: 84 65 00 08 lwzu r3,8(r5)
ffc04e5c: 38 80 01 00 li r4,256
ffc04e60: 48 00 3d 29 bl ffc08b88 <rtems_task_mode>
if ( o == 0 )
ffc04e64: 2f 9e 00 00 cmpwi cr7,r30,0
ffc04e68: 40 be 00 0c bne+ cr7,ffc04e74 <rtems_gxx_once+0x68> <== NEVER TAKEN
(*func)();
ffc04e6c: 7f a9 03 a6 mtctr r29
ffc04e70: 4e 80 04 21 bctrl
}
return 0;
}
ffc04e74: 39 61 00 28 addi r11,r1,40
ffc04e78: 38 60 00 00 li r3,0
ffc04e7c: 4b ff bd dc b ffc00c58 <_restgpr_29_x>
ffc04fbc <rtems_gxx_setspecific>:
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
ffc04fbc: 94 21 ff f0 stwu r1,-16(r1)
ffc04fc0: 7c 08 02 a6 mflr r0
ffc04fc4: 90 01 00 14 stw r0,20(r1)
ffc04fc8: bf c1 00 08 stmw r30,8(r1)
ffc04fcc: 7c 7f 1b 78 mr r31,r3
ffc04fd0: 7c 9e 23 78 mr r30,r4
rtems_task_self()
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
ffc04fd4: 80 bf 00 04 lwz r5,4(r31)
ffc04fd8: 38 60 00 00 li r3,0
ffc04fdc: 7f e4 fb 78 mr r4,r31
ffc04fe0: 48 00 3e 31 bl ffc08e10 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL ) {
/* now let's set the proper value */
key->val = (void *)ptr;
return 0;
}
return -1;
ffc04fe4: 38 00 ff ff li r0,-1
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
if ( status == RTEMS_SUCCESSFUL ) {
ffc04fe8: 2f 83 00 00 cmpwi cr7,r3,0
ffc04fec: 40 9e 00 0c bne- cr7,ffc04ff8 <rtems_gxx_setspecific+0x3c><== NEVER TAKEN
/* now let's set the proper value */
key->val = (void *)ptr;
ffc04ff0: 93 df 00 00 stw r30,0(r31)
return 0;
ffc04ff4: 38 00 00 00 li r0,0
}
return -1;
}
ffc04ff8: 39 61 00 10 addi r11,r1,16
ffc04ffc: 7c 03 03 78 mr r3,r0
ffc05000: 4b ff bc 5c b ffc00c5c <_restgpr_30_x>
ffc08bd4 <rtems_heap_allocate_aligned_with_boundary>:
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc08bd4: 94 21 ff e8 stwu r1,-24(r1)
ffc08bd8: 7c 08 02 a6 mflr r0
if (
ffc08bdc: 3d 20 00 00 lis r9,0
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc08be0: 90 01 00 1c stw r0,28(r1)
if (
ffc08be4: 80 09 28 60 lwz r0,10336(r9)
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc08be8: bf a1 00 0c stmw r29,12(r1)
ffc08bec: 7c 7d 1b 78 mr r29,r3
if (
ffc08bf0: 2f 80 00 03 cmpwi cr7,r0,3
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc08bf4: 7c 9e 23 78 mr r30,r4
ffc08bf8: 7c bf 2b 78 mr r31,r5
if (
ffc08bfc: 40 be 00 14 bne+ cr7,ffc08c10 <rtems_heap_allocate_aligned_with_boundary+0x3c><== NEVER TAKEN
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
ffc08c00: 4b ff ed 31 bl ffc07930 <malloc_is_system_state_OK>
) {
return NULL;
ffc08c04: 38 00 00 00 li r0,0
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
ffc08c08: 2f 83 00 00 cmpwi cr7,r3,0
ffc08c0c: 41 9e 00 24 beq- cr7,ffc08c30 <rtems_heap_allocate_aligned_with_boundary+0x5c>
) {
return NULL;
}
malloc_deferred_frees_process();
ffc08c10: 4b ff ed 69 bl ffc07978 <malloc_deferred_frees_process>
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
ffc08c14: 3d 20 00 00 lis r9,0
ffc08c18: 80 69 27 30 lwz r3,10032(r9)
ffc08c1c: 7f a4 eb 78 mr r4,r29
ffc08c20: 7f c5 f3 78 mr r5,r30
ffc08c24: 7f e6 fb 78 mr r6,r31
ffc08c28: 48 00 53 bd bl ffc0dfe4 <_Protected_heap_Allocate_aligned_with_boundary>
ffc08c2c: 7c 60 1b 78 mr r0,r3
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
ffc08c30: 39 61 00 18 addi r11,r1,24
ffc08c34: 7c 03 03 78 mr r3,r0
ffc08c38: 4b ff a7 5c b ffc03394 <_restgpr_29_x>
ffc041b4 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
ffc041b4: 94 21 ff c8 stwu r1,-56(r1)
ffc041b8: 7c 08 02 a6 mflr r0
ffc041bc: bf 81 00 28 stmw r28,40(r1)
ffc041c0: 7c 7e 1b 78 mr r30,r3
ffc041c4: 7c 9f 23 78 mr r31,r4
ffc041c8: 90 01 00 3c stw r0,60(r1)
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(
ffc041cc: 48 00 d2 fd bl ffc114c8 <strlen>
ffc041d0: 7c 64 1b 78 mr r4,r3
ffc041d4: 38 a0 00 00 li r5,0
ffc041d8: 38 c1 00 08 addi r6,r1,8
ffc041dc: 38 e0 00 01 li r7,1
ffc041e0: 7f c3 f3 78 mr r3,r30
ffc041e4: 48 00 05 c5 bl ffc047a8 <rtems_filesystem_evaluate_path>
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
node_type = (*loc.ops->node_type_h)( &loc );
ffc041e8: 81 21 00 14 lwz r9,20(r1)
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(
ffc041ec: 7c 7c 1b 78 mr r28,r3
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
ffc041f0: 83 a1 00 08 lwz r29,8(r1)
node_type = (*loc.ops->node_type_h)( &loc );
ffc041f4: 80 09 00 10 lwz r0,16(r9)
ffc041f8: 38 61 00 08 addi r3,r1,8
ffc041fc: 7c 09 03 a6 mtctr r0
ffc04200: 4e 80 04 21 bctrl
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
ffc04204: 2f 9c 00 00 cmpwi cr7,r28,0
ffc04208: 40 9e 00 0c bne- cr7,ffc04214 <rtems_io_lookup_name+0x60><== NEVER TAKEN
ffc0420c: 2f 83 00 02 cmpwi cr7,r3,2
ffc04210: 41 9e 00 14 beq- cr7,ffc04224 <rtems_io_lookup_name+0x70>
rtems_filesystem_freenode( &loc );
ffc04214: 38 61 00 08 addi r3,r1,8
ffc04218: 48 00 06 85 bl ffc0489c <rtems_filesystem_freenode>
return RTEMS_UNSATISFIED;
ffc0421c: 38 60 00 0d li r3,13
ffc04220: 48 00 00 30 b ffc04250 <rtems_io_lookup_name+0x9c>
}
device_info->device_name = (char *) name;
ffc04224: 93 df 00 00 stw r30,0(r31)
device_info->device_name_length = strlen( name );
ffc04228: 7f c3 f3 78 mr r3,r30
ffc0422c: 48 00 d2 9d bl ffc114c8 <strlen>
ffc04230: 90 7f 00 04 stw r3,4(r31)
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
ffc04234: 38 61 00 08 addi r3,r1,8
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
ffc04238: 80 1d 00 50 lwz r0,80(r29)
ffc0423c: 90 1f 00 08 stw r0,8(r31)
device_info->minor = the_jnode->info.device.minor;
ffc04240: 80 1d 00 54 lwz r0,84(r29)
ffc04244: 90 1f 00 0c stw r0,12(r31)
rtems_filesystem_freenode( &loc );
ffc04248: 48 00 06 55 bl ffc0489c <rtems_filesystem_freenode>
return RTEMS_SUCCESSFUL;
ffc0424c: 38 60 00 00 li r3,0
}
ffc04250: 39 61 00 38 addi r11,r1,56
ffc04254: 4b ff c2 d4 b ffc00528 <_restgpr_28_x>
ffc0ad48 <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)
{
ffc0ad48: 94 21 ff e0 stwu r1,-32(r1)
ffc0ad4c: 7c 08 02 a6 mflr r0
ffc0ad50: bf 61 00 0c stmw r27,12(r1)
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
ffc0ad54: 7c 7b 1b 79 mr. r27,r3
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
ffc0ad58: 90 01 00 24 stw r0,36(r1)
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
ffc0ad5c: 41 82 00 64 beq- ffc0adc0 <rtems_iterate_over_all_threads+0x78><== NEVER TAKEN
ffc0ad60: 3f e0 00 00 lis r31,0
ffc0ad64: 3b ff 30 00 addi r31,r31,12288
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
ffc0ad68: 3b 9f 00 0c addi r28,r31,12
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
ffc0ad6c: 85 3f 00 04 lwzu r9,4(r31)
ffc0ad70: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ad74: 41 9e 00 44 beq- cr7,ffc0adb8 <rtems_iterate_over_all_threads+0x70>
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
ffc0ad78: 83 a9 00 04 lwz r29,4(r9)
if ( !information )
ffc0ad7c: 3b c0 00 01 li r30,1
ffc0ad80: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0ad84: 40 be 00 28 bne+ cr7,ffc0adac <rtems_iterate_over_all_threads+0x64>
ffc0ad88: 48 00 00 30 b ffc0adb8 <rtems_iterate_over_all_threads+0x70>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
ffc0ad8c: 81 3d 00 1c lwz r9,28(r29)
ffc0ad90: 57 c0 10 3a rlwinm r0,r30,2,0,29
ffc0ad94: 7c 69 00 2e lwzx r3,r9,r0
if ( !the_thread )
ffc0ad98: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ad9c: 41 9e 00 0c beq- cr7,ffc0ada8 <rtems_iterate_over_all_threads+0x60>
continue;
(*routine)(the_thread);
ffc0ada0: 7f 69 03 a6 mtctr r27
ffc0ada4: 4e 80 04 21 bctrl
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc0ada8: 3b de 00 01 addi r30,r30,1
ffc0adac: a0 1d 00 10 lhz r0,16(r29)
ffc0adb0: 7f 9e 00 40 cmplw cr7,r30,r0
ffc0adb4: 40 9d ff d8 ble+ cr7,ffc0ad8c <rtems_iterate_over_all_threads+0x44>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
ffc0adb8: 7f 9f e0 00 cmpw cr7,r31,r28
ffc0adbc: 40 9e ff b0 bne+ cr7,ffc0ad6c <rtems_iterate_over_all_threads+0x24>
(*routine)(the_thread);
}
}
}
ffc0adc0: 39 61 00 20 addi r11,r1,32
ffc0adc4: 4b ff 65 68 b ffc0132c <_restgpr_27_x>
ffc0d020 <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
ffc0d020: 7c 2b 0b 78 mr r11,r1
ffc0d024: 94 21 ff f0 stwu r1,-16(r1)
ffc0d028: 7c 08 02 a6 mflr r0
ffc0d02c: 48 00 d3 09 bl ffc1a334 <_savegpr_31>
ffc0d030: 7c 7f 1b 78 mr r31,r3
ffc0d034: 90 01 00 14 stw r0,20(r1)
rtems_libio_lock();
ffc0d038: 4b ff fe 69 bl ffc0cea0 <rtems_libio_lock>
if (iop->sem)
ffc0d03c: 80 7f 00 30 lwz r3,48(r31)
ffc0d040: 2f 83 00 00 cmpwi cr7,r3,0
ffc0d044: 41 be 00 08 beq+ cr7,ffc0d04c <rtems_libio_free+0x2c> <== NEVER TAKEN
rtems_semaphore_delete(iop->sem);
ffc0d048: 4b ff af 11 bl ffc07f58 <rtems_semaphore_delete>
iop->flags &= ~LIBIO_FLAGS_OPEN;
ffc0d04c: 80 1f 00 18 lwz r0,24(r31)
iop->data1 = rtems_libio_iop_freelist;
ffc0d050: 3d 20 00 00 lis r9,0
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
ffc0d054: 54 00 06 2c rlwinm r0,r0,0,24,22
ffc0d058: 90 1f 00 18 stw r0,24(r31)
iop->data1 = rtems_libio_iop_freelist;
ffc0d05c: 80 09 27 b0 lwz r0,10160(r9)
rtems_libio_iop_freelist = iop;
ffc0d060: 93 e9 27 b0 stw r31,10160(r9)
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
ffc0d064: 90 1f 00 38 stw r0,56(r31)
rtems_libio_iop_freelist = iop;
rtems_libio_unlock();
}
ffc0d068: 80 01 00 14 lwz r0,20(r1)
ffc0d06c: 83 e1 00 0c lwz r31,12(r1)
ffc0d070: 38 21 00 10 addi r1,r1,16
ffc0d074: 7c 08 03 a6 mtlr r0
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
rtems_libio_unlock();
ffc0d078: 4b ff fe 58 b ffc0ced0 <rtems_libio_unlock>
ffc049f8 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
ffc049f8: 7c 2b 0b 78 mr r11,r1
ffc049fc: 94 21 ff f0 stwu r1,-16(r1)
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
ffc04a00: 3d 20 00 00 lis r9,0
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
ffc04a04: 7c 08 02 a6 mflr r0
ffc04a08: 48 01 59 2d bl ffc1a334 <_savegpr_31>
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
ffc04a0c: 83 e9 26 fc lwz r31,9980(r9)
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
ffc04a10: 90 01 00 14 stw r0,20(r1)
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
ffc04a14: 2f 9f 00 00 cmpwi cr7,r31,0
ffc04a18: 41 9e 00 64 beq- cr7,ffc04a7c <rtems_libio_init+0x84> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
ffc04a1c: 7f e3 fb 78 mr r3,r31
ffc04a20: 38 80 00 40 li r4,64
ffc04a24: 4b ff f9 8d bl ffc043b0 <calloc>
ffc04a28: 3d 20 00 00 lis r9,0
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
ffc04a2c: 2f 83 00 00 cmpwi cr7,r3,0
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
ffc04a30: 90 69 27 ac stw r3,10156(r9)
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
ffc04a34: 40 be 00 0c bne+ cr7,ffc04a40 <rtems_libio_init+0x48>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
ffc04a38: 38 60 00 1a li r3,26
ffc04a3c: 48 00 00 68 b ffc04aa4 <rtems_libio_init+0xac>
iop = rtems_libio_iop_freelist = rtems_libio_iops;
ffc04a40: 3d 20 00 00 lis r9,0
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
ffc04a44: 7f e9 03 a6 mtctr r31
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;
ffc04a48: 90 69 27 b0 stw r3,10160(r9)
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
ffc04a4c: 39 60 00 00 li r11,0
ffc04a50: 7c 69 1b 78 mr r9,r3
ffc04a54: 48 00 00 0c b ffc04a60 <rtems_libio_init+0x68>
iop->data1 = iop + 1;
ffc04a58: 39 29 00 40 addi r9,r9,64
ffc04a5c: 91 29 ff f8 stw r9,-8(r9)
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++)
ffc04a60: 39 6b 00 01 addi r11,r11,1
ffc04a64: 42 00 ff f4 bdnz+ ffc04a58 <rtems_libio_init+0x60>
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
ffc04a68: 55 6b 30 32 rlwinm r11,r11,6,0,25
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++)
iop->data1 = iop + 1;
iop->data1 = NULL;
ffc04a6c: 39 6b ff c0 addi r11,r11,-64
ffc04a70: 7c 63 5a 14 add r3,r3,r11
ffc04a74: 38 00 00 00 li r0,0
ffc04a78: 90 03 00 38 stw r0,56(r3)
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
ffc04a7c: 3c 60 4c 42 lis r3,19522
ffc04a80: 3c e0 00 00 lis r7,0
ffc04a84: 60 63 49 4f ori r3,r3,18767
ffc04a88: 38 80 00 01 li r4,1
ffc04a8c: 38 a0 00 54 li r5,84
ffc04a90: 38 c0 00 00 li r6,0
ffc04a94: 38 e7 27 b4 addi r7,r7,10164
ffc04a98: 48 00 33 05 bl ffc07d9c <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
ffc04a9c: 2f 83 00 00 cmpwi cr7,r3,0
ffc04aa0: 41 be 00 08 beq+ cr7,ffc04aa8 <rtems_libio_init+0xb0> <== ALWAYS TAKEN
rtems_fatal_error_occurred( rc );
ffc04aa4: 48 00 3d 41 bl ffc087e4 <rtems_fatal_error_occurred>
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
ffc04aa8: 3d 20 00 00 lis r9,0
ffc04aac: 80 09 27 00 lwz r0,9984(r9)
ffc04ab0: 2f 80 00 00 cmpwi cr7,r0,0
ffc04ab4: 41 9e 00 0c beq- cr7,ffc04ac0 <rtems_libio_init+0xc8> <== NEVER TAKEN
(* rtems_fs_init_helper)();
ffc04ab8: 7c 09 03 a6 mtctr r0
ffc04abc: 4e 80 04 21 bctrl
}
ffc04ac0: 39 61 00 10 addi r11,r1,16
ffc04ac4: 4b ff ba 70 b ffc00534 <_restgpr_31_x>
ffc057b8 <rtems_libio_set_private_env>:
rtems_status_code rtems_libio_set_private_env(void)
{
ffc057b8: 94 21 ff b8 stwu r1,-72(r1)
ffc057bc: 7c 08 02 a6 mflr r0
ffc057c0: bf a1 00 3c stmw r29,60(r1)
rtems_filesystem_location_info_t root_loc;
rtems_filesystem_location_info_t current_loc;
rtems_user_env_t *new_env = NULL;
int rv = 0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0);
ffc057c4: 3f e0 ff c1 lis r31,-63
ffc057c8: 3b ff 66 04 addi r31,r31,26116
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void)
{
ffc057cc: 90 01 00 4c stw r0,76(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id task_id = rtems_task_self();
ffc057d0: 48 00 2d dd bl ffc085ac <rtems_task_self>
ffc057d4: 7c 7e 1b 78 mr r30,r3
rtems_filesystem_location_info_t root_loc;
rtems_filesystem_location_info_t current_loc;
rtems_user_env_t *new_env = NULL;
int rv = 0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0);
ffc057d8: 38 80 00 01 li r4,1
ffc057dc: 7f e3 fb 78 mr r3,r31
ffc057e0: 38 a0 00 00 li r5,0
ffc057e4: 38 c1 00 1c addi r6,r1,28
ffc057e8: 38 e0 00 00 li r7,0
ffc057ec: 4b ff ec 49 bl ffc04434 <rtems_filesystem_evaluate_path>
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
ffc057f0: 38 00 00 1a li r0,26
rtems_filesystem_location_info_t current_loc;
rtems_user_env_t *new_env = NULL;
int rv = 0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0);
if (rv != 0)
ffc057f4: 2f 83 00 00 cmpwi cr7,r3,0
ffc057f8: 40 be 00 e0 bne+ cr7,ffc058d8 <rtems_libio_set_private_env+0x120><== NEVER TAKEN
goto error_0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, ¤t_loc, 0);
ffc057fc: 7f e3 fb 78 mr r3,r31
ffc05800: 38 80 00 01 li r4,1
ffc05804: 38 a0 00 00 li r5,0
ffc05808: 38 c1 00 08 addi r6,r1,8
ffc0580c: 38 e0 00 00 li r7,0
ffc05810: 4b ff ec 25 bl ffc04434 <rtems_filesystem_evaluate_path>
if (rv != 0)
ffc05814: 2f 83 00 00 cmpwi cr7,r3,0
ffc05818: 40 9e 00 b4 bne- cr7,ffc058cc <rtems_libio_set_private_env+0x114><== NEVER TAKEN
* Bharath: I'm not sure if the check can be reduced to
* if( rtems_current_user_env->task_id != task_id ) {
*/
if (
rtems_current_user_env == &rtems_global_user_env
ffc0581c: 3d 20 00 00 lis r9,0
ffc05820: 81 29 26 f4 lwz r9,9972(r9)
/*
* Bharath: I'm not sure if the check can be reduced to
* if( rtems_current_user_env->task_id != task_id ) {
*/
if (
ffc05824: 3d 60 00 00 lis r11,0
ffc05828: 38 0b 2a d8 addi r0,r11,10968
ffc0582c: 7f 89 00 00 cmpw cr7,r9,r0
ffc05830: 41 9e 00 10 beq- cr7,ffc05840 <rtems_libio_set_private_env+0x88>
rtems_current_user_env == &rtems_global_user_env
|| rtems_current_user_env->task_id != task_id
ffc05834: 80 09 00 00 lwz r0,0(r9)
ffc05838: 7f 80 f0 00 cmpw cr7,r0,r30
ffc0583c: 41 9e 00 38 beq- cr7,ffc05874 <rtems_libio_set_private_env+0xbc>
) {
new_env = malloc(sizeof(rtems_user_env_t));
ffc05840: 38 60 00 48 li r3,72
ffc05844: 4b ff f3 ad bl ffc04bf0 <malloc>
if (new_env == NULL)
ffc05848: 7c 7f 1b 79 mr. r31,r3
ffc0584c: 41 82 00 78 beq- ffc058c4 <rtems_libio_set_private_env+0x10c>
#ifdef HAVE_USERENV_REFCNT
new_env->refcnt = 1;
#endif
sc = rtems_task_variable_add(
ffc05850: 3f a0 00 00 lis r29,0
ffc05854: 3c a0 ff c0 lis r5,-64
ffc05858: 38 60 00 00 li r3,0
ffc0585c: 38 9d 26 f4 addi r4,r29,9972
ffc05860: 38 a5 57 70 addi r5,r5,22384
ffc05864: 48 00 2e 31 bl ffc08694 <rtems_task_variable_add>
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL)
ffc05868: 2f 83 00 00 cmpwi cr7,r3,0
ffc0586c: 40 9e 00 50 bne- cr7,ffc058bc <rtems_libio_set_private_env+0x104>
goto error_3;
rtems_current_user_env = new_env;
ffc05870: 93 fd 26 f4 stw r31,9972(r29)
}
/* Inherit the global values */
*rtems_current_user_env = rtems_global_user_env;
ffc05874: 3d 20 00 00 lis r9,0
ffc05878: 83 e9 26 f4 lwz r31,9972(r9)
ffc0587c: 3c 80 00 00 lis r4,0
ffc05880: 38 a0 00 48 li r5,72
ffc05884: 7f e3 fb 78 mr r3,r31
ffc05888: 38 84 2a d8 addi r4,r4,10968
ffc0588c: 48 00 ad 39 bl ffc105c4 <memcpy>
* Clone the pathlocs. In contrast to most other code we must _not_ free the
* original locs because what we are trying to do here is forking off clones.
* The reason is a pathloc can be allocated by the file system and needs to
* be freed when deleting the environment.
*/
rtems_filesystem_root = root_loc;
ffc05890: 39 7f 00 18 addi r11,r31,24
ffc05894: 38 81 00 1c addi r4,r1,28
}
/* Inherit the global values */
*rtems_current_user_env = rtems_global_user_env;
rtems_current_user_env->task_id = task_id;
ffc05898: 93 df 00 00 stw r30,0(r31)
* original locs because what we are trying to do here is forking off clones.
* The reason is a pathloc can be allocated by the file system and needs to
* be freed when deleting the environment.
*/
rtems_filesystem_root = root_loc;
rtems_filesystem_current = current_loc;
ffc0589c: 3b ff 00 04 addi r31,r31,4
* Clone the pathlocs. In contrast to most other code we must _not_ free the
* original locs because what we are trying to do here is forking off clones.
* The reason is a pathloc can be allocated by the file system and needs to
* be freed when deleting the environment.
*/
rtems_filesystem_root = root_loc;
ffc058a0: 7c a4 a4 aa lswi r5,r4,20
ffc058a4: 7c ab a5 aa stswi r5,r11,20
rtems_filesystem_current = current_loc;
ffc058a8: 39 61 00 08 addi r11,r1,8
return RTEMS_SUCCESSFUL;
ffc058ac: 38 00 00 00 li r0,0
* original locs because what we are trying to do here is forking off clones.
* The reason is a pathloc can be allocated by the file system and needs to
* be freed when deleting the environment.
*/
rtems_filesystem_root = root_loc;
rtems_filesystem_current = current_loc;
ffc058b0: 7c ab a4 aa lswi r5,r11,20
ffc058b4: 7c bf a5 aa stswi r5,r31,20
return RTEMS_SUCCESSFUL;
ffc058b8: 48 00 00 20 b ffc058d8 <rtems_libio_set_private_env+0x120>
error_3:
free(new_env);
ffc058bc: 7f e3 fb 78 mr r3,r31
ffc058c0: 4b ff ec 95 bl ffc04554 <free>
error_2:
rtems_filesystem_freenode(¤t_loc);
ffc058c4: 38 61 00 08 addi r3,r1,8
ffc058c8: 4b ff ec 61 bl ffc04528 <rtems_filesystem_freenode>
error_1:
rtems_filesystem_freenode(&root_loc);
ffc058cc: 38 61 00 1c addi r3,r1,28
ffc058d0: 4b ff ec 59 bl ffc04528 <rtems_filesystem_freenode>
error_0:
return RTEMS_NO_MEMORY;
ffc058d4: 38 00 00 1a li r0,26
}
ffc058d8: 39 61 00 48 addi r11,r1,72
ffc058dc: 7c 03 03 78 mr r3,r0
ffc058e0: 48 00 ef 8c b ffc1486c <_restgpr_29_x>
ffc058e4 <rtems_libio_share_private_env>:
* b) mutex access to rtems_filesystem_current, rtems_filesytem_root
* while changing any of those (chdir(), chroot()).
*/
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
ffc058e4: 94 21 ff d8 stwu r1,-40(r1)
ffc058e8: 7c 08 02 a6 mflr r0
ffc058ec: bf 81 00 18 stmw r28,24(r1)
ffc058f0: 7c 7c 1b 78 mr r28,r3
* If this was an attempt to share the task with self,
* if somebody wanted to do it... Lets tell them, its shared
*/
if( task_id == current_task_id )
return RTEMS_SUCCESSFUL;
ffc058f4: 3b a0 00 00 li r29,0
* b) mutex access to rtems_filesystem_current, rtems_filesytem_root
* while changing any of those (chdir(), chroot()).
*/
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
ffc058f8: 90 01 00 2c stw r0,44(r1)
rtems_id current_task_id;
/*
* get current task id
*/
current_task_id = rtems_task_self();
ffc058fc: 48 00 2c b1 bl ffc085ac <rtems_task_self>
/*
* If this was an attempt to share the task with self,
* if somebody wanted to do it... Lets tell them, its shared
*/
if( task_id == current_task_id )
ffc05900: 7f 9c 18 00 cmpw cr7,r28,r3
rtems_id current_task_id;
/*
* get current task id
*/
current_task_id = rtems_task_self();
ffc05904: 7c 7f 1b 78 mr r31,r3
/*
* If this was an attempt to share the task with self,
* if somebody wanted to do it... Lets tell them, its shared
*/
if( task_id == current_task_id )
ffc05908: 41 9e 00 3c beq- cr7,ffc05944 <rtems_libio_share_private_env+0x60><== NEVER TAKEN
return RTEMS_SUCCESSFUL;
/*
* Try to get the requested user environment
*/
sc = rtems_task_variable_get(
ffc0590c: 3f c0 00 00 lis r30,0
ffc05910: 7f 83 e3 78 mr r3,r28
ffc05914: 38 9e 26 f4 addi r4,r30,9972
ffc05918: 38 a1 00 08 addi r5,r1,8
ffc0591c: 48 00 2e 2d bl ffc08748 <rtems_task_variable_get>
(void*)&shared_user_env );
/*
* If it was not successful, return the error code
*/
if (sc != RTEMS_SUCCESSFUL)
ffc05920: 7c 7d 1b 79 mr. r29,r3
ffc05924: 40 82 00 20 bne- ffc05944 <rtems_libio_share_private_env+0x60>
* If we have a current environment in place, we need to
* free it, since we will be sharing the variable with the
* shared_user_env
*/
if (rtems_current_user_env->task_id==current_task_id) {
ffc05928: 80 7e 26 f4 lwz r3,9972(r30)
ffc0592c: 80 03 00 00 lwz r0,0(r3)
ffc05930: 7f 80 f8 00 cmpw cr7,r0,r31
ffc05934: 40 be 00 08 bne+ cr7,ffc0593c <rtems_libio_share_private_env+0x58>
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
ffc05938: 4b ff fe 39 bl ffc05770 <free_user_env>
}
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
ffc0593c: 80 01 00 08 lwz r0,8(r1)
ffc05940: 90 1e 26 f4 stw r0,9972(r30)
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
}
ffc05944: 39 61 00 28 addi r11,r1,40
ffc05948: 7f a3 eb 78 mr r3,r29
ffc0594c: 48 00 ef 1c b ffc14868 <_restgpr_28_x>
ffc0cf3c <rtems_libio_to_fcntl_flags>:
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
ffc0cf3c: 54 69 07 7c rlwinm r9,r3,0,29,30
ffc0cf40: 2f 89 00 06 cmpwi cr7,r9,6
fcntl_flags |= O_RDWR;
ffc0cf44: 38 00 00 02 li r0,2
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
ffc0cf48: 41 9e 00 14 beq- cr7,ffc0cf5c <rtems_libio_to_fcntl_flags+0x20><== NEVER TAKEN
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
ffc0cf4c: 70 69 00 02 andi. r9,r3,2
fcntl_flags |= O_RDONLY;
ffc0cf50: 38 00 00 00 li r0,0
{
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) {
ffc0cf54: 40 82 00 08 bne- ffc0cf5c <rtems_libio_to_fcntl_flags+0x20><== ALWAYS TAKEN
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
ffc0cf58: 54 60 f7 fe rlwinm r0,r3,30,31,31 <== NOT EXECUTED
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
fcntl_flags |= O_WRONLY;
}
if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
ffc0cf5c: 70 69 00 01 andi. r9,r3,1
ffc0cf60: 41 82 00 08 beq- ffc0cf68 <rtems_libio_to_fcntl_flags+0x2c>
fcntl_flags |= O_NONBLOCK;
ffc0cf64: 60 00 40 00 ori r0,r0,16384
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
ffc0cf68: 70 69 02 00 andi. r9,r3,512
ffc0cf6c: 41 82 00 08 beq- ffc0cf74 <rtems_libio_to_fcntl_flags+0x38>
fcntl_flags |= O_APPEND;
ffc0cf70: 60 00 00 08 ori r0,r0,8
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
ffc0cf74: 70 69 04 00 andi. r9,r3,1024
ffc0cf78: 41 82 00 08 beq- ffc0cf80 <rtems_libio_to_fcntl_flags+0x44>
fcntl_flags |= O_CREAT;
ffc0cf7c: 60 00 02 00 ori r0,r0,512
}
return fcntl_flags;
}
ffc0cf80: 7c 03 03 78 mr r3,r0
ffc0cf84: 4e 80 00 20 blr
ffc07d44 <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
ffc07d44: 94 21 ff e8 stwu r1,-24(r1)
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
ffc07d48: 3d 20 00 00 lis r9,0
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
ffc07d4c: 7c 08 02 a6 mflr r0
ffc07d50: 7c 64 1b 78 mr r4,r3
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
ffc07d54: 80 69 27 30 lwz r3,10032(r9)
ffc07d58: 38 a1 00 08 addi r5,r1,8
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
ffc07d5c: 90 01 00 1c stw r0,28(r1)
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
ffc07d60: 48 00 63 79 bl ffc0e0d8 <_Protected_heap_Get_block_size>
ffc07d64: 2f 83 00 00 cmpwi cr7,r3,0
ffc07d68: 41 9e 00 2c beq- cr7,ffc07d94 <rtems_malloc_statistics_at_free+0x50><== NEVER TAKEN
MSBUMP(lifetime_freed, size);
ffc07d6c: 3c e0 00 00 lis r7,0
ffc07d70: 81 61 00 08 lwz r11,8(r1)
ffc07d74: 38 e7 33 d0 addi r7,r7,13264
ffc07d78: 81 07 00 28 lwz r8,40(r7)
ffc07d7c: 39 40 00 00 li r10,0
ffc07d80: 81 27 00 2c lwz r9,44(r7)
ffc07d84: 7d 6b 48 14 addc r11,r11,r9
ffc07d88: 7d 4a 41 14 adde r10,r10,r8
ffc07d8c: 91 47 00 28 stw r10,40(r7)
ffc07d90: 91 67 00 2c stw r11,44(r7)
}
}
ffc07d94: 80 01 00 1c lwz r0,28(r1)
ffc07d98: 38 21 00 18 addi r1,r1,24
ffc07d9c: 7c 08 03 a6 mtlr r0
ffc07da0: 4e 80 00 20 blr
ffc07da4 <rtems_malloc_statistics_at_malloc>:
{
uintptr_t actual_size = 0;
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
ffc07da4: 7c 64 1b 79 mr. r4,r3
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
ffc07da8: 94 21 ff e8 stwu r1,-24(r1)
ffc07dac: 7c 08 02 a6 mflr r0
ffc07db0: 90 01 00 1c stw r0,28(r1)
uintptr_t actual_size = 0;
ffc07db4: 38 00 00 00 li r0,0
ffc07db8: 90 01 00 08 stw r0,8(r1)
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
ffc07dbc: 41 82 00 54 beq- ffc07e10 <rtems_malloc_statistics_at_malloc+0x6c><== NEVER TAKEN
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
ffc07dc0: 3d 20 00 00 lis r9,0
ffc07dc4: 80 69 27 30 lwz r3,10032(r9)
ffc07dc8: 38 a1 00 08 addi r5,r1,8
ffc07dcc: 48 00 63 0d bl ffc0e0d8 <_Protected_heap_Get_block_size>
MSBUMP(lifetime_allocated, actual_size);
ffc07dd0: 3c e0 00 00 lis r7,0
ffc07dd4: 38 e7 33 d0 addi r7,r7,13264
ffc07dd8: 81 61 00 08 lwz r11,8(r1)
ffc07ddc: 81 27 00 24 lwz r9,36(r7)
ffc07de0: 39 40 00 00 li r10,0
ffc07de4: 81 07 00 20 lwz r8,32(r7)
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
ffc07de8: 80 07 00 2c lwz r0,44(r7)
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
ffc07dec: 7d 6b 48 14 addc r11,r11,r9
ffc07df0: 7d 4a 41 14 adde r10,r10,r8
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
if (current_depth > s->max_depth)
ffc07df4: 81 27 00 18 lwz r9,24(r7)
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
ffc07df8: 91 47 00 20 stw r10,32(r7)
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
ffc07dfc: 7c 00 58 50 subf r0,r0,r11
if (current_depth > s->max_depth)
ffc07e00: 7f 80 48 40 cmplw cr7,r0,r9
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
ffc07e04: 91 67 00 24 stw r11,36(r7)
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
if (current_depth > s->max_depth)
ffc07e08: 40 9d 00 08 ble- cr7,ffc07e10 <rtems_malloc_statistics_at_malloc+0x6c>
s->max_depth = current_depth;
ffc07e0c: 90 07 00 18 stw r0,24(r7)
}
ffc07e10: 80 01 00 1c lwz r0,28(r1)
ffc07e14: 38 21 00 18 addi r1,r1,24
ffc07e18: 7c 08 03 a6 mtlr r0
ffc07e1c: 4e 80 00 20 blr
ffc10bd8 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
ffc10bd8: 94 21 ff e8 stwu r1,-24(r1)
ffc10bdc: 7c 08 02 a6 mflr r0
ffc10be0: bf 81 00 08 stmw r28,8(r1)
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
ffc10be4: 7c 7f 1b 79 mr. r31,r3
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
ffc10be8: 7c 9e 23 78 mr r30,r4
ffc10bec: 90 01 00 1c stw r0,28(r1)
ffc10bf0: 7c bc 2b 78 mr r28,r5
/*
* Parameter error checks
*/
if ( !pointer )
return EINVAL;
ffc10bf4: 3b a0 00 16 li r29,22
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
ffc10bf8: 41 82 00 78 beq- ffc10c70 <rtems_memalign+0x98>
return EINVAL;
*pointer = NULL;
ffc10bfc: 38 00 00 00 li r0,0
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
ffc10c00: 3d 20 00 00 lis r9,0
* Parameter error checks
*/
if ( !pointer )
return EINVAL;
*pointer = NULL;
ffc10c04: 90 1f 00 00 stw r0,0(r31)
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
ffc10c08: 80 09 27 dc lwz r0,10204(r9)
ffc10c0c: 2f 80 00 03 cmpwi cr7,r0,3
ffc10c10: 40 be 00 10 bne+ cr7,ffc10c20 <rtems_memalign+0x48> <== NEVER TAKEN
!malloc_is_system_state_OK() )
ffc10c14: 4b ff 47 c9 bl ffc053dc <malloc_is_system_state_OK>
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
ffc10c18: 2f 83 00 00 cmpwi cr7,r3,0
ffc10c1c: 41 be 00 54 beq+ cr7,ffc10c70 <rtems_memalign+0x98> <== NEVER TAKEN
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
ffc10c20: 4b ff 48 05 bl ffc05424 <malloc_deferred_frees_process>
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
ffc10c24: 3d 20 00 00 lis r9,0
ffc10c28: 80 69 26 cc lwz r3,9932(r9)
ffc10c2c: 7f c5 f3 78 mr r5,r30
ffc10c30: 7f 84 e3 78 mr r4,r28
ffc10c34: 38 c0 00 00 li r6,0
ffc10c38: 4b ff 9d 01 bl ffc0a938 <_Protected_heap_Allocate_aligned_with_boundary>
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
return ENOMEM;
ffc10c3c: 3b a0 00 0c li r29,12
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
ffc10c40: 7c 7e 1b 79 mr. r30,r3
ffc10c44: 41 82 00 2c beq- ffc10c70 <rtems_memalign+0x98>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
ffc10c48: 3d 20 00 00 lis r9,0
ffc10c4c: 81 29 27 48 lwz r9,10056(r9)
ffc10c50: 2f 89 00 00 cmpwi cr7,r9,0
ffc10c54: 41 9e 00 14 beq- cr7,ffc10c68 <rtems_memalign+0x90>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
ffc10c58: 80 09 00 04 lwz r0,4(r9)
ffc10c5c: 7f e3 fb 78 mr r3,r31
ffc10c60: 7c 09 03 a6 mtctr r0
ffc10c64: 4e 80 04 21 bctrl
*pointer = return_this;
ffc10c68: 93 df 00 00 stw r30,0(r31)
return 0;
ffc10c6c: 3b a0 00 00 li r29,0
}
ffc10c70: 39 61 00 18 addi r11,r1,24
ffc10c74: 7f a3 eb 78 mr r3,r29
ffc10c78: 48 00 78 7c b ffc184f4 <_restgpr_28_x>
ffc0f1a8 <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
ffc0f1a8: 94 21 ff 88 stwu r1,-120(r1)
ffc0f1ac: 7c 08 02 a6 mflr r0
ffc0f1b0: bf 01 00 58 stmw r24,88(r1)
ffc0f1b4: 7c 98 23 78 mr r24,r4
ffc0f1b8: 90 01 00 7c stw r0,124(r1)
int success = 0;
char *dup_path = strdup(path);
ffc0f1bc: 48 00 2c ed bl ffc11ea8 <strdup>
if (dup_path != NULL) {
ffc0f1c0: 7c 7c 1b 79 mr. r28,r3
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
ffc0f1c4: 38 00 ff ff li r0,-1
rtems_mkdir(const char *path, mode_t mode)
{
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
ffc0f1c8: 41 82 01 8c beq- ffc0f354 <rtems_mkdir+0x1ac> <== NEVER TAKEN
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
ffc0f1cc: 88 1c 00 00 lbz r0,0(r28)
ffc0f1d0: 3b c0 00 01 li r30,1
ffc0f1d4: 3b 60 00 00 li r27,0
++p;
ffc0f1d8: 68 1d 00 2f xori r29,r0,47
ffc0f1dc: 23 bd 00 00 subfic r29,r29,0
ffc0f1e0: 7f bc 01 94 addze r29,r28
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
ffc0f1e4: 3b 20 00 00 li r25,0
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
ffc0f1e8: 38 00 00 01 li r0,1
retval = 0;
break;
}
}
if (!last)
*p = '/';
ffc0f1ec: 3b 40 00 2f li r26,47
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
ffc0f1f0: 89 7d 00 00 lbz r11,0(r29)
last = 1;
ffc0f1f4: 39 20 00 01 li r9,1
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
ffc0f1f8: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0f1fc: 41 9e 00 10 beq- cr7,ffc0f20c <rtems_mkdir+0x64>
last = 1;
else if (p[0] != '/')
ffc0f200: 2f 8b 00 2f cmpwi cr7,r11,47
ffc0f204: 39 20 00 00 li r9,0
ffc0f208: 40 be 01 08 bne+ cr7,ffc0f310 <rtems_mkdir+0x168>
continue;
*p = '\0';
if (!last && p[1] == '\0')
ffc0f20c: 2f 89 00 00 cmpwi cr7,r9,0
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
ffc0f210: 9b 3d 00 00 stb r25,0(r29)
if (!last && p[1] == '\0')
ffc0f214: 3b e0 00 01 li r31,1
ffc0f218: 40 9e 00 10 bne- cr7,ffc0f228 <rtems_mkdir+0x80>
ffc0f21c: 8b fd 00 01 lbz r31,1(r29)
ffc0f220: 7f ff 00 34 cntlzw r31,r31
ffc0f224: 57 ff d9 7e rlwinm r31,r31,27,5,31
last = 1;
if (first) {
ffc0f228: 2f 80 00 00 cmpwi cr7,r0,0
ffc0f22c: 41 be 00 18 beq+ cr7,ffc0f244 <rtems_mkdir+0x9c>
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
ffc0f230: 38 60 00 00 li r3,0
ffc0f234: 48 00 01 d1 bl ffc0f404 <umask>
ffc0f238: 7c 7b 1b 78 mr r27,r3
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
ffc0f23c: 54 63 06 ae rlwinm r3,r3,0,26,23
ffc0f240: 48 00 01 c5 bl ffc0f404 <umask>
first = 0;
}
if (last)
ffc0f244: 2f 9f 00 00 cmpwi cr7,r31,0
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
ffc0f248: 38 80 01 ff li r4,511
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
ffc0f24c: 41 be 00 10 beq+ cr7,ffc0f25c <rtems_mkdir+0xb4>
(void)umask(oumask);
ffc0f250: 7f 63 db 78 mr r3,r27
ffc0f254: 48 00 01 b1 bl ffc0f404 <umask>
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
ffc0f258: 7f 04 c3 78 mr r4,r24
ffc0f25c: 7f 83 e3 78 mr r3,r28
ffc0f260: 4b ff 6b d5 bl ffc05e34 <mkdir>
ffc0f264: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f268: 40 bc 00 80 bge+ cr7,ffc0f2e8 <rtems_mkdir+0x140>
if (errno == EEXIST || errno == EISDIR) {
ffc0f26c: 48 00 19 d1 bl ffc10c3c <__errno>
ffc0f270: 80 03 00 00 lwz r0,0(r3)
ffc0f274: 2f 80 00 11 cmpwi cr7,r0,17
ffc0f278: 41 9e 00 14 beq- cr7,ffc0f28c <rtems_mkdir+0xe4>
ffc0f27c: 48 00 19 c1 bl ffc10c3c <__errno>
ffc0f280: 80 03 00 00 lwz r0,0(r3)
ffc0f284: 2f 80 00 15 cmpwi cr7,r0,21
ffc0f288: 40 9e 00 9c bne- cr7,ffc0f324 <rtems_mkdir+0x17c> <== ALWAYS TAKEN
if (stat(path, &sb) < 0) {
ffc0f28c: 7f 83 e3 78 mr r3,r28
ffc0f290: 38 81 00 08 addi r4,r1,8
ffc0f294: 48 00 00 cd bl ffc0f360 <stat>
ffc0f298: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f29c: 41 9c 00 88 blt- cr7,ffc0f324 <rtems_mkdir+0x17c> <== NEVER TAKEN
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
ffc0f2a0: 80 01 00 14 lwz r0,20(r1)
ffc0f2a4: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0f2a8: 54 00 04 26 rlwinm r0,r0,0,16,19
ffc0f2ac: 2f 00 40 00 cmpwi cr6,r0,16384
ffc0f2b0: 41 ba 00 30 beq+ cr6,ffc0f2e0 <rtems_mkdir+0x138>
if (last)
ffc0f2b4: 41 9e 00 1c beq- cr7,ffc0f2d0 <rtems_mkdir+0x128>
errno = EEXIST;
ffc0f2b8: 48 00 19 85 bl ffc10c3c <__errno>
ffc0f2bc: 38 00 00 11 li r0,17
ffc0f2c0: 90 03 00 00 stw r0,0(r3)
else
errno = ENOTDIR;
retval = 0;
ffc0f2c4: 3b c0 00 00 li r30,0
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
ffc0f2c8: 3b e0 00 01 li r31,1
ffc0f2cc: 48 00 00 5c b ffc0f328 <rtems_mkdir+0x180>
else
errno = ENOTDIR;
ffc0f2d0: 48 00 19 6d bl ffc10c3c <__errno>
ffc0f2d4: 38 00 00 14 li r0,20
ffc0f2d8: 90 03 00 00 stw r0,0(r3)
ffc0f2dc: 48 00 00 48 b ffc0f324 <rtems_mkdir+0x17c>
retval = 0;
break;
}
if (last)
ffc0f2e0: 40 9e 00 24 bne- cr7,ffc0f304 <rtems_mkdir+0x15c>
ffc0f2e4: 48 00 00 14 b ffc0f2f8 <rtems_mkdir+0x150>
} else {
retval = 0;
break;
}
}
if (!last)
ffc0f2e8: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0f2ec: 39 20 00 01 li r9,1
ffc0f2f0: 38 00 00 00 li r0,0
ffc0f2f4: 40 9e 00 1c bne- cr7,ffc0f310 <rtems_mkdir+0x168>
*p = '/';
ffc0f2f8: 9b 5d 00 00 stb r26,0(r29)
ffc0f2fc: 39 20 00 00 li r9,0
ffc0f300: 48 00 00 0c b ffc0f30c <rtems_mkdir+0x164>
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
retval = 2;
ffc0f304: 3b c0 00 02 li r30,2
else
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
ffc0f308: 39 20 00 01 li r9,1
ffc0f30c: 38 00 00 00 li r0,0
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
ffc0f310: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f314: 3b bd 00 01 addi r29,r29,1
ffc0f318: 41 9e fe d8 beq+ cr7,ffc0f1f0 <rtems_mkdir+0x48>
ffc0f31c: 3b e0 00 01 li r31,1
ffc0f320: 48 00 00 0c b ffc0f32c <rtems_mkdir+0x184>
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
retval = 0;
ffc0f324: 3b c0 00 00 li r30,0
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
ffc0f328: 38 00 00 00 li r0,0
}
}
if (!last)
*p = '/';
}
if (!first && !last)
ffc0f32c: 7f e9 03 79 or. r9,r31,r0
ffc0f330: 40 a2 00 0c bne+ ffc0f33c <rtems_mkdir+0x194>
(void)umask(oumask);
ffc0f334: 7f 63 db 78 mr r3,r27
ffc0f338: 48 00 00 cd bl ffc0f404 <umask>
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
ffc0f33c: 7f 83 e3 78 mr r3,r28
ffc0f340: 4b ff 63 5d bl ffc0569c <free>
}
return success != 0 ? 0 : -1;
ffc0f344: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0f348: 38 00 00 00 li r0,0
ffc0f34c: 40 be 00 08 bne+ cr7,ffc0f354 <rtems_mkdir+0x1ac>
ffc0f350: 38 00 ff ff li r0,-1
}
ffc0f354: 39 61 00 78 addi r11,r1,120
ffc0f358: 7c 03 03 78 mr r3,r0
ffc0f35c: 48 00 d1 0c b ffc1c468 <_restgpr_24_x>
ffc04688 <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
ffc04688: 94 21 ff 88 stwu r1,-120(r1)
ffc0468c: 7c 08 02 a6 mflr r0
ffc04690: 90 81 00 1c stw r4,28(r1)
ffc04694: 90 01 00 7c stw r0,124(r1)
ffc04698: 90 a1 00 20 stw r5,32(r1)
ffc0469c: 90 c1 00 24 stw r6,36(r1)
ffc046a0: 90 e1 00 28 stw r7,40(r1)
ffc046a4: 91 01 00 2c stw r8,44(r1)
ffc046a8: 91 21 00 30 stw r9,48(r1)
ffc046ac: 91 41 00 34 stw r10,52(r1)
ffc046b0: 40 86 00 24 bne- cr1,ffc046d4 <rtems_panic+0x4c> <== ALWAYS TAKEN
ffc046b4: d8 21 00 38 stfd f1,56(r1) <== NOT EXECUTED
ffc046b8: d8 41 00 40 stfd f2,64(r1) <== NOT EXECUTED
ffc046bc: d8 61 00 48 stfd f3,72(r1) <== NOT EXECUTED
ffc046c0: d8 81 00 50 stfd f4,80(r1) <== NOT EXECUTED
ffc046c4: d8 a1 00 58 stfd f5,88(r1) <== NOT EXECUTED
ffc046c8: d8 c1 00 60 stfd f6,96(r1) <== NOT EXECUTED
ffc046cc: d8 e1 00 68 stfd f7,104(r1) <== NOT EXECUTED
ffc046d0: d9 01 00 70 stfd f8,112(r1) <== NOT EXECUTED
va_list arglist;
va_start(arglist, printf_format);
ffc046d4: 38 00 00 01 li r0,1
ffc046d8: 98 01 00 08 stb r0,8(r1)
ffc046dc: 38 00 00 00 li r0,0
void rtems_panic(
const char *printf_format,
...
)
{
ffc046e0: 7c 64 1b 78 mr r4,r3
va_list arglist;
va_start(arglist, printf_format);
ffc046e4: 98 01 00 09 stb r0,9(r1)
ffc046e8: 38 01 00 80 addi r0,r1,128
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
ffc046ec: 38 a1 00 08 addi r5,r1,8
...
)
{
va_list arglist;
va_start(arglist, printf_format);
ffc046f0: 90 01 00 0c stw r0,12(r1)
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
ffc046f4: 3c 60 20 00 lis r3,8192
...
)
{
va_list arglist;
va_start(arglist, printf_format);
ffc046f8: 38 01 00 18 addi r0,r1,24
ffc046fc: 90 01 00 10 stw r0,16(r1)
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
ffc04700: 4b ff fd 39 bl ffc04438 <rtems_verror>
va_end(arglist);
rtems_error(0, "fatal error, exiting");
ffc04704: 3c 80 ff c2 lis r4,-62
ffc04708: 38 84 bf bf addi r4,r4,-16449
ffc0470c: 38 60 00 00 li r3,0
ffc04710: 4c c6 31 82 crclr 4*cr1+eq
ffc04714: 4b ff fe a5 bl ffc045b8 <rtems_error>
_exit(errno);
ffc04718: 48 00 b4 85 bl ffc0fb9c <__errno>
ffc0471c: 80 63 00 00 lwz r3,0(r3)
ffc04720: 48 00 0b 4d bl ffc0526c <_exit>
ffc16494 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
ffc16494: 94 21 ff d0 stwu r1,-48(r1)
ffc16498: 7c 08 02 a6 mflr r0
ffc1649c: bf 21 00 14 stmw r25,20(r1)
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
ffc164a0: 7c 7b 1b 79 mr. r27,r3
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
ffc164a4: 7c bf 2b 78 mr r31,r5
ffc164a8: 90 01 00 34 stw r0,52(r1)
ffc164ac: 7c fa 3b 78 mr r26,r7
ffc164b0: 7d 1d 43 78 mr r29,r8
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
ffc164b4: 38 00 00 03 li r0,3
rtems_id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
ffc164b8: 41 a2 00 d0 beq+ ffc16588 <rtems_partition_create+0xf4>
return RTEMS_INVALID_NAME;
if ( !starting_address )
ffc164bc: 2f 84 00 00 cmpwi cr7,r4,0
return RTEMS_INVALID_ADDRESS;
ffc164c0: 38 00 00 09 li r0,9
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
ffc164c4: 41 9e 00 c4 beq- cr7,ffc16588 <rtems_partition_create+0xf4>
return RTEMS_INVALID_ADDRESS;
if ( !id )
ffc164c8: 2f 88 00 00 cmpwi cr7,r8,0
ffc164cc: 41 9e 00 bc beq- cr7,ffc16588 <rtems_partition_create+0xf4><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
ffc164d0: 2f 85 00 00 cmpwi cr7,r5,0
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
ffc164d4: 38 00 00 08 li r0,8
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
ffc164d8: 41 be 00 b0 beq+ cr7,ffc16588 <rtems_partition_create+0xf4>
ffc164dc: 2f 86 00 00 cmpwi cr7,r6,0
ffc164e0: 41 be 00 a8 beq+ cr7,ffc16588 <rtems_partition_create+0xf4>
ffc164e4: 7f 85 30 40 cmplw cr7,r5,r6
ffc164e8: 41 bc 00 a0 blt+ cr7,ffc16588 <rtems_partition_create+0xf4>
ffc164ec: 70 c9 00 07 andi. r9,r6,7
ffc164f0: 40 a2 00 98 bne+ ffc16588 <rtems_partition_create+0xf4>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
ffc164f4: 70 99 00 07 andi. r25,r4,7
return RTEMS_INVALID_ADDRESS;
ffc164f8: 38 00 00 09 li r0,9
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
ffc164fc: 40 a2 00 8c bne+ ffc16588 <rtems_partition_create+0xf4>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc16500: 3d 20 00 00 lis r9,0
ffc16504: 81 69 28 9c lwz r11,10396(r9)
ffc16508: 38 0b 00 01 addi r0,r11,1
ffc1650c: 90 09 28 9c stw r0,10396(r9)
return _Thread_Dispatch_disable_level;
ffc16510: 80 09 28 9c lwz r0,10396(r9)
* 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 );
ffc16514: 3f 80 00 00 lis r28,0
ffc16518: 90 81 00 08 stw r4,8(r1)
ffc1651c: 3b 9c 6e c0 addi r28,r28,28352
ffc16520: 7f 83 e3 78 mr r3,r28
ffc16524: 90 c1 00 0c stw r6,12(r1)
ffc16528: 48 00 4d 99 bl ffc1b2c0 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
ffc1652c: 7c 7e 1b 79 mr. r30,r3
ffc16530: 80 81 00 08 lwz r4,8(r1)
ffc16534: 80 c1 00 0c lwz r6,12(r1)
ffc16538: 40 a2 00 10 bne+ ffc16548 <rtems_partition_create+0xb4>
_Thread_Enable_dispatch();
ffc1653c: 48 00 61 1d bl ffc1c658 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
ffc16540: 38 00 00 05 li r0,5
ffc16544: 48 00 00 44 b ffc16588 <rtems_partition_create+0xf4>
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
ffc16548: 7c bf 33 96 divwu r5,r31,r6
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
ffc1654c: 90 9e 00 10 stw r4,16(r30)
the_partition->length = length;
the_partition->buffer_size = buffer_size;
ffc16550: 90 de 00 18 stw r6,24(r30)
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
ffc16554: 93 fe 00 14 stw r31,20(r30)
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
ffc16558: 93 5e 00 1c stw r26,28(r30)
the_partition->number_of_used_blocks = 0;
ffc1655c: 93 3e 00 20 stw r25,32(r30)
_Chain_Initialize( &the_partition->Memory, starting_address,
ffc16560: 38 7e 00 24 addi r3,r30,36
ffc16564: 48 00 35 05 bl ffc19a68 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
ffc16568: 80 1e 00 08 lwz r0,8(r30)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc1656c: 81 7c 00 1c lwz r11,28(r28)
ffc16570: 54 09 13 ba rlwinm r9,r0,2,14,29
ffc16574: 7f cb 49 2e stwx r30,r11,r9
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc16578: 93 7e 00 0c stw r27,12(r30)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
ffc1657c: 90 1d 00 00 stw r0,0(r29)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
ffc16580: 48 00 60 d9 bl ffc1c658 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc16584: 38 00 00 00 li r0,0
}
ffc16588: 39 61 00 30 addi r11,r1,48
ffc1658c: 7c 03 03 78 mr r3,r0
ffc16590: 4b ff 7b e8 b ffc0e178 <_restgpr_25_x>
ffc166e0 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
ffc166e0: 94 21 ff e0 stwu r1,-32(r1)
ffc166e4: 7c 08 02 a6 mflr r0
ffc166e8: 90 01 00 24 stw r0,36(r1)
ffc166ec: 7c 60 1b 78 mr r0,r3
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
ffc166f0: 3c 60 00 00 lis r3,0
ffc166f4: bf c1 00 18 stmw r30,24(r1)
ffc166f8: 38 63 6e c0 addi r3,r3,28352
ffc166fc: 7c 9f 23 78 mr r31,r4
ffc16700: 38 a1 00 08 addi r5,r1,8
ffc16704: 7c 04 03 78 mr r4,r0
ffc16708: 48 00 51 19 bl ffc1b820 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
ffc1670c: 80 01 00 08 lwz r0,8(r1)
ffc16710: 7c 7e 1b 78 mr r30,r3
ffc16714: 2f 80 00 00 cmpwi cr7,r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc16718: 38 60 00 04 li r3,4
{
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
ffc1671c: 40 9e 00 58 bne- cr7,ffc16774 <rtems_partition_return_buffer+0x94>
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
ffc16720: 80 1e 00 10 lwz r0,16(r30)
ending = _Addresses_Add_offset( starting, the_partition->length );
ffc16724: 81 3e 00 14 lwz r9,20(r30)
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
ffc16728: 7f 9f 00 40 cmplw cr7,r31,r0
ffc1672c: 41 9c 00 50 blt- cr7,ffc1677c <rtems_partition_return_buffer+0x9c>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
ffc16730: 7d 20 4a 14 add r9,r0,r9
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
ffc16734: 7f 9f 48 40 cmplw cr7,r31,r9
ffc16738: 41 9d 00 44 bgt- cr7,ffc1677c <rtems_partition_return_buffer+0x9c><== NEVER TAKEN
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
ffc1673c: 81 3e 00 18 lwz r9,24(r30)
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
ffc16740: 7c 00 f8 50 subf r0,r0,r31
ffc16744: 7d 60 4b 96 divwu r11,r0,r9
ffc16748: 7d 2b 49 d6 mullw r9,r11,r9
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
ffc1674c: 7f 80 48 00 cmpw cr7,r0,r9
ffc16750: 40 9e 00 2c bne- cr7,ffc1677c <rtems_partition_return_buffer+0x9c>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
ffc16754: 38 7e 00 24 addi r3,r30,36
ffc16758: 7f e4 fb 78 mr r4,r31
ffc1675c: 48 00 32 75 bl ffc199d0 <_Chain_Append>
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
ffc16760: 81 3e 00 20 lwz r9,32(r30)
ffc16764: 38 09 ff ff addi r0,r9,-1
ffc16768: 90 1e 00 20 stw r0,32(r30)
_Thread_Enable_dispatch();
ffc1676c: 48 00 5e ed bl ffc1c658 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc16770: 38 60 00 00 li r3,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc16774: 39 61 00 20 addi r11,r1,32
ffc16778: 4b ff 7a 14 b ffc0e18c <_restgpr_30_x>
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
ffc1677c: 48 00 5e dd bl ffc1c658 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
ffc16780: 38 60 00 09 li r3,9
ffc16784: 4b ff ff f0 b ffc16774 <rtems_partition_return_buffer+0x94>
ffc0f000 <rtems_rate_monotonic_get_statistics>:
rtems_status_code rtems_rate_monotonic_get_statistics(
rtems_id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
ffc0f000: 7c 2b 0b 78 mr r11,r1
ffc0f004: 94 21 ff e0 stwu r1,-32(r1)
ffc0f008: 7c 08 02 a6 mflr r0
ffc0f00c: 48 00 cc e1 bl ffc1bcec <_savegpr_31>
Objects_Locations location;
Rate_monotonic_Control *the_period;
rtems_rate_monotonic_period_statistics *dst;
Rate_monotonic_Statistics *src;
if ( !statistics )
ffc0f010: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_rate_monotonic_get_statistics(
rtems_id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
ffc0f014: 90 01 00 24 stw r0,36(r1)
ffc0f018: 7c 60 1b 78 mr r0,r3
Rate_monotonic_Control *the_period;
rtems_rate_monotonic_period_statistics *dst;
Rate_monotonic_Statistics *src;
if ( !statistics )
return RTEMS_INVALID_ADDRESS;
ffc0f01c: 38 60 00 09 li r3,9
Objects_Locations location;
Rate_monotonic_Control *the_period;
rtems_rate_monotonic_period_statistics *dst;
Rate_monotonic_Statistics *src;
if ( !statistics )
ffc0f020: 41 82 00 a4 beq- ffc0f0c4 <rtems_rate_monotonic_get_statistics+0xc4><== ALWAYS TAKEN
ffc0f024: 3c 60 00 00 lis r3,0 <== NOT EXECUTED
ffc0f028: 7c 04 03 78 mr r4,r0 <== NOT EXECUTED
ffc0f02c: 38 63 2c 00 addi r3,r3,11264 <== NOT EXECUTED
ffc0f030: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED
ffc0f034: 4b ff c3 75 bl ffc0b3a8 <_Objects_Get> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
ffc0f038: 80 01 00 08 lwz r0,8(r1) <== NOT EXECUTED
ffc0f03c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc0f040: 40 9e 00 80 bne- cr7,ffc0f0c0 <rtems_rate_monotonic_get_statistics+0xc0><== NOT EXECUTED
case OBJECTS_LOCAL:
dst = statistics;
src = &the_period->Statistics;
dst->count = src->count;
ffc0f044: 80 03 00 54 lwz r0,84(r3) <== NOT EXECUTED
dst->missed_count = src->missed_count;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time );
ffc0f048: 81 43 00 5c lwz r10,92(r3) <== NOT EXECUTED
ffc0f04c: 81 63 00 60 lwz r11,96(r3) <== NOT EXECUTED
switch ( location ) {
case OBJECTS_LOCAL:
dst = statistics;
src = &the_period->Statistics;
dst->count = src->count;
ffc0f050: 90 1f 00 00 stw r0,0(r31) <== NOT EXECUTED
dst->missed_count = src->missed_count;
ffc0f054: 80 03 00 58 lwz r0,88(r3) <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time );
ffc0f058: 91 5f 00 08 stw r10,8(r31) <== NOT EXECUTED
ffc0f05c: 91 7f 00 0c stw r11,12(r31) <== NOT EXECUTED
_Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time );
ffc0f060: 81 43 00 64 lwz r10,100(r3) <== NOT EXECUTED
ffc0f064: 81 63 00 68 lwz r11,104(r3) <== NOT EXECUTED
ffc0f068: 91 5f 00 10 stw r10,16(r31) <== NOT EXECUTED
ffc0f06c: 91 7f 00 14 stw r11,20(r31) <== NOT EXECUTED
_Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time );
ffc0f070: 81 43 00 6c lwz r10,108(r3) <== NOT EXECUTED
ffc0f074: 81 63 00 70 lwz r11,112(r3) <== NOT EXECUTED
ffc0f078: 91 5f 00 18 stw r10,24(r31) <== NOT EXECUTED
ffc0f07c: 91 7f 00 1c stw r11,28(r31) <== NOT EXECUTED
_Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time );
ffc0f080: 81 43 00 74 lwz r10,116(r3) <== NOT EXECUTED
ffc0f084: 81 63 00 78 lwz r11,120(r3) <== NOT EXECUTED
ffc0f088: 91 5f 00 20 stw r10,32(r31) <== NOT EXECUTED
ffc0f08c: 91 7f 00 24 stw r11,36(r31) <== NOT EXECUTED
_Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time );
ffc0f090: 81 43 00 7c lwz r10,124(r3) <== NOT EXECUTED
ffc0f094: 81 63 00 80 lwz r11,128(r3) <== NOT EXECUTED
ffc0f098: 91 5f 00 28 stw r10,40(r31) <== NOT EXECUTED
ffc0f09c: 91 7f 00 2c stw r11,44(r31) <== NOT EXECUTED
_Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time );
ffc0f0a0: 81 43 00 84 lwz r10,132(r3) <== NOT EXECUTED
ffc0f0a4: 81 63 00 88 lwz r11,136(r3) <== NOT EXECUTED
case OBJECTS_LOCAL:
dst = statistics;
src = &the_period->Statistics;
dst->count = src->count;
dst->missed_count = src->missed_count;
ffc0f0a8: 90 1f 00 04 stw r0,4(r31) <== NOT EXECUTED
_Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time );
_Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time );
_Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time );
_Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time );
_Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time );
_Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time );
ffc0f0ac: 91 5f 00 30 stw r10,48(r31) <== NOT EXECUTED
ffc0f0b0: 91 7f 00 34 stw r11,52(r31) <== NOT EXECUTED
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();
ffc0f0b4: 4b ff d1 2d bl ffc0c1e0 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
ffc0f0b8: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc0f0bc: 48 00 00 08 b ffc0f0c4 <rtems_rate_monotonic_get_statistics+0xc4><== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0f0c0: 38 60 00 04 li r3,4 <== NOT EXECUTED
}
ffc0f0c4: 39 61 00 20 addi r11,r1,32
ffc0f0c8: 4b ff 21 34 b ffc011fc <_restgpr_31_x>
ffc08dc0 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
ffc08dc0: 94 21 ff d8 stwu r1,-40(r1)
ffc08dc4: 7c 08 02 a6 mflr r0
ffc08dc8: bf 81 00 18 stmw r28,24(r1)
ffc08dcc: 7c 7e 1b 78 mr r30,r3
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
ffc08dd0: 3c 60 00 00 lis r3,0
ffc08dd4: 7c 9f 23 78 mr r31,r4
ffc08dd8: 90 01 00 2c stw r0,44(r1)
ffc08ddc: 38 63 2c 00 addi r3,r3,11264
ffc08de0: 7f c4 f3 78 mr r4,r30
ffc08de4: 38 a1 00 08 addi r5,r1,8
ffc08de8: 48 00 25 c1 bl ffc0b3a8 <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
ffc08dec: 80 01 00 08 lwz r0,8(r1)
ffc08df0: 7c 7d 1b 78 mr r29,r3
ffc08df4: 2f 80 00 00 cmpwi cr7,r0,0
ffc08df8: 40 9e 01 70 bne- cr7,ffc08f68 <rtems_rate_monotonic_period+0x1a8>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
ffc08dfc: 3d 60 00 00 lis r11,0
ffc08e00: 81 23 00 40 lwz r9,64(r3)
ffc08e04: 80 0b 2e a4 lwz r0,11940(r11)
ffc08e08: 7f 89 00 00 cmpw cr7,r9,r0
ffc08e0c: 41 9e 00 10 beq- cr7,ffc08e1c <rtems_rate_monotonic_period+0x5c>
_Thread_Enable_dispatch();
ffc08e10: 48 00 33 d1 bl ffc0c1e0 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
ffc08e14: 3b c0 00 17 li r30,23
ffc08e18: 48 00 01 54 b ffc08f6c <rtems_rate_monotonic_period+0x1ac>
}
if ( length == RTEMS_PERIOD_STATUS ) {
ffc08e1c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc08e20: 40 9e 00 28 bne- cr7,ffc08e48 <rtems_rate_monotonic_period+0x88>
switch ( the_period->state ) {
ffc08e24: 80 03 00 38 lwz r0,56(r3)
ffc08e28: 3b c0 00 00 li r30,0
ffc08e2c: 2b 80 00 04 cmplwi cr7,r0,4
ffc08e30: 41 9d 00 10 bgt- cr7,ffc08e40 <rtems_rate_monotonic_period+0x80><== NEVER TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc08e34: 3d 20 ff c2 lis r9,-62
ffc08e38: 39 29 df 48 addi r9,r9,-8376
ffc08e3c: 7f c9 00 ae lbzx r30,r9,r0
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
ffc08e40: 48 00 33 a1 bl ffc0c1e0 <_Thread_Enable_dispatch>
return( return_value );
ffc08e44: 48 00 01 28 b ffc08f6c <rtems_rate_monotonic_period+0x1ac>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc08e48: 7f 80 00 a6 mfmsr r28
ffc08e4c: 7c 10 42 a6 mfsprg r0,0
ffc08e50: 7f 80 00 78 andc r0,r28,r0
ffc08e54: 7c 00 01 24 mtmsr r0
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
ffc08e58: 80 03 00 38 lwz r0,56(r3)
ffc08e5c: 2f 80 00 00 cmpwi cr7,r0,0
ffc08e60: 40 be 00 4c bne+ cr7,ffc08eac <rtems_rate_monotonic_period+0xec>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc08e64: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
ffc08e68: 4b ff fd dd bl ffc08c44 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc08e6c: 38 00 00 02 li r0,2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc08e70: 3d 20 ff c1 lis r9,-63
ffc08e74: 90 1d 00 38 stw r0,56(r29)
ffc08e78: 39 29 92 60 addi r9,r9,-28064
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc08e7c: 38 00 00 00 li r0,0
the_watchdog->routine = routine;
ffc08e80: 91 3d 00 2c stw r9,44(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc08e84: 3c 60 00 00 lis r3,0
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc08e88: 90 1d 00 18 stw r0,24(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc08e8c: 38 63 2d c8 addi r3,r3,11720
ffc08e90: 38 9d 00 10 addi r4,r29,16
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
ffc08e94: 93 dd 00 30 stw r30,48(r29)
the_watchdog->user_data = user_data;
ffc08e98: 90 1d 00 34 stw r0,52(r29)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
ffc08e9c: 93 fd 00 3c stw r31,60(r29)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc08ea0: 93 fd 00 1c stw r31,28(r29)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc08ea4: 48 00 43 79 bl ffc0d21c <_Watchdog_Insert>
ffc08ea8: 48 00 00 74 b ffc08f1c <rtems_rate_monotonic_period+0x15c>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
ffc08eac: 2f 80 00 02 cmpwi cr7,r0,2
ffc08eb0: 40 be 00 78 bne+ cr7,ffc08f28 <rtems_rate_monotonic_period+0x168>
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
ffc08eb4: 4b ff fe 09 bl ffc08cbc <_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;
ffc08eb8: 38 00 00 01 li r0,1
ffc08ebc: 90 1d 00 38 stw r0,56(r29)
the_period->next_length = length;
ffc08ec0: 93 fd 00 3c stw r31,60(r29)
ffc08ec4: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
ffc08ec8: 3d 20 00 00 lis r9,0
ffc08ecc: 80 1d 00 08 lwz r0,8(r29)
ffc08ed0: 80 69 2e a4 lwz r3,11940(r9)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc08ed4: 38 80 40 00 li r4,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;
ffc08ed8: 90 03 00 20 stw r0,32(r3)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc08edc: 48 00 3c 41 bl ffc0cb1c <_Thread_Set_state>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc08ee0: 7d 20 00 a6 mfmsr r9
ffc08ee4: 7c 10 42 a6 mfsprg r0,0
ffc08ee8: 7d 20 00 78 andc r0,r9,r0
ffc08eec: 7c 00 01 24 mtmsr r0
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc08ef0: 39 60 00 02 li r11,2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
ffc08ef4: 80 1d 00 38 lwz r0,56(r29)
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc08ef8: 91 7d 00 38 stw r11,56(r29)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc08efc: 7d 20 01 24 mtmsr r9
/*
* 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 )
ffc08f00: 2f 80 00 03 cmpwi cr7,r0,3
ffc08f04: 40 be 00 18 bne+ cr7,ffc08f1c <rtems_rate_monotonic_period+0x15c><== ALWAYS TAKEN
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc08f08: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
ffc08f0c: 39 29 2e 98 addi r9,r9,11928 <== NOT EXECUTED
ffc08f10: 80 69 00 0c lwz r3,12(r9) <== NOT EXECUTED
ffc08f14: 38 80 40 00 li r4,16384 <== NOT EXECUTED
ffc08f18: 48 00 2f 0d bl ffc0be24 <_Thread_Clear_state> <== NOT EXECUTED
_Thread_Enable_dispatch();
ffc08f1c: 48 00 32 c5 bl ffc0c1e0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc08f20: 3b c0 00 00 li r30,0
ffc08f24: 48 00 00 48 b ffc08f6c <rtems_rate_monotonic_period+0x1ac>
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
ffc08f28: 2f 80 00 04 cmpwi cr7,r0,4
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc08f2c: 3b c0 00 04 li r30,4
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
ffc08f30: 40 be 00 3c bne+ cr7,ffc08f6c <rtems_rate_monotonic_period+0x1ac><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
ffc08f34: 4b ff fd 89 bl ffc08cbc <_Rate_monotonic_Update_statistics>
ffc08f38: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc08f3c: 38 00 00 02 li r0,2
the_period->next_length = length;
ffc08f40: 93 fd 00 3c stw r31,60(r29)
ffc08f44: 3c 60 00 00 lis r3,0
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc08f48: 90 1d 00 38 stw r0,56(r29)
ffc08f4c: 38 63 2d c8 addi r3,r3,11720
ffc08f50: 38 9d 00 10 addi r4,r29,16
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc08f54: 93 fd 00 1c stw r31,28(r29)
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
ffc08f58: 3b c0 00 06 li r30,6
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc08f5c: 48 00 42 c1 bl ffc0d21c <_Watchdog_Insert>
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
ffc08f60: 48 00 32 81 bl ffc0c1e0 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
ffc08f64: 48 00 00 08 b ffc08f6c <rtems_rate_monotonic_period+0x1ac>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc08f68: 3b c0 00 04 li r30,4
}
ffc08f6c: 39 61 00 28 addi r11,r1,40
ffc08f70: 7f c3 f3 78 mr r3,r30
ffc08f74: 4b ff 82 7c b ffc011f0 <_restgpr_28_x>
ffc09180 <rtems_rate_monotonic_report_statistics>:
void rtems_rate_monotonic_report_statistics( void )
{
rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin );
ffc09180: 3c 80 ff c1 lis r4,-63 <== NOT EXECUTED
ffc09184: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc09188: 38 84 ee 04 addi r4,r4,-4604 <== NOT EXECUTED
ffc0918c: 4b ff fd ec b ffc08f78 <rtems_rate_monotonic_report_statistics_with_plugin><== NOT EXECUTED
ffc08f78 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc08f78: 94 21 ff 70 stwu r1,-144(r1) <== NOT EXECUTED
ffc08f7c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc08f80: 90 01 00 94 stw r0,148(r1) <== NOT EXECUTED
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
ffc08f84: 7c 80 23 79 mr. r0,r4 <== NOT EXECUTED
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc08f88: bf 01 00 70 stmw r24,112(r1) <== NOT EXECUTED
ffc08f8c: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
ffc08f90: 90 01 00 68 stw r0,104(r1) <== NOT EXECUTED
ffc08f94: 41 82 01 e4 beq- ffc09178 <rtems_rate_monotonic_report_statistics_with_plugin+0x200><== NOT EXECUTED
return;
(*print)( context, "Period information by period\n" );
ffc08f98: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED
ffc08f9c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc08fa0: 38 84 df 4d addi r4,r4,-8371 <== NOT EXECUTED
/*
* 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 ;
ffc08fa4: 3f 00 00 00 lis r24,0 <== NOT EXECUTED
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc08fa8: 3f 20 ff c2 lis r25,-62 <== NOT EXECUTED
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 );
(*print)( context,
ffc08fac: 3f 40 ff c2 lis r26,-62 <== NOT EXECUTED
char name[5];
if ( !print )
return;
(*print)( context, "Period information by period\n" );
ffc08fb0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc08fb4: 4e 80 04 21 bctrl <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
ffc08fb8: 80 01 00 68 lwz r0,104(r1) <== NOT EXECUTED
ffc08fbc: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED
ffc08fc0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc08fc4: 38 84 df 6b addi r4,r4,-8341 <== NOT EXECUTED
ffc08fc8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
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);
(*print)( context,
ffc08fcc: 3f 60 ff c2 lis r27,-62 <== NOT EXECUTED
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc08fd0: 3f 80 ff c2 lis r28,-62 <== NOT EXECUTED
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc08fd4: 3b 39 e0 47 addi r25,r25,-8121 <== NOT EXECUTED
if ( !print )
return;
(*print)( context, "Period information by period\n" );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
ffc08fd8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc08fdc: 4e 80 04 21 bctrl <== NOT EXECUTED
(*print)( context, "--- Wall times are in seconds ---\n" );
ffc08fe0: 80 01 00 68 lwz r0,104(r1) <== NOT EXECUTED
ffc08fe4: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED
ffc08fe8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc08fec: 38 84 df 8d addi r4,r4,-8307 <== NOT EXECUTED
ffc08ff0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
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 );
(*print)( context,
ffc08ff4: 3b 5a e0 5e addi r26,r26,-8098 <== NOT EXECUTED
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);
(*print)( context,
ffc08ff8: 3b 7b e0 7d addi r27,r27,-8067 <== NOT EXECUTED
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc08ffc: 3b 9c de fa addi r28,r28,-8454 <== NOT EXECUTED
return;
(*print)( context, "Period information by period\n" );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
(*print)( context, "--- Wall times are in seconds ---\n" );
ffc09000: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc09004: 4e 80 04 21 bctrl <== NOT EXECUTED
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
ffc09008: 80 01 00 68 lwz r0,104(r1) <== NOT EXECUTED
ffc0900c: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED
ffc09010: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc09014: 38 84 df b0 addi r4,r4,-8272 <== NOT EXECUTED
ffc09018: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0901c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc09020: 4e 80 04 21 bctrl <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
ffc09024: 80 01 00 68 lwz r0,104(r1) <== NOT EXECUTED
ffc09028: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED
ffc0902c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc09030: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc09034: 38 84 df fb addi r4,r4,-8197 <== NOT EXECUTED
ffc09038: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc0903c: 4e 80 04 21 bctrl <== NOT EXECUTED
/*
* 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 ;
ffc09040: 39 38 2c 00 addi r9,r24,11264 <== NOT EXECUTED
ffc09044: 83 c9 00 08 lwz r30,8(r9) <== NOT EXECUTED
ffc09048: 48 00 01 20 b ffc09168 <rtems_rate_monotonic_report_statistics_with_plugin+0x1f0><== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
ffc0904c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc09050: 38 81 00 30 addi r4,r1,48 <== NOT EXECUTED
ffc09054: 48 00 5f ad bl ffc0f000 <rtems_rate_monotonic_get_statistics><== NOT EXECUTED
if ( status != RTEMS_SUCCESSFUL )
ffc09058: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc0905c: 40 be 01 08 bne+ cr7,ffc09164 <rtems_rate_monotonic_report_statistics_with_plugin+0x1ec><== NOT EXECUTED
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
ffc09060: 38 81 00 18 addi r4,r1,24 <== NOT EXECUTED
ffc09064: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc09068: 48 00 60 65 bl ffc0f0cc <rtems_rate_monotonic_get_status><== NOT EXECUTED
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
ffc0906c: 80 61 00 18 lwz r3,24(r1) <== NOT EXECUTED
ffc09070: 38 80 00 05 li r4,5 <== NOT EXECUTED
ffc09074: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED
ffc09078: 48 00 02 ad bl ffc09324 <rtems_object_get_name> <== NOT EXECUTED
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc0907c: 80 01 00 68 lwz r0,104(r1) <== NOT EXECUTED
ffc09080: 7f 24 cb 78 mr r4,r25 <== NOT EXECUTED
ffc09084: 80 e1 00 30 lwz r7,48(r1) <== NOT EXECUTED
ffc09088: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0908c: 81 01 00 34 lwz r8,52(r1) <== NOT EXECUTED
ffc09090: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED
ffc09094: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc09098: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED
ffc0909c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc090a0: 4e 80 04 21 bctrl <== NOT EXECUTED
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc090a4: 80 81 00 30 lwz r4,48(r1) <== NOT EXECUTED
ffc090a8: 2f 84 00 00 cmpwi cr7,r4,0 <== NOT EXECUTED
ffc090ac: 40 9e 00 20 bne- cr7,ffc090cc <rtems_rate_monotonic_report_statistics_with_plugin+0x154><== NOT EXECUTED
(*print)( context, "\n" );
ffc090b0: 80 01 00 68 lwz r0,104(r1) <== NOT EXECUTED
ffc090b4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc090b8: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED
ffc090bc: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc090c0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc090c4: 4e 80 04 21 bctrl <== NOT EXECUTED
continue;
ffc090c8: 48 00 00 9c b ffc09164 <rtems_rate_monotonic_report_statistics_with_plugin+0x1ec><== NOT EXECUTED
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 );
ffc090cc: 38 61 00 48 addi r3,r1,72 <== NOT EXECUTED
ffc090d0: 38 a1 00 10 addi r5,r1,16 <== NOT EXECUTED
ffc090d4: 48 00 3c d1 bl ffc0cda4 <_Timespec_Divide_by_integer> <== NOT EXECUTED
(*print)( context,
ffc090d8: 80 01 00 68 lwz r0,104(r1) <== NOT EXECUTED
ffc090dc: 80 c1 00 3c lwz r6,60(r1) <== NOT EXECUTED
ffc090e0: 3b a0 03 e8 li r29,1000 <== NOT EXECUTED
ffc090e4: 81 01 00 44 lwz r8,68(r1) <== NOT EXECUTED
ffc090e8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc090ec: 81 41 00 14 lwz r10,20(r1) <== NOT EXECUTED
ffc090f0: 7c c6 eb d6 divw r6,r6,r29 <== NOT EXECUTED
ffc090f4: 80 e1 00 40 lwz r7,64(r1) <== NOT EXECUTED
ffc090f8: 81 21 00 10 lwz r9,16(r1) <== NOT EXECUTED
ffc090fc: 80 a1 00 38 lwz r5,56(r1) <== NOT EXECUTED
ffc09100: 7d 08 eb d6 divw r8,r8,r29 <== NOT EXECUTED
ffc09104: 7d 4a eb d6 divw r10,r10,r29 <== NOT EXECUTED
ffc09108: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED
ffc0910c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc09110: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc09114: 4e 80 04 21 bctrl <== NOT EXECUTED
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);
ffc09118: 80 81 00 30 lwz r4,48(r1) <== NOT EXECUTED
ffc0911c: 38 61 00 60 addi r3,r1,96 <== NOT EXECUTED
ffc09120: 38 a1 00 10 addi r5,r1,16 <== NOT EXECUTED
ffc09124: 48 00 3c 81 bl ffc0cda4 <_Timespec_Divide_by_integer> <== NOT EXECUTED
(*print)( context,
ffc09128: 80 c1 00 54 lwz r6,84(r1) <== NOT EXECUTED
ffc0912c: 81 01 00 5c lwz r8,92(r1) <== NOT EXECUTED
ffc09130: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc09134: 81 41 00 14 lwz r10,20(r1) <== NOT EXECUTED
ffc09138: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc0913c: 80 01 00 68 lwz r0,104(r1) <== NOT EXECUTED
ffc09140: 7c c6 eb d6 divw r6,r6,r29 <== NOT EXECUTED
ffc09144: 80 a1 00 50 lwz r5,80(r1) <== NOT EXECUTED
ffc09148: 80 e1 00 58 lwz r7,88(r1) <== NOT EXECUTED
ffc0914c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc09150: 81 21 00 10 lwz r9,16(r1) <== NOT EXECUTED
ffc09154: 7d 08 eb d6 divw r8,r8,r29 <== NOT EXECUTED
ffc09158: 7d 4a eb d6 divw r10,r10,r29 <== NOT EXECUTED
ffc0915c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc09160: 4e 80 04 21 bctrl <== NOT EXECUTED
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
ffc09164: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
ffc09168: 39 38 2c 00 addi r9,r24,11264 <== NOT EXECUTED
/*
* 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 ;
ffc0916c: 80 09 00 0c lwz r0,12(r9) <== NOT EXECUTED
ffc09170: 7f 9e 00 40 cmplw cr7,r30,r0 <== NOT EXECUTED
ffc09174: 40 9d fe d8 ble+ cr7,ffc0904c <rtems_rate_monotonic_report_statistics_with_plugin+0xd4><== NOT EXECUTED
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
ffc09178: 39 61 00 90 addi r11,r1,144 <== NOT EXECUTED
ffc0917c: 4b ff 80 64 b ffc011e0 <_restgpr_24_x> <== NOT EXECUTED
ffc09190 <rtems_rate_monotonic_reset_all_statistics>:
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc09190: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
ffc09194: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED
ffc09198: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc0919c: 81 69 28 08 lwz r11,10248(r9) <== NOT EXECUTED
ffc091a0: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED
ffc091a4: 38 0b 00 01 addi r0,r11,1 <== NOT EXECUTED
ffc091a8: 90 09 28 08 stw r0,10248(r9) <== NOT EXECUTED
ffc091ac: bf c1 00 08 stmw r30,8(r1) <== NOT EXECUTED
return _Thread_Dispatch_disable_level;
ffc091b0: 80 09 28 08 lwz r0,10248(r9) <== NOT EXECUTED
/*
* 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 ;
ffc091b4: 3f c0 00 00 lis r30,0 <== NOT EXECUTED
ffc091b8: 39 3e 2c 00 addi r9,r30,11264 <== NOT EXECUTED
ffc091bc: 83 e9 00 08 lwz r31,8(r9) <== NOT EXECUTED
ffc091c0: 48 00 00 10 b ffc091d0 <rtems_rate_monotonic_reset_all_statistics+0x40><== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
ffc091c4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc091c8: 48 00 00 25 bl ffc091ec <rtems_rate_monotonic_reset_statistics><== NOT EXECUTED
* 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 ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
ffc091cc: 3b ff 00 01 addi r31,r31,1 <== NOT EXECUTED
/*
* 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 ;
id <= _Rate_monotonic_Information.maximum_id ;
ffc091d0: 39 3e 2c 00 addi r9,r30,11264 <== NOT EXECUTED
/*
* 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 ;
ffc091d4: 80 09 00 0c lwz r0,12(r9) <== NOT EXECUTED
ffc091d8: 7f 9f 00 40 cmplw cr7,r31,r0 <== NOT EXECUTED
ffc091dc: 40 9d ff e8 ble+ cr7,ffc091c4 <rtems_rate_monotonic_reset_all_statistics+0x34><== NOT EXECUTED
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
ffc091e0: 48 00 30 01 bl ffc0c1e0 <_Thread_Enable_dispatch> <== NOT EXECUTED
}
ffc091e4: 39 61 00 10 addi r11,r1,16 <== NOT EXECUTED
ffc091e8: 4b ff 80 10 b ffc011f8 <_restgpr_30_x> <== NOT EXECUTED
ffc091ec <rtems_rate_monotonic_reset_statistics>:
*/
rtems_status_code rtems_rate_monotonic_reset_statistics(
rtems_id id
)
{
ffc091ec: 7c 2b 0b 78 mr r11,r1 <== NOT EXECUTED
ffc091f0: 94 21 ff e0 stwu r1,-32(r1) <== NOT EXECUTED
ffc091f4: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc091f8: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED
ffc091fc: 3c 60 00 00 lis r3,0 <== NOT EXECUTED
ffc09200: 48 01 2a ed bl ffc1bcec <_savegpr_31> <== NOT EXECUTED
ffc09204: 38 63 2c 00 addi r3,r3,11264 <== NOT EXECUTED
ffc09208: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED
ffc0920c: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED
ffc09210: 48 00 21 99 bl ffc0b3a8 <_Objects_Get> <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
ffc09214: 80 01 00 08 lwz r0,8(r1) <== NOT EXECUTED
ffc09218: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED
ffc0921c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc09220: 38 60 00 04 li r3,4 <== NOT EXECUTED
{
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
ffc09224: 40 9e 00 34 bne- cr7,ffc09258 <rtems_rate_monotonic_reset_statistics+0x6c><== NOT EXECUTED
case OBJECTS_LOCAL:
_Rate_monotonic_Reset_statistics( the_period );
ffc09228: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc0922c: 38 a0 00 38 li r5,56 <== NOT EXECUTED
ffc09230: 38 7f 00 54 addi r3,r31,84 <== NOT EXECUTED
ffc09234: 48 00 91 41 bl ffc12374 <memset> <== NOT EXECUTED
ffc09238: 3c 00 7f ff lis r0,32767 <== NOT EXECUTED
ffc0923c: 60 00 ff ff ori r0,r0,65535 <== NOT EXECUTED
ffc09240: 90 1f 00 5c stw r0,92(r31) <== NOT EXECUTED
ffc09244: 90 1f 00 60 stw r0,96(r31) <== NOT EXECUTED
ffc09248: 90 1f 00 74 stw r0,116(r31) <== NOT EXECUTED
ffc0924c: 90 1f 00 78 stw r0,120(r31) <== NOT EXECUTED
_Thread_Enable_dispatch();
ffc09250: 48 00 2f 91 bl ffc0c1e0 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
ffc09254: 38 60 00 00 li r3,0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc09258: 39 61 00 20 addi r11,r1,32 <== NOT EXECUTED
ffc0925c: 4b ff 7f a0 b ffc011fc <_restgpr_31_x> <== NOT EXECUTED
ffc17ba4 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
ffc17ba4: 7c 2b 0b 78 mr r11,r1
ffc17ba8: 94 21 ff e0 stwu r1,-32(r1)
ffc17bac: 7c 08 02 a6 mflr r0
ffc17bb0: 48 01 63 b9 bl ffc2df68 <_savegpr_31>
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
ffc17bb4: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
ffc17bb8: 90 01 00 24 stw r0,36(r1)
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
ffc17bbc: 38 00 00 0a li r0,10
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
ffc17bc0: 41 a2 00 ac beq+ ffc17c6c <rtems_signal_send+0xc8>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
ffc17bc4: 38 81 00 08 addi r4,r1,8
ffc17bc8: 48 00 4a cd bl ffc1c694 <_Thread_Get>
switch ( location ) {
ffc17bcc: 80 01 00 08 lwz r0,8(r1)
ffc17bd0: 2f 80 00 00 cmpwi cr7,r0,0
ffc17bd4: 40 9e 00 94 bne- cr7,ffc17c68 <rtems_signal_send+0xc4>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
ffc17bd8: 81 23 01 2c lwz r9,300(r3)
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
ffc17bdc: 80 09 00 0c lwz r0,12(r9)
ffc17be0: 2f 80 00 00 cmpwi cr7,r0,0
ffc17be4: 41 9e 00 78 beq- cr7,ffc17c5c <rtems_signal_send+0xb8>
if ( asr->is_enabled ) {
ffc17be8: 88 09 00 08 lbz r0,8(r9)
ffc17bec: 2f 80 00 00 cmpwi cr7,r0,0
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc17bf0: 7c 00 00 a6 mfmsr r0
ffc17bf4: 7d 70 42 a6 mfsprg r11,0
ffc17bf8: 7c 0b 58 78 andc r11,r0,r11
ffc17bfc: 7d 60 01 24 mtmsr r11
ffc17c00: 41 9e 00 40 beq- cr7,ffc17c40 <rtems_signal_send+0x9c>
)
{
ISR_Level _level;
_ISR_Disable( _level );
*signal_set |= signals;
ffc17c04: 81 69 00 14 lwz r11,20(r9)
ffc17c08: 7d 7f fb 78 or r31,r11,r31
ffc17c0c: 93 e9 00 14 stw r31,20(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc17c10: 7c 00 01 24 mtmsr r0
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
ffc17c14: 3d 20 00 00 lis r9,0
ffc17c18: 39 29 71 d8 addi r9,r9,29144
ffc17c1c: 80 09 00 08 lwz r0,8(r9)
ffc17c20: 2f 80 00 00 cmpwi cr7,r0,0
ffc17c24: 41 9e 00 2c beq- cr7,ffc17c50 <rtems_signal_send+0xac>
ffc17c28: 80 09 00 0c lwz r0,12(r9)
ffc17c2c: 7f 83 00 00 cmpw cr7,r3,r0
ffc17c30: 40 be 00 20 bne+ cr7,ffc17c50 <rtems_signal_send+0xac> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
ffc17c34: 38 00 00 01 li r0,1
ffc17c38: 98 09 00 18 stb r0,24(r9)
ffc17c3c: 48 00 00 14 b ffc17c50 <rtems_signal_send+0xac>
ffc17c40: 81 69 00 18 lwz r11,24(r9)
ffc17c44: 7d 7f fb 78 or r31,r11,r31
ffc17c48: 93 e9 00 18 stw r31,24(r9)
ffc17c4c: 7c 00 01 24 mtmsr r0
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
ffc17c50: 48 00 4a 09 bl ffc1c658 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc17c54: 38 00 00 00 li r0,0
ffc17c58: 48 00 00 14 b ffc17c6c <rtems_signal_send+0xc8>
}
_Thread_Enable_dispatch();
ffc17c5c: 48 00 49 fd bl ffc1c658 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
ffc17c60: 38 00 00 0b li r0,11
ffc17c64: 48 00 00 08 b ffc17c6c <rtems_signal_send+0xc8>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc17c68: 38 00 00 04 li r0,4
}
ffc17c6c: 39 61 00 20 addi r11,r1,32
ffc17c70: 7c 03 03 78 mr r3,r0
ffc17c74: 4b ff 65 1c b ffc0e190 <_restgpr_31_x>
ffc03740 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
ffc03740: 7c 08 02 a6 mflr r0
ffc03744: 94 21 ff f8 stwu r1,-8(r1)
ffc03748: 90 01 00 0c stw r0,12(r1)
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
ffc0374c: 80 03 00 08 lwz r0,8(r3)
ffc03750: 2f 80 00 00 cmpwi cr7,r0,0
ffc03754: 41 9e 00 1c beq- cr7,ffc03770 <rtems_stack_checker_begin_extension+0x30><== NEVER TAKEN
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
ffc03758: 80 63 00 b8 lwz r3,184(r3)
ffc0375c: 3c 80 00 00 lis r4,0
ffc03760: 38 84 2a c4 addi r4,r4,10948
ffc03764: 38 63 00 08 addi r3,r3,8
ffc03768: 38 a0 00 80 li r5,128
ffc0376c: 48 00 ca 39 bl ffc101a4 <memcpy>
}
ffc03770: 80 01 00 0c lwz r0,12(r1)
ffc03774: 38 21 00 08 addi r1,r1,8
ffc03778: 7c 08 03 a6 mtlr r0
ffc0377c: 4e 80 00 20 blr
ffc03700 <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
ffc03700: 7c 2b 0b 78 mr r11,r1
ffc03704: 94 21 ff f0 stwu r1,-16(r1)
ffc03708: 7c 08 02 a6 mflr r0
ffc0370c: 48 01 0c fd bl ffc14408 <_savegpr_31>
ffc03710: 7c 9f 23 78 mr r31,r4
ffc03714: 90 01 00 14 stw r0,20(r1)
Stack_check_Initialize();
ffc03718: 4b ff ff 99 bl ffc036b0 <Stack_check_Initialize>
if (the_thread)
ffc0371c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc03720: 41 9e 00 14 beq- cr7,ffc03734 <rtems_stack_checker_create_extension+0x34><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
ffc03724: 80 7f 00 b8 lwz r3,184(r31)
ffc03728: 38 80 00 a5 li r4,165
ffc0372c: 80 bf 00 b4 lwz r5,180(r31)
ffc03730: 48 00 cb 59 bl ffc10288 <memset>
return true;
}
ffc03734: 39 61 00 10 addi r11,r1,16
ffc03738: 38 60 00 01 li r3,1
ffc0373c: 48 01 0d 18 b ffc14454 <_restgpr_31_x>
ffc038cc <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
ffc038cc: 94 21 ff f0 stwu r1,-16(r1)
ffc038d0: 7c 08 02 a6 mflr r0
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
ffc038d4: 3d 20 00 00 lis r9,0
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
ffc038d8: 90 01 00 14 stw r0,20(r1)
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
ffc038dc: 81 29 2e 44 lwz r9,11844(r9)
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
ffc038e0: bf c1 00 08 stmw r30,8(r1)
ffc038e4: 7c 3f 0b 78 mr r31,r1
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
ffc038e8: 3b c0 00 00 li r30,0
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
ffc038ec: 80 69 00 b8 lwz r3,184(r9)
ffc038f0: 7f 9f 18 40 cmplw cr7,r31,r3
ffc038f4: 41 9c 00 18 blt- cr7,ffc0390c <rtems_stack_checker_is_blown+0x40><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
ffc038f8: 83 c9 00 b4 lwz r30,180(r9)
ffc038fc: 7f c3 f2 14 add r30,r3,r30
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
ffc03900: 7f df f0 10 subfc r30,r31,r30
ffc03904: 3b c0 00 00 li r30,0
ffc03908: 7f de f1 14 adde r30,r30,r30
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
ffc0390c: 3d 20 00 00 lis r9,0
ffc03910: 80 09 28 58 lwz r0,10328(r9)
*/
bool rtems_stack_checker_is_blown( void )
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
bool sp_ok;
bool pattern_ok = true;
ffc03914: 38 80 00 01 li r4,1
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
ffc03918: 2f 80 00 00 cmpwi cr7,r0,0
ffc0391c: 41 9e 00 20 beq- cr7,ffc0393c <rtems_stack_checker_is_blown+0x70><== NEVER TAKEN
pattern_ok = (!memcmp(
ffc03920: 3c 80 00 00 lis r4,0
ffc03924: 38 84 2a c4 addi r4,r4,10948
ffc03928: 38 63 00 08 addi r3,r3,8
ffc0392c: 38 a0 00 80 li r5,128
ffc03930: 48 00 c7 d1 bl ffc10100 <memcmp>
ffc03934: 7c 64 00 34 cntlzw r4,r3
ffc03938: 54 84 d9 7e rlwinm r4,r4,27,5,31
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
ffc0393c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc03940: 41 9e 00 0c beq- cr7,ffc0394c <rtems_stack_checker_is_blown+0x80><== NEVER TAKEN
ffc03944: 2f 84 00 00 cmpwi cr7,r4,0
ffc03948: 40 be 00 10 bne+ cr7,ffc03958 <rtems_stack_checker_is_blown+0x8c><== ALWAYS TAKEN
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
ffc0394c: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
ffc03950: 80 69 2e 44 lwz r3,11844(r9) <== NOT EXECUTED
ffc03954: 4b ff fe 2d bl ffc03780 <Stack_check_report_blown_task><== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
ffc03958: 39 7f 00 10 addi r11,r31,16
ffc0395c: 38 60 00 00 li r3,0
ffc03960: 48 01 0a f0 b ffc14450 <_restgpr_30_x>
ffc03964 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc03964: 94 21 ff e8 stwu r1,-24(r1)
ffc03968: 7c 08 02 a6 mflr r0
ffc0396c: bf 81 00 08 stmw r28,8(r1)
if ( !print )
ffc03970: 7c 9e 23 79 mr. r30,r4
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc03974: 7c 7c 1b 78 mr r28,r3
ffc03978: 90 01 00 1c stw r0,28(r1)
if ( !print )
ffc0397c: 41 82 00 58 beq- ffc039d4 <rtems_stack_checker_report_usage_with_plugin+0x70><== NEVER TAKEN
return;
print_context = context;
ffc03980: 3f e0 00 00 lis r31,0
print_handler = print;
(*print)( context, "Stack usage by thread\n");
ffc03984: 7f c9 03 a6 mtctr r30
)
{
if ( !print )
return;
print_context = context;
ffc03988: 3b bf 28 50 addi r29,r31,10320
print_handler = print;
ffc0398c: 93 df 28 50 stw r30,10320(r31)
(*print)( context, "Stack usage by thread\n");
ffc03990: 3c 80 ff c1 lis r4,-63
ffc03994: 38 84 61 4e addi r4,r4,24910
)
{
if ( !print )
return;
print_context = context;
ffc03998: 90 7d 00 04 stw r3,4(r29)
print_handler = print;
(*print)( context, "Stack usage by thread\n");
ffc0399c: 4c c6 31 82 crclr 4*cr1+eq
ffc039a0: 4e 80 04 21 bctrl
(*print)( context,
ffc039a4: 3c 80 ff c1 lis r4,-63
ffc039a8: 38 84 61 65 addi r4,r4,24933
ffc039ac: 7f c9 03 a6 mtctr r30
ffc039b0: 7f 83 e3 78 mr r3,r28
ffc039b4: 4c c6 31 82 crclr 4*cr1+eq
ffc039b8: 4e 80 04 21 bctrl
" 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 );
ffc039bc: 3c 60 ff c0 lis r3,-64
ffc039c0: 38 63 35 78 addi r3,r3,13688
ffc039c4: 48 00 55 dd bl ffc08fa0 <rtems_iterate_over_all_threads>
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
#endif
print_context = NULL;
ffc039c8: 38 00 00 00 li r0,0
ffc039cc: 90 1d 00 04 stw r0,4(r29)
print_handler = NULL;
ffc039d0: 90 1f 28 50 stw r0,10320(r31)
}
ffc039d4: 39 61 00 18 addi r11,r1,24
ffc039d8: 48 01 0a 70 b ffc14448 <_restgpr_28_x>
ffc03854 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
ffc03854: 94 21 ff e8 stwu r1,-24(r1)
ffc03858: 7c 08 02 a6 mflr r0
ffc0385c: 90 01 00 1c stw r0,28(r1)
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = Stack_check_Get_pattern_area(the_stack);
ffc03860: 81 23 00 b8 lwz r9,184(r3)
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
ffc03864: bf a1 00 0c stmw r29,12(r1)
ffc03868: 7c 3f 0b 78 mr r31,r1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
ffc0386c: 7f 9f 48 40 cmplw cr7,r31,r9
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
ffc03870: 7c 7e 1b 78 mr r30,r3
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
ffc03874: 3b a0 00 00 li r29,0
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = Stack_check_Get_pattern_area(the_stack);
ffc03878: 38 69 00 08 addi r3,r9,8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
ffc0387c: 41 9c 00 18 blt- cr7,ffc03894 <rtems_stack_checker_switch_extension+0x40><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
ffc03880: 83 be 00 b4 lwz r29,180(r30)
ffc03884: 7f a9 ea 14 add r29,r9,r29
}
/*
* rtems_stack_checker_switch_extension
*/
void rtems_stack_checker_switch_extension(
ffc03888: 7f bf e8 10 subfc r29,r31,r29
ffc0388c: 3b a0 00 00 li r29,0
ffc03890: 7f bd e9 14 adde r29,r29,r29
/*
* 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,
ffc03894: 3c 80 00 00 lis r4,0
ffc03898: 38 84 2a c4 addi r4,r4,10948
ffc0389c: 38 a0 00 80 li r5,128
ffc038a0: 48 00 c8 61 bl ffc10100 <memcmp>
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
ffc038a4: 2f 9d 00 00 cmpwi cr7,r29,0
/*
* 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,
ffc038a8: 7c 64 00 34 cntlzw r4,r3
ffc038ac: 54 84 d9 7e rlwinm r4,r4,27,5,31
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
ffc038b0: 41 9e 00 0c beq- cr7,ffc038bc <rtems_stack_checker_switch_extension+0x68><== NEVER TAKEN
ffc038b4: 2f 84 00 00 cmpwi cr7,r4,0
ffc038b8: 40 be 00 0c bne+ cr7,ffc038c4 <rtems_stack_checker_switch_extension+0x70>
Stack_check_report_blown_task( running, pattern_ok );
ffc038bc: 7f c3 f3 78 mr r3,r30
ffc038c0: 4b ff fe c1 bl ffc03780 <Stack_check_report_blown_task>
}
}
ffc038c4: 39 7f 00 18 addi r11,r31,24
ffc038c8: 48 01 0b 84 b ffc1444c <_restgpr_29_x>
ffc0dda8 <rtems_string_to_double>:
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
ffc0dda8: 94 21 ff d0 stwu r1,-48(r1)
ffc0ddac: 7c 08 02 a6 mflr r0
ffc0ddb0: bf a1 00 1c stmw r29,28(r1)
double result;
char *end;
if ( !n )
ffc0ddb4: 7c 9e 23 79 mr. r30,r4
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
ffc0ddb8: 7c 7f 1b 78 mr r31,r3
ffc0ddbc: 90 01 00 34 stw r0,52(r1)
ffc0ddc0: 7c bd 2b 78 mr r29,r5
double result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc0ddc4: 38 60 00 09 li r3,9
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
ffc0ddc8: db e1 00 28 stfd f31,40(r1)
double result;
char *end;
if ( !n )
ffc0ddcc: 41 82 00 94 beq- ffc0de60 <rtems_string_to_double+0xb8>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0ddd0: 48 00 26 85 bl ffc10454 <__errno>
*n = 0;
ffc0ddd4: 3d 20 ff c2 lis r9,-62
ffc0ddd8: c8 09 dd 88 lfd f0,-8824(r9)
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0dddc: 38 00 00 00 li r0,0
ffc0dde0: 90 03 00 00 stw r0,0(r3)
*n = 0;
result = strtod( s, &end );
ffc0dde4: 38 81 00 08 addi r4,r1,8
ffc0dde8: 7f e3 fb 78 mr r3,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0ddec: d8 1e 00 00 stfd f0,0(r30)
result = strtod( s, &end );
ffc0ddf0: 48 00 53 95 bl ffc13184 <strtod>
if ( endptr )
ffc0ddf4: 2f 9d 00 00 cmpwi cr7,r29,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtod( s, &end );
ffc0ddf8: ff e0 08 90 fmr f31,f1
ffc0ddfc: 80 01 00 08 lwz r0,8(r1)
if ( endptr )
ffc0de00: 41 9e 00 08 beq- cr7,ffc0de08 <rtems_string_to_double+0x60>
*endptr = end;
ffc0de04: 90 1d 00 00 stw r0,0(r29)
if ( end == s )
ffc0de08: 7f 80 f8 00 cmpw cr7,r0,r31
return RTEMS_NOT_DEFINED;
ffc0de0c: 38 60 00 0b li r3,11
result = strtod( s, &end );
if ( endptr )
*endptr = end;
if ( end == s )
ffc0de10: 41 9e 00 50 beq- cr7,ffc0de60 <rtems_string_to_double+0xb8>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0de14: 48 00 26 41 bl ffc10454 <__errno>
ffc0de18: 80 03 00 00 lwz r0,0(r3)
ffc0de1c: 2f 80 00 22 cmpwi cr7,r0,34
ffc0de20: 40 be 00 38 bne+ cr7,ffc0de58 <rtems_string_to_double+0xb0>
ffc0de24: 3d 20 ff c2 lis r9,-62
ffc0de28: c8 09 dd 88 lfd f0,-8824(r9)
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
ffc0de2c: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0de30: ff 9f 00 00 fcmpu cr7,f31,f0
ffc0de34: 41 be 00 2c beq+ cr7,ffc0de60 <rtems_string_to_double+0xb8><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
ffc0de38: 3d 20 ff c2 lis r9,-62
ffc0de3c: c8 09 02 88 lfd f0,648(r9)
ffc0de40: ff 9f 00 00 fcmpu cr7,f31,f0
ffc0de44: 41 bd 00 1c bgt+ cr7,ffc0de60 <rtems_string_to_double+0xb8><== ALWAYS TAKEN
ffc0de48: 3d 20 ff c2 lis r9,-62 <== NOT EXECUTED
ffc0de4c: c8 09 02 90 lfd f0,656(r9) <== NOT EXECUTED
ffc0de50: ff 9f 00 00 fcmpu cr7,f31,f0 <== NOT EXECUTED
ffc0de54: 41 bc 00 0c blt+ cr7,ffc0de60 <rtems_string_to_double+0xb8><== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
*n = result;
ffc0de58: db fe 00 00 stfd f31,0(r30)
return RTEMS_SUCCESSFUL;
ffc0de5c: 38 60 00 00 li r3,0
}
ffc0de60: 80 01 00 34 lwz r0,52(r1)
ffc0de64: bb a1 00 1c lmw r29,28(r1)
ffc0de68: 7c 08 03 a6 mtlr r0
ffc0de6c: cb e1 00 28 lfd f31,40(r1)
ffc0de70: 38 21 00 30 addi r1,r1,48
ffc0de74: 4e 80 00 20 blr
ffc0de78 <rtems_string_to_float>:
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
ffc0de78: 94 21 ff d0 stwu r1,-48(r1)
ffc0de7c: 7c 08 02 a6 mflr r0
ffc0de80: bf a1 00 1c stmw r29,28(r1)
float result;
char *end;
if ( !n )
ffc0de84: 7c 9e 23 79 mr. r30,r4
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
ffc0de88: 7c 7f 1b 78 mr r31,r3
ffc0de8c: 90 01 00 34 stw r0,52(r1)
ffc0de90: 7c bd 2b 78 mr r29,r5
float result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc0de94: 38 60 00 09 li r3,9
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
ffc0de98: db e1 00 28 stfd f31,40(r1)
float result;
char *end;
if ( !n )
ffc0de9c: 41 82 00 90 beq- ffc0df2c <rtems_string_to_float+0xb4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0dea0: 48 00 25 b5 bl ffc10454 <__errno>
ffc0dea4: 38 00 00 00 li r0,0
ffc0dea8: 90 03 00 00 stw r0,0(r3)
*n = 0;
ffc0deac: 38 00 00 00 li r0,0
result = strtof( s, &end );
ffc0deb0: 7f e3 fb 78 mr r3,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0deb4: 90 1e 00 00 stw r0,0(r30)
result = strtof( s, &end );
ffc0deb8: 38 81 00 08 addi r4,r1,8
ffc0debc: 48 00 52 e1 bl ffc1319c <strtof>
if ( endptr )
ffc0dec0: 2f 9d 00 00 cmpwi cr7,r29,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtof( s, &end );
ffc0dec4: ff e0 08 90 fmr f31,f1
ffc0dec8: 80 01 00 08 lwz r0,8(r1)
if ( endptr )
ffc0decc: 41 9e 00 08 beq- cr7,ffc0ded4 <rtems_string_to_float+0x5c>
*endptr = end;
ffc0ded0: 90 1d 00 00 stw r0,0(r29)
if ( end == s )
ffc0ded4: 7f 80 f8 00 cmpw cr7,r0,r31
return RTEMS_NOT_DEFINED;
ffc0ded8: 38 60 00 0b li r3,11
result = strtof( s, &end );
if ( endptr )
*endptr = end;
if ( end == s )
ffc0dedc: 41 9e 00 50 beq- cr7,ffc0df2c <rtems_string_to_float+0xb4>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0dee0: 48 00 25 75 bl ffc10454 <__errno>
ffc0dee4: 80 03 00 00 lwz r0,0(r3)
ffc0dee8: 2f 80 00 22 cmpwi cr7,r0,34
ffc0deec: 40 be 00 38 bne+ cr7,ffc0df24 <rtems_string_to_float+0xac>
ffc0def0: 3d 20 ff c2 lis r9,-62
ffc0def4: c0 09 02 a0 lfs f0,672(r9)
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
ffc0def8: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0defc: ff 9f 00 00 fcmpu cr7,f31,f0
ffc0df00: 41 be 00 2c beq+ cr7,ffc0df2c <rtems_string_to_float+0xb4><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
ffc0df04: 3d 20 ff c2 lis r9,-62
ffc0df08: c0 09 02 98 lfs f0,664(r9)
ffc0df0c: ff 9f 00 00 fcmpu cr7,f31,f0
ffc0df10: 41 bd 00 1c bgt+ cr7,ffc0df2c <rtems_string_to_float+0xb4><== ALWAYS TAKEN
ffc0df14: 3d 20 ff c2 lis r9,-62 <== NOT EXECUTED
ffc0df18: c0 09 02 9c lfs f0,668(r9) <== NOT EXECUTED
ffc0df1c: ff 9f 00 00 fcmpu cr7,f31,f0 <== NOT EXECUTED
ffc0df20: 41 bc 00 0c blt+ cr7,ffc0df2c <rtems_string_to_float+0xb4><== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
*n = result;
ffc0df24: d3 fe 00 00 stfs f31,0(r30)
return RTEMS_SUCCESSFUL;
ffc0df28: 38 60 00 00 li r3,0
}
ffc0df2c: 80 01 00 34 lwz r0,52(r1)
ffc0df30: bb a1 00 1c lmw r29,28(r1)
ffc0df34: 7c 08 03 a6 mtlr r0
ffc0df38: cb e1 00 28 lfd f31,40(r1)
ffc0df3c: 38 21 00 30 addi r1,r1,48
ffc0df40: 4e 80 00 20 blr
ffc0df44 <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
ffc0df44: 94 21 ff d8 stwu r1,-40(r1)
ffc0df48: 7c 08 02 a6 mflr r0
ffc0df4c: bf 81 00 18 stmw r28,24(r1)
long result;
char *end;
if ( !n )
ffc0df50: 7c 9d 23 79 mr. r29,r4
const char *s,
int *n,
char **endptr,
int base
)
{
ffc0df54: 7c 7f 1b 78 mr r31,r3
ffc0df58: 90 01 00 2c stw r0,44(r1)
ffc0df5c: 7c be 2b 78 mr r30,r5
ffc0df60: 7c dc 33 78 mr r28,r6
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc0df64: 38 00 00 09 li r0,9
)
{
long result;
char *end;
if ( !n )
ffc0df68: 41 82 00 80 beq- ffc0dfe8 <rtems_string_to_int+0xa4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0df6c: 48 00 24 e9 bl ffc10454 <__errno>
ffc0df70: 38 00 00 00 li r0,0
ffc0df74: 90 03 00 00 stw r0,0(r3)
*n = 0;
result = strtol( s, &end, base );
ffc0df78: 7f 85 e3 78 mr r5,r28
ffc0df7c: 7f e3 fb 78 mr r3,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0df80: 90 1d 00 00 stw r0,0(r29)
result = strtol( s, &end, base );
ffc0df84: 38 81 00 08 addi r4,r1,8
ffc0df88: 48 00 54 95 bl ffc1341c <strtol>
if ( endptr )
ffc0df8c: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
ffc0df90: 7c 7c 1b 78 mr r28,r3
ffc0df94: 81 21 00 08 lwz r9,8(r1)
if ( endptr )
ffc0df98: 41 9e 00 08 beq- cr7,ffc0dfa0 <rtems_string_to_int+0x5c>
*endptr = end;
ffc0df9c: 91 3e 00 00 stw r9,0(r30)
if ( end == s )
ffc0dfa0: 7f 89 f8 00 cmpw cr7,r9,r31
return RTEMS_NOT_DEFINED;
ffc0dfa4: 38 00 00 0b li r0,11
result = strtol( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc0dfa8: 41 9e 00 40 beq- cr7,ffc0dfe8 <rtems_string_to_int+0xa4>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0dfac: 48 00 24 a9 bl ffc10454 <__errno>
ffc0dfb0: 80 03 00 00 lwz r0,0(r3)
ffc0dfb4: 2f 80 00 22 cmpwi cr7,r0,34
ffc0dfb8: 40 be 00 28 bne+ cr7,ffc0dfe0 <rtems_string_to_int+0x9c>
ffc0dfbc: 2f 9c 00 00 cmpwi cr7,r28,0
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
ffc0dfc0: 38 00 00 0a li r0,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0dfc4: 41 be 00 24 beq+ cr7,ffc0dfe8 <rtems_string_to_int+0xa4><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
ffc0dfc8: 6f 89 80 00 xoris r9,r28,32768
ffc0dfcc: 2f 89 ff ff cmpwi cr7,r9,-1
ffc0dfd0: 41 9e 00 18 beq- cr7,ffc0dfe8 <rtems_string_to_int+0xa4><== ALWAYS TAKEN
ffc0dfd4: 3d 20 80 00 lis r9,-32768 <== NOT EXECUTED
ffc0dfd8: 7f 9c 48 00 cmpw cr7,r28,r9 <== NOT EXECUTED
ffc0dfdc: 41 9e 00 0c beq- cr7,ffc0dfe8 <rtems_string_to_int+0xa4><== NOT EXECUTED
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
ffc0dfe0: 93 9d 00 00 stw r28,0(r29)
return RTEMS_SUCCESSFUL;
ffc0dfe4: 38 00 00 00 li r0,0
}
ffc0dfe8: 39 61 00 28 addi r11,r1,40
ffc0dfec: 7c 03 03 78 mr r3,r0
ffc0dff0: 4b ff 4e 20 b ffc02e10 <_restgpr_28_x>
ffc0e0c8 <rtems_string_to_long>:
const char *s,
long *n,
char **endptr,
int base
)
{
ffc0e0c8: 94 21 ff d8 stwu r1,-40(r1)
ffc0e0cc: 7c 08 02 a6 mflr r0
ffc0e0d0: bf 81 00 18 stmw r28,24(r1)
long result;
char *end;
if ( !n )
ffc0e0d4: 7c 9d 23 79 mr. r29,r4
const char *s,
long *n,
char **endptr,
int base
)
{
ffc0e0d8: 7c 7f 1b 78 mr r31,r3
ffc0e0dc: 90 01 00 2c stw r0,44(r1)
ffc0e0e0: 7c be 2b 78 mr r30,r5
ffc0e0e4: 7c dc 33 78 mr r28,r6
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc0e0e8: 38 00 00 09 li r0,9
)
{
long result;
char *end;
if ( !n )
ffc0e0ec: 41 82 00 80 beq- ffc0e16c <rtems_string_to_long+0xa4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0e0f0: 48 00 23 65 bl ffc10454 <__errno>
ffc0e0f4: 38 00 00 00 li r0,0
ffc0e0f8: 90 03 00 00 stw r0,0(r3)
*n = 0;
result = strtol( s, &end, base );
ffc0e0fc: 7f 85 e3 78 mr r5,r28
ffc0e100: 7f e3 fb 78 mr r3,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0e104: 90 1d 00 00 stw r0,0(r29)
result = strtol( s, &end, base );
ffc0e108: 38 81 00 08 addi r4,r1,8
ffc0e10c: 48 00 53 11 bl ffc1341c <strtol>
if ( endptr )
ffc0e110: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
ffc0e114: 7c 7c 1b 78 mr r28,r3
ffc0e118: 81 21 00 08 lwz r9,8(r1)
if ( endptr )
ffc0e11c: 41 9e 00 08 beq- cr7,ffc0e124 <rtems_string_to_long+0x5c>
*endptr = end;
ffc0e120: 91 3e 00 00 stw r9,0(r30)
if ( end == s )
ffc0e124: 7f 89 f8 00 cmpw cr7,r9,r31
return RTEMS_NOT_DEFINED;
ffc0e128: 38 00 00 0b li r0,11
result = strtol( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc0e12c: 41 9e 00 40 beq- cr7,ffc0e16c <rtems_string_to_long+0xa4>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e130: 48 00 23 25 bl ffc10454 <__errno>
ffc0e134: 80 03 00 00 lwz r0,0(r3)
ffc0e138: 2f 80 00 22 cmpwi cr7,r0,34
ffc0e13c: 40 be 00 28 bne+ cr7,ffc0e164 <rtems_string_to_long+0x9c>
ffc0e140: 2f 9c 00 00 cmpwi cr7,r28,0
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
ffc0e144: 38 00 00 0a li r0,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e148: 41 be 00 24 beq+ cr7,ffc0e16c <rtems_string_to_long+0xa4><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
ffc0e14c: 6f 89 80 00 xoris r9,r28,32768
ffc0e150: 2f 89 ff ff cmpwi cr7,r9,-1
ffc0e154: 41 9e 00 18 beq- cr7,ffc0e16c <rtems_string_to_long+0xa4>
ffc0e158: 3d 20 80 00 lis r9,-32768
ffc0e15c: 7f 9c 48 00 cmpw cr7,r28,r9
ffc0e160: 41 9e 00 0c beq- cr7,ffc0e16c <rtems_string_to_long+0xa4><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
ffc0e164: 93 9d 00 00 stw r28,0(r29)
return RTEMS_SUCCESSFUL;
ffc0e168: 38 00 00 00 li r0,0
}
ffc0e16c: 39 61 00 28 addi r11,r1,40
ffc0e170: 7c 03 03 78 mr r3,r0
ffc0e174: 4b ff 4c 9c b ffc02e10 <_restgpr_28_x>
ffc0dff4 <rtems_string_to_long_long>:
const char *s,
long long *n,
char **endptr,
int base
)
{
ffc0dff4: 94 21 ff d0 stwu r1,-48(r1)
ffc0dff8: 7c 08 02 a6 mflr r0
ffc0dffc: bf 61 00 1c stmw r27,28(r1)
long long result;
char *end;
if ( !n )
ffc0e000: 7c 9d 23 79 mr. r29,r4
const char *s,
long long *n,
char **endptr,
int base
)
{
ffc0e004: 7c 7f 1b 78 mr r31,r3
ffc0e008: 90 01 00 34 stw r0,52(r1)
ffc0e00c: 7c be 2b 78 mr r30,r5
ffc0e010: 7c dc 33 78 mr r28,r6
long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc0e014: 38 60 00 09 li r3,9
)
{
long long result;
char *end;
if ( !n )
ffc0e018: 41 82 00 a8 beq- ffc0e0c0 <rtems_string_to_long_long+0xcc>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0e01c: 48 00 24 39 bl ffc10454 <__errno>
ffc0e020: 38 00 00 00 li r0,0
*n = 0;
ffc0e024: 39 40 00 00 li r10,0
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0e028: 90 03 00 00 stw r0,0(r3)
*n = 0;
ffc0e02c: 39 60 00 00 li r11,0
ffc0e030: 91 5d 00 00 stw r10,0(r29)
result = strtoll( s, &end, base );
ffc0e034: 7f 85 e3 78 mr r5,r28
ffc0e038: 7f e3 fb 78 mr r3,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0e03c: 91 7d 00 04 stw r11,4(r29)
result = strtoll( s, &end, base );
ffc0e040: 38 81 00 08 addi r4,r1,8
ffc0e044: 48 00 53 f9 bl ffc1343c <strtoll>
if ( endptr )
ffc0e048: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoll( s, &end, base );
ffc0e04c: 7c 7c 1b 78 mr r28,r3
ffc0e050: 80 01 00 08 lwz r0,8(r1)
ffc0e054: 7c 9b 23 78 mr r27,r4
if ( endptr )
ffc0e058: 41 9e 00 08 beq- cr7,ffc0e060 <rtems_string_to_long_long+0x6c>
*endptr = end;
ffc0e05c: 90 1e 00 00 stw r0,0(r30)
if ( end == s )
ffc0e060: 7f 80 f8 00 cmpw cr7,r0,r31
return RTEMS_NOT_DEFINED;
ffc0e064: 38 60 00 0b li r3,11
result = strtoll( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc0e068: 41 9e 00 58 beq- cr7,ffc0e0c0 <rtems_string_to_long_long+0xcc>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e06c: 48 00 23 e9 bl ffc10454 <__errno>
ffc0e070: 80 03 00 00 lwz r0,0(r3)
ffc0e074: 2f 80 00 22 cmpwi cr7,r0,34
ffc0e078: 40 be 00 3c bne+ cr7,ffc0e0b4 <rtems_string_to_long_long+0xc0>
ffc0e07c: 7f 80 db 79 or. r0,r28,r27
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
ffc0e080: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e084: 41 a2 00 3c beq+ ffc0e0c0 <rtems_string_to_long_long+0xcc><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
ffc0e088: 6f 80 80 00 xoris r0,r28,32768
ffc0e08c: 2f 80 ff ff cmpwi cr7,r0,-1
ffc0e090: 40 9e 00 0c bne- cr7,ffc0e09c <rtems_string_to_long_long+0xa8>
ffc0e094: 2f 9b ff ff cmpwi cr7,r27,-1
ffc0e098: 41 9e 00 28 beq- cr7,ffc0e0c0 <rtems_string_to_long_long+0xcc><== ALWAYS TAKEN
ffc0e09c: 3c 00 80 00 lis r0,-32768
ffc0e0a0: 7f 9c 00 00 cmpw cr7,r28,r0
ffc0e0a4: 40 be 00 10 bne+ cr7,ffc0e0b4 <rtems_string_to_long_long+0xc0><== NEVER TAKEN
ffc0e0a8: 2f 9b 00 00 cmpwi cr7,r27,0
return RTEMS_INVALID_NUMBER;
ffc0e0ac: 38 60 00 0a li r3,10
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
ffc0e0b0: 41 9e 00 10 beq- cr7,ffc0e0c0 <rtems_string_to_long_long+0xcc><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
ffc0e0b4: 93 9d 00 00 stw r28,0(r29)
return RTEMS_SUCCESSFUL;
ffc0e0b8: 38 60 00 00 li r3,0
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
ffc0e0bc: 93 7d 00 04 stw r27,4(r29)
return RTEMS_SUCCESSFUL;
}
ffc0e0c0: 39 61 00 30 addi r11,r1,48
ffc0e0c4: 4b ff 4d 48 b ffc02e0c <_restgpr_27_x>
ffc0e19c <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
ffc0e19c: 94 21 ff d8 stwu r1,-40(r1)
ffc0e1a0: 7c 08 02 a6 mflr r0
ffc0e1a4: bf 81 00 18 stmw r28,24(r1)
unsigned long result;
char *end;
if ( !n )
ffc0e1a8: 7c 9d 23 79 mr. r29,r4
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
ffc0e1ac: 7c 7f 1b 78 mr r31,r3
ffc0e1b0: 90 01 00 2c stw r0,44(r1)
ffc0e1b4: 7c be 2b 78 mr r30,r5
ffc0e1b8: 7c dc 33 78 mr r28,r6
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc0e1bc: 38 00 00 09 li r0,9
)
{
unsigned long result;
char *end;
if ( !n )
ffc0e1c0: 41 82 00 8c beq- ffc0e24c <rtems_string_to_unsigned_char+0xb0>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0e1c4: 48 00 22 91 bl ffc10454 <__errno>
ffc0e1c8: 38 00 00 00 li r0,0
ffc0e1cc: 90 03 00 00 stw r0,0(r3)
*n = 0;
result = strtoul( s, &end, base );
ffc0e1d0: 7f 85 e3 78 mr r5,r28
ffc0e1d4: 7f e3 fb 78 mr r3,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0e1d8: 98 1d 00 00 stb r0,0(r29)
result = strtoul( s, &end, base );
ffc0e1dc: 38 81 00 08 addi r4,r1,8
ffc0e1e0: 48 00 57 c9 bl ffc139a8 <strtoul>
if ( endptr )
ffc0e1e4: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
ffc0e1e8: 7c 7c 1b 78 mr r28,r3
ffc0e1ec: 81 21 00 08 lwz r9,8(r1)
if ( endptr )
ffc0e1f0: 41 9e 00 08 beq- cr7,ffc0e1f8 <rtems_string_to_unsigned_char+0x5c>
*endptr = end;
ffc0e1f4: 91 3e 00 00 stw r9,0(r30)
if ( end == s )
ffc0e1f8: 7f 89 f8 00 cmpw cr7,r9,r31
return RTEMS_NOT_DEFINED;
ffc0e1fc: 38 00 00 0b li r0,11
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc0e200: 41 9e 00 4c beq- cr7,ffc0e24c <rtems_string_to_unsigned_char+0xb0>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e204: 48 00 22 51 bl ffc10454 <__errno>
ffc0e208: 80 03 00 00 lwz r0,0(r3)
ffc0e20c: 2f 80 00 22 cmpwi cr7,r0,34
ffc0e210: 40 be 00 18 bne+ cr7,ffc0e228 <rtems_string_to_unsigned_char+0x8c><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
ffc0e214: 39 7c ff ff addi r11,r28,-1 <== NOT EXECUTED
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e218: 39 20 ff fd li r9,-3 <== NOT EXECUTED
ffc0e21c: 7f 8b 48 40 cmplw cr7,r11,r9 <== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
ffc0e220: 38 00 00 0a li r0,10 <== NOT EXECUTED
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e224: 41 bd 00 28 bgt+ cr7,ffc0e24c <rtems_string_to_unsigned_char+0xb0><== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
ffc0e228: 2b 9c 00 ff cmplwi cr7,r28,255
ffc0e22c: 40 9d 00 18 ble- cr7,ffc0e244 <rtems_string_to_unsigned_char+0xa8><== ALWAYS TAKEN
errno = ERANGE;
ffc0e230: 48 00 22 25 bl ffc10454 <__errno> <== NOT EXECUTED
ffc0e234: 38 00 00 22 li r0,34 <== NOT EXECUTED
ffc0e238: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
ffc0e23c: 38 00 00 0a li r0,10 <== NOT EXECUTED
ffc0e240: 48 00 00 0c b ffc0e24c <rtems_string_to_unsigned_char+0xb0><== NOT EXECUTED
}
#endif
*n = result;
ffc0e244: 9b 9d 00 00 stb r28,0(r29)
return RTEMS_SUCCESSFUL;
ffc0e248: 38 00 00 00 li r0,0
}
ffc0e24c: 39 61 00 28 addi r11,r1,40
ffc0e250: 7c 03 03 78 mr r3,r0
ffc0e254: 4b ff 4b bc b ffc02e10 <_restgpr_28_x>
ffc0e258 <rtems_string_to_unsigned_int>:
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
ffc0e258: 94 21 ff d8 stwu r1,-40(r1)
ffc0e25c: 7c 08 02 a6 mflr r0
ffc0e260: bf 81 00 18 stmw r28,24(r1)
unsigned long result;
char *end;
if ( !n )
ffc0e264: 7c 9d 23 79 mr. r29,r4
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
ffc0e268: 7c 7f 1b 78 mr r31,r3
ffc0e26c: 90 01 00 2c stw r0,44(r1)
ffc0e270: 7c be 2b 78 mr r30,r5
ffc0e274: 7c dc 33 78 mr r28,r6
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc0e278: 38 00 00 09 li r0,9
)
{
unsigned long result;
char *end;
if ( !n )
ffc0e27c: 41 82 00 70 beq- ffc0e2ec <rtems_string_to_unsigned_int+0x94>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0e280: 48 00 21 d5 bl ffc10454 <__errno>
ffc0e284: 38 00 00 00 li r0,0
ffc0e288: 90 03 00 00 stw r0,0(r3)
*n = 0;
result = strtoul( s, &end, base );
ffc0e28c: 7f 85 e3 78 mr r5,r28
ffc0e290: 7f e3 fb 78 mr r3,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0e294: 90 1d 00 00 stw r0,0(r29)
result = strtoul( s, &end, base );
ffc0e298: 38 81 00 08 addi r4,r1,8
ffc0e29c: 48 00 57 0d bl ffc139a8 <strtoul>
if ( endptr )
ffc0e2a0: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
ffc0e2a4: 7c 7c 1b 78 mr r28,r3
ffc0e2a8: 81 21 00 08 lwz r9,8(r1)
if ( endptr )
ffc0e2ac: 41 9e 00 08 beq- cr7,ffc0e2b4 <rtems_string_to_unsigned_int+0x5c>
*endptr = end;
ffc0e2b0: 91 3e 00 00 stw r9,0(r30)
if ( end == s )
ffc0e2b4: 7f 89 f8 00 cmpw cr7,r9,r31
return RTEMS_NOT_DEFINED;
ffc0e2b8: 38 00 00 0b li r0,11
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc0e2bc: 41 9e 00 30 beq- cr7,ffc0e2ec <rtems_string_to_unsigned_int+0x94>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e2c0: 48 00 21 95 bl ffc10454 <__errno>
ffc0e2c4: 80 03 00 00 lwz r0,0(r3)
ffc0e2c8: 2f 80 00 22 cmpwi cr7,r0,34
ffc0e2cc: 40 be 00 18 bne+ cr7,ffc0e2e4 <rtems_string_to_unsigned_int+0x8c>
(( result == 0 ) || ( result == ULONG_MAX )))
ffc0e2d0: 39 7c ff ff addi r11,r28,-1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e2d4: 39 20 ff fd li r9,-3
ffc0e2d8: 7f 8b 48 40 cmplw cr7,r11,r9
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
ffc0e2dc: 38 00 00 0a li r0,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e2e0: 41 bd 00 0c bgt+ cr7,ffc0e2ec <rtems_string_to_unsigned_int+0x94><== ALWAYS TAKEN
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
ffc0e2e4: 93 9d 00 00 stw r28,0(r29)
return RTEMS_SUCCESSFUL;
ffc0e2e8: 38 00 00 00 li r0,0
}
ffc0e2ec: 39 61 00 28 addi r11,r1,40
ffc0e2f0: 7c 03 03 78 mr r3,r0
ffc0e2f4: 4b ff 4b 1c b ffc02e10 <_restgpr_28_x>
ffc0e3b4 <rtems_string_to_unsigned_long>:
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
ffc0e3b4: 94 21 ff d8 stwu r1,-40(r1)
ffc0e3b8: 7c 08 02 a6 mflr r0
ffc0e3bc: bf 81 00 18 stmw r28,24(r1)
unsigned long result;
char *end;
if ( !n )
ffc0e3c0: 7c 9d 23 79 mr. r29,r4
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
ffc0e3c4: 7c 7f 1b 78 mr r31,r3
ffc0e3c8: 90 01 00 2c stw r0,44(r1)
ffc0e3cc: 7c be 2b 78 mr r30,r5
ffc0e3d0: 7c dc 33 78 mr r28,r6
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc0e3d4: 38 00 00 09 li r0,9
)
{
unsigned long result;
char *end;
if ( !n )
ffc0e3d8: 41 82 00 70 beq- ffc0e448 <rtems_string_to_unsigned_long+0x94>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0e3dc: 48 00 20 79 bl ffc10454 <__errno>
ffc0e3e0: 38 00 00 00 li r0,0
ffc0e3e4: 90 03 00 00 stw r0,0(r3)
*n = 0;
result = strtoul( s, &end, base );
ffc0e3e8: 7f 85 e3 78 mr r5,r28
ffc0e3ec: 7f e3 fb 78 mr r3,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0e3f0: 90 1d 00 00 stw r0,0(r29)
result = strtoul( s, &end, base );
ffc0e3f4: 38 81 00 08 addi r4,r1,8
ffc0e3f8: 48 00 55 b1 bl ffc139a8 <strtoul>
if ( endptr )
ffc0e3fc: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
ffc0e400: 7c 7c 1b 78 mr r28,r3
ffc0e404: 81 21 00 08 lwz r9,8(r1)
if ( endptr )
ffc0e408: 41 9e 00 08 beq- cr7,ffc0e410 <rtems_string_to_unsigned_long+0x5c>
*endptr = end;
ffc0e40c: 91 3e 00 00 stw r9,0(r30)
if ( end == s )
ffc0e410: 7f 89 f8 00 cmpw cr7,r9,r31
return RTEMS_NOT_DEFINED;
ffc0e414: 38 00 00 0b li r0,11
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc0e418: 41 9e 00 30 beq- cr7,ffc0e448 <rtems_string_to_unsigned_long+0x94>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e41c: 48 00 20 39 bl ffc10454 <__errno>
ffc0e420: 80 03 00 00 lwz r0,0(r3)
ffc0e424: 2f 80 00 22 cmpwi cr7,r0,34
ffc0e428: 40 be 00 18 bne+ cr7,ffc0e440 <rtems_string_to_unsigned_long+0x8c>
(( result == 0 ) || ( result == ULONG_MAX )))
ffc0e42c: 39 7c ff ff addi r11,r28,-1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e430: 39 20 ff fd li r9,-3
ffc0e434: 7f 8b 48 40 cmplw cr7,r11,r9
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
ffc0e438: 38 00 00 0a li r0,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e43c: 41 bd 00 0c bgt+ cr7,ffc0e448 <rtems_string_to_unsigned_long+0x94><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
ffc0e440: 93 9d 00 00 stw r28,0(r29)
return RTEMS_SUCCESSFUL;
ffc0e444: 38 00 00 00 li r0,0
}
ffc0e448: 39 61 00 28 addi r11,r1,40
ffc0e44c: 7c 03 03 78 mr r3,r0
ffc0e450: 4b ff 49 c0 b ffc02e10 <_restgpr_28_x>
ffc0e2f8 <rtems_string_to_unsigned_long_long>:
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
ffc0e2f8: 94 21 ff d0 stwu r1,-48(r1)
ffc0e2fc: 7c 08 02 a6 mflr r0
ffc0e300: bf 41 00 18 stmw r26,24(r1)
unsigned long long result;
char *end;
if ( !n )
ffc0e304: 7c 9d 23 79 mr. r29,r4
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
ffc0e308: 7c 7f 1b 78 mr r31,r3
ffc0e30c: 90 01 00 34 stw r0,52(r1)
ffc0e310: 7c be 2b 78 mr r30,r5
ffc0e314: 7c da 33 78 mr r26,r6
unsigned long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc0e318: 38 60 00 09 li r3,9
)
{
unsigned long long result;
char *end;
if ( !n )
ffc0e31c: 41 82 00 90 beq- ffc0e3ac <rtems_string_to_unsigned_long_long+0xb4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0e320: 48 00 21 35 bl ffc10454 <__errno>
ffc0e324: 38 00 00 00 li r0,0
*n = 0;
ffc0e328: 39 40 00 00 li r10,0
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc0e32c: 90 03 00 00 stw r0,0(r3)
*n = 0;
ffc0e330: 39 60 00 00 li r11,0
ffc0e334: 91 5d 00 00 stw r10,0(r29)
result = strtoull( s, &end, base );
ffc0e338: 7f 45 d3 78 mr r5,r26
ffc0e33c: 7f e3 fb 78 mr r3,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc0e340: 91 7d 00 04 stw r11,4(r29)
result = strtoull( s, &end, base );
ffc0e344: 38 81 00 08 addi r4,r1,8
ffc0e348: 48 00 56 81 bl ffc139c8 <strtoull>
if ( endptr )
ffc0e34c: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoull( s, &end, base );
ffc0e350: 7c 9b 23 78 mr r27,r4
ffc0e354: 80 01 00 08 lwz r0,8(r1)
ffc0e358: 7c 7a 1b 78 mr r26,r3
if ( endptr )
ffc0e35c: 41 9e 00 08 beq- cr7,ffc0e364 <rtems_string_to_unsigned_long_long+0x6c>
*endptr = end;
ffc0e360: 90 1e 00 00 stw r0,0(r30)
if ( end == s )
ffc0e364: 7f 80 f8 00 cmpw cr7,r0,r31
return RTEMS_NOT_DEFINED;
ffc0e368: 38 60 00 0b li r3,11
result = strtoull( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc0e36c: 41 9e 00 40 beq- cr7,ffc0e3ac <rtems_string_to_unsigned_long_long+0xb4>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e370: 48 00 20 e5 bl ffc10454 <__errno>
ffc0e374: 80 03 00 00 lwz r0,0(r3)
ffc0e378: 2f 80 00 22 cmpwi cr7,r0,34
ffc0e37c: 40 be 00 24 bne+ cr7,ffc0e3a0 <rtems_string_to_unsigned_long_long+0xa8>
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
ffc0e380: 31 7b ff ff addic r11,r27,-1
ffc0e384: 7d 5a 01 d4 addme r10,r26
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e388: 2f 8a ff ff cmpwi cr7,r10,-1
ffc0e38c: 40 9e 00 14 bne- cr7,ffc0e3a0 <rtems_string_to_unsigned_long_long+0xa8><== NEVER TAKEN
ffc0e390: 38 00 ff fd li r0,-3
ffc0e394: 7f 8b 00 40 cmplw cr7,r11,r0
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
ffc0e398: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc0e39c: 41 bd 00 10 bgt+ cr7,ffc0e3ac <rtems_string_to_unsigned_long_long+0xb4><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
ffc0e3a0: 93 5d 00 00 stw r26,0(r29)
return RTEMS_SUCCESSFUL;
ffc0e3a4: 38 60 00 00 li r3,0
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
ffc0e3a8: 93 7d 00 04 stw r27,4(r29)
return RTEMS_SUCCESSFUL;
}
ffc0e3ac: 39 61 00 30 addi r11,r1,48
ffc0e3b0: 4b ff 4a 58 b ffc02e08 <_restgpr_26_x>
ffc03d24 <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
ffc03d24: 94 21 fe 30 stwu r1,-464(r1)
ffc03d28: 7c 08 02 a6 mflr r0
ffc03d2c: be 61 01 9c stmw r19,412(r1)
ffc03d30: 7c 7c 1b 78 mr r28,r3
ffc03d34: 7c 9b 23 78 mr r27,r4
ffc03d38: 90 01 01 d4 stw r0,468(r1)
ffc03d3c: 7c b7 2b 78 mr r23,r5
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
ffc03d40: 48 01 06 6d bl ffc143ac <strlen>
ffc03d44: 38 a0 00 00 li r5,0
ffc03d48: 7c 64 1b 78 mr r4,r3
ffc03d4c: 38 c1 00 20 addi r6,r1,32
ffc03d50: 7f 83 e3 78 mr r3,r28
ffc03d54: 38 e0 00 00 li r7,0
ffc03d58: 48 00 0c 39 bl ffc04990 <rtems_filesystem_evaluate_path>
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
ffc03d5c: 7c 7e 1b 79 mr. r30,r3
ffc03d60: 40 82 01 8c bne- ffc03eec <rtems_tarfs_load+0x1c8>
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
ffc03d64: 80 01 00 2c lwz r0,44(r1)
ffc03d68: 3d 20 ff c2 lis r9,-62
ffc03d6c: 39 29 0a 70 addi r9,r9,2672
ffc03d70: 7f 80 48 00 cmpw cr7,r0,r9
ffc03d74: 41 9e 00 20 beq- cr7,ffc03d94 <rtems_tarfs_load+0x70>
ffc03d78: 3d 20 ff c2 lis r9,-62
ffc03d7c: 39 29 11 84 addi r9,r9,4484
ffc03d80: 7f 80 48 00 cmpw cr7,r0,r9
ffc03d84: 41 be 00 10 beq+ cr7,ffc03d94 <rtems_tarfs_load+0x70> <== NEVER TAKEN
ffc03d88: 48 00 01 64 b ffc03eec <rtems_tarfs_load+0x1c8>
ffc03d8c: 7f f5 fb 78 mr r21,r31
ffc03d90: 48 00 00 1c b ffc03dac <rtems_tarfs_load+0x88>
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
ffc03d94: 3f 00 ff c2 lis r24,-62
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
if (full_filename[strlen(full_filename)-1] != '/')
strcat(full_filename, "/");
ffc03d98: 3f 20 ff c2 lis r25,-62
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
ffc03d9c: 3a a0 00 00 li r21,0
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
ffc03da0: 3b 18 0a b8 addi r24,r24,2744
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
ffc03da4: 3b a1 00 0c addi r29,r1,12
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
if (full_filename[strlen(full_filename)-1] != '/')
strcat(full_filename, "/");
ffc03da8: 3b 39 d6 51 addi r25,r25,-10671
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
ffc03dac: 3b f5 02 00 addi r31,r21,512
ffc03db0: 7f 9f b8 40 cmplw cr7,r31,r23
ffc03db4: 41 9d 01 3c bgt- cr7,ffc03ef0 <rtems_tarfs_load+0x1cc> <== NEVER TAKEN
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
ffc03db8: 7e bb aa 14 add r21,r27,r21
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
ffc03dbc: 38 75 01 01 addi r3,r21,257
ffc03dc0: 7f 04 c3 78 mr r4,r24
ffc03dc4: 38 a0 00 05 li r5,5
ffc03dc8: 48 01 06 a1 bl ffc14468 <strncmp>
ffc03dcc: 7c 7a 1b 79 mr. r26,r3
ffc03dd0: 40 82 01 20 bne- ffc03ef0 <rtems_tarfs_load+0x1cc>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
ffc03dd4: 38 a0 00 63 li r5,99
ffc03dd8: 7e a4 ab 78 mr r4,r21
ffc03ddc: 38 61 00 34 addi r3,r1,52
ffc03de0: 48 01 07 d1 bl ffc145b0 <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
ffc03de4: 38 80 00 08 li r4,8
ffc03de8: 38 75 00 64 addi r3,r21,100
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
ffc03dec: 9b 41 00 97 stb r26,151(r1)
linkflag = hdr_ptr[156];
ffc03df0: 8a 95 00 9c lbz r20,156(r21)
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
ffc03df4: 48 00 82 ed bl ffc0c0e0 <_rtems_octal2ulong>
ffc03df8: 7c 76 1b 78 mr r22,r3
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
ffc03dfc: 38 80 00 0c li r4,12
ffc03e00: 38 75 00 7c addi r3,r21,124
ffc03e04: 48 00 82 dd bl ffc0c0e0 <_rtems_octal2ulong>
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
ffc03e08: 38 80 00 08 li r4,8
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
ffc03e0c: 7c 7a 1b 78 mr r26,r3
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
ffc03e10: 38 75 00 94 addi r3,r21,148
ffc03e14: 48 00 82 cd bl ffc0c0e0 <_rtems_octal2ulong>
ffc03e18: 7c 73 1b 78 mr r19,r3
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
ffc03e1c: 7e a3 ab 78 mr r3,r21
ffc03e20: 48 00 83 05 bl ffc0c124 <_rtems_tar_header_checksum>
ffc03e24: 7f 83 98 00 cmpw cr7,r3,r19
ffc03e28: 40 9e 00 c8 bne- cr7,ffc03ef0 <rtems_tarfs_load+0x1cc> <== NEVER TAKEN
* Generate an IMFS node depending on the file type.
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
ffc03e2c: 2f 94 00 35 cmpwi cr7,r20,53
ffc03e30: 40 be 00 54 bne+ cr7,ffc03e84 <rtems_tarfs_load+0x160>
strcpy(full_filename, mountpoint);
ffc03e34: 7f 84 e3 78 mr r4,r28
ffc03e38: 38 61 00 98 addi r3,r1,152
ffc03e3c: 48 01 00 5d bl ffc13e98 <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
ffc03e40: 38 61 00 98 addi r3,r1,152
ffc03e44: 48 01 05 69 bl ffc143ac <strlen>
ffc03e48: 38 01 00 08 addi r0,r1,8
ffc03e4c: 7c 60 1a 14 add r3,r0,r3
ffc03e50: 88 03 00 8f lbz r0,143(r3)
ffc03e54: 2f 80 00 2f cmpwi cr7,r0,47
ffc03e58: 41 9e 00 10 beq- cr7,ffc03e68 <rtems_tarfs_load+0x144> <== ALWAYS TAKEN
strcat(full_filename, "/");
ffc03e5c: 38 61 00 98 addi r3,r1,152 <== NOT EXECUTED
ffc03e60: 7f 24 cb 78 mr r4,r25 <== NOT EXECUTED
ffc03e64: 48 00 fe d5 bl ffc13d38 <strcat> <== NOT EXECUTED
strcat(full_filename, filename);
ffc03e68: 38 81 00 34 addi r4,r1,52
ffc03e6c: 38 61 00 98 addi r3,r1,152
ffc03e70: 48 00 fe c9 bl ffc13d38 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
ffc03e74: 38 61 00 98 addi r3,r1,152
ffc03e78: 38 80 01 ff li r4,511
ffc03e7c: 48 00 14 9d bl ffc05318 <mkdir>
ffc03e80: 4b ff ff 0c b ffc03d8c <rtems_tarfs_load+0x68>
* IMFS_create_node 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.
*/
else if (linkflag == REGTYPE) {
ffc03e84: 2f 94 00 30 cmpwi cr7,r20,48
ffc03e88: 40 9e ff 04 bne+ cr7,ffc03d8c <rtems_tarfs_load+0x68>
const char *name;
loc = root_loc;
ffc03e8c: 39 61 00 20 addi r11,r1,32
ffc03e90: 7c ab a4 aa lswi r5,r11,20
ffc03e94: 7c bd a5 aa stswi r5,r29,20
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
ffc03e98: 38 61 00 34 addi r3,r1,52
ffc03e9c: 7f a4 eb 78 mr r4,r29
ffc03ea0: 38 a1 00 08 addi r5,r1,8
ffc03ea4: 48 00 8f d1 bl ffc0ce74 <IMFS_evaluate_for_make>
ffc03ea8: 7c 75 1b 79 mr. r21,r3
ffc03eac: 40 a2 00 30 bne+ ffc03edc <rtems_tarfs_load+0x1b8> <== NEVER TAKEN
node = IMFS_create_node(
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
ffc03eb0: 56 c6 05 fe clrlwi r6,r22,23
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
ffc03eb4: 80 a1 00 08 lwz r5,8(r1)
ffc03eb8: 7f a3 eb 78 mr r3,r29
ffc03ebc: 38 80 00 06 li r4,6
ffc03ec0: 60 c6 80 00 ori r6,r6,32768
ffc03ec4: 38 e0 00 00 li r7,0
ffc03ec8: 48 00 88 65 bl ffc0c72c <IMFS_create_node>
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
ffc03ecc: 7c 1b fa 14 add r0,r27,r31
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
ffc03ed0: 93 43 00 54 stw r26,84(r3)
ffc03ed4: 92 a3 00 50 stw r21,80(r3)
node->info.linearfile.direct = &tar_image[offset];
ffc03ed8: 90 03 00 58 stw r0,88(r3)
}
nblocks = (((file_size) + 511) & ~511) / 512;
ffc03edc: 3b 5a 01 ff addi r26,r26,511
offset += 512 * nblocks;
ffc03ee0: 57 5a 00 2c rlwinm r26,r26,0,0,22
ffc03ee4: 7f fa fa 14 add r31,r26,r31
ffc03ee8: 4b ff fe a4 b ffc03d8c <rtems_tarfs_load+0x68>
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
return -1;
ffc03eec: 3b c0 ff ff li r30,-1
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
ffc03ef0: 39 61 01 d0 addi r11,r1,464
ffc03ef4: 7f c3 f3 78 mr r3,r30
ffc03ef8: 4b ff c6 98 b ffc00590 <_restgpr_19_x>
ffc0f660 <rtems_task_mode>:
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
ffc0f660: 2c 05 00 00 cmpwi r5,0
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
ffc0f664: 7c 08 02 a6 mflr r0
ffc0f668: 94 21 ff f8 stwu r1,-8(r1)
ffc0f66c: 90 01 00 0c stw r0,12(r1)
ffc0f670: 7c 60 1b 78 mr r0,r3
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
ffc0f674: 38 60 00 09 li r3,9
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
ffc0f678: 41 82 01 88 beq- ffc0f800 <rtems_task_mode+0x1a0>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
ffc0f67c: 3d 20 00 00 lis r9,0
ffc0f680: 81 69 2d c4 lwz r11,11716(r9)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc0f684: 81 0b 00 7c lwz r8,124(r11)
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
ffc0f688: 89 4b 00 74 lbz r10,116(r11)
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc0f68c: 2f 88 00 00 cmpwi cr7,r8,0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
ffc0f690: 81 2b 01 2c lwz r9,300(r11)
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
ffc0f694: 7d 4a 00 34 cntlzw r10,r10
ffc0f698: 55 4a d9 7e rlwinm r10,r10,27,5,31
ffc0f69c: 55 4a 40 2e rlwinm r10,r10,8,0,23
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc0f6a0: 41 9e 00 08 beq- cr7,ffc0f6a8 <rtems_task_mode+0x48>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
ffc0f6a4: 61 4a 02 00 ori r10,r10,512
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
ffc0f6a8: 89 09 00 08 lbz r8,8(r9)
ffc0f6ac: 7d 08 00 34 cntlzw r8,r8
ffc0f6b0: 55 08 d9 7e rlwinm r8,r8,27,5,31
ffc0f6b4: 55 08 50 2a rlwinm r8,r8,10,0,21
ffc0f6b8: 7d 08 53 78 or r8,r8,r10
#ifndef ASM
static inline uint32_t _CPU_ISR_Get_level( void )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc0f6bc: 39 40 00 00 li r10,0
ffc0f6c0: 7d 40 00 a6 mfmsr r10
if (msr & MSR_EE) return 0;
ffc0f6c4: 71 47 80 00 andi. r7,r10,32768
ffc0f6c8: 7c e0 00 26 mfcr r7
ffc0f6cc: 54 e7 1f fe rlwinm r7,r7,3,31,31
old_mode |= _ISR_Get_level();
ffc0f6d0: 7d 0a 3b 78 or r10,r8,r7
*previous_mode_set = old_mode;
ffc0f6d4: 91 45 00 00 stw r10,0(r5)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc0f6d8: 70 8a 01 00 andi. r10,r4,256
ffc0f6dc: 41 82 00 14 beq- ffc0f6f0 <rtems_task_mode+0x90>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
ffc0f6e0: 70 07 01 00 andi. r7,r0,256
ffc0f6e4: 7d 40 00 26 mfcr r10
ffc0f6e8: 55 4a 1f fe rlwinm r10,r10,3,31,31
ffc0f6ec: 99 4b 00 74 stb r10,116(r11)
if ( mask & RTEMS_TIMESLICE_MASK ) {
ffc0f6f0: 70 8a 02 00 andi. r10,r4,512
ffc0f6f4: 41 82 00 28 beq- ffc0f71c <rtems_task_mode+0xbc>
if ( _Modes_Is_timeslice(mode_set) ) {
ffc0f6f8: 70 0a 02 00 andi. r10,r0,512
ffc0f6fc: 41 82 00 1c beq- ffc0f718 <rtems_task_mode+0xb8>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
ffc0f700: 39 40 00 01 li r10,1
ffc0f704: 91 4b 00 7c stw r10,124(r11)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0f708: 3d 40 00 00 lis r10,0
ffc0f70c: 81 4a 27 c4 lwz r10,10180(r10)
ffc0f710: 91 4b 00 78 stw r10,120(r11)
ffc0f714: 48 00 00 08 b ffc0f71c <rtems_task_mode+0xbc>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
ffc0f718: 91 4b 00 7c stw r10,124(r11)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
ffc0f71c: 70 8b 00 01 andi. r11,r4,1
ffc0f720: 41 82 00 28 beq- ffc0f748 <rtems_task_mode+0xe8>
}
static inline void _CPU_ISR_Set_level( uint32_t level )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc0f724: 39 60 00 00 li r11,0
ffc0f728: 7d 60 00 a6 mfmsr r11
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
__asm__ volatile (
ffc0f72c: 7d 50 42 a6 mfsprg r10,0
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
ffc0f730: 70 07 00 01 andi. r7,r0,1
ffc0f734: 40 82 00 0c bne- ffc0f740 <rtems_task_mode+0xe0>
msr |= ppc_interrupt_get_disable_mask();
ffc0f738: 7d 4b 5b 78 or r11,r10,r11
ffc0f73c: 48 00 00 08 b ffc0f744 <rtems_task_mode+0xe4>
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
ffc0f740: 7d 6b 50 78 andc r11,r11,r10
}
_CPU_MSR_SET(msr);
ffc0f744: 7d 60 01 24 mtmsr r11
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
ffc0f748: 70 8a 04 00 andi. r10,r4,1024
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
ffc0f74c: 39 60 00 00 li r11,0
if ( mask & RTEMS_ASR_MASK ) {
ffc0f750: 41 82 00 58 beq- ffc0f7a8 <rtems_task_mode+0x148>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
ffc0f754: 70 07 04 00 andi. r7,r0,1024
is_asr_enabled = false;
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 ) {
ffc0f758: 89 49 00 08 lbz r10,8(r9)
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
ffc0f75c: 7c 00 00 26 mfcr r0
ffc0f760: 54 00 1f fe rlwinm r0,r0,3,31,31
is_asr_enabled = false;
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 ) {
ffc0f764: 7f 8a 00 00 cmpw cr7,r10,r0
ffc0f768: 41 9e 00 40 beq- cr7,ffc0f7a8 <rtems_task_mode+0x148>
asr->is_enabled = is_asr_enabled;
ffc0f76c: 98 09 00 08 stb r0,8(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0f770: 7c 00 00 a6 mfmsr r0
ffc0f774: 7d 70 42 a6 mfsprg r11,0
ffc0f778: 7c 0b 58 78 andc r11,r0,r11
ffc0f77c: 7d 60 01 24 mtmsr r11
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
ffc0f780: 81 69 00 18 lwz r11,24(r9)
information->signals_pending = information->signals_posted;
ffc0f784: 81 49 00 14 lwz r10,20(r9)
information->signals_posted = _signals;
ffc0f788: 91 69 00 14 stw r11,20(r9)
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
ffc0f78c: 91 49 00 18 stw r10,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0f790: 7c 00 01 24 mtmsr r0
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
ffc0f794: 80 09 00 14 lwz r0,20(r9)
needs_asr_dispatching = true;
ffc0f798: 39 60 00 01 li r11,1
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;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
ffc0f79c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0f7a0: 40 9e 00 08 bne- cr7,ffc0f7a8 <rtems_task_mode+0x148>
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
ffc0f7a4: 39 60 00 00 li r11,0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
ffc0f7a8: 3d 20 00 00 lis r9,0
ffc0f7ac: 80 09 28 04 lwz r0,10244(r9)
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
ffc0f7b0: 38 60 00 00 li r3,0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
ffc0f7b4: 2f 80 00 03 cmpwi cr7,r0,3
ffc0f7b8: 40 be 00 48 bne+ cr7,ffc0f800 <rtems_task_mode+0x1a0>
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( are_signals_pending ||
ffc0f7bc: 2f 8b 00 00 cmpwi cr7,r11,0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
ffc0f7c0: 3d 40 00 00 lis r10,0
ffc0f7c4: 39 4a 2d b8 addi r10,r10,11704
ffc0f7c8: 81 2a 00 0c lwz r9,12(r10)
if ( are_signals_pending ||
ffc0f7cc: 40 9e 00 1c bne- cr7,ffc0f7e8 <rtems_task_mode+0x188>
ffc0f7d0: 80 0a 00 10 lwz r0,16(r10)
ffc0f7d4: 7f 89 00 00 cmpw cr7,r9,r0
ffc0f7d8: 41 9e 00 28 beq- cr7,ffc0f800 <rtems_task_mode+0x1a0>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
ffc0f7dc: 88 09 00 74 lbz r0,116(r9)
ffc0f7e0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0f7e4: 41 9e 00 1c beq- cr7,ffc0f800 <rtems_task_mode+0x1a0> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
ffc0f7e8: 3d 20 00 00 lis r9,0
ffc0f7ec: 38 00 00 01 li r0,1
ffc0f7f0: 39 29 2d b8 addi r9,r9,11704
ffc0f7f4: 98 09 00 18 stb r0,24(r9)
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
ffc0f7f8: 4b ff af c9 bl ffc0a7c0 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
ffc0f7fc: 38 60 00 00 li r3,0
}
ffc0f800: 80 01 00 0c lwz r0,12(r1)
ffc0f804: 38 21 00 08 addi r1,r1,8
ffc0f808: 7c 08 03 a6 mtlr r0
ffc0f80c: 4e 80 00 20 blr
ffc0c6ac <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
ffc0c6ac: 94 21 ff e0 stwu r1,-32(r1)
ffc0c6b0: 7c 08 02 a6 mflr r0
ffc0c6b4: bf c1 00 18 stmw r30,24(r1)
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0c6b8: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
ffc0c6bc: 7c be 2b 78 mr r30,r5
ffc0c6c0: 90 01 00 24 stw r0,36(r1)
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0c6c4: 41 82 00 18 beq- ffc0c6dc <rtems_task_set_priority+0x30>
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
ffc0c6c8: 3d 20 00 00 lis r9,0
ffc0c6cc: 89 29 27 04 lbz r9,9988(r9)
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
ffc0c6d0: 38 00 00 13 li r0,19
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0c6d4: 7f 9f 48 40 cmplw cr7,r31,r9
ffc0c6d8: 41 bd 00 6c bgt+ cr7,ffc0c744 <rtems_task_set_priority+0x98>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
ffc0c6dc: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
ffc0c6e0: 38 00 00 09 li r0,9
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
ffc0c6e4: 41 9e 00 60 beq- cr7,ffc0c744 <rtems_task_set_priority+0x98>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
ffc0c6e8: 38 81 00 08 addi r4,r1,8
ffc0c6ec: 48 00 26 f1 bl ffc0eddc <_Thread_Get>
switch ( location ) {
ffc0c6f0: 80 01 00 08 lwz r0,8(r1)
ffc0c6f4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c6f8: 40 9e 00 48 bne- cr7,ffc0c740 <rtems_task_set_priority+0x94>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
ffc0c6fc: 2f 9f 00 00 cmpwi cr7,r31,0
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
ffc0c700: 80 03 00 14 lwz r0,20(r3)
ffc0c704: 90 1e 00 00 stw r0,0(r30)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
ffc0c708: 41 9e 00 2c beq- cr7,ffc0c734 <rtems_task_set_priority+0x88>
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
ffc0c70c: 80 03 00 1c lwz r0,28(r3)
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;
ffc0c710: 93 e3 00 18 stw r31,24(r3)
if ( the_thread->resource_count == 0 ||
ffc0c714: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c718: 41 9e 00 10 beq- cr7,ffc0c728 <rtems_task_set_priority+0x7c>
ffc0c71c: 80 03 00 14 lwz r0,20(r3)
ffc0c720: 7f 80 f8 40 cmplw cr7,r0,r31
ffc0c724: 40 9d 00 10 ble- cr7,ffc0c734 <rtems_task_set_priority+0x88><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
ffc0c728: 7f e4 fb 78 mr r4,r31
ffc0c72c: 38 a0 00 00 li r5,0
ffc0c730: 48 00 21 9d bl ffc0e8cc <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
ffc0c734: 48 00 26 6d bl ffc0eda0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0c738: 38 00 00 00 li r0,0
ffc0c73c: 48 00 00 08 b ffc0c744 <rtems_task_set_priority+0x98>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0c740: 38 00 00 04 li r0,4
}
ffc0c744: 39 61 00 20 addi r11,r1,32
ffc0c748: 7c 03 03 78 mr r3,r0
ffc0c74c: 4b ff 49 d0 b ffc0111c <_restgpr_30_x>
ffc05de4 <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
ffc05de4: 94 21 ff f0 stwu r1,-16(r1)
ffc05de8: 7c 08 02 a6 mflr r0
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain(
ffc05dec: 38 80 00 00 li r4,0
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
ffc05df0: 90 01 00 14 stw r0,20(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(
ffc05df4: 38 a0 00 00 li r5,0
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc05df8: 81 23 00 00 lwz r9,0(r3)
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
ffc05dfc: bf c1 00 08 stmw r30,8(r1)
ffc05e00: 7c 7e 1b 78 mr r30,r3
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc05e04: 83 e9 00 38 lwz r31,56(r9)
rtems_status_code sc;
sc = rtems_semaphore_obtain(
ffc05e08: 3d 20 00 00 lis r9,0
ffc05e0c: 80 69 27 b8 lwz r3,10168(r9)
ffc05e10: 48 00 22 01 bl ffc08010 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc05e14: 2f 83 00 00 cmpwi cr7,r3,0
ffc05e18: 40 9e 00 b0 bne- cr7,ffc05ec8 <rtems_termios_close+0xe4><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
ffc05e1c: 81 3f 00 08 lwz r9,8(r31)
ffc05e20: 38 09 ff ff addi r0,r9,-1
ffc05e24: 2f 80 00 00 cmpwi cr7,r0,0
ffc05e28: 90 1f 00 08 stw r0,8(r31)
ffc05e2c: 40 9e 01 70 bne- cr7,ffc05f9c <rtems_termios_close+0x1b8>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
ffc05e30: 80 1f 00 cc lwz r0,204(r31)
ffc05e34: 3d 20 00 00 lis r9,0
ffc05e38: 39 29 28 78 addi r9,r9,10360
ffc05e3c: 54 00 28 34 rlwinm r0,r0,5,0,26
ffc05e40: 7d 29 02 14 add r9,r9,r0
ffc05e44: 80 09 00 04 lwz r0,4(r9)
ffc05e48: 2f 80 00 00 cmpwi cr7,r0,0
ffc05e4c: 41 9e 00 14 beq- cr7,ffc05e60 <rtems_termios_close+0x7c>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
ffc05e50: 7f e3 fb 78 mr r3,r31
ffc05e54: 7c 09 03 a6 mtctr r0
ffc05e58: 4e 80 04 21 bctrl
ffc05e5c: 48 00 00 38 b ffc05e94 <rtems_termios_close+0xb0>
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc05e60: 80 7f 00 18 lwz r3,24(r31)
ffc05e64: 38 80 00 00 li r4,0
ffc05e68: 38 a0 00 00 li r5,0
ffc05e6c: 48 00 21 a5 bl ffc08010 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
ffc05e70: 2f 83 00 00 cmpwi cr7,r3,0
ffc05e74: 40 9e 00 54 bne- cr7,ffc05ec8 <rtems_termios_close+0xe4><== NEVER TAKEN
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
ffc05e78: 80 1f 00 b4 lwz r0,180(r31)
ffc05e7c: 2f 80 00 00 cmpwi cr7,r0,0
ffc05e80: 41 be 00 0c beq+ cr7,ffc05e8c <rtems_termios_close+0xa8>
ffc05e84: 7f e3 fb 78 mr r3,r31
ffc05e88: 4b ff fa e5 bl ffc0596c <drainOutput.part.0>
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
rtems_semaphore_release (tty->osem);
ffc05e8c: 80 7f 00 18 lwz r3,24(r31)
ffc05e90: 48 00 22 ad bl ffc0813c <rtems_semaphore_release>
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
ffc05e94: 80 1f 00 b4 lwz r0,180(r31)
ffc05e98: 2f 80 00 02 cmpwi cr7,r0,2
ffc05e9c: 40 be 00 30 bne+ cr7,ffc05ecc <rtems_termios_close+0xe8>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
ffc05ea0: 80 7f 00 c4 lwz r3,196(r31)
ffc05ea4: 38 80 00 01 li r4,1
ffc05ea8: 48 00 1c b5 bl ffc07b5c <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
ffc05eac: 2f 83 00 00 cmpwi cr7,r3,0
ffc05eb0: 40 9e 00 18 bne- cr7,ffc05ec8 <rtems_termios_close+0xe4><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
ffc05eb4: 80 7f 00 c8 lwz r3,200(r31)
ffc05eb8: 38 80 00 01 li r4,1
ffc05ebc: 48 00 1c a1 bl ffc07b5c <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
ffc05ec0: 2f 83 00 00 cmpwi cr7,r3,0
ffc05ec4: 41 be 00 08 beq+ cr7,ffc05ecc <rtems_termios_close+0xe8><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
ffc05ec8: 48 00 29 1d bl ffc087e4 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
if (tty->device.lastClose)
ffc05ecc: 80 1f 00 9c lwz r0,156(r31)
ffc05ed0: 2f 80 00 00 cmpwi cr7,r0,0
ffc05ed4: 41 9e 00 18 beq- cr7,ffc05eec <rtems_termios_close+0x108><== ALWAYS TAKEN
(*tty->device.lastClose)(tty->major, tty->minor, arg);
ffc05ed8: 80 7f 00 0c lwz r3,12(r31) <== NOT EXECUTED
ffc05edc: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED
ffc05ee0: 80 9f 00 10 lwz r4,16(r31) <== NOT EXECUTED
ffc05ee4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc05ee8: 4e 80 04 21 bctrl <== NOT EXECUTED
if (tty->forw == NULL) {
ffc05eec: 81 7f 00 00 lwz r11,0(r31)
ffc05ef0: 81 3f 00 04 lwz r9,4(r31)
ffc05ef4: 2f 8b 00 00 cmpwi cr7,r11,0
ffc05ef8: 40 be 00 1c bne+ cr7,ffc05f14 <rtems_termios_close+0x130>
rtems_termios_ttyTail = tty->back;
if ( rtems_termios_ttyTail != NULL ) {
ffc05efc: 2f 89 00 00 cmpwi cr7,r9,0
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;
ffc05f00: 3d 40 00 00 lis r10,0
ffc05f04: 91 2a 27 bc stw r9,10172(r10)
if ( rtems_termios_ttyTail != NULL ) {
ffc05f08: 41 9e 00 10 beq- cr7,ffc05f18 <rtems_termios_close+0x134>
rtems_termios_ttyTail->forw = NULL;
ffc05f0c: 91 69 00 00 stw r11,0(r9)
ffc05f10: 48 00 00 08 b ffc05f18 <rtems_termios_close+0x134>
}
} else {
tty->forw->back = tty->back;
ffc05f14: 91 2b 00 04 stw r9,4(r11)
}
if (tty->back == NULL) {
ffc05f18: 81 7f 00 04 lwz r11,4(r31)
ffc05f1c: 81 3f 00 00 lwz r9,0(r31)
ffc05f20: 2f 8b 00 00 cmpwi cr7,r11,0
ffc05f24: 40 be 00 1c bne+ cr7,ffc05f40 <rtems_termios_close+0x15c>
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
ffc05f28: 2f 89 00 00 cmpwi cr7,r9,0
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
ffc05f2c: 3d 40 00 00 lis r10,0
ffc05f30: 91 2a 27 c0 stw r9,10176(r10)
if ( rtems_termios_ttyHead != NULL ) {
ffc05f34: 41 9e 00 10 beq- cr7,ffc05f44 <rtems_termios_close+0x160>
rtems_termios_ttyHead->back = NULL;
ffc05f38: 91 69 00 04 stw r11,4(r9)
ffc05f3c: 48 00 00 08 b ffc05f44 <rtems_termios_close+0x160>
}
} else {
tty->back->forw = tty->forw;
ffc05f40: 91 2b 00 00 stw r9,0(r11)
}
rtems_semaphore_delete (tty->isem);
ffc05f44: 80 7f 00 14 lwz r3,20(r31)
ffc05f48: 48 00 20 11 bl ffc07f58 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
ffc05f4c: 80 7f 00 18 lwz r3,24(r31)
ffc05f50: 48 00 20 09 bl ffc07f58 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
ffc05f54: 80 7f 00 8c lwz r3,140(r31)
ffc05f58: 48 00 20 01 bl ffc07f58 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
ffc05f5c: 80 1f 00 a0 lwz r0,160(r31)
ffc05f60: 2f 80 00 00 cmpwi cr7,r0,0
ffc05f64: 41 9e 00 10 beq- cr7,ffc05f74 <rtems_termios_close+0x190>
ffc05f68: 80 1f 00 b4 lwz r0,180(r31)
ffc05f6c: 2f 80 00 02 cmpwi cr7,r0,2
ffc05f70: 40 be 00 0c bne+ cr7,ffc05f7c <rtems_termios_close+0x198>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
ffc05f74: 80 7f 00 68 lwz r3,104(r31)
ffc05f78: 48 00 1f e1 bl ffc07f58 <rtems_semaphore_delete>
free (tty->rawInBuf.theBuf);
ffc05f7c: 80 7f 00 58 lwz r3,88(r31)
ffc05f80: 4b ff e9 49 bl ffc048c8 <free>
free (tty->rawOutBuf.theBuf);
ffc05f84: 80 7f 00 7c lwz r3,124(r31)
ffc05f88: 4b ff e9 41 bl ffc048c8 <free>
free (tty->cbuf);
ffc05f8c: 80 7f 00 1c lwz r3,28(r31)
ffc05f90: 4b ff e9 39 bl ffc048c8 <free>
free (tty);
ffc05f94: 7f e3 fb 78 mr r3,r31
ffc05f98: 4b ff e9 31 bl ffc048c8 <free>
}
rtems_semaphore_release (rtems_termios_ttyMutex);
ffc05f9c: 3d 20 00 00 lis r9,0
ffc05fa0: 80 69 27 b8 lwz r3,10168(r9)
ffc05fa4: 48 00 21 99 bl ffc0813c <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
ffc05fa8: 39 61 00 10 addi r11,r1,16
ffc05fac: 38 60 00 00 li r3,0
ffc05fb0: 4b ff a5 80 b ffc00530 <_restgpr_30_x>
ffc07514 <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)
{
ffc07514: 94 21 ff f8 stwu r1,-8(r1)
ffc07518: 7c 08 02 a6 mflr r0
ffc0751c: 90 01 00 0c stw r0,12(r1)
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
ffc07520: 80 03 00 90 lwz r0,144(r3)
ffc07524: 7c 00 22 14 add r0,r0,r4
ffc07528: 90 03 00 90 stw r0,144(r3)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
ffc0752c: 80 03 00 b4 lwz r0,180(r3)
ffc07530: 2f 80 00 02 cmpwi cr7,r0,2
ffc07534: 40 be 00 1c bne+ cr7,ffc07550 <rtems_termios_dequeue_characters+0x3c>
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
ffc07538: 80 63 00 c8 lwz r3,200(r3)
ffc0753c: 38 80 00 02 li r4,2
ffc07540: 48 00 06 1d bl ffc07b5c <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
ffc07544: 2f 83 00 00 cmpwi cr7,r3,0
ffc07548: 41 be 00 40 beq+ cr7,ffc07588 <rtems_termios_dequeue_characters+0x74><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
ffc0754c: 48 00 12 99 bl ffc087e4 <rtems_fatal_error_occurred> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
ffc07550: 80 03 00 cc lwz r0,204(r3)
ffc07554: 2f 80 00 05 cmpwi cr7,r0,5
ffc07558: 40 9e 00 20 bne- cr7,ffc07578 <rtems_termios_dequeue_characters+0x64>
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
ffc0755c: 3d 20 00 00 lis r9,0
ffc07560: 80 09 29 2c lwz r0,10540(r9)
ffc07564: 2f 80 00 00 cmpwi cr7,r0,0
ffc07568: 41 9e 00 20 beq- cr7,ffc07588 <rtems_termios_dequeue_characters+0x74><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
ffc0756c: 7c 09 03 a6 mtctr r0
ffc07570: 4e 80 04 21 bctrl
ffc07574: 48 00 00 14 b ffc07588 <rtems_termios_dequeue_characters+0x74>
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
ffc07578: 80 01 00 0c lwz r0,12(r1)
ffc0757c: 38 21 00 08 addi r1,r1,8
ffc07580: 7c 08 03 a6 mtlr r0
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
ffc07584: 4b ff fd 30 b ffc072b4 <rtems_termios_refill_transmitter>
}
ffc07588: 80 01 00 0c lwz r0,12(r1)
ffc0758c: 38 60 00 00 li r3,0
ffc07590: 38 21 00 08 addi r1,r1,8
ffc07594: 7c 08 03 a6 mtlr r0
ffc07598: 4e 80 00 20 blr
ffc06f64 <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, const char *buf, int len)
{
ffc06f64: 94 21 ff c8 stwu r1,-56(r1)
ffc06f68: 7c 08 02 a6 mflr r0
ffc06f6c: 90 01 00 3c stw r0,60(r1)
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) {
ffc06f70: 81 23 00 cc lwz r9,204(r3)
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
{
ffc06f74: be a1 00 0c stmw r21,12(r1)
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) {
ffc06f78: 3f a0 00 00 lis r29,0
ffc06f7c: 3b bd 28 78 addi r29,r29,10360
ffc06f80: 55 29 28 34 rlwinm r9,r9,5,0,26
ffc06f84: 7d 3d 4a 14 add r9,r29,r9
ffc06f88: 80 09 00 10 lwz r0,16(r9)
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
{
ffc06f8c: 7c 7f 1b 78 mr r31,r3
ffc06f90: 7c 99 23 78 mr r25,r4
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) {
ffc06f94: 2f 80 00 00 cmpwi cr7,r0,0
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
{
ffc06f98: 7c b8 2b 78 mr r24,r5
* NOTE: This routine runs in the context of the
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
ffc06f9c: 3b c0 00 00 li r30,0
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) {
ffc06fa0: 40 be 00 3c bne+ cr7,ffc06fdc <rtems_termios_enqueue_raw_characters+0x78>
* NOTE: This routine runs in the context of the
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
ffc06fa4: 3b a0 00 00 li r29,0
ffc06fa8: 3b 40 00 00 li r26,0
/*
* 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);
ffc06fac: 3a c3 00 30 addi r22,r3,48
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,
ffc06fb0: 3a e3 00 4a addi r23,r3,74
ffc06fb4: 48 00 02 60 b ffc07214 <rtems_termios_enqueue_raw_characters+0x2b0>
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
ffc06fb8: 81 3f 00 cc lwz r9,204(r31)
ffc06fbc: 7f e4 fb 78 mr r4,r31
ffc06fc0: 7c 79 f0 ae lbzx r3,r25,r30
ffc06fc4: 3b de 00 01 addi r30,r30,1
ffc06fc8: 55 29 28 34 rlwinm r9,r9,5,0,26
ffc06fcc: 7d 3d 4a 14 add r9,r29,r9
ffc06fd0: 80 09 00 10 lwz r0,16(r9)
ffc06fd4: 7c 09 03 a6 mtctr r0
ffc06fd8: 4e 80 04 21 bctrl
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--) {
ffc06fdc: 7f 9e c0 00 cmpw cr7,r30,r24
ffc06fe0: 40 9e ff d8 bne+ cr7,ffc06fb8 <rtems_termios_enqueue_raw_characters+0x54>
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
ffc06fe4: 80 1f 00 e4 lwz r0,228(r31)
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
}
return 0;
ffc06fe8: 3b c0 00 00 li r30,0
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
ffc06fec: 2f 80 00 00 cmpwi cr7,r0,0
ffc06ff0: 40 9e 02 40 bne- cr7,ffc07230 <rtems_termios_enqueue_raw_characters+0x2cc><== NEVER TAKEN
ffc06ff4: 80 1f 00 dc lwz r0,220(r31)
ffc06ff8: 2f 80 00 00 cmpwi cr7,r0,0
ffc06ffc: 41 9e 02 34 beq- cr7,ffc07230 <rtems_termios_enqueue_raw_characters+0x2cc><== NEVER TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
ffc07000: 7c 09 03 a6 mtctr r0
ffc07004: 38 7f 00 30 addi r3,r31,48
ffc07008: 80 9f 00 e0 lwz r4,224(r31)
ffc0700c: 4e 80 04 21 bctrl
tty->tty_rcvwakeup = 1;
ffc07010: 38 00 00 01 li r0,1
ffc07014: 90 1f 00 e4 stw r0,228(r31)
ffc07018: 48 00 02 18 b ffc07230 <rtems_termios_enqueue_raw_characters+0x2cc>
while (len--) {
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
ffc0701c: 80 1f 00 b8 lwz r0,184(r31)
}
return 0;
}
while (len--) {
c = *buf++;
ffc07020: 7f 79 e8 ae lbzx r27,r25,r29
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
ffc07024: 70 09 02 00 andi. r9,r0,512
ffc07028: 41 82 00 50 beq- ffc07078 <rtems_termios_enqueue_raw_characters+0x114>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
ffc0702c: 89 3f 00 4a lbz r9,74(r31)
ffc07030: 88 1f 00 49 lbz r0,73(r31)
ffc07034: 7f 89 d8 00 cmpw cr7,r9,r27
if (c == tty->termios.c_cc[VSTART]) {
ffc07038: 54 00 06 3e clrlwi r0,r0,24
c = *buf++;
/* 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]) {
ffc0703c: 40 be 00 28 bne+ cr7,ffc07064 <rtems_termios_enqueue_raw_characters+0x100>
if (c == tty->termios.c_cc[VSTART]) {
ffc07040: 7f 80 48 00 cmpw cr7,r0,r9
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
ffc07044: 80 1f 00 b8 lwz r0,184(r31)
/* 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]) {
ffc07048: 40 be 00 0c bne+ cr7,ffc07054 <rtems_termios_enqueue_raw_characters+0xf0><== ALWAYS TAKEN
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
ffc0704c: 68 00 00 10 xori r0,r0,16 <== NOT EXECUTED
ffc07050: 48 00 00 08 b ffc07058 <rtems_termios_enqueue_raw_characters+0xf4><== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
ffc07054: 60 00 00 10 ori r0,r0,16
ffc07058: 90 1f 00 b8 stw r0,184(r31)
* NOTE: This routine runs in the context of the
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, const char *buf, int len)
ffc0705c: 3b 40 00 01 li r26,1
ffc07060: 48 00 00 20 b ffc07080 <rtems_termios_enqueue_raw_characters+0x11c>
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
ffc07064: 7f 80 d8 00 cmpw cr7,r0,r27
ffc07068: 40 be 00 10 bne+ cr7,ffc07078 <rtems_termios_enqueue_raw_characters+0x114><== ALWAYS TAKEN
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
ffc0706c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc07070: 54 00 07 34 rlwinm r0,r0,0,28,26 <== NOT EXECUTED
ffc07074: 4b ff ff e4 b ffc07058 <rtems_termios_enqueue_raw_characters+0xf4><== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
ffc07078: 2f 9a 00 00 cmpwi cr7,r26,0
ffc0707c: 41 9e 00 5c beq- cr7,ffc070d8 <rtems_termios_enqueue_raw_characters+0x174><== ALWAYS TAKEN
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
ffc07080: 80 1f 00 b8 lwz r0,184(r31)
ffc07084: 54 00 06 b6 rlwinm r0,r0,0,26,27
ffc07088: 2f 80 00 20 cmpwi cr7,r0,32
ffc0708c: 40 be 01 84 bne+ cr7,ffc07210 <rtems_termios_enqueue_raw_characters+0x2ac><== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
ffc07090: 4b ff e8 c9 bl ffc05958 <ppc_interrupt_disable> <== NOT EXECUTED
ffc07094: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
ffc07098: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc0709c: 54 00 06 f2 rlwinm r0,r0,0,27,25 <== NOT EXECUTED
ffc070a0: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
ffc070a4: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED
ffc070a8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc070ac: 41 be 00 24 beq+ cr7,ffc070d0 <rtems_termios_enqueue_raw_characters+0x16c><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
ffc070b0: 81 3f 00 84 lwz r9,132(r31) <== 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)(
ffc070b4: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc070b8: 80 9f 00 7c lwz r4,124(r31) <== NOT EXECUTED
ffc070bc: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED
ffc070c0: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc070c4: 7c 84 4a 14 add r4,r4,r9 <== NOT EXECUTED
ffc070c8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc070cc: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc070d0: 7f 80 01 24 mtmsr r28 <== NOT EXECUTED
ffc070d4: 48 00 01 3c b ffc07210 <rtems_termios_enqueue_raw_characters+0x2ac><== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
ffc070d8: 83 9f 00 60 lwz r28,96(r31)
ffc070dc: 81 3f 00 64 lwz r9,100(r31)
ffc070e0: 38 1c 00 01 addi r0,r28,1
ffc070e4: 7f 80 4b 96 divwu r28,r0,r9
ffc070e8: 7f 9c 49 d6 mullw r28,r28,r9
ffc070ec: 7f 9c 00 50 subf r28,r28,r0
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
ffc070f0: 4b ff e8 69 bl ffc05958 <ppc_interrupt_disable>
ffc070f4: 7c 75 1b 78 mr r21,r3
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
ffc070f8: 80 1f 00 5c lwz r0,92(r31)
ffc070fc: 81 7f 00 64 lwz r11,100(r31)
% tty->rawInBuf.Size) > tty->highwater) &&
ffc07100: 81 3f 00 64 lwz r9,100(r31)
}
} 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)
ffc07104: 7c 00 58 50 subf r0,r0,r11
ffc07108: 7c 00 e2 14 add r0,r0,r28
% tty->rawInBuf.Size) > tty->highwater) &&
ffc0710c: 7d 60 4b 96 divwu r11,r0,r9
ffc07110: 7d 2b 49 d6 mullw r9,r11,r9
}
} 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)
ffc07114: 81 7f 00 c0 lwz r11,192(r31)
% tty->rawInBuf.Size) > tty->highwater) &&
ffc07118: 7c 09 00 50 subf r0,r9,r0
}
} 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)
ffc0711c: 7f 80 58 40 cmplw cr7,r0,r11
ffc07120: 40 9d 00 9c ble- cr7,ffc071bc <rtems_termios_enqueue_raw_characters+0x258><== ALWAYS TAKEN
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
ffc07124: 80 1f 00 b8 lwz r0,184(r31) <== 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)
% tty->rawInBuf.Size) > tty->highwater) &&
ffc07128: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED
ffc0712c: 40 82 00 90 bne- ffc071bc <rtems_termios_enqueue_raw_characters+0x258><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
ffc07130: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc07134: 60 00 00 01 ori r0,r0,1 <== NOT EXECUTED
ffc07138: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
ffc0713c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc07140: 70 00 04 02 andi. r0,r0,1026 <== NOT EXECUTED
ffc07144: 2f 80 04 00 cmpwi cr7,r0,1024 <== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
ffc07148: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
% 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))
ffc0714c: 40 be 00 40 bne+ cr7,ffc0718c <rtems_termios_enqueue_raw_characters+0x228><== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
ffc07150: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED
ffc07154: 40 82 00 10 bne- ffc07164 <rtems_termios_enqueue_raw_characters+0x200><== NOT EXECUTED
ffc07158: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED
ffc0715c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc07160: 40 9e 00 5c bne- cr7,ffc071bc <rtems_termios_enqueue_raw_characters+0x258><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
ffc07164: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
ffc07168: 7e e4 bb 78 mr r4,r23 <== NOT EXECUTED
ffc0716c: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc07170: 38 a0 00 01 li r5,1 <== 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;
ffc07174: 60 00 00 02 ori r0,r0,2 <== NOT EXECUTED
ffc07178: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
ffc0717c: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED
ffc07180: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc07184: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc07188: 48 00 00 34 b ffc071bc <rtems_termios_enqueue_raw_characters+0x258><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
ffc0718c: 70 00 01 04 andi. r0,r0,260 <== NOT EXECUTED
ffc07190: 2f 80 01 00 cmpwi cr7,r0,256 <== NOT EXECUTED
ffc07194: 40 be 00 28 bne+ cr7,ffc071bc <rtems_termios_enqueue_raw_characters+0x258><== NOT EXECUTED
tty->flow_ctrl |= FL_IRTSOFF;
ffc07198: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc0719c: 60 00 00 04 ori r0,r0,4 <== NOT EXECUTED
ffc071a0: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
ffc071a4: 80 1f 00 ac lwz r0,172(r31) <== NOT EXECUTED
ffc071a8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc071ac: 41 9e 00 10 beq- cr7,ffc071bc <rtems_termios_enqueue_raw_characters+0x258><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
ffc071b0: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc071b4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc071b8: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc071bc: 7e a0 01 24 mtmsr r21
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
ffc071c0: 80 1f 00 5c lwz r0,92(r31)
ffc071c4: 7f 9c 00 00 cmpw cr7,r28,r0
ffc071c8: 40 be 00 0c bne+ cr7,ffc071d4 <rtems_termios_enqueue_raw_characters+0x270><== ALWAYS TAKEN
dropped++;
ffc071cc: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED
ffc071d0: 48 00 00 40 b ffc07210 <rtems_termios_enqueue_raw_characters+0x2ac><== NOT EXECUTED
} else {
tty->rawInBuf.theBuf[newTail] = c;
ffc071d4: 81 3f 00 58 lwz r9,88(r31)
ffc071d8: 7f 69 e1 ae stbx r27,r9,r28
tty->rawInBuf.Tail = newTail;
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
ffc071dc: 80 1f 00 e4 lwz r0,228(r31)
if (newTail == tty->rawInBuf.Head) {
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
ffc071e0: 93 9f 00 60 stw r28,96(r31)
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
ffc071e4: 2f 80 00 00 cmpwi cr7,r0,0
ffc071e8: 40 9e 00 28 bne- cr7,ffc07210 <rtems_termios_enqueue_raw_characters+0x2ac><== NEVER TAKEN
ffc071ec: 80 1f 00 dc lwz r0,220(r31)
ffc071f0: 2f 80 00 00 cmpwi cr7,r0,0
ffc071f4: 41 9e 00 1c beq- cr7,ffc07210 <rtems_termios_enqueue_raw_characters+0x2ac><== ALWAYS TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
ffc071f8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc071fc: 7e c3 b3 78 mr r3,r22 <== NOT EXECUTED
ffc07200: 80 9f 00 e0 lwz r4,224(r31) <== NOT EXECUTED
ffc07204: 4e 80 04 21 bctrl <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
ffc07208: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc0720c: 90 1f 00 e4 stw r0,228(r31) <== NOT EXECUTED
ffc07210: 3b bd 00 01 addi r29,r29,1
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
ffc07214: 7f 9d c0 00 cmpw cr7,r29,r24
ffc07218: 40 9e fe 04 bne+ cr7,ffc0701c <rtems_termios_enqueue_raw_characters+0xb8>
}
}
}
}
tty->rawInBufDropped += dropped;
ffc0721c: 80 1f 00 78 lwz r0,120(r31)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
ffc07220: 80 7f 00 68 lwz r3,104(r31)
}
}
}
}
tty->rawInBufDropped += dropped;
ffc07224: 7c 00 f2 14 add r0,r0,r30
ffc07228: 90 1f 00 78 stw r0,120(r31)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
ffc0722c: 48 00 0f 11 bl ffc0813c <rtems_semaphore_release>
return dropped;
}
ffc07230: 39 61 00 38 addi r11,r1,56
ffc07234: 7f c3 f3 78 mr r3,r30
ffc07238: 4b ff 92 d4 b ffc0050c <_restgpr_21_x>
ffc05fd0 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
ffc05fd0: 94 21 ff e0 stwu r1,-32(r1)
ffc05fd4: 7c 08 02 a6 mflr r0
struct rtems_termios_tty *tty = args->iop->data1;
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);
ffc05fd8: 38 80 00 00 li r4,0
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
ffc05fdc: 90 01 00 24 stw r0,36(r1)
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
ffc05fe0: 38 00 00 00 li r0,0
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc05fe4: 38 a0 00 00 li r5,0
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc05fe8: 81 23 00 00 lwz r9,0(r3)
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
ffc05fec: bf 61 00 0c stmw r27,12(r1)
ffc05ff0: 7c 7e 1b 78 mr r30,r3
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc05ff4: 83 e9 00 38 lwz r31,56(r9)
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
ffc05ff8: 83 83 00 08 lwz r28,8(r3)
rtems_status_code sc;
args->ioctl_return = 0;
ffc05ffc: 90 03 00 0c stw r0,12(r3)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc06000: 80 7f 00 18 lwz r3,24(r31)
ffc06004: 48 00 20 0d bl ffc08010 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
ffc06008: 7c 7d 1b 79 mr. r29,r3
ffc0600c: 40 82 03 9c bne- ffc063a8 <rtems_termios_ioctl+0x3d8> <== NEVER TAKEN
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
ffc06010: 80 1e 00 04 lwz r0,4(r30)
ffc06014: 2f 80 00 04 cmpwi cr7,r0,4
ffc06018: 41 9e 02 c8 beq- cr7,ffc062e0 <rtems_termios_ioctl+0x310>
ffc0601c: 2b 80 00 04 cmplwi cr7,r0,4
ffc06020: 41 9d 00 20 bgt- cr7,ffc06040 <rtems_termios_ioctl+0x70>
ffc06024: 2f 80 00 02 cmpwi cr7,r0,2
ffc06028: 41 9e 00 a0 beq- cr7,ffc060c8 <rtems_termios_ioctl+0xf8>
ffc0602c: 2b 80 00 02 cmplwi cr7,r0,2
ffc06030: 41 9d 02 84 bgt- cr7,ffc062b4 <rtems_termios_ioctl+0x2e4>
ffc06034: 2f 80 00 01 cmpwi cr7,r0,1
ffc06038: 40 be 00 44 bne+ cr7,ffc0607c <rtems_termios_ioctl+0xac><== NEVER TAKEN
ffc0603c: 48 00 00 78 b ffc060b4 <rtems_termios_ioctl+0xe4>
ffc06040: 3d 20 40 04 lis r9,16388
ffc06044: 61 29 66 7f ori r9,r9,26239
ffc06048: 7f 80 48 00 cmpw cr7,r0,r9
ffc0604c: 41 9e 03 24 beq- cr7,ffc06370 <rtems_termios_ioctl+0x3a0><== NEVER TAKEN
ffc06050: 7f 80 48 40 cmplw cr7,r0,r9
ffc06054: 41 9d 00 10 bgt- cr7,ffc06064 <rtems_termios_ioctl+0x94>
ffc06058: 2f 80 00 05 cmpwi cr7,r0,5
ffc0605c: 40 be 00 20 bne+ cr7,ffc0607c <rtems_termios_ioctl+0xac>
ffc06060: 48 00 02 6c b ffc062cc <rtems_termios_ioctl+0x2fc>
ffc06064: 6c 09 40 04 xoris r9,r0,16388
ffc06068: 2f 89 74 1a cmpwi cr7,r9,29722
ffc0606c: 41 9e 02 f8 beq- cr7,ffc06364 <rtems_termios_ioctl+0x394>
ffc06070: 6c 09 80 04 xoris r9,r0,32772
ffc06074: 2f 89 74 1b cmpwi cr7,r9,29723
ffc06078: 41 9e 02 7c beq- cr7,ffc062f4 <rtems_termios_ioctl+0x324><== ALWAYS TAKEN
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
ffc0607c: 80 1f 00 cc lwz r0,204(r31)
ffc06080: 3d 20 00 00 lis r9,0
ffc06084: 39 29 28 78 addi r9,r9,10360
ffc06088: 54 00 28 34 rlwinm r0,r0,5,0,26
ffc0608c: 7d 29 02 14 add r9,r9,r0
ffc06090: 80 09 00 18 lwz r0,24(r9)
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
ffc06094: 3b a0 00 0a li r29,10
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
ffc06098: 2f 80 00 00 cmpwi cr7,r0,0
ffc0609c: 41 9e 03 04 beq- cr7,ffc063a0 <rtems_termios_ioctl+0x3d0><== NEVER TAKEN
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
ffc060a0: 7f e3 fb 78 mr r3,r31
ffc060a4: 7c 09 03 a6 mtctr r0
ffc060a8: 7f c4 f3 78 mr r4,r30
ffc060ac: 4e 80 04 21 bctrl
ffc060b0: 48 00 02 ac b ffc0635c <rtems_termios_ioctl+0x38c>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
ffc060b4: 80 7e 00 08 lwz r3,8(r30)
ffc060b8: 38 9f 00 30 addi r4,r31,48
ffc060bc: 38 a0 00 24 li r5,36
ffc060c0: 48 00 a8 19 bl ffc108d8 <memcpy>
break;
ffc060c4: 48 00 02 dc b ffc063a0 <rtems_termios_ioctl+0x3d0>
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
ffc060c8: 80 9e 00 08 lwz r4,8(r30)
ffc060cc: 38 7f 00 30 addi r3,r31,48
ffc060d0: 38 a0 00 24 li r5,36
ffc060d4: 48 00 a8 05 bl ffc108d8 <memcpy>
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
ffc060d8: 80 1f 00 b8 lwz r0,184(r31)
ffc060dc: 70 09 02 00 andi. r9,r0,512
ffc060e0: 41 82 00 70 beq- ffc06150 <rtems_termios_ioctl+0x180>
!(tty->termios.c_iflag & IXON)) {
ffc060e4: 80 1f 00 30 lwz r0,48(r31)
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
ffc060e8: 70 0b 04 00 andi. r11,r0,1024
ffc060ec: 40 82 00 64 bne- ffc06150 <rtems_termios_ioctl+0x180>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
ffc060f0: 81 3f 00 b8 lwz r9,184(r31)
ffc060f4: 38 00 fd ef li r0,-529
ffc060f8: 7d 20 00 38 and r0,r9,r0
ffc060fc: 90 1f 00 b8 stw r0,184(r31)
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
ffc06100: 80 1f 00 b8 lwz r0,184(r31)
ffc06104: 70 09 00 20 andi. r9,r0,32
ffc06108: 41 a2 00 48 beq+ ffc06150 <rtems_termios_ioctl+0x180> <== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
ffc0610c: 4b ff f8 4d bl ffc05958 <ppc_interrupt_disable> <== NOT EXECUTED
ffc06110: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
ffc06114: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc06118: 54 00 06 f2 rlwinm r0,r0,0,27,25 <== NOT EXECUTED
ffc0611c: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
ffc06120: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED
ffc06124: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc06128: 41 be 00 24 beq+ cr7,ffc0614c <rtems_termios_ioctl+0x17c><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
ffc0612c: 81 3f 00 84 lwz r9,132(r31) <== 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)(
ffc06130: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc06134: 80 9f 00 7c lwz r4,124(r31) <== NOT EXECUTED
ffc06138: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED
ffc0613c: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc06140: 7c 84 4a 14 add r4,r4,r9 <== NOT EXECUTED
ffc06144: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc06148: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc0614c: 7f 80 01 24 mtmsr r28 <== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
ffc06150: 80 1f 00 b8 lwz r0,184(r31)
ffc06154: 70 09 04 00 andi. r9,r0,1024
ffc06158: 41 82 00 28 beq- ffc06180 <rtems_termios_ioctl+0x1b0>
ffc0615c: 80 1f 00 30 lwz r0,48(r31)
ffc06160: 70 0b 10 00 andi. r11,r0,4096
ffc06164: 40 82 00 1c bne- ffc06180 <rtems_termios_ioctl+0x1b0>
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
ffc06168: 80 1f 00 b8 lwz r0,184(r31)
ffc0616c: 54 00 05 a8 rlwinm r0,r0,0,22,20
ffc06170: 90 1f 00 b8 stw r0,184(r31)
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
ffc06174: 80 1f 00 b8 lwz r0,184(r31)
ffc06178: 54 00 07 fa rlwinm r0,r0,0,31,29
ffc0617c: 90 1f 00 b8 stw r0,184(r31)
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
ffc06180: 80 1f 00 b8 lwz r0,184(r31)
ffc06184: 70 09 01 00 andi. r9,r0,256
ffc06188: 41 82 00 4c beq- ffc061d4 <rtems_termios_ioctl+0x204> <== ALWAYS TAKEN
ffc0618c: 80 1f 00 38 lwz r0,56(r31) <== NOT EXECUTED
ffc06190: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc06194: 41 9c 00 40 blt- cr7,ffc061d4 <rtems_termios_ioctl+0x204><== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
ffc06198: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc0619c: 54 00 06 2c rlwinm r0,r0,0,24,22 <== NOT EXECUTED
ffc061a0: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
ffc061a4: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc061a8: 70 0b 00 04 andi. r11,r0,4 <== NOT EXECUTED
ffc061ac: 41 82 00 1c beq- ffc061c8 <rtems_termios_ioctl+0x1f8> <== NOT EXECUTED
ffc061b0: 80 1f 00 b0 lwz r0,176(r31) <== NOT EXECUTED
ffc061b4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc061b8: 41 9e 00 10 beq- cr7,ffc061c8 <rtems_termios_ioctl+0x1f8><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
ffc061bc: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc061c0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc061c4: 4e 80 04 21 bctrl <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
ffc061c8: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc061cc: 54 00 07 b8 rlwinm r0,r0,0,30,28 <== NOT EXECUTED
ffc061d0: 90 1f 00 b8 stw r0,184(r31) <== 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) {
ffc061d4: 80 1f 00 38 lwz r0,56(r31)
ffc061d8: 2f 80 00 00 cmpwi cr7,r0,0
ffc061dc: 40 bc 00 10 bge+ cr7,ffc061ec <rtems_termios_ioctl+0x21c><== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDRTS;
ffc061e0: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc061e4: 60 00 01 00 ori r0,r0,256 <== NOT EXECUTED
ffc061e8: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
ffc061ec: 80 1f 00 30 lwz r0,48(r31)
ffc061f0: 70 09 10 00 andi. r9,r0,4096
ffc061f4: 41 82 00 10 beq- ffc06204 <rtems_termios_ioctl+0x234>
tty->flow_ctrl |= FL_MDXOF;
ffc061f8: 81 3f 00 b8 lwz r9,184(r31)
ffc061fc: 61 29 04 00 ori r9,r9,1024
ffc06200: 91 3f 00 b8 stw r9,184(r31)
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
ffc06204: 70 0b 04 00 andi. r11,r0,1024
ffc06208: 41 82 00 10 beq- ffc06218 <rtems_termios_ioctl+0x248>
tty->flow_ctrl |= FL_MDXON;
ffc0620c: 80 1f 00 b8 lwz r0,184(r31)
ffc06210: 60 00 02 00 ori r0,r0,512
ffc06214: 90 1f 00 b8 stw r0,184(r31)
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) {
ffc06218: 83 9f 00 3c lwz r28,60(r31)
ffc0621c: 73 9c 00 02 andi. r28,r28,2
ffc06220: 41 82 00 0c beq- ffc0622c <rtems_termios_ioctl+0x25c>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
ffc06224: 38 00 00 00 li r0,0
ffc06228: 48 00 00 54 b ffc0627c <rtems_termios_ioctl+0x2ac>
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
ffc0622c: 8b 7f 00 46 lbz r27,70(r31)
rtems_clock_get_ticks_per_second() / 10;
ffc06230: 48 00 16 e9 bl ffc07918 <rtems_clock_get_ticks_per_second>
ffc06234: 38 00 00 0a li r0,10
ffc06238: 89 3f 00 47 lbz r9,71(r31)
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
ffc0623c: 7f 63 d9 d6 mullw r27,r3,r27
rtems_clock_get_ticks_per_second() / 10;
ffc06240: 7f 7b 03 96 divwu r27,r27,r0
if (tty->termios.c_cc[VTIME]) {
ffc06244: 88 1f 00 46 lbz r0,70(r31)
ffc06248: 2f 80 00 00 cmpwi cr7,r0,0
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
ffc0624c: 93 7f 00 54 stw r27,84(r31)
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
ffc06250: 41 9e 00 24 beq- cr7,ffc06274 <rtems_termios_ioctl+0x2a4>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
ffc06254: 71 20 00 ff andi. r0,r9,255
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} 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;
ffc06258: 93 9f 00 6c stw r28,108(r31)
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
ffc0625c: 93 7f 00 70 stw r27,112(r31)
if (tty->termios.c_cc[VMIN])
ffc06260: 41 82 00 0c beq- ffc0626c <rtems_termios_ioctl+0x29c>
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
ffc06264: 93 9f 00 74 stw r28,116(r31)
ffc06268: 48 00 00 2c b ffc06294 <rtems_termios_ioctl+0x2c4>
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
ffc0626c: 93 7f 00 74 stw r27,116(r31)
ffc06270: 48 00 00 24 b ffc06294 <rtems_termios_ioctl+0x2c4>
} else {
if (tty->termios.c_cc[VMIN]) {
ffc06274: 71 2b 00 ff andi. r11,r9,255
ffc06278: 41 82 00 14 beq- ffc0628c <rtems_termios_ioctl+0x2bc> <== ALWAYS TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
ffc0627c: 90 1f 00 6c stw r0,108(r31)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
ffc06280: 90 1f 00 70 stw r0,112(r31)
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
ffc06284: 90 1f 00 74 stw r0,116(r31)
ffc06288: 48 00 00 0c b ffc06294 <rtems_termios_ioctl+0x2c4>
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
ffc0628c: 38 00 00 01 li r0,1
ffc06290: 90 1f 00 6c stw r0,108(r31)
}
}
}
if (tty->device.setAttributes)
ffc06294: 80 1f 00 a8 lwz r0,168(r31)
ffc06298: 2f 80 00 00 cmpwi cr7,r0,0
ffc0629c: 41 9e 01 04 beq- cr7,ffc063a0 <rtems_termios_ioctl+0x3d0><== NEVER TAKEN
(*tty->device.setAttributes)(tty->minor, &tty->termios);
ffc062a0: 80 7f 00 10 lwz r3,16(r31)
ffc062a4: 38 9f 00 30 addi r4,r31,48
ffc062a8: 7c 09 03 a6 mtctr r0
ffc062ac: 4e 80 04 21 bctrl
ffc062b0: 48 00 00 f0 b ffc063a0 <rtems_termios_ioctl+0x3d0>
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
ffc062b4: 80 1f 00 b4 lwz r0,180(r31)
ffc062b8: 2f 80 00 00 cmpwi cr7,r0,0
ffc062bc: 41 be 00 e4 beq+ cr7,ffc063a0 <rtems_termios_ioctl+0x3d0><== ALWAYS TAKEN
ffc062c0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc062c4: 4b ff f6 a9 bl ffc0596c <drainOutput.part.0> <== NOT EXECUTED
ffc062c8: 48 00 00 d8 b ffc063a0 <rtems_termios_ioctl+0x3d0> <== NOT EXECUTED
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
ffc062cc: 81 5c 00 00 lwz r10,0(r28)
ffc062d0: 81 7c 00 04 lwz r11,4(r28)
ffc062d4: 91 5f 00 d4 stw r10,212(r31)
ffc062d8: 91 7f 00 d8 stw r11,216(r31)
break;
ffc062dc: 48 00 00 c4 b ffc063a0 <rtems_termios_ioctl+0x3d0>
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
ffc062e0: 81 5c 00 00 lwz r10,0(r28)
ffc062e4: 81 7c 00 04 lwz r11,4(r28)
ffc062e8: 91 5f 00 dc stw r10,220(r31)
ffc062ec: 91 7f 00 e0 stw r11,224(r31)
break;
ffc062f0: 48 00 00 b0 b ffc063a0 <rtems_termios_ioctl+0x3d0>
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
ffc062f4: 80 1f 00 cc lwz r0,204(r31)
ffc062f8: 3d 20 00 00 lis r9,0
ffc062fc: 39 29 28 78 addi r9,r9,10360
ffc06300: 54 00 28 34 rlwinm r0,r0,5,0,26
ffc06304: 7d 29 02 14 add r9,r9,r0
ffc06308: 80 09 00 04 lwz r0,4(r9)
ffc0630c: 2f 80 00 00 cmpwi cr7,r0,0
ffc06310: 41 9e 00 14 beq- cr7,ffc06324 <rtems_termios_ioctl+0x354>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
ffc06314: 7f e3 fb 78 mr r3,r31
ffc06318: 7c 09 03 a6 mtctr r0
ffc0631c: 4e 80 04 21 bctrl
ffc06320: 7c 7d 1b 78 mr r29,r3
}
tty->t_line=*(int*)(args->buffer);
ffc06324: 81 3e 00 08 lwz r9,8(r30)
ffc06328: 80 09 00 00 lwz r0,0(r9)
tty->t_sc = NULL; /* ensure that no more valid data */
ffc0632c: 39 20 00 00 li r9,0
ffc06330: 91 3f 00 d0 stw r9,208(r31)
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
ffc06334: 3d 20 00 00 lis r9,0
ffc06338: 39 29 28 78 addi r9,r9,10360
* 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);
ffc0633c: 90 1f 00 cc stw r0,204(r31)
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
ffc06340: 54 00 28 34 rlwinm r0,r0,5,0,26
ffc06344: 7c 09 00 2e lwzx r0,r9,r0
ffc06348: 2f 80 00 00 cmpwi cr7,r0,0
ffc0634c: 41 9e 00 54 beq- cr7,ffc063a0 <rtems_termios_ioctl+0x3d0>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
ffc06350: 7f e3 fb 78 mr r3,r31
ffc06354: 7c 09 03 a6 mtctr r0
ffc06358: 4e 80 04 21 bctrl
ffc0635c: 7c 7d 1b 78 mr r29,r3
ffc06360: 48 00 00 40 b ffc063a0 <rtems_termios_ioctl+0x3d0>
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
ffc06364: 80 1f 00 cc lwz r0,204(r31)
ffc06368: 81 3e 00 08 lwz r9,8(r30)
ffc0636c: 48 00 00 30 b ffc0639c <rtems_termios_ioctl+0x3cc>
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
ffc06370: 81 3f 00 60 lwz r9,96(r31) <== NOT EXECUTED
ffc06374: 80 1f 00 5c lwz r0,92(r31) <== NOT EXECUTED
if ( rawnc < 0 )
ffc06378: 7c 00 48 51 subf. r0,r0,r9 <== NOT EXECUTED
ffc0637c: 40 a0 00 0c bge+ ffc06388 <rtems_termios_ioctl+0x3b8> <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
ffc06380: 81 3f 00 64 lwz r9,100(r31) <== NOT EXECUTED
ffc06384: 7c 00 4a 14 add r0,r0,r9 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
ffc06388: 81 5f 00 20 lwz r10,32(r31) <== NOT EXECUTED
ffc0638c: 81 7f 00 24 lwz r11,36(r31) <== NOT EXECUTED
ffc06390: 81 3e 00 08 lwz r9,8(r30) <== NOT EXECUTED
ffc06394: 7d 6b 50 50 subf r11,r11,r10 <== NOT EXECUTED
ffc06398: 7c 0b 02 14 add r0,r11,r0 <== NOT EXECUTED
ffc0639c: 90 09 00 00 stw r0,0(r9)
}
break;
}
rtems_semaphore_release (tty->osem);
ffc063a0: 80 7f 00 18 lwz r3,24(r31)
ffc063a4: 48 00 1d 99 bl ffc0813c <rtems_semaphore_release>
args->ioctl_return = sc;
return sc;
}
ffc063a8: 39 61 00 20 addi r11,r1,32
}
break;
}
rtems_semaphore_release (tty->osem);
args->ioctl_return = sc;
ffc063ac: 93 be 00 0c stw r29,12(r30)
return sc;
}
ffc063b0: 7f a3 eb 78 mr r3,r29
ffc063b4: 4b ff a1 70 b ffc00524 <_restgpr_27_x>
ffc059d0 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
ffc059d0: 94 21 ff d0 stwu r1,-48(r1)
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
ffc059d4: 3d 20 00 00 lis r9,0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
ffc059d8: 7c 08 02 a6 mflr r0
ffc059dc: be c1 00 08 stmw r22,8(r1)
ffc059e0: 7c 7c 1b 78 mr r28,r3
ffc059e4: 7c 9b 23 78 mr r27,r4
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
ffc059e8: 80 69 27 b8 lwz r3,10168(r9)
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
ffc059ec: 7c ba 2b 78 mr r26,r5
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
ffc059f0: 38 80 00 00 li r4,0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
ffc059f4: 90 01 00 34 stw r0,52(r1)
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
ffc059f8: 38 a0 00 00 li r5,0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
ffc059fc: 7c d9 33 78 mr r25,r6
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
ffc05a00: 48 00 26 11 bl ffc08010 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc05a04: 7c 7e 1b 79 mr. r30,r3
ffc05a08: 40 82 03 b8 bne- ffc05dc0 <rtems_termios_open+0x3f0> <== NEVER TAKEN
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
ffc05a0c: 3d 20 00 00 lis r9,0
ffc05a10: 83 a9 27 c0 lwz r29,10176(r9)
ffc05a14: 7f bf eb 78 mr r31,r29
ffc05a18: 48 00 00 20 b ffc05a38 <rtems_termios_open+0x68>
if ((tty->major == major) && (tty->minor == minor))
ffc05a1c: 80 1f 00 0c lwz r0,12(r31)
ffc05a20: 7f 80 e0 00 cmpw cr7,r0,r28
ffc05a24: 40 be 00 10 bne+ cr7,ffc05a34 <rtems_termios_open+0x64>
ffc05a28: 80 1f 00 10 lwz r0,16(r31)
ffc05a2c: 7f 80 d8 00 cmpw cr7,r0,r27
ffc05a30: 41 9e 03 00 beq- cr7,ffc05d30 <rtems_termios_open+0x360><== ALWAYS TAKEN
sc = rtems_semaphore_obtain(
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
ffc05a34: 83 ff 00 00 lwz r31,0(r31)
ffc05a38: 2f 9f 00 00 cmpwi cr7,r31,0
ffc05a3c: 40 9e ff e0 bne+ cr7,ffc05a1c <rtems_termios_open+0x4c>
ffc05a40: 48 00 03 8c b ffc05dcc <rtems_termios_open+0x3fc>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
ffc05a44: 3d 20 00 00 lis r9,0
ffc05a48: 80 09 21 a8 lwz r0,8616(r9)
ffc05a4c: 3a c9 21 a8 addi r22,r9,8616
ffc05a50: 90 1f 00 64 stw r0,100(r31)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
ffc05a54: 80 7f 00 64 lwz r3,100(r31)
ffc05a58: 4b ff f2 19 bl ffc04c70 <malloc>
if (tty->rawInBuf.theBuf == NULL) {
ffc05a5c: 2f 83 00 00 cmpwi cr7,r3,0
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
ffc05a60: 90 7f 00 58 stw r3,88(r31)
ffc05a64: 7c 78 1b 78 mr r24,r3
if (tty->rawInBuf.theBuf == NULL) {
ffc05a68: 40 be 00 20 bne+ cr7,ffc05a88 <rtems_termios_open+0xb8>
free(tty);
ffc05a6c: 7f e3 fb 78 mr r3,r31
ffc05a70: 4b ff ee 59 bl ffc048c8 <free>
rtems_semaphore_release (rtems_termios_ttyMutex);
ffc05a74: 3d 20 00 00 lis r9,0
ffc05a78: 80 69 27 b8 lwz r3,10168(r9)
return RTEMS_NO_MEMORY;
ffc05a7c: 3b c0 00 1a li r30,26
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
ffc05a80: 48 00 26 bd bl ffc0813c <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
ffc05a84: 48 00 03 3c b ffc05dc0 <rtems_termios_open+0x3f0>
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
ffc05a88: 80 16 00 04 lwz r0,4(r22)
ffc05a8c: 90 1f 00 88 stw r0,136(r31)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
ffc05a90: 80 7f 00 88 lwz r3,136(r31)
ffc05a94: 4b ff f1 dd bl ffc04c70 <malloc>
if (tty->rawOutBuf.theBuf == NULL) {
ffc05a98: 2f 83 00 00 cmpwi cr7,r3,0
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
ffc05a9c: 90 7f 00 7c stw r3,124(r31)
ffc05aa0: 7c 77 1b 78 mr r23,r3
if (tty->rawOutBuf.theBuf == NULL) {
ffc05aa4: 41 9e 00 20 beq- cr7,ffc05ac4 <rtems_termios_open+0xf4>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
ffc05aa8: 80 76 00 08 lwz r3,8(r22)
ffc05aac: 4b ff f1 c5 bl ffc04c70 <malloc>
if (tty->cbuf == NULL) {
ffc05ab0: 2f 83 00 00 cmpwi cr7,r3,0
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
ffc05ab4: 90 7f 00 1c stw r3,28(r31)
if (tty->cbuf == NULL) {
ffc05ab8: 40 be 00 18 bne+ cr7,ffc05ad0 <rtems_termios_open+0x100><== ALWAYS TAKEN
free((void *)(tty->rawOutBuf.theBuf));
ffc05abc: 7e e3 bb 78 mr r3,r23 <== NOT EXECUTED
ffc05ac0: 4b ff ee 09 bl ffc048c8 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
ffc05ac4: 7f 03 c3 78 mr r3,r24
ffc05ac8: 4b ff ee 01 bl ffc048c8 <free>
ffc05acc: 4b ff ff a0 b ffc05a6c <rtems_termios_open+0x9c>
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
ffc05ad0: 2f 9d 00 00 cmpwi cr7,r29,0
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
ffc05ad4: 93 bf 00 00 stw r29,0(r31)
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
ffc05ad8: 38 00 00 00 li r0,0
ffc05adc: 90 1f 00 d4 stw r0,212(r31)
tty->tty_snd.sw_arg = NULL;
ffc05ae0: 90 1f 00 d8 stw r0,216(r31)
tty->tty_rcv.sw_pfn = NULL;
ffc05ae4: 90 1f 00 dc stw r0,220(r31)
tty->tty_rcv.sw_arg = NULL;
ffc05ae8: 90 1f 00 e0 stw r0,224(r31)
tty->tty_rcvwakeup = 0;
ffc05aec: 90 1f 00 e4 stw r0,228(r31)
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
ffc05af0: 90 1f 00 04 stw r0,4(r31)
if (rtems_termios_ttyHead != NULL)
ffc05af4: 41 9e 00 08 beq- cr7,ffc05afc <rtems_termios_open+0x12c>
rtems_termios_ttyHead->back = tty;
ffc05af8: 93 fd 00 04 stw r31,4(r29)
rtems_termios_ttyHead = tty;
ffc05afc: 3d 20 00 00 lis r9,0
ffc05b00: 93 e9 27 c0 stw r31,10176(r9)
if (rtems_termios_ttyTail == NULL)
ffc05b04: 3d 20 00 00 lis r9,0
ffc05b08: 80 09 27 bc lwz r0,10172(r9)
ffc05b0c: 2f 80 00 00 cmpwi cr7,r0,0
ffc05b10: 40 be 00 08 bne+ cr7,ffc05b18 <rtems_termios_open+0x148>
rtems_termios_ttyTail = tty;
ffc05b14: 93 e9 27 bc stw r31,10172(r9)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
ffc05b18: 3f a0 00 00 lis r29,0
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
ffc05b1c: 93 7f 00 10 stw r27,16(r31)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
ffc05b20: 3b bd 21 a8 addi r29,r29,8616
ffc05b24: 88 7d 00 0c lbz r3,12(r29)
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
ffc05b28: 38 80 00 01 li r4,1
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
tty->major = major;
ffc05b2c: 93 9f 00 0c stw r28,12(r31)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
ffc05b30: 38 a0 00 54 li r5,84
ffc05b34: 64 63 54 52 oris r3,r3,21586
ffc05b38: 60 63 69 00 ori r3,r3,26880
ffc05b3c: 38 c0 00 00 li r6,0
ffc05b40: 38 ff 00 14 addi r7,r31,20
ffc05b44: 48 00 22 59 bl ffc07d9c <rtems_semaphore_create>
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)
ffc05b48: 2f 83 00 00 cmpwi cr7,r3,0
ffc05b4c: 40 9e 02 64 bne- cr7,ffc05db0 <rtems_termios_open+0x3e0>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'o', c),
ffc05b50: 88 7d 00 0c lbz r3,12(r29)
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
ffc05b54: 38 80 00 01 li r4,1
ffc05b58: 38 a0 00 54 li r5,84
ffc05b5c: 64 63 54 52 oris r3,r3,21586
ffc05b60: 60 63 6f 00 ori r3,r3,28416
ffc05b64: 38 c0 00 00 li r6,0
ffc05b68: 38 ff 00 18 addi r7,r31,24
ffc05b6c: 48 00 22 31 bl ffc07d9c <rtems_semaphore_create>
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)
ffc05b70: 2f 83 00 00 cmpwi cr7,r3,0
ffc05b74: 40 9e 02 3c bne- cr7,ffc05db0 <rtems_termios_open+0x3e0>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'x', c),
ffc05b78: 88 7d 00 0c lbz r3,12(r29)
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
ffc05b7c: 38 80 00 00 li r4,0
ffc05b80: 38 a0 00 20 li r5,32
ffc05b84: 64 63 54 52 oris r3,r3,21586
ffc05b88: 60 63 78 00 ori r3,r3,30720
ffc05b8c: 38 c0 00 00 li r6,0
ffc05b90: 38 ff 00 8c addi r7,r31,140
ffc05b94: 48 00 22 09 bl ffc07d9c <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
ffc05b98: 7c 60 1b 79 mr. r0,r3
ffc05b9c: 40 82 02 14 bne- ffc05db0 <rtems_termios_open+0x3e0>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
ffc05ba0: 38 9f 00 98 addi r4,r31,152
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;
ffc05ba4: 90 1f 00 94 stw r0,148(r31)
/*
* Set callbacks
*/
tty->device = *callbacks;
ffc05ba8: 7c b9 04 aa lswi r5,r25,32
ffc05bac: 7c a4 05 aa stswi r5,r4,32
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
ffc05bb0: 80 1f 00 b4 lwz r0,180(r31)
ffc05bb4: 2f 80 00 02 cmpwi cr7,r0,2
ffc05bb8: 40 be 00 5c bne+ cr7,ffc05c14 <rtems_termios_open+0x244>
sc = rtems_task_create (
rtems_build_name ('T', 'x', 'T', c),
ffc05bbc: 88 7d 00 0c lbz r3,12(r29)
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
ffc05bc0: 38 80 00 0a li r4,10
ffc05bc4: 38 a0 04 00 li r5,1024
ffc05bc8: 64 63 54 78 oris r3,r3,21624
ffc05bcc: 60 63 54 00 ori r3,r3,21504
ffc05bd0: 38 c0 05 00 li r6,1280
ffc05bd4: 38 e0 00 00 li r7,0
ffc05bd8: 39 1f 00 c8 addi r8,r31,200
ffc05bdc: 48 00 26 19 bl ffc081f4 <rtems_task_create>
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
ffc05be0: 2f 83 00 00 cmpwi cr7,r3,0
ffc05be4: 40 9e 01 cc bne- cr7,ffc05db0 <rtems_termios_open+0x3e0><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
rtems_build_name ('R', 'x', 'T', c),
ffc05be8: 88 7d 00 0c lbz r3,12(r29)
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
ffc05bec: 38 80 00 09 li r4,9
ffc05bf0: 38 a0 04 00 li r5,1024
ffc05bf4: 64 63 52 78 oris r3,r3,21112
ffc05bf8: 60 63 54 00 ori r3,r3,21504
ffc05bfc: 38 c0 05 00 li r6,1280
ffc05c00: 38 e0 00 00 li r7,0
ffc05c04: 39 1f 00 c4 addi r8,r31,196
ffc05c08: 48 00 25 ed bl ffc081f4 <rtems_task_create>
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
ffc05c0c: 2f 83 00 00 cmpwi cr7,r3,0
ffc05c10: 40 9e 01 a0 bne- cr7,ffc05db0 <rtems_termios_open+0x3e0><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
ffc05c14: 80 1f 00 a0 lwz r0,160(r31)
ffc05c18: 2f 80 00 00 cmpwi cr7,r0,0
ffc05c1c: 41 9e 00 10 beq- cr7,ffc05c2c <rtems_termios_open+0x25c>
ffc05c20: 80 1f 00 b4 lwz r0,180(r31)
ffc05c24: 2f 80 00 02 cmpwi cr7,r0,2
ffc05c28: 40 be 00 30 bne+ cr7,ffc05c58 <rtems_termios_open+0x288>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'r', c),
ffc05c2c: 3d 20 00 00 lis r9,0
ffc05c30: 88 69 21 b4 lbz r3,8628(r9)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
ffc05c34: 38 80 00 00 li r4,0
ffc05c38: 38 a0 00 24 li r5,36
ffc05c3c: 64 63 54 52 oris r3,r3,21586
ffc05c40: 60 63 72 00 ori r3,r3,29184
ffc05c44: 38 c0 00 00 li r6,0
ffc05c48: 38 ff 00 68 addi r7,r31,104
ffc05c4c: 48 00 21 51 bl ffc07d9c <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
ffc05c50: 2f 83 00 00 cmpwi cr7,r3,0
ffc05c54: 40 9e 01 5c bne- cr7,ffc05db0 <rtems_termios_open+0x3e0><== NEVER TAKEN
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
ffc05c58: 38 00 25 02 li r0,9474
ffc05c5c: 90 1f 00 30 stw r0,48(r31)
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
ffc05c60: 38 00 18 05 li r0,6149
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
ffc05c64: 3d 20 00 00 lis r9,0
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
ffc05c68: 90 1f 00 34 stw r0,52(r31)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
ffc05c6c: 38 00 08 bd li r0,2237
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
ffc05c70: 39 29 21 a8 addi r9,r9,8616
/*
* 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;
ffc05c74: 90 1f 00 38 stw r0,56(r31)
tty->termios.c_lflag =
ffc05c78: 38 00 00 00 li r0,0
ffc05c7c: 60 00 82 3b ori r0,r0,33339
ffc05c80: 90 1f 00 3c stw r0,60(r31)
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
ffc05c84: 38 00 00 03 li r0,3
ffc05c88: 98 1f 00 41 stb r0,65(r31)
tty->termios.c_cc[VQUIT] = '\034';
ffc05c8c: 38 00 00 1c li r0,28
ffc05c90: 98 1f 00 42 stb r0,66(r31)
tty->termios.c_cc[VERASE] = '\177';
ffc05c94: 38 00 00 7f li r0,127
ffc05c98: 98 1f 00 43 stb r0,67(r31)
tty->termios.c_cc[VKILL] = '\025';
ffc05c9c: 38 00 00 15 li r0,21
ffc05ca0: 98 1f 00 44 stb r0,68(r31)
tty->termios.c_cc[VEOF] = '\004';
ffc05ca4: 38 00 00 04 li r0,4
ffc05ca8: 98 1f 00 45 stb r0,69(r31)
tty->termios.c_cc[VEOL] = '\000';
ffc05cac: 38 00 00 00 li r0,0
ffc05cb0: 98 1f 00 4c stb r0,76(r31)
tty->termios.c_cc[VEOL2] = '\000';
ffc05cb4: 98 1f 00 51 stb r0,81(r31)
tty->termios.c_cc[VSTART] = '\021';
ffc05cb8: 38 00 00 11 li r0,17
ffc05cbc: 98 1f 00 49 stb r0,73(r31)
tty->termios.c_cc[VSTOP] = '\023';
ffc05cc0: 38 00 00 13 li r0,19
ffc05cc4: 98 1f 00 4a stb r0,74(r31)
tty->termios.c_cc[VSUSP] = '\032';
ffc05cc8: 38 00 00 1a li r0,26
ffc05ccc: 98 1f 00 4b stb r0,75(r31)
tty->termios.c_cc[VREPRINT] = '\022';
ffc05cd0: 38 00 00 12 li r0,18
ffc05cd4: 98 1f 00 4d stb r0,77(r31)
tty->termios.c_cc[VDISCARD] = '\017';
ffc05cd8: 38 00 00 0f li r0,15
ffc05cdc: 98 1f 00 4e stb r0,78(r31)
tty->termios.c_cc[VWERASE] = '\027';
ffc05ce0: 38 00 00 17 li r0,23
ffc05ce4: 98 1f 00 4f stb r0,79(r31)
tty->termios.c_cc[VLNEXT] = '\026';
ffc05ce8: 38 00 00 16 li r0,22
ffc05cec: 98 1f 00 50 stb r0,80(r31)
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
ffc05cf0: 38 00 00 00 li r0,0
ffc05cf4: 90 1f 00 b8 stw r0,184(r31)
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
ffc05cf8: 80 1f 00 64 lwz r0,100(r31)
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
ffc05cfc: 89 69 00 0c lbz r11,12(r9)
/* 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;
ffc05d00: 54 00 f8 7e rlwinm r0,r0,31,1,31
ffc05d04: 90 1f 00 bc stw r0,188(r31)
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
ffc05d08: 2f 8b 00 7a cmpwi cr7,r11,122
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;
ffc05d0c: 80 1f 00 64 lwz r0,100(r31)
ffc05d10: 1c 00 00 03 mulli r0,r0,3
ffc05d14: 54 00 f0 be rlwinm r0,r0,30,2,31
ffc05d18: 90 1f 00 c0 stw r0,192(r31)
/*
* Bump name characer
*/
if (c++ == 'z')
ffc05d1c: 38 0b 00 01 addi r0,r11,1
ffc05d20: 98 09 00 0c stb r0,12(r9)
ffc05d24: 40 be 00 0c bne+ cr7,ffc05d30 <rtems_termios_open+0x360>
c = 'a';
ffc05d28: 38 00 00 61 li r0,97
ffc05d2c: 98 09 00 0c stb r0,12(r9)
}
args->iop->data1 = tty;
ffc05d30: 81 3a 00 00 lwz r9,0(r26)
ffc05d34: 93 e9 00 38 stw r31,56(r9)
if (!tty->refcount++) {
ffc05d38: 81 3f 00 08 lwz r9,8(r31)
ffc05d3c: 2f 89 00 00 cmpwi cr7,r9,0
ffc05d40: 38 09 00 01 addi r0,r9,1
ffc05d44: 90 1f 00 08 stw r0,8(r31)
ffc05d48: 40 9e 00 6c bne- cr7,ffc05db4 <rtems_termios_open+0x3e4>
if (tty->device.firstOpen)
ffc05d4c: 80 1f 00 98 lwz r0,152(r31)
ffc05d50: 2f 80 00 00 cmpwi cr7,r0,0
ffc05d54: 41 9e 00 18 beq- cr7,ffc05d6c <rtems_termios_open+0x39c><== ALWAYS TAKEN
(*tty->device.firstOpen)(major, minor, arg);
ffc05d58: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc05d5c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc05d60: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc05d64: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED
ffc05d68: 4e 80 04 21 bctrl <== NOT EXECUTED
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
ffc05d6c: 80 1f 00 b4 lwz r0,180(r31)
ffc05d70: 2f 80 00 02 cmpwi cr7,r0,2
ffc05d74: 40 be 00 40 bne+ cr7,ffc05db4 <rtems_termios_open+0x3e4>
sc = rtems_task_start(
ffc05d78: 80 7f 00 c4 lwz r3,196(r31)
ffc05d7c: 3c 80 ff c0 lis r4,-64
ffc05d80: 38 84 72 3c addi r4,r4,29244
ffc05d84: 7f e5 fb 78 mr r5,r31
ffc05d88: 48 00 27 35 bl ffc084bc <rtems_task_start>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
ffc05d8c: 2f 83 00 00 cmpwi cr7,r3,0
ffc05d90: 40 9e 00 20 bne- cr7,ffc05db0 <rtems_termios_open+0x3e0><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
ffc05d94: 80 7f 00 c8 lwz r3,200(r31)
ffc05d98: 3c 80 ff c0 lis r4,-64
ffc05d9c: 38 84 74 98 addi r4,r4,29848
ffc05da0: 7f e5 fb 78 mr r5,r31
ffc05da4: 48 00 27 19 bl ffc084bc <rtems_task_start>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
ffc05da8: 2f 83 00 00 cmpwi cr7,r3,0
ffc05dac: 41 be 00 08 beq+ cr7,ffc05db4 <rtems_termios_open+0x3e4><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
ffc05db0: 48 00 2a 35 bl ffc087e4 <rtems_fatal_error_occurred>
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
ffc05db4: 3d 20 00 00 lis r9,0
ffc05db8: 80 69 27 b8 lwz r3,10168(r9)
ffc05dbc: 48 00 23 81 bl ffc0813c <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
ffc05dc0: 39 61 00 30 addi r11,r1,48
ffc05dc4: 7f c3 f3 78 mr r3,r30
ffc05dc8: 4b ff a7 48 b ffc00510 <_restgpr_22_x>
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
ffc05dcc: 38 60 00 01 li r3,1
ffc05dd0: 38 80 00 e8 li r4,232
ffc05dd4: 4b ff e5 dd bl ffc043b0 <calloc>
if (tty == NULL) {
ffc05dd8: 7c 7f 1b 79 mr. r31,r3
ffc05ddc: 40 82 fc 68 bne+ ffc05a44 <rtems_termios_open+0x74>
ffc05de0: 4b ff fc 94 b ffc05a74 <rtems_termios_open+0xa4>
ffc063b8 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
ffc063b8: 94 21 ff d8 stwu r1,-40(r1)
ffc063bc: 7c 08 02 a6 mflr r0
ffc063c0: 90 01 00 2c stw r0,44(r1)
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
ffc063c4: 80 05 00 b4 lwz r0,180(r5)
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
ffc063c8: bf 01 00 08 stmw r24,8(r1)
ffc063cc: 7c 7b 1b 78 mr r27,r3
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
ffc063d0: 2f 80 00 00 cmpwi cr7,r0,0
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
ffc063d4: 7c 9a 23 78 mr r26,r4
ffc063d8: 7c bf 2b 78 mr r31,r5
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
ffc063dc: 40 be 00 20 bne+ cr7,ffc063fc <rtems_termios_puts+0x44>
(*tty->device.write)(tty->minor, buf, len);
ffc063e0: 80 05 00 a4 lwz r0,164(r5)
ffc063e4: 7f 64 db 78 mr r4,r27
ffc063e8: 80 65 00 10 lwz r3,16(r5)
ffc063ec: 7f 45 d3 78 mr r5,r26
ffc063f0: 7c 09 03 a6 mtctr r0
ffc063f4: 4e 80 04 21 bctrl
return;
ffc063f8: 48 00 00 d8 b ffc064d0 <rtems_termios_puts+0x118>
}
newHead = tty->rawOutBuf.Head;
ffc063fc: 83 a5 00 80 lwz r29,128(r5)
while (len) {
ffc06400: 3b c0 00 00 li r30,0
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
ffc06404: 3b 00 00 02 li r24,2
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
ffc06408: 3b 20 00 01 li r25,1
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
ffc0640c: 48 00 00 bc b ffc064c8 <rtems_termios_puts+0x110>
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
ffc06410: 80 1f 00 88 lwz r0,136(r31)
ffc06414: 3b bd 00 01 addi r29,r29,1
ffc06418: 7d 3d 03 96 divwu r9,r29,r0
ffc0641c: 7c 09 01 d6 mullw r0,r9,r0
ffc06420: 7f a0 e8 50 subf r29,r0,r29
ffc06424: 48 00 00 28 b ffc0644c <rtems_termios_puts+0x94>
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
ffc06428: 93 1f 00 94 stw r24,148(r31)
ffc0642c: 7f 80 01 24 mtmsr r28
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
ffc06430: 80 7f 00 8c lwz r3,140(r31)
ffc06434: 38 80 00 00 li r4,0
ffc06438: 38 a0 00 00 li r5,0
ffc0643c: 48 00 1b d5 bl ffc08010 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc06440: 2f 83 00 00 cmpwi cr7,r3,0
ffc06444: 41 be 00 08 beq+ cr7,ffc0644c <rtems_termios_puts+0x94> <== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
ffc06448: 48 00 23 9d bl ffc087e4 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
ffc0644c: 4b ff f5 0d bl ffc05958 <ppc_interrupt_disable>
ffc06450: 7c 7c 1b 78 mr r28,r3
* 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) {
ffc06454: 80 1f 00 84 lwz r0,132(r31)
ffc06458: 7f 9d 00 00 cmpw cr7,r29,r0
ffc0645c: 41 9e ff cc beq+ cr7,ffc06428 <rtems_termios_puts+0x70>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
ffc06460: 80 1f 00 80 lwz r0,128(r31)
ffc06464: 7d 7b f0 ae lbzx r11,r27,r30
ffc06468: 81 3f 00 7c lwz r9,124(r31)
ffc0646c: 7d 69 01 ae stbx r11,r9,r0
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
ffc06470: 80 1f 00 94 lwz r0,148(r31)
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
ffc06474: 93 bf 00 80 stw r29,128(r31)
if (tty->rawOutBufState == rob_idle) {
ffc06478: 2f 80 00 00 cmpwi cr7,r0,0
ffc0647c: 40 9e 00 44 bne- cr7,ffc064c0 <rtems_termios_puts+0x108>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
ffc06480: 80 1f 00 b8 lwz r0,184(r31)
ffc06484: 70 09 00 10 andi. r9,r0,16
ffc06488: 40 a2 00 28 bne+ ffc064b0 <rtems_termios_puts+0xf8> <== NEVER TAKEN
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
ffc0648c: 81 3f 00 84 lwz r9,132(r31)
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,
ffc06490: 38 a0 00 01 li r5,1
ffc06494: 80 9f 00 7c lwz r4,124(r31)
ffc06498: 80 1f 00 a4 lwz r0,164(r31)
ffc0649c: 80 7f 00 10 lwz r3,16(r31)
ffc064a0: 7c 84 4a 14 add r4,r4,r9
ffc064a4: 7c 09 03 a6 mtctr r0
ffc064a8: 4e 80 04 21 bctrl
ffc064ac: 48 00 00 10 b ffc064bc <rtems_termios_puts+0x104>
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
ffc064b0: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc064b4: 60 00 00 20 ori r0,r0,32 <== NOT EXECUTED
ffc064b8: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
ffc064bc: 93 3f 00 94 stw r25,148(r31)
ffc064c0: 7f 80 01 24 mtmsr r28
ffc064c4: 3b de 00 01 addi r30,r30,1
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
ffc064c8: 7f 9e d0 00 cmpw cr7,r30,r26
ffc064cc: 40 9e ff 44 bne+ cr7,ffc06410 <rtems_termios_puts+0x58>
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
ffc064d0: 39 61 00 28 addi r11,r1,40
ffc064d4: 4b ff a0 44 b ffc00518 <_restgpr_24_x>
ffc06bc8 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
ffc06bc8: 94 21 ff d0 stwu r1,-48(r1)
ffc06bcc: 7c 08 02 a6 mflr r0
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc06bd0: 38 80 00 00 li r4,0
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
ffc06bd4: 90 01 00 34 stw r0,52(r1)
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc06bd8: 38 a0 00 00 li r5,0
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc06bdc: 81 23 00 00 lwz r9,0(r3)
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
ffc06be0: be e1 00 0c stmw r23,12(r1)
ffc06be4: 7c 7e 1b 78 mr r30,r3
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc06be8: 83 e9 00 38 lwz r31,56(r9)
uint32_t count = args->count;
ffc06bec: 83 63 00 14 lwz r27,20(r3)
char *buffer = args->buffer;
ffc06bf0: 83 43 00 10 lwz r26,16(r3)
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc06bf4: 80 7f 00 14 lwz r3,20(r31)
ffc06bf8: 48 00 14 19 bl ffc08010 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
ffc06bfc: 7c 7c 1b 79 mr. r28,r3
ffc06c00: 40 82 03 30 bne- ffc06f30 <rtems_termios_read+0x368> <== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
ffc06c04: 80 1f 00 cc lwz r0,204(r31)
ffc06c08: 3d 20 00 00 lis r9,0
ffc06c0c: 39 29 28 78 addi r9,r9,10360
ffc06c10: 54 00 28 34 rlwinm r0,r0,5,0,26
ffc06c14: 7d 29 02 14 add r9,r9,r0
ffc06c18: 80 09 00 08 lwz r0,8(r9)
ffc06c1c: 2f 80 00 00 cmpwi cr7,r0,0
ffc06c20: 41 9e 00 1c beq- cr7,ffc06c3c <rtems_termios_read+0x74>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
ffc06c24: 7f e3 fb 78 mr r3,r31
ffc06c28: 7c 09 03 a6 mtctr r0
ffc06c2c: 7f c4 f3 78 mr r4,r30
ffc06c30: 4e 80 04 21 bctrl
ffc06c34: 7c 7c 1b 78 mr r28,r3
ffc06c38: 48 00 02 e8 b ffc06f20 <rtems_termios_read+0x358>
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
ffc06c3c: 81 3f 00 24 lwz r9,36(r31)
ffc06c40: 80 1f 00 20 lwz r0,32(r31)
ffc06c44: 7f 89 00 00 cmpw cr7,r9,r0
ffc06c48: 40 be 02 b0 bne+ cr7,ffc06ef8 <rtems_termios_read+0x330><== NEVER TAKEN
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
ffc06c4c: 80 1f 00 28 lwz r0,40(r31)
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
ffc06c50: 93 9f 00 20 stw r28,32(r31)
tty->read_start_column = tty->column;
ffc06c54: 90 1f 00 2c stw r0,44(r31)
if (tty->device.pollRead != NULL &&
ffc06c58: 80 1f 00 a0 lwz r0,160(r31)
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
ffc06c5c: 93 9f 00 24 stw r28,36(r31)
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
ffc06c60: 2f 80 00 00 cmpwi cr7,r0,0
ffc06c64: 41 9e 00 f8 beq- cr7,ffc06d5c <rtems_termios_read+0x194>
ffc06c68: 80 1f 00 b4 lwz r0,180(r31)
ffc06c6c: 2f 80 00 00 cmpwi cr7,r0,0
ffc06c70: 40 be 00 ec bne+ cr7,ffc06d5c <rtems_termios_read+0x194>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
ffc06c74: 80 1f 00 3c lwz r0,60(r31)
ffc06c78: 70 09 00 02 andi. r9,r0,2
ffc06c7c: 41 82 00 40 beq- ffc06cbc <rtems_termios_read+0xf4>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
ffc06c80: 80 1f 00 a0 lwz r0,160(r31)
ffc06c84: 80 7f 00 10 lwz r3,16(r31)
ffc06c88: 7c 09 03 a6 mtctr r0
ffc06c8c: 4e 80 04 21 bctrl
if (n < 0) {
ffc06c90: 2c 03 00 00 cmpwi r3,0
ffc06c94: 40 a0 00 10 bge+ ffc06ca4 <rtems_termios_read+0xdc>
rtems_task_wake_after (1);
ffc06c98: 38 60 00 01 li r3,1
ffc06c9c: 48 00 18 f9 bl ffc08594 <rtems_task_wake_after>
ffc06ca0: 4b ff ff e0 b ffc06c80 <rtems_termios_read+0xb8>
} else {
if (siproc (n, tty))
ffc06ca4: 54 63 06 3e clrlwi r3,r3,24
ffc06ca8: 7f e4 fb 78 mr r4,r31
ffc06cac: 4b ff fd e1 bl ffc06a8c <siproc>
ffc06cb0: 2f 83 00 00 cmpwi cr7,r3,0
ffc06cb4: 41 9e ff cc beq+ cr7,ffc06c80 <rtems_termios_read+0xb8>
ffc06cb8: 48 00 02 40 b ffc06ef8 <rtems_termios_read+0x330>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
ffc06cbc: 48 00 0c 75 bl ffc07930 <rtems_clock_get_ticks_since_boot>
ffc06cc0: 7c 7d 1b 78 mr r29,r3
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
ffc06cc4: 80 1f 00 a0 lwz r0,160(r31)
ffc06cc8: 80 7f 00 10 lwz r3,16(r31)
ffc06ccc: 7c 09 03 a6 mtctr r0
ffc06cd0: 4e 80 04 21 bctrl
if (n < 0) {
ffc06cd4: 2c 03 00 00 cmpwi r3,0
ffc06cd8: 40 80 00 50 bge- ffc06d28 <rtems_termios_read+0x160>
if (tty->termios.c_cc[VMIN]) {
ffc06cdc: 88 1f 00 47 lbz r0,71(r31)
ffc06ce0: 2f 80 00 00 cmpwi cr7,r0,0
ffc06ce4: 88 1f 00 46 lbz r0,70(r31)
if (tty->termios.c_cc[VTIME] && tty->ccount) {
ffc06ce8: 70 09 00 ff andi. r9,r0,255
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
ffc06cec: 41 9e 00 18 beq- cr7,ffc06d04 <rtems_termios_read+0x13c><== NEVER TAKEN
if (tty->termios.c_cc[VTIME] && tty->ccount) {
ffc06cf0: 41 82 00 2c beq- ffc06d1c <rtems_termios_read+0x154> <== NEVER TAKEN
ffc06cf4: 80 1f 00 20 lwz r0,32(r31)
ffc06cf8: 2f 80 00 00 cmpwi cr7,r0,0
ffc06cfc: 41 be 00 20 beq+ cr7,ffc06d1c <rtems_termios_read+0x154>
ffc06d00: 48 00 00 08 b ffc06d08 <rtems_termios_read+0x140>
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
ffc06d04: 41 82 01 f4 beq- ffc06ef8 <rtems_termios_read+0x330> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
ffc06d08: 48 00 0c 29 bl ffc07930 <rtems_clock_get_ticks_since_boot>
if ((now - then) > tty->vtimeTicks) {
ffc06d0c: 80 1f 00 54 lwz r0,84(r31)
ffc06d10: 7c 7d 18 50 subf r3,r29,r3
ffc06d14: 7f 83 00 40 cmplw cr7,r3,r0
ffc06d18: 41 9d 01 e0 bgt- cr7,ffc06ef8 <rtems_termios_read+0x330>
break;
}
}
rtems_task_wake_after (1);
ffc06d1c: 38 60 00 01 li r3,1
ffc06d20: 48 00 18 75 bl ffc08594 <rtems_task_wake_after>
ffc06d24: 4b ff ff a0 b ffc06cc4 <rtems_termios_read+0xfc>
} else {
siproc (n, tty);
ffc06d28: 54 63 06 3e clrlwi r3,r3,24
ffc06d2c: 7f e4 fb 78 mr r4,r31
ffc06d30: 4b ff fd 5d bl ffc06a8c <siproc>
if (tty->ccount >= tty->termios.c_cc[VMIN])
ffc06d34: 88 1f 00 47 lbz r0,71(r31)
ffc06d38: 81 3f 00 20 lwz r9,32(r31)
ffc06d3c: 7f 89 00 00 cmpw cr7,r9,r0
ffc06d40: 40 9c 01 b8 bge- cr7,ffc06ef8 <rtems_termios_read+0x330>
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
ffc06d44: 2f 80 00 00 cmpwi cr7,r0,0
ffc06d48: 41 be ff 7c beq- cr7,ffc06cc4 <rtems_termios_read+0xfc> <== NEVER TAKEN
ffc06d4c: 88 1f 00 46 lbz r0,70(r31)
ffc06d50: 2f 80 00 00 cmpwi cr7,r0,0
ffc06d54: 41 9e ff 70 beq+ cr7,ffc06cc4 <rtems_termios_read+0xfc> <== NEVER TAKEN
ffc06d58: 4b ff ff 64 b ffc06cbc <rtems_termios_read+0xf4>
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
ffc06d5c: 83 3f 00 74 lwz r25,116(r31)
rtems_status_code sc;
int wait = (int)1;
ffc06d60: 3b a0 00 01 li r29,1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
ffc06d64: 3e e0 00 00 lis r23,0
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)(
ffc06d68: 3b 1f 00 49 addi r24,r31,73
ffc06d6c: 48 00 01 20 b ffc06e8c <rtems_termios_read+0x2c4>
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;
ffc06d70: 81 3f 00 5c lwz r9,92(r31)
ffc06d74: 81 7f 00 64 lwz r11,100(r31)
ffc06d78: 39 29 00 01 addi r9,r9,1
ffc06d7c: 7c 09 5b 96 divwu r0,r9,r11
ffc06d80: 7c 00 59 d6 mullw r0,r0,r11
ffc06d84: 7c 00 48 50 subf r0,r0,r9
c = tty->rawInBuf.theBuf[newHead];
ffc06d88: 81 3f 00 58 lwz r9,88(r31)
ffc06d8c: 7f 29 00 ae lbzx r25,r9,r0
tty->rawInBuf.Head = newHead;
ffc06d90: 90 1f 00 5c stw r0,92(r31)
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
ffc06d94: 81 7f 00 60 lwz r11,96(r31)
ffc06d98: 81 5f 00 64 lwz r10,100(r31)
% tty->rawInBuf.Size)
ffc06d9c: 81 3f 00 64 lwz r9,100(r31)
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
ffc06da0: 7d 6a 5a 14 add r11,r10,r11
ffc06da4: 7c 00 58 50 subf r0,r0,r11
% tty->rawInBuf.Size)
ffc06da8: 7d 60 4b 96 divwu r11,r0,r9
ffc06dac: 7d 2b 49 d6 mullw r9,r11,r9
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
ffc06db0: 81 7f 00 bc lwz r11,188(r31)
% tty->rawInBuf.Size)
ffc06db4: 7c 09 00 50 subf r0,r9,r0
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
ffc06db8: 7f 80 58 40 cmplw cr7,r0,r11
ffc06dbc: 40 9c 00 84 bge- cr7,ffc06e40 <rtems_termios_read+0x278><== NEVER TAKEN
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
ffc06dc0: 80 1f 00 b8 lwz r0,184(r31)
ffc06dc4: 54 00 00 3c rlwinm r0,r0,0,0,30
ffc06dc8: 90 1f 00 b8 stw r0,184(r31)
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
ffc06dcc: 80 1f 00 b8 lwz r0,184(r31)
ffc06dd0: 70 00 02 02 andi. r0,r0,514
ffc06dd4: 2f 80 02 02 cmpwi cr7,r0,514
ffc06dd8: 40 be 00 38 bne+ cr7,ffc06e10 <rtems_termios_read+0x248><== ALWAYS TAKEN
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
ffc06ddc: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED
ffc06de0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc06de4: 41 9e 00 10 beq- cr7,ffc06df4 <rtems_termios_read+0x22c><== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
ffc06de8: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc06dec: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED
ffc06df0: 41 82 00 20 beq- ffc06e10 <rtems_termios_read+0x248> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
ffc06df4: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED
ffc06df8: 7f 04 c3 78 mr r4,r24 <== NOT EXECUTED
ffc06dfc: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc06e00: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc06e04: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc06e08: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc06e0c: 48 00 00 34 b ffc06e40 <rtems_termios_read+0x278> <== NOT EXECUTED
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
ffc06e10: 80 1f 00 b8 lwz r0,184(r31)
ffc06e14: 70 09 01 00 andi. r9,r0,256
ffc06e18: 41 82 00 28 beq- ffc06e40 <rtems_termios_read+0x278> <== ALWAYS TAKEN
tty->flow_ctrl &= ~FL_IRTSOFF;
ffc06e1c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc06e20: 54 00 07 b8 rlwinm r0,r0,0,30,28 <== NOT EXECUTED
ffc06e24: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
ffc06e28: 80 1f 00 b0 lwz r0,176(r31) <== NOT EXECUTED
ffc06e2c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc06e30: 41 9e 00 10 beq- cr7,ffc06e40 <rtems_termios_read+0x278><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
ffc06e34: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc06e38: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc06e3c: 4e 80 04 21 bctrl <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
ffc06e40: 80 1f 00 3c lwz r0,60(r31)
if (siproc (c, tty))
ffc06e44: 7f 23 cb 78 mr r3,r25
ffc06e48: 7f e4 fb 78 mr r4,r31
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
ffc06e4c: 70 09 00 02 andi. r9,r0,2
ffc06e50: 41 82 00 18 beq- ffc06e68 <rtems_termios_read+0x2a0> <== NEVER TAKEN
if (siproc (c, tty))
ffc06e54: 4b ff fc 39 bl ffc06a8c <siproc>
wait = 0;
ffc06e58: 30 63 ff ff addic r3,r3,-1
ffc06e5c: 7c 63 19 10 subfe r3,r3,r3
ffc06e60: 7f bd 18 38 and r29,r29,r3
ffc06e64: 48 00 00 24 b ffc06e88 <rtems_termios_read+0x2c0>
} else {
siproc (c, tty);
ffc06e68: 4b ff fc 25 bl ffc06a8c <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
ffc06e6c: 88 1f 00 47 lbz r0,71(r31) <== NOT EXECUTED
ffc06e70: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED
wait = 0;
ffc06e74: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED
ffc06e78: 7c 00 00 26 mfcr r0 <== NOT EXECUTED
ffc06e7c: 54 00 ef fe rlwinm r0,r0,29,31,31 <== NOT EXECUTED
ffc06e80: 7c 00 00 d0 neg r0,r0 <== NOT EXECUTED
ffc06e84: 7f bd 00 38 and r29,r29,r0 <== NOT EXECUTED
}
timeout = tty->rawInBufSemaphoreTimeout;
ffc06e88: 83 3f 00 70 lwz r25,112(r31)
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
ffc06e8c: 81 3f 00 5c lwz r9,92(r31)
ffc06e90: 80 1f 00 60 lwz r0,96(r31)
ffc06e94: 7f 89 00 00 cmpw cr7,r9,r0
ffc06e98: 41 9e 00 1c beq- cr7,ffc06eb4 <rtems_termios_read+0x2ec>
(tty->ccount < (CBUFSIZE-1))) {
ffc06e9c: 39 37 21 a8 addi r9,r23,8616
ffc06ea0: 81 29 00 08 lwz r9,8(r9)
ffc06ea4: 38 09 ff ff addi r0,r9,-1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
ffc06ea8: 81 3f 00 20 lwz r9,32(r31)
ffc06eac: 7f 89 00 00 cmpw cr7,r9,r0
ffc06eb0: 41 9c fe c0 blt+ cr7,ffc06d70 <rtems_termios_read+0x1a8><== ALWAYS TAKEN
}
/*
* Wait for characters
*/
if ( wait ) {
ffc06eb4: 2f 9d 00 00 cmpwi cr7,r29,0
ffc06eb8: 41 be 00 40 beq+ cr7,ffc06ef8 <rtems_termios_read+0x330>
sc = rtems_semaphore_obtain(
ffc06ebc: 80 7f 00 68 lwz r3,104(r31)
ffc06ec0: 7f 25 cb 78 mr r5,r25
ffc06ec4: 80 9f 00 6c lwz r4,108(r31)
ffc06ec8: 48 00 11 49 bl ffc08010 <rtems_semaphore_obtain>
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
ffc06ecc: 2f 83 00 00 cmpwi cr7,r3,0
ffc06ed0: 41 9e ff bc beq+ cr7,ffc06e8c <rtems_termios_read+0x2c4><== ALWAYS TAKEN
ffc06ed4: 48 00 00 24 b ffc06ef8 <rtems_termios_read+0x330> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
ffc06ed8: 81 7f 00 1c lwz r11,28(r31)
count--;
ffc06edc: 3b 7b ff ff addi r27,r27,-1
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
ffc06ee0: 7c 0b 48 ae lbzx r0,r11,r9
ffc06ee4: 39 29 00 01 addi r9,r9,1
ffc06ee8: 98 1a 00 00 stb r0,0(r26)
ffc06eec: 3b 5a 00 01 addi r26,r26,1
ffc06ef0: 91 3f 00 24 stw r9,36(r31)
ffc06ef4: 48 00 00 0c b ffc06f00 <rtems_termios_read+0x338>
ffc06ef8: 38 1b 00 01 addi r0,r27,1
ffc06efc: 7c 09 03 a6 mtctr r0
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
ffc06f00: 42 40 00 14 bdz- ffc06f14 <rtems_termios_read+0x34c>
ffc06f04: 81 3f 00 24 lwz r9,36(r31)
ffc06f08: 80 1f 00 20 lwz r0,32(r31)
ffc06f0c: 7f 89 00 00 cmpw cr7,r9,r0
ffc06f10: 41 9c ff c8 blt+ cr7,ffc06ed8 <rtems_termios_read+0x310>
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
ffc06f14: 80 1e 00 14 lwz r0,20(r30)
ffc06f18: 7f 7b 00 50 subf r27,r27,r0
ffc06f1c: 93 7e 00 1c stw r27,28(r30)
tty->tty_rcvwakeup = 0;
ffc06f20: 38 00 00 00 li r0,0
rtems_semaphore_release (tty->isem);
ffc06f24: 80 7f 00 14 lwz r3,20(r31)
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
tty->tty_rcvwakeup = 0;
ffc06f28: 90 1f 00 e4 stw r0,228(r31)
rtems_semaphore_release (tty->isem);
ffc06f2c: 48 00 12 11 bl ffc0813c <rtems_semaphore_release>
return sc;
}
ffc06f30: 39 61 00 30 addi r11,r1,48
ffc06f34: 7f 83 e3 78 mr r3,r28
ffc06f38: 4b ff 95 dc b ffc00514 <_restgpr_23_x>
ffc072b4 <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)
{
ffc072b4: 94 21 ff e8 stwu r1,-24(r1)
ffc072b8: 7c 08 02 a6 mflr r0
ffc072bc: 90 01 00 1c stw r0,28(r1)
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
ffc072c0: 80 03 00 b8 lwz r0,184(r3)
* 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)
{
ffc072c4: bf a1 00 0c stmw r29,12(r1)
ffc072c8: 7c 7f 1b 78 mr r31,r3
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
ffc072cc: 70 00 04 03 andi. r0,r0,1027
ffc072d0: 2f 80 04 01 cmpwi cr7,r0,1025
ffc072d4: 40 be 00 38 bne+ cr7,ffc0730c <rtems_termios_refill_transmitter+0x58><== ALWAYS TAKEN
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
ffc072d8: 80 03 00 a4 lwz r0,164(r3) <== NOT EXECUTED
ffc072dc: 38 9f 00 4a addi r4,r31,74 <== NOT EXECUTED
ffc072e0: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc072e4: 80 63 00 10 lwz r3,16(r3) <== NOT EXECUTED
ffc072e8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc072ec: 4e 80 04 21 bctrl <== NOT EXECUTED
rtems_interrupt_disable(level);
ffc072f0: 4b ff e6 69 bl ffc05958 <ppc_interrupt_disable> <== NOT EXECUTED
tty->t_dqlen--;
ffc072f4: 81 3f 00 90 lwz r9,144(r31) <== NOT EXECUTED
ffc072f8: 38 09 ff ff addi r0,r9,-1 <== NOT EXECUTED
ffc072fc: 90 1f 00 90 stw r0,144(r31) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
ffc07300: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc07304: 60 00 00 02 ori r0,r0,2 <== NOT EXECUTED
ffc07308: 48 00 00 44 b ffc0734c <rtems_termios_refill_transmitter+0x98><== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
ffc0730c: 80 03 00 b8 lwz r0,184(r3)
ffc07310: 54 00 07 be clrlwi r0,r0,30
ffc07314: 2f 80 00 02 cmpwi cr7,r0,2
ffc07318: 40 be 00 44 bne+ cr7,ffc0735c <rtems_termios_refill_transmitter+0xa8><== ALWAYS TAKEN
* 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, (void *)&(tty->termios.c_cc[VSTART]), 1);
ffc0731c: 80 03 00 a4 lwz r0,164(r3) <== NOT EXECUTED
ffc07320: 38 9f 00 49 addi r4,r31,73 <== NOT EXECUTED
ffc07324: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc07328: 80 63 00 10 lwz r3,16(r3) <== NOT EXECUTED
ffc0732c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc07330: 4e 80 04 21 bctrl <== NOT EXECUTED
rtems_interrupt_disable(level);
ffc07334: 4b ff e6 25 bl ffc05958 <ppc_interrupt_disable> <== NOT EXECUTED
tty->t_dqlen--;
ffc07338: 81 3f 00 90 lwz r9,144(r31) <== NOT EXECUTED
ffc0733c: 38 09 ff ff addi r0,r9,-1 <== NOT EXECUTED
ffc07340: 90 1f 00 90 stw r0,144(r31) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
ffc07344: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc07348: 54 00 07 fa rlwinm r0,r0,0,31,29 <== NOT EXECUTED
ffc0734c: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED
ffc07350: 7c 60 01 24 mtmsr r3 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
ffc07354: 3b c0 00 01 li r30,1 <== NOT EXECUTED
ffc07358: 48 00 01 34 b ffc0748c <rtems_termios_refill_transmitter+0x1d8><== NOT EXECUTED
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
ffc0735c: 81 23 00 80 lwz r9,128(r3)
ffc07360: 80 03 00 84 lwz r0,132(r3)
ffc07364: 7f 89 00 00 cmpw cr7,r9,r0
ffc07368: 40 9e 00 20 bne- cr7,ffc07388 <rtems_termios_refill_transmitter+0xd4>
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
ffc0736c: 80 03 00 94 lwz r0,148(r3)
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
ffc07370: 3b c0 00 00 li r30,0
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
ffc07374: 2f 80 00 02 cmpwi cr7,r0,2
ffc07378: 40 be 01 14 bne+ cr7,ffc0748c <rtems_termios_refill_transmitter+0x1d8><== ALWAYS TAKEN
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
ffc0737c: 80 63 00 8c lwz r3,140(r3) <== NOT EXECUTED
ffc07380: 48 00 0d bd bl ffc0813c <rtems_semaphore_release> <== NOT EXECUTED
ffc07384: 48 00 01 08 b ffc0748c <rtems_termios_refill_transmitter+0x1d8><== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
ffc07388: 4b ff e5 d1 bl ffc05958 <ppc_interrupt_disable>
len = tty->t_dqlen;
tty->t_dqlen = 0;
ffc0738c: 38 00 00 00 li r0,0
}
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
ffc07390: 83 bf 00 90 lwz r29,144(r31)
tty->t_dqlen = 0;
ffc07394: 90 1f 00 90 stw r0,144(r31)
ffc07398: 7c 60 01 24 mtmsr r3
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
ffc0739c: 80 1f 00 84 lwz r0,132(r31)
ffc073a0: 81 3f 00 88 lwz r9,136(r31)
ffc073a4: 7c 1d 02 14 add r0,r29,r0
ffc073a8: 7f a0 4b 96 divwu r29,r0,r9
ffc073ac: 7f bd 49 d6 mullw r29,r29,r9
ffc073b0: 7f bd 00 50 subf r29,r29,r0
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
ffc073b4: 80 1f 00 94 lwz r0,148(r31)
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
tty->rawOutBuf.Tail = newTail;
ffc073b8: 93 bf 00 84 stw r29,132(r31)
if (tty->rawOutBufState == rob_wait) {
ffc073bc: 2f 80 00 02 cmpwi cr7,r0,2
ffc073c0: 40 be 00 0c bne+ cr7,ffc073cc <rtems_termios_refill_transmitter+0x118>
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
ffc073c4: 80 7f 00 8c lwz r3,140(r31)
ffc073c8: 48 00 0d 75 bl ffc0813c <rtems_semaphore_release>
}
if (newTail == tty->rawOutBuf.Head) {
ffc073cc: 80 1f 00 80 lwz r0,128(r31)
ffc073d0: 7f 9d 00 00 cmpw cr7,r29,r0
ffc073d4: 40 be 00 30 bne+ cr7,ffc07404 <rtems_termios_refill_transmitter+0x150>
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
ffc073d8: 38 00 00 00 li r0,0
ffc073dc: 90 1f 00 94 stw r0,148(r31)
nToSend = 0;
ffc073e0: 3b c0 00 00 li r30,0
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
ffc073e4: 80 1f 00 d4 lwz r0,212(r31)
ffc073e8: 2f 80 00 00 cmpwi cr7,r0,0
ffc073ec: 41 9e 00 9c beq- cr7,ffc07488 <rtems_termios_refill_transmitter+0x1d4><== ALWAYS TAKEN
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
ffc073f0: 38 7f 00 30 addi r3,r31,48 <== NOT EXECUTED
ffc073f4: 80 9f 00 d8 lwz r4,216(r31) <== NOT EXECUTED
ffc073f8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc073fc: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc07400: 48 00 00 88 b ffc07488 <rtems_termios_refill_transmitter+0x1d4><== NOT EXECUTED
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
ffc07404: 80 1f 00 b8 lwz r0,184(r31)
ffc07408: 70 00 02 10 andi. r0,r0,528
ffc0740c: 2f 80 02 10 cmpwi cr7,r0,528
ffc07410: 40 be 00 28 bne+ cr7,ffc07438 <rtems_termios_refill_transmitter+0x184><== ALWAYS TAKEN
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
ffc07414: 4b ff e5 45 bl ffc05958 <ppc_interrupt_disable> <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
ffc07418: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc0741c: 60 00 00 20 ori r0,r0,32 <== NOT EXECUTED
ffc07420: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
ffc07424: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc07428: 90 1f 00 94 stw r0,148(r31) <== NOT EXECUTED
ffc0742c: 7c 60 01 24 mtmsr r3 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 0;
ffc07430: 3b c0 00 00 li r30,0 <== NOT EXECUTED
ffc07434: 48 00 00 54 b ffc07488 <rtems_termios_refill_transmitter+0x1d4><== NOT EXECUTED
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
ffc07438: 80 1f 00 80 lwz r0,128(r31)
ffc0743c: 7f 9d 00 40 cmplw cr7,r29,r0
ffc07440: 40 9d 00 0c ble- cr7,ffc0744c <rtems_termios_refill_transmitter+0x198>
nToSend = tty->rawOutBuf.Size - newTail;
ffc07444: 83 df 00 88 lwz r30,136(r31)
ffc07448: 48 00 00 08 b ffc07450 <rtems_termios_refill_transmitter+0x19c>
else
nToSend = tty->rawOutBuf.Head - newTail;
ffc0744c: 83 df 00 80 lwz r30,128(r31)
/* 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)) {
ffc07450: 80 1f 00 b8 lwz r0,184(r31)
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
ffc07454: 7f dd f0 50 subf r30,r29,r30
/* 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)) {
ffc07458: 70 09 06 00 andi. r9,r0,1536
ffc0745c: 41 82 00 08 beq- ffc07464 <rtems_termios_refill_transmitter+0x1b0>
nToSend = 1;
ffc07460: 3b c0 00 01 li r30,1
}
tty->rawOutBufState = rob_busy; /*apm*/
ffc07464: 38 00 00 01 li r0,1
(*tty->device.write)(
ffc07468: 80 9f 00 7c lwz r4,124(r31)
/* 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*/
ffc0746c: 90 1f 00 94 stw r0,148(r31)
(*tty->device.write)(
ffc07470: 7f c5 f3 78 mr r5,r30
ffc07474: 7c 84 ea 14 add r4,r4,r29
ffc07478: 80 1f 00 a4 lwz r0,164(r31)
ffc0747c: 80 7f 00 10 lwz r3,16(r31)
ffc07480: 7c 09 03 a6 mtctr r0
ffc07484: 4e 80 04 21 bctrl
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
ffc07488: 93 bf 00 84 stw r29,132(r31)
}
return nToSend;
}
ffc0748c: 39 61 00 18 addi r11,r1,24
ffc07490: 7f c3 f3 78 mr r3,r30
ffc07494: 4b ff 90 98 b ffc0052c <_restgpr_29_x>
ffc0723c <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
ffc0723c: 7c 2b 0b 78 mr r11,r1
ffc07240: 7c 08 02 a6 mflr r0
ffc07244: 94 21 ff e0 stwu r1,-32(r1)
ffc07248: 90 01 00 24 stw r0,36(r1)
ffc0724c: 48 01 30 e9 bl ffc1a334 <_savegpr_31>
ffc07250: 7c 7f 1b 78 mr r31,r3
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
ffc07254: 38 60 00 03 li r3,3
ffc07258: 38 80 00 02 li r4,2
ffc0725c: 38 a0 00 00 li r5,0
ffc07260: 38 c1 00 0c addi r6,r1,12
ffc07264: 48 00 07 5d bl ffc079c0 <rtems_event_receive>
(TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
ffc07268: 80 01 00 0c lwz r0,12(r1)
ffc0726c: 70 09 00 01 andi. r9,r0,1
ffc07270: 41 a2 00 14 beq+ ffc07284 <rtems_termios_rxdaemon+0x48> <== ALWAYS TAKEN
tty->rxTaskId = 0;
ffc07274: 38 00 00 00 li r0,0 <== NOT EXECUTED
ffc07278: 90 1f 00 c4 stw r0,196(r31) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
ffc0727c: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc07280: 48 00 10 b5 bl ffc08334 <rtems_task_delete> <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
ffc07284: 80 1f 00 a0 lwz r0,160(r31)
ffc07288: 80 7f 00 10 lwz r3,16(r31)
ffc0728c: 7c 09 03 a6 mtctr r0
ffc07290: 4e 80 04 21 bctrl
if (c != EOF) {
ffc07294: 2f 83 ff ff cmpwi cr7,r3,-1
ffc07298: 41 9e ff bc beq+ cr7,ffc07254 <rtems_termios_rxdaemon+0x18>
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
ffc0729c: 98 61 00 08 stb r3,8(r1)
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
ffc072a0: 38 81 00 08 addi r4,r1,8
ffc072a4: 7f e3 fb 78 mr r3,r31
ffc072a8: 38 a0 00 01 li r5,1
ffc072ac: 4b ff fc b9 bl ffc06f64 <rtems_termios_enqueue_raw_characters>
ffc072b0: 4b ff ff a4 b ffc07254 <rtems_termios_rxdaemon+0x18>
ffc07498 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
ffc07498: 94 21 ff e0 stwu r1,-32(r1)
ffc0749c: 7c 08 02 a6 mflr r0
ffc074a0: bf c1 00 18 stmw r30,24(r1)
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
ffc074a4: 3f c0 00 00 lis r30,0
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
ffc074a8: 7c 7f 1b 78 mr r31,r3
ffc074ac: 90 01 00 24 stw r0,36(r1)
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
ffc074b0: 3b de 28 78 addi r30,r30,10360
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
ffc074b4: 38 60 00 03 li r3,3
ffc074b8: 38 80 00 02 li r4,2
ffc074bc: 38 a0 00 00 li r5,0
ffc074c0: 38 c1 00 08 addi r6,r1,8
ffc074c4: 48 00 04 fd bl ffc079c0 <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) {
ffc074c8: 80 01 00 08 lwz r0,8(r1)
ffc074cc: 70 09 00 01 andi. r9,r0,1
ffc074d0: 41 a2 00 14 beq+ ffc074e4 <rtems_termios_txdaemon+0x4c> <== ALWAYS TAKEN
tty->txTaskId = 0;
ffc074d4: 38 00 00 00 li r0,0 <== NOT EXECUTED
ffc074d8: 90 1f 00 c8 stw r0,200(r31) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
ffc074dc: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc074e0: 48 00 0e 55 bl ffc08334 <rtems_task_delete> <== NOT EXECUTED
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
ffc074e4: 81 3f 00 cc lwz r9,204(r31)
ffc074e8: 55 29 28 34 rlwinm r9,r9,5,0,26
ffc074ec: 7d 3e 4a 14 add r9,r30,r9
ffc074f0: 80 09 00 14 lwz r0,20(r9)
ffc074f4: 2f 80 00 00 cmpwi cr7,r0,0
ffc074f8: 41 9e 00 10 beq- cr7,ffc07508 <rtems_termios_txdaemon+0x70><== ALWAYS TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
ffc074fc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc07500: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc07504: 4e 80 04 21 bctrl <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
ffc07508: 7f e3 fb 78 mr r3,r31
ffc0750c: 4b ff fd a9 bl ffc072b4 <rtems_termios_refill_transmitter>
}
ffc07510: 4b ff ff a4 b ffc074b4 <rtems_termios_txdaemon+0x1c>
ffc06af8 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
ffc06af8: 94 21 ff e0 stwu r1,-32(r1)
ffc06afc: 7c 08 02 a6 mflr r0
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc06b00: 38 80 00 00 li r4,0
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
ffc06b04: 90 01 00 24 stw r0,36(r1)
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc06b08: 38 a0 00 00 li r5,0
rtems_status_code
rtems_termios_write (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc06b0c: 81 23 00 00 lwz r9,0(r3)
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
ffc06b10: bf 41 00 08 stmw r26,8(r1)
ffc06b14: 7c 7e 1b 78 mr r30,r3
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc06b18: 83 e9 00 38 lwz r31,56(r9)
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc06b1c: 80 7f 00 18 lwz r3,24(r31)
ffc06b20: 48 00 14 f1 bl ffc08010 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
ffc06b24: 7c 7d 1b 79 mr. r29,r3
ffc06b28: 40 82 00 94 bne- ffc06bbc <rtems_termios_write+0xc4>
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
ffc06b2c: 80 1f 00 cc lwz r0,204(r31)
ffc06b30: 3d 20 00 00 lis r9,0
ffc06b34: 39 29 28 78 addi r9,r9,10360
ffc06b38: 54 00 28 34 rlwinm r0,r0,5,0,26
ffc06b3c: 7d 29 02 14 add r9,r9,r0
ffc06b40: 80 09 00 0c lwz r0,12(r9)
ffc06b44: 2f 80 00 00 cmpwi cr7,r0,0
ffc06b48: 41 9e 00 1c beq- cr7,ffc06b64 <rtems_termios_write+0x6c>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
ffc06b4c: 7f e3 fb 78 mr r3,r31
ffc06b50: 7c 09 03 a6 mtctr r0
ffc06b54: 7f c4 f3 78 mr r4,r30
ffc06b58: 4e 80 04 21 bctrl
ffc06b5c: 7c 7d 1b 78 mr r29,r3
ffc06b60: 48 00 00 54 b ffc06bb4 <rtems_termios_write+0xbc>
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
ffc06b64: 80 1f 00 34 lwz r0,52(r31)
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
ffc06b68: 3b 80 00 00 li r28,0
ffc06b6c: 83 7e 00 14 lwz r27,20(r30)
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) {
ffc06b70: 70 09 00 01 andi. r9,r0,1
ffc06b74: 83 5e 00 10 lwz r26,16(r30)
ffc06b78: 40 a2 00 18 bne+ ffc06b90 <rtems_termios_write+0x98> <== ALWAYS TAKEN
ffc06b7c: 48 00 00 20 b ffc06b9c <rtems_termios_write+0xa4> <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
ffc06b80: 7c 7a e0 ae lbzx r3,r26,r28
ffc06b84: 7f e4 fb 78 mr r4,r31
ffc06b88: 3b 9c 00 01 addi r28,r28,1
ffc06b8c: 4b ff f9 4d bl ffc064d8 <oproc>
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
ffc06b90: 7f 9c d8 00 cmpw cr7,r28,r27
ffc06b94: 40 9e ff ec bne+ cr7,ffc06b80 <rtems_termios_write+0x88>
ffc06b98: 48 00 00 14 b ffc06bac <rtems_termios_write+0xb4>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
ffc06b9c: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED
ffc06ba0: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc06ba4: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED
ffc06ba8: 4b ff f8 11 bl ffc063b8 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
ffc06bac: 80 1e 00 14 lwz r0,20(r30)
ffc06bb0: 90 1e 00 1c stw r0,28(r30)
}
rtems_semaphore_release (tty->osem);
ffc06bb4: 80 7f 00 18 lwz r3,24(r31)
ffc06bb8: 48 00 15 85 bl ffc0813c <rtems_semaphore_release>
return sc;
}
ffc06bbc: 39 61 00 20 addi r11,r1,32
ffc06bc0: 7f a3 eb 78 mr r3,r29
ffc06bc4: 4b ff 99 5c b ffc00520 <_restgpr_26_x>
ffc18674 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
ffc18674: 94 21 ff e8 stwu r1,-24(r1)
ffc18678: 7c 08 02 a6 mflr r0
ffc1867c: 7c 64 1b 78 mr r4,r3
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
ffc18680: 3c 60 00 00 lis r3,0
ffc18684: 90 01 00 1c stw r0,28(r1)
ffc18688: 38 63 72 80 addi r3,r3,29312
ffc1868c: 38 a1 00 08 addi r5,r1,8
ffc18690: 48 00 31 91 bl ffc1b820 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc18694: 80 01 00 08 lwz r0,8(r1)
ffc18698: 2f 80 00 00 cmpwi cr7,r0,0
ffc1869c: 40 9e 00 24 bne- cr7,ffc186c0 <rtems_timer_cancel+0x4c>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
ffc186a0: 80 03 00 38 lwz r0,56(r3)
ffc186a4: 2f 80 00 04 cmpwi cr7,r0,4
ffc186a8: 41 9e 00 0c beq- cr7,ffc186b4 <rtems_timer_cancel+0x40> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
ffc186ac: 38 63 00 10 addi r3,r3,16
ffc186b0: 48 00 53 1d bl ffc1d9cc <_Watchdog_Remove>
_Thread_Enable_dispatch();
ffc186b4: 48 00 3f a5 bl ffc1c658 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc186b8: 38 60 00 00 li r3,0
ffc186bc: 48 00 00 08 b ffc186c4 <rtems_timer_cancel+0x50>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc186c0: 38 60 00 04 li r3,4
}
ffc186c4: 80 01 00 1c lwz r0,28(r1)
ffc186c8: 38 21 00 18 addi r1,r1,24
ffc186cc: 7c 08 03 a6 mtlr r0
ffc186d0: 4e 80 00 20 blr
ffc18bf8 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc18bf8: 94 21 ff c8 stwu r1,-56(r1)
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
ffc18bfc: 3d 20 00 00 lis r9,0
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc18c00: 7c 08 02 a6 mflr r0
ffc18c04: bf 01 00 18 stmw r24,24(r1)
ffc18c08: 7c 7f 1b 78 mr r31,r3
ffc18c0c: 7c 9c 23 78 mr r28,r4
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
ffc18c10: 83 a9 28 ec lwz r29,10476(r9)
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc18c14: 7c be 2b 78 mr r30,r5
ffc18c18: 90 01 00 3c stw r0,60(r1)
ffc18c1c: 7c da 33 78 mr r26,r6
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
ffc18c20: 2f 9d 00 00 cmpwi cr7,r29,0
return RTEMS_INCORRECT_STATE;
ffc18c24: 3b 20 00 0e li r25,14
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
ffc18c28: 41 9e 00 c8 beq- cr7,ffc18cf0 <rtems_timer_server_fire_when+0xf8>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
ffc18c2c: 3d 20 00 00 lis r9,0
ffc18c30: 88 09 28 a0 lbz r0,10400(r9)
return RTEMS_NOT_DEFINED;
ffc18c34: 3b 20 00 0b li r25,11
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
ffc18c38: 2f 80 00 00 cmpwi cr7,r0,0
ffc18c3c: 41 be 00 b4 beq+ cr7,ffc18cf0 <rtems_timer_server_fire_when+0xf8><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
ffc18c40: 2f 85 00 00 cmpwi cr7,r5,0
return RTEMS_INVALID_ADDRESS;
ffc18c44: 3b 20 00 09 li r25,9
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
ffc18c48: 41 9e 00 a8 beq- cr7,ffc18cf0 <rtems_timer_server_fire_when+0xf8>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
ffc18c4c: 7c 83 23 78 mr r3,r4
ffc18c50: 4b ff cc 89 bl ffc158d8 <_TOD_Validate>
return RTEMS_INVALID_CLOCK;
ffc18c54: 3b 20 00 14 li r25,20
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
ffc18c58: 2f 83 00 00 cmpwi cr7,r3,0
ffc18c5c: 41 be 00 94 beq+ cr7,ffc18cf0 <rtems_timer_server_fire_when+0xf8>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc18c60: 7f 83 e3 78 mr r3,r28
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc18c64: 3f 60 00 00 lis r27,0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc18c68: 4b ff cb e5 bl ffc1584c <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc18c6c: 80 1b 28 b4 lwz r0,10420(r27)
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc18c70: 7c 7c 1b 78 mr r28,r3
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc18c74: 7f 83 00 40 cmplw cr7,r3,r0
ffc18c78: 40 bd 00 78 ble+ cr7,ffc18cf0 <rtems_timer_server_fire_when+0xf8>
ffc18c7c: 3c 60 00 00 lis r3,0
ffc18c80: 38 63 72 80 addi r3,r3,29312
ffc18c84: 7f e4 fb 78 mr r4,r31
ffc18c88: 38 a1 00 08 addi r5,r1,8
ffc18c8c: 48 00 2b 95 bl ffc1b820 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc18c90: 83 01 00 08 lwz r24,8(r1)
ffc18c94: 7c 79 1b 78 mr r25,r3
ffc18c98: 2f 98 00 00 cmpwi cr7,r24,0
ffc18c9c: 40 9e 00 50 bne- cr7,ffc18cec <rtems_timer_server_fire_when+0xf4>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
ffc18ca0: 38 63 00 10 addi r3,r3,16
ffc18ca4: 48 00 4d 29 bl ffc1d9cc <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
ffc18ca8: 38 00 00 03 li r0,3
ffc18cac: 90 19 00 38 stw r0,56(r25)
_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 );
ffc18cb0: 7f 24 cb 78 mr r4,r25
ffc18cb4: 7f a3 eb 78 mr r3,r29
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();
ffc18cb8: 80 1b 28 b4 lwz r0,10420(r27)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc18cbc: 93 19 00 18 stw r24,24(r25)
ffc18cc0: 7f 80 e0 50 subf r28,r0,r28
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc18cc4: 80 1d 00 04 lwz r0,4(r29)
the_watchdog->routine = routine;
ffc18cc8: 93 d9 00 2c stw r30,44(r25)
ffc18ccc: 7c 09 03 a6 mtctr r0
the_watchdog->id = id;
ffc18cd0: 93 f9 00 30 stw r31,48(r25)
the_watchdog->user_data = user_data;
ffc18cd4: 93 59 00 34 stw r26,52(r25)
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();
ffc18cd8: 93 99 00 1c stw r28,28(r25)
(*timer_server->schedule_operation)( timer_server, the_timer );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
ffc18cdc: 3b 20 00 00 li r25,0
(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();
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc18ce0: 4e 80 04 21 bctrl
_Thread_Enable_dispatch();
ffc18ce4: 48 00 39 75 bl ffc1c658 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc18ce8: 48 00 00 08 b ffc18cf0 <rtems_timer_server_fire_when+0xf8>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc18cec: 3b 20 00 04 li r25,4
}
ffc18cf0: 39 61 00 38 addi r11,r1,56
ffc18cf4: 7f 23 cb 78 mr r3,r25
ffc18cf8: 4b ff 54 7c b ffc0e174 <_restgpr_24_x>
ffc04438 <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
ffc04438: 94 21 ff e0 stwu r1,-32(r1)
ffc0443c: 7c 08 02 a6 mflr r0
ffc04440: 90 01 00 24 stw r0,36(r1)
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
ffc04444: 74 60 20 00 andis. r0,r3,8192
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
ffc04448: bf 41 00 08 stmw r26,8(r1)
ffc0444c: 7c 7d 1b 78 mr r29,r3
ffc04450: 7c 9a 23 78 mr r26,r4
ffc04454: 7c bb 2b 78 mr r27,r5
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
ffc04458: 41 82 00 44 beq- ffc0449c <rtems_verror+0x64>
if (rtems_panic_in_progress++)
ffc0445c: 3d 60 00 00 lis r11,0
ffc04460: 81 2b 27 a8 lwz r9,10152(r11)
ffc04464: 2f 89 00 00 cmpwi cr7,r9,0
ffc04468: 38 09 00 01 addi r0,r9,1
ffc0446c: 90 0b 27 a8 stw r0,10152(r11)
ffc04470: 41 9e 00 18 beq- cr7,ffc04488 <rtems_verror+0x50> <== ALWAYS TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc04474: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
ffc04478: 81 69 27 c8 lwz r11,10184(r9) <== NOT EXECUTED
ffc0447c: 38 0b 00 01 addi r0,r11,1 <== NOT EXECUTED
ffc04480: 90 09 27 c8 stw r0,10184(r9) <== NOT EXECUTED
return _Thread_Dispatch_disable_level;
ffc04484: 80 09 27 c8 lwz r0,10184(r9) <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
ffc04488: 3d 20 00 00 lis r9,0
ffc0448c: 80 09 27 a8 lwz r0,10152(r9)
return 0;
ffc04490: 3b e0 00 00 li r31,0
if (error_flag & RTEMS_ERROR_PANIC) {
if (rtems_panic_in_progress++)
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
ffc04494: 2f 80 00 02 cmpwi cr7,r0,2
ffc04498: 41 9d 01 14 bgt- cr7,ffc045ac <rtems_verror+0x174> <== NEVER TAKEN
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
ffc0449c: 3f e0 00 00 lis r31,0
ffc044a0: 81 3f 27 4c lwz r9,10060(r31)
status = error_flag & ~RTEMS_ERROR_MASK;
ffc044a4: 57 bc 01 00 rlwinm r28,r29,0,4,0
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
int local_errno = 0;
ffc044a8: 3b c0 00 00 li r30,0
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
ffc044ac: 80 69 00 08 lwz r3,8(r9)
ffc044b0: 48 00 bb c1 bl ffc10070 <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
ffc044b4: 77 a0 40 00 andis. r0,r29,16384
ffc044b8: 41 a2 00 0c beq+ ffc044c4 <rtems_verror+0x8c>
local_errno = errno;
ffc044bc: 48 00 b6 e1 bl ffc0fb9c <__errno>
ffc044c0: 83 c3 00 00 lwz r30,0(r3)
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
ffc044c4: 81 3f 27 4c lwz r9,10060(r31)
ffc044c8: 7f 44 d3 78 mr r4,r26
ffc044cc: 7f 65 db 78 mr r5,r27
ffc044d0: 80 69 00 0c lwz r3,12(r9)
ffc044d4: 48 01 12 ad bl ffc15780 <vfprintf>
if (status)
ffc044d8: 2f 9c 00 00 cmpwi cr7,r28,0
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
ffc044dc: 7c 7f 1b 78 mr r31,r3
if (status)
ffc044e0: 41 be 00 34 beq+ cr7,ffc04514 <rtems_verror+0xdc>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
ffc044e4: 3d 20 00 00 lis r9,0
ffc044e8: 81 29 27 4c lwz r9,10060(r9)
ffc044ec: 7f 83 e3 78 mr r3,r28
ffc044f0: 83 a9 00 0c lwz r29,12(r9)
ffc044f4: 4b ff ff 19 bl ffc0440c <rtems_status_text>
ffc044f8: 3c 80 ff c2 lis r4,-62
ffc044fc: 7c 65 1b 78 mr r5,r3
ffc04500: 38 84 bf 90 addi r4,r4,-16496
ffc04504: 7f a3 eb 78 mr r3,r29
ffc04508: 4c c6 31 82 crclr 4*cr1+eq
ffc0450c: 48 00 c1 1d bl ffc10628 <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
ffc04510: 7f ff 1a 14 add r31,r31,r3
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
ffc04514: 2f 9e 00 00 cmpwi cr7,r30,0
ffc04518: 41 9e 00 68 beq- cr7,ffc04580 <rtems_verror+0x148>
if ((local_errno > 0) && *strerror(local_errno))
ffc0451c: 40 9d 00 40 ble- cr7,ffc0455c <rtems_verror+0x124>
ffc04520: 7f c3 f3 78 mr r3,r30
ffc04524: 48 00 cf 8d bl ffc114b0 <strerror>
ffc04528: 88 03 00 00 lbz r0,0(r3)
ffc0452c: 2f 80 00 00 cmpwi cr7,r0,0
ffc04530: 41 be 00 2c beq+ cr7,ffc0455c <rtems_verror+0x124> <== NEVER TAKEN
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
ffc04534: 3d 20 00 00 lis r9,0
ffc04538: 81 29 27 4c lwz r9,10060(r9)
ffc0453c: 7f c3 f3 78 mr r3,r30
ffc04540: 83 a9 00 0c lwz r29,12(r9)
ffc04544: 48 00 cf 6d bl ffc114b0 <strerror>
ffc04548: 3c 80 ff c2 lis r4,-62
ffc0454c: 7c 65 1b 78 mr r5,r3
ffc04550: 38 84 bf 9e addi r4,r4,-16482
ffc04554: 7f a3 eb 78 mr r3,r29
ffc04558: 48 00 00 1c b ffc04574 <rtems_verror+0x13c>
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
ffc0455c: 3d 20 00 00 lis r9,0
ffc04560: 81 29 27 4c lwz r9,10060(r9)
ffc04564: 3c 80 ff c2 lis r4,-62
ffc04568: 38 84 bf ab addi r4,r4,-16469
ffc0456c: 80 69 00 0c lwz r3,12(r9)
ffc04570: 7f c5 f3 78 mr r5,r30
ffc04574: 4c c6 31 82 crclr 4*cr1+eq
ffc04578: 48 00 c0 b1 bl ffc10628 <fprintf>
ffc0457c: 7f ff 1a 14 add r31,r31,r3
}
chars_written += fprintf(stderr, "\n");
ffc04580: 3f c0 00 00 lis r30,0
ffc04584: 81 3e 27 4c lwz r9,10060(r30)
ffc04588: 3c 80 ff c2 lis r4,-62
ffc0458c: 38 84 c2 d2 addi r4,r4,-15662
ffc04590: 80 69 00 0c lwz r3,12(r9)
ffc04594: 4c c6 31 82 crclr 4*cr1+eq
ffc04598: 48 00 c0 91 bl ffc10628 <fprintf>
(void) fflush(stderr);
ffc0459c: 81 3e 27 4c lwz r9,10060(r30)
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
ffc045a0: 7f ff 1a 14 add r31,r31,r3
(void) fflush(stderr);
ffc045a4: 80 69 00 0c lwz r3,12(r9)
ffc045a8: 48 00 ba c9 bl ffc10070 <fflush>
return chars_written;
}
ffc045ac: 39 61 00 20 addi r11,r1,32
ffc045b0: 7f e3 fb 78 mr r3,r31
ffc045b4: 4b ff bf 6c b ffc00520 <_restgpr_26_x>
ffc04afc <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
ffc04afc: 94 21 ff d8 stwu r1,-40(r1)
ffc04b00: 7c 08 02 a6 mflr r0
ffc04b04: bf 01 00 08 stmw r24,8(r1)
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
ffc04b08: 3f 80 7f ff lis r28,32767
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
ffc04b0c: 7c 7e 1b 78 mr r30,r3
ffc04b10: 90 01 00 2c stw r0,44(r1)
ffc04b14: 7c 9b 23 78 mr r27,r4
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
ffc04b18: 3b a0 00 00 li r29,0
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
ffc04b1c: 63 9c ff ff ori r28,r28,65535
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
ffc04b20: 3b e0 00 00 li r31,0
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
ffc04b24: 3f 00 00 00 lis r24,0
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
ffc04b28: 3f 20 00 00 lis r25,0
return 0;
d = c - '0';
if ((i > (limit / 10))
ffc04b2c: 3b 40 00 0a li r26,10
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
ffc04b30: 81 3e 00 04 lwz r9,4(r30)
ffc04b34: 38 09 ff ff addi r0,r9,-1
ffc04b38: 2f 80 00 00 cmpwi cr7,r0,0
ffc04b3c: 90 1e 00 04 stw r0,4(r30)
ffc04b40: 40 bc 00 14 bge+ cr7,ffc04b54 <scanInt+0x58> <== ALWAYS TAKEN
ffc04b44: 80 78 27 2c lwz r3,10028(r24) <== NOT EXECUTED
ffc04b48: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc04b4c: 48 00 dd b9 bl ffc12904 <__srget_r> <== NOT EXECUTED
ffc04b50: 48 00 00 14 b ffc04b64 <scanInt+0x68> <== NOT EXECUTED
ffc04b54: 81 3e 00 00 lwz r9,0(r30)
ffc04b58: 88 69 00 00 lbz r3,0(r9)
ffc04b5c: 39 29 00 01 addi r9,r9,1
ffc04b60: 91 3e 00 00 stw r9,0(r30)
if (c == ':')
ffc04b64: 2f 03 00 3a cmpwi cr6,r3,58
ffc04b68: 2f 9d 00 00 cmpwi cr7,r29,0
ffc04b6c: 41 9a 00 68 beq- cr6,ffc04bd4 <scanInt+0xd8>
break;
if (sign == 0) {
ffc04b70: 40 9e 00 1c bne- cr7,ffc04b8c <scanInt+0x90>
if (c == '-') {
ffc04b74: 2f 83 00 2d cmpwi cr7,r3,45
sign = -1;
limit++;
continue;
}
sign = 1;
ffc04b78: 3b a0 00 01 li r29,1
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
ffc04b7c: 40 be 00 10 bne+ cr7,ffc04b8c <scanInt+0x90>
sign = -1;
limit++;
ffc04b80: 3b 9c 00 01 addi r28,r28,1
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
ffc04b84: 3b a0 ff ff li r29,-1
limit++;
continue;
ffc04b88: 4b ff ff a8 b ffc04b30 <scanInt+0x34>
}
sign = 1;
}
if (!isdigit(c))
ffc04b8c: 81 39 27 24 lwz r9,10020(r25)
ffc04b90: 7d 29 1a 14 add r9,r9,r3
ffc04b94: 88 09 00 01 lbz r0,1(r9)
ffc04b98: 70 09 00 04 andi. r9,r0,4
ffc04b9c: 41 82 00 4c beq- ffc04be8 <scanInt+0xec>
return 0;
d = c - '0';
if ((i > (limit / 10))
ffc04ba0: 7c 1c d3 96 divwu r0,r28,r26
ffc04ba4: 7f 9f 00 40 cmplw cr7,r31,r0
ffc04ba8: 41 9d 00 40 bgt- cr7,ffc04be8 <scanInt+0xec>
|| ((i == (limit / 10)) && (d > (limit % 10))))
ffc04bac: 7f 9f 00 00 cmpw cr7,r31,r0
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
ffc04bb0: 38 63 ff d0 addi r3,r3,-48
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
ffc04bb4: 40 be 00 14 bne+ cr7,ffc04bc8 <scanInt+0xcc>
ffc04bb8: 1c 1f 00 0a mulli r0,r31,10
ffc04bbc: 7c 00 e0 50 subf r0,r0,r28
ffc04bc0: 7f 83 00 40 cmplw cr7,r3,r0
ffc04bc4: 41 9d 00 24 bgt- cr7,ffc04be8 <scanInt+0xec> <== ALWAYS TAKEN
return 0;
i = i * 10 + d;
ffc04bc8: 1f ff 00 0a mulli r31,r31,10
ffc04bcc: 7f e3 fa 14 add r31,r3,r31
ffc04bd0: 4b ff ff 60 b ffc04b30 <scanInt+0x34>
}
if (sign == 0)
ffc04bd4: 41 9e 00 14 beq- cr7,ffc04be8 <scanInt+0xec> <== NEVER TAKEN
return 0;
*val = i * sign;
ffc04bd8: 7f fd f9 d6 mullw r31,r29,r31
return 1;
ffc04bdc: 38 60 00 01 li r3,1
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
ffc04be0: 93 fb 00 00 stw r31,0(r27)
return 1;
ffc04be4: 48 00 00 08 b ffc04bec <scanInt+0xf0>
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
ffc04be8: 38 60 00 00 li r3,0
*val = i * sign;
return 1;
}
ffc04bec: 39 61 00 28 addi r11,r1,40
ffc04bf0: 4b ff bc a4 b ffc00894 <_restgpr_24_x>
ffc04cf4 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
ffc04cf4: 94 21 ff d0 stwu r1,-48(r1)
ffc04cf8: 7c 08 02 a6 mflr r0
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
ffc04cfc: 38 e0 00 00 li r7,0
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
ffc04d00: 90 a1 00 18 stw r5,24(r1)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
ffc04d04: 38 a1 00 18 addi r5,r1,24
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
ffc04d08: 90 c1 00 1c stw r6,28(r1)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
ffc04d0c: 38 c1 00 1c addi r6,r1,28
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
ffc04d10: bf a1 00 24 stmw r29,36(r1)
ffc04d14: 7c 7d 1b 78 mr r29,r3
ffc04d18: 7c 9f 23 78 mr r31,r4
ffc04d1c: 90 01 00 34 stw r0,52(r1)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
ffc04d20: 4b ff fe d5 bl ffc04bf4 <scanString>
ffc04d24: 2f 83 00 00 cmpwi cr7,r3,0
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
ffc04d28: 3b c0 00 00 li r30,0
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
ffc04d2c: 41 be 01 08 beq+ cr7,ffc04e34 <scangr+0x140>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
ffc04d30: 7f a3 eb 78 mr r3,r29
ffc04d34: 38 9f 00 04 addi r4,r31,4
ffc04d38: 38 a1 00 18 addi r5,r1,24
ffc04d3c: 38 c1 00 1c addi r6,r1,28
ffc04d40: 38 e0 00 00 li r7,0
ffc04d44: 4b ff fe b1 bl ffc04bf4 <scanString>
ffc04d48: 2f 83 00 00 cmpwi cr7,r3,0
ffc04d4c: 41 be 00 e8 beq+ cr7,ffc04e34 <scangr+0x140> <== NEVER TAKEN
|| !scanInt(fp, &grgid)
ffc04d50: 7f a3 eb 78 mr r3,r29
ffc04d54: 38 81 00 0c addi r4,r1,12
ffc04d58: 4b ff fd a5 bl ffc04afc <scanInt>
ffc04d5c: 2f 83 00 00 cmpwi cr7,r3,0
ffc04d60: 41 be 00 d4 beq+ cr7,ffc04e34 <scangr+0x140> <== NEVER TAKEN
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
ffc04d64: 7f a3 eb 78 mr r3,r29
ffc04d68: 38 81 00 08 addi r4,r1,8
ffc04d6c: 38 a1 00 18 addi r5,r1,24
ffc04d70: 38 c1 00 1c addi r6,r1,28
ffc04d74: 38 e0 00 01 li r7,1
ffc04d78: 4b ff fe 7d bl ffc04bf4 <scanString>
ffc04d7c: 2f 83 00 00 cmpwi cr7,r3,0
ffc04d80: 41 9e 00 b4 beq- cr7,ffc04e34 <scangr+0x140> <== NEVER TAKEN
return 0;
grp->gr_gid = grgid;
ffc04d84: 80 01 00 0c lwz r0,12(r1)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc04d88: 81 61 00 08 lwz r11,8(r1)
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;
ffc04d8c: b0 1f 00 08 sth r0,8(r31)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc04d90: 38 00 00 01 li r0,1
ffc04d94: 7d 69 5b 78 mr r9,r11
ffc04d98: 48 00 00 18 b ffc04db0 <scangr+0xbc>
if(*cp == ',')
memcount++;
ffc04d9c: 69 48 00 2c xori r8,r10,44
ffc04da0: 21 08 00 00 subfic r8,r8,0
ffc04da4: 7d 00 01 94 addze r8,r0
ffc04da8: 7d 00 43 78 mr r0,r8
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc04dac: 39 29 00 01 addi r9,r9,1
ffc04db0: 89 49 00 00 lbz r10,0(r9)
ffc04db4: 2f 8a 00 00 cmpwi cr7,r10,0
ffc04db8: 40 9e ff e4 bne+ cr7,ffc04d9c <scangr+0xa8>
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
ffc04dbc: 54 09 10 3a rlwinm r9,r0,2,0,29
ffc04dc0: 38 09 00 13 addi r0,r9,19
ffc04dc4: 81 21 00 1c lwz r9,28(r1)
return 0;
ffc04dc8: 3b c0 00 00 li r30,0
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
ffc04dcc: 7f 89 00 40 cmplw cr7,r9,r0
ffc04dd0: 41 9c 00 64 blt- cr7,ffc04e34 <scangr+0x140> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
ffc04dd4: 81 21 00 18 lwz r9,24(r1)
ffc04dd8: 39 29 00 0f addi r9,r9,15
ffc04ddc: 55 29 00 36 rlwinm r9,r9,0,0,27
ffc04de0: 91 3f 00 0c stw r9,12(r31)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
ffc04de4: 91 69 00 00 stw r11,0(r9)
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc04de8: 39 60 00 01 li r11,1
ffc04dec: 81 21 00 08 lwz r9,8(r1)
ffc04df0: 48 00 00 28 b ffc04e18 <scangr+0x124>
if(*cp == ',') {
ffc04df4: 2f 80 00 2c cmpwi cr7,r0,44
ffc04df8: 40 be 00 1c bne+ cr7,ffc04e14 <scangr+0x120>
*cp = '\0';
ffc04dfc: 99 49 00 00 stb r10,0(r9)
grp->gr_mem[memcount++] = cp + 1;
ffc04e00: 55 60 10 3a rlwinm r0,r11,2,0,29
}
/*
* Extract a single group record from the database
*/
static int scangr(
ffc04e04: 38 e9 00 01 addi r7,r9,1
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
ffc04e08: 81 1f 00 0c lwz r8,12(r31)
ffc04e0c: 39 6b 00 01 addi r11,r11,1
ffc04e10: 7c e8 01 2e stwx r7,r8,r0
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc04e14: 39 29 00 01 addi r9,r9,1
ffc04e18: 88 09 00 00 lbz r0,0(r9)
ffc04e1c: 2f 80 00 00 cmpwi cr7,r0,0
ffc04e20: 40 9e ff d4 bne+ cr7,ffc04df4 <scangr+0x100>
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
ffc04e24: 81 3f 00 0c lwz r9,12(r31)
ffc04e28: 55 6b 10 3a rlwinm r11,r11,2,0,29
return 1;
ffc04e2c: 3b c0 00 01 li r30,1
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
ffc04e30: 7c 09 59 2e stwx r0,r9,r11
return 1;
}
ffc04e34: 39 61 00 30 addi r11,r1,48
ffc04e38: 7f c3 f3 78 mr r3,r30
ffc04e3c: 4b ff ba 6c b ffc008a8 <_restgpr_29_x>
ffc04e40 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
ffc04e40: 94 21 ff d0 stwu r1,-48(r1)
ffc04e44: 7c 08 02 a6 mflr r0
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
ffc04e48: 38 e0 00 00 li r7,0
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
ffc04e4c: 90 a1 00 18 stw r5,24(r1)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
ffc04e50: 38 a1 00 18 addi r5,r1,24
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
ffc04e54: 90 c1 00 1c stw r6,28(r1)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
ffc04e58: 38 c1 00 1c addi r6,r1,28
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
ffc04e5c: bf a1 00 24 stmw r29,36(r1)
ffc04e60: 7c 7e 1b 78 mr r30,r3
ffc04e64: 7c 9f 23 78 mr r31,r4
ffc04e68: 90 01 00 34 stw r0,52(r1)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
ffc04e6c: 4b ff fd 89 bl ffc04bf4 <scanString>
ffc04e70: 2f 83 00 00 cmpwi cr7,r3,0
|| !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))
return 0;
ffc04e74: 3b a0 00 00 li r29,0
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
ffc04e78: 41 be 00 e0 beq+ cr7,ffc04f58 <scanpw+0x118>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
ffc04e7c: 7f c3 f3 78 mr r3,r30
ffc04e80: 38 9f 00 04 addi r4,r31,4
ffc04e84: 38 a1 00 18 addi r5,r1,24
ffc04e88: 38 c1 00 1c addi r6,r1,28
ffc04e8c: 38 e0 00 00 li r7,0
ffc04e90: 4b ff fd 65 bl ffc04bf4 <scanString>
ffc04e94: 2f 83 00 00 cmpwi cr7,r3,0
ffc04e98: 41 be 00 c0 beq+ cr7,ffc04f58 <scanpw+0x118> <== NEVER TAKEN
|| !scanInt(fp, &pwuid)
ffc04e9c: 7f c3 f3 78 mr r3,r30
ffc04ea0: 38 81 00 0c addi r4,r1,12
ffc04ea4: 4b ff fc 59 bl ffc04afc <scanInt>
ffc04ea8: 2f 83 00 00 cmpwi cr7,r3,0
ffc04eac: 41 be 00 ac beq+ cr7,ffc04f58 <scanpw+0x118>
|| !scanInt(fp, &pwgid)
ffc04eb0: 7f c3 f3 78 mr r3,r30
ffc04eb4: 38 81 00 08 addi r4,r1,8
ffc04eb8: 4b ff fc 45 bl ffc04afc <scanInt>
ffc04ebc: 2f 83 00 00 cmpwi cr7,r3,0
ffc04ec0: 41 be 00 98 beq+ cr7,ffc04f58 <scanpw+0x118>
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
ffc04ec4: 7f c3 f3 78 mr r3,r30
ffc04ec8: 38 9f 00 0c addi r4,r31,12
ffc04ecc: 38 a1 00 18 addi r5,r1,24
ffc04ed0: 38 c1 00 1c addi r6,r1,28
ffc04ed4: 38 e0 00 00 li r7,0
ffc04ed8: 4b ff fd 1d bl ffc04bf4 <scanString>
ffc04edc: 2f 83 00 00 cmpwi cr7,r3,0
ffc04ee0: 41 be 00 78 beq+ cr7,ffc04f58 <scanpw+0x118> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
ffc04ee4: 7f c3 f3 78 mr r3,r30
ffc04ee8: 38 9f 00 10 addi r4,r31,16
ffc04eec: 38 a1 00 18 addi r5,r1,24
ffc04ef0: 38 c1 00 1c addi r6,r1,28
ffc04ef4: 38 e0 00 00 li r7,0
ffc04ef8: 4b ff fc fd bl ffc04bf4 <scanString>
ffc04efc: 2f 83 00 00 cmpwi cr7,r3,0
ffc04f00: 41 be 00 58 beq+ cr7,ffc04f58 <scanpw+0x118> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
ffc04f04: 7f c3 f3 78 mr r3,r30
ffc04f08: 38 9f 00 14 addi r4,r31,20
ffc04f0c: 38 a1 00 18 addi r5,r1,24
ffc04f10: 38 c1 00 1c addi r6,r1,28
ffc04f14: 38 e0 00 00 li r7,0
ffc04f18: 4b ff fc dd bl ffc04bf4 <scanString>
ffc04f1c: 2f 83 00 00 cmpwi cr7,r3,0
ffc04f20: 41 be 00 38 beq+ cr7,ffc04f58 <scanpw+0x118> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
ffc04f24: 7f c3 f3 78 mr r3,r30
ffc04f28: 38 9f 00 18 addi r4,r31,24
ffc04f2c: 38 a1 00 18 addi r5,r1,24
ffc04f30: 38 c1 00 1c addi r6,r1,28
ffc04f34: 38 e0 00 01 li r7,1
ffc04f38: 4b ff fc bd bl ffc04bf4 <scanString>
ffc04f3c: 2f 83 00 00 cmpwi cr7,r3,0
ffc04f40: 41 9e 00 18 beq- cr7,ffc04f58 <scanpw+0x118>
return 0;
pwd->pw_uid = pwuid;
ffc04f44: 80 01 00 0c lwz r0,12(r1)
pwd->pw_gid = pwgid;
return 1;
ffc04f48: 3b a0 00 01 li r29,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;
ffc04f4c: b0 1f 00 08 sth r0,8(r31)
pwd->pw_gid = pwgid;
ffc04f50: 80 01 00 08 lwz r0,8(r1)
ffc04f54: b0 1f 00 0a sth r0,10(r31)
return 1;
}
ffc04f58: 39 61 00 30 addi r11,r1,48
ffc04f5c: 7f a3 eb 78 mr r3,r29
ffc04f60: 4b ff b9 48 b ffc008a8 <_restgpr_29_x>
ffc06a8c <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc06a8c: 94 21 ff f0 stwu r1,-16(r1)
ffc06a90: 7c 08 02 a6 mflr r0
ffc06a94: 90 01 00 14 stw r0,20(r1)
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
ffc06a98: 80 04 00 3c lwz r0,60(r4)
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc06a9c: bf c1 00 08 stmw r30,8(r1)
ffc06aa0: 7c 7e 1b 78 mr r30,r3
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
ffc06aa4: 70 09 0e 78 andi. r9,r0,3704
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc06aa8: 7c 9f 23 78 mr r31,r4
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
ffc06aac: 41 a2 00 38 beq+ ffc06ae4 <siproc+0x58> <== NEVER TAKEN
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc06ab0: 80 64 00 18 lwz r3,24(r4)
ffc06ab4: 38 a0 00 00 li r5,0
ffc06ab8: 38 80 00 00 li r4,0
ffc06abc: 48 00 15 55 bl ffc08010 <rtems_semaphore_obtain>
i = iproc (c, tty);
ffc06ac0: 7f c3 f3 78 mr r3,r30
ffc06ac4: 7f e4 fb 78 mr r4,r31
ffc06ac8: 4b ff fe 15 bl ffc068dc <iproc>
ffc06acc: 7c 7e 1b 78 mr r30,r3
rtems_semaphore_release (tty->osem);
ffc06ad0: 80 7f 00 18 lwz r3,24(r31)
ffc06ad4: 48 00 16 69 bl ffc0813c <rtems_semaphore_release>
}
else {
i = iproc (c, tty);
}
return i;
}
ffc06ad8: 39 61 00 10 addi r11,r1,16
ffc06adc: 7f c3 f3 78 mr r3,r30
ffc06ae0: 4b ff 9a 50 b ffc00530 <_restgpr_30_x>
ffc06ae4: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED
ffc06ae8: bb c1 00 08 lmw r30,8(r1) <== NOT EXECUTED
ffc06aec: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED
ffc06af0: 7c 08 03 a6 mtlr r0 <== 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);
ffc06af4: 4b ff fd e8 b ffc068dc <iproc> <== NOT EXECUTED
ffc07d60 <statvfs>:
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
ffc07d60: 94 21 ff d0 stwu r1,-48(r1)
ffc07d64: 7c 08 02 a6 mflr r0
ffc07d68: bf c1 00 28 stmw r30,40(r1)
ffc07d6c: 7c 7e 1b 78 mr r30,r3
ffc07d70: 7c 9f 23 78 mr r31,r4
ffc07d74: 90 01 00 34 stw r0,52(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 ) )
ffc07d78: 48 00 c9 e1 bl ffc14758 <strlen>
ffc07d7c: 7c 64 1b 78 mr r4,r3
ffc07d80: 38 a0 00 00 li r5,0
ffc07d84: 7f c3 f3 78 mr r3,r30
ffc07d88: 38 c1 00 08 addi r6,r1,8
ffc07d8c: 38 e0 00 01 li r7,1
ffc07d90: 4b ff ea 65 bl ffc067f4 <rtems_filesystem_evaluate_path>
return -1;
ffc07d94: 3b c0 ff ff li r30,-1
* 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 ) )
ffc07d98: 2f 83 00 00 cmpwi cr7,r3,0
ffc07d9c: 40 9e 00 3c bne- cr7,ffc07dd8 <statvfs+0x78> <== NEVER TAKEN
return -1;
mt_entry = loc.mt_entry;
ffc07da0: 83 c1 00 18 lwz r30,24(r1)
fs_mount_root = &mt_entry->mt_fs_root;
memset (sb, 0, sizeof (struct statvfs));
ffc07da4: 38 80 00 00 li r4,0
ffc07da8: 38 a0 00 38 li r5,56
ffc07dac: 7f e3 fb 78 mr r3,r31
ffc07db0: 48 00 b6 e5 bl ffc13494 <memset>
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
ffc07db4: 81 3e 00 28 lwz r9,40(r30)
ffc07db8: 38 7e 00 1c addi r3,r30,28
ffc07dbc: 80 09 00 44 lwz r0,68(r9)
ffc07dc0: 7f e4 fb 78 mr r4,r31
ffc07dc4: 7c 09 03 a6 mtctr r0
ffc07dc8: 4e 80 04 21 bctrl
ffc07dcc: 7c 7e 1b 78 mr r30,r3
rtems_filesystem_freenode( &loc );
ffc07dd0: 38 61 00 08 addi r3,r1,8
ffc07dd4: 4b ff eb 15 bl ffc068e8 <rtems_filesystem_freenode>
return result;
}
ffc07dd8: 39 61 00 30 addi r11,r1,48
ffc07ddc: 7f c3 f3 78 mr r3,r30
ffc07de0: 4b ff a8 84 b ffc02664 <_restgpr_30_x>
ffc06780 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
ffc06780: 94 21 ff f0 stwu r1,-16(r1)
ffc06784: 7c 08 02 a6 mflr r0
ffc06788: 90 01 00 14 stw r0,20(r1)
/*
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
ffc0678c: 80 03 01 28 lwz r0,296(r3)
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
ffc06790: bf c1 00 08 stmw r30,8(r1)
/*
* 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 ) {
ffc06794: 2f 80 00 00 cmpwi cr7,r0,0
ffc06798: 41 9e 00 30 beq- cr7,ffc067c8 <sync_per_thread+0x48> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
ffc0679c: 3f e0 00 00 lis r31,0
ffc067a0: 3b ff 2d 98 addi r31,r31,11672
ffc067a4: 81 3f 00 0c lwz r9,12(r31)
_Thread_Executing->libc_reent = this_reent;
_fwalk (t->libc_reent, sync_wrapper);
ffc067a8: 3c 80 ff c0 lis r4,-64
ffc067ac: 38 84 67 d0 addi r4,r4,26576
* 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;
ffc067b0: 83 c9 01 28 lwz r30,296(r9)
_Thread_Executing->libc_reent = this_reent;
ffc067b4: 90 09 01 28 stw r0,296(r9)
_fwalk (t->libc_reent, sync_wrapper);
ffc067b8: 80 63 01 28 lwz r3,296(r3)
ffc067bc: 48 00 b2 71 bl ffc11a2c <_fwalk>
_Thread_Executing->libc_reent = current_reent;
ffc067c0: 81 3f 00 0c lwz r9,12(r31)
ffc067c4: 93 c9 01 28 stw r30,296(r9)
}
}
ffc067c8: 39 61 00 10 addi r11,r1,16
ffc067cc: 4b ff a5 00 b ffc00ccc <_restgpr_30_x>
ffc0e5cc <tcsetattr>:
int fd,
int opt,
struct termios *tp
)
{
switch (opt) {
ffc0e5cc: 2c 04 00 00 cmpwi r4,0
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
ffc0e5d0: 94 21 ff f0 stwu r1,-16(r1)
ffc0e5d4: 7c 08 02 a6 mflr r0
ffc0e5d8: bf c1 00 08 stmw r30,8(r1)
ffc0e5dc: 7c 7e 1b 78 mr r30,r3
ffc0e5e0: 7c bf 2b 78 mr r31,r5
ffc0e5e4: 90 01 00 14 stw r0,20(r1)
switch (opt) {
ffc0e5e8: 41 82 00 3c beq- ffc0e624 <tcsetattr+0x58>
ffc0e5ec: 2f 84 00 01 cmpwi cr7,r4,1
ffc0e5f0: 41 9e 00 18 beq- cr7,ffc0e608 <tcsetattr+0x3c>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
ffc0e5f4: 48 00 31 b5 bl ffc117a8 <__errno>
ffc0e5f8: 38 00 00 86 li r0,134
ffc0e5fc: 90 03 00 00 stw r0,0(r3)
ffc0e600: 38 00 ff ff li r0,-1
ffc0e604: 48 00 00 38 b ffc0e63c <tcsetattr+0x70>
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
ffc0e608: 38 80 00 03 li r4,3
ffc0e60c: 38 a0 00 00 li r5,0
ffc0e610: 4c c6 31 82 crclr 4*cr1+eq
ffc0e614: 4b ff fb 4d bl ffc0e160 <ioctl>
return -1;
ffc0e618: 38 00 ff ff li r0,-1
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
ffc0e61c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e620: 41 9c 00 1c blt- cr7,ffc0e63c <tcsetattr+0x70> <== NEVER TAKEN
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
ffc0e624: 7f c3 f3 78 mr r3,r30
ffc0e628: 38 80 00 02 li r4,2
ffc0e62c: 7f e5 fb 78 mr r5,r31
ffc0e630: 4c c6 31 82 crclr 4*cr1+eq
ffc0e634: 4b ff fb 2d bl ffc0e160 <ioctl>
ffc0e638: 7c 60 1b 78 mr r0,r3
}
}
ffc0e63c: 39 61 00 10 addi r11,r1,16
ffc0e640: 7c 03 03 78 mr r3,r0
ffc0e644: 4b ff 24 44 b ffc00a88 <_restgpr_30_x>
ffc07f50 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
ffc07f50: 94 21 ff b0 stwu r1,-80(r1)
ffc07f54: 7c 08 02 a6 mflr r0
ffc07f58: bf 41 00 38 stmw r26,56(r1)
ffc07f5c: 7c 7c 1b 78 mr r28,r3
ffc07f60: 90 01 00 54 stw r0,84(r1)
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
ffc07f64: 4b ff d1 b5 bl ffc05118 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
ffc07f68: 7c 7b 1b 79 mr. r27,r3
rtems_filesystem_get_start_loc( path, &i, &parentloc );
ffc07f6c: 7f 83 e3 78 mr r3,r28
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
ffc07f70: 40 82 00 18 bne- ffc07f88 <unlink+0x38>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
ffc07f74: 38 81 00 08 addi r4,r1,8
ffc07f78: 38 a1 00 20 addi r5,r1,32
ffc07f7c: 4b ff e2 b9 bl ffc06234 <rtems_filesystem_get_start_loc>
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
ffc07f80: 3b a0 00 00 li r29,0
ffc07f84: 48 00 00 28 b ffc07fac <unlink+0x5c>
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
ffc07f88: 7f 64 db 78 mr r4,r27
ffc07f8c: 38 a0 00 02 li r5,2
ffc07f90: 38 c1 00 20 addi r6,r1,32
ffc07f94: 38 e0 00 00 li r7,0
ffc07f98: 4b ff d1 25 bl ffc050bc <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
return -1;
ffc07f9c: 3b 40 ff ff li r26,-1
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
ffc07fa0: 2f 83 00 00 cmpwi cr7,r3,0
ffc07fa4: 40 9e 00 dc bne- cr7,ffc08080 <unlink+0x130> <== NEVER TAKEN
return -1;
free_parentloc = true;
ffc07fa8: 3b a0 00 01 li r29,1
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
ffc07fac: 3b e1 00 0c addi r31,r1,12
ffc07fb0: 3b c1 00 20 addi r30,r1,32
ffc07fb4: 7c be a4 aa lswi r5,r30,20
ffc07fb8: 7c bf a5 aa stswi r5,r31,20
name = path + parentpathlen;
ffc07fbc: 7f 9c da 14 add r28,r28,r27
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
ffc07fc0: 7f 83 e3 78 mr r3,r28
ffc07fc4: 48 00 c7 dd bl ffc147a0 <strlen>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
ffc07fc8: 3b 40 ff ff li r26,-1
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
ffc07fcc: 7c 64 1b 78 mr r4,r3
ffc07fd0: 7f 83 e3 78 mr r3,r28
ffc07fd4: 4b ff d1 8d bl ffc05160 <rtems_filesystem_prefix_separators>
ffc07fd8: 7f 9c 1a 14 add r28,r28,r3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
ffc07fdc: 7f 83 e3 78 mr r3,r28
ffc07fe0: 48 00 c7 c1 bl ffc147a0 <strlen>
ffc07fe4: 38 a0 00 00 li r5,0
ffc07fe8: 7c 64 1b 78 mr r4,r3
ffc07fec: 7f e6 fb 78 mr r6,r31
ffc07ff0: 7f 83 e3 78 mr r3,r28
ffc07ff4: 38 e0 00 00 li r7,0
ffc07ff8: 4b ff d0 41 bl ffc05038 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
ffc07ffc: 2f 83 00 00 cmpwi cr7,r3,0
ffc08000: 40 be 00 70 bne+ cr7,ffc08070 <unlink+0x120>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
ffc08004: 81 21 00 18 lwz r9,24(r1)
ffc08008: 7f e3 fb 78 mr r3,r31
ffc0800c: 80 09 00 10 lwz r0,16(r9)
ffc08010: 7c 09 03 a6 mtctr r0
ffc08014: 4e 80 04 21 bctrl
ffc08018: 2f 83 00 01 cmpwi cr7,r3,1
ffc0801c: 40 be 00 30 bne+ cr7,ffc0804c <unlink+0xfc>
rtems_filesystem_freenode( &loc );
ffc08020: 7f e3 fb 78 mr r3,r31
ffc08024: 4b ff d1 8d bl ffc051b0 <rtems_filesystem_freenode>
if ( free_parentloc )
ffc08028: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0802c: 41 be 00 0c beq+ cr7,ffc08038 <unlink+0xe8>
rtems_filesystem_freenode( &parentloc );
ffc08030: 7f c3 f3 78 mr r3,r30
ffc08034: 4b ff d1 7d bl ffc051b0 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EISDIR );
ffc08038: 48 00 b5 ed bl ffc13624 <__errno>
ffc0803c: 38 00 00 15 li r0,21
ffc08040: 90 03 00 00 stw r0,0(r3)
ffc08044: 3b 40 ff ff li r26,-1
ffc08048: 48 00 00 38 b ffc08080 <unlink+0x130>
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
ffc0804c: 81 21 00 18 lwz r9,24(r1)
ffc08050: 7f c3 f3 78 mr r3,r30
ffc08054: 7f e4 fb 78 mr r4,r31
ffc08058: 80 09 00 0c lwz r0,12(r9)
ffc0805c: 7c 09 03 a6 mtctr r0
ffc08060: 4e 80 04 21 bctrl
ffc08064: 7c 7a 1b 78 mr r26,r3
rtems_filesystem_freenode( &loc );
ffc08068: 7f e3 fb 78 mr r3,r31
ffc0806c: 4b ff d1 45 bl ffc051b0 <rtems_filesystem_freenode>
if ( free_parentloc )
ffc08070: 2f 9d 00 00 cmpwi cr7,r29,0
ffc08074: 41 be 00 0c beq+ cr7,ffc08080 <unlink+0x130>
rtems_filesystem_freenode( &parentloc );
ffc08078: 7f c3 f3 78 mr r3,r30
ffc0807c: 4b ff d1 35 bl ffc051b0 <rtems_filesystem_freenode>
return result;
}
ffc08080: 39 61 00 50 addi r11,r1,80
ffc08084: 7f 43 d3 78 mr r3,r26
ffc08088: 48 01 04 64 b ffc184ec <_restgpr_26_x>
ffc0744c <unmount>:
*/
int unmount(
const char *path
)
{
ffc0744c: 94 21 ff d0 stwu r1,-48(r1)
ffc07450: 7c 08 02 a6 mflr r0
ffc07454: bf c1 00 28 stmw r30,40(r1)
ffc07458: 7c 7f 1b 78 mr r31,r3
ffc0745c: 90 01 00 34 stw r0,52(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 ) )
ffc07460: 48 00 93 91 bl ffc107f0 <strlen>
ffc07464: 7c 64 1b 78 mr r4,r3
ffc07468: 38 a0 00 00 li r5,0
ffc0746c: 7f e3 fb 78 mr r3,r31
ffc07470: 38 c1 00 08 addi r6,r1,8
ffc07474: 38 e0 00 01 li r7,1
ffc07478: 4b ff ce c9 bl ffc04340 <rtems_filesystem_evaluate_path>
ffc0747c: 2f 83 00 00 cmpwi cr7,r3,0
ffc07480: 40 9e 01 18 bne- cr7,ffc07598 <unmount+0x14c>
return -1;
mt_entry = loc.mt_entry;
ffc07484: 83 e1 00 18 lwz r31,24(r1)
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
rtems_filesystem_freenode( &loc );
ffc07488: 38 61 00 08 addi r3,r1,8
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
ffc0748c: 80 01 00 08 lwz r0,8(r1)
ffc07490: 81 3f 00 1c lwz r9,28(r31)
ffc07494: 7f 89 00 00 cmpw cr7,r9,r0
ffc07498: 41 be 00 14 beq+ cr7,ffc074ac <unmount+0x60>
rtems_filesystem_freenode( &loc );
ffc0749c: 4b ff cf 99 bl ffc04434 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EACCES );
ffc074a0: 48 00 81 d5 bl ffc0f674 <__errno>
ffc074a4: 38 00 00 0d li r0,13
ffc074a8: 48 00 00 4c b ffc074f4 <unmount+0xa8>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
ffc074ac: 4b ff cf 89 bl ffc04434 <rtems_filesystem_freenode>
* 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 )
ffc074b0: 3d 20 00 00 lis r9,0
ffc074b4: 81 29 26 f8 lwz r9,9976(r9)
ffc074b8: 80 09 00 14 lwz r0,20(r9)
ffc074bc: 7f 80 f8 00 cmpw cr7,r0,r31
ffc074c0: 41 9e 00 2c beq- cr7,ffc074ec <unmount+0xa0>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
ffc074c4: 3c 60 ff c0 lis r3,-64
ffc074c8: 80 9f 00 2c lwz r4,44(r31)
ffc074cc: 38 63 74 38 addi r3,r3,29752
ffc074d0: 4b ff d8 51 bl ffc04d20 <rtems_filesystem_mount_iterate>
ffc074d4: 2f 83 00 00 cmpwi cr7,r3,0
ffc074d8: 40 9e 00 14 bne- cr7,ffc074ec <unmount+0xa0>
* 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 )
ffc074dc: 7f e3 fb 78 mr r3,r31
ffc074e0: 4b ff d3 5d bl ffc0483c <rtems_libio_is_open_files_in_fs>
ffc074e4: 2f 83 00 01 cmpwi cr7,r3,1
ffc074e8: 40 be 00 14 bne+ cr7,ffc074fc <unmount+0xb0>
rtems_set_errno_and_return_minus_one( EBUSY );
ffc074ec: 48 00 81 89 bl ffc0f674 <__errno>
ffc074f0: 38 00 00 10 li r0,16
ffc074f4: 90 03 00 00 stw r0,0(r3)
ffc074f8: 48 00 00 a0 b ffc07598 <unmount+0x14c>
* 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 )
ffc074fc: 81 3f 00 14 lwz r9,20(r31)
ffc07500: 7f e3 fb 78 mr r3,r31
ffc07504: 80 09 00 28 lwz r0,40(r9)
ffc07508: 7c 09 03 a6 mtctr r0
ffc0750c: 4e 80 04 21 bctrl
ffc07510: 2f 83 00 00 cmpwi cr7,r3,0
ffc07514: 40 9e 00 84 bne- cr7,ffc07598 <unmount+0x14c> <== NEVER TAKEN
* NOTE: Fatal error is called in a case which should never happen
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
ffc07518: 81 3f 00 28 lwz r9,40(r31)
ffc0751c: 7f e3 fb 78 mr r3,r31
ffc07520: 80 09 00 2c lwz r0,44(r9)
ffc07524: 7c 09 03 a6 mtctr r0
ffc07528: 4e 80 04 21 bctrl
ffc0752c: 2f 83 00 00 cmpwi cr7,r3,0
ffc07530: 41 9e 00 2c beq- cr7,ffc0755c <unmount+0x110> <== ALWAYS TAKEN
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
ffc07534: 81 3f 00 14 lwz r9,20(r31) <== NOT EXECUTED
ffc07538: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0753c: 80 09 00 20 lwz r0,32(r9) <== NOT EXECUTED
ffc07540: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc07544: 4e 80 04 21 bctrl <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
return -1;
ffc07548: 38 00 ff ff li r0,-1 <== NOT EXECUTED
* 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 )
ffc0754c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc07550: 41 be 00 4c beq+ cr7,ffc0759c <unmount+0x150> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
ffc07554: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc07558: 48 00 12 89 bl ffc087e0 <rtems_fatal_error_occurred> <== NOT EXECUTED
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 );
ffc0755c: 3f c0 00 00 lis r30,0
ffc07560: 80 7e 27 6c lwz r3,10092(r30)
ffc07564: 38 80 00 00 li r4,0
ffc07568: 38 a0 00 00 li r5,0
ffc0756c: 48 00 0a ed bl ffc08058 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
ffc07570: 7f e3 fb 78 mr r3,r31
ffc07574: 48 00 16 11 bl ffc08b84 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
ffc07578: 80 7e 27 6c lwz r3,10092(r30)
ffc0757c: 48 00 0c 09 bl ffc08184 <rtems_semaphore_release>
/*
* 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 );
ffc07580: 38 7f 00 08 addi r3,r31,8
ffc07584: 4b ff ce b1 bl ffc04434 <rtems_filesystem_freenode>
free( mt_entry );
ffc07588: 7f e3 fb 78 mr r3,r31
ffc0758c: 4b ff ce d5 bl ffc04460 <free>
return 0;
ffc07590: 38 00 00 00 li r0,0
ffc07594: 48 00 00 08 b ffc0759c <unmount+0x150>
* 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 )
return -1;
ffc07598: 38 00 ff ff li r0,-1
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
ffc0759c: 39 61 00 30 addi r11,r1,48
ffc075a0: 7c 03 03 78 mr r3,r0
ffc075a4: 4b ff 90 e4 b ffc00688 <_restgpr_30_x>
ffc0759c <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
ffc0759c: 94 21 ff a8 stwu r1,-88(r1)
ffc075a0: 7c 08 02 a6 mflr r0
ffc075a4: be a1 00 2c stmw r21,44(r1)
ffc075a8: 7c 7f 1b 78 mr r31,r3
ffc075ac: 7c 9e 23 78 mr r30,r4
ffc075b0: 90 01 00 5c stw r0,92(r1)
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
ffc075b4: 3f 60 00 00 lis r27,0
for (n = 0; n < count; n++) {
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
ffc075b8: 3e a0 ff c2 lis r21,-62
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
ffc075bc: 3a e1 00 08 addi r23,r1,8
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
str = "";
ffc075c0: 3e c0 ff c2 lis r22,-62
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
ffc075c4: 48 00 03 40 b ffc07904 <vprintk+0x368>
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
ffc075c8: 2f 83 00 25 cmpwi cr7,r3,37
ffc075cc: 40 9e 02 08 bne- cr7,ffc077d4 <vprintk+0x238>
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
ffc075d0: 88 1f 00 01 lbz r0,1(r31)
ffc075d4: 2f 80 00 30 cmpwi cr7,r0,48
ffc075d8: 41 9e 00 10 beq- cr7,ffc075e8 <vprintk+0x4c>
if (*fmt != '%') {
BSP_output_char(*fmt);
continue;
}
fmt++;
ffc075dc: 3b ff 00 01 addi r31,r31,1
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
ffc075e0: 3b 00 00 20 li r24,32
ffc075e4: 48 00 00 0c b ffc075f0 <vprintk+0x54>
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
ffc075e8: 3b ff 00 02 addi r31,r31,2
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
ffc075ec: 3b 00 00 30 li r24,48
fmt++;
}
if (*fmt == '-' ) {
ffc075f0: 88 1f 00 00 lbz r0,0(r31)
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
ffc075f4: 3b 20 00 00 li r25,0
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
ffc075f8: 2f 80 00 2d cmpwi cr7,r0,45
ffc075fc: 40 be 00 0c bne+ cr7,ffc07608 <vprintk+0x6c>
minus = true;
fmt++;
ffc07600: 3b ff 00 01 addi r31,r31,1
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
ffc07604: 3b 20 00 01 li r25,1
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
ffc07608: 3b 80 00 00 li r28,0
ffc0760c: 48 00 00 14 b ffc07620 <vprintk+0x84>
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
ffc07610: 1f 9c 00 0a mulli r28,r28,10
width += ((unsigned) *fmt - '0');
ffc07614: 3b 9c ff d0 addi r28,r28,-48
ffc07618: 7f 9c 1a 14 add r28,r28,r3
fmt++;
ffc0761c: 3b ff 00 01 addi r31,r31,1
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
ffc07620: 88 7f 00 00 lbz r3,0(r31)
ffc07624: 38 03 ff d0 addi r0,r3,-48
ffc07628: 54 00 06 3e clrlwi r0,r0,24
ffc0762c: 2b 80 00 09 cmplwi cr7,r0,9
ffc07630: 40 9d ff e0 ble+ cr7,ffc07610 <vprintk+0x74>
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
ffc07634: 2f 83 00 6c cmpwi cr7,r3,108
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
ffc07638: 7f 9a e3 78 mr r26,r28
ffc0763c: 7f eb fb 78 mr r11,r31
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
ffc07640: 40 be 00 0c bne+ cr7,ffc0764c <vprintk+0xb0>
lflag = true;
c = *++fmt;
ffc07644: 88 6b 00 01 lbz r3,1(r11)
ffc07648: 3b ff 00 01 addi r31,r31,1
}
if ( c == 'c' ) {
ffc0764c: 2f 83 00 63 cmpwi cr7,r3,99
ffc07650: 40 be 00 40 bne+ cr7,ffc07690 <vprintk+0xf4>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
ffc07654: 89 7e 00 00 lbz r11,0(r30)
ffc07658: 2b 8b 00 08 cmplwi cr7,r11,8
ffc0765c: 40 9c 00 1c bge- cr7,ffc07678 <vprintk+0xdc> <== NEVER TAKEN
ffc07660: 81 3e 00 08 lwz r9,8(r30)
ffc07664: 55 60 10 3a rlwinm r0,r11,2,0,29
ffc07668: 39 6b 00 01 addi r11,r11,1
ffc0766c: 7d 29 02 14 add r9,r9,r0
ffc07670: 99 7e 00 00 stb r11,0(r30)
ffc07674: 48 00 00 10 b ffc07684 <vprintk+0xe8>
ffc07678: 81 3e 00 04 lwz r9,4(r30) <== NOT EXECUTED
ffc0767c: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED
ffc07680: 90 1e 00 04 stw r0,4(r30) <== NOT EXECUTED
BSP_output_char(chr);
ffc07684: 80 1b 27 34 lwz r0,10036(r27)
ffc07688: 88 69 00 03 lbz r3,3(r9)
ffc0768c: 48 00 01 4c b ffc077d8 <vprintk+0x23c>
continue;
}
if ( c == 's' ) {
ffc07690: 2f 83 00 73 cmpwi cr7,r3,115
ffc07694: 40 be 00 e8 bne+ cr7,ffc0777c <vprintk+0x1e0>
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
ffc07698: 89 7e 00 00 lbz r11,0(r30)
ffc0769c: 2b 8b 00 08 cmplwi cr7,r11,8
ffc076a0: 40 9c 00 1c bge- cr7,ffc076bc <vprintk+0x120> <== NEVER TAKEN
ffc076a4: 81 3e 00 08 lwz r9,8(r30)
ffc076a8: 55 60 10 3a rlwinm r0,r11,2,0,29
ffc076ac: 39 6b 00 01 addi r11,r11,1
ffc076b0: 7d 29 02 14 add r9,r9,r0
ffc076b4: 99 7e 00 00 stb r11,0(r30)
ffc076b8: 48 00 00 10 b ffc076c8 <vprintk+0x12c>
ffc076bc: 81 3e 00 04 lwz r9,4(r30) <== NOT EXECUTED
ffc076c0: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED
ffc076c4: 90 1e 00 04 stw r0,4(r30) <== NOT EXECUTED
ffc076c8: 83 49 00 00 lwz r26,0(r9)
if ( str == NULL ) {
ffc076cc: 2f 9a 00 00 cmpwi cr7,r26,0
ffc076d0: 40 be 00 08 bne+ cr7,ffc076d8 <vprintk+0x13c>
str = "";
ffc076d4: 3b 56 c3 0b addi r26,r22,-15605
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
ffc076d8: 3b a0 00 00 li r29,0
ffc076dc: 48 00 00 08 b ffc076e4 <vprintk+0x148>
ffc076e0: 3b bd 00 01 addi r29,r29,1
ffc076e4: 7c 1a e8 ae lbzx r0,r26,r29
ffc076e8: 2f 80 00 00 cmpwi cr7,r0,0
ffc076ec: 40 9e ff f4 bne+ cr7,ffc076e0 <vprintk+0x144>
;
/* leading spaces */
if ( !minus )
ffc076f0: 2f 99 00 00 cmpwi cr7,r25,0
ffc076f4: 7f b8 eb 78 mr r24,r29
ffc076f8: 41 9e 00 1c beq- cr7,ffc07714 <vprintk+0x178>
ffc076fc: 48 00 00 20 b ffc0771c <vprintk+0x180>
for ( i=len ; i<width ; i++ )
BSP_output_char(' ');
ffc07700: 80 1b 27 34 lwz r0,10036(r27)
ffc07704: 38 60 00 20 li r3,32
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
ffc07708: 3b 18 00 01 addi r24,r24,1
BSP_output_char(' ');
ffc0770c: 7c 09 03 a6 mtctr r0
ffc07710: 4e 80 04 21 bctrl
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
ffc07714: 7f 98 e0 40 cmplw cr7,r24,r28
ffc07718: 41 9c ff e8 blt+ cr7,ffc07700 <vprintk+0x164>
BSP_output_char(' ');
/* no width option */
if (width == 0) {
ffc0771c: 2f 9c 00 00 cmpwi cr7,r28,0
ffc07720: 40 9e 00 24 bne- cr7,ffc07744 <vprintk+0x1a8>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
ffc07724: 2f 9d 00 00 cmpwi cr7,r29,0
ffc07728: 41 be 00 28 beq+ cr7,ffc07750 <vprintk+0x1b4>
ffc0772c: 7f bc eb 78 mr r28,r29
ffc07730: 48 00 00 14 b ffc07744 <vprintk+0x1a8>
BSP_output_char(*str);
ffc07734: 80 1b 27 34 lwz r0,10036(r27)
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
ffc07738: 3b 5a 00 01 addi r26,r26,1
BSP_output_char(*str);
ffc0773c: 7c 09 03 a6 mtctr r0
ffc07740: 4e 80 04 21 bctrl
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
ffc07744: 88 7a 00 00 lbz r3,0(r26)
ffc07748: 2f 83 00 00 cmpwi cr7,r3,0
ffc0774c: 40 9e ff e8 bne+ cr7,ffc07734 <vprintk+0x198>
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
ffc07750: 2f 99 00 00 cmpwi cr7,r25,0
ffc07754: 41 9e 01 ac beq- cr7,ffc07900 <vprintk+0x364>
ffc07758: 48 00 00 18 b ffc07770 <vprintk+0x1d4>
for ( i=len ; i<width ; i++ )
BSP_output_char(' ');
ffc0775c: 80 1b 27 34 lwz r0,10036(r27)
ffc07760: 38 60 00 20 li r3,32
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
ffc07764: 3b bd 00 01 addi r29,r29,1
BSP_output_char(' ');
ffc07768: 7c 09 03 a6 mtctr r0
ffc0776c: 4e 80 04 21 bctrl
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
ffc07770: 7f 9d e0 40 cmplw cr7,r29,r28
ffc07774: 41 9c ff e8 blt+ cr7,ffc0775c <vprintk+0x1c0>
ffc07778: 48 00 01 88 b ffc07900 <vprintk+0x364>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
ffc0777c: 2f 83 00 6f cmpwi cr7,r3,111
ffc07780: 41 9e 00 64 beq- cr7,ffc077e4 <vprintk+0x248>
ffc07784: 2f 83 00 4f cmpwi cr7,r3,79
ffc07788: 41 9e 00 5c beq- cr7,ffc077e4 <vprintk+0x248>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
ffc0778c: 2f 83 00 69 cmpwi cr7,r3,105
ffc07790: 41 9e 00 60 beq- cr7,ffc077f0 <vprintk+0x254>
ffc07794: 2f 83 00 49 cmpwi cr7,r3,73
ffc07798: 41 9e 00 58 beq- cr7,ffc077f0 <vprintk+0x254>
ffc0779c: 2f 83 00 64 cmpwi cr7,r3,100
ffc077a0: 41 9e 00 50 beq- cr7,ffc077f0 <vprintk+0x254>
c == 'd' || c == 'D' ) {
ffc077a4: 2f 83 00 44 cmpwi cr7,r3,68
ffc077a8: 41 9e 00 48 beq- cr7,ffc077f0 <vprintk+0x254>
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
ffc077ac: 2f 83 00 75 cmpwi cr7,r3,117
ffc077b0: 41 9e 00 48 beq- cr7,ffc077f8 <vprintk+0x25c>
ffc077b4: 2f 83 00 55 cmpwi cr7,r3,85
ffc077b8: 41 9e 00 40 beq- cr7,ffc077f8 <vprintk+0x25c>
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
ffc077bc: 2f 83 00 78 cmpwi cr7,r3,120
ffc077c0: 41 9e 00 44 beq- cr7,ffc07804 <vprintk+0x268>
ffc077c4: 2f 83 00 58 cmpwi cr7,r3,88
ffc077c8: 41 9e 00 3c beq- cr7,ffc07804 <vprintk+0x268>
base = 16; sign = false;
} else if ( c == 'p' ) {
ffc077cc: 2f 83 00 70 cmpwi cr7,r3,112
ffc077d0: 41 9e 00 34 beq- cr7,ffc07804 <vprintk+0x268>
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
ffc077d4: 80 1b 27 34 lwz r0,10036(r27)
ffc077d8: 7c 09 03 a6 mtctr r0
ffc077dc: 4e 80 04 21 bctrl
continue;
ffc077e0: 48 00 01 20 b ffc07900 <vprintk+0x364>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
ffc077e4: 38 00 00 00 li r0,0
ffc077e8: 3b a0 00 08 li r29,8
ffc077ec: 48 00 00 20 b ffc0780c <vprintk+0x270>
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
ffc077f0: 38 00 00 01 li r0,1
ffc077f4: 48 00 00 08 b ffc077fc <vprintk+0x260>
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
ffc077f8: 38 00 00 00 li r0,0
ffc077fc: 3b a0 00 0a li r29,10
ffc07800: 48 00 00 0c b ffc0780c <vprintk+0x270>
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
ffc07804: 38 00 00 00 li r0,0
ffc07808: 3b a0 00 10 li r29,16
BSP_output_char(c);
continue;
}
printNum(
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
ffc0780c: 89 7e 00 00 lbz r11,0(r30)
ffc07810: 2b 8b 00 08 cmplwi cr7,r11,8
ffc07814: 40 9c 00 1c bge- cr7,ffc07830 <vprintk+0x294>
ffc07818: 81 5e 00 08 lwz r10,8(r30)
ffc0781c: 55 69 10 3a rlwinm r9,r11,2,0,29
ffc07820: 39 6b 00 01 addi r11,r11,1
ffc07824: 7d 2a 4a 14 add r9,r10,r9
ffc07828: 99 7e 00 00 stb r11,0(r30)
} else {
BSP_output_char(c);
continue;
}
printNum(
ffc0782c: 48 00 00 10 b ffc0783c <vprintk+0x2a0>
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
ffc07830: 81 3e 00 04 lwz r9,4(r30)
ffc07834: 39 69 00 04 addi r11,r9,4
ffc07838: 91 7e 00 04 stw r11,4(r30)
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
ffc0783c: 2f 80 00 00 cmpwi cr7,r0,0
} else {
BSP_output_char(c);
continue;
}
printNum(
ffc07840: 83 29 00 00 lwz r25,0(r9)
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
ffc07844: 41 9e 00 30 beq- cr7,ffc07874 <vprintk+0x2d8>
ffc07848: 2f 99 00 00 cmpwi cr7,r25,0
ffc0784c: 40 bc 00 28 bge+ cr7,ffc07874 <vprintk+0x2d8>
BSP_output_char('-');
ffc07850: 80 1b 27 34 lwz r0,10036(r27)
ffc07854: 38 60 00 2d li r3,45
unsigned_num = (unsigned long) -num;
ffc07858: 7f 39 00 d0 neg r25,r25
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
ffc0785c: 7c 09 03 a6 mtctr r0
ffc07860: 4e 80 04 21 bctrl
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
ffc07864: 2f 9c 00 00 cmpwi cr7,r28,0
ffc07868: 41 9e 00 10 beq- cr7,ffc07878 <vprintk+0x2dc>
ffc0786c: 3b 5c ff ff addi r26,r28,-1
ffc07870: 48 00 00 08 b ffc07878 <vprintk+0x2dc>
} else {
unsigned_num = (unsigned long) num;
ffc07874: 7f 9a e3 78 mr r26,r28
}
count = 0;
ffc07878: 3b 80 00 00 li r28,0
ffc0787c: 48 00 00 18 b ffc07894 <vprintk+0x2f8>
while ((n = unsigned_num / base) > 0) {
toPrint[count++] = (char) (unsigned_num - (n * base));
ffc07880: 7d 20 e9 d6 mullw r9,r0,r29
ffc07884: 7f 29 c8 50 subf r25,r9,r25
ffc07888: 7f 3c b9 ae stbx r25,r28,r23
ffc0788c: 3b 9c 00 01 addi r28,r28,1
ffc07890: 7c 19 03 78 mr r25,r0
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
ffc07894: 7c 19 eb 96 divwu r0,r25,r29
ffc07898: 2f 80 00 00 cmpwi cr7,r0,0
ffc0789c: 40 9e ff e4 bne+ cr7,ffc07880 <vprintk+0x2e4>
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
ffc078a0: 7d 21 e2 14 add r9,r1,r28
ffc078a4: 9b 29 00 08 stb r25,8(r9)
ffc078a8: 3b 3c 00 01 addi r25,r28,1
ffc078ac: 48 00 00 18 b ffc078c4 <vprintk+0x328>
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
ffc078b0: 80 1b 27 34 lwz r0,10036(r27)
ffc078b4: 7f 03 c3 78 mr r3,r24
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
ffc078b8: 3b 5a ff ff addi r26,r26,-1
BSP_output_char(lead);
ffc078bc: 7c 09 03 a6 mtctr r0
ffc078c0: 4e 80 04 21 bctrl
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
ffc078c4: 7f 9a c8 40 cmplw cr7,r26,r25
ffc078c8: 41 9d ff e8 bgt+ cr7,ffc078b0 <vprintk+0x314>
ffc078cc: 3b a0 00 00 li r29,0
ffc078d0: 48 00 00 28 b ffc078f8 <vprintk+0x35c>
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
ffc078d4: 7d 57 e2 14 add r10,r23,r28
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
ffc078d8: 80 1b 27 34 lwz r0,10036(r27)
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
ffc078dc: 7d 3d 00 d0 neg r9,r29
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
ffc078e0: 7d 2a 48 ae lbzx r9,r10,r9
ffc078e4: 39 75 c3 0c addi r11,r21,-15604
ffc078e8: 7c 09 03 a6 mtctr r0
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
ffc078ec: 3b bd 00 01 addi r29,r29,1
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
ffc078f0: 7c 6b 48 ae lbzx r3,r11,r9
ffc078f4: 4e 80 04 21 bctrl
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
ffc078f8: 7f 9d c8 40 cmplw cr7,r29,r25
ffc078fc: 41 9c ff d8 blt+ cr7,ffc078d4 <vprintk+0x338>
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
ffc07900: 3b ff 00 01 addi r31,r31,1
ffc07904: 88 7f 00 00 lbz r3,0(r31)
ffc07908: 2f 83 00 00 cmpwi cr7,r3,0
ffc0790c: 40 9e fc bc bne+ cr7,ffc075c8 <vprintk+0x2c>
sign,
width,
lead
);
}
}
ffc07910: 39 61 00 58 addi r11,r1,88
ffc07914: 4b ff 8b f8 b ffc0050c <_restgpr_21_x>
ffc1aba4 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
ffc1aba4: 7c 08 02 a6 mflr r0
ffc1aba8: 7c 2b 0b 78 mr r11,r1
ffc1abac: 94 21 ff f0 stwu r1,-16(r1)
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc1abb0: 3d 40 00 00 lis r10,0
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
ffc1abb4: 90 01 00 14 stw r0,20(r1)
ffc1abb8: 4b ff f7 7d bl ffc1a334 <_savegpr_31>
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc1abbc: 80 0a 26 fc lwz r0,9980(r10)
ffc1abc0: 7f 83 00 40 cmplw cr7,r3,r0
ffc1abc4: 40 9c 00 48 bge- cr7,ffc1ac0c <write+0x68>
iop = rtems_libio_iop( fd );
ffc1abc8: 3d 40 00 00 lis r10,0
ffc1abcc: 83 ea 27 ac lwz r31,10156(r10)
ffc1abd0: 54 63 30 32 rlwinm r3,r3,6,0,25
ffc1abd4: 7f ff 1a 14 add r31,r31,r3
rtems_libio_check_is_open( iop );
ffc1abd8: 80 1f 00 18 lwz r0,24(r31)
ffc1abdc: 70 0a 01 00 andi. r10,r0,256
ffc1abe0: 41 82 00 2c beq- ffc1ac0c <write+0x68>
rtems_libio_check_buffer( buffer );
ffc1abe4: 2f 84 00 00 cmpwi cr7,r4,0
ffc1abe8: 40 be 00 10 bne+ cr7,ffc1abf8 <write+0x54> <== ALWAYS TAKEN
ffc1abec: 4b ff 4f b1 bl ffc0fb9c <__errno> <== NOT EXECUTED
ffc1abf0: 38 00 00 16 li r0,22 <== NOT EXECUTED
ffc1abf4: 48 00 00 20 b ffc1ac14 <write+0x70> <== NOT EXECUTED
rtems_libio_check_count( count );
ffc1abf8: 2f 85 00 00 cmpwi cr7,r5,0
ffc1abfc: 38 60 00 00 li r3,0
ffc1ac00: 41 9e 00 5c beq- cr7,ffc1ac5c <write+0xb8>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
ffc1ac04: 70 09 00 04 andi. r9,r0,4
ffc1ac08: 40 a2 00 18 bne+ ffc1ac20 <write+0x7c>
ffc1ac0c: 4b ff 4f 91 bl ffc0fb9c <__errno>
ffc1ac10: 38 00 00 09 li r0,9
ffc1ac14: 90 03 00 00 stw r0,0(r3)
ffc1ac18: 38 60 ff ff li r3,-1
ffc1ac1c: 48 00 00 40 b ffc1ac5c <write+0xb8>
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
ffc1ac20: 81 3f 00 24 lwz r9,36(r31)
ffc1ac24: 7f e3 fb 78 mr r3,r31
ffc1ac28: 80 09 00 0c lwz r0,12(r9)
ffc1ac2c: 7c 09 03 a6 mtctr r0
ffc1ac30: 4e 80 04 21 bctrl
if ( rc > 0 )
ffc1ac34: 2c 03 00 00 cmpwi r3,0
ffc1ac38: 40 81 00 24 ble- ffc1ac5c <write+0xb8>
iop->offset += rc;
ffc1ac3c: 81 1f 00 10 lwz r8,16(r31)
ffc1ac40: 7c 6b 1b 78 mr r11,r3
ffc1ac44: 81 3f 00 14 lwz r9,20(r31)
ffc1ac48: 7c 6a fe 70 srawi r10,r3,31
ffc1ac4c: 7d 6b 48 14 addc r11,r11,r9
ffc1ac50: 7d 4a 41 14 adde r10,r10,r8
ffc1ac54: 91 5f 00 10 stw r10,16(r31)
ffc1ac58: 91 7f 00 14 stw r11,20(r31)
return rc;
}
ffc1ac5c: 39 61 00 10 addi r11,r1,16
ffc1ac60: 4b fe 58 d4 b ffc00534 <_restgpr_31_x>
ffc08740 <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc08740: 94 21 ff d8 stwu r1,-40(r1)
ffc08744: 7c 08 02 a6 mflr r0
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc08748: 3d 20 00 00 lis r9,0
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc0874c: 90 01 00 2c stw r0,44(r1)
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc08750: 80 09 26 dc lwz r0,9948(r9)
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc08754: bf 21 00 0c stmw r25,12(r1)
ffc08758: 7c ba 2b 78 mr r26,r5
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc0875c: 7f 83 00 40 cmplw cr7,r3,r0
ffc08760: 40 9c 00 28 bge- cr7,ffc08788 <writev+0x48>
iop = rtems_libio_iop( fd );
ffc08764: 3d 20 00 00 lis r9,0
ffc08768: 83 69 27 88 lwz r27,10120(r9)
ffc0876c: 54 63 30 32 rlwinm r3,r3,6,0,25
ffc08770: 7f 7b 1a 14 add r27,r27,r3
rtems_libio_check_is_open( iop );
ffc08774: 80 1b 00 18 lwz r0,24(r27)
ffc08778: 70 09 01 00 andi. r9,r0,256
ffc0877c: 41 82 00 0c beq- ffc08788 <writev+0x48>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
ffc08780: 70 09 00 04 andi. r9,r0,4
ffc08784: 40 a2 00 10 bne+ ffc08794 <writev+0x54> <== ALWAYS TAKEN
ffc08788: 48 00 7e 65 bl ffc105ec <__errno>
ffc0878c: 38 00 00 09 li r0,9
ffc08790: 48 00 00 68 b ffc087f8 <writev+0xb8>
/*
* Argument validation on IO vector
*/
if ( !iov )
ffc08794: 2f 84 00 00 cmpwi cr7,r4,0
ffc08798: 41 9e 00 58 beq- cr7,ffc087f0 <writev+0xb0>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
ffc0879c: 2f 85 00 00 cmpwi cr7,r5,0
ffc087a0: 40 9d 00 50 ble- cr7,ffc087f0 <writev+0xb0>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
ffc087a4: 2f 85 04 00 cmpwi cr7,r5,1024
ffc087a8: 41 9d 00 48 bgt- cr7,ffc087f0 <writev+0xb0> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
ffc087ac: 7c 9c 23 78 mr r28,r4
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
ffc087b0: 7c a9 03 a6 mtctr r5
ffc087b4: 7c 89 23 78 mr r9,r4
ffc087b8: 38 00 00 01 li r0,1
ffc087bc: 39 60 00 00 li r11,0
ffc087c0: 48 00 00 08 b ffc087c8 <writev+0x88>
* 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++ ) {
ffc087c4: 7d 4b 53 78 mr r11,r10
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
ffc087c8: 81 49 00 00 lwz r10,0(r9)
ffc087cc: 2f 8a 00 00 cmpwi cr7,r10,0
ffc087d0: 41 9e 00 20 beq- cr7,ffc087f0 <writev+0xb0>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
ffc087d4: 81 49 00 04 lwz r10,4(r9)
all_zeros = false;
ffc087d8: 31 0a ff ff addic r8,r10,-1
ffc087dc: 7d 08 41 10 subfe r8,r8,r8
/* check for wrap */
old = total;
total += iov[v].iov_len;
ffc087e0: 7d 4a 5a 14 add r10,r10,r11
if ( total < old || total > SSIZE_MAX )
ffc087e4: 7f 8a 58 00 cmpw cr7,r10,r11
*/
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
ffc087e8: 7c 00 40 38 and r0,r0,r8
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
ffc087ec: 40 bc 00 14 bge+ cr7,ffc08800 <writev+0xc0>
rtems_set_errno_and_return_minus_one( EINVAL );
ffc087f0: 48 00 7d fd bl ffc105ec <__errno>
ffc087f4: 38 00 00 16 li r0,22
ffc087f8: 90 03 00 00 stw r0,0(r3)
ffc087fc: 48 00 00 90 b ffc0888c <writev+0x14c>
* 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++ ) {
ffc08800: 39 29 00 08 addi r9,r9,8
ffc08804: 42 00 ff c0 bdnz+ ffc087c4 <writev+0x84>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
ffc08808: 2f 80 00 00 cmpwi cr7,r0,0
return 0;
ffc0880c: 3b a0 00 00 li r29,0
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
ffc08810: 40 9e 00 80 bne- cr7,ffc08890 <writev+0x150>
ffc08814: 3b 20 00 00 li r25,0
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
ffc08818: 80 bc 00 04 lwz r5,4(r28)
ffc0881c: 2f 85 00 00 cmpwi cr7,r5,0
ffc08820: 41 be 00 58 beq+ cr7,ffc08878 <writev+0x138> <== NEVER TAKEN
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
ffc08824: 81 3b 00 24 lwz r9,36(r27)
ffc08828: 7f 63 db 78 mr r3,r27
ffc0882c: 80 9c 00 00 lwz r4,0(r28)
ffc08830: 80 09 00 0c lwz r0,12(r9)
ffc08834: 7c 09 03 a6 mtctr r0
ffc08838: 4e 80 04 21 bctrl
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
ffc0883c: 2c 03 00 00 cmpwi r3,0
ffc08840: 41 80 00 4c blt- ffc0888c <writev+0x14c> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
ffc08844: 41 82 00 28 beq- ffc0886c <writev+0x12c> <== NEVER TAKEN
iop->offset += bytes;
ffc08848: 81 5b 00 10 lwz r10,16(r27)
ffc0884c: 7c 7f 1b 78 mr r31,r3
ffc08850: 81 7b 00 14 lwz r11,20(r27)
ffc08854: 7c 7e fe 70 srawi r30,r3,31
total += bytes;
ffc08858: 7f bd 1a 14 add r29,r29,r3
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
ffc0885c: 7d 6b f8 14 addc r11,r11,r31
ffc08860: 7d 4a f1 14 adde r10,r10,r30
ffc08864: 91 5b 00 10 stw r10,16(r27)
ffc08868: 91 7b 00 14 stw r11,20(r27)
total += bytes;
}
if (bytes != iov[ v ].iov_len)
ffc0886c: 80 1c 00 04 lwz r0,4(r28)
ffc08870: 7f 83 00 00 cmpw cr7,r3,r0
ffc08874: 40 9e 00 1c bne- cr7,ffc08890 <writev+0x150> <== NEVER TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ffc08878: 3b 39 00 01 addi r25,r25,1
ffc0887c: 7f 99 d0 00 cmpw cr7,r25,r26
ffc08880: 3b 9c 00 08 addi r28,r28,8
ffc08884: 40 9e ff 94 bne+ cr7,ffc08818 <writev+0xd8>
ffc08888: 48 00 00 08 b ffc08890 <writev+0x150>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
ffc0888c: 3b a0 ff ff li r29,-1
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
ffc08890: 39 61 00 28 addi r11,r1,40
ffc08894: 7f a3 eb 78 mr r3,r29
ffc08898: 4b ff 82 d0 b ffc00b68 <_restgpr_25_x>