RTEMS 4.11Annotated Report
Mon Mar 21 01:08:59 2011
ffc0d930 <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 ) {
ffc0d930: 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;
ffc0d934: 81 23 00 10 lwz r9,16(r3)
switch( node->type ) {
ffc0d938: 80 0b 00 4c lwz r0,76(r11)
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
ffc0d93c: 81 29 00 34 lwz r9,52(r9)
switch( node->type ) {
ffc0d940: 2b 80 00 07 cmplwi cr7,r0,7
ffc0d944: 41 9d 00 28 bgt- cr7,ffc0d96c <IMFS_Set_handlers+0x3c> <== NEVER TAKEN
ffc0d948: 3d 60 ff c2 lis r11,-62
ffc0d94c: 39 6b 8e c4 addi r11,r11,-28988
ffc0d950: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0d954: 7c 0b 00 2e lwzx r0,r11,r0
ffc0d958: 7d 60 5a 14 add r11,r0,r11
ffc0d95c: 7d 69 03 a6 mtctr r11
ffc0d960: 4e 80 04 20 bctr
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
ffc0d964: 80 09 00 0c lwz r0,12(r9)
ffc0d968: 90 03 00 08 stw r0,8(r3)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
ffc0d96c: 38 60 00 00 li r3,0
ffc0d970: 4e 80 00 20 blr
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
ffc0d974: 80 09 00 08 lwz r0,8(r9)
ffc0d978: 90 03 00 08 stw r0,8(r3)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
ffc0d97c: 38 60 00 00 li r3,0
ffc0d980: 4e 80 00 20 blr
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
ffc0d984: 3d 20 ff c2 lis r9,-62
ffc0d988: 38 09 8f 64 addi r0,r9,-28828
ffc0d98c: 90 03 00 08 stw r0,8(r3)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
ffc0d990: 38 60 00 00 li r3,0
ffc0d994: 4e 80 00 20 blr
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
ffc0d998: 80 09 00 10 lwz r0,16(r9)
ffc0d99c: 90 03 00 08 stw r0,8(r3)
break;
}
return 0;
}
ffc0d9a0: 38 60 00 00 li r3,0
ffc0d9a4: 4e 80 00 20 blr
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
ffc0d9a8: 3d 20 ff c2 lis r9,-62
ffc0d9ac: 38 09 8e f4 addi r0,r9,-28940
ffc0d9b0: 90 03 00 08 stw r0,8(r3)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
ffc0d9b4: 38 60 00 00 li r3,0
ffc0d9b8: 4e 80 00 20 blr
ffc0d720 <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
ffc0d720: 7d 80 00 26 mfcr r12
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
ffc0d724: 7c 69 1b 79 mr. r9,r3
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
ffc0d728: 94 21 ff e0 stwu r1,-32(r1)
ffc0d72c: 7c 08 02 a6 mflr r0
ffc0d730: 93 61 00 0c stw r27,12(r1)
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
return NULL;
ffc0d734: 3b 60 00 00 li r27,0
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
ffc0d738: 93 81 00 10 stw r28,16(r1)
ffc0d73c: 7c fc 3b 78 mr r28,r7
ffc0d740: 93 e1 00 1c stw r31,28(r1)
ffc0d744: 7c 9f 23 78 mr r31,r4
ffc0d748: 90 01 00 24 stw r0,36(r1)
ffc0d74c: 93 a1 00 14 stw r29,20(r1)
ffc0d750: 93 c1 00 18 stw r30,24(r1)
ffc0d754: 91 81 00 08 stw r12,8(r1)
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
ffc0d758: 41 82 00 b4 beq- ffc0d80c <IMFS_create_node+0xec> <== NEVER TAKEN
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
ffc0d75c: 2e 04 00 07 cmpwi cr4,r4,7
*/
if ( parent_loc == NULL )
return NULL;
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
ffc0d760: 81 69 00 10 lwz r11,16(r9)
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
return NULL;
parent = parent_loc->node_access;
ffc0d764: 83 a9 00 00 lwz r29,0(r9)
fs_info = parent_loc->mt_entry->fs_info;
ffc0d768: 83 cb 00 34 lwz r30,52(r11)
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
ffc0d76c: 41 92 00 d0 beq- cr4,ffc0d83c <IMFS_create_node+0x11c>
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
ffc0d770: 3d 20 00 00 lis r9,0
ffc0d774: 81 29 27 1c lwz r9,10012(r9)
ffc0d778: 7c a4 2b 78 mr r4,r5
ffc0d77c: 7f e3 fb 78 mr r3,r31
ffc0d780: 80 09 00 2c lwz r0,44(r9)
ffc0d784: 7c c5 00 78 andc r5,r6,r0
ffc0d788: 4b ff fe f1 bl ffc0d678 <IMFS_allocate_node>
if ( !node )
ffc0d78c: 7c 7b 1b 79 mr. r27,r3
ffc0d790: 41 82 00 7c beq- ffc0d80c <IMFS_create_node+0xec>
return NULL;
/*
* Set the type specific information
*/
if ( type == IMFS_DIRECTORY ) {
ffc0d794: 2f 9f 00 01 cmpwi cr7,r31,1
ffc0d798: 41 9e 00 3c beq- cr7,ffc0d7d4 <IMFS_create_node+0xb4>
rtems_chain_initialize_empty(&node->info.directory.Entries);
} else if ( type == IMFS_HARD_LINK ) {
ffc0d79c: 2f 9f 00 03 cmpwi cr7,r31,3
ffc0d7a0: 41 9e 00 f4 beq- cr7,ffc0d894 <IMFS_create_node+0x174>
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
ffc0d7a4: 2f 9f 00 04 cmpwi cr7,r31,4
ffc0d7a8: 41 9e 00 ec beq- cr7,ffc0d894 <IMFS_create_node+0x174>
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
ffc0d7ac: 2f 9f 00 02 cmpwi cr7,r31,2
ffc0d7b0: 41 9e 00 d0 beq- cr7,ffc0d880 <IMFS_create_node+0x160>
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
ffc0d7b4: 2f 9f 00 06 cmpwi cr7,r31,6
ffc0d7b8: 41 9e 00 e8 beq- cr7,ffc0d8a0 <IMFS_create_node+0x180>
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
} else if ( type == IMFS_MEMORY_FILE ) {
ffc0d7bc: 2f 9f 00 05 cmpwi cr7,r31,5
ffc0d7c0: 41 9e 00 fc beq- cr7,ffc0d8bc <IMFS_create_node+0x19c>
node->info.file.size = 0;
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
} else if ( type == IMFS_FIFO ) {
ffc0d7c4: 40 b2 00 28 bne+ cr4,ffc0d7ec <IMFS_create_node+0xcc> <== NEVER TAKEN
node->info.fifo.pipe = NULL;
ffc0d7c8: 38 00 00 00 li r0,0
ffc0d7cc: 90 1b 00 50 stw r0,80(r27)
ffc0d7d0: 48 00 00 1c b ffc0d7ec <IMFS_create_node+0xcc>
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 );
ffc0d7d4: 39 3b 00 54 addi r9,r27,84
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
ffc0d7d8: 38 1b 00 50 addi r0,r27,80
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0d7dc: 91 3b 00 50 stw r9,80(r27)
head->previous = NULL;
ffc0d7e0: 39 20 00 00 li r9,0
ffc0d7e4: 91 3b 00 54 stw r9,84(r27)
tail->previous = head;
ffc0d7e8: 90 1b 00 58 stw r0,88(r27)
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
ffc0d7ec: 81 3e 00 04 lwz r9,4(r30)
ffc0d7f0: 38 7d 00 50 addi r3,r29,80
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
ffc0d7f4: 93 bb 00 08 stw r29,8(r27)
ffc0d7f8: 7f 64 db 78 mr r4,r27
node->st_ino = ++fs_info->ino_count;
ffc0d7fc: 38 09 00 01 addi r0,r9,1
ffc0d800: 90 1e 00 04 stw r0,4(r30)
ffc0d804: 90 1b 00 38 stw r0,56(r27)
ffc0d808: 4b ff c3 01 bl ffc09b08 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
ffc0d80c: 80 01 00 24 lwz r0,36(r1)
ffc0d810: 7f 63 db 78 mr r3,r27
ffc0d814: 81 81 00 08 lwz r12,8(r1)
ffc0d818: 7c 08 03 a6 mtlr r0
ffc0d81c: 83 61 00 0c lwz r27,12(r1)
ffc0d820: 83 81 00 10 lwz r28,16(r1)
ffc0d824: 7d 80 81 20 mtcrf 8,r12
ffc0d828: 83 a1 00 14 lwz r29,20(r1)
ffc0d82c: 83 c1 00 18 lwz r30,24(r1)
ffc0d830: 83 e1 00 1c lwz r31,28(r1)
ffc0d834: 38 21 00 20 addi r1,r1,32
ffc0d838: 4e 80 00 20 blr
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
ffc0d83c: 81 3e 00 10 lwz r9,16(r30)
ffc0d840: 3d 60 ff c2 lis r11,-62
ffc0d844: 38 0b 8e 5c addi r0,r11,-29092
ffc0d848: 7f 89 00 00 cmpw cr7,r9,r0
ffc0d84c: 40 be ff 24 bne- cr7,ffc0d770 <IMFS_create_node+0x50>
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
ffc0d850: 80 01 00 24 lwz r0,36(r1)
ffc0d854: 7f 63 db 78 mr r3,r27
ffc0d858: 81 81 00 08 lwz r12,8(r1)
ffc0d85c: 7c 08 03 a6 mtlr r0
ffc0d860: 83 61 00 0c lwz r27,12(r1)
ffc0d864: 83 81 00 10 lwz r28,16(r1)
ffc0d868: 7d 80 81 20 mtcrf 8,r12
ffc0d86c: 83 a1 00 14 lwz r29,20(r1)
ffc0d870: 83 c1 00 18 lwz r30,24(r1)
ffc0d874: 83 e1 00 1c lwz r31,28(r1)
ffc0d878: 38 21 00 20 addi r1,r1,32
ffc0d87c: 4e 80 00 20 blr
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
ffc0d880: 81 3c 00 00 lwz r9,0(r28)
node->info.device.minor = info->device.minor;
ffc0d884: 80 1c 00 04 lwz r0,4(r28)
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
ffc0d888: 91 3b 00 50 stw r9,80(r27)
node->info.device.minor = info->device.minor;
ffc0d88c: 90 1b 00 54 stw r0,84(r27)
ffc0d890: 4b ff ff 5c b ffc0d7ec <IMFS_create_node+0xcc>
if ( type == IMFS_DIRECTORY ) {
rtems_chain_initialize_empty(&node->info.directory.Entries);
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
ffc0d894: 80 1c 00 00 lwz r0,0(r28)
ffc0d898: 90 1b 00 50 stw r0,80(r27)
ffc0d89c: 4b ff ff 50 b ffc0d7ec <IMFS_create_node+0xcc>
} 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;
ffc0d8a0: 39 20 00 00 li r9,0
ffc0d8a4: 39 40 00 00 li r10,0
ffc0d8a8: 91 3b 00 50 stw r9,80(r27)
node->info.linearfile.direct = 0;
ffc0d8ac: 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;
ffc0d8b0: 91 5b 00 54 stw r10,84(r27)
node->info.linearfile.direct = 0;
ffc0d8b4: 90 1b 00 58 stw r0,88(r27)
ffc0d8b8: 4b ff ff 34 b ffc0d7ec <IMFS_create_node+0xcc>
} else if ( type == IMFS_MEMORY_FILE ) {
node->info.file.size = 0;
node->info.file.indirect = 0;
ffc0d8bc: 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;
ffc0d8c0: 39 20 00 00 li r9,0
node->info.file.indirect = 0;
ffc0d8c4: 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;
ffc0d8c8: 39 40 00 00 li r10,0
ffc0d8cc: 91 3b 00 50 stw r9,80(r27)
ffc0d8d0: 91 5b 00 54 stw r10,84(r27)
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
ffc0d8d4: 90 1b 00 5c stw r0,92(r27)
node->info.file.triply_indirect = 0;
ffc0d8d8: 90 1b 00 60 stw r0,96(r27)
ffc0d8dc: 4b ff ff 10 b ffc0d7ec <IMFS_create_node+0xcc>
ffc073ec <IMFS_dump_directory>:
*/
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
ffc073ec: 94 21 ff d0 stwu r1,-48(r1)
ffc073f0: 7d 80 00 26 mfcr r12
ffc073f4: 7c 08 02 a6 mflr r0
ffc073f8: 93 41 00 18 stw r26,24(r1)
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
ffc073fc: 3b 43 00 54 addi r26,r3,84
ffc07400: 93 a1 00 24 stw r29,36(r1)
ffc07404: 7c 9d 23 78 mr r29,r4
ffc07408: 90 01 00 34 stw r0,52(r1)
ffc0740c: 93 01 00 10 stw r24,16(r1)
ffc07410: 93 21 00 14 stw r25,20(r1)
ffc07414: 93 61 00 1c stw r27,28(r1)
ffc07418: 93 81 00 20 stw r28,32(r1)
ffc0741c: 93 c1 00 28 stw r30,40(r1)
ffc07420: 93 e1 00 2c stw r31,44(r1)
ffc07424: 91 81 00 0c stw r12,12(r1)
*
*/
int IMFS_memfile_maximum_size( void )
{
return IMFS_MEMFILE_MAXIMUM_SIZE;
}
ffc07428: 83 63 00 50 lwz r27,80(r3)
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
ffc0742c: 7f 9b d0 00 cmpw cr7,r27,r26
ffc07430: 41 9e 00 68 beq- cr7,ffc07498 <IMFS_dump_directory+0xac>
ffc07434: 2e 04 00 00 cmpwi cr4,r4,0
ffc07438: 3f 80 ff c3 lis r28,-61
ffc0743c: 3b 9c 9c e4 addi r28,r28,-25372
ffc07440: 3f 20 00 00 lis r25,0
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
ffc07444: 3b 04 00 01 addi r24,r4,1
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
ffc07448: 41 90 00 30 blt- cr4,ffc07478 <IMFS_dump_directory+0x8c><== NEVER TAKEN
ffc0744c: 3b e0 00 00 li r31,0
ffc07450: 3b d9 27 70 addi r30,r25,10096
fprintf(stdout, "...." );
ffc07454: 81 3e 00 00 lwz r9,0(r30)
ffc07458: 7f 83 e3 78 mr r3,r28
ffc0745c: 38 80 00 01 li r4,1
ffc07460: 80 c9 00 08 lwz r6,8(r9)
ffc07464: 38 a0 00 04 li r5,4
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
ffc07468: 3b ff 00 01 addi r31,r31,1
fprintf(stdout, "...." );
ffc0746c: 48 01 15 f5 bl ffc18a60 <fwrite>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
ffc07470: 7f 9d f8 00 cmpw cr7,r29,r31
ffc07474: 40 9c ff e0 bge+ cr7,ffc07454 <IMFS_dump_directory+0x68>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
ffc07478: 7f 63 db 78 mr r3,r27
ffc0747c: 4b ff fd e9 bl ffc07264 <IMFS_print_jnode>
if ( the_jnode->type == IMFS_DIRECTORY )
ffc07480: 80 1b 00 4c lwz r0,76(r27)
ffc07484: 2f 80 00 01 cmpwi cr7,r0,1
ffc07488: 41 9e 00 48 beq- cr7,ffc074d0 <IMFS_dump_directory+0xe4>
the_chain = &the_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 ) {
ffc0748c: 83 7b 00 00 lwz r27,0(r27)
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
ffc07490: 7f 9b d0 00 cmpw cr7,r27,r26
ffc07494: 40 9e ff b4 bne+ cr7,ffc07448 <IMFS_dump_directory+0x5c>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
ffc07498: 80 01 00 34 lwz r0,52(r1)
ffc0749c: 81 81 00 0c lwz r12,12(r1)
ffc074a0: 7c 08 03 a6 mtlr r0
ffc074a4: 83 01 00 10 lwz r24,16(r1)
ffc074a8: 83 21 00 14 lwz r25,20(r1)
ffc074ac: 7d 80 81 20 mtcrf 8,r12
ffc074b0: 83 41 00 18 lwz r26,24(r1)
ffc074b4: 83 61 00 1c lwz r27,28(r1)
ffc074b8: 83 81 00 20 lwz r28,32(r1)
ffc074bc: 83 a1 00 24 lwz r29,36(r1)
ffc074c0: 83 c1 00 28 lwz r30,40(r1)
ffc074c4: 83 e1 00 2c lwz r31,44(r1)
ffc074c8: 38 21 00 30 addi r1,r1,48
ffc074cc: 4e 80 00 20 blr
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
ffc074d0: 7f 63 db 78 mr r3,r27
ffc074d4: 7f 04 c3 78 mr r4,r24
ffc074d8: 4b ff ff 15 bl ffc073ec <IMFS_dump_directory>
ffc074dc: 4b ff ff b0 b ffc0748c <IMFS_dump_directory+0xa0>
ffc0da78 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
ffc0da78: 94 21 ff 90 stwu r1,-112(r1)
ffc0da7c: 7c 08 02 a6 mflr r0
ffc0da80: 90 01 00 74 stw r0,116(r1)
char token[ IMFS_NAME_MAX + 1 ];
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
ffc0da84: 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 */
)
{
ffc0da88: 93 01 00 50 stw r24,80(r1)
ffc0da8c: 7c b8 2b 78 mr r24,r5
ffc0da90: 93 41 00 58 stw r26,88(r1)
ffc0da94: 7c 7a 1b 78 mr r26,r3
ffc0da98: 93 81 00 60 stw r28,96(r1)
ffc0da9c: 7c dc 33 78 mr r28,r6
ffc0daa0: 93 e1 00 6c stw r31,108(r1)
ffc0daa4: 7c 9f 23 78 mr r31,r4
ffc0daa8: 92 c1 00 48 stw r22,72(r1)
ffc0daac: 92 e1 00 4c stw r23,76(r1)
ffc0dab0: 93 21 00 54 stw r25,84(r1)
ffc0dab4: 93 61 00 5c stw r27,92(r1)
ffc0dab8: 93 a1 00 64 stw r29,100(r1)
ffc0dabc: 93 c1 00 68 stw r30,104(r1)
char token[ IMFS_NAME_MAX + 1 ];
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
ffc0dac0: 40 82 02 9c bne- ffc0dd5c <IMFS_eval_path+0x2e4> <== NEVER TAKEN
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
ffc0dac4: 83 a6 00 00 lwz r29,0(r6)
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
int i = 0;
ffc0dac8: 3b c0 00 00 li r30,0
ffc0dacc: 3b 61 00 20 addi r27,r1,32
ffc0dad0: 3b 21 00 08 addi r25,r1,8
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
ffc0dad4: 3e e0 00 00 lis r23,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 );
ffc0dad8: 7c 7a f2 14 add r3,r26,r30
ffc0dadc: 7f e4 fb 78 mr r4,r31
ffc0dae0: 7f 65 db 78 mr r5,r27
ffc0dae4: 7f 26 cb 78 mr r6,r25
ffc0dae8: 48 00 09 79 bl ffc0e460 <IMFS_get_token>
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
ffc0daec: 81 3c 00 00 lwz r9,0(r28)
* 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 );
ffc0daf0: 7c 76 1b 78 mr r22,r3
pathnamelen -= len;
ffc0daf4: 80 01 00 08 lwz r0,8(r1)
i += len;
if ( !pathloc->node_access )
ffc0daf8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0dafc: 41 9e 02 18 beq- cr7,ffc0dd14 <IMFS_eval_path+0x29c> <== 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 )
ffc0db00: 2f 83 00 00 cmpwi cr7,r3,0
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
ffc0db04: 7f e0 f8 50 subf r31,r0,r31
i += len;
ffc0db08: 7f de 02 14 add r30,r30,r0
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
ffc0db0c: 40 9e 00 44 bne- cr7,ffc0db50 <IMFS_eval_path+0xd8>
* 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 ) {
ffc0db10: 80 09 00 4c lwz r0,76(r9)
ffc0db14: 2f 80 00 01 cmpwi cr7,r0,1
ffc0db18: 41 9e 01 50 beq- cr7,ffc0dc68 <IMFS_eval_path+0x1f0>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
ffc0db1c: 7f 83 e3 78 mr r3,r28
ffc0db20: 4b ff fe 11 bl ffc0d930 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
ffc0db24: 7f 04 c3 78 mr r4,r24
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
ffc0db28: 7c 76 1b 78 mr r22,r3
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
ffc0db2c: 7f 83 e3 78 mr r3,r28
ffc0db30: 4b ff fe 8d bl ffc0d9bc <IMFS_evaluate_permission>
ffc0db34: 2f 83 00 00 cmpwi cr7,r3,0
ffc0db38: 40 be 00 d8 bne+ cr7,ffc0dc10 <IMFS_eval_path+0x198>
rtems_set_errno_and_return_minus_one( EACCES );
ffc0db3c: 48 00 45 39 bl ffc12074 <__errno>
ffc0db40: 38 00 00 0d li r0,13
ffc0db44: 90 03 00 00 stw r0,0(r3)
ffc0db48: 3a c0 ff ff li r22,-1
ffc0db4c: 48 00 00 c4 b ffc0dc10 <IMFS_eval_path+0x198>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
ffc0db50: 80 1d 00 4c lwz r0,76(r29)
ffc0db54: 2f 80 00 01 cmpwi cr7,r0,1
ffc0db58: 41 9e 00 f4 beq- cr7,ffc0dc4c <IMFS_eval_path+0x1d4>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
ffc0db5c: 2f 96 00 03 cmpwi cr7,r22,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;
ffc0db60: 7d 3d 4b 78 mr r29,r9
switch( type ) {
ffc0db64: 41 9e 00 1c beq- cr7,ffc0db80 <IMFS_eval_path+0x108>
ffc0db68: 2f 96 00 04 cmpwi cr7,r22,4
ffc0db6c: 41 9e 00 94 beq- cr7,ffc0dc00 <IMFS_eval_path+0x188>
ffc0db70: 2f 16 00 02 cmpwi cr6,r22,2
ffc0db74: 41 9a 00 50 beq- cr6,ffc0dbc4 <IMFS_eval_path+0x14c>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
ffc0db78: 40 9e ff 60 bne+ cr7,ffc0dad8 <IMFS_eval_path+0x60> <== ALWAYS TAKEN
ffc0db7c: 4b ff ff 94 b ffc0db10 <IMFS_eval_path+0x98> <== NOT EXECUTED
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
ffc0db80: 80 09 00 4c lwz r0,76(r9)
ffc0db84: 2f 80 00 03 cmpwi cr7,r0,3
ffc0db88: 41 9e 01 a0 beq- cr7,ffc0dd28 <IMFS_eval_path+0x2b0>
* It would be a design error if we evaluated the link and
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
ffc0db8c: 2f 80 00 04 cmpwi cr7,r0,4
ffc0db90: 41 9e 01 f4 beq- cr7,ffc0dd84 <IMFS_eval_path+0x30c>
}
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
ffc0db94: 2f 80 00 01 cmpwi cr7,r0,1
ffc0db98: 40 9e 01 d8 bne- cr7,ffc0dd70 <IMFS_eval_path+0x2f8>
/*
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
ffc0db9c: 80 fd 00 5c lwz r7,92(r29)
ffc0dba0: 2f 87 00 00 cmpwi cr7,r7,0
ffc0dba4: 40 9e 00 d0 bne- cr7,ffc0dc74 <IMFS_eval_path+0x1fc>
}
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
ffc0dba8: 7f a3 eb 78 mr r3,r29
ffc0dbac: 7f 64 db 78 mr r4,r27
ffc0dbb0: 48 00 07 fd bl ffc0e3ac <IMFS_find_match_in_dir>
if ( !node )
ffc0dbb4: 7c 7d 1b 79 mr. r29,r3
ffc0dbb8: 41 82 01 5c beq- ffc0dd14 <IMFS_eval_path+0x29c>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
ffc0dbbc: 93 bc 00 00 stw r29,0(r28)
ffc0dbc0: 4b ff ff 18 b ffc0dad8 <IMFS_eval_path+0x60>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
ffc0dbc4: 81 77 27 1c lwz r11,10012(r23)
ffc0dbc8: 80 0b 00 18 lwz r0,24(r11)
ffc0dbcc: 7f 80 48 00 cmpw cr7,r0,r9
ffc0dbd0: 41 be ff 08 beq- cr7,ffc0dad8 <IMFS_eval_path+0x60>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
ffc0dbd4: 80 fc 00 10 lwz r7,16(r28)
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
ffc0dbd8: 80 07 00 1c lwz r0,28(r7)
ffc0dbdc: 7f 80 48 00 cmpw cr7,r0,r9
ffc0dbe0: 41 9e 01 60 beq- cr7,ffc0dd40 <IMFS_eval_path+0x2c8>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
ffc0dbe4: 83 a9 00 08 lwz r29,8(r9)
ffc0dbe8: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0dbec: 40 9e ff d0 bne+ cr7,ffc0dbbc <IMFS_eval_path+0x144>
rtems_set_errno_and_return_minus_one( ENOENT );
ffc0dbf0: 48 00 44 85 bl ffc12074 <__errno>
ffc0dbf4: 92 c3 00 00 stw r22,0(r3)
ffc0dbf8: 3a c0 ff ff li r22,-1
ffc0dbfc: 48 00 00 14 b ffc0dc10 <IMFS_eval_path+0x198>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
ffc0dc00: 48 00 44 75 bl ffc12074 <__errno>
ffc0dc04: 38 00 00 5b li r0,91
ffc0dc08: 90 03 00 00 stw r0,0(r3)
ffc0dc0c: 3a c0 ff ff li r22,-1
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
ffc0dc10: 80 01 00 74 lwz r0,116(r1)
ffc0dc14: 7e c3 b3 78 mr r3,r22
ffc0dc18: 82 e1 00 4c lwz r23,76(r1)
ffc0dc1c: 7c 08 03 a6 mtlr r0
ffc0dc20: 82 c1 00 48 lwz r22,72(r1)
ffc0dc24: 83 01 00 50 lwz r24,80(r1)
ffc0dc28: 83 21 00 54 lwz r25,84(r1)
ffc0dc2c: 83 41 00 58 lwz r26,88(r1)
ffc0dc30: 83 61 00 5c lwz r27,92(r1)
ffc0dc34: 83 81 00 60 lwz r28,96(r1)
ffc0dc38: 83 a1 00 64 lwz r29,100(r1)
ffc0dc3c: 83 c1 00 68 lwz r30,104(r1)
ffc0dc40: 83 e1 00 6c lwz r31,108(r1)
ffc0dc44: 38 21 00 70 addi r1,r1,112
ffc0dc48: 4e 80 00 20 blr
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
ffc0dc4c: 7f 83 e3 78 mr r3,r28
ffc0dc50: 38 80 00 01 li r4,1
ffc0dc54: 4b ff fd 69 bl ffc0d9bc <IMFS_evaluate_permission>
ffc0dc58: 2f 83 00 00 cmpwi cr7,r3,0
ffc0dc5c: 41 be fe e0 beq- cr7,ffc0db3c <IMFS_eval_path+0xc4>
ffc0dc60: 81 3c 00 00 lwz r9,0(r28)
ffc0dc64: 4b ff fe f8 b ffc0db5c <IMFS_eval_path+0xe4>
*
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
ffc0dc68: 80 e9 00 5c lwz r7,92(r9)
ffc0dc6c: 2f 87 00 00 cmpwi cr7,r7,0
ffc0dc70: 41 be fe ac beq- cr7,ffc0db1c <IMFS_eval_path+0xa4>
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
ffc0dc74: 80 81 00 08 lwz r4,8(r1)
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
ffc0dc78: 81 27 00 28 lwz r9,40(r7)
ffc0dc7c: 81 07 00 1c lwz r8,28(r7)
ffc0dc80: 81 47 00 20 lwz r10,32(r7)
ffc0dc84: 81 67 00 24 lwz r11,36(r7)
ffc0dc88: 80 07 00 2c lwz r0,44(r7)
ffc0dc8c: 90 01 00 1c stw r0,28(r1)
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
ffc0dc90: 7c 64 f0 50 subf r3,r4,r30
ffc0dc94: 7c 7a 1a 14 add r3,r26,r3
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
ffc0dc98: 91 01 00 0c stw r8,12(r1)
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
ffc0dc9c: 7c 9f 22 14 add r4,r31,r4
ffc0dca0: 7f 05 c3 78 mr r5,r24
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
ffc0dca4: 91 41 00 10 stw r10,16(r1)
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
ffc0dca8: 7f 86 e3 78 mr r6,r28
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
ffc0dcac: 91 61 00 14 stw r11,20(r1)
ffc0dcb0: 91 21 00 18 stw r9,24(r1)
*pathloc = newloc;
ffc0dcb4: 90 1c 00 10 stw r0,16(r28)
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
ffc0dcb8: 80 09 00 00 lwz r0,0(r9)
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
ffc0dcbc: 91 1c 00 00 stw r8,0(r28)
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
ffc0dcc0: 7c 09 03 a6 mtctr r0
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
ffc0dcc4: 91 5c 00 04 stw r10,4(r28)
ffc0dcc8: 91 7c 00 08 stw r11,8(r28)
ffc0dccc: 91 3c 00 0c stw r9,12(r28)
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
ffc0dcd0: 4e 80 04 21 bctrl
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
ffc0dcd4: 80 01 00 74 lwz r0,116(r1)
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
ffc0dcd8: 7c 76 1b 78 mr r22,r3
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
ffc0dcdc: 82 e1 00 4c lwz r23,76(r1)
ffc0dce0: 7c 08 03 a6 mtlr r0
ffc0dce4: 7e c3 b3 78 mr r3,r22
ffc0dce8: 83 01 00 50 lwz r24,80(r1)
ffc0dcec: 82 c1 00 48 lwz r22,72(r1)
ffc0dcf0: 83 21 00 54 lwz r25,84(r1)
ffc0dcf4: 83 41 00 58 lwz r26,88(r1)
ffc0dcf8: 83 61 00 5c lwz r27,92(r1)
ffc0dcfc: 83 81 00 60 lwz r28,96(r1)
ffc0dd00: 83 a1 00 64 lwz r29,100(r1)
ffc0dd04: 83 c1 00 68 lwz r30,104(r1)
ffc0dd08: 83 e1 00 6c lwz r31,108(r1)
ffc0dd0c: 38 21 00 70 addi r1,r1,112
ffc0dd10: 4e 80 00 20 blr
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
ffc0dd14: 48 00 43 61 bl ffc12074 <__errno>
ffc0dd18: 38 00 00 02 li r0,2
ffc0dd1c: 90 03 00 00 stw r0,0(r3)
ffc0dd20: 3a c0 ff ff li r22,-1
ffc0dd24: 4b ff fe ec b ffc0dc10 <IMFS_eval_path+0x198>
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
ffc0dd28: 7f 83 e3 78 mr r3,r28
ffc0dd2c: 38 80 00 00 li r4,0
ffc0dd30: 4b ff fc e1 bl ffc0da10 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
ffc0dd34: 83 bc 00 00 lwz r29,0(r28)
ffc0dd38: 80 1d 00 4c lwz r0,76(r29)
ffc0dd3c: 4b ff fe 58 b ffc0db94 <IMFS_eval_path+0x11c>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
ffc0dd40: 80 81 00 08 lwz r4,8(r1)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
ffc0dd44: 81 27 00 14 lwz r9,20(r7)
ffc0dd48: 81 07 00 08 lwz r8,8(r7)
ffc0dd4c: 81 47 00 0c lwz r10,12(r7)
ffc0dd50: 81 67 00 10 lwz r11,16(r7)
ffc0dd54: 80 07 00 18 lwz r0,24(r7)
ffc0dd58: 4b ff ff 34 b ffc0dc8c <IMFS_eval_path+0x214>
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
rtems_set_errno_and_return_minus_one( EIO );
ffc0dd5c: 48 00 43 19 bl ffc12074 <__errno> <== NOT EXECUTED
ffc0dd60: 38 00 00 05 li r0,5 <== NOT EXECUTED
ffc0dd64: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
ffc0dd68: 3a c0 ff ff li r22,-1 <== NOT EXECUTED
ffc0dd6c: 4b ff fe a4 b ffc0dc10 <IMFS_eval_path+0x198> <== NOT EXECUTED
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
ffc0dd70: 48 00 43 05 bl ffc12074 <__errno>
ffc0dd74: 38 00 00 14 li r0,20
ffc0dd78: 90 03 00 00 stw r0,0(r3)
ffc0dd7c: 3a c0 ff ff li r22,-1
ffc0dd80: 4b ff fe 90 b ffc0dc10 <IMFS_eval_path+0x198>
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
ffc0dd84: 7f 83 e3 78 mr r3,r28
ffc0dd88: 38 80 00 00 li r4,0
ffc0dd8c: 48 00 00 1d bl ffc0dda8 <IMFS_evaluate_sym_link>
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
ffc0dd90: 83 bc 00 00 lwz r29,0(r28)
if ( result == -1 )
ffc0dd94: 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 );
ffc0dd98: 7c 76 1b 78 mr r22,r3
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
if ( result == -1 )
ffc0dd9c: 41 be fe 74 beq- cr7,ffc0dc10 <IMFS_eval_path+0x198> <== NEVER TAKEN
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
ffc0dda0: 80 1d 00 4c lwz r0,76(r29)
ffc0dda4: 4b ff fd f0 b ffc0db94 <IMFS_eval_path+0x11c>
ffc0df74 <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 */
)
{
ffc0df74: 94 21 ff 88 stwu r1,-120(r1)
ffc0df78: 7c 08 02 a6 mflr r0
ffc0df7c: 7d 80 00 26 mfcr r12
ffc0df80: 90 01 00 7c stw r0,124(r1)
ffc0df84: 92 e1 00 54 stw r23,84(r1)
ffc0df88: 7c b7 2b 78 mr r23,r5
ffc0df8c: 93 01 00 58 stw r24,88(r1)
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
ffc0df90: 3f 00 00 00 lis r24,0
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
ffc0df94: 93 21 00 5c stw r25,92(r1)
ffc0df98: 3b 21 00 08 addi r25,r1,8
ffc0df9c: 93 41 00 60 stw r26,96(r1)
ffc0dfa0: 7c 7a 1b 78 mr r26,r3
ffc0dfa4: 93 61 00 64 stw r27,100(r1)
ffc0dfa8: 3b 61 00 20 addi r27,r1,32
ffc0dfac: 93 81 00 68 stw r28,104(r1)
int i = 0;
ffc0dfb0: 3b 80 00 00 li r28,0
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
ffc0dfb4: 93 a1 00 6c stw r29,108(r1)
ffc0dfb8: 7c 9d 23 78 mr r29,r4
ffc0dfbc: 93 c1 00 70 stw r30,112(r1)
ffc0dfc0: 93 e1 00 74 stw r31,116(r1)
ffc0dfc4: 92 a1 00 4c stw r21,76(r1)
ffc0dfc8: 92 c1 00 50 stw r22,80(r1)
ffc0dfcc: 91 81 00 48 stw r12,72(r1)
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
ffc0dfd0: 83 c4 00 00 lwz r30,0(r4)
/*
* Get the path length.
*/
pathlen = strlen( path );
ffc0dfd4: 48 00 53 29 bl ffc132fc <strlen>
ffc0dfd8: 7c 7f 1b 78 mr r31,r3
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
ffc0dfdc: 7f e4 fb 78 mr r4,r31
ffc0dfe0: 7c 7a e2 14 add r3,r26,r28
ffc0dfe4: 7f 65 db 78 mr r5,r27
ffc0dfe8: 7f 26 cb 78 mr r6,r25
ffc0dfec: 48 00 04 75 bl ffc0e460 <IMFS_get_token>
pathlen -= len;
i += len;
if ( !pathloc->node_access )
ffc0dff0: 81 3d 00 00 lwz r9,0(r29)
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
ffc0dff4: 82 a1 00 08 lwz r21,8(r1)
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
ffc0dff8: 7c 76 1b 78 mr r22,r3
pathlen -= len;
i += len;
if ( !pathloc->node_access )
ffc0dffc: 2f 89 00 00 cmpwi cr7,r9,0
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
ffc0e000: 7f f5 f8 50 subf r31,r21,r31
i += len;
if ( !pathloc->node_access )
ffc0e004: 41 9e 01 7c beq- cr7,ffc0e180 <IMFS_evaluate_for_make+0x20c><== NEVER TAKEN
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
ffc0e008: 2e 03 00 00 cmpwi cr4,r3,0
ffc0e00c: 40 92 00 5c bne- cr4,ffc0e068 <IMFS_evaluate_for_make+0xf4>
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
ffc0e010: 48 00 40 65 bl ffc12074 <__errno>
ffc0e014: 38 00 00 11 li r0,17
ffc0e018: 90 03 00 00 stw r0,0(r3)
ffc0e01c: 3b c0 ff ff li r30,-1
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
ffc0e020: 80 01 00 7c lwz r0,124(r1)
ffc0e024: 7f c3 f3 78 mr r3,r30
ffc0e028: 81 81 00 48 lwz r12,72(r1)
ffc0e02c: 7c 08 03 a6 mtlr r0
ffc0e030: 82 a1 00 4c lwz r21,76(r1)
ffc0e034: 82 c1 00 50 lwz r22,80(r1)
ffc0e038: 7d 80 81 20 mtcrf 8,r12
ffc0e03c: 82 e1 00 54 lwz r23,84(r1)
ffc0e040: 83 01 00 58 lwz r24,88(r1)
ffc0e044: 83 21 00 5c lwz r25,92(r1)
ffc0e048: 83 41 00 60 lwz r26,96(r1)
ffc0e04c: 83 61 00 64 lwz r27,100(r1)
ffc0e050: 83 81 00 68 lwz r28,104(r1)
ffc0e054: 83 a1 00 6c lwz r29,108(r1)
ffc0e058: 83 c1 00 70 lwz r30,112(r1)
ffc0e05c: 83 e1 00 74 lwz r31,116(r1)
ffc0e060: 38 21 00 78 addi r1,r1,120
ffc0e064: 4e 80 00 20 blr
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
ffc0e068: 80 1e 00 4c lwz r0,76(r30)
ffc0e06c: 2f 80 00 01 cmpwi cr7,r0,1
ffc0e070: 41 9e 01 24 beq- cr7,ffc0e194 <IMFS_evaluate_for_make+0x220>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
ffc0e074: 2f 96 00 02 cmpwi cr7,r22,2
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
ffc0e078: 7f 9c aa 14 add r28,r28,r21
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;
ffc0e07c: 7d 3e 4b 78 mr r30,r9
switch( type ) {
ffc0e080: 41 9e 00 88 beq- cr7,ffc0e108 <IMFS_evaluate_for_make+0x194>
ffc0e084: 2b 96 00 02 cmplwi cr7,r22,2
ffc0e088: 40 9d 00 28 ble- cr7,ffc0e0b0 <IMFS_evaluate_for_make+0x13c>
ffc0e08c: 2f 96 00 03 cmpwi cr7,r22,3
ffc0e090: 41 9e 00 28 beq- cr7,ffc0e0b8 <IMFS_evaluate_for_make+0x144>
ffc0e094: 2f 96 00 04 cmpwi cr7,r22,4
ffc0e098: 40 9e ff 44 bne+ cr7,ffc0dfdc <IMFS_evaluate_for_make+0x68><== NEVER TAKEN
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
ffc0e09c: 48 00 3f d9 bl ffc12074 <__errno>
ffc0e0a0: 38 00 00 5b li r0,91
ffc0e0a4: 90 03 00 00 stw r0,0(r3)
ffc0e0a8: 3b c0 ff ff li r30,-1
ffc0e0ac: 4b ff ff 74 b ffc0e020 <IMFS_evaluate_for_make+0xac>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
ffc0e0b0: 41 b2 ff 60 beq- cr4,ffc0e010 <IMFS_evaluate_for_make+0x9c><== NEVER TAKEN
ffc0e0b4: 4b ff ff 28 b ffc0dfdc <IMFS_evaluate_for_make+0x68>
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
ffc0e0b8: 80 09 00 4c lwz r0,76(r9)
ffc0e0bc: 2f 80 00 03 cmpwi cr7,r0,3
ffc0e0c0: 41 9e 01 c4 beq- cr7,ffc0e284 <IMFS_evaluate_for_make+0x310>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
ffc0e0c4: 2f 80 00 04 cmpwi cr7,r0,4
ffc0e0c8: 41 9e 01 bc beq- cr7,ffc0e284 <IMFS_evaluate_for_make+0x310>
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
ffc0e0cc: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0e0d0: 41 9e 01 88 beq- cr7,ffc0e258 <IMFS_evaluate_for_make+0x2e4><== NEVER TAKEN
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
ffc0e0d4: 80 1e 00 4c lwz r0,76(r30)
ffc0e0d8: 2f 80 00 01 cmpwi cr7,r0,1
ffc0e0dc: 40 9e 01 7c bne- cr7,ffc0e258 <IMFS_evaluate_for_make+0x2e4>
/*
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
ffc0e0e0: 80 fe 00 5c lwz r7,92(r30)
ffc0e0e4: 2f 87 00 00 cmpwi cr7,r7,0
ffc0e0e8: 40 9e 01 84 bne- cr7,ffc0e26c <IMFS_evaluate_for_make+0x2f8>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
ffc0e0ec: 7f c3 f3 78 mr r3,r30
ffc0e0f0: 7f 64 db 78 mr r4,r27
ffc0e0f4: 48 00 02 b9 bl ffc0e3ac <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
ffc0e0f8: 7c 7e 1b 79 mr. r30,r3
ffc0e0fc: 41 82 00 48 beq- ffc0e144 <IMFS_evaluate_for_make+0x1d0>
done = true;
else
pathloc->node_access = node;
ffc0e100: 93 dd 00 00 stw r30,0(r29)
ffc0e104: 4b ff fe d8 b ffc0dfdc <IMFS_evaluate_for_make+0x68>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
ffc0e108: 81 78 27 1c lwz r11,10012(r24)
ffc0e10c: 80 0b 00 18 lwz r0,24(r11)
ffc0e110: 7f 89 00 00 cmpw cr7,r9,r0
ffc0e114: 41 be fe c8 beq- cr7,ffc0dfdc <IMFS_evaluate_for_make+0x68>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
ffc0e118: 80 fd 00 10 lwz r7,16(r29)
ffc0e11c: 80 07 00 1c lwz r0,28(r7)
ffc0e120: 7f 89 00 00 cmpw cr7,r9,r0
ffc0e124: 41 9e 00 8c beq- cr7,ffc0e1b0 <IMFS_evaluate_for_make+0x23c>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
ffc0e128: 83 c9 00 08 lwz r30,8(r9)
ffc0e12c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0e130: 40 9e ff d0 bne+ cr7,ffc0e100 <IMFS_evaluate_for_make+0x18c>
rtems_set_errno_and_return_minus_one( ENOENT );
ffc0e134: 48 00 3f 41 bl ffc12074 <__errno>
ffc0e138: 3b c0 ff ff li r30,-1
ffc0e13c: 92 c3 00 00 stw r22,0(r3)
ffc0e140: 4b ff fe e0 b ffc0e020 <IMFS_evaluate_for_make+0xac>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
ffc0e144: 80 01 00 08 lwz r0,8(r1)
/*
* 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++) {
ffc0e148: 7f fa e2 14 add r31,r26,r28
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
ffc0e14c: 7c 00 e0 50 subf r0,r0,r28
ffc0e150: 7c 1a 02 14 add r0,r26,r0
ffc0e154: 90 17 00 00 stw r0,0(r23)
/*
* 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++) {
ffc0e158: 7c 7a e0 ae lbzx r3,r26,r28
ffc0e15c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e160: 40 be 00 14 bne+ cr7,ffc0e174 <IMFS_evaluate_for_make+0x200>
ffc0e164: 48 00 00 b0 b ffc0e214 <IMFS_evaluate_for_make+0x2a0>
ffc0e168: 8c 7f 00 01 lbzu r3,1(r31)
ffc0e16c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e170: 41 9e 00 a4 beq- cr7,ffc0e214 <IMFS_evaluate_for_make+0x2a0>
if ( !IMFS_is_separator( path[ i ] ) )
ffc0e174: 4b ff 7c 45 bl ffc05db8 <rtems_filesystem_is_separator>
ffc0e178: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e17c: 40 9e ff ec bne+ cr7,ffc0e168 <IMFS_evaluate_for_make+0x1f4>
rtems_set_errno_and_return_minus_one( ENOENT );
ffc0e180: 48 00 3e f5 bl ffc12074 <__errno>
ffc0e184: 38 00 00 02 li r0,2
ffc0e188: 90 03 00 00 stw r0,0(r3)
ffc0e18c: 3b c0 ff ff li r30,-1
ffc0e190: 4b ff fe 90 b ffc0e020 <IMFS_evaluate_for_make+0xac>
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
ffc0e194: 7f a3 eb 78 mr r3,r29
ffc0e198: 38 80 00 01 li r4,1
ffc0e19c: 4b ff f8 21 bl ffc0d9bc <IMFS_evaluate_permission>
ffc0e1a0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e1a4: 41 9e 00 a0 beq- cr7,ffc0e244 <IMFS_evaluate_for_make+0x2d0>
ffc0e1a8: 81 3d 00 00 lwz r9,0(r29)
ffc0e1ac: 4b ff fe c8 b ffc0e074 <IMFS_evaluate_for_make+0x100>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
ffc0e1b0: 81 27 00 14 lwz r9,20(r7)
ffc0e1b4: 81 07 00 08 lwz r8,8(r7)
ffc0e1b8: 81 47 00 0c lwz r10,12(r7)
ffc0e1bc: 81 67 00 10 lwz r11,16(r7)
ffc0e1c0: 80 07 00 18 lwz r0,24(r7)
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
ffc0e1c4: 80 61 00 08 lwz r3,8(r1)
ffc0e1c8: 7f a4 eb 78 mr r4,r29
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
ffc0e1cc: 90 01 00 1c stw r0,28(r1)
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
ffc0e1d0: 7e e5 bb 78 mr r5,r23
ffc0e1d4: 7c 63 e0 50 subf r3,r3,r28
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
ffc0e1d8: 91 01 00 0c stw r8,12(r1)
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
ffc0e1dc: 7c 7a 1a 14 add r3,r26,r3
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
ffc0e1e0: 91 41 00 10 stw r10,16(r1)
ffc0e1e4: 91 61 00 14 stw r11,20(r1)
ffc0e1e8: 91 21 00 18 stw r9,24(r1)
*pathloc = newloc;
ffc0e1ec: 90 1d 00 10 stw r0,16(r29)
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
ffc0e1f0: 80 09 00 04 lwz r0,4(r9)
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
ffc0e1f4: 91 1d 00 00 stw r8,0(r29)
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
ffc0e1f8: 7c 09 03 a6 mtctr r0
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
ffc0e1fc: 91 5d 00 04 stw r10,4(r29)
ffc0e200: 91 7d 00 08 stw r11,8(r29)
ffc0e204: 91 3d 00 0c stw r9,12(r29)
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
ffc0e208: 4e 80 04 21 bctrl
ffc0e20c: 7c 7e 1b 78 mr r30,r3
ffc0e210: 4b ff fe 10 b ffc0e020 <IMFS_evaluate_for_make+0xac>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
ffc0e214: 7f a3 eb 78 mr r3,r29
ffc0e218: 4b ff f7 19 bl ffc0d930 <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
ffc0e21c: 81 3d 00 00 lwz r9,0(r29)
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
ffc0e220: 7c 7e 1b 78 mr r30,r3
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
ffc0e224: 80 09 00 4c lwz r0,76(r9)
ffc0e228: 2f 80 00 01 cmpwi cr7,r0,1
ffc0e22c: 40 9e 00 2c bne- cr7,ffc0e258 <IMFS_evaluate_for_make+0x2e4><== NEVER TAKEN
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
ffc0e230: 7f a3 eb 78 mr r3,r29
ffc0e234: 38 80 00 03 li r4,3
ffc0e238: 4b ff f7 85 bl ffc0d9bc <IMFS_evaluate_permission>
ffc0e23c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e240: 40 9e fd e0 bne+ cr7,ffc0e020 <IMFS_evaluate_for_make+0xac>
rtems_set_errno_and_return_minus_one( EACCES );
ffc0e244: 48 00 3e 31 bl ffc12074 <__errno>
ffc0e248: 38 00 00 0d li r0,13
ffc0e24c: 90 03 00 00 stw r0,0(r3)
ffc0e250: 3b c0 ff ff li r30,-1
ffc0e254: 4b ff fd cc b ffc0e020 <IMFS_evaluate_for_make+0xac>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
ffc0e258: 48 00 3e 1d bl ffc12074 <__errno>
ffc0e25c: 38 00 00 14 li r0,20
ffc0e260: 90 03 00 00 stw r0,0(r3)
ffc0e264: 3b c0 ff ff li r30,-1
ffc0e268: 4b ff fd b8 b ffc0e020 <IMFS_evaluate_for_make+0xac>
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
ffc0e26c: 81 27 00 28 lwz r9,40(r7)
ffc0e270: 81 07 00 1c lwz r8,28(r7)
ffc0e274: 81 47 00 20 lwz r10,32(r7)
ffc0e278: 81 67 00 24 lwz r11,36(r7)
ffc0e27c: 80 07 00 2c lwz r0,44(r7)
ffc0e280: 4b ff ff 44 b ffc0e1c4 <IMFS_evaluate_for_make+0x250>
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
ffc0e284: 7f a3 eb 78 mr r3,r29
ffc0e288: 38 80 00 00 li r4,0
ffc0e28c: 4b ff fb d5 bl ffc0de60 <IMFS_evaluate_link>
if ( result == -1 )
ffc0e290: 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 );
ffc0e294: 7c 7e 1b 78 mr r30,r3
if ( result == -1 )
ffc0e298: 41 be fd 88 beq- cr7,ffc0e020 <IMFS_evaluate_for_make+0xac><== NEVER TAKEN
ffc0e29c: 83 dd 00 00 lwz r30,0(r29)
ffc0e2a0: 4b ff fe 2c b ffc0e0cc <IMFS_evaluate_for_make+0x158>
ffc0de60 <IMFS_evaluate_link>:
*/
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
ffc0de60: 94 21 ff e8 stwu r1,-24(r1)
ffc0de64: 7c 08 02 a6 mflr r0
ffc0de68: 93 a1 00 0c stw r29,12(r1)
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
rtems_set_errno_and_return_minus_one( ELOOP );
ffc0de6c: 3f a0 00 00 lis r29,0
*/
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
ffc0de70: 93 81 00 08 stw r28,8(r1)
ffc0de74: 7c 9c 23 78 mr r28,r4
ffc0de78: 93 c1 00 10 stw r30,16(r1)
ffc0de7c: 7c 7e 1b 78 mr r30,r3
ffc0de80: 90 01 00 1c stw r0,28(r1)
ffc0de84: 93 e1 00 14 stw r31,20(r1)
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
rtems_set_errno_and_return_minus_one( ELOOP );
ffc0de88: 81 3d 27 1c lwz r9,10012(r29)
ffc0de8c: 48 00 00 14 b ffc0dea0 <IMFS_evaluate_link+0x40>
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
ffc0de90: 41 9a 00 90 beq- cr6,ffc0df20 <IMFS_evaluate_link+0xc0>
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
ffc0de94: 39 6b ff fd addi r11,r11,-3
ffc0de98: 2b 8b 00 01 cmplwi cr7,r11,1
ffc0de9c: 41 9d 00 58 bgt- cr7,ffc0def4 <IMFS_evaluate_link+0x94> <== ALWAYS TAKEN
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
ffc0dea0: a1 69 00 30 lhz r11,48(r9)
{
IMFS_jnode_t *jnode;
int result = 0;
do {
jnode = node->node_access;
ffc0dea4: 83 fe 00 00 lwz r31,0(r30)
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
ffc0dea8: 38 0b 00 01 addi r0,r11,1
ffc0deac: 54 00 04 3e clrlwi r0,r0,16
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
ffc0deb0: 2b 80 00 05 cmplwi cr7,r0,5
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
ffc0deb4: b0 09 00 30 sth r0,48(r9)
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
ffc0deb8: 41 9d 00 84 bgt- cr7,ffc0df3c <IMFS_evaluate_link+0xdc>
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
ffc0debc: 81 7f 00 4c lwz r11,76(r31)
ffc0dec0: 2f 8b 00 03 cmpwi cr7,r11,3
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
ffc0dec4: 2f 0b 00 04 cmpwi cr6,r11,4
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
ffc0dec8: 40 9e ff c8 bne+ cr7,ffc0de90 <IMFS_evaluate_link+0x30>
result = IMFS_evaluate_hard_link( node, flags );
ffc0decc: 7f c3 f3 78 mr r3,r30
ffc0ded0: 7f 84 e3 78 mr r4,r28
ffc0ded4: 4b ff fb 3d bl ffc0da10 <IMFS_evaluate_hard_link>
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
ffc0ded8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0dedc: 40 9e 00 58 bne- cr7,ffc0df34 <IMFS_evaluate_link+0xd4>
ffc0dee0: 81 7f 00 4c lwz r11,76(r31)
ffc0dee4: 81 3d 27 1c lwz r9,10012(r29)
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
ffc0dee8: 39 6b ff fd addi r11,r11,-3
ffc0deec: 2b 8b 00 01 cmplwi cr7,r11,1
ffc0def0: 40 9d ff b0 ble+ cr7,ffc0dea0 <IMFS_evaluate_link+0x40> <== ALWAYS TAKEN
ffc0def4: 38 60 00 00 li r3,0
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
ffc0def8: 38 00 00 00 li r0,0
return result;
}
ffc0defc: 83 81 00 08 lwz r28,8(r1)
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
ffc0df00: b0 09 00 30 sth r0,48(r9)
return result;
}
ffc0df04: 80 01 00 1c lwz r0,28(r1)
ffc0df08: 83 a1 00 0c lwz r29,12(r1)
ffc0df0c: 7c 08 03 a6 mtlr r0
ffc0df10: 83 c1 00 10 lwz r30,16(r1)
ffc0df14: 83 e1 00 14 lwz r31,20(r1)
ffc0df18: 38 21 00 18 addi r1,r1,24
ffc0df1c: 4e 80 00 20 blr
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
ffc0df20: 7f c3 f3 78 mr r3,r30
ffc0df24: 7f 84 e3 78 mr r4,r28
ffc0df28: 4b ff fe 81 bl ffc0dda8 <IMFS_evaluate_sym_link>
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
ffc0df2c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0df30: 41 9e ff b0 beq+ cr7,ffc0dee0 <IMFS_evaluate_link+0x80>
ffc0df34: 81 3d 27 1c lwz r9,10012(r29)
ffc0df38: 4b ff ff c0 b ffc0def8 <IMFS_evaluate_link+0x98>
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
ffc0df3c: 38 00 00 00 li r0,0
ffc0df40: b0 09 00 30 sth r0,48(r9)
rtems_set_errno_and_return_minus_one( ELOOP );
ffc0df44: 48 00 41 31 bl ffc12074 <__errno>
ffc0df48: 38 00 00 5c li r0,92
ffc0df4c: 90 03 00 00 stw r0,0(r3)
ffc0df50: 38 60 ff ff li r3,-1
*/
rtems_filesystem_link_counts = 0;
return result;
}
ffc0df54: 80 01 00 1c lwz r0,28(r1)
ffc0df58: 83 81 00 08 lwz r28,8(r1)
ffc0df5c: 7c 08 03 a6 mtlr r0
ffc0df60: 83 a1 00 0c lwz r29,12(r1)
ffc0df64: 83 c1 00 10 lwz r30,16(r1)
ffc0df68: 83 e1 00 14 lwz r31,20(r1)
ffc0df6c: 38 21 00 18 addi r1,r1,24
ffc0df70: 4e 80 00 20 blr
ffc0d9bc <IMFS_evaluate_permission>:
*/
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
ffc0d9bc: 7c 08 02 a6 mflr r0
ffc0d9c0: 94 21 ff f8 stwu r1,-8(r1)
ffc0d9c4: 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 ) )
ffc0d9c8: 54 80 00 39 rlwinm. r0,r4,0,0,28
ffc0d9cc: 40 82 00 30 bne- ffc0d9fc <IMFS_evaluate_permission+0x40><== NEVER TAKEN
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
ffc0d9d0: 81 23 00 00 lwz r9,0(r3)
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
ffc0d9d4: 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 )
ffc0d9d8: 80 69 00 30 lwz r3,48(r9)
ffc0d9dc: 7c 83 18 38 and r3,r4,r3
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
ffc0d9e0: 7c 83 1a 78 xor r3,r4,r3
ffc0d9e4: 7c 63 00 34 cntlzw r3,r3
ffc0d9e8: 54 63 d9 7e rlwinm r3,r3,27,5,31
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
ffc0d9ec: 80 01 00 0c lwz r0,12(r1)
ffc0d9f0: 38 21 00 08 addi r1,r1,8
ffc0d9f4: 7c 08 03 a6 mtlr r0
ffc0d9f8: 4e 80 00 20 blr
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
ffc0d9fc: 48 00 46 79 bl ffc12074 <__errno> <== NOT EXECUTED
ffc0da00: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc0da04: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
ffc0da08: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc0da0c: 4b ff ff e0 b ffc0d9ec <IMFS_evaluate_permission+0x30><== NOT EXECUTED
ffc05638 <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
ffc05638: 94 21 ff f0 stwu r1,-16(r1)
ffc0563c: 7c 08 02 a6 mflr r0
ffc05640: 7c 68 1b 78 mr r8,r3
ffc05644: 90 01 00 14 stw r0,20(r1)
ffc05648: 93 e1 00 0c stw r31,12(r1)
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
ffc0564c: 81 23 00 1c lwz r9,28(r3)
ffc05650: 80 69 00 50 lwz r3,80(r9)
ffc05654: 48 00 c7 39 bl ffc11d8c <pipe_lseek>
IMFS_FIFO_RETURN(err);
ffc05658: 7c 60 fe 71 srawi. r0,r3,31
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
ffc0565c: 7c 7f 1b 78 mr r31,r3
IMFS_FIFO_RETURN(err);
ffc05660: 41 80 00 28 blt- ffc05688 <IMFS_fifo_lseek+0x50> <== ALWAYS TAKEN
ffc05664: 7c 09 03 78 mr r9,r0 <== NOT EXECUTED
ffc05668: 7c 6a 1b 78 mr r10,r3 <== NOT EXECUTED
}
ffc0566c: 80 01 00 14 lwz r0,20(r1)
ffc05670: 7d 23 4b 78 mr r3,r9
ffc05674: 7d 44 53 78 mr r4,r10
ffc05678: 83 e1 00 0c lwz r31,12(r1)
ffc0567c: 7c 08 03 a6 mtlr r0
ffc05680: 38 21 00 10 addi r1,r1,16
ffc05684: 4e 80 00 20 blr
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
IMFS_FIFO_RETURN(err);
ffc05688: 48 00 f0 1d bl ffc146a4 <__errno>
ffc0568c: 7f ff 00 d0 neg r31,r31
ffc05690: 93 e3 00 00 stw r31,0(r3)
ffc05694: 39 20 ff ff li r9,-1
ffc05698: 39 40 ff ff li r10,-1
ffc0569c: 4b ff ff d0 b ffc0566c <IMFS_fifo_lseek+0x34>
ffc05764 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
ffc05764: 94 21 ff e0 stwu r1,-32(r1)
ffc05768: 7c 08 02 a6 mflr r0
ffc0576c: 7c 66 1b 78 mr r6,r3
ffc05770: 90 01 00 24 stw r0,36(r1)
ffc05774: 93 c1 00 18 stw r30,24(r1)
ffc05778: 93 e1 00 1c stw r31,28(r1)
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
ffc0577c: 83 e3 00 1c lwz r31,28(r3)
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
ffc05780: 80 7f 00 50 lwz r3,80(r31)
ffc05784: 48 00 c3 09 bl ffc11a8c <pipe_write>
if (err > 0) {
ffc05788: 7c 7e 1b 79 mr. r30,r3
ffc0578c: 40 81 00 38 ble- ffc057c4 <IMFS_fifo_write+0x60>
IMFS_mtime_ctime_update(jnode);
ffc05790: 38 61 00 08 addi r3,r1,8
ffc05794: 38 80 00 00 li r4,0
ffc05798: 48 00 16 55 bl ffc06dec <gettimeofday>
ffc0579c: 80 01 00 08 lwz r0,8(r1)
ffc057a0: 7f c3 f3 78 mr r3,r30
ffc057a4: 90 1f 00 44 stw r0,68(r31)
ffc057a8: 90 1f 00 48 stw r0,72(r31)
}
IMFS_FIFO_RETURN(err);
}
ffc057ac: 80 01 00 24 lwz r0,36(r1)
ffc057b0: 83 c1 00 18 lwz r30,24(r1)
ffc057b4: 7c 08 03 a6 mtlr r0
ffc057b8: 83 e1 00 1c lwz r31,28(r1)
ffc057bc: 38 21 00 20 addi r1,r1,32
ffc057c0: 4e 80 00 20 blr
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
ffc057c4: 40 82 00 20 bne- ffc057e4 <IMFS_fifo_write+0x80> <== ALWAYS TAKEN
}
ffc057c8: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
ffc057cc: 38 60 00 00 li r3,0 <== NOT EXECUTED
}
ffc057d0: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED
ffc057d4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc057d8: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED
ffc057dc: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED
ffc057e0: 4e 80 00 20 blr <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
ffc057e4: 48 00 ee c1 bl ffc146a4 <__errno>
ffc057e8: 7f de 00 d0 neg r30,r30
ffc057ec: 93 c3 00 00 stw r30,0(r3)
ffc057f0: 38 60 ff ff li r3,-1
ffc057f4: 4b ff ff b8 b ffc057ac <IMFS_fifo_write+0x48>
ffc0e3ac <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
ffc0e3ac: 94 21 ff e8 stwu r1,-24(r1)
ffc0e3b0: 7c 08 02 a6 mflr r0
ffc0e3b4: 93 a1 00 0c stw r29,12(r1)
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
ffc0e3b8: 3f a0 ff c2 lis r29,-62
ffc0e3bc: 3b bd 8e e4 addi r29,r29,-28956
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
ffc0e3c0: 93 c1 00 10 stw r30,16(r1)
ffc0e3c4: 7c 9e 23 78 mr r30,r4
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
ffc0e3c8: 7f a4 eb 78 mr r4,r29
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
ffc0e3cc: 93 e1 00 14 stw r31,20(r1)
ffc0e3d0: 7c 7f 1b 78 mr r31,r3
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
ffc0e3d4: 7f c3 f3 78 mr r3,r30
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
ffc0e3d8: 90 01 00 1c stw r0,28(r1)
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
ffc0e3dc: 48 00 4d 5d bl ffc13138 <strcmp>
ffc0e3e0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e3e4: 41 9e 00 1c beq- cr7,ffc0e400 <IMFS_find_match_in_dir+0x54><== NEVER TAKEN
return directory;
if ( !strcmp( name, dotdotname ) )
ffc0e3e8: 7f c3 f3 78 mr r3,r30
ffc0e3ec: 38 9d 00 04 addi r4,r29,4
ffc0e3f0: 48 00 4d 49 bl ffc13138 <strcmp>
ffc0e3f4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e3f8: 40 9e 00 28 bne- cr7,ffc0e420 <IMFS_find_match_in_dir+0x74><== ALWAYS TAKEN
return directory->Parent;
ffc0e3fc: 83 ff 00 08 lwz r31,8(r31) <== NOT EXECUTED
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
ffc0e400: 80 01 00 1c lwz r0,28(r1)
ffc0e404: 7f e3 fb 78 mr r3,r31
ffc0e408: 83 a1 00 0c lwz r29,12(r1)
ffc0e40c: 7c 08 03 a6 mtlr r0
ffc0e410: 83 c1 00 10 lwz r30,16(r1)
ffc0e414: 83 e1 00 14 lwz r31,20(r1)
ffc0e418: 38 21 00 18 addi r1,r1,24
ffc0e41c: 4e 80 00 20 blr
ffc0e420: 80 1f 00 50 lwz r0,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));
ffc0e424: 3b bf 00 54 addi r29,r31,84
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
ffc0e428: 3b e0 00 00 li r31,0
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
ffc0e42c: 7f 80 e8 00 cmpw cr7,r0,r29
ffc0e430: 41 be ff d0 beq- cr7,ffc0e400 <IMFS_find_match_in_dir+0x54>
ffc0e434: 7c 1f 03 78 mr r31,r0
!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 ) )
ffc0e438: 38 9f 00 0c addi r4,r31,12
ffc0e43c: 7f c3 f3 78 mr r3,r30
ffc0e440: 48 00 4c f9 bl ffc13138 <strcmp>
ffc0e444: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e448: 41 be ff b8 beq- cr7,ffc0e400 <IMFS_find_match_in_dir+0x54>
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 ) {
ffc0e44c: 83 ff 00 00 lwz r31,0(r31)
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
ffc0e450: 7f 9f e8 00 cmpw cr7,r31,r29
ffc0e454: 40 9e ff e4 bne+ cr7,ffc0e438 <IMFS_find_match_in_dir+0x8c>
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
ffc0e458: 3b e0 00 00 li r31,0
ffc0e45c: 4b ff ff a4 b ffc0e400 <IMFS_find_match_in_dir+0x54>
ffc0e2a4 <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
)
{
ffc0e2a4: 94 21 ff c8 stwu r1,-56(r1)
ffc0e2a8: 7c 08 02 a6 mflr r0
ffc0e2ac: 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;
ffc0e2b0: 80 03 00 2c lwz r0,44(r3)
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
ffc0e2b4: 93 a1 00 2c stw r29,44(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;
ffc0e2b8: 81 43 00 20 lwz r10,32(r3)
/*
* 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;
ffc0e2bc: 83 a3 00 1c lwz r29,28(r3)
loc = temp_mt_entry->mt_fs_root;
ffc0e2c0: 81 63 00 24 lwz r11,36(r3)
ffc0e2c4: 81 23 00 28 lwz r9,40(r3)
ffc0e2c8: 90 01 00 18 stw r0,24(r1)
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
ffc0e2cc: 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
)
{
ffc0e2d0: 93 e1 00 34 stw r31,52(r1)
ffc0e2d4: 3b e1 00 08 addi r31,r1,8
ffc0e2d8: 93 c1 00 30 stw r30,48(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;
ffc0e2dc: 93 a1 00 08 stw r29,8(r1)
ffc0e2e0: 91 41 00 0c stw r10,12(r1)
ffc0e2e4: 91 61 00 10 stw r11,16(r1)
ffc0e2e8: 91 21 00 14 stw r9,20(r1)
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
ffc0e2ec: 90 03 00 1c stw r0,28(r3)
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
ffc0e2f0: 7f e3 fb 78 mr r3,r31
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
ffc0e2f4: 83 dd 00 08 lwz r30,8(r29)
loc.node_access = (void *)jnode;
ffc0e2f8: 93 a1 00 08 stw r29,8(r1)
IMFS_Set_handlers( &loc );
ffc0e2fc: 4b ff f6 35 bl ffc0d930 <IMFS_Set_handlers>
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0e300: 39 3d 00 54 addi r9,r29,84
if ( jnode->type != IMFS_DIRECTORY ) {
ffc0e304: 80 1d 00 4c lwz r0,76(r29)
ffc0e308: 2f 80 00 01 cmpwi cr7,r0,1
ffc0e30c: 40 9e 00 60 bne- cr7,ffc0e36c <IMFS_fsunmount+0xc8>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
ffc0e310: 80 1d 00 50 lwz r0,80(r29)
ffc0e314: 7f 80 48 00 cmpw cr7,r0,r9
ffc0e318: 41 9e 00 74 beq- cr7,ffc0e38c <IMFS_fsunmount+0xe8>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
ffc0e31c: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0e320: 41 9e 00 2c beq- cr7,ffc0e34c <IMFS_fsunmount+0xa8>
if ( jnode->type == IMFS_DIRECTORY ) {
ffc0e324: 80 1d 00 4c lwz r0,76(r29)
ffc0e328: 2f 80 00 01 cmpwi cr7,r0,1
ffc0e32c: 40 9e ff c4 bne+ cr7,ffc0e2f0 <IMFS_fsunmount+0x4c> <== NEVER TAKEN
}
}
} while (jnode != NULL);
return 0;
}
ffc0e330: 80 1d 00 50 lwz r0,80(r29)
ffc0e334: 39 3d 00 54 addi r9,r29,84
return -1;
jnode = next;
}
if ( jnode != NULL ) {
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
ffc0e338: 7f 80 48 00 cmpw cr7,r0,r9
ffc0e33c: 41 be ff b4 beq- cr7,ffc0e2f0 <IMFS_fsunmount+0x4c>
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
ffc0e340: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e344: 7c 1d 03 78 mr r29,r0
ffc0e348: 40 9e ff a8 bne+ cr7,ffc0e2f0 <IMFS_fsunmount+0x4c> <== ALWAYS TAKEN
return 0;
ffc0e34c: 38 60 00 00 li r3,0
}
ffc0e350: 80 01 00 3c lwz r0,60(r1)
ffc0e354: 83 a1 00 2c lwz r29,44(r1)
ffc0e358: 7c 08 03 a6 mtlr r0
ffc0e35c: 83 c1 00 30 lwz r30,48(r1)
ffc0e360: 83 e1 00 34 lwz r31,52(r1)
ffc0e364: 38 21 00 38 addi r1,r1,56
ffc0e368: 4e 80 00 20 blr
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( jnode->type != IMFS_DIRECTORY ) {
result = IMFS_unlink( NULL, &loc );
ffc0e36c: 7f e4 fb 78 mr r4,r31
ffc0e370: 38 60 00 00 li r3,0
ffc0e374: 4b ff 60 55 bl ffc043c8 <IMFS_unlink>
if (result != 0)
return -1;
jnode = next;
ffc0e378: 7f dd f3 78 mr r29,r30
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( jnode->type != IMFS_DIRECTORY ) {
result = IMFS_unlink( NULL, &loc );
if (result != 0)
ffc0e37c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e380: 41 9e ff 9c beq+ cr7,ffc0e31c <IMFS_fsunmount+0x78> <== ALWAYS TAKEN
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
ffc0e384: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc0e388: 4b ff ff c8 b ffc0e350 <IMFS_fsunmount+0xac> <== NOT EXECUTED
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
ffc0e38c: 38 60 00 00 li r3,0
ffc0e390: 7f e4 fb 78 mr r4,r31
ffc0e394: 4b ff 60 35 bl ffc043c8 <IMFS_unlink>
if (result != 0)
return -1;
jnode = next;
ffc0e398: 7f dd f3 78 mr r29,r30
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
if (result != 0)
ffc0e39c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e3a0: 41 9e ff 7c beq+ cr7,ffc0e31c <IMFS_fsunmount+0x78> <== ALWAYS TAKEN
return -1;
ffc0e3a4: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc0e3a8: 4b ff ff a8 b ffc0e350 <IMFS_fsunmount+0xac> <== NOT EXECUTED
ffc0e460 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
ffc0e460: 94 21 ff e0 stwu r1,-32(r1)
ffc0e464: 7c 08 02 a6 mflr r0
ffc0e468: 93 41 00 08 stw r26,8(r1)
ffc0e46c: 7c da 33 78 mr r26,r6
ffc0e470: 93 81 00 10 stw r28,16(r1)
register int i = 0;
ffc0e474: 3b 80 00 00 li r28,0
const char *path,
int pathlen,
char *token,
int *token_len
)
{
ffc0e478: 93 a1 00 14 stw r29,20(r1)
ffc0e47c: 7c 9d 23 78 mr r29,r4
ffc0e480: 93 c1 00 18 stw r30,24(r1)
ffc0e484: 7c be 2b 78 mr r30,r5
ffc0e488: 93 e1 00 1c stw r31,28(r1)
ffc0e48c: 7c 7f 1b 78 mr r31,r3
ffc0e490: 90 01 00 24 stw r0,36(r1)
ffc0e494: 93 61 00 0c stw r27,12(r1)
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
ffc0e498: 8b 63 00 00 lbz r27,0(r3)
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
ffc0e49c: 48 00 00 08 b ffc0e4a4 <IMFS_get_token+0x44>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
ffc0e4a0: 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) ) {
ffc0e4a4: 7f 63 db 78 mr r3,r27
ffc0e4a8: 4b ff 79 11 bl ffc05db8 <rtems_filesystem_is_separator>
ffc0e4ac: 7f 1c e8 00 cmpw cr6,r28,r29
ffc0e4b0: 2f 83 00 00 cmpwi cr7,r3,0
token[i] = c;
if ( i == IMFS_NAME_MAX )
ffc0e4b4: 2c 9c 00 20 cmpwi cr1,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) ) {
ffc0e4b8: 40 9e 00 40 bne- cr7,ffc0e4f8 <IMFS_get_token+0x98>
ffc0e4bc: 40 98 00 3c bge- cr6,ffc0e4f8 <IMFS_get_token+0x98> <== NEVER TAKEN
token[i] = c;
ffc0e4c0: 7f 7e e1 ae stbx r27,r30,r28
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
ffc0e4c4: 3b 9c 00 01 addi r28,r28,1
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
token[i] = c;
if ( i == IMFS_NAME_MAX )
ffc0e4c8: 40 86 ff d8 bne+ cr1,ffc0e4a0 <IMFS_get_token+0x40>
return IMFS_INVALID_TOKEN;
ffc0e4cc: 38 60 00 04 li r3,4
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
ffc0e4d0: 80 01 00 24 lwz r0,36(r1)
ffc0e4d4: 83 41 00 08 lwz r26,8(r1)
ffc0e4d8: 7c 08 03 a6 mtlr r0
ffc0e4dc: 83 61 00 0c lwz r27,12(r1)
ffc0e4e0: 83 81 00 10 lwz r28,16(r1)
ffc0e4e4: 83 a1 00 14 lwz r29,20(r1)
ffc0e4e8: 83 c1 00 18 lwz r30,24(r1)
ffc0e4ec: 83 e1 00 1c lwz r31,28(r1)
ffc0e4f0: 38 21 00 20 addi r1,r1,32
ffc0e4f4: 4e 80 00 20 blr
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
ffc0e4f8: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0e4fc: 40 9e 00 28 bne- cr7,ffc0e524 <IMFS_get_token+0xc4>
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
ffc0e500: 2f 9b 00 00 cmpwi cr7,r27,0
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
token[i] = c;
ffc0e504: 9b 7e 00 00 stb r27,0(r30)
if ( (token[i] != '\0') && pathlen ) {
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
ffc0e508: 38 60 00 00 li r3,0
*/
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
ffc0e50c: 41 9e 00 10 beq- cr7,ffc0e51c <IMFS_get_token+0xbc>
ffc0e510: 2f 9d 00 00 cmpwi cr7,r29,0
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
ffc0e514: 7f 83 e3 78 mr r3,r28
*/
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
ffc0e518: 40 9e 00 8c bne- cr7,ffc0e5a4 <IMFS_get_token+0x144>
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
ffc0e51c: 93 9a 00 00 stw r28,0(r26)
ffc0e520: 4b ff ff b0 b ffc0e4d0 <IMFS_get_token+0x70>
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
ffc0e524: 7d 3e e2 14 add r9,r30,r28
ffc0e528: 88 09 ff ff lbz r0,-1(r9)
ffc0e52c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e530: 41 9e 00 0c beq- cr7,ffc0e53c <IMFS_get_token+0xdc> <== NEVER TAKEN
token[i] = '\0';
ffc0e534: 38 00 00 00 li r0,0
ffc0e538: 7c 1e e1 ae stbx r0,r30,r28
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
ffc0e53c: 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 ) {
if ( strcmp( token, "..") == 0 )
ffc0e540: 3c 80 ff c2 lis r4,-62
ffc0e544: 7f c3 f3 78 mr r3,r30
ffc0e548: 38 84 8e f0 addi r4,r4,-28944
ffc0e54c: 48 00 4b ed bl ffc13138 <strcmp>
ffc0e550: 2f 83 00 00 cmpwi cr7,r3,0
type = IMFS_UP_DIR;
ffc0e554: 38 60 00 02 li r3,2
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
ffc0e558: 41 be ff 78 beq- cr7,ffc0e4d0 <IMFS_get_token+0x70>
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
ffc0e55c: 3c 80 ff c2 lis r4,-62
ffc0e560: 7f c3 f3 78 mr r3,r30
ffc0e564: 38 84 8e ec addi r4,r4,-28948
ffc0e568: 48 00 4b d1 bl ffc13138 <strcmp>
type = IMFS_CURRENT_DIR;
}
return type;
}
ffc0e56c: 80 01 00 24 lwz r0,36(r1)
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
ffc0e570: 30 63 ff ff addic r3,r3,-1
ffc0e574: 7c 63 19 10 subfe r3,r3,r3
type = IMFS_CURRENT_DIR;
}
return type;
}
ffc0e578: 83 41 00 08 lwz r26,8(r1)
ffc0e57c: 7c 08 03 a6 mtlr r0
ffc0e580: 83 61 00 0c lwz r27,12(r1)
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
ffc0e584: 54 63 00 3c rlwinm r3,r3,0,0,30
type = IMFS_CURRENT_DIR;
}
return type;
}
ffc0e588: 83 81 00 10 lwz r28,16(r1)
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
ffc0e58c: 38 63 00 03 addi r3,r3,3
type = IMFS_CURRENT_DIR;
}
return type;
}
ffc0e590: 83 a1 00 14 lwz r29,20(r1)
ffc0e594: 83 c1 00 18 lwz r30,24(r1)
ffc0e598: 83 e1 00 1c lwz r31,28(r1)
ffc0e59c: 38 21 00 20 addi r1,r1,32
ffc0e5a0: 4e 80 00 20 blr
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
i++;
ffc0e5a4: 3b 80 00 01 li r28,1
type = IMFS_CURRENT_DIR;
ffc0e5a8: 38 60 00 01 li r3,1
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
ffc0e5ac: 93 9a 00 00 stw r28,0(r26)
ffc0e5b0: 4b ff ff 20 b ffc0e4d0 <IMFS_get_token+0x70>
ffc03ec4 <IMFS_initialize_support>:
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
ffc03ec4: 94 21 ff e0 stwu r1,-32(r1)
ffc03ec8: 7c 08 02 a6 mflr r0
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
ffc03ecc: 3d 20 00 00 lis r9,0
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
ffc03ed0: 90 01 00 24 stw r0,36(r1)
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
ffc03ed4: 80 09 26 d0 lwz r0,9936(r9)
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
ffc03ed8: 93 41 00 08 stw r26,8(r1)
ffc03edc: 7c fa 3b 78 mr r26,r7
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
ffc03ee0: 2f 80 00 10 cmpwi cr7,r0,16
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
ffc03ee4: 93 81 00 10 stw r28,16(r1)
ffc03ee8: 7c dc 33 78 mr r28,r6
ffc03eec: 93 a1 00 14 stw r29,20(r1)
ffc03ef0: 7c 9d 23 78 mr r29,r4
ffc03ef4: 93 c1 00 18 stw r30,24(r1)
ffc03ef8: 7c be 2b 78 mr r30,r5
ffc03efc: 93 e1 00 1c stw r31,28(r1)
ffc03f00: 7c 7f 1b 78 mr r31,r3
ffc03f04: 93 61 00 0c stw r27,12(r1)
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
ffc03f08: 41 9e 00 30 beq- cr7,ffc03f38 <IMFS_initialize_support+0x74>
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
ffc03f0c: 2f 80 00 0f cmpwi cr7,r0,15
ffc03f10: 40 9d 00 24 ble- cr7,ffc03f34 <IMFS_initialize_support+0x70>
ffc03f14: 39 60 00 05 li r11,5
ffc03f18: 7d 69 03 a6 mtctr r11
ffc03f1c: 39 20 00 20 li r9,32
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
ffc03f20: 7f 80 48 00 cmpw cr7,r0,r9
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
ffc03f24: 55 29 08 3c rlwinm r9,r9,1,0,30
if (bit_mask == requested_bytes_per_block) {
ffc03f28: 41 9e 00 10 beq- cr7,ffc03f38 <IMFS_initialize_support+0x74>
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
ffc03f2c: 41 9c 00 08 blt- cr7,ffc03f34 <IMFS_initialize_support+0x70><== NEVER TAKEN
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
ffc03f30: 42 00 ff f0 bdnz+ ffc03f20 <IMFS_initialize_support+0x5c>
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
ffc03f34: 38 00 00 80 li r0,128
break;
}
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
ffc03f38: 3d 20 00 00 lis r9,0
ffc03f3c: 90 09 27 84 stw r0,10116(r9)
/*
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
ffc03f40: 48 00 99 a1 bl ffc0d8e0 <IMFS_create_root_node>
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
ffc03f44: 3c 80 ff c2 lis r4,-62
/*
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
ffc03f48: 90 7f 00 1c stw r3,28(r31)
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
ffc03f4c: 38 84 8e 94 addi r4,r4,-29036
ffc03f50: 38 a0 00 30 li r5,48
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
ffc03f54: 93 9f 00 24 stw r28,36(r31)
/*
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
ffc03f58: 7c 7b 1b 78 mr r27,r3
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
ffc03f5c: 38 7f 00 38 addi r3,r31,56
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
ffc03f60: 93 bf 00 28 stw r29,40(r31)
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
ffc03f64: 48 00 ed 71 bl ffc12cd4 <memcpy>
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
ffc03f68: 38 60 00 01 li r3,1
ffc03f6c: 38 80 00 14 li r4,20
ffc03f70: 48 00 08 dd bl ffc0484c <calloc>
if ( !fs_info ) {
ffc03f74: 7c 69 1b 79 mr. r9,r3
ffc03f78: 41 82 00 60 beq- ffc03fd8 <IMFS_initialize_support+0x114>
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
ffc03f7c: 3d 60 00 00 lis r11,0
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
temp_mt_entry->fs_info = fs_info;
ffc03f80: 91 3f 00 34 stw r9,52(r31)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
ffc03f84: 38 00 00 01 li r0,1
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
ffc03f88: 81 4b 28 54 lwz r10,10324(r11)
fs_info->fifo_handlers = fifo_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
return 0;
ffc03f8c: 38 60 00 00 li r3,0
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
ffc03f90: 90 09 00 04 stw r0,4(r9)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
ffc03f94: 39 0a 00 01 addi r8,r10,1
ffc03f98: 91 49 00 00 stw r10,0(r9)
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
ffc03f9c: 93 c9 00 08 stw r30,8(r9)
fs_info->directory_handlers = directory_handlers;
ffc03fa0: 93 89 00 0c stw r28,12(r9)
fs_info->fifo_handlers = fifo_handlers;
ffc03fa4: 93 49 00 10 stw r26,16(r9)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
ffc03fa8: 91 0b 28 54 stw r8,10324(r11)
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
fs_info->fifo_handlers = fifo_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
ffc03fac: 90 1b 00 38 stw r0,56(r27)
return 0;
}
ffc03fb0: 80 01 00 24 lwz r0,36(r1)
ffc03fb4: 83 41 00 08 lwz r26,8(r1)
ffc03fb8: 7c 08 03 a6 mtlr r0
ffc03fbc: 83 61 00 0c lwz r27,12(r1)
ffc03fc0: 83 81 00 10 lwz r28,16(r1)
ffc03fc4: 83 a1 00 14 lwz r29,20(r1)
ffc03fc8: 83 c1 00 18 lwz r30,24(r1)
ffc03fcc: 83 e1 00 1c lwz r31,28(r1)
ffc03fd0: 38 21 00 20 addi r1,r1,32
ffc03fd4: 4e 80 00 20 blr
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
ffc03fd8: 7f 63 db 78 mr r3,r27
ffc03fdc: 48 00 0b 1d bl ffc04af8 <free>
rtems_set_errno_and_return_minus_one(ENOMEM);
ffc03fe0: 48 00 e0 95 bl ffc12074 <__errno>
ffc03fe4: 38 00 00 0c li r0,12
ffc03fe8: 90 03 00 00 stw r0,0(r3)
ffc03fec: 38 60 ff ff li r3,-1
ffc03ff0: 4b ff ff c0 b ffc03fb0 <IMFS_initialize_support+0xec>
ffc10ad8 <IMFS_memfile_extend>:
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
ffc10ad8: 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 )
ffc10adc: 3d 20 00 00 lis r9,0
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
ffc10ae0: 7c 08 02 a6 mflr r0
ffc10ae4: 93 a1 00 1c stw r29,28(r1)
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
ffc10ae8: 83 a9 27 84 lwz r29,10116(r9)
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
ffc10aec: 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 )
ffc10af0: 57 a9 f0 be rlwinm r9,r29,30,2,31
ffc10af4: 39 69 00 01 addi r11,r9,1
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
ffc10af8: 93 41 00 10 stw r26,16(r1)
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
ffc10afc: 7d 6b 49 d6 mullw r11,r11,r9
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
ffc10b00: 93 81 00 18 stw r28,24(r1)
ffc10b04: 7c da 33 78 mr r26,r6
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
ffc10b08: 38 0b 00 01 addi r0,r11,1
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
ffc10b0c: 93 e1 00 24 stw r31,36(r1)
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
ffc10b10: 39 60 00 00 li r11,0
ffc10b14: 7f 8b 28 00 cmpw cr7,r11,r5
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
ffc10b18: 93 01 00 08 stw r24,8(r1)
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
ffc10b1c: 7d 20 49 d6 mullw r9,r0,r9
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
ffc10b20: 93 21 00 0c stw r25,12(r1)
ffc10b24: 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 )
ffc10b28: 39 29 ff ff addi r9,r9,-1
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
ffc10b2c: 93 61 00 14 stw r27,20(r1)
ffc10b30: 7c 7f 1b 78 mr r31,r3
ffc10b34: 93 c1 00 20 stw r30,32(r1)
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
ffc10b38: 7d 29 e9 d6 mullw r9,r9,r29
ffc10b3c: 40 9d 01 50 ble- cr7,ffc10c8c <IMFS_memfile_extend+0x1b4><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
ffc10b40: 83 7f 00 50 lwz r27,80(r31)
ffc10b44: 83 3f 00 54 lwz r25,84(r31)
ffc10b48: 7f 9c d8 00 cmpw cr7,r28,r27
ffc10b4c: 40 9d 00 c4 ble- cr7,ffc10c10 <IMFS_memfile_extend+0x138><== ALWAYS TAKEN
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc10b50: 7f b8 fe 70 srawi r24,r29,31
ffc10b54: 7f 05 c3 78 mr r5,r24
ffc10b58: 7f a6 eb 78 mr r6,r29
ffc10b5c: 7f 83 e3 78 mr r3,r28
ffc10b60: 7f 44 d3 78 mr r4,r26
ffc10b64: 48 00 54 dd bl ffc16040 <__divdi3>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc10b68: 7f 63 db 78 mr r3,r27
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc10b6c: 7c 9e 23 78 mr r30,r4
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc10b70: 7f 05 c3 78 mr r5,r24
ffc10b74: 7f 24 cb 78 mr r4,r25
ffc10b78: 7f a6 eb 78 mr r6,r29
ffc10b7c: 48 00 54 c5 bl ffc16040 <__divdi3>
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
ffc10b80: 7f 9e 20 40 cmplw cr7,r30,r4
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc10b84: 7c 9b 23 78 mr r27,r4
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
ffc10b88: 41 9c 00 c8 blt- cr7,ffc10c50 <IMFS_memfile_extend+0x178><== NEVER TAKEN
ffc10b8c: 7c 9d 23 78 mr r29,r4
ffc10b90: 48 00 00 10 b ffc10ba0 <IMFS_memfile_extend+0xc8>
ffc10b94: 3b bd 00 01 addi r29,r29,1
ffc10b98: 7f 9e e8 40 cmplw cr7,r30,r29
ffc10b9c: 41 9c 00 b4 blt- cr7,ffc10c50 <IMFS_memfile_extend+0x178>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
ffc10ba0: 7f a4 eb 78 mr r4,r29
ffc10ba4: 7f e3 fb 78 mr r3,r31
ffc10ba8: 4b ff fc 2d bl ffc107d4 <IMFS_memfile_addblock>
ffc10bac: 2f 83 00 00 cmpwi cr7,r3,0
ffc10bb0: 41 9e ff e4 beq+ cr7,ffc10b94 <IMFS_memfile_extend+0xbc>
ffc10bb4: 48 00 00 14 b ffc10bc8 <IMFS_memfile_extend+0xf0>
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
ffc10bb8: 7f a4 eb 78 mr r4,r29
ffc10bbc: 7f e3 fb 78 mr r3,r31
/*
* 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-- ) {
ffc10bc0: 3b bd ff ff addi r29,r29,-1
IMFS_memfile_remove_block( the_jnode, block );
ffc10bc4: 4b ff fe d9 bl ffc10a9c <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-- ) {
ffc10bc8: 7f 9b e8 40 cmplw cr7,r27,r29
ffc10bcc: 40 9d ff ec ble+ cr7,ffc10bb8 <IMFS_memfile_extend+0xe0>
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
ffc10bd0: 48 00 14 a5 bl ffc12074 <__errno>
ffc10bd4: 38 00 00 1c li r0,28
ffc10bd8: 90 03 00 00 stw r0,0(r3)
ffc10bdc: 38 60 ff ff li r3,-1
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
ffc10be0: 80 01 00 2c lwz r0,44(r1)
ffc10be4: 83 01 00 08 lwz r24,8(r1)
ffc10be8: 7c 08 03 a6 mtlr r0
ffc10bec: 83 21 00 0c lwz r25,12(r1)
ffc10bf0: 83 41 00 10 lwz r26,16(r1)
ffc10bf4: 83 61 00 14 lwz r27,20(r1)
ffc10bf8: 83 81 00 18 lwz r28,24(r1)
ffc10bfc: 83 a1 00 1c lwz r29,28(r1)
ffc10c00: 83 c1 00 20 lwz r30,32(r1)
ffc10c04: 83 e1 00 24 lwz r31,36(r1)
ffc10c08: 38 21 00 28 addi r1,r1,40
ffc10c0c: 4e 80 00 20 blr
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
ffc10c10: 40 9e 00 0c bne- cr7,ffc10c1c <IMFS_memfile_extend+0x144><== NEVER TAKEN
ffc10c14: 7f 9a c8 40 cmplw cr7,r26,r25
ffc10c18: 41 9d ff 38 bgt+ cr7,ffc10b50 <IMFS_memfile_extend+0x78>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
ffc10c1c: 80 01 00 2c lwz r0,44(r1)
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
return 0;
ffc10c20: 38 60 00 00 li r3,0
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
ffc10c24: 83 01 00 08 lwz r24,8(r1)
ffc10c28: 7c 08 03 a6 mtlr r0
ffc10c2c: 83 21 00 0c lwz r25,12(r1)
ffc10c30: 83 41 00 10 lwz r26,16(r1)
ffc10c34: 83 61 00 14 lwz r27,20(r1)
ffc10c38: 83 81 00 18 lwz r28,24(r1)
ffc10c3c: 83 a1 00 1c lwz r29,28(r1)
ffc10c40: 83 c1 00 20 lwz r30,32(r1)
ffc10c44: 83 e1 00 24 lwz r31,36(r1)
ffc10c48: 38 21 00 28 addi r1,r1,40
ffc10c4c: 4e 80 00 20 blr
}
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
ffc10c50: 93 9f 00 50 stw r28,80(r31)
return 0;
ffc10c54: 38 60 00 00 li r3,0
}
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
ffc10c58: 93 5f 00 54 stw r26,84(r31)
return 0;
}
ffc10c5c: 80 01 00 2c lwz r0,44(r1)
ffc10c60: 83 01 00 08 lwz r24,8(r1)
ffc10c64: 7c 08 03 a6 mtlr r0
ffc10c68: 83 21 00 0c lwz r25,12(r1)
ffc10c6c: 83 41 00 10 lwz r26,16(r1)
ffc10c70: 83 61 00 14 lwz r27,20(r1)
ffc10c74: 83 81 00 18 lwz r28,24(r1)
ffc10c78: 83 a1 00 1c lwz r29,28(r1)
ffc10c7c: 83 c1 00 20 lwz r30,32(r1)
ffc10c80: 83 e1 00 24 lwz r31,36(r1)
ffc10c84: 38 21 00 28 addi r1,r1,40
ffc10c88: 4e 80 00 20 blr
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
ffc10c8c: 40 9e 00 0c bne- cr7,ffc10c98 <IMFS_memfile_extend+0x1c0><== NEVER TAKEN
ffc10c90: 7f 89 30 40 cmplw cr7,r9,r6
ffc10c94: 41 9d fe ac bgt+ cr7,ffc10b40 <IMFS_memfile_extend+0x68>
rtems_set_errno_and_return_minus_one( EINVAL );
ffc10c98: 48 00 13 dd bl ffc12074 <__errno>
ffc10c9c: 38 00 00 16 li r0,22
ffc10ca0: 90 03 00 00 stw r0,0(r3)
ffc10ca4: 38 60 ff ff li r3,-1
ffc10ca8: 4b ff ff 38 b ffc10be0 <IMFS_memfile_extend+0x108>
ffc10290 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
ffc10290: 94 21 ff d8 stwu r1,-40(r1)
ffc10294: 7c 08 02 a6 mflr r0
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
ffc10298: 3d 20 00 00 lis r9,0
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
ffc1029c: 90 01 00 2c stw r0,44(r1)
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
ffc102a0: 80 09 27 84 lwz r0,10116(r9)
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
ffc102a4: 93 e1 00 24 stw r31,36(r1)
ffc102a8: 7c 7f 1b 78 mr r31,r3
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
ffc102ac: 54 09 f0 be rlwinm r9,r0,30,2,31
ffc102b0: 38 09 ff ff addi r0,r9,-1
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
ffc102b4: 93 61 00 14 stw r27,20(r1)
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
ffc102b8: 7f 84 00 40 cmplw cr7,r4,r0
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
ffc102bc: 93 81 00 18 stw r28,24(r1)
ffc102c0: 93 a1 00 1c stw r29,28(r1)
ffc102c4: 93 c1 00 20 stw r30,32(r1)
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
ffc102c8: 41 9d 00 48 bgt- cr7,ffc10310 <IMFS_memfile_get_block_pointer+0x80>
p = info->indirect;
if ( malloc_it ) {
ffc102cc: 2f 85 00 00 cmpwi cr7,r5,0
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
p = info->indirect;
ffc102d0: 80 03 00 58 lwz r0,88(r3)
if ( malloc_it ) {
ffc102d4: 41 9e 00 b8 beq- cr7,ffc1038c <IMFS_memfile_get_block_pointer+0xfc>
if ( !p ) {
ffc102d8: 2f 80 00 00 cmpwi cr7,r0,0
ffc102dc: 41 9e 01 70 beq- cr7,ffc1044c <IMFS_memfile_get_block_pointer+0x1bc>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
ffc102e0: 54 84 10 3a rlwinm r4,r4,2,0,29
/*
* This means the requested block number is out of range.
*/
return 0;
}
ffc102e4: 83 61 00 14 lwz r27,20(r1)
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
ffc102e8: 7f c0 22 14 add r30,r0,r4
/*
* This means the requested block number is out of range.
*/
return 0;
}
ffc102ec: 80 01 00 2c lwz r0,44(r1)
ffc102f0: 7f c3 f3 78 mr r3,r30
ffc102f4: 83 81 00 18 lwz r28,24(r1)
ffc102f8: 7c 08 03 a6 mtlr r0
ffc102fc: 83 a1 00 1c lwz r29,28(r1)
ffc10300: 83 c1 00 20 lwz r30,32(r1)
ffc10304: 83 e1 00 24 lwz r31,36(r1)
ffc10308: 38 21 00 28 addi r1,r1,40
ffc1030c: 4e 80 00 20 blr
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
ffc10310: 3b 89 00 01 addi r28,r9,1
ffc10314: 7f 9c 49 d6 mullw r28,r28,r9
ffc10318: 38 1c ff ff addi r0,r28,-1
ffc1031c: 7f 84 00 40 cmplw cr7,r4,r0
ffc10320: 41 9d 00 7c bgt- cr7,ffc1039c <IMFS_memfile_get_block_pointer+0x10c>
my_block -= FIRST_DOUBLY_INDIRECT;
ffc10324: 7c 89 20 50 subf r4,r9,r4
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
ffc10328: 81 63 00 5c lwz r11,92(r3)
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
ffc1032c: 7f a4 4b 96 divwu r29,r4,r9
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
if ( malloc_it ) {
ffc10330: 2f 85 00 00 cmpwi cr7,r5,0
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
ffc10334: 7d 3d 49 d6 mullw r9,r29,r9
ffc10338: 7f 89 20 50 subf r28,r9,r4
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
if ( malloc_it ) {
ffc1033c: 41 9e 00 e8 beq- cr7,ffc10424 <IMFS_memfile_get_block_pointer+0x194>
if ( !p ) {
ffc10340: 2f 8b 00 00 cmpwi cr7,r11,0
ffc10344: 41 9e 01 28 beq- cr7,ffc1046c <IMFS_memfile_get_block_pointer+0x1dc>
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
ffc10348: 57 bd 10 3a rlwinm r29,r29,2,0,29
ffc1034c: 7c 6b e8 2e lwzx r3,r11,r29
ffc10350: 7f ab ea 14 add r29,r11,r29
if ( !p1 ) {
ffc10354: 2f 83 00 00 cmpwi cr7,r3,0
ffc10358: 41 9e 01 2c beq- cr7,ffc10484 <IMFS_memfile_get_block_pointer+0x1f4>
p2 = memfile_alloc_block();
if ( !p2 )
return 0;
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
ffc1035c: 57 9e 10 3a rlwinm r30,r28,2,0,29
ffc10360: 7f c3 f2 14 add r30,r3,r30
/*
* This means the requested block number is out of range.
*/
return 0;
}
ffc10364: 80 01 00 2c lwz r0,44(r1)
ffc10368: 7f c3 f3 78 mr r3,r30
ffc1036c: 83 61 00 14 lwz r27,20(r1)
ffc10370: 7c 08 03 a6 mtlr r0
ffc10374: 83 81 00 18 lwz r28,24(r1)
ffc10378: 83 a1 00 1c lwz r29,28(r1)
ffc1037c: 83 c1 00 20 lwz r30,32(r1)
ffc10380: 83 e1 00 24 lwz r31,36(r1)
ffc10384: 38 21 00 28 addi r1,r1,40
ffc10388: 4e 80 00 20 blr
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
ffc1038c: 2f 80 00 00 cmpwi cr7,r0,0
return 0;
ffc10390: 3b c0 00 00 li r30,0
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
ffc10394: 40 9e ff 4c bne+ cr7,ffc102e0 <IMFS_memfile_get_block_pointer+0x50><== ALWAYS TAKEN
ffc10398: 4b ff ff cc b ffc10364 <IMFS_memfile_get_block_pointer+0xd4><== NOT EXECUTED
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
ffc1039c: 39 7c 00 01 addi r11,r28,1
ffc103a0: 7d 6b 49 d6 mullw r11,r11,r9
}
/*
* This means the requested block number is out of range.
*/
return 0;
ffc103a4: 3b c0 00 00 li r30,0
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
ffc103a8: 38 0b ff ff addi r0,r11,-1
ffc103ac: 7f 84 00 40 cmplw cr7,r4,r0
ffc103b0: 41 bd ff b4 bgt- cr7,ffc10364 <IMFS_memfile_get_block_pointer+0xd4><== NEVER TAKEN
my_block -= FIRST_TRIPLY_INDIRECT;
ffc103b4: 7c 9c 20 50 subf r4,r28,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;
ffc103b8: 81 43 00 60 lwz r10,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;
ffc103bc: 7d 64 4b 96 divwu r11,r4,r9
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
ffc103c0: 7f ab 4b 96 divwu r29,r11,r9
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
if ( malloc_it ) {
ffc103c4: 2f 85 00 00 cmpwi cr7,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;
ffc103c8: 7f 8b 49 d6 mullw r28,r11,r9
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
ffc103cc: 7d 3d 49 d6 mullw r9,r29,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;
ffc103d0: 7f 9c 20 50 subf r28,r28,r4
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
ffc103d4: 7f 69 58 50 subf r27,r9,r11
p = info->triply_indirect;
if ( malloc_it ) {
ffc103d8: 41 9e 00 c4 beq- cr7,ffc1049c <IMFS_memfile_get_block_pointer+0x20c>
if ( !p ) {
ffc103dc: 2f 8a 00 00 cmpwi cr7,r10,0
ffc103e0: 41 9e 01 00 beq- cr7,ffc104e0 <IMFS_memfile_get_block_pointer+0x250>
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
ffc103e4: 57 bd 10 3a rlwinm r29,r29,2,0,29
ffc103e8: 7d 2a e8 2e lwzx r9,r10,r29
ffc103ec: 7f aa ea 14 add r29,r10,r29
if ( !p1 ) {
ffc103f0: 2f 89 00 00 cmpwi cr7,r9,0
ffc103f4: 41 9e 00 d4 beq- cr7,ffc104c8 <IMFS_memfile_get_block_pointer+0x238>
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
ffc103f8: 57 7b 10 3a rlwinm r27,r27,2,0,29
ffc103fc: 7c 69 d8 2e lwzx r3,r9,r27
ffc10400: 7f 69 da 14 add r27,r9,r27
if ( !p2 ) {
ffc10404: 2f 83 00 00 cmpwi cr7,r3,0
ffc10408: 40 9e ff 54 bne+ cr7,ffc1035c <IMFS_memfile_get_block_pointer+0xcc>
p2 = memfile_alloc_block();
ffc1040c: 4b ff fe 41 bl ffc1024c <memfile_alloc_block>
if ( !p2 )
return 0;
ffc10410: 3b c0 00 00 li r30,0
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
ffc10414: 2c 03 00 00 cmpwi r3,0
ffc10418: 41 a2 ff 4c beq- ffc10364 <IMFS_memfile_get_block_pointer+0xd4><== NEVER TAKEN
return 0;
p1[ doubly ] = (block_p) p2;
ffc1041c: 90 7b 00 00 stw r3,0(r27)
ffc10420: 4b ff ff 3c b ffc1035c <IMFS_memfile_get_block_pointer+0xcc>
}
return (block_p *)&p1[ singly ];
}
if ( !p )
ffc10424: 2f 8b 00 00 cmpwi cr7,r11,0
return 0;
ffc10428: 3b c0 00 00 li r30,0
}
return (block_p *)&p1[ singly ];
}
if ( !p )
ffc1042c: 41 9e ff 38 beq+ cr7,ffc10364 <IMFS_memfile_get_block_pointer+0xd4><== NEVER TAKEN
return 0;
p = (block_p *)p[ doubly ];
ffc10430: 57 bd 10 3a rlwinm r29,r29,2,0,29
ffc10434: 7c 0b e8 2e lwzx r0,r11,r29
if ( !p )
ffc10438: 2f 80 00 00 cmpwi cr7,r0,0
ffc1043c: 41 be ff 28 beq- cr7,ffc10364 <IMFS_memfile_get_block_pointer+0xd4><== NEVER TAKEN
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
ffc10440: 57 9e 10 3a rlwinm r30,r28,2,0,29
ffc10444: 7f c0 f2 14 add r30,r0,r30
ffc10448: 4b ff ff 1c b ffc10364 <IMFS_memfile_get_block_pointer+0xd4>
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
ffc1044c: 90 81 00 08 stw r4,8(r1)
ffc10450: 4b ff fd fd bl ffc1024c <memfile_alloc_block>
if ( !p )
ffc10454: 7c 60 1b 79 mr. r0,r3
return 0;
ffc10458: 3b c0 00 00 li r30,0
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
ffc1045c: 80 81 00 08 lwz r4,8(r1)
ffc10460: 41 a2 ff 04 beq- ffc10364 <IMFS_memfile_get_block_pointer+0xd4><== NEVER TAKEN
return 0;
info->indirect = p;
ffc10464: 90 1f 00 58 stw r0,88(r31)
ffc10468: 4b ff fe 78 b ffc102e0 <IMFS_memfile_get_block_pointer+0x50>
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
ffc1046c: 4b ff fd e1 bl ffc1024c <memfile_alloc_block>
if ( !p )
return 0;
ffc10470: 3b c0 00 00 li r30,0
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
ffc10474: 7c 6b 1b 79 mr. r11,r3
ffc10478: 41 a2 fe ec beq- ffc10364 <IMFS_memfile_get_block_pointer+0xd4><== NEVER TAKEN
return 0;
info->doubly_indirect = p;
ffc1047c: 91 7f 00 5c stw r11,92(r31)
ffc10480: 4b ff fe c8 b ffc10348 <IMFS_memfile_get_block_pointer+0xb8>
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
ffc10484: 4b ff fd c9 bl ffc1024c <memfile_alloc_block>
if ( !p1 )
return 0;
ffc10488: 3b c0 00 00 li r30,0
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
if ( !p1 )
ffc1048c: 2c 03 00 00 cmpwi r3,0
ffc10490: 41 a2 fe d4 beq- ffc10364 <IMFS_memfile_get_block_pointer+0xd4><== NEVER TAKEN
return 0;
p[ doubly ] = (block_p) p1;
ffc10494: 90 7d 00 00 stw r3,0(r29)
ffc10498: 4b ff fe c4 b ffc1035c <IMFS_memfile_get_block_pointer+0xcc>
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
ffc1049c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc104a0: 41 9e fe c4 beq+ cr7,ffc10364 <IMFS_memfile_get_block_pointer+0xd4><== NEVER TAKEN
return 0;
p1 = (block_p *) p[ triply ];
ffc104a4: 57 bd 10 3a rlwinm r29,r29,2,0,29
ffc104a8: 7d 2a e8 2e lwzx r9,r10,r29
if ( !p1 )
ffc104ac: 2f 89 00 00 cmpwi cr7,r9,0
ffc104b0: 41 9e fe b4 beq+ cr7,ffc10364 <IMFS_memfile_get_block_pointer+0xd4><== NEVER TAKEN
return 0;
p2 = (block_p *)p1[ doubly ];
ffc104b4: 57 7b 10 3a rlwinm r27,r27,2,0,29
ffc104b8: 7c 09 d8 2e lwzx r0,r9,r27
if ( !p2 )
ffc104bc: 2f 80 00 00 cmpwi cr7,r0,0
ffc104c0: 40 9e ff 80 bne+ cr7,ffc10440 <IMFS_memfile_get_block_pointer+0x1b0><== ALWAYS TAKEN
ffc104c4: 4b ff fe a0 b ffc10364 <IMFS_memfile_get_block_pointer+0xd4><== NOT EXECUTED
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
ffc104c8: 4b ff fd 85 bl ffc1024c <memfile_alloc_block>
if ( !p1 )
return 0;
ffc104cc: 3b c0 00 00 li r30,0
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
if ( !p1 )
ffc104d0: 7c 69 1b 79 mr. r9,r3
ffc104d4: 41 a2 fe 90 beq- ffc10364 <IMFS_memfile_get_block_pointer+0xd4><== NEVER TAKEN
return 0;
p[ triply ] = (block_p) p1;
ffc104d8: 91 3d 00 00 stw r9,0(r29)
ffc104dc: 4b ff ff 1c b ffc103f8 <IMFS_memfile_get_block_pointer+0x168>
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
ffc104e0: 4b ff fd 6d bl ffc1024c <memfile_alloc_block>
if ( !p )
ffc104e4: 7c 6a 1b 79 mr. r10,r3
ffc104e8: 41 a2 fe 7c beq- ffc10364 <IMFS_memfile_get_block_pointer+0xd4><== NEVER TAKEN
return 0;
info->triply_indirect = p;
ffc104ec: 91 5f 00 60 stw r10,96(r31)
ffc104f0: 4b ff fe f4 b ffc103e4 <IMFS_memfile_get_block_pointer+0x154>
ffc104f4 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
ffc104f4: 94 21 ff c0 stwu r1,-64(r1)
ffc104f8: 7c 08 02 a6 mflr r0
ffc104fc: 90 01 00 44 stw r0,68(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) {
ffc10500: 80 03 00 4c lwz r0,76(r3)
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
ffc10504: 93 81 00 30 stw r28,48(r1)
ffc10508: 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) {
ffc1050c: 2f 80 00 06 cmpwi cr7,r0,6
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
ffc10510: 93 a1 00 34 stw r29,52(r1)
ffc10514: 7c 7d 1b 78 mr r29,r3
ffc10518: 93 c1 00 38 stw r30,56(r1)
ffc1051c: 7c be 2b 78 mr r30,r5
ffc10520: 93 e1 00 3c stw r31,60(r1)
ffc10524: 7c df 33 78 mr r31,r6
ffc10528: 92 e1 00 1c stw r23,28(r1)
ffc1052c: 93 01 00 20 stw r24,32(r1)
ffc10530: 93 21 00 24 stw r25,36(r1)
ffc10534: 93 41 00 28 stw r26,40(r1)
ffc10538: 93 61 00 2c stw r27,44(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) {
ffc1053c: 41 9e 01 d0 beq- cr7,ffc1070c <IMFS_memfile_read+0x218>
/*
* 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 )
ffc10540: 80 03 00 50 lwz r0,80(r3)
ffc10544: 39 20 00 00 li r9,0
ffc10548: 83 43 00 54 lwz r26,84(r3)
ffc1054c: 7f 89 00 00 cmpw cr7,r9,r0
/*
* 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;
ffc10550: 7c c0 33 78 mr r0,r6
ffc10554: 7d 28 32 14 add r9,r8,r6
if ( last_byte > the_jnode->info.file.size )
ffc10558: 40 9d 01 28 ble- cr7,ffc10680 <IMFS_memfile_read+0x18c> <== ALWAYS TAKEN
my_length = the_jnode->info.file.size - start;
ffc1055c: 7f 40 d0 50 subf r26,r0,r26
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc10560: 3f 20 00 00 lis r25,0
ffc10564: 83 79 27 84 lwz r27,10116(r25)
ffc10568: 7f c3 f3 78 mr r3,r30
ffc1056c: 7f e4 fb 78 mr r4,r31
ffc10570: 7f 78 fe 70 srawi r24,r27,31
ffc10574: 7f 05 c3 78 mr r5,r24
ffc10578: 7f 66 db 78 mr r6,r27
ffc1057c: 48 00 5e dd bl ffc16458 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc10580: 7f c3 f3 78 mr r3,r30
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc10584: 7c 97 23 78 mr r23,r4
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc10588: 7f 05 c3 78 mr r5,r24
ffc1058c: 7f e4 fb 78 mr r4,r31
ffc10590: 7f 66 db 78 mr r6,r27
ffc10594: 48 00 5a ad bl ffc16040 <__divdi3>
if ( start_offset ) {
ffc10598: 2f 97 00 00 cmpwi cr7,r23,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;
ffc1059c: 7c 9e 23 78 mr r30,r4
unsigned int last_byte;
unsigned int copied;
unsigned int start_offset;
unsigned char *dest;
dest = destination;
ffc105a0: 7f 98 e3 78 mr r24,r28
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
my_length = the_jnode->info.file.size - start;
copied = 0;
ffc105a4: 3b e0 00 00 li r31,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 ) {
ffc105a8: 41 9e 00 50 beq- cr7,ffc105f8 <IMFS_memfile_read+0x104>
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 );
ffc105ac: 7f a3 eb 78 mr r3,r29
ffc105b0: 38 a0 00 00 li r5,0
ffc105b4: 4b ff fc dd bl ffc10290 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
ffc105b8: 7c 69 1b 79 mr. r9,r3
return copied;
ffc105bc: 38 60 00 00 li r3,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 )
ffc105c0: 41 82 00 8c beq- ffc1064c <IMFS_memfile_read+0x158> <== 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;
ffc105c4: 7f 77 d8 50 subf r27,r23,r27
ffc105c8: 7f 9a d8 40 cmplw cr7,r26,r27
ffc105cc: 7f 5f d3 78 mr r31,r26
ffc105d0: 41 9d 01 cc bgt- cr7,ffc1079c <IMFS_memfile_read+0x2a8>
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 );
ffc105d4: 80 89 00 00 lwz r4,0(r9)
ffc105d8: 7f 83 e3 78 mr r3,r28
ffc105dc: 7f e5 fb 78 mr r5,r31
ffc105e0: 7c 84 ba 14 add r4,r4,r23
ffc105e4: 48 00 26 f1 bl ffc12cd4 <memcpy>
dest += to_copy;
block++;
my_length -= to_copy;
ffc105e8: 83 79 27 84 lwz r27,10116(r25)
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 );
dest += to_copy;
ffc105ec: 7f 1c fa 14 add r24,r28,r31
block++;
ffc105f0: 3b de 00 01 addi r30,r30,1
my_length -= to_copy;
ffc105f4: 7f 5f d0 50 subf r26,r31,r26
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ffc105f8: 7f 9a d8 40 cmplw cr7,r26,r27
ffc105fc: 40 bc 00 20 bge+ cr7,ffc1061c <IMFS_memfile_read+0x128>
ffc10600: 48 00 00 8c b ffc1068c <IMFS_memfile_read+0x198>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
ffc10604: 80 89 00 00 lwz r4,0(r9)
dest += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
ffc10608: 7f ff da 14 add r31,r31,r27
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
ffc1060c: 48 00 26 c9 bl ffc12cd4 <memcpy>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ffc10610: 80 19 27 84 lwz r0,10116(r25)
ffc10614: 7f 80 d0 40 cmplw cr7,r0,r26
ffc10618: 41 9d 00 74 bgt- cr7,ffc1068c <IMFS_memfile_read+0x198>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ffc1061c: 7f c4 f3 78 mr r4,r30
ffc10620: 38 a0 00 00 li r5,0
ffc10624: 7f a3 eb 78 mr r3,r29
ffc10628: 4b ff fc 69 bl ffc10290 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
my_length -= to_copy;
ffc1062c: 7f 5b d0 50 subf r26,r27,r26
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
ffc10630: 7c 69 1b 79 mr. r9,r3
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
ffc10634: 7f 65 db 78 mr r5,r27
ffc10638: 7f 03 c3 78 mr r3,r24
dest += to_copy;
block++;
ffc1063c: 3b de 00 01 addi r30,r30,1
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
ffc10640: 7f 18 da 14 add r24,r24,r27
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
ffc10644: 40 82 ff c0 bne+ ffc10604 <IMFS_memfile_read+0x110> <== ALWAYS TAKEN
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
ffc10648: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
ffc1064c: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED
ffc10650: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED
ffc10654: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc10658: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED
ffc1065c: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED
ffc10660: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED
ffc10664: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED
ffc10668: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED
ffc1066c: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED
ffc10670: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED
ffc10674: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED
ffc10678: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED
ffc1067c: 4e 80 00 20 blr <== NOT EXECUTED
/*
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
ffc10680: 41 9e 01 0c beq- cr7,ffc1078c <IMFS_memfile_read+0x298> <== ALWAYS TAKEN
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
ffc10684: 7d 1a 43 78 mr r26,r8 <== NOT EXECUTED
ffc10688: 4b ff fe d8 b ffc10560 <IMFS_memfile_read+0x6c> <== NOT EXECUTED
/*
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
ffc1068c: 2f 9a 00 00 cmpwi cr7,r26,0
ffc10690: 41 9e 00 30 beq- cr7,ffc106c0 <IMFS_memfile_read+0x1cc>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ffc10694: 7f a3 eb 78 mr r3,r29
ffc10698: 7f c4 f3 78 mr r4,r30
ffc1069c: 38 a0 00 00 li r5,0
ffc106a0: 4b ff fb f1 bl ffc10290 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
ffc106a4: 2c 03 00 00 cmpwi r3,0
ffc106a8: 41 a2 ff a0 beq- ffc10648 <IMFS_memfile_read+0x154> <== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
ffc106ac: 80 83 00 00 lwz r4,0(r3)
ffc106b0: 7f 45 d3 78 mr r5,r26
ffc106b4: 7f 03 c3 78 mr r3,r24
ffc106b8: 48 00 26 1d bl ffc12cd4 <memcpy>
copied += my_length;
ffc106bc: 7f ff d2 14 add r31,r31,r26
}
IMFS_update_atime( the_jnode );
ffc106c0: 38 61 00 08 addi r3,r1,8
ffc106c4: 38 80 00 00 li r4,0
ffc106c8: 4b ff 44 f9 bl ffc04bc0 <gettimeofday>
ffc106cc: 80 01 00 08 lwz r0,8(r1)
return copied;
ffc106d0: 7f e3 fb 78 mr r3,r31
}
ffc106d4: 82 e1 00 1c lwz r23,28(r1)
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
copied += my_length;
}
IMFS_update_atime( the_jnode );
ffc106d8: 90 1d 00 40 stw r0,64(r29)
return copied;
}
ffc106dc: 80 01 00 44 lwz r0,68(r1)
ffc106e0: 83 01 00 20 lwz r24,32(r1)
ffc106e4: 7c 08 03 a6 mtlr r0
ffc106e8: 83 21 00 24 lwz r25,36(r1)
ffc106ec: 83 41 00 28 lwz r26,40(r1)
ffc106f0: 83 61 00 2c lwz r27,44(r1)
ffc106f4: 83 81 00 30 lwz r28,48(r1)
ffc106f8: 83 a1 00 34 lwz r29,52(r1)
ffc106fc: 83 c1 00 38 lwz r30,56(r1)
ffc10700: 83 e1 00 3c lwz r31,60(r1)
ffc10704: 38 21 00 40 addi r1,r1,64
ffc10708: 4e 80 00 20 blr
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
ffc1070c: 81 23 00 50 lwz r9,80(r3)
ffc10710: 38 00 00 00 li r0,0
ffc10714: 81 43 00 54 lwz r10,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;
ffc10718: 80 83 00 58 lwz r4,88(r3)
if (my_length > (the_jnode->info.linearfile.size - start))
ffc1071c: 7d 9f 50 10 subfc r12,r31,r10
ffc10720: 7d 7e 49 10 subfe r11,r30,r9
ffc10724: 7f 80 58 00 cmpw cr7,r0,r11
ffc10728: 40 9d 00 7c ble- cr7,ffc107a4 <IMFS_memfile_read+0x2b0> <== ALWAYS TAKEN
my_length = the_jnode->info.linearfile.size - start;
ffc1072c: 7f 5f 50 50 subf r26,r31,r10
memcpy(dest, &file_ptr[start], my_length);
ffc10730: 7c 84 fa 14 add r4,r4,r31
ffc10734: 7f 45 d3 78 mr r5,r26
ffc10738: 7f 83 e3 78 mr r3,r28
ffc1073c: 48 00 25 99 bl ffc12cd4 <memcpy>
IMFS_update_atime( the_jnode );
ffc10740: 38 61 00 08 addi r3,r1,8
ffc10744: 38 80 00 00 li r4,0
ffc10748: 4b ff 44 79 bl ffc04bc0 <gettimeofday>
ffc1074c: 80 01 00 08 lwz r0,8(r1)
return my_length;
ffc10750: 7f 43 d3 78 mr r3,r26
}
IMFS_update_atime( the_jnode );
return copied;
}
ffc10754: 82 e1 00 1c lwz r23,28(r1)
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 );
ffc10758: 90 1d 00 40 stw r0,64(r29)
}
IMFS_update_atime( the_jnode );
return copied;
}
ffc1075c: 80 01 00 44 lwz r0,68(r1)
ffc10760: 83 01 00 20 lwz r24,32(r1)
ffc10764: 7c 08 03 a6 mtlr r0
ffc10768: 83 21 00 24 lwz r25,36(r1)
ffc1076c: 83 41 00 28 lwz r26,40(r1)
ffc10770: 83 61 00 2c lwz r27,44(r1)
ffc10774: 83 81 00 30 lwz r28,48(r1)
ffc10778: 83 a1 00 34 lwz r29,52(r1)
ffc1077c: 83 c1 00 38 lwz r30,56(r1)
ffc10780: 83 e1 00 3c lwz r31,60(r1)
ffc10784: 38 21 00 40 addi r1,r1,64
ffc10788: 4e 80 00 20 blr
/*
* 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 )
ffc1078c: 7f 89 d0 40 cmplw cr7,r9,r26
ffc10790: 41 bd fd cc bgt- cr7,ffc1055c <IMFS_memfile_read+0x68>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
ffc10794: 7d 1a 43 78 mr r26,r8
ffc10798: 4b ff fd c8 b ffc10560 <IMFS_memfile_read+0x6c>
* 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;
ffc1079c: 7f 7f db 78 mr r31,r27
ffc107a0: 4b ff fe 34 b ffc105d4 <IMFS_memfile_read+0xe0>
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
ffc107a4: 40 9e 00 0c bne- cr7,ffc107b0 <IMFS_memfile_read+0x2bc> <== NEVER TAKEN
ffc107a8: 7f 88 60 40 cmplw cr7,r8,r12
ffc107ac: 41 9d ff 80 bgt+ cr7,ffc1072c <IMFS_memfile_read+0x238> <== ALWAYS TAKEN
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
ffc107b0: 7d 1a 43 78 mr r26,r8 <== NOT EXECUTED
ffc107b4: 4b ff ff 7c b ffc10730 <IMFS_memfile_read+0x23c> <== NOT EXECUTED
ffc108f0 <IMFS_memfile_remove>:
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
ffc108f0: 94 21 ff d8 stwu r1,-40(r1)
ffc108f4: 7c 08 02 a6 mflr r0
ffc108f8: 93 41 00 10 stw r26,16(r1)
ffc108fc: 7c 7a 1b 78 mr r26,r3
ffc10900: 93 a1 00 1c stw r29,28(r1)
ffc10904: 93 c1 00 20 stw r30,32(r1)
/*
* 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;
ffc10908: 3f c0 00 00 lis r30,0
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
ffc1090c: 90 01 00 2c stw r0,44(r1)
ffc10910: 93 21 00 0c stw r25,12(r1)
ffc10914: 93 61 00 14 stw r27,20(r1)
ffc10918: 93 81 00 18 stw r28,24(r1)
ffc1091c: 93 e1 00 24 stw r31,36(r1)
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
ffc10920: 80 03 00 58 lwz r0,88(r3)
/*
* 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;
ffc10924: 83 be 27 84 lwz r29,10116(r30)
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
ffc10928: 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;
ffc1092c: 57 bd f0 be rlwinm r29,r29,30,2,31
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
ffc10930: 41 9e 00 10 beq- cr7,ffc10940 <IMFS_memfile_remove+0x50>
memfile_free_blocks_in_table( &info->indirect, to_free );
ffc10934: 38 63 00 58 addi r3,r3,88
ffc10938: 7f a4 eb 78 mr r4,r29
ffc1093c: 4b ff ff 25 bl ffc10860 <memfile_free_blocks_in_table>
}
if ( info->doubly_indirect ) {
ffc10940: 81 3a 00 5c lwz r9,92(r26)
ffc10944: 2f 89 00 00 cmpwi cr7,r9,0
ffc10948: 41 9e 00 68 beq- cr7,ffc109b0 <IMFS_memfile_remove+0xc0>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
ffc1094c: 80 1e 27 84 lwz r0,10116(r30)
ffc10950: 54 0b f0 bf rlwinm. r11,r0,30,2,31
ffc10954: 41 82 00 50 beq- ffc109a4 <IMFS_memfile_remove+0xb4> <== NEVER TAKEN
ffc10958: 3f 80 00 00 lis r28,0
ffc1095c: 38 60 00 00 li r3,0
ffc10960: 3b e0 00 00 li r31,0
ffc10964: 3b 9c 27 84 addi r28,r28,10116
ffc10968: 48 00 00 08 b ffc10970 <IMFS_memfile_remove+0x80>
ffc1096c: 81 3a 00 5c lwz r9,92(r26)
if ( info->doubly_indirect[i] ) {
ffc10970: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc10974: 7c 09 18 2e lwzx r0,r9,r3
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++ ) {
ffc10978: 3b ff 00 01 addi r31,r31,1
if ( info->doubly_indirect[i] ) {
memfile_free_blocks_in_table(
ffc1097c: 7c 69 1a 14 add r3,r9,r3
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] ) {
ffc10980: 2f 80 00 00 cmpwi cr7,r0,0
memfile_free_blocks_in_table(
ffc10984: 7f a4 eb 78 mr r4,r29
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] ) {
ffc10988: 41 9e 00 08 beq- cr7,ffc10990 <IMFS_memfile_remove+0xa0><== NEVER TAKEN
memfile_free_blocks_in_table(
ffc1098c: 4b ff fe d5 bl ffc10860 <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++ ) {
ffc10990: 80 1c 00 00 lwz r0,0(r28)
ffc10994: 7f e3 fb 78 mr r3,r31
ffc10998: 54 00 f0 be rlwinm r0,r0,30,2,31
ffc1099c: 7f 80 f8 40 cmplw cr7,r0,r31
ffc109a0: 41 9d ff cc bgt+ cr7,ffc1096c <IMFS_memfile_remove+0x7c>
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 );
ffc109a4: 38 7a 00 5c addi r3,r26,92
ffc109a8: 7f a4 eb 78 mr r4,r29
ffc109ac: 4b ff fe b5 bl ffc10860 <memfile_free_blocks_in_table>
}
if ( info->triply_indirect ) {
ffc109b0: 80 7a 00 60 lwz r3,96(r26)
ffc109b4: 2f 83 00 00 cmpwi cr7,r3,0
ffc109b8: 41 9e 00 b4 beq- cr7,ffc10a6c <IMFS_memfile_remove+0x17c>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
ffc109bc: 80 1e 27 84 lwz r0,10116(r30)
ffc109c0: 54 00 f0 bf rlwinm. r0,r0,30,2,31
ffc109c4: 41 82 00 9c beq- ffc10a60 <IMFS_memfile_remove+0x170> <== NEVER TAKEN
p = (block_p *) info->triply_indirect[i];
ffc109c8: 83 c3 00 00 lwz r30,0(r3)
if ( !p ) /* ensure we have a valid pointer */
ffc109cc: 2f 9e 00 00 cmpwi cr7,r30,0
ffc109d0: 41 9e 00 90 beq- cr7,ffc10a60 <IMFS_memfile_remove+0x170><== NEVER TAKEN
ffc109d4: 3f 80 00 00 lis r28,0
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
ffc109d8: 3b 20 00 00 li r25,0
if ( !p ) /* ensure we have a valid pointer */
ffc109dc: 3b 60 00 00 li r27,0
ffc109e0: 3b 9c 27 84 addi r28,r28,10116
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
ffc109e4: 2f 80 00 00 cmpwi cr7,r0,0
ffc109e8: 41 9e 00 44 beq- cr7,ffc10a2c <IMFS_memfile_remove+0x13c><== NEVER TAKEN
ffc109ec: 38 60 00 00 li r3,0
ffc109f0: 3b e0 00 00 li r31,0
if ( p[j] ) {
ffc109f4: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc109f8: 7c 1e 18 2e lwzx r0,r30,r3
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++ ) {
ffc109fc: 3b ff 00 01 addi r31,r31,1
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
ffc10a00: 7c 7e 1a 14 add r3,r30,r3
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++ ) {
if ( p[j] ) {
ffc10a04: 2f 80 00 00 cmpwi cr7,r0,0
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
ffc10a08: 7f a4 eb 78 mr r4,r29
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++ ) {
if ( p[j] ) {
ffc10a0c: 41 9e 00 08 beq- cr7,ffc10a14 <IMFS_memfile_remove+0x124><== NEVER TAKEN
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
ffc10a10: 4b ff fe 51 bl ffc10860 <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++ ) {
ffc10a14: 80 1c 00 00 lwz r0,0(r28)
ffc10a18: 7f e3 fb 78 mr r3,r31
ffc10a1c: 54 00 f0 be rlwinm r0,r0,30,2,31
ffc10a20: 7f 9f 00 40 cmplw cr7,r31,r0
ffc10a24: 41 9c ff d0 blt+ cr7,ffc109f4 <IMFS_memfile_remove+0x104>
ffc10a28: 80 7a 00 60 lwz r3,96(r26)
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
ffc10a2c: 7c 63 ca 14 add r3,r3,r25
ffc10a30: 7f a4 eb 78 mr r4,r29
ffc10a34: 4b ff fe 2d bl ffc10860 <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++ ) {
ffc10a38: 80 1c 00 00 lwz r0,0(r28)
ffc10a3c: 3b 7b 00 01 addi r27,r27,1
ffc10a40: 54 00 f0 be rlwinm r0,r0,30,2,31
ffc10a44: 7f 80 d8 40 cmplw cr7,r0,r27
ffc10a48: 40 9d 00 18 ble- cr7,ffc10a60 <IMFS_memfile_remove+0x170>
p = (block_p *) info->triply_indirect[i];
ffc10a4c: 80 7a 00 60 lwz r3,96(r26)
if ( !p ) /* ensure we have a valid pointer */
ffc10a50: 57 79 10 3a rlwinm r25,r27,2,0,29
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
ffc10a54: 7f c3 c8 2e lwzx r30,r3,r25
if ( !p ) /* ensure we have a valid pointer */
ffc10a58: 2f 9e 00 00 cmpwi cr7,r30,0
ffc10a5c: 40 9e ff 88 bne+ cr7,ffc109e4 <IMFS_memfile_remove+0xf4><== ALWAYS TAKEN
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
ffc10a60: 38 7a 00 60 addi r3,r26,96
ffc10a64: 7f a4 eb 78 mr r4,r29
ffc10a68: 4b ff fd f9 bl ffc10860 <memfile_free_blocks_in_table>
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
ffc10a6c: 80 01 00 2c lwz r0,44(r1)
ffc10a70: 38 60 00 00 li r3,0
ffc10a74: 83 21 00 0c lwz r25,12(r1)
ffc10a78: 7c 08 03 a6 mtlr r0
ffc10a7c: 83 41 00 10 lwz r26,16(r1)
ffc10a80: 83 61 00 14 lwz r27,20(r1)
ffc10a84: 83 81 00 18 lwz r28,24(r1)
ffc10a88: 83 a1 00 1c lwz r29,28(r1)
ffc10a8c: 83 c1 00 20 lwz r30,32(r1)
ffc10a90: 83 e1 00 24 lwz r31,36(r1)
ffc10a94: 38 21 00 28 addi r1,r1,40
ffc10a98: 4e 80 00 20 blr
ffc10cac <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
ffc10cac: 94 21 ff c0 stwu r1,-64(r1)
ffc10cb0: 7c 08 02 a6 mflr r0
ffc10cb4: 92 e1 00 1c stw r23,28(r1)
ffc10cb8: 7c f7 3b 78 mr r23,r7
ffc10cbc: 93 81 00 30 stw r28,48(r1)
ffc10cc0: 7c bc 2b 78 mr r28,r5
ffc10cc4: 93 a1 00 34 stw r29,52(r1)
ffc10cc8: 7d 1d 43 78 mr r29,r8
ffc10ccc: 93 c1 00 38 stw r30,56(r1)
ffc10cd0: 7c de 33 78 mr r30,r6
/*
* 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;
ffc10cd4: 7c c8 32 14 add r6,r8,r6
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
ffc10cd8: 93 e1 00 3c stw r31,60(r1)
ffc10cdc: 7c 7f 1b 78 mr r31,r3
ffc10ce0: 90 01 00 44 stw r0,68(r1)
ffc10ce4: 93 01 00 20 stw r24,32(r1)
ffc10ce8: 93 21 00 24 stw r25,36(r1)
ffc10cec: 93 41 00 28 stw r26,40(r1)
ffc10cf0: 93 61 00 2c stw r27,44(r1)
* 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 ) {
ffc10cf4: 80 03 00 50 lwz r0,80(r3)
ffc10cf8: 2f 80 00 00 cmpwi cr7,r0,0
ffc10cfc: 41 9c 01 b8 blt- cr7,ffc10eb4 <IMFS_memfile_write+0x208><== NEVER TAKEN
ffc10d00: 41 9e 01 a8 beq- cr7,ffc10ea8 <IMFS_memfile_write+0x1fc><== ALWAYS TAKEN
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc10d04: 3f 40 00 00 lis r26,0
ffc10d08: 83 7a 27 84 lwz r27,10116(r26)
ffc10d0c: 7f 83 e3 78 mr r3,r28
ffc10d10: 7f c4 f3 78 mr r4,r30
ffc10d14: 7f 79 fe 70 srawi r25,r27,31
ffc10d18: 7f 25 cb 78 mr r5,r25
ffc10d1c: 7f 66 db 78 mr r6,r27
ffc10d20: 48 00 57 39 bl ffc16458 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc10d24: 7f 83 e3 78 mr r3,r28
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc10d28: 7c 98 23 78 mr r24,r4
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ffc10d2c: 7f 25 cb 78 mr r5,r25
ffc10d30: 7f c4 f3 78 mr r4,r30
ffc10d34: 7f 66 db 78 mr r6,r27
ffc10d38: 48 00 53 09 bl ffc16040 <__divdi3>
if ( start_offset ) {
ffc10d3c: 2f 98 00 00 cmpwi cr7,r24,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;
ffc10d40: 7c 9e 23 78 mr r30,r4
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
rtems_set_errno_and_return_minus_one( ENOSPC );
}
copied = 0;
ffc10d44: 3b 80 00 00 li r28,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 ) {
ffc10d48: 40 9e 00 8c bne- cr7,ffc10dd4 <IMFS_memfile_write+0x128>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ffc10d4c: 7f 9d d8 40 cmplw cr7,r29,r27
ffc10d50: 40 bc 00 20 bge+ cr7,ffc10d70 <IMFS_memfile_write+0xc4>
ffc10d54: 48 00 00 cc b ffc10e20 <IMFS_memfile_write+0x174>
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
ffc10d58: 80 63 00 00 lwz r3,0(r3)
* 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(
ffc10d5c: 7f 9c da 14 add r28,r28,r27
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
ffc10d60: 48 00 1f 75 bl ffc12cd4 <memcpy>
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ffc10d64: 80 1a 27 84 lwz r0,10116(r26)
ffc10d68: 7f 80 e8 40 cmplw cr7,r0,r29
ffc10d6c: 41 9d 00 b4 bgt- cr7,ffc10e20 <IMFS_memfile_write+0x174>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ffc10d70: 7f c4 f3 78 mr r4,r30
ffc10d74: 38 a0 00 00 li r5,0
ffc10d78: 7f e3 fb 78 mr r3,r31
ffc10d7c: 4b ff f5 15 bl ffc10290 <IMFS_memfile_get_block_pointer>
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
block++;
my_length -= to_copy;
ffc10d80: 7f bb e8 50 subf r29,r27,r29
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
ffc10d84: 2c 03 00 00 cmpwi r3,0
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 );
ffc10d88: 7e e4 bb 78 mr r4,r23
ffc10d8c: 7f 65 db 78 mr r5,r27
src += to_copy;
ffc10d90: 7e f7 da 14 add r23,r23,r27
block++;
ffc10d94: 3b de 00 01 addi r30,r30,1
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
ffc10d98: 40 82 ff c0 bne+ ffc10d58 <IMFS_memfile_write+0xac> <== ALWAYS TAKEN
ffc10d9c: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
ffc10da0: 80 01 00 44 lwz r0,68(r1)
ffc10da4: 82 e1 00 1c lwz r23,28(r1)
ffc10da8: 7c 08 03 a6 mtlr r0
ffc10dac: 83 01 00 20 lwz r24,32(r1)
ffc10db0: 83 21 00 24 lwz r25,36(r1)
ffc10db4: 83 41 00 28 lwz r26,40(r1)
ffc10db8: 83 61 00 2c lwz r27,44(r1)
ffc10dbc: 83 81 00 30 lwz r28,48(r1)
ffc10dc0: 83 a1 00 34 lwz r29,52(r1)
ffc10dc4: 83 c1 00 38 lwz r30,56(r1)
ffc10dc8: 83 e1 00 3c lwz r31,60(r1)
ffc10dcc: 38 21 00 40 addi r1,r1,64
ffc10dd0: 4e 80 00 20 blr
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ffc10dd4: 7f e3 fb 78 mr r3,r31
ffc10dd8: 38 a0 00 00 li r5,0
ffc10ddc: 4b ff f4 b5 bl ffc10290 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
ffc10de0: 7c 69 1b 79 mr. r9,r3
return copied;
ffc10de4: 38 60 00 00 li r3,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 )
ffc10de8: 41 a2 ff b8 beq- ffc10da0 <IMFS_memfile_write+0xf4> <== 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;
ffc10dec: 7f 98 d8 50 subf r28,r24,r27
ffc10df0: 7f 9c e8 40 cmplw cr7,r28,r29
ffc10df4: 41 9d 00 e8 bgt- cr7,ffc10edc <IMFS_memfile_write+0x230>
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
ffc10df8: 80 69 00 00 lwz r3,0(r9)
ffc10dfc: 7e e4 bb 78 mr r4,r23
ffc10e00: 7f 85 e3 78 mr r5,r28
ffc10e04: 7c 63 c2 14 add r3,r3,r24
ffc10e08: 48 00 1e cd bl ffc12cd4 <memcpy>
src += to_copy;
ffc10e0c: 7e f7 e2 14 add r23,r23,r28
block++;
ffc10e10: 3b de 00 01 addi r30,r30,1
my_length -= to_copy;
copied += to_copy;
ffc10e14: 83 7a 27 84 lwz r27,10116(r26)
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
block++;
my_length -= to_copy;
ffc10e18: 7f bc e8 50 subf r29,r28,r29
ffc10e1c: 4b ff ff 30 b ffc10d4c <IMFS_memfile_write+0xa0>
* 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 ) {
ffc10e20: 2f 9d 00 00 cmpwi cr7,r29,0
ffc10e24: 41 9e 00 34 beq- cr7,ffc10e58 <IMFS_memfile_write+0x1ac>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ffc10e28: 7f e3 fb 78 mr r3,r31
ffc10e2c: 7f c4 f3 78 mr r4,r30
ffc10e30: 38 a0 00 00 li r5,0
ffc10e34: 4b ff f4 5d bl ffc10290 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
ffc10e38: 7c 69 1b 79 mr. r9,r3
ffc10e3c: 7f 83 e3 78 mr r3,r28
ffc10e40: 41 a2 ff 60 beq- ffc10da0 <IMFS_memfile_write+0xf4> <== 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 );
ffc10e44: 80 69 00 00 lwz r3,0(r9)
ffc10e48: 7e e4 bb 78 mr r4,r23
ffc10e4c: 7f a5 eb 78 mr r5,r29
ffc10e50: 48 00 1e 85 bl ffc12cd4 <memcpy>
my_length = 0;
copied += to_copy;
ffc10e54: 7f 9c ea 14 add r28,r28,r29
}
IMFS_mtime_ctime_update( the_jnode );
ffc10e58: 38 61 00 08 addi r3,r1,8
ffc10e5c: 38 80 00 00 li r4,0
ffc10e60: 4b ff 3d 61 bl ffc04bc0 <gettimeofday>
ffc10e64: 80 01 00 08 lwz r0,8(r1)
return copied;
ffc10e68: 7f 83 e3 78 mr r3,r28
}
ffc10e6c: 82 e1 00 1c lwz r23,28(r1)
memcpy( &(*block_ptr)[ 0 ], src, my_length );
my_length = 0;
copied += to_copy;
}
IMFS_mtime_ctime_update( the_jnode );
ffc10e70: 90 1f 00 44 stw r0,68(r31)
ffc10e74: 90 1f 00 48 stw r0,72(r31)
return copied;
}
ffc10e78: 80 01 00 44 lwz r0,68(r1)
ffc10e7c: 83 01 00 20 lwz r24,32(r1)
ffc10e80: 7c 08 03 a6 mtlr r0
ffc10e84: 83 21 00 24 lwz r25,36(r1)
ffc10e88: 83 41 00 28 lwz r26,40(r1)
ffc10e8c: 83 61 00 2c lwz r27,44(r1)
ffc10e90: 83 81 00 30 lwz r28,48(r1)
ffc10e94: 83 a1 00 34 lwz r29,52(r1)
ffc10e98: 83 c1 00 38 lwz r30,56(r1)
ffc10e9c: 83 e1 00 3c lwz r31,60(r1)
ffc10ea0: 38 21 00 40 addi r1,r1,64
ffc10ea4: 4e 80 00 20 blr
* 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 ) {
ffc10ea8: 80 03 00 54 lwz r0,84(r3)
ffc10eac: 7f 80 30 40 cmplw cr7,r0,r6
ffc10eb0: 40 9c fe 54 bge+ cr7,ffc10d04 <IMFS_memfile_write+0x58> <== NEVER TAKEN
status = IMFS_memfile_extend( the_jnode, last_byte );
ffc10eb4: 7f e3 fb 78 mr r3,r31
ffc10eb8: 38 a0 00 00 li r5,0
ffc10ebc: 4b ff fc 1d bl ffc10ad8 <IMFS_memfile_extend>
if ( status )
ffc10ec0: 2f 83 00 00 cmpwi cr7,r3,0
ffc10ec4: 41 9e fe 40 beq+ cr7,ffc10d04 <IMFS_memfile_write+0x58>
rtems_set_errno_and_return_minus_one( ENOSPC );
ffc10ec8: 48 00 11 ad bl ffc12074 <__errno>
ffc10ecc: 38 00 00 1c li r0,28
ffc10ed0: 90 03 00 00 stw r0,0(r3)
ffc10ed4: 38 60 ff ff li r3,-1
ffc10ed8: 4b ff fe c8 b ffc10da0 <IMFS_memfile_write+0xf4>
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
ffc10edc: 80 69 00 00 lwz r3,0(r9)
* 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;
ffc10ee0: 7f bc eb 78 mr r28,r29
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
ffc10ee4: 7e e4 bb 78 mr r4,r23
ffc10ee8: 7c 63 c2 14 add r3,r3,r24
ffc10eec: 7f 85 e3 78 mr r5,r28
ffc10ef0: 48 00 1d e5 bl ffc12cd4 <memcpy>
src += to_copy;
ffc10ef4: 7e f7 e2 14 add r23,r23,r28
block++;
ffc10ef8: 3b de 00 01 addi r30,r30,1
my_length -= to_copy;
copied += to_copy;
ffc10efc: 83 7a 27 84 lwz r27,10116(r26)
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
block++;
my_length -= to_copy;
ffc10f00: 7f bc e8 50 subf r29,r28,r29
ffc10f04: 4b ff fe 48 b ffc10d4c <IMFS_memfile_write+0xa0>
ffc041e0 <IMFS_mount>:
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
ffc041e0: 7c 08 02 a6 mflr r0
ffc041e4: 94 21 ff f8 stwu r1,-8(r1)
ffc041e8: 90 01 00 0c stw r0,12(r1)
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
ffc041ec: 81 23 00 08 lwz r9,8(r3)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
ffc041f0: 80 09 00 4c lwz r0,76(r9)
ffc041f4: 2f 80 00 01 cmpwi cr7,r0,1
ffc041f8: 40 9e 00 1c bne- cr7,ffc04214 <IMFS_mount+0x34> <== NEVER TAKEN
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
ffc041fc: 90 69 00 5c stw r3,92(r9)
return 0;
ffc04200: 38 60 00 00 li r3,0
}
ffc04204: 80 01 00 0c lwz r0,12(r1)
ffc04208: 38 21 00 08 addi r1,r1,8
ffc0420c: 7c 08 03 a6 mtlr r0
ffc04210: 4e 80 00 20 blr
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
ffc04214: 48 00 de 61 bl ffc12074 <__errno> <== NOT EXECUTED
ffc04218: 38 00 00 14 li r0,20 <== NOT EXECUTED
ffc0421c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
ffc04220: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc04224: 4b ff ff e0 b ffc04204 <IMFS_mount+0x24> <== NOT EXECUTED
ffc07264 <IMFS_print_jnode>:
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
ffc07264: 94 21 ff f0 stwu r1,-16(r1)
ffc07268: 7c 08 02 a6 mflr r0
ffc0726c: 93 c1 00 08 stw r30,8(r1)
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
ffc07270: 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
)
{
ffc07274: 90 01 00 14 stw r0,20(r1)
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
ffc07278: 81 3e 27 70 lwz r9,10096(r30)
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
ffc0727c: 93 e1 00 0c stw r31,12(r1)
ffc07280: 7c 7f 1b 78 mr r31,r3
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
ffc07284: 38 63 00 0c addi r3,r3,12
ffc07288: 80 89 00 08 lwz r4,8(r9)
ffc0728c: 48 01 09 85 bl ffc17c10 <fputs>
switch( the_jnode->type ) {
ffc07290: 80 bf 00 4c lwz r5,76(r31)
ffc07294: 2b 85 00 07 cmplwi cr7,r5,7
ffc07298: 40 9d 00 34 ble- cr7,ffc072cc <IMFS_print_jnode+0x68> <== ALWAYS TAKEN
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
ffc0729c: 81 3e 27 70 lwz r9,10096(r30) <== NOT EXECUTED
ffc072a0: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED
ffc072a4: 38 84 9c d4 addi r4,r4,-25388 <== NOT EXECUTED
ffc072a8: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED
ffc072ac: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc072b0: 48 01 07 5d bl ffc17a0c <fprintf> <== NOT EXECUTED
return;
}
puts("");
}
ffc072b4: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED
ffc072b8: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED
ffc072bc: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc072c0: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED
ffc072c4: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED
ffc072c8: 4e 80 00 20 blr <== NOT EXECUTED
)
{
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
ffc072cc: 3d 20 ff c3 lis r9,-61
ffc072d0: 39 29 9c 5c addi r9,r9,-25508
ffc072d4: 54 a0 10 3a rlwinm r0,r5,2,0,29
ffc072d8: 7c 09 00 2e lwzx r0,r9,r0
ffc072dc: 7d 20 4a 14 add r9,r0,r9
ffc072e0: 7d 29 03 a6 mtctr r9
ffc072e4: 4e 80 04 20 bctr
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
ffc072e8: 81 3e 27 70 lwz r9,10096(r30)
ffc072ec: 3c 60 ff c3 lis r3,-61
ffc072f0: 38 63 9c ac addi r3,r3,-25428
ffc072f4: 80 c9 00 08 lwz r6,8(r9)
ffc072f8: 38 80 00 01 li r4,1
ffc072fc: 38 a0 00 13 li r5,19
ffc07300: 48 01 17 61 bl ffc18a60 <fwrite>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
ffc07304: 80 01 00 14 lwz r0,20(r1)
ffc07308: 83 c1 00 08 lwz r30,8(r1)
ffc0730c: 7c 08 03 a6 mtlr r0
ffc07310: 83 e1 00 0c lwz r31,12(r1)
ffc07314: 38 21 00 10 addi r1,r1,16
ffc07318: 4e 80 00 20 blr
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
ffc0731c: 81 3e 27 70 lwz r9,10096(r30)
ffc07320: 3c 60 ff c3 lis r3,-61
ffc07324: 38 63 9c c0 addi r3,r3,-25408
ffc07328: 80 c9 00 08 lwz r6,8(r9)
ffc0732c: 38 80 00 01 li r4,1
ffc07330: 38 a0 00 12 li r5,18
ffc07334: 48 01 17 2d bl ffc18a60 <fwrite>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
ffc07338: 80 01 00 14 lwz r0,20(r1)
ffc0733c: 83 c1 00 08 lwz r30,8(r1)
ffc07340: 7c 08 03 a6 mtlr r0
ffc07344: 83 e1 00 0c lwz r31,12(r1)
ffc07348: 38 21 00 10 addi r1,r1,16
ffc0734c: 4e 80 00 20 blr
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
ffc07350: 81 3e 27 70 lwz r9,10096(r30)
ffc07354: 3c 80 ff c3 lis r4,-61
ffc07358: 80 bf 00 54 lwz r5,84(r31)
ffc0735c: 38 84 9c a0 addi r4,r4,-25440
ffc07360: 80 69 00 08 lwz r3,8(r9)
ffc07364: 4c c6 31 82 crclr 4*cr1+eq
ffc07368: 48 01 06 a5 bl ffc17a0c <fprintf>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
ffc0736c: 3c 60 ff c3 lis r3,-61
ffc07370: 38 63 8e c4 addi r3,r3,-28988
ffc07374: 48 01 29 65 bl ffc19cd8 <puts>
}
ffc07378: 80 01 00 14 lwz r0,20(r1)
ffc0737c: 83 c1 00 08 lwz r30,8(r1)
ffc07380: 7c 08 03 a6 mtlr r0
ffc07384: 83 e1 00 0c lwz r31,12(r1)
ffc07388: 38 21 00 10 addi r1,r1,16
ffc0738c: 4e 80 00 20 blr
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
ffc07390: 81 3e 27 70 lwz r9,10096(r30)
ffc07394: 3c 80 ff c3 lis r4,-61
ffc07398: 80 bf 00 54 lwz r5,84(r31)
ffc0739c: 38 84 9c 90 addi r4,r4,-25456
ffc073a0: 80 69 00 08 lwz r3,8(r9)
ffc073a4: 80 df 00 58 lwz r6,88(r31)
ffc073a8: 4c c6 31 82 crclr 4*cr1+eq
ffc073ac: 48 01 06 61 bl ffc17a0c <fprintf>
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
ffc073b0: 4b ff ff bc b ffc0736c <IMFS_print_jnode+0x108>
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
ffc073b4: 81 3e 27 70 lwz r9,10096(r30)
ffc073b8: 38 60 00 2f li r3,47
ffc073bc: 80 89 00 08 lwz r4,8(r9)
ffc073c0: 48 01 07 35 bl ffc17af4 <fputc>
break;
ffc073c4: 4b ff ff a8 b ffc0736c <IMFS_print_jnode+0x108>
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
ffc073c8: 81 3e 27 70 lwz r9,10096(r30)
ffc073cc: 3c 80 ff c3 lis r4,-61
ffc073d0: 80 bf 00 50 lwz r5,80(r31)
ffc073d4: 38 84 9c 7c addi r4,r4,-25476
ffc073d8: 80 69 00 08 lwz r3,8(r9)
ffc073dc: 80 df 00 54 lwz r6,84(r31)
ffc073e0: 4c c6 31 82 crclr 4*cr1+eq
ffc073e4: 48 01 06 29 bl ffc17a0c <fprintf>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
ffc073e8: 4b ff ff 84 b ffc0736c <IMFS_print_jnode+0x108>
ffc04284 <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 */
)
{
ffc04284: 94 21 ff e0 stwu r1,-32(r1)
ffc04288: 7c 08 02 a6 mflr r0
ffc0428c: 90 01 00 24 stw r0,36(r1)
ffc04290: 93 e1 00 1c stw r31,28(r1)
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
ffc04294: 83 e4 00 00 lwz r31,0(r4)
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
ffc04298: 7c c4 33 78 mr r4,r6
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 */
)
{
ffc0429c: 93 c1 00 18 stw r30,24(r1)
ffc042a0: 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 );
ffc042a4: 38 7f 00 0c addi r3,r31,12
ffc042a8: 38 a0 00 20 li r5,32
ffc042ac: 48 00 f0 f5 bl ffc133a0 <strncpy>
if ( the_jnode->Parent != NULL )
ffc042b0: 80 1f 00 08 lwz r0,8(r31)
ffc042b4: 2f 80 00 00 cmpwi cr7,r0,0
ffc042b8: 41 9e 00 0c beq- cr7,ffc042c4 <IMFS_rename+0x40> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
ffc042bc: 7f e3 fb 78 mr r3,r31
ffc042c0: 48 00 58 79 bl ffc09b38 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
ffc042c4: 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 );
ffc042c8: 7f e4 fb 78 mr r4,r31
the_jnode->Parent = new_parent;
ffc042cc: 90 7f 00 08 stw r3,8(r31)
ffc042d0: 38 63 00 50 addi r3,r3,80
ffc042d4: 48 00 58 35 bl ffc09b08 <_Chain_Append>
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
ffc042d8: 38 61 00 08 addi r3,r1,8
ffc042dc: 38 80 00 00 li r4,0
ffc042e0: 48 00 08 e1 bl ffc04bc0 <gettimeofday>
ffc042e4: 80 01 00 08 lwz r0,8(r1)
return 0;
}
ffc042e8: 38 60 00 00 li r3,0
ffc042ec: 83 c1 00 18 lwz r30,24(r1)
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
ffc042f0: 90 1f 00 48 stw r0,72(r31)
return 0;
}
ffc042f4: 80 01 00 24 lwz r0,36(r1)
ffc042f8: 83 e1 00 1c lwz r31,28(r1)
ffc042fc: 38 21 00 20 addi r1,r1,32
ffc04300: 7c 08 03 a6 mtlr r0
ffc04304: 4e 80 00 20 blr
ffc0e6f0 <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
ffc0e6f0: 94 21 ff f0 stwu r1,-16(r1)
ffc0e6f4: 7c 08 02 a6 mflr r0
ffc0e6f8: 90 01 00 14 stw r0,20(r1)
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
ffc0e6fc: 81 23 00 00 lwz r9,0(r3)
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
ffc0e700: 93 e1 00 0c stw r31,12(r1)
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
ffc0e704: 80 09 00 4c lwz r0,76(r9)
ffc0e708: 2b 80 00 07 cmplwi cr7,r0,7
ffc0e70c: 40 9d 00 28 ble- cr7,ffc0e734 <IMFS_stat+0x44> <== ALWAYS TAKEN
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
ffc0e710: 48 00 39 65 bl ffc12074 <__errno>
ffc0e714: 38 00 00 86 li r0,134
ffc0e718: 90 03 00 00 stw r0,0(r3)
ffc0e71c: 38 60 ff ff li r3,-1
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
ffc0e720: 80 01 00 14 lwz r0,20(r1)
ffc0e724: 83 e1 00 0c lwz r31,12(r1)
ffc0e728: 38 21 00 10 addi r1,r1,16
ffc0e72c: 7c 08 03 a6 mtlr r0
ffc0e730: 4e 80 00 20 blr
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
ffc0e734: 3d 60 ff c2 lis r11,-62
ffc0e738: 39 6b 8f d4 addi r11,r11,-28716
ffc0e73c: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0e740: 7c 0b 00 2e lwzx r0,r11,r0
ffc0e744: 7d 60 5a 14 add r11,r0,r11
ffc0e748: 7d 69 03 a6 mtctr r11
ffc0e74c: 4e 80 04 20 bctr
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
ffc0e750: 39 60 00 00 li r11,0
ffc0e754: 39 80 00 00 li r12,0
ffc0e758: 91 64 00 20 stw r11,32(r4)
ffc0e75c: 91 84 00 24 stw r12,36(r4)
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
ffc0e760: 81 63 00 10 lwz r11,16(r3)
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
ffc0e764: 38 60 00 00 li r3,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;
ffc0e768: 80 09 00 48 lwz r0,72(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 =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
ffc0e76c: 81 6b 00 34 lwz r11,52(r11)
buf->st_mode = the_jnode->st_mode;
ffc0e770: 81 89 00 30 lwz r12,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 =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
ffc0e774: 83 eb 00 00 lwz r31,0(r11)
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
ffc0e778: a0 a9 00 34 lhz r5,52(r9)
buf->st_ino = the_jnode->st_ino;
ffc0e77c: 80 c9 00 38 lwz r6,56(r9)
buf->st_uid = the_jnode->st_uid;
ffc0e780: a0 e9 00 3c lhz r7,60(r9)
buf->st_gid = the_jnode->st_gid;
ffc0e784: a1 09 00 3e lhz r8,62(r9)
buf->st_atime = the_jnode->stat_atime;
ffc0e788: 81 49 00 40 lwz r10,64(r9)
buf->st_mtime = the_jnode->stat_mtime;
ffc0e78c: 81 69 00 44 lwz r11,68(r9)
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
ffc0e790: 39 20 00 00 li r9,0
buf->st_ctime = the_jnode->stat_ctime;
ffc0e794: 90 04 00 38 stw r0,56(r4)
ffc0e798: 61 29 ff fe ori r9,r9,65534
return 0;
}
ffc0e79c: 80 01 00 14 lwz r0,20(r1)
/*
* 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 =
ffc0e7a0: 93 e4 00 04 stw r31,4(r4)
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
ffc0e7a4: 7c 08 03 a6 mtlr r0
ffc0e7a8: 83 e1 00 0c lwz r31,12(r1)
ffc0e7ac: 38 21 00 10 addi r1,r1,16
/*
* 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 =
ffc0e7b0: 91 24 00 00 stw r9,0(r4)
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
ffc0e7b4: 91 84 00 0c stw r12,12(r4)
buf->st_nlink = the_jnode->st_nlink;
ffc0e7b8: b0 a4 00 10 sth r5,16(r4)
buf->st_ino = the_jnode->st_ino;
ffc0e7bc: 90 c4 00 08 stw r6,8(r4)
buf->st_uid = the_jnode->st_uid;
ffc0e7c0: b0 e4 00 12 sth r7,18(r4)
buf->st_gid = the_jnode->st_gid;
ffc0e7c4: b1 04 00 14 sth r8,20(r4)
buf->st_atime = the_jnode->stat_atime;
ffc0e7c8: 91 44 00 28 stw r10,40(r4)
buf->st_mtime = the_jnode->stat_mtime;
ffc0e7cc: 91 64 00 30 stw r11,48(r4)
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
ffc0e7d0: 4e 80 00 20 blr
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
ffc0e7d4: 81 69 00 54 lwz r11,84(r9)
ffc0e7d8: 80 09 00 50 lwz r0,80(r9)
ffc0e7dc: 91 64 00 1c stw r11,28(r4)
ffc0e7e0: 90 04 00 18 stw r0,24(r4)
break;
ffc0e7e4: 4b ff ff 7c b ffc0e760 <IMFS_stat+0x70>
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
ffc0e7e8: 81 69 00 50 lwz r11,80(r9)
ffc0e7ec: 81 89 00 54 lwz r12,84(r9)
ffc0e7f0: 91 64 00 20 stw r11,32(r4)
ffc0e7f4: 91 84 00 24 stw r12,36(r4)
break;
ffc0e7f8: 4b ff ff 68 b ffc0e760 <IMFS_stat+0x70>
ffc043c8 <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
ffc043c8: 94 21 ff c8 stwu r1,-56(r1)
ffc043cc: 7c 08 02 a6 mflr r0
ffc043d0: 90 01 00 3c stw r0,60(r1)
ffc043d4: 93 c1 00 30 stw r30,48(r1)
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
ffc043d8: 83 c4 00 00 lwz r30,0(r4)
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
ffc043dc: 93 a1 00 2c stw r29,44(r1)
ffc043e0: 7c 7d 1b 78 mr r29,r3
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
ffc043e4: 80 1e 00 4c lwz r0,76(r30)
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
ffc043e8: 93 e1 00 34 stw r31,52(r1)
ffc043ec: 7c 9f 23 78 mr r31,r4
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
ffc043f0: 2f 80 00 03 cmpwi cr7,r0,3
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
ffc043f4: 93 81 00 28 stw r28,40(r1)
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
ffc043f8: 41 9e 00 3c beq- cr7,ffc04434 <IMFS_unlink+0x6c>
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
ffc043fc: 81 3f 00 08 lwz r9,8(r31)
ffc04400: 7f a3 eb 78 mr r3,r29
ffc04404: 7f e4 fb 78 mr r4,r31
ffc04408: 80 09 00 34 lwz r0,52(r9)
ffc0440c: 7c 09 03 a6 mtctr r0
ffc04410: 4e 80 04 21 bctrl
return result;
}
ffc04414: 80 01 00 3c lwz r0,60(r1)
ffc04418: 83 81 00 28 lwz r28,40(r1)
ffc0441c: 7c 08 03 a6 mtlr r0
ffc04420: 83 a1 00 2c lwz r29,44(r1)
ffc04424: 83 c1 00 30 lwz r30,48(r1)
ffc04428: 83 e1 00 34 lwz r31,52(r1)
ffc0442c: 38 21 00 38 addi r1,r1,56
ffc04430: 4e 80 00 20 blr
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
ffc04434: 80 1e 00 50 lwz r0,80(r30)
ffc04438: 2f 80 00 00 cmpwi cr7,r0,0
ffc0443c: 41 9e 00 90 beq- cr7,ffc044cc <IMFS_unlink+0x104> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
the_link.node_access = node->info.hard_link.link_node;
ffc04440: 7c 3c 0b 78 mr r28,r1
ffc04444: 94 1c 00 10 stwu r0,16(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;
ffc04448: 81 64 00 08 lwz r11,8(r4)
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
ffc0444c: 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;
ffc04450: 81 24 00 0c lwz r9,12(r4)
ffc04454: 81 44 00 04 lwz r10,4(r4)
ffc04458: 80 04 00 10 lwz r0,16(r4)
ffc0445c: 91 61 00 18 stw r11,24(r1)
ffc04460: 91 21 00 1c stw r9,28(r1)
ffc04464: 91 41 00 14 stw r10,20(r1)
ffc04468: 90 01 00 20 stw r0,32(r1)
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
ffc0446c: 48 00 94 c5 bl ffc0d930 <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)
ffc04470: 81 3e 00 50 lwz r9,80(r30)
ffc04474: a1 69 00 34 lhz r11,52(r9)
ffc04478: 2f 8b 00 01 cmpwi cr7,r11,1
ffc0447c: 41 9e 00 28 beq- cr7,ffc044a4 <IMFS_unlink+0xdc>
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
ffc04480: 39 6b ff ff addi r11,r11,-1
ffc04484: b1 69 00 34 sth r11,52(r9)
IMFS_update_ctime( node->info.hard_link.link_node );
ffc04488: 38 61 00 08 addi r3,r1,8
ffc0448c: 38 80 00 00 li r4,0
ffc04490: 48 00 07 31 bl ffc04bc0 <gettimeofday>
ffc04494: 81 3e 00 50 lwz r9,80(r30)
ffc04498: 80 01 00 08 lwz r0,8(r1)
ffc0449c: 90 09 00 48 stw r0,72(r9)
ffc044a0: 4b ff ff 5c b ffc043fc <IMFS_unlink+0x34>
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
ffc044a4: 81 21 00 18 lwz r9,24(r1)
ffc044a8: 7f a3 eb 78 mr r3,r29
ffc044ac: 7f 84 e3 78 mr r4,r28
ffc044b0: 80 09 00 34 lwz r0,52(r9)
ffc044b4: 7c 09 03 a6 mtctr r0
ffc044b8: 4e 80 04 21 bctrl
if ( result != 0 )
ffc044bc: 2f 83 00 00 cmpwi cr7,r3,0
return -1;
ffc044c0: 38 60 ff ff li r3,-1
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
if ( result != 0 )
ffc044c4: 41 9e ff 38 beq+ cr7,ffc043fc <IMFS_unlink+0x34>
ffc044c8: 4b ff ff 4c b ffc04414 <IMFS_unlink+0x4c>
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
ffc044cc: 48 00 db a9 bl ffc12074 <__errno> <== NOT EXECUTED
ffc044d0: 38 00 00 16 li r0,22 <== NOT EXECUTED
ffc044d4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
ffc044d8: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc044dc: 4b ff ff 38 b ffc04414 <IMFS_unlink+0x4c> <== NOT EXECUTED
ffc044e0 <IMFS_unmount>:
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
ffc044e0: 7c 08 02 a6 mflr r0
ffc044e4: 94 21 ff f8 stwu r1,-8(r1)
ffc044e8: 90 01 00 0c stw r0,12(r1)
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
ffc044ec: 81 23 00 08 lwz r9,8(r3)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
ffc044f0: 80 09 00 4c lwz r0,76(r9)
ffc044f4: 2f 80 00 01 cmpwi cr7,r0,1
ffc044f8: 40 9e 00 2c bne- cr7,ffc04524 <IMFS_unmount+0x44> <== NEVER TAKEN
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
ffc044fc: 80 09 00 5c lwz r0,92(r9)
ffc04500: 2f 80 00 00 cmpwi cr7,r0,0
ffc04504: 41 9e 00 34 beq- cr7,ffc04538 <IMFS_unmount+0x58> <== NEVER TAKEN
/*
* Set the mt_fs pointer to indicate that there is no longer
* a file system mounted to this point.
*/
node->info.directory.mt_fs = NULL;
ffc04508: 38 00 00 00 li r0,0
ffc0450c: 90 09 00 5c stw r0,92(r9)
return 0;
ffc04510: 38 60 00 00 li r3,0
}
ffc04514: 80 01 00 0c lwz r0,12(r1)
ffc04518: 38 21 00 08 addi r1,r1,8
ffc0451c: 7c 08 03 a6 mtlr r0
ffc04520: 4e 80 00 20 blr
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
ffc04524: 48 00 db 51 bl ffc12074 <__errno> <== NOT EXECUTED
ffc04528: 38 00 00 14 li r0,20 <== NOT EXECUTED
ffc0452c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
ffc04530: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc04534: 4b ff ff e0 b ffc04514 <IMFS_unmount+0x34> <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
ffc04538: 48 00 db 3d bl ffc12074 <__errno> <== NOT EXECUTED
ffc0453c: 38 00 00 16 li r0,22 <== NOT EXECUTED
ffc04540: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
ffc04544: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc04548: 4b ff ff cc b ffc04514 <IMFS_unmount+0x34> <== NOT EXECUTED
ffc04dfc <RTEMS_Malloc_Initialize>:
)
{
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
ffc04dfc: 3d 20 00 00 lis r9,0
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
ffc04e00: 94 21 ff e8 stwu r1,-24(r1)
ffc04e04: 7c 08 02 a6 mflr r0
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
ffc04e08: 81 29 27 48 lwz r9,10056(r9)
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
ffc04e0c: 93 a1 00 0c stw r29,12(r1)
ffc04e10: 7c 9d 23 78 mr r29,r4
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
ffc04e14: 2f 89 00 00 cmpwi cr7,r9,0
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
ffc04e18: 93 c1 00 10 stw r30,16(r1)
ffc04e1c: 7c 7e 1b 78 mr r30,r3
ffc04e20: 93 e1 00 14 stw r31,20(r1)
ffc04e24: 7c bf 2b 78 mr r31,r5
ffc04e28: 90 01 00 1c stw r0,28(r1)
ffc04e2c: 93 81 00 08 stw r28,8(r1)
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
ffc04e30: 41 9e 00 10 beq- cr7,ffc04e40 <RTEMS_Malloc_Initialize+0x44>
(*rtems_malloc_statistics_helpers->initialize)();
ffc04e34: 80 09 00 00 lwz r0,0(r9)
ffc04e38: 7c 09 03 a6 mtctr r0
ffc04e3c: 4e 80 04 21 bctrl
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
ffc04e40: 4b ff ff 2d bl ffc04d6c <malloc_deferred_frees_initialize>
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
ffc04e44: 3d 20 00 00 lis r9,0
ffc04e48: 81 29 27 4c lwz r9,10060(r9)
ffc04e4c: 2f 89 00 00 cmpwi cr7,r9,0
ffc04e50: 41 9e 00 20 beq- cr7,ffc04e70 <RTEMS_Malloc_Initialize+0x74>
heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
ffc04e54: 80 09 00 00 lwz r0,0(r9)
ffc04e58: 7f c3 f3 78 mr r3,r30
ffc04e5c: 7f e4 fb 78 mr r4,r31
ffc04e60: 7c 09 03 a6 mtctr r0
heap_begin,
sbrk_amount
);
heap_size = (uintptr_t) sbrk_amount;
ffc04e64: 7f fd fb 78 mr r29,r31
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
ffc04e68: 4e 80 04 21 bctrl
ffc04e6c: 7c 7e 1b 78 mr r30,r3
* of the time under UNIX because zero'ing memory when it is first
* given to a process eliminates the chance of a process seeing data
* left over from another process. This would be a security violation.
*/
if (
ffc04e70: 3f 80 00 00 lis r28,0
ffc04e74: 88 1c 27 44 lbz r0,10052(r28)
ffc04e78: 3f e0 00 00 lis r31,0
ffc04e7c: 2f 80 00 00 cmpwi cr7,r0,0
ffc04e80: 40 9e 00 34 bne- cr7,ffc04eb4 <RTEMS_Malloc_Initialize+0xb8>
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
ffc04e84: 3d 20 00 00 lis r9,0
ffc04e88: 88 09 20 f8 lbz r0,8440(r9)
ffc04e8c: 2f 80 00 00 cmpwi cr7,r0,0
ffc04e90: 40 9e 00 5c bne- cr7,ffc04eec <RTEMS_Malloc_Initialize+0xf0>
void *area_begin,
uintptr_t area_size,
uintptr_t page_size
)
{
return _Heap_Initialize( heap, area_begin, area_size, page_size );
ffc04e94: 3f e0 00 00 lis r31,0
ffc04e98: 80 7f 26 dc lwz r3,9948(r31)
ffc04e9c: 7f c4 f3 78 mr r4,r30
ffc04ea0: 7f a5 eb 78 mr r5,r29
ffc04ea4: 38 c0 00 08 li r6,8
ffc04ea8: 48 00 54 fd bl ffc0a3a4 <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
ffc04eac: 2f 83 00 00 cmpwi cr7,r3,0
ffc04eb0: 41 9e 00 5c beq- cr7,ffc04f0c <RTEMS_Malloc_Initialize+0x110>
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
ffc04eb4: 80 7f 26 dc lwz r3,9948(r31)
ffc04eb8: 3f c0 00 00 lis r30,0
ffc04ebc: 83 fe 2a c8 lwz r31,10952(r30)
ffc04ec0: 48 00 62 55 bl ffc0b114 <_Protected_heap_Get_size>
}
ffc04ec4: 80 01 00 1c lwz r0,28(r1)
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
ffc04ec8: 7c 63 fa 14 add r3,r3,r31
}
ffc04ecc: 83 81 00 08 lwz r28,8(r1)
ffc04ed0: 7c 08 03 a6 mtlr r0
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
ffc04ed4: 90 7e 2a c8 stw r3,10952(r30)
}
ffc04ed8: 83 a1 00 0c lwz r29,12(r1)
ffc04edc: 83 c1 00 10 lwz r30,16(r1)
ffc04ee0: 83 e1 00 14 lwz r31,20(r1)
ffc04ee4: 38 21 00 18 addi r1,r1,24
ffc04ee8: 4e 80 00 20 blr
if (
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
) {
memset( heap_begin, 0, heap_size );
ffc04eec: 7f c3 f3 78 mr r3,r30
ffc04ef0: 38 80 00 00 li r4,0
ffc04ef4: 7f a5 eb 78 mr r5,r29
ffc04ef8: 48 00 de bd bl ffc12db4 <memset>
* Unfortunately we cannot use assert if this fails because if this
* has failed we do not have a heap and if we do not have a heap
* STDIO cannot work because there will be no buffers.
*/
if ( !rtems_unified_work_area ) {
ffc04efc: 88 1c 27 44 lbz r0,10052(r28)
ffc04f00: 2f 80 00 00 cmpwi cr7,r0,0
ffc04f04: 41 9e ff 90 beq+ cr7,ffc04e94 <RTEMS_Malloc_Initialize+0x98><== ALWAYS TAKEN
ffc04f08: 4b ff ff ac b ffc04eb4 <RTEMS_Malloc_Initialize+0xb8><== NOT EXECUTED
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
ffc04f0c: 38 60 00 1a li r3,26
ffc04f10: 48 00 47 a9 bl ffc096b8 <rtems_fatal_error_occurred>
ffc03aa0 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
ffc03aa0: 94 21 ff c0 stwu r1,-64(r1)
ffc03aa4: 7c 08 02 a6 mflr r0
ffc03aa8: 90 01 00 44 stw r0,68(r1)
ffc03aac: 93 81 00 30 stw r28,48(r1)
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
ffc03ab0: 81 03 00 b8 lwz r8,184(r3)
size = Stack_check_usable_stack_size(stack);
ffc03ab4: 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);
ffc03ab8: 39 08 00 80 addi r8,r8,128
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
ffc03abc: 93 41 00 28 stw r26,40(r1)
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);
ffc03ac0: 3b 9c ff 80 addi r28,r28,-128
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
ffc03ac4: 39 28 00 80 addi r9,r8,128
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
ffc03ac8: 93 61 00 2c stw r27,44(r1)
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
ffc03acc: 57 8b 00 3a rlwinm r11,r28,0,0,29
ffc03ad0: 7d 69 5a 14 add r11,r9,r11
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
ffc03ad4: 93 a1 00 34 stw r29,52(r1)
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
ffc03ad8: 7f 89 58 40 cmplw cr7,r9,r11
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
ffc03adc: 92 e1 00 1c stw r23,28(r1)
ffc03ae0: 7c 7b 1b 78 mr r27,r3
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;
ffc03ae4: 3b a0 00 00 li r29,0
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
ffc03ae8: 93 01 00 20 stw r24,32(r1)
ffc03aec: 93 21 00 24 stw r25,36(r1)
ffc03af0: 93 c1 00 38 stw r30,56(r1)
ffc03af4: 93 e1 00 3c stw r31,60(r1)
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
ffc03af8: 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;
for (ebase = base + length; base < ebase; base++)
ffc03afc: 40 9c 00 34 bge- cr7,ffc03b30 <Stack_check_Dump_threads_usage+0x90><== NEVER TAKEN
if (*base != U32_PATTERN)
ffc03b00: 81 48 00 80 lwz r10,128(r8)
ffc03b04: 6d 40 5a 5a xoris r0,r10,23130
ffc03b08: 2f 80 a5 a5 cmpwi cr7,r0,-23131
ffc03b0c: 41 9e 00 14 beq- cr7,ffc03b20 <Stack_check_Dump_threads_usage+0x80><== ALWAYS TAKEN
ffc03b10: 48 00 00 f8 b ffc03c08 <Stack_check_Dump_threads_usage+0x168><== NOT EXECUTED
ffc03b14: 80 09 00 00 lwz r0,0(r9)
ffc03b18: 7f 80 50 00 cmpw cr7,r0,r10
ffc03b1c: 40 9e 00 ec bne- cr7,ffc03c08 <Stack_check_Dump_threads_usage+0x168>
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
ffc03b20: 39 29 00 04 addi r9,r9,4
ffc03b24: 7f 8b 48 40 cmplw cr7,r11,r9
ffc03b28: 41 9d ff ec bgt+ cr7,ffc03b14 <Stack_check_Dump_threads_usage+0x74><== 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;
ffc03b2c: 3b a0 00 00 li r29,0 <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
#endif
{
(*print_handler)(
ffc03b30: 82 fb 00 08 lwz r23,8(r27)
ffc03b34: 3f c0 00 00 lis r30,0
ffc03b38: 3b fe 28 50 addi r31,r30,10320
ffc03b3c: 83 3e 28 50 lwz r25,10320(r30)
ffc03b40: 83 1f 00 04 lwz r24,4(r31)
ffc03b44: 38 80 00 05 li r4,5
ffc03b48: 38 a1 00 08 addi r5,r1,8
ffc03b4c: 7e e3 bb 78 mr r3,r23
ffc03b50: 48 00 50 81 bl ffc08bd0 <rtems_object_get_name>
ffc03b54: 3c 80 ff c2 lis r4,-62
ffc03b58: 7c 66 1b 78 mr r6,r3
ffc03b5c: 7f 29 03 a6 mtctr r25
ffc03b60: 38 84 8c e4 addi r4,r4,-29468
ffc03b64: 7e e5 bb 78 mr r5,r23
ffc03b68: 7f 03 c3 78 mr r3,r24
ffc03b6c: 4c c6 31 82 crclr 4*cr1+eq
ffc03b70: 4e 80 04 21 bctrl
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
ffc03b74: 80 db 00 b4 lwz r6,180(r27)
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
ffc03b78: 80 1e 28 50 lwz r0,10320(r30)
ffc03b7c: 3c 80 ff c2 lis r4,-62
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
ffc03b80: 80 bb 00 b8 lwz r5,184(r27)
ffc03b84: 38 c6 ff ff addi r6,r6,-1
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
ffc03b88: 7c 09 03 a6 mtctr r0
ffc03b8c: 80 7f 00 04 lwz r3,4(r31)
ffc03b90: 38 84 8c f4 addi r4,r4,-29452
ffc03b94: 7c c5 32 14 add r6,r5,r6
ffc03b98: 7f 47 d3 78 mr r7,r26
ffc03b9c: 7f 88 e3 78 mr r8,r28
ffc03ba0: 4c c6 31 82 crclr 4*cr1+eq
ffc03ba4: 4e 80 04 21 bctrl
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
ffc03ba8: 80 1f 00 08 lwz r0,8(r31)
ffc03bac: 2f 80 00 00 cmpwi cr7,r0,0
ffc03bb0: 41 9e 00 70 beq- cr7,ffc03c20 <Stack_check_Dump_threads_usage+0x180><== NEVER TAKEN
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
ffc03bb4: 80 1e 28 50 lwz r0,10320(r30)
ffc03bb8: 3c 80 ff c2 lis r4,-62
ffc03bbc: 80 7f 00 04 lwz r3,4(r31)
ffc03bc0: 7f a5 eb 78 mr r5,r29
ffc03bc4: 7c 09 03 a6 mtctr r0
ffc03bc8: 38 84 8d 24 addi r4,r4,-29404
ffc03bcc: 4c c6 31 82 crclr 4*cr1+eq
ffc03bd0: 4e 80 04 21 bctrl
}
}
ffc03bd4: 80 01 00 44 lwz r0,68(r1)
ffc03bd8: 82 e1 00 1c lwz r23,28(r1)
ffc03bdc: 7c 08 03 a6 mtlr r0
ffc03be0: 83 01 00 20 lwz r24,32(r1)
ffc03be4: 83 21 00 24 lwz r25,36(r1)
ffc03be8: 83 41 00 28 lwz r26,40(r1)
ffc03bec: 83 61 00 2c lwz r27,44(r1)
ffc03bf0: 83 81 00 30 lwz r28,48(r1)
ffc03bf4: 83 a1 00 34 lwz r29,52(r1)
ffc03bf8: 83 c1 00 38 lwz r30,56(r1)
ffc03bfc: 83 e1 00 3c lwz r31,60(r1)
ffc03c00: 38 21 00 40 addi r1,r1,64
ffc03c04: 4e 80 00 20 blr
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 )
ffc03c08: 2f 89 00 00 cmpwi cr7,r9,0
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
ffc03c0c: 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 )
ffc03c10: 41 be ff 20 beq- cr7,ffc03b30 <Stack_check_Dump_threads_usage+0x90><== NEVER TAKEN
used = Stack_check_Calculate_used( low, size, high_water_mark );
ffc03c14: 7f a8 e2 14 add r29,r8,r28
ffc03c18: 7f a9 e8 50 subf r29,r9,r29
ffc03c1c: 4b ff ff 14 b ffc03b30 <Stack_check_Dump_threads_usage+0x90>
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
ffc03c20: 80 1e 28 50 lwz r0,10320(r30) <== NOT EXECUTED
ffc03c24: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED
ffc03c28: 80 7f 00 04 lwz r3,4(r31) <== NOT EXECUTED
ffc03c2c: 38 84 8d 14 addi r4,r4,-29420 <== NOT EXECUTED
ffc03c30: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc03c34: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc03c38: 4e 80 04 21 bctrl <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
}
}
ffc03c3c: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED
ffc03c40: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED
ffc03c44: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc03c48: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED
ffc03c4c: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED
ffc03c50: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED
ffc03c54: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED
ffc03c58: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED
ffc03c5c: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED
ffc03c60: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED
ffc03c64: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED
ffc03c68: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED
ffc03c6c: 4e 80 00 20 blr <== NOT EXECUTED
ffc03d48 <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)
{
ffc03d48: 94 21 ff c8 stwu r1,-56(r1)
ffc03d4c: 7c 08 02 a6 mflr r0
ffc03d50: 93 a1 00 2c stw r29,44(r1)
ffc03d54: 7c 7d 1b 78 mr r29,r3
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
char name[32];
printk("BLOWN STACK!!!\n");
ffc03d58: 3c 60 ff c2 lis r3,-62
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
ffc03d5c: 90 01 00 3c stw r0,60(r1)
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
char name[32];
printk("BLOWN STACK!!!\n");
ffc03d60: 38 63 8d 2c addi r3,r3,-29396
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
ffc03d64: 93 c1 00 30 stw r30,48(r1)
ffc03d68: 93 e1 00 34 stw r31,52(r1)
ffc03d6c: 7c 9f 23 78 mr r31,r4
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
ffc03d70: 83 dd 00 b8 lwz r30,184(r29)
char name[32];
printk("BLOWN STACK!!!\n");
ffc03d74: 4c c6 31 82 crclr 4*cr1+eq
ffc03d78: 48 00 20 95 bl ffc05e0c <printk>
printk("task control block: 0x%08" PRIxPTR "\n", running);
ffc03d7c: 3c 60 ff c2 lis r3,-62
ffc03d80: 38 63 8d 3c addi r3,r3,-29380
ffc03d84: 7f a4 eb 78 mr r4,r29
ffc03d88: 4c c6 31 82 crclr 4*cr1+eq
ffc03d8c: 48 00 20 81 bl ffc05e0c <printk>
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
ffc03d90: 80 9d 00 08 lwz r4,8(r29)
ffc03d94: 3c 60 ff c2 lis r3,-62
ffc03d98: 38 63 8d 5c addi r3,r3,-29348
ffc03d9c: 4c c6 31 82 crclr 4*cr1+eq
ffc03da0: 48 00 20 6d bl ffc05e0c <printk>
printk(
ffc03da4: 80 9d 00 0c lwz r4,12(r29)
ffc03da8: 3c 60 ff c2 lis r3,-62
ffc03dac: 38 63 8d 70 addi r3,r3,-29328
ffc03db0: 4c c6 31 82 crclr 4*cr1+eq
ffc03db4: 48 00 20 59 bl ffc05e0c <printk>
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
ffc03db8: 80 7d 00 08 lwz r3,8(r29)
ffc03dbc: 38 a1 00 08 addi r5,r1,8
ffc03dc0: 38 80 00 20 li r4,32
ffc03dc4: 48 00 4e 0d bl ffc08bd0 <rtems_object_get_name>
ffc03dc8: 7c 64 1b 78 mr r4,r3
ffc03dcc: 3c 60 ff c2 lis r3,-62
ffc03dd0: 38 63 8d 84 addi r3,r3,-29308
ffc03dd4: 4c c6 31 82 crclr 4*cr1+eq
ffc03dd8: 48 00 20 35 bl ffc05e0c <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)
ffc03ddc: 80 bd 00 b8 lwz r5,184(r29)
ffc03de0: 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(
ffc03de4: 3c 60 ff c2 lis r3,-62
ffc03de8: 38 63 8d 9c addi r3,r3,-29284
ffc03dec: 7c c5 22 14 add r6,r5,r4
ffc03df0: 4c c6 31 82 crclr 4*cr1+eq
ffc03df4: 48 00 20 19 bl ffc05e0c <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) {
ffc03df8: 2f 9f 00 00 cmpwi cr7,r31,0
ffc03dfc: 41 9e 00 0c beq- cr7,ffc03e08 <Stack_check_report_blown_task+0xc0><== ALWAYS TAKEN
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
ffc03e00: 38 60 00 81 li r3,129
ffc03e04: 48 00 5a 75 bl ffc09878 <rtems_fatal_error_occurred>
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
ffc03e08: 3c 60 ff c2 lis r3,-62
ffc03e0c: 38 63 8d d0 addi r3,r3,-29232
ffc03e10: 38 80 00 80 li r4,128
ffc03e14: 38 be 00 08 addi r5,r30,8
ffc03e18: 38 de 00 88 addi r6,r30,136
ffc03e1c: 4c c6 31 82 crclr 4*cr1+eq
ffc03e20: 48 00 1f ed bl ffc05e0c <printk>
ffc03e24: 4b ff ff dc b ffc03e00 <Stack_check_report_blown_task+0xb8>
ffc098ec <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
ffc098ec: 94 21 ff f0 stwu r1,-16(r1)
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
ffc098f0: 3d 20 00 00 lis r9,0
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
ffc098f4: 7c 08 02 a6 mflr r0
ffc098f8: 93 c1 00 08 stw r30,8(r1)
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
ffc098fc: 3b c9 2d 60 addi r30,r9,11616
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
ffc09900: 3b de 00 04 addi r30,r30,4
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
ffc09904: 93 e1 00 0c stw r31,12(r1)
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
ffc09908: 83 e9 2d 60 lwz r31,11616(r9)
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
ffc0990c: 90 01 00 14 stw r0,20(r1)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
ffc09910: 7f 9f f0 00 cmpw cr7,r31,r30
ffc09914: 41 9e 00 1c beq- cr7,ffc09930 <_API_extensions_Run_postdriver+0x44><== NEVER TAKEN
* Currently all APIs configure this hook so it is always non-NULL.
*/
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
ffc09918: 80 1f 00 08 lwz r0,8(r31)
ffc0991c: 7c 09 03 a6 mtctr r0
ffc09920: 4e 80 04 21 bctrl
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
ffc09924: 83 ff 00 00 lwz r31,0(r31)
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
ffc09928: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0992c: 40 9e ff ec bne+ cr7,ffc09918 <_API_extensions_Run_postdriver+0x2c><== NEVER TAKEN
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
ffc09930: 80 01 00 14 lwz r0,20(r1)
ffc09934: 83 c1 00 08 lwz r30,8(r1)
ffc09938: 7c 08 03 a6 mtlr r0
ffc0993c: 83 e1 00 0c lwz r31,12(r1)
ffc09940: 38 21 00 10 addi r1,r1,16
ffc09944: 4e 80 00 20 blr
ffc09948 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
ffc09948: 94 21 ff e8 stwu r1,-24(r1)
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
ffc0994c: 3d 20 00 00 lis r9,0
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
ffc09950: 7c 08 02 a6 mflr r0
ffc09954: 93 c1 00 10 stw r30,16(r1)
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
ffc09958: 3b c9 2d 60 addi r30,r9,11616
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
ffc0995c: 3b de 00 04 addi r30,r30,4
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
ffc09960: 93 e1 00 14 stw r31,20(r1)
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
ffc09964: 83 e9 2d 60 lwz r31,11616(r9)
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
ffc09968: 90 01 00 1c stw r0,28(r1)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
ffc0996c: 7f 9f f0 00 cmpw cr7,r31,r30
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
ffc09970: 93 a1 00 0c stw r29,12(r1)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
ffc09974: 41 9e 00 28 beq- cr7,ffc0999c <_API_extensions_Run_postswitch+0x54><== NEVER TAKEN
ffc09978: 3f a0 00 00 lis r29,0
ffc0997c: 3b bd 2d 98 addi r29,r29,11672
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
ffc09980: 80 1f 00 0c lwz r0,12(r31)
ffc09984: 80 7d 00 0c lwz r3,12(r29)
ffc09988: 7c 09 03 a6 mtctr r0
ffc0998c: 4e 80 04 21 bctrl
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
ffc09990: 83 ff 00 00 lwz r31,0(r31)
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
ffc09994: 7f 9f f0 00 cmpw cr7,r31,r30
ffc09998: 40 9e ff e8 bne+ cr7,ffc09980 <_API_extensions_Run_postswitch+0x38><== NEVER TAKEN
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
ffc0999c: 80 01 00 1c lwz r0,28(r1)
ffc099a0: 83 a1 00 0c lwz r29,12(r1)
ffc099a4: 7c 08 03 a6 mtlr r0
ffc099a8: 83 c1 00 10 lwz r30,16(r1)
ffc099ac: 83 e1 00 14 lwz r31,20(r1)
ffc099b0: 38 21 00 18 addi r1,r1,24
ffc099b4: 4e 80 00 20 blr
ffc151ec <_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
)
{
ffc151ec: 94 21 ff e0 stwu r1,-32(r1)
ffc151f0: 7c 08 02 a6 mflr r0
/*
* 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)) {
ffc151f4: 7c c9 33 78 mr r9,r6
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
)
{
ffc151f8: 90 01 00 24 stw r0,36(r1)
/*
* 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)) {
ffc151fc: 70 c0 00 03 andi. r0,r6,3
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
ffc15200: 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
)
{
ffc15204: 93 a1 00 14 stw r29,20(r1)
ffc15208: 7c 9d 23 78 mr r29,r4
ffc1520c: 93 e1 00 1c stw r31,28(r1)
ffc15210: 7c 7f 1b 78 mr r31,r3
ffc15214: 93 81 00 10 stw r28,16(r1)
ffc15218: 93 c1 00 18 stw r30,24(r1)
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
ffc1521c: 90 a3 00 44 stw r5,68(r3)
the_message_queue->number_of_pending_messages = 0;
ffc15220: 90 03 00 48 stw r0,72(r3)
the_message_queue->maximum_message_size = maximum_message_size;
ffc15224: 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)) {
ffc15228: 41 82 00 3c beq- ffc15264 <_CORE_message_queue_Initialize+0x78>
allocated_message_size += sizeof(uint32_t);
ffc1522c: 39 26 00 04 addi r9,r6,4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
ffc15230: 55 29 00 3a rlwinm r9,r9,0,0,29
}
if (allocated_message_size < maximum_message_size)
ffc15234: 7f 86 48 40 cmplw cr7,r6,r9
return false;
ffc15238: 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)
ffc1523c: 40 9d 00 28 ble- cr7,ffc15264 <_CORE_message_queue_Initialize+0x78><== ALWAYS TAKEN
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
ffc15240: 80 01 00 24 lwz r0,36(r1)
ffc15244: 7f c3 f3 78 mr r3,r30
ffc15248: 83 81 00 10 lwz r28,16(r1)
ffc1524c: 7c 08 03 a6 mtlr r0
ffc15250: 83 a1 00 14 lwz r29,20(r1)
ffc15254: 83 c1 00 18 lwz r30,24(r1)
ffc15258: 83 e1 00 1c lwz r31,28(r1)
ffc1525c: 38 21 00 20 addi r1,r1,32
ffc15260: 4e 80 00 20 blr
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
ffc15264: 3b 89 00 10 addi r28,r9,16
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
ffc15268: 7c 7c 29 d6 mullw r3,r28,r5
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
return false;
ffc1526c: 3b c0 00 00 li r30,0
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
ffc15270: 7f 83 48 40 cmplw cr7,r3,r9
ffc15274: 41 9c ff cc blt+ cr7,ffc15240 <_CORE_message_queue_Initialize+0x54><== NEVER TAKEN
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
ffc15278: 90 a1 00 08 stw r5,8(r1)
ffc1527c: 48 00 3c 35 bl ffc18eb0 <_Workspace_Allocate>
if (the_message_queue->message_buffers == 0)
ffc15280: 2f 83 00 00 cmpwi cr7,r3,0
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
ffc15284: 7c 64 1b 78 mr r4,r3
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
ffc15288: 90 7f 00 5c stw r3,92(r31)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
ffc1528c: 80 a1 00 08 lwz r5,8(r1)
ffc15290: 41 be ff b0 beq- cr7,ffc15240 <_CORE_message_queue_Initialize+0x54>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
ffc15294: 38 7f 00 60 addi r3,r31,96
ffc15298: 7f 86 e3 78 mr r6,r28
ffc1529c: 48 00 5f bd bl ffc1b258 <_Chain_Initialize>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
ffc152a0: 38 1f 00 50 addi r0,r31,80
Chain_Node *tail = _Chain_Tail( the_chain );
ffc152a4: 39 3f 00 54 addi r9,r31,84
head->next = tail;
head->previous = NULL;
ffc152a8: 93 df 00 54 stw r30,84(r31)
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
ffc152ac: 7f e3 fb 78 mr r3,r31
tail->previous = head;
ffc152b0: 90 1f 00 58 stw r0,88(r31)
ffc152b4: 38 a0 00 80 li r5,128
ffc152b8: 38 c0 00 06 li r6,6
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc152bc: 91 3f 00 50 stw r9,80(r31)
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
ffc152c0: 3b c0 00 01 li r30,1
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
ffc152c4: 80 9d 00 00 lwz r4,0(r29)
ffc152c8: 68 84 00 01 xori r4,r4,1
ffc152cc: 7c 84 00 34 cntlzw r4,r4
ffc152d0: 54 84 d9 7e rlwinm r4,r4,27,5,31
ffc152d4: 48 00 2d a1 bl ffc18074 <_Thread_queue_Initialize>
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
ffc152d8: 80 01 00 24 lwz r0,36(r1)
ffc152dc: 7f c3 f3 78 mr r3,r30
ffc152e0: 83 81 00 10 lwz r28,16(r1)
ffc152e4: 7c 08 03 a6 mtlr r0
ffc152e8: 83 a1 00 14 lwz r29,20(r1)
ffc152ec: 83 c1 00 18 lwz r30,24(r1)
ffc152f0: 83 e1 00 1c lwz r31,28(r1)
ffc152f4: 38 21 00 20 addi r1,r1,32
ffc152f8: 4e 80 00 20 blr
ffc09d58 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
ffc09d58: 94 21 ff d8 stwu r1,-40(r1)
ffc09d5c: 7c 08 02 a6 mflr r0
ffc09d60: 93 c1 00 20 stw r30,32(r1)
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
ffc09d64: 3f c0 00 00 lis r30,0
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
ffc09d68: 90 01 00 2c stw r0,44(r1)
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
ffc09d6c: 80 1e 27 a4 lwz r0,10148(r30)
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
ffc09d70: 93 61 00 14 stw r27,20(r1)
ffc09d74: 7c db 33 78 mr r27,r6
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
ffc09d78: 2f 80 00 00 cmpwi cr7,r0,0
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
ffc09d7c: 93 81 00 18 stw r28,24(r1)
ffc09d80: 7c bc 2b 78 mr r28,r5
ffc09d84: 93 a1 00 1c stw r29,28(r1)
ffc09d88: 7c 9d 23 78 mr r29,r4
ffc09d8c: 93 e1 00 24 stw r31,36(r1)
ffc09d90: 7c 7f 1b 78 mr r31,r3
ffc09d94: 90 e1 00 08 stw r7,8(r1)
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
ffc09d98: 41 9e 00 0c beq- cr7,ffc09da4 <_CORE_mutex_Seize+0x4c>
ffc09d9c: 2f 85 00 00 cmpwi cr7,r5,0
ffc09da0: 40 9e 00 5c bne- cr7,ffc09dfc <_CORE_mutex_Seize+0xa4> <== ALWAYS TAKEN
ffc09da4: 7f e3 fb 78 mr r3,r31
ffc09da8: 38 81 00 08 addi r4,r1,8
ffc09dac: 48 00 5a 75 bl ffc0f820 <_CORE_mutex_Seize_interrupt_trylock>
ffc09db0: 2f 83 00 00 cmpwi cr7,r3,0
ffc09db4: 41 9e 00 24 beq- cr7,ffc09dd8 <_CORE_mutex_Seize+0x80>
ffc09db8: 2f 9c 00 00 cmpwi cr7,r28,0
ffc09dbc: 40 9e 00 60 bne- cr7,ffc09e1c <_CORE_mutex_Seize+0xc4>
ffc09dc0: 80 01 00 08 lwz r0,8(r1)
ffc09dc4: 7c 00 01 24 mtmsr r0
ffc09dc8: 3d 20 00 00 lis r9,0
ffc09dcc: 81 29 2d a4 lwz r9,11684(r9)
ffc09dd0: 38 00 00 01 li r0,1
ffc09dd4: 90 09 00 34 stw r0,52(r9)
}
ffc09dd8: 80 01 00 2c lwz r0,44(r1)
ffc09ddc: 83 61 00 14 lwz r27,20(r1)
ffc09de0: 7c 08 03 a6 mtlr r0
ffc09de4: 83 81 00 18 lwz r28,24(r1)
ffc09de8: 83 a1 00 1c lwz r29,28(r1)
ffc09dec: 83 c1 00 20 lwz r30,32(r1)
ffc09df0: 83 e1 00 24 lwz r31,36(r1)
ffc09df4: 38 21 00 28 addi r1,r1,40
ffc09df8: 4e 80 00 20 blr
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
ffc09dfc: 3d 20 00 00 lis r9,0
ffc09e00: 80 09 27 e8 lwz r0,10216(r9)
ffc09e04: 2b 80 00 01 cmplwi cr7,r0,1
ffc09e08: 40 9d ff 9c ble+ cr7,ffc09da4 <_CORE_mutex_Seize+0x4c>
ffc09e0c: 38 60 00 00 li r3,0
ffc09e10: 38 80 00 00 li r4,0
ffc09e14: 38 a0 00 12 li r5,18
ffc09e18: 48 00 08 95 bl ffc0a6ac <_Internal_error_Occurred>
ffc09e1c: 3d 20 00 00 lis r9,0
ffc09e20: 81 7e 27 a4 lwz r11,10148(r30)
ffc09e24: 81 29 2d a4 lwz r9,11684(r9)
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;
ffc09e28: 38 00 00 01 li r0,1
ffc09e2c: 90 1f 00 30 stw r0,48(r31)
ffc09e30: 38 0b 00 01 addi r0,r11,1
ffc09e34: 93 e9 00 44 stw r31,68(r9)
ffc09e38: 93 a9 00 20 stw r29,32(r9)
ffc09e3c: 90 1e 27 a4 stw r0,10148(r30)
ffc09e40: 80 01 00 08 lwz r0,8(r1)
ffc09e44: 7c 00 01 24 mtmsr r0
ffc09e48: 7f e3 fb 78 mr r3,r31
ffc09e4c: 7f 64 db 78 mr r4,r27
ffc09e50: 4b ff fe 45 bl ffc09c94 <_CORE_mutex_Seize_interrupt_blocking>
}
ffc09e54: 80 01 00 2c lwz r0,44(r1)
ffc09e58: 83 61 00 14 lwz r27,20(r1)
ffc09e5c: 7c 08 03 a6 mtlr r0
ffc09e60: 83 81 00 18 lwz r28,24(r1)
ffc09e64: 83 a1 00 1c lwz r29,28(r1)
ffc09e68: 83 c1 00 20 lwz r30,32(r1)
ffc09e6c: 83 e1 00 24 lwz r31,36(r1)
ffc09e70: 38 21 00 28 addi r1,r1,40
ffc09e74: 4e 80 00 20 blr
ffc0a038 <_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
)
{
ffc0a038: 94 21 ff f0 stwu r1,-16(r1)
ffc0a03c: 7c 08 02 a6 mflr r0
ffc0a040: 93 e1 00 0c stw r31,12(r1)
ffc0a044: 7c 7f 1b 78 mr r31,r3
ffc0a048: 90 01 00 14 stw r0,20(r1)
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
ffc0a04c: 48 00 20 85 bl ffc0c0d0 <_Thread_queue_Dequeue>
ffc0a050: 2f 83 00 00 cmpwi cr7,r3,0
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
ffc0a054: 38 60 00 00 li r3,0
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
ffc0a058: 41 9e 00 18 beq- cr7,ffc0a070 <_CORE_semaphore_Surrender+0x38>
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
ffc0a05c: 80 01 00 14 lwz r0,20(r1)
ffc0a060: 83 e1 00 0c lwz r31,12(r1)
ffc0a064: 38 21 00 10 addi r1,r1,16
ffc0a068: 7c 08 03 a6 mtlr r0
ffc0a06c: 4e 80 00 20 blr
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a070: 7c 00 00 a6 mfmsr r0
ffc0a074: 7d 30 42 a6 mfsprg r9,0
ffc0a078: 7c 09 48 78 andc r9,r0,r9
ffc0a07c: 7d 20 01 24 mtmsr r9
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
ffc0a080: 81 3f 00 48 lwz r9,72(r31)
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
ffc0a084: 38 60 00 04 li r3,4
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
ffc0a088: 81 7f 00 40 lwz r11,64(r31)
ffc0a08c: 7f 89 58 40 cmplw cr7,r9,r11
ffc0a090: 40 9c 00 10 bge- cr7,ffc0a0a0 <_CORE_semaphore_Surrender+0x68><== NEVER TAKEN
the_semaphore->count += 1;
ffc0a094: 39 29 00 01 addi r9,r9,1
ffc0a098: 91 3f 00 48 stw r9,72(r31)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
ffc0a09c: 38 60 00 00 li r3,0
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a0a0: 7c 00 01 24 mtmsr r0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
ffc0a0a4: 80 01 00 14 lwz r0,20(r1)
ffc0a0a8: 83 e1 00 0c lwz r31,12(r1)
ffc0a0ac: 38 21 00 10 addi r1,r1,16
ffc0a0b0: 7c 08 03 a6 mtlr r0
ffc0a0b4: 4e 80 00 20 blr
ffc0f7c8 <_Chain_Initialize>:
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
ffc0f7c8: 2c 05 00 00 cmpwi r5,0
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
ffc0f7cc: 38 00 00 00 li r0,0
size_t node_size
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
ffc0f7d0: 39 43 00 04 addi r10,r3,4
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
ffc0f7d4: 90 03 00 04 stw r0,4(r3)
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
ffc0f7d8: 7c 69 1b 78 mr r9,r3
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
ffc0f7dc: 41 82 00 38 beq- ffc0f814 <_Chain_Initialize+0x4c> <== NEVER TAKEN
ffc0f7e0: 39 05 ff ff addi r8,r5,-1
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
ffc0f7e4: 7c a9 03 a6 mtctr r5
Chain_Node *next = starting_address;
ffc0f7e8: 7c 89 23 78 mr r9,r4
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
ffc0f7ec: 7c 6b 1b 78 mr r11,r3
ffc0f7f0: 48 00 00 0c b ffc0f7fc <_Chain_Initialize+0x34>
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
ffc0f7f4: 7d 2b 4b 78 mr r11,r9
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
ffc0f7f8: 7c 09 03 78 mr r9,r0
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
current->next = next;
ffc0f7fc: 91 2b 00 00 stw r9,0(r11)
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
ffc0f800: 7c 09 32 14 add r0,r9,r6
head->previous = NULL;
while ( count-- ) {
current->next = next;
next->previous = current;
ffc0f804: 91 69 00 04 stw r11,4(r9)
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
ffc0f808: 42 00 ff ec bdnz+ ffc0f7f4 <_Chain_Initialize+0x2c>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
ffc0f80c: 7c c6 41 d6 mullw r6,r6,r8
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
ffc0f810: 7d 24 32 14 add r9,r4,r6
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
ffc0f814: 91 49 00 00 stw r10,0(r9)
tail->previous = current;
ffc0f818: 91 23 00 08 stw r9,8(r3)
}
ffc0f81c: 4e 80 00 20 blr
ffc0881c <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
ffc0881c: 94 21 ff f0 stwu r1,-16(r1)
ffc08820: 7c 08 02 a6 mflr r0
ffc08824: 90 01 00 14 stw r0,20(r1)
ffc08828: 93 e1 00 0c stw r31,12(r1)
ffc0882c: 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 ];
ffc08830: 81 63 01 2c lwz r11,300(r3)
option_set = (rtems_option) the_thread->Wait.option;
ffc08834: 80 c3 00 30 lwz r6,48(r3)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc08838: 7d 40 00 a6 mfmsr r10
ffc0883c: 7c 10 42 a6 mfsprg r0,0
ffc08840: 7d 40 00 78 andc r0,r10,r0
ffc08844: 7c 00 01 24 mtmsr r0
_ISR_Disable( level );
pending_events = api->pending_events;
ffc08848: 81 2b 00 00 lwz r9,0(r11)
event_condition = (rtems_event_set) the_thread->Wait.count;
ffc0884c: 80 03 00 24 lwz r0,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 ) ) {
ffc08850: 7c 08 48 39 and. r8,r0,r9
ffc08854: 41 82 00 b0 beq- ffc08904 <_Event_Surrender+0xe8>
/*
* 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() &&
ffc08858: 3c e0 00 00 lis r7,0
ffc0885c: 38 e7 2d 98 addi r7,r7,11672
ffc08860: 80 a7 00 08 lwz r5,8(r7)
ffc08864: 2f 85 00 00 cmpwi cr7,r5,0
ffc08868: 41 9e 00 10 beq- cr7,ffc08878 <_Event_Surrender+0x5c>
ffc0886c: 80 e7 00 0c lwz r7,12(r7)
ffc08870: 7f 83 38 00 cmpw cr7,r3,r7
ffc08874: 41 9e 00 d0 beq- cr7,ffc08944 <_Event_Surrender+0x128>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_EVENT);
ffc08878: 80 ff 00 10 lwz r7,16(r31)
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
ffc0887c: 70 e5 01 00 andi. r5,r7,256
ffc08880: 41 82 00 6c beq- ffc088ec <_Event_Surrender+0xd0>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
ffc08884: 7f 80 40 00 cmpw cr7,r0,r8
ffc08888: 41 9e 00 0c beq- cr7,ffc08894 <_Event_Surrender+0x78>
ffc0888c: 70 c0 00 02 andi. r0,r6,2
ffc08890: 41 82 00 5c beq- ffc088ec <_Event_Surrender+0xd0> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc08894: 80 ff 00 28 lwz r7,40(r31)
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) );
ffc08898: 7d 29 40 78 andc r9,r9,r8
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
ffc0889c: 38 00 00 00 li r0,0
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
ffc088a0: 91 2b 00 00 stw r9,0(r11)
the_thread->Wait.count = 0;
ffc088a4: 90 1f 00 24 stw r0,36(r31)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc088a8: 91 07 00 00 stw r8,0(r7)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc088ac: 7c 00 00 a6 mfmsr r0
ffc088b0: 7d 40 01 24 mtmsr r10
ffc088b4: 7c 00 01 24 mtmsr r0
_ISR_Flash( level );
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
ffc088b8: 80 1f 00 50 lwz r0,80(r31)
ffc088bc: 2f 80 00 02 cmpwi cr7,r0,2
ffc088c0: 41 9e 00 5c beq- cr7,ffc0891c <_Event_Surrender+0x100>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc088c4: 7d 40 01 24 mtmsr r10
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc088c8: 3c 80 10 03 lis r4,4099
ffc088cc: 7f e3 fb 78 mr r3,r31
ffc088d0: 60 84 ff f8 ori r4,r4,65528
ffc088d4: 48 00 2f 75 bl ffc0b848 <_Thread_Clear_state>
}
return;
}
}
_ISR_Enable( level );
}
ffc088d8: 80 01 00 14 lwz r0,20(r1)
ffc088dc: 83 e1 00 0c lwz r31,12(r1)
ffc088e0: 38 21 00 10 addi r1,r1,16
ffc088e4: 7c 08 03 a6 mtlr r0
ffc088e8: 4e 80 00 20 blr
ffc088ec: 7d 40 01 24 mtmsr r10
ffc088f0: 80 01 00 14 lwz r0,20(r1)
ffc088f4: 83 e1 00 0c lwz r31,12(r1)
ffc088f8: 38 21 00 10 addi r1,r1,16
ffc088fc: 7c 08 03 a6 mtlr r0
ffc08900: 4e 80 00 20 blr
ffc08904: 7d 40 01 24 mtmsr r10
ffc08908: 80 01 00 14 lwz r0,20(r1)
ffc0890c: 83 e1 00 0c lwz r31,12(r1)
ffc08910: 38 21 00 10 addi r1,r1,16
ffc08914: 7c 08 03 a6 mtlr r0
ffc08918: 4e 80 00 20 blr
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
ffc0891c: 38 00 00 03 li r0,3
ffc08920: 90 1f 00 50 stw r0,80(r31)
ffc08924: 7d 40 01 24 mtmsr r10
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
ffc08928: 38 7f 00 48 addi r3,r31,72
ffc0892c: 48 00 48 e1 bl ffc0d20c <_Watchdog_Remove>
ffc08930: 3c 80 10 03 lis r4,4099
ffc08934: 7f e3 fb 78 mr r3,r31
ffc08938: 60 84 ff f8 ori r4,r4,65528
ffc0893c: 48 00 2f 0d bl ffc0b848 <_Thread_Clear_state>
ffc08940: 4b ff ff b0 b ffc088f0 <_Event_Surrender+0xd4>
* 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) ||
ffc08944: 3c e0 00 00 lis r7,0
ffc08948: 80 a7 27 f0 lwz r5,10224(r7)
/*
* 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 ) &&
ffc0894c: 2f 85 00 02 cmpwi cr7,r5,2
ffc08950: 41 9e 00 10 beq- cr7,ffc08960 <_Event_Surrender+0x144> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
ffc08954: 80 a7 27 f0 lwz r5,10224(r7)
* 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) ||
ffc08958: 2f 85 00 01 cmpwi cr7,r5,1
ffc0895c: 40 9e ff 1c bne+ cr7,ffc08878 <_Event_Surrender+0x5c>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
ffc08960: 7f 80 40 00 cmpw cr7,r0,r8
ffc08964: 41 9e 00 0c beq- cr7,ffc08970 <_Event_Surrender+0x154>
ffc08968: 70 c0 00 02 andi. r0,r6,2
ffc0896c: 41 82 00 24 beq- ffc08990 <_Event_Surrender+0x174> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc08970: 80 df 00 28 lwz r6,40(r31)
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
ffc08974: 38 00 00 00 li r0,0
ffc08978: 7d 29 40 78 andc r9,r9,r8
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
ffc0897c: 91 2b 00 00 stw r9,0(r11)
the_thread->Wait.count = 0;
ffc08980: 90 1f 00 24 stw r0,36(r31)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
ffc08984: 38 00 00 03 li r0,3
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc08988: 91 06 00 00 stw r8,0(r6)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
ffc0898c: 90 07 27 f0 stw r0,10224(r7)
ffc08990: 7d 40 01 24 mtmsr r10
ffc08994: 4b ff ff 5c b ffc088f0 <_Event_Surrender+0xd4>
ffc08998 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
ffc08998: 94 21 ff e8 stwu r1,-24(r1)
ffc0899c: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
ffc089a0: 38 81 00 08 addi r4,r1,8
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
ffc089a4: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
ffc089a8: 48 00 33 65 bl ffc0bd0c <_Thread_Get>
switch ( location ) {
ffc089ac: 80 01 00 08 lwz r0,8(r1)
ffc089b0: 2f 80 00 00 cmpwi cr7,r0,0
ffc089b4: 40 9e 00 50 bne- cr7,ffc08a04 <_Event_Timeout+0x6c> <== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc089b8: 7d 20 00 a6 mfmsr r9
ffc089bc: 7d 70 42 a6 mfsprg r11,0
ffc089c0: 7d 2b 58 78 andc r11,r9,r11
ffc089c4: 7d 60 01 24 mtmsr r11
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc089c8: 3d 60 00 00 lis r11,0
return;
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
ffc089cc: 81 6b 2d a4 lwz r11,11684(r11)
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
ffc089d0: 90 03 00 24 stw r0,36(r3)
if ( _Thread_Is_executing( the_thread ) ) {
ffc089d4: 7f 83 58 00 cmpw cr7,r3,r11
ffc089d8: 41 9e 00 3c beq- cr7,ffc08a14 <_Event_Timeout+0x7c>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
ffc089dc: 38 00 00 06 li r0,6
ffc089e0: 90 03 00 34 stw r0,52(r3)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc089e4: 7d 20 01 24 mtmsr r9
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc089e8: 3c 80 10 03 lis r4,4099
ffc089ec: 60 84 ff f8 ori r4,r4,65528
ffc089f0: 48 00 2e 59 bl ffc0b848 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
ffc089f4: 3d 20 00 00 lis r9,0
ffc089f8: 81 69 27 a4 lwz r11,10148(r9)
ffc089fc: 38 0b ff ff addi r0,r11,-1
ffc08a00: 90 09 27 a4 stw r0,10148(r9)
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
ffc08a04: 80 01 00 1c lwz r0,28(r1)
ffc08a08: 38 21 00 18 addi r1,r1,24
ffc08a0c: 7c 08 03 a6 mtlr r0
ffc08a10: 4e 80 00 20 blr
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
ffc08a14: 3d 60 00 00 lis r11,0
ffc08a18: 80 0b 27 f0 lwz r0,10224(r11)
ffc08a1c: 2f 80 00 01 cmpwi cr7,r0,1
ffc08a20: 40 9e ff bc bne+ cr7,ffc089dc <_Event_Timeout+0x44>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
ffc08a24: 38 00 00 02 li r0,2
ffc08a28: 90 0b 27 f0 stw r0,10224(r11)
ffc08a2c: 4b ff ff b0 b ffc089dc <_Event_Timeout+0x44>
ffc0fa0c <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc0fa0c: 94 21 ff e0 stwu r1,-32(r1)
ffc0fa10: 7c 08 02 a6 mflr r0
ffc0fa14: 7d 80 00 26 mfcr r12
ffc0fa18: 7c 89 23 78 mr r9,r4
ffc0fa1c: 90 01 00 24 stw r0,36(r1)
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
ffc0fa20: 38 04 00 04 addi r0,r4,4
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
ffc0fa24: 7f 84 00 40 cmplw cr7,r4,r0
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc0fa28: 93 a1 00 14 stw r29,20(r1)
ffc0fa2c: 7c 7d 1b 78 mr r29,r3
ffc0fa30: 91 81 00 08 stw r12,8(r1)
ffc0fa34: 93 61 00 0c stw r27,12(r1)
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
ffc0fa38: 81 83 00 10 lwz r12,16(r3)
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
/* Integer overflow occured */
return NULL;
ffc0fa3c: 38 60 00 00 li r3,0
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc0fa40: 93 81 00 10 stw r28,16(r1)
ffc0fa44: 93 c1 00 18 stw r30,24(r1)
ffc0fa48: 93 e1 00 1c stw r31,28(r1)
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
ffc0fa4c: 41 9d 01 60 bgt- cr7,ffc0fbac <_Heap_Allocate_aligned_with_boundary+0x1a0>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
ffc0fa50: 2e 06 00 00 cmpwi cr4,r6,0
ffc0fa54: 40 92 01 8c bne- cr4,ffc0fbe0 <_Heap_Allocate_aligned_with_boundary+0x1d4>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
ffc0fa58: 80 9d 00 08 lwz r4,8(r29)
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
ffc0fa5c: 38 60 00 00 li r3,0
ffc0fa60: 7f 9d 20 00 cmpw cr7,r29,r4
ffc0fa64: 41 9e 01 48 beq- cr7,ffc0fbac <_Heap_Allocate_aligned_with_boundary+0x1a0>
ffc0fa68: 3b c0 00 01 li r30,1
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
if ( alignment == 0 ) {
ffc0fa6c: 2c 05 00 00 cmpwi r5,0
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
ffc0fa70: 3b 6c 00 07 addi r27,r12,7
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
ffc0fa74: 23 89 00 04 subfic r28,r9,4
ffc0fa78: 48 00 00 24 b ffc0fa9c <_Heap_Allocate_aligned_with_boundary+0x90>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc0fa7c: 3b e4 00 08 addi r31,r4,8
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
ffc0fa80: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0fa84: 40 9e 00 ec bne- cr7,ffc0fb70 <_Heap_Allocate_aligned_with_boundary+0x164><== ALWAYS TAKEN
break;
}
block = block->next;
ffc0fa88: 80 84 00 08 lwz r4,8(r4)
ffc0fa8c: 39 7e 00 01 addi r11,r30,1
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
ffc0fa90: 7f 9d 20 00 cmpw cr7,r29,r4
ffc0fa94: 41 9e 01 44 beq- cr7,ffc0fbd8 <_Heap_Allocate_aligned_with_boundary+0x1cc>
ffc0fa98: 7d 7e 5b 78 mr r30,r11
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
ffc0fa9c: 81 64 00 04 lwz r11,4(r4)
ffc0faa0: 7f 80 58 40 cmplw cr7,r0,r11
ffc0faa4: 40 bc ff e4 bge- cr7,ffc0fa88 <_Heap_Allocate_aligned_with_boundary+0x7c>
if ( alignment == 0 ) {
ffc0faa8: 41 a2 ff d4 beq- ffc0fa7c <_Heap_Allocate_aligned_with_boundary+0x70>
- 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;
ffc0faac: 55 6b 00 3c rlwinm r11,r11,0,0,30
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
ffc0fab0: 80 fd 00 14 lwz r7,20(r29)
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
ffc0fab4: 7d 64 5a 14 add r11,r4,r11
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
ffc0fab8: 7f fc 5a 14 add r31,r28,r11
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc0fabc: 7f ff 2b 96 divwu r31,r31,r5
ffc0fac0: 7f ff 29 d6 mullw r31,r31,r5
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
ffc0fac4: 7d 47 d8 50 subf r10,r7,r27
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
ffc0fac8: 7d 6a 5a 14 add r11,r10,r11
uintptr_t alloc_begin = alloc_end - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
ffc0facc: 7f 8b f8 40 cmplw cr7,r11,r31
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc0fad0: 38 64 00 08 addi r3,r4,8
ffc0fad4: 40 9c 00 0c bge- cr7,ffc0fae0 <_Heap_Allocate_aligned_with_boundary+0xd4>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc0fad8: 7d 6b 2b 96 divwu r11,r11,r5
ffc0fadc: 7f eb 29 d6 mullw r31,r11,r5
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
ffc0fae0: 41 92 00 60 beq- cr4,ffc0fb40 <_Heap_Allocate_aligned_with_boundary+0x134>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
ffc0fae4: 7d 5f 4a 14 add r10,r31,r9
ffc0fae8: 7d 6a 33 96 divwu r11,r10,r6
ffc0faec: 7d 6b 31 d6 mullw r11,r11,r6
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
ffc0faf0: 7f 9f 58 40 cmplw cr7,r31,r11
ffc0faf4: 40 9c 00 4c bge- cr7,ffc0fb40 <_Heap_Allocate_aligned_with_boundary+0x134>
ffc0faf8: 7f 8a 58 40 cmplw cr7,r10,r11
ffc0fafc: 40 9d 00 44 ble- cr7,ffc0fb40 <_Heap_Allocate_aligned_with_boundary+0x134>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
ffc0fb00: 7d 03 4a 14 add r8,r3,r9
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
ffc0fb04: 7f 88 58 40 cmplw cr7,r8,r11
ffc0fb08: 40 bd 00 10 ble+ cr7,ffc0fb18 <_Heap_Allocate_aligned_with_boundary+0x10c>
ffc0fb0c: 4b ff ff 7c b ffc0fa88 <_Heap_Allocate_aligned_with_boundary+0x7c>
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
ffc0fb10: 40 99 00 30 ble- cr6,ffc0fb40 <_Heap_Allocate_aligned_with_boundary+0x134>
if ( boundary_line < boundary_floor ) {
ffc0fb14: 41 a5 ff 74 bgt- cr1,ffc0fa88 <_Heap_Allocate_aligned_with_boundary+0x7c><== NEVER TAKEN
return 0;
}
alloc_begin = boundary_line - alloc_size;
ffc0fb18: 7f e9 58 50 subf r31,r9,r11
ffc0fb1c: 7f ff 2b 96 divwu r31,r31,r5
ffc0fb20: 7f ff 29 d6 mullw r31,r31,r5
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
ffc0fb24: 7d 5f 4a 14 add r10,r31,r9
ffc0fb28: 7d 6a 33 96 divwu r11,r10,r6
ffc0fb2c: 7d 6b 31 d6 mullw r11,r11,r6
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
ffc0fb30: 7f 9f 58 40 cmplw cr7,r31,r11
ffc0fb34: 7f 0a 58 40 cmplw cr6,r10,r11
if ( boundary_line < boundary_floor ) {
ffc0fb38: 7c 88 58 40 cmplw cr1,r8,r11
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
ffc0fb3c: 41 9c ff d4 blt+ cr7,ffc0fb10 <_Heap_Allocate_aligned_with_boundary+0x104>
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
ffc0fb40: 7f 83 f8 40 cmplw cr7,r3,r31
ffc0fb44: 41 bd ff 44 bgt- cr7,ffc0fa88 <_Heap_Allocate_aligned_with_boundary+0x7c>
ffc0fb48: 7d 7f 63 96 divwu r11,r31,r12
ffc0fb4c: 7d 6b 61 d6 mullw r11,r11,r12
ffc0fb50: 21 44 ff f8 subfic r10,r4,-8
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
ffc0fb54: 7d 6a 5a 14 add r11,r10,r11
if ( free_size >= min_block_size || free_size == 0 ) {
ffc0fb58: 7f 87 58 40 cmplw cr7,r7,r11
ffc0fb5c: 40 bd ff 24 ble- cr7,ffc0fa80 <_Heap_Allocate_aligned_with_boundary+0x74>
ffc0fb60: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0fb64: 40 be ff 24 bne- cr7,ffc0fa88 <_Heap_Allocate_aligned_with_boundary+0x7c>
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
ffc0fb68: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0fb6c: 41 9e ff 1c beq+ cr7,ffc0fa88 <_Heap_Allocate_aligned_with_boundary+0x7c><== NEVER TAKEN
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
ffc0fb70: 81 7d 00 48 lwz r11,72(r29)
stats->searches += search_count;
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
ffc0fb74: 7f a3 eb 78 mr r3,r29
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
stats->searches += search_count;
ffc0fb78: 80 1d 00 4c lwz r0,76(r29)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
ffc0fb7c: 7f e5 fb 78 mr r5,r31
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
ffc0fb80: 39 6b 00 01 addi r11,r11,1
stats->searches += search_count;
ffc0fb84: 7c 00 f2 14 add r0,r0,r30
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
ffc0fb88: 91 7d 00 48 stw r11,72(r29)
stats->searches += search_count;
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
ffc0fb8c: 7d 26 4b 78 mr r6,r9
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
stats->searches += search_count;
ffc0fb90: 90 1d 00 4c stw r0,76(r29)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
ffc0fb94: 4b ff a9 bd bl ffc0a550 <_Heap_Block_allocate>
ffc0fb98: 7f e3 fb 78 mr r3,r31
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
ffc0fb9c: 80 1d 00 44 lwz r0,68(r29)
ffc0fba0: 7f 80 f0 40 cmplw cr7,r0,r30
ffc0fba4: 40 9c 00 08 bge- cr7,ffc0fbac <_Heap_Allocate_aligned_with_boundary+0x1a0>
stats->max_search = search_count;
ffc0fba8: 93 dd 00 44 stw r30,68(r29)
}
return (void *) alloc_begin;
}
ffc0fbac: 80 01 00 24 lwz r0,36(r1)
ffc0fbb0: 81 81 00 08 lwz r12,8(r1)
ffc0fbb4: 7c 08 03 a6 mtlr r0
ffc0fbb8: 83 61 00 0c lwz r27,12(r1)
ffc0fbbc: 83 81 00 10 lwz r28,16(r1)
ffc0fbc0: 7d 80 81 20 mtcrf 8,r12
ffc0fbc4: 83 a1 00 14 lwz r29,20(r1)
ffc0fbc8: 83 c1 00 18 lwz r30,24(r1)
ffc0fbcc: 83 e1 00 1c lwz r31,28(r1)
ffc0fbd0: 38 21 00 20 addi r1,r1,32
ffc0fbd4: 4e 80 00 20 blr
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
ffc0fbd8: 38 60 00 00 li r3,0
ffc0fbdc: 4b ff ff c0 b ffc0fb9c <_Heap_Allocate_aligned_with_boundary+0x190>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
ffc0fbe0: 7f 84 30 40 cmplw cr7,r4,r6
ffc0fbe4: 41 bd ff c8 bgt- cr7,ffc0fbac <_Heap_Allocate_aligned_with_boundary+0x1a0>
return NULL;
}
if ( alignment == 0 ) {
ffc0fbe8: 2f 85 00 00 cmpwi cr7,r5,0
ffc0fbec: 40 be fe 6c bne- cr7,ffc0fa58 <_Heap_Allocate_aligned_with_boundary+0x4c>
alignment = page_size;
ffc0fbf0: 7d 85 63 78 mr r5,r12
ffc0fbf4: 4b ff fe 64 b ffc0fa58 <_Heap_Allocate_aligned_with_boundary+0x4c>
ffc100e8 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
ffc100e8: 94 21 ff c0 stwu r1,-64(r1)
ffc100ec: 7d 80 00 26 mfcr r12
ffc100f0: 7c 08 02 a6 mflr r0
ffc100f4: 93 a1 00 34 stw r29,52(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;
ffc100f8: 7f a4 2a 14 add r29,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 ) {
ffc100fc: 7f 84 e8 40 cmplw cr7,r4,r29
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
ffc10100: 90 01 00 44 stw r0,68(r1)
ffc10104: 93 41 00 28 stw r26,40(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;
ffc10108: 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
)
{
ffc1010c: 93 c1 00 38 stw r30,56(r1)
ffc10110: 7c 7e 1b 78 mr r30,r3
ffc10114: 93 01 00 20 stw r24,32(r1)
ffc10118: 93 21 00 24 stw r25,36(r1)
ffc1011c: 7c d9 33 78 mr r25,r6
ffc10120: 93 61 00 2c stw r27,44(r1)
ffc10124: 93 81 00 30 stw r28,48(r1)
ffc10128: 93 e1 00 3c stw r31,60(r1)
ffc1012c: 7c 9f 23 78 mr r31,r4
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
ffc10130: 83 63 00 20 lwz r27,32(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 ) {
return false;
ffc10134: 38 60 00 00 li r3,0
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
ffc10138: 92 e1 00 1c stw r23,28(r1)
ffc1013c: 91 81 00 18 stw r12,24(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;
ffc10140: 93 41 00 08 stw r26,8(r1)
Heap_Block *extend_last_block = NULL;
ffc10144: 93 41 00 0c stw r26,12(r1)
uintptr_t const page_size = heap->page_size;
ffc10148: 83 9e 00 10 lwz r28,16(r30)
uintptr_t const min_block_size = heap->min_block_size;
ffc1014c: 80 de 00 14 lwz r6,20(r30)
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;
ffc10150: 83 1e 00 30 lwz r24,48(r30)
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
ffc10154: 40 9d 00 40 ble- cr7,ffc10194 <_Heap_Extend+0xac>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
ffc10158: 80 01 00 44 lwz r0,68(r1)
ffc1015c: 81 81 00 18 lwz r12,24(r1)
ffc10160: 7c 08 03 a6 mtlr r0
ffc10164: 82 e1 00 1c lwz r23,28(r1)
ffc10168: 83 01 00 20 lwz r24,32(r1)
ffc1016c: 7d 81 81 20 mtcrf 24,r12
ffc10170: 83 21 00 24 lwz r25,36(r1)
ffc10174: 83 41 00 28 lwz r26,40(r1)
ffc10178: 83 61 00 2c lwz r27,44(r1)
ffc1017c: 83 81 00 30 lwz r28,48(r1)
ffc10180: 83 a1 00 34 lwz r29,52(r1)
ffc10184: 83 c1 00 38 lwz r30,56(r1)
ffc10188: 83 e1 00 3c lwz r31,60(r1)
ffc1018c: 38 21 00 40 addi r1,r1,64
ffc10190: 4e 80 00 20 blr
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
ffc10194: 7c 83 23 78 mr r3,r4
ffc10198: 38 e1 00 08 addi r7,r1,8
ffc1019c: 7c a4 2b 78 mr r4,r5
ffc101a0: 39 01 00 0c addi r8,r1,12
ffc101a4: 7f 85 e3 78 mr r5,r28
ffc101a8: 4b ff a5 e1 bl ffc0a788 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
ffc101ac: 2f 83 00 00 cmpwi cr7,r3,0
/* For simplicity we reject extend areas that are too small */
return false;
ffc101b0: 7f 43 d3 78 mr r3,r26
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
ffc101b4: 41 be ff a4 beq- cr7,ffc10158 <_Heap_Extend+0x70>
ffc101b8: 7f 69 db 78 mr r9,r27
ffc101bc: 3a e0 00 00 li r23,0
ffc101c0: 38 00 00 00 li r0,0
ffc101c4: 39 00 00 00 li r8,0
ffc101c8: 48 00 00 44 b ffc1020c <_Heap_Extend+0x124>
return false;
}
if ( extend_area_end == sub_area_begin ) {
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
ffc101cc: 7f 9d 58 40 cmplw cr7,r29,r11
ffc101d0: 40 9c 00 08 bge- cr7,ffc101d8 <_Heap_Extend+0xf0>
ffc101d4: 7d 20 4b 78 mr r0,r9
ffc101d8: 7d 4b e3 96 divwu r10,r11,r28
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
ffc101dc: 7f 8b f8 00 cmpw cr7,r11,r31
ffc101e0: 7d 4a e1 d6 mullw r10,r10,r28
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc101e4: 39 4a ff f8 addi r10,r10,-8
ffc101e8: 41 9e 00 64 beq- cr7,ffc1024c <_Heap_Extend+0x164>
start_block->prev_size = extend_area_end;
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
ffc101ec: 7f 9f 58 40 cmplw cr7,r31,r11
ffc101f0: 40 9d 00 08 ble- cr7,ffc101f8 <_Heap_Extend+0x110>
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 )
ffc101f4: 7d 57 53 78 mr r23,r10
- 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;
ffc101f8: 81 2a 00 04 lwz r9,4(r10)
ffc101fc: 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);
ffc10200: 7d 2a 4a 14 add r9,r10,r9
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
ffc10204: 7f 9b 48 00 cmpw cr7,r27,r9
ffc10208: 41 9e 00 60 beq- cr7,ffc10268 <_Heap_Extend+0x180>
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
ffc1020c: 7f 89 d8 00 cmpw cr7,r9,r27
ffc10210: 7d 2a 4b 78 mr r10,r9
ffc10214: 41 9e 01 b8 beq- cr7,ffc103cc <_Heap_Extend+0x2e4>
uintptr_t const sub_area_end = start_block->prev_size;
ffc10218: 81 69 00 00 lwz r11,0(r9)
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
ffc1021c: 7f 9f 58 40 cmplw cr7,r31,r11
ffc10220: 40 9c 00 0c bge- cr7,ffc1022c <_Heap_Extend+0x144>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
ffc10224: 7f 8a e8 40 cmplw cr7,r10,r29
ffc10228: 41 9c 02 28 blt- cr7,ffc10450 <_Heap_Extend+0x368>
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
ffc1022c: 7f 8a e8 00 cmpw cr7,r10,r29
ffc10230: 40 9e ff 9c bne+ cr7,ffc101cc <_Heap_Extend+0xe4>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc10234: 7d 4b e3 96 divwu r10,r11,r28
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
ffc10238: 7f 8b f8 00 cmpw cr7,r11,r31
ffc1023c: 7d 4a e1 d6 mullw r10,r10,r28
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
ffc10240: 7d 28 4b 78 mr r8,r9
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc10244: 39 4a ff f8 addi r10,r10,-8
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
ffc10248: 40 9e ff a4 bne+ cr7,ffc101ec <_Heap_Extend+0x104> <== ALWAYS TAKEN
start_block->prev_size = extend_area_end;
ffc1024c: 93 a9 00 00 stw r29,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 )
ffc10250: 7d 5a 53 78 mr r26,r10
- 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;
ffc10254: 81 2a 00 04 lwz r9,4(r10)
ffc10258: 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);
ffc1025c: 7d 2a 4a 14 add r9,r10,r9
} else if ( sub_area_end < extend_area_begin ) {
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
ffc10260: 7f 9b 48 00 cmpw cr7,r27,r9
ffc10264: 40 9e ff a8 bne+ cr7,ffc1020c <_Heap_Extend+0x124> <== NEVER TAKEN
if ( extend_area_begin < heap->area_begin ) {
ffc10268: 81 3e 00 18 lwz r9,24(r30)
ffc1026c: 7f 9f 48 40 cmplw cr7,r31,r9
ffc10270: 41 9c 01 64 blt- cr7,ffc103d4 <_Heap_Extend+0x2ec>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
ffc10274: 81 3e 00 1c lwz r9,28(r30)
ffc10278: 7f 9d 48 40 cmplw cr7,r29,r9
ffc1027c: 40 9d 00 08 ble- cr7,ffc10284 <_Heap_Extend+0x19c>
heap->area_end = extend_area_end;
ffc10280: 93 be 00 1c stw r29,28(r30)
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
ffc10284: 81 5e 00 20 lwz r10,32(r30)
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
ffc10288: 81 21 00 08 lwz r9,8(r1)
ffc1028c: 81 61 00 0c lwz r11,12(r1)
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
ffc10290: 7f 8a 48 40 cmplw cr7,r10,r9
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
ffc10294: 93 a9 00 00 stw r29,0(r9)
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
ffc10298: 7d 49 58 50 subf r10,r9,r11
(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;
ffc1029c: 61 47 00 01 ori r7,r10,1
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
ffc102a0: 91 4b 00 00 stw r10,0(r11)
extend_last_block->size_and_flag = 0;
ffc102a4: 39 40 00 00 li r10,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 =
ffc102a8: 90 e9 00 04 stw r7,4(r9)
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;
ffc102ac: 91 4b 00 04 stw r10,4(r11)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
ffc102b0: 40 9d 01 58 ble- cr7,ffc10408 <_Heap_Extend+0x320> <== ALWAYS TAKEN
heap->first_block = extend_first_block;
ffc102b4: 91 3e 00 20 stw r9,32(r30)
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
ffc102b8: 2e 08 00 00 cmpwi cr4,r8,0
ffc102bc: 41 92 01 b0 beq- cr4,ffc1046c <_Heap_Extend+0x384>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
ffc102c0: 80 1e 00 10 lwz r0,16(r30)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
ffc102c4: 3b ff 00 08 addi r31,r31,8
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
ffc102c8: 7d 3f 03 96 divwu r9,r31,r0
ffc102cc: 7d 29 01 d6 mullw r9,r9,r0
if ( remainder != 0 ) {
ffc102d0: 7d 29 f8 51 subf. r9,r9,r31
ffc102d4: 41 82 00 0c beq- ffc102e0 <_Heap_Extend+0x1f8> <== NEVER TAKEN
return value - remainder + alignment;
ffc102d8: 7f ff 02 14 add r31,r31,r0
ffc102dc: 7f e9 f8 50 subf r31,r9,r31
uintptr_t const new_first_block_begin =
ffc102e0: 38 9f ff f8 addi r4,r31,-8
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;
ffc102e4: 81 28 00 00 lwz r9,0(r8)
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 =
ffc102e8: 7c 04 40 50 subf r0,r4,r8
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;
ffc102ec: 60 00 00 01 ori r0,r0,1
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;
ffc102f0: 91 3f ff f8 stw r9,-8(r31)
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
_Heap_Free_block( heap, new_first_block );
ffc102f4: 7f c3 f3 78 mr r3,r30
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;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
ffc102f8: 90 04 00 04 stw r0,4(r4)
_Heap_Free_block( heap, new_first_block );
ffc102fc: 4b ff fd b1 bl ffc100ac <_Heap_Free_block>
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
ffc10300: 2d 9a 00 00 cmpwi cr3,r26,0
ffc10304: 41 8e 01 18 beq- cr3,ffc1041c <_Heap_Extend+0x334>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc10308: 81 3e 00 10 lwz r9,16(r30)
)
{
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,
ffc1030c: 38 1d ff f8 addi r0,r29,-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(
ffc10310: 7c 1a 00 50 subf r0,r26,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)
ffc10314: 81 7a 00 04 lwz r11,4(r26)
ffc10318: 7c 00 4b 96 divwu r0,r0,r9
ffc1031c: 7c 00 49 d6 mullw r0,r0,r9
| HEAP_PREV_BLOCK_USED;
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
ffc10320: 7f c3 f3 78 mr r3,r30
);
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)
ffc10324: 7d 60 58 50 subf r11,r0,r11
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
ffc10328: 7d 20 d2 14 add r9,r0,r26
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
ffc1032c: 61 6b 00 01 ori r11,r11,1
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
ffc10330: 91 69 00 04 stw r11,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 );
ffc10334: 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;
ffc10338: 81 3a 00 04 lwz r9,4(r26)
ffc1033c: 55 29 07 fe clrlwi r9,r9,31
block->size_and_flag = size | flag;
ffc10340: 7c 00 4b 78 or r0,r0,r9
ffc10344: 90 1a 00 04 stw r0,4(r26)
ffc10348: 4b ff fd 65 bl ffc100ac <_Heap_Free_block>
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
ffc1034c: 41 92 01 0c beq- cr4,ffc10458 <_Heap_Extend+0x370>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
ffc10350: 81 3e 00 24 lwz r9,36(r30)
extended_size = stats->free_size - free_size;
/* Statistics */
stats->size += extended_size;
if ( extended_size_ptr != NULL )
ffc10354: 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(
ffc10358: 81 5e 00 20 lwz r10,32(r30)
*extended_size_ptr = extended_size;
return true;
ffc1035c: 38 60 00 01 li r3,1
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;
ffc10360: 81 69 00 04 lwz r11,4(r9)
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
ffc10364: 81 1e 00 30 lwz r8,48(r30)
* 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(
ffc10368: 7d 49 50 50 subf r10,r9,r10
/* Statistics */
stats->size += extended_size;
ffc1036c: 80 1e 00 2c lwz r0,44(r30)
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;
ffc10370: 55 6b 07 fe clrlwi r11,r11,31
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
ffc10374: 7f 18 40 50 subf r24,r24,r8
block->size_and_flag = size | flag;
ffc10378: 7d 4b 5b 78 or r11,r10,r11
/* Statistics */
stats->size += extended_size;
ffc1037c: 7c 00 c2 14 add r0,r0,r24
ffc10380: 91 69 00 04 stw r11,4(r9)
ffc10384: 90 1e 00 2c stw r0,44(r30)
if ( extended_size_ptr != NULL )
ffc10388: 41 be fd d0 beq- cr7,ffc10158 <_Heap_Extend+0x70> <== NEVER TAKEN
*extended_size_ptr = extended_size;
return true;
}
ffc1038c: 80 01 00 44 lwz r0,68(r1)
ffc10390: 81 81 00 18 lwz r12,24(r1)
ffc10394: 7c 08 03 a6 mtlr r0
/* Statistics */
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
ffc10398: 93 19 00 00 stw r24,0(r25)
return true;
}
ffc1039c: 7d 81 81 20 mtcrf 24,r12
ffc103a0: 82 e1 00 1c lwz r23,28(r1)
ffc103a4: 83 01 00 20 lwz r24,32(r1)
ffc103a8: 83 21 00 24 lwz r25,36(r1)
ffc103ac: 83 41 00 28 lwz r26,40(r1)
ffc103b0: 83 61 00 2c lwz r27,44(r1)
ffc103b4: 83 81 00 30 lwz r28,48(r1)
ffc103b8: 83 a1 00 34 lwz r29,52(r1)
ffc103bc: 83 c1 00 38 lwz r30,56(r1)
ffc103c0: 83 e1 00 3c lwz r31,60(r1)
ffc103c4: 38 21 00 40 addi r1,r1,64
ffc103c8: 4e 80 00 20 blr
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
ffc103cc: 81 5e 00 18 lwz r10,24(r30)
ffc103d0: 4b ff fe 48 b ffc10218 <_Heap_Extend+0x130>
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
ffc103d4: 81 5e 00 20 lwz r10,32(r30)
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
ffc103d8: 81 21 00 08 lwz r9,8(r1)
ffc103dc: 81 61 00 0c lwz r11,12(r1)
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
ffc103e0: 7f 8a 48 40 cmplw cr7,r10,r9
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
heap->area_begin = extend_area_begin;
ffc103e4: 93 fe 00 18 stw r31,24(r30)
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
ffc103e8: 7d 49 58 50 subf r10,r9,r11
(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;
ffc103ec: 61 47 00 01 ori r7,r10,1
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
ffc103f0: 93 a9 00 00 stw r29,0(r9)
extend_first_block->size_and_flag =
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;
ffc103f4: 91 4b 00 00 stw r10,0(r11)
extend_last_block->size_and_flag = 0;
ffc103f8: 39 40 00 00 li r10,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 =
ffc103fc: 90 e9 00 04 stw r7,4(r9)
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;
ffc10400: 91 4b 00 04 stw r10,4(r11)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
ffc10404: 41 bd fe b0 bgt- cr7,ffc102b4 <_Heap_Extend+0x1cc> <== ALWAYS TAKEN
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
ffc10408: 81 3e 00 24 lwz r9,36(r30)
ffc1040c: 7f 89 58 40 cmplw cr7,r9,r11
ffc10410: 40 bc fe a8 bge- cr7,ffc102b8 <_Heap_Extend+0x1d0>
heap->last_block = extend_last_block;
ffc10414: 91 7e 00 24 stw r11,36(r30)
ffc10418: 4b ff fe a0 b ffc102b8 <_Heap_Extend+0x1d0>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
ffc1041c: 2f 97 00 00 cmpwi cr7,r23,0
ffc10420: 41 be ff 2c beq- cr7,ffc1034c <_Heap_Extend+0x264>
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;
ffc10424: 81 37 00 04 lwz r9,4(r23)
)
{
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 );
ffc10428: 80 01 00 08 lwz r0,8(r1)
ffc1042c: 55 29 07 fe clrlwi r9,r9,31
ffc10430: 7c 17 00 50 subf r0,r23,r0
block->size_and_flag = size | flag;
ffc10434: 7c 00 4b 78 or r0,r0,r9
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
_Heap_Link_above(
ffc10438: 81 21 00 0c lwz r9,12(r1)
ffc1043c: 90 17 00 04 stw r0,4(r23)
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 );
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
ffc10440: 80 09 00 04 lwz r0,4(r9)
ffc10444: 60 00 00 01 ori r0,r0,1
ffc10448: 90 09 00 04 stw r0,4(r9)
ffc1044c: 4b ff ff 00 b ffc1034c <_Heap_Extend+0x264>
_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;
ffc10450: 38 60 00 00 li r3,0
ffc10454: 4b ff fd 04 b ffc10158 <_Heap_Extend+0x70>
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
ffc10458: 40 8e fe f8 bne+ cr3,ffc10350 <_Heap_Extend+0x268>
_Heap_Free_block( heap, extend_first_block );
ffc1045c: 80 81 00 08 lwz r4,8(r1)
ffc10460: 7f c3 f3 78 mr r3,r30
ffc10464: 4b ff fc 49 bl ffc100ac <_Heap_Free_block>
ffc10468: 4b ff fe e8 b ffc10350 <_Heap_Extend+0x268>
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 ) {
ffc1046c: 2f 80 00 00 cmpwi cr7,r0,0
ffc10470: 41 be fe 90 beq- cr7,ffc10300 <_Heap_Extend+0x218>
{
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;
ffc10474: 7c 0b 00 50 subf r0,r11,r0
ffc10478: 60 00 00 01 ori r0,r0,1
)
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
ffc1047c: 90 0b 00 04 stw r0,4(r11)
ffc10480: 4b ff fe 80 b ffc10300 <_Heap_Extend+0x218>
ffc0fbf8 <_Heap_Free>:
/*
* 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 ) {
ffc0fbf8: 2c 04 00 00 cmpwi r4,0
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
ffc0fbfc: 94 21 ff f0 stwu r1,-16(r1)
ffc0fc00: 7c 69 1b 78 mr r9,r3
ffc0fc04: 93 e1 00 0c stw r31,12(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;
ffc0fc08: 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 ) {
ffc0fc0c: 41 82 01 44 beq- ffc0fd50 <_Heap_Free+0x158>
ffc0fc10: 80 09 00 10 lwz r0,16(r9)
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 ) ) {
return false;
ffc0fc14: 38 60 00 00 li r3,0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
ffc0fc18: 81 69 00 20 lwz r11,32(r9)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc0fc1c: 7c 84 03 96 divwu r4,r4,r0
ffc0fc20: 7c 84 01 d6 mullw r4,r4,r0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc0fc24: 38 84 ff f8 addi r4,r4,-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;
ffc0fc28: 7f 84 58 40 cmplw cr7,r4,r11
ffc0fc2c: 41 9c 01 24 blt- cr7,ffc0fd50 <_Heap_Free+0x158>
ffc0fc30: 80 09 00 24 lwz r0,36(r9)
ffc0fc34: 7f 84 00 40 cmplw cr7,r4,r0
ffc0fc38: 41 9d 01 18 bgt- cr7,ffc0fd50 <_Heap_Free+0x158>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0fc3c: 81 04 00 04 lwz r8,4(r4)
- 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;
ffc0fc40: 55 07 00 3c rlwinm r7,r8,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);
ffc0fc44: 7d 44 3a 14 add r10,r4,r7
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;
ffc0fc48: 7f 8b 50 40 cmplw cr7,r11,r10
ffc0fc4c: 41 9d 01 04 bgt- cr7,ffc0fd50 <_Heap_Free+0x158> <== NEVER TAKEN
ffc0fc50: 7f 80 50 40 cmplw cr7,r0,r10
ffc0fc54: 41 9c 00 fc blt- cr7,ffc0fd50 <_Heap_Free+0x158> <== NEVER TAKEN
ffc0fc58: 80 ca 00 04 lwz r6,4(r10)
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
ffc0fc5c: 70 c5 00 01 andi. r5,r6,1
ffc0fc60: 41 82 00 f0 beq- ffc0fd50 <_Heap_Free+0x158>
return true;
}
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 ));
ffc0fc64: 7f 80 50 00 cmpw cr7,r0,r10
- 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;
ffc0fc68: 54 c5 00 3c rlwinm r5,r6,0,0,30
ffc0fc6c: 38 c0 00 00 li r6,0
ffc0fc70: 41 9e 00 18 beq- cr7,ffc0fc88 <_Heap_Free+0x90>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0fc74: 7c ca 2a 14 add r6,r10,r5
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;
ffc0fc78: 80 c6 00 04 lwz r6,4(r6)
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
ffc0fc7c: 70 c3 00 01 andi. r3,r6,1
ffc0fc80: 7c c0 00 26 mfcr r6
ffc0fc84: 54 c6 1f fe rlwinm r6,r6,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 ) ) {
ffc0fc88: 71 08 00 01 andi. r8,r8,1
ffc0fc8c: 40 82 00 6c bne- ffc0fcf8 <_Heap_Free+0x100>
uintptr_t const prev_size = block->prev_size;
ffc0fc90: 83 e4 00 00 lwz r31,0(r4)
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
_HAssert( false );
return( false );
ffc0fc94: 38 60 00 00 li r3,0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc0fc98: 7d 9f 20 50 subf r12,r31,r4
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;
ffc0fc9c: 7f 8b 60 40 cmplw cr7,r11,r12
ffc0fca0: 41 9d 00 b0 bgt- cr7,ffc0fd50 <_Heap_Free+0x158> <== NEVER TAKEN
ffc0fca4: 7f 80 60 40 cmplw cr7,r0,r12
ffc0fca8: 7d 03 43 78 mr r3,r8
ffc0fcac: 41 9c 00 a4 blt- cr7,ffc0fd50 <_Heap_Free+0x158> <== 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;
ffc0fcb0: 80 0c 00 04 lwz r0,4(r12)
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
ffc0fcb4: 70 0b 00 01 andi. r11,r0,1
ffc0fcb8: 41 82 00 98 beq- ffc0fd50 <_Heap_Free+0x158> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
ffc0fcbc: 2f 86 00 00 cmpwi cr7,r6,0
ffc0fcc0: 41 9e 00 e8 beq- cr7,ffc0fda8 <_Heap_Free+0x1b0>
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
ffc0fcc4: 81 09 00 38 lwz r8,56(r9)
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
ffc0fcc8: 7c a7 2a 14 add r5,r7,r5
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0fccc: 81 6a 00 08 lwz r11,8(r10)
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
ffc0fcd0: 7f e5 fa 14 add r31,r5,r31
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0fcd4: 81 4a 00 0c lwz r10,12(r10)
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
ffc0fcd8: 39 08 ff ff addi r8,r8,-1
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0fcdc: 63 e0 00 01 ori r0,r31,1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
ffc0fce0: 91 6a 00 08 stw r11,8(r10)
next->prev = prev;
ffc0fce4: 91 4b 00 0c stw r10,12(r11)
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
ffc0fce8: 91 09 00 38 stw r8,56(r9)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0fcec: 90 0c 00 04 stw r0,4(r12)
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
ffc0fcf0: 7f ec f9 2e stwx r31,r12,r31
ffc0fcf4: 48 00 00 34 b ffc0fd28 <_Heap_Free+0x130>
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
ffc0fcf8: 2f 86 00 00 cmpwi cr7,r6,0
ffc0fcfc: 41 9e 00 60 beq- cr7,ffc0fd5c <_Heap_Free+0x164>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0fd00: 81 6a 00 08 lwz r11,8(r10)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
ffc0fd04: 7c a5 3a 14 add r5,r5,r7
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0fd08: 81 4a 00 0c lwz r10,12(r10)
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0fd0c: 60 a0 00 01 ori r0,r5,1
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
ffc0fd10: 91 64 00 08 stw r11,8(r4)
new_block->prev = prev;
ffc0fd14: 91 44 00 0c stw r10,12(r4)
next->prev = new_block;
prev->next = new_block;
ffc0fd18: 90 8a 00 08 stw r4,8(r10)
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
ffc0fd1c: 90 8b 00 0c stw r4,12(r11)
ffc0fd20: 90 04 00 04 stw r0,4(r4)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
ffc0fd24: 7c a4 29 2e stwx r5,r4,r5
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc0fd28: 81 69 00 40 lwz r11,64(r9)
++stats->frees;
stats->free_size += block_size;
return( true );
ffc0fd2c: 38 60 00 01 li r3,1
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
ffc0fd30: 81 09 00 50 lwz r8,80(r9)
stats->free_size += block_size;
ffc0fd34: 81 49 00 30 lwz r10,48(r9)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc0fd38: 39 6b ff ff addi r11,r11,-1
++stats->frees;
ffc0fd3c: 38 08 00 01 addi r0,r8,1
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc0fd40: 91 69 00 40 stw r11,64(r9)
++stats->frees;
stats->free_size += block_size;
ffc0fd44: 7c ea 3a 14 add r7,r10,r7
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
ffc0fd48: 90 09 00 50 stw r0,80(r9)
stats->free_size += block_size;
ffc0fd4c: 90 e9 00 30 stw r7,48(r9)
return( true );
}
ffc0fd50: 83 e1 00 0c lwz r31,12(r1)
ffc0fd54: 38 21 00 10 addi r1,r1,16
ffc0fd58: 4e 80 00 20 blr
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;
ffc0fd5c: 81 09 00 38 lwz r8,56(r9)
if ( stats->max_free_blocks < stats->free_blocks ) {
ffc0fd60: 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;
ffc0fd64: 38 08 00 01 addi r0,r8,1
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
ffc0fd68: 91 24 00 0c stw r9,12(r4)
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
ffc0fd6c: 60 e8 00 01 ori r8,r7,1
ffc0fd70: 91 04 00 04 stw r8,4(r4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
ffc0fd74: 7f 80 58 40 cmplw cr7,r0,r11
} 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;
ffc0fd78: 81 0a 00 04 lwz r8,4(r10)
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
ffc0fd7c: 81 69 00 08 lwz r11,8(r9)
ffc0fd80: 55 08 00 3c rlwinm r8,r8,0,0,30
next_block->prev_size = block_size;
ffc0fd84: 7c e4 39 2e stwx r7,r4,r7
new_block->next = next;
ffc0fd88: 91 64 00 08 stw r11,8(r4)
} 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;
ffc0fd8c: 91 0a 00 04 stw r8,4(r10)
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
ffc0fd90: 90 8b 00 0c stw r4,12(r11)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
ffc0fd94: 90 89 00 08 stw r4,8(r9)
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
ffc0fd98: 90 09 00 38 stw r0,56(r9)
if ( stats->max_free_blocks < stats->free_blocks ) {
ffc0fd9c: 40 bd ff 8c ble- cr7,ffc0fd28 <_Heap_Free+0x130>
stats->max_free_blocks = stats->free_blocks;
ffc0fda0: 90 09 00 3c stw r0,60(r9)
ffc0fda4: 4b ff ff 84 b ffc0fd28 <_Heap_Free+0x130>
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
ffc0fda8: 7f e7 fa 14 add r31,r7,r31
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0fdac: 63 e0 00 01 ori r0,r31,1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
ffc0fdb0: 7f e4 39 2e stwx r31,r4,r7
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;
ffc0fdb4: 90 0c 00 04 stw r0,4(r12)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
ffc0fdb8: 80 0a 00 04 lwz r0,4(r10)
ffc0fdbc: 54 00 00 3c rlwinm r0,r0,0,0,30
ffc0fdc0: 90 0a 00 04 stw r0,4(r10)
ffc0fdc4: 4b ff ff 64 b ffc0fd28 <_Heap_Free+0x130>
ffc0b3d4 <_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;
ffc0b3d4: 2f 85 00 00 cmpwi cr7,r5,0
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
ffc0b3d8: 94 21 ff 98 stwu r1,-104(r1)
ffc0b3dc: 7c 08 02 a6 mflr r0
ffc0b3e0: 92 e1 00 44 stw r23,68(r1)
ffc0b3e4: 90 01 00 6c stw r0,108(r1)
ffc0b3e8: 93 01 00 48 stw r24,72(r1)
ffc0b3ec: 93 21 00 4c stw r25,76(r1)
ffc0b3f0: 7c 99 23 78 mr r25,r4
ffc0b3f4: 93 41 00 50 stw r26,80(r1)
ffc0b3f8: 93 61 00 54 stw r27,84(r1)
ffc0b3fc: 93 e1 00 64 stw r31,100(r1)
ffc0b400: 7c 7f 1b 78 mr r31,r3
ffc0b404: 91 c1 00 20 stw r14,32(r1)
ffc0b408: 91 e1 00 24 stw r15,36(r1)
ffc0b40c: 92 01 00 28 stw r16,40(r1)
ffc0b410: 92 21 00 2c stw r17,44(r1)
ffc0b414: 92 41 00 30 stw r18,48(r1)
ffc0b418: 92 61 00 34 stw r19,52(r1)
ffc0b41c: 92 81 00 38 stw r20,56(r1)
ffc0b420: 92 a1 00 3c stw r21,60(r1)
ffc0b424: 92 c1 00 40 stw r22,64(r1)
ffc0b428: 93 81 00 58 stw r28,88(r1)
ffc0b42c: 93 a1 00 5c stw r29,92(r1)
ffc0b430: 93 c1 00 60 stw r30,96(r1)
uintptr_t const page_size = heap->page_size;
ffc0b434: 83 63 00 10 lwz r27,16(r3)
uintptr_t const min_block_size = heap->min_block_size;
ffc0b438: 83 03 00 14 lwz r24,20(r3)
Heap_Block *const first_block = heap->first_block;
ffc0b43c: 83 43 00 20 lwz r26,32(r3)
Heap_Block *const last_block = heap->last_block;
ffc0b440: 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;
ffc0b444: 41 9e 00 7c beq- cr7,ffc0b4c0 <_Heap_Walk+0xec>
ffc0b448: 3d 20 ff c1 lis r9,-63
ffc0b44c: 39 29 b2 d4 addi r9,r9,-19756
ffc0b450: 91 21 00 18 stw r9,24(r1)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
ffc0b454: 3d 20 00 00 lis r9,0
return true;
ffc0b458: 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() ) ) {
ffc0b45c: 80 09 27 e8 lwz r0,10216(r9)
ffc0b460: 2f 80 00 03 cmpwi cr7,r0,3
ffc0b464: 41 9e 00 7c beq- cr7,ffc0b4e0 <_Heap_Walk+0x10c> <== ALWAYS TAKEN
block = next_block;
} while ( block != first_block );
return true;
}
ffc0b468: 80 01 00 6c lwz r0,108(r1)
ffc0b46c: 81 c1 00 20 lwz r14,32(r1)
ffc0b470: 7c 08 03 a6 mtlr r0
ffc0b474: 81 e1 00 24 lwz r15,36(r1)
ffc0b478: 82 01 00 28 lwz r16,40(r1)
ffc0b47c: 82 21 00 2c lwz r17,44(r1)
ffc0b480: 82 41 00 30 lwz r18,48(r1)
ffc0b484: 82 61 00 34 lwz r19,52(r1)
ffc0b488: 82 81 00 38 lwz r20,56(r1)
ffc0b48c: 82 a1 00 3c lwz r21,60(r1)
ffc0b490: 82 c1 00 40 lwz r22,64(r1)
ffc0b494: 82 e1 00 44 lwz r23,68(r1)
ffc0b498: 83 01 00 48 lwz r24,72(r1)
ffc0b49c: 83 21 00 4c lwz r25,76(r1)
ffc0b4a0: 83 41 00 50 lwz r26,80(r1)
ffc0b4a4: 83 61 00 54 lwz r27,84(r1)
ffc0b4a8: 83 81 00 58 lwz r28,88(r1)
ffc0b4ac: 83 a1 00 5c lwz r29,92(r1)
ffc0b4b0: 83 c1 00 60 lwz r30,96(r1)
ffc0b4b4: 83 e1 00 64 lwz r31,100(r1)
ffc0b4b8: 38 21 00 68 addi r1,r1,104
ffc0b4bc: 4e 80 00 20 blr
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;
ffc0b4c0: 3d 20 ff c1 lis r9,-63
ffc0b4c4: 39 29 b2 d0 addi r9,r9,-19760
ffc0b4c8: 91 21 00 18 stw r9,24(r1)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
ffc0b4cc: 3d 20 00 00 lis r9,0
return true;
ffc0b4d0: 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() ) ) {
ffc0b4d4: 80 09 27 e8 lwz r0,10216(r9)
ffc0b4d8: 2f 80 00 03 cmpwi cr7,r0,3
ffc0b4dc: 40 9e ff 8c bne+ cr7,ffc0b468 <_Heap_Walk+0x94>
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)(
ffc0b4e0: 80 1f 00 0c lwz r0,12(r31)
ffc0b4e4: 3c a0 ff c2 lis r5,-62
ffc0b4e8: 81 1f 00 18 lwz r8,24(r31)
ffc0b4ec: 7f 23 cb 78 mr r3,r25
ffc0b4f0: 81 3f 00 1c lwz r9,28(r31)
ffc0b4f4: 38 80 00 00 li r4,0
ffc0b4f8: 81 7f 00 08 lwz r11,8(r31)
ffc0b4fc: 38 a5 a4 08 addi r5,r5,-23544
ffc0b500: 90 01 00 10 stw r0,16(r1)
ffc0b504: 7f 66 db 78 mr r6,r27
ffc0b508: 7f 07 c3 78 mr r7,r24
ffc0b50c: 80 01 00 18 lwz r0,24(r1)
ffc0b510: 7f 4a d3 78 mr r10,r26
ffc0b514: 92 e1 00 08 stw r23,8(r1)
ffc0b518: 7c 09 03 a6 mtctr r0
ffc0b51c: 91 61 00 0c stw r11,12(r1)
ffc0b520: 4c c6 31 82 crclr 4*cr1+eq
ffc0b524: 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 ) {
ffc0b528: 2f 9b 00 00 cmpwi cr7,r27,0
ffc0b52c: 41 9e 00 ac beq- cr7,ffc0b5d8 <_Heap_Walk+0x204>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
ffc0b530: 73 67 00 07 andi. r7,r27,7
ffc0b534: 40 82 00 cc bne- ffc0b600 <_Heap_Walk+0x22c>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0b538: 7c 18 db 96 divwu r0,r24,r27
ffc0b53c: 7c 00 d9 d6 mullw r0,r0,r27
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
ffc0b540: 7f 98 00 00 cmpw cr7,r24,r0
ffc0b544: 40 9e 00 e8 bne- cr7,ffc0b62c <_Heap_Walk+0x258>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc0b548: 38 1a 00 08 addi r0,r26,8
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0b54c: 7d 20 db 96 divwu r9,r0,r27
ffc0b550: 7d 29 d9 d6 mullw r9,r9,r27
);
return false;
}
if (
ffc0b554: 7f 80 48 00 cmpw cr7,r0,r9
ffc0b558: 40 9e 01 00 bne- cr7,ffc0b658 <_Heap_Walk+0x284>
block = next_block;
} while ( block != first_block );
return true;
}
ffc0b55c: 82 da 00 04 lwz r22,4(r26)
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
ffc0b560: 72 c7 00 01 andi. r7,r22,1
ffc0b564: 41 82 01 68 beq- ffc0b6cc <_Heap_Walk+0x2f8>
- 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;
ffc0b568: 81 37 00 04 lwz r9,4(r23)
ffc0b56c: 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);
ffc0b570: 7d 37 4a 14 add r9,r23,r9
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;
ffc0b574: 80 09 00 04 lwz r0,4(r9)
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
ffc0b578: 70 07 00 01 andi. r7,r0,1
ffc0b57c: 41 82 00 34 beq- ffc0b5b0 <_Heap_Walk+0x1dc>
);
return false;
}
if (
ffc0b580: 7f 9a 48 00 cmpw cr7,r26,r9
ffc0b584: 41 9e 01 00 beq- cr7,ffc0b684 <_Heap_Walk+0x2b0>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
ffc0b588: 80 01 00 18 lwz r0,24(r1)
ffc0b58c: 3c a0 ff c2 lis r5,-62
ffc0b590: 7f 23 cb 78 mr r3,r25
ffc0b594: 38 80 00 01 li r4,1
ffc0b598: 7c 09 03 a6 mtctr r0
ffc0b59c: 38 a5 a5 70 addi r5,r5,-23184
ffc0b5a0: 4c c6 31 82 crclr 4*cr1+eq
ffc0b5a4: 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;
ffc0b5a8: 38 60 00 00 li r3,0
ffc0b5ac: 4b ff fe bc b ffc0b468 <_Heap_Walk+0x94>
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
ffc0b5b0: 80 01 00 18 lwz r0,24(r1)
ffc0b5b4: 3c a0 ff c2 lis r5,-62
ffc0b5b8: 7f 23 cb 78 mr r3,r25
ffc0b5bc: 38 80 00 01 li r4,1
ffc0b5c0: 7c 09 03 a6 mtctr r0
ffc0b5c4: 38 a5 a5 58 addi r5,r5,-23208
ffc0b5c8: 4c c6 31 82 crclr 4*cr1+eq
ffc0b5cc: 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;
ffc0b5d0: 38 60 00 00 li r3,0
ffc0b5d4: 4b ff fe 94 b ffc0b468 <_Heap_Walk+0x94>
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
ffc0b5d8: 80 01 00 18 lwz r0,24(r1)
ffc0b5dc: 3c a0 ff c2 lis r5,-62
ffc0b5e0: 7f 23 cb 78 mr r3,r25
ffc0b5e4: 38 80 00 01 li r4,1
ffc0b5e8: 7c 09 03 a6 mtctr r0
ffc0b5ec: 38 a5 a4 9c addi r5,r5,-23396
ffc0b5f0: 4c c6 31 82 crclr 4*cr1+eq
ffc0b5f4: 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;
ffc0b5f8: 38 60 00 00 li r3,0
ffc0b5fc: 4b ff fe 6c b ffc0b468 <_Heap_Walk+0x94>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
ffc0b600: 80 01 00 18 lwz r0,24(r1)
ffc0b604: 3c a0 ff c2 lis r5,-62
ffc0b608: 7f 23 cb 78 mr r3,r25
ffc0b60c: 38 80 00 01 li r4,1
ffc0b610: 7c 09 03 a6 mtctr r0
ffc0b614: 38 a5 a4 b0 addi r5,r5,-23376
ffc0b618: 7f 66 db 78 mr r6,r27
ffc0b61c: 4c c6 31 82 crclr 4*cr1+eq
ffc0b620: 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;
ffc0b624: 38 60 00 00 li r3,0
ffc0b628: 4b ff fe 40 b ffc0b468 <_Heap_Walk+0x94>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
ffc0b62c: 80 01 00 18 lwz r0,24(r1)
ffc0b630: 3c a0 ff c2 lis r5,-62
ffc0b634: 7f 23 cb 78 mr r3,r25
ffc0b638: 38 80 00 01 li r4,1
ffc0b63c: 7c 09 03 a6 mtctr r0
ffc0b640: 38 a5 a4 d0 addi r5,r5,-23344
ffc0b644: 7f 06 c3 78 mr r6,r24
ffc0b648: 4c c6 31 82 crclr 4*cr1+eq
ffc0b64c: 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;
ffc0b650: 38 60 00 00 li r3,0
ffc0b654: 4b ff fe 14 b ffc0b468 <_Heap_Walk+0x94>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
ffc0b658: 80 01 00 18 lwz r0,24(r1)
ffc0b65c: 3c a0 ff c2 lis r5,-62
ffc0b660: 7f 23 cb 78 mr r3,r25
ffc0b664: 38 80 00 01 li r4,1
ffc0b668: 7c 09 03 a6 mtctr r0
ffc0b66c: 38 a5 a4 f4 addi r5,r5,-23308
ffc0b670: 7f 46 d3 78 mr r6,r26
ffc0b674: 4c c6 31 82 crclr 4*cr1+eq
ffc0b678: 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;
ffc0b67c: 38 60 00 00 li r3,0
ffc0b680: 4b ff fd e8 b ffc0b468 <_Heap_Walk+0x94>
block = next_block;
} while ( block != first_block );
return true;
}
ffc0b684: 81 3f 00 08 lwz r9,8(r31)
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
ffc0b688: 80 bf 00 10 lwz r5,16(r31)
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 ) {
ffc0b68c: 7f 9f 48 00 cmpw cr7,r31,r9
ffc0b690: 41 9e 01 2c beq- cr7,ffc0b7bc <_Heap_Walk+0x3e8>
block = next_block;
} while ( block != first_block );
return true;
}
ffc0b694: 80 1f 00 20 lwz r0,32(r31)
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;
ffc0b698: 7d 26 4b 78 mr r6,r9
ffc0b69c: 7f 80 48 40 cmplw cr7,r0,r9
ffc0b6a0: 40 9d 00 54 ble- cr7,ffc0b6f4 <_Heap_Walk+0x320> <== ALWAYS TAKEN
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
ffc0b6a4: 80 01 00 18 lwz r0,24(r1)
ffc0b6a8: 3c a0 ff c2 lis r5,-62
ffc0b6ac: 7f 23 cb 78 mr r3,r25
ffc0b6b0: 38 80 00 01 li r4,1
ffc0b6b4: 7c 09 03 a6 mtctr r0
ffc0b6b8: 38 a5 a5 a0 addi r5,r5,-23136
ffc0b6bc: 4c c6 31 82 crclr 4*cr1+eq
ffc0b6c0: 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;
ffc0b6c4: 38 60 00 00 li r3,0
ffc0b6c8: 4b ff fd a0 b ffc0b468 <_Heap_Walk+0x94>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
ffc0b6cc: 80 01 00 18 lwz r0,24(r1)
ffc0b6d0: 3c a0 ff c2 lis r5,-62
ffc0b6d4: 7f 23 cb 78 mr r3,r25
ffc0b6d8: 38 80 00 01 li r4,1
ffc0b6dc: 7c 09 03 a6 mtctr r0
ffc0b6e0: 38 a5 a5 28 addi r5,r5,-23256
ffc0b6e4: 4c c6 31 82 crclr 4*cr1+eq
ffc0b6e8: 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;
ffc0b6ec: 38 60 00 00 li r3,0
ffc0b6f0: 4b ff fd 78 b ffc0b468 <_Heap_Walk+0x94>
ffc0b6f4: 81 1f 00 24 lwz r8,36(r31)
ffc0b6f8: 7f 88 48 40 cmplw cr7,r8,r9
ffc0b6fc: 41 bc ff a8 blt- cr7,ffc0b6a4 <_Heap_Walk+0x2d0> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc0b700: 39 69 00 08 addi r11,r9,8
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0b704: 7d 4b 2b 96 divwu r10,r11,r5
ffc0b708: 7d 4a 29 d6 mullw r10,r10,r5
);
return false;
}
if (
ffc0b70c: 7f 8b 50 00 cmpw cr7,r11,r10
ffc0b710: 40 9e 03 a8 bne- cr7,ffc0bab8 <_Heap_Walk+0x6e4> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
ffc0b714: 81 69 00 04 lwz r11,4(r9)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0b718: 7f ea fb 78 mr r10,r31
ffc0b71c: 55 6b 00 3c rlwinm r11,r11,0,0,30
block = next_block;
} while ( block != first_block );
return true;
}
ffc0b720: 7d 69 5a 14 add r11,r9,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;
ffc0b724: 81 6b 00 04 lwz r11,4(r11)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0b728: 71 67 00 01 andi. r7,r11,1
ffc0b72c: 41 a2 00 58 beq+ ffc0b784 <_Heap_Walk+0x3b0> <== ALWAYS TAKEN
ffc0b730: 48 00 03 b0 b ffc0bae0 <_Heap_Walk+0x70c> <== NOT EXECUTED
return false;
}
prev_block = free_block;
free_block = free_block->next;
ffc0b734: 80 c9 00 08 lwz r6,8(r9)
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 ) {
ffc0b738: 7f 9f 30 00 cmpw cr7,r31,r6
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;
ffc0b73c: 7f 00 30 40 cmplw cr6,r0,r6
ffc0b740: 7c 86 40 40 cmplw cr1,r6,r8
ffc0b744: 41 9e 00 7c beq- cr7,ffc0b7c0 <_Heap_Walk+0x3ec>
ffc0b748: 41 b9 ff 5c bgt- cr6,ffc0b6a4 <_Heap_Walk+0x2d0>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc0b74c: 39 66 00 08 addi r11,r6,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;
ffc0b750: 41 a5 ff 54 bgt- cr1,ffc0b6a4 <_Heap_Walk+0x2d0> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0b754: 7c eb 2b 96 divwu r7,r11,r5
ffc0b758: 7c e7 29 d6 mullw r7,r7,r5
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0b75c: 7d 2a 4b 78 mr r10,r9
);
return false;
}
if (
ffc0b760: 7f 8b 38 00 cmpw cr7,r11,r7
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0b764: 7c c9 33 78 mr r9,r6
);
return false;
}
if (
ffc0b768: 40 9e 03 50 bne- cr7,ffc0bab8 <_Heap_Walk+0x6e4>
- 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;
ffc0b76c: 81 66 00 04 lwz r11,4(r6)
ffc0b770: 55 6b 00 3c rlwinm r11,r11,0,0,30
block = next_block;
} while ( block != first_block );
return true;
}
ffc0b774: 7d 6b 32 14 add r11,r11,r6
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;
ffc0b778: 81 6b 00 04 lwz r11,4(r11)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0b77c: 71 67 00 01 andi. r7,r11,1
ffc0b780: 40 82 03 60 bne- ffc0bae0 <_Heap_Walk+0x70c>
);
return false;
}
if ( free_block->prev != prev_block ) {
ffc0b784: 80 e9 00 0c lwz r7,12(r9)
ffc0b788: 7f 87 50 00 cmpw cr7,r7,r10
ffc0b78c: 41 9e ff a8 beq+ cr7,ffc0b734 <_Heap_Walk+0x360>
(*printer)(
ffc0b790: 80 01 00 18 lwz r0,24(r1)
ffc0b794: 3c a0 ff c2 lis r5,-62
ffc0b798: 7f 23 cb 78 mr r3,r25
ffc0b79c: 38 80 00 01 li r4,1
ffc0b7a0: 7c 09 03 a6 mtctr r0
ffc0b7a4: 38 a5 a6 0c addi r5,r5,-23028
ffc0b7a8: 7d 26 4b 78 mr r6,r9
ffc0b7ac: 4c c6 31 82 crclr 4*cr1+eq
ffc0b7b0: 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;
ffc0b7b4: 38 60 00 00 li r3,0
ffc0b7b8: 4b ff fc b0 b ffc0b468 <_Heap_Walk+0x94>
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 ) {
ffc0b7bc: 80 1f 00 20 lwz r0,32(r31)
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0b7c0: 3e 60 ff c2 lis r19,-62
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
ffc0b7c4: 3e 80 ff c2 lis r20,-62
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)(
ffc0b7c8: 3e 40 ff c2 lis r18,-62
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0b7cc: 7f 5d d3 78 mr r29,r26
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0b7d0: 3a 73 a7 bc addi r19,r19,-22596
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
ffc0b7d4: 3a 94 a7 a4 addi r20,r20,-22620
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)(
ffc0b7d8: 3a 52 a7 00 addi r18,r18,-22784
ffc0b7dc: 3e 20 ff c2 lis r17,-62
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc0b7e0: 3e a0 ff c2 lis r21,-62
ffc0b7e4: 3d e0 ff c2 lis r15,-62
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)(
ffc0b7e8: 3e 00 ff c2 lis r16,-62
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc0b7ec: 3d c0 ff c2 lis r14,-62
- 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;
ffc0b7f0: 56 dc 00 3c rlwinm r28,r22,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);
ffc0b7f4: 7f dc ea 14 add r30,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;
ffc0b7f8: 7f 80 f0 40 cmplw cr7,r0,r30
ffc0b7fc: 40 9d 00 34 ble- cr7,ffc0b830 <_Heap_Walk+0x45c> <== ALWAYS TAKEN
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 ) ) {
(*printer)(
ffc0b800: 3c a0 ff c2 lis r5,-62
ffc0b804: 7f 23 cb 78 mr r3,r25
ffc0b808: 38 80 00 01 li r4,1
ffc0b80c: 38 a5 a6 40 addi r5,r5,-22976
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
ffc0b810: 80 01 00 18 lwz r0,24(r1)
ffc0b814: 7f a6 eb 78 mr r6,r29
ffc0b818: 7f c7 f3 78 mr r7,r30
ffc0b81c: 7c 09 03 a6 mtctr r0
ffc0b820: 4c c6 31 82 crclr 4*cr1+eq
ffc0b824: 4e 80 04 21 bctrl
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
ffc0b828: 38 60 00 00 li r3,0
ffc0b82c: 4b ff fc 3c b ffc0b468 <_Heap_Walk+0x94>
ffc0b830: 80 1f 00 24 lwz r0,36(r31)
ffc0b834: 7f 80 f0 40 cmplw cr7,r0,r30
ffc0b838: 41 bc ff c8 blt- cr7,ffc0b800 <_Heap_Walk+0x42c>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0b83c: 7d 3c db 96 divwu r9,r28,r27
ffc0b840: 7d 29 d9 d6 mullw r9,r9,r27
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;
ffc0b844: 7f a0 ba 78 xor r0,r29,r23
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
ffc0b848: 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;
ffc0b84c: 7c 00 00 34 cntlzw r0,r0
ffc0b850: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc0b854: 68 00 00 01 xori r0,r0,1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
ffc0b858: 41 9e 00 0c beq- cr7,ffc0b864 <_Heap_Walk+0x490>
ffc0b85c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0b860: 40 9e 01 e0 bne- cr7,ffc0ba40 <_Heap_Walk+0x66c>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
ffc0b864: 7f 98 e0 40 cmplw cr7,r24,r28
ffc0b868: 40 9d 00 0c ble- cr7,ffc0b874 <_Heap_Walk+0x4a0>
ffc0b86c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0b870: 40 9e 02 00 bne- cr7,ffc0ba70 <_Heap_Walk+0x69c> <== ALWAYS TAKEN
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
ffc0b874: 7f 9d f0 40 cmplw cr7,r29,r30
ffc0b878: 41 9c 00 0c blt- cr7,ffc0b884 <_Heap_Walk+0x4b0>
ffc0b87c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0b880: 40 9e 02 24 bne- cr7,ffc0baa4 <_Heap_Walk+0x6d0>
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;
ffc0b884: 80 1e 00 04 lwz r0,4(r30)
ffc0b888: 56 d6 07 fe clrlwi r22,r22,31
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
ffc0b88c: 70 07 00 01 andi. r7,r0,1
ffc0b890: 41 82 00 74 beq- ffc0b904 <_Heap_Walk+0x530>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
ffc0b894: 2f 96 00 00 cmpwi cr7,r22,0
ffc0b898: 41 9e 00 40 beq- cr7,ffc0b8d8 <_Heap_Walk+0x504>
(*printer)(
ffc0b89c: 80 01 00 18 lwz r0,24(r1)
ffc0b8a0: 7f 23 cb 78 mr r3,r25
ffc0b8a4: 38 80 00 00 li r4,0
ffc0b8a8: 7e 85 a3 78 mr r5,r20
ffc0b8ac: 7c 09 03 a6 mtctr r0
ffc0b8b0: 7f a6 eb 78 mr r6,r29
ffc0b8b4: 7f 87 e3 78 mr r7,r28
ffc0b8b8: 4c c6 31 82 crclr 4*cr1+eq
ffc0b8bc: 4e 80 04 21 bctrl
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
ffc0b8c0: 7f 9a f0 00 cmpw cr7,r26,r30
ffc0b8c4: 41 9e 01 0c beq- cr7,ffc0b9d0 <_Heap_Walk+0x5fc>
ffc0b8c8: 82 de 00 04 lwz r22,4(r30)
ffc0b8cc: 7f dd f3 78 mr r29,r30
ffc0b8d0: 80 1f 00 20 lwz r0,32(r31)
ffc0b8d4: 4b ff ff 1c b ffc0b7f0 <_Heap_Walk+0x41c>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0b8d8: 80 01 00 18 lwz r0,24(r1)
ffc0b8dc: 7f a6 eb 78 mr r6,r29
ffc0b8e0: 7f 23 cb 78 mr r3,r25
ffc0b8e4: 81 1d 00 00 lwz r8,0(r29)
ffc0b8e8: 38 80 00 00 li r4,0
ffc0b8ec: 7c 09 03 a6 mtctr r0
ffc0b8f0: 7e 65 9b 78 mr r5,r19
ffc0b8f4: 7f 87 e3 78 mr r7,r28
ffc0b8f8: 4c c6 31 82 crclr 4*cr1+eq
ffc0b8fc: 4e 80 04 21 bctrl
ffc0b900: 4b ff ff c0 b ffc0b8c0 <_Heap_Walk+0x4ec>
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 ?
ffc0b904: 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)(
ffc0b908: 81 3f 00 08 lwz r9,8(r31)
block = next_block;
} while ( block != first_block );
return true;
}
ffc0b90c: 80 1f 00 0c lwz r0,12(r31)
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)(
ffc0b910: 7f 89 40 00 cmpw cr7,r9,r8
ffc0b914: 41 9e 01 00 beq- cr7,ffc0ba14 <_Heap_Walk+0x640>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc0b918: 7f 9f 40 00 cmpw cr7,r31,r8
ffc0b91c: 41 9e 01 08 beq- cr7,ffc0ba24 <_Heap_Walk+0x650>
ffc0b920: 39 35 a7 70 addi r9,r21,-22672
block->next,
block->next == last_free_block ?
ffc0b924: 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)(
ffc0b928: 7f 80 50 00 cmpw cr7,r0,r10
ffc0b92c: 41 9e 00 e0 beq- cr7,ffc0ba0c <_Heap_Walk+0x638>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc0b930: 7f 9f 50 00 cmpw cr7,r31,r10
ffc0b934: 41 9e 00 e8 beq- cr7,ffc0ba1c <_Heap_Walk+0x648>
ffc0b938: 38 15 a7 70 addi r0,r21,-22672
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)(
ffc0b93c: 90 01 00 08 stw r0,8(r1)
ffc0b940: 7f 23 cb 78 mr r3,r25
ffc0b944: 38 80 00 00 li r4,0
ffc0b948: 80 01 00 18 lwz r0,24(r1)
ffc0b94c: 7e 45 93 78 mr r5,r18
ffc0b950: 7f a6 eb 78 mr r6,r29
ffc0b954: 7f 87 e3 78 mr r7,r28
ffc0b958: 7c 09 03 a6 mtctr r0
ffc0b95c: 4c c6 31 82 crclr 4*cr1+eq
ffc0b960: 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 ) {
ffc0b964: 81 1e 00 00 lwz r8,0(r30)
ffc0b968: 7f 9c 40 00 cmpw cr7,r28,r8
ffc0b96c: 40 9e 00 6c bne- cr7,ffc0b9d8 <_Heap_Walk+0x604>
);
return false;
}
if ( !prev_used ) {
ffc0b970: 2f 96 00 00 cmpwi cr7,r22,0
ffc0b974: 41 9e 00 b8 beq- cr7,ffc0ba2c <_Heap_Walk+0x658>
block = next_block;
} while ( block != first_block );
return true;
}
ffc0b978: 81 3f 00 08 lwz r9,8(r31)
)
{
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 ) {
ffc0b97c: 7f 9f 48 00 cmpw cr7,r31,r9
ffc0b980: 41 9e 00 24 beq- cr7,ffc0b9a4 <_Heap_Walk+0x5d0> <== NEVER TAKEN
if ( free_block == block ) {
ffc0b984: 7f 9d 48 00 cmpw cr7,r29,r9
ffc0b988: 40 be 00 0c bne+ cr7,ffc0b994 <_Heap_Walk+0x5c0>
ffc0b98c: 4b ff ff 34 b ffc0b8c0 <_Heap_Walk+0x4ec>
ffc0b990: 41 ba ff 30 beq- cr6,ffc0b8c0 <_Heap_Walk+0x4ec>
return true;
}
free_block = free_block->next;
ffc0b994: 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 ) {
ffc0b998: 7f 9f 48 00 cmpw cr7,r31,r9
if ( free_block == block ) {
ffc0b99c: 7f 1d 48 00 cmpw cr6,r29,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 ) {
ffc0b9a0: 40 9e ff f0 bne+ cr7,ffc0b990 <_Heap_Walk+0x5bc>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
ffc0b9a4: 3c a0 ff c2 lis r5,-62
ffc0b9a8: 7f 23 cb 78 mr r3,r25
ffc0b9ac: 38 80 00 01 li r4,1
ffc0b9b0: 38 a5 a7 e4 addi r5,r5,-22556
ffc0b9b4: 80 01 00 18 lwz r0,24(r1)
ffc0b9b8: 7f a6 eb 78 mr r6,r29
ffc0b9bc: 7c 09 03 a6 mtctr r0
ffc0b9c0: 4c c6 31 82 crclr 4*cr1+eq
ffc0b9c4: 4e 80 04 21 bctrl
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
ffc0b9c8: 38 60 00 00 li r3,0
ffc0b9cc: 4b ff fa 9c b ffc0b468 <_Heap_Walk+0x94>
}
block = next_block;
} while ( block != first_block );
return true;
ffc0b9d0: 38 60 00 01 li r3,1
ffc0b9d4: 4b ff fa 94 b ffc0b468 <_Heap_Walk+0x94>
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
ffc0b9d8: 80 01 00 18 lwz r0,24(r1)
ffc0b9dc: 3c a0 ff c2 lis r5,-62
ffc0b9e0: 7f 23 cb 78 mr r3,r25
ffc0b9e4: 38 80 00 01 li r4,1
ffc0b9e8: 7c 09 03 a6 mtctr r0
ffc0b9ec: 38 a5 a7 38 addi r5,r5,-22728
ffc0b9f0: 7f a6 eb 78 mr r6,r29
ffc0b9f4: 7f 87 e3 78 mr r7,r28
ffc0b9f8: 7f c9 f3 78 mr r9,r30
ffc0b9fc: 4c c6 31 82 crclr 4*cr1+eq
ffc0ba00: 4e 80 04 21 bctrl
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
ffc0ba04: 38 60 00 00 li r3,0
ffc0ba08: 4b ff fa 60 b ffc0b468 <_Heap_Walk+0x94>
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)(
ffc0ba0c: 38 11 a3 ec addi r0,r17,-23572
ffc0ba10: 4b ff ff 2c b ffc0b93c <_Heap_Walk+0x568>
ffc0ba14: 39 30 a3 d0 addi r9,r16,-23600
ffc0ba18: 4b ff ff 0c b ffc0b924 <_Heap_Walk+0x550>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc0ba1c: 38 0f a3 fc addi r0,r15,-23556
ffc0ba20: 4b ff ff 1c b ffc0b93c <_Heap_Walk+0x568>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc0ba24: 39 2e a3 e0 addi r9,r14,-23584
ffc0ba28: 4b ff fe fc b ffc0b924 <_Heap_Walk+0x550>
return false;
}
if ( !prev_used ) {
(*printer)(
ffc0ba2c: 3c a0 ff c2 lis r5,-62
ffc0ba30: 7f 23 cb 78 mr r3,r25
ffc0ba34: 38 80 00 01 li r4,1
ffc0ba38: 38 a5 a7 74 addi r5,r5,-22668
ffc0ba3c: 4b ff ff 78 b ffc0b9b4 <_Heap_Walk+0x5e0>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
ffc0ba40: 80 01 00 18 lwz r0,24(r1)
ffc0ba44: 3c a0 ff c2 lis r5,-62
ffc0ba48: 7f 23 cb 78 mr r3,r25
ffc0ba4c: 38 80 00 01 li r4,1
ffc0ba50: 7c 09 03 a6 mtctr r0
ffc0ba54: 38 a5 a6 70 addi r5,r5,-22928
ffc0ba58: 7f a6 eb 78 mr r6,r29
ffc0ba5c: 7f 87 e3 78 mr r7,r28
ffc0ba60: 4c c6 31 82 crclr 4*cr1+eq
ffc0ba64: 4e 80 04 21 bctrl
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
ffc0ba68: 38 60 00 00 li r3,0
ffc0ba6c: 4b ff f9 fc b ffc0b468 <_Heap_Walk+0x94>
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
ffc0ba70: 80 01 00 18 lwz r0,24(r1)
ffc0ba74: 3c a0 ff c2 lis r5,-62
ffc0ba78: 7f 23 cb 78 mr r3,r25
ffc0ba7c: 38 80 00 01 li r4,1
ffc0ba80: 7c 09 03 a6 mtctr r0
ffc0ba84: 38 a5 a6 a0 addi r5,r5,-22880
ffc0ba88: 7f a6 eb 78 mr r6,r29
ffc0ba8c: 7f 87 e3 78 mr r7,r28
ffc0ba90: 7f 08 c3 78 mr r8,r24
ffc0ba94: 4c c6 31 82 crclr 4*cr1+eq
ffc0ba98: 4e 80 04 21 bctrl
block,
block_size,
min_block_size
);
return false;
ffc0ba9c: 38 60 00 00 li r3,0
ffc0baa0: 4b ff f9 c8 b ffc0b468 <_Heap_Walk+0x94>
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
ffc0baa4: 3c a0 ff c2 lis r5,-62
ffc0baa8: 7f 23 cb 78 mr r3,r25
ffc0baac: 38 80 00 01 li r4,1
ffc0bab0: 38 a5 a6 cc addi r5,r5,-22836
ffc0bab4: 4b ff fd 5c b ffc0b810 <_Heap_Walk+0x43c>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
ffc0bab8: 80 01 00 18 lwz r0,24(r1)
ffc0babc: 3c a0 ff c2 lis r5,-62
ffc0bac0: 7f 23 cb 78 mr r3,r25
ffc0bac4: 38 80 00 01 li r4,1
ffc0bac8: 7c 09 03 a6 mtctr r0
ffc0bacc: 38 a5 a5 c0 addi r5,r5,-23104
ffc0bad0: 4c c6 31 82 crclr 4*cr1+eq
ffc0bad4: 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;
ffc0bad8: 38 60 00 00 li r3,0
ffc0badc: 4b ff f9 8c b ffc0b468 <_Heap_Walk+0x94>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
ffc0bae0: 80 01 00 18 lwz r0,24(r1)
ffc0bae4: 3c a0 ff c2 lis r5,-62
ffc0bae8: 7f 23 cb 78 mr r3,r25
ffc0baec: 38 80 00 01 li r4,1
ffc0baf0: 7c 09 03 a6 mtctr r0
ffc0baf4: 38 a5 a5 f0 addi r5,r5,-23056
ffc0baf8: 4c c6 31 82 crclr 4*cr1+eq
ffc0bafc: 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;
ffc0bb00: 38 60 00 00 li r3,0
ffc0bb04: 4b ff f9 64 b ffc0b468 <_Heap_Walk+0x94>
ffc0b2d4 <_Heap_Walk_print>:
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
ffc0b2d4: 94 21 ff 88 stwu r1,-120(r1)
ffc0b2d8: 7c 08 02 a6 mflr r0
ffc0b2dc: 93 e1 00 74 stw r31,116(r1)
ffc0b2e0: 90 01 00 7c stw r0,124(r1)
ffc0b2e4: 7c 60 1b 78 mr r0,r3
ffc0b2e8: 90 c1 00 1c stw r6,28(r1)
ffc0b2ec: 90 e1 00 20 stw r7,32(r1)
ffc0b2f0: 91 01 00 24 stw r8,36(r1)
ffc0b2f4: 91 21 00 28 stw r9,40(r1)
ffc0b2f8: 91 41 00 2c stw r10,44(r1)
ffc0b2fc: 40 86 00 24 bne- cr1,ffc0b320 <_Heap_Walk_print+0x4c> <== ALWAYS TAKEN
ffc0b300: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED
ffc0b304: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc0b308: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc0b30c: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc0b310: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc0b314: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc0b318: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc0b31c: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
va_list ap;
if ( error ) {
ffc0b320: 2f 84 00 00 cmpwi cr7,r4,0
{
/* Do nothing */
}
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
ffc0b324: 7c bf 2b 78 mr r31,r5
va_list ap;
if ( error ) {
ffc0b328: 40 9e 00 58 bne- cr7,ffc0b380 <_Heap_Walk_print+0xac>
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
ffc0b32c: 3c 60 ff c2 lis r3,-62
ffc0b330: 7c 04 03 78 mr r4,r0
ffc0b334: 38 63 a3 c4 addi r3,r3,-23612
ffc0b338: 4c c6 31 82 crclr 4*cr1+eq
ffc0b33c: 4b ff b1 99 bl ffc064d4 <printk>
}
va_start( ap, fmt );
ffc0b340: 38 00 00 03 li r0,3
ffc0b344: 98 01 00 08 stb r0,8(r1)
ffc0b348: 38 00 00 00 li r0,0
vprintk( fmt, ap );
ffc0b34c: 7f e3 fb 78 mr r3,r31
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0b350: 98 01 00 09 stb r0,9(r1)
ffc0b354: 38 01 00 80 addi r0,r1,128
vprintk( fmt, ap );
ffc0b358: 38 81 00 08 addi r4,r1,8
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0b35c: 90 01 00 0c stw r0,12(r1)
ffc0b360: 38 01 00 10 addi r0,r1,16
ffc0b364: 90 01 00 10 stw r0,16(r1)
vprintk( fmt, ap );
ffc0b368: 4b ff d5 65 bl ffc088cc <vprintk>
va_end( ap );
}
ffc0b36c: 80 01 00 7c lwz r0,124(r1)
ffc0b370: 83 e1 00 74 lwz r31,116(r1)
ffc0b374: 38 21 00 78 addi r1,r1,120
ffc0b378: 7c 08 03 a6 mtlr r0
ffc0b37c: 4e 80 00 20 blr
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
va_list ap;
if ( error ) {
printk( "FAIL[%d]: ", source );
ffc0b380: 3c 60 ff c2 lis r3,-62
ffc0b384: 7c 04 03 78 mr r4,r0
ffc0b388: 38 63 a3 b8 addi r3,r3,-23624
ffc0b38c: 4c c6 31 82 crclr 4*cr1+eq
ffc0b390: 4b ff b1 45 bl ffc064d4 <printk>
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0b394: 38 00 00 03 li r0,3
ffc0b398: 98 01 00 08 stb r0,8(r1)
ffc0b39c: 38 00 00 00 li r0,0
vprintk( fmt, ap );
ffc0b3a0: 7f e3 fb 78 mr r3,r31
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0b3a4: 98 01 00 09 stb r0,9(r1)
ffc0b3a8: 38 01 00 80 addi r0,r1,128
vprintk( fmt, ap );
ffc0b3ac: 38 81 00 08 addi r4,r1,8
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0b3b0: 90 01 00 0c stw r0,12(r1)
ffc0b3b4: 38 01 00 10 addi r0,r1,16
ffc0b3b8: 90 01 00 10 stw r0,16(r1)
vprintk( fmt, ap );
ffc0b3bc: 4b ff d5 11 bl ffc088cc <vprintk>
va_end( ap );
}
ffc0b3c0: 80 01 00 7c lwz r0,124(r1)
ffc0b3c4: 83 e1 00 74 lwz r31,116(r1)
ffc0b3c8: 38 21 00 78 addi r1,r1,120
ffc0b3cc: 7c 08 03 a6 mtlr r0
ffc0b3d0: 4e 80 00 20 blr
ffc097e4 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
ffc097e4: 94 21 ff f0 stwu r1,-16(r1)
ffc097e8: 7c 08 02 a6 mflr r0
ffc097ec: 93 c1 00 08 stw r30,8(r1)
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
ffc097f0: 3f c0 00 00 lis r30,0
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
ffc097f4: 90 01 00 14 stw r0,20(r1)
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
ffc097f8: 80 1e 27 f4 lwz r0,10228(r30)
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
ffc097fc: 93 e1 00 0c stw r31,12(r1)
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
ffc09800: 2f 80 00 00 cmpwi cr7,r0,0
ffc09804: 41 9e 00 2c beq- cr7,ffc09830 <_IO_Initialize_all_drivers+0x4c><== NEVER TAKEN
ffc09808: 3b e0 00 00 li r31,0
ffc0980c: 3b de 27 f4 addi r30,r30,10228
(void) rtems_io_initialize( major, 0, NULL );
ffc09810: 7f e3 fb 78 mr r3,r31
ffc09814: 38 80 00 00 li r4,0
ffc09818: 38 a0 00 00 li r5,0
ffc0981c: 48 00 5f 51 bl ffc0f76c <rtems_io_initialize>
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
ffc09820: 80 1e 00 00 lwz r0,0(r30)
ffc09824: 3b ff 00 01 addi r31,r31,1
ffc09828: 7f 80 f8 40 cmplw cr7,r0,r31
ffc0982c: 41 9d ff e4 bgt+ cr7,ffc09810 <_IO_Initialize_all_drivers+0x2c>
(void) rtems_io_initialize( major, 0, NULL );
}
ffc09830: 80 01 00 14 lwz r0,20(r1)
ffc09834: 83 c1 00 08 lwz r30,8(r1)
ffc09838: 7c 08 03 a6 mtlr r0
ffc0983c: 83 e1 00 0c lwz r31,12(r1)
ffc09840: 38 21 00 10 addi r1,r1,16
ffc09844: 4e 80 00 20 blr
ffc096d4 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc096d4: 94 21 ff e0 stwu r1,-32(r1)
ffc096d8: 7c 08 02 a6 mflr r0
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
ffc096dc: 3d 20 00 00 lis r9,0
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc096e0: 90 01 00 24 stw r0,36(r1)
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
ffc096e4: 39 29 20 d0 addi r9,r9,8400
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc096e8: 93 a1 00 14 stw r29,20(r1)
ffc096ec: 93 c1 00 18 stw r30,24(r1)
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
drivers_in_table = Configuration.number_of_device_drivers;
number_of_drivers = Configuration.maximum_drivers;
ffc096f0: 83 a9 00 2c lwz r29,44(r9)
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
drivers_in_table = Configuration.number_of_device_drivers;
ffc096f4: 83 c9 00 30 lwz r30,48(r9)
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc096f8: 93 e1 00 1c stw r31,28(r1)
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
ffc096fc: 7f 9e e8 40 cmplw cr7,r30,r29
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc09700: 93 61 00 0c stw r27,12(r1)
ffc09704: 93 81 00 10 stw r28,16(r1)
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
ffc09708: 83 e9 00 34 lwz r31,52(r9)
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
ffc0970c: 40 9c 00 a4 bge- cr7,ffc097b0 <_IO_Manager_initialization+0xdc>
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
ffc09710: 1f 7d 00 18 mulli r27,r29,24
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
ffc09714: 7f 63 db 78 mr r3,r27
ffc09718: 48 00 3d 91 bl ffc0d4a8 <_Workspace_Allocate_or_fatal_error>
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
ffc0971c: 3f 80 00 00 lis r28,0
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
ffc09720: 3d 20 00 00 lis r9,0
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
ffc09724: 90 7c 27 f8 stw r3,10232(r28)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
ffc09728: 38 80 00 00 li r4,0
ffc0972c: 7f 65 db 78 mr r5,r27
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
ffc09730: 93 a9 27 f4 stw r29,10228(r9)
memset(
ffc09734: 48 00 96 81 bl ffc12db4 <memset>
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
ffc09738: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0973c: 41 9e 00 50 beq- cr7,ffc0978c <_IO_Manager_initialization+0xb8><== NEVER TAKEN
ffc09740: 7f c9 03 a6 mtctr r30
ffc09744: 81 1c 27 f8 lwz r8,10232(r28)
ffc09748: 39 40 00 00 li r10,0
_IO_Driver_address_table[index] = driver_table[index];
ffc0974c: 7f e9 fb 78 mr r9,r31
ffc09750: 7c a9 50 6e lwzux r5,r9,r10
ffc09754: 7d 68 52 14 add r11,r8,r10
ffc09758: 80 e9 00 08 lwz r7,8(r9)
ffc0975c: 80 09 00 0c lwz r0,12(r9)
ffc09760: 80 c9 00 04 lwz r6,4(r9)
ffc09764: 7c a8 51 2e stwx r5,r8,r10
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
ffc09768: 39 4a 00 18 addi r10,r10,24
_IO_Driver_address_table[index] = driver_table[index];
ffc0976c: 90 cb 00 04 stw r6,4(r11)
ffc09770: 90 eb 00 08 stw r7,8(r11)
ffc09774: 90 0b 00 0c stw r0,12(r11)
ffc09778: 80 e9 00 10 lwz r7,16(r9)
ffc0977c: 80 09 00 14 lwz r0,20(r9)
ffc09780: 90 eb 00 10 stw r7,16(r11)
ffc09784: 90 0b 00 14 stw r0,20(r11)
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
ffc09788: 42 00 ff c4 bdnz+ ffc0974c <_IO_Manager_initialization+0x78>
_IO_Driver_address_table[index] = driver_table[index];
}
ffc0978c: 80 01 00 24 lwz r0,36(r1)
ffc09790: 83 61 00 0c lwz r27,12(r1)
ffc09794: 7c 08 03 a6 mtlr r0
ffc09798: 83 81 00 10 lwz r28,16(r1)
ffc0979c: 83 a1 00 14 lwz r29,20(r1)
ffc097a0: 83 c1 00 18 lwz r30,24(r1)
ffc097a4: 83 e1 00 1c lwz r31,28(r1)
ffc097a8: 38 21 00 20 addi r1,r1,32
ffc097ac: 4e 80 00 20 blr
ffc097b0: 80 01 00 24 lwz r0,36(r1)
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
ffc097b4: 3d 20 00 00 lis r9,0
ffc097b8: 93 e9 27 f8 stw r31,10232(r9)
_IO_Number_of_drivers = number_of_drivers;
ffc097bc: 3d 20 00 00 lis r9,0
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
}
ffc097c0: 7c 08 03 a6 mtlr r0
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
_IO_Number_of_drivers = number_of_drivers;
ffc097c4: 93 c9 27 f4 stw r30,10228(r9)
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
}
ffc097c8: 83 61 00 0c lwz r27,12(r1)
ffc097cc: 83 81 00 10 lwz r28,16(r1)
ffc097d0: 83 a1 00 14 lwz r29,20(r1)
ffc097d4: 83 c1 00 18 lwz r30,24(r1)
ffc097d8: 83 e1 00 1c lwz r31,28(r1)
ffc097dc: 38 21 00 20 addi r1,r1,32
ffc097e0: 4e 80 00 20 blr
ffc0a6ac <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc0a6ac: 94 21 ff f0 stwu r1,-16(r1)
ffc0a6b0: 7c 08 02 a6 mflr r0
_Internal_errors_What_happened.the_source = the_source;
ffc0a6b4: 3d 60 00 00 lis r11,0
ffc0a6b8: 39 2b 2c b0 addi r9,r11,11440
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc0a6bc: 90 01 00 14 stw r0,20(r1)
ffc0a6c0: 93 e1 00 0c stw r31,12(r1)
ffc0a6c4: 7c bf 2b 78 mr r31,r5
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
ffc0a6c8: 98 89 00 04 stb r4,4(r9)
_Internal_errors_What_happened.the_error = the_error;
ffc0a6cc: 90 a9 00 08 stw r5,8(r9)
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
ffc0a6d0: 90 6b 2c b0 stw r3,11440(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 );
ffc0a6d4: 48 00 26 95 bl ffc0cd68 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
ffc0a6d8: 38 00 00 05 li r0,5
ffc0a6dc: 3d 20 00 00 lis r9,0
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
ffc0a6e0: 7f e3 fb 78 mr r3,r31
ffc0a6e4: 90 09 27 e8 stw r0,10216(r9)
ffc0a6e8: 4b ff 92 dd bl ffc039c4 <_BSP_Fatal_error>
ffc0a6ec: 48 00 00 00 b ffc0a6ec <_Internal_error_Occurred+0x40><== NOT EXECUTED
ffc0a704 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc0a704: 94 21 ff f0 stwu r1,-16(r1)
ffc0a708: 7c 08 02 a6 mflr r0
ffc0a70c: 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 )
ffc0a710: 80 03 00 18 lwz r0,24(r3)
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc0a714: 93 e1 00 0c stw r31,12(r1)
ffc0a718: 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 )
ffc0a71c: 2f 80 00 00 cmpwi cr7,r0,0
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc0a720: 93 c1 00 08 stw r30,8(r1)
* 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 )
return NULL;
ffc0a724: 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 )
ffc0a728: 40 9e 00 1c bne- cr7,ffc0a744 <_Objects_Allocate+0x40> <== ALWAYS TAKEN
);
}
#endif
return the_object;
}
ffc0a72c: 80 01 00 14 lwz r0,20(r1)
ffc0a730: 83 c1 00 08 lwz r30,8(r1)
ffc0a734: 7c 08 03 a6 mtlr r0
ffc0a738: 83 e1 00 0c lwz r31,12(r1)
ffc0a73c: 38 21 00 10 addi r1,r1,16
ffc0a740: 4e 80 00 20 blr
/*
* 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 );
ffc0a744: 3b df 00 20 addi r30,r31,32
ffc0a748: 7f c3 f3 78 mr r3,r30
ffc0a74c: 4b ff f4 15 bl ffc09b60 <_Chain_Get>
if ( information->auto_extend ) {
ffc0a750: 88 1f 00 12 lbz r0,18(r31)
ffc0a754: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a758: 41 be ff d4 beq- cr7,ffc0a72c <_Objects_Allocate+0x28>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
ffc0a75c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a760: 41 9e 00 50 beq- cr7,ffc0a7b0 <_Objects_Allocate+0xac>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
ffc0a764: a1 63 00 0a lhz r11,10(r3)
ffc0a768: a0 1f 00 0a lhz r0,10(r31)
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
ffc0a76c: a1 3f 00 14 lhz r9,20(r31)
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
ffc0a770: 7c 00 58 50 subf r0,r0,r11
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
information->inactive--;
ffc0a774: a1 7f 00 2c lhz r11,44(r31)
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
ffc0a778: 7c 00 4b 96 divwu r0,r0,r9
information->inactive_per_block[ block ]--;
ffc0a77c: 81 3f 00 30 lwz r9,48(r31)
);
}
#endif
return the_object;
}
ffc0a780: 83 c1 00 08 lwz r30,8(r1)
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
ffc0a784: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0a788: 7d 49 00 2e lwzx r10,r9,r0
information->inactive--;
ffc0a78c: 39 6b ff ff addi r11,r11,-1
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
ffc0a790: 39 4a ff ff addi r10,r10,-1
ffc0a794: 7d 49 01 2e stwx r10,r9,r0
);
}
#endif
return the_object;
}
ffc0a798: 80 01 00 14 lwz r0,20(r1)
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
information->inactive--;
ffc0a79c: b1 7f 00 2c sth r11,44(r31)
);
}
#endif
return the_object;
}
ffc0a7a0: 7c 08 03 a6 mtlr r0
ffc0a7a4: 83 e1 00 0c lwz r31,12(r1)
ffc0a7a8: 38 21 00 10 addi r1,r1,16
ffc0a7ac: 4e 80 00 20 blr
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
ffc0a7b0: 7f e3 fb 78 mr r3,r31
ffc0a7b4: 48 00 00 4d bl ffc0a800 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
ffc0a7b8: 7f c3 f3 78 mr r3,r30
ffc0a7bc: 4b ff f3 a5 bl ffc09b60 <_Chain_Get>
}
if ( the_object ) {
ffc0a7c0: 2c 03 00 00 cmpwi r3,0
ffc0a7c4: 41 82 ff 68 beq+ ffc0a72c <_Objects_Allocate+0x28>
ffc0a7c8: 4b ff ff 9c b ffc0a764 <_Objects_Allocate+0x60>
ffc0a800 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc0a800: 94 21 ff c0 stwu r1,-64(r1)
ffc0a804: 7c 08 02 a6 mflr r0
ffc0a808: 90 01 00 44 stw r0,68(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 )
ffc0a80c: 81 23 00 34 lwz r9,52(r3)
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc0a810: 93 a1 00 34 stw r29,52(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 )
ffc0a814: 2f 89 00 00 cmpwi cr7,r9,0
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc0a818: 93 e1 00 3c stw r31,60(r1)
ffc0a81c: 7c 7f 1b 78 mr r31,r3
ffc0a820: 92 c1 00 18 stw r22,24(r1)
ffc0a824: 92 e1 00 1c stw r23,28(r1)
ffc0a828: 93 01 00 20 stw r24,32(r1)
ffc0a82c: 93 21 00 24 stw r25,36(r1)
ffc0a830: 93 41 00 28 stw r26,40(r1)
ffc0a834: 93 61 00 2c stw r27,44(r1)
ffc0a838: 93 81 00 30 stw r28,48(r1)
ffc0a83c: 93 c1 00 38 stw r30,56(r1)
/*
* 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 );
ffc0a840: a3 a3 00 0a lhz r29,10(r3)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc0a844: 41 9e 02 84 beq- cr7,ffc0aac8 <_Objects_Extend_information+0x2c8>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
ffc0a848: a3 43 00 10 lhz r26,16(r3)
ffc0a84c: a1 63 00 14 lhz r11,20(r3)
ffc0a850: 7e da 5b 96 divwu r22,r26,r11
for ( ; block < block_count; block++ ) {
ffc0a854: 2f 96 00 00 cmpwi cr7,r22,0
ffc0a858: 41 9e 02 8c beq- cr7,ffc0aae4 <_Objects_Extend_information+0x2e4><== NEVER TAKEN
if ( information->object_blocks[ block ] == NULL ) {
ffc0a85c: 80 09 00 00 lwz r0,0(r9)
ffc0a860: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a864: 41 9e 02 94 beq- cr7,ffc0aaf8 <_Objects_Extend_information+0x2f8><== NEVER TAKEN
ffc0a868: 7d 6a 5b 78 mr r10,r11
* 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;
ffc0a86c: 7e c9 03 a6 mtctr r22
/*
* 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 );
ffc0a870: 7f be eb 78 mr r30,r29
index_base = minimum_index;
block = 0;
ffc0a874: 3b 60 00 00 li r27,0
ffc0a878: 48 00 00 10 b ffc0a888 <_Objects_Extend_information+0x88>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
ffc0a87c: 84 09 00 04 lwzu r0,4(r9)
ffc0a880: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a884: 41 9e 01 f4 beq- cr7,ffc0aa78 <_Objects_Extend_information+0x278>
do_extend = false;
break;
} else
index_base += information->allocation_size;
ffc0a888: 7f de 5a 14 add r30,r30,r11
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
ffc0a88c: 3b 7b 00 01 addi r27,r27,1
ffc0a890: 42 00 ff ec bdnz+ ffc0a87c <_Objects_Extend_information+0x7c>
/*
* 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;
ffc0a894: 3b 20 00 01 li r25,1
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
ffc0a898: 7f 5a 52 14 add r26,r26,r10
/*
* 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 ) {
ffc0a89c: 2b 9a ff ff cmplwi cr7,r26,65535
ffc0a8a0: 41 9d 01 a0 bgt- cr7,ffc0aa40 <_Objects_Extend_information+0x240>
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
ffc0a8a4: 88 1f 00 12 lbz r0,18(r31)
/*
* 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;
ffc0a8a8: 80 7f 00 18 lwz r3,24(r31)
if ( information->auto_extend ) {
ffc0a8ac: 2f 80 00 00 cmpwi cr7,r0,0
/*
* 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;
ffc0a8b0: 7c 6a 19 d6 mullw r3,r10,r3
if ( information->auto_extend ) {
ffc0a8b4: 41 9e 01 cc beq- cr7,ffc0aa80 <_Objects_Extend_information+0x280>
new_object_block = _Workspace_Allocate( block_size );
ffc0a8b8: 48 00 2b 91 bl ffc0d448 <_Workspace_Allocate>
if ( !new_object_block )
ffc0a8bc: 7c 7c 1b 79 mr. r28,r3
ffc0a8c0: 41 82 01 80 beq- ffc0aa40 <_Objects_Extend_information+0x240>
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
ffc0a8c4: 2f 99 00 00 cmpwi cr7,r25,0
ffc0a8c8: 41 9e 00 f4 beq- cr7,ffc0a9bc <_Objects_Extend_information+0x1bc>
*/
/*
* Up the block count and maximum
*/
block_count++;
ffc0a8cc: 3a f6 00 01 addi r23,r22,1
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
ffc0a8d0: 1c 77 00 03 mulli r3,r23,3
((maximum + minimum_index) * sizeof(Objects_Control *));
ffc0a8d4: 7c 7a 1a 14 add r3,r26,r3
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
ffc0a8d8: 7c 63 ea 14 add r3,r3,r29
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
ffc0a8dc: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc0a8e0: 48 00 2b 69 bl ffc0d448 <_Workspace_Allocate>
if ( !object_blocks ) {
ffc0a8e4: 7c 78 1b 79 mr. r24,r3
ffc0a8e8: 41 82 02 24 beq- ffc0ab0c <_Objects_Extend_information+0x30c>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc0a8ec: a0 1f 00 10 lhz r0,16(r31)
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
ffc0a8f0: 56 f7 10 3a rlwinm r23,r23,2,0,29
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
ffc0a8f4: 7f 38 ba 14 add r25,r24,r23
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc0a8f8: 7f 9d 00 40 cmplw cr7,r29,r0
ffc0a8fc: 7e f9 ba 14 add r23,r25,r23
ffc0a900: 41 9c 01 8c blt- cr7,ffc0aa8c <_Objects_Extend_information+0x28c>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
ffc0a904: 2f 9d 00 00 cmpwi cr7,r29,0
local_table[ index ] = NULL;
ffc0a908: 7f a9 03 a6 mtctr r29
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
ffc0a90c: 39 37 ff fc addi r9,r23,-4
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
ffc0a910: 38 00 00 00 li r0,0
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
ffc0a914: 41 9e 00 0c beq- cr7,ffc0a920 <_Objects_Extend_information+0x120><== NEVER TAKEN
local_table[ index ] = NULL;
ffc0a918: 94 09 00 04 stwu r0,4(r9)
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
ffc0a91c: 42 00 ff fc bdnz+ ffc0a918 <_Objects_Extend_information+0x118>
ffc0a920: 56 d6 10 3a rlwinm r22,r22,2,0,29
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
ffc0a924: a1 7f 00 14 lhz r11,20(r31)
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
ffc0a928: 38 00 00 00 li r0,0
ffc0a92c: 7c 18 b1 2e stwx r0,r24,r22
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
ffc0a930: 7d 7e 5a 14 add r11,r30,r11
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
ffc0a934: 7f 9e 58 40 cmplw cr7,r30,r11
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
ffc0a938: 7c 19 b1 2e stwx r0,r25,r22
for ( index=index_base ;
ffc0a93c: 40 9c 00 30 bge- cr7,ffc0a96c <_Objects_Extend_information+0x16c><== NEVER TAKEN
ffc0a940: 38 1e 00 01 addi r0,r30,1
ffc0a944: 7f 80 58 40 cmplw cr7,r0,r11
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc0a948: 57 c9 10 3a rlwinm r9,r30,2,0,29
ffc0a94c: 39 29 ff fc addi r9,r9,-4
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
ffc0a950: 7d 7e 58 50 subf r11,r30,r11
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
ffc0a954: 7d 29 ba 14 add r9,r9,r23
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
ffc0a958: 7d 69 03 a6 mtctr r11
ffc0a95c: 38 00 00 00 li r0,0
ffc0a960: 41 9d 01 b8 bgt- cr7,ffc0ab18 <_Objects_Extend_information+0x318><== NEVER TAKEN
ffc0a964: 94 09 00 04 stwu r0,4(r9)
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
ffc0a968: 42 00 ff fc bdnz+ ffc0a964 <_Objects_Extend_information+0x164>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a96c: 7c 00 00 a6 mfmsr r0
ffc0a970: 7d 30 42 a6 mfsprg r9,0
ffc0a974: 7c 09 48 78 andc r9,r0,r9
ffc0a978: 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) |
ffc0a97c: 81 7f 00 00 lwz r11,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;
ffc0a980: 57 5a 04 3e clrlwi r26,r26,16
information->maximum_id = _Objects_Build_id(
ffc0a984: a1 3f 00 04 lhz r9,4(r31)
ffc0a988: 55 6b c0 0e rlwinm r11,r11,24,0,7
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
ffc0a98c: 80 7f 00 34 lwz r3,52(r31)
ffc0a990: 65 6b 00 01 oris r11,r11,1
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
ffc0a994: 93 3f 00 30 stw r25,48(r31)
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc0a998: 55 29 d8 08 rlwinm r9,r9,27,0,4
ffc0a99c: 7d 69 4b 78 or r9,r11,r9
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
ffc0a9a0: 93 1f 00 34 stw r24,52(r31)
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc0a9a4: 7d 29 d3 78 or r9,r9,r26
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
ffc0a9a8: 92 ff 00 1c stw r23,28(r31)
information->maximum = (Objects_Maximum) maximum;
ffc0a9ac: b3 5f 00 10 sth r26,16(r31)
information->maximum_id = _Objects_Build_id(
ffc0a9b0: 91 3f 00 0c stw r9,12(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a9b4: 7c 00 01 24 mtmsr r0
information->maximum
);
_ISR_Enable( level );
_Workspace_Free( old_tables );
ffc0a9b8: 48 00 2a c5 bl ffc0d47c <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
ffc0a9bc: 81 3f 00 34 lwz r9,52(r31)
ffc0a9c0: 57 7b 10 3a rlwinm r27,r27,2,0,29
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc0a9c4: 3b a1 00 08 addi r29,r1,8
ffc0a9c8: 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;
ffc0a9cc: 7f 89 d9 2e stwx r28,r9,r27
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc0a9d0: 7f 84 e3 78 mr r4,r28
ffc0a9d4: 7f a3 eb 78 mr r3,r29
ffc0a9d8: 80 df 00 18 lwz r6,24(r31)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0a9dc: 3b 9f 00 20 addi r28,r31,32
information->object_blocks[ block ] = new_object_block;
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc0a9e0: 48 00 4d e9 bl ffc0f7c8 <_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 ) {
ffc0a9e4: 48 00 00 2c b ffc0aa10 <_Objects_Extend_information+0x210>
ffc0a9e8: 81 7f 00 00 lwz r11,0(r31)
the_object->id = _Objects_Build_id(
ffc0a9ec: a0 1f 00 04 lhz r0,4(r31)
ffc0a9f0: 55 6b c0 0e rlwinm r11,r11,24,0,7
ffc0a9f4: 65 6b 00 01 oris r11,r11,1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc0a9f8: 54 00 d8 08 rlwinm r0,r0,27,0,4
ffc0a9fc: 7d 60 03 78 or r0,r11,r0
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc0aa00: 7c 00 f3 78 or r0,r0,r30
ffc0aa04: 90 09 00 08 stw r0,8(r9)
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
ffc0aa08: 3b de 00 01 addi r30,r30,1
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0aa0c: 4b ff f0 fd bl ffc09b08 <_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 ) {
ffc0aa10: 7f a3 eb 78 mr r3,r29
ffc0aa14: 4b ff f1 4d bl ffc09b60 <_Chain_Get>
ffc0aa18: 7c 69 1b 79 mr. r9,r3
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0aa1c: 7f 83 e3 78 mr r3,r28
ffc0aa20: 7d 24 4b 78 mr r4,r9
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
ffc0aa24: 40 82 ff c4 bne+ ffc0a9e8 <_Objects_Extend_information+0x1e8>
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
ffc0aa28: a1 3f 00 2c lhz r9,44(r31)
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
ffc0aa2c: a0 1f 00 14 lhz r0,20(r31)
ffc0aa30: 81 7f 00 30 lwz r11,48(r31)
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
ffc0aa34: 7d 20 4a 14 add r9,r0,r9
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
ffc0aa38: 7c 0b d9 2e stwx r0,r11,r27
information->inactive =
ffc0aa3c: b1 3f 00 2c sth r9,44(r31)
(Objects_Maximum)(information->inactive + information->allocation_size);
}
ffc0aa40: 80 01 00 44 lwz r0,68(r1)
ffc0aa44: 82 c1 00 18 lwz r22,24(r1)
ffc0aa48: 7c 08 03 a6 mtlr r0
ffc0aa4c: 82 e1 00 1c lwz r23,28(r1)
ffc0aa50: 83 01 00 20 lwz r24,32(r1)
ffc0aa54: 83 21 00 24 lwz r25,36(r1)
ffc0aa58: 83 41 00 28 lwz r26,40(r1)
ffc0aa5c: 83 61 00 2c lwz r27,44(r1)
ffc0aa60: 83 81 00 30 lwz r28,48(r1)
ffc0aa64: 83 a1 00 34 lwz r29,52(r1)
ffc0aa68: 83 c1 00 38 lwz r30,56(r1)
ffc0aa6c: 83 e1 00 3c lwz r31,60(r1)
ffc0aa70: 38 21 00 40 addi r1,r1,64
ffc0aa74: 4e 80 00 20 blr
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
ffc0aa78: 3b 20 00 00 li r25,0
ffc0aa7c: 4b ff fe 1c b ffc0a898 <_Objects_Extend_information+0x98>
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
ffc0aa80: 48 00 2a 29 bl ffc0d4a8 <_Workspace_Allocate_or_fatal_error>
ffc0aa84: 7c 7c 1b 78 mr r28,r3
ffc0aa88: 4b ff fe 3c b ffc0a8c4 <_Objects_Extend_information+0xc4>
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
information->object_blocks,
block_count * sizeof(void*) );
ffc0aa8c: 56 d6 10 3a rlwinm r22,r22,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,
ffc0aa90: 80 9f 00 34 lwz r4,52(r31)
ffc0aa94: 7e c5 b3 78 mr r5,r22
ffc0aa98: 48 00 82 3d bl ffc12cd4 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
ffc0aa9c: 80 9f 00 30 lwz r4,48(r31)
ffc0aaa0: 7e c5 b3 78 mr r5,r22
ffc0aaa4: 7f 23 cb 78 mr r3,r25
ffc0aaa8: 48 00 82 2d bl ffc12cd4 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
ffc0aaac: a0 bf 00 10 lhz r5,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,
ffc0aab0: 80 9f 00 1c lwz r4,28(r31)
ffc0aab4: 7e e3 bb 78 mr r3,r23
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
ffc0aab8: 7c bd 2a 14 add r5,r29,r5
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
ffc0aabc: 54 a5 10 3a rlwinm r5,r5,2,0,29
ffc0aac0: 48 00 82 15 bl ffc12cd4 <memcpy>
ffc0aac4: 4b ff fe 60 b ffc0a924 <_Objects_Extend_information+0x124>
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc0aac8: a3 43 00 10 lhz r26,16(r3)
/*
* 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 );
ffc0aacc: 7f be eb 78 mr r30,r29
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc0aad0: a1 43 00 14 lhz r10,20(r3)
/*
* 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;
ffc0aad4: 3b 20 00 01 li r25,1
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
ffc0aad8: 3b 60 00 00 li r27,0
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
ffc0aadc: 3a c0 00 00 li r22,0
ffc0aae0: 4b ff fd b8 b ffc0a898 <_Objects_Extend_information+0x98>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
ffc0aae4: 7d 6a 5b 78 mr r10,r11 <== NOT EXECUTED
/*
* 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 );
ffc0aae8: 7f be eb 78 mr r30,r29 <== NOT EXECUTED
/*
* 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;
ffc0aaec: 3b 20 00 01 li r25,1 <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
ffc0aaf0: 3b 60 00 00 li r27,0 <== NOT EXECUTED
ffc0aaf4: 4b ff fd a4 b ffc0a898 <_Objects_Extend_information+0x98><== NOT EXECUTED
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
ffc0aaf8: 7d 6a 5b 78 mr r10,r11 <== NOT EXECUTED
/*
* 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 );
ffc0aafc: 7f be eb 78 mr r30,r29 <== NOT EXECUTED
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
ffc0ab00: 3b 20 00 00 li r25,0 <== NOT EXECUTED
* 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;
ffc0ab04: 3b 60 00 00 li r27,0 <== NOT EXECUTED
ffc0ab08: 4b ff fd 90 b ffc0a898 <_Objects_Extend_information+0x98><== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
ffc0ab0c: 7f 83 e3 78 mr r3,r28
ffc0ab10: 48 00 29 6d bl ffc0d47c <_Workspace_Free>
return;
ffc0ab14: 4b ff ff 2c b ffc0aa40 <_Objects_Extend_information+0x240>
ffc0ab18: 39 60 00 01 li r11,1 <== NOT EXECUTED
ffc0ab1c: 7d 69 03 a6 mtctr r11 <== NOT EXECUTED
ffc0ab20: 4b ff fe 44 b ffc0a964 <_Objects_Extend_information+0x164><== NOT EXECUTED
ffc0ac10 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
ffc0ac10: 94 21 ff e8 stwu r1,-24(r1)
ffc0ac14: 7c 08 02 a6 mflr r0
ffc0ac18: 93 c1 00 10 stw r30,16(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
ffc0ac1c: 7c 9e 23 79 mr. r30,r4
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
ffc0ac20: 93 a1 00 0c stw r29,12(r1)
ffc0ac24: 7c 7d 1b 78 mr r29,r3
ffc0ac28: 93 e1 00 14 stw r31,20(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
return NULL;
ffc0ac2c: 3b e0 00 00 li r31,0
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
ffc0ac30: 90 01 00 1c stw r0,28(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
ffc0ac34: 40 82 00 24 bne- ffc0ac58 <_Objects_Get_information+0x48>
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
ffc0ac38: 80 01 00 1c lwz r0,28(r1)
ffc0ac3c: 7f e3 fb 78 mr r3,r31
ffc0ac40: 83 a1 00 0c lwz r29,12(r1)
ffc0ac44: 7c 08 03 a6 mtlr r0
ffc0ac48: 83 c1 00 10 lwz r30,16(r1)
ffc0ac4c: 83 e1 00 14 lwz r31,20(r1)
ffc0ac50: 38 21 00 18 addi r1,r1,24
ffc0ac54: 4e 80 00 20 blr
/*
* 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 );
ffc0ac58: 48 00 51 71 bl ffc0fdc8 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
ffc0ac5c: 2c 03 00 00 cmpwi r3,0
ffc0ac60: 41 82 ff d8 beq+ ffc0ac38 <_Objects_Get_information+0x28>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
ffc0ac64: 7f 83 f0 40 cmplw cr7,r3,r30
ffc0ac68: 41 9c ff d0 blt+ cr7,ffc0ac38 <_Objects_Get_information+0x28>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
ffc0ac6c: 3d 20 00 00 lis r9,0
ffc0ac70: 57 bd 10 3a rlwinm r29,r29,2,0,29
ffc0ac74: 39 29 2b c0 addi r9,r9,11200
ffc0ac78: 7d 29 e8 2e lwzx r9,r9,r29
ffc0ac7c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ac80: 41 9e ff b8 beq+ cr7,ffc0ac38 <_Objects_Get_information+0x28><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
ffc0ac84: 57 de 10 3a rlwinm r30,r30,2,0,29
ffc0ac88: 7f e9 f0 2e lwzx r31,r9,r30
if ( !info )
ffc0ac8c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0ac90: 41 9e ff a8 beq+ cr7,ffc0ac38 <_Objects_Get_information+0x28><== 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 )
ffc0ac94: a0 1f 00 10 lhz r0,16(r31)
ffc0ac98: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ac9c: 40 9e ff 9c bne+ cr7,ffc0ac38 <_Objects_Get_information+0x28>
return NULL;
ffc0aca0: 3b e0 00 00 li r31,0
ffc0aca4: 4b ff ff 94 b ffc0ac38 <_Objects_Get_information+0x28>
ffc0cf34 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
ffc0cf34: 94 21 ff d8 stwu r1,-40(r1)
ffc0cf38: 7c 08 02 a6 mflr r0
ffc0cf3c: 93 c1 00 20 stw r30,32(r1)
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
ffc0cf40: 7c 9e 23 79 mr. r30,r4
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
ffc0cf44: 93 e1 00 24 stw r31,36(r1)
ffc0cf48: 7c bf 2b 78 mr r31,r5
ffc0cf4c: 90 01 00 2c stw r0,44(r1)
ffc0cf50: 93 a1 00 1c stw r29,28(r1)
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
ffc0cf54: 40 82 00 28 bne- ffc0cf7c <_Objects_Get_name_as_string+0x48>
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
ffc0cf58: 3b e0 00 00 li r31,0
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
ffc0cf5c: 80 01 00 2c lwz r0,44(r1)
ffc0cf60: 7f e3 fb 78 mr r3,r31
ffc0cf64: 83 a1 00 1c lwz r29,28(r1)
ffc0cf68: 7c 08 03 a6 mtlr r0
ffc0cf6c: 83 c1 00 20 lwz r30,32(r1)
ffc0cf70: 83 e1 00 24 lwz r31,36(r1)
ffc0cf74: 38 21 00 28 addi r1,r1,40
ffc0cf78: 4e 80 00 20 blr
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
ffc0cf7c: 2f 85 00 00 cmpwi cr7,r5,0
ffc0cf80: 41 9e ff dc beq+ cr7,ffc0cf5c <_Objects_Get_name_as_string+0x28>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
ffc0cf84: 2f 83 00 00 cmpwi cr7,r3,0
ffc0cf88: 7c 7d 1b 78 mr r29,r3
ffc0cf8c: 40 9e 00 10 bne- cr7,ffc0cf9c <_Objects_Get_name_as_string+0x68>
ffc0cf90: 3d 20 00 00 lis r9,0
ffc0cf94: 81 29 32 24 lwz r9,12836(r9)
ffc0cf98: 83 a9 00 08 lwz r29,8(r9)
information = _Objects_Get_information_id( tmpId );
ffc0cf9c: 7f a3 eb 78 mr r3,r29
ffc0cfa0: 4b ff fe 61 bl ffc0ce00 <_Objects_Get_information_id>
if ( !information )
ffc0cfa4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0cfa8: 41 9e ff b0 beq+ cr7,ffc0cf58 <_Objects_Get_name_as_string+0x24>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
ffc0cfac: 7f a4 eb 78 mr r4,r29
ffc0cfb0: 38 a1 00 08 addi r5,r1,8
ffc0cfb4: 48 00 00 a5 bl ffc0d058 <_Objects_Get>
switch ( location ) {
ffc0cfb8: 80 01 00 08 lwz r0,8(r1)
ffc0cfbc: 2f 80 00 00 cmpwi cr7,r0,0
ffc0cfc0: 40 be ff 98 bne- cr7,ffc0cf58 <_Objects_Get_name_as_string+0x24>
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
ffc0cfc4: 37 de ff ff addic. r30,r30,-1
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
ffc0cfc8: 81 63 00 0c lwz r11,12(r3)
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
ffc0cfcc: 98 01 00 10 stb r0,16(r1)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
ffc0cfd0: 7f e9 fb 78 mr r9,r31
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
ffc0cfd4: 55 60 46 3e rlwinm r0,r11,8,24,31
lname[ 1 ] = (u32_name >> 16) & 0xff;
ffc0cfd8: 55 68 84 3e rlwinm r8,r11,16,16,31
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
ffc0cfdc: 98 01 00 0c stb r0,12(r1)
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
ffc0cfe0: 55 6a c2 3e rlwinm r10,r11,24,8,31
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
ffc0cfe4: 99 01 00 0d stb r8,13(r1)
lname[ 2 ] = (u32_name >> 8) & 0xff;
ffc0cfe8: 99 41 00 0e stb r10,14(r1)
lname[ 3 ] = (u32_name >> 0) & 0xff;
ffc0cfec: 99 61 00 0f stb r11,15(r1)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
ffc0cff0: 41 82 00 58 beq- ffc0d048 <_Objects_Get_name_as_string+0x114><== NEVER TAKEN
ffc0cff4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0cff8: 41 9e 00 50 beq- cr7,ffc0d048 <_Objects_Get_name_as_string+0x114>
ffc0cffc: 3d 00 00 00 lis r8,0
*d = (isprint((unsigned char)*s)) ? *s : '*';
ffc0d000: 7f c9 03 a6 mtctr r30
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
ffc0d004: 39 60 00 00 li r11,0
ffc0d008: 39 08 27 ac addi r8,r8,10156
ffc0d00c: 48 00 00 14 b ffc0d020 <_Objects_Get_name_as_string+0xec>
ffc0d010: 39 41 00 0c addi r10,r1,12
ffc0d014: 7c 0a 58 ae lbzx r0,r10,r11
ffc0d018: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d01c: 41 9e 00 2c beq- cr7,ffc0d048 <_Objects_Get_name_as_string+0x114>
*d = (isprint((unsigned char)*s)) ? *s : '*';
ffc0d020: 81 48 00 00 lwz r10,0(r8)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
ffc0d024: 39 6b 00 01 addi r11,r11,1
*d = (isprint((unsigned char)*s)) ? *s : '*';
ffc0d028: 7d 4a 02 14 add r10,r10,r0
ffc0d02c: 89 4a 00 01 lbz r10,1(r10)
ffc0d030: 71 47 00 97 andi. r7,r10,151
ffc0d034: 40 82 00 08 bne- ffc0d03c <_Objects_Get_name_as_string+0x108>
ffc0d038: 38 00 00 2a li r0,42
ffc0d03c: 98 09 00 00 stb r0,0(r9)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
ffc0d040: 39 29 00 01 addi r9,r9,1
ffc0d044: 42 00 ff cc bdnz+ ffc0d010 <_Objects_Get_name_as_string+0xdc>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
ffc0d048: 38 00 00 00 li r0,0
ffc0d04c: 98 09 00 00 stb r0,0(r9)
_Thread_Enable_dispatch();
ffc0d050: 48 00 0f dd bl ffc0e02c <_Thread_Enable_dispatch>
return name;
ffc0d054: 4b ff ff 08 b ffc0cf5c <_Objects_Get_name_as_string+0x28>
ffc1eb48 <_Objects_Get_no_protection>:
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
ffc1eb48: 81 23 00 08 lwz r9,8(r3)
if ( information->maximum >= index ) {
ffc1eb4c: a0 03 00 10 lhz r0,16(r3)
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
ffc1eb50: 21 29 00 01 subfic r9,r9,1
ffc1eb54: 7d 29 22 14 add r9,r9,r4
if ( information->maximum >= index ) {
ffc1eb58: 7f 89 00 40 cmplw cr7,r9,r0
ffc1eb5c: 41 9d 00 24 bgt- cr7,ffc1eb80 <_Objects_Get_no_protection+0x38>
if ( (the_object = information->local_table[ index ]) != NULL ) {
ffc1eb60: 81 63 00 1c lwz r11,28(r3)
ffc1eb64: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc1eb68: 7c 6b 48 2e lwzx r3,r11,r9
ffc1eb6c: 2f 83 00 00 cmpwi cr7,r3,0
ffc1eb70: 41 9e 00 10 beq- cr7,ffc1eb80 <_Objects_Get_no_protection+0x38><== NEVER TAKEN
*location = OBJECTS_LOCAL;
ffc1eb74: 38 00 00 00 li r0,0
ffc1eb78: 90 05 00 00 stw r0,0(r5)
return the_object;
ffc1eb7c: 4e 80 00 20 blr
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
ffc1eb80: 38 00 00 01 li r0,1
ffc1eb84: 90 05 00 00 stw r0,0(r5)
return NULL;
ffc1eb88: 38 60 00 00 li r3,0
}
ffc1eb8c: 4e 80 00 20 blr
ffc0c8c8 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
ffc0c8c8: 94 21 ff e0 stwu r1,-32(r1)
ffc0c8cc: 7c 08 02 a6 mflr r0
ffc0c8d0: 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;
ffc0c8d4: 7c 60 1b 79 mr. r0,r3
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
ffc0c8d8: 93 c1 00 18 stw r30,24(r1)
ffc0c8dc: 7c 9e 23 78 mr r30,r4
ffc0c8e0: 93 e1 00 1c stw r31,28(r1)
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
ffc0c8e4: 40 82 00 10 bne- ffc0c8f4 <_Objects_Id_to_name+0x2c>
ffc0c8e8: 3d 20 00 00 lis r9,0
ffc0c8ec: 81 29 2d e4 lwz r9,11748(r9)
ffc0c8f0: 80 09 00 08 lwz r0,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);
ffc0c8f4: 54 09 47 7e rlwinm r9,r0,8,29,31
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
ffc0c8f8: 39 69 ff ff addi r11,r9,-1
ffc0c8fc: 2b 8b 00 02 cmplwi cr7,r11,2
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
ffc0c900: 3b e0 00 03 li r31,3
ffc0c904: 41 9d 00 50 bgt- cr7,ffc0c954 <_Objects_Id_to_name+0x8c>
if ( !_Objects_Information_table[ the_api ] )
ffc0c908: 3d 60 00 00 lis r11,0
ffc0c90c: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0c910: 39 6b 2c 00 addi r11,r11,11264
ffc0c914: 7d 2b 48 2e lwzx r9,r11,r9
ffc0c918: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c91c: 41 9e 00 38 beq- cr7,ffc0c954 <_Objects_Id_to_name+0x8c>
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
ffc0c920: 54 0b 3e 7a rlwinm r11,r0,7,25,29
ffc0c924: 7c 69 58 2e lwzx r3,r9,r11
if ( !information )
ffc0c928: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c92c: 41 9e 00 28 beq- cr7,ffc0c954 <_Objects_Id_to_name+0x8c><== 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 );
ffc0c930: 7c 04 03 78 mr r4,r0
ffc0c934: 38 a1 00 08 addi r5,r1,8
ffc0c938: 4b ff fe f5 bl ffc0c82c <_Objects_Get>
if ( !the_object )
ffc0c93c: 2c 03 00 00 cmpwi r3,0
ffc0c940: 41 82 00 14 beq- ffc0c954 <_Objects_Id_to_name+0x8c>
return OBJECTS_INVALID_ID;
*name = the_object->name;
ffc0c944: 80 03 00 0c lwz r0,12(r3)
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
ffc0c948: 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;
ffc0c94c: 90 1e 00 00 stw r0,0(r30)
_Thread_Enable_dispatch();
ffc0c950: 48 00 0f 59 bl ffc0d8a8 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
ffc0c954: 80 01 00 24 lwz r0,36(r1)
ffc0c958: 7f e3 fb 78 mr r3,r31
ffc0c95c: 83 c1 00 18 lwz r30,24(r1)
ffc0c960: 7c 08 03 a6 mtlr r0
ffc0c964: 83 e1 00 1c lwz r31,28(r1)
ffc0c968: 38 21 00 20 addi r1,r1,32
ffc0c96c: 4e 80 00 20 blr
ffc0af24 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc0af24: 94 21 ff e8 stwu r1,-24(r1)
ffc0af28: 7c 08 02 a6 mflr r0
ffc0af2c: 90 01 00 1c stw r0,28(r1)
ffc0af30: 93 e1 00 14 stw r31,20(r1)
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
ffc0af34: a1 43 00 10 lhz r10,16(r3)
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
ffc0af38: a3 e3 00 0a lhz r31,10(r3)
block_count = (information->maximum - index_base) /
ffc0af3c: a0 03 00 14 lhz r0,20(r3)
ffc0af40: 7d 5f 50 50 subf r10,r31,r10
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc0af44: 93 81 00 08 stw r28,8(r1)
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
ffc0af48: 7d 4a 03 96 divwu r10,r10,r0
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc0af4c: 93 a1 00 0c stw r29,12(r1)
ffc0af50: 93 c1 00 10 stw r30,16(r1)
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
ffc0af54: 2f 8a 00 00 cmpwi cr7,r10,0
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc0af58: 7c 7c 1b 78 mr r28,r3
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
ffc0af5c: 41 9e 00 3c beq- cr7,ffc0af98 <_Objects_Shrink_information+0x74><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
ffc0af60: 81 63 00 30 lwz r11,48(r3)
ffc0af64: 81 2b 00 00 lwz r9,0(r11)
ffc0af68: 7f 80 48 00 cmpw cr7,r0,r9
ffc0af6c: 41 9e 00 4c beq- cr7,ffc0afb8 <_Objects_Shrink_information+0x94><== NEVER TAKEN
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
ffc0af70: 39 20 00 00 li r9,0
ffc0af74: 7d 49 03 a6 mtctr r10
ffc0af78: 48 00 00 18 b ffc0af90 <_Objects_Shrink_information+0x6c>
if ( information->inactive_per_block[ block ] ==
ffc0af7c: 85 4b 00 04 lwzu r10,4(r11)
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
ffc0af80: 7f ff 02 14 add r31,r31,r0
ffc0af84: 55 3d 10 3a rlwinm r29,r9,2,0,29
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
ffc0af88: 7f 80 50 00 cmpw cr7,r0,r10
ffc0af8c: 41 9e 00 30 beq- cr7,ffc0afbc <_Objects_Shrink_information+0x98>
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
ffc0af90: 39 29 00 01 addi r9,r9,1
ffc0af94: 42 00 ff e8 bdnz+ ffc0af7c <_Objects_Shrink_information+0x58>
return;
}
index_base += information->allocation_size;
}
}
ffc0af98: 80 01 00 1c lwz r0,28(r1)
ffc0af9c: 83 81 00 08 lwz r28,8(r1)
ffc0afa0: 7c 08 03 a6 mtlr r0
ffc0afa4: 83 a1 00 0c lwz r29,12(r1)
ffc0afa8: 83 c1 00 10 lwz r30,16(r1)
ffc0afac: 83 e1 00 14 lwz r31,20(r1)
ffc0afb0: 38 21 00 18 addi r1,r1,24
ffc0afb4: 4e 80 00 20 blr
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
ffc0afb8: 3b a0 00 00 li r29,0 <== NOT EXECUTED
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
ffc0afbc: 80 7c 00 20 lwz r3,32(r28)
ffc0afc0: 48 00 00 10 b ffc0afd0 <_Objects_Shrink_information+0xac>
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
ffc0afc4: 2f 9e 00 00 cmpwi cr7,r30,0
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
ffc0afc8: 7f c3 f3 78 mr r3,r30
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
ffc0afcc: 41 9e 00 34 beq- cr7,ffc0b000 <_Objects_Shrink_information+0xdc>
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
do {
index = _Objects_Get_index( the_object->id );
ffc0afd0: a0 03 00 0a lhz r0,10(r3)
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
ffc0afd4: 83 c3 00 00 lwz r30,0(r3)
if ((index >= index_base) &&
ffc0afd8: 7f 80 f8 40 cmplw cr7,r0,r31
ffc0afdc: 41 bc ff e8 blt- cr7,ffc0afc4 <_Objects_Shrink_information+0xa0>
(index < (index_base + information->allocation_size))) {
ffc0afe0: a1 3c 00 14 lhz r9,20(r28)
ffc0afe4: 7d 3f 4a 14 add r9,r31,r9
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
ffc0afe8: 7f 80 48 40 cmplw cr7,r0,r9
ffc0afec: 40 9c ff d8 bge+ cr7,ffc0afc4 <_Objects_Shrink_information+0xa0>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
ffc0aff0: 4b ff eb 49 bl ffc09b38 <_Chain_Extract>
}
}
while ( the_object );
ffc0aff4: 2f 9e 00 00 cmpwi cr7,r30,0
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
ffc0aff8: 7f c3 f3 78 mr r3,r30
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
ffc0affc: 40 9e ff d4 bne+ cr7,ffc0afd0 <_Objects_Shrink_information+0xac><== ALWAYS TAKEN
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
ffc0b000: 81 3c 00 34 lwz r9,52(r28)
ffc0b004: 7c 69 e8 2e lwzx r3,r9,r29
ffc0b008: 48 00 24 75 bl ffc0d47c <_Workspace_Free>
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
ffc0b00c: a1 5c 00 2c lhz r10,44(r28)
ffc0b010: a0 1c 00 14 lhz r0,20(r28)
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
ffc0b014: 81 7c 00 34 lwz r11,52(r28)
information->inactive_per_block[ block ] = 0;
ffc0b018: 81 3c 00 30 lwz r9,48(r28)
information->inactive -= information->allocation_size;
ffc0b01c: 7c 00 50 50 subf r0,r0,r10
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
ffc0b020: 7f cb e9 2e stwx r30,r11,r29
information->inactive_per_block[ block ] = 0;
ffc0b024: 7f c9 e9 2e stwx r30,r9,r29
information->inactive -= information->allocation_size;
ffc0b028: b0 1c 00 2c sth r0,44(r28)
return;
}
index_base += information->allocation_size;
}
}
ffc0b02c: 80 01 00 1c lwz r0,28(r1)
ffc0b030: 83 81 00 08 lwz r28,8(r1)
ffc0b034: 7c 08 03 a6 mtlr r0
ffc0b038: 83 a1 00 0c lwz r29,12(r1)
ffc0b03c: 83 c1 00 10 lwz r30,16(r1)
ffc0b040: 83 e1 00 14 lwz r31,20(r1)
ffc0b044: 38 21 00 18 addi r1,r1,24
ffc0b048: 4e 80 00 20 blr
ffc09298 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
ffc09298: 94 21 ff d8 stwu r1,-40(r1)
ffc0929c: 7c 08 02 a6 mflr r0
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
ffc092a0: 3d 20 00 00 lis r9,0
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
ffc092a4: 90 01 00 2c stw r0,44(r1)
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
ffc092a8: 39 29 20 a0 addi r9,r9,8352
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
ffc092ac: 93 e1 00 24 stw r31,36(r1)
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
ffc092b0: 83 e9 00 2c lwz r31,44(r9)
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
ffc092b4: 93 a1 00 1c stw r29,28(r1)
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
ffc092b8: 2f 9f 00 00 cmpwi cr7,r31,0
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
ffc092bc: 93 81 00 18 stw r28,24(r1)
ffc092c0: 93 c1 00 20 stw r30,32(r1)
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
ffc092c4: 83 a9 00 28 lwz r29,40(r9)
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
ffc092c8: 41 9e 00 60 beq- cr7,ffc09328 <_RTEMS_tasks_Initialize_user_tasks_body+0x90>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
ffc092cc: 2f 9d 00 00 cmpwi cr7,r29,0
ffc092d0: 41 9e 00 58 beq- cr7,ffc09328 <_RTEMS_tasks_Initialize_user_tasks_body+0x90><== NEVER TAKEN
ffc092d4: 3b c0 00 00 li r30,0
ffc092d8: 3b 81 00 08 addi r28,r1,8
return_value = rtems_task_create(
ffc092dc: 80 bf 00 04 lwz r5,4(r31)
ffc092e0: 7f 88 e3 78 mr r8,r28
ffc092e4: 80 7f 00 00 lwz r3,0(r31)
ffc092e8: 80 9f 00 08 lwz r4,8(r31)
ffc092ec: 80 df 00 14 lwz r6,20(r31)
ffc092f0: 80 ff 00 0c lwz r7,12(r31)
ffc092f4: 4b ff fc b1 bl ffc08fa4 <rtems_task_create>
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
ffc092f8: 7c 65 1b 79 mr. r5,r3
ffc092fc: 40 82 00 4c bne- ffc09348 <_RTEMS_tasks_Initialize_user_tasks_body+0xb0>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
ffc09300: 80 bf 00 18 lwz r5,24(r31)
ffc09304: 80 61 00 08 lwz r3,8(r1)
ffc09308: 80 9f 00 10 lwz r4,16(r31)
ffc0930c: 48 00 00 49 bl ffc09354 <rtems_task_start>
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
ffc09310: 7c 65 1b 79 mr. r5,r3
ffc09314: 40 82 00 34 bne- ffc09348 <_RTEMS_tasks_Initialize_user_tasks_body+0xb0>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
ffc09318: 3b de 00 01 addi r30,r30,1
ffc0931c: 7f 9d f0 40 cmplw cr7,r29,r30
ffc09320: 3b ff 00 1c addi r31,r31,28
ffc09324: 41 9d ff b8 bgt+ cr7,ffc092dc <_RTEMS_tasks_Initialize_user_tasks_body+0x44><== NEVER TAKEN
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
}
}
ffc09328: 80 01 00 2c lwz r0,44(r1)
ffc0932c: 83 81 00 18 lwz r28,24(r1)
ffc09330: 7c 08 03 a6 mtlr r0
ffc09334: 83 a1 00 1c lwz r29,28(r1)
ffc09338: 83 c1 00 20 lwz r30,32(r1)
ffc0933c: 83 e1 00 24 lwz r31,36(r1)
ffc09340: 38 21 00 28 addi r1,r1,40
ffc09344: 4e 80 00 20 blr
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
ffc09348: 38 60 00 01 li r3,1
ffc0934c: 38 80 00 01 li r4,1
ffc09350: 48 00 13 5d bl ffc0a6ac <_Internal_error_Occurred>
ffc0f470 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
ffc0f470: 94 21 ff d8 stwu r1,-40(r1)
ffc0f474: 7c 08 02 a6 mflr r0
ffc0f478: 90 01 00 2c stw r0,44(r1)
ffc0f47c: 93 e1 00 24 stw r31,36(r1)
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
ffc0f480: 83 e3 01 2c lwz r31,300(r3)
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
ffc0f484: 93 a1 00 1c stw r29,28(r1)
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
if ( !api )
ffc0f488: 2f 9f 00 00 cmpwi cr7,r31,0
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
ffc0f48c: 93 c1 00 20 stw r30,32(r1)
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
if ( !api )
ffc0f490: 41 9e 00 80 beq- cr7,ffc0f510 <_RTEMS_tasks_Post_switch_extension+0xa0><== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0f494: 7c 00 00 a6 mfmsr r0
ffc0f498: 7d 30 42 a6 mfsprg r9,0
ffc0f49c: 7c 09 48 78 andc r9,r0,r9
ffc0f4a0: 7d 20 01 24 mtmsr r9
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
asr->signals_posted = 0;
ffc0f4a4: 39 20 00 00 li r9,0
*/
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
ffc0f4a8: 83 df 00 14 lwz r30,20(r31)
asr->signals_posted = 0;
ffc0f4ac: 91 3f 00 14 stw r9,20(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0f4b0: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
ffc0f4b4: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0f4b8: 41 be 00 58 beq+ cr7,ffc0f510 <_RTEMS_tasks_Post_switch_extension+0xa0>
return;
asr->nest_level += 1;
ffc0f4bc: 81 3f 00 1c lwz r9,28(r31)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0f4c0: 3b a1 00 08 addi r29,r1,8
ffc0f4c4: 38 80 00 00 li r4,0
ffc0f4c8: 80 7f 00 10 lwz r3,16(r31)
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
ffc0f4cc: 38 09 00 01 addi r0,r9,1
ffc0f4d0: 90 1f 00 1c stw r0,28(r31)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0f4d4: 60 84 ff ff ori r4,r4,65535
ffc0f4d8: 7f a5 eb 78 mr r5,r29
ffc0f4dc: 48 00 25 c9 bl ffc11aa4 <rtems_task_mode>
(*asr->handler)( signal_set );
ffc0f4e0: 80 1f 00 0c lwz r0,12(r31)
ffc0f4e4: 7f c3 f3 78 mr r3,r30
ffc0f4e8: 7c 09 03 a6 mtctr r0
ffc0f4ec: 4e 80 04 21 bctrl
asr->nest_level -= 1;
ffc0f4f0: 81 3f 00 1c lwz r9,28(r31)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0f4f4: 38 80 00 00 li r4,0
ffc0f4f8: 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;
ffc0f4fc: 38 09 ff ff addi r0,r9,-1
ffc0f500: 90 1f 00 1c stw r0,28(r31)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0f504: 60 84 ff ff ori r4,r4,65535
ffc0f508: 7f a5 eb 78 mr r5,r29
ffc0f50c: 48 00 25 99 bl ffc11aa4 <rtems_task_mode>
}
ffc0f510: 80 01 00 2c lwz r0,44(r1)
ffc0f514: 83 a1 00 1c lwz r29,28(r1)
ffc0f518: 7c 08 03 a6 mtlr r0
ffc0f51c: 83 c1 00 20 lwz r30,32(r1)
ffc0f520: 83 e1 00 24 lwz r31,36(r1)
ffc0f524: 38 21 00 28 addi r1,r1,40
ffc0f528: 4e 80 00 20 blr
ffc0f3e0 <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
ffc0f3e0: 81 23 01 38 lwz r9,312(r3)
while (tvp) {
ffc0f3e4: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f3e8: 41 9e 00 24 beq- cr7,ffc0f40c <_RTEMS_tasks_Switch_extension+0x2c>
tvp->tval = *tvp->ptr;
ffc0f3ec: 81 69 00 04 lwz r11,4(r9)
*tvp->ptr = tvp->gval;
ffc0f3f0: 80 09 00 08 lwz r0,8(r9)
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
ffc0f3f4: 81 4b 00 00 lwz r10,0(r11)
ffc0f3f8: 91 49 00 0c stw r10,12(r9)
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
ffc0f3fc: 81 29 00 00 lwz r9,0(r9)
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
ffc0f400: 90 0b 00 00 stw r0,0(r11)
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
ffc0f404: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f408: 40 9e ff e4 bne+ cr7,ffc0f3ec <_RTEMS_tasks_Switch_extension+0xc><== NEVER TAKEN
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
ffc0f40c: 81 24 01 38 lwz r9,312(r4)
while (tvp) {
ffc0f410: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f414: 4d 9e 00 20 beqlr cr7
tvp->gval = *tvp->ptr;
ffc0f418: 81 69 00 04 lwz r11,4(r9)
*tvp->ptr = tvp->tval;
ffc0f41c: 80 09 00 0c lwz r0,12(r9)
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
tvp->gval = *tvp->ptr;
ffc0f420: 81 4b 00 00 lwz r10,0(r11)
ffc0f424: 91 49 00 08 stw r10,8(r9)
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
ffc0f428: 81 29 00 00 lwz r9,0(r9)
}
tvp = heir->task_variables;
while (tvp) {
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
ffc0f42c: 90 0b 00 00 stw r0,0(r11)
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
ffc0f430: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f434: 40 9e ff e4 bne+ cr7,ffc0f418 <_RTEMS_tasks_Switch_extension+0x38><== NEVER TAKEN
ffc0f438: 4e 80 00 20 blr
ffc0a86c <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
ffc0a86c: 94 21 ff e0 stwu r1,-32(r1)
ffc0a870: 7c 08 02 a6 mflr r0
ffc0a874: 7c 64 1b 78 mr r4,r3
ffc0a878: 3c 60 00 00 lis r3,0
ffc0a87c: 90 01 00 24 stw r0,36(r1)
ffc0a880: 38 63 2c 00 addi r3,r3,11264
ffc0a884: 38 a1 00 08 addi r5,r1,8
ffc0a888: 93 e1 00 1c stw r31,28(r1)
ffc0a88c: 48 00 27 b9 bl ffc0d044 <_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 ) {
ffc0a890: 80 01 00 08 lwz r0,8(r1)
ffc0a894: 7c 7f 1b 78 mr r31,r3
ffc0a898: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a89c: 40 9e 00 48 bne- cr7,ffc0a8e4 <_Rate_monotonic_Timeout+0x78><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
ffc0a8a0: 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);
ffc0a8a4: 80 03 00 10 lwz r0,16(r3)
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
ffc0a8a8: 70 09 40 00 andi. r9,r0,16384
ffc0a8ac: 41 82 00 14 beq- ffc0a8c0 <_Rate_monotonic_Timeout+0x54>
ffc0a8b0: 81 23 00 20 lwz r9,32(r3)
ffc0a8b4: 80 1f 00 08 lwz r0,8(r31)
ffc0a8b8: 7f 89 00 00 cmpw cr7,r9,r0
ffc0a8bc: 41 9e 00 68 beq- cr7,ffc0a924 <_Rate_monotonic_Timeout+0xb8>
_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 ) {
ffc0a8c0: 80 1f 00 38 lwz r0,56(r31)
ffc0a8c4: 2f 80 00 01 cmpwi cr7,r0,1
ffc0a8c8: 41 9e 00 30 beq- cr7,ffc0a8f8 <_Rate_monotonic_Timeout+0x8c>
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
ffc0a8cc: 38 00 00 04 li r0,4
ffc0a8d0: 90 1f 00 38 stw r0,56(r31)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
ffc0a8d4: 3d 20 00 00 lis r9,0
ffc0a8d8: 81 69 28 08 lwz r11,10248(r9)
ffc0a8dc: 38 0b ff ff addi r0,r11,-1
ffc0a8e0: 90 09 28 08 stw r0,10248(r9)
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
ffc0a8e4: 80 01 00 24 lwz r0,36(r1)
ffc0a8e8: 83 e1 00 1c lwz r31,28(r1)
ffc0a8ec: 38 21 00 20 addi r1,r1,32
ffc0a8f0: 7c 08 03 a6 mtlr r0
ffc0a8f4: 4e 80 00 20 blr
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
ffc0a8f8: 38 00 00 03 li r0,3
ffc0a8fc: 90 1f 00 38 stw r0,56(r31)
_Rate_monotonic_Initiate_statistics( the_period );
ffc0a900: 7f e3 fb 78 mr r3,r31
ffc0a904: 4b ff f7 55 bl ffc0a058 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc0a908: 80 1f 00 3c lwz r0,60(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a90c: 3c 60 00 00 lis r3,0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc0a910: 90 1f 00 1c stw r0,28(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a914: 38 63 2d c8 addi r3,r3,11720
ffc0a918: 38 9f 00 10 addi r4,r31,16
ffc0a91c: 48 00 4b 71 bl ffc0f48c <_Watchdog_Insert>
ffc0a920: 4b ff ff b4 b ffc0a8d4 <_Rate_monotonic_Timeout+0x68>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc0a924: 3c 80 10 03 lis r4,4099
ffc0a928: 60 84 ff f8 ori r4,r4,65528
ffc0a92c: 48 00 32 49 bl ffc0db74 <_Thread_Clear_state>
ffc0a930: 4b ff ff d0 b ffc0a900 <_Rate_monotonic_Timeout+0x94>
ffc0b17c <_Scheduler_priority_Block>:
)
{
Scheduler_priority_Per_thread *sched_info;
Chain_Control *ready;
sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
ffc0b17c: 81 63 00 8c lwz r11,140(r3)
ready = sched_info->ready_chain;
ffc0b180: 81 2b 00 00 lwz r9,0(r11)
if ( _Chain_Has_only_one_node( ready ) ) {
ffc0b184: 81 49 00 00 lwz r10,0(r9)
ffc0b188: 80 09 00 08 lwz r0,8(r9)
ffc0b18c: 7f 8a 00 00 cmpw cr7,r10,r0
ffc0b190: 41 9e 00 ac beq- cr7,ffc0b23c <_Scheduler_priority_Block+0xc0>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0b194: 81 63 00 00 lwz r11,0(r3)
previous = the_node->previous;
ffc0b198: 81 23 00 04 lwz r9,4(r3)
next->previous = previous;
ffc0b19c: 91 2b 00 04 stw r9,4(r11)
previous->next = next;
ffc0b1a0: 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 );
ffc0b1a4: 3d 20 00 00 lis r9,0
ffc0b1a8: 39 29 2d 98 addi r9,r9,11672
{
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
ffc0b1ac: 80 09 00 10 lwz r0,16(r9)
ffc0b1b0: 7f 83 00 00 cmpw cr7,r3,r0
ffc0b1b4: 41 9e 00 1c beq- cr7,ffc0b1d0 <_Scheduler_priority_Block+0x54>
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
ffc0b1b8: 80 09 00 0c lwz r0,12(r9)
ffc0b1bc: 7f 83 00 00 cmpw cr7,r3,r0
ffc0b1c0: 4c be 00 20 bnelr+ cr7
_Thread_Dispatch_necessary = true;
ffc0b1c4: 38 00 00 01 li r0,1
ffc0b1c8: 98 09 00 18 stb r0,24(r9)
ffc0b1cc: 4e 80 00 20 blr
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 );
ffc0b1d0: 3c a0 00 00 lis r5,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
ffc0b1d4: 3d 40 00 00 lis r10,0
ffc0b1d8: 81 65 27 ec lwz r11,10220(r5)
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
ffc0b1dc: 81 4a 20 04 lwz r10,8196(r10)
ffc0b1e0: 7d 66 00 34 cntlzw r6,r11
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0b1e4: 3c e0 00 00 lis r7,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 );
ffc0b1e8: 91 65 27 ec stw r11,10220(r5)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0b1ec: 38 e7 2d c0 addi r7,r7,11712
ffc0b1f0: 54 c8 10 3a rlwinm r8,r6,2,0,29
ffc0b1f4: 7c 07 40 2e lwzx r0,r7,r8
ffc0b1f8: 7c 0b 00 34 cntlzw r11,r0
return (_Priority_Bits_index( major ) << 4) +
ffc0b1fc: 54 c6 20 36 rlwinm r6,r6,4,0,27
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0b200: 7c 07 41 2e stwx r0,r7,r8
return (_Priority_Bits_index( major ) << 4) +
ffc0b204: 7d 66 5a 14 add r11,r6,r11
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
ffc0b208: 1d 6b 00 0c mulli r11,r11,12
ffc0b20c: 7d 0a 5a 14 add r8,r10,r11
}
ffc0b210: 7d 6a 58 2e lwzx r11,r10,r11
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0b214: 38 08 00 04 addi r0,r8,4
ffc0b218: 7f 8b 00 00 cmpw cr7,r11,r0
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
ffc0b21c: 38 00 00 00 li r0,0
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
ffc0b220: 41 9e 00 08 beq- cr7,ffc0b228 <_Scheduler_priority_Block+0xac><== NEVER TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
ffc0b224: 7d 60 5b 78 mr r0,r11
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
ffc0b228: 90 09 00 10 stw r0,16(r9)
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
ffc0b22c: 80 09 00 0c lwz r0,12(r9)
ffc0b230: 7f 83 00 00 cmpw cr7,r3,r0
ffc0b234: 4c be 00 20 bnelr+ cr7
ffc0b238: 4b ff ff 8c b ffc0b1c4 <_Scheduler_priority_Block+0x48>
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 );
ffc0b23c: 38 09 00 04 addi r0,r9,4
head->next = tail;
head->previous = NULL;
tail->previous = head;
ffc0b240: 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;
ffc0b244: 90 09 00 00 stw r0,0(r9)
head->previous = NULL;
ffc0b248: 38 00 00 00 li r0,0
ffc0b24c: 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;
ffc0b250: 81 2b 00 04 lwz r9,4(r11)
ffc0b254: 80 0b 00 14 lwz r0,20(r11)
ffc0b258: 81 49 00 00 lwz r10,0(r9)
ffc0b25c: 7d 40 00 38 and r0,r10,r0
if ( *the_priority_map->minor == 0 )
ffc0b260: 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;
ffc0b264: 90 09 00 00 stw r0,0(r9)
if ( *the_priority_map->minor == 0 )
ffc0b268: 40 be ff 3c bne- cr7,ffc0b1a4 <_Scheduler_priority_Block+0x28>
_Priority_Major_bit_map &= the_priority_map->block_major;
ffc0b26c: 3d 20 00 00 lis r9,0
ffc0b270: 80 0b 00 10 lwz r0,16(r11)
ffc0b274: 81 49 27 ec lwz r10,10220(r9)
ffc0b278: 7d 40 00 38 and r0,r10,r0
ffc0b27c: 90 09 27 ec stw r0,10220(r9)
ffc0b280: 4b ff ff 24 b ffc0b1a4 <_Scheduler_priority_Block+0x28>
ffc0b444 <_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 );
ffc0b444: 3c c0 00 00 lis r6,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
ffc0b448: 3d 60 00 00 lis r11,0
ffc0b44c: 81 26 27 ec lwz r9,10220(r6)
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
ffc0b450: 81 6b 20 04 lwz r11,8196(r11)
ffc0b454: 7d 27 00 34 cntlzw r7,r9
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0b458: 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 );
ffc0b45c: 91 26 27 ec stw r9,10220(r6)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0b460: 39 08 2d c0 addi r8,r8,11712
ffc0b464: 54 ea 10 3a rlwinm r10,r7,2,0,29
ffc0b468: 7c 08 50 2e lwzx r0,r8,r10
ffc0b46c: 7c 06 00 34 cntlzw r6,r0
return (_Priority_Bits_index( major ) << 4) +
ffc0b470: 54 e9 20 36 rlwinm r9,r7,4,0,27
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0b474: 7c 08 51 2e stwx r0,r8,r10
return (_Priority_Bits_index( major ) << 4) +
ffc0b478: 7d 29 32 14 add r9,r9,r6
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
ffc0b47c: 1d 29 00 0c mulli r9,r9,12
ffc0b480: 7d 4b 4a 14 add r10,r11,r9
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Schedule(void)
{
_Scheduler_priority_Schedule_body();
}
ffc0b484: 7d 2b 48 2e lwzx r9,r11,r9
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0b488: 38 0a 00 04 addi r0,r10,4
ffc0b48c: 7f 89 00 00 cmpw cr7,r9,r0
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
ffc0b490: 38 00 00 00 li r0,0
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
ffc0b494: 41 9e 00 08 beq- cr7,ffc0b49c <_Scheduler_priority_Schedule+0x58><== NEVER TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
ffc0b498: 7d 20 4b 78 mr r0,r9
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
ffc0b49c: 3d 20 00 00 lis r9,0
ffc0b4a0: 90 09 2d a8 stw r0,11688(r9)
ffc0b4a4: 4e 80 00 20 blr
ffc0b5a0 <_Scheduler_priority_Yield>:
Scheduler_priority_Per_thread *sched_info;
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ffc0b5a0: 3d 40 00 00 lis r10,0
ffc0b5a4: 39 4a 2d 98 addi r10,r10,11672
ffc0b5a8: 81 2a 00 0c lwz r9,12(r10)
sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info;
ready = sched_info->ready_chain;
ffc0b5ac: 81 69 00 8c lwz r11,140(r9)
ffc0b5b0: 81 6b 00 00 lwz r11,0(r11)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0b5b4: 7c 00 00 a6 mfmsr r0
ffc0b5b8: 7d 10 42 a6 mfsprg r8,0
ffc0b5bc: 7c 08 40 78 andc r8,r0,r8
ffc0b5c0: 7d 00 01 24 mtmsr r8
_ISR_Disable( level );
if ( !_Chain_Has_only_one_node( ready ) ) {
ffc0b5c4: 80 eb 00 00 lwz r7,0(r11)
ffc0b5c8: 81 0b 00 08 lwz r8,8(r11)
ffc0b5cc: 7f 87 40 00 cmpw cr7,r7,r8
ffc0b5d0: 41 9e 00 60 beq- cr7,ffc0b630 <_Scheduler_priority_Yield+0x90>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0b5d4: 80 c9 00 00 lwz r6,0(r9)
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
ffc0b5d8: 38 ab 00 04 addi r5,r11,4
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
ffc0b5dc: 80 e9 00 04 lwz r7,4(r9)
next->previous = previous;
ffc0b5e0: 90 e6 00 04 stw r7,4(r6)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc0b5e4: 81 0b 00 08 lwz r8,8(r11)
the_node->next = tail;
tail->previous = the_node;
ffc0b5e8: 91 2b 00 08 stw r9,8(r11)
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
previous->next = next;
ffc0b5ec: 90 c7 00 00 stw r6,0(r7)
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
old_last->next = the_node;
the_node->previous = old_last;
ffc0b5f0: 91 09 00 04 stw r8,4(r9)
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
ffc0b5f4: 90 a9 00 00 stw r5,0(r9)
tail->previous = the_node;
old_last->next = the_node;
ffc0b5f8: 91 28 00 00 stw r9,0(r8)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc0b5fc: 7d 00 00 a6 mfmsr r8
ffc0b600: 7c 00 01 24 mtmsr r0
ffc0b604: 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 ) )
ffc0b608: 81 0a 00 10 lwz r8,16(r10)
ffc0b60c: 7f 89 40 00 cmpw cr7,r9,r8
ffc0b610: 41 9e 00 14 beq- cr7,ffc0b624 <_Scheduler_priority_Yield+0x84><== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Thread_Dispatch_necessary = true;
ffc0b614: 39 20 00 01 li r9,1
ffc0b618: 99 2a 00 18 stb r9,24(r10)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0b61c: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
}
ffc0b620: 4e 80 00 20 blr
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
ffc0b624: 81 2b 00 00 lwz r9,0(r11)
ffc0b628: 91 2a 00 10 stw r9,16(r10)
ffc0b62c: 4b ff ff e8 b ffc0b614 <_Scheduler_priority_Yield+0x74>
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
ffc0b630: 81 6a 00 10 lwz r11,16(r10)
ffc0b634: 7f 89 58 00 cmpw cr7,r9,r11
ffc0b638: 40 9e ff dc bne+ cr7,ffc0b614 <_Scheduler_priority_Yield+0x74><== NEVER TAKEN
ffc0b63c: 4b ff ff e0 b ffc0b61c <_Scheduler_priority_Yield+0x7c>
ffc0ba28 <_Scheduler_simple_Ready_queue_Enqueue_first>:
{
Chain_Control *ready;
Chain_Node *the_node;
Thread_Control *current;
ready = (Chain_Control *)_Scheduler.information;
ffc0ba28: 3d 20 00 00 lis r9,0
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
ffc0ba2c: 81 63 00 14 lwz r11,20(r3)
}
}
/* enqueue */
_Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node );
}
ffc0ba30: 81 29 20 04 lwz r9,8196(r9)
ffc0ba34: 81 29 00 00 lwz r9,0(r9)
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
ffc0ba38: 80 09 00 14 lwz r0,20(r9)
ffc0ba3c: 7f 8b 00 40 cmplw cr7,r11,r0
ffc0ba40: 40 9d 00 14 ble- cr7,ffc0ba54 <_Scheduler_simple_Ready_queue_Enqueue_first+0x2c>
* Do NOT need to check for end of chain because there is always
* at least one task on the ready chain -- the IDLE task. It can
* never block, should never attempt to obtain a semaphore or mutex,
* and thus will always be there.
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
ffc0ba44: 81 29 00 00 lwz r9,0(r9)
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
ffc0ba48: 80 09 00 14 lwz r0,20(r9)
ffc0ba4c: 7f 80 58 40 cmplw cr7,r0,r11
ffc0ba50: 41 9c ff f4 blt+ cr7,ffc0ba44 <_Scheduler_simple_Ready_queue_Enqueue_first+0x1c><== NEVER TAKEN
current = (Thread_Control *)current->Object.Node.previous;
ffc0ba54: 81 29 00 04 lwz r9,4(r9)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
ffc0ba58: 81 69 00 00 lwz r11,0(r9)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc0ba5c: 91 23 00 04 stw r9,4(r3)
before_node = after_node->next;
after_node->next = the_node;
ffc0ba60: 90 69 00 00 stw r3,0(r9)
the_node->next = before_node;
before_node->previous = the_node;
ffc0ba64: 90 6b 00 04 stw r3,4(r11)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
ffc0ba68: 91 63 00 00 stw r11,0(r3)
}
}
/* enqueue */
_Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node );
}
ffc0ba6c: 4e 80 00 20 blr
ffc0a188 <_TOD_Tickle_ticks>:
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
ffc0a188: 3d 20 00 00 lis r9,0
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
ffc0a18c: 94 21 ff d8 stwu r1,-40(r1)
ffc0a190: 7c 08 02 a6 mflr r0
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
ffc0a194: 3c 60 00 00 lis r3,0
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
ffc0a198: 81 69 20 dc lwz r11,8412(r9)
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
ffc0a19c: 3d 20 00 00 lis r9,0
ffc0a1a0: 81 49 27 e0 lwz r10,10208(r9)
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
ffc0a1a4: 38 63 27 ac addi r3,r3,10156
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
ffc0a1a8: 1d 6b 03 e8 mulli r11,r11,1000
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
ffc0a1ac: 93 e1 00 24 stw r31,36(r1)
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
ffc0a1b0: 3b e1 00 08 addi r31,r1,8
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
ffc0a1b4: 90 01 00 2c stw r0,44(r1)
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
ffc0a1b8: 7f e4 fb 78 mr r4,r31
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
ffc0a1bc: 38 0a 00 01 addi r0,r10,1
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
ffc0a1c0: 91 61 00 0c stw r11,12(r1)
ffc0a1c4: 39 40 00 00 li r10,0
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
ffc0a1c8: 90 09 27 e0 stw r0,10208(r9)
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
ffc0a1cc: 91 41 00 08 stw r10,8(r1)
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
ffc0a1d0: 48 00 28 f5 bl ffc0cac4 <_Timespec_Add_to>
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
ffc0a1d4: 3c 60 00 00 lis r3,0
ffc0a1d8: 38 63 27 bc addi r3,r3,10172
ffc0a1dc: 7f e4 fb 78 mr r4,r31
ffc0a1e0: 48 00 28 e5 bl ffc0cac4 <_Timespec_Add_to>
while ( seconds ) {
ffc0a1e4: 7c 60 1b 79 mr. r0,r3
ffc0a1e8: 90 01 00 18 stw r0,24(r1)
ffc0a1ec: 41 82 00 24 beq- ffc0a210 <_TOD_Tickle_ticks+0x88>
ffc0a1f0: 3f e0 00 00 lis r31,0
ffc0a1f4: 3b ff 2c bc addi r31,r31,11452
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
ffc0a1f8: 7f e3 fb 78 mr r3,r31
ffc0a1fc: 48 00 30 e1 bl ffc0d2dc <_Watchdog_Tickle>
ffc0a200: 80 01 00 18 lwz r0,24(r1)
ffc0a204: 35 20 ff ff addic. r9,r0,-1
ffc0a208: 91 21 00 18 stw r9,24(r1)
ffc0a20c: 40 82 ff ec bne+ ffc0a1f8 <_TOD_Tickle_ticks+0x70> <== NEVER TAKEN
_Watchdog_Tickle_seconds();
seconds--;
}
}
ffc0a210: 80 01 00 2c lwz r0,44(r1)
ffc0a214: 83 e1 00 24 lwz r31,36(r1)
ffc0a218: 38 21 00 28 addi r1,r1,40
ffc0a21c: 7c 08 03 a6 mtlr r0
ffc0a220: 4e 80 00 20 blr
ffc0b6a4 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
ffc0b6a4: 94 21 ff e8 stwu r1,-24(r1)
ffc0b6a8: 7c 08 02 a6 mflr r0
ffc0b6ac: 90 01 00 1c stw r0,28(r1)
ffc0b6b0: 93 e1 00 14 stw r31,20(r1)
ffc0b6b4: 7c 7f 1b 78 mr r31,r3
ffc0b6b8: 93 81 00 08 stw r28,8(r1)
ffc0b6bc: 7c bc 2b 78 mr r28,r5
ffc0b6c0: 93 a1 00 0c stw r29,12(r1)
ffc0b6c4: 93 c1 00 10 stw r30,16(r1)
ffc0b6c8: 7c 9e 23 78 mr r30,r4
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
ffc0b6cc: 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 );
ffc0b6d0: 48 00 11 49 bl ffc0c818 <_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 )
ffc0b6d4: 80 1f 00 14 lwz r0,20(r31)
ffc0b6d8: 7f 80 f0 00 cmpw cr7,r0,r30
ffc0b6dc: 41 9e 00 10 beq- cr7,ffc0b6ec <_Thread_Change_priority+0x48>
_Thread_Set_priority( the_thread, new_priority );
ffc0b6e0: 7f e3 fb 78 mr r3,r31
ffc0b6e4: 7f c4 f3 78 mr r4,r30
ffc0b6e8: 48 00 10 89 bl ffc0c770 <_Thread_Set_priority>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0b6ec: 7f c0 00 a6 mfmsr r30
ffc0b6f0: 7c 10 42 a6 mfsprg r0,0
ffc0b6f4: 7f c0 00 78 andc r0,r30,r0
ffc0b6f8: 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;
ffc0b6fc: 80 1f 00 10 lwz r0,16(r31)
if ( state != STATES_TRANSIENT ) {
ffc0b700: 2f 80 00 04 cmpwi cr7,r0,4
ffc0b704: 41 9e 00 88 beq- cr7,ffc0b78c <_Thread_Change_priority+0xe8>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
ffc0b708: 73 a9 00 04 andi. r9,r29,4
ffc0b70c: 41 82 00 38 beq- ffc0b744 <_Thread_Change_priority+0xa0><== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0b710: 7f c0 01 24 mtmsr r30 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
ffc0b714: 3d 20 00 03 lis r9,3 <== NOT EXECUTED
ffc0b718: 61 29 be e0 ori r9,r9,48864 <== NOT EXECUTED
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
ffc0b71c: 7c 0b 48 39 and. r11,r0,r9 <== NOT EXECUTED
ffc0b720: 40 82 00 40 bne- ffc0b760 <_Thread_Change_priority+0xbc><== NOT EXECUTED
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
ffc0b724: 80 01 00 1c lwz r0,28(r1)
ffc0b728: 83 81 00 08 lwz r28,8(r1)
ffc0b72c: 7c 08 03 a6 mtlr r0
ffc0b730: 83 a1 00 0c lwz r29,12(r1)
ffc0b734: 83 c1 00 10 lwz r30,16(r1)
ffc0b738: 83 e1 00 14 lwz r31,20(r1)
ffc0b73c: 38 21 00 18 addi r1,r1,24
ffc0b740: 4e 80 00 20 blr
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
ffc0b744: 54 09 07 b8 rlwinm r9,r0,0,30,28
*/
state = the_thread->current_state;
if ( state != STATES_TRANSIENT ) {
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
ffc0b748: 91 3f 00 10 stw r9,16(r31)
ffc0b74c: 7f c0 01 24 mtmsr r30
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
ffc0b750: 3d 20 00 03 lis r9,3
ffc0b754: 61 29 be e0 ori r9,r9,48864
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
ffc0b758: 7c 0b 48 39 and. r11,r0,r9
ffc0b75c: 41 82 ff c8 beq+ ffc0b724 <_Thread_Change_priority+0x80>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
ffc0b760: 80 7f 00 44 lwz r3,68(r31)
ffc0b764: 7f e4 fb 78 mr r4,r31
ffc0b768: 48 00 0f 11 bl ffc0c678 <_Thread_queue_Requeue>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
ffc0b76c: 80 01 00 1c lwz r0,28(r1)
ffc0b770: 83 81 00 08 lwz r28,8(r1)
ffc0b774: 7c 08 03 a6 mtlr r0
ffc0b778: 83 a1 00 0c lwz r29,12(r1)
ffc0b77c: 83 c1 00 10 lwz r30,16(r1)
ffc0b780: 83 e1 00 14 lwz r31,20(r1)
ffc0b784: 38 21 00 18 addi r1,r1,24
ffc0b788: 4e 80 00 20 blr
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
ffc0b78c: 73 bd 00 04 andi. r29,r29,4
ffc0b790: 41 82 00 74 beq- ffc0b804 <_Thread_Change_priority+0x160><== ALWAYS TAKEN
ffc0b794: 3f a0 00 00 lis r29,0 <== NOT EXECUTED
ffc0b798: 3b bd 20 04 addi r29,r29,8196 <== NOT EXECUTED
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc0b79c: 7c 00 00 a6 mfmsr r0
ffc0b7a0: 7f c0 01 24 mtmsr r30
ffc0b7a4: 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();
ffc0b7a8: 80 1d 00 08 lwz r0,8(r29)
ffc0b7ac: 7c 09 03 a6 mtctr r0
ffc0b7b0: 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 );
ffc0b7b4: 3d 20 00 00 lis r9,0
ffc0b7b8: 39 29 2d 98 addi r9,r9,11672
ffc0b7bc: 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() &&
ffc0b7c0: 80 09 00 10 lwz r0,16(r9)
ffc0b7c4: 7f 8b 00 00 cmpw cr7,r11,r0
ffc0b7c8: 41 9e 00 18 beq- cr7,ffc0b7e0 <_Thread_Change_priority+0x13c>
ffc0b7cc: 88 0b 00 74 lbz r0,116(r11)
ffc0b7d0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0b7d4: 41 9e 00 0c beq- cr7,ffc0b7e0 <_Thread_Change_priority+0x13c>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
ffc0b7d8: 38 00 00 01 li r0,1
ffc0b7dc: 98 09 00 18 stb r0,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0b7e0: 7f c0 01 24 mtmsr r30
_ISR_Enable( level );
}
ffc0b7e4: 80 01 00 1c lwz r0,28(r1)
ffc0b7e8: 83 81 00 08 lwz r28,8(r1)
ffc0b7ec: 7c 08 03 a6 mtlr r0
ffc0b7f0: 83 a1 00 0c lwz r29,12(r1)
ffc0b7f4: 83 c1 00 10 lwz r30,16(r1)
ffc0b7f8: 83 e1 00 14 lwz r31,20(r1)
ffc0b7fc: 38 21 00 18 addi r1,r1,24
ffc0b800: 4e 80 00 20 blr
* 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 )
ffc0b804: 2f 9c 00 00 cmpwi cr7,r28,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 );
ffc0b808: 93 bf 00 10 stw r29,16(r31)
if ( prepend_it )
ffc0b80c: 41 9e 00 20 beq- cr7,ffc0b82c <_Thread_Change_priority+0x188>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
ffc0b810: 3f a0 00 00 lis r29,0
ffc0b814: 3b bd 20 04 addi r29,r29,8196
ffc0b818: 80 1d 00 28 lwz r0,40(r29)
ffc0b81c: 7f e3 fb 78 mr r3,r31
ffc0b820: 7c 09 03 a6 mtctr r0
ffc0b824: 4e 80 04 21 bctrl
ffc0b828: 4b ff ff 74 b ffc0b79c <_Thread_Change_priority+0xf8>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
ffc0b82c: 3f a0 00 00 lis r29,0
ffc0b830: 3b bd 20 04 addi r29,r29,8196
ffc0b834: 80 1d 00 24 lwz r0,36(r29)
ffc0b838: 7f e3 fb 78 mr r3,r31
ffc0b83c: 7c 09 03 a6 mtctr r0
ffc0b840: 4e 80 04 21 bctrl
ffc0b844: 4b ff ff 58 b ffc0b79c <_Thread_Change_priority+0xf8>
ffc0bab0 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0bab0: 94 21 ff e8 stwu r1,-24(r1)
ffc0bab4: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0bab8: 38 81 00 08 addi r4,r1,8
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0babc: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0bac0: 48 00 02 4d bl ffc0bd0c <_Thread_Get>
switch ( location ) {
ffc0bac4: 80 01 00 08 lwz r0,8(r1)
ffc0bac8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0bacc: 40 9e 00 20 bne- cr7,ffc0baec <_Thread_Delay_ended+0x3c><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
ffc0bad0: 3c 80 10 00 lis r4,4096
ffc0bad4: 60 84 00 18 ori r4,r4,24
ffc0bad8: 4b ff fd 71 bl ffc0b848 <_Thread_Clear_state>
ffc0badc: 3d 20 00 00 lis r9,0
ffc0bae0: 81 69 27 a4 lwz r11,10148(r9)
ffc0bae4: 38 0b ff ff addi r0,r11,-1
ffc0bae8: 90 09 27 a4 stw r0,10148(r9)
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
ffc0baec: 80 01 00 1c lwz r0,28(r1)
ffc0baf0: 38 21 00 18 addi r1,r1,24
ffc0baf4: 7c 08 03 a6 mtlr r0
ffc0baf8: 4e 80 00 20 blr
ffc0bafc <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
ffc0bafc: 94 21 ff b8 stwu r1,-72(r1)
ffc0bb00: 7c 08 02 a6 mflr r0
ffc0bb04: 93 a1 00 3c stw r29,60(r1)
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
ffc0bb08: 3f a0 00 00 lis r29,0
ffc0bb0c: 3b bd 2d 98 addi r29,r29,11672
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
ffc0bb10: 93 e1 00 44 stw r31,68(r1)
ffc0bb14: 90 01 00 4c stw r0,76(r1)
ffc0bb18: 92 a1 00 1c stw r21,28(r1)
ffc0bb1c: 92 c1 00 20 stw r22,32(r1)
ffc0bb20: 92 e1 00 24 stw r23,36(r1)
ffc0bb24: 93 01 00 28 stw r24,40(r1)
ffc0bb28: 93 21 00 2c stw r25,44(r1)
ffc0bb2c: 93 41 00 30 stw r26,48(r1)
ffc0bb30: 93 61 00 34 stw r27,52(r1)
ffc0bb34: 93 81 00 38 stw r28,56(r1)
ffc0bb38: 93 c1 00 40 stw r30,64(r1)
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
ffc0bb3c: 83 fd 00 0c lwz r31,12(r29)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0bb40: 7d 20 00 a6 mfmsr r9
ffc0bb44: 7c 10 42 a6 mfsprg r0,0
ffc0bb48: 7d 20 00 78 andc r0,r9,r0
ffc0bb4c: 7c 00 01 24 mtmsr r0
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
ffc0bb50: 88 1d 00 18 lbz r0,24(r29)
ffc0bb54: 2f 80 00 00 cmpwi cr7,r0,0
ffc0bb58: 41 9e 01 88 beq- cr7,ffc0bce0 <_Thread_Dispatch+0x1e4>
heir = _Thread_Heir;
ffc0bb5c: 83 dd 00 10 lwz r30,16(r29)
_Thread_Dispatch_disable_level = 1;
ffc0bb60: 38 00 00 01 li r0,1
ffc0bb64: 3f 20 00 00 lis r25,0
/*
* 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 )
ffc0bb68: 7f 9f f0 00 cmpw cr7,r31,r30
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
ffc0bb6c: 90 19 27 a4 stw r0,10148(r25)
_Thread_Dispatch_necessary = false;
ffc0bb70: 39 60 00 00 li r11,0
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
ffc0bb74: 7d 20 4b 78 mr r0,r9
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Thread_Dispatch_necessary = false;
ffc0bb78: 99 7d 00 18 stb r11,24(r29)
_Thread_Executing = heir;
ffc0bb7c: 93 dd 00 0c stw r30,12(r29)
/*
* 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 )
ffc0bb80: 41 9e 01 14 beq- cr7,ffc0bc94 <_Thread_Dispatch+0x198>
ffc0bb84: 3f 60 00 00 lis r27,0
ffc0bb88: 3f 00 00 00 lis r24,0
ffc0bb8c: 3b 41 00 08 addi r26,r1,8
ffc0bb90: 3b 7b 27 d4 addi r27,r27,10196
ffc0bb94: 3b 81 00 10 addi r28,r1,16
ffc0bb98: 3b 18 27 b8 addi r24,r24,10168
#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;
ffc0bb9c: 3e a0 00 00 lis r21,0
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
ffc0bba0: 3a c0 00 01 li r22,1
_Thread_Dispatch_necessary = false;
ffc0bba4: 3a e0 00 00 li r23,0
ffc0bba8: 48 00 00 d0 b ffc0bc78 <_Thread_Dispatch+0x17c>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0bbac: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
ffc0bbb0: 7f 43 d3 78 mr r3,r26
ffc0bbb4: 48 00 3d c1 bl ffc0f974 <_TOD_Get_uptime>
_Timestamp_Subtract(
ffc0bbb8: 7f 63 db 78 mr r3,r27
ffc0bbbc: 7f 44 d3 78 mr r4,r26
ffc0bbc0: 7f 85 e3 78 mr r5,r28
ffc0bbc4: 48 00 0f 5d bl ffc0cb20 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
ffc0bbc8: 38 7f 00 84 addi r3,r31,132
ffc0bbcc: 7f 84 e3 78 mr r4,r28
ffc0bbd0: 48 00 0e f5 bl ffc0cac4 <_Timespec_Add_to>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0bbd4: 81 78 00 00 lwz r11,0(r24)
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
ffc0bbd8: 81 21 00 08 lwz r9,8(r1)
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0bbdc: 2f 8b 00 00 cmpwi cr7,r11,0
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
ffc0bbe0: 81 41 00 0c lwz r10,12(r1)
ffc0bbe4: 91 3b 00 00 stw r9,0(r27)
ffc0bbe8: 91 5b 00 04 stw r10,4(r27)
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0bbec: 41 9e 00 14 beq- cr7,ffc0bc00 <_Thread_Dispatch+0x104> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
ffc0bbf0: 80 0b 00 00 lwz r0,0(r11)
ffc0bbf4: 90 1f 01 28 stw r0,296(r31)
*_Thread_libc_reent = heir->libc_reent;
ffc0bbf8: 80 1e 01 28 lwz r0,296(r30)
ffc0bbfc: 90 0b 00 00 stw r0,0(r11)
}
_User_extensions_Thread_switch( executing, heir );
ffc0bc00: 7f e3 fb 78 mr r3,r31
ffc0bc04: 7f c4 f3 78 mr r4,r30
ffc0bc08: 48 00 13 b9 bl ffc0cfc0 <_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 )
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_Dispatch+0x124>
_Context_Save_fp( &executing->fp_context );
ffc0bc18: 38 7f 01 24 addi r3,r31,292
ffc0bc1c: 48 00 b4 85 bl ffc170a0 <_CPU_Context_save_fp>
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
ffc0bc20: 38 7f 00 c4 addi r3,r31,196
ffc0bc24: 38 9e 00 c4 addi r4,r30,196
ffc0bc28: 48 00 b5 f9 bl ffc17220 <_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 )
ffc0bc2c: 80 1f 01 24 lwz r0,292(r31)
ffc0bc30: 2f 80 00 00 cmpwi cr7,r0,0
ffc0bc34: 41 9e 00 0c beq- cr7,ffc0bc40 <_Thread_Dispatch+0x144>
_Context_Restore_fp( &executing->fp_context );
ffc0bc38: 38 7f 01 24 addi r3,r31,292
ffc0bc3c: 48 00 b5 25 bl ffc17160 <_CPU_Context_restore_fp>
#endif
#endif
executing = _Thread_Executing;
ffc0bc40: 83 fd 00 0c lwz r31,12(r29)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0bc44: 7d 20 00 a6 mfmsr r9
ffc0bc48: 7c 10 42 a6 mfsprg r0,0
ffc0bc4c: 7d 20 00 78 andc r0,r9,r0
ffc0bc50: 7c 00 01 24 mtmsr r0
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
ffc0bc54: 88 1d 00 18 lbz r0,24(r29)
ffc0bc58: 2f 80 00 00 cmpwi cr7,r0,0
ffc0bc5c: 41 9e 00 34 beq- cr7,ffc0bc90 <_Thread_Dispatch+0x194>
heir = _Thread_Heir;
ffc0bc60: 83 dd 00 10 lwz r30,16(r29)
_Thread_Dispatch_disable_level = 1;
ffc0bc64: 92 d9 27 a4 stw r22,10148(r25)
/*
* 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 )
ffc0bc68: 7f 9e f8 00 cmpw cr7,r30,r31
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Thread_Dispatch_necessary = false;
ffc0bc6c: 9a fd 00 18 stb r23,24(r29)
_Thread_Executing = heir;
ffc0bc70: 93 dd 00 0c stw r30,12(r29)
/*
* 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 )
ffc0bc74: 41 9e 00 1c beq- cr7,ffc0bc90 <_Thread_Dispatch+0x194> <== NEVER TAKEN
*/
#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 )
ffc0bc78: 80 1e 00 7c lwz r0,124(r30)
ffc0bc7c: 2f 80 00 01 cmpwi cr7,r0,1
ffc0bc80: 40 9e ff 2c bne+ cr7,ffc0bbac <_Thread_Dispatch+0xb0>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0bc84: 80 15 27 a0 lwz r0,10144(r21)
ffc0bc88: 90 1e 00 78 stw r0,120(r30)
ffc0bc8c: 4b ff ff 20 b ffc0bbac <_Thread_Dispatch+0xb0>
ffc0bc90: 7d 20 4b 78 mr r0,r9
_ISR_Disable( level );
}
post_switch:
_Thread_Dispatch_disable_level = 0;
ffc0bc94: 39 20 00 00 li r9,0
ffc0bc98: 91 39 27 a4 stw r9,10148(r25)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0bc9c: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
_API_extensions_Run_postswitch();
ffc0bca0: 4b ff dc a9 bl ffc09948 <_API_extensions_Run_postswitch>
}
ffc0bca4: 80 01 00 4c lwz r0,76(r1)
ffc0bca8: 82 a1 00 1c lwz r21,28(r1)
ffc0bcac: 7c 08 03 a6 mtlr r0
ffc0bcb0: 82 c1 00 20 lwz r22,32(r1)
ffc0bcb4: 82 e1 00 24 lwz r23,36(r1)
ffc0bcb8: 83 01 00 28 lwz r24,40(r1)
ffc0bcbc: 83 21 00 2c lwz r25,44(r1)
ffc0bcc0: 83 41 00 30 lwz r26,48(r1)
ffc0bcc4: 83 61 00 34 lwz r27,52(r1)
ffc0bcc8: 83 81 00 38 lwz r28,56(r1)
ffc0bccc: 83 a1 00 3c lwz r29,60(r1)
ffc0bcd0: 83 c1 00 40 lwz r30,64(r1)
ffc0bcd4: 83 e1 00 44 lwz r31,68(r1)
ffc0bcd8: 38 21 00 48 addi r1,r1,72
ffc0bcdc: 4e 80 00 20 blr
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
ffc0bce0: 7d 20 4b 78 mr r0,r9
ffc0bce4: 3f 20 00 00 lis r25,0
ffc0bce8: 4b ff ff ac b ffc0bc94 <_Thread_Dispatch+0x198>
ffc11e90 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc11e90: 94 21 ff f0 stwu r1,-16(r1)
ffc11e94: 7c 08 02 a6 mflr r0
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
ffc11e98: 3d 20 00 00 lis r9,0
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc11e9c: 90 01 00 14 stw r0,20(r1)
ffc11ea0: 93 e1 00 0c stw r31,12(r1)
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
ffc11ea4: 83 e9 2d a4 lwz r31,11684(r9)
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc11ea8: 93 c1 00 08 stw r30,8(r1)
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
ffc11eac: 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);
ffc11eb0: 38 00 00 00 li r0,0
ffc11eb4: 7c 00 00 a6 mfmsr r0
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
ffc11eb8: 71 2b 00 01 andi. r11,r9,1
ffc11ebc: 40 82 00 58 bne- ffc11f14 <_Thread_Handler+0x84>
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
__asm__ volatile (
ffc11ec0: 7d 30 42 a6 mfsprg r9,0
msr |= ppc_interrupt_get_disable_mask();
ffc11ec4: 7d 20 03 78 or r0,r9,r0
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
}
_CPU_MSR_SET(msr);
ffc11ec8: 7c 00 01 24 mtmsr r0
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
ffc11ecc: 3d 20 00 00 lis r9,0
ffc11ed0: 8b c9 29 60 lbz r30,10592(r9)
doneConstructors = 1;
ffc11ed4: 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 );
ffc11ed8: 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;
ffc11edc: 98 09 29 60 stb r0,10592(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 );
ffc11ee0: 4b ff ad a5 bl ffc0cc84 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
ffc11ee4: 4b ff 9e 09 bl ffc0bcec <_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) */ {
ffc11ee8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc11eec: 41 9e 00 58 beq- cr7,ffc11f44 <_Thread_Handler+0xb4>
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
ffc11ef0: 80 1f 00 94 lwz r0,148(r31)
ffc11ef4: 2f 80 00 00 cmpwi cr7,r0,0
ffc11ef8: 41 9e 00 5c beq- cr7,ffc11f54 <_Thread_Handler+0xc4> <== ALWAYS TAKEN
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
ffc11efc: 7f e3 fb 78 mr r3,r31
ffc11f00: 4b ff ad f9 bl ffc0ccf8 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
ffc11f04: 38 60 00 00 li r3,0
ffc11f08: 38 80 00 01 li r4,1
ffc11f0c: 38 a0 00 05 li r5,5
ffc11f10: 4b ff 87 9d bl ffc0a6ac <_Internal_error_Occurred>
ffc11f14: 7d 30 42 a6 mfsprg r9,0
_CPU_MSR_GET(msr);
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
msr |= ppc_interrupt_get_disable_mask();
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
ffc11f18: 7c 00 48 78 andc r0,r0,r9
}
_CPU_MSR_SET(msr);
ffc11f1c: 7c 00 01 24 mtmsr r0
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
ffc11f20: 3d 20 00 00 lis r9,0
ffc11f24: 8b c9 29 60 lbz r30,10592(r9)
doneConstructors = 1;
ffc11f28: 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 );
ffc11f2c: 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;
ffc11f30: 98 09 29 60 stb r0,10592(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 );
ffc11f34: 4b ff ad 51 bl ffc0cc84 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
ffc11f38: 4b ff 9d b5 bl ffc0bcec <_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) */ {
ffc11f3c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc11f40: 40 9e ff b0 bne+ cr7,ffc11ef0 <_Thread_Handler+0x60> <== ALWAYS TAKEN
INIT_NAME ();
ffc11f44: 48 00 62 19 bl ffc1815c <_init>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
ffc11f48: 80 1f 00 94 lwz r0,148(r31)
ffc11f4c: 2f 80 00 00 cmpwi cr7,r0,0
ffc11f50: 40 9e ff ac bne+ cr7,ffc11efc <_Thread_Handler+0x6c> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
ffc11f54: 80 1f 00 90 lwz r0,144(r31)
ffc11f58: 80 7f 00 9c lwz r3,156(r31)
ffc11f5c: 7c 09 03 a6 mtctr r0
ffc11f60: 4e 80 04 21 bctrl
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
ffc11f64: 90 7f 00 28 stw r3,40(r31)
ffc11f68: 4b ff ff 94 b ffc11efc <_Thread_Handler+0x6c>
ffc0bdd8 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0bdd8: 94 21 ff d0 stwu r1,-48(r1)
ffc0bddc: 7c 08 02 a6 mflr r0
ffc0bde0: 93 c1 00 28 stw r30,40(r1)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0bde4: 3b c0 00 00 li r30,0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0bde8: 90 01 00 34 stw r0,52(r1)
ffc0bdec: 92 e1 00 0c stw r23,12(r1)
ffc0bdf0: 93 01 00 10 stw r24,16(r1)
ffc0bdf4: 7d 58 53 78 mr r24,r10
ffc0bdf8: 93 21 00 14 stw r25,20(r1)
ffc0bdfc: 7d 39 4b 78 mr r25,r9
ffc0be00: 93 41 00 18 stw r26,24(r1)
ffc0be04: 7d 1a 43 78 mr r26,r8
ffc0be08: 93 61 00 1c stw r27,28(r1)
ffc0be0c: 7c fb 3b 78 mr r27,r7
ffc0be10: 93 81 00 20 stw r28,32(r1)
ffc0be14: 7c 7c 1b 78 mr r28,r3
/*
* 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 );
ffc0be18: 7c 83 23 78 mr r3,r4
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0be1c: 93 a1 00 24 stw r29,36(r1)
ffc0be20: 7c dd 33 78 mr r29,r6
ffc0be24: 93 e1 00 2c stw r31,44(r1)
ffc0be28: 7c 9f 23 78 mr r31,r4
ffc0be2c: 81 61 00 40 lwz r11,64(r1)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0be30: 93 c4 01 2c stw r30,300(r4)
ffc0be34: 93 c4 01 30 stw r30,304(r4)
extensions_area = NULL;
the_thread->libc_reent = NULL;
ffc0be38: 93 c4 01 28 stw r30,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 );
ffc0be3c: 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
)
{
ffc0be40: 82 eb 00 00 lwz r23,0(r11)
/*
* 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 );
ffc0be44: 48 00 0a 31 bl ffc0c874 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
ffc0be48: 7c 60 1b 79 mr. r0,r3
return false; /* stack allocation failed */
ffc0be4c: 38 60 00 00 li r3,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 )
ffc0be50: 41 82 01 24 beq- ffc0bf74 <_Thread_Initialize+0x19c>
ffc0be54: 7f 9d 00 40 cmplw cr7,r29,r0
ffc0be58: 41 9d 01 1c bgt- cr7,ffc0bf74 <_Thread_Initialize+0x19c><== NEVER TAKEN
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
ffc0be5c: 2f 9b 00 00 cmpwi cr7,r27,0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
ffc0be60: 81 7f 00 c0 lwz r11,192(r31)
the_stack->size = size;
ffc0be64: 90 1f 00 b4 stw r0,180(r31)
ffc0be68: 39 20 00 00 li r9,0
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
ffc0be6c: 3b 60 00 00 li r27,0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
ffc0be70: 91 7f 00 b8 stw r11,184(r31)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
ffc0be74: 40 9e 01 34 bne- cr7,ffc0bfa8 <_Thread_Initialize+0x1d0>
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0be78: 3f a0 00 00 lis r29,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;
ffc0be7c: 91 3f 01 24 stw r9,292(r31)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0be80: 38 00 00 00 li r0,0
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0be84: 81 7d 27 c4 lwz r11,10180(r29)
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;
ffc0be88: 91 3f 00 bc stw r9,188(r31)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0be8c: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0be90: 90 1f 00 50 stw r0,80(r31)
the_watchdog->routine = routine;
ffc0be94: 90 1f 00 64 stw r0,100(r31)
the_watchdog->id = id;
ffc0be98: 90 1f 00 68 stw r0,104(r31)
the_watchdog->user_data = user_data;
ffc0be9c: 90 1f 00 6c stw r0,108(r31)
ffc0bea0: 40 9e 01 20 bne- cr7,ffc0bfc0 <_Thread_Initialize+0x1e8>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
ffc0bea4: 91 7f 01 34 stw r11,308(r31)
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
ffc0bea8: 3b c0 00 00 li r30,0
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
ffc0beac: 80 01 00 38 lwz r0,56(r1)
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
ffc0beb0: 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;
ffc0beb4: 3b a0 00 00 li r29,0
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
ffc0beb8: 9b 3f 00 a0 stb r25,160(r31)
ffc0bebc: 7f e3 fb 78 mr r3,r31
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
ffc0bec0: 90 1f 00 a8 stw r0,168(r31)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
ffc0bec4: 80 01 00 3c lwz r0,60(r1)
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
ffc0bec8: 93 1f 00 a4 stw r24,164(r31)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
ffc0becc: 90 1f 00 ac stw r0,172(r31)
the_thread->current_state = STATES_DORMANT;
ffc0bed0: 38 00 00 01 li r0,1
ffc0bed4: 90 1f 00 10 stw r0,16(r31)
ffc0bed8: 80 09 20 1c lwz r0,8220(r9)
the_thread->Wait.queue = NULL;
ffc0bedc: 93 bf 00 44 stw r29,68(r31)
ffc0bee0: 7c 09 03 a6 mtctr r0
the_thread->resource_count = 0;
ffc0bee4: 93 bf 00 1c stw r29,28(r31)
the_thread->real_priority = priority;
ffc0bee8: 93 5f 00 18 stw r26,24(r31)
the_thread->Start.initial_priority = priority;
ffc0beec: 93 5f 00 b0 stw r26,176(r31)
ffc0bef0: 4e 80 04 21 bctrl
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
ffc0bef4: 7c 79 1b 79 mr. r25,r3
ffc0bef8: 41 82 00 40 beq- ffc0bf38 <_Thread_Initialize+0x160>
goto failed;
_Thread_Set_priority( the_thread, priority );
ffc0befc: 7f e3 fb 78 mr r3,r31
ffc0bf00: 7f 44 d3 78 mr r4,r26
ffc0bf04: 48 00 08 6d bl ffc0c770 <_Thread_Set_priority>
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
ffc0bf08: a0 1f 00 0a lhz r0,10(r31)
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
ffc0bf0c: 81 3c 00 1c lwz r9,28(r28)
* 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 );
ffc0bf10: 7f e3 fb 78 mr r3,r31
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc0bf14: 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 );
ffc0bf18: 93 bf 00 84 stw r29,132(r31)
ffc0bf1c: 93 bf 00 88 stw r29,136(r31)
ffc0bf20: 7f e9 01 2e stwx r31,r9,r0
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc0bf24: 92 ff 00 0c stw r23,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 );
ffc0bf28: 48 00 0e d1 bl ffc0cdf8 <_User_extensions_Thread_create>
if ( extension_status )
ffc0bf2c: 2f 83 00 00 cmpwi cr7,r3,0
return true;
ffc0bf30: 38 60 00 01 li r3,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 )
ffc0bf34: 40 9e 00 40 bne- cr7,ffc0bf74 <_Thread_Initialize+0x19c>
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
ffc0bf38: 80 7f 01 28 lwz r3,296(r31)
ffc0bf3c: 48 00 15 41 bl ffc0d47c <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
ffc0bf40: 80 7f 01 2c lwz r3,300(r31)
ffc0bf44: 48 00 15 39 bl ffc0d47c <_Workspace_Free>
ffc0bf48: 80 7f 01 30 lwz r3,304(r31)
ffc0bf4c: 48 00 15 31 bl ffc0d47c <_Workspace_Free>
_Workspace_Free( extensions_area );
ffc0bf50: 7f c3 f3 78 mr r3,r30
ffc0bf54: 48 00 15 29 bl ffc0d47c <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
ffc0bf58: 7f 63 db 78 mr r3,r27
ffc0bf5c: 48 00 15 21 bl ffc0d47c <_Workspace_Free>
#endif
_Workspace_Free( sched );
ffc0bf60: 7f 23 cb 78 mr r3,r25
ffc0bf64: 48 00 15 19 bl ffc0d47c <_Workspace_Free>
_Thread_Stack_Free( the_thread );
ffc0bf68: 7f e3 fb 78 mr r3,r31
ffc0bf6c: 48 00 09 b1 bl ffc0c91c <_Thread_Stack_Free>
return false;
ffc0bf70: 38 60 00 00 li r3,0
}
ffc0bf74: 80 01 00 34 lwz r0,52(r1)
ffc0bf78: 82 e1 00 0c lwz r23,12(r1)
ffc0bf7c: 7c 08 03 a6 mtlr r0
ffc0bf80: 83 01 00 10 lwz r24,16(r1)
ffc0bf84: 83 21 00 14 lwz r25,20(r1)
ffc0bf88: 83 41 00 18 lwz r26,24(r1)
ffc0bf8c: 83 61 00 1c lwz r27,28(r1)
ffc0bf90: 83 81 00 20 lwz r28,32(r1)
ffc0bf94: 83 a1 00 24 lwz r29,36(r1)
ffc0bf98: 83 c1 00 28 lwz r30,40(r1)
ffc0bf9c: 83 e1 00 2c lwz r31,44(r1)
ffc0bfa0: 38 21 00 30 addi r1,r1,48
ffc0bfa4: 4e 80 00 20 blr
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
ffc0bfa8: 38 60 01 08 li r3,264
ffc0bfac: 48 00 14 9d bl ffc0d448 <_Workspace_Allocate>
if ( !fp_area )
ffc0bfb0: 7c 7b 1b 79 mr. r27,r3
ffc0bfb4: 41 82 00 50 beq- ffc0c004 <_Thread_Initialize+0x22c>
ffc0bfb8: 7f 69 db 78 mr r9,r27
ffc0bfbc: 4b ff fe bc b ffc0be78 <_Thread_Initialize+0xa0>
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
ffc0bfc0: 39 6b 00 01 addi r11,r11,1
ffc0bfc4: 55 63 10 3a rlwinm r3,r11,2,0,29
ffc0bfc8: 48 00 14 81 bl ffc0d448 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
ffc0bfcc: 7c 7e 1b 79 mr. r30,r3
ffc0bfd0: 41 82 00 40 beq- ffc0c010 <_Thread_Initialize+0x238>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
ffc0bfd4: 93 df 01 34 stw r30,308(r31)
* 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++ )
ffc0bfd8: 38 00 00 00 li r0,0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
ffc0bfdc: 39 20 00 00 li r9,0
ffc0bfe0: 81 5d 27 c4 lwz r10,10180(r29)
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
ffc0bfe4: 39 60 00 00 li r11,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++ )
ffc0bfe8: 39 29 00 01 addi r9,r9,1
ffc0bfec: 7f 8a 48 40 cmplw cr7,r10,r9
the_thread->extensions[i] = NULL;
ffc0bff0: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0bff4: 7d 7e 01 2e stwx r11,r30,r0
* 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++ )
ffc0bff8: 7d 20 4b 78 mr r0,r9
ffc0bffc: 40 9c ff ec bge+ cr7,ffc0bfe8 <_Thread_Initialize+0x210>
ffc0c000: 4b ff fe ac b ffc0beac <_Thread_Initialize+0xd4>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
ffc0c004: 3b c0 00 00 li r30,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;
ffc0c008: 3b 20 00 00 li r25,0
ffc0c00c: 4b ff ff 2c b ffc0bf38 <_Thread_Initialize+0x160>
ffc0c010: 3b 20 00 00 li r25,0
ffc0c014: 4b ff ff 24 b ffc0bf38 <_Thread_Initialize+0x160>
ffc0d824 <_Thread_Restart>:
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
ffc0d824: 94 21 ff e8 stwu r1,-24(r1)
ffc0d828: 7c 08 02 a6 mflr r0
ffc0d82c: 90 01 00 1c stw r0,28(r1)
*/
RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
States_Control the_states
)
{
return (the_states & STATES_DORMANT);
ffc0d830: 80 03 00 10 lwz r0,16(r3)
ffc0d834: 93 e1 00 14 stw r31,20(r1)
ffc0d838: 7c 7f 1b 78 mr r31,r3
if ( !_States_Is_dormant( the_thread->current_state ) ) {
ffc0d83c: 70 09 00 01 andi. r9,r0,1
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
ffc0d840: 93 c1 00 10 stw r30,16(r1)
_Thread_Restart_self();
return true;
}
return false;
ffc0d844: 38 00 00 00 li r0,0
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
ffc0d848: 41 82 00 20 beq- ffc0d868 <_Thread_Restart+0x44>
return true;
}
return false;
}
ffc0d84c: 7c 03 03 78 mr r3,r0
ffc0d850: 80 01 00 1c lwz r0,28(r1)
ffc0d854: 83 c1 00 10 lwz r30,16(r1)
ffc0d858: 7c 08 03 a6 mtlr r0
ffc0d85c: 83 e1 00 14 lwz r31,20(r1)
ffc0d860: 38 21 00 18 addi r1,r1,24
ffc0d864: 4e 80 00 20 blr
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
_Thread_Set_transient( the_thread );
ffc0d868: 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 );
ffc0d86c: 3f c0 00 00 lis r30,0
ffc0d870: 3b de 2d d8 addi r30,r30,11736
ffc0d874: 90 a1 00 0c stw r5,12(r1)
ffc0d878: 48 00 01 05 bl ffc0d97c <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
ffc0d87c: 7f e3 fb 78 mr r3,r31
ffc0d880: 80 81 00 08 lwz r4,8(r1)
ffc0d884: 80 a1 00 0c lwz r5,12(r1)
ffc0d888: 48 00 3c 35 bl ffc114bc <_Thread_Reset>
_Thread_Load_environment( the_thread );
ffc0d88c: 7f e3 fb 78 mr r3,r31
ffc0d890: 48 00 38 75 bl ffc11104 <_Thread_Load_environment>
_Thread_Ready( the_thread );
ffc0d894: 7f e3 fb 78 mr r3,r31
ffc0d898: 48 00 3b d5 bl ffc1146c <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
ffc0d89c: 7f e3 fb 78 mr r3,r31
ffc0d8a0: 48 00 07 fd bl ffc0e09c <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
ffc0d8a4: 81 3e 00 0c lwz r9,12(r30)
_Thread_Restart_self();
return true;
ffc0d8a8: 38 00 00 01 li r0,1
_Thread_Ready( the_thread );
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
ffc0d8ac: 7f 9f 48 00 cmpw cr7,r31,r9
ffc0d8b0: 40 9e ff 9c bne+ cr7,ffc0d84c <_Thread_Restart+0x28>
*/
RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
{
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
ffc0d8b4: 80 1f 01 24 lwz r0,292(r31)
ffc0d8b8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d8bc: 41 9e 00 0c beq- cr7,ffc0d8c8 <_Thread_Restart+0xa4> <== NEVER TAKEN
_Context_Restore_fp( &_Thread_Executing->fp_context );
ffc0d8c0: 38 7f 01 24 addi r3,r31,292
ffc0d8c4: 48 01 06 1d bl ffc1dee0 <_CPU_Context_restore_fp>
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
ffc0d8c8: 80 7e 00 0c lwz r3,12(r30)
ffc0d8cc: 38 63 00 c4 addi r3,r3,196
ffc0d8d0: 48 01 07 d1 bl ffc1e0a0 <_CPU_Context_restore>
ffc0c678 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
ffc0c678: 94 21 ff d8 stwu r1,-40(r1)
ffc0c67c: 7c 08 02 a6 mflr r0
ffc0c680: 93 e1 00 24 stw r31,36(r1)
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
ffc0c684: 7c 7f 1b 79 mr. r31,r3
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
ffc0c688: 93 c1 00 20 stw r30,32(r1)
ffc0c68c: 7c 9e 23 78 mr r30,r4
ffc0c690: 90 01 00 2c stw r0,44(r1)
ffc0c694: 93 a1 00 1c stw r29,28(r1)
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
ffc0c698: 41 82 00 10 beq- ffc0c6a8 <_Thread_queue_Requeue+0x30> <== 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 ) {
ffc0c69c: 80 1f 00 34 lwz r0,52(r31)
ffc0c6a0: 2f 80 00 01 cmpwi cr7,r0,1
ffc0c6a4: 41 9e 00 20 beq- cr7,ffc0c6c4 <_Thread_queue_Requeue+0x4c><== ALWAYS TAKEN
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
ffc0c6a8: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED
ffc0c6ac: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED
ffc0c6b0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc0c6b4: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED
ffc0c6b8: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED
ffc0c6bc: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED
ffc0c6c0: 4e 80 00 20 blr <== NOT EXECUTED
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0c6c4: 7f a0 00 a6 mfmsr r29
ffc0c6c8: 7d 30 42 a6 mfsprg r9,0
ffc0c6cc: 7f a9 48 78 andc r9,r29,r9
ffc0c6d0: 7d 20 01 24 mtmsr r9
ffc0c6d4: 3d 60 00 03 lis r11,3
ffc0c6d8: 81 24 00 10 lwz r9,16(r4)
ffc0c6dc: 61 6b be e0 ori r11,r11,48864
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 ) ) {
ffc0c6e0: 7d 6a 48 39 and. r10,r11,r9
ffc0c6e4: 40 82 00 24 bne- ffc0c708 <_Thread_queue_Requeue+0x90> <== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0c6e8: 7f a0 01 24 mtmsr r29 <== NOT EXECUTED
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
ffc0c6ec: 80 01 00 2c lwz r0,44(r1)
ffc0c6f0: 83 a1 00 1c lwz r29,28(r1)
ffc0c6f4: 7c 08 03 a6 mtlr r0
ffc0c6f8: 83 c1 00 20 lwz r30,32(r1)
ffc0c6fc: 83 e1 00 24 lwz r31,36(r1)
ffc0c700: 38 21 00 28 addi r1,r1,40
ffc0c704: 4e 80 00 20 blr
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;
ffc0c708: 90 1f 00 30 stw r0,48(r31)
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
ffc0c70c: 38 a0 00 01 li r5,1
ffc0c710: 48 00 38 c9 bl ffc0ffd8 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
ffc0c714: 7f e3 fb 78 mr r3,r31
ffc0c718: 7f c4 f3 78 mr r4,r30
ffc0c71c: 38 a1 00 08 addi r5,r1,8
ffc0c720: 4b ff fc 81 bl ffc0c3a0 <_Thread_queue_Enqueue_priority>
ffc0c724: 7f a0 01 24 mtmsr r29
ffc0c728: 4b ff ff c4 b ffc0c6ec <_Thread_queue_Requeue+0x74>
ffc0c72c <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0c72c: 94 21 ff e8 stwu r1,-24(r1)
ffc0c730: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0c734: 38 81 00 08 addi r4,r1,8
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0c738: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0c73c: 4b ff f5 d1 bl ffc0bd0c <_Thread_Get>
switch ( location ) {
ffc0c740: 80 01 00 08 lwz r0,8(r1)
ffc0c744: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c748: 40 9e 00 18 bne- cr7,ffc0c760 <_Thread_queue_Timeout+0x34><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
ffc0c74c: 48 00 39 a1 bl ffc100ec <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
ffc0c750: 3d 20 00 00 lis r9,0
ffc0c754: 81 69 27 a4 lwz r11,10148(r9)
ffc0c758: 38 0b ff ff addi r0,r11,-1
ffc0c75c: 90 09 27 a4 stw r0,10148(r9)
_Thread_Unnest_dispatch();
break;
}
}
ffc0c760: 80 01 00 1c lwz r0,28(r1)
ffc0c764: 38 21 00 18 addi r1,r1,24
ffc0c768: 7c 08 03 a6 mtlr r0
ffc0c76c: 4e 80 00 20 blr
ffc1b9f0 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc1b9f0: 94 21 ff 98 stwu r1,-104(r1)
ffc1b9f4: 7c 08 02 a6 mflr r0
ffc1b9f8: 92 a1 00 3c stw r21,60(r1)
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
tail->previous = head;
ffc1b9fc: 3a a1 00 08 addi r21,r1,8
ffc1ba00: 90 01 00 6c stw r0,108(r1)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
ffc1ba04: 38 00 00 00 li r0,0
ffc1ba08: 92 e1 00 44 stw r23,68(r1)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc1ba0c: 3a e1 00 18 addi r23,r1,24
ffc1ba10: 93 41 00 50 stw r26,80(r1)
ffc1ba14: 3b 41 00 0c addi r26,r1,12
ffc1ba18: 93 81 00 58 stw r28,88(r1)
ffc1ba1c: 3b 81 00 14 addi r28,r1,20
ffc1ba20: 92 81 00 38 stw r20,56(r1)
ffc1ba24: 3e 80 00 00 lis r20,0
ffc1ba28: 3a 94 28 9c addi r20,r20,10396
ffc1ba2c: 93 01 00 48 stw r24,72(r1)
ffc1ba30: 3f 00 00 00 lis r24,0
ffc1ba34: 3b 18 28 d8 addi r24,r24,10456
ffc1ba38: 93 21 00 4c stw r25,76(r1)
ffc1ba3c: 3f 20 00 00 lis r25,0
ffc1ba40: 3b 39 28 b4 addi r25,r25,10420
ffc1ba44: 93 c1 00 60 stw r30,96(r1)
ffc1ba48: 93 41 00 08 stw r26,8(r1)
head->previous = NULL;
ffc1ba4c: 90 01 00 0c stw r0,12(r1)
tail->previous = head;
ffc1ba50: 92 a1 00 10 stw r21,16(r1)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc1ba54: 92 e1 00 14 stw r23,20(r1)
head->previous = NULL;
ffc1ba58: 90 01 00 18 stw r0,24(r1)
tail->previous = head;
ffc1ba5c: 93 81 00 1c stw r28,28(r1)
ffc1ba60: 92 01 00 28 stw r16,40(r1)
ffc1ba64: 3a 03 00 08 addi r16,r3,8
ffc1ba68: 92 21 00 2c stw r17,44(r1)
ffc1ba6c: 3a 23 00 40 addi r17,r3,64
ffc1ba70: 92 41 00 30 stw r18,48(r1)
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
ffc1ba74: 3a 40 00 00 li r18,0
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc1ba78: 92 61 00 34 stw r19,52(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;
ffc1ba7c: 3a 60 00 01 li r19,1
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc1ba80: 92 c1 00 40 stw r22,64(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;
ffc1ba84: 3a c0 00 00 li r22,0
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc1ba88: 93 61 00 54 stw r27,84(r1)
ffc1ba8c: 3b 63 00 68 addi r27,r3,104
ffc1ba90: 93 a1 00 5c stw r29,92(r1)
ffc1ba94: 3b a3 00 30 addi r29,r3,48
ffc1ba98: 93 e1 00 64 stw r31,100(r1)
ffc1ba9c: 7c 7f 1b 78 mr r31,r3
{
/*
* 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;
ffc1baa0: 92 bf 00 78 stw r21,120(r31)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1baa4: 7f 85 e3 78 mr r5,r28
ffc1baa8: 7f a3 eb 78 mr r3,r29
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
ffc1baac: 80 18 00 00 lwz r0,0(r24)
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
ffc1bab0: 80 9f 00 3c lwz r4,60(r31)
watchdogs->last_snapshot = snapshot;
ffc1bab4: 90 1f 00 3c stw r0,60(r31)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1bab8: 7c 84 00 50 subf r4,r4,r0
ffc1babc: 48 00 56 d5 bl ffc21190 <_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();
ffc1bac0: 83 d9 00 00 lwz r30,0(r25)
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
ffc1bac4: 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 ) {
ffc1bac8: 7f 9e 28 40 cmplw cr7,r30,r5
ffc1bacc: 41 9d 00 98 bgt- cr7,ffc1bb64 <_Timer_server_Body+0x174>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
ffc1bad0: 41 9c 00 a8 blt- cr7,ffc1bb78 <_Timer_server_Body+0x188>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
ffc1bad4: 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 );
ffc1bad8: 80 7f 00 78 lwz r3,120(r31)
ffc1badc: 48 00 0d 69 bl ffc1c844 <_Chain_Get>
if ( timer == NULL ) {
ffc1bae0: 7c 64 1b 79 mr. r4,r3
ffc1bae4: 41 82 00 34 beq- ffc1bb18 <_Timer_server_Body+0x128>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc1bae8: 80 04 00 38 lwz r0,56(r4)
ffc1baec: 2f 80 00 01 cmpwi cr7,r0,1
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc1baf0: 2f 00 00 03 cmpwi cr6,r0,3
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc1baf4: 41 9e 00 98 beq- cr7,ffc1bb8c <_Timer_server_Body+0x19c>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc1baf8: 40 9a ff e0 bne+ cr6,ffc1bad8 <_Timer_server_Body+0xe8> <== NEVER TAKEN
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
ffc1bafc: 38 84 00 10 addi r4,r4,16
ffc1bb00: 7f 63 db 78 mr r3,r27
ffc1bb04: 48 00 57 45 bl ffc21248 <_Watchdog_Insert>
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
ffc1bb08: 80 7f 00 78 lwz r3,120(r31)
ffc1bb0c: 48 00 0d 39 bl ffc1c844 <_Chain_Get>
if ( timer == NULL ) {
ffc1bb10: 7c 64 1b 79 mr. r4,r3
ffc1bb14: 40 82 ff d4 bne+ ffc1bae8 <_Timer_server_Body+0xf8> <== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc1bb18: 7d 20 00 a6 mfmsr r9
ffc1bb1c: 7c 10 42 a6 mfsprg r0,0
ffc1bb20: 7d 20 00 78 andc r0,r9,r0
ffc1bb24: 7c 00 01 24 mtmsr r0
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ffc1bb28: 80 01 00 08 lwz r0,8(r1)
ffc1bb2c: 7f 80 d0 00 cmpw cr7,r0,r26
ffc1bb30: 41 9e 00 6c beq- cr7,ffc1bb9c <_Timer_server_Body+0x1ac><== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc1bb34: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
ffc1bb38: 80 18 00 00 lwz r0,0(r24) <== NOT EXECUTED
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1bb3c: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
ffc1bb40: 80 9f 00 3c lwz r4,60(r31) <== NOT EXECUTED
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1bb44: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
ffc1bb48: 90 1f 00 3c stw r0,60(r31) <== NOT EXECUTED
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1bb4c: 7c 84 00 50 subf r4,r4,r0 <== NOT EXECUTED
ffc1bb50: 48 00 56 41 bl ffc21190 <_Watchdog_Adjust_to_chain> <== NOT EXECUTED
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ffc1bb54: 83 d9 00 00 lwz r30,0(r25) <== NOT EXECUTED
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
ffc1bb58: 80 bf 00 74 lwz r5,116(r31) <== NOT EXECUTED
/*
* 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 ) {
ffc1bb5c: 7f 9e 28 40 cmplw cr7,r30,r5 <== NOT EXECUTED
ffc1bb60: 40 9d ff 70 ble+ cr7,ffc1bad0 <_Timer_server_Body+0xe0> <== NOT EXECUTED
/*
* 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 );
ffc1bb64: 7c 85 f0 50 subf r4,r5,r30
ffc1bb68: 7f 63 db 78 mr r3,r27
ffc1bb6c: 7f 85 e3 78 mr r5,r28
ffc1bb70: 48 00 56 21 bl ffc21190 <_Watchdog_Adjust_to_chain>
ffc1bb74: 4b ff ff 60 b ffc1bad4 <_Timer_server_Body+0xe4>
/*
* 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 );
ffc1bb78: 7f 63 db 78 mr r3,r27
ffc1bb7c: 38 80 00 01 li r4,1
ffc1bb80: 7c be 28 50 subf r5,r30,r5
ffc1bb84: 48 00 54 e1 bl ffc21064 <_Watchdog_Adjust>
ffc1bb88: 4b ff ff 4c b ffc1bad4 <_Timer_server_Body+0xe4>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
ffc1bb8c: 7f a3 eb 78 mr r3,r29
ffc1bb90: 38 84 00 10 addi r4,r4,16
ffc1bb94: 48 00 56 b5 bl ffc21248 <_Watchdog_Insert>
ffc1bb98: 4b ff ff 40 b ffc1bad8 <_Timer_server_Body+0xe8>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
ffc1bb9c: 90 9f 00 78 stw r4,120(r31)
ffc1bba0: 7d 20 01 24 mtmsr r9
_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 ) ) {
ffc1bba4: 80 01 00 14 lwz r0,20(r1)
ffc1bba8: 7f 80 b8 00 cmpw cr7,r0,r23
ffc1bbac: 40 be 00 30 bne+ cr7,ffc1bbdc <_Timer_server_Body+0x1ec>
ffc1bbb0: 48 00 00 50 b ffc1bc00 <_Timer_server_Body+0x210>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
ffc1bbb4: 81 69 00 00 lwz r11,0(r9)
head->next = new_first;
new_first->previous = head;
ffc1bbb8: 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;
ffc1bbbc: 91 61 00 14 stw r11,20(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;
ffc1bbc0: 92 c9 00 08 stw r22,8(r9)
ffc1bbc4: 7c 00 01 24 mtmsr r0
/*
* 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 );
ffc1bbc8: 80 09 00 1c lwz r0,28(r9)
ffc1bbcc: 80 69 00 20 lwz r3,32(r9)
ffc1bbd0: 80 89 00 24 lwz r4,36(r9)
ffc1bbd4: 7c 09 03 a6 mtctr r0
ffc1bbd8: 4e 80 04 21 bctrl
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc1bbdc: 7c 00 00 a6 mfmsr r0
ffc1bbe0: 7d 30 42 a6 mfsprg r9,0
ffc1bbe4: 7c 09 48 78 andc r9,r0,r9
ffc1bbe8: 7d 20 01 24 mtmsr r9
initialized = false;
}
#endif
return status;
}
ffc1bbec: 81 21 00 14 lwz r9,20(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
ffc1bbf0: 7f 89 b8 00 cmpw cr7,r9,r23
ffc1bbf4: 40 9e ff c0 bne+ cr7,ffc1bbb4 <_Timer_server_Body+0x1c4>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc1bbf8: 7c 00 01 24 mtmsr r0
ffc1bbfc: 4b ff fe a4 b ffc1baa0 <_Timer_server_Body+0xb0>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
ffc1bc00: 9a 5f 00 7c stb r18,124(r31)
ffc1bc04: 80 14 00 00 lwz r0,0(r20)
ffc1bc08: 30 00 00 01 addic r0,r0,1
ffc1bc0c: 90 14 00 00 stw r0,0(r20)
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
ffc1bc10: 80 7f 00 00 lwz r3,0(r31)
ffc1bc14: 38 80 00 08 li r4,8
ffc1bc18: 48 00 4a b1 bl ffc206c8 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
ffc1bc1c: 7f e3 fb 78 mr r3,r31
ffc1bc20: 4b ff fc a9 bl ffc1b8c8 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
ffc1bc24: 7f e3 fb 78 mr r3,r31
ffc1bc28: 4b ff fd 35 bl ffc1b95c <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
ffc1bc2c: 48 00 3f 39 bl ffc1fb64 <_Thread_Enable_dispatch>
ts->active = true;
ffc1bc30: 9a 7f 00 7c stb r19,124(r31)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
ffc1bc34: 7e 03 83 78 mr r3,r16
ffc1bc38: 48 00 57 e1 bl ffc21418 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
ffc1bc3c: 7e 23 8b 78 mr r3,r17
ffc1bc40: 48 00 57 d9 bl ffc21418 <_Watchdog_Remove>
ffc1bc44: 4b ff fe 5c b ffc1baa0 <_Timer_server_Body+0xb0>
ffc1bc48 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
ffc1bc48: 94 21 ff f0 stwu r1,-16(r1)
ffc1bc4c: 7c 08 02 a6 mflr r0
ffc1bc50: 7c 89 23 78 mr r9,r4
ffc1bc54: 90 01 00 14 stw r0,20(r1)
if ( ts->insert_chain == NULL ) {
ffc1bc58: 80 03 00 78 lwz r0,120(r3)
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
ffc1bc5c: 93 e1 00 0c stw r31,12(r1)
ffc1bc60: 7c 7f 1b 78 mr r31,r3
if ( ts->insert_chain == NULL ) {
ffc1bc64: 2f 80 00 00 cmpwi cr7,r0,0
ffc1bc68: 41 9e 00 20 beq- cr7,ffc1bc88 <_Timer_server_Schedule_operation_method+0x40>
* 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 );
ffc1bc6c: 80 63 00 78 lwz r3,120(r3)
ffc1bc70: 48 00 0b 7d bl ffc1c7ec <_Chain_Append>
}
}
ffc1bc74: 80 01 00 14 lwz r0,20(r1)
ffc1bc78: 83 e1 00 0c lwz r31,12(r1)
ffc1bc7c: 38 21 00 10 addi r1,r1,16
ffc1bc80: 7c 08 03 a6 mtlr r0
ffc1bc84: 4e 80 00 20 blr
ffc1bc88: 3d 60 00 00 lis r11,0
ffc1bc8c: 81 4b 28 9c lwz r10,10396(r11)
ffc1bc90: 38 0a 00 01 addi r0,r10,1
ffc1bc94: 90 0b 28 9c stw r0,10396(r11)
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc1bc98: 80 04 00 38 lwz r0,56(r4)
ffc1bc9c: 2f 80 00 01 cmpwi cr7,r0,1
ffc1bca0: 41 9e 00 ac beq- cr7,ffc1bd4c <_Timer_server_Schedule_operation_method+0x104>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc1bca4: 2f 80 00 03 cmpwi cr7,r0,3
ffc1bca8: 41 9e 00 1c beq- cr7,ffc1bcc4 <_Timer_server_Schedule_operation_method+0x7c>
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
ffc1bcac: 48 00 3e b9 bl ffc1fb64 <_Thread_Enable_dispatch>
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
ffc1bcb0: 80 01 00 14 lwz r0,20(r1)
ffc1bcb4: 83 e1 00 0c lwz r31,12(r1)
ffc1bcb8: 38 21 00 10 addi r1,r1,16
ffc1bcbc: 7c 08 03 a6 mtlr r0
ffc1bcc0: 4e 80 00 20 blr
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc1bcc4: 7c c0 00 a6 mfmsr r6
ffc1bcc8: 7c 10 42 a6 mfsprg r0,0
ffc1bccc: 7c c0 00 78 andc r0,r6,r0
ffc1bcd0: 7c 00 01 24 mtmsr r0
initialized = false;
}
#endif
return status;
}
ffc1bcd4: 81 63 00 68 lwz r11,104(r3)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc1bcd8: 38 03 00 6c addi r0,r3,108
/*
* 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();
ffc1bcdc: 3d 40 00 00 lis r10,0
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
ffc1bce0: 7f 8b 00 00 cmpw cr7,r11,r0
/*
* 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();
ffc1bce4: 80 0a 28 b4 lwz r0,10420(r10)
last_snapshot = ts->TOD_watchdogs.last_snapshot;
ffc1bce8: 81 43 00 74 lwz r10,116(r3)
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
ffc1bcec: 41 9e 00 30 beq- cr7,ffc1bd1c <_Timer_server_Schedule_operation_method+0xd4>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
if ( snapshot > last_snapshot ) {
ffc1bcf0: 7f 80 50 40 cmplw cr7,r0,r10
_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;
ffc1bcf4: 80 eb 00 10 lwz r7,16(r11)
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
ffc1bcf8: 7d 07 52 14 add r8,r7,r10
delta_interval += delta;
ffc1bcfc: 7d 00 40 50 subf r8,r0,r8
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 ) {
ffc1bd00: 40 9d 00 18 ble- cr7,ffc1bd18 <_Timer_server_Schedule_operation_method+0xd0>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
ffc1bd04: 7d 4a 00 50 subf r10,r10,r0
if (delta_interval > delta) {
ffc1bd08: 7f 87 50 40 cmplw cr7,r7,r10
delta_interval -= delta;
} else {
delta_interval = 0;
ffc1bd0c: 39 00 00 00 li r8,0
if ( snapshot > last_snapshot ) {
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
ffc1bd10: 40 9d 00 08 ble- cr7,ffc1bd18 <_Timer_server_Schedule_operation_method+0xd0><== NEVER TAKEN
delta_interval -= delta;
ffc1bd14: 7d 0a 38 50 subf r8,r10,r7
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
ffc1bd18: 91 0b 00 10 stw r8,16(r11)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
ffc1bd1c: 90 1f 00 74 stw r0,116(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc1bd20: 7c c0 01 24 mtmsr r6
_ISR_Enable( level );
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
ffc1bd24: 38 7f 00 68 addi r3,r31,104
ffc1bd28: 38 89 00 10 addi r4,r9,16
ffc1bd2c: 48 00 55 1d bl ffc21248 <_Watchdog_Insert>
if ( !ts->active ) {
ffc1bd30: 88 1f 00 7c lbz r0,124(r31)
ffc1bd34: 2f 80 00 00 cmpwi cr7,r0,0
ffc1bd38: 40 9e ff 74 bne+ cr7,ffc1bcac <_Timer_server_Schedule_operation_method+0x64>
_Timer_server_Reset_tod_system_watchdog( ts );
ffc1bd3c: 7f e3 fb 78 mr r3,r31
ffc1bd40: 4b ff fc 1d bl ffc1b95c <_Timer_server_Reset_tod_system_watchdog>
}
}
_Thread_Enable_dispatch();
ffc1bd44: 48 00 3e 21 bl ffc1fb64 <_Thread_Enable_dispatch>
ffc1bd48: 4b ff ff 68 b ffc1bcb0 <_Timer_server_Schedule_operation_method+0x68>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc1bd4c: 7c c0 00 a6 mfmsr r6
ffc1bd50: 7c 10 42 a6 mfsprg r0,0
ffc1bd54: 7c c0 00 78 andc r0,r6,r0
ffc1bd58: 7c 00 01 24 mtmsr r0
initialized = false;
}
#endif
return status;
}
ffc1bd5c: 81 63 00 30 lwz r11,48(r3)
ffc1bd60: 38 03 00 34 addi r0,r3,52
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = _Watchdog_Ticks_since_boot;
ffc1bd64: 3d 40 00 00 lis r10,0
last_snapshot = ts->Interval_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
ffc1bd68: 7f 8b 00 00 cmpw cr7,r11,r0
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = _Watchdog_Ticks_since_boot;
ffc1bd6c: 80 0a 28 d8 lwz r0,10456(r10)
last_snapshot = ts->Interval_watchdogs.last_snapshot;
ffc1bd70: 81 03 00 3c lwz r8,60(r3)
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
ffc1bd74: 41 9e 00 20 beq- cr7,ffc1bd94 <_Timer_server_Schedule_operation_method+0x14c>
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
ffc1bd78: 80 eb 00 10 lwz r7,16(r11)
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
ffc1bd7c: 7d 08 00 50 subf r8,r8,r0
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
ffc1bd80: 39 40 00 00 li r10,0
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
ffc1bd84: 7f 88 38 40 cmplw cr7,r8,r7
ffc1bd88: 40 9c 00 08 bge- cr7,ffc1bd90 <_Timer_server_Schedule_operation_method+0x148>
delta_interval -= delta;
ffc1bd8c: 7d 48 38 50 subf r10,r8,r7
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
ffc1bd90: 91 4b 00 10 stw r10,16(r11)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
ffc1bd94: 90 1f 00 3c stw r0,60(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc1bd98: 7c c0 01 24 mtmsr r6
_ISR_Enable( level );
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
ffc1bd9c: 38 7f 00 30 addi r3,r31,48
ffc1bda0: 38 89 00 10 addi r4,r9,16
ffc1bda4: 48 00 54 a5 bl ffc21248 <_Watchdog_Insert>
if ( !ts->active ) {
ffc1bda8: 88 1f 00 7c lbz r0,124(r31)
ffc1bdac: 2f 80 00 00 cmpwi cr7,r0,0
ffc1bdb0: 40 9e fe fc bne+ cr7,ffc1bcac <_Timer_server_Schedule_operation_method+0x64>
_Timer_server_Reset_interval_system_watchdog( ts );
ffc1bdb4: 7f e3 fb 78 mr r3,r31
ffc1bdb8: 4b ff fb 11 bl ffc1b8c8 <_Timer_server_Reset_interval_system_watchdog>
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
ffc1bdbc: 48 00 3d a9 bl ffc1fb64 <_Thread_Enable_dispatch>
ffc1bdc0: 4b ff fe f0 b ffc1bcb0 <_Timer_server_Schedule_operation_method+0x68>
ffc0cac4 <_Timespec_Add_to>:
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
ffc0cac4: 80 03 00 04 lwz r0,4(r3)
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
ffc0cac8: 7c 69 1b 78 mr r9,r3
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
ffc0cacc: 81 04 00 04 lwz r8,4(r4)
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
uint32_t seconds = add->tv_sec;
ffc0cad0: 80 64 00 00 lwz r3,0(r4)
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
ffc0cad4: 7d 08 02 14 add r8,r8,r0
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
ffc0cad8: 81 49 00 00 lwz r10,0(r9)
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
ffc0cadc: 3c 00 3b 9a lis r0,15258
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
ffc0cae0: 91 09 00 04 stw r8,4(r9)
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
ffc0cae4: 60 00 c9 ff ori r0,r0,51711
ffc0cae8: 7f 88 00 40 cmplw cr7,r8,r0
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
ffc0caec: 7d 4a 1a 14 add r10,r10,r3
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
ffc0caf0: 7d 0b 43 78 mr r11,r8
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
ffc0caf4: 91 49 00 00 stw r10,0(r9)
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
ffc0caf8: 4c 9d 00 20 blelr cr7
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ffc0cafc: 3d 6b c4 65 addis r11,r11,-15259
ffc0cb00: 39 6b 36 00 addi r11,r11,13824
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
ffc0cb04: 7f 8b 00 40 cmplw cr7,r11,r0
*
* This routines adds two timespecs. The second argument is added
* to the first.
*/
uint32_t _Timespec_Add_to(
ffc0cb08: 39 4a 00 01 addi r10,r10,1
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
time->tv_sec++;
seconds++;
ffc0cb0c: 38 63 00 01 addi r3,r3,1
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
ffc0cb10: 41 9d ff ec bgt+ cr7,ffc0cafc <_Timespec_Add_to+0x38> <== NEVER TAKEN
ffc0cb14: 91 69 00 04 stw r11,4(r9)
ffc0cb18: 91 49 00 00 stw r10,0(r9)
time->tv_sec++;
seconds++;
}
return seconds;
}
ffc0cb1c: 4e 80 00 20 blr
ffc0ef34 <_Timespec_Less_than>:
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
ffc0ef34: 81 63 00 00 lwz r11,0(r3)
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
ffc0ef38: 7c 69 1b 78 mr r9,r3
if ( lhs->tv_sec < rhs->tv_sec )
ffc0ef3c: 80 04 00 00 lwz r0,0(r4)
return true;
ffc0ef40: 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 )
ffc0ef44: 7f 8b 00 00 cmpw cr7,r11,r0
ffc0ef48: 4d 9c 00 20 bltlr cr7
return true;
if ( lhs->tv_sec > rhs->tv_sec )
ffc0ef4c: 41 9d 00 1c bgt- cr7,ffc0ef68 <_Timespec_Less_than+0x34><== NEVER TAKEN
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Less_than(
ffc0ef50: 81 29 00 04 lwz r9,4(r9)
ffc0ef54: 80 04 00 04 lwz r0,4(r4)
ffc0ef58: 7f 89 00 00 cmpw cr7,r9,r0
ffc0ef5c: 7c 60 00 26 mfcr r3
ffc0ef60: 54 63 ef fe rlwinm r3,r3,29,31,31
ffc0ef64: 4e 80 00 20 blr
{
if ( lhs->tv_sec < rhs->tv_sec )
return true;
if ( lhs->tv_sec > rhs->tv_sec )
return false;
ffc0ef68: 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;
}
ffc0ef6c: 4e 80 00 20 blr <== NOT EXECUTED
ffc0cd68 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc0cd68: 94 21 ff e0 stwu r1,-32(r1)
ffc0cd6c: 7c 08 02 a6 mflr r0
ffc0cd70: 93 c1 00 18 stw r30,24(r1)
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
ffc0cd74: 3f c0 00 00 lis r30,0
ffc0cd78: 3b de 2d 54 addi r30,r30,11604
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc0cd7c: 93 e1 00 1c stw r31,28(r1)
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
ffc0cd80: 83 fe 00 08 lwz r31,8(r30)
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc0cd84: 93 61 00 0c stw r27,12(r1)
ffc0cd88: 7c 7b 1b 78 mr r27,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0cd8c: 7f 9f f0 00 cmpw cr7,r31,r30
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc0cd90: 93 81 00 10 stw r28,16(r1)
ffc0cd94: 7c 9c 23 78 mr r28,r4
ffc0cd98: 93 a1 00 14 stw r29,20(r1)
ffc0cd9c: 7c bd 2b 78 mr r29,r5
ffc0cda0: 90 01 00 24 stw r0,36(r1)
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0cda4: 41 9e 00 30 beq- cr7,ffc0cdd4 <_User_extensions_Fatal+0x6c><== NEVER TAKEN
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
ffc0cda8: 80 1f 00 30 lwz r0,48(r31)
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
ffc0cdac: 7f 63 db 78 mr r3,r27
ffc0cdb0: 7f 84 e3 78 mr r4,r28
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
ffc0cdb4: 2f 80 00 00 cmpwi cr7,r0,0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
ffc0cdb8: 7f a5 eb 78 mr r5,r29
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
ffc0cdbc: 41 9e 00 0c beq- cr7,ffc0cdc8 <_User_extensions_Fatal+0x60>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
ffc0cdc0: 7c 09 03 a6 mtctr r0
ffc0cdc4: 4e 80 04 21 bctrl
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
ffc0cdc8: 83 ff 00 04 lwz r31,4(r31)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0cdcc: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0cdd0: 40 9e ff d8 bne+ cr7,ffc0cda8 <_User_extensions_Fatal+0x40>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
ffc0cdd4: 80 01 00 24 lwz r0,36(r1)
ffc0cdd8: 83 61 00 0c lwz r27,12(r1)
ffc0cddc: 7c 08 03 a6 mtlr r0
ffc0cde0: 83 81 00 10 lwz r28,16(r1)
ffc0cde4: 83 a1 00 14 lwz r29,20(r1)
ffc0cde8: 83 c1 00 18 lwz r30,24(r1)
ffc0cdec: 83 e1 00 1c lwz r31,28(r1)
ffc0cdf0: 38 21 00 20 addi r1,r1,32
ffc0cdf4: 4e 80 00 20 blr
ffc0cb74 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
ffc0cb74: 94 21 ff e8 stwu r1,-24(r1)
ffc0cb78: 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;
ffc0cb7c: 3c e0 00 00 lis r7,0
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
ffc0cb80: 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;
ffc0cb84: 38 e7 20 d0 addi r7,r7,8400
ffc0cb88: 3d 00 00 00 lis r8,0
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
ffc0cb8c: 93 a1 00 0c stw r29,12(r1)
ffc0cb90: 3d 40 00 00 lis r10,0
ffc0cb94: 39 68 2d 54 addi r11,r8,11604
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;
ffc0cb98: 83 a7 00 3c lwz r29,60(r7)
ffc0cb9c: 39 2a 2c 30 addi r9,r10,11312
head->previous = NULL;
ffc0cba0: 38 00 00 00 li r0,0
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
ffc0cba4: 93 c1 00 10 stw r30,16(r1)
initial_extensions = Configuration.User_extension_table;
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
ffc0cba8: 2f 9d 00 00 cmpwi cr7,r29,0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0cbac: 38 ab 00 04 addi r5,r11,4
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
ffc0cbb0: 93 81 00 08 stw r28,8(r1)
ffc0cbb4: 38 c9 00 04 addi r6,r9,4
ffc0cbb8: 93 e1 00 14 stw r31,20(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;
ffc0cbbc: 83 c7 00 38 lwz r30,56(r7)
ffc0cbc0: 90 a8 2d 54 stw r5,11604(r8)
head->previous = NULL;
ffc0cbc4: 90 0b 00 04 stw r0,4(r11)
tail->previous = head;
ffc0cbc8: 91 6b 00 08 stw r11,8(r11)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0cbcc: 90 ca 2c 30 stw r6,11312(r10)
head->previous = NULL;
ffc0cbd0: 90 09 00 04 stw r0,4(r9)
tail->previous = head;
ffc0cbd4: 91 29 00 08 stw r9,8(r9)
initial_extensions = Configuration.User_extension_table;
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
ffc0cbd8: 41 9e 00 8c beq- cr7,ffc0cc64 <_User_extensions_Handler_initialization+0xf0><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
ffc0cbdc: 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 *)
_Workspace_Allocate_or_fatal_error(
ffc0cbe0: 7f 83 e3 78 mr r3,r28
ffc0cbe4: 48 00 08 c5 bl ffc0d4a8 <_Workspace_Allocate_or_fatal_error>
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
ffc0cbe8: 38 80 00 00 li r4,0
ffc0cbec: 7f 85 e3 78 mr r5,r28
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
ffc0cbf0: 7c 7f 1b 78 mr r31,r3
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
ffc0cbf4: 48 00 61 c1 bl ffc12db4 <memset>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
ffc0cbf8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0cbfc: 41 9e 00 68 beq- cr7,ffc0cc64 <_User_extensions_Handler_initialization+0xf0><== NEVER TAKEN
ffc0cc00: 3b 80 00 00 li r28,0
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
ffc0cc04: 7f a9 eb 78 mr r9,r29
#include <rtems/config.h>
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
ffc0cc08: 57 80 28 34 rlwinm r0,r28,5,0,26
ffc0cc0c: 7d 09 00 6e lwzux r8,r9,r0
_User_extensions_Add_set( extension );
ffc0cc10: 7f e3 fb 78 mr r3,r31
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
ffc0cc14: 3b 9c 00 01 addi r28,r28,1
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
ffc0cc18: 81 49 00 04 lwz r10,4(r9)
ffc0cc1c: 81 69 00 08 lwz r11,8(r9)
ffc0cc20: 80 09 00 0c lwz r0,12(r9)
ffc0cc24: 91 1f 00 14 stw r8,20(r31)
ffc0cc28: 91 5f 00 18 stw r10,24(r31)
ffc0cc2c: 91 7f 00 1c stw r11,28(r31)
ffc0cc30: 90 1f 00 20 stw r0,32(r31)
ffc0cc34: 81 09 00 10 lwz r8,16(r9)
ffc0cc38: 81 49 00 14 lwz r10,20(r9)
ffc0cc3c: 81 69 00 18 lwz r11,24(r9)
ffc0cc40: 80 09 00 1c lwz r0,28(r9)
ffc0cc44: 91 1f 00 24 stw r8,36(r31)
ffc0cc48: 91 5f 00 28 stw r10,40(r31)
ffc0cc4c: 91 7f 00 2c stw r11,44(r31)
ffc0cc50: 90 1f 00 30 stw r0,48(r31)
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
ffc0cc54: 3b ff 00 34 addi r31,r31,52
_User_extensions_Add_set( extension );
ffc0cc58: 48 00 35 4d bl ffc101a4 <_User_extensions_Add_set>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
ffc0cc5c: 7f 9e e0 40 cmplw cr7,r30,r28
ffc0cc60: 41 9d ff a4 bgt+ cr7,ffc0cc04 <_User_extensions_Handler_initialization+0x90>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
ffc0cc64: 80 01 00 1c lwz r0,28(r1)
ffc0cc68: 83 81 00 08 lwz r28,8(r1)
ffc0cc6c: 7c 08 03 a6 mtlr r0
ffc0cc70: 83 a1 00 0c lwz r29,12(r1)
ffc0cc74: 83 c1 00 10 lwz r30,16(r1)
ffc0cc78: 83 e1 00 14 lwz r31,20(r1)
ffc0cc7c: 38 21 00 18 addi r1,r1,24
ffc0cc80: 4e 80 00 20 blr
ffc0cc84 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
ffc0cc84: 94 21 ff e8 stwu r1,-24(r1)
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
ffc0cc88: 3d 20 00 00 lis r9,0
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
ffc0cc8c: 7c 08 02 a6 mflr r0
ffc0cc90: 93 c1 00 10 stw r30,16(r1)
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
ffc0cc94: 3b c9 2d 54 addi r30,r9,11604
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0cc98: 3b de 00 04 addi r30,r30,4
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
ffc0cc9c: 93 e1 00 14 stw r31,20(r1)
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
ffc0cca0: 83 e9 2d 54 lwz r31,11604(r9)
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
ffc0cca4: 93 a1 00 0c stw r29,12(r1)
ffc0cca8: 7c 7d 1b 78 mr r29,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0ccac: 7f 9f f0 00 cmpw cr7,r31,r30
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
ffc0ccb0: 90 01 00 1c stw r0,28(r1)
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0ccb4: 41 9e 00 28 beq- cr7,ffc0ccdc <_User_extensions_Thread_begin+0x58><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
ffc0ccb8: 80 1f 00 28 lwz r0,40(r31)
(*the_extension->Callouts.thread_begin)( executing );
ffc0ccbc: 7f a3 eb 78 mr r3,r29
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
ffc0ccc0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ccc4: 41 9e 00 0c beq- cr7,ffc0ccd0 <_User_extensions_Thread_begin+0x4c>
(*the_extension->Callouts.thread_begin)( executing );
ffc0ccc8: 7c 09 03 a6 mtctr r0
ffc0cccc: 4e 80 04 21 bctrl
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
ffc0ccd0: 83 ff 00 00 lwz r31,0(r31)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0ccd4: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0ccd8: 40 9e ff e0 bne+ cr7,ffc0ccb8 <_User_extensions_Thread_begin+0x34>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing );
}
}
ffc0ccdc: 80 01 00 1c lwz r0,28(r1)
ffc0cce0: 83 a1 00 0c lwz r29,12(r1)
ffc0cce4: 7c 08 03 a6 mtlr r0
ffc0cce8: 83 c1 00 10 lwz r30,16(r1)
ffc0ccec: 83 e1 00 14 lwz r31,20(r1)
ffc0ccf0: 38 21 00 18 addi r1,r1,24
ffc0ccf4: 4e 80 00 20 blr
ffc0cdf8 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
ffc0cdf8: 94 21 ff e8 stwu r1,-24(r1)
return false;
}
}
return true;
}
ffc0cdfc: 3d 20 00 00 lis r9,0
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
ffc0ce00: 7c 08 02 a6 mflr r0
ffc0ce04: 93 c1 00 10 stw r30,16(r1)
return false;
}
}
return true;
}
ffc0ce08: 3b c9 2d 54 addi r30,r9,11604
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0ce0c: 3b de 00 04 addi r30,r30,4
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
ffc0ce10: 93 e1 00 14 stw r31,20(r1)
return false;
}
}
return true;
}
ffc0ce14: 83 e9 2d 54 lwz r31,11604(r9)
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
ffc0ce18: 93 a1 00 0c stw r29,12(r1)
ffc0ce1c: 7c 7d 1b 78 mr r29,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0ce20: 7f 9f f0 00 cmpw cr7,r31,r30
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
ffc0ce24: 90 01 00 1c stw r0,28(r1)
if ( !status )
return false;
}
}
return true;
ffc0ce28: 38 60 00 01 li r3,1
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
ffc0ce2c: 93 81 00 08 stw r28,8(r1)
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0ce30: 41 9e 00 40 beq- cr7,ffc0ce70 <_User_extensions_Thread_create+0x78><== NEVER TAKEN
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
status = (*the_extension->Callouts.thread_create)(
ffc0ce34: 3f 80 00 00 lis r28,0
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
ffc0ce38: 80 1f 00 14 lwz r0,20(r31)
status = (*the_extension->Callouts.thread_create)(
ffc0ce3c: 39 3c 2d 98 addi r9,r28,11672
ffc0ce40: 7f a4 eb 78 mr r4,r29
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
ffc0ce44: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ce48: 41 9e 00 18 beq- cr7,ffc0ce60 <_User_extensions_Thread_create+0x68>
status = (*the_extension->Callouts.thread_create)(
ffc0ce4c: 80 69 00 0c lwz r3,12(r9)
ffc0ce50: 7c 09 03 a6 mtctr r0
ffc0ce54: 4e 80 04 21 bctrl
_Thread_Executing,
the_thread
);
if ( !status )
ffc0ce58: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ce5c: 41 9e 00 34 beq- cr7,ffc0ce90 <_User_extensions_Thread_create+0x98>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
ffc0ce60: 83 ff 00 00 lwz r31,0(r31)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0ce64: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0ce68: 40 9e ff d0 bne+ cr7,ffc0ce38 <_User_extensions_Thread_create+0x40>
if ( !status )
return false;
}
}
return true;
ffc0ce6c: 38 60 00 01 li r3,1
}
ffc0ce70: 80 01 00 1c lwz r0,28(r1)
ffc0ce74: 83 81 00 08 lwz r28,8(r1)
ffc0ce78: 7c 08 03 a6 mtlr r0
ffc0ce7c: 83 a1 00 0c lwz r29,12(r1)
ffc0ce80: 83 c1 00 10 lwz r30,16(r1)
ffc0ce84: 83 e1 00 14 lwz r31,20(r1)
ffc0ce88: 38 21 00 18 addi r1,r1,24
ffc0ce8c: 4e 80 00 20 blr
ffc0ce90: 80 01 00 1c lwz r0,28(r1)
status = (*the_extension->Callouts.thread_create)(
_Thread_Executing,
the_thread
);
if ( !status )
return false;
ffc0ce94: 38 60 00 00 li r3,0
}
}
return true;
}
ffc0ce98: 83 81 00 08 lwz r28,8(r1)
ffc0ce9c: 7c 08 03 a6 mtlr r0
ffc0cea0: 83 a1 00 0c lwz r29,12(r1)
ffc0cea4: 83 c1 00 10 lwz r30,16(r1)
ffc0cea8: 83 e1 00 14 lwz r31,20(r1)
ffc0ceac: 38 21 00 18 addi r1,r1,24
ffc0ceb0: 4e 80 00 20 blr
ffc0ceb4 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
ffc0ceb4: 94 21 ff e8 stwu r1,-24(r1)
ffc0ceb8: 7c 08 02 a6 mflr r0
ffc0cebc: 93 c1 00 10 stw r30,16(r1)
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
ffc0cec0: 3f c0 00 00 lis r30,0
ffc0cec4: 3b de 2d 54 addi r30,r30,11604
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
ffc0cec8: 93 e1 00 14 stw r31,20(r1)
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
ffc0cecc: 83 fe 00 08 lwz r31,8(r30)
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
ffc0ced0: 93 a1 00 0c stw r29,12(r1)
ffc0ced4: 7c 7d 1b 78 mr r29,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0ced8: 7f 9f f0 00 cmpw cr7,r31,r30
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
ffc0cedc: 90 01 00 1c stw r0,28(r1)
ffc0cee0: 93 81 00 08 stw r28,8(r1)
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0cee4: 41 9e 00 34 beq- cr7,ffc0cf18 <_User_extensions_Thread_delete+0x64><== NEVER TAKEN
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
(*the_extension->Callouts.thread_delete)(
ffc0cee8: 3f 80 00 00 lis r28,0
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
ffc0ceec: 80 1f 00 20 lwz r0,32(r31)
(*the_extension->Callouts.thread_delete)(
ffc0cef0: 39 3c 2d 98 addi r9,r28,11672
ffc0cef4: 7f a4 eb 78 mr r4,r29
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
ffc0cef8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0cefc: 41 9e 00 10 beq- cr7,ffc0cf0c <_User_extensions_Thread_delete+0x58>
(*the_extension->Callouts.thread_delete)(
ffc0cf00: 80 69 00 0c lwz r3,12(r9)
ffc0cf04: 7c 09 03 a6 mtctr r0
ffc0cf08: 4e 80 04 21 bctrl
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
ffc0cf0c: 83 ff 00 04 lwz r31,4(r31)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0cf10: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0cf14: 40 9e ff d8 bne+ cr7,ffc0ceec <_User_extensions_Thread_delete+0x38>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
ffc0cf18: 80 01 00 1c lwz r0,28(r1)
ffc0cf1c: 83 81 00 08 lwz r28,8(r1)
ffc0cf20: 7c 08 03 a6 mtlr r0
ffc0cf24: 83 a1 00 0c lwz r29,12(r1)
ffc0cf28: 83 c1 00 10 lwz r30,16(r1)
ffc0cf2c: 83 e1 00 14 lwz r31,20(r1)
ffc0cf30: 38 21 00 18 addi r1,r1,24
ffc0cf34: 4e 80 00 20 blr
ffc0ccf8 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
ffc0ccf8: 94 21 ff e8 stwu r1,-24(r1)
ffc0ccfc: 7c 08 02 a6 mflr r0
ffc0cd00: 93 c1 00 10 stw r30,16(r1)
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
ffc0cd04: 3f c0 00 00 lis r30,0
ffc0cd08: 3b de 2d 54 addi r30,r30,11604
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
ffc0cd0c: 93 e1 00 14 stw r31,20(r1)
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
ffc0cd10: 83 fe 00 08 lwz r31,8(r30)
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
ffc0cd14: 93 a1 00 0c stw r29,12(r1)
ffc0cd18: 7c 7d 1b 78 mr r29,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0cd1c: 7f 9f f0 00 cmpw cr7,r31,r30
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
ffc0cd20: 90 01 00 1c stw r0,28(r1)
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0cd24: 41 9e 00 28 beq- cr7,ffc0cd4c <_User_extensions_Thread_exitted+0x54><== NEVER TAKEN
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
ffc0cd28: 80 1f 00 2c lwz r0,44(r31)
(*the_extension->Callouts.thread_exitted)( executing );
ffc0cd2c: 7f a3 eb 78 mr r3,r29
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
ffc0cd30: 2f 80 00 00 cmpwi cr7,r0,0
ffc0cd34: 41 9e 00 0c beq- cr7,ffc0cd40 <_User_extensions_Thread_exitted+0x48>
(*the_extension->Callouts.thread_exitted)( executing );
ffc0cd38: 7c 09 03 a6 mtctr r0
ffc0cd3c: 4e 80 04 21 bctrl
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
ffc0cd40: 83 ff 00 04 lwz r31,4(r31)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0cd44: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0cd48: 40 9e ff e0 bne+ cr7,ffc0cd28 <_User_extensions_Thread_exitted+0x30>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
ffc0cd4c: 80 01 00 1c lwz r0,28(r1)
ffc0cd50: 83 a1 00 0c lwz r29,12(r1)
ffc0cd54: 7c 08 03 a6 mtlr r0
ffc0cd58: 83 c1 00 10 lwz r30,16(r1)
ffc0cd5c: 83 e1 00 14 lwz r31,20(r1)
ffc0cd60: 38 21 00 18 addi r1,r1,24
ffc0cd64: 4e 80 00 20 blr
ffc0e09c <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
ffc0e09c: 94 21 ff e8 stwu r1,-24(r1)
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
ffc0e0a0: 3d 20 00 00 lis r9,0
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
ffc0e0a4: 7c 08 02 a6 mflr r0
ffc0e0a8: 93 c1 00 10 stw r30,16(r1)
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
ffc0e0ac: 3b c9 2d 94 addi r30,r9,11668
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0e0b0: 3b de 00 04 addi r30,r30,4
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
ffc0e0b4: 93 e1 00 14 stw r31,20(r1)
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
ffc0e0b8: 83 e9 2d 94 lwz r31,11668(r9)
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
ffc0e0bc: 93 a1 00 0c stw r29,12(r1)
ffc0e0c0: 7c 7d 1b 78 mr r29,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0e0c4: 7f 9f f0 00 cmpw cr7,r31,r30
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
ffc0e0c8: 90 01 00 1c stw r0,28(r1)
ffc0e0cc: 93 81 00 08 stw r28,8(r1)
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0e0d0: 41 9e 00 34 beq- cr7,ffc0e104 <_User_extensions_Thread_restart+0x68><== NEVER TAKEN
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
(*the_extension->Callouts.thread_restart)(
ffc0e0d4: 3f 80 00 00 lis r28,0
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
ffc0e0d8: 80 1f 00 1c lwz r0,28(r31)
(*the_extension->Callouts.thread_restart)(
ffc0e0dc: 39 3c 2d d8 addi r9,r28,11736
ffc0e0e0: 7f a4 eb 78 mr r4,r29
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
ffc0e0e4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e0e8: 41 9e 00 10 beq- cr7,ffc0e0f8 <_User_extensions_Thread_restart+0x5c>
(*the_extension->Callouts.thread_restart)(
ffc0e0ec: 80 69 00 0c lwz r3,12(r9)
ffc0e0f0: 7c 09 03 a6 mtctr r0
ffc0e0f4: 4e 80 04 21 bctrl
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
ffc0e0f8: 83 ff 00 00 lwz r31,0(r31)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0e0fc: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0e100: 40 9e ff d8 bne+ cr7,ffc0e0d8 <_User_extensions_Thread_restart+0x3c>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
ffc0e104: 80 01 00 1c lwz r0,28(r1)
ffc0e108: 83 81 00 08 lwz r28,8(r1)
ffc0e10c: 7c 08 03 a6 mtlr r0
ffc0e110: 83 a1 00 0c lwz r29,12(r1)
ffc0e114: 83 c1 00 10 lwz r30,16(r1)
ffc0e118: 83 e1 00 14 lwz r31,20(r1)
ffc0e11c: 38 21 00 18 addi r1,r1,24
ffc0e120: 4e 80 00 20 blr
ffc0cf38 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
ffc0cf38: 94 21 ff e8 stwu r1,-24(r1)
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
ffc0cf3c: 3d 20 00 00 lis r9,0
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
ffc0cf40: 7c 08 02 a6 mflr r0
ffc0cf44: 93 c1 00 10 stw r30,16(r1)
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
ffc0cf48: 3b c9 2d 54 addi r30,r9,11604
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0cf4c: 3b de 00 04 addi r30,r30,4
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
ffc0cf50: 93 e1 00 14 stw r31,20(r1)
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
ffc0cf54: 83 e9 2d 54 lwz r31,11604(r9)
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
ffc0cf58: 93 a1 00 0c stw r29,12(r1)
ffc0cf5c: 7c 7d 1b 78 mr r29,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0cf60: 7f 9f f0 00 cmpw cr7,r31,r30
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
ffc0cf64: 90 01 00 1c stw r0,28(r1)
ffc0cf68: 93 81 00 08 stw r28,8(r1)
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0cf6c: 41 9e 00 34 beq- cr7,ffc0cfa0 <_User_extensions_Thread_start+0x68><== NEVER TAKEN
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
(*the_extension->Callouts.thread_start)(
ffc0cf70: 3f 80 00 00 lis r28,0
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
ffc0cf74: 80 1f 00 18 lwz r0,24(r31)
(*the_extension->Callouts.thread_start)(
ffc0cf78: 39 3c 2d 98 addi r9,r28,11672
ffc0cf7c: 7f a4 eb 78 mr r4,r29
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
ffc0cf80: 2f 80 00 00 cmpwi cr7,r0,0
ffc0cf84: 41 9e 00 10 beq- cr7,ffc0cf94 <_User_extensions_Thread_start+0x5c>
(*the_extension->Callouts.thread_start)(
ffc0cf88: 80 69 00 0c lwz r3,12(r9)
ffc0cf8c: 7c 09 03 a6 mtctr r0
ffc0cf90: 4e 80 04 21 bctrl
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
ffc0cf94: 83 ff 00 00 lwz r31,0(r31)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0cf98: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0cf9c: 40 9e ff d8 bne+ cr7,ffc0cf74 <_User_extensions_Thread_start+0x3c>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
ffc0cfa0: 80 01 00 1c lwz r0,28(r1)
ffc0cfa4: 83 81 00 08 lwz r28,8(r1)
ffc0cfa8: 7c 08 03 a6 mtlr r0
ffc0cfac: 83 a1 00 0c lwz r29,12(r1)
ffc0cfb0: 83 c1 00 10 lwz r30,16(r1)
ffc0cfb4: 83 e1 00 14 lwz r31,20(r1)
ffc0cfb8: 38 21 00 18 addi r1,r1,24
ffc0cfbc: 4e 80 00 20 blr
ffc0cfc0 <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
ffc0cfc0: 94 21 ff e8 stwu r1,-24(r1)
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
ffc0cfc4: 3d 20 00 00 lis r9,0
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
ffc0cfc8: 7c 08 02 a6 mflr r0
ffc0cfcc: 93 c1 00 10 stw r30,16(r1)
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
ffc0cfd0: 3b c9 2c 30 addi r30,r9,11312
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
ffc0cfd4: 3b de 00 04 addi r30,r30,4
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
ffc0cfd8: 93 e1 00 14 stw r31,20(r1)
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
ffc0cfdc: 83 e9 2c 30 lwz r31,11312(r9)
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
ffc0cfe0: 93 81 00 08 stw r28,8(r1)
ffc0cfe4: 7c 7c 1b 78 mr r28,r3
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
ffc0cfe8: 7f 9f f0 00 cmpw cr7,r31,r30
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
ffc0cfec: 93 a1 00 0c stw r29,12(r1)
ffc0cff0: 7c 9d 23 78 mr r29,r4
ffc0cff4: 90 01 00 1c stw r0,28(r1)
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
ffc0cff8: 41 9e 00 24 beq- cr7,ffc0d01c <_User_extensions_Thread_switch+0x5c><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
ffc0cffc: 80 1f 00 08 lwz r0,8(r31)
ffc0d000: 7f 83 e3 78 mr r3,r28
ffc0d004: 7f a4 eb 78 mr r4,r29
ffc0d008: 7c 09 03 a6 mtctr r0
ffc0d00c: 4e 80 04 21 bctrl
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
ffc0d010: 83 ff 00 00 lwz r31,0(r31)
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
ffc0d014: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0d018: 40 9e ff e4 bne+ cr7,ffc0cffc <_User_extensions_Thread_switch+0x3c>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
ffc0d01c: 80 01 00 1c lwz r0,28(r1)
ffc0d020: 83 81 00 08 lwz r28,8(r1)
ffc0d024: 7c 08 03 a6 mtlr r0
ffc0d028: 83 a1 00 0c lwz r29,12(r1)
ffc0d02c: 83 c1 00 10 lwz r30,16(r1)
ffc0d030: 83 e1 00 14 lwz r31,20(r1)
ffc0d034: 38 21 00 18 addi r1,r1,24
ffc0d038: 4e 80 00 20 blr
ffc0f4e0 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
ffc0f4e0: 94 21 ff e0 stwu r1,-32(r1)
ffc0f4e4: 7c 08 02 a6 mflr r0
ffc0f4e8: 93 c1 00 18 stw r30,24(r1)
ffc0f4ec: 7c be 2b 78 mr r30,r5
ffc0f4f0: 93 e1 00 1c stw r31,28(r1)
ffc0f4f4: 7c 7f 1b 78 mr r31,r3
ffc0f4f8: 90 01 00 24 stw r0,36(r1)
ffc0f4fc: 93 61 00 0c stw r27,12(r1)
ffc0f500: 93 81 00 10 stw r28,16(r1)
ffc0f504: 93 a1 00 14 stw r29,20(r1)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0f508: 7c 00 00 a6 mfmsr r0
ffc0f50c: 7d 30 42 a6 mfsprg r9,0
ffc0f510: 7c 09 48 78 andc r9,r0,r9
ffc0f514: 7d 20 01 24 mtmsr r9
}
}
_ISR_Enable( level );
}
ffc0f518: 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 );
ffc0f51c: 3b 83 00 04 addi r28,r3,4
Watchdog_Interval units
)
{
ISR_Level level;
_ISR_Disable( level );
ffc0f520: 7c 0b 03 78 mr r11,r0
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
ffc0f524: 7f 89 e0 00 cmpw cr7,r9,r28
ffc0f528: 41 9e 00 74 beq- cr7,ffc0f59c <_Watchdog_Adjust+0xbc>
switch ( direction ) {
ffc0f52c: 2f 84 00 00 cmpwi cr7,r4,0
ffc0f530: 40 9e 00 94 bne- cr7,ffc0f5c4 <_Watchdog_Adjust+0xe4>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
ffc0f534: 2f 85 00 00 cmpwi cr7,r5,0
ffc0f538: 7c 0b 03 78 mr r11,r0
ffc0f53c: 41 9e 00 60 beq- cr7,ffc0f59c <_Watchdog_Adjust+0xbc> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
ffc0f540: 83 a9 00 10 lwz r29,16(r9)
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
ffc0f544: 3b 60 00 01 li r27,1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
ffc0f548: 7f 85 e8 40 cmplw cr7,r5,r29
ffc0f54c: 40 bc 00 18 bge+ cr7,ffc0f564 <_Watchdog_Adjust+0x84> <== ALWAYS TAKEN
ffc0f550: 48 00 00 b0 b ffc0f600 <_Watchdog_Adjust+0x120> <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
ffc0f554: 41 82 00 48 beq- ffc0f59c <_Watchdog_Adjust+0xbc> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
ffc0f558: 83 a9 00 10 lwz r29,16(r9)
ffc0f55c: 7f 9d f0 40 cmplw cr7,r29,r30
ffc0f560: 41 9d 00 a0 bgt- cr7,ffc0f600 <_Watchdog_Adjust+0x120>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
ffc0f564: 93 69 00 10 stw r27,16(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0f568: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
_Watchdog_Tickle( header );
ffc0f56c: 7f e3 fb 78 mr r3,r31
ffc0f570: 48 00 03 3d bl ffc0f8ac <_Watchdog_Tickle>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0f574: 7d 60 00 a6 mfmsr r11
ffc0f578: 7c 10 42 a6 mfsprg r0,0
ffc0f57c: 7d 60 00 78 andc r0,r11,r0
ffc0f580: 7c 00 01 24 mtmsr r0
}
}
_ISR_Enable( level );
}
ffc0f584: 80 1f 00 00 lwz r0,0(r31)
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
ffc0f588: 7f dd f0 51 subf. r30,r29,r30
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
ffc0f58c: 7f 9c 00 00 cmpw cr7,r28,r0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
ffc0f590: 7c 09 03 78 mr r9,r0
ffc0f594: 7d 60 5b 78 mr r0,r11
ffc0f598: 40 9e ff bc bne+ cr7,ffc0f554 <_Watchdog_Adjust+0x74>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0f59c: 7d 60 01 24 mtmsr r11
}
}
_ISR_Enable( level );
}
ffc0f5a0: 80 01 00 24 lwz r0,36(r1)
ffc0f5a4: 83 61 00 0c lwz r27,12(r1)
ffc0f5a8: 7c 08 03 a6 mtlr r0
ffc0f5ac: 83 81 00 10 lwz r28,16(r1)
ffc0f5b0: 83 a1 00 14 lwz r29,20(r1)
ffc0f5b4: 83 c1 00 18 lwz r30,24(r1)
ffc0f5b8: 83 e1 00 1c lwz r31,28(r1)
ffc0f5bc: 38 21 00 20 addi r1,r1,32
ffc0f5c0: 4e 80 00 20 blr
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
ffc0f5c4: 2f 84 00 01 cmpwi cr7,r4,1
ffc0f5c8: 40 9e ff d4 bne+ cr7,ffc0f59c <_Watchdog_Adjust+0xbc> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
ffc0f5cc: 80 09 00 10 lwz r0,16(r9)
ffc0f5d0: 7f c0 2a 14 add r30,r0,r5
ffc0f5d4: 93 c9 00 10 stw r30,16(r9)
ffc0f5d8: 7d 60 01 24 mtmsr r11
}
}
_ISR_Enable( level );
}
ffc0f5dc: 80 01 00 24 lwz r0,36(r1)
ffc0f5e0: 83 61 00 0c lwz r27,12(r1)
ffc0f5e4: 7c 08 03 a6 mtlr r0
ffc0f5e8: 83 81 00 10 lwz r28,16(r1)
ffc0f5ec: 83 a1 00 14 lwz r29,20(r1)
ffc0f5f0: 83 c1 00 18 lwz r30,24(r1)
ffc0f5f4: 83 e1 00 1c lwz r31,28(r1)
ffc0f5f8: 38 21 00 20 addi r1,r1,32
ffc0f5fc: 4e 80 00 20 blr
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
ffc0f600: 7f de e8 50 subf r30,r30,r29
ffc0f604: 93 c9 00 10 stw r30,16(r9)
break;
ffc0f608: 4b ff ff 94 b ffc0f59c <_Watchdog_Adjust+0xbc>
ffc21190 <_Watchdog_Adjust_to_chain>:
{
Watchdog_Interval units = units_arg;
ISR_Level level;
Watchdog_Control *first;
if ( units <= 0 ) {
ffc21190: 2c 04 00 00 cmpwi r4,0
Chain_Control *header,
Watchdog_Interval units_arg,
Chain_Control *to_fire
)
{
ffc21194: 94 21 ff f0 stwu r1,-16(r1)
ffc21198: 93 e1 00 0c stw r31,12(r1)
Watchdog_Interval units = units_arg;
ISR_Level level;
Watchdog_Control *first;
if ( units <= 0 ) {
ffc2119c: 41 82 00 94 beq- ffc21230 <_Watchdog_Adjust_to_chain+0xa0>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc211a0: 7c c0 00 a6 mfmsr r6
ffc211a4: 7c 10 42 a6 mfsprg r0,0
ffc211a8: 7c c0 00 78 andc r0,r6,r0
ffc211ac: 7c 00 01 24 mtmsr r0
return;
}
_ISR_Disable( level );
ffc211b0: 81 23 00 00 lwz r9,0(r3)
/*
* The first set happens in less than units, so take all of them
* off the chain and adjust units to reflect this.
*/
units -= first->delta_interval;
first->delta_interval = 0;
ffc211b4: 3b e0 00 00 li r31,0
ffc211b8: 38 e3 00 04 addi r7,r3,4
ffc211bc: 39 85 00 04 addi r12,r5,4
while ( 1 ) {
if ( units <= 0 ) {
break;
}
if ( _Chain_Is_empty( header ) ) {
ffc211c0: 7f 89 38 00 cmpw cr7,r9,r7
ffc211c4: 41 9e 00 68 beq- cr7,ffc2122c <_Watchdog_Adjust_to_chain+0x9c>
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
ffc211c8: 80 09 00 10 lwz r0,16(r9)
ffc211cc: 7f 80 20 40 cmplw cr7,r0,r4
ffc211d0: 41 9d 00 6c bgt- cr7,ffc2123c <_Watchdog_Adjust_to_chain+0xac>
/*
* The first set happens in less than units, so take all of them
* off the chain and adjust units to reflect this.
*/
units -= first->delta_interval;
first->delta_interval = 0;
ffc211d4: 93 e9 00 10 stw r31,16(r9)
/*
* The first set happens in less than units, so take all of them
* off the chain and adjust units to reflect this.
*/
units -= first->delta_interval;
ffc211d8: 7c 80 20 50 subf r4,r0,r4
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc211dc: 81 09 00 00 lwz r8,0(r9)
previous = the_node->previous;
ffc211e0: 81 49 00 04 lwz r10,4(r9)
next->previous = previous;
ffc211e4: 91 48 00 04 stw r10,4(r8)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
ffc211e8: 81 65 00 08 lwz r11,8(r5)
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
previous->next = next;
ffc211ec: 91 0a 00 00 stw r8,0(r10)
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
ffc211f0: 91 89 00 00 stw r12,0(r9)
tail->previous = the_node;
old_last->next = the_node;
ffc211f4: 91 2b 00 00 stw r9,0(r11)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
ffc211f8: 91 25 00 08 stw r9,8(r5)
old_last->next = the_node;
the_node->previous = old_last;
ffc211fc: 91 69 00 04 stw r11,4(r9)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc21200: 7c 00 00 a6 mfmsr r0
ffc21204: 7c c0 01 24 mtmsr r6
ffc21208: 7c 00 01 24 mtmsr r0
break;
}
}
_ISR_Enable( level );
}
ffc2120c: 81 23 00 00 lwz r9,0(r3)
_Chain_Extract_unprotected( &first->Node );
_Chain_Append_unprotected( to_fire, &first->Node );
_ISR_Flash( level );
if ( _Chain_Is_empty( header ) )
ffc21210: 7f 87 48 00 cmpw cr7,r7,r9
ffc21214: 41 9e 00 10 beq- cr7,ffc21224 <_Watchdog_Adjust_to_chain+0x94>
break;
first = _Watchdog_First( header );
if ( first->delta_interval != 0 )
ffc21218: 80 09 00 10 lwz r0,16(r9)
ffc2121c: 2f 80 00 00 cmpwi cr7,r0,0
ffc21220: 41 9e ff bc beq+ cr7,ffc211dc <_Watchdog_Adjust_to_chain+0x4c><== NEVER TAKEN
}
_ISR_Disable( level );
while ( 1 ) {
if ( units <= 0 ) {
ffc21224: 2f 84 00 00 cmpwi cr7,r4,0
ffc21228: 40 9e ff 98 bne+ cr7,ffc211c0 <_Watchdog_Adjust_to_chain+0x30>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc2122c: 7c c0 01 24 mtmsr r6
break;
}
}
_ISR_Enable( level );
}
ffc21230: 83 e1 00 0c lwz r31,12(r1)
ffc21234: 38 21 00 10 addi r1,r1,16
ffc21238: 4e 80 00 20 blr
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
first->delta_interval -= units;
ffc2123c: 7c 04 00 50 subf r0,r4,r0
ffc21240: 90 09 00 10 stw r0,16(r9)
break;
ffc21244: 4b ff ff e8 b ffc2122c <_Watchdog_Adjust_to_chain+0x9c>
ffc0d03c <_Watchdog_Insert>:
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
ffc0d03c: 3d 20 00 00 lis r9,0
ffc0d040: 80 09 2d a0 lwz r0,11680(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0d044: 7c e0 00 a6 mfmsr r7
ffc0d048: 7d 30 42 a6 mfsprg r9,0
ffc0d04c: 7c e9 48 78 andc r9,r7,r9
ffc0d050: 7d 20 01 24 mtmsr r9
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
ffc0d054: 81 24 00 08 lwz r9,8(r4)
ffc0d058: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d05c: 40 9e 01 0c bne- cr7,ffc0d168 <_Watchdog_Insert+0x12c>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
ffc0d060: 3c a0 00 00 lis r5,0
ffc0d064: 81 25 27 dc lwz r9,10204(r5)
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
ffc0d068: 39 60 00 01 li r11,1
ffc0d06c: 91 64 00 08 stw r11,8(r4)
ffc0d070: 3d 80 00 00 lis r12,0
_Watchdog_Sync_count++;
ffc0d074: 39 29 00 01 addi r9,r9,1
ffc0d078: 91 25 27 dc stw r9,10204(r5)
restart:
delta_interval = the_watchdog->initial;
ffc0d07c: 81 24 00 0c lwz r9,12(r4)
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
ffc0d080: 81 63 00 00 lwz r11,0(r3)
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
ffc0d084: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d088: 41 9e 00 98 beq- cr7,ffc0d120 <_Watchdog_Insert+0xe4>
ffc0d08c: 81 4b 00 00 lwz r10,0(r11)
ffc0d090: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0d094: 41 9e 00 8c beq- cr7,ffc0d120 <_Watchdog_Insert+0xe4>
break;
if ( delta_interval < after->delta_interval ) {
ffc0d098: 81 4b 00 10 lwz r10,16(r11)
ffc0d09c: 7f 89 50 40 cmplw cr7,r9,r10
ffc0d0a0: 41 9c 00 d0 blt- cr7,ffc0d170 <_Watchdog_Insert+0x134>
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc0d0a4: 7d 00 00 a6 mfmsr r8
ffc0d0a8: 7c e0 01 24 mtmsr r7
ffc0d0ac: 7d 00 01 24 mtmsr r8
delta_interval -= after->delta_interval;
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
ffc0d0b0: 81 04 00 08 lwz r8,8(r4)
ffc0d0b4: 2f 88 00 01 cmpwi cr7,r8,1
ffc0d0b8: 40 9e 00 98 bne- cr7,ffc0d150 <_Watchdog_Insert+0x114>
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
ffc0d0bc: 81 0c 27 cc lwz r8,10188(r12)
ffc0d0c0: 38 cc 27 cc addi r6,r12,10188
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
ffc0d0c4: 7d 2a 48 50 subf r9,r10,r9
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
ffc0d0c8: 7f 80 40 40 cmplw cr7,r0,r8
ffc0d0cc: 40 bc 00 48 bge+ cr7,ffc0d114 <_Watchdog_Insert+0xd8>
ffc0d0d0: 48 00 00 dc b ffc0d1ac <_Watchdog_Insert+0x170>
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
ffc0d0d4: 81 4b 00 00 lwz r10,0(r11)
ffc0d0d8: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0d0dc: 41 9e 00 44 beq- cr7,ffc0d120 <_Watchdog_Insert+0xe4>
break;
if ( delta_interval < after->delta_interval ) {
ffc0d0e0: 81 4b 00 10 lwz r10,16(r11)
ffc0d0e4: 7f 8a 48 40 cmplw cr7,r10,r9
ffc0d0e8: 41 9d 00 88 bgt- cr7,ffc0d170 <_Watchdog_Insert+0x134>
ffc0d0ec: 7d 00 00 a6 mfmsr r8
ffc0d0f0: 7c e0 01 24 mtmsr r7
ffc0d0f4: 7d 00 01 24 mtmsr r8
delta_interval -= after->delta_interval;
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
ffc0d0f8: 81 04 00 08 lwz r8,8(r4)
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
ffc0d0fc: 7d 2a 48 50 subf r9,r10,r9
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
ffc0d100: 2f 88 00 01 cmpwi cr7,r8,1
ffc0d104: 40 9e 00 4c bne- cr7,ffc0d150 <_Watchdog_Insert+0x114> <== NEVER TAKEN
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
ffc0d108: 81 46 00 00 lwz r10,0(r6)
ffc0d10c: 7f 80 50 40 cmplw cr7,r0,r10
ffc0d110: 41 9c 00 9c blt- cr7,ffc0d1ac <_Watchdog_Insert+0x170> <== NEVER TAKEN
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
ffc0d114: 2f 89 00 00 cmpwi cr7,r9,0
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
ffc0d118: 81 6b 00 00 lwz r11,0(r11)
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
ffc0d11c: 40 9e ff b8 bne+ cr7,ffc0d0d4 <_Watchdog_Insert+0x98>
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
ffc0d120: 81 6b 00 04 lwz r11,4(r11)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
ffc0d124: 3d 00 00 00 lis r8,0
ffc0d128: 81 08 27 e0 lwz r8,10208(r8)
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
ffc0d12c: 38 c0 00 02 li r6,2
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
ffc0d130: 81 4b 00 00 lwz r10,0(r11)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc0d134: 91 64 00 04 stw r11,4(r4)
ffc0d138: 90 c4 00 08 stw r6,8(r4)
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
ffc0d13c: 91 24 00 10 stw r9,16(r4)
before_node = after_node->next;
after_node->next = the_node;
ffc0d140: 90 8b 00 00 stw r4,0(r11)
the_node->next = before_node;
before_node->previous = the_node;
ffc0d144: 90 8a 00 04 stw r4,4(r10)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
ffc0d148: 91 44 00 00 stw r10,0(r4)
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
ffc0d14c: 91 04 00 14 stw r8,20(r4)
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
ffc0d150: 90 0c 27 cc stw r0,10188(r12)
_Watchdog_Sync_count--;
ffc0d154: 81 25 27 dc lwz r9,10204(r5)
ffc0d158: 38 09 ff ff addi r0,r9,-1
ffc0d15c: 90 05 27 dc stw r0,10204(r5)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0d160: 7c e0 01 24 mtmsr r7
ffc0d164: 4e 80 00 20 blr
ffc0d168: 7c e0 01 24 mtmsr r7
ffc0d16c: 4e 80 00 20 blr
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
ffc0d170: 7d 49 50 50 subf r10,r9,r10
ffc0d174: 91 4b 00 10 stw r10,16(r11)
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
ffc0d178: 3d 00 00 00 lis r8,0
ffc0d17c: 38 c0 00 02 li r6,2
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
ffc0d180: 81 6b 00 04 lwz r11,4(r11)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
ffc0d184: 81 08 27 e0 lwz r8,10208(r8)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
ffc0d188: 81 4b 00 00 lwz r10,0(r11)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc0d18c: 91 64 00 04 stw r11,4(r4)
ffc0d190: 90 c4 00 08 stw r6,8(r4)
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
ffc0d194: 91 24 00 10 stw r9,16(r4)
before_node = after_node->next;
after_node->next = the_node;
ffc0d198: 90 8b 00 00 stw r4,0(r11)
the_node->next = before_node;
before_node->previous = the_node;
ffc0d19c: 90 8a 00 04 stw r4,4(r10)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
ffc0d1a0: 91 44 00 00 stw r10,0(r4)
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
ffc0d1a4: 91 04 00 14 stw r8,20(r4)
ffc0d1a8: 4b ff ff a8 b ffc0d150 <_Watchdog_Insert+0x114>
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
_Watchdog_Sync_level = insert_isr_nest_level;
ffc0d1ac: 90 0c 27 cc stw r0,10188(r12)
goto restart;
ffc0d1b0: 4b ff fe cc b ffc0d07c <_Watchdog_Insert+0x40>
ffc0d20c <_Watchdog_Remove>:
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0d20c: 7d 20 00 a6 mfmsr r9
ffc0d210: 7c 10 42 a6 mfsprg r0,0
ffc0d214: 7d 20 00 78 andc r0,r9,r0
ffc0d218: 7c 00 01 24 mtmsr r0
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
ffc0d21c: 80 03 00 08 lwz r0,8(r3)
switch ( previous_state ) {
ffc0d220: 2f 80 00 01 cmpwi cr7,r0,1
ffc0d224: 41 9e 00 98 beq- cr7,ffc0d2bc <_Watchdog_Remove+0xb0>
ffc0d228: 2b 80 00 01 cmplwi cr7,r0,1
ffc0d22c: 40 9c 00 1c bge- cr7,ffc0d248 <_Watchdog_Remove+0x3c>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
ffc0d230: 3d 60 00 00 lis r11,0
ffc0d234: 81 6b 27 e0 lwz r11,10208(r11)
ffc0d238: 91 63 00 18 stw r11,24(r3)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0d23c: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
return( previous_state );
}
ffc0d240: 7c 03 03 78 mr r3,r0
ffc0d244: 4e 80 00 20 blr
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
ffc0d248: 2b 80 00 03 cmplwi cr7,r0,3
ffc0d24c: 41 bd ff e4 bgt- cr7,ffc0d230 <_Watchdog_Remove+0x24> <== NEVER TAKEN
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
ffc0d250: 81 63 00 00 lwz r11,0(r3)
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0d254: 39 00 00 00 li r8,0
ffc0d258: 91 03 00 08 stw r8,8(r3)
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
ffc0d25c: 81 4b 00 00 lwz r10,0(r11)
ffc0d260: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0d264: 41 9e 00 14 beq- cr7,ffc0d278 <_Watchdog_Remove+0x6c>
next_watchdog->delta_interval += the_watchdog->delta_interval;
ffc0d268: 81 0b 00 10 lwz r8,16(r11)
ffc0d26c: 81 43 00 10 lwz r10,16(r3)
ffc0d270: 7d 48 52 14 add r10,r8,r10
ffc0d274: 91 4b 00 10 stw r10,16(r11)
if ( _Watchdog_Sync_count )
ffc0d278: 3d 40 00 00 lis r10,0
ffc0d27c: 81 4a 27 dc lwz r10,10204(r10)
ffc0d280: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0d284: 41 9e 00 14 beq- cr7,ffc0d298 <_Watchdog_Remove+0x8c>
_Watchdog_Sync_level = _ISR_Nest_level;
ffc0d288: 3d 40 00 00 lis r10,0
ffc0d28c: 81 0a 2d a0 lwz r8,11680(r10)
ffc0d290: 3d 40 00 00 lis r10,0
ffc0d294: 91 0a 27 cc stw r8,10188(r10)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
ffc0d298: 81 43 00 04 lwz r10,4(r3)
next->previous = previous;
ffc0d29c: 91 4b 00 04 stw r10,4(r11)
previous->next = next;
ffc0d2a0: 91 6a 00 00 stw r11,0(r10)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
ffc0d2a4: 3d 60 00 00 lis r11,0
ffc0d2a8: 81 6b 27 e0 lwz r11,10208(r11)
ffc0d2ac: 91 63 00 18 stw r11,24(r3)
ffc0d2b0: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
return( previous_state );
}
ffc0d2b4: 7c 03 03 78 mr r3,r0
ffc0d2b8: 4e 80 00 20 blr
/*
* 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;
ffc0d2bc: 39 60 00 00 li r11,0
ffc0d2c0: 91 63 00 08 stw r11,8(r3)
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
ffc0d2c4: 3d 60 00 00 lis r11,0
ffc0d2c8: 81 6b 27 e0 lwz r11,10208(r11)
ffc0d2cc: 91 63 00 18 stw r11,24(r3)
ffc0d2d0: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
return( previous_state );
}
ffc0d2d4: 7c 03 03 78 mr r3,r0
ffc0d2d8: 4e 80 00 20 blr
ffc0ec0c <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
ffc0ec0c: 94 21 ff e8 stwu r1,-24(r1)
ffc0ec10: 7c 08 02 a6 mflr r0
ffc0ec14: 93 c1 00 10 stw r30,16(r1)
ffc0ec18: 7c 7e 1b 78 mr r30,r3
ffc0ec1c: 93 e1 00 14 stw r31,20(r1)
ffc0ec20: 7c 9f 23 78 mr r31,r4
ffc0ec24: 90 01 00 1c stw r0,28(r1)
ffc0ec28: 93 81 00 08 stw r28,8(r1)
ffc0ec2c: 93 a1 00 0c stw r29,12(r1)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0ec30: 7f a0 00 a6 mfmsr r29
ffc0ec34: 7c 10 42 a6 mfsprg r0,0
ffc0ec38: 7f a0 00 78 andc r0,r29,r0
ffc0ec3c: 7c 00 01 24 mtmsr r0
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
ffc0ec40: 3c 60 ff c2 lis r3,-62
ffc0ec44: 7f e5 fb 78 mr r5,r31
ffc0ec48: 38 63 13 9c addi r3,r3,5020
ffc0ec4c: 7f c4 f3 78 mr r4,r30
ffc0ec50: 4c c6 31 82 crclr 4*cr1+eq
ffc0ec54: 4b ff 80 41 bl ffc06c94 <printk>
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
ffc0ec58: 83 9f 00 00 lwz r28,0(r31)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0ec5c: 3b ff 00 04 addi r31,r31,4
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
ffc0ec60: 7f 9c f8 00 cmpw cr7,r28,r31
ffc0ec64: 41 9e 00 54 beq- cr7,ffc0ecb8 <_Watchdog_Report_chain+0xac>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
ffc0ec68: 7f 84 e3 78 mr r4,r28
ffc0ec6c: 38 60 00 00 li r3,0
ffc0ec70: 48 00 00 5d bl ffc0eccc <_Watchdog_Report>
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ;
node = node->next )
ffc0ec74: 83 9c 00 00 lwz r28,0(r28)
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
ffc0ec78: 7f 9c f8 00 cmpw cr7,r28,r31
ffc0ec7c: 40 9e ff ec bne+ cr7,ffc0ec68 <_Watchdog_Report_chain+0x5c><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
ffc0ec80: 3c 60 ff c2 lis r3,-62
ffc0ec84: 38 63 13 b4 addi r3,r3,5044
ffc0ec88: 7f c4 f3 78 mr r4,r30
ffc0ec8c: 4c c6 31 82 crclr 4*cr1+eq
ffc0ec90: 4b ff 80 05 bl ffc06c94 <printk>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0ec94: 7f a0 01 24 mtmsr r29
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
ffc0ec98: 80 01 00 1c lwz r0,28(r1)
ffc0ec9c: 83 81 00 08 lwz r28,8(r1)
ffc0eca0: 7c 08 03 a6 mtlr r0
ffc0eca4: 83 a1 00 0c lwz r29,12(r1)
ffc0eca8: 83 c1 00 10 lwz r30,16(r1)
ffc0ecac: 83 e1 00 14 lwz r31,20(r1)
ffc0ecb0: 38 21 00 18 addi r1,r1,24
ffc0ecb4: 4e 80 00 20 blr
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
ffc0ecb8: 3c 60 ff c2 lis r3,-62
ffc0ecbc: 38 63 13 c4 addi r3,r3,5060
ffc0ecc0: 4c c6 31 82 crclr 4*cr1+eq
ffc0ecc4: 4b ff 7f d1 bl ffc06c94 <printk>
ffc0ecc8: 4b ff ff cc b ffc0ec94 <_Watchdog_Report_chain+0x88>
ffc28820 <__kill>:
#endif
int __kill( pid_t pid, int sig )
{
return 0;
}
ffc28820: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc28824: 4e 80 00 20 blr <== NOT EXECUTED
ffc04c5c <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
ffc04c5c: 4b ff ff 64 b ffc04bc0 <gettimeofday> <== NOT EXECUTED
ffc09fe8 <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
ffc09fe8: 94 21 ff 90 stwu r1,-112(r1)
ffc09fec: 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 );
ffc09ff0: 7c 83 23 78 mr r3,r4
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
ffc09ff4: 93 81 00 60 stw r28,96(r1)
ffc09ff8: 7c bc 2b 78 mr r28,r5
ffc09ffc: 93 e1 00 6c stw r31,108(r1)
ffc0a000: 7c 9f 23 78 mr r31,r4
ffc0a004: 90 01 00 74 stw r0,116(r1)
ffc0a008: 93 41 00 58 stw r26,88(r1)
ffc0a00c: 93 61 00 5c stw r27,92(r1)
ffc0a010: 93 a1 00 64 stw r29,100(r1)
ffc0a014: 93 c1 00 68 stw r30,104(r1)
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
ffc0a018: 4b ff e2 a9 bl ffc082c0 <rtems_filesystem_dirname>
if ( old_parent_pathlen == 0 )
ffc0a01c: 2c 03 00 00 cmpwi r3,0
ffc0a020: 40 82 01 cc bne- ffc0a1ec <_rename_r+0x204>
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
ffc0a024: 3b a1 00 24 addi r29,r1,36
ffc0a028: 7f e3 fb 78 mr r3,r31
ffc0a02c: 38 81 00 08 addi r4,r1,8
ffc0a030: 7f a5 eb 78 mr r5,r29
ffc0a034: 48 00 04 bd bl ffc0a4f0 <rtems_filesystem_get_start_loc>
ffc0a038: 3b c0 00 00 li r30,0
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;
ffc0a03c: 3b 60 00 00 li r27,0
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
ffc0a040: 80 01 00 24 lwz r0,36(r1)
name = old + old_parent_pathlen;
ffc0a044: 7f ff f2 14 add r31,r31,r30
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
ffc0a048: 7f e3 fb 78 mr r3,r31
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
ffc0a04c: 93 e1 00 0c stw r31,12(r1)
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
ffc0a050: 3b c1 00 10 addi r30,r1,16
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
ffc0a054: 90 01 00 10 stw r0,16(r1)
ffc0a058: 80 01 00 28 lwz r0,40(r1)
ffc0a05c: 90 01 00 14 stw r0,20(r1)
ffc0a060: 80 01 00 2c lwz r0,44(r1)
ffc0a064: 90 01 00 18 stw r0,24(r1)
ffc0a068: 80 01 00 30 lwz r0,48(r1)
ffc0a06c: 90 01 00 1c stw r0,28(r1)
ffc0a070: 80 01 00 34 lwz r0,52(r1)
ffc0a074: 90 01 00 20 stw r0,32(r1)
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
ffc0a078: 48 01 06 21 bl ffc1a698 <strlen>
ffc0a07c: 7c 64 1b 78 mr r4,r3
ffc0a080: 7f e3 fb 78 mr r3,r31
ffc0a084: 4b ff e2 9d bl ffc08320 <rtems_filesystem_prefix_separators>
ffc0a088: 7f ff 1a 14 add r31,r31,r3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
ffc0a08c: 7f e3 fb 78 mr r3,r31
* 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 ) );
ffc0a090: 93 e1 00 0c stw r31,12(r1)
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
ffc0a094: 48 01 06 05 bl ffc1a698 <strlen>
ffc0a098: 38 a0 00 00 li r5,0
ffc0a09c: 7c 64 1b 78 mr r4,r3
ffc0a0a0: 7f c6 f3 78 mr r6,r30
ffc0a0a4: 7f e3 fb 78 mr r3,r31
ffc0a0a8: 38 e0 00 00 li r7,0
ffc0a0ac: 4b ff e0 ed bl ffc08198 <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false );
if ( result != 0 ) {
ffc0a0b0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a0b4: 40 9e 01 20 bne- cr7,ffc0a1d4 <_rename_r+0x1ec>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
ffc0a0b8: 3b e1 00 38 addi r31,r1,56
ffc0a0bc: 7f 83 e3 78 mr r3,r28
ffc0a0c0: 38 81 00 08 addi r4,r1,8
ffc0a0c4: 7f e5 fb 78 mr r5,r31
ffc0a0c8: 48 00 04 29 bl ffc0a4f0 <rtems_filesystem_get_start_loc>
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
ffc0a0cc: 81 21 00 44 lwz r9,68(r1)
ffc0a0d0: 80 61 00 08 lwz r3,8(r1)
ffc0a0d4: 7f e4 fb 78 mr r4,r31
ffc0a0d8: 80 09 00 04 lwz r0,4(r9)
ffc0a0dc: 38 a1 00 0c addi r5,r1,12
ffc0a0e0: 7c 7c 1a 14 add r3,r28,r3
ffc0a0e4: 7c 09 03 a6 mtctr r0
ffc0a0e8: 4e 80 04 21 bctrl
if ( result != 0 ) {
ffc0a0ec: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a0f0: 40 9e 01 30 bne- cr7,ffc0a220 <_rename_r+0x238>
/*
* 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 ) {
ffc0a0f4: 80 01 00 48 lwz r0,72(r1)
ffc0a0f8: 81 21 00 34 lwz r9,52(r1)
ffc0a0fc: 7f 89 00 00 cmpw cr7,r9,r0
ffc0a100: 40 9e 00 78 bne- cr7,ffc0a178 <_rename_r+0x190>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
ffc0a104: 81 21 00 44 lwz r9,68(r1)
ffc0a108: 7f c4 f3 78 mr r4,r30
ffc0a10c: 7f e5 fb 78 mr r5,r31
ffc0a110: 80 c1 00 0c lwz r6,12(r1)
ffc0a114: 80 09 00 40 lwz r0,64(r9)
ffc0a118: 7f a3 eb 78 mr r3,r29
ffc0a11c: 7c 09 03 a6 mtctr r0
ffc0a120: 4e 80 04 21 bctrl
ffc0a124: 7c 7a 1b 78 mr r26,r3
rtems_filesystem_freenode( &new_parent_loc );
ffc0a128: 7f e3 fb 78 mr r3,r31
ffc0a12c: 4b ff e5 1d bl ffc08648 <rtems_filesystem_freenode>
if ( free_old_parentloc )
ffc0a130: 2f 9b 00 00 cmpwi cr7,r27,0
ffc0a134: 40 9e 00 38 bne- cr7,ffc0a16c <_rename_r+0x184>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
ffc0a138: 7f c3 f3 78 mr r3,r30
ffc0a13c: 4b ff e5 0d bl ffc08648 <rtems_filesystem_freenode>
return result;
}
ffc0a140: 80 01 00 74 lwz r0,116(r1)
ffc0a144: 7f 43 d3 78 mr r3,r26
ffc0a148: 83 61 00 5c lwz r27,92(r1)
ffc0a14c: 7c 08 03 a6 mtlr r0
ffc0a150: 83 41 00 58 lwz r26,88(r1)
ffc0a154: 83 81 00 60 lwz r28,96(r1)
ffc0a158: 83 a1 00 64 lwz r29,100(r1)
ffc0a15c: 83 c1 00 68 lwz r30,104(r1)
ffc0a160: 83 e1 00 6c lwz r31,108(r1)
ffc0a164: 38 21 00 70 addi r1,r1,112
ffc0a168: 4e 80 00 20 blr
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
ffc0a16c: 7f a3 eb 78 mr r3,r29
ffc0a170: 4b ff e4 d9 bl ffc08648 <rtems_filesystem_freenode>
ffc0a174: 4b ff ff c4 b ffc0a138 <_rename_r+0x150>
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
ffc0a178: 7f e3 fb 78 mr r3,r31
ffc0a17c: 4b ff e4 cd bl ffc08648 <rtems_filesystem_freenode>
if ( free_old_parentloc )
ffc0a180: 2f 9b 00 00 cmpwi cr7,r27,0
ffc0a184: 41 be 00 0c beq+ cr7,ffc0a190 <_rename_r+0x1a8>
rtems_filesystem_freenode( &old_parent_loc );
ffc0a188: 7f a3 eb 78 mr r3,r29
ffc0a18c: 4b ff e4 bd bl ffc08648 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &old_loc );
ffc0a190: 7f c3 f3 78 mr r3,r30
ffc0a194: 4b ff e4 b5 bl ffc08648 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EXDEV );
ffc0a198: 3b 40 ff ff li r26,-1
ffc0a19c: 48 00 ca 8d bl ffc16c28 <__errno>
ffc0a1a0: 38 00 00 12 li r0,18
ffc0a1a4: 90 03 00 00 stw r0,0(r3)
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
ffc0a1a8: 7f 43 d3 78 mr r3,r26
ffc0a1ac: 80 01 00 74 lwz r0,116(r1)
ffc0a1b0: 83 41 00 58 lwz r26,88(r1)
ffc0a1b4: 7c 08 03 a6 mtlr r0
ffc0a1b8: 83 61 00 5c lwz r27,92(r1)
ffc0a1bc: 83 81 00 60 lwz r28,96(r1)
ffc0a1c0: 83 a1 00 64 lwz r29,100(r1)
ffc0a1c4: 83 c1 00 68 lwz r30,104(r1)
ffc0a1c8: 83 e1 00 6c lwz r31,108(r1)
ffc0a1cc: 38 21 00 70 addi r1,r1,112
ffc0a1d0: 4e 80 00 20 blr
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 )
ffc0a1d4: 2f 9b 00 00 cmpwi cr7,r27,0
rtems_filesystem_freenode( &old_parent_loc );
return -1;
ffc0a1d8: 3b 40 ff ff li r26,-1
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 )
ffc0a1dc: 41 9e ff 64 beq+ cr7,ffc0a140 <_rename_r+0x158> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
ffc0a1e0: 7f a3 eb 78 mr r3,r29
ffc0a1e4: 4b ff e4 65 bl ffc08648 <rtems_filesystem_freenode>
ffc0a1e8: 4b ff ff 58 b ffc0a140 <_rename_r+0x158>
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,
ffc0a1ec: 7c 7e 1b 78 mr r30,r3
ffc0a1f0: 3b a1 00 24 addi r29,r1,36
ffc0a1f4: 7f e3 fb 78 mr r3,r31
ffc0a1f8: 7f c4 f3 78 mr r4,r30
ffc0a1fc: 38 a0 00 02 li r5,2
ffc0a200: 7f a6 eb 78 mr r6,r29
ffc0a204: 38 e0 00 00 li r7,0
ffc0a208: 4b ff e0 3d bl ffc08244 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
return -1;
ffc0a20c: 3b 40 ff ff li r26,-1
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
ffc0a210: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a214: 40 be ff 2c bne- cr7,ffc0a140 <_rename_r+0x158> <== NEVER TAKEN
return -1;
free_old_parentloc = true;
ffc0a218: 3b 60 00 01 li r27,1
ffc0a21c: 4b ff fe 24 b ffc0a040 <_rename_r+0x58>
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
ffc0a220: 7f e3 fb 78 mr r3,r31
ffc0a224: 4b ff e4 25 bl ffc08648 <rtems_filesystem_freenode>
if ( free_old_parentloc )
ffc0a228: 2f 9b 00 00 cmpwi cr7,r27,0
ffc0a22c: 41 be 00 0c beq+ cr7,ffc0a238 <_rename_r+0x250> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
ffc0a230: 7f a3 eb 78 mr r3,r29
ffc0a234: 4b ff e4 15 bl ffc08648 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &old_loc );
ffc0a238: 7f c3 f3 78 mr r3,r30
ffc0a23c: 4b ff e4 0d bl ffc08648 <rtems_filesystem_freenode>
return -1;
ffc0a240: 3b 40 ff ff li r26,-1
ffc0a244: 4b ff fe fc b ffc0a140 <_rename_r+0x158>
ffc0498c <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
ffc0498c: 94 21 ff c8 stwu r1,-56(r1)
ffc04990: 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) {
ffc04994: 3d 20 00 00 lis r9,0
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
ffc04998: 93 e1 00 34 stw r31,52(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) {
ffc0499c: 3f e0 00 00 lis r31,0
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
ffc049a0: 93 c1 00 30 stw r30,48(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) {
ffc049a4: 83 df 26 f4 lwz r30,9972(r31)
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
ffc049a8: 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) {
ffc049ac: 38 09 2a d8 addi r0,r9,10968
ffc049b0: 7f 9e 00 00 cmpw cr7,r30,r0
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
ffc049b4: 93 a1 00 2c stw r29,44(r1)
ffc049b8: 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) {
ffc049bc: 41 9e 00 90 beq- cr7,ffc04a4c <chroot+0xc0>
rtems_libio_set_private_env(); /* try to set a new private env*/
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = chdir(pathname);
ffc049c0: 7f a3 eb 78 mr r3,r29
ffc049c4: 48 00 a9 7d bl ffc0f340 <chdir>
if (result) {
ffc049c8: 2f 83 00 00 cmpwi cr7,r3,0
ffc049cc: 40 9e 00 a4 bne- cr7,ffc04a70 <chroot+0xe4>
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
ffc049d0: 3c 60 ff c2 lis r3,-62
ffc049d4: 38 63 94 24 addi r3,r3,-27612
ffc049d8: 38 80 00 01 li r4,1
ffc049dc: 38 a0 00 00 li r5,0
ffc049e0: 38 c1 00 08 addi r6,r1,8
ffc049e4: 38 e0 00 00 li r7,0
ffc049e8: 48 00 01 f1 bl ffc04bd8 <rtems_filesystem_evaluate_path>
ffc049ec: 2f 83 00 00 cmpwi cr7,r3,0
ffc049f0: 40 9e 00 80 bne- cr7,ffc04a70 <chroot+0xe4> <== NEVER TAKEN
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
}
rtems_filesystem_freenode(&rtems_filesystem_root);
ffc049f4: 80 7f 26 f4 lwz r3,9972(r31)
ffc049f8: 38 63 00 18 addi r3,r3,24
ffc049fc: 48 00 03 39 bl ffc04d34 <rtems_filesystem_freenode>
rtems_filesystem_root = loc;
ffc04a00: 81 3f 26 f4 lwz r9,9972(r31)
ffc04a04: 80 01 00 08 lwz r0,8(r1)
return 0;
ffc04a08: 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;
ffc04a0c: 90 09 00 18 stw r0,24(r9)
ffc04a10: 80 01 00 0c lwz r0,12(r1)
ffc04a14: 90 09 00 1c stw r0,28(r9)
ffc04a18: 80 01 00 10 lwz r0,16(r1)
ffc04a1c: 90 09 00 20 stw r0,32(r9)
ffc04a20: 80 01 00 14 lwz r0,20(r1)
ffc04a24: 90 09 00 24 stw r0,36(r9)
ffc04a28: 80 01 00 18 lwz r0,24(r1)
ffc04a2c: 90 09 00 28 stw r0,40(r9)
return 0;
}
ffc04a30: 80 01 00 3c lwz r0,60(r1)
ffc04a34: 83 a1 00 2c lwz r29,44(r1)
ffc04a38: 7c 08 03 a6 mtlr r0
ffc04a3c: 83 c1 00 30 lwz r30,48(r1)
ffc04a40: 83 e1 00 34 lwz r31,52(r1)
ffc04a44: 38 21 00 38 addi r1,r1,56
ffc04a48: 4e 80 00 20 blr
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
rtems_libio_set_private_env(); /* try to set a new private env*/
ffc04a4c: 48 00 19 21 bl ffc0636c <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
ffc04a50: 80 1f 26 f4 lwz r0,9972(r31)
ffc04a54: 7f 80 f0 00 cmpw cr7,r0,r30
ffc04a58: 40 9e ff 68 bne+ cr7,ffc049c0 <chroot+0x34>
rtems_set_errno_and_return_minus_one( ENOTSUP );
ffc04a5c: 48 00 dd 11 bl ffc1276c <__errno>
ffc04a60: 38 00 00 86 li r0,134
ffc04a64: 90 03 00 00 stw r0,0(r3)
ffc04a68: 38 60 ff ff li r3,-1
ffc04a6c: 4b ff ff c4 b ffc04a30 <chroot+0xa4>
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
ffc04a70: 48 00 dc fd bl ffc1276c <__errno>
ffc04a74: 7c 7f 1b 78 mr r31,r3
ffc04a78: 48 00 dc f5 bl ffc1276c <__errno>
ffc04a7c: 80 03 00 00 lwz r0,0(r3)
ffc04a80: 38 60 ff ff li r3,-1
ffc04a84: 90 1f 00 00 stw r0,0(r31)
ffc04a88: 4b ff ff a8 b ffc04a30 <chroot+0xa4>
ffc0e00c <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
ffc0e00c: 94 21 ff d8 stwu r1,-40(r1)
ffc0e010: 7c 08 02 a6 mflr r0
ffc0e014: 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 ) )
ffc0e018: 54 a0 00 39 rlwinm. r0,r5,0,0,28
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
ffc0e01c: 93 01 00 08 stw r24,8(r1)
ffc0e020: 7c d8 33 78 mr r24,r6
ffc0e024: 93 c1 00 20 stw r30,32(r1)
ffc0e028: 7c 7e 1b 78 mr r30,r3
ffc0e02c: 93 e1 00 24 stw r31,36(r1)
ffc0e030: 7c 9f 23 78 mr r31,r4
ffc0e034: 93 21 00 0c stw r25,12(r1)
ffc0e038: 93 41 00 10 stw r26,16(r1)
ffc0e03c: 93 61 00 14 stw r27,20(r1)
ffc0e040: 93 81 00 18 stw r28,24(r1)
ffc0e044: 93 a1 00 1c stw r29,28(r1)
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
ffc0e048: 40 82 01 0c bne- ffc0e154 <devFS_evaluate_path+0x148> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
ffc0e04c: 83 66 00 00 lwz r27,0(r6)
if (!device_name_table)
ffc0e050: 2f 9b 00 00 cmpwi cr7,r27,0
ffc0e054: 41 9e 01 14 beq- cr7,ffc0e168 <devFS_evaluate_path+0x15c>
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
ffc0e058: 3d 20 00 00 lis r9,0
ffc0e05c: 83 49 27 30 lwz r26,10032(r9)
ffc0e060: 38 00 00 00 li r0,0
ffc0e064: 3b a0 00 00 li r29,0
ffc0e068: 2f 9a 00 00 cmpwi cr7,r26,0
ffc0e06c: 41 9e 00 4c beq- cr7,ffc0e0b8 <devFS_evaluate_path+0xac><== NEVER TAKEN
if (!device_name_table[i].device_name)
ffc0e070: 1c 00 00 14 mulli r0,r0,20
ffc0e074: 7f 9b 00 2e lwzx r28,r27,r0
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
ffc0e078: 7f c3 f3 78 mr r3,r30
ffc0e07c: 7f e5 fb 78 mr r5,r31
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
ffc0e080: 2f 9c 00 00 cmpwi cr7,r28,0
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
ffc0e084: 7f 84 e3 78 mr r4,r28
/* 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++) {
ffc0e088: 3b bd 00 01 addi r29,r29,1
if (!device_name_table[i].device_name)
ffc0e08c: 7f 3b 02 14 add r25,r27,r0
ffc0e090: 41 9e 00 1c beq- cr7,ffc0e0ac <devFS_evaluate_path+0xa0>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
ffc0e094: 48 00 33 29 bl ffc113bc <strncmp>
ffc0e098: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e09c: 40 9e 00 10 bne- cr7,ffc0e0ac <devFS_evaluate_path+0xa0>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
ffc0e0a0: 7c 1c f8 ae lbzx r0,r28,r31
ffc0e0a4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e0a8: 41 9e 00 50 beq- cr7,ffc0e0f8 <devFS_evaluate_path+0xec><== ALWAYS TAKEN
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
ffc0e0ac: 7f 9a e8 40 cmplw cr7,r26,r29
ffc0e0b0: 7f a0 eb 78 mr r0,r29
ffc0e0b4: 41 9d ff bc bgt+ cr7,ffc0e070 <devFS_evaluate_path+0x64>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
ffc0e0b8: 48 00 20 d5 bl ffc1018c <__errno>
ffc0e0bc: 38 00 00 02 li r0,2
ffc0e0c0: 90 03 00 00 stw r0,0(r3)
ffc0e0c4: 38 60 ff ff li r3,-1
}
ffc0e0c8: 80 01 00 2c lwz r0,44(r1)
ffc0e0cc: 83 01 00 08 lwz r24,8(r1)
ffc0e0d0: 7c 08 03 a6 mtlr r0
ffc0e0d4: 83 21 00 0c lwz r25,12(r1)
ffc0e0d8: 83 41 00 10 lwz r26,16(r1)
ffc0e0dc: 83 61 00 14 lwz r27,20(r1)
ffc0e0e0: 83 81 00 18 lwz r28,24(r1)
ffc0e0e4: 83 a1 00 1c lwz r29,28(r1)
ffc0e0e8: 83 c1 00 20 lwz r30,32(r1)
ffc0e0ec: 83 e1 00 24 lwz r31,36(r1)
ffc0e0f0: 38 21 00 28 addi r1,r1,40
ffc0e0f4: 4e 80 00 20 blr
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
ffc0e0f8: 3d 20 00 00 lis r9,0
ffc0e0fc: 81 29 27 74 lwz r9,10100(r9)
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
ffc0e100: 93 38 00 00 stw r25,0(r24)
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
ffc0e104: 80 09 00 28 lwz r0,40(r9)
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;
ffc0e108: 3d 20 00 00 lis r9,0
ffc0e10c: 39 29 21 78 addi r9,r9,8568
ffc0e110: 91 38 00 08 stw r9,8(r24)
pathloc->ops = &devFS_ops;
ffc0e114: 3d 20 00 00 lis r9,0
ffc0e118: 39 29 21 b0 addi r9,r9,8624
ffc0e11c: 91 38 00 0c stw r9,12(r24)
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
ffc0e120: 90 18 00 10 stw r0,16(r24)
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
ffc0e124: 80 01 00 2c lwz r0,44(r1)
ffc0e128: 83 01 00 08 lwz r24,8(r1)
ffc0e12c: 7c 08 03 a6 mtlr r0
ffc0e130: 83 21 00 0c lwz r25,12(r1)
ffc0e134: 83 41 00 10 lwz r26,16(r1)
ffc0e138: 83 61 00 14 lwz r27,20(r1)
ffc0e13c: 83 81 00 18 lwz r28,24(r1)
ffc0e140: 83 a1 00 1c lwz r29,28(r1)
ffc0e144: 83 c1 00 20 lwz r30,32(r1)
ffc0e148: 83 e1 00 24 lwz r31,36(r1)
ffc0e14c: 38 21 00 28 addi r1,r1,40
ffc0e150: 4e 80 00 20 blr
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
ffc0e154: 48 00 20 39 bl ffc1018c <__errno> <== NOT EXECUTED
ffc0e158: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc0e15c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
ffc0e160: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc0e164: 4b ff ff c0 b ffc0e124 <devFS_evaluate_path+0x118> <== NOT EXECUTED
/* 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 );
ffc0e168: 48 00 20 25 bl ffc1018c <__errno>
ffc0e16c: 38 00 00 0e li r0,14
ffc0e170: 90 03 00 00 stw r0,0(r3)
ffc0e174: 38 60 ff ff li r3,-1
ffc0e178: 4b ff ff ac b ffc0e124 <devFS_evaluate_path+0x118>
ffc04ca0 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
ffc04ca0: 94 21 ff d8 stwu r1,-40(r1)
ffc04ca4: 7c 08 02 a6 mflr r0
ffc04ca8: 93 81 00 18 stw r28,24(r1)
ffc04cac: 7c dc 33 78 mr r28,r6
ffc04cb0: 93 a1 00 1c stw r29,28(r1)
ffc04cb4: 7c bd 2b 78 mr r29,r5
ffc04cb8: 93 c1 00 20 stw r30,32(r1)
ffc04cbc: 7c 9e 23 78 mr r30,r4
ffc04cc0: 93 e1 00 24 stw r31,36(r1)
ffc04cc4: 7c 7f 1b 78 mr r31,r3
ffc04cc8: 90 01 00 2c stw r0,44(r1)
ffc04ccc: 93 01 00 08 stw r24,8(r1)
ffc04cd0: 93 21 00 0c stw r25,12(r1)
ffc04cd4: 93 41 00 10 stw r26,16(r1)
ffc04cd8: 93 61 00 14 stw r27,20(r1)
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
ffc04cdc: 88 03 00 00 lbz r0,0(r3)
ffc04ce0: 2f 80 00 64 cmpwi cr7,r0,100
ffc04ce4: 41 9e 01 40 beq- cr7,ffc04e24 <devFS_mknod+0x184>
(path[2] == 'v') && (path[3] == '\0'))
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
ffc04ce8: 57 c0 04 26 rlwinm r0,r30,0,16,19
ffc04cec: 2f 80 60 00 cmpwi cr7,r0,24576
ffc04cf0: 41 9e 00 0c beq- cr7,ffc04cfc <devFS_mknod+0x5c>
ffc04cf4: 2f 80 20 00 cmpwi cr7,r0,8192
ffc04cf8: 40 9e 01 58 bne- cr7,ffc04e50 <devFS_mknod+0x1b0>
rtems_set_errno_and_return_minus_one( EINVAL );
else
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
ffc04cfc: 83 47 00 00 lwz r26,0(r7)
if (!device_name_table)
ffc04d00: 2f 9a 00 00 cmpwi cr7,r26,0
ffc04d04: 41 9e 01 74 beq- cr7,ffc04e78 <devFS_mknod+0x1d8>
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
ffc04d08: 3d 20 00 00 lis r9,0
ffc04d0c: 83 29 27 30 lwz r25,10032(r9)
ffc04d10: 2f 99 00 00 cmpwi cr7,r25,0
ffc04d14: 41 9e 01 50 beq- cr7,ffc04e64 <devFS_mknod+0x1c4>
ffc04d18: 38 00 00 00 li r0,0
ffc04d1c: 3b 00 ff ff li r24,-1
ffc04d20: 3b 60 00 00 li r27,0
ffc04d24: 48 00 00 20 b ffc04d44 <devFS_mknod+0xa4>
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
ffc04d28: 48 00 c5 3d bl ffc11264 <strcmp>
ffc04d2c: 2f 83 00 00 cmpwi cr7,r3,0
ffc04d30: 41 9e 00 b4 beq- cr7,ffc04de4 <devFS_mknod+0x144>
/* 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++){
ffc04d34: 3b 7b 00 01 addi r27,r27,1
ffc04d38: 7f 9b c8 40 cmplw cr7,r27,r25
ffc04d3c: 7f 60 db 78 mr r0,r27
ffc04d40: 40 9c 00 30 bge- cr7,ffc04d70 <devFS_mknod+0xd0>
if (device_name_table[i].device_name == NULL)
ffc04d44: 1c 00 00 14 mulli r0,r0,20
ffc04d48: 7c 1a 00 2e lwzx r0,r26,r0
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
ffc04d4c: 7f e3 fb 78 mr r3,r31
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)
ffc04d50: 2f 80 00 00 cmpwi cr7,r0,0
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
ffc04d54: 7c 04 03 78 mr r4,r0
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)
ffc04d58: 40 9e ff d0 bne+ cr7,ffc04d28 <devFS_mknod+0x88>
ffc04d5c: 7f 78 db 78 mr r24,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++){
ffc04d60: 3b 7b 00 01 addi r27,r27,1
ffc04d64: 7f 9b c8 40 cmplw cr7,r27,r25
ffc04d68: 7f 60 db 78 mr r0,r27
ffc04d6c: 41 9c ff d8 blt+ cr7,ffc04d44 <devFS_mknod+0xa4>
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
ffc04d70: 2f 98 ff ff cmpwi cr7,r24,-1
ffc04d74: 41 9e 00 f0 beq- cr7,ffc04e64 <devFS_mknod+0x1c4> <== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc04d78: 7f 60 00 a6 mfmsr r27
ffc04d7c: 7c 10 42 a6 mfsprg r0,0
ffc04d80: 7f 60 00 78 andc r0,r27,r0
ffc04d84: 7c 00 01 24 mtmsr r0
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
ffc04d88: 1f 18 00 14 mulli r24,r24,20
ffc04d8c: 7f fa c1 2e stwx r31,r26,r24
device_name_table[slot].device_name_length = strlen(path);
ffc04d90: 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;
ffc04d94: 7f 5a c2 14 add r26,r26,r24
device_name_table[slot].device_name_length = strlen(path);
ffc04d98: 48 00 c5 81 bl ffc11318 <strlen>
device_name_table[slot].major = major;
ffc04d9c: 93 ba 00 08 stw r29,8(r26)
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);
ffc04da0: 90 7a 00 04 stw r3,4(r26)
device_name_table[slot].major = major;
device_name_table[slot].minor = minor;
ffc04da4: 93 9a 00 0c stw r28,12(r26)
device_name_table[slot].mode = mode;
ffc04da8: 93 da 00 10 stw r30,16(r26)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc04dac: 7f 60 01 24 mtmsr r27
_ISR_Enable(level);
return 0;
ffc04db0: 38 60 00 00 li r3,0
}
ffc04db4: 80 01 00 2c lwz r0,44(r1)
ffc04db8: 83 01 00 08 lwz r24,8(r1)
ffc04dbc: 7c 08 03 a6 mtlr r0
ffc04dc0: 83 21 00 0c lwz r25,12(r1)
ffc04dc4: 83 41 00 10 lwz r26,16(r1)
ffc04dc8: 83 61 00 14 lwz r27,20(r1)
ffc04dcc: 83 81 00 18 lwz r28,24(r1)
ffc04dd0: 83 a1 00 1c lwz r29,28(r1)
ffc04dd4: 83 c1 00 20 lwz r30,32(r1)
ffc04dd8: 83 e1 00 24 lwz r31,36(r1)
ffc04ddc: 38 21 00 28 addi r1,r1,40
ffc04de0: 4e 80 00 20 blr
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
ffc04de4: 48 00 b3 a9 bl ffc1018c <__errno>
ffc04de8: 38 00 00 11 li r0,17
ffc04dec: 90 03 00 00 stw r0,0(r3)
ffc04df0: 38 60 ff ff li r3,-1
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
ffc04df4: 80 01 00 2c lwz r0,44(r1)
ffc04df8: 83 01 00 08 lwz r24,8(r1)
ffc04dfc: 7c 08 03 a6 mtlr r0
ffc04e00: 83 21 00 0c lwz r25,12(r1)
ffc04e04: 83 41 00 10 lwz r26,16(r1)
ffc04e08: 83 61 00 14 lwz r27,20(r1)
ffc04e0c: 83 81 00 18 lwz r28,24(r1)
ffc04e10: 83 a1 00 1c lwz r29,28(r1)
ffc04e14: 83 c1 00 20 lwz r30,32(r1)
ffc04e18: 83 e1 00 24 lwz r31,36(r1)
ffc04e1c: 38 21 00 28 addi r1,r1,40
ffc04e20: 4e 80 00 20 blr
* 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') &&
ffc04e24: 88 03 00 01 lbz r0,1(r3)
ffc04e28: 2f 80 00 65 cmpwi cr7,r0,101
ffc04e2c: 40 9e fe bc bne+ cr7,ffc04ce8 <devFS_mknod+0x48> <== NEVER TAKEN
ffc04e30: 88 03 00 02 lbz r0,2(r3)
ffc04e34: 2f 80 00 76 cmpwi cr7,r0,118
ffc04e38: 40 9e fe b0 bne+ cr7,ffc04ce8 <devFS_mknod+0x48> <== NEVER TAKEN
(path[2] == 'v') && (path[3] == '\0'))
ffc04e3c: 88 03 00 03 lbz r0,3(r3)
return 0;
ffc04e40: 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'))
ffc04e44: 2f 80 00 00 cmpwi cr7,r0,0
ffc04e48: 40 9e fe a0 bne+ cr7,ffc04ce8 <devFS_mknod+0x48>
ffc04e4c: 4b ff ff 68 b ffc04db4 <devFS_mknod+0x114>
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
rtems_set_errno_and_return_minus_one( EINVAL );
ffc04e50: 48 00 b3 3d bl ffc1018c <__errno>
ffc04e54: 38 00 00 16 li r0,22
ffc04e58: 90 03 00 00 stw r0,0(r3)
ffc04e5c: 38 60 ff ff li r3,-1
ffc04e60: 4b ff ff 54 b ffc04db4 <devFS_mknod+0x114>
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
ffc04e64: 48 00 b3 29 bl ffc1018c <__errno>
ffc04e68: 38 00 00 0c li r0,12
ffc04e6c: 90 03 00 00 stw r0,0(r3)
ffc04e70: 38 60 ff ff li r3,-1
ffc04e74: 4b ff ff 40 b ffc04db4 <devFS_mknod+0x114>
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
ffc04e78: 48 00 b3 15 bl ffc1018c <__errno>
ffc04e7c: 38 00 00 0e li r0,14
ffc04e80: 90 03 00 00 stw r0,0(r3)
ffc04e84: 38 60 ff ff li r3,-1
ffc04e88: 4b ff ff 2c b ffc04db4 <devFS_mknod+0x114>
ffc05e30 <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
ffc05e30: 94 21 ff f0 stwu r1,-16(r1)
ffc05e34: 7c 08 02 a6 mflr r0
ffc05e38: 90 01 00 14 stw r0,20(r1)
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
ffc05e3c: 80 03 00 b4 lwz r0,180(r3)
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
ffc05e40: 93 e1 00 0c stw r31,12(r1)
ffc05e44: 7c 7f 1b 78 mr r31,r3
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
ffc05e48: 2f 80 00 00 cmpwi cr7,r0,0
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
ffc05e4c: 93 c1 00 08 stw r30,8(r1)
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
ffc05e50: 41 9e 00 6c beq- cr7,ffc05ebc <drainOutput+0x8c>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc05e54: 7c 00 00 a6 mfmsr r0
ffc05e58: 7d 30 42 a6 mfsprg r9,0
ffc05e5c: 7c 09 48 78 andc r9,r0,r9
ffc05e60: 7d 20 01 24 mtmsr r9
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
ffc05e64: 81 63 00 84 lwz r11,132(r3)
ffc05e68: 81 23 00 80 lwz r9,128(r3)
ffc05e6c: 7f 8b 48 00 cmpw cr7,r11,r9
ffc05e70: 41 9e 00 48 beq- cr7,ffc05eb8 <drainOutput+0x88> <== ALWAYS TAKEN
tty->rawOutBufState = rob_wait;
ffc05e74: 3b c0 00 02 li r30,2 <== NOT EXECUTED
ffc05e78: 93 df 00 94 stw r30,148(r31) <== NOT EXECUTED
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc05e7c: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
ffc05e80: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED
ffc05e84: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc05e88: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc05e8c: 48 00 2e a5 bl ffc08d30 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc05e90: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc05e94: 40 9e 00 40 bne- cr7,ffc05ed4 <drainOutput+0xa4> <== NOT EXECUTED
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc05e98: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED
ffc05e9c: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED
ffc05ea0: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED
ffc05ea4: 7d 20 01 24 mtmsr r9 <== 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) {
ffc05ea8: 81 7f 00 84 lwz r11,132(r31) <== NOT EXECUTED
ffc05eac: 81 3f 00 80 lwz r9,128(r31) <== NOT EXECUTED
ffc05eb0: 7f 8b 48 00 cmpw cr7,r11,r9 <== NOT EXECUTED
ffc05eb4: 40 9e ff c4 bne+ cr7,ffc05e78 <drainOutput+0x48> <== NOT EXECUTED
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc05eb8: 7c 00 01 24 mtmsr r0
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
}
}
ffc05ebc: 80 01 00 14 lwz r0,20(r1)
ffc05ec0: 83 c1 00 08 lwz r30,8(r1)
ffc05ec4: 7c 08 03 a6 mtlr r0
ffc05ec8: 83 e1 00 0c lwz r31,12(r1)
ffc05ecc: 38 21 00 10 addi r1,r1,16
ffc05ed0: 4e 80 00 20 blr
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
ffc05ed4: 48 00 37 e5 bl ffc096b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
ffc06cf0 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
ffc06cf0: 94 21 ff e0 stwu r1,-32(r1)
ffc06cf4: 7c 08 02 a6 mflr r0
ffc06cf8: 90 01 00 24 stw r0,36(r1)
if ((tty->termios.c_lflag & ECHOCTL) &&
ffc06cfc: 81 24 00 3c lwz r9,60(r4)
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
ffc06d00: 93 e1 00 1c stw r31,28(r1)
ffc06d04: 7c 9f 23 78 mr r31,r4
if ((tty->termios.c_lflag & ECHOCTL) &&
ffc06d08: 71 20 02 00 andi. r0,r9,512
ffc06d0c: 41 82 00 2c beq- ffc06d38 <echo+0x48> <== NEVER TAKEN
iscntrl(c) && (c != '\t') && (c != '\n')) {
ffc06d10: 3d 20 00 00 lis r9,0
ffc06d14: 81 29 27 24 lwz r9,10020(r9)
ffc06d18: 7d 29 1a 14 add r9,r9,r3
ffc06d1c: 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) &&
ffc06d20: 70 09 00 20 andi. r9,r0,32
ffc06d24: 41 82 00 14 beq- ffc06d38 <echo+0x48>
iscntrl(c) && (c != '\t') && (c != '\n')) {
ffc06d28: 2f 83 00 09 cmpwi cr7,r3,9
ffc06d2c: 41 9e 00 0c beq- cr7,ffc06d38 <echo+0x48>
ffc06d30: 2f 83 00 0a cmpwi cr7,r3,10
ffc06d34: 40 9e 00 20 bne- cr7,ffc06d54 <echo+0x64>
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
ffc06d38: 7f e4 fb 78 mr r4,r31
ffc06d3c: 4b ff fe 1d bl ffc06b58 <oproc>
}
}
ffc06d40: 80 01 00 24 lwz r0,36(r1)
ffc06d44: 83 e1 00 1c lwz r31,28(r1)
ffc06d48: 38 21 00 20 addi r1,r1,32
ffc06d4c: 7c 08 03 a6 mtlr r0
ffc06d50: 4e 80 00 20 blr
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
ffc06d54: 68 60 00 40 xori r0,r3,64
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
ffc06d58: 39 20 00 5e li r9,94
echobuf[1] = c ^ 0x40;
ffc06d5c: 98 01 00 09 stb r0,9(r1)
rtems_termios_puts (echobuf, 2, tty);
ffc06d60: 38 61 00 08 addi r3,r1,8
ffc06d64: 7f e5 fb 78 mr r5,r31
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
ffc06d68: 99 21 00 08 stb r9,8(r1)
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
ffc06d6c: 38 80 00 02 li r4,2
ffc06d70: 4b ff fc 65 bl ffc069d4 <rtems_termios_puts>
tty->column += 2;
ffc06d74: 81 3f 00 28 lwz r9,40(r31)
ffc06d78: 38 09 00 02 addi r0,r9,2
ffc06d7c: 90 1f 00 28 stw r0,40(r31)
} else {
oproc (c, tty);
}
}
ffc06d80: 80 01 00 24 lwz r0,36(r1)
ffc06d84: 83 e1 00 1c lwz r31,28(r1)
ffc06d88: 38 21 00 20 addi r1,r1,32
ffc06d8c: 7c 08 03 a6 mtlr r0
ffc06d90: 4e 80 00 20 blr
ffc06124 <endgrent>:
void endgrent(void)
{
if (group_fp != NULL)
ffc06124: 3d 20 00 00 lis r9,0
fclose(group_fp);
group_fp = fopen("/etc/group", "r");
}
void endgrent(void)
{
ffc06128: 94 21 ff f8 stwu r1,-8(r1)
ffc0612c: 7c 08 02 a6 mflr r0
if (group_fp != NULL)
ffc06130: 80 69 2a 1c lwz r3,10780(r9)
fclose(group_fp);
group_fp = fopen("/etc/group", "r");
}
void endgrent(void)
{
ffc06134: 90 01 00 0c stw r0,12(r1)
if (group_fp != NULL)
ffc06138: 2f 83 00 00 cmpwi cr7,r3,0
ffc0613c: 41 9e 00 08 beq- cr7,ffc06144 <endgrent+0x20> <== NEVER TAKEN
fclose(group_fp);
ffc06140: 48 00 d7 01 bl ffc13840 <fclose>
}
ffc06144: 80 01 00 0c lwz r0,12(r1)
ffc06148: 38 21 00 08 addi r1,r1,8
ffc0614c: 7c 08 03 a6 mtlr r0
ffc06150: 4e 80 00 20 blr
ffc05f54 <endpwent>:
void endpwent(void)
{
if (passwd_fp != NULL)
ffc05f54: 3d 20 00 00 lis r9,0
fclose(passwd_fp);
passwd_fp = fopen("/etc/passwd", "r");
}
void endpwent(void)
{
ffc05f58: 94 21 ff f8 stwu r1,-8(r1)
ffc05f5c: 7c 08 02 a6 mflr r0
if (passwd_fp != NULL)
ffc05f60: 80 69 29 40 lwz r3,10560(r9)
fclose(passwd_fp);
passwd_fp = fopen("/etc/passwd", "r");
}
void endpwent(void)
{
ffc05f64: 90 01 00 0c stw r0,12(r1)
if (passwd_fp != NULL)
ffc05f68: 2f 83 00 00 cmpwi cr7,r3,0
ffc05f6c: 41 9e 00 08 beq- cr7,ffc05f74 <endpwent+0x20> <== NEVER TAKEN
fclose(passwd_fp);
ffc05f70: 48 00 d8 d1 bl ffc13840 <fclose>
}
ffc05f74: 80 01 00 0c lwz r0,12(r1)
ffc05f78: 38 21 00 08 addi r1,r1,8
ffc05f7c: 7c 08 03 a6 mtlr r0
ffc05f80: 4e 80 00 20 blr
ffc06d94 <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)
{
ffc06d94: 94 21 ff d8 stwu r1,-40(r1)
ffc06d98: 7c 08 02 a6 mflr r0
ffc06d9c: 7d 80 00 26 mfcr r12
ffc06da0: 90 01 00 2c stw r0,44(r1)
if (tty->ccount == 0)
ffc06da4: 81 23 00 20 lwz r9,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)
{
ffc06da8: 93 e1 00 24 stw r31,36(r1)
ffc06dac: 7c 7f 1b 78 mr r31,r3
if (tty->ccount == 0)
ffc06db0: 2f 89 00 00 cmpwi cr7,r9,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)
{
ffc06db4: 93 41 00 10 stw r26,16(r1)
ffc06db8: 93 61 00 14 stw r27,20(r1)
ffc06dbc: 93 81 00 18 stw r28,24(r1)
ffc06dc0: 93 a1 00 1c stw r29,28(r1)
ffc06dc4: 93 c1 00 20 stw r30,32(r1)
ffc06dc8: 91 81 00 0c stw r12,12(r1)
if (tty->ccount == 0)
ffc06dcc: 41 9e 00 a0 beq- cr7,ffc06e6c <erase+0xd8>
return;
if (lineFlag) {
ffc06dd0: 2e 04 00 00 cmpwi cr4,r4,0
ffc06dd4: 40 92 00 88 bne- cr4,ffc06e5c <erase+0xc8>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
ffc06dd8: 80 03 00 3c lwz r0,60(r3)
ffc06ddc: 54 0b 07 38 rlwinm r11,r0,0,28,28
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
ffc06de0: 3f 60 ff c2 lis r27,-62
ffc06de4: 3f a0 ff c2 lis r29,-62
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
ffc06de8: 3f 80 00 00 lis r28,0
rtems_termios_puts ("\b \b", 3, tty);
ffc06dec: 3b 7b 8d b8 addi r27,r27,-29256
ffc06df0: 3b bd 8d b4 addi r29,r29,-29260
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
ffc06df4: 2f 8b 00 00 cmpwi cr7,r11,0
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
ffc06df8: 81 5f 00 1c lwz r10,28(r31)
ffc06dfc: 39 29 ff ff addi r9,r9,-1
ffc06e00: 91 3f 00 20 stw r9,32(r31)
ffc06e04: 7f ca 48 ae lbzx r30,r10,r9
if (tty->termios.c_lflag & ECHO) {
ffc06e08: 41 9e 00 38 beq- cr7,ffc06e40 <erase+0xac> <== NEVER TAKEN
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
ffc06e0c: 40 92 00 0c bne- cr4,ffc06e18 <erase+0x84>
ffc06e10: 70 0b 00 10 andi. r11,r0,16
ffc06e14: 41 82 01 e8 beq- ffc06ffc <erase+0x268> <== NEVER TAKEN
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
ffc06e18: 2f 9e 00 09 cmpwi cr7,r30,9
ffc06e1c: 41 9e 00 e8 beq- cr7,ffc06f04 <erase+0x170>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
ffc06e20: 81 3c 27 24 lwz r9,10020(r28)
ffc06e24: 3b de 00 01 addi r30,r30,1
ffc06e28: 7f 7a db 78 mr r26,r27
ffc06e2c: 7d 29 f0 ae lbzx r9,r9,r30
ffc06e30: 71 2b 00 20 andi. r11,r9,32
ffc06e34: 41 82 00 a8 beq- ffc06edc <erase+0x148> <== ALWAYS TAKEN
ffc06e38: 70 09 02 00 andi. r9,r0,512 <== NOT EXECUTED
ffc06e3c: 40 82 00 60 bne- ffc06e9c <erase+0x108> <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
ffc06e40: 41 92 00 2c beq- cr4,ffc06e6c <erase+0xd8>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
ffc06e44: 81 3f 00 20 lwz r9,32(r31)
ffc06e48: 2f 89 00 00 cmpwi cr7,r9,0
ffc06e4c: 41 9e 00 20 beq- cr7,ffc06e6c <erase+0xd8>
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
ffc06e50: 80 1f 00 3c lwz r0,60(r31)
ffc06e54: 54 0b 07 38 rlwinm r11,r0,0,28,28
ffc06e58: 4b ff ff 9c b ffc06df4 <erase+0x60>
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
ffc06e5c: 80 03 00 3c lwz r0,60(r3)
ffc06e60: 70 0b 00 08 andi. r11,r0,8
ffc06e64: 40 a2 01 3c bne+ ffc06fa0 <erase+0x20c> <== ALWAYS TAKEN
tty->ccount = 0;
ffc06e68: 91 63 00 20 stw r11,32(r3) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
ffc06e6c: 80 01 00 2c lwz r0,44(r1)
ffc06e70: 81 81 00 0c lwz r12,12(r1)
ffc06e74: 7c 08 03 a6 mtlr r0
ffc06e78: 83 41 00 10 lwz r26,16(r1)
ffc06e7c: 83 61 00 14 lwz r27,20(r1)
ffc06e80: 7d 80 81 20 mtcrf 8,r12
ffc06e84: 83 81 00 18 lwz r28,24(r1)
ffc06e88: 83 a1 00 1c lwz r29,28(r1)
ffc06e8c: 83 c1 00 20 lwz r30,32(r1)
ffc06e90: 83 e1 00 24 lwz r31,36(r1)
ffc06e94: 38 21 00 28 addi r1,r1,40
ffc06e98: 4e 80 00 20 blr
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
ffc06e9c: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc06ea0: 38 80 00 03 li r4,3 <== NOT EXECUTED
ffc06ea4: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED
ffc06ea8: 4b ff fb 2d bl ffc069d4 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
ffc06eac: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED
ffc06eb0: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc06eb4: 41 9e 00 0c beq- cr7,ffc06ec0 <erase+0x12c> <== NOT EXECUTED
tty->column--;
ffc06eb8: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED
ffc06ebc: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
ffc06ec0: 81 3c 27 24 lwz r9,10020(r28) <== NOT EXECUTED
ffc06ec4: 7c 09 f0 ae lbzx r0,r9,r30 <== NOT EXECUTED
ffc06ec8: 70 0b 00 20 andi. r11,r0,32 <== NOT EXECUTED
ffc06ecc: 41 82 00 10 beq- ffc06edc <erase+0x148> <== NOT EXECUTED
ffc06ed0: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED
ffc06ed4: 70 09 02 00 andi. r9,r0,512 <== NOT EXECUTED
ffc06ed8: 41 a2 ff 68 beq- ffc06e40 <erase+0xac> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
ffc06edc: 7f 43 d3 78 mr r3,r26
ffc06ee0: 38 80 00 03 li r4,3
ffc06ee4: 7f e5 fb 78 mr r5,r31
ffc06ee8: 4b ff fa ed bl ffc069d4 <rtems_termios_puts>
if (tty->column)
ffc06eec: 81 3f 00 28 lwz r9,40(r31)
ffc06ef0: 2f 89 00 00 cmpwi cr7,r9,0
ffc06ef4: 41 be ff 4c beq- cr7,ffc06e40 <erase+0xac> <== NEVER TAKEN
tty->column--;
ffc06ef8: 39 29 ff ff addi r9,r9,-1
ffc06efc: 91 3f 00 28 stw r9,40(r31)
ffc06f00: 4b ff ff 40 b ffc06e40 <erase+0xac>
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
ffc06f04: 2f 89 00 00 cmpwi cr7,r9,0
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;
ffc06f08: 83 df 00 2c lwz r30,44(r31)
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
ffc06f0c: 41 9e 00 44 beq- cr7,ffc06f50 <erase+0x1bc>
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
ffc06f10: 7d 29 03 a6 mtctr r9
ffc06f14: 54 0b bf fe rlwinm r11,r0,23,31,31
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
ffc06f18: 81 1c 27 24 lwz r8,10020(r28)
if (tty->termios.c_lflag & ECHOCTL)
ffc06f1c: 2f 0b 00 00 cmpwi cr6,r11,0
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;
ffc06f20: 39 60 00 00 li r11,0
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
ffc06f24: 7c 0a 58 ae lbzx r0,r10,r11
ffc06f28: 39 6b 00 01 addi r11,r11,1
if (c == '\t') {
ffc06f2c: 2f 80 00 09 cmpwi cr7,r0,9
col = (col | 7) + 1;
} else if (iscntrl (c)) {
ffc06f30: 7d 28 02 14 add r9,r8,r0
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
ffc06f34: 41 9e 00 5c beq- cr7,ffc06f90 <erase+0x1fc>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
ffc06f38: 88 09 00 01 lbz r0,1(r9)
ffc06f3c: 70 09 00 20 andi. r9,r0,32
ffc06f40: 41 82 00 44 beq- ffc06f84 <erase+0x1f0> <== ALWAYS TAKEN
if (tty->termios.c_lflag & ECHOCTL)
ffc06f44: 41 9a 00 08 beq- cr6,ffc06f4c <erase+0x1b8> <== NOT EXECUTED
col += 2;
ffc06f48: 3b de 00 02 addi r30,r30,2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
ffc06f4c: 42 00 ff d8 bdnz+ ffc06f24 <erase+0x190> <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
ffc06f50: 80 1f 00 28 lwz r0,40(r31)
ffc06f54: 7f 9e 00 00 cmpw cr7,r30,r0
ffc06f58: 40 bc fe e8 bge- cr7,ffc06e40 <erase+0xac> <== NEVER TAKEN
rtems_termios_puts ("\b", 1, tty);
ffc06f5c: 7f a3 eb 78 mr r3,r29
ffc06f60: 38 80 00 01 li r4,1
ffc06f64: 7f e5 fb 78 mr r5,r31
ffc06f68: 4b ff fa 6d bl ffc069d4 <rtems_termios_puts>
tty->column--;
ffc06f6c: 81 3f 00 28 lwz r9,40(r31)
ffc06f70: 38 09 ff ff addi r0,r9,-1
}
/*
* Back up over the tab
*/
while (tty->column > col) {
ffc06f74: 7f 80 f0 00 cmpw cr7,r0,r30
rtems_termios_puts ("\b", 1, tty);
tty->column--;
ffc06f78: 90 1f 00 28 stw r0,40(r31)
}
/*
* Back up over the tab
*/
while (tty->column > col) {
ffc06f7c: 41 9d ff e0 bgt+ cr7,ffc06f5c <erase+0x1c8>
ffc06f80: 4b ff fe c0 b ffc06e40 <erase+0xac>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
col += 2;
} else {
col++;
ffc06f84: 3b de 00 01 addi r30,r30,1
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
ffc06f88: 42 00 ff 9c bdnz+ ffc06f24 <erase+0x190>
ffc06f8c: 4b ff ff c4 b ffc06f50 <erase+0x1bc>
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
ffc06f90: 63 de 00 07 ori r30,r30,7
ffc06f94: 3b de 00 01 addi r30,r30,1
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
ffc06f98: 42 00 ff 8c bdnz+ ffc06f24 <erase+0x190>
ffc06f9c: 4b ff ff b4 b ffc06f50 <erase+0x1bc> <== NOT EXECUTED
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
ffc06fa0: 70 0a 00 10 andi. r10,r0,16
ffc06fa4: 40 82 fe 3c bne+ ffc06de0 <erase+0x4c> <== ALWAYS TAKEN
tty->ccount = 0;
ffc06fa8: 91 43 00 20 stw r10,32(r3) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
ffc06fac: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED
ffc06fb0: 88 63 00 44 lbz r3,68(r3) <== NOT EXECUTED
ffc06fb4: 4b ff fd 3d bl ffc06cf0 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
ffc06fb8: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED
echo ('\n', tty);
ffc06fbc: 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)
ffc06fc0: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED
ffc06fc4: 41 82 fe a8 beq+ ffc06e6c <erase+0xd8> <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
ffc06fc8: 80 01 00 2c lwz r0,44(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);
ffc06fcc: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
ffc06fd0: 81 81 00 0c lwz r12,12(r1) <== NOT EXECUTED
ffc06fd4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc06fd8: 83 41 00 10 lwz r26,16(r1) <== NOT EXECUTED
ffc06fdc: 83 61 00 14 lwz r27,20(r1) <== NOT EXECUTED
ffc06fe0: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED
ffc06fe4: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED
ffc06fe8: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED
ffc06fec: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED
ffc06ff0: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED
ffc06ff4: 38 21 00 28 addi r1,r1,40 <== 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);
ffc06ff8: 4b ff fc f8 b ffc06cf0 <echo> <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
ffc06ffc: 80 01 00 2c lwz r0,44(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);
ffc07000: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
ffc07004: 81 81 00 0c lwz r12,12(r1) <== NOT EXECUTED
ffc07008: 7c 08 03 a6 mtlr r0 <== 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);
ffc0700c: 88 7f 00 43 lbz r3,67(r31) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
ffc07010: 83 41 00 10 lwz r26,16(r1) <== NOT EXECUTED
ffc07014: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED
ffc07018: 83 61 00 14 lwz r27,20(r1) <== NOT EXECUTED
ffc0701c: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED
ffc07020: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED
ffc07024: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED
ffc07028: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED
ffc0702c: 38 21 00 28 addi r1,r1,40 <== 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);
ffc07030: 4b ff fc c0 b ffc06cf0 <echo> <== NOT EXECUTED
ffc057cc <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
ffc057cc: 94 21 ff c8 stwu r1,-56(r1)
ffc057d0: 7c 08 02 a6 mflr r0
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
ffc057d4: 3d 20 00 00 lis r9,0
int fcntl(
int fd,
int cmd,
...
)
{
ffc057d8: 90 01 00 3c stw r0,60(r1)
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
ffc057dc: 80 09 26 cc lwz r0,9932(r9)
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
ffc057e0: 39 20 00 02 li r9,2
ffc057e4: 99 21 00 08 stb r9,8(r1)
ffc057e8: 39 21 00 40 addi r9,r1,64
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
ffc057ec: 7f 83 00 40 cmplw cr7,r3,r0
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
ffc057f0: 91 21 00 0c stw r9,12(r1)
ffc057f4: 39 21 00 10 addi r9,r1,16
int fcntl(
int fd,
int cmd,
...
)
{
ffc057f8: 93 c1 00 30 stw r30,48(r1)
ffc057fc: 93 e1 00 34 stw r31,52(r1)
ffc05800: 90 a1 00 18 stw r5,24(r1)
ffc05804: 90 c1 00 1c stw r6,28(r1)
ffc05808: 90 e1 00 20 stw r7,32(r1)
int ret;
va_list ap;
va_start( ap, cmd );
ffc0580c: 91 21 00 10 stw r9,16(r1)
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
ffc05810: 40 9c 02 08 bge- cr7,ffc05a18 <fcntl+0x24c>
iop = rtems_libio_iop( fd );
ffc05814: 3f e0 00 00 lis r31,0
ffc05818: 81 7f 27 88 lwz r11,10120(r31)
ffc0581c: 54 63 30 32 rlwinm r3,r3,6,0,25
ffc05820: 7f cb 1a 14 add r30,r11,r3
rtems_libio_check_is_open(iop);
ffc05824: 80 7e 00 18 lwz r3,24(r30)
ffc05828: 70 69 01 00 andi. r9,r3,256
ffc0582c: 41 82 01 ec beq- ffc05a18 <fcntl+0x24c>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
ffc05830: 2b 84 00 09 cmplwi cr7,r4,9
ffc05834: 40 9d 00 30 ble- cr7,ffc05864 <fcntl+0x98>
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
ffc05838: 48 00 df 75 bl ffc137ac <__errno>
ffc0583c: 38 00 00 16 li r0,22
ffc05840: 90 03 00 00 stw r0,0(r3)
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
ret = -1;
ffc05844: 3b e0 ff ff li r31,-1
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
ffc05848: 80 01 00 3c lwz r0,60(r1)
ffc0584c: 7f e3 fb 78 mr r3,r31
ffc05850: 83 c1 00 30 lwz r30,48(r1)
ffc05854: 7c 08 03 a6 mtlr r0
ffc05858: 83 e1 00 34 lwz r31,52(r1)
ffc0585c: 38 21 00 38 addi r1,r1,56
ffc05860: 4e 80 00 20 blr
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
ffc05864: 3d 20 ff c2 lis r9,-62
ffc05868: 39 29 b0 c0 addi r9,r9,-20288
ffc0586c: 54 8a 10 3a rlwinm r10,r4,2,0,29
ffc05870: 7d 49 50 2e lwzx r10,r9,r10
ffc05874: 7d 2a 4a 14 add r9,r10,r9
ffc05878: 7d 29 03 a6 mtctr r9
ffc0587c: 4e 80 04 20 bctr
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
ffc05880: 48 00 df 2d bl ffc137ac <__errno>
ffc05884: 38 00 00 86 li r0,134
ffc05888: 90 03 00 00 stw r0,0(r3)
ffc0588c: 4b ff ff b8 b ffc05844 <fcntl+0x78>
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
ffc05890: 89 21 00 08 lbz r9,8(r1)
ffc05894: 2b 89 00 07 cmplwi cr7,r9,7
ffc05898: 40 9d 01 68 ble- cr7,ffc05a00 <fcntl+0x234> <== ALWAYS TAKEN
ffc0589c: 81 61 00 0c lwz r11,12(r1) <== NOT EXECUTED
ffc058a0: 38 0b 00 04 addi r0,r11,4 <== NOT EXECUTED
ffc058a4: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED
ffc058a8: 80 6b 00 00 lwz r3,0(r11)
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
ffc058ac: 3b e0 00 00 li r31,0
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
ffc058b0: 90 81 00 28 stw r4,40(r1)
ffc058b4: 48 00 07 01 bl ffc05fb4 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
ffc058b8: 39 20 fd fe li r9,-514
ffc058bc: 80 1e 00 18 lwz r0,24(r30)
ffc058c0: 70 63 02 01 andi. r3,r3,513
ffc058c4: 80 81 00 28 lwz r4,40(r1)
ffc058c8: 7d 20 00 38 and r0,r9,r0
ffc058cc: 7c 60 03 78 or r0,r3,r0
ffc058d0: 90 1e 00 18 stw r0,24(r30)
ffc058d4: 48 00 00 1c b ffc058f0 <fcntl+0x124>
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
ffc058d8: 90 81 00 28 stw r4,40(r1)
ffc058dc: 48 00 07 39 bl ffc06014 <rtems_libio_to_fcntl_flags>
ffc058e0: 7c 7f 1b 78 mr r31,r3
ffc058e4: 80 81 00 28 lwz r4,40(r1)
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
ffc058e8: 2f 9f 00 00 cmpwi cr7,r31,0
ffc058ec: 41 bc ff 5c blt- cr7,ffc05848 <fcntl+0x7c> <== NEVER TAKEN
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
ffc058f0: 81 3e 00 24 lwz r9,36(r30)
ffc058f4: 7c 83 23 78 mr r3,r4
ffc058f8: 7f c4 f3 78 mr r4,r30
ffc058fc: 80 09 00 30 lwz r0,48(r9)
ffc05900: 7c 09 03 a6 mtctr r0
ffc05904: 4e 80 04 21 bctrl
if (err) {
ffc05908: 7c 7e 1b 79 mr. r30,r3
ffc0590c: 41 82 ff 3c beq+ ffc05848 <fcntl+0x7c> <== ALWAYS TAKEN
errno = err;
ffc05910: 48 00 de 9d bl ffc137ac <__errno> <== NOT EXECUTED
ffc05914: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED
ffc05918: 4b ff ff 2c b ffc05844 <fcntl+0x78> <== NOT EXECUTED
* 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 ) )
ffc0591c: 89 21 00 08 lbz r9,8(r1)
ffc05920: 2b 89 00 07 cmplwi cr7,r9,7
ffc05924: 41 9d 00 cc bgt- cr7,ffc059f0 <fcntl+0x224> <== NEVER TAKEN
ffc05928: 55 20 10 3a rlwinm r0,r9,2,0,29
ffc0592c: 81 61 00 10 lwz r11,16(r1)
ffc05930: 39 29 00 01 addi r9,r9,1
ffc05934: 99 21 00 08 stb r9,8(r1)
ffc05938: 7d 6b 02 14 add r11,r11,r0
ffc0593c: 80 0b 00 00 lwz r0,0(r11)
ffc05940: 2f 80 00 00 cmpwi cr7,r0,0
ffc05944: 41 9e 00 e8 beq- cr7,ffc05a2c <fcntl+0x260>
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
ffc05948: 60 63 08 00 ori r3,r3,2048
ffc0594c: 90 7e 00 18 stw r3,24(r30)
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
ffc05950: 3b e0 00 00 li r31,0
ffc05954: 4b ff ff 9c b ffc058f0 <fcntl+0x124>
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
ffc05958: 54 7f af fe rlwinm r31,r3,21,31,31
ffc0595c: 4b ff ff 94 b ffc058f0 <fcntl+0x124>
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
ffc05960: 89 21 00 08 lbz r9,8(r1)
ffc05964: 2b 89 00 07 cmplwi cr7,r9,7
ffc05968: 41 9d 00 78 bgt- cr7,ffc059e0 <fcntl+0x214> <== NEVER TAKEN
ffc0596c: 55 2a 10 3a rlwinm r10,r9,2,0,29
ffc05970: 81 01 00 10 lwz r8,16(r1)
ffc05974: 39 29 00 01 addi r9,r9,1
ffc05978: 99 21 00 08 stb r9,8(r1)
ffc0597c: 7d 48 52 14 add r10,r8,r10
ffc05980: 81 4a 00 00 lwz r10,0(r10)
if ( fd2 )
ffc05984: 2f 8a 00 00 cmpwi cr7,r10,0
ffc05988: 41 9e 00 b4 beq- cr7,ffc05a3c <fcntl+0x270>
diop = rtems_libio_iop( fd2 );
ffc0598c: 7f 80 50 40 cmplw cr7,r0,r10
ffc05990: 3b e0 00 00 li r31,0
ffc05994: 39 20 00 00 li r9,0
ffc05998: 40 9d 00 10 ble- cr7,ffc059a8 <fcntl+0x1dc> <== NEVER TAKEN
ffc0599c: 55 49 30 32 rlwinm r9,r10,6,0,25
ffc059a0: 7d 2b 4a 14 add r9,r11,r9
ffc059a4: 7d 3f 4b 78 mr r31,r9
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ffc059a8: 80 1e 00 28 lwz r0,40(r30)
ret = (int) (diop - rtems_libio_iops);
ffc059ac: 7f eb f8 50 subf r31,r11,r31
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ffc059b0: 80 fe 00 1c lwz r7,28(r30)
ret = (int) (diop - rtems_libio_iops);
ffc059b4: 7f ff 36 70 srawi r31,r31,6
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ffc059b8: 81 1e 00 20 lwz r8,32(r30)
ffc059bc: 81 5e 00 24 lwz r10,36(r30)
ffc059c0: 90 e9 00 1c stw r7,28(r9)
ffc059c4: 91 09 00 20 stw r8,32(r9)
ffc059c8: 91 49 00 24 stw r10,36(r9)
ffc059cc: 90 09 00 28 stw r0,40(r9)
ffc059d0: 80 1e 00 2c lwz r0,44(r30)
ret = -1;
break;
}
}
diop->flags = iop->flags;
ffc059d4: 90 69 00 18 stw r3,24(r9)
diop->pathinfo = iop->pathinfo;
ffc059d8: 90 09 00 2c stw r0,44(r9)
ffc059dc: 4b ff ff 0c b ffc058e8 <fcntl+0x11c>
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
ffc059e0: 81 41 00 0c lwz r10,12(r1) <== NOT EXECUTED
ffc059e4: 39 2a 00 04 addi r9,r10,4 <== NOT EXECUTED
ffc059e8: 91 21 00 0c stw r9,12(r1) <== NOT EXECUTED
ffc059ec: 4b ff ff 94 b ffc05980 <fcntl+0x1b4> <== NOT EXECUTED
* 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 ) )
ffc059f0: 81 61 00 0c lwz r11,12(r1) <== NOT EXECUTED
ffc059f4: 38 0b 00 04 addi r0,r11,4 <== NOT EXECUTED
ffc059f8: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED
ffc059fc: 4b ff ff 40 b ffc0593c <fcntl+0x170> <== NOT EXECUTED
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
ffc05a00: 81 61 00 10 lwz r11,16(r1)
ffc05a04: 55 20 10 3a rlwinm r0,r9,2,0,29
ffc05a08: 39 29 00 01 addi r9,r9,1
ffc05a0c: 7d 6b 02 14 add r11,r11,r0
ffc05a10: 99 21 00 08 stb r9,8(r1)
ffc05a14: 4b ff fe 94 b ffc058a8 <fcntl+0xdc>
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
ffc05a18: 48 00 dd 95 bl ffc137ac <__errno>
ffc05a1c: 38 00 00 09 li r0,9
ffc05a20: 90 03 00 00 stw r0,0(r3)
ffc05a24: 3b e0 ff ff li r31,-1
ffc05a28: 4b ff fe 20 b ffc05848 <fcntl+0x7c>
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
ffc05a2c: 54 63 05 66 rlwinm r3,r3,0,21,19
ffc05a30: 90 7e 00 18 stw r3,24(r30)
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
ffc05a34: 3b e0 00 00 li r31,0
ffc05a38: 4b ff fe b8 b ffc058f0 <fcntl+0x124>
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
ffc05a3c: 90 81 00 28 stw r4,40(r1)
ffc05a40: 48 00 06 25 bl ffc06064 <rtems_libio_allocate>
if ( diop == 0 ) {
ffc05a44: 7c 69 1b 79 mr. r9,r3
ffc05a48: 80 81 00 28 lwz r4,40(r1)
ffc05a4c: 41 a2 fd f8 beq- ffc05844 <fcntl+0x78> <== NEVER TAKEN
ffc05a50: 81 7f 27 88 lwz r11,10120(r31)
ffc05a54: 7d 3f 4b 78 mr r31,r9
ffc05a58: 80 7e 00 18 lwz r3,24(r30)
ffc05a5c: 4b ff ff 4c b ffc059a8 <fcntl+0x1dc>
ffc11428 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
ffc11428: 94 21 ff d0 stwu r1,-48(r1)
ffc1142c: 7c 08 02 a6 mflr r0
ffc11430: 93 e1 00 2c stw r31,44(r1)
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
ffc11434: 3f e0 00 00 lis r31,0
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
ffc11438: 90 01 00 34 stw r0,52(r1)
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
ffc1143c: 80 1f 29 60 lwz r0,10592(r31)
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
ffc11440: 93 61 00 1c stw r27,28(r1)
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
ffc11444: 3b 7f 29 60 addi r27,r31,10592
ffc11448: 2f 80 00 00 cmpwi cr7,r0,0
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
ffc1144c: 93 a1 00 24 stw r29,36(r1)
ffc11450: 7c 9d 23 78 mr r29,r4
ffc11454: 93 c1 00 28 stw r30,40(r1)
ffc11458: 7c 7e 1b 78 mr r30,r3
ffc1145c: 93 81 00 20 stw r28,32(r1)
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
ffc11460: 41 9e 00 bc beq- cr7,ffc1151c <fifo_open+0xf4>
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc11464: 7c 03 03 78 mr r3,r0
ffc11468: 38 80 00 00 li r4,0
ffc1146c: 38 a0 00 00 li r5,0
ffc11470: 4b ff a2 5d bl ffc0b6cc <rtems_semaphore_obtain>
)
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
ffc11474: 3b 80 ff f4 li r28,-12
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
}
if (sc == RTEMS_SUCCESSFUL) {
ffc11478: 2f 83 00 00 cmpwi cr7,r3,0
ffc1147c: 40 9e 00 78 bne- cr7,ffc114f4 <fifo_open+0xcc> <== NEVER TAKEN
err = pipe_lock();
if (err)
return err;
pipe = *pipep;
ffc11480: 83 fe 00 00 lwz r31,0(r30)
if (pipe == NULL) {
ffc11484: 2f 9f 00 00 cmpwi cr7,r31,0
ffc11488: 41 9e 02 2c beq- cr7,ffc116b4 <fifo_open+0x28c>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
ffc1148c: 80 7f 00 28 lwz r3,40(r31)
ffc11490: 38 80 00 00 li r4,0
ffc11494: 38 a0 00 00 li r5,0
ffc11498: 4b ff a2 35 bl ffc0b6cc <rtems_semaphore_obtain>
err = -EINTR;
ffc1149c: 3b 80 ff fc li r28,-4
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
ffc114a0: 2f 83 00 00 cmpwi cr7,r3,0
ffc114a4: 40 9e 00 08 bne- cr7,ffc114ac <fifo_open+0x84> <== NEVER TAKEN
ffc114a8: 3b 80 00 00 li r28,0
err = -EINTR;
if (*pipep == NULL) {
ffc114ac: 80 1e 00 00 lwz r0,0(r30)
ffc114b0: 2f 80 00 00 cmpwi cr7,r0,0
ffc114b4: 41 9e 02 d4 beq- cr7,ffc11788 <fifo_open+0x360>
else
*pipep = pipe;
}
out:
pipe_unlock();
ffc114b8: 4b ff fe 09 bl ffc112c0 <pipe_unlock>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
ffc114bc: 2f 9c 00 00 cmpwi cr7,r28,0
ffc114c0: 40 9e 00 34 bne- cr7,ffc114f4 <fifo_open+0xcc> <== NEVER TAKEN
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
ffc114c4: 80 1d 00 18 lwz r0,24(r29)
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
ffc114c8: 83 fe 00 00 lwz r31,0(r30)
switch (LIBIO_ACCMODE(iop)) {
ffc114cc: 54 00 07 7c rlwinm r0,r0,0,29,30
ffc114d0: 2f 80 00 04 cmpwi cr7,r0,4
ffc114d4: 41 9e 00 78 beq- cr7,ffc1154c <fifo_open+0x124>
ffc114d8: 2f 80 00 06 cmpwi cr7,r0,6
ffc114dc: 41 9e 01 88 beq- cr7,ffc11664 <fifo_open+0x23c>
ffc114e0: 2f 80 00 02 cmpwi cr7,r0,2
ffc114e4: 41 9e 00 fc beq- cr7,ffc115e0 <fifo_open+0x1b8> <== ALWAYS TAKEN
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
ffc114e8: 80 7f 00 28 lwz r3,40(r31)
return 0;
ffc114ec: 3b 80 00 00 li r28,0
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
ffc114f0: 4b ff a3 65 bl ffc0b854 <rtems_semaphore_release>
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
ffc114f4: 80 01 00 34 lwz r0,52(r1)
ffc114f8: 7f 83 e3 78 mr r3,r28
ffc114fc: 83 61 00 1c lwz r27,28(r1)
ffc11500: 7c 08 03 a6 mtlr r0
ffc11504: 83 81 00 20 lwz r28,32(r1)
ffc11508: 83 a1 00 24 lwz r29,36(r1)
ffc1150c: 83 c1 00 28 lwz r30,40(r1)
ffc11510: 83 e1 00 2c lwz r31,44(r1)
ffc11514: 38 21 00 30 addi r1,r1,48
ffc11518: 4e 80 00 20 blr
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 );
ffc1151c: 3f 80 00 00 lis r28,0
ffc11520: 80 7c 27 90 lwz r3,10128(r28)
ffc11524: 38 80 00 00 li r4,0
ffc11528: 38 a0 00 00 li r5,0
ffc1152c: 4b ff a1 a1 bl ffc0b6cc <rtems_semaphore_obtain>
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
ffc11530: 80 1f 29 60 lwz r0,10592(r31)
ffc11534: 2f 80 00 00 cmpwi cr7,r0,0
ffc11538: 41 9e 02 64 beq- cr7,ffc1179c <fifo_open+0x374> <== ALWAYS TAKEN
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
ffc1153c: 80 7c 27 90 lwz r3,10128(r28) <== NOT EXECUTED
ffc11540: 4b ff a3 15 bl ffc0b854 <rtems_semaphore_release> <== NOT EXECUTED
ffc11544: 80 1f 29 60 lwz r0,10592(r31) <== NOT EXECUTED
ffc11548: 4b ff ff 1c b ffc11464 <fifo_open+0x3c> <== NOT EXECUTED
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
ffc1154c: 81 3f 00 14 lwz r9,20(r31)
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
ffc11550: 81 7f 00 24 lwz r11,36(r31)
if (pipe->Writers ++ == 0)
ffc11554: 2f 89 00 00 cmpwi cr7,r9,0
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
ffc11558: 38 0b 00 01 addi r0,r11,1
if (pipe->Writers ++ == 0)
ffc1155c: 39 29 00 01 addi r9,r9,1
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
ffc11560: 90 1f 00 24 stw r0,36(r31)
if (pipe->Writers ++ == 0)
ffc11564: 91 3f 00 14 stw r9,20(r31)
ffc11568: 41 9e 02 90 beq- cr7,ffc117f8 <fifo_open+0x3d0> <== ALWAYS TAKEN
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
ffc1156c: 80 1f 00 10 lwz r0,16(r31)
ffc11570: 2f 80 00 00 cmpwi cr7,r0,0
ffc11574: 40 be ff 74 bne- cr7,ffc114e8 <fifo_open+0xc0>
ffc11578: 80 1d 00 18 lwz r0,24(r29)
ffc1157c: 70 09 00 01 andi. r9,r0,1
ffc11580: 40 82 02 b8 bne- ffc11838 <fifo_open+0x410>
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
ffc11584: 83 9f 00 20 lwz r28,32(r31)
ffc11588: 48 00 00 20 b ffc115a8 <fifo_open+0x180>
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
ffc1158c: 80 7f 00 28 lwz r3,40(r31)
ffc11590: 4b ff a1 3d bl ffc0b6cc <rtems_semaphore_obtain>
ffc11594: 2f 83 00 00 cmpwi cr7,r3,0
ffc11598: 40 9e 00 34 bne- cr7,ffc115cc <fifo_open+0x1a4> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->readerCounter);
ffc1159c: 80 1f 00 20 lwz r0,32(r31)
ffc115a0: 7f 80 e0 00 cmpw cr7,r0,r28
ffc115a4: 40 be ff 44 bne- cr7,ffc114e8 <fifo_open+0xc0> <== ALWAYS TAKEN
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
ffc115a8: 80 7f 00 28 lwz r3,40(r31)
ffc115ac: 4b ff a2 a9 bl ffc0b854 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
ffc115b0: 80 7f 00 30 lwz r3,48(r31)
ffc115b4: 38 80 00 00 li r4,0
ffc115b8: 48 00 18 4d bl ffc12e04 <rtems_barrier_wait>
goto out_error;
if (! PIPE_LOCK(pipe))
ffc115bc: 38 80 00 00 li r4,0
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ffc115c0: 2f 83 00 00 cmpwi cr7,r3,0
goto out_error;
if (! PIPE_LOCK(pipe))
ffc115c4: 38 a0 00 00 li r5,0
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ffc115c8: 41 9e ff c4 beq+ cr7,ffc1158c <fifo_open+0x164> <== ALWAYS TAKEN
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
ffc115cc: 3b 80 ff fc li r28,-4 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
ffc115d0: 7f c3 f3 78 mr r3,r30
ffc115d4: 7f a4 eb 78 mr r4,r29
ffc115d8: 4b ff fd 11 bl ffc112e8 <pipe_release>
return err;
ffc115dc: 4b ff ff 18 b ffc114f4 <fifo_open+0xcc>
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
ffc115e0: 81 3f 00 10 lwz r9,16(r31)
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
ffc115e4: 81 7f 00 20 lwz r11,32(r31)
if (pipe->Readers ++ == 0)
ffc115e8: 2f 89 00 00 cmpwi cr7,r9,0
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
ffc115ec: 38 0b 00 01 addi r0,r11,1
if (pipe->Readers ++ == 0)
ffc115f0: 39 29 00 01 addi r9,r9,1
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
ffc115f4: 90 1f 00 20 stw r0,32(r31)
if (pipe->Readers ++ == 0)
ffc115f8: 91 3f 00 10 stw r9,16(r31)
ffc115fc: 41 9e 01 dc beq- cr7,ffc117d8 <fifo_open+0x3b0> <== ALWAYS TAKEN
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
ffc11600: 80 1f 00 14 lwz r0,20(r31)
ffc11604: 2f 80 00 00 cmpwi cr7,r0,0
ffc11608: 40 be fe e0 bne- cr7,ffc114e8 <fifo_open+0xc0>
/* Not an error */
if (LIBIO_NODELAY(iop))
ffc1160c: 80 1d 00 18 lwz r0,24(r29)
ffc11610: 70 09 00 01 andi. r9,r0,1
ffc11614: 40 a2 fe d4 bne- ffc114e8 <fifo_open+0xc0>
break;
prevCounter = pipe->writerCounter;
ffc11618: 83 9f 00 24 lwz r28,36(r31)
ffc1161c: 48 00 00 20 b ffc1163c <fifo_open+0x214>
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
ffc11620: 80 7f 00 28 lwz r3,40(r31)
ffc11624: 4b ff a0 a9 bl ffc0b6cc <rtems_semaphore_obtain>
ffc11628: 2f 83 00 00 cmpwi cr7,r3,0
ffc1162c: 40 be ff a0 bne- cr7,ffc115cc <fifo_open+0x1a4> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->writerCounter);
ffc11630: 80 1f 00 24 lwz r0,36(r31)
ffc11634: 7f 80 e0 00 cmpw cr7,r0,r28
ffc11638: 40 be fe b0 bne- cr7,ffc114e8 <fifo_open+0xc0> <== ALWAYS TAKEN
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
ffc1163c: 80 7f 00 28 lwz r3,40(r31)
ffc11640: 4b ff a2 15 bl ffc0b854 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
ffc11644: 80 7f 00 2c lwz r3,44(r31)
ffc11648: 38 80 00 00 li r4,0
ffc1164c: 48 00 17 b9 bl ffc12e04 <rtems_barrier_wait>
goto out_error;
if (! PIPE_LOCK(pipe))
ffc11650: 38 80 00 00 li r4,0
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ffc11654: 2f 83 00 00 cmpwi cr7,r3,0
goto out_error;
if (! PIPE_LOCK(pipe))
ffc11658: 38 a0 00 00 li r5,0
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ffc1165c: 41 9e ff c4 beq+ cr7,ffc11620 <fifo_open+0x1f8> <== ALWAYS TAKEN
ffc11660: 4b ff ff 6c b ffc115cc <fifo_open+0x1a4> <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
ffc11664: 81 3f 00 10 lwz r9,16(r31)
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
ffc11668: 81 7f 00 20 lwz r11,32(r31)
if (pipe->Readers ++ == 0)
ffc1166c: 2f 89 00 00 cmpwi cr7,r9,0
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
ffc11670: 38 0b 00 01 addi r0,r11,1
if (pipe->Readers ++ == 0)
ffc11674: 39 29 00 01 addi r9,r9,1
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
ffc11678: 90 1f 00 20 stw r0,32(r31)
if (pipe->Readers ++ == 0)
ffc1167c: 91 3f 00 10 stw r9,16(r31)
ffc11680: 41 9e 01 68 beq- cr7,ffc117e8 <fifo_open+0x3c0> <== ALWAYS TAKEN
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
ffc11684: 81 3f 00 14 lwz r9,20(r31)
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
ffc11688: 81 7f 00 24 lwz r11,36(r31)
if (pipe->Writers ++ == 0)
ffc1168c: 2f 89 00 00 cmpwi cr7,r9,0
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
ffc11690: 38 0b 00 01 addi r0,r11,1
if (pipe->Writers ++ == 0)
ffc11694: 39 29 00 01 addi r9,r9,1
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
ffc11698: 90 1f 00 24 stw r0,36(r31)
if (pipe->Writers ++ == 0)
ffc1169c: 91 3f 00 14 stw r9,20(r31)
ffc116a0: 40 9e fe 48 bne+ cr7,ffc114e8 <fifo_open+0xc0> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
ffc116a4: 80 7f 00 2c lwz r3,44(r31)
ffc116a8: 38 81 00 08 addi r4,r1,8
ffc116ac: 48 00 16 c5 bl ffc12d70 <rtems_barrier_release>
ffc116b0: 4b ff fe 38 b ffc114e8 <fifo_open+0xc0>
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
ffc116b4: 38 60 00 34 li r3,52
ffc116b8: 4b ff 60 79 bl ffc07730 <malloc>
if (pipe == NULL)
ffc116bc: 2f 83 00 00 cmpwi cr7,r3,0
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
ffc116c0: 7c 7f 1b 78 mr r31,r3
ffc116c4: 7c 7b 1b 78 mr r27,r3
if (pipe == NULL)
ffc116c8: 41 9e 01 a0 beq- cr7,ffc11868 <fifo_open+0x440>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
ffc116cc: 38 80 00 00 li r4,0
ffc116d0: 38 a0 00 34 li r5,52
ffc116d4: 48 00 48 25 bl ffc15ef8 <memset>
pipe->Size = PIPE_BUF;
ffc116d8: 38 00 02 00 li r0,512
ffc116dc: 90 1f 00 04 stw r0,4(r31)
pipe->Buffer = malloc(pipe->Size);
ffc116e0: 38 60 02 00 li r3,512
ffc116e4: 4b ff 60 4d bl ffc07730 <malloc>
if (! pipe->Buffer)
ffc116e8: 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);
ffc116ec: 90 7f 00 00 stw r3,0(r31)
if (! pipe->Buffer)
ffc116f0: 41 9e 01 70 beq- cr7,ffc11860 <fifo_open+0x438> <== NEVER TAKEN
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
ffc116f4: 3f 80 00 00 lis r28,0
ffc116f8: 88 7c 21 b1 lbz r3,8625(r28)
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
ffc116fc: 38 80 00 00 li r4,0
ffc11700: 38 a0 00 00 li r5,0
ffc11704: 64 63 50 49 oris r3,r3,20553
ffc11708: 60 63 72 00 ori r3,r3,29184
ffc1170c: 38 df 00 2c addi r6,r31,44
ffc11710: 48 00 14 59 bl ffc12b68 <rtems_barrier_create>
ffc11714: 2f 83 00 00 cmpwi cr7,r3,0
ffc11718: 40 9e 01 40 bne- cr7,ffc11858 <fifo_open+0x430>
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),
ffc1171c: 88 7c 21 b1 lbz r3,8625(r28)
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(
ffc11720: 38 80 00 00 li r4,0
ffc11724: 38 a0 00 00 li r5,0
ffc11728: 64 63 50 49 oris r3,r3,20553
ffc1172c: 60 63 77 00 ori r3,r3,30464
ffc11730: 38 df 00 30 addi r6,r31,48
ffc11734: 48 00 14 35 bl ffc12b68 <rtems_barrier_create>
ffc11738: 2f 83 00 00 cmpwi cr7,r3,0
ffc1173c: 40 9e 01 14 bne- cr7,ffc11850 <fifo_open+0x428>
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,
ffc11740: 88 7c 21 b1 lbz r3,8625(r28)
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(
ffc11744: 38 80 00 01 li r4,1
ffc11748: 38 a0 00 10 li r5,16
ffc1174c: 64 63 50 49 oris r3,r3,20553
ffc11750: 60 63 73 00 ori r3,r3,29440
ffc11754: 38 c0 00 00 li r6,0
ffc11758: 38 ff 00 28 addi r7,r31,40
ffc1175c: 4b ff 9c 71 bl ffc0b3cc <rtems_semaphore_create>
ffc11760: 2f 83 00 00 cmpwi cr7,r3,0
ffc11764: 40 9e 00 e4 bne- cr7,ffc11848 <fifo_open+0x420>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
ffc11768: 89 3c 21 b1 lbz r9,8625(r28)
ffc1176c: 2f 89 00 7a cmpwi cr7,r9,122
ffc11770: 39 29 00 01 addi r9,r9,1
ffc11774: 99 3c 21 b1 stb r9,8625(r28)
ffc11778: 40 9e fd 14 bne+ cr7,ffc1148c <fifo_open+0x64>
c = 'a';
ffc1177c: 38 00 00 61 li r0,97
ffc11780: 98 1c 21 b1 stb r0,8625(r28)
ffc11784: 4b ff fd 08 b ffc1148c <fifo_open+0x64>
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
ffc11788: 2f 9c 00 00 cmpwi cr7,r28,0
ffc1178c: 40 9e 00 7c bne- cr7,ffc11808 <fifo_open+0x3e0> <== NEVER TAKEN
pipe_free(pipe);
else
*pipep = pipe;
ffc11790: 93 fe 00 00 stw r31,0(r30)
}
out:
pipe_unlock();
ffc11794: 4b ff fb 2d bl ffc112c0 <pipe_unlock>
ffc11798: 4b ff fd 2c b ffc114c4 <fifo_open+0x9c>
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
sc = rtems_semaphore_create(
ffc1179c: 3c 60 50 49 lis r3,20553
ffc117a0: 7f 67 db 78 mr r7,r27
ffc117a4: 38 80 00 01 li r4,1
ffc117a8: 38 a0 00 54 li r5,84
ffc117ac: 38 c0 00 00 li r6,0
ffc117b0: 60 63 50 45 ori r3,r3,20549
ffc117b4: 4b ff 9c 19 bl ffc0b3cc <rtems_semaphore_create>
ffc117b8: 7c 7b 1b 78 mr r27,r3
ffc117bc: 80 7c 27 90 lwz r3,10128(r28)
)
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
ffc117c0: 3b 80 ff f4 li r28,-12
ffc117c4: 4b ff a0 91 bl ffc0b854 <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
ffc117c8: 2f 9b 00 00 cmpwi cr7,r27,0
ffc117cc: 40 9e fd 28 bne+ cr7,ffc114f4 <fifo_open+0xcc>
ffc117d0: 80 1f 29 60 lwz r0,10592(r31)
ffc117d4: 4b ff fc 90 b ffc11464 <fifo_open+0x3c>
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
ffc117d8: 80 7f 00 30 lwz r3,48(r31)
ffc117dc: 38 81 00 08 addi r4,r1,8
ffc117e0: 48 00 15 91 bl ffc12d70 <rtems_barrier_release>
ffc117e4: 4b ff fe 1c b ffc11600 <fifo_open+0x1d8>
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
ffc117e8: 80 7f 00 30 lwz r3,48(r31)
ffc117ec: 38 81 00 08 addi r4,r1,8
ffc117f0: 48 00 15 81 bl ffc12d70 <rtems_barrier_release>
ffc117f4: 4b ff fe 90 b ffc11684 <fifo_open+0x25c>
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
ffc117f8: 80 7f 00 2c lwz r3,44(r31)
ffc117fc: 38 81 00 08 addi r4,r1,8
ffc11800: 48 00 15 71 bl ffc12d70 <rtems_barrier_release>
ffc11804: 4b ff fd 68 b ffc1156c <fifo_open+0x144>
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
ffc11808: 80 7f 00 2c lwz r3,44(r31) <== NOT EXECUTED
ffc1180c: 48 00 14 99 bl ffc12ca4 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
ffc11810: 80 7f 00 30 lwz r3,48(r31) <== NOT EXECUTED
ffc11814: 48 00 14 91 bl ffc12ca4 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
ffc11818: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED
ffc1181c: 4b ff 9d d5 bl ffc0b5f0 <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
ffc11820: 80 7f 00 00 lwz r3,0(r31) <== NOT EXECUTED
ffc11824: 4b ff 55 01 bl ffc06d24 <free> <== NOT EXECUTED
free(pipe);
ffc11828: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc1182c: 4b ff 54 f9 bl ffc06d24 <free> <== NOT EXECUTED
else
*pipep = pipe;
}
out:
pipe_unlock();
ffc11830: 4b ff fa 91 bl ffc112c0 <pipe_unlock> <== NOT EXECUTED
ffc11834: 4b ff fc c0 b ffc114f4 <fifo_open+0xcc> <== NOT EXECUTED
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
ffc11838: 80 7f 00 28 lwz r3,40(r31)
err = -ENXIO;
ffc1183c: 3b 80 ff fa li r28,-6
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
ffc11840: 4b ff a0 15 bl ffc0b854 <rtems_semaphore_release>
err = -ENXIO;
goto out_error;
ffc11844: 4b ff fd 8c b ffc115d0 <fifo_open+0x1a8>
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
ffc11848: 80 7f 00 30 lwz r3,48(r31)
ffc1184c: 48 00 14 59 bl ffc12ca4 <rtems_barrier_delete>
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
ffc11850: 80 7b 00 2c lwz r3,44(r27)
ffc11854: 48 00 14 51 bl ffc12ca4 <rtems_barrier_delete>
err_rbar:
free(pipe->Buffer);
ffc11858: 80 7b 00 00 lwz r3,0(r27)
ffc1185c: 4b ff 54 c9 bl ffc06d24 <free>
err_buf:
free(pipe);
ffc11860: 7f 63 db 78 mr r3,r27
ffc11864: 4b ff 54 c1 bl ffc06d24 <free>
)
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
ffc11868: 3b 80 ff f4 li r28,-12
else
*pipep = pipe;
}
out:
pipe_unlock();
ffc1186c: 4b ff fa 55 bl ffc112c0 <pipe_unlock>
ffc11870: 4b ff fc 84 b ffc114f4 <fifo_open+0xcc>
ffc05afc <fpathconf>:
long fpathconf(
int fd,
int name
)
{
ffc05afc: 7c 08 02 a6 mflr r0
ffc05b00: 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);
ffc05b04: 3d 20 00 00 lis r9,0
long fpathconf(
int fd,
int name
)
{
ffc05b08: 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);
ffc05b0c: 80 09 26 cc lwz r0,9932(r9)
ffc05b10: 7f 83 00 40 cmplw cr7,r3,r0
ffc05b14: 40 9c 00 d0 bge- cr7,ffc05be4 <fpathconf+0xe8>
iop = rtems_libio_iop(fd);
ffc05b18: 3d 20 00 00 lis r9,0
ffc05b1c: 80 09 27 88 lwz r0,10120(r9)
ffc05b20: 54 63 30 32 rlwinm r3,r3,6,0,25
ffc05b24: 7c 60 1a 14 add r3,r0,r3
rtems_libio_check_is_open(iop);
ffc05b28: 80 03 00 18 lwz r0,24(r3)
ffc05b2c: 70 09 01 00 andi. r9,r0,256
ffc05b30: 41 82 00 b4 beq- ffc05be4 <fpathconf+0xe8> <== NEVER TAKEN
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
ffc05b34: 70 09 00 02 andi. r9,r0,2
ffc05b38: 41 82 00 10 beq- ffc05b48 <fpathconf+0x4c>
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
ffc05b3c: 2b 84 00 0b cmplwi cr7,r4,11
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
ffc05b40: 81 23 00 2c lwz r9,44(r3)
switch ( name ) {
ffc05b44: 40 9d 00 24 ble- cr7,ffc05b68 <fpathconf+0x6c>
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
ffc05b48: 48 00 dc 65 bl ffc137ac <__errno>
ffc05b4c: 38 00 00 16 li r0,22
ffc05b50: 90 03 00 00 stw r0,0(r3)
ffc05b54: 38 60 ff ff li r3,-1
break;
}
return return_value;
}
ffc05b58: 80 01 00 0c lwz r0,12(r1)
ffc05b5c: 38 21 00 08 addi r1,r1,8
ffc05b60: 7c 08 03 a6 mtlr r0
ffc05b64: 4e 80 00 20 blr
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
ffc05b68: 3d 60 ff c2 lis r11,-62
ffc05b6c: 39 6b b0 e8 addi r11,r11,-20248
ffc05b70: 54 84 10 3a rlwinm r4,r4,2,0,29
ffc05b74: 7c 0b 20 2e lwzx r0,r11,r4
ffc05b78: 7d 60 5a 14 add r11,r0,r11
ffc05b7c: 7d 69 03 a6 mtctr r11
ffc05b80: 4e 80 04 20 bctr
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
ffc05b84: 80 69 00 5c lwz r3,92(r9)
break;
ffc05b88: 4b ff ff d0 b ffc05b58 <fpathconf+0x5c>
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
ffc05b8c: 80 69 00 50 lwz r3,80(r9)
break;
ffc05b90: 4b ff ff c8 b ffc05b58 <fpathconf+0x5c>
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
ffc05b94: 80 69 00 64 lwz r3,100(r9)
break;
ffc05b98: 4b ff ff c0 b ffc05b58 <fpathconf+0x5c>
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
ffc05b9c: 80 69 00 58 lwz r3,88(r9)
break;
ffc05ba0: 4b ff ff b8 b ffc05b58 <fpathconf+0x5c>
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
ffc05ba4: 80 69 00 54 lwz r3,84(r9)
break;
ffc05ba8: 4b ff ff b0 b ffc05b58 <fpathconf+0x5c>
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
ffc05bac: 80 69 00 4c lwz r3,76(r9)
break;
ffc05bb0: 4b ff ff a8 b ffc05b58 <fpathconf+0x5c>
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
ffc05bb4: 80 69 00 48 lwz r3,72(r9)
break;
ffc05bb8: 4b ff ff a0 b ffc05b58 <fpathconf+0x5c>
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
ffc05bbc: 80 69 00 44 lwz r3,68(r9)
break;
ffc05bc0: 4b ff ff 98 b ffc05b58 <fpathconf+0x5c>
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
ffc05bc4: 80 69 00 40 lwz r3,64(r9)
break;
ffc05bc8: 4b ff ff 90 b ffc05b58 <fpathconf+0x5c>
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
ffc05bcc: 80 69 00 3c lwz r3,60(r9)
break;
ffc05bd0: 4b ff ff 88 b ffc05b58 <fpathconf+0x5c>
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
ffc05bd4: 80 69 00 38 lwz r3,56(r9)
break;
ffc05bd8: 4b ff ff 80 b ffc05b58 <fpathconf+0x5c>
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
ffc05bdc: 80 69 00 60 lwz r3,96(r9)
break;
ffc05be0: 4b ff ff 78 b ffc05b58 <fpathconf+0x5c>
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
ffc05be4: 48 00 db c9 bl ffc137ac <__errno>
ffc05be8: 38 00 00 09 li r0,9
ffc05bec: 90 03 00 00 stw r0,0(r3)
ffc05bf0: 38 60 ff ff li r3,-1
ffc05bf4: 4b ff ff 64 b ffc05b58 <fpathconf+0x5c>
ffc04af8 <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
ffc04af8: 94 21 ff f0 stwu r1,-16(r1)
ffc04afc: 7c 08 02 a6 mflr r0
MSBUMP(free_calls, 1);
ffc04b00: 3d 20 00 00 lis r9,0
#include <stdlib.h>
void free(
void *ptr
)
{
ffc04b04: 90 01 00 14 stw r0,20(r1)
MSBUMP(free_calls, 1);
ffc04b08: 39 29 2a c8 addi r9,r9,10952
#include <stdlib.h>
void free(
void *ptr
)
{
ffc04b0c: 93 e1 00 0c stw r31,12(r1)
MSBUMP(free_calls, 1);
if ( !ptr )
ffc04b10: 7c 7f 1b 79 mr. r31,r3
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
ffc04b14: 81 69 00 0c lwz r11,12(r9)
#include <stdlib.h>
void free(
void *ptr
)
{
ffc04b18: 93 c1 00 08 stw r30,8(r1)
MSBUMP(free_calls, 1);
ffc04b1c: 38 0b 00 01 addi r0,r11,1
ffc04b20: 90 09 00 0c stw r0,12(r9)
if ( !ptr )
ffc04b24: 41 82 00 6c beq- ffc04b90 <free+0x98>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
ffc04b28: 3d 20 00 00 lis r9,0
ffc04b2c: 80 09 27 e8 lwz r0,10216(r9)
ffc04b30: 2f 80 00 03 cmpwi cr7,r0,3
ffc04b34: 41 9e 00 74 beq- cr7,ffc04ba8 <free+0xb0> <== ALWAYS TAKEN
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
ffc04b38: 3d 20 00 00 lis r9,0
ffc04b3c: 81 29 27 48 lwz r9,10056(r9)
ffc04b40: 2f 89 00 00 cmpwi cr7,r9,0
ffc04b44: 41 9e 00 14 beq- cr7,ffc04b58 <free+0x60>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
ffc04b48: 80 09 00 08 lwz r0,8(r9)
ffc04b4c: 7f e3 fb 78 mr r3,r31
ffc04b50: 7c 09 03 a6 mtctr r0
ffc04b54: 4e 80 04 21 bctrl
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
ffc04b58: 3f c0 00 00 lis r30,0
ffc04b5c: 80 7e 26 dc lwz r3,9948(r30)
ffc04b60: 7f e4 fb 78 mr r4,r31
ffc04b64: 48 00 65 55 bl ffc0b0b8 <_Protected_heap_Free>
ffc04b68: 2f 83 00 00 cmpwi cr7,r3,0
ffc04b6c: 40 be 00 24 bne+ cr7,ffc04b90 <free+0x98>
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
ffc04b70: 81 3e 26 dc lwz r9,9948(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",
ffc04b74: 3c 60 ff c2 lis r3,-62
ffc04b78: 38 63 8d 38 addi r3,r3,-29384
ffc04b7c: 80 a9 00 18 lwz r5,24(r9)
ffc04b80: 7f e4 fb 78 mr r4,r31
ffc04b84: 80 c9 00 1c lwz r6,28(r9)
ffc04b88: 4c c6 31 82 crclr 4*cr1+eq
ffc04b8c: 48 00 10 e1 bl ffc05c6c <printk>
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
ffc04b90: 80 01 00 14 lwz r0,20(r1)
ffc04b94: 83 c1 00 08 lwz r30,8(r1)
ffc04b98: 7c 08 03 a6 mtlr r0
ffc04b9c: 83 e1 00 0c lwz r31,12(r1)
ffc04ba0: 38 21 00 10 addi r1,r1,16
ffc04ba4: 4e 80 00 20 blr
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() ) {
ffc04ba8: 48 00 01 9d bl ffc04d44 <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()) &&
ffc04bac: 2f 83 00 00 cmpwi cr7,r3,0
ffc04bb0: 40 9e ff 88 bne+ cr7,ffc04b38 <free+0x40>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
ffc04bb4: 7f e3 fb 78 mr r3,r31
ffc04bb8: 48 00 02 19 bl ffc04dd0 <malloc_deferred_free>
return;
ffc04bbc: 4b ff ff d4 b ffc04b90 <free+0x98>
ffc0631c <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
ffc0631c: 94 21 ff f0 stwu r1,-16(r1)
ffc06320: 7c 08 02 a6 mflr r0
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
ffc06324: 3d 20 00 00 lis r9,0
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
ffc06328: 90 01 00 14 stw r0,20(r1)
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
ffc0632c: 38 09 2a d8 addi r0,r9,10968
ffc06330: 7f 83 00 00 cmpw cr7,r3,r0
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
ffc06334: 93 e1 00 0c stw r31,12(r1)
ffc06338: 7c 7f 1b 78 mr r31,r3
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
ffc0633c: 41 9e 00 1c beq- cr7,ffc06358 <free_user_env+0x3c> <== NEVER TAKEN
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
ffc06340: 38 63 00 04 addi r3,r3,4
ffc06344: 4b ff e9 f1 bl ffc04d34 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &env->root_directory);
ffc06348: 38 7f 00 18 addi r3,r31,24
ffc0634c: 4b ff e9 e9 bl ffc04d34 <rtems_filesystem_freenode>
free(env);
ffc06350: 7f e3 fb 78 mr r3,r31
ffc06354: 4b ff ea 0d bl ffc04d60 <free>
}
}
ffc06358: 80 01 00 14 lwz r0,20(r1)
ffc0635c: 83 e1 00 0c lwz r31,12(r1)
ffc06360: 38 21 00 10 addi r1,r1,16
ffc06364: 7c 08 03 a6 mtlr r0
ffc06368: 4e 80 00 20 blr
ffc192dc <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
ffc192dc: 94 21 ff c8 stwu r1,-56(r1)
ffc192e0: 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 );
ffc192e4: 3d 20 00 00 lis r9,0
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
ffc192e8: 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 );
ffc192ec: 80 09 27 4c lwz r0,10060(r9)
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
ffc192f0: 93 a1 00 2c stw r29,44(r1)
rtems_filesystem_location_info_t loc;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
ffc192f4: 3b a0 00 00 li r29,0
ffc192f8: 7f 83 00 40 cmplw cr7,r3,r0
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
ffc192fc: 93 c1 00 30 stw r30,48(r1)
ffc19300: 7c 9e 23 78 mr r30,r4
ffc19304: 93 e1 00 34 stw r31,52(r1)
ffc19308: 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 );
ffc1930c: 40 9c 00 14 bge- cr7,ffc19320 <getdents+0x44> <== NEVER TAKEN
ffc19310: 3d 20 00 00 lis r9,0
ffc19314: 83 a9 28 14 lwz r29,10260(r9)
ffc19318: 54 63 30 32 rlwinm r3,r3,6,0,25
ffc1931c: 7f bd 1a 14 add r29,r29,r3
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
ffc19320: 81 3d 00 28 lwz r9,40(r29)
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
ffc19324: 38 61 00 08 addi r3,r1,8
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
ffc19328: 80 1d 00 2c lwz r0,44(r29)
ffc1932c: 81 1d 00 1c lwz r8,28(r29)
ffc19330: 81 5d 00 20 lwz r10,32(r29)
ffc19334: 81 7d 00 24 lwz r11,36(r29)
ffc19338: 90 01 00 18 stw r0,24(r1)
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
ffc1933c: 80 09 00 10 lwz r0,16(r9)
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
ffc19340: 91 01 00 08 stw r8,8(r1)
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
ffc19344: 7c 09 03 a6 mtctr r0
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
ffc19348: 91 41 00 0c stw r10,12(r1)
ffc1934c: 91 61 00 10 stw r11,16(r1)
ffc19350: 91 21 00 14 stw r9,20(r1)
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
ffc19354: 4e 80 04 21 bctrl
ffc19358: 2f 83 00 01 cmpwi cr7,r3,1
ffc1935c: 40 9e 00 3c bne- cr7,ffc19398 <getdents+0xbc>
/*
* 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 );
ffc19360: 81 3d 00 24 lwz r9,36(r29)
ffc19364: 7f a3 eb 78 mr r3,r29
ffc19368: 7f c4 f3 78 mr r4,r30
ffc1936c: 80 09 00 08 lwz r0,8(r9)
ffc19370: 7f e5 fb 78 mr r5,r31
ffc19374: 7c 09 03 a6 mtctr r0
ffc19378: 4e 80 04 21 bctrl
}
ffc1937c: 80 01 00 3c lwz r0,60(r1)
ffc19380: 83 a1 00 2c lwz r29,44(r1)
ffc19384: 7c 08 03 a6 mtlr r0
ffc19388: 83 c1 00 30 lwz r30,48(r1)
ffc1938c: 83 e1 00 34 lwz r31,52(r1)
ffc19390: 38 21 00 38 addi r1,r1,56
ffc19394: 4e 80 00 20 blr
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
ffc19398: 4b ff 9d a9 bl ffc13140 <__errno>
ffc1939c: 38 00 00 14 li r0,20
ffc193a0: 90 03 00 00 stw r0,0(r3)
ffc193a4: 38 60 ff ff li r3,-1
ffc193a8: 4b ff ff d4 b ffc1937c <getdents+0xa0>
ffc04bc0 <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
ffc04bc0: 94 21 ff e0 stwu r1,-32(r1)
ffc04bc4: 7c 08 02 a6 mflr r0
ffc04bc8: 93 e1 00 1c stw r31,28(r1)
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
ffc04bcc: 7c 7f 1b 79 mr. r31,r3
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
ffc04bd0: 90 01 00 24 stw r0,36(r1)
ffc04bd4: 93 c1 00 18 stw r30,24(r1)
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
ffc04bd8: 41 82 00 64 beq- ffc04c3c <gettimeofday+0x7c> <== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc04bdc: 7f c0 00 a6 mfmsr r30
ffc04be0: 7c 10 42 a6 mfsprg r0,0
ffc04be4: 7f c0 00 78 andc r0,r30,r0
ffc04be8: 7c 00 01 24 mtmsr r0
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
_TOD_Get( &now );
ffc04bec: 38 61 00 08 addi r3,r1,8
ffc04bf0: 48 00 54 c9 bl ffc0a0b8 <_TOD_Get>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc04bf4: 7f c0 01 24 mtmsr r30
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
ffc04bf8: 3d 20 10 62 lis r9,4194
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
ffc04bfc: 80 01 00 0c lwz r0,12(r1)
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
ffc04c00: 61 29 4d d3 ori r9,r9,19923
ffc04c04: 7d 20 48 96 mulhw r9,r0,r9
ffc04c08: 7c 00 fe 70 srawi r0,r0,31
ffc04c0c: 7d 29 36 70 srawi r9,r9,6
ffc04c10: 7c 00 48 50 subf r0,r0,r9
time->tv_sec = now.tv_sec;
ffc04c14: 81 21 00 08 lwz r9,8(r1)
time->tv_usec = useconds;
ffc04c18: 90 1f 00 04 stw r0,4(r31)
* 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;
ffc04c1c: 38 60 00 00 li r3,0
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
ffc04c20: 91 3f 00 00 stw r9,0(r31)
}
ffc04c24: 80 01 00 24 lwz r0,36(r1)
ffc04c28: 83 c1 00 18 lwz r30,24(r1)
ffc04c2c: 7c 08 03 a6 mtlr r0
ffc04c30: 83 e1 00 1c lwz r31,28(r1)
ffc04c34: 38 21 00 20 addi r1,r1,32
ffc04c38: 4e 80 00 20 blr
void * __tz __attribute__((unused))
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
rtems_set_errno_and_return_minus_one( EFAULT );
ffc04c3c: 48 00 d4 39 bl ffc12074 <__errno> <== NOT EXECUTED
ffc04c40: 38 00 00 0e li r0,14 <== NOT EXECUTED
ffc04c44: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
ffc04c48: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc04c4c: 4b ff ff d8 b ffc04c24 <gettimeofday+0x64> <== NOT EXECUTED
ffc114f0 <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 )
ffc114f0: 81 23 00 1c lwz r9,28(r3)
return -1; /* It wasn't a directory --> return error */
ffc114f4: 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 )
ffc114f8: 81 29 00 4c lwz r9,76(r9)
ffc114fc: 2f 89 00 01 cmpwi cr7,r9,1
ffc11500: 40 be 00 18 bne+ cr7,ffc11518 <imfs_dir_open+0x28> <== NEVER TAKEN
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
ffc11504: 39 20 00 00 li r9,0
ffc11508: 39 40 00 00 li r10,0
ffc1150c: 91 23 00 10 stw r9,16(r3)
return 0;
ffc11510: 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;
ffc11514: 91 43 00 14 stw r10,20(r3)
return 0;
}
ffc11518: 7c 03 03 78 mr r3,r0
ffc1151c: 4e 80 00 20 blr
ffc11520 <imfs_dir_read>:
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
ffc11520: 94 21 fe a8 stwu r1,-344(r1)
ffc11524: 7c 08 02 a6 mflr r0
ffc11528: 90 01 01 5c stw r0,348(r1)
ffc1152c: 93 01 01 38 stw r24,312(r1)
ffc11530: 7c 98 23 78 mr r24,r4
ffc11534: 93 21 01 3c stw r25,316(r1)
ffc11538: 7c 79 1b 78 mr r25,r3
ffc1153c: 93 81 01 48 stw r28,328(r1)
ffc11540: 92 81 01 28 stw r20,296(r1)
int current_entry;
int first_entry;
int last_entry;
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access;
ffc11544: 83 83 00 1c lwz r28,28(r3)
the_chain = &the_jnode->info.directory.Entries;
if ( rtems_chain_is_empty( the_chain ) )
return 0;
ffc11548: 38 60 00 00 li r3,0
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
ffc1154c: 92 a1 01 2c stw r21,300(r1)
ffc11550: 92 c1 01 30 stw r22,304(r1)
ffc11554: 92 e1 01 34 stw r23,308(r1)
ffc11558: 93 41 01 40 stw r26,320(r1)
ffc1155c: 93 61 01 44 stw r27,324(r1)
ffc11560: 93 a1 01 4c stw r29,332(r1)
ffc11564: 93 c1 01 50 stw r30,336(r1)
ffc11568: 93 e1 01 54 stw r31,340(r1)
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
ffc1156c: 83 dc 00 50 lwz r30,80(r28)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc11570: 3b 9c 00 54 addi r28,r28,84
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access;
the_chain = &the_jnode->info.directory.Entries;
if ( rtems_chain_is_empty( the_chain ) )
ffc11574: 7f 9e e0 00 cmpw cr7,r30,r28
ffc11578: 41 9e 00 d8 beq- cr7,ffc11650 <imfs_dir_read+0x130>
bytes_transferred = 0;
first_entry = iop->offset;
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
ffc1157c: 3f 60 0e a0 lis r27,3744
/* Move to the first of the desired directory entries */
the_node = rtems_chain_first( the_chain );
bytes_transferred = 0;
first_entry = iop->offset;
ffc11580: 83 b9 00 14 lwz r29,20(r25)
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
ffc11584: 54 a5 e8 fe rlwinm r5,r5,29,3,31
ffc11588: 63 7b ea 0f ori r27,r27,59919
ffc1158c: 7f 65 d8 16 mulhwu r27,r5,r27
ffc11590: 57 7b f8 7e rlwinm r27,r27,31,1,31
ffc11594: 1f 7b 01 18 mulli r27,r27,280
/* The directory was not empty so try to move to the desired entry in chain*/
for (
ffc11598: 7f 7b ea 15 add. r27,r27,r29
ffc1159c: 40 81 00 b4 ble- ffc11650 <imfs_dir_read+0x130> <== NEVER TAKEN
ffc115a0: 3b e0 00 00 li r31,0
ffc115a4: 3b 40 00 00 li r26,0
}
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
ffc115a8: 3a a0 01 18 li r21,280
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
strcpy( tmp_dirent.d_name, the_jnode->name );
ffc115ac: 3a c1 00 1c addi r22,r1,28
memcpy(
ffc115b0: 3a e1 00 08 addi r23,r1,8
ffc115b4: 48 00 00 1c b ffc115d0 <imfs_dir_read+0xb0>
* to the end of the exisiting file, the remaining entries will be placed in
* the buffer and the returned value will be equal to -m actual- times the
* size of a directory entry.
*/
ssize_t imfs_dir_read(
ffc115b8: 3b ff 01 18 addi r31,r31,280
);
iop->offset = iop->offset + sizeof(struct dirent);
bytes_transferred = bytes_transferred + sizeof( struct dirent );
}
the_node = the_node->next;
ffc115bc: 83 de 00 00 lwz r30,0(r30)
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
/* The directory was not empty so try to move to the desired entry in chain*/
for (
ffc115c0: 7f 9b f8 00 cmpw cr7,r27,r31
current_entry = 0;
current_entry < last_entry;
current_entry = current_entry + sizeof(struct dirent) ){
if ( rtems_chain_is_tail( the_chain, the_node ) ){
ffc115c4: 7f 1e e0 00 cmpw cr6,r30,r28
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
/* The directory was not empty so try to move to the desired entry in chain*/
for (
ffc115c8: 40 9d 00 84 ble- cr7,ffc1164c <imfs_dir_read+0x12c> <== NEVER TAKEN
current_entry = 0;
current_entry < last_entry;
current_entry = current_entry + sizeof(struct dirent) ){
if ( rtems_chain_is_tail( the_chain, the_node ) ){
ffc115cc: 41 9a 00 80 beq- cr6,ffc1164c <imfs_dir_read+0x12c>
/* entry in the read */
return bytes_transferred; /* Indicate that there are no more */
/* entries to return */
}
if( current_entry >= first_entry ) {
ffc115d0: 7f 9d f8 00 cmpw cr7,r29,r31
ffc115d4: 41 9d ff e4 bgt+ cr7,ffc115b8 <imfs_dir_read+0x98>
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
ffc115d8: 80 1e 00 38 lwz r0,56(r30)
tmp_dirent.d_namlen = strlen( the_jnode->name );
ffc115dc: 3a 9e 00 0c addi r20,r30,12
/* entries to return */
}
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
ffc115e0: 7f e9 fe 70 srawi r9,r31,31
ffc115e4: 93 e1 00 14 stw r31,20(r1)
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
ffc115e8: 7e 83 a3 78 mr r3,r20
/* entries to return */
}
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
ffc115ec: 91 21 00 10 stw r9,16(r1)
* to the end of the exisiting file, the remaining entries will be placed in
* the buffer and the returned value will be equal to -m actual- times the
* size of a directory entry.
*/
ssize_t imfs_dir_read(
ffc115f0: 3b ff 01 18 addi r31,r31,280
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
ffc115f4: 90 01 00 08 stw r0,8(r1)
}
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
ffc115f8: b2 a1 00 18 sth r21,24(r1)
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
ffc115fc: 48 00 1d 01 bl ffc132fc <strlen>
strcpy( tmp_dirent.d_name, the_jnode->name );
ffc11600: 7e 84 a3 78 mr r4,r20
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
ffc11604: b0 61 00 1a sth r3,26(r1)
strcpy( tmp_dirent.d_name, the_jnode->name );
ffc11608: 7e c3 b3 78 mr r3,r22
ffc1160c: 48 00 1b e1 bl ffc131ec <strcpy>
memcpy(
ffc11610: 7c 78 d2 14 add r3,r24,r26
ffc11614: 7e e4 bb 78 mr r4,r23
ffc11618: 38 a0 01 18 li r5,280
ffc1161c: 48 00 16 b9 bl ffc12cd4 <memcpy>
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
/* The directory was not empty so try to move to the desired entry in chain*/
for (
ffc11620: 7f 9b f8 00 cmpw cr7,r27,r31
memcpy(
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
ffc11624: 81 39 00 10 lwz r9,16(r25)
bytes_transferred = bytes_transferred + sizeof( struct dirent );
ffc11628: 3b 5a 01 18 addi r26,r26,280
memcpy(
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
ffc1162c: 81 59 00 14 lwz r10,20(r25)
bytes_transferred = bytes_transferred + sizeof( struct dirent );
}
the_node = the_node->next;
ffc11630: 83 de 00 00 lwz r30,0(r30)
memcpy(
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
ffc11634: 31 4a 01 18 addic r10,r10,280
ffc11638: 7d 29 01 94 addze r9,r9
ffc1163c: 91 39 00 10 stw r9,16(r25)
for (
current_entry = 0;
current_entry < last_entry;
current_entry = current_entry + sizeof(struct dirent) ){
if ( rtems_chain_is_tail( the_chain, the_node ) ){
ffc11640: 7f 1e e0 00 cmpw cr6,r30,r28
memcpy(
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
ffc11644: 91 59 00 14 stw r10,20(r25)
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
/* The directory was not empty so try to move to the desired entry in chain*/
for (
ffc11648: 41 9d ff 84 bgt+ cr7,ffc115cc <imfs_dir_read+0xac> <== NEVER TAKEN
current_entry = 0;
current_entry < last_entry;
current_entry = current_entry + sizeof(struct dirent) ){
if ( rtems_chain_is_tail( the_chain, the_node ) ){
ffc1164c: 7f 43 d3 78 mr r3,r26
the_node = the_node->next;
}
/* Success */
return bytes_transferred;
}
ffc11650: 80 01 01 5c lwz r0,348(r1)
ffc11654: 82 81 01 28 lwz r20,296(r1)
ffc11658: 7c 08 03 a6 mtlr r0
ffc1165c: 82 a1 01 2c lwz r21,300(r1)
ffc11660: 82 c1 01 30 lwz r22,304(r1)
ffc11664: 82 e1 01 34 lwz r23,308(r1)
ffc11668: 83 01 01 38 lwz r24,312(r1)
ffc1166c: 83 21 01 3c lwz r25,316(r1)
ffc11670: 83 41 01 40 lwz r26,320(r1)
ffc11674: 83 61 01 44 lwz r27,324(r1)
ffc11678: 83 81 01 48 lwz r28,328(r1)
ffc1167c: 83 a1 01 4c lwz r29,332(r1)
ffc11680: 83 c1 01 50 lwz r30,336(r1)
ffc11684: 83 e1 01 54 lwz r31,340(r1)
ffc11688: 38 21 01 58 addi r1,r1,344
ffc1168c: 4e 80 00 20 blr
ffc11804 <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
ffc11804: 94 21 ff f0 stwu r1,-16(r1)
ffc11808: 7c 08 02 a6 mflr r0
ffc1180c: 93 e1 00 0c stw r31,12(r1)
ffc11810: 90 01 00 14 stw r0,20(r1)
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
ffc11814: 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 ) )
ffc11818: 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 );
ffc1181c: 38 1f 00 54 addi r0,r31,84
ffc11820: 7f 89 00 00 cmpw cr7,r9,r0
ffc11824: 40 9e 00 6c bne- cr7,ffc11890 <imfs_dir_rmnod+0x8c>
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
ffc11828: 81 24 00 10 lwz r9,16(r4)
ffc1182c: 80 09 00 1c lwz r0,28(r9)
ffc11830: 7f 9f 00 00 cmpw cr7,r31,r0
ffc11834: 41 9e 00 38 beq- cr7,ffc1186c <imfs_dir_rmnod+0x68>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
ffc11838: 80 1f 00 5c lwz r0,92(r31)
ffc1183c: 2f 80 00 00 cmpwi cr7,r0,0
ffc11840: 40 9e 00 2c bne- cr7,ffc1186c <imfs_dir_rmnod+0x68> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBUSY );
IMFS_create_orphan( the_jnode );
ffc11844: 7f e3 fb 78 mr r3,r31
ffc11848: 4b ff cd 6d bl ffc0e5b4 <IMFS_create_orphan>
IMFS_check_node_remove( the_jnode );
ffc1184c: 7f e3 fb 78 mr r3,r31
ffc11850: 4b ff cd c5 bl ffc0e614 <IMFS_check_node_remove>
return 0;
ffc11854: 38 60 00 00 li r3,0
}
ffc11858: 80 01 00 14 lwz r0,20(r1)
ffc1185c: 83 e1 00 0c lwz r31,12(r1)
ffc11860: 38 21 00 10 addi r1,r1,16
ffc11864: 7c 08 03 a6 mtlr r0
ffc11868: 4e 80 00 20 blr
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
ffc1186c: 48 00 08 09 bl ffc12074 <__errno>
ffc11870: 38 00 00 10 li r0,16
ffc11874: 90 03 00 00 stw r0,0(r3)
ffc11878: 38 60 ff ff li r3,-1
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
ffc1187c: 80 01 00 14 lwz r0,20(r1)
ffc11880: 83 e1 00 0c lwz r31,12(r1)
ffc11884: 38 21 00 10 addi r1,r1,16
ffc11888: 7c 08 03 a6 mtlr r0
ffc1188c: 4e 80 00 20 blr
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
ffc11890: 48 00 07 e5 bl ffc12074 <__errno>
ffc11894: 38 00 00 5a li r0,90
ffc11898: 90 03 00 00 stw r0,0(r3)
ffc1189c: 38 60 ff ff li r3,-1
ffc118a0: 4b ff ff b8 b ffc11858 <imfs_dir_rmnod+0x54>
ffc059e4 <init_etc_passwd_group>:
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
ffc059e4: 94 21 ff f0 stwu r1,-16(r1)
ffc059e8: 7c 08 02 a6 mflr r0
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
ffc059ec: 3d 20 00 00 lis r9,0
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
ffc059f0: 90 01 00 14 stw r0,20(r1)
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
ffc059f4: 88 09 28 58 lbz r0,10328(r9)
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
ffc059f8: 93 c1 00 08 stw r30,8(r1)
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
ffc059fc: 2f 80 00 00 cmpwi cr7,r0,0
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
ffc05a00: 93 e1 00 0c stw r31,12(r1)
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
ffc05a04: 41 9e 00 1c beq- cr7,ffc05a20 <init_etc_passwd_group+0x3c>
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
}
}
ffc05a08: 80 01 00 14 lwz r0,20(r1)
ffc05a0c: 83 c1 00 08 lwz r30,8(r1)
ffc05a10: 7c 08 03 a6 mtlr r0
ffc05a14: 83 e1 00 0c lwz r31,12(r1)
ffc05a18: 38 21 00 10 addi r1,r1,16
ffc05a1c: 4e 80 00 20 blr
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
ffc05a20: 3c 60 ff c2 lis r3,-62
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
ffc05a24: 3f c0 ff c2 lis r30,-62
ffc05a28: 3f e0 ff c2 lis r31,-62
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
ffc05a2c: 38 00 00 01 li r0,1
mkdir("/etc", 0777);
ffc05a30: 38 80 01 ff li r4,511
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
ffc05a34: 98 09 28 58 stb r0,10328(r9)
mkdir("/etc", 0777);
ffc05a38: 38 63 b0 44 addi r3,r3,-20412
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
ffc05a3c: 3b de b0 4c addi r30,r30,-20404
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
ffc05a40: 48 00 0b 99 bl ffc065d8 <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
ffc05a44: 3b ff b0 58 addi r31,r31,-20392
ffc05a48: 7f c3 f3 78 mr r3,r30
ffc05a4c: 7f e4 fb 78 mr r4,r31
ffc05a50: 48 00 e7 b1 bl ffc14200 <fopen>
ffc05a54: 2f 83 00 00 cmpwi cr7,r3,0
ffc05a58: 41 9e 00 7c beq- cr7,ffc05ad4 <init_etc_passwd_group+0xf0>
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
ffc05a5c: 48 00 dd e5 bl ffc13840 <fclose>
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
ffc05a60: 3f c0 ff c2 lis r30,-62
ffc05a64: 3b de b0 c8 addi r30,r30,-20280
ffc05a68: 7f c3 f3 78 mr r3,r30
ffc05a6c: 7f e4 fb 78 mr r4,r31
ffc05a70: 48 00 e7 91 bl ffc14200 <fopen>
ffc05a74: 2f 83 00 00 cmpwi cr7,r3,0
ffc05a78: 41 9e 00 20 beq- cr7,ffc05a98 <init_etc_passwd_group+0xb4>
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
ffc05a7c: 48 00 dd c5 bl ffc13840 <fclose>
}
}
ffc05a80: 80 01 00 14 lwz r0,20(r1)
ffc05a84: 83 c1 00 08 lwz r30,8(r1)
ffc05a88: 7c 08 03 a6 mtlr r0
ffc05a8c: 83 e1 00 0c lwz r31,12(r1)
ffc05a90: 38 21 00 10 addi r1,r1,16
ffc05a94: 4e 80 00 20 blr
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
ffc05a98: 3c 80 ff c2 lis r4,-62
ffc05a9c: 7f c3 f3 78 mr r3,r30
ffc05aa0: 38 84 b0 5c addi r4,r4,-20388
ffc05aa4: 48 00 e7 5d bl ffc14200 <fopen>
ffc05aa8: 7c 7f 1b 79 mr. r31,r3
ffc05aac: 41 a2 ff 5c beq- ffc05a08 <init_etc_passwd_group+0x24> <== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
ffc05ab0: 3c 60 ff c2 lis r3,-62
ffc05ab4: 38 80 00 01 li r4,1
ffc05ab8: 38 a0 00 2a li r5,42
ffc05abc: 7f e6 fb 78 mr r6,r31
ffc05ac0: 38 63 b0 d4 addi r3,r3,-20268
ffc05ac4: 48 00 f0 21 bl ffc14ae4 <fwrite>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
ffc05ac8: 7f e3 fb 78 mr r3,r31
ffc05acc: 48 00 dd 75 bl ffc13840 <fclose>
ffc05ad0: 4b ff ff b0 b ffc05a80 <init_etc_passwd_group+0x9c>
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
ffc05ad4: 3c 80 ff c2 lis r4,-62
ffc05ad8: 7f c3 f3 78 mr r3,r30
ffc05adc: 38 84 b0 5c addi r4,r4,-20388
ffc05ae0: 48 00 e7 21 bl ffc14200 <fopen>
ffc05ae4: 7c 7e 1b 79 mr. r30,r3
ffc05ae8: 41 a2 ff 78 beq- ffc05a60 <init_etc_passwd_group+0x7c> <== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
ffc05aec: 3c 60 ff c2 lis r3,-62
ffc05af0: 38 63 b0 60 addi r3,r3,-20384
ffc05af4: 38 80 00 01 li r4,1
ffc05af8: 38 a0 00 66 li r5,102
ffc05afc: 7f c6 f3 78 mr r6,r30
ffc05b00: 48 00 ef e5 bl ffc14ae4 <fwrite>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
ffc05b04: 7f c3 f3 78 mr r3,r30
ffc05b08: 4b ff ff 54 b ffc05a5c <init_etc_passwd_group+0x78>
ffc07034 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc07034: 94 21 ff f0 stwu r1,-16(r1)
ffc07038: 7c 08 02 a6 mflr r0
ffc0703c: 90 01 00 14 stw r0,20(r1)
if (tty->termios.c_iflag & ISTRIP)
ffc07040: 80 04 00 30 lwz r0,48(r4)
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc07044: 93 c1 00 08 stw r30,8(r1)
ffc07048: 7c 9e 23 78 mr r30,r4
if (tty->termios.c_iflag & ISTRIP)
ffc0704c: 70 09 00 20 andi. r9,r0,32
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc07050: 93 e1 00 0c stw r31,12(r1)
ffc07054: 7c 7f 1b 78 mr r31,r3
if (tty->termios.c_iflag & ISTRIP)
ffc07058: 41 82 00 08 beq- ffc07060 <iproc+0x2c> <== ALWAYS TAKEN
c &= 0x7f;
ffc0705c: 54 7f 06 7e clrlwi r31,r3,25 <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
ffc07060: 70 0b 02 00 andi. r11,r0,512
ffc07064: 41 82 00 28 beq- ffc0708c <iproc+0x58>
c = tolower (c);
ffc07068: 3d 20 00 00 lis r9,0
ffc0706c: 81 69 27 24 lwz r11,10020(r9)
ffc07070: 7f e9 fb 78 mr r9,r31
ffc07074: 7f eb fa 14 add r31,r11,r31
ffc07078: 89 7f 00 01 lbz r11,1(r31)
ffc0707c: 55 6b 07 be clrlwi r11,r11,30
ffc07080: 2f 8b 00 01 cmpwi cr7,r11,1
ffc07084: 41 9e 01 14 beq- cr7,ffc07198 <iproc+0x164>
ffc07088: 55 3f 06 3e clrlwi r31,r9,24
if (c == '\r') {
ffc0708c: 2f 9f 00 0d cmpwi cr7,r31,13
ffc07090: 41 9e 00 68 beq- cr7,ffc070f8 <iproc+0xc4>
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
ffc07094: 2f 9f 00 0a cmpwi cr7,r31,10
ffc07098: 41 9e 00 f0 beq- cr7,ffc07188 <iproc+0x154>
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
ffc0709c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc070a0: 40 9e 00 70 bne- cr7,ffc07110 <iproc+0xdc> <== ALWAYS TAKEN
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
ffc070a4: 3d 20 00 00 lis r9,0
ffc070a8: 81 69 21 ac lwz r11,8620(r9)
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
ffc070ac: 38 60 00 00 li r3,0
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
ffc070b0: 81 3e 00 20 lwz r9,32(r30)
ffc070b4: 38 0b ff ff addi r0,r11,-1
ffc070b8: 7f 89 00 00 cmpw cr7,r9,r0
ffc070bc: 40 9c 00 24 bge- cr7,ffc070e0 <iproc+0xac> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHO)
ffc070c0: 80 1e 00 3c lwz r0,60(r30)
ffc070c4: 70 0b 00 08 andi. r11,r0,8
ffc070c8: 40 82 00 d8 bne- ffc071a0 <iproc+0x16c> <== ALWAYS TAKEN
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
ffc070cc: 81 7e 00 1c lwz r11,28(r30)
ffc070d0: 38 09 00 01 addi r0,r9,1
}
return 0;
ffc070d4: 38 60 00 00 li r3,0
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
ffc070d8: 7f eb 49 ae stbx r31,r11,r9
ffc070dc: 90 1e 00 20 stw r0,32(r30)
}
return 0;
}
ffc070e0: 80 01 00 14 lwz r0,20(r1)
ffc070e4: 83 c1 00 08 lwz r30,8(r1)
ffc070e8: 7c 08 03 a6 mtlr r0
ffc070ec: 83 e1 00 0c lwz r31,12(r1)
ffc070f0: 38 21 00 10 addi r1,r1,16
ffc070f4: 4e 80 00 20 blr
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
ffc070f8: 70 09 00 80 andi. r9,r0,128
return 0;
ffc070fc: 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)
ffc07100: 40 a2 ff e0 bne- ffc070e0 <iproc+0xac> <== NEVER TAKEN
return 0;
if (tty->termios.c_iflag & ICRNL)
ffc07104: 70 0b 01 00 andi. r11,r0,256
ffc07108: 41 82 00 08 beq- ffc07110 <iproc+0xdc> <== NEVER TAKEN
c = '\n';
ffc0710c: 3b e0 00 0a li r31,10
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
ffc07110: 80 1e 00 3c lwz r0,60(r30)
ffc07114: 70 0b 00 02 andi. r11,r0,2
ffc07118: 41 a2 ff 8c beq- ffc070a4 <iproc+0x70>
if (c == tty->termios.c_cc[VERASE]) {
ffc0711c: 89 3e 00 43 lbz r9,67(r30)
ffc07120: 7f 89 f8 00 cmpw cr7,r9,r31
ffc07124: 41 9e 00 e8 beq- cr7,ffc0720c <iproc+0x1d8>
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
ffc07128: 89 3e 00 44 lbz r9,68(r30)
ffc0712c: 7f 89 f8 00 cmpw cr7,r9,r31
ffc07130: 41 9e 00 94 beq- cr7,ffc071c4 <iproc+0x190>
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
ffc07134: 89 3e 00 45 lbz r9,69(r30)
return 1;
ffc07138: 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]) {
ffc0713c: 7f 89 f8 00 cmpw cr7,r9,r31
ffc07140: 41 be ff a0 beq- cr7,ffc070e0 <iproc+0xac> <== NEVER TAKEN
return 1;
} else if (c == '\n') {
ffc07144: 2f 9f 00 0a cmpwi cr7,r31,10
ffc07148: 41 9e 00 90 beq- cr7,ffc071d8 <iproc+0x1a4>
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
ffc0714c: 89 3e 00 4c lbz r9,76(r30)
ffc07150: 7f 89 f8 00 cmpw cr7,r9,r31
ffc07154: 41 9e 00 10 beq- cr7,ffc07164 <iproc+0x130> <== NEVER TAKEN
ffc07158: 89 3e 00 51 lbz r9,81(r30)
ffc0715c: 7f 89 f8 00 cmpw cr7,r9,r31
ffc07160: 40 9e ff 44 bne+ cr7,ffc070a4 <iproc+0x70> <== ALWAYS TAKEN
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
ffc07164: 70 0b 00 08 andi. r11,r0,8 <== NOT EXECUTED
ffc07168: 40 82 00 4c bne- ffc071b4 <iproc+0x180> <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
ffc0716c: 81 3e 00 20 lwz r9,32(r30) <== NOT EXECUTED
return 1;
ffc07170: 38 60 00 01 li r3,1 <== NOT EXECUTED
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
ffc07174: 81 7e 00 1c lwz r11,28(r30) <== NOT EXECUTED
ffc07178: 38 09 00 01 addi r0,r9,1 <== NOT EXECUTED
ffc0717c: 7f eb 49 ae stbx r31,r11,r9 <== NOT EXECUTED
ffc07180: 90 1e 00 20 stw r0,32(r30) <== NOT EXECUTED
return 1;
ffc07184: 4b ff ff 5c b ffc070e0 <iproc+0xac> <== NOT EXECUTED
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
ffc07188: 70 09 00 40 andi. r9,r0,64
ffc0718c: 41 a2 ff 84 beq- ffc07110 <iproc+0xdc> <== ALWAYS TAKEN
c = '\r';
ffc07190: 3b e0 00 0d li r31,13 <== NOT EXECUTED
ffc07194: 4b ff ff 7c b ffc07110 <iproc+0xdc> <== NOT EXECUTED
{
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
ffc07198: 39 29 00 20 addi r9,r9,32
ffc0719c: 4b ff fe ec b ffc07088 <iproc+0x54>
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
ffc071a0: 7f e3 fb 78 mr r3,r31
ffc071a4: 7f c4 f3 78 mr r4,r30
ffc071a8: 4b ff fb 49 bl ffc06cf0 <echo>
ffc071ac: 81 3e 00 20 lwz r9,32(r30)
ffc071b0: 4b ff ff 1c b ffc070cc <iproc+0x98>
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
ffc071b4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc071b8: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc071bc: 4b ff fb 35 bl ffc06cf0 <echo> <== NOT EXECUTED
ffc071c0: 4b ff ff ac b ffc0716c <iproc+0x138> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
ffc071c4: 7f c3 f3 78 mr r3,r30
ffc071c8: 38 80 00 01 li r4,1
ffc071cc: 4b ff fb c9 bl ffc06d94 <erase>
return 0;
ffc071d0: 38 60 00 00 li r3,0
ffc071d4: 4b ff ff 0c b ffc070e0 <iproc+0xac>
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
ffc071d8: 70 09 00 48 andi. r9,r0,72
ffc071dc: 41 a2 00 10 beq+ ffc071ec <iproc+0x1b8> <== NEVER TAKEN
echo (c, tty);
ffc071e0: 38 60 00 0a li r3,10
ffc071e4: 7f c4 f3 78 mr r4,r30
ffc071e8: 4b ff fb 09 bl ffc06cf0 <echo>
tty->cbuf[tty->ccount++] = c;
ffc071ec: 81 3e 00 20 lwz r9,32(r30)
ffc071f0: 39 40 00 0a li r10,10
ffc071f4: 81 7e 00 1c lwz r11,28(r30)
return 1;
ffc071f8: 38 60 00 01 li r3,1
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
ffc071fc: 38 09 00 01 addi r0,r9,1
ffc07200: 7d 4b 49 ae stbx r10,r11,r9
ffc07204: 90 1e 00 20 stw r0,32(r30)
return 1;
ffc07208: 4b ff fe d8 b ffc070e0 <iproc+0xac>
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
ffc0720c: 7f c3 f3 78 mr r3,r30
ffc07210: 38 80 00 00 li r4,0
ffc07214: 4b ff fb 81 bl ffc06d94 <erase>
return 0;
ffc07218: 38 60 00 00 li r3,0
ffc0721c: 4b ff fe c4 b ffc070e0 <iproc+0xac>
ffc28810 <kill>:
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
return 0;
}
ffc28810: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc28814: 4e 80 00 20 blr <== NOT EXECUTED
ffc1764c <libc_wrapup>:
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
ffc1764c: 94 21 ff f0 stwu r1,-16(r1)
ffc17650: 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()))
ffc17654: 3d 20 00 00 lis r9,0
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
ffc17658: 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()))
ffc1765c: 80 09 27 e8 lwz r0,10216(r9)
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
ffc17660: 93 c1 00 08 stw 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()))
ffc17664: 2f 80 00 03 cmpwi cr7,r0,3
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
ffc17668: 93 e1 00 0c stw r31,12(r1)
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
ffc1766c: 41 9e 00 1c beq- cr7,ffc17688 <libc_wrapup+0x3c> <== ALWAYS TAKEN
*/
fclose (stdin);
fclose (stdout);
fclose (stderr);
}
ffc17670: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED
ffc17674: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED
ffc17678: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc1767c: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED
ffc17680: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED
ffc17684: 4e 80 00 20 blr <== NOT EXECUTED
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
ffc17688: 3f e0 00 00 lis r31,0
ffc1768c: 3d 60 00 00 lis r11,0
ffc17690: 81 3f 27 28 lwz r9,10024(r31)
ffc17694: 83 cb 27 2c lwz r30,10028(r11)
ffc17698: 7f 89 f0 00 cmpw cr7,r9,r30
ffc1769c: 41 9e 00 14 beq- cr7,ffc176b0 <libc_wrapup+0x64>
_wrapup_reent(_global_impure_ptr);
ffc176a0: 7f c3 f3 78 mr r3,r30
ffc176a4: 48 00 08 49 bl ffc17eec <_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;
ffc176a8: 93 df 27 28 stw r30,10024(r31)
ffc176ac: 7f c9 f3 78 mr r9,r30
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
ffc176b0: 80 69 00 04 lwz r3,4(r9)
ffc176b4: 4b ff ab 61 bl ffc12214 <fclose>
fclose (stdout);
ffc176b8: 81 3f 27 28 lwz r9,10024(r31)
ffc176bc: 80 69 00 08 lwz r3,8(r9)
ffc176c0: 4b ff ab 55 bl ffc12214 <fclose>
fclose (stderr);
ffc176c4: 81 3f 27 28 lwz r9,10024(r31)
ffc176c8: 80 69 00 0c lwz r3,12(r9)
ffc176cc: 4b ff ab 49 bl ffc12214 <fclose>
}
ffc176d0: 80 01 00 14 lwz r0,20(r1)
ffc176d4: 83 c1 00 08 lwz r30,8(r1)
ffc176d8: 7c 08 03 a6 mtlr r0
ffc176dc: 83 e1 00 0c lwz r31,12(r1)
ffc176e0: 38 21 00 10 addi r1,r1,16
ffc176e4: 4e 80 00 20 blr
ffc17498 <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
ffc17498: 94 21 ff e8 stwu r1,-24(r1)
ffc1749c: 7c 08 02 a6 mflr r0
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
ffc174a0: 3d 20 00 00 lis r9,0
off_t lseek(
int fd,
off_t offset,
int whence
)
{
ffc174a4: 90 01 00 1c stw r0,28(r1)
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
ffc174a8: 80 09 26 cc lwz r0,9932(r9)
off_t lseek(
int fd,
off_t offset,
int whence
)
{
ffc174ac: 93 a1 00 0c stw r29,12(r1)
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
ffc174b0: 7f 83 00 40 cmplw cr7,r3,r0
off_t lseek(
int fd,
off_t offset,
int whence
)
{
ffc174b4: 93 c1 00 10 stw r30,16(r1)
ffc174b8: 93 e1 00 14 stw r31,20(r1)
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
ffc174bc: 40 9c 01 4c bge- cr7,ffc17608 <lseek+0x170>
iop = rtems_libio_iop( fd );
ffc174c0: 3d 20 00 00 lis r9,0
ffc174c4: 83 a9 27 88 lwz r29,10120(r9)
ffc174c8: 54 63 30 32 rlwinm r3,r3,6,0,25
ffc174cc: 7f bd 1a 14 add r29,r29,r3
rtems_libio_check_is_open(iop);
ffc174d0: 80 1d 00 18 lwz r0,24(r29)
ffc174d4: 70 09 01 00 andi. r9,r0,256
ffc174d8: 41 82 01 30 beq- ffc17608 <lseek+0x170>
/*
* Now process the lseek().
*/
old_offset = iop->offset;
switch ( whence ) {
ffc174dc: 2f 87 00 01 cmpwi cr7,r7,1
/*
* Now process the lseek().
*/
old_offset = iop->offset;
ffc174e0: 83 dd 00 10 lwz r30,16(r29)
ffc174e4: 83 fd 00 14 lwz r31,20(r29)
switch ( whence ) {
ffc174e8: 41 9e 00 d4 beq- cr7,ffc175bc <lseek+0x124>
ffc174ec: 2f 87 00 02 cmpwi cr7,r7,2
ffc174f0: 41 9e 00 5c beq- cr7,ffc1754c <lseek+0xb4>
ffc174f4: 2f 87 00 00 cmpwi cr7,r7,0
ffc174f8: 40 9e 00 d8 bne- cr7,ffc175d0 <lseek+0x138>
case SEEK_SET:
iop->offset = offset;
ffc174fc: 90 bd 00 10 stw r5,16(r29)
ffc17500: 90 dd 00 14 stw r6,20(r29)
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
ffc17504: 81 3d 00 24 lwz r9,36(r29)
ffc17508: 7f a3 eb 78 mr r3,r29
ffc1750c: 80 09 00 14 lwz r0,20(r9)
ffc17510: 7c 09 03 a6 mtctr r0
ffc17514: 4e 80 04 21 bctrl
ffc17518: 7c 69 1b 78 mr r9,r3
if ( status == (off_t) -1 )
ffc1751c: 2f 89 ff ff cmpwi cr7,r9,-1
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
ffc17520: 7c 8a 23 78 mr r10,r4
if ( status == (off_t) -1 )
ffc17524: 41 9e 00 64 beq- cr7,ffc17588 <lseek+0xf0>
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
ffc17528: 80 01 00 1c lwz r0,28(r1)
ffc1752c: 7d 23 4b 78 mr r3,r9
ffc17530: 7d 44 53 78 mr r4,r10
ffc17534: 83 a1 00 0c lwz r29,12(r1)
ffc17538: 7c 08 03 a6 mtlr r0
ffc1753c: 83 c1 00 10 lwz r30,16(r1)
ffc17540: 83 e1 00 14 lwz r31,20(r1)
ffc17544: 38 21 00 18 addi r1,r1,24
ffc17548: 4e 80 00 20 blr
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
ffc1754c: 81 3d 00 08 lwz r9,8(r29)
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
ffc17550: 7f a3 eb 78 mr r3,r29
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
ffc17554: 81 5d 00 0c lwz r10,12(r29)
ffc17558: 7d 4a 30 14 addc r10,r10,r6
ffc1755c: 7d 29 29 14 adde r9,r9,r5
ffc17560: 91 3d 00 10 stw r9,16(r29)
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
ffc17564: 81 3d 00 24 lwz r9,36(r29)
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
ffc17568: 91 5d 00 14 stw r10,20(r29)
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
ffc1756c: 80 09 00 14 lwz r0,20(r9)
ffc17570: 7c 09 03 a6 mtctr r0
ffc17574: 4e 80 04 21 bctrl
ffc17578: 7c 69 1b 78 mr r9,r3
if ( status == (off_t) -1 )
ffc1757c: 2f 89 ff ff cmpwi cr7,r9,-1
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
ffc17580: 7c 8a 23 78 mr r10,r4
if ( status == (off_t) -1 )
ffc17584: 40 9e ff a4 bne+ cr7,ffc17528 <lseek+0x90>
ffc17588: 2f 84 ff ff cmpwi cr7,r4,-1
ffc1758c: 40 9e ff 9c bne+ cr7,ffc17528 <lseek+0x90> <== NEVER TAKEN
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
ffc17590: 80 01 00 1c lwz r0,28(r1)
ffc17594: 7d 23 4b 78 mr r3,r9
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
if ( status == (off_t) -1 )
iop->offset = old_offset;
ffc17598: 93 dd 00 10 stw r30,16(r29)
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
ffc1759c: 7d 44 53 78 mr r4,r10
ffc175a0: 7c 08 03 a6 mtlr r0
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
if ( status == (off_t) -1 )
iop->offset = old_offset;
ffc175a4: 93 fd 00 14 stw r31,20(r29)
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
ffc175a8: 83 c1 00 10 lwz r30,16(r1)
ffc175ac: 83 a1 00 0c lwz r29,12(r1)
ffc175b0: 83 e1 00 14 lwz r31,20(r1)
ffc175b4: 38 21 00 18 addi r1,r1,24
ffc175b8: 4e 80 00 20 blr
case SEEK_SET:
iop->offset = offset;
break;
case SEEK_CUR:
iop->offset += offset;
ffc175bc: 7d 46 f8 14 addc r10,r6,r31
ffc175c0: 7d 25 f1 14 adde r9,r5,r30
ffc175c4: 91 3d 00 10 stw r9,16(r29)
ffc175c8: 91 5d 00 14 stw r10,20(r29)
break;
ffc175cc: 4b ff ff 38 b ffc17504 <lseek+0x6c>
case SEEK_END:
iop->offset = iop->size + offset;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
ffc175d0: 4b ff aa a5 bl ffc12074 <__errno>
ffc175d4: 38 00 00 16 li r0,22
ffc175d8: 90 03 00 00 stw r0,0(r3)
ffc175dc: 39 20 ff ff li r9,-1
ffc175e0: 39 40 ff ff li r10,-1
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
ffc175e4: 80 01 00 1c lwz r0,28(r1)
ffc175e8: 7d 23 4b 78 mr r3,r9
ffc175ec: 7d 44 53 78 mr r4,r10
ffc175f0: 83 a1 00 0c lwz r29,12(r1)
ffc175f4: 7c 08 03 a6 mtlr r0
ffc175f8: 83 c1 00 10 lwz r30,16(r1)
ffc175fc: 83 e1 00 14 lwz r31,20(r1)
ffc17600: 38 21 00 18 addi r1,r1,24
ffc17604: 4e 80 00 20 blr
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
ffc17608: 4b ff aa 6d bl ffc12074 <__errno>
ffc1760c: 38 00 00 09 li r0,9
ffc17610: 90 03 00 00 stw r0,0(r3)
ffc17614: 39 20 ff ff li r9,-1
ffc17618: 39 40 ff ff li r10,-1
ffc1761c: 4b ff ff 0c b ffc17528 <lseek+0x90>
ffc04f14 <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
ffc04f14: 94 21 ff f0 stwu r1,-16(r1)
ffc04f18: 7c 08 02 a6 mflr r0
void *return_this;
MSBUMP(malloc_calls, 1);
ffc04f1c: 3d 20 00 00 lis r9,0
#include "malloc_p.h"
void *malloc(
size_t size
)
{
ffc04f20: 90 01 00 14 stw r0,20(r1)
void *return_this;
MSBUMP(malloc_calls, 1);
ffc04f24: 39 29 2a c8 addi r9,r9,10952
ffc04f28: 81 69 00 04 lwz r11,4(r9)
#include "malloc_p.h"
void *malloc(
size_t size
)
{
ffc04f2c: 93 c1 00 08 stw r30,8(r1)
/*
* Validate the parameters
*/
if ( !size )
return (void *) 0;
ffc04f30: 3b c0 00 00 li r30,0
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
ffc04f34: 39 6b 00 01 addi r11,r11,1
#include "malloc_p.h"
void *malloc(
size_t size
)
{
ffc04f38: 93 e1 00 0c stw r31,12(r1)
ffc04f3c: 7c 7f 1b 78 mr r31,r3
void *return_this;
MSBUMP(malloc_calls, 1);
ffc04f40: 91 69 00 04 stw r11,4(r9)
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
ffc04f44: 4b ff fe 49 bl ffc04d8c <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
ffc04f48: 2f 9f 00 00 cmpwi cr7,r31,0
ffc04f4c: 41 9e 00 74 beq- cr7,ffc04fc0 <malloc+0xac>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
ffc04f50: 3d 20 00 00 lis r9,0
ffc04f54: 80 09 27 e8 lwz r0,10216(r9)
ffc04f58: 2f 80 00 03 cmpwi cr7,r0,3
ffc04f5c: 41 9e 00 b0 beq- cr7,ffc0500c <malloc+0xf8>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
ffc04f60: 3d 20 00 00 lis r9,0
ffc04f64: 80 69 26 dc lwz r3,9948(r9)
ffc04f68: 7f e4 fb 78 mr r4,r31
ffc04f6c: 38 a0 00 00 li r5,0
ffc04f70: 38 c0 00 00 li r6,0
ffc04f74: 48 00 60 d9 bl ffc0b04c <_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 ) {
ffc04f78: 7c 7e 1b 79 mr. r30,r3
ffc04f7c: 41 82 00 60 beq- ffc04fdc <malloc+0xc8>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
ffc04f80: 3d 20 00 00 lis r9,0
ffc04f84: 80 09 27 50 lwz r0,10064(r9)
ffc04f88: 2f 80 00 00 cmpwi cr7,r0,0
ffc04f8c: 41 9e 00 14 beq- cr7,ffc04fa0 <malloc+0x8c>
(*rtems_malloc_dirty_helper)( return_this, size );
ffc04f90: 7f c3 f3 78 mr r3,r30
ffc04f94: 7c 09 03 a6 mtctr r0
ffc04f98: 7f e4 fb 78 mr r4,r31
ffc04f9c: 4e 80 04 21 bctrl
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
ffc04fa0: 3d 20 00 00 lis r9,0
ffc04fa4: 81 29 27 48 lwz r9,10056(r9)
ffc04fa8: 2f 89 00 00 cmpwi cr7,r9,0
ffc04fac: 41 9e 00 14 beq- cr7,ffc04fc0 <malloc+0xac>
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
ffc04fb0: 80 09 00 04 lwz r0,4(r9)
ffc04fb4: 7f c3 f3 78 mr r3,r30
ffc04fb8: 7c 09 03 a6 mtctr r0
ffc04fbc: 4e 80 04 21 bctrl
return return_this;
}
ffc04fc0: 80 01 00 14 lwz r0,20(r1)
ffc04fc4: 7f c3 f3 78 mr r3,r30
ffc04fc8: 83 e1 00 0c lwz r31,12(r1)
ffc04fcc: 7c 08 03 a6 mtlr r0
ffc04fd0: 83 c1 00 08 lwz r30,8(r1)
ffc04fd4: 38 21 00 10 addi r1,r1,16
ffc04fd8: 4e 80 00 20 blr
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
ffc04fdc: 3d 20 00 00 lis r9,0
ffc04fe0: 81 29 27 4c lwz r9,10060(r9)
ffc04fe4: 2f 89 00 00 cmpwi cr7,r9,0
ffc04fe8: 41 9e 00 34 beq- cr7,ffc0501c <malloc+0x108>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
ffc04fec: 80 09 00 04 lwz r0,4(r9)
ffc04ff0: 7f e3 fb 78 mr r3,r31
ffc04ff4: 7c 09 03 a6 mtctr r0
ffc04ff8: 4e 80 04 21 bctrl
if ( !return_this ) {
ffc04ffc: 2c 03 00 00 cmpwi r3,0
ffc05000: 41 82 00 1c beq- ffc0501c <malloc+0x108> <== ALWAYS TAKEN
ffc05004: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED
ffc05008: 4b ff ff 78 b ffc04f80 <malloc+0x6c> <== NOT EXECUTED
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
ffc0500c: 4b ff fd 39 bl ffc04d44 <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()) &&
ffc05010: 2f 83 00 00 cmpwi cr7,r3,0
ffc05014: 40 9e ff 4c bne+ cr7,ffc04f60 <malloc+0x4c> <== ALWAYS TAKEN
ffc05018: 4b ff ff a8 b ffc04fc0 <malloc+0xac> <== NOT EXECUTED
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
if ( !return_this ) {
errno = ENOMEM;
ffc0501c: 48 00 d0 59 bl ffc12074 <__errno>
ffc05020: 38 00 00 0c li r0,12
ffc05024: 90 03 00 00 stw r0,0(r3)
return (void *) 0;
ffc05028: 4b ff ff 98 b ffc04fc0 <malloc+0xac>
ffc05340 <malloc_sbrk_extend_and_allocate>:
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
ffc05340: 94 21 ff e8 stwu r1,-24(r1)
ffc05344: 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;
ffc05348: 3d 20 00 00 lis r9,0
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
ffc0534c: 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;
ffc05350: 80 09 27 9c lwz r0,10140(r9)
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
ffc05354: 93 c1 00 10 stw r30,16(r1)
ffc05358: 7c 7e 1b 78 mr r30,r3
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
ffc0535c: 2f 80 00 00 cmpwi cr7,r0,0
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
ffc05360: 93 e1 00 14 stw r31,20(r1)
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
return (void *) 0;
ffc05364: 3b e0 00 00 li r31,0
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
ffc05368: 93 81 00 08 stw r28,8(r1)
ffc0536c: 93 a1 00 0c stw r29,12(r1)
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
ffc05370: 40 9e 00 28 bne- cr7,ffc05398 <malloc_sbrk_extend_and_allocate+0x58><== ALWAYS TAKEN
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
ffc05374: 80 01 00 1c lwz r0,28(r1)
ffc05378: 7f e3 fb 78 mr r3,r31
ffc0537c: 83 81 00 08 lwz r28,8(r1)
ffc05380: 7c 08 03 a6 mtlr r0
ffc05384: 83 a1 00 0c lwz r29,12(r1)
ffc05388: 83 c1 00 10 lwz r30,16(r1)
ffc0538c: 83 e1 00 14 lwz r31,20(r1)
ffc05390: 38 21 00 18 addi r1,r1,24
ffc05394: 4e 80 00 20 blr
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
ffc05398: 7f a3 02 14 add r29,r3,r0
ffc0539c: 7f bd 03 96 divwu r29,r29,r0
ffc053a0: 7f bd 01 d6 mullw r29,r29,r0
starting_address = (void *) sbrk(the_size);
ffc053a4: 7f a3 eb 78 mr r3,r29
ffc053a8: 4b ff b1 15 bl ffc004bc <sbrk>
if ( starting_address == (void*) -1 )
ffc053ac: 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);
ffc053b0: 7c 64 1b 78 mr r4,r3
if ( starting_address == (void*) -1 )
ffc053b4: 41 be ff c0 beq- cr7,ffc05374 <malloc_sbrk_extend_and_allocate+0x34>
return (void *) 0;
if ( !_Protected_heap_Extend(
ffc053b8: 3f 80 00 00 lis r28,0
ffc053bc: 80 7c 26 dc lwz r3,9948(r28)
ffc053c0: 7f a5 eb 78 mr r5,r29
ffc053c4: 48 00 61 41 bl ffc0b504 <_Protected_heap_Extend>
ffc053c8: 2f 83 00 00 cmpwi cr7,r3,0
ffc053cc: 41 9e 00 30 beq- cr7,ffc053fc <malloc_sbrk_extend_and_allocate+0xbc>
sbrk(-the_size);
errno = ENOMEM;
return (void *) 0;
}
MSBUMP(space_available, the_size);
ffc053d0: 3d 20 00 00 lis r9,0
ffc053d4: 80 7c 26 dc lwz r3,9948(r28)
ffc053d8: 80 09 2c 28 lwz r0,11304(r9)
ffc053dc: 7f c4 f3 78 mr r4,r30
ffc053e0: 38 a0 00 00 li r5,0
ffc053e4: 7c 1d 02 14 add r0,r29,r0
ffc053e8: 38 c0 00 00 li r6,0
ffc053ec: 90 09 2c 28 stw r0,11304(r9)
ffc053f0: 48 00 60 a9 bl ffc0b498 <_Protected_heap_Allocate_aligned_with_boundary>
ffc053f4: 7c 7f 1b 78 mr r31,r3
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
ffc053f8: 4b ff ff 7c b ffc05374 <malloc_sbrk_extend_and_allocate+0x34>
if ( starting_address == (void*) -1 )
return (void *) 0;
if ( !_Protected_heap_Extend(
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
ffc053fc: 7c 7d 00 d0 neg r3,r29
ffc05400: 4b ff b0 bd bl ffc004bc <sbrk>
errno = ENOMEM;
ffc05404: 48 00 d4 fd bl ffc12900 <__errno>
ffc05408: 38 00 00 0c li r0,12
ffc0540c: 90 03 00 00 stw r0,0(r3)
return (void *) 0;
ffc05410: 4b ff ff 64 b ffc05374 <malloc_sbrk_extend_and_allocate+0x34>
ffc10860 <memfile_free_blocks_in_table>:
*/
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
ffc10860: 94 21 ff e0 stwu r1,-32(r1)
ffc10864: 7c 08 02 a6 mflr r0
ffc10868: 93 a1 00 14 stw r29,20(r1)
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
ffc1086c: 7c 9d 23 79 mr. r29,r4
*/
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
ffc10870: 90 01 00 24 stw r0,36(r1)
ffc10874: 93 61 00 0c stw r27,12(r1)
ffc10878: 7c 7b 1b 78 mr r27,r3
ffc1087c: 93 81 00 10 stw r28,16(r1)
ffc10880: 93 c1 00 18 stw r30,24(r1)
ffc10884: 93 e1 00 1c stw r31,28(r1)
IMFS_assert( block_table );
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
ffc10888: 80 63 00 00 lwz r3,0(r3)
for ( i=0 ; i<entries ; i++ ) {
ffc1088c: 40 81 00 34 ble- ffc108c0 <memfile_free_blocks_in_table+0x60><== NEVER TAKEN
* memfile_free_blocks_in_table
*
* This is a support routine for IMFS_memfile_remove. It frees all the
* blocks in one of the indirection tables.
*/
void memfile_free_blocks_in_table(
ffc10890: 3b c3 ff fc addi r30,r3,-4
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
ffc10894: 3b e0 00 00 li r31,0
if ( b[i] ) {
memfile_free_block( b[i] );
b[i] = 0;
ffc10898: 3b 80 00 00 li r28,0
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
if ( b[i] ) {
ffc1089c: 84 7e 00 04 lwzu r3,4(r30)
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
ffc108a0: 3b ff 00 01 addi r31,r31,1
if ( b[i] ) {
ffc108a4: 2f 83 00 00 cmpwi cr7,r3,0
ffc108a8: 41 9e 00 0c beq- cr7,ffc108b4 <memfile_free_blocks_in_table+0x54>
memfile_free_block( b[i] );
ffc108ac: 4b ff ff 85 bl ffc10830 <memfile_free_block>
b[i] = 0;
ffc108b0: 93 9e 00 00 stw r28,0(r30)
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
ffc108b4: 7f 9d f8 00 cmpw cr7,r29,r31
ffc108b8: 41 9d ff e4 bgt+ cr7,ffc1089c <memfile_free_blocks_in_table+0x3c>
ffc108bc: 80 7b 00 00 lwz r3,0(r27)
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
ffc108c0: 4b ff ff 71 bl ffc10830 <memfile_free_block>
*block_table = 0;
ffc108c4: 38 00 00 00 li r0,0
ffc108c8: 90 1b 00 00 stw r0,0(r27)
}
ffc108cc: 80 01 00 24 lwz r0,36(r1)
ffc108d0: 83 61 00 0c lwz r27,12(r1)
ffc108d4: 7c 08 03 a6 mtlr r0
ffc108d8: 83 81 00 10 lwz r28,16(r1)
ffc108dc: 83 a1 00 14 lwz r29,20(r1)
ffc108e0: 83 c1 00 18 lwz r30,24(r1)
ffc108e4: 83 e1 00 1c lwz r31,28(r1)
ffc108e8: 38 21 00 20 addi r1,r1,32
ffc108ec: 4e 80 00 20 blr
ffc11044 <memfile_ftruncate>:
*/
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
ffc11044: 94 21 ff e0 stwu r1,-32(r1)
ffc11048: 7c 08 02 a6 mflr r0
ffc1104c: 7c 69 1b 78 mr r9,r3
ffc11050: 90 01 00 24 stw r0,36(r1)
ffc11054: 93 e1 00 1c stw r31,28(r1)
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
ffc11058: 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 )
ffc1105c: 80 1f 00 50 lwz r0,80(r31)
ffc11060: 7f 80 28 00 cmpw cr7,r0,r5
ffc11064: 41 9c 00 50 blt- cr7,ffc110b4 <memfile_ftruncate+0x70> <== NEVER TAKEN
ffc11068: 41 9e 00 40 beq- cr7,ffc110a8 <memfile_ftruncate+0x64> <== ALWAYS TAKEN
/*
* The in-memory files do not currently reclaim memory until the file is
* deleted. So we leave the previously allocated blocks in place for
* future use and just set the length.
*/
the_jnode->info.file.size = length;
ffc1106c: 90 bf 00 50 stw r5,80(r31)
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
ffc11070: 38 61 00 08 addi r3,r1,8
ffc11074: 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;
ffc11078: 90 df 00 54 stw r6,84(r31)
iop->size = the_jnode->info.file.size;
ffc1107c: 90 a9 00 08 stw r5,8(r9)
ffc11080: 90 c9 00 0c stw r6,12(r9)
IMFS_update_atime( the_jnode );
ffc11084: 4b ff 3b 3d bl ffc04bc0 <gettimeofday>
ffc11088: 80 01 00 08 lwz r0,8(r1)
return 0;
ffc1108c: 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 );
ffc11090: 90 1f 00 40 stw r0,64(r31)
return 0;
}
ffc11094: 80 01 00 24 lwz r0,36(r1)
ffc11098: 83 e1 00 1c lwz r31,28(r1)
ffc1109c: 38 21 00 20 addi r1,r1,32
ffc110a0: 7c 08 03 a6 mtlr r0
ffc110a4: 4e 80 00 20 blr
* 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 )
ffc110a8: 80 1f 00 54 lwz r0,84(r31)
ffc110ac: 7f 80 30 40 cmplw cr7,r0,r6
ffc110b0: 40 9c ff bc bge+ cr7,ffc1106c <memfile_ftruncate+0x28>
return IMFS_memfile_extend( the_jnode, length );
ffc110b4: 7f e3 fb 78 mr r3,r31
ffc110b8: 4b ff fa 21 bl ffc10ad8 <IMFS_memfile_extend>
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
return 0;
}
ffc110bc: 80 01 00 24 lwz r0,36(r1)
ffc110c0: 83 e1 00 1c lwz r31,28(r1)
ffc110c4: 38 21 00 20 addi r1,r1,32
ffc110c8: 7c 08 03 a6 mtlr r0
ffc110cc: 4e 80 00 20 blr
ffc110d0 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
ffc110d0: 94 21 ff f0 stwu r1,-16(r1)
ffc110d4: 7c 08 02 a6 mflr r0
ffc110d8: 90 01 00 14 stw r0,20(r1)
ffc110dc: 93 c1 00 08 stw r30,8(r1)
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
ffc110e0: 83 c3 00 1c lwz r30,28(r3)
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
ffc110e4: 93 e1 00 0c stw r31,12(r1)
ffc110e8: 7c 7f 1b 78 mr r31,r3
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
ffc110ec: 80 1e 00 4c lwz r0,76(r30)
ffc110f0: 2f 80 00 06 cmpwi cr7,r0,6
ffc110f4: 41 9e 00 54 beq- cr7,ffc11148 <memfile_lseek+0x78>
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
ffc110f8: 80 a3 00 10 lwz r5,16(r3)
ffc110fc: 80 c3 00 14 lwz r6,20(r3)
ffc11100: 7f c3 f3 78 mr r3,r30
ffc11104: 4b ff f9 d5 bl ffc10ad8 <IMFS_memfile_extend>
ffc11108: 2f 83 00 00 cmpwi cr7,r3,0
ffc1110c: 40 9e 00 90 bne- cr7,ffc1119c <memfile_lseek+0xcc>
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
ffc11110: 81 7e 00 50 lwz r11,80(r30)
ffc11114: 81 9e 00 54 lwz r12,84(r30)
ffc11118: 81 3f 00 10 lwz r9,16(r31)
ffc1111c: 81 5f 00 14 lwz r10,20(r31)
ffc11120: 91 7f 00 08 stw r11,8(r31)
ffc11124: 91 9f 00 0c stw r12,12(r31)
}
return iop->offset;
}
ffc11128: 80 01 00 14 lwz r0,20(r1)
ffc1112c: 7d 23 4b 78 mr r3,r9
ffc11130: 7d 44 53 78 mr r4,r10
ffc11134: 83 c1 00 08 lwz r30,8(r1)
ffc11138: 7c 08 03 a6 mtlr r0
ffc1113c: 83 e1 00 0c lwz r31,12(r1)
ffc11140: 38 21 00 10 addi r1,r1,16
ffc11144: 4e 80 00 20 blr
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
ffc11148: 81 23 00 10 lwz r9,16(r3)
ffc1114c: 80 1e 00 50 lwz r0,80(r30)
ffc11150: 81 43 00 14 lwz r10,20(r3)
ffc11154: 7f 89 00 00 cmpw cr7,r9,r0
ffc11158: 81 7e 00 54 lwz r11,84(r30)
ffc1115c: 41 9d 00 10 bgt- cr7,ffc1116c <memfile_lseek+0x9c> <== NEVER TAKEN
ffc11160: 40 be ff c8 bne- cr7,ffc11128 <memfile_lseek+0x58> <== NEVER TAKEN
ffc11164: 7f 8a 58 40 cmplw cr7,r10,r11
ffc11168: 40 bd ff c0 ble- cr7,ffc11128 <memfile_lseek+0x58> <== ALWAYS TAKEN
iop->offset = the_jnode->info.linearfile.size;
ffc1116c: 7c 09 03 78 mr r9,r0 <== NOT EXECUTED
ffc11170: 90 1f 00 10 stw r0,16(r31) <== NOT EXECUTED
ffc11174: 7d 6a 5b 78 mr r10,r11 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
ffc11178: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED
ffc1117c: 7d 23 4b 78 mr r3,r9 <== NOT EXECUTED
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
ffc11180: 91 7f 00 14 stw r11,20(r31) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
ffc11184: 7d 44 53 78 mr r4,r10 <== NOT EXECUTED
ffc11188: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc1118c: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED
ffc11190: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED
ffc11194: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED
ffc11198: 4e 80 00 20 blr <== NOT EXECUTED
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
rtems_set_errno_and_return_minus_one( ENOSPC );
ffc1119c: 48 00 0e d9 bl ffc12074 <__errno>
ffc111a0: 38 00 00 1c li r0,28
ffc111a4: 90 03 00 00 stw r0,0(r3)
ffc111a8: 39 20 ff ff li r9,-1
ffc111ac: 39 40 ff ff li r10,-1
ffc111b0: 4b ff ff 78 b ffc11128 <memfile_lseek+0x58>
ffc10f64 <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
ffc10f64: 94 21 ff f0 stwu r1,-16(r1)
ffc10f68: 7c 08 02 a6 mflr r0
ffc10f6c: 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))
ffc10f70: 80 03 00 18 lwz r0,24(r3)
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
ffc10f74: 93 c1 00 08 stw r30,8(r1)
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
ffc10f78: 70 09 02 04 andi. r9,r0,516
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
ffc10f7c: 93 e1 00 0c stw r31,12(r1)
ffc10f80: 7c 7f 1b 78 mr r31,r3
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
ffc10f84: 83 c3 00 1c lwz r30,28(r3)
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
ffc10f88: 41 82 00 10 beq- ffc10f98 <memfile_open+0x34>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
ffc10f8c: 81 3e 00 4c lwz r9,76(r30)
ffc10f90: 2f 89 00 06 cmpwi cr7,r9,6
ffc10f94: 41 9e 00 4c beq- cr7,ffc10fe0 <memfile_open+0x7c> <== NEVER TAKEN
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))
ffc10f98: 81 3e 00 50 lwz r9,80(r30)
ffc10f9c: 81 5e 00 54 lwz r10,84(r30)
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
ffc10fa0: 70 0b 02 00 andi. r11,r0,512
ffc10fa4: 40 82 00 28 bne- ffc10fcc <memfile_open+0x68>
iop->offset = the_jnode->info.file.size;
iop->size = the_jnode->info.file.size;
ffc10fa8: 91 3f 00 08 stw r9,8(r31)
return 0;
ffc10fac: 38 60 00 00 li r3,0
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = the_jnode->info.file.size;
iop->size = the_jnode->info.file.size;
ffc10fb0: 91 5f 00 0c stw r10,12(r31)
return 0;
}
ffc10fb4: 80 01 00 14 lwz r0,20(r1)
ffc10fb8: 83 c1 00 08 lwz r30,8(r1)
ffc10fbc: 7c 08 03 a6 mtlr r0
ffc10fc0: 83 e1 00 0c lwz r31,12(r1)
ffc10fc4: 38 21 00 10 addi r1,r1,16
ffc10fc8: 4e 80 00 20 blr
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = the_jnode->info.file.size;
ffc10fcc: 91 3f 00 10 stw r9,16(r31)
ffc10fd0: 91 5f 00 14 stw r10,20(r31)
ffc10fd4: 81 3e 00 50 lwz r9,80(r30)
ffc10fd8: 81 5e 00 54 lwz r10,84(r30)
ffc10fdc: 4b ff ff cc b ffc10fa8 <memfile_open+0x44>
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
ffc10fe0: 81 1e 00 54 lwz r8,84(r30) <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
ffc10fe4: 39 20 00 05 li r9,5 <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
ffc10fe8: 38 00 00 00 li r0,0 <== NOT EXECUTED
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;
the_jnode->type = IMFS_MEMORY_FILE;
ffc10fec: 91 3e 00 4c stw r9,76(r30) <== 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)
ffc10ff0: 2f 88 00 00 cmpwi cr7,r8,0 <== NOT EXECUTED
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
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;
ffc10ff4: 39 20 00 00 li r9,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;
ffc10ff8: 80 fe 00 58 lwz r7,88(r30) <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
ffc10ffc: 39 40 00 00 li r10,0 <== NOT EXECUTED
ffc11000: 91 3e 00 50 stw r9,80(r30) <== NOT EXECUTED
ffc11004: 91 5e 00 54 stw r10,84(r30) <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
ffc11008: 90 1e 00 58 stw r0,88(r30) <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
ffc1100c: 90 1e 00 5c stw r0,92(r30) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
ffc11010: 90 1e 00 60 stw r0,96(r30) <== NOT EXECUTED
if ((count != 0)
ffc11014: 40 9e 00 0c bne- cr7,ffc11020 <memfile_open+0xbc> <== NOT EXECUTED
ffc11018: 80 03 00 18 lwz r0,24(r3) <== NOT EXECUTED
ffc1101c: 4b ff ff 84 b ffc10fa0 <memfile_open+0x3c> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
ffc11020: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc11024: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc11028: 38 c0 00 00 li r6,0 <== NOT EXECUTED
ffc1102c: 4b ff fc 81 bl ffc10cac <IMFS_memfile_write> <== NOT EXECUTED
ffc11030: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED
return -1;
ffc11034: 38 60 ff ff li r3,-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))
ffc11038: 41 be ff 7c beq- cr7,ffc10fb4 <memfile_open+0x50> <== NOT EXECUTED
ffc1103c: 80 1f 00 18 lwz r0,24(r31) <== NOT EXECUTED
ffc11040: 4b ff ff 58 b ffc10f98 <memfile_open+0x34> <== NOT EXECUTED
ffc05058 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
ffc05058: 94 21 ff c0 stwu r1,-64(r1)
ffc0505c: 7c 08 02 a6 mflr r0
ffc05060: 90 01 00 44 stw r0,68(r1)
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
ffc05064: 54 80 04 26 rlwinm r0,r4,0,16,19
ffc05068: 2f 80 40 00 cmpwi cr7,r0,16384
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
ffc0506c: 93 61 00 2c stw r27,44(r1)
ffc05070: 7c bb 2b 78 mr r27,r5
ffc05074: 93 81 00 30 stw r28,48(r1)
ffc05078: 7c dc 33 78 mr r28,r6
ffc0507c: 93 a1 00 34 stw r29,52(r1)
ffc05080: 7c 7d 1b 78 mr r29,r3
ffc05084: 93 c1 00 38 stw r30,56(r1)
ffc05088: 7c 9e 23 78 mr r30,r4
ffc0508c: 93 e1 00 3c stw r31,60(r1)
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
ffc05090: 41 9e 00 68 beq- cr7,ffc050f8 <mknod+0xa0>
ffc05094: 2b 80 40 00 cmplwi cr7,r0,16384
ffc05098: 40 9d 00 50 ble- cr7,ffc050e8 <mknod+0x90>
ffc0509c: 2f 80 60 00 cmpwi cr7,r0,24576
ffc050a0: 41 9e 00 58 beq- cr7,ffc050f8 <mknod+0xa0>
ffc050a4: 6c 09 ff ff xoris r9,r0,65535
ffc050a8: 2f 89 80 00 cmpwi cr7,r9,-32768
ffc050ac: 41 9e 00 4c beq- cr7,ffc050f8 <mknod+0xa0> <== ALWAYS TAKEN
case S_IFBLK:
case S_IFREG:
case S_IFIFO:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
ffc050b0: 48 00 cf c5 bl ffc12074 <__errno>
ffc050b4: 38 00 00 16 li r0,22
ffc050b8: 90 03 00 00 stw r0,0(r3)
ffc050bc: 3b a0 ff ff li r29,-1
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
ffc050c0: 80 01 00 44 lwz r0,68(r1)
ffc050c4: 7f a3 eb 78 mr r3,r29
ffc050c8: 83 61 00 2c lwz r27,44(r1)
ffc050cc: 7c 08 03 a6 mtlr r0
ffc050d0: 83 81 00 30 lwz r28,48(r1)
ffc050d4: 83 a1 00 34 lwz r29,52(r1)
ffc050d8: 83 c1 00 38 lwz r30,56(r1)
ffc050dc: 83 e1 00 3c lwz r31,60(r1)
ffc050e0: 38 21 00 40 addi r1,r1,64
ffc050e4: 4e 80 00 20 blr
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
ffc050e8: 2f 80 10 00 cmpwi cr7,r0,4096
ffc050ec: 41 9e 00 0c beq- cr7,ffc050f8 <mknod+0xa0>
ffc050f0: 2f 80 20 00 cmpwi cr7,r0,8192
ffc050f4: 40 9e ff bc bne+ cr7,ffc050b0 <mknod+0x58>
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
ffc050f8: 3b e1 00 10 addi r31,r1,16
ffc050fc: 7f a3 eb 78 mr r3,r29
ffc05100: 38 81 00 08 addi r4,r1,8
ffc05104: 7f e5 fb 78 mr r5,r31
ffc05108: 48 00 0b e9 bl ffc05cf0 <rtems_filesystem_get_start_loc>
result = (*temp_loc.ops->evalformake_h)(
ffc0510c: 81 21 00 1c lwz r9,28(r1)
ffc05110: 80 61 00 08 lwz r3,8(r1)
ffc05114: 7f e4 fb 78 mr r4,r31
ffc05118: 80 09 00 04 lwz r0,4(r9)
ffc0511c: 38 a1 00 0c addi r5,r1,12
ffc05120: 7c 7d 1a 14 add r3,r29,r3
ffc05124: 7c 09 03 a6 mtctr r0
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
return -1;
ffc05128: 3b a0 ff ff li r29,-1
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
result = (*temp_loc.ops->evalformake_h)(
ffc0512c: 4e 80 04 21 bctrl
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
ffc05130: 2f 83 00 00 cmpwi cr7,r3,0
ffc05134: 40 9e ff 8c bne+ cr7,ffc050c0 <mknod+0x68>
return -1;
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
ffc05138: 81 21 00 1c lwz r9,28(r1)
ffc0513c: 7f c4 f3 78 mr r4,r30
ffc05140: 7f 65 db 78 mr r5,r27
ffc05144: 80 61 00 0c lwz r3,12(r1)
ffc05148: 80 09 00 14 lwz r0,20(r9)
ffc0514c: 7f 86 e3 78 mr r6,r28
ffc05150: 7f e7 fb 78 mr r7,r31
ffc05154: 7c 09 03 a6 mtctr r0
ffc05158: 4e 80 04 21 bctrl
ffc0515c: 7c 7d 1b 78 mr r29,r3
rtems_filesystem_freenode( &temp_loc );
ffc05160: 7f e3 fb 78 mr r3,r31
ffc05164: 4b ff f9 69 bl ffc04acc <rtems_filesystem_freenode>
return result;
}
ffc05168: 80 01 00 44 lwz r0,68(r1)
ffc0516c: 7f a3 eb 78 mr r3,r29
ffc05170: 83 61 00 2c lwz r27,44(r1)
ffc05174: 7c 08 03 a6 mtlr r0
ffc05178: 83 81 00 30 lwz r28,48(r1)
ffc0517c: 83 a1 00 34 lwz r29,52(r1)
ffc05180: 83 c1 00 38 lwz r30,56(r1)
ffc05184: 83 e1 00 3c lwz r31,60(r1)
ffc05188: 38 21 00 40 addi r1,r1,64
ffc0518c: 4e 80 00 20 blr
ffc0525c <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
ffc0525c: 7d 80 00 26 mfcr r12
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
ffc05260: 2b 86 00 01 cmplwi cr7,r6,1
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
ffc05264: 94 21 ff a0 stwu r1,-96(r1)
ffc05268: 7c 08 02 a6 mflr r0
ffc0526c: 93 01 00 40 stw r24,64(r1)
ffc05270: 7c b8 2b 78 mr r24,r5
ffc05274: 93 41 00 48 stw r26,72(r1)
ffc05278: 7c da 33 78 mr r26,r6
ffc0527c: 93 61 00 4c stw r27,76(r1)
ffc05280: 7c 9b 23 78 mr r27,r4
ffc05284: 93 81 00 50 stw r28,80(r1)
ffc05288: 7c 7c 1b 78 mr r28,r3
ffc0528c: 93 c1 00 58 stw r30,88(r1)
ffc05290: 7c fe 3b 78 mr r30,r7
ffc05294: 90 01 00 64 stw r0,100(r1)
ffc05298: 92 61 00 2c stw r19,44(r1)
ffc0529c: 92 81 00 30 stw r20,48(r1)
ffc052a0: 92 a1 00 34 stw r21,52(r1)
ffc052a4: 92 c1 00 38 stw r22,56(r1)
ffc052a8: 92 e1 00 3c stw r23,60(r1)
ffc052ac: 93 21 00 44 stw r25,68(r1)
ffc052b0: 93 a1 00 54 stw r29,84(r1)
ffc052b4: 93 e1 00 5c stw r31,92(r1)
ffc052b8: 91 81 00 28 stw r12,40(r1)
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
ffc052bc: 41 9d 02 a0 bgt- cr7,ffc0555c <mount+0x300>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
ffc052c0: 7c a3 2b 78 mr r3,r5
ffc052c4: 48 00 9b d5 bl ffc0ee98 <rtems_filesystem_get_mount_handler>
if ( !mount_h )
ffc052c8: 7c 7d 1b 79 mr. r29,r3
ffc052cc: 41 82 02 90 beq- ffc0555c <mount+0x300>
{
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;
ffc052d0: 7f 60 00 34 cntlzw r0,r27
ffc052d4: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc052d8: 68 00 00 01 xori r0,r0,1
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
ffc052dc: 2e 00 00 00 cmpwi cr4,r0,0
ffc052e0: 41 92 02 68 beq- cr4,ffc05548 <mount+0x2ec>
* 4) The mount point exists with the proper permissions to allow mounting
* 5) The selected mount point already has a file system mounted to it
*
*/
int mount(
ffc052e4: 7f 63 db 78 mr r3,r27
ffc052e8: 48 00 e0 15 bl ffc132fc <strlen>
ffc052ec: 7f 73 db 78 mr r19,r27
ffc052f0: 7c 74 1b 78 mr r20,r3
ffc052f4: 3a a3 00 01 addi r21,r3,1
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;
ffc052f8: 7f 03 c3 78 mr r3,r24
ffc052fc: 48 00 e0 01 bl ffc132fc <strlen>
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
ffc05300: 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;
ffc05304: 3a e3 00 01 addi r23,r3,1
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
ffc05308: 3b 20 00 00 li r25,0
ffc0530c: 41 9e 00 10 beq- cr7,ffc0531c <mount+0xc0>
ffc05310: 7f 83 e3 78 mr r3,r28
ffc05314: 48 00 df e9 bl ffc132fc <strlen>
ffc05318: 3b 23 00 01 addi r25,r3,1
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
ffc0531c: 38 95 00 74 addi r4,r21,116
ffc05320: 7c 84 ba 14 add r4,r4,r23
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
ffc05324: 38 60 00 01 li r3,1
ffc05328: 7c 84 ca 14 add r4,r4,r25
ffc0532c: 4b ff f5 21 bl ffc0484c <calloc>
if ( mt_entry != NULL ) {
ffc05330: 7c 7f 1b 79 mr. r31,r3
ffc05334: 41 82 02 00 beq- ffc05534 <mount+0x2d8> <== NEVER TAKEN
char *str = (char *) mt_entry + sizeof( *mt_entry );
ffc05338: 3a df 00 74 addi r22,r31,116
memcpy( str, filesystemtype, filesystemtype_size );
ffc0533c: 7e e5 bb 78 mr r5,r23
ffc05340: 7f 04 c3 78 mr r4,r24
ffc05344: 7e c3 b3 78 mr r3,r22
ffc05348: 48 00 d9 8d bl ffc12cd4 <memcpy>
mt_entry->type = str;
str += filesystemtype_size;
ffc0534c: 7e f6 ba 14 add r23,r22,r23
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
ffc05350: 92 df 00 6c stw r22,108(r31)
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
ffc05354: 7f 25 cb 78 mr r5,r25
ffc05358: 7f 84 e3 78 mr r4,r28
ffc0535c: 7e e3 bb 78 mr r3,r23
ffc05360: 48 00 d9 75 bl ffc12cd4 <memcpy>
mt_entry->dev = str;
str += source_size;
ffc05364: 7f 37 ca 14 add r25,r23,r25
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
ffc05368: 92 ff 00 70 stw r23,112(r31)
str += source_size;
memcpy( str, target, target_size );
ffc0536c: 7e 64 9b 78 mr r4,r19
ffc05370: 7e a5 ab 78 mr r5,r21
ffc05374: 7f 23 cb 78 mr r3,r25
ffc05378: 48 00 d9 5d bl ffc12cd4 <memcpy>
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;
ffc0537c: 3c 80 ff c2 lis r4,-62
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
str += source_size;
memcpy( str, target, target_size );
mt_entry->target = str;
ffc05380: 93 3f 00 68 stw r25,104(r31)
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;
ffc05384: 38 7f 00 38 addi r3,r31,56
ffc05388: 38 84 8d 70 addi r4,r4,-29328
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
ffc0538c: 93 ff 00 2c stw r31,44(r31)
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
ffc05390: 38 a0 00 30 li r5,48
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
ffc05394: 93 5f 00 30 stw r26,48(r31)
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
ffc05398: 48 00 d9 3d bl ffc12cd4 <memcpy>
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
ffc0539c: 40 92 00 f0 bne- cr4,ffc0548c <mount+0x230>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
ffc053a0: 3d 20 00 00 lis r9,0
ffc053a4: 39 69 21 98 addi r11,r9,8600
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
ffc053a8: 81 29 21 98 lwz r9,8600(r9)
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail(
const Chain_Control *the_chain
)
{
return &the_chain->Tail.Node;
ffc053ac: 38 0b 00 04 addi r0,r11,4
ffc053b0: 7f 89 00 00 cmpw cr7,r9,r0
)
{
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;
ffc053b4: 3b 80 00 00 li r28,0
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
ffc053b8: 40 9e 01 b8 bne- cr7,ffc05570 <mount+0x314> <== NEVER TAKEN
* 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 ) ) {
ffc053bc: 7f e3 fb 78 mr r3,r31
ffc053c0: 7f a9 03 a6 mtctr r29
ffc053c4: 7f c4 f3 78 mr r4,r30
ffc053c8: 4e 80 04 21 bctrl
ffc053cc: 2f 83 00 00 cmpwi cr7,r3,0
ffc053d0: 40 9e 01 bc bne- cr7,ffc0558c <mount+0x330>
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 );
ffc053d4: 3f c0 00 00 lis r30,0
ffc053d8: 80 7e 27 90 lwz r3,10128(r30)
ffc053dc: 38 80 00 00 li r4,0
ffc053e0: 38 a0 00 00 li r5,0
ffc053e4: 48 00 39 4d bl ffc08d30 <rtems_semaphore_obtain>
/*
* Add the mount table entry to the mount table chain
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
ffc053e8: 3c 60 00 00 lis r3,0
ffc053ec: 38 63 21 98 addi r3,r3,8600
ffc053f0: 7f e4 fb 78 mr r4,r31
ffc053f4: 48 00 47 15 bl ffc09b08 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
ffc053f8: 80 7e 27 90 lwz r3,10128(r30)
ffc053fc: 48 00 3a bd bl ffc08eb8 <rtems_semaphore_release>
rtems_libio_unlock();
if ( !has_target )
ffc05400: 41 92 00 54 beq- cr4,ffc05454 <mount+0x1f8>
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
ffc05404: 38 60 00 00 li r3,0
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
ffc05408: 80 01 00 64 lwz r0,100(r1)
ffc0540c: 81 81 00 28 lwz r12,40(r1)
ffc05410: 7c 08 03 a6 mtlr r0
ffc05414: 82 61 00 2c lwz r19,44(r1)
ffc05418: 82 81 00 30 lwz r20,48(r1)
ffc0541c: 7d 80 81 20 mtcrf 8,r12
ffc05420: 82 a1 00 34 lwz r21,52(r1)
ffc05424: 82 c1 00 38 lwz r22,56(r1)
ffc05428: 82 e1 00 3c lwz r23,60(r1)
ffc0542c: 83 01 00 40 lwz r24,64(r1)
ffc05430: 83 21 00 44 lwz r25,68(r1)
ffc05434: 83 41 00 48 lwz r26,72(r1)
ffc05438: 83 61 00 4c lwz r27,76(r1)
ffc0543c: 83 81 00 50 lwz r28,80(r1)
ffc05440: 83 a1 00 54 lwz r29,84(r1)
ffc05444: 83 c1 00 58 lwz r30,88(r1)
ffc05448: 83 e1 00 5c lwz r31,92(r1)
ffc0544c: 38 21 00 60 addi r1,r1,96
ffc05450: 4e 80 00 20 blr
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
rtems_filesystem_root = mt_entry->mt_fs_root;
ffc05454: 3d 20 00 00 lis r9,0
ffc05458: 80 ff 00 1c lwz r7,28(r31)
ffc0545c: 81 29 27 1c lwz r9,10012(r9)
return 0;
ffc05460: 38 60 00 00 li r3,0
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
rtems_filesystem_root = mt_entry->mt_fs_root;
ffc05464: 81 1f 00 20 lwz r8,32(r31)
ffc05468: 81 5f 00 24 lwz r10,36(r31)
ffc0546c: 81 7f 00 28 lwz r11,40(r31)
ffc05470: 80 1f 00 2c lwz r0,44(r31)
ffc05474: 90 e9 00 18 stw r7,24(r9)
ffc05478: 91 09 00 1c stw r8,28(r9)
ffc0547c: 91 49 00 20 stw r10,32(r9)
ffc05480: 91 69 00 24 stw r11,36(r9)
ffc05484: 90 09 00 28 stw r0,40(r9)
ffc05488: 4b ff ff 80 b ffc05408 <mount+0x1ac>
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
ffc0548c: 3b 81 00 08 addi r28,r1,8
ffc05490: 7f 63 db 78 mr r3,r27
ffc05494: 7e 84 a3 78 mr r4,r20
ffc05498: 38 a0 00 07 li r5,7
ffc0549c: 7f 86 e3 78 mr r6,r28
ffc054a0: 38 e0 00 01 li r7,1
ffc054a4: 4b ff f4 cd bl ffc04970 <rtems_filesystem_evaluate_path>
ffc054a8: 2f 83 ff ff cmpwi cr7,r3,-1
ffc054ac: 41 9e 00 d0 beq- cr7,ffc0557c <mount+0x320> <== NEVER TAKEN
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
ffc054b0: 81 21 00 14 lwz r9,20(r1)
ffc054b4: 7f 83 e3 78 mr r3,r28
ffc054b8: 80 09 00 10 lwz r0,16(r9)
ffc054bc: 7c 09 03 a6 mtctr r0
ffc054c0: 4e 80 04 21 bctrl
ffc054c4: 2f 83 00 01 cmpwi cr7,r3,1
ffc054c8: 40 9e 00 f0 bne- cr7,ffc055b8 <mount+0x35c>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
ffc054cc: 80 81 00 08 lwz r4,8(r1)
ffc054d0: 3c 60 ff c0 lis r3,-64
ffc054d4: 38 63 51 90 addi r3,r3,20880
ffc054d8: 4b ff fc cd bl ffc051a4 <rtems_filesystem_mount_iterate>
ffc054dc: 2f 83 00 00 cmpwi cr7,r3,0
ffc054e0: 40 9e 00 e8 bne- cr7,ffc055c8 <mount+0x36c>
* 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;
ffc054e4: 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 ) ) {
ffc054e8: 7f e3 fb 78 mr r3,r31
* 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;
ffc054ec: 81 21 00 14 lwz r9,20(r1)
* 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;
ffc054f0: 90 1f 00 08 stw r0,8(r31)
mt_entry->mt_point_node.handlers = loc.handlers;
ffc054f4: 80 01 00 10 lwz r0,16(r1)
mt_entry->mt_point_node.ops = loc.ops;
ffc054f8: 91 3f 00 14 stw r9,20(r31)
* 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;
ffc054fc: 90 1f 00 10 stw r0,16(r31)
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
ffc05500: 80 01 00 18 lwz r0,24(r1)
ffc05504: 90 1f 00 18 stw r0,24(r31)
/*
* 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 ) ) {
ffc05508: 80 09 00 20 lwz r0,32(r9)
ffc0550c: 7c 09 03 a6 mtctr r0
ffc05510: 4e 80 04 21 bctrl
ffc05514: 2f 83 00 00 cmpwi cr7,r3,0
ffc05518: 41 9e fe a4 beq+ cr7,ffc053bc <mount+0x160> <== ALWAYS TAKEN
return 0;
cleanup_and_bail:
free( mt_entry );
ffc0551c: 7f e3 fb 78 mr r3,r31
ffc05520: 4b ff f5 d9 bl ffc04af8 <free>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
ffc05524: 7f 83 e3 78 mr r3,r28
ffc05528: 4b ff f5 a5 bl ffc04acc <rtems_filesystem_freenode>
return -1;
ffc0552c: 38 60 ff ff li r3,-1
ffc05530: 4b ff fe d8 b ffc05408 <mount+0x1ac>
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
ffc05534: 48 00 cb 41 bl ffc12074 <__errno> <== NOT EXECUTED
ffc05538: 38 00 00 0c li r0,12 <== NOT EXECUTED
ffc0553c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
ffc05540: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc05544: 4b ff fe c4 b ffc05408 <mount+0x1ac> <== NOT EXECUTED
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
ffc05548: 3e 60 ff c2 lis r19,-62
ffc0554c: 3a a0 00 02 li r21,2
ffc05550: 3a 80 00 01 li r20,1
ffc05554: 3a 73 8d 2c addi r19,r19,-29396
ffc05558: 4b ff fd a0 b ffc052f8 <mount+0x9c>
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
if ( !mount_h )
rtems_set_errno_and_return_minus_one( EINVAL );
ffc0555c: 48 00 cb 19 bl ffc12074 <__errno>
ffc05560: 38 00 00 16 li r0,22
ffc05564: 90 03 00 00 stw r0,0(r3)
ffc05568: 38 60 ff ff li r3,-1
ffc0556c: 4b ff fe 9c b ffc05408 <mount+0x1ac>
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
errno = EINVAL;
ffc05570: 48 00 cb 05 bl ffc12074 <__errno> <== NOT EXECUTED
ffc05574: 38 00 00 16 li r0,22 <== NOT EXECUTED
ffc05578: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
ffc0557c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc05580: 4b ff f5 79 bl ffc04af8 <free> <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
ffc05584: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc05588: 4b ff fe 80 b ffc05408 <mount+0x1ac> <== NOT EXECUTED
if ( (*mount_h)( mt_entry, data ) ) {
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
ffc0558c: 81 21 00 14 lwz r9,20(r1)
ffc05590: 7f e3 fb 78 mr r3,r31
ffc05594: 80 09 00 28 lwz r0,40(r9)
ffc05598: 7c 09 03 a6 mtctr r0
ffc0559c: 4e 80 04 21 bctrl
return 0;
cleanup_and_bail:
free( mt_entry );
ffc055a0: 7f e3 fb 78 mr r3,r31
ffc055a4: 4b ff f5 55 bl ffc04af8 <free>
if ( loc_to_free )
ffc055a8: 2f 9c 00 00 cmpwi cr7,r28,0
rtems_filesystem_freenode( loc_to_free );
return -1;
ffc055ac: 38 60 ff ff li r3,-1
cleanup_and_bail:
free( mt_entry );
if ( loc_to_free )
ffc055b0: 41 9e fe 58 beq+ cr7,ffc05408 <mount+0x1ac> <== NEVER TAKEN
ffc055b4: 4b ff ff 70 b ffc05524 <mount+0x2c8>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
ffc055b8: 48 00 ca bd bl ffc12074 <__errno>
ffc055bc: 38 00 00 14 li r0,20
ffc055c0: 90 03 00 00 stw r0,0(r3)
goto cleanup_and_bail;
ffc055c4: 4b ff ff 58 b ffc0551c <mount+0x2c0>
/*
* 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;
ffc055c8: 48 00 ca ad bl ffc12074 <__errno>
ffc055cc: 38 00 00 10 li r0,16
ffc055d0: 90 03 00 00 stw r0,0(r3)
goto cleanup_and_bail;
ffc055d4: 4b ff ff 48 b ffc0551c <mount+0x2c0>
ffc057a4 <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
ffc057a4: 94 21 ff e0 stwu r1,-32(r1)
ffc057a8: 7c 08 02 a6 mflr r0
ffc057ac: 93 e1 00 1c stw r31,28(r1)
int rv = -1;
if (target != NULL) {
ffc057b0: 7c 9f 23 79 mr. r31,r4
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
ffc057b4: 93 61 00 0c stw r27,12(r1)
ffc057b8: 7c bb 2b 78 mr r27,r5
ffc057bc: 93 81 00 10 stw r28,16(r1)
ffc057c0: 7c dc 33 78 mr r28,r6
ffc057c4: 93 a1 00 14 stw r29,20(r1)
ffc057c8: 7c fd 3b 78 mr r29,r7
ffc057cc: 93 c1 00 18 stw r30,24(r1)
ffc057d0: 7c 7e 1b 78 mr r30,r3
ffc057d4: 90 01 00 24 stw r0,36(r1)
int rv = -1;
if (target != NULL) {
ffc057d8: 41 82 00 78 beq- ffc05850 <mount_and_make_target_path+0xac>
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
ffc057dc: 7f e3 fb 78 mr r3,r31
ffc057e0: 38 80 01 ff li r4,511
ffc057e4: 48 00 0b e1 bl ffc063c4 <rtems_mkdir>
if (rv == 0) {
ffc057e8: 2c 03 00 00 cmpwi r3,0
ffc057ec: 41 82 00 28 beq- ffc05814 <mount_and_make_target_path+0x70><== ALWAYS TAKEN
} else {
errno = EINVAL;
}
return rv;
}
ffc057f0: 80 01 00 24 lwz r0,36(r1)
ffc057f4: 83 61 00 0c lwz r27,12(r1)
ffc057f8: 7c 08 03 a6 mtlr r0
ffc057fc: 83 81 00 10 lwz r28,16(r1)
ffc05800: 83 a1 00 14 lwz r29,20(r1)
ffc05804: 83 c1 00 18 lwz r30,24(r1)
ffc05808: 83 e1 00 1c lwz r31,28(r1)
ffc0580c: 38 21 00 20 addi r1,r1,32
ffc05810: 4e 80 00 20 blr
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
ffc05814: 7f c3 f3 78 mr r3,r30
ffc05818: 7f e4 fb 78 mr r4,r31
ffc0581c: 7f 65 db 78 mr r5,r27
ffc05820: 7f 86 e3 78 mr r6,r28
ffc05824: 7f a7 eb 78 mr r7,r29
ffc05828: 48 00 01 09 bl ffc05930 <mount>
} else {
errno = EINVAL;
}
return rv;
}
ffc0582c: 80 01 00 24 lwz r0,36(r1)
ffc05830: 83 61 00 0c lwz r27,12(r1)
ffc05834: 7c 08 03 a6 mtlr r0
ffc05838: 83 81 00 10 lwz r28,16(r1)
ffc0583c: 83 a1 00 14 lwz r29,20(r1)
ffc05840: 83 c1 00 18 lwz r30,24(r1)
ffc05844: 83 e1 00 1c lwz r31,28(r1)
ffc05848: 38 21 00 20 addi r1,r1,32
ffc0584c: 4e 80 00 20 blr
options,
data
);
}
} else {
errno = EINVAL;
ffc05850: 48 00 cc 7d bl ffc124cc <__errno>
ffc05854: 38 00 00 16 li r0,22
ffc05858: 90 03 00 00 stw r0,0(r3)
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
ffc0585c: 38 60 ff ff li r3,-1
ffc05860: 4b ff ff 90 b ffc057f0 <mount_and_make_target_path+0x4c>
ffc05848 <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
ffc05848: 7d 80 00 26 mfcr r12
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ffc0584c: 7e 03 20 00 cmpw cr4,r3,r4
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
ffc05850: 94 21 ff e8 stwu r1,-24(r1)
ffc05854: 7c 08 02 a6 mflr r0
ffc05858: 93 c1 00 10 stw r30,16(r1)
ffc0585c: 7c 9e 23 78 mr r30,r4
ffc05860: 90 01 00 1c stw r0,28(r1)
ffc05864: 93 e1 00 14 stw r31,20(r1)
ffc05868: 91 81 00 0c stw r12,12(r1)
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ffc0586c: 41 92 00 8c beq- cr4,ffc058f8 <newlib_delete_hook+0xb0>
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
ffc05870: 83 e4 01 28 lwz r31,296(r4)
}
if (ptr && ptr != _global_impure_ptr) {
ffc05874: 2f 9f 00 00 cmpwi cr7,r31,0
ffc05878: 41 9e 00 2c beq- cr7,ffc058a4 <newlib_delete_hook+0x5c> <== NEVER TAKEN
ffc0587c: 3d 20 00 00 lis r9,0
ffc05880: 80 09 27 2c lwz r0,10028(r9)
ffc05884: 7f 9f 00 00 cmpw cr7,r31,r0
ffc05888: 41 9e 00 1c beq- cr7,ffc058a4 <newlib_delete_hook+0x5c>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
ffc0588c: 3c 80 ff c0 lis r4,-64
ffc05890: 7f e3 fb 78 mr r3,r31
ffc05894: 38 84 55 dc addi r4,r4,21980
ffc05898: 48 00 d2 39 bl ffc12ad0 <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
ffc0589c: 7f e3 fb 78 mr r3,r31
ffc058a0: 48 00 7b dd bl ffc0d47c <_Workspace_Free>
#endif
}
deleted_task->libc_reent = NULL;
ffc058a4: 38 00 00 00 li r0,0
ffc058a8: 90 1e 01 28 stw r0,296(r30)
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
ffc058ac: 41 92 00 24 beq- cr4,ffc058d0 <newlib_delete_hook+0x88>
_REENT = 0;
}
}
ffc058b0: 80 01 00 1c lwz r0,28(r1)
ffc058b4: 81 81 00 0c lwz r12,12(r1)
ffc058b8: 7c 08 03 a6 mtlr r0
ffc058bc: 83 c1 00 10 lwz r30,16(r1)
ffc058c0: 83 e1 00 14 lwz r31,20(r1)
ffc058c4: 7d 80 81 20 mtcrf 8,r12
ffc058c8: 38 21 00 18 addi r1,r1,24
ffc058cc: 4e 80 00 20 blr
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
_REENT = 0;
ffc058d0: 3d 20 00 00 lis r9,0
}
}
ffc058d4: 81 81 00 0c lwz r12,12(r1)
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
_REENT = 0;
ffc058d8: 90 09 27 28 stw r0,10024(r9)
}
}
ffc058dc: 7d 80 81 20 mtcrf 8,r12
ffc058e0: 80 01 00 1c lwz r0,28(r1)
ffc058e4: 83 c1 00 10 lwz r30,16(r1)
ffc058e8: 7c 08 03 a6 mtlr r0
ffc058ec: 83 e1 00 14 lwz r31,20(r1)
ffc058f0: 38 21 00 18 addi r1,r1,24
ffc058f4: 4e 80 00 20 blr
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
ffc058f8: 3d 20 00 00 lis r9,0
ffc058fc: 83 e9 27 28 lwz r31,10024(r9)
ffc05900: 4b ff ff 74 b ffc05874 <newlib_delete_hook+0x2c>
ffc055dc <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
ffc055dc: 94 21 ff f0 stwu r1,-16(r1)
ffc055e0: 7c 08 02 a6 mflr r0
ffc055e4: 93 e1 00 0c stw r31,12(r1)
ffc055e8: 7c 7f 1b 78 mr r31,r3
ffc055ec: 90 01 00 14 stw r0,20(r1)
switch ( fileno(fp) ) {
ffc055f0: 48 00 cf 69 bl ffc12558 <fileno>
ffc055f4: 2b 83 00 02 cmplwi cr7,r3,2
ffc055f8: 40 9d 00 24 ble- cr7,ffc0561c <newlib_free_buffers+0x40><== ALWAYS TAKEN
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
ffc055fc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc05600: 48 00 cc 15 bl ffc12214 <fclose> <== NOT EXECUTED
}
return 0;
}
ffc05604: 80 01 00 14 lwz r0,20(r1)
ffc05608: 38 60 00 00 li r3,0
ffc0560c: 83 e1 00 0c lwz r31,12(r1)
ffc05610: 38 21 00 10 addi r1,r1,16
ffc05614: 7c 08 03 a6 mtlr r0
ffc05618: 4e 80 00 20 blr
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
ffc0561c: a0 1f 00 0c lhz r0,12(r31)
ffc05620: 70 09 00 80 andi. r9,r0,128
ffc05624: 41 82 ff e0 beq+ ffc05604 <newlib_free_buffers+0x28> <== ALWAYS TAKEN
free( fp->_bf._base );
ffc05628: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc0562c: 4b ff f4 cd bl ffc04af8 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
ffc05630: 38 00 00 00 li r0,0 <== NOT EXECUTED
ffc05634: 90 1f 00 00 stw r0,0(r31) <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
ffc05638: 38 60 00 00 li r3,0 <== NOT EXECUTED
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
ffc0563c: 90 1f 00 10 stw r0,16(r31) <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
ffc05640: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
ffc05644: a1 3f 00 0c lhz r9,12(r31) <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
ffc05648: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
ffc0564c: 55 29 06 6e rlwinm r9,r9,0,25,23 <== NOT EXECUTED
ffc05650: b1 3f 00 0c sth r9,12(r31) <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
ffc05654: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED
ffc05658: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED
ffc0565c: 4e 80 00 20 blr <== NOT EXECUTED
ffc0599c <open>:
int open(
const char *pathname,
int flags,
...
)
{
ffc0599c: 94 21 ff b0 stwu r1,-80(r1)
ffc059a0: 7c 08 02 a6 mflr r0
ffc059a4: 7d 80 00 26 mfcr r12
ffc059a8: 90 01 00 54 stw r0,84(r1)
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
ffc059ac: 38 04 00 01 addi r0,r4,1
if ( ( status & _FREAD ) == _FREAD )
ffc059b0: 70 09 00 01 andi. r9,r0,1
int open(
const char *pathname,
int flags,
...
)
{
ffc059b4: 93 41 00 38 stw r26,56(r1)
int eval_flags;
/*
* Set the Evaluation flags
*/
eval_flags = 0;
ffc059b8: 3b 40 00 00 li r26,0
int open(
const char *pathname,
int flags,
...
)
{
ffc059bc: 93 a1 00 44 stw r29,68(r1)
ffc059c0: 7c 7d 1b 78 mr r29,r3
ffc059c4: 93 c1 00 48 stw r30,72(r1)
ffc059c8: 7c 9e 23 78 mr r30,r4
ffc059cc: 93 21 00 34 stw r25,52(r1)
ffc059d0: 93 61 00 3c stw r27,60(r1)
ffc059d4: 93 81 00 40 stw r28,64(r1)
ffc059d8: 93 e1 00 4c stw r31,76(r1)
ffc059dc: 91 81 00 30 stw r12,48(r1)
ffc059e0: 90 a1 00 28 stw r5,40(r1)
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
ffc059e4: 41 82 00 08 beq- ffc059ec <open+0x50>
eval_flags |= RTEMS_LIBIO_PERMS_READ;
ffc059e8: 3b 40 00 04 li r26,4
if ( ( status & _FWRITE ) == _FWRITE )
ffc059ec: 70 09 00 02 andi. r9,r0,2
ffc059f0: 41 82 00 08 beq- ffc059f8 <open+0x5c>
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
ffc059f4: 63 5a 00 02 ori r26,r26,2
va_start(ap, flags);
ffc059f8: 38 01 00 58 addi r0,r1,88
ffc059fc: 39 21 00 20 addi r9,r1,32
ffc05a00: 90 01 00 0c stw r0,12(r1)
mode = va_arg( ap, int );
ffc05a04: 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);
ffc05a08: 91 21 00 10 stw r9,16(r1)
mode = va_arg( ap, int );
ffc05a0c: 98 01 00 08 stb r0,8(r1)
ffc05a10: 83 69 00 08 lwz r27,8(r9)
* 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();
ffc05a14: 48 00 90 45 bl ffc0ea58 <rtems_libio_allocate>
if ( iop == 0 ) {
ffc05a18: 2e 03 00 00 cmpwi cr4,r3,0
ffc05a1c: 7c 7f 1b 78 mr r31,r3
ffc05a20: 41 92 00 e8 beq- cr4,ffc05b08 <open+0x16c>
}
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
ffc05a24: 7f a3 eb 78 mr r3,r29
ffc05a28: 48 00 d8 d5 bl ffc132fc <strlen>
ffc05a2c: 3b 81 00 14 addi r28,r1,20
ffc05a30: 7c 64 1b 78 mr r4,r3
ffc05a34: 7f 45 d3 78 mr r5,r26
ffc05a38: 7f a3 eb 78 mr r3,r29
ffc05a3c: 7f 86 e3 78 mr r6,r28
ffc05a40: 38 e0 00 01 li r7,1
ffc05a44: 4b ff ef 2d bl ffc04970 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
ffc05a48: 2f 83 ff ff cmpwi cr7,r3,-1
ffc05a4c: 41 9e 01 14 beq- cr7,ffc05b60 <open+0x1c4>
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
ffc05a50: 73 c0 0a 00 andi. r0,r30,2560
ffc05a54: 2f 80 0a 00 cmpwi cr7,r0,2560
ffc05a58: 41 9e 00 c4 beq- cr7,ffc05b1c <open+0x180>
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
ffc05a5c: 7f c3 f3 78 mr r3,r30
ffc05a60: 83 5f 00 18 lwz r26,24(r31)
ffc05a64: 48 00 8f 45 bl ffc0e9a8 <rtems_libio_fcntl_flags>
iop->pathinfo = loc;
ffc05a68: 80 01 00 14 lwz r0,20(r1)
ffc05a6c: 81 21 00 1c lwz r9,28(r1)
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
ffc05a70: 7c 63 d3 78 or r3,r3,r26
iop->pathinfo = loc;
ffc05a74: 90 1f 00 1c stw r0,28(r31)
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
ffc05a78: 7f a4 eb 78 mr r4,r29
ffc05a7c: 7f c5 f3 78 mr r5,r30
/*
* 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;
ffc05a80: 80 01 00 18 lwz r0,24(r1)
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
ffc05a84: 7f 66 db 78 mr r6,r27
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
ffc05a88: 90 7f 00 18 stw r3,24(r31)
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
ffc05a8c: 7f e3 fb 78 mr r3,r31
/*
* 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;
ffc05a90: 90 1f 00 20 stw r0,32(r31)
ffc05a94: 80 01 00 20 lwz r0,32(r1)
ffc05a98: 91 3f 00 24 stw r9,36(r31)
ffc05a9c: 90 1f 00 28 stw r0,40(r31)
ffc05aa0: 80 01 00 24 lwz r0,36(r1)
ffc05aa4: 90 1f 00 2c stw r0,44(r31)
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
ffc05aa8: 80 09 00 00 lwz r0,0(r9)
ffc05aac: 7c 09 03 a6 mtctr r0
ffc05ab0: 4e 80 04 21 bctrl
if ( rc ) {
ffc05ab4: 2f 83 00 00 cmpwi cr7,r3,0
ffc05ab8: 40 9e 00 8c bne- cr7,ffc05b44 <open+0x1a8>
}
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
ffc05abc: 73 c0 04 00 andi. r0,r30,1024
ffc05ac0: 3f c0 00 00 lis r30,0
ffc05ac4: 40 82 00 c0 bne- ffc05b84 <open+0x1e8>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
ffc05ac8: 80 7e 27 88 lwz r3,10120(r30)
ffc05acc: 7f e3 f8 50 subf r31,r3,r31
ffc05ad0: 7f e3 36 70 srawi r3,r31,6
}
ffc05ad4: 80 01 00 54 lwz r0,84(r1)
ffc05ad8: 81 81 00 30 lwz r12,48(r1)
ffc05adc: 7c 08 03 a6 mtlr r0
ffc05ae0: 83 21 00 34 lwz r25,52(r1)
ffc05ae4: 83 41 00 38 lwz r26,56(r1)
ffc05ae8: 7d 80 81 20 mtcrf 8,r12
ffc05aec: 83 61 00 3c lwz r27,60(r1)
ffc05af0: 83 81 00 40 lwz r28,64(r1)
ffc05af4: 83 a1 00 44 lwz r29,68(r1)
ffc05af8: 83 c1 00 48 lwz r30,72(r1)
ffc05afc: 83 e1 00 4c lwz r31,76(r1)
ffc05b00: 38 21 00 50 addi r1,r1,80
ffc05b04: 4e 80 00 20 blr
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
if ( iop == 0 ) {
rc = ENFILE;
ffc05b08: 3b 20 00 17 li r25,23
if ( rc ) {
if ( iop )
rtems_libio_free( iop );
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
ffc05b0c: 48 00 c5 69 bl ffc12074 <__errno>
ffc05b10: 93 23 00 00 stw r25,0(r3)
ffc05b14: 38 60 ff ff li r3,-1
ffc05b18: 4b ff ff bc b ffc05ad4 <open+0x138>
}
} 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;
ffc05b1c: 7f 9a e3 78 mr r26,r28
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;
ffc05b20: 3b 20 00 11 li r25,17
*/
done:
va_end(ap);
if ( rc ) {
if ( iop )
ffc05b24: 41 92 00 0c beq- cr4,ffc05b30 <open+0x194>
rtems_libio_free( iop );
ffc05b28: 7f e3 fb 78 mr r3,r31
ffc05b2c: 48 00 90 01 bl ffc0eb2c <rtems_libio_free>
if ( loc_to_free )
ffc05b30: 2f 9a 00 00 cmpwi cr7,r26,0
ffc05b34: 41 be ff d8 beq- cr7,ffc05b0c <open+0x170>
rtems_filesystem_freenode( loc_to_free );
ffc05b38: 7f 43 d3 78 mr r3,r26
ffc05b3c: 4b ff ef 91 bl ffc04acc <rtems_filesystem_freenode>
ffc05b40: 4b ff ff cc b ffc05b0c <open+0x170>
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
ffc05b44: 48 00 c5 31 bl ffc12074 <__errno>
rc = EEXIST;
loc_to_free = &loc;
goto done;
}
loc_to_free = &loc;
ffc05b48: 7f 9a e3 78 mr r26,r28
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
ffc05b4c: 83 23 00 00 lwz r25,0(r3)
ffc05b50: 2e 19 00 00 cmpwi cr4,r25,0
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
ffc05b54: 40 92 00 fc bne- cr4,ffc05c50 <open+0x2b4> <== ALWAYS TAKEN
ffc05b58: 3f c0 00 00 lis r30,0 <== NOT EXECUTED
ffc05b5c: 4b ff ff 6c b ffc05ac8 <open+0x12c> <== NOT EXECUTED
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
ffc05b60: 48 00 c5 15 bl ffc12074 <__errno>
ffc05b64: 80 03 00 00 lwz r0,0(r3)
ffc05b68: 2f 80 00 02 cmpwi cr7,r0,2
ffc05b6c: 41 9e 00 68 beq- cr7,ffc05bd4 <open+0x238>
rc = errno;
ffc05b70: 48 00 c5 05 bl ffc12074 <__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;
ffc05b74: 3b 40 00 00 li r26,0
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
rc = errno;
ffc05b78: 83 23 00 00 lwz r25,0(r3)
ffc05b7c: 2e 19 00 00 cmpwi cr4,r25,0
goto done;
ffc05b80: 4b ff ff d4 b ffc05b54 <open+0x1b8>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
ffc05b84: 80 7e 27 88 lwz r3,10120(r30)
ffc05b88: 38 a0 00 00 li r5,0
ffc05b8c: 38 c0 00 00 li r6,0
ffc05b90: 7c 63 f8 50 subf r3,r3,r31
ffc05b94: 7c 63 36 70 srawi r3,r3,6
ffc05b98: 48 00 8d 05 bl ffc0e89c <ftruncate>
if ( rc ) {
ffc05b9c: 2e 03 00 00 cmpwi cr4,r3,0
ffc05ba0: 7c 79 1b 78 mr r25,r3
ffc05ba4: 41 92 ff 24 beq+ cr4,ffc05ac8 <open+0x12c>
if(errno) rc = errno;
ffc05ba8: 48 00 c4 cd bl ffc12074 <__errno>
ffc05bac: 80 03 00 00 lwz r0,0(r3)
ffc05bb0: 2f 80 00 00 cmpwi cr7,r0,0
ffc05bb4: 40 9e 00 5c bne- cr7,ffc05c10 <open+0x274> <== ALWAYS TAKEN
close( iop - rtems_libio_iops );
ffc05bb8: 80 7e 27 88 lwz r3,10120(r30)
/* those are released by close(): */
iop = 0;
loc_to_free = NULL;
ffc05bbc: 3b 40 00 00 li r26,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 );
ffc05bc0: 7c 63 f8 50 subf r3,r3,r31
ffc05bc4: 7c 63 36 70 srawi r3,r3,6
ffc05bc8: 48 00 8c 35 bl ffc0e7fc <close>
/* those are released by close(): */
iop = 0;
ffc05bcc: 3b e0 00 00 li r31,0
ffc05bd0: 4b ff ff 84 b ffc05b54 <open+0x1b8>
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
ffc05bd4: 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;
ffc05bd8: 3b 40 00 00 li r26,0
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
rc = ENOENT;
ffc05bdc: 3b 20 00 02 li r25,2
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
ffc05be0: 41 82 ff 44 beq+ ffc05b24 <open+0x188>
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
ffc05be4: 7f a3 eb 78 mr r3,r29
ffc05be8: 63 64 80 00 ori r4,r27,32768
ffc05bec: 38 a0 00 00 li r5,0
ffc05bf0: 38 c0 00 00 li r6,0
ffc05bf4: 4b ff f4 65 bl ffc05058 <mknod>
if ( rc ) {
ffc05bf8: 2f 83 00 00 cmpwi cr7,r3,0
ffc05bfc: 41 9e 00 24 beq- cr7,ffc05c20 <open+0x284> <== ALWAYS TAKEN
rc = errno;
ffc05c00: 48 00 c4 75 bl ffc12074 <__errno> <== NOT EXECUTED
ffc05c04: 83 23 00 00 lwz r25,0(r3) <== NOT EXECUTED
ffc05c08: 2e 19 00 00 cmpwi cr4,r25,0 <== NOT EXECUTED
goto done;
ffc05c0c: 4b ff ff 48 b ffc05b54 <open+0x1b8> <== NOT EXECUTED
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
ffc05c10: 48 00 c4 65 bl ffc12074 <__errno>
ffc05c14: 83 23 00 00 lwz r25,0(r3)
ffc05c18: 2e 19 00 00 cmpwi cr4,r25,0
ffc05c1c: 4b ff ff 9c b ffc05bb8 <open+0x21c>
/*
* 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(
ffc05c20: 7f a3 eb 78 mr r3,r29
ffc05c24: 48 00 d6 d9 bl ffc132fc <strlen>
ffc05c28: 38 a0 00 00 li r5,0
ffc05c2c: 7c 64 1b 78 mr r4,r3
ffc05c30: 7f 86 e3 78 mr r6,r28
ffc05c34: 7f a3 eb 78 mr r3,r29
ffc05c38: 38 e0 00 01 li r7,1
ffc05c3c: 4b ff ed 35 bl ffc04970 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
ffc05c40: 3b 20 00 0d li r25,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 */
ffc05c44: 2f 83 00 00 cmpwi cr7,r3,0
ffc05c48: 40 be fe dc bne- cr7,ffc05b24 <open+0x188> <== NEVER TAKEN
ffc05c4c: 4b ff fe 10 b ffc05a5c <open+0xc0>
ffc05c50: 2e 1f 00 00 cmpwi cr4,r31,0
ffc05c54: 4b ff fe d0 b ffc05b24 <open+0x188>
ffc06b58 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc06b58: 94 21 ff e8 stwu r1,-24(r1)
ffc06b5c: 7c 08 02 a6 mflr r0
ffc06b60: 90 01 00 1c stw r0,28(r1)
int i;
if (tty->termios.c_oflag & OPOST) {
ffc06b64: 80 04 00 34 lwz r0,52(r4)
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc06b68: 93 e1 00 14 stw r31,20(r1)
ffc06b6c: 7c 9f 23 78 mr r31,r4
int i;
if (tty->termios.c_oflag & OPOST) {
ffc06b70: 70 09 00 01 andi. r9,r0,1
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc06b74: 98 61 00 08 stb r3,8(r1)
int i;
if (tty->termios.c_oflag & OPOST) {
ffc06b78: 41 82 00 50 beq- ffc06bc8 <oproc+0x70> <== NEVER TAKEN
switch (c) {
ffc06b7c: 2f 83 00 09 cmpwi cr7,r3,9
ffc06b80: 41 9e 00 fc beq- cr7,ffc06c7c <oproc+0x124>
ffc06b84: 2b 83 00 09 cmplwi cr7,r3,9
ffc06b88: 40 9d 00 64 ble- cr7,ffc06bec <oproc+0x94> <== NEVER TAKEN
ffc06b8c: 2f 83 00 0a cmpwi cr7,r3,10
ffc06b90: 41 9e 00 7c beq- cr7,ffc06c0c <oproc+0xb4>
ffc06b94: 2f 83 00 0d cmpwi cr7,r3,13
ffc06b98: 41 9e 00 ac beq- cr7,ffc06c44 <oproc+0xec> <== NEVER TAKEN
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
ffc06b9c: 70 09 00 02 andi. r9,r0,2
ffc06ba0: 40 82 01 00 bne- ffc06ca0 <oproc+0x148> <== NEVER TAKEN
ffc06ba4: 3d 20 00 00 lis r9,0
ffc06ba8: 80 09 27 24 lwz r0,10020(r9)
c = toupper(c);
if (!iscntrl(c))
ffc06bac: 7c 60 1a 14 add r3,r0,r3
ffc06bb0: 88 03 00 01 lbz r0,1(r3)
ffc06bb4: 70 09 00 20 andi. r9,r0,32
ffc06bb8: 40 82 00 10 bne- ffc06bc8 <oproc+0x70> <== NEVER TAKEN
tty->column++;
ffc06bbc: 81 3f 00 28 lwz r9,40(r31)
ffc06bc0: 38 09 00 01 addi r0,r9,1
ffc06bc4: 90 1f 00 28 stw r0,40(r31)
break;
}
}
rtems_termios_puts (&c, 1, tty);
ffc06bc8: 38 61 00 08 addi r3,r1,8
ffc06bcc: 38 80 00 01 li r4,1
ffc06bd0: 7f e5 fb 78 mr r5,r31
ffc06bd4: 4b ff fe 01 bl ffc069d4 <rtems_termios_puts>
}
ffc06bd8: 80 01 00 1c lwz r0,28(r1)
ffc06bdc: 83 e1 00 14 lwz r31,20(r1)
ffc06be0: 38 21 00 18 addi r1,r1,24
ffc06be4: 7c 08 03 a6 mtlr r0
ffc06be8: 4e 80 00 20 blr
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
ffc06bec: 2f 83 00 08 cmpwi cr7,r3,8 <== NOT EXECUTED
ffc06bf0: 40 9e ff ac bne+ cr7,ffc06b9c <oproc+0x44> <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
ffc06bf4: 81 24 00 28 lwz r9,40(r4) <== NOT EXECUTED
ffc06bf8: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc06bfc: 40 bd ff cc ble- cr7,ffc06bc8 <oproc+0x70> <== NOT EXECUTED
tty->column--;
ffc06c00: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED
ffc06c04: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED
ffc06c08: 4b ff ff c0 b ffc06bc8 <oproc+0x70> <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
ffc06c0c: 70 09 00 20 andi. r9,r0,32
ffc06c10: 41 82 00 0c beq- ffc06c1c <oproc+0xc4> <== ALWAYS TAKEN
tty->column = 0;
ffc06c14: 39 20 00 00 li r9,0 <== NOT EXECUTED
ffc06c18: 91 24 00 28 stw r9,40(r4) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
ffc06c1c: 70 09 00 04 andi. r9,r0,4
ffc06c20: 41 82 ff a8 beq+ ffc06bc8 <oproc+0x70> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
ffc06c24: 3c 60 ff c2 lis r3,-62
ffc06c28: 38 63 8d a4 addi r3,r3,-29276
ffc06c2c: 38 80 00 01 li r4,1
ffc06c30: 7f e5 fb 78 mr r5,r31
ffc06c34: 4b ff fd a1 bl ffc069d4 <rtems_termios_puts>
tty->column = 0;
ffc06c38: 38 00 00 00 li r0,0
ffc06c3c: 90 1f 00 28 stw r0,40(r31)
ffc06c40: 4b ff ff 88 b ffc06bc8 <oproc+0x70>
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
ffc06c44: 70 09 00 10 andi. r9,r0,16 <== NOT EXECUTED
ffc06c48: 41 82 00 10 beq- ffc06c58 <oproc+0x100> <== NOT EXECUTED
ffc06c4c: 81 24 00 28 lwz r9,40(r4) <== NOT EXECUTED
ffc06c50: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
ffc06c54: 41 be ff 84 beq- cr7,ffc06bd8 <oproc+0x80> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
ffc06c58: 70 09 00 08 andi. r9,r0,8 <== NOT EXECUTED
ffc06c5c: 41 a2 ff a8 beq- ffc06c04 <oproc+0xac> <== NOT EXECUTED
c = '\n';
if (tty->termios.c_oflag & ONLRET)
ffc06c60: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
return;
if (tty->termios.c_oflag & OCRNL) {
c = '\n';
ffc06c64: 38 00 00 0a li r0,10 <== NOT EXECUTED
ffc06c68: 98 01 00 08 stb r0,8(r1) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
ffc06c6c: 41 a2 ff 5c beq- ffc06bc8 <oproc+0x70> <== NOT EXECUTED
tty->column = 0;
ffc06c70: 38 00 00 00 li r0,0 <== NOT EXECUTED
ffc06c74: 90 1f 00 28 stw r0,40(r31) <== NOT EXECUTED
ffc06c78: 4b ff ff 50 b ffc06bc8 <oproc+0x70> <== NOT EXECUTED
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
ffc06c7c: 54 00 04 e8 rlwinm r0,r0,0,19,20
ffc06c80: 2f 80 18 00 cmpwi cr7,r0,6144
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
ffc06c84: 80 04 00 28 lwz r0,40(r4)
ffc06c88: 54 04 07 7e clrlwi r4,r0,29
ffc06c8c: 20 84 00 08 subfic r4,r4,8
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
ffc06c90: 41 9e 00 44 beq- cr7,ffc06cd4 <oproc+0x17c> <== ALWAYS TAKEN
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
ffc06c94: 7c 84 02 14 add r4,r4,r0 <== NOT EXECUTED
ffc06c98: 90 9f 00 28 stw r4,40(r31) <== NOT EXECUTED
break;
ffc06c9c: 4b ff ff 2c b ffc06bc8 <oproc+0x70> <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
ffc06ca0: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
ffc06ca4: 80 09 27 24 lwz r0,10020(r9) <== NOT EXECUTED
ffc06ca8: 7c 69 1b 78 mr r9,r3 <== NOT EXECUTED
ffc06cac: 7c 60 1a 14 add r3,r0,r3 <== NOT EXECUTED
ffc06cb0: 89 63 00 01 lbz r11,1(r3) <== NOT EXECUTED
ffc06cb4: 55 6b 07 be clrlwi r11,r11,30 <== NOT EXECUTED
ffc06cb8: 2f 8b 00 02 cmpwi cr7,r11,2 <== NOT EXECUTED
ffc06cbc: 41 9e 00 10 beq- cr7,ffc06ccc <oproc+0x174> <== NOT EXECUTED
ffc06cc0: 55 23 06 3e clrlwi r3,r9,24 <== NOT EXECUTED
ffc06cc4: 98 61 00 08 stb r3,8(r1) <== NOT EXECUTED
ffc06cc8: 4b ff fe e4 b ffc06bac <oproc+0x54> <== NOT EXECUTED
ffc06ccc: 39 29 ff e0 addi r9,r9,-32 <== NOT EXECUTED
ffc06cd0: 4b ff ff f0 b ffc06cc0 <oproc+0x168> <== NOT EXECUTED
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
ffc06cd4: 7c 04 02 14 add r0,r4,r0
ffc06cd8: 90 1f 00 28 stw r0,40(r31)
rtems_termios_puts ( " ", i, tty);
ffc06cdc: 3c 60 ff c2 lis r3,-62
ffc06ce0: 38 63 8d a8 addi r3,r3,-29272
ffc06ce4: 7f e5 fb 78 mr r5,r31
ffc06ce8: 4b ff fc ed bl ffc069d4 <rtems_termios_puts>
return;
ffc06cec: 4b ff fe ec b ffc06bd8 <oproc+0x80>
ffc10274 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
ffc10274: 94 21 ff d8 stwu r1,-40(r1)
ffc10278: 7c 08 02 a6 mflr r0
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
ffc1027c: 38 80 01 ff li r4,511
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
ffc10280: 93 a1 00 1c stw r29,28(r1)
ffc10284: 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)
ffc10288: 3c 60 ff c2 lis r3,-62
ffc1028c: 38 63 1a e0 addi r3,r3,6880
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
ffc10290: 93 e1 00 24 stw r31,36(r1)
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
ffc10294: 3b e0 ff ff li r31,-1
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
ffc10298: 90 01 00 2c stw r0,44(r1)
ffc1029c: 93 81 00 18 stw r28,24(r1)
ffc102a0: 93 c1 00 20 stw r30,32(r1)
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
ffc102a4: 48 00 1d a9 bl ffc1204c <rtems_mkdir>
ffc102a8: 2f 83 00 00 cmpwi cr7,r3,0
ffc102ac: 41 9e 00 28 beq- cr7,ffc102d4 <pipe_create+0x60> <== ALWAYS TAKEN
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
}
ffc102b0: 80 01 00 2c lwz r0,44(r1)
ffc102b4: 7f e3 fb 78 mr r3,r31
ffc102b8: 83 81 00 18 lwz r28,24(r1)
ffc102bc: 7c 08 03 a6 mtlr r0
ffc102c0: 83 a1 00 1c lwz r29,28(r1)
ffc102c4: 83 c1 00 20 lwz r30,32(r1)
ffc102c8: 83 e1 00 24 lwz r31,36(r1)
ffc102cc: 38 21 00 28 addi r1,r1,40
ffc102d0: 4e 80 00 20 blr
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
ffc102d4: 3d 20 00 00 lis r9,0
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
ffc102d8: 3d 40 ff c2 lis r10,-62
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
ffc102dc: a0 a9 29 60 lhz r5,10592(r9)
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
ffc102e0: 39 6a 1a e8 addi r11,r10,6888
ffc102e4: 81 0a 1a e8 lwz r8,6888(r10)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
ffc102e8: 3c 80 ff c2 lis r4,-62
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
ffc102ec: 81 4b 00 04 lwz r10,4(r11)
ffc102f0: a1 6b 00 08 lhz r11,8(r11)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
ffc102f4: 38 05 00 01 addi r0,r5,1
ffc102f8: 38 84 1a f4 addi r4,r4,6900
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
ffc102fc: 91 01 00 08 stw r8,8(r1)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
ffc10300: 38 61 00 12 addi r3,r1,18
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
ffc10304: 3b c1 00 08 addi r30,r1,8
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
ffc10308: 91 41 00 0c stw r10,12(r1)
ffc1030c: b1 61 00 10 sth r11,16(r1)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
ffc10310: b0 09 29 60 sth r0,10592(r9)
ffc10314: 4c c6 31 82 crclr 4*cr1+eq
ffc10318: 48 00 4a 81 bl ffc14d98 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
ffc1031c: 7f c3 f3 78 mr r3,r30
ffc10320: 38 80 01 80 li r4,384
ffc10324: 48 00 19 41 bl ffc11c64 <mkfifo>
ffc10328: 2f 83 00 00 cmpwi cr7,r3,0
ffc1032c: 40 9e 00 c0 bne- cr7,ffc103ec <pipe_create+0x178>
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);
ffc10330: 7f c3 f3 78 mr r3,r30
ffc10334: 38 80 40 00 li r4,16384
ffc10338: 4c c6 31 82 crclr 4*cr1+eq
ffc1033c: 4b ff 71 31 bl ffc0746c <open>
if (filsdes[0] < 0) {
ffc10340: 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);
ffc10344: 90 7d 00 00 stw r3,0(r29)
if (filsdes[0] < 0) {
ffc10348: 41 9c 00 7c blt- cr7,ffc103c4 <pipe_create+0x150>
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
ffc1034c: 3d 20 00 00 lis r9,0
ffc10350: 80 09 26 cc lwz r0,9932(r9)
ffc10354: 39 20 00 00 li r9,0
ffc10358: 7f 83 00 40 cmplw cr7,r3,r0
ffc1035c: 41 9c 00 54 blt- cr7,ffc103b0 <pipe_create+0x13c> <== ALWAYS TAKEN
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
ffc10360: 80 09 00 18 lwz r0,24(r9)
filsdes[1] = open(fifopath, O_WRONLY);
ffc10364: 7f c3 f3 78 mr r3,r30
ffc10368: 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;
ffc1036c: 54 00 00 3c rlwinm r0,r0,0,0,30
ffc10370: 90 09 00 18 stw r0,24(r9)
int pipe_create(
int filsdes[2]
)
{
rtems_libio_t *iop;
int err = 0;
ffc10374: 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);
ffc10378: 4c c6 31 82 crclr 4*cr1+eq
ffc1037c: 4b ff 70 f1 bl ffc0746c <open>
if (filsdes[1] < 0) {
ffc10380: 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);
ffc10384: 90 7d 00 04 stw r3,4(r29)
if (filsdes[1] < 0) {
ffc10388: 41 9c 00 50 blt- cr7,ffc103d8 <pipe_create+0x164>
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
ffc1038c: 7f c3 f3 78 mr r3,r30
ffc10390: 4b ff 98 79 bl ffc09c08 <unlink>
}
if(err != 0)
ffc10394: 2f 9c 00 00 cmpwi cr7,r28,0
rtems_set_errno_and_return_minus_one(err);
return 0;
ffc10398: 3b e0 00 00 li r31,0
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
ffc1039c: 41 9e ff 14 beq+ cr7,ffc102b0 <pipe_create+0x3c>
rtems_set_errno_and_return_minus_one(err);
ffc103a0: 48 00 3a f1 bl ffc13e90 <__errno>
ffc103a4: 3b e0 ff ff li r31,-1
ffc103a8: 93 83 00 00 stw r28,0(r3)
ffc103ac: 4b ff ff 04 b ffc102b0 <pipe_create+0x3c>
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
ffc103b0: 3d 20 00 00 lis r9,0
ffc103b4: 81 29 27 88 lwz r9,10120(r9)
ffc103b8: 54 63 30 32 rlwinm r3,r3,6,0,25
ffc103bc: 7d 29 1a 14 add r9,r9,r3
ffc103c0: 4b ff ff a0 b ffc10360 <pipe_create+0xec>
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
if (filsdes[0] < 0) {
err = errno;
ffc103c4: 48 00 3a cd bl ffc13e90 <__errno>
ffc103c8: 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);
ffc103cc: 7f c3 f3 78 mr r3,r30
ffc103d0: 4b ff 98 39 bl ffc09c08 <unlink>
ffc103d4: 4b ff ff c0 b ffc10394 <pipe_create+0x120>
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
err = errno;
ffc103d8: 48 00 3a b9 bl ffc13e90 <__errno>
ffc103dc: 83 83 00 00 lwz r28,0(r3)
close(filsdes[0]);
ffc103e0: 80 7d 00 00 lwz r3,0(r29)
ffc103e4: 4b ff 5b 4d bl ffc05f30 <close>
ffc103e8: 4b ff ff a4 b ffc1038c <pipe_create+0x118>
memcpy(fifopath, "/tmp/.fifo", 10);
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
if (errno != EEXIST){
ffc103ec: 48 00 3a a5 bl ffc13e90 <__errno>
ffc103f0: 4b ff fe c0 b ffc102b0 <pipe_create+0x3c>
ffc11d04 <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
ffc11d04: 94 21 ff f0 stwu r1,-16(r1)
ffc11d08: 7c 08 02 a6 mflr r0
ffc11d0c: 90 01 00 14 stw r0,20(r1)
if (cmd == FIONREAD) {
ffc11d10: 3c 00 40 04 lis r0,16388
ffc11d14: 60 00 66 7f ori r0,r0,26239
ffc11d18: 7f 84 00 00 cmpw cr7,r4,r0
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
ffc11d1c: 93 c1 00 08 stw r30,8(r1)
ffc11d20: 7c 7e 1b 78 mr r30,r3
ffc11d24: 93 e1 00 0c stw r31,12(r1)
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
ffc11d28: 38 60 ff ea li r3,-22
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
ffc11d2c: 7c bf 2b 78 mr r31,r5
if (cmd == FIONREAD) {
ffc11d30: 41 9e 00 1c beq- cr7,ffc11d4c <pipe_ioctl+0x48>
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
ffc11d34: 80 01 00 14 lwz r0,20(r1)
ffc11d38: 83 c1 00 08 lwz r30,8(r1)
ffc11d3c: 7c 08 03 a6 mtlr r0
ffc11d40: 83 e1 00 0c lwz r31,12(r1)
ffc11d44: 38 21 00 10 addi r1,r1,16
ffc11d48: 4e 80 00 20 blr
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
ffc11d4c: 2f 85 00 00 cmpwi cr7,r5,0
return -EFAULT;
ffc11d50: 38 60 ff f2 li r3,-14
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
ffc11d54: 41 9e ff e0 beq+ cr7,ffc11d34 <pipe_ioctl+0x30>
return -EFAULT;
if (! PIPE_LOCK(pipe))
ffc11d58: 80 7e 00 28 lwz r3,40(r30)
ffc11d5c: 38 80 00 00 li r4,0
ffc11d60: 38 a0 00 00 li r5,0
ffc11d64: 4b ff 99 69 bl ffc0b6cc <rtems_semaphore_obtain>
ffc11d68: 2f 83 00 00 cmpwi cr7,r3,0
return -EINTR;
ffc11d6c: 38 60 ff fc li r3,-4
{
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
if (! PIPE_LOCK(pipe))
ffc11d70: 40 9e ff c4 bne+ cr7,ffc11d34 <pipe_ioctl+0x30> <== NEVER TAKEN
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
ffc11d74: 80 1e 00 0c lwz r0,12(r30)
PIPE_UNLOCK(pipe);
ffc11d78: 80 7e 00 28 lwz r3,40(r30)
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
ffc11d7c: 90 1f 00 00 stw r0,0(r31)
PIPE_UNLOCK(pipe);
ffc11d80: 4b ff 9a d5 bl ffc0b854 <rtems_semaphore_release>
return 0;
ffc11d84: 38 60 00 00 li r3,0
ffc11d88: 4b ff ff ac b ffc11d34 <pipe_ioctl+0x30>
ffc11874 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ffc11874: 94 21 ff c0 stwu r1,-64(r1)
ffc11878: 7c 08 02 a6 mflr r0
ffc1187c: 90 01 00 44 stw r0,68(r1)
ffc11880: 93 e1 00 3c stw r31,60(r1)
ffc11884: 7c 7f 1b 78 mr r31,r3
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
ffc11888: 80 63 00 28 lwz r3,40(r3)
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ffc1188c: 93 a1 00 34 stw r29,52(r1)
ffc11890: 7c 9d 23 78 mr r29,r4
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
ffc11894: 38 80 00 00 li r4,0
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ffc11898: 93 c1 00 38 stw r30,56(r1)
ffc1189c: 7c be 2b 78 mr r30,r5
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
ffc118a0: 38 a0 00 00 li r5,0
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ffc118a4: 93 61 00 2c stw r27,44(r1)
ffc118a8: 7c db 33 78 mr r27,r6
ffc118ac: 92 e1 00 1c stw r23,28(r1)
ffc118b0: 93 01 00 20 stw r24,32(r1)
ffc118b4: 93 21 00 24 stw r25,36(r1)
ffc118b8: 93 41 00 28 stw r26,40(r1)
ffc118bc: 93 81 00 30 stw r28,48(r1)
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
ffc118c0: 4b ff 9e 0d bl ffc0b6cc <rtems_semaphore_obtain>
ffc118c4: 2f 83 00 00 cmpwi cr7,r3,0
return -EINTR;
ffc118c8: 38 60 ff fc li r3,-4
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
ffc118cc: 40 9e 00 b0 bne- cr7,ffc1197c <pipe_read+0x108> <== NEVER TAKEN
return -EINTR;
while (read < count) {
ffc118d0: 2f 9e 00 00 cmpwi cr7,r30,0
ffc118d4: 3b 20 00 00 li r25,0
ffc118d8: 3b 40 00 00 li r26,0
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
ffc118dc: 3b 01 00 08 addi r24,r1,8
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
ffc118e0: 41 9e 01 58 beq- cr7,ffc11a38 <pipe_read+0x1c4> <== NEVER TAKEN
while (PIPE_EMPTY(pipe)) {
ffc118e4: 83 9f 00 0c lwz r28,12(r31)
ffc118e8: 2f 9c 00 00 cmpwi cr7,r28,0
ffc118ec: 40 9e 00 c4 bne- cr7,ffc119b0 <pipe_read+0x13c>
/* Not an error */
if (pipe->Writers == 0)
ffc118f0: 80 1f 00 14 lwz r0,20(r31)
ffc118f4: 2f 80 00 00 cmpwi cr7,r0,0
ffc118f8: 41 9e 01 40 beq- cr7,ffc11a38 <pipe_read+0x1c4>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ffc118fc: 80 1b 00 18 lwz r0,24(r27)
ffc11900: 70 09 00 01 andi. r9,r0,1
ffc11904: 40 82 01 3c bne- ffc11a40 <pipe_read+0x1cc>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
ffc11908: 81 3f 00 18 lwz r9,24(r31)
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
ffc1190c: 3b 80 ff fc li r28,-4
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
ffc11910: 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 ++;
ffc11914: 38 09 00 01 addi r0,r9,1
ffc11918: 90 1f 00 18 stw r0,24(r31)
PIPE_UNLOCK(pipe);
ffc1191c: 4b ff 9f 39 bl ffc0b854 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
ffc11920: 80 7f 00 2c lwz r3,44(r31)
ffc11924: 38 80 00 00 li r4,0
ffc11928: 48 00 14 dd bl ffc12e04 <rtems_barrier_wait>
ffc1192c: 2f 83 00 00 cmpwi cr7,r3,0
ffc11930: 40 9e 00 08 bne- cr7,ffc11938 <pipe_read+0xc4> <== NEVER TAKEN
ffc11934: 3b 80 00 00 li r28,0
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
ffc11938: 80 7f 00 28 lwz r3,40(r31)
ffc1193c: 38 80 00 00 li r4,0
ffc11940: 38 a0 00 00 li r5,0
ffc11944: 4b ff 9d 89 bl ffc0b6cc <rtems_semaphore_obtain>
ffc11948: 2f 83 00 00 cmpwi cr7,r3,0
ffc1194c: 40 9e 00 fc bne- cr7,ffc11a48 <pipe_read+0x1d4> <== NEVER TAKEN
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
if (ret != 0)
ffc11950: 2f 9c 00 00 cmpwi cr7,r28,0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
ffc11954: 81 3f 00 18 lwz r9,24(r31)
ffc11958: 38 09 ff ff addi r0,r9,-1
ffc1195c: 90 1f 00 18 stw r0,24(r31)
if (ret != 0)
ffc11960: 41 9e ff 84 beq+ cr7,ffc118e4 <pipe_read+0x70> <== ALWAYS TAKEN
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
ffc11964: 80 7f 00 28 lwz r3,40(r31)
ffc11968: 4b ff 9e ed bl ffc0b854 <rtems_semaphore_release>
out_nolock:
if (read > 0)
ffc1196c: 2f 9a 00 00 cmpwi cr7,r26,0
return read;
return ret;
ffc11970: 7f 83 e3 78 mr r3,r28
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
ffc11974: 40 9d 00 08 ble- cr7,ffc1197c <pipe_read+0x108>
ffc11978: 7f 43 d3 78 mr r3,r26
return read;
return ret;
}
ffc1197c: 80 01 00 44 lwz r0,68(r1)
ffc11980: 82 e1 00 1c lwz r23,28(r1)
ffc11984: 7c 08 03 a6 mtlr r0
ffc11988: 83 01 00 20 lwz r24,32(r1)
ffc1198c: 83 21 00 24 lwz r25,36(r1)
ffc11990: 83 41 00 28 lwz r26,40(r1)
ffc11994: 83 61 00 2c lwz r27,44(r1)
ffc11998: 83 81 00 30 lwz r28,48(r1)
ffc1199c: 83 a1 00 34 lwz r29,52(r1)
ffc119a0: 83 c1 00 38 lwz r30,56(r1)
ffc119a4: 83 e1 00 3c lwz r31,60(r1)
ffc119a8: 38 21 00 40 addi r1,r1,64
ffc119ac: 4e 80 00 20 blr
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
ffc119b0: 7c 19 f0 50 subf r0,r25,r30
ffc119b4: 7f 9c 00 40 cmplw cr7,r28,r0
ffc119b8: 40 9d 00 08 ble- cr7,ffc119c0 <pipe_read+0x14c>
ffc119bc: 7c 1c 03 78 mr r28,r0
chunk1 = pipe->Size - pipe->Start;
ffc119c0: 80 1f 00 08 lwz r0,8(r31)
ffc119c4: 82 ff 00 04 lwz r23,4(r31)
ffc119c8: 7e e0 b8 50 subf r23,r0,r23
if (chunk > chunk1) {
ffc119cc: 7f 9c b8 00 cmpw cr7,r28,r23
ffc119d0: 41 9d 00 80 bgt- cr7,ffc11a50 <pipe_read+0x1dc>
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);
ffc119d4: 80 9f 00 00 lwz r4,0(r31)
ffc119d8: 7c 7d ca 14 add r3,r29,r25
ffc119dc: 7f 85 e3 78 mr r5,r28
ffc119e0: 7c 84 02 14 add r4,r4,r0
ffc119e4: 48 00 43 1d bl ffc15d00 <memcpy>
pipe->Start += chunk;
ffc119e8: 81 3f 00 08 lwz r9,8(r31)
pipe->Start %= pipe->Size;
ffc119ec: 81 7f 00 04 lwz r11,4(r31)
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
ffc119f0: 7d 3c 4a 14 add r9,r28,r9
pipe->Start %= pipe->Size;
pipe->Length -= chunk;
ffc119f4: 80 1f 00 0c lwz r0,12(r31)
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
ffc119f8: 7d 49 5b 96 divwu r10,r9,r11
pipe->Length -= chunk;
ffc119fc: 7c 1c 00 50 subf r0,r28,r0
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
ffc11a00: 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;
ffc11a04: 90 1f 00 0c stw r0,12(r31)
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
ffc11a08: 7d 6a 59 d6 mullw r11,r10,r11
ffc11a0c: 7d 2b 48 50 subf r9,r11,r9
ffc11a10: 91 3f 00 08 stw r9,8(r31)
pipe->Length -= chunk;
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
ffc11a14: 40 9e 00 08 bne- cr7,ffc11a1c <pipe_read+0x1a8>
pipe->Start = 0;
ffc11a18: 90 1f 00 08 stw r0,8(r31)
if (pipe->waitingWriters > 0)
ffc11a1c: 80 1f 00 1c lwz r0,28(r31)
ffc11a20: 2f 80 00 00 cmpwi cr7,r0,0
ffc11a24: 40 9e 00 58 bne- cr7,ffc11a7c <pipe_read+0x208>
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
ffc11a28: 7f 5a e2 14 add r26,r26,r28
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
ffc11a2c: 7f 9a f0 40 cmplw cr7,r26,r30
ffc11a30: 7f 59 d3 78 mr r25,r26
ffc11a34: 41 9c fe b0 blt+ cr7,ffc118e4 <pipe_read+0x70> <== NEVER TAKEN
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
ffc11a38: 3b 80 00 00 li r28,0
ffc11a3c: 4b ff ff 28 b ffc11964 <pipe_read+0xf0>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
ffc11a40: 3b 80 ff f5 li r28,-11
ffc11a44: 4b ff ff 20 b ffc11964 <pipe_read+0xf0>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
ffc11a48: 3b 80 ff fc li r28,-4 <== NOT EXECUTED
ffc11a4c: 4b ff ff 20 b ffc1196c <pipe_read+0xf8> <== NOT EXECUTED
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
ffc11a50: 80 9f 00 00 lwz r4,0(r31)
ffc11a54: 7e e5 bb 78 mr r5,r23
ffc11a58: 7c 7d ca 14 add r3,r29,r25
ffc11a5c: 7c 84 02 14 add r4,r4,r0
ffc11a60: 48 00 42 a1 bl ffc15d00 <memcpy>
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
ffc11a64: 7c 79 ba 14 add r3,r25,r23
ffc11a68: 80 9f 00 00 lwz r4,0(r31)
ffc11a6c: 7c 7d 1a 14 add r3,r29,r3
ffc11a70: 7c b7 e0 50 subf r5,r23,r28
ffc11a74: 48 00 42 8d bl ffc15d00 <memcpy>
ffc11a78: 4b ff ff 70 b ffc119e8 <pipe_read+0x174>
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
ffc11a7c: 80 7f 00 30 lwz r3,48(r31)
ffc11a80: 7f 04 c3 78 mr r4,r24
ffc11a84: 48 00 12 ed bl ffc12d70 <rtems_barrier_release>
ffc11a88: 4b ff ff a0 b ffc11a28 <pipe_read+0x1b4>
ffc112e8 <pipe_release>:
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
ffc112e8: 94 21 ff d8 stwu r1,-40(r1)
ffc112ec: 7c 08 02 a6 mflr r0
ffc112f0: 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);
ffc112f4: 80 04 00 18 lwz r0,24(r4)
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
ffc112f8: 93 a1 00 1c stw r29,28(r1)
ffc112fc: 7c 7d 1b 78 mr r29,r3
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
ffc11300: 70 09 00 02 andi. r9,r0,2
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
ffc11304: 93 c1 00 20 stw r30,32(r1)
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
ffc11308: 54 1e 07 7c rlwinm r30,r0,0,29,30
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
ffc1130c: 93 e1 00 24 stw r31,36(r1)
ffc11310: 93 81 00 18 stw r28,24(r1)
pipe_control_t *pipe = *pipep;
ffc11314: 83 e3 00 00 lwz r31,0(r3)
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
ffc11318: 41 82 00 10 beq- ffc11328 <pipe_release+0x40>
pipe->Readers --;
ffc1131c: 81 3f 00 10 lwz r9,16(r31)
ffc11320: 38 09 ff ff addi r0,r9,-1
ffc11324: 90 1f 00 10 stw r0,16(r31)
if (mode & LIBIO_FLAGS_WRITE)
ffc11328: 73 c0 00 04 andi. r0,r30,4
ffc1132c: 41 82 00 10 beq- ffc1133c <pipe_release+0x54>
pipe->Writers --;
ffc11330: 81 3f 00 14 lwz r9,20(r31)
ffc11334: 38 09 ff ff addi r0,r9,-1
ffc11338: 90 1f 00 14 stw r0,20(r31)
PIPE_UNLOCK(pipe);
ffc1133c: 80 7f 00 28 lwz r3,40(r31)
ffc11340: 4b ff a5 15 bl ffc0b854 <rtems_semaphore_release>
if (pipe->Readers == 0 && pipe->Writers == 0) {
ffc11344: 80 1f 00 10 lwz r0,16(r31)
ffc11348: 2f 80 00 00 cmpwi cr7,r0,0
ffc1134c: 41 9e 00 48 beq- cr7,ffc11394 <pipe_release+0xac>
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
ffc11350: 80 1f 00 14 lwz r0,20(r31)
ffc11354: 2f 80 00 00 cmpwi cr7,r0,0
ffc11358: 40 9e 00 18 bne- cr7,ffc11370 <pipe_release+0x88> <== NEVER TAKEN
ffc1135c: 2f 9e 00 02 cmpwi cr7,r30,2
ffc11360: 41 9e 00 10 beq- cr7,ffc11370 <pipe_release+0x88> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
ffc11364: 80 7f 00 2c lwz r3,44(r31)
ffc11368: 38 81 00 08 addi r4,r1,8
ffc1136c: 48 00 1a 05 bl ffc12d70 <rtems_barrier_release>
pipe_unlock();
ffc11370: 4b ff ff 51 bl ffc112c0 <pipe_unlock>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
ffc11374: 80 01 00 2c lwz r0,44(r1)
ffc11378: 83 81 00 18 lwz r28,24(r1)
ffc1137c: 7c 08 03 a6 mtlr r0
ffc11380: 83 a1 00 1c lwz r29,28(r1)
ffc11384: 83 c1 00 20 lwz r30,32(r1)
ffc11388: 83 e1 00 24 lwz r31,36(r1)
ffc1138c: 38 21 00 28 addi r1,r1,40
ffc11390: 4e 80 00 20 blr
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
ffc11394: 83 9f 00 14 lwz r28,20(r31)
ffc11398: 2f 9c 00 00 cmpwi cr7,r28,0
ffc1139c: 41 9e 00 3c beq- cr7,ffc113d8 <pipe_release+0xf0>
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
ffc113a0: 2f 9e 00 04 cmpwi cr7,r30,4
ffc113a4: 41 9e ff cc beq+ cr7,ffc11370 <pipe_release+0x88> <== NEVER TAKEN
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
ffc113a8: 80 7f 00 30 lwz r3,48(r31)
ffc113ac: 38 81 00 08 addi r4,r1,8
ffc113b0: 48 00 19 c1 bl ffc12d70 <rtems_barrier_release>
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
PIPE_WAKEUPREADERS(pipe);
pipe_unlock();
ffc113b4: 4b ff ff 0d bl ffc112c0 <pipe_unlock>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
ffc113b8: 80 01 00 2c lwz r0,44(r1)
ffc113bc: 83 81 00 18 lwz r28,24(r1)
ffc113c0: 7c 08 03 a6 mtlr r0
ffc113c4: 83 a1 00 1c lwz r29,28(r1)
ffc113c8: 83 c1 00 20 lwz r30,32(r1)
ffc113cc: 83 e1 00 24 lwz r31,36(r1)
ffc113d0: 38 21 00 28 addi r1,r1,40
ffc113d4: 4e 80 00 20 blr
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
ffc113d8: 80 7f 00 2c lwz r3,44(r31)
ffc113dc: 48 00 18 c9 bl ffc12ca4 <rtems_barrier_delete>
rtems_barrier_delete(pipe->writeBarrier);
ffc113e0: 80 7f 00 30 lwz r3,48(r31)
ffc113e4: 48 00 18 c1 bl ffc12ca4 <rtems_barrier_delete>
rtems_semaphore_delete(pipe->Semaphore);
ffc113e8: 80 7f 00 28 lwz r3,40(r31)
ffc113ec: 4b ff a2 05 bl ffc0b5f0 <rtems_semaphore_delete>
free(pipe->Buffer);
ffc113f0: 80 7f 00 00 lwz r3,0(r31)
ffc113f4: 4b ff 59 31 bl ffc06d24 <free>
free(pipe);
ffc113f8: 7f e3 fb 78 mr r3,r31
ffc113fc: 4b ff 59 29 bl ffc06d24 <free>
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
ffc11400: 93 9d 00 00 stw r28,0(r29)
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
PIPE_WAKEUPREADERS(pipe);
pipe_unlock();
ffc11404: 4b ff fe bd bl ffc112c0 <pipe_unlock>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
ffc11408: 80 01 00 2c lwz r0,44(r1)
ffc1140c: 83 81 00 18 lwz r28,24(r1)
ffc11410: 7c 08 03 a6 mtlr r0
ffc11414: 83 a1 00 1c lwz r29,28(r1)
ffc11418: 83 c1 00 20 lwz r30,32(r1)
ffc1141c: 83 e1 00 24 lwz r31,36(r1)
ffc11420: 38 21 00 28 addi r1,r1,40
ffc11424: 4e 80 00 20 blr
ffc11a8c <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ffc11a8c: 94 21 ff c0 stwu r1,-64(r1)
ffc11a90: 7c 08 02 a6 mflr r0
ffc11a94: 93 c1 00 38 stw r30,56(r1)
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
ffc11a98: 7c be 2b 79 mr. r30,r5
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ffc11a9c: 93 a1 00 34 stw r29,52(r1)
ffc11aa0: 7c 9d 23 78 mr r29,r4
ffc11aa4: 93 e1 00 3c stw r31,60(r1)
ffc11aa8: 7c 7f 1b 78 mr r31,r3
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
return 0;
ffc11aac: 38 60 00 00 li r3,0
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
ffc11ab0: 90 01 00 44 stw r0,68(r1)
ffc11ab4: 93 01 00 20 stw r24,32(r1)
ffc11ab8: 93 21 00 24 stw r25,36(r1)
ffc11abc: 93 41 00 28 stw r26,40(r1)
ffc11ac0: 93 61 00 2c stw r27,44(r1)
ffc11ac4: 93 81 00 30 stw r28,48(r1)
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
ffc11ac8: 40 82 00 34 bne- ffc11afc <pipe_write+0x70> <== ALWAYS TAKEN
#endif
if (written > 0)
return written;
return ret;
}
ffc11acc: 80 01 00 44 lwz r0,68(r1)
ffc11ad0: 83 01 00 20 lwz r24,32(r1)
ffc11ad4: 7c 08 03 a6 mtlr r0
ffc11ad8: 83 21 00 24 lwz r25,36(r1)
ffc11adc: 83 41 00 28 lwz r26,40(r1)
ffc11ae0: 83 61 00 2c lwz r27,44(r1)
ffc11ae4: 83 81 00 30 lwz r28,48(r1)
ffc11ae8: 83 a1 00 34 lwz r29,52(r1)
ffc11aec: 83 c1 00 38 lwz r30,56(r1)
ffc11af0: 83 e1 00 3c lwz r31,60(r1)
ffc11af4: 38 21 00 40 addi r1,r1,64
ffc11af8: 4e 80 00 20 blr
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
ffc11afc: 80 7f 00 28 lwz r3,40(r31)
ffc11b00: 38 80 00 00 li r4,0
ffc11b04: 38 a0 00 00 li r5,0
ffc11b08: 90 c1 00 18 stw r6,24(r1)
ffc11b0c: 4b ff 9b c1 bl ffc0b6cc <rtems_semaphore_obtain>
ffc11b10: 2f 83 00 00 cmpwi cr7,r3,0
ffc11b14: 80 c1 00 18 lwz r6,24(r1)
return -EINTR;
ffc11b18: 38 60 ff fc li r3,-4
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
ffc11b1c: 40 be ff b0 bne- cr7,ffc11acc <pipe_write+0x40> <== NEVER TAKEN
return -EINTR;
if (pipe->Readers == 0) {
ffc11b20: 80 1f 00 10 lwz r0,16(r31)
ffc11b24: 2f 80 00 00 cmpwi cr7,r0,0
ffc11b28: 41 9e 01 88 beq- cr7,ffc11cb0 <pipe_write+0x224>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
ffc11b2c: 81 3f 00 04 lwz r9,4(r31)
ffc11b30: 3b 60 00 01 li r27,1
ffc11b34: 7f 9e 48 40 cmplw cr7,r30,r9
ffc11b38: 41 9d 00 08 bgt- cr7,ffc11b40 <pipe_write+0xb4> <== NEVER TAKEN
ffc11b3c: 7f db f3 78 mr r27,r30
ffc11b40: 3b 20 00 00 li r25,0
ffc11b44: 3b 40 00 00 li r26,0
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
ffc11b48: 3b 01 00 08 addi r24,r1,8
/* 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) {
ffc11b4c: 80 1f 00 0c lwz r0,12(r31)
ffc11b50: 7f 80 48 50 subf r28,r0,r9
ffc11b54: 7f 9c d8 40 cmplw cr7,r28,r27
ffc11b58: 40 9c 00 9c bge- cr7,ffc11bf4 <pipe_write+0x168>
if (LIBIO_NODELAY(iop)) {
ffc11b5c: 80 06 00 18 lwz r0,24(r6)
ffc11b60: 70 09 00 01 andi. r9,r0,1
ffc11b64: 40 82 01 58 bne- ffc11cbc <pipe_write+0x230>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
ffc11b68: 81 3f 00 1c lwz r9,28(r31)
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
ffc11b6c: 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);
ffc11b70: 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 ++;
ffc11b74: 38 09 00 01 addi r0,r9,1
ffc11b78: 90 1f 00 1c stw r0,28(r31)
PIPE_UNLOCK(pipe);
ffc11b7c: 90 c1 00 18 stw r6,24(r1)
ffc11b80: 4b ff 9c d5 bl ffc0b854 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
ffc11b84: 38 80 00 00 li r4,0
ffc11b88: 80 7f 00 30 lwz r3,48(r31)
ffc11b8c: 48 00 12 79 bl ffc12e04 <rtems_barrier_wait>
ffc11b90: 80 c1 00 18 lwz r6,24(r1)
ffc11b94: 2f 83 00 00 cmpwi cr7,r3,0
ffc11b98: 40 9e 00 08 bne- cr7,ffc11ba0 <pipe_write+0x114> <== NEVER TAKEN
ffc11b9c: 3b 80 00 00 li r28,0
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
ffc11ba0: 80 7f 00 28 lwz r3,40(r31)
ffc11ba4: 38 80 00 00 li r4,0
ffc11ba8: 38 a0 00 00 li r5,0
ffc11bac: 90 c1 00 18 stw r6,24(r1)
ffc11bb0: 4b ff 9b 1d bl ffc0b6cc <rtems_semaphore_obtain>
ffc11bb4: 2f 83 00 00 cmpwi cr7,r3,0
ffc11bb8: 80 c1 00 18 lwz r6,24(r1)
ffc11bbc: 40 9e 01 08 bne- cr7,ffc11cc4 <pipe_write+0x238> <== NEVER TAKEN
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
if (ret != 0)
ffc11bc0: 2f 9c 00 00 cmpwi cr7,r28,0
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
ffc11bc4: 81 3f 00 1c lwz r9,28(r31)
ffc11bc8: 38 09 ff ff addi r0,r9,-1
ffc11bcc: 90 1f 00 1c stw r0,28(r31)
if (ret != 0)
ffc11bd0: 40 9e 00 bc bne- cr7,ffc11c8c <pipe_write+0x200> <== NEVER TAKEN
goto out_locked;
if (pipe->Readers == 0) {
ffc11bd4: 80 1f 00 10 lwz r0,16(r31)
ffc11bd8: 2f 80 00 00 cmpwi cr7,r0,0
ffc11bdc: 41 9e 00 cc beq- cr7,ffc11ca8 <pipe_write+0x21c> <== NEVER TAKEN
ffc11be0: 81 3f 00 04 lwz r9,4(r31)
/* 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) {
ffc11be4: 80 1f 00 0c lwz r0,12(r31)
ffc11be8: 7f 80 48 50 subf r28,r0,r9
ffc11bec: 7f 9c d8 40 cmplw cr7,r28,r27
ffc11bf0: 41 9c ff 6c blt+ cr7,ffc11b5c <pipe_write+0xd0> <== NEVER TAKEN
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
ffc11bf4: 7d 79 f0 50 subf r11,r25,r30
ffc11bf8: 7f 9c 58 40 cmplw cr7,r28,r11
ffc11bfc: 40 9d 00 08 ble- cr7,ffc11c04 <pipe_write+0x178>
ffc11c00: 7d 7c 5b 78 mr r28,r11
chunk1 = pipe->Size - PIPE_WSTART(pipe);
ffc11c04: 81 7f 00 08 lwz r11,8(r31)
ffc11c08: 7c 00 5a 14 add r0,r0,r11
ffc11c0c: 7d 60 4b 96 divwu r11,r0,r9
ffc11c10: 7d 6b 49 d6 mullw r11,r11,r9
ffc11c14: 7c 0b 00 50 subf r0,r11,r0
ffc11c18: 7f 60 48 50 subf r27,r0,r9
if (chunk > chunk1) {
ffc11c1c: 7f 9c d8 00 cmpw cr7,r28,r27
ffc11c20: 40 9d 00 ac ble- cr7,ffc11ccc <pipe_write+0x240>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
ffc11c24: 80 7f 00 00 lwz r3,0(r31)
ffc11c28: 7c 9d ca 14 add r4,r29,r25
ffc11c2c: 7f 65 db 78 mr r5,r27
ffc11c30: 90 c1 00 18 stw r6,24(r1)
ffc11c34: 7c 63 02 14 add r3,r3,r0
ffc11c38: 48 00 40 c9 bl ffc15d00 <memcpy>
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
ffc11c3c: 7c 9b ca 14 add r4,r27,r25
ffc11c40: 80 7f 00 00 lwz r3,0(r31)
ffc11c44: 7c 9d 22 14 add r4,r29,r4
ffc11c48: 7c bb e0 50 subf r5,r27,r28
ffc11c4c: 48 00 40 b5 bl ffc15d00 <memcpy>
ffc11c50: 80 c1 00 18 lwz r6,24(r1)
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
ffc11c54: 81 3f 00 18 lwz r9,24(r31)
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
ffc11c58: 80 1f 00 0c lwz r0,12(r31)
if (pipe->waitingReaders > 0)
ffc11c5c: 2f 89 00 00 cmpwi cr7,r9,0
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
ffc11c60: 7c 00 e2 14 add r0,r0,r28
ffc11c64: 90 1f 00 0c stw r0,12(r31)
if (pipe->waitingReaders > 0)
ffc11c68: 40 9e 00 84 bne- cr7,ffc11cec <pipe_write+0x260>
PIPE_WAKEUPREADERS(pipe);
written += chunk;
ffc11c6c: 7f 5a e2 14 add r26,r26,r28
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
ffc11c70: 7f 9e d0 40 cmplw cr7,r30,r26
ffc11c74: 7f 59 d3 78 mr r25,r26
ffc11c78: 40 9d 00 10 ble- cr7,ffc11c88 <pipe_write+0x1fc> <== ALWAYS TAKEN
ffc11c7c: 81 3f 00 04 lwz r9,4(r31) <== NOT EXECUTED
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
written += chunk;
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
ffc11c80: 3b 60 00 01 li r27,1 <== NOT EXECUTED
ffc11c84: 4b ff fe c8 b ffc11b4c <pipe_write+0xc0> <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
ffc11c88: 3b 80 00 00 li r28,0
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
ffc11c8c: 80 7f 00 28 lwz r3,40(r31)
ffc11c90: 4b ff 9b c5 bl ffc0b854 <rtems_semaphore_release>
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
ffc11c94: 2f 9a 00 00 cmpwi cr7,r26,0
return written;
return ret;
ffc11c98: 7f 83 e3 78 mr r3,r28
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
ffc11c9c: 40 bd fe 30 ble- cr7,ffc11acc <pipe_write+0x40>
ffc11ca0: 7f 43 d3 78 mr r3,r26
ffc11ca4: 4b ff fe 28 b ffc11acc <pipe_write+0x40>
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
ffc11ca8: 3b 80 ff e0 li r28,-32 <== NOT EXECUTED
ffc11cac: 4b ff ff e0 b ffc11c8c <pipe_write+0x200> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
if (pipe->Readers == 0) {
ret = -EPIPE;
ffc11cb0: 3b 80 ff e0 li r28,-32
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
int chunk, chunk1, written = 0, ret = 0;
ffc11cb4: 3b 40 00 00 li r26,0
ffc11cb8: 4b ff ff d4 b ffc11c8c <pipe_write+0x200>
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
ffc11cbc: 3b 80 ff f5 li r28,-11
ffc11cc0: 4b ff ff cc b ffc11c8c <pipe_write+0x200>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
ffc11cc4: 3b 80 ff fc li r28,-4 <== NOT EXECUTED
ffc11cc8: 4b ff ff cc b ffc11c94 <pipe_write+0x208> <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
ffc11ccc: 80 7f 00 00 lwz r3,0(r31)
ffc11cd0: 7c 9d ca 14 add r4,r29,r25
ffc11cd4: 7f 85 e3 78 mr r5,r28
ffc11cd8: 90 c1 00 18 stw r6,24(r1)
ffc11cdc: 7c 63 02 14 add r3,r3,r0
ffc11ce0: 48 00 40 21 bl ffc15d00 <memcpy>
ffc11ce4: 80 c1 00 18 lwz r6,24(r1)
ffc11ce8: 4b ff ff 6c b ffc11c54 <pipe_write+0x1c8>
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
ffc11cec: 80 7f 00 2c lwz r3,44(r31)
ffc11cf0: 7f 04 c3 78 mr r4,r24
ffc11cf4: 90 c1 00 18 stw r6,24(r1)
ffc11cf8: 48 00 10 79 bl ffc12d70 <rtems_barrier_release>
ffc11cfc: 80 c1 00 18 lwz r6,24(r1)
ffc11d00: 4b ff ff 6c b ffc11c6c <pipe_write+0x1e0>
ffc0980c <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
ffc0980c: 7c 08 02 a6 mflr r0
ffc09810: 94 21 ff f8 stwu r1,-8(r1)
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
ffc09814: 3d 60 00 00 lis r11,0
ffc09818: 39 6b 33 d0 addi r11,r11,13264
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
ffc0981c: 90 01 00 0c stw r0,12(r1)
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
ffc09820: 38 04 ff ff addi r0,r4,-1
)
{
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
ffc09824: 81 4b 00 08 lwz r10,8(r11)
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
ffc09828: 7c 08 20 39 and. r8,r0,r4
)
{
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
ffc0982c: 38 0a 00 01 addi r0,r10,1
ffc09830: 90 0b 00 08 stw r0,8(r11)
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
return EINVAL;
ffc09834: 38 00 00 16 li r0,22
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
ffc09838: 40 82 00 0c bne- ffc09844 <posix_memalign+0x38> <== NEVER TAKEN
ffc0983c: 2b 84 00 03 cmplwi cr7,r4,3
ffc09840: 41 9d 00 18 bgt- cr7,ffc09858 <posix_memalign+0x4c>
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
ffc09844: 7c 03 03 78 mr r3,r0
ffc09848: 80 01 00 0c lwz r0,12(r1)
ffc0984c: 38 21 00 08 addi r1,r1,8
ffc09850: 7c 08 03 a6 mtlr r0
ffc09854: 4e 80 00 20 blr
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
ffc09858: 48 00 03 31 bl ffc09b88 <rtems_memalign>
ffc0985c: 7c 60 1b 78 mr r0,r3
}
ffc09860: 7c 03 03 78 mr r3,r0
ffc09864: 80 01 00 0c lwz r0,12(r1)
ffc09868: 38 21 00 08 addi r1,r1,8
ffc0986c: 7c 08 03 a6 mtlr r0
ffc09870: 4e 80 00 20 blr
ffc05c6c <printk>:
* printk
*
* Kernel printf function requiring minimal infrastructure.
*/
void printk(const char *fmt, ...)
{
ffc05c6c: 94 21 ff 88 stwu r1,-120(r1)
ffc05c70: 7c 08 02 a6 mflr r0
ffc05c74: 90 81 00 1c stw r4,28(r1)
ffc05c78: 90 01 00 7c stw r0,124(r1)
ffc05c7c: 90 a1 00 20 stw r5,32(r1)
ffc05c80: 90 c1 00 24 stw r6,36(r1)
ffc05c84: 90 e1 00 28 stw r7,40(r1)
ffc05c88: 91 01 00 2c stw r8,44(r1)
ffc05c8c: 91 21 00 30 stw r9,48(r1)
ffc05c90: 91 41 00 34 stw r10,52(r1)
ffc05c94: 40 86 00 24 bne- cr1,ffc05cb8 <printk+0x4c> <== ALWAYS TAKEN
ffc05c98: d8 21 00 38 stfd f1,56(r1) <== NOT EXECUTED
ffc05c9c: d8 41 00 40 stfd f2,64(r1) <== NOT EXECUTED
ffc05ca0: d8 61 00 48 stfd f3,72(r1) <== NOT EXECUTED
ffc05ca4: d8 81 00 50 stfd f4,80(r1) <== NOT EXECUTED
ffc05ca8: d8 a1 00 58 stfd f5,88(r1) <== NOT EXECUTED
ffc05cac: d8 c1 00 60 stfd f6,96(r1) <== NOT EXECUTED
ffc05cb0: d8 e1 00 68 stfd f7,104(r1) <== NOT EXECUTED
ffc05cb4: 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 */
ffc05cb8: 38 00 00 01 li r0,1
ffc05cbc: 98 01 00 08 stb r0,8(r1)
ffc05cc0: 38 00 00 00 li r0,0
vprintk(fmt, ap);
ffc05cc4: 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 */
ffc05cc8: 98 01 00 09 stb r0,9(r1)
ffc05ccc: 38 01 00 80 addi r0,r1,128
ffc05cd0: 90 01 00 0c stw r0,12(r1)
ffc05cd4: 38 01 00 18 addi r0,r1,24
ffc05cd8: 90 01 00 10 stw r0,16(r1)
vprintk(fmt, ap);
ffc05cdc: 48 00 23 89 bl ffc08064 <vprintk>
va_end(ap); /* clean up when done */
}
ffc05ce0: 80 01 00 7c lwz r0,124(r1)
ffc05ce4: 38 21 00 78 addi r1,r1,120
ffc05ce8: 7c 08 03 a6 mtlr r0
ffc05cec: 4e 80 00 20 blr
ffc07550 <printk_plugin>:
int printk_plugin(
void *ignored __attribute__((unused)),
const char *format,
...
)
{
ffc07550: 94 21 ff 90 stwu r1,-112(r1)
ffc07554: 7c 08 02 a6 mflr r0
ffc07558: 90 a1 00 18 stw r5,24(r1)
ffc0755c: 90 01 00 74 stw r0,116(r1)
ffc07560: 90 c1 00 1c stw r6,28(r1)
ffc07564: 90 e1 00 20 stw r7,32(r1)
ffc07568: 91 01 00 24 stw r8,36(r1)
ffc0756c: 91 21 00 28 stw r9,40(r1)
ffc07570: 91 41 00 2c stw r10,44(r1)
ffc07574: 40 86 00 24 bne- cr1,ffc07598 <printk_plugin+0x48> <== ALWAYS TAKEN
ffc07578: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED
ffc0757c: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc07580: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc07584: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc07588: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc0758c: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc07590: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc07594: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
va_list arg_pointer;
va_start (arg_pointer, format);
ffc07598: 38 00 00 02 li r0,2
ffc0759c: 98 01 00 08 stb r0,8(r1)
ffc075a0: 38 00 00 00 li r0,0
vprintk( format, arg_pointer );
ffc075a4: 7c 83 23 78 mr r3,r4
...
)
{
va_list arg_pointer;
va_start (arg_pointer, format);
ffc075a8: 98 01 00 09 stb r0,9(r1)
ffc075ac: 38 01 00 78 addi r0,r1,120
vprintk( format, arg_pointer );
ffc075b0: 38 81 00 08 addi r4,r1,8
...
)
{
va_list arg_pointer;
va_start (arg_pointer, format);
ffc075b4: 90 01 00 0c stw r0,12(r1)
ffc075b8: 38 01 00 10 addi r0,r1,16
ffc075bc: 90 01 00 10 stw r0,16(r1)
vprintk( format, arg_pointer );
ffc075c0: 48 00 23 8d bl ffc0994c <vprintk>
va_end(arg_pointer); /* clean up when done */
return 0;
}
ffc075c4: 38 60 00 00 li r3,0
ffc075c8: 80 01 00 74 lwz r0,116(r1)
ffc075cc: 38 21 00 70 addi r1,r1,112
ffc075d0: 7c 08 03 a6 mtlr r0
ffc075d4: 4e 80 00 20 blr
ffc17708 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
ffc17708: 94 21 ff f0 stwu r1,-16(r1)
ffc1770c: 7c 08 02 a6 mflr r0
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc17710: 3d 20 00 00 lis r9,0
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
ffc17714: 90 01 00 14 stw r0,20(r1)
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc17718: 80 09 26 cc lwz r0,9932(r9)
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
ffc1771c: 93 e1 00 0c stw r31,12(r1)
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc17720: 7f 83 00 40 cmplw cr7,r3,r0
ffc17724: 40 9c 00 8c bge- cr7,ffc177b0 <read+0xa8> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
ffc17728: 3d 60 00 00 lis r11,0
ffc1772c: 83 eb 27 88 lwz r31,10120(r11)
ffc17730: 54 63 30 32 rlwinm r3,r3,6,0,25
ffc17734: 7f ff 1a 14 add r31,r31,r3
rtems_libio_check_is_open( iop );
ffc17738: 81 7f 00 18 lwz r11,24(r31)
ffc1773c: 71 6a 01 00 andi. r10,r11,256
ffc17740: 41 82 00 70 beq- ffc177b0 <read+0xa8>
rtems_libio_check_buffer( buffer );
ffc17744: 2f 84 00 00 cmpwi cr7,r4,0
ffc17748: 41 9e 00 7c beq- cr7,ffc177c4 <read+0xbc> <== NEVER TAKEN
rtems_libio_check_count( count );
ffc1774c: 2f 85 00 00 cmpwi cr7,r5,0
ffc17750: 38 60 00 00 li r3,0
ffc17754: 41 9e 00 48 beq- cr7,ffc1779c <read+0x94>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
ffc17758: 71 60 00 02 andi. r0,r11,2
ffc1775c: 41 82 00 68 beq- ffc177c4 <read+0xbc>
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
ffc17760: 81 3f 00 24 lwz r9,36(r31)
ffc17764: 7f e3 fb 78 mr r3,r31
ffc17768: 80 09 00 08 lwz r0,8(r9)
ffc1776c: 7c 09 03 a6 mtctr r0
ffc17770: 4e 80 04 21 bctrl
if ( rc > 0 )
ffc17774: 2c 03 00 00 cmpwi r3,0
ffc17778: 40 81 00 24 ble- ffc1779c <read+0x94>
iop->offset += rc;
ffc1777c: 81 7f 00 10 lwz r11,16(r31)
ffc17780: 7c 6a 1b 78 mr r10,r3
ffc17784: 81 9f 00 14 lwz r12,20(r31)
ffc17788: 7c 69 fe 70 srawi r9,r3,31
ffc1778c: 7d 4a 60 14 addc r10,r10,r12
ffc17790: 7d 29 59 14 adde r9,r9,r11
ffc17794: 91 3f 00 10 stw r9,16(r31)
ffc17798: 91 5f 00 14 stw r10,20(r31)
return rc;
}
ffc1779c: 80 01 00 14 lwz r0,20(r1)
ffc177a0: 83 e1 00 0c lwz r31,12(r1)
ffc177a4: 38 21 00 10 addi r1,r1,16
ffc177a8: 7c 08 03 a6 mtlr r0
ffc177ac: 4e 80 00 20 blr
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
ffc177b0: 4b ff a8 c5 bl ffc12074 <__errno>
ffc177b4: 38 00 00 09 li r0,9
ffc177b8: 90 03 00 00 stw r0,0(r3)
ffc177bc: 38 60 ff ff li r3,-1
ffc177c0: 4b ff ff dc b ffc1779c <read+0x94>
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
ffc177c4: 4b ff a8 b1 bl ffc12074 <__errno>
ffc177c8: 38 00 00 16 li r0,22
ffc177cc: 90 03 00 00 stw r0,0(r3)
ffc177d0: 38 60 ff ff li r3,-1
ffc177d4: 4b ff ff c8 b ffc1779c <read+0x94>
ffc08afc <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
ffc08afc: 94 21 ff c8 stwu r1,-56(r1)
ffc08b00: 7c 08 02 a6 mflr r0
ffc08b04: 93 a1 00 2c stw r29,44(r1)
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
ffc08b08: 7c 9d 23 79 mr. r29,r4
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
ffc08b0c: 93 81 00 28 stw r28,40(r1)
ffc08b10: 7c 7c 1b 78 mr r28,r3
ffc08b14: 93 c1 00 30 stw r30,48(r1)
ffc08b18: 7c be 2b 78 mr r30,r5
ffc08b1c: 90 01 00 3c stw r0,60(r1)
ffc08b20: 93 e1 00 34 stw r31,52(r1)
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
ffc08b24: 41 82 00 bc beq- ffc08be0 <readlink+0xe4>
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
ffc08b28: 48 00 f0 e5 bl ffc17c0c <strlen>
ffc08b2c: 3b e1 00 08 addi r31,r1,8
ffc08b30: 7c 64 1b 78 mr r4,r3
ffc08b34: 38 a0 00 00 li r5,0
ffc08b38: 7f 83 e3 78 mr r3,r28
ffc08b3c: 7f e6 fb 78 mr r6,r31
ffc08b40: 38 e0 00 00 li r7,0
ffc08b44: 4b ff e9 0d bl ffc07450 <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
return -1;
ffc08b48: 3b 80 ff ff li r28,-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 )
ffc08b4c: 2f 83 00 00 cmpwi cr7,r3,0
ffc08b50: 41 9e 00 28 beq- cr7,ffc08b78 <readlink+0x7c> <== ALWAYS TAKEN
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
ffc08b54: 80 01 00 3c lwz r0,60(r1)
ffc08b58: 7f 83 e3 78 mr r3,r28
ffc08b5c: 83 a1 00 2c lwz r29,44(r1)
ffc08b60: 7c 08 03 a6 mtlr r0
ffc08b64: 83 81 00 28 lwz r28,40(r1)
ffc08b68: 83 c1 00 30 lwz r30,48(r1)
ffc08b6c: 83 e1 00 34 lwz r31,52(r1)
ffc08b70: 38 21 00 38 addi r1,r1,56
ffc08b74: 4e 80 00 20 blr
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
ffc08b78: 81 21 00 14 lwz r9,20(r1)
ffc08b7c: 7f e3 fb 78 mr r3,r31
ffc08b80: 80 09 00 10 lwz r0,16(r9)
ffc08b84: 7c 09 03 a6 mtctr r0
ffc08b88: 4e 80 04 21 bctrl
ffc08b8c: 2f 83 00 04 cmpwi cr7,r3,4
ffc08b90: 40 9e 00 84 bne- cr7,ffc08c14 <readlink+0x118>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
ffc08b94: 81 21 00 14 lwz r9,20(r1)
ffc08b98: 7f a4 eb 78 mr r4,r29
ffc08b9c: 7f c5 f3 78 mr r5,r30
ffc08ba0: 80 09 00 3c lwz r0,60(r9)
ffc08ba4: 7f e3 fb 78 mr r3,r31
ffc08ba8: 7c 09 03 a6 mtctr r0
ffc08bac: 4e 80 04 21 bctrl
ffc08bb0: 7c 7c 1b 78 mr r28,r3
rtems_filesystem_freenode( &loc );
ffc08bb4: 7f e3 fb 78 mr r3,r31
ffc08bb8: 4b ff e9 f5 bl ffc075ac <rtems_filesystem_freenode>
return result;
}
ffc08bbc: 80 01 00 3c lwz r0,60(r1)
ffc08bc0: 7f 83 e3 78 mr r3,r28
ffc08bc4: 83 a1 00 2c lwz r29,44(r1)
ffc08bc8: 7c 08 03 a6 mtlr r0
ffc08bcc: 83 81 00 28 lwz r28,40(r1)
ffc08bd0: 83 c1 00 30 lwz r30,48(r1)
ffc08bd4: 83 e1 00 34 lwz r31,52(r1)
ffc08bd8: 38 21 00 38 addi r1,r1,56
ffc08bdc: 4e 80 00 20 blr
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
ffc08be0: 48 00 d0 91 bl ffc15c70 <__errno>
ffc08be4: 38 00 00 0e li r0,14
ffc08be8: 90 03 00 00 stw r0,0(r3)
ffc08bec: 3b 80 ff ff li r28,-1
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
ffc08bf0: 7f 83 e3 78 mr r3,r28
ffc08bf4: 80 01 00 3c lwz r0,60(r1)
ffc08bf8: 83 81 00 28 lwz r28,40(r1)
ffc08bfc: 7c 08 03 a6 mtlr r0
ffc08c00: 83 a1 00 2c lwz r29,44(r1)
ffc08c04: 83 c1 00 30 lwz r30,48(r1)
ffc08c08: 83 e1 00 34 lwz r31,52(r1)
ffc08c0c: 38 21 00 38 addi r1,r1,56
ffc08c10: 4e 80 00 20 blr
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
ffc08c14: 7f e3 fb 78 mr r3,r31
ffc08c18: 4b ff e9 95 bl ffc075ac <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EINVAL );
ffc08c1c: 48 00 d0 55 bl ffc15c70 <__errno>
ffc08c20: 38 00 00 16 li r0,22
ffc08c24: 90 03 00 00 stw r0,0(r3)
ffc08c28: 4b ff ff 2c b ffc08b54 <readlink+0x58>
ffc07234 <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc07234: 94 21 ff d8 stwu r1,-40(r1)
ffc07238: 7c 08 02 a6 mflr r0
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc0723c: 3d 20 00 00 lis r9,0
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc07240: 90 01 00 2c stw r0,44(r1)
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc07244: 80 09 26 cc lwz r0,9932(r9)
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc07248: 93 41 00 10 stw r26,16(r1)
ffc0724c: 7c ba 2b 78 mr r26,r5
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc07250: 7f 83 00 40 cmplw cr7,r3,r0
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc07254: 93 21 00 0c stw r25,12(r1)
ffc07258: 93 61 00 14 stw r27,20(r1)
ffc0725c: 93 81 00 18 stw r28,24(r1)
ffc07260: 93 a1 00 1c stw r29,28(r1)
ffc07264: 93 c1 00 20 stw r30,32(r1)
ffc07268: 93 e1 00 24 stw r31,36(r1)
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc0726c: 40 9c 01 4c bge- cr7,ffc073b8 <readv+0x184>
iop = rtems_libio_iop( fd );
ffc07270: 3d 20 00 00 lis r9,0
ffc07274: 83 89 27 88 lwz r28,10120(r9)
ffc07278: 54 63 30 32 rlwinm r3,r3,6,0,25
ffc0727c: 7f 9c 1a 14 add r28,r28,r3
rtems_libio_check_is_open( iop );
ffc07280: 80 1c 00 18 lwz r0,24(r28)
ffc07284: 70 09 01 00 andi. r9,r0,256
ffc07288: 41 82 01 30 beq- ffc073b8 <readv+0x184>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
ffc0728c: 70 09 00 02 andi. r9,r0,2
ffc07290: 41 82 00 e8 beq- ffc07378 <readv+0x144> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
ffc07294: 2f 84 00 00 cmpwi cr7,r4,0
ffc07298: 41 9e 00 e0 beq- cr7,ffc07378 <readv+0x144>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
ffc0729c: 2f 85 00 00 cmpwi cr7,r5,0
ffc072a0: 40 9d 00 d8 ble- cr7,ffc07378 <readv+0x144>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
ffc072a4: 2f 85 04 00 cmpwi cr7,r5,1024
ffc072a8: 41 9d 00 d0 bgt- cr7,ffc07378 <readv+0x144> <== NEVER TAKEN
ffc072ac: 7c a9 03 a6 mtctr r5
rtems_set_errno_and_return_minus_one( EINVAL );
ffc072b0: 7c 9d 23 78 mr r29,r4
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
ffc072b4: 7c 89 23 78 mr r9,r4
ffc072b8: 39 00 00 01 li r8,1
ffc072bc: 38 00 00 00 li r0,0
/*
* 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 )
ffc072c0: 81 69 00 00 lwz r11,0(r9)
ffc072c4: 2f 8b 00 00 cmpwi cr7,r11,0
ffc072c8: 41 9e 00 b0 beq- cr7,ffc07378 <readv+0x144>
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
ffc072cc: 81 49 00 04 lwz r10,4(r9)
* 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++ ) {
ffc072d0: 39 29 00 08 addi r9,r9,8
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
ffc072d4: 7d 60 52 14 add r11,r0,r10
if ( total < old )
ffc072d8: 7f 80 58 00 cmpw cr7,r0,r11
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
ffc072dc: 31 4a ff ff addic r10,r10,-1
ffc072e0: 7d 4a 51 10 subfe r10,r10,r10
ffc072e4: 7d 08 50 38 and r8,r8,r10
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
ffc072e8: 7d 60 5b 78 mr r0,r11
if ( total < old )
ffc072ec: 41 9d 00 8c bgt- cr7,ffc07378 <readv+0x144>
* 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++ ) {
ffc072f0: 42 00 ff d0 bdnz+ ffc072c0 <readv+0x8c>
/*
* 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 ) {
ffc072f4: 2f 88 00 00 cmpwi cr7,r8,0
return 0;
ffc072f8: 3b 20 00 00 li r25,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 ) {
ffc072fc: 40 9e 00 8c bne- cr7,ffc07388 <readv+0x154>
ffc07300: 3b 60 00 00 li r27,0
ffc07304: 48 00 00 40 b ffc07344 <readv+0x110>
);
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
ffc07308: 41 82 00 28 beq- ffc07330 <readv+0xfc> <== NEVER TAKEN
iop->offset += bytes;
ffc0730c: 81 3c 00 10 lwz r9,16(r28)
ffc07310: 7c 7f 1b 78 mr r31,r3
ffc07314: 81 5c 00 14 lwz r10,20(r28)
ffc07318: 7c 7e fe 70 srawi r30,r3,31
total += bytes;
ffc0731c: 7f 39 1a 14 add r25,r25,r3
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
ffc07320: 7d 4a f8 14 addc r10,r10,r31
ffc07324: 7d 29 f1 14 adde r9,r9,r30
ffc07328: 91 3c 00 10 stw r9,16(r28)
ffc0732c: 91 5c 00 14 stw r10,20(r28)
total += bytes;
}
if (bytes != iov[ v ].iov_len)
ffc07330: 80 1d 00 04 lwz r0,4(r29)
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ffc07334: 3b bd 00 08 addi r29,r29,8
if ( bytes > 0 ) {
iop->offset += bytes;
total += bytes;
}
if (bytes != iov[ v ].iov_len)
ffc07338: 7f 03 00 00 cmpw cr6,r3,r0
ffc0733c: 40 9a 00 4c bne- cr6,ffc07388 <readv+0x154> <== NEVER TAKEN
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ffc07340: 40 9d 00 48 ble- cr7,ffc07388 <readv+0x154>
bytes = (*iop->pathinfo.handlers->read_h)(
ffc07344: 81 3c 00 24 lwz r9,36(r28)
ffc07348: 7f 83 e3 78 mr r3,r28
ffc0734c: 80 9d 00 00 lwz r4,0(r29)
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ffc07350: 3b 7b 00 01 addi r27,r27,1
bytes = (*iop->pathinfo.handlers->read_h)(
ffc07354: 80 09 00 08 lwz r0,8(r9)
ffc07358: 80 bd 00 04 lwz r5,4(r29)
ffc0735c: 7c 09 03 a6 mtctr r0
ffc07360: 4e 80 04 21 bctrl
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ffc07364: 7f 9a d8 00 cmpw cr7,r26,r27
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
ffc07368: 2c 03 00 00 cmpwi r3,0
ffc0736c: 40 80 ff 9c bge+ ffc07308 <readv+0xd4> <== ALWAYS TAKEN
return -1;
ffc07370: 3b 20 ff ff li r25,-1 <== NOT EXECUTED
ffc07374: 48 00 00 14 b ffc07388 <readv+0x154> <== NOT EXECUTED
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
ffc07378: 48 00 c1 19 bl ffc13490 <__errno>
ffc0737c: 38 00 00 16 li r0,22
ffc07380: 90 03 00 00 stw r0,0(r3)
ffc07384: 3b 20 ff ff li r25,-1
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
ffc07388: 80 01 00 2c lwz r0,44(r1)
ffc0738c: 7f 23 cb 78 mr r3,r25
ffc07390: 83 41 00 10 lwz r26,16(r1)
ffc07394: 7c 08 03 a6 mtlr r0
ffc07398: 83 21 00 0c lwz r25,12(r1)
ffc0739c: 83 61 00 14 lwz r27,20(r1)
ffc073a0: 83 81 00 18 lwz r28,24(r1)
ffc073a4: 83 a1 00 1c lwz r29,28(r1)
ffc073a8: 83 c1 00 20 lwz r30,32(r1)
ffc073ac: 83 e1 00 24 lwz r31,36(r1)
ffc073b0: 38 21 00 28 addi r1,r1,40
ffc073b4: 4e 80 00 20 blr
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
ffc073b8: 48 00 c0 d9 bl ffc13490 <__errno>
ffc073bc: 38 00 00 09 li r0,9
ffc073c0: 90 03 00 00 stw r0,0(r3)
ffc073c4: 3b 20 ff ff li r25,-1
ffc073c8: 4b ff ff c0 b ffc07388 <readv+0x154>
ffc1787c <realloc>:
void *realloc(
void *ptr,
size_t size
)
{
ffc1787c: 94 21 ff d8 stwu r1,-40(r1)
ffc17880: 7c 08 02 a6 mflr r0
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
ffc17884: 3d 20 00 00 lis r9,0
void *realloc(
void *ptr,
size_t size
)
{
ffc17888: 90 01 00 2c stw r0,44(r1)
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
ffc1788c: 80 09 27 e8 lwz r0,10216(r9)
void *realloc(
void *ptr,
size_t size
)
{
ffc17890: 93 c1 00 20 stw r30,32(r1)
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
ffc17894: 3f c0 00 00 lis r30,0
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
ffc17898: 2f 80 00 03 cmpwi cr7,r0,3
)
{
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
ffc1789c: 3b de 2a c8 addi r30,r30,10952
void *realloc(
void *ptr,
size_t size
)
{
ffc178a0: 93 a1 00 1c stw r29,28(r1)
ffc178a4: 7c 9d 23 78 mr r29,r4
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
ffc178a8: 81 3e 00 10 lwz r9,16(r30)
void *realloc(
void *ptr,
size_t size
)
{
ffc178ac: 93 e1 00 24 stw r31,36(r1)
ffc178b0: 7c 7f 1b 78 mr r31,r3
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
ffc178b4: 39 29 00 01 addi r9,r9,1
void *realloc(
void *ptr,
size_t size
)
{
ffc178b8: 93 81 00 18 stw r28,24(r1)
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
ffc178bc: 91 3e 00 10 stw r9,16(r30)
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
ffc178c0: 41 9e 00 a0 beq- cr7,ffc17960 <realloc+0xe4> <== ALWAYS TAKEN
}
/*
* Continue with realloc().
*/
if ( !ptr )
ffc178c4: 2f 9f 00 00 cmpwi cr7,r31,0
ffc178c8: 41 9e 00 88 beq- cr7,ffc17950 <realloc+0xd4>
return malloc( size );
if ( !size ) {
ffc178cc: 2f 9d 00 00 cmpwi cr7,r29,0
ffc178d0: 41 9e 00 5c beq- cr7,ffc1792c <realloc+0xb0> <== NEVER TAKEN
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
ffc178d4: 3f 80 00 00 lis r28,0
ffc178d8: 80 7c 26 dc lwz r3,9948(r28)
ffc178dc: 7f e4 fb 78 mr r4,r31
ffc178e0: 38 a1 00 08 addi r5,r1,8
ffc178e4: 48 00 01 c9 bl ffc17aac <_Protected_heap_Get_block_size>
ffc178e8: 2f 83 00 00 cmpwi cr7,r3,0
ffc178ec: 41 9e 00 50 beq- cr7,ffc1793c <realloc+0xc0>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
ffc178f0: 80 7c 26 dc lwz r3,9948(r28)
ffc178f4: 7f e4 fb 78 mr r4,r31
ffc178f8: 7f a5 eb 78 mr r5,r29
ffc178fc: 48 00 02 15 bl ffc17b10 <_Protected_heap_Resize_block>
ffc17900: 2f 83 00 00 cmpwi cr7,r3,0
ffc17904: 41 9e 00 8c beq- cr7,ffc17990 <realloc+0x114>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
ffc17908: 80 01 00 2c lwz r0,44(r1)
ffc1790c: 7f e3 fb 78 mr r3,r31
ffc17910: 83 81 00 18 lwz r28,24(r1)
ffc17914: 7c 08 03 a6 mtlr r0
ffc17918: 83 a1 00 1c lwz r29,28(r1)
ffc1791c: 83 c1 00 20 lwz r30,32(r1)
ffc17920: 83 e1 00 24 lwz r31,36(r1)
ffc17924: 38 21 00 28 addi r1,r1,40
ffc17928: 4e 80 00 20 blr
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
ffc1792c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc17930: 4b fe d1 c9 bl ffc04af8 <free> <== NOT EXECUTED
return (void *) 0;
ffc17934: 3b e0 00 00 li r31,0 <== NOT EXECUTED
ffc17938: 4b ff ff d0 b ffc17908 <realloc+0x8c> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
ffc1793c: 4b ff a7 39 bl ffc12074 <__errno>
ffc17940: 38 00 00 16 li r0,22
ffc17944: 90 03 00 00 stw r0,0(r3)
return (void *) 0;
ffc17948: 3b e0 00 00 li r31,0
ffc1794c: 4b ff ff bc b ffc17908 <realloc+0x8c>
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
ffc17950: 7f a3 eb 78 mr r3,r29
ffc17954: 4b fe d5 c1 bl ffc04f14 <malloc>
ffc17958: 7c 7f 1b 78 mr r31,r3
ffc1795c: 4b ff ff ac b ffc17908 <realloc+0x8c>
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
ffc17960: 3d 20 00 00 lis r9,0
ffc17964: 80 09 27 a4 lwz r0,10148(r9)
ffc17968: 2f 80 00 00 cmpwi cr7,r0,0
ffc1796c: 41 9e 00 0c beq- cr7,ffc17978 <realloc+0xfc> <== ALWAYS TAKEN
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
ffc17970: 3b e0 00 00 li r31,0
ffc17974: 4b ff ff 94 b ffc17908 <realloc+0x8c>
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
return (void *) 0;
if (_ISR_Nest_level > 0)
ffc17978: 3d 20 00 00 lis r9,0
ffc1797c: 80 09 2d a0 lwz r0,11680(r9)
ffc17980: 2f 80 00 00 cmpwi cr7,r0,0
ffc17984: 41 9e ff 40 beq+ cr7,ffc178c4 <realloc+0x48> <== ALWAYS TAKEN
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
ffc17988: 3b e0 00 00 li r31,0 <== NOT EXECUTED
ffc1798c: 4b ff ff 7c b ffc17908 <realloc+0x8c> <== NOT EXECUTED
* 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 );
ffc17990: 7f a3 eb 78 mr r3,r29
ffc17994: 4b fe d5 81 bl ffc04f14 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
ffc17998: 81 3e 00 04 lwz r9,4(r30)
if ( !new_area ) {
ffc1799c: 7c 7c 1b 79 mr. r28,r3
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
ffc179a0: 38 09 ff ff addi r0,r9,-1
ffc179a4: 90 1e 00 04 stw r0,4(r30)
if ( !new_area ) {
ffc179a8: 41 a2 ff c8 beq- ffc17970 <realloc+0xf4>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
ffc179ac: 80 01 00 08 lwz r0,8(r1)
ffc179b0: 7f a5 eb 78 mr r5,r29
ffc179b4: 7f 9d 00 40 cmplw cr7,r29,r0
ffc179b8: 40 9d 00 08 ble- cr7,ffc179c0 <realloc+0x144> <== NEVER TAKEN
ffc179bc: 7c 05 03 78 mr r5,r0
ffc179c0: 7f e4 fb 78 mr r4,r31
ffc179c4: 7f 83 e3 78 mr r3,r28
ffc179c8: 4b ff b3 0d bl ffc12cd4 <memcpy>
free( ptr );
ffc179cc: 7f e3 fb 78 mr r3,r31
ffc179d0: 4b fe d1 29 bl ffc04af8 <free>
return new_area;
ffc179d4: 7f 9f e3 78 mr r31,r28
ffc179d8: 4b ff ff 30 b ffc17908 <realloc+0x8c>
ffc06308 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
ffc06308: 94 21 ff b0 stwu r1,-80(r1)
ffc0630c: 7c 08 02 a6 mflr r0
ffc06310: 93 e1 00 4c stw r31,76(r1)
ffc06314: 7c 7f 1b 78 mr r31,r3
ffc06318: 90 01 00 54 stw r0,84(r1)
ffc0631c: 93 61 00 3c stw r27,60(r1)
ffc06320: 93 81 00 40 stw r28,64(r1)
ffc06324: 93 a1 00 44 stw r29,68(r1)
ffc06328: 93 c1 00 48 stw r30,72(r1)
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
ffc0632c: 4b ff ec d9 bl ffc05004 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
ffc06330: 2c 03 00 00 cmpwi r3,0
ffc06334: 40 82 01 68 bne- ffc0649c <rmdir+0x194>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
ffc06338: 3b c1 00 0c addi r30,r1,12
ffc0633c: 7f e3 fb 78 mr r3,r31
ffc06340: 38 81 00 08 addi r4,r1,8
ffc06344: 7f c5 f3 78 mr r5,r30
ffc06348: 48 00 01 89 bl ffc064d0 <rtems_filesystem_get_start_loc>
ffc0634c: 3b a0 00 00 li r29,0
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
ffc06350: 3b 80 00 00 li r28,0
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
ffc06354: 80 01 00 0c lwz r0,12(r1)
name = pathname + parentpathlen;
ffc06358: 7f bf ea 14 add r29,r31,r29
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
ffc0635c: 7f a3 eb 78 mr r3,r29
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
ffc06360: 90 01 00 20 stw r0,32(r1)
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
ffc06364: 3b e1 00 20 addi r31,r1,32
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
ffc06368: 80 01 00 10 lwz r0,16(r1)
ffc0636c: 90 01 00 24 stw r0,36(r1)
ffc06370: 80 01 00 14 lwz r0,20(r1)
ffc06374: 90 01 00 28 stw r0,40(r1)
ffc06378: 80 01 00 18 lwz r0,24(r1)
ffc0637c: 90 01 00 2c stw r0,44(r1)
ffc06380: 80 01 00 1c lwz r0,28(r1)
ffc06384: 90 01 00 30 stw r0,48(r1)
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
ffc06388: 48 00 db 79 bl ffc13f00 <strlen>
ffc0638c: 7c 64 1b 78 mr r4,r3
ffc06390: 7f a3 eb 78 mr r3,r29
ffc06394: 4b ff ec d1 bl ffc05064 <rtems_filesystem_prefix_separators>
ffc06398: 7f bd 1a 14 add r29,r29,r3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
ffc0639c: 7f a3 eb 78 mr r3,r29
ffc063a0: 48 00 db 61 bl ffc13f00 <strlen>
ffc063a4: 38 a0 00 00 li r5,0
ffc063a8: 7c 64 1b 78 mr r4,r3
ffc063ac: 7f e6 fb 78 mr r6,r31
ffc063b0: 7f a3 eb 78 mr r3,r29
ffc063b4: 38 e0 00 00 li r7,0
ffc063b8: 4b ff eb 25 bl ffc04edc <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
ffc063bc: 2f 83 00 00 cmpwi cr7,r3,0
ffc063c0: 40 9e 00 74 bne- cr7,ffc06434 <rmdir+0x12c>
}
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
ffc063c4: 81 21 00 2c lwz r9,44(r1)
ffc063c8: 7f e3 fb 78 mr r3,r31
ffc063cc: 80 09 00 10 lwz r0,16(r9)
ffc063d0: 7c 09 03 a6 mtctr r0
ffc063d4: 4e 80 04 21 bctrl
ffc063d8: 2f 83 00 01 cmpwi cr7,r3,1
ffc063dc: 40 9e 00 94 bne- cr7,ffc06470 <rmdir+0x168>
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
ffc063e0: 81 21 00 28 lwz r9,40(r1)
ffc063e4: 7f e4 fb 78 mr r4,r31
ffc063e8: 7f c3 f3 78 mr r3,r30
ffc063ec: 80 09 00 34 lwz r0,52(r9)
ffc063f0: 7c 09 03 a6 mtctr r0
ffc063f4: 4e 80 04 21 bctrl
ffc063f8: 7c 7b 1b 78 mr r27,r3
rtems_filesystem_freenode( &loc );
ffc063fc: 7f e3 fb 78 mr r3,r31
ffc06400: 4b ff ec e5 bl ffc050e4 <rtems_filesystem_freenode>
if ( free_parentloc )
ffc06404: 2f 9c 00 00 cmpwi cr7,r28,0
ffc06408: 40 9e 00 38 bne- cr7,ffc06440 <rmdir+0x138>
rtems_filesystem_freenode( &parentloc );
return result;
}
ffc0640c: 80 01 00 54 lwz r0,84(r1)
ffc06410: 7f 63 db 78 mr r3,r27
ffc06414: 83 81 00 40 lwz r28,64(r1)
ffc06418: 7c 08 03 a6 mtlr r0
ffc0641c: 83 61 00 3c lwz r27,60(r1)
ffc06420: 83 a1 00 44 lwz r29,68(r1)
ffc06424: 83 c1 00 48 lwz r30,72(r1)
ffc06428: 83 e1 00 4c lwz r31,76(r1)
ffc0642c: 38 21 00 50 addi r1,r1,80
ffc06430: 4e 80 00 20 blr
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
ffc06434: 2f 9c 00 00 cmpwi cr7,r28,0
rtems_filesystem_freenode( &parentloc );
return -1;
ffc06438: 3b 60 ff ff li r27,-1
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
ffc0643c: 41 9e ff d0 beq+ cr7,ffc0640c <rmdir+0x104>
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
ffc06440: 7f c3 f3 78 mr r3,r30
ffc06444: 4b ff ec a1 bl ffc050e4 <rtems_filesystem_freenode>
return result;
}
ffc06448: 80 01 00 54 lwz r0,84(r1)
ffc0644c: 7f 63 db 78 mr r3,r27
ffc06450: 83 81 00 40 lwz r28,64(r1)
ffc06454: 7c 08 03 a6 mtlr r0
ffc06458: 83 61 00 3c lwz r27,60(r1)
ffc0645c: 83 a1 00 44 lwz r29,68(r1)
ffc06460: 83 c1 00 48 lwz r30,72(r1)
ffc06464: 83 e1 00 4c lwz r31,76(r1)
ffc06468: 38 21 00 50 addi r1,r1,80
ffc0646c: 4e 80 00 20 blr
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
ffc06470: 7f e3 fb 78 mr r3,r31
ffc06474: 4b ff ec 71 bl ffc050e4 <rtems_filesystem_freenode>
if ( free_parentloc )
ffc06478: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0647c: 41 be 00 0c beq+ cr7,ffc06488 <rmdir+0x180> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
ffc06480: 7f c3 f3 78 mr r3,r30
ffc06484: 4b ff ec 61 bl ffc050e4 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( ENOTDIR );
ffc06488: 48 00 c8 d9 bl ffc12d60 <__errno>
ffc0648c: 38 00 00 14 li r0,20
ffc06490: 90 03 00 00 stw r0,0(r3)
ffc06494: 3b 60 ff ff li r27,-1
ffc06498: 4b ff ff 74 b ffc0640c <rmdir+0x104>
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
ffc0649c: 7c 7d 1b 78 mr r29,r3
ffc064a0: 3b c1 00 0c addi r30,r1,12
ffc064a4: 7f e3 fb 78 mr r3,r31
ffc064a8: 7f a4 eb 78 mr r4,r29
ffc064ac: 38 a0 00 02 li r5,2
ffc064b0: 7f c6 f3 78 mr r6,r30
ffc064b4: 38 e0 00 00 li r7,0
ffc064b8: 4b ff ea d1 bl ffc04f88 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
return -1;
ffc064bc: 3b 60 ff ff li r27,-1
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
ffc064c0: 2f 83 00 00 cmpwi cr7,r3,0
ffc064c4: 40 be ff 48 bne- cr7,ffc0640c <rmdir+0x104> <== NEVER TAKEN
return -1;
free_parentloc = true;
ffc064c8: 3b 80 00 01 li r28,1
ffc064cc: 4b ff fe 88 b ffc06354 <rmdir+0x4c>
ffc11900 <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
ffc11900: 94 21 ff e0 stwu r1,-32(r1)
ffc11904: 7c 08 02 a6 mflr r0
ffc11908: 90 01 00 24 stw r0,36(r1)
ffc1190c: 38 00 00 20 li r0,32
ffc11910: 93 81 00 10 stw r28,16(r1)
ffc11914: 7c 7c 1b 78 mr r28,r3
ffc11918: 93 a1 00 14 stw r29,20(r1)
uint32_t b;
uint32_t local_value = 0;
ffc1191c: 3b a0 00 00 li r29,0
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
ffc11920: 93 c1 00 18 stw r30,24(r1)
ffc11924: 7c 9e 23 78 mr r30,r4
ffc11928: 93 e1 00 1c stw r31,28(r1)
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
ffc1192c: 3b e0 00 01 li r31,1
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
ffc11930: 90 01 00 08 stw r0,8(r1)
ffc11934: 48 00 00 18 b ffc1194c <rtems_assoc_local_by_remote_bitfield+0x4c>
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
ffc11938: 80 01 00 08 lwz r0,8(r1)
ffc1193c: 57 ff 08 3c rlwinm r31,r31,1,0,30
ffc11940: 35 20 ff ff addic. r9,r0,-1
ffc11944: 91 21 00 08 stw r9,8(r1)
ffc11948: 41 82 00 30 beq- ffc11978 <rtems_assoc_local_by_remote_bitfield+0x78>
if (b & remote_value)
ffc1194c: 7f e9 f0 39 and. r9,r31,r30
ffc11950: 41 82 ff e8 beq+ ffc11938 <rtems_assoc_local_by_remote_bitfield+0x38>
local_value |= rtems_assoc_local_by_remote(ap, b);
ffc11954: 7f e4 fb 78 mr r4,r31
ffc11958: 7f 83 e3 78 mr r3,r28
ffc1195c: 48 00 00 41 bl ffc1199c <rtems_assoc_local_by_remote>
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
ffc11960: 80 01 00 08 lwz r0,8(r1)
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
ffc11964: 7f bd 1b 78 or r29,r29,r3
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
ffc11968: 35 20 ff ff addic. r9,r0,-1
ffc1196c: 57 ff 08 3c rlwinm r31,r31,1,0,30
ffc11970: 91 21 00 08 stw r9,8(r1)
ffc11974: 40 82 ff d8 bne+ ffc1194c <rtems_assoc_local_by_remote_bitfield+0x4c><== ALWAYS TAKEN
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
}
return local_value;
}
ffc11978: 80 01 00 24 lwz r0,36(r1)
ffc1197c: 7f a3 eb 78 mr r3,r29
ffc11980: 83 81 00 10 lwz r28,16(r1)
ffc11984: 7c 08 03 a6 mtlr r0
ffc11988: 83 a1 00 14 lwz r29,20(r1)
ffc1198c: 83 c1 00 18 lwz r30,24(r1)
ffc11990: 83 e1 00 1c lwz r31,28(r1)
ffc11994: 38 21 00 20 addi r1,r1,32
ffc11998: 4e 80 00 20 blr
ffc1599c <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
ffc1599c: 94 21 ff f0 stwu r1,-16(r1)
ffc159a0: 7c 08 02 a6 mflr r0
ffc159a4: 90 01 00 14 stw r0,20(r1)
ffc159a8: 93 e1 00 0c stw r31,12(r1)
ffc159ac: 7c 7f 1b 78 mr r31,r3
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
ffc159b0: 80 63 00 00 lwz r3,0(r3)
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
ffc159b4: 93 c1 00 08 stw r30,8(r1)
ffc159b8: 7c 9e 23 78 mr r30,r4
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
ffc159bc: 2f 83 00 00 cmpwi cr7,r3,0
ffc159c0: 41 9e 00 94 beq- cr7,ffc15a54 <rtems_assoc_ptr_by_local+0xb8>
ffc159c4: 3c 80 ff c3 lis r4,-61
ffc159c8: 38 84 a9 e8 addi r4,r4,-22040
ffc159cc: 48 00 4f f5 bl ffc1a9c0 <strcmp>
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
const rtems_assoc_t *default_ap = 0;
ffc159d0: 39 20 00 00 li r9,0
if (rtems_assoc_is_default(ap))
ffc159d4: 2f 83 00 00 cmpwi cr7,r3,0
ffc159d8: 40 9e 00 34 bne- cr7,ffc15a0c <rtems_assoc_ptr_by_local+0x70>
default_ap = ap++;
for ( ; ap->name; ap++)
ffc159dc: 81 3f 00 0c lwz r9,12(r31)
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
ffc159e0: 38 1f 00 0c addi r0,r31,12
for ( ; ap->name; ap++)
ffc159e4: 2f 89 00 00 cmpwi cr7,r9,0
ffc159e8: 41 9e 00 30 beq- cr7,ffc15a18 <rtems_assoc_ptr_by_local+0x7c><== NEVER TAKEN
ffc159ec: 7f e9 fb 78 mr r9,r31
ffc159f0: 7c 1f 03 78 mr r31,r0
if (ap->local_value == local_value)
ffc159f4: 80 1f 00 04 lwz r0,4(r31)
ffc159f8: 7f 80 f0 00 cmpw cr7,r0,r30
ffc159fc: 41 9e 00 1c beq- cr7,ffc15a18 <rtems_assoc_ptr_by_local+0x7c><== NEVER TAKEN
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
ffc15a00: 84 1f 00 0c lwzu r0,12(r31)
ffc15a04: 2f 80 00 00 cmpwi cr7,r0,0
ffc15a08: 41 9e 00 2c beq- cr7,ffc15a34 <rtems_assoc_ptr_by_local+0x98>
if (ap->local_value == local_value)
ffc15a0c: 80 1f 00 04 lwz r0,4(r31)
ffc15a10: 7f 80 f0 00 cmpw cr7,r0,r30
ffc15a14: 40 9e ff ec bne+ cr7,ffc15a00 <rtems_assoc_ptr_by_local+0x64>
return ap;
return default_ap;
}
ffc15a18: 80 01 00 14 lwz r0,20(r1)
ffc15a1c: 7f e3 fb 78 mr r3,r31
ffc15a20: 83 c1 00 08 lwz r30,8(r1)
ffc15a24: 7c 08 03 a6 mtlr r0
ffc15a28: 83 e1 00 0c lwz r31,12(r1)
ffc15a2c: 38 21 00 10 addi r1,r1,16
ffc15a30: 4e 80 00 20 blr
ffc15a34: 80 01 00 14 lwz r0,20(r1)
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
ffc15a38: 7d 3f 4b 78 mr r31,r9
if (ap->local_value == local_value)
return ap;
return default_ap;
}
ffc15a3c: 7f e3 fb 78 mr r3,r31
ffc15a40: 83 c1 00 08 lwz r30,8(r1)
ffc15a44: 7c 08 03 a6 mtlr r0
ffc15a48: 83 e1 00 0c lwz r31,12(r1)
ffc15a4c: 38 21 00 10 addi r1,r1,16
ffc15a50: 4e 80 00 20 blr
ffc15a54: 80 01 00 14 lwz r0,20(r1)
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
const rtems_assoc_t *default_ap = 0;
ffc15a58: 3b e0 00 00 li r31,0
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
return ap;
return default_ap;
}
ffc15a5c: 7f e3 fb 78 mr r3,r31
ffc15a60: 83 c1 00 08 lwz r30,8(r1)
ffc15a64: 7c 08 03 a6 mtlr r0
ffc15a68: 83 e1 00 0c lwz r31,12(r1)
ffc15a6c: 38 21 00 10 addi r1,r1,16
ffc15a70: 4e 80 00 20 blr
ffc057ec <rtems_assoc_ptr_by_name>:
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
ffc057ec: 94 21 ff e8 stwu r1,-24(r1)
ffc057f0: 7c 08 02 a6 mflr r0
ffc057f4: 90 01 00 1c stw r0,28(r1)
ffc057f8: 93 e1 00 14 stw r31,20(r1)
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
ffc057fc: 83 e3 00 00 lwz r31,0(r3)
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
ffc05800: 93 a1 00 0c stw r29,12(r1)
ffc05804: 7c 9d 23 78 mr r29,r4
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
ffc05808: 2f 9f 00 00 cmpwi cr7,r31,0
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
ffc0580c: 93 c1 00 10 stw r30,16(r1)
ffc05810: 7c 7e 1b 78 mr r30,r3
ffc05814: 93 81 00 08 stw r28,8(r1)
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
ffc05818: 41 9e 00 b8 beq- cr7,ffc058d0 <rtems_assoc_ptr_by_name+0xe4>
ffc0581c: 3c 80 ff c2 lis r4,-62
ffc05820: 7f e3 fb 78 mr r3,r31
ffc05824: 38 84 9b 88 addi r4,r4,-25720
ffc05828: 48 00 ea f1 bl ffc14318 <strcmp>
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
const rtems_assoc_t *default_ap = 0;
ffc0582c: 3b 80 00 00 li r28,0
if (rtems_assoc_is_default(ap))
ffc05830: 2f 83 00 00 cmpwi cr7,r3,0
ffc05834: 40 9e 00 3c bne- cr7,ffc05870 <rtems_assoc_ptr_by_name+0x84>
default_ap = ap++;
for ( ; ap->name; ap++)
ffc05838: 83 fe 00 0c lwz r31,12(r30)
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
ffc0583c: 38 1e 00 0c addi r0,r30,12
for ( ; ap->name; ap++)
ffc05840: 2f 9f 00 00 cmpwi cr7,r31,0
ffc05844: 41 9e 00 40 beq- cr7,ffc05884 <rtems_assoc_ptr_by_name+0x98><== NEVER TAKEN
if (strcmp(ap->name, name) == 0)
ffc05848: 7f e3 fb 78 mr r3,r31
ffc0584c: 7f a4 eb 78 mr r4,r29
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
ffc05850: 7f dc f3 78 mr r28,r30
ffc05854: 7c 1e 03 78 mr r30,r0
if (strcmp(ap->name, name) == 0)
ffc05858: 48 00 ea c1 bl ffc14318 <strcmp>
ffc0585c: 2f 83 00 00 cmpwi cr7,r3,0
ffc05860: 41 9e 00 24 beq- cr7,ffc05884 <rtems_assoc_ptr_by_name+0x98><== NEVER TAKEN
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
ffc05864: 87 fe 00 0c lwzu r31,12(r30)
ffc05868: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0586c: 41 9e 00 3c beq- cr7,ffc058a8 <rtems_assoc_ptr_by_name+0xbc>
if (strcmp(ap->name, name) == 0)
ffc05870: 7f e3 fb 78 mr r3,r31
ffc05874: 7f a4 eb 78 mr r4,r29
ffc05878: 48 00 ea a1 bl ffc14318 <strcmp>
ffc0587c: 2f 83 00 00 cmpwi cr7,r3,0
ffc05880: 40 9e ff e4 bne+ cr7,ffc05864 <rtems_assoc_ptr_by_name+0x78>
return ap;
return default_ap;
}
ffc05884: 80 01 00 1c lwz r0,28(r1)
ffc05888: 7f c3 f3 78 mr r3,r30
ffc0588c: 83 81 00 08 lwz r28,8(r1)
ffc05890: 7c 08 03 a6 mtlr r0
ffc05894: 83 a1 00 0c lwz r29,12(r1)
ffc05898: 83 c1 00 10 lwz r30,16(r1)
ffc0589c: 83 e1 00 14 lwz r31,20(r1)
ffc058a0: 38 21 00 18 addi r1,r1,24
ffc058a4: 4e 80 00 20 blr
ffc058a8: 80 01 00 1c lwz r0,28(r1)
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
ffc058ac: 7f 9e e3 78 mr r30,r28
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
ffc058b0: 7f c3 f3 78 mr r3,r30
ffc058b4: 83 81 00 08 lwz r28,8(r1)
ffc058b8: 7c 08 03 a6 mtlr r0
ffc058bc: 83 a1 00 0c lwz r29,12(r1)
ffc058c0: 83 c1 00 10 lwz r30,16(r1)
ffc058c4: 83 e1 00 14 lwz r31,20(r1)
ffc058c8: 38 21 00 18 addi r1,r1,24
ffc058cc: 4e 80 00 20 blr
ffc058d0: 80 01 00 1c lwz r0,28(r1)
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
const rtems_assoc_t *default_ap = 0;
ffc058d4: 3b c0 00 00 li r30,0
for ( ; ap->name; ap++)
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
ffc058d8: 7f c3 f3 78 mr r3,r30
ffc058dc: 83 81 00 08 lwz r28,8(r1)
ffc058e0: 7c 08 03 a6 mtlr r0
ffc058e4: 83 a1 00 0c lwz r29,12(r1)
ffc058e8: 83 c1 00 10 lwz r30,16(r1)
ffc058ec: 83 e1 00 14 lwz r31,20(r1)
ffc058f0: 38 21 00 18 addi r1,r1,24
ffc058f4: 4e 80 00 20 blr
ffc119cc <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
ffc119cc: 94 21 ff f0 stwu r1,-16(r1)
ffc119d0: 7c 08 02 a6 mflr r0
ffc119d4: 90 01 00 14 stw r0,20(r1)
ffc119d8: 93 e1 00 0c stw r31,12(r1)
ffc119dc: 7c 7f 1b 78 mr r31,r3
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
ffc119e0: 80 63 00 00 lwz r3,0(r3)
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
ffc119e4: 93 c1 00 08 stw r30,8(r1)
ffc119e8: 7c 9e 23 78 mr r30,r4
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
ffc119ec: 2f 83 00 00 cmpwi cr7,r3,0
ffc119f0: 41 9e 00 94 beq- cr7,ffc11a84 <rtems_assoc_ptr_by_remote+0xb8>
ffc119f4: 3c 80 ff c2 lis r4,-62
ffc119f8: 38 84 90 98 addi r4,r4,-28520
ffc119fc: 48 00 17 3d bl ffc13138 <strcmp>
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
const rtems_assoc_t *default_ap = 0;
ffc11a00: 39 20 00 00 li r9,0
if (rtems_assoc_is_default(ap))
ffc11a04: 2f 83 00 00 cmpwi cr7,r3,0
ffc11a08: 40 9e 00 34 bne- cr7,ffc11a3c <rtems_assoc_ptr_by_remote+0x70>
default_ap = ap++;
for ( ; ap->name; ap++)
ffc11a0c: 81 3f 00 0c lwz r9,12(r31)
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
ffc11a10: 38 1f 00 0c addi r0,r31,12
for ( ; ap->name; ap++)
ffc11a14: 2f 89 00 00 cmpwi cr7,r9,0
ffc11a18: 41 9e 00 30 beq- cr7,ffc11a48 <rtems_assoc_ptr_by_remote+0x7c><== NEVER TAKEN
ffc11a1c: 7f e9 fb 78 mr r9,r31
ffc11a20: 7c 1f 03 78 mr r31,r0
if (ap->remote_value == remote_value)
ffc11a24: 80 1f 00 08 lwz r0,8(r31)
ffc11a28: 7f 80 f0 00 cmpw cr7,r0,r30
ffc11a2c: 41 9e 00 1c beq- cr7,ffc11a48 <rtems_assoc_ptr_by_remote+0x7c><== NEVER TAKEN
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
ffc11a30: 84 1f 00 0c lwzu r0,12(r31)
ffc11a34: 2f 80 00 00 cmpwi cr7,r0,0
ffc11a38: 41 9e 00 2c beq- cr7,ffc11a64 <rtems_assoc_ptr_by_remote+0x98>
if (ap->remote_value == remote_value)
ffc11a3c: 80 1f 00 08 lwz r0,8(r31)
ffc11a40: 7f 80 f0 00 cmpw cr7,r0,r30
ffc11a44: 40 9e ff ec bne+ cr7,ffc11a30 <rtems_assoc_ptr_by_remote+0x64>
return ap;
return default_ap;
}
ffc11a48: 80 01 00 14 lwz r0,20(r1)
ffc11a4c: 7f e3 fb 78 mr r3,r31
ffc11a50: 83 c1 00 08 lwz r30,8(r1)
ffc11a54: 7c 08 03 a6 mtlr r0
ffc11a58: 83 e1 00 0c lwz r31,12(r1)
ffc11a5c: 38 21 00 10 addi r1,r1,16
ffc11a60: 4e 80 00 20 blr
ffc11a64: 80 01 00 14 lwz r0,20(r1)
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
ffc11a68: 7d 3f 4b 78 mr r31,r9
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
ffc11a6c: 7f e3 fb 78 mr r3,r31
ffc11a70: 83 c1 00 08 lwz r30,8(r1)
ffc11a74: 7c 08 03 a6 mtlr r0
ffc11a78: 83 e1 00 0c lwz r31,12(r1)
ffc11a7c: 38 21 00 10 addi r1,r1,16
ffc11a80: 4e 80 00 20 blr
ffc11a84: 80 01 00 14 lwz r0,20(r1)
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
const rtems_assoc_t *default_ap = 0;
ffc11a88: 3b e0 00 00 li r31,0
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
ffc11a8c: 7f e3 fb 78 mr r3,r31
ffc11a90: 83 c1 00 08 lwz r30,8(r1)
ffc11a94: 7c 08 03 a6 mtlr r0
ffc11a98: 83 e1 00 0c lwz r31,12(r1)
ffc11a9c: 38 21 00 10 addi r1,r1,16
ffc11aa0: 4e 80 00 20 blr
ffc059d0 <rtems_assoc_remote_by_local_bitfield>:
uint32_t rtems_assoc_remote_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
ffc059d0: 94 21 ff e0 stwu r1,-32(r1)
ffc059d4: 7c 08 02 a6 mflr r0
ffc059d8: 90 01 00 24 stw r0,36(r1)
ffc059dc: 38 00 00 20 li r0,32
ffc059e0: 93 81 00 10 stw r28,16(r1)
ffc059e4: 7c 7c 1b 78 mr r28,r3
ffc059e8: 93 a1 00 14 stw r29,20(r1)
uint32_t b;
uint32_t remote_value = 0;
ffc059ec: 3b a0 00 00 li r29,0
uint32_t rtems_assoc_remote_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
ffc059f0: 93 c1 00 18 stw r30,24(r1)
ffc059f4: 7c 9e 23 78 mr r30,r4
ffc059f8: 93 e1 00 1c stw r31,28(r1)
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
ffc059fc: 3b e0 00 01 li r31,1
uint32_t rtems_assoc_remote_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
ffc05a00: 90 01 00 08 stw r0,8(r1)
ffc05a04: 48 00 00 18 b ffc05a1c <rtems_assoc_remote_by_local_bitfield+0x4c>
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
ffc05a08: 80 01 00 08 lwz r0,8(r1)
ffc05a0c: 57 ff 08 3c rlwinm r31,r31,1,0,30
ffc05a10: 35 20 ff ff addic. r9,r0,-1
ffc05a14: 91 21 00 08 stw r9,8(r1)
ffc05a18: 41 82 00 30 beq- ffc05a48 <rtems_assoc_remote_by_local_bitfield+0x78>
if (b & local_value)
ffc05a1c: 7f e9 f0 39 and. r9,r31,r30
ffc05a20: 41 82 ff e8 beq+ ffc05a08 <rtems_assoc_remote_by_local_bitfield+0x38>
remote_value |= rtems_assoc_remote_by_local(ap, b);
ffc05a24: 7f e4 fb 78 mr r4,r31
ffc05a28: 7f 83 e3 78 mr r3,r28
ffc05a2c: 48 00 00 41 bl ffc05a6c <rtems_assoc_remote_by_local>
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
ffc05a30: 80 01 00 08 lwz r0,8(r1)
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
ffc05a34: 7f bd 1b 78 or r29,r29,r3
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
ffc05a38: 35 20 ff ff addic. r9,r0,-1
ffc05a3c: 57 ff 08 3c rlwinm r31,r31,1,0,30
ffc05a40: 91 21 00 08 stw r9,8(r1)
ffc05a44: 40 82 ff d8 bne+ ffc05a1c <rtems_assoc_remote_by_local_bitfield+0x4c><== ALWAYS TAKEN
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
return remote_value;
}
ffc05a48: 80 01 00 24 lwz r0,36(r1)
ffc05a4c: 7f a3 eb 78 mr r3,r29
ffc05a50: 83 81 00 10 lwz r28,16(r1)
ffc05a54: 7c 08 03 a6 mtlr r0
ffc05a58: 83 a1 00 14 lwz r29,20(r1)
ffc05a5c: 83 c1 00 18 lwz r30,24(r1)
ffc05a60: 83 e1 00 1c lwz r31,28(r1)
ffc05a64: 38 21 00 20 addi r1,r1,32
ffc05a68: 4e 80 00 20 blr
ffc12b68 <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
ffc12b68: 94 21 ff d0 stwu r1,-48(r1)
ffc12b6c: 7c 08 02 a6 mflr r0
ffc12b70: 93 e1 00 2c stw r31,44(r1)
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
ffc12b74: 7c 7f 1b 79 mr. r31,r3
return RTEMS_INVALID_NAME;
ffc12b78: 38 60 00 03 li r3,3
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
ffc12b7c: 93 a1 00 24 stw r29,36(r1)
ffc12b80: 7c dd 33 78 mr r29,r6
ffc12b84: 90 01 00 34 stw r0,52(r1)
ffc12b88: 93 81 00 20 stw r28,32(r1)
ffc12b8c: 93 c1 00 28 stw r30,40(r1)
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
ffc12b90: 41 82 00 90 beq- ffc12c20 <rtems_barrier_create+0xb8>
return RTEMS_INVALID_NAME;
if ( !id )
ffc12b94: 2f 86 00 00 cmpwi cr7,r6,0
return RTEMS_INVALID_ADDRESS;
ffc12b98: 38 60 00 09 li r3,9
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
ffc12b9c: 41 9e 00 84 beq- cr7,ffc12c20 <rtems_barrier_create+0xb8>
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
ffc12ba0: 70 80 00 10 andi. r0,r4,16
ffc12ba4: 41 82 00 9c beq- ffc12c40 <rtems_barrier_create+0xd8>
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
ffc12ba8: 2f 85 00 00 cmpwi cr7,r5,0
if ( !id )
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
ffc12bac: 38 00 00 00 li r0,0
ffc12bb0: 90 01 00 08 stw r0,8(r1)
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
ffc12bb4: 38 60 00 0a li r3,10
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
ffc12bb8: 41 9e 00 68 beq- cr7,ffc12c20 <rtems_barrier_create+0xb8>
ffc12bbc: 3d 20 00 00 lis r9,0
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
ffc12bc0: 90 a1 00 0c stw r5,12(r1)
ffc12bc4: 81 69 27 a4 lwz r11,10148(r9)
ffc12bc8: 38 0b 00 01 addi r0,r11,1
ffc12bcc: 90 09 27 a4 stw r0,10148(r9)
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void )
{
return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information );
ffc12bd0: 3f 80 00 00 lis r28,0
ffc12bd4: 90 81 00 18 stw r4,24(r1)
ffc12bd8: 3b 9c 2e 20 addi r28,r28,11808
ffc12bdc: 7f 83 e3 78 mr r3,r28
ffc12be0: 4b ff a4 c1 bl ffc0d0a0 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
ffc12be4: 80 81 00 18 lwz r4,24(r1)
ffc12be8: 7c 7e 1b 79 mr. r30,r3
ffc12bec: 41 82 00 90 beq- ffc12c7c <rtems_barrier_create+0x114> <== NEVER TAKEN
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
ffc12bf0: 90 9e 00 10 stw r4,16(r30)
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
ffc12bf4: 38 7e 00 14 addi r3,r30,20
ffc12bf8: 38 81 00 08 addi r4,r1,8
ffc12bfc: 48 00 0a d1 bl ffc136cc <_CORE_barrier_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
ffc12c00: 80 1e 00 08 lwz r0,8(r30)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc12c04: 81 7c 00 1c lwz r11,28(r28)
ffc12c08: 54 09 13 ba rlwinm r9,r0,2,14,29
ffc12c0c: 7f cb 49 2e stwx r30,r11,r9
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc12c10: 93 fe 00 0c stw r31,12(r30)
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
ffc12c14: 90 1d 00 00 stw r0,0(r29)
_Thread_Enable_dispatch();
ffc12c18: 4b ff ba c9 bl ffc0e6e0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc12c1c: 38 60 00 00 li r3,0
}
ffc12c20: 80 01 00 34 lwz r0,52(r1)
ffc12c24: 83 81 00 20 lwz r28,32(r1)
ffc12c28: 7c 08 03 a6 mtlr r0
ffc12c2c: 83 a1 00 24 lwz r29,36(r1)
ffc12c30: 83 c1 00 28 lwz r30,40(r1)
ffc12c34: 83 e1 00 2c lwz r31,44(r1)
ffc12c38: 38 21 00 30 addi r1,r1,48
ffc12c3c: 4e 80 00 20 blr
ffc12c40: 3d 20 00 00 lis r9,0
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
ffc12c44: 90 a1 00 0c stw r5,12(r1)
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
ffc12c48: 38 00 00 01 li r0,1
ffc12c4c: 81 69 27 a4 lwz r11,10148(r9)
ffc12c50: 90 01 00 08 stw r0,8(r1)
ffc12c54: 38 0b 00 01 addi r0,r11,1
ffc12c58: 90 09 27 a4 stw r0,10148(r9)
ffc12c5c: 3f 80 00 00 lis r28,0
ffc12c60: 90 81 00 18 stw r4,24(r1)
ffc12c64: 3b 9c 2e 20 addi r28,r28,11808
ffc12c68: 7f 83 e3 78 mr r3,r28
ffc12c6c: 4b ff a4 35 bl ffc0d0a0 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
ffc12c70: 80 81 00 18 lwz r4,24(r1)
ffc12c74: 7c 7e 1b 79 mr. r30,r3
ffc12c78: 40 82 ff 78 bne+ ffc12bf0 <rtems_barrier_create+0x88>
_Thread_Enable_dispatch();
ffc12c7c: 4b ff ba 65 bl ffc0e6e0 <_Thread_Enable_dispatch>
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
ffc12c80: 80 01 00 34 lwz r0,52(r1)
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
ffc12c84: 38 60 00 05 li r3,5
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
ffc12c88: 83 81 00 20 lwz r28,32(r1)
ffc12c8c: 7c 08 03 a6 mtlr r0
ffc12c90: 83 a1 00 24 lwz r29,36(r1)
ffc12c94: 83 c1 00 28 lwz r30,40(r1)
ffc12c98: 83 e1 00 2c lwz r31,44(r1)
ffc12c9c: 38 21 00 30 addi r1,r1,48
ffc12ca0: 4e 80 00 20 blr
ffc041e8 <rtems_bsp_cmdline_get_param>:
size_t length
)
{
const char *p;
if ( !name )
ffc041e8: 2f 83 00 00 cmpwi cr7,r3,0
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
ffc041ec: 94 21 ff e8 stwu r1,-24(r1)
ffc041f0: 7c 08 02 a6 mflr r0
ffc041f4: 93 e1 00 14 stw r31,20(r1)
const char *p;
if ( !name )
return NULL;
ffc041f8: 3b e0 00 00 li r31,0
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
ffc041fc: 90 01 00 1c stw r0,28(r1)
const char *p;
if ( !name )
ffc04200: 40 9e 00 1c bne- cr7,ffc0421c <rtems_bsp_cmdline_get_param+0x34>
return NULL;
copy_string( p, value, length );
return value;
}
ffc04204: 80 01 00 1c lwz r0,28(r1)
ffc04208: 7f e3 fb 78 mr r3,r31
ffc0420c: 83 e1 00 14 lwz r31,20(r1)
ffc04210: 38 21 00 18 addi r1,r1,24
ffc04214: 7c 08 03 a6 mtlr r0
ffc04218: 4e 80 00 20 blr
const char *p;
if ( !name )
return NULL;
if ( !value )
ffc0421c: 2f 84 00 00 cmpwi cr7,r4,0
ffc04220: 41 9e ff e4 beq+ cr7,ffc04204 <rtems_bsp_cmdline_get_param+0x1c>
return NULL;
if ( !length )
ffc04224: 2f 85 00 00 cmpwi cr7,r5,0
ffc04228: 41 9e ff dc beq+ cr7,ffc04204 <rtems_bsp_cmdline_get_param+0x1c>
return NULL;
value[0] = '\0';
ffc0422c: 9b e4 00 00 stb r31,0(r4)
p = rtems_bsp_cmdline_get_param_raw( name );
ffc04230: 90 81 00 08 stw r4,8(r1)
ffc04234: 90 a1 00 0c stw r5,12(r1)
ffc04238: 48 00 00 8d bl ffc042c4 <rtems_bsp_cmdline_get_param_raw>
if ( !p )
ffc0423c: 2c 03 00 00 cmpwi r3,0
ffc04240: 80 81 00 08 lwz r4,8(r1)
ffc04244: 80 a1 00 0c lwz r5,12(r1)
ffc04248: 41 a2 ff bc beq- ffc04204 <rtems_bsp_cmdline_get_param+0x1c>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
ffc0424c: 88 03 00 00 lbz r0,0(r3)
ffc04250: 7c 9f 23 78 mr r31,r4
ffc04254: 2f 80 00 00 cmpwi cr7,r0,0
ffc04258: 41 be ff ac beq- cr7,ffc04204 <rtems_bsp_cmdline_get_param+0x1c><== NEVER TAKEN
ffc0425c: 34 a5 ff ff addic. r5,r5,-1
ffc04260: 41 a2 ff a4 beq- ffc04204 <rtems_bsp_cmdline_get_param+0x1c><== NEVER TAKEN
ffc04264: 39 60 00 00 li r11,0
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
break;
value[i++] = *p++;
value[i] = '\0';
ffc04268: 7c a9 03 a6 mtctr r5
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
ffc0426c: 39 20 00 00 li r9,0
ffc04270: 39 40 00 00 li r10,0
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
break;
value[i++] = *p++;
value[i] = '\0';
ffc04274: 39 00 00 00 li r8,0
ffc04278: 48 00 00 30 b ffc042a8 <rtems_bsp_cmdline_get_param+0xc0>
quotes=0;
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
ffc0427c: 2f 80 00 20 cmpwi cr7,r0,32
ffc04280: 40 82 00 08 bne- ffc04288 <rtems_bsp_cmdline_get_param+0xa0>
ffc04284: 41 9e 00 38 beq- cr7,ffc042bc <rtems_bsp_cmdline_get_param+0xd4>
break;
value[i++] = *p++;
ffc04288: 39 29 00 01 addi r9,r9,1
ffc0428c: 7c 04 59 ae stbx r0,r4,r11
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
ffc04290: 7d 2b 4b 78 mr r11,r9
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
break;
value[i++] = *p++;
value[i] = '\0';
ffc04294: 7d 04 49 ae stbx r8,r4,r9
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
ffc04298: 7c 03 48 ae lbzx r0,r3,r9
ffc0429c: 2f 80 00 00 cmpwi cr7,r0,0
ffc042a0: 41 9e 00 1c beq- cr7,ffc042bc <rtems_bsp_cmdline_get_param+0xd4>
ffc042a4: 42 40 00 18 bdz- ffc042bc <rtems_bsp_cmdline_get_param+0xd4>
if ( *p == '\"' ) {
ffc042a8: 2f 80 00 22 cmpwi cr7,r0,34
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
ffc042ac: 71 47 00 01 andi. r7,r10,1
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
ffc042b0: 40 9e ff cc bne+ cr7,ffc0427c <rtems_bsp_cmdline_get_param+0x94>
quotes++;
ffc042b4: 39 4a 00 01 addi r10,r10,1
ffc042b8: 4b ff ff d0 b ffc04288 <rtems_bsp_cmdline_get_param+0xa0>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
ffc042bc: 7c 9f 23 78 mr r31,r4
ffc042c0: 4b ff ff 44 b ffc04204 <rtems_bsp_cmdline_get_param+0x1c>
ffc09f78 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
ffc09f78: 94 21 ff d0 stwu r1,-48(r1)
ffc09f7c: 7c 08 02 a6 mflr r0
ffc09f80: 93 e1 00 2c stw r31,44(r1)
ffc09f84: 90 01 00 34 stw r0,52(r1)
ffc09f88: 93 41 00 18 stw r26,24(r1)
ffc09f8c: 7c da 33 78 mr r26,r6
ffc09f90: 93 61 00 1c stw r27,28(r1)
ffc09f94: 7c 7b 1b 78 mr r27,r3
ffc09f98: 93 81 00 20 stw r28,32(r1)
ffc09f9c: 7c 9c 23 78 mr r28,r4
ffc09fa0: 93 a1 00 24 stw r29,36(r1)
ffc09fa4: 7c bd 2b 78 mr r29,r5
ffc09fa8: 93 c1 00 28 stw r30,40(r1)
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
ffc09fac: 3b c1 00 08 addi r30,r1,8
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
ffc09fb0: 7f 63 db 78 mr r3,r27
ffc09fb4: 48 00 07 81 bl ffc0a734 <_Chain_Get>
ffc09fb8: 38 80 00 00 li r4,0
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
ffc09fbc: 7c 7f 1b 79 mr. r31,r3
) {
rtems_event_set out;
sc = rtems_event_receive(
ffc09fc0: 7f a5 eb 78 mr r5,r29
ffc09fc4: 7f c6 f3 78 mr r6,r30
ffc09fc8: 7f 83 e3 78 mr r3,r28
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
ffc09fcc: 40 82 00 3c bne- ffc0a008 <rtems_chain_get_with_wait+0x90>
) {
rtems_event_set out;
sc = rtems_event_receive(
ffc09fd0: 4b ff ef 35 bl ffc08f04 <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
ffc09fd4: 2c 03 00 00 cmpwi r3,0
ffc09fd8: 41 82 ff d8 beq+ ffc09fb0 <rtems_chain_get_with_wait+0x38><== NEVER TAKEN
}
*node_ptr = node;
return sc;
}
ffc09fdc: 80 01 00 34 lwz r0,52(r1)
timeout,
&out
);
}
*node_ptr = node;
ffc09fe0: 93 fa 00 00 stw r31,0(r26)
return sc;
}
ffc09fe4: 7c 08 03 a6 mtlr r0
ffc09fe8: 83 41 00 18 lwz r26,24(r1)
ffc09fec: 83 61 00 1c lwz r27,28(r1)
ffc09ff0: 83 81 00 20 lwz r28,32(r1)
ffc09ff4: 83 a1 00 24 lwz r29,36(r1)
ffc09ff8: 83 c1 00 28 lwz r30,40(r1)
ffc09ffc: 83 e1 00 2c lwz r31,44(r1)
ffc0a000: 38 21 00 30 addi r1,r1,48
ffc0a004: 4e 80 00 20 blr
ffc0a008: 80 01 00 34 lwz r0,52(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
ffc0a00c: 38 60 00 00 li r3,0
timeout,
&out
);
}
*node_ptr = node;
ffc0a010: 93 fa 00 00 stw r31,0(r26)
return sc;
}
ffc0a014: 7c 08 03 a6 mtlr r0
ffc0a018: 83 41 00 18 lwz r26,24(r1)
ffc0a01c: 83 61 00 1c lwz r27,28(r1)
ffc0a020: 83 81 00 20 lwz r28,32(r1)
ffc0a024: 83 a1 00 24 lwz r29,36(r1)
ffc0a028: 83 c1 00 28 lwz r30,40(r1)
ffc0a02c: 83 e1 00 2c lwz r31,44(r1)
ffc0a030: 38 21 00 30 addi r1,r1,48
ffc0a034: 4e 80 00 20 blr
ffc04f80 <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc04f80: 94 21 ff 50 stwu r1,-176(r1)
ffc04f84: 7c 08 02 a6 mflr r0
ffc04f88: 90 01 00 b4 stw r0,180(r1)
Timestamp_Control uptime, total, ran, uptime_at_last_reset;
#else
uint32_t total_units = 0;
#endif
if ( !print )
ffc04f8c: 7c 80 23 79 mr. r0,r4
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc04f90: 93 61 00 9c stw r27,156(r1)
ffc04f94: 7c 7b 1b 78 mr r27,r3
ffc04f98: 91 c1 00 68 stw r14,104(r1)
ffc04f9c: 91 e1 00 6c stw r15,108(r1)
ffc04fa0: 92 01 00 70 stw r16,112(r1)
ffc04fa4: 92 21 00 74 stw r17,116(r1)
ffc04fa8: 92 41 00 78 stw r18,120(r1)
ffc04fac: 92 61 00 7c stw r19,124(r1)
ffc04fb0: 92 81 00 80 stw r20,128(r1)
ffc04fb4: 92 a1 00 84 stw r21,132(r1)
ffc04fb8: 92 c1 00 88 stw r22,136(r1)
ffc04fbc: 92 e1 00 8c stw r23,140(r1)
ffc04fc0: 93 01 00 90 stw r24,144(r1)
ffc04fc4: 93 21 00 94 stw r25,148(r1)
ffc04fc8: 93 41 00 98 stw r26,152(r1)
ffc04fcc: 93 81 00 a0 stw r28,160(r1)
ffc04fd0: 93 a1 00 a4 stw r29,164(r1)
ffc04fd4: 93 c1 00 a8 stw r30,168(r1)
ffc04fd8: 93 e1 00 ac stw r31,172(r1)
Timestamp_Control uptime, total, ran, uptime_at_last_reset;
#else
uint32_t total_units = 0;
#endif
if ( !print )
ffc04fdc: 90 01 00 5c stw r0,92(r1)
ffc04fe0: 41 82 02 24 beq- ffc05204 <rtems_cpu_usage_report_with_plugin+0x284><== 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;
ffc04fe4: 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 );
ffc04fe8: 38 00 00 00 li r0,0
uptime_at_last_reset = CPU_usage_Uptime_at_last_reset;
ffc04fec: 39 29 28 9c addi r9,r9,10396
* 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 );
ffc04ff0: 90 01 00 18 stw r0,24(r1)
}
}
}
#endif
(*print)(
ffc04ff4: 3c 80 ff c2 lis r4,-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;
ffc04ff8: 81 49 00 04 lwz r10,4(r9)
}
}
}
#endif
(*print)(
ffc04ffc: 38 84 13 e0 addi r4,r4,5088
* 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;
ffc05000: 81 29 00 00 lwz r9,0(r9)
}
}
}
#endif
(*print)(
ffc05004: 3e 40 00 00 lis r18,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 );
ffc05008: 90 01 00 1c stw r0,28(r1)
}
}
}
#endif
(*print)(
ffc0500c: 3a 52 30 00 addi r18,r18,12288
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
(*print)(
ffc05010: 3e a0 ff c2 lis r21,-62
}
}
}
#endif
(*print)(
ffc05014: 80 01 00 5c lwz r0,92(r1)
/*
* Print the information
*/
(*print)( context,
ffc05018: 3f 00 ff c2 lis r24,-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;
ffc0501c: 91 21 00 28 stw r9,40(r1)
/*
* Print the information
*/
(*print)( context,
ffc05020: 3f 20 10 62 lis r25,4194
}
}
}
#endif
(*print)(
ffc05024: 7c 09 03 a6 mtctr r0
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
ffc05028: 3b 81 00 40 addi r28,r1,64
* 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;
ffc0502c: 91 41 00 2c stw r10,44(r1)
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
ffc05030: 3e 60 00 00 lis r19,0
_Timestamp_Subtract( &last, &uptime, &used );
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
}
_Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total );
ffc05034: 3a 81 00 28 addi r20,r1,40
ffc05038: 3b 41 00 18 addi r26,r1,24
/*PAGE
*
* rtems_cpu_usage_report
*/
void rtems_cpu_usage_report_with_plugin(
ffc0503c: 39 d2 00 0c addi r14,r18,12
}
}
}
#endif
(*print)(
ffc05040: 4c c6 31 82 crclr 4*cr1+eq
ffc05044: 4e 80 04 21 bctrl
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
(*print)(
ffc05048: 3a b5 15 54 addi r21,r21,5460
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
}
_Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total );
_Timestamp_Divide( &ran, &total, &ival, &fval );
ffc0504c: 3a c1 00 0c addi r22,r1,12
ffc05050: 3a e1 00 08 addi r23,r1,8
/*
* Print the information
*/
(*print)( context,
ffc05054: 3b 18 15 68 addi r24,r24,5480
ffc05058: 63 39 4d d3 ori r25,r25,19923
Timestamp_Control last = _Thread_Time_of_last_context_switch;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract( &last, &uptime, &used );
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
ffc0505c: 3b a1 00 10 addi r29,r1,16
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
Timestamp_Control last = _Thread_Time_of_last_context_switch;
ffc05060: 3d e0 00 00 lis r15,0
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract( &last, &uptime, &used );
ffc05064: 3a 01 00 38 addi r16,r1,56
ffc05068: 3a 21 00 30 addi r17,r1,48
"------------+----------------------------------------+---------------+---------\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 ] )
ffc0506c: 85 32 00 04 lwzu r9,4(r18)
ffc05070: 2f 89 00 00 cmpwi cr7,r9,0
ffc05074: 41 9e 01 54 beq- cr7,ffc051c8 <rtems_cpu_usage_report_with_plugin+0x248>
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
ffc05078: 83 c9 00 04 lwz r30,4(r9)
if ( information ) {
ffc0507c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc05080: 41 9e 01 48 beq- cr7,ffc051c8 <rtems_cpu_usage_report_with_plugin+0x248><== NEVER TAKEN
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc05084: a1 7e 00 10 lhz r11,16(r30)
ffc05088: 71 60 ff ff andi. r0,r11,65535
ffc0508c: 41 82 01 3c beq- ffc051c8 <rtems_cpu_usage_report_with_plugin+0x248><== NEVER TAKEN
ffc05090: 3b e0 00 01 li r31,1
ffc05094: 48 00 00 70 b ffc05104 <rtems_cpu_usage_report_with_plugin+0x184>
Timestamp_Control last = _Thread_Time_of_last_context_switch;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract( &last, &uptime, &used );
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
ffc05098: 48 00 70 a9 bl ffc0c140 <_TOD_Get_uptime>
}
_Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total );
ffc0509c: 7e 83 a3 78 mr r3,r20
ffc050a0: 7f a4 eb 78 mr r4,r29
ffc050a4: 7f 45 d3 78 mr r5,r26
ffc050a8: 48 00 9e c5 bl ffc0ef6c <_Timespec_Subtract>
_Timestamp_Divide( &ran, &total, &ival, &fval );
ffc050ac: 80 61 00 58 lwz r3,88(r1)
ffc050b0: 7f 44 d3 78 mr r4,r26
ffc050b4: 7e e5 bb 78 mr r5,r23
ffc050b8: 7e c6 b3 78 mr r6,r22
ffc050bc: 48 00 9d a5 bl ffc0ee60 <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
ffc050c0: 80 c1 00 24 lwz r6,36(r1)
ffc050c4: 80 01 00 5c lwz r0,92(r1)
ffc050c8: 7f 63 db 78 mr r3,r27
ffc050cc: 7c c6 c8 16 mulhwu r6,r6,r25
ffc050d0: 80 a1 00 20 lwz r5,32(r1)
ffc050d4: 80 e1 00 08 lwz r7,8(r1)
ffc050d8: 7c 09 03 a6 mtctr r0
ffc050dc: 7f 04 c3 78 mr r4,r24
ffc050e0: 81 01 00 0c lwz r8,12(r1)
ffc050e4: 54 c6 d1 be rlwinm r6,r6,26,6,31
ffc050e8: 4c c6 31 82 crclr 4*cr1+eq
ffc050ec: 4e 80 04 21 bctrl
ffc050f0: a1 7e 00 10 lhz r11,16(r30)
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc050f4: 3b ff 00 01 addi r31,r31,1
ffc050f8: 55 60 04 3e clrlwi r0,r11,16
ffc050fc: 7f 80 f8 40 cmplw cr7,r0,r31
ffc05100: 41 9c 00 c8 blt- cr7,ffc051c8 <rtems_cpu_usage_report_with_plugin+0x248>
the_thread = (Thread_Control *)information->local_table[ i ];
ffc05104: 81 3e 00 1c lwz r9,28(r30)
ffc05108: 57 e0 10 3a rlwinm r0,r31,2,0,29
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
ffc0510c: 7f 85 e3 78 mr r5,r28
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
ffc05110: 7d 29 00 2e lwzx r9,r9,r0
ffc05114: 38 01 00 20 addi r0,r1,32
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
ffc05118: 38 80 00 0d li r4,13
ffc0511c: 90 01 00 58 stw r0,88(r1)
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
ffc05120: 2f 89 00 00 cmpwi cr7,r9,0
ffc05124: 41 be ff d0 beq- cr7,ffc050f4 <rtems_cpu_usage_report_with_plugin+0x174><== NEVER TAKEN
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
ffc05128: 80 69 00 08 lwz r3,8(r9)
ffc0512c: 91 21 00 60 stw r9,96(r1)
ffc05130: 48 00 54 f1 bl ffc0a620 <rtems_object_get_name>
(*print)(
ffc05134: 7f 63 db 78 mr r3,r27
ffc05138: 81 21 00 60 lwz r9,96(r1)
ffc0513c: 7e a4 ab 78 mr r4,r21
ffc05140: 80 01 00 5c lwz r0,92(r1)
ffc05144: 7f 86 e3 78 mr r6,r28
ffc05148: 80 a9 00 08 lwz r5,8(r9)
ffc0514c: 7c 09 03 a6 mtctr r0
ffc05150: 4c c6 31 82 crclr 4*cr1+eq
ffc05154: 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;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
ffc05158: 39 73 32 18 addi r11,r19,12824
ffc0515c: 81 6b 00 0c lwz r11,12(r11)
Timestamp_Control last = _Thread_Time_of_last_context_switch;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract( &last, &uptime, &used );
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
ffc05160: 7f a3 eb 78 mr r3,r29
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
ffc05164: 81 21 00 60 lwz r9,96(r1)
ffc05168: 81 6b 00 08 lwz r11,8(r11)
ffc0516c: 80 09 00 08 lwz r0,8(r9)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
ffc05170: 81 49 00 88 lwz r10,136(r9)
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
ffc05174: 7f 8b 00 00 cmpw cr7,r11,r0
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
ffc05178: 81 29 00 84 lwz r9,132(r9)
ffc0517c: 91 41 00 24 stw r10,36(r1)
ffc05180: 91 21 00 20 stw r9,32(r1)
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
ffc05184: 40 9e ff 14 bne+ cr7,ffc05098 <rtems_cpu_usage_report_with_plugin+0x118>
Timestamp_Control used;
Timestamp_Control last = _Thread_Time_of_last_context_switch;
ffc05188: 39 2f 28 80 addi r9,r15,10368
ffc0518c: 81 49 00 04 lwz r10,4(r9)
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract( &last, &uptime, &used );
_Timestamp_Add_to( &ran, &used );
ffc05190: 38 01 00 20 addi r0,r1,32
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
Timestamp_Control last = _Thread_Time_of_last_context_switch;
ffc05194: 81 29 00 00 lwz r9,0(r9)
ffc05198: 91 41 00 3c stw r10,60(r1)
ffc0519c: 91 21 00 38 stw r9,56(r1)
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract( &last, &uptime, &used );
_Timestamp_Add_to( &ran, &used );
ffc051a0: 90 01 00 58 stw r0,88(r1)
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
Timestamp_Control last = _Thread_Time_of_last_context_switch;
_TOD_Get_uptime( &uptime );
ffc051a4: 48 00 6f 9d bl ffc0c140 <_TOD_Get_uptime>
_Timestamp_Subtract( &last, &uptime, &used );
ffc051a8: 7e 03 83 78 mr r3,r16
ffc051ac: 7f a4 eb 78 mr r4,r29
ffc051b0: 7e 25 8b 78 mr r5,r17
ffc051b4: 48 00 9d b9 bl ffc0ef6c <_Timespec_Subtract>
_Timestamp_Add_to( &ran, &used );
ffc051b8: 80 61 00 58 lwz r3,88(r1)
ffc051bc: 7e 24 8b 78 mr r4,r17
ffc051c0: 48 00 9c 45 bl ffc0ee04 <_Timespec_Add_to>
ffc051c4: 4b ff fe d8 b ffc0509c <rtems_cpu_usage_report_with_plugin+0x11c>
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
ffc051c8: 7f 92 70 00 cmpw cr7,r18,r14
ffc051cc: 40 9e fe a0 bne+ cr7,ffc0506c <rtems_cpu_usage_report_with_plugin+0xec>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
ffc051d0: 3c 00 10 62 lis r0,4194
ffc051d4: 80 c1 00 1c lwz r6,28(r1)
ffc051d8: 60 00 4d d3 ori r0,r0,19923
ffc051dc: 80 a1 00 18 lwz r5,24(r1)
ffc051e0: 7c c6 00 16 mulhwu r6,r6,r0
ffc051e4: 80 01 00 5c lwz r0,92(r1)
ffc051e8: 3c 80 ff c2 lis r4,-62
ffc051ec: 7c 09 03 a6 mtctr r0
ffc051f0: 7f 63 db 78 mr r3,r27
ffc051f4: 38 84 15 80 addi r4,r4,5504
ffc051f8: 54 c6 d1 be rlwinm r6,r6,26,6,31
ffc051fc: 4c c6 31 82 crclr 4*cr1+eq
ffc05200: 4e 80 04 21 bctrl
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
ffc05204: 80 01 00 b4 lwz r0,180(r1)
ffc05208: 81 c1 00 68 lwz r14,104(r1)
ffc0520c: 7c 08 03 a6 mtlr r0
ffc05210: 81 e1 00 6c lwz r15,108(r1)
ffc05214: 82 01 00 70 lwz r16,112(r1)
ffc05218: 82 21 00 74 lwz r17,116(r1)
ffc0521c: 82 41 00 78 lwz r18,120(r1)
ffc05220: 82 61 00 7c lwz r19,124(r1)
ffc05224: 82 81 00 80 lwz r20,128(r1)
ffc05228: 82 a1 00 84 lwz r21,132(r1)
ffc0522c: 82 c1 00 88 lwz r22,136(r1)
ffc05230: 82 e1 00 8c lwz r23,140(r1)
ffc05234: 83 01 00 90 lwz r24,144(r1)
ffc05238: 83 21 00 94 lwz r25,148(r1)
ffc0523c: 83 41 00 98 lwz r26,152(r1)
ffc05240: 83 61 00 9c lwz r27,156(r1)
ffc05244: 83 81 00 a0 lwz r28,160(r1)
ffc05248: 83 a1 00 a4 lwz r29,164(r1)
ffc0524c: 83 c1 00 a8 lwz r30,168(r1)
ffc05250: 83 e1 00 ac lwz r31,172(r1)
ffc05254: 38 21 00 b0 addi r1,r1,176
ffc05258: 4e 80 00 20 blr
ffc12018 <rtems_deviceio_errno>:
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
ffc12018: 94 21 ff f0 stwu r1,-16(r1)
ffc1201c: 7c 08 02 a6 mflr r0
ffc12020: 90 01 00 14 stw r0,20(r1)
if (sc == RTEMS_SUCCESSFUL) {
ffc12024: 7c 60 1b 79 mr. r0,r3
return 0;
ffc12028: 38 60 00 00 li r3,0
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
ffc1202c: 93 e1 00 0c stw r31,12(r1)
if (sc == RTEMS_SUCCESSFUL) {
ffc12030: 40 82 00 18 bne- ffc12048 <rtems_deviceio_errno+0x30>
errno = eno;
return -1;
}
}
ffc12034: 80 01 00 14 lwz r0,20(r1)
ffc12038: 83 e1 00 0c lwz r31,12(r1)
ffc1203c: 38 21 00 10 addi r1,r1,16
ffc12040: 7c 08 03 a6 mtlr r0
ffc12044: 4e 80 00 20 blr
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
ffc12048: 2b 80 00 1c cmplwi cr7,r0,28
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
ffc1204c: 3b e0 00 16 li r31,22
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
ffc12050: 41 9d 00 14 bgt- cr7,ffc12064 <rtems_deviceio_errno+0x4c><== NEVER TAKEN
eno = status_code_to_errno [sc];
ffc12054: 3d 20 ff c2 lis r9,-62
ffc12058: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc1205c: 39 29 90 a4 addi r9,r9,-28508
ffc12060: 7f e9 00 2e lwzx r31,r9,r0
}
errno = eno;
ffc12064: 48 00 00 11 bl ffc12074 <__errno>
ffc12068: 93 e3 00 00 stw r31,0(r3)
return -1;
ffc1206c: 38 60 ff ff li r3,-1
ffc12070: 4b ff ff c4 b ffc12034 <rtems_deviceio_errno+0x1c>
ffc0ad64 <rtems_error>:
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
...
)
{
ffc0ad64: 94 21 ff 88 stwu r1,-120(r1)
ffc0ad68: 7c 08 02 a6 mflr r0
ffc0ad6c: 93 e1 00 74 stw r31,116(r1)
ffc0ad70: 7c 7f 1b 78 mr r31,r3
ffc0ad74: 90 01 00 7c stw r0,124(r1)
ffc0ad78: 90 a1 00 18 stw r5,24(r1)
ffc0ad7c: 90 c1 00 1c stw r6,28(r1)
ffc0ad80: 90 e1 00 20 stw r7,32(r1)
ffc0ad84: 91 01 00 24 stw r8,36(r1)
ffc0ad88: 91 21 00 28 stw r9,40(r1)
ffc0ad8c: 91 41 00 2c stw r10,44(r1)
ffc0ad90: 40 86 00 24 bne- cr1,ffc0adb4 <rtems_error+0x50> <== ALWAYS TAKEN
ffc0ad94: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED
ffc0ad98: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc0ad9c: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc0ada0: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc0ada4: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc0ada8: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc0adac: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc0adb0: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
ffc0adb4: 38 00 00 02 li r0,2
ffc0adb8: 98 01 00 08 stb r0,8(r1)
ffc0adbc: 38 00 00 00 li r0,0
chars_written = rtems_verror(error_flag, printf_format, arglist);
ffc0adc0: 7f e3 fb 78 mr r3,r31
)
{
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
ffc0adc4: 98 01 00 09 stb r0,9(r1)
ffc0adc8: 38 01 00 80 addi r0,r1,128
chars_written = rtems_verror(error_flag, printf_format, arglist);
ffc0adcc: 38 a1 00 08 addi r5,r1,8
)
{
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
ffc0add0: 90 01 00 0c stw r0,12(r1)
ffc0add4: 38 01 00 10 addi r0,r1,16
ffc0add8: 90 01 00 10 stw r0,16(r1)
chars_written = rtems_verror(error_flag, printf_format, arglist);
ffc0addc: 4b ff fd d5 bl ffc0abb0 <rtems_verror>
va_end(arglist);
if (error_flag & RTEMS_ERROR_PANIC) {
ffc0ade0: 77 e0 20 00 andis. r0,r31,8192
ffc0ade4: 40 82 00 20 bne- ffc0ae04 <rtems_error+0xa0>
rtems_error(0, "fatal error, exiting");
_exit(errno);
}
if (error_flag & RTEMS_ERROR_ABORT) {
ffc0ade8: 77 e0 10 00 andis. r0,r31,4096
ffc0adec: 40 82 00 38 bne- ffc0ae24 <rtems_error+0xc0>
rtems_error(0, "fatal error, aborting");
abort();
}
return chars_written;
}
ffc0adf0: 80 01 00 7c lwz r0,124(r1)
ffc0adf4: 83 e1 00 74 lwz r31,116(r1)
ffc0adf8: 38 21 00 78 addi r1,r1,120
ffc0adfc: 7c 08 03 a6 mtlr r0
ffc0ae00: 4e 80 00 20 blr
va_start(arglist, printf_format);
chars_written = rtems_verror(error_flag, printf_format, arglist);
va_end(arglist);
if (error_flag & RTEMS_ERROR_PANIC) {
rtems_error(0, "fatal error, exiting");
ffc0ae04: 3c 80 ff c3 lis r4,-61
ffc0ae08: 38 84 a4 1c addi r4,r4,-23524
ffc0ae0c: 38 60 00 00 li r3,0
ffc0ae10: 4c c6 31 82 crclr 4*cr1+eq
ffc0ae14: 4b ff ff 51 bl ffc0ad64 <rtems_error>
_exit(errno);
ffc0ae18: 48 00 e4 a9 bl ffc192c0 <__errno>
ffc0ae1c: 80 63 00 00 lwz r3,0(r3)
ffc0ae20: 48 00 0e 69 bl ffc0bc88 <_exit>
}
if (error_flag & RTEMS_ERROR_ABORT) {
rtems_error(0, "fatal error, aborting");
ffc0ae24: 3c 80 ff c3 lis r4,-61
ffc0ae28: 38 84 a4 34 addi r4,r4,-23500
ffc0ae2c: 38 60 00 00 li r3,0
ffc0ae30: 4c c6 31 82 crclr 4*cr1+eq
ffc0ae34: 4b ff ff 31 bl ffc0ad64 <rtems_error>
abort();
ffc0ae38: 48 00 e4 6d bl ffc192a4 <abort>
ffc049ec <rtems_filesystem_dirname>:
int rtems_filesystem_dirname(
const char *pathname
)
{
ffc049ec: 94 21 ff f0 stwu r1,-16(r1)
ffc049f0: 7c 08 02 a6 mflr r0
ffc049f4: 93 c1 00 08 stw r30,8(r1)
ffc049f8: 7c 7e 1b 78 mr r30,r3
ffc049fc: 93 e1 00 0c stw r31,12(r1)
ffc04a00: 90 01 00 14 stw r0,20(r1)
int len = strlen( pathname );
ffc04a04: 48 00 e8 f9 bl ffc132fc <strlen>
while ( len ) {
ffc04a08: 7c 7f 1b 79 mr. r31,r3
ffc04a0c: 40 a2 00 0c bne+ ffc04a18 <rtems_filesystem_dirname+0x2c><== ALWAYS TAKEN
ffc04a10: 48 00 00 20 b ffc04a30 <rtems_filesystem_dirname+0x44><== NOT EXECUTED
ffc04a14: 41 9a 00 1c beq- cr6,ffc04a30 <rtems_filesystem_dirname+0x44>
len--;
ffc04a18: 3b ff ff ff addi r31,r31,-1
if ( rtems_filesystem_is_separator( pathname[len] ) )
ffc04a1c: 7c 7e f8 ae lbzx r3,r30,r31
ffc04a20: 48 00 13 99 bl ffc05db8 <rtems_filesystem_is_separator>
const char *pathname
)
{
int len = strlen( pathname );
while ( len ) {
ffc04a24: 2f 1f 00 00 cmpwi cr6,r31,0
len--;
if ( rtems_filesystem_is_separator( pathname[len] ) )
ffc04a28: 2f 83 00 00 cmpwi cr7,r3,0
ffc04a2c: 41 9e ff e8 beq+ cr7,ffc04a14 <rtems_filesystem_dirname+0x28>
break;
}
return len;
}
ffc04a30: 80 01 00 14 lwz r0,20(r1)
ffc04a34: 7f e3 fb 78 mr r3,r31
ffc04a38: 83 c1 00 08 lwz r30,8(r1)
ffc04a3c: 7c 08 03 a6 mtlr r0
ffc04a40: 83 e1 00 0c lwz r31,12(r1)
ffc04a44: 38 21 00 10 addi r1,r1,16
ffc04a48: 4e 80 00 20 blr
ffc0ee98 <rtems_filesystem_get_mount_handler>:
find_arg fa = {
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
ffc0ee98: 2f 83 00 00 cmpwi cr7,r3,0
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
ffc0ee9c: 94 21 ff e8 stwu r1,-24(r1)
ffc0eea0: 7c 08 02 a6 mflr r0
find_arg fa = {
ffc0eea4: 90 61 00 08 stw r3,8(r1)
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
ffc0eea8: 38 60 00 00 li r3,0
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
ffc0eeac: 90 01 00 1c stw r0,28(r1)
find_arg fa = {
ffc0eeb0: 38 00 00 00 li r0,0
ffc0eeb4: 90 01 00 0c stw r0,12(r1)
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
ffc0eeb8: 41 9e 00 18 beq- cr7,ffc0eed0 <rtems_filesystem_get_mount_handler+0x38><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
ffc0eebc: 3c 60 ff c1 lis r3,-63
ffc0eec0: 38 63 ed 3c addi r3,r3,-4804
ffc0eec4: 38 81 00 08 addi r4,r1,8
ffc0eec8: 4b ff fe cd bl ffc0ed94 <rtems_filesystem_iterate>
ffc0eecc: 80 61 00 0c lwz r3,12(r1)
}
return fa.mount_h;
}
ffc0eed0: 80 01 00 1c lwz r0,28(r1)
ffc0eed4: 38 21 00 18 addi r1,r1,24
ffc0eed8: 7c 08 03 a6 mtlr r0
ffc0eedc: 4e 80 00 20 blr
ffc046f4 <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 )
{
ffc046f4: 94 21 ff c8 stwu r1,-56(r1)
ffc046f8: 7c 08 02 a6 mflr r0
rtems_filesystem_umask = 022;
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
ffc046fc: 3d 20 00 00 lis r9,0
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
ffc04700: 90 01 00 3c stw r0,60(r1)
rtems_filesystem_umask = 022;
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
ffc04704: 80 09 26 d8 lwz r0,9944(r9)
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
ffc04708: 93 e1 00 34 stw r31,52(r1)
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
ffc0470c: 3f e0 00 00 lis r31,0
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
ffc04710: 2f 80 00 00 cmpwi cr7,r0,0
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
ffc04714: 81 3f 27 1c lwz r9,10012(r31)
ffc04718: 38 00 00 12 li r0,18
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
ffc0471c: 93 a1 00 2c stw r29,44(r1)
ffc04720: 93 c1 00 30 stw r30,48(r1)
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
ffc04724: 90 09 00 2c stw r0,44(r9)
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
ffc04728: 41 9e 01 00 beq- cr7,ffc04828 <rtems_filesystem_initialize+0x134><== NEVER TAKEN
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
ffc0472c: 3d 20 00 00 lis r9,0
ffc04730: 81 29 26 d4 lwz r9,9940(r9)
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
ffc04734: 38 e0 00 00 li r7,0
ffc04738: 80 69 00 08 lwz r3,8(r9)
ffc0473c: 80 89 00 0c lwz r4,12(r9)
ffc04740: 80 a9 00 00 lwz r5,0(r9)
ffc04744: 80 c9 00 04 lwz r6,4(r9)
ffc04748: 48 00 0b 15 bl ffc0525c <mount>
if ( status == -1 )
ffc0474c: 2f 83 ff ff cmpwi cr7,r3,-1
ffc04750: 41 9e 00 f0 beq- cr7,ffc04840 <rtems_filesystem_initialize+0x14c><== NEVER TAKEN
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
ffc04754: 81 3f 27 1c lwz r9,10012(r31)
ffc04758: 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);
ffc0475c: 3f c0 ff c2 lis r30,-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;
ffc04760: 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);
ffc04764: 3b de 8d 2c addi r30,r30,-29396
ffc04768: 3b a1 00 08 addi r29,r1,8
ffc0476c: 38 80 00 01 li r4,1
ffc04770: 38 a0 00 00 li r5,0
ffc04774: 7f a6 eb 78 mr r6,r29
ffc04778: 38 e0 00 00 li r7,0
ffc0477c: 7f c3 f3 78 mr r3,r30
ffc04780: 48 00 01 f1 bl ffc04970 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
ffc04784: 81 3f 27 1c lwz r9,10012(r31)
ffc04788: 80 01 00 08 lwz r0,8(r1)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
ffc0478c: 38 80 00 01 li r4,1
ffc04790: 38 a0 00 00 li r5,0
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
ffc04794: 90 09 00 18 stw r0,24(r9)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
ffc04798: 7f a6 eb 78 mr r6,r29
ffc0479c: 38 e0 00 00 li r7,0
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
ffc047a0: 80 01 00 0c lwz r0,12(r1)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
ffc047a4: 7f c3 f3 78 mr r3,r30
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
ffc047a8: 90 09 00 1c stw r0,28(r9)
ffc047ac: 80 01 00 10 lwz r0,16(r1)
ffc047b0: 90 09 00 20 stw r0,32(r9)
ffc047b4: 80 01 00 14 lwz r0,20(r1)
ffc047b8: 90 09 00 24 stw r0,36(r9)
ffc047bc: 80 01 00 18 lwz r0,24(r1)
ffc047c0: 90 09 00 28 stw r0,40(r9)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
ffc047c4: 48 00 01 ad bl ffc04970 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
ffc047c8: 81 3f 27 1c lwz r9,10012(r31)
ffc047cc: 80 01 00 08 lwz r0,8(r1)
*
* 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);
ffc047d0: 3c 60 ff c2 lis r3,-62
ffc047d4: 38 63 8d 30 addi r3,r3,-29392
/* 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;
ffc047d8: 90 09 00 04 stw r0,4(r9)
*
* 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);
ffc047dc: 38 80 01 ff li r4,511
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
ffc047e0: 80 01 00 0c lwz r0,12(r1)
ffc047e4: 90 09 00 08 stw r0,8(r9)
ffc047e8: 80 01 00 10 lwz r0,16(r1)
ffc047ec: 90 09 00 0c stw r0,12(r9)
ffc047f0: 80 01 00 14 lwz r0,20(r1)
ffc047f4: 90 09 00 10 stw r0,16(r9)
ffc047f8: 80 01 00 18 lwz r0,24(r1)
ffc047fc: 90 09 00 14 stw r0,20(r9)
*
* 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);
ffc04800: 48 00 08 2d bl ffc0502c <mkdir>
if ( status != 0 )
ffc04804: 2f 83 00 00 cmpwi cr7,r3,0
ffc04808: 40 9e 00 2c bne- cr7,ffc04834 <rtems_filesystem_initialize+0x140><== NEVER TAKEN
* it will be mounted onto is created. Moreover, if it is going to
* use a device, then it is REALLY unfair to attempt this
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
}
ffc0480c: 80 01 00 3c lwz r0,60(r1)
ffc04810: 83 a1 00 2c lwz r29,44(r1)
ffc04814: 7c 08 03 a6 mtlr r0
ffc04818: 83 c1 00 30 lwz r30,48(r1)
ffc0481c: 83 e1 00 34 lwz r31,52(r1)
ffc04820: 38 21 00 38 addi r1,r1,56
ffc04824: 4e 80 00 20 blr
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
ffc04828: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED
ffc0482c: 60 63 00 01 ori r3,r3,1 <== NOT EXECUTED
ffc04830: 48 00 4e 89 bl ffc096b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
ffc04834: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED
ffc04838: 60 63 00 03 ori r3,r3,3 <== NOT EXECUTED
ffc0483c: 48 00 4e 7d bl ffc096b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
mt = &rtems_filesystem_mount_table[0];
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
ffc04840: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED
ffc04844: 60 63 00 02 ori r3,r3,2 <== NOT EXECUTED
ffc04848: 48 00 4e 71 bl ffc096b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
ffc0ed94 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
ffc0ed94: 94 21 ff d8 stwu r1,-40(r1)
ffc0ed98: 7c 08 02 a6 mflr r0
ffc0ed9c: 93 c1 00 20 stw r30,32(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 ) {
ffc0eda0: 3f c0 ff c2 lis r30,-62
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
ffc0eda4: 90 01 00 2c stw r0,44(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 ) {
ffc0eda8: 80 1e 81 b4 lwz r0,-32332(r30)
ffc0edac: 3b de 81 b4 addi r30,r30,-32332
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
ffc0edb0: 93 e1 00 24 stw r31,36(r1)
ffc0edb4: 7c 9f 23 78 mr r31,r4
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
ffc0edb8: 2f 80 00 00 cmpwi cr7,r0,0
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
ffc0edbc: 93 61 00 14 stw r27,20(r1)
ffc0edc0: 93 81 00 18 stw r28,24(r1)
ffc0edc4: 93 a1 00 1c stw r29,28(r1)
ffc0edc8: 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 ) {
ffc0edcc: 40 be 00 0c bne+ cr7,ffc0edd8 <rtems_filesystem_iterate+0x44><== ALWAYS TAKEN
ffc0edd0: 48 00 00 38 b ffc0ee08 <rtems_filesystem_iterate+0x74><== NOT EXECUTED
ffc0edd4: 40 9a 00 9c bne- cr6,ffc0ee70 <rtems_filesystem_iterate+0xdc>
stop = (*routine)( table_entry, routine_arg );
ffc0edd8: 80 01 00 08 lwz r0,8(r1)
ffc0eddc: 7f c3 f3 78 mr r3,r30
ffc0ede0: 7f e4 fb 78 mr r4,r31
ffc0ede4: 7c 09 03 a6 mtctr r0
ffc0ede8: 4e 80 04 21 bctrl
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
ffc0edec: 84 1e 00 08 lwzu r0,8(r30)
stop = (*routine)( table_entry, routine_arg );
ffc0edf0: 7c 7b 1b 78 mr r27,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 ) {
ffc0edf4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0edf8: 2f 03 00 00 cmpwi cr6,r3,0
ffc0edfc: 40 9e ff d8 bne+ cr7,ffc0edd4 <rtems_filesystem_iterate+0x40>
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
ffc0ee00: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ee04: 40 9e 00 6c bne- cr7,ffc0ee70 <rtems_filesystem_iterate+0xdc>
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 );
ffc0ee08: 3f c0 00 00 lis r30,0
ffc0ee0c: 80 7e 27 90 lwz r3,10128(r30)
ffc0ee10: 38 80 00 00 li r4,0
ffc0ee14: 38 a0 00 00 li r5,0
ffc0ee18: 4b ff 9f 19 bl ffc08d30 <rtems_semaphore_obtain>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
ffc0ee1c: 3d 20 00 00 lis r9,0
ffc0ee20: 3b 89 21 b4 addi r28,r9,8628
ffc0ee24: 83 a9 21 b4 lwz r29,8628(r9)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return &the_chain->Tail.Node;
ffc0ee28: 3b 9c 00 04 addi r28,r28,4
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
ffc0ee2c: 7f 9d e0 00 cmpw cr7,r29,r28
ffc0ee30: 3b 60 00 00 li r27,0
ffc0ee34: 40 be 00 0c bne+ cr7,ffc0ee40 <rtems_filesystem_iterate+0xac>
ffc0ee38: 48 00 00 30 b ffc0ee68 <rtems_filesystem_iterate+0xd4>
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
ffc0ee3c: 40 9a 00 2c bne- cr6,ffc0ee68 <rtems_filesystem_iterate+0xd4><== NEVER TAKEN
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
ffc0ee40: 80 01 00 08 lwz r0,8(r1)
ffc0ee44: 38 7d 00 08 addi r3,r29,8
ffc0ee48: 7f e4 fb 78 mr r4,r31
ffc0ee4c: 7c 09 03 a6 mtctr r0
ffc0ee50: 4e 80 04 21 bctrl
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
ffc0ee54: 83 bd 00 00 lwz r29,0(r29)
if ( !stop ) {
rtems_libio_lock();
for (
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
ffc0ee58: 2f 03 00 00 cmpwi cr6,r3,0
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
ffc0ee5c: 7f 9d e0 00 cmpw cr7,r29,r28
!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 );
ffc0ee60: 7c 7b 1b 78 mr r27,r3
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
ffc0ee64: 40 9e ff d8 bne+ cr7,ffc0ee3c <rtems_filesystem_iterate+0xa8>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
ffc0ee68: 80 7e 27 90 lwz r3,10128(r30)
ffc0ee6c: 4b ff a0 4d bl ffc08eb8 <rtems_semaphore_release>
}
rtems_libio_unlock();
}
return stop;
}
ffc0ee70: 80 01 00 2c lwz r0,44(r1)
ffc0ee74: 7f 63 db 78 mr r3,r27
ffc0ee78: 83 81 00 18 lwz r28,24(r1)
ffc0ee7c: 7c 08 03 a6 mtlr r0
ffc0ee80: 83 61 00 14 lwz r27,20(r1)
ffc0ee84: 83 a1 00 1c lwz r29,28(r1)
ffc0ee88: 83 c1 00 20 lwz r30,32(r1)
ffc0ee8c: 83 e1 00 24 lwz r31,36(r1)
ffc0ee90: 38 21 00 28 addi r1,r1,40
ffc0ee94: 4e 80 00 20 blr
ffc051a4 <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
ffc051a4: 94 21 ff d8 stwu r1,-40(r1)
ffc051a8: 7c 08 02 a6 mflr r0
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 );
ffc051ac: 38 a0 00 00 li r5,0
ffc051b0: 93 c1 00 20 stw r30,32(r1)
ffc051b4: 3f c0 00 00 lis r30,0
ffc051b8: 90 61 00 08 stw r3,8(r1)
ffc051bc: 80 7e 27 90 lwz r3,10128(r30)
ffc051c0: 93 e1 00 24 stw r31,36(r1)
ffc051c4: 7c 9f 23 78 mr r31,r4
ffc051c8: 38 80 00 00 li r4,0
ffc051cc: 93 61 00 14 stw r27,20(r1)
rtems_chain_node *node = NULL;
bool stop = false;
ffc051d0: 3b 60 00 00 li r27,0
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
ffc051d4: 93 81 00 18 stw r28,24(r1)
ffc051d8: 93 a1 00 1c stw r29,28(r1)
ffc051dc: 90 01 00 2c stw r0,44(r1)
ffc051e0: 48 00 3b 51 bl ffc08d30 <rtems_semaphore_obtain>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
ffc051e4: 3d 20 00 00 lis r9,0
ffc051e8: 3b 89 21 98 addi r28,r9,8600
ffc051ec: 83 a9 21 98 lwz r29,8600(r9)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return &the_chain->Tail.Node;
ffc051f0: 3b 9c 00 04 addi r28,r28,4
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
ffc051f4: 7f 9d e0 00 cmpw cr7,r29,r28
ffc051f8: 40 be 00 0c bne+ cr7,ffc05204 <rtems_filesystem_mount_iterate+0x60><== ALWAYS TAKEN
ffc051fc: 48 00 00 30 b ffc0522c <rtems_filesystem_mount_iterate+0x88><== NOT EXECUTED
node = rtems_chain_first( &mount_chain );
!rtems_chain_is_tail( &mount_chain, node ) && !stop;
ffc05200: 40 9a 00 2c bne- cr6,ffc0522c <rtems_filesystem_mount_iterate+0x88><== NEVER TAKEN
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 );
ffc05204: 80 01 00 08 lwz r0,8(r1)
ffc05208: 7f a3 eb 78 mr r3,r29
ffc0520c: 7f e4 fb 78 mr r4,r31
ffc05210: 7c 09 03 a6 mtctr r0
ffc05214: 4e 80 04 21 bctrl
}
rtems_libio_unlock();
return stop;
}
ffc05218: 83 bd 00 00 lwz r29,0(r29)
bool stop = false;
rtems_libio_lock();
for (
node = rtems_chain_first( &mount_chain );
!rtems_chain_is_tail( &mount_chain, node ) && !stop;
ffc0521c: 2f 03 00 00 cmpwi cr6,r3,0
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
ffc05220: 7f 9d e0 00 cmpw cr7,r29,r28
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 );
ffc05224: 7c 7b 1b 78 mr r27,r3
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
ffc05228: 40 9e ff d8 bne+ cr7,ffc05200 <rtems_filesystem_mount_iterate+0x5c>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
ffc0522c: 80 7e 27 90 lwz r3,10128(r30)
ffc05230: 48 00 3c 89 bl ffc08eb8 <rtems_semaphore_release>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
ffc05234: 80 01 00 2c lwz r0,44(r1)
ffc05238: 7f 63 db 78 mr r3,r27
ffc0523c: 83 81 00 18 lwz r28,24(r1)
ffc05240: 7c 08 03 a6 mtlr r0
ffc05244: 83 61 00 14 lwz r27,20(r1)
ffc05248: 83 a1 00 1c lwz r29,28(r1)
ffc0524c: 83 c1 00 20 lwz r30,32(r1)
ffc05250: 83 e1 00 24 lwz r31,36(r1)
ffc05254: 38 21 00 28 addi r1,r1,40
ffc05258: 4e 80 00 20 blr
ffc04a4c <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
ffc04a4c: 94 21 ff e8 stwu r1,-24(r1)
ffc04a50: 7c 08 02 a6 mflr r0
ffc04a54: 93 a1 00 0c stw r29,12(r1)
ffc04a58: 7c 9d 23 78 mr r29,r4
ffc04a5c: 93 c1 00 10 stw r30,16(r1)
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
ffc04a60: 3b c0 00 00 li r30,0
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
ffc04a64: 93 e1 00 14 stw r31,20(r1)
ffc04a68: 7c 7f 1b 78 mr r31,r3
ffc04a6c: 90 01 00 1c stw r0,28(r1)
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
ffc04a70: 88 63 00 00 lbz r3,0(r3)
ffc04a74: 2f 83 00 00 cmpwi cr7,r3,0
ffc04a78: 41 9e 00 34 beq- cr7,ffc04aac <rtems_filesystem_prefix_separators+0x60><== NEVER TAKEN
ffc04a7c: 2f 84 00 00 cmpwi cr7,r4,0
ffc04a80: 40 be 00 20 bne+ cr7,ffc04aa0 <rtems_filesystem_prefix_separators+0x54><== ALWAYS TAKEN
ffc04a84: 48 00 00 28 b ffc04aac <rtems_filesystem_prefix_separators+0x60><== NOT EXECUTED
{
pathname++;
pathnamelen--;
stripped++;
ffc04a88: 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 ) )
ffc04a8c: 7c 7f f0 ae lbzx r3,r31,r30
ffc04a90: 7f 1d f0 00 cmpw cr6,r29,r30
ffc04a94: 2f 83 00 00 cmpwi cr7,r3,0
ffc04a98: 41 9e 00 14 beq- cr7,ffc04aac <rtems_filesystem_prefix_separators+0x60><== NEVER TAKEN
ffc04a9c: 41 9a 00 10 beq- cr6,ffc04aac <rtems_filesystem_prefix_separators+0x60><== NEVER TAKEN
ffc04aa0: 48 00 13 19 bl ffc05db8 <rtems_filesystem_is_separator>
ffc04aa4: 2f 83 00 00 cmpwi cr7,r3,0
ffc04aa8: 40 9e ff e0 bne+ cr7,ffc04a88 <rtems_filesystem_prefix_separators+0x3c>
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
ffc04aac: 80 01 00 1c lwz r0,28(r1)
ffc04ab0: 7f c3 f3 78 mr r3,r30
ffc04ab4: 83 a1 00 0c lwz r29,12(r1)
ffc04ab8: 7c 08 03 a6 mtlr r0
ffc04abc: 83 c1 00 10 lwz r30,16(r1)
ffc04ac0: 83 e1 00 14 lwz r31,20(r1)
ffc04ac4: 38 21 00 18 addi r1,r1,24
ffc04ac8: 4e 80 00 20 blr
ffc0effc <rtems_filesystem_unregister>:
int
rtems_filesystem_unregister(
const char *type
)
{
ffc0effc: 94 21 ff e8 stwu r1,-24(r1)
ffc0f000: 7c 08 02 a6 mflr r0
ffc0f004: 93 e1 00 14 stw r31,20(r1)
rtems_chain_node *node = NULL;
if ( type == NULL ) {
ffc0f008: 7c 7f 1b 79 mr. r31,r3
int
rtems_filesystem_unregister(
const char *type
)
{
ffc0f00c: 90 01 00 1c stw r0,28(r1)
ffc0f010: 93 81 00 08 stw r28,8(r1)
ffc0f014: 93 a1 00 0c stw r29,12(r1)
ffc0f018: 93 c1 00 10 stw r30,16(r1)
rtems_chain_node *node = NULL;
if ( type == NULL ) {
ffc0f01c: 41 82 00 c8 beq- ffc0f0e4 <rtems_filesystem_unregister+0xe8>
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 );
ffc0f020: 3f c0 00 00 lis r30,0
ffc0f024: 80 7e 27 90 lwz r3,10128(r30)
ffc0f028: 38 80 00 00 li r4,0
ffc0f02c: 38 a0 00 00 li r5,0
ffc0f030: 4b ff 9d 01 bl ffc08d30 <rtems_semaphore_obtain>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
ffc0f034: 3d 20 00 00 lis r9,0
ffc0f038: 3b 89 21 b4 addi r28,r9,8628
ffc0f03c: 83 a9 21 b4 lwz r29,8628(r9)
ffc0f040: 3b 9c 00 04 addi r28,r28,4
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
ffc0f044: 7f 9d e0 00 cmpw cr7,r29,r28
ffc0f048: 40 be 00 14 bne+ cr7,ffc0f05c <rtems_filesystem_unregister+0x60>
ffc0f04c: 48 00 00 60 b ffc0f0ac <rtems_filesystem_unregister+0xb0>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
ffc0f050: 83 bd 00 00 lwz r29,0(r29)
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
ffc0f054: 7f 9d e0 00 cmpw cr7,r29,r28
ffc0f058: 41 9e 00 54 beq- cr7,ffc0f0ac <rtems_filesystem_unregister+0xb0><== ALWAYS TAKEN
!rtems_chain_is_tail( &filesystem_chain, node );
node = rtems_chain_next( node )
) {
filesystem_node *fsn = (filesystem_node *) node;
if ( strcmp( fsn->entry.type, type ) == 0 ) {
ffc0f05c: 80 7d 00 08 lwz r3,8(r29)
ffc0f060: 7f e4 fb 78 mr r4,r31
ffc0f064: 48 00 40 d5 bl ffc13138 <strcmp>
ffc0f068: 2f 83 00 00 cmpwi cr7,r3,0
ffc0f06c: 40 9e ff e4 bne+ cr7,ffc0f050 <rtems_filesystem_unregister+0x54>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
ffc0f070: 7f a3 eb 78 mr r3,r29
ffc0f074: 4b ff aa c5 bl ffc09b38 <_Chain_Extract>
rtems_chain_extract( node );
free( fsn );
ffc0f078: 7f a3 eb 78 mr r3,r29
ffc0f07c: 4b ff 5a 7d bl ffc04af8 <free>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
ffc0f080: 80 7e 27 90 lwz r3,10128(r30)
ffc0f084: 4b ff 9e 35 bl ffc08eb8 <rtems_semaphore_release>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
ffc0f088: 80 01 00 1c lwz r0,28(r1)
if ( strcmp( fsn->entry.type, type ) == 0 ) {
rtems_chain_extract( node );
free( fsn );
rtems_libio_unlock();
return 0;
ffc0f08c: 38 60 00 00 li r3,0
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
ffc0f090: 83 81 00 08 lwz r28,8(r1)
ffc0f094: 7c 08 03 a6 mtlr r0
ffc0f098: 83 a1 00 0c lwz r29,12(r1)
ffc0f09c: 83 c1 00 10 lwz r30,16(r1)
ffc0f0a0: 83 e1 00 14 lwz r31,20(r1)
ffc0f0a4: 38 21 00 18 addi r1,r1,24
ffc0f0a8: 4e 80 00 20 blr
ffc0f0ac: 80 7e 27 90 lwz r3,10128(r30)
ffc0f0b0: 4b ff 9e 09 bl ffc08eb8 <rtems_semaphore_release>
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
ffc0f0b4: 48 00 2f c1 bl ffc12074 <__errno>
ffc0f0b8: 38 00 00 02 li r0,2
ffc0f0bc: 90 03 00 00 stw r0,0(r3)
ffc0f0c0: 38 60 ff ff li r3,-1
}
ffc0f0c4: 80 01 00 1c lwz r0,28(r1)
ffc0f0c8: 83 81 00 08 lwz r28,8(r1)
ffc0f0cc: 7c 08 03 a6 mtlr r0
ffc0f0d0: 83 a1 00 0c lwz r29,12(r1)
ffc0f0d4: 83 c1 00 10 lwz r30,16(r1)
ffc0f0d8: 83 e1 00 14 lwz r31,20(r1)
ffc0f0dc: 38 21 00 18 addi r1,r1,24
ffc0f0e0: 4e 80 00 20 blr
)
{
rtems_chain_node *node = NULL;
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
ffc0f0e4: 48 00 2f 91 bl ffc12074 <__errno>
ffc0f0e8: 38 00 00 16 li r0,22
ffc0f0ec: 90 03 00 00 stw r0,0(r3)
ffc0f0f0: 38 60 ff ff li r3,-1
ffc0f0f4: 4b ff ff d0 b ffc0f0c4 <rtems_filesystem_unregister+0xc8>
ffc05880 <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
ffc05880: 94 21 ff e8 stwu r1,-24(r1)
ffc05884: 7c 08 02 a6 mflr r0
ffc05888: 93 a1 00 0c stw r29,12(r1)
ffc0588c: 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 ) );
ffc05890: 38 60 00 08 li r3,8
}
return 0;
}
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
ffc05894: 90 01 00 1c stw r0,28(r1)
ffc05898: 93 c1 00 10 stw r30,16(r1)
ffc0589c: 7c 9e 23 78 mr r30,r4
ffc058a0: 93 e1 00 14 stw r31,20(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 ) );
ffc058a4: 48 00 05 9d bl ffc05e40 <malloc>
ffc058a8: 7c 7f 1b 78 mr r31,r3
*key = new_key;
ffc058ac: 90 7d 00 00 stw r3,0(r29)
new_key->val = NULL;
ffc058b0: 38 00 00 00 li r0,0
"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 );
ffc058b4: 38 60 00 00 li r3,0
ffc058b8: 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;
ffc058bc: 90 1f 00 00 stw r0,0(r31)
"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 );
ffc058c0: 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;
ffc058c4: 93 df 00 04 stw r30,4(r31)
"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 );
ffc058c8: 48 00 4c f9 bl ffc0a5c0 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL )
ffc058cc: 2f 83 00 00 cmpwi cr7,r3,0
return 0;
ffc058d0: 38 60 00 00 li r3,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 )
ffc058d4: 40 9e 00 20 bne- cr7,ffc058f4 <rtems_gxx_key_create+0x74><== NEVER TAKEN
return 0;
free( new_key );
return -1;
}
ffc058d8: 80 01 00 1c lwz r0,28(r1)
ffc058dc: 83 a1 00 0c lwz r29,12(r1)
ffc058e0: 7c 08 03 a6 mtlr r0
ffc058e4: 83 c1 00 10 lwz r30,16(r1)
ffc058e8: 83 e1 00 14 lwz r31,20(r1)
ffc058ec: 38 21 00 18 addi r1,r1,24
ffc058f0: 4e 80 00 20 blr
/* 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 )
return 0;
free( new_key );
ffc058f4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc058f8: 4b ff fd 45 bl ffc0563c <free> <== NOT EXECUTED
return -1;
ffc058fc: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc05900: 4b ff ff d8 b ffc058d8 <rtems_gxx_key_create+0x58> <== NOT EXECUTED
ffc05914 <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
ffc05914: 94 21 ff f0 stwu r1,-16(r1)
ffc05918: 7c 08 02 a6 mflr r0
#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 );
ffc0591c: 7c 64 1b 78 mr r4,r3
key->val = 0;
return 0;
}
int rtems_gxx_key_delete (__gthread_key_t key)
{
ffc05920: 93 e1 00 0c stw r31,12(r1)
ffc05924: 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 );
ffc05928: 38 60 00 00 li r3,0
key->val = 0;
return 0;
}
int rtems_gxx_key_delete (__gthread_key_t key)
{
ffc0592c: 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 );
ffc05930: 48 00 4d a5 bl ffc0a6d4 <rtems_task_variable_delete>
if ( status == RTEMS_SUCCESSFUL ) {
ffc05934: 2f 83 00 00 cmpwi cr7,r3,0
ffc05938: 40 9e 00 14 bne- cr7,ffc0594c <rtems_gxx_key_delete+0x38><== NEVER TAKEN
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( *(void **)key );
ffc0593c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc05940: 41 9e 00 0c beq- cr7,ffc0594c <rtems_gxx_key_delete+0x38><== NEVER TAKEN
ffc05944: 80 7f 00 00 lwz r3,0(r31)
ffc05948: 4b ff fc f5 bl ffc0563c <free>
return 0;
}
key = NULL;
return 0;
}
ffc0594c: 80 01 00 14 lwz r0,20(r1)
ffc05950: 38 60 00 00 li r3,0
ffc05954: 83 e1 00 0c lwz r31,12(r1)
ffc05958: 38 21 00 10 addi r1,r1,16
ffc0595c: 7c 08 03 a6 mtlr r0
ffc05960: 4e 80 00 20 blr
ffc05a9c <rtems_gxx_mutex_lock>:
printk( "gxx_wrappers: mutex init complete =%X\n", *mutex );
#endif
}
int rtems_gxx_mutex_lock (__gthread_mutex_t *mutex)
{
ffc05a9c: 94 21 ff f8 stwu r1,-8(r1)
ffc05aa0: 7c 08 02 a6 mflr r0
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: lock mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_obtain(
ffc05aa4: 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)
{
ffc05aa8: 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(
ffc05aac: 38 a0 00 00 li r5,0
ffc05ab0: 80 63 00 00 lwz r3,0(r3)
ffc05ab4: 48 00 41 a9 bl ffc09c5c <rtems_semaphore_obtain>
*(rtems_id *)mutex,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT
);
if ( status == RTEMS_SUCCESSFUL )
ffc05ab8: 2f 83 00 00 cmpwi cr7,r3,0
return 0;
return -1;
ffc05abc: 38 60 ff ff li r3,-1
status = rtems_semaphore_obtain(
*(rtems_id *)mutex,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT
);
if ( status == RTEMS_SUCCESSFUL )
ffc05ac0: 40 9e 00 08 bne- cr7,ffc05ac8 <rtems_gxx_mutex_lock+0x2c><== NEVER TAKEN
return 0;
ffc05ac4: 38 60 00 00 li r3,0
return -1;
}
ffc05ac8: 80 01 00 0c lwz r0,12(r1)
ffc05acc: 38 21 00 08 addi r1,r1,8
ffc05ad0: 7c 08 03 a6 mtlr r0
ffc05ad4: 4e 80 00 20 blr
ffc05b0c <rtems_gxx_mutex_trylock>:
int rtems_gxx_mutex_trylock (__gthread_mutex_t *mutex)
{
ffc05b0c: 94 21 ff f8 stwu r1,-8(r1)
ffc05b10: 7c 08 02 a6 mflr r0
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: trylock mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_obtain (*(rtems_id *)mutex, RTEMS_NO_WAIT, 0);
ffc05b14: 38 80 00 01 li r4,1
return 0;
return -1;
}
int rtems_gxx_mutex_trylock (__gthread_mutex_t *mutex)
{
ffc05b18: 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);
ffc05b1c: 38 a0 00 00 li r5,0
ffc05b20: 80 63 00 00 lwz r3,0(r3)
ffc05b24: 48 00 41 39 bl ffc09c5c <rtems_semaphore_obtain>
if ( status == RTEMS_SUCCESSFUL )
ffc05b28: 2f 83 00 00 cmpwi cr7,r3,0
return 0;
return -1;
ffc05b2c: 38 60 ff ff li r3,-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 )
ffc05b30: 40 9e 00 08 bne- cr7,ffc05b38 <rtems_gxx_mutex_trylock+0x2c><== NEVER TAKEN
return 0;
ffc05b34: 38 60 00 00 li r3,0
return -1;
}
ffc05b38: 80 01 00 0c lwz r0,12(r1)
ffc05b3c: 38 21 00 08 addi r1,r1,8
ffc05b40: 7c 08 03 a6 mtlr r0
ffc05b44: 4e 80 00 20 blr
ffc05b48 <rtems_gxx_mutex_unlock>:
int rtems_gxx_mutex_unlock (__gthread_mutex_t *mutex)
{
ffc05b48: 94 21 ff f8 stwu r1,-8(r1)
ffc05b4c: 7c 08 02 a6 mflr r0
ffc05b50: 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 );
ffc05b54: 80 63 00 00 lwz r3,0(r3)
ffc05b58: 48 00 42 8d bl ffc09de4 <rtems_semaphore_release>
if ( status == RTEMS_SUCCESSFUL )
ffc05b5c: 2f 83 00 00 cmpwi cr7,r3,0
return 0;
return -1;
ffc05b60: 38 60 ff ff li r3,-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 )
ffc05b64: 40 9e 00 08 bne- cr7,ffc05b6c <rtems_gxx_mutex_unlock+0x24><== NEVER TAKEN
return 0;
ffc05b68: 38 60 00 00 li r3,0
return -1;
}
ffc05b6c: 80 01 00 0c lwz r0,12(r1)
ffc05b70: 38 21 00 08 addi r1,r1,8
ffc05b74: 7c 08 03 a6 mtlr r0
ffc05b78: 4e 80 00 20 blr
ffc057a4 <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))
{
ffc057a4: 94 21 ff d8 stwu r1,-40(r1)
ffc057a8: 7c 08 02 a6 mflr r0
ffc057ac: 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 ) {
ffc057b0: 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))
{
ffc057b4: 93 c1 00 20 stw r30,32(r1)
ffc057b8: 7c 9e 23 78 mr r30,r4
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
ffc057bc: 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))
{
ffc057c0: 93 e1 00 24 stw r31,36(r1)
ffc057c4: 7c 7f 1b 78 mr r31,r3
ffc057c8: 93 a1 00 1c stw r29,28(r1)
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
ffc057cc: 41 9e 00 24 beq- cr7,ffc057f0 <rtems_gxx_once+0x4c>
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
if ( o == 0 )
(*func)();
}
return 0;
}
ffc057d0: 80 01 00 2c lwz r0,44(r1)
ffc057d4: 38 60 00 00 li r3,0
ffc057d8: 83 a1 00 1c lwz r29,28(r1)
ffc057dc: 7c 08 03 a6 mtlr r0
ffc057e0: 83 c1 00 20 lwz r30,32(r1)
ffc057e4: 83 e1 00 24 lwz r31,36(r1)
ffc057e8: 38 21 00 28 addi r1,r1,40
ffc057ec: 4e 80 00 20 blr
if ( *(volatile __gthread_once_t *)once == 0 ) {
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
ffc057f0: 3b a1 00 08 addi r29,r1,8
ffc057f4: 38 60 01 00 li r3,256
ffc057f8: 38 80 01 00 li r4,256
ffc057fc: 7f a5 eb 78 mr r5,r29
ffc05800: 48 00 4a 81 bl ffc0a280 <rtems_task_mode>
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
ffc05804: 80 1f 00 00 lwz r0,0(r31)
ffc05808: 2f 80 00 00 cmpwi cr7,r0,0
ffc0580c: 40 9e 00 44 bne- cr7,ffc05850 <rtems_gxx_once+0xac> <== NEVER TAKEN
*(volatile __gthread_once_t *)once = 1;
ffc05810: 38 00 00 01 li r0,1
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
ffc05814: 80 61 00 08 lwz r3,8(r1)
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
*(volatile __gthread_once_t *)once = 1;
ffc05818: 90 1f 00 00 stw r0,0(r31)
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
ffc0581c: 7f a5 eb 78 mr r5,r29
ffc05820: 38 80 01 00 li r4,256
ffc05824: 48 00 4a 5d bl ffc0a280 <rtems_task_mode>
if ( o == 0 )
(*func)();
ffc05828: 7f c9 03 a6 mtctr r30
ffc0582c: 4e 80 04 21 bctrl
}
return 0;
}
ffc05830: 80 01 00 2c lwz r0,44(r1)
ffc05834: 38 60 00 00 li r3,0
ffc05838: 83 a1 00 1c lwz r29,28(r1)
ffc0583c: 7c 08 03 a6 mtlr r0
ffc05840: 83 c1 00 20 lwz r30,32(r1)
ffc05844: 83 e1 00 24 lwz r31,36(r1)
ffc05848: 38 21 00 28 addi r1,r1,40
ffc0584c: 4e 80 00 20 blr
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
*(volatile __gthread_once_t *)once = 1;
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
ffc05850: 80 61 00 08 lwz r3,8(r1) <== NOT EXECUTED
ffc05854: 7f a5 eb 78 mr r5,r29 <== NOT EXECUTED
ffc05858: 38 80 01 00 li r4,256 <== NOT EXECUTED
ffc0585c: 48 00 4a 25 bl ffc0a280 <rtems_task_mode> <== NOT EXECUTED
if ( o == 0 )
(*func)();
}
return 0;
}
ffc05860: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED
ffc05864: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc05868: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED
ffc0586c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc05870: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED
ffc05874: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED
ffc05878: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED
ffc0587c: 4e 80 00 20 blr <== NOT EXECUTED
ffc059f4 <rtems_gxx_setspecific>:
#endif
return p;
}
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
ffc059f4: 94 21 ff f0 stwu r1,-16(r1)
ffc059f8: 7c 08 02 a6 mflr r0
ffc059fc: 90 01 00 14 stw r0,20(r1)
ffc05a00: 93 e1 00 0c stw r31,12(r1)
ffc05a04: 7c 7f 1b 78 mr r31,r3
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 );
ffc05a08: 80 a3 00 04 lwz r5,4(r3)
ffc05a0c: 38 60 00 00 li r3,0
#endif
return p;
}
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
ffc05a10: 93 c1 00 08 stw r30,8(r1)
ffc05a14: 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 );
ffc05a18: 7f e4 fb 78 mr r4,r31
ffc05a1c: 48 00 4b a5 bl ffc0a5c0 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL ) {
ffc05a20: 2f 83 00 00 cmpwi cr7,r3,0
/* now let's set the proper value */
key->val = (void *)ptr;
return 0;
}
return -1;
ffc05a24: 38 60 ff ff li r3,-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 ) {
ffc05a28: 40 9e 00 0c bne- cr7,ffc05a34 <rtems_gxx_setspecific+0x40><== NEVER TAKEN
/* now let's set the proper value */
key->val = (void *)ptr;
ffc05a2c: 93 df 00 00 stw r30,0(r31)
return 0;
ffc05a30: 38 60 00 00 li r3,0
}
return -1;
}
ffc05a34: 80 01 00 14 lwz r0,20(r1)
ffc05a38: 83 c1 00 08 lwz r30,8(r1)
ffc05a3c: 7c 08 03 a6 mtlr r0
ffc05a40: 83 e1 00 0c lwz r31,12(r1)
ffc05a44: 38 21 00 10 addi r1,r1,16
ffc05a48: 4e 80 00 20 blr
ffc09b08 <rtems_heap_allocate_aligned_with_boundary>:
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc09b08: 94 21 ff e8 stwu r1,-24(r1)
ffc09b0c: 7c 08 02 a6 mflr r0
if (
ffc09b10: 3d 20 00 00 lis r9,0
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc09b14: 90 01 00 1c stw r0,28(r1)
if (
ffc09b18: 80 09 28 68 lwz r0,10344(r9)
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc09b1c: 93 a1 00 0c stw r29,12(r1)
ffc09b20: 7c 7d 1b 78 mr r29,r3
if (
ffc09b24: 2f 80 00 03 cmpwi cr7,r0,3
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc09b28: 93 c1 00 10 stw r30,16(r1)
ffc09b2c: 7c 9e 23 78 mr r30,r4
ffc09b30: 93 e1 00 14 stw r31,20(r1)
ffc09b34: 7c bf 2b 78 mr r31,r5
if (
ffc09b38: 41 9e 00 3c beq- cr7,ffc09b74 <rtems_heap_allocate_aligned_with_boundary+0x6c><== ALWAYS TAKEN
&& !malloc_is_system_state_OK()
) {
return NULL;
}
malloc_deferred_frees_process();
ffc09b3c: 4b ff e9 f5 bl ffc08530 <malloc_deferred_frees_process>
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
ffc09b40: 3d 20 00 00 lis r9,0
ffc09b44: 80 69 27 3c lwz r3,10044(r9)
ffc09b48: 7f a4 eb 78 mr r4,r29
ffc09b4c: 7f c5 f3 78 mr r5,r30
ffc09b50: 7f e6 fb 78 mr r6,r31
ffc09b54: 48 00 65 8d bl ffc100e0 <_Protected_heap_Allocate_aligned_with_boundary>
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
ffc09b58: 80 01 00 1c lwz r0,28(r1)
ffc09b5c: 83 a1 00 0c lwz r29,12(r1)
ffc09b60: 7c 08 03 a6 mtlr r0
ffc09b64: 83 c1 00 10 lwz r30,16(r1)
ffc09b68: 83 e1 00 14 lwz r31,20(r1)
ffc09b6c: 38 21 00 18 addi r1,r1,24
ffc09b70: 4e 80 00 20 blr
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
ffc09b74: 4b ff e9 75 bl ffc084e8 <malloc_is_system_state_OK>
ffc09b78: 2f 83 00 00 cmpwi cr7,r3,0
) {
return NULL;
ffc09b7c: 38 60 00 00 li r3,0
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
ffc09b80: 40 9e ff bc bne+ cr7,ffc09b3c <rtems_heap_allocate_aligned_with_boundary+0x34>
ffc09b84: 4b ff ff d4 b ffc09b58 <rtems_heap_allocate_aligned_with_boundary+0x50>
ffc045cc <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
ffc045cc: 94 21 ff c0 stwu r1,-64(r1)
ffc045d0: 7c 08 02 a6 mflr r0
ffc045d4: 93 61 00 2c stw r27,44(r1)
ffc045d8: 90 01 00 44 stw r0,68(r1)
ffc045dc: 93 81 00 30 stw r28,48(r1)
ffc045e0: 93 a1 00 34 stw r29,52(r1)
ffc045e4: 7c 9d 23 78 mr r29,r4
ffc045e8: 93 c1 00 38 stw r30,56(r1)
ffc045ec: 7c 7e 1b 78 mr r30,r3
ffc045f0: 93 e1 00 3c stw r31,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(
ffc045f4: 48 00 ed 09 bl ffc132fc <strlen>
ffc045f8: 3b e1 00 08 addi r31,r1,8
ffc045fc: 7c 64 1b 78 mr r4,r3
ffc04600: 38 a0 00 00 li r5,0
ffc04604: 7f e6 fb 78 mr r6,r31
ffc04608: 38 e0 00 01 li r7,1
ffc0460c: 7f c3 f3 78 mr r3,r30
ffc04610: 48 00 03 61 bl ffc04970 <rtems_filesystem_evaluate_path>
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
node_type = (*loc.ops->node_type_h)( &loc );
ffc04614: 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(
ffc04618: 7c 7c 1b 78 mr r28,r3
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
ffc0461c: 83 61 00 08 lwz r27,8(r1)
node_type = (*loc.ops->node_type_h)( &loc );
ffc04620: 80 09 00 10 lwz r0,16(r9)
ffc04624: 7f e3 fb 78 mr r3,r31
ffc04628: 7c 09 03 a6 mtctr r0
ffc0462c: 4e 80 04 21 bctrl
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
ffc04630: 2f 9c 00 00 cmpwi cr7,r28,0
ffc04634: 40 9e 00 0c bne- cr7,ffc04640 <rtems_io_lookup_name+0x74><== NEVER TAKEN
ffc04638: 2f 83 00 02 cmpwi cr7,r3,2
ffc0463c: 41 9e 00 34 beq- cr7,ffc04670 <rtems_io_lookup_name+0xa4>
rtems_filesystem_freenode( &loc );
ffc04640: 7f e3 fb 78 mr r3,r31
ffc04644: 48 00 04 89 bl ffc04acc <rtems_filesystem_freenode>
return RTEMS_UNSATISFIED;
ffc04648: 38 60 00 0d li r3,13
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
}
ffc0464c: 80 01 00 44 lwz r0,68(r1)
ffc04650: 83 61 00 2c lwz r27,44(r1)
ffc04654: 7c 08 03 a6 mtlr r0
ffc04658: 83 81 00 30 lwz r28,48(r1)
ffc0465c: 83 a1 00 34 lwz r29,52(r1)
ffc04660: 83 c1 00 38 lwz r30,56(r1)
ffc04664: 83 e1 00 3c lwz r31,60(r1)
ffc04668: 38 21 00 40 addi r1,r1,64
ffc0466c: 4e 80 00 20 blr
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
ffc04670: 93 dd 00 00 stw r30,0(r29)
device_info->device_name_length = strlen( name );
ffc04674: 7f c3 f3 78 mr r3,r30
ffc04678: 48 00 ec 85 bl ffc132fc <strlen>
ffc0467c: 90 7d 00 04 stw r3,4(r29)
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
ffc04680: 7f e3 fb 78 mr r3,r31
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
ffc04684: 80 1b 00 50 lwz r0,80(r27)
ffc04688: 90 1d 00 08 stw r0,8(r29)
device_info->minor = the_jnode->info.device.minor;
ffc0468c: 80 1b 00 54 lwz r0,84(r27)
ffc04690: 90 1d 00 0c stw r0,12(r29)
rtems_filesystem_freenode( &loc );
ffc04694: 48 00 04 39 bl ffc04acc <rtems_filesystem_freenode>
return RTEMS_SUCCESSFUL;
ffc04698: 38 60 00 00 li r3,0
ffc0469c: 4b ff ff b0 b ffc0464c <rtems_io_lookup_name+0x80>
ffc0ad18 <rtems_io_register_driver>:
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
ffc0ad18: 94 21 ff f0 stwu r1,-16(r1)
ffc0ad1c: 7c 08 02 a6 mflr r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
ffc0ad20: 3d 20 00 00 lis r9,0
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
ffc0ad24: 90 01 00 14 stw r0,20(r1)
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
ffc0ad28: 80 09 2e 40 lwz r0,11840(r9)
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
ffc0ad2c: 3d 20 00 00 lis r9,0
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
ffc0ad30: 93 e1 00 0c stw r31,12(r1)
ffc0ad34: 7c 7f 1b 78 mr r31,r3
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
ffc0ad38: 2f 80 00 00 cmpwi cr7,r0,0
return RTEMS_CALLED_FROM_ISR;
ffc0ad3c: 38 60 00 12 li r3,18
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
ffc0ad40: 80 09 27 f0 lwz r0,10224(r9)
if ( rtems_interrupt_is_in_progress() )
ffc0ad44: 40 9e 00 ec bne- cr7,ffc0ae30 <rtems_io_register_driver+0x118>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
ffc0ad48: 2f 85 00 00 cmpwi cr7,r5,0
return RTEMS_INVALID_ADDRESS;
ffc0ad4c: 38 60 00 09 li r3,9
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
ffc0ad50: 41 9e 00 e0 beq- cr7,ffc0ae30 <rtems_io_register_driver+0x118>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
ffc0ad54: 2f 84 00 00 cmpwi cr7,r4,0
if ( registered_major == NULL )
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
ffc0ad58: 90 05 00 00 stw r0,0(r5)
if ( driver_table == NULL )
ffc0ad5c: 41 9e 00 d4 beq- cr7,ffc0ae30 <rtems_io_register_driver+0x118>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0ad60: 81 64 00 00 lwz r11,0(r4)
ffc0ad64: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0ad68: 41 9e 01 14 beq- cr7,ffc0ae7c <rtems_io_register_driver+0x164>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
ffc0ad6c: 7f 80 f8 40 cmplw cr7,r0,r31
return RTEMS_INVALID_NUMBER;
ffc0ad70: 38 60 00 0a li r3,10
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
ffc0ad74: 40 9d 00 bc ble- cr7,ffc0ae30 <rtems_io_register_driver+0x118>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc0ad78: 3d 60 00 00 lis r11,0
ffc0ad7c: 81 4b 27 a0 lwz r10,10144(r11)
ffc0ad80: 38 0a 00 01 addi r0,r10,1
ffc0ad84: 90 0b 27 a0 stw r0,10144(r11)
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
ffc0ad88: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0ad8c: 40 9e 00 b8 bne- cr7,ffc0ae44 <rtems_io_register_driver+0x12c>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
ffc0ad90: 81 49 27 f0 lwz r10,10224(r9)
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
ffc0ad94: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0ad98: 41 9e 00 f4 beq- cr7,ffc0ae8c <rtems_io_register_driver+0x174><== NEVER TAKEN
ffc0ad9c: 3d 60 00 00 lis r11,0
ffc0ada0: 7d 49 03 a6 mtctr r10
ffc0ada4: 81 2b 27 f4 lwz r9,10228(r11)
ffc0ada8: 40 be 00 14 bne+ cr7,ffc0adbc <rtems_io_register_driver+0xa4><== ALWAYS TAKEN
ffc0adac: 48 00 01 04 b ffc0aeb0 <rtems_io_register_driver+0x198><== NOT EXECUTED
ffc0adb0: 3b ff 00 01 addi r31,r31,1
ffc0adb4: 39 29 00 18 addi r9,r9,24
ffc0adb8: 42 40 00 1c bdz- ffc0add4 <rtems_io_register_driver+0xbc>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0adbc: 80 09 00 00 lwz r0,0(r9)
ffc0adc0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0adc4: 40 9e ff ec bne+ cr7,ffc0adb0 <rtems_io_register_driver+0x98>
ffc0adc8: 80 09 00 04 lwz r0,4(r9)
ffc0adcc: 2f 80 00 00 cmpwi cr7,r0,0
ffc0add0: 40 9e ff e0 bne+ cr7,ffc0adb0 <rtems_io_register_driver+0x98>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
ffc0add4: 7f 8a f8 00 cmpw cr7,r10,r31
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
ffc0add8: 93 e5 00 00 stw r31,0(r5)
if ( m != n )
ffc0addc: 1c 1f 00 18 mulli r0,r31,24
ffc0ade0: 41 9e 00 b0 beq- cr7,ffc0ae90 <rtems_io_register_driver+0x178>
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
ffc0ade4: 81 6b 27 f4 lwz r11,10228(r11)
ffc0ade8: 80 c4 00 00 lwz r6,0(r4)
ffc0adec: 80 e4 00 04 lwz r7,4(r4)
ffc0adf0: 7d 2b 02 14 add r9,r11,r0
ffc0adf4: 81 04 00 08 lwz r8,8(r4)
ffc0adf8: 81 44 00 0c lwz r10,12(r4)
ffc0adfc: 7c cb 01 2e stwx r6,r11,r0
ffc0ae00: 90 e9 00 04 stw r7,4(r9)
ffc0ae04: 91 09 00 08 stw r8,8(r9)
ffc0ae08: 91 49 00 0c stw r10,12(r9)
ffc0ae0c: 81 64 00 10 lwz r11,16(r4)
ffc0ae10: 80 04 00 14 lwz r0,20(r4)
ffc0ae14: 91 69 00 10 stw r11,16(r9)
ffc0ae18: 90 09 00 14 stw r0,20(r9)
_Thread_Enable_dispatch();
ffc0ae1c: 48 00 26 19 bl ffc0d434 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
ffc0ae20: 7f e3 fb 78 mr r3,r31
ffc0ae24: 38 80 00 00 li r4,0
ffc0ae28: 38 a0 00 00 li r5,0
ffc0ae2c: 48 00 99 b9 bl ffc147e4 <rtems_io_initialize>
}
ffc0ae30: 80 01 00 14 lwz r0,20(r1)
ffc0ae34: 83 e1 00 0c lwz r31,12(r1)
ffc0ae38: 38 21 00 10 addi r1,r1,16
ffc0ae3c: 7c 08 03 a6 mtlr r0
ffc0ae40: 4e 80 00 20 blr
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
ffc0ae44: 3d 60 00 00 lis r11,0
ffc0ae48: 1c 1f 00 18 mulli r0,r31,24
ffc0ae4c: 81 2b 27 f4 lwz r9,10228(r11)
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0ae50: 7d 49 00 2e lwzx r10,r9,r0
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
ffc0ae54: 7d 29 02 14 add r9,r9,r0
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0ae58: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0ae5c: 41 9e 00 40 beq- cr7,ffc0ae9c <rtems_io_register_driver+0x184>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
ffc0ae60: 48 00 25 d5 bl ffc0d434 <_Thread_Enable_dispatch>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
ffc0ae64: 80 01 00 14 lwz r0,20(r1)
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
ffc0ae68: 38 60 00 0c li r3,12
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
ffc0ae6c: 83 e1 00 0c lwz r31,12(r1)
ffc0ae70: 7c 08 03 a6 mtlr r0
ffc0ae74: 38 21 00 10 addi r1,r1,16
ffc0ae78: 4e 80 00 20 blr
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0ae7c: 81 64 00 04 lwz r11,4(r4)
ffc0ae80: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0ae84: 40 9e fe e8 bne+ cr7,ffc0ad6c <rtems_io_register_driver+0x54>
ffc0ae88: 4b ff ff a8 b ffc0ae30 <rtems_io_register_driver+0x118>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
ffc0ae8c: 93 e5 00 00 stw r31,0(r5) <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
ffc0ae90: 48 00 25 a5 bl ffc0d434 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
ffc0ae94: 38 60 00 05 li r3,5
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
return sc;
ffc0ae98: 4b ff ff 98 b ffc0ae30 <rtems_io_register_driver+0x118>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0ae9c: 81 29 00 04 lwz r9,4(r9)
ffc0aea0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0aea4: 40 9e ff bc bne+ cr7,ffc0ae60 <rtems_io_register_driver+0x148>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
ffc0aea8: 93 e5 00 00 stw r31,0(r5)
ffc0aeac: 4b ff ff 38 b ffc0ade4 <rtems_io_register_driver+0xcc>
ffc0aeb0: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc0aeb4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc0aeb8: 4b ff ff 04 b ffc0adbc <rtems_io_register_driver+0xa4><== NOT EXECUTED
ffc0c868 <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)
{
ffc0c868: 94 21 ff e0 stwu r1,-32(r1)
ffc0c86c: 7c 08 02 a6 mflr r0
ffc0c870: 90 01 00 24 stw r0,36(r1)
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
ffc0c874: 7c 60 1b 79 mr. r0,r3
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
ffc0c878: 93 81 00 10 stw r28,16(r1)
ffc0c87c: 93 a1 00 14 stw r29,20(r1)
ffc0c880: 93 c1 00 18 stw r30,24(r1)
ffc0c884: 93 e1 00 1c stw r31,28(r1)
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
ffc0c888: 90 01 00 08 stw r0,8(r1)
ffc0c88c: 41 82 00 74 beq- ffc0c900 <rtems_iterate_over_all_threads+0x98><== NEVER TAKEN
ffc0c890: 3f a0 00 00 lis r29,0
ffc0c894: 3b bd 30 00 addi r29,r29,12288
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
ffc0c898: 3b 9d 00 0c addi r28,r29,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 ] )
ffc0c89c: 85 3d 00 04 lwzu r9,4(r29)
ffc0c8a0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c8a4: 41 9e 00 54 beq- cr7,ffc0c8f8 <rtems_iterate_over_all_threads+0x90>
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
ffc0c8a8: 83 c9 00 04 lwz r30,4(r9)
if ( !information )
ffc0c8ac: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0c8b0: 41 9e 00 48 beq- cr7,ffc0c8f8 <rtems_iterate_over_all_threads+0x90>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc0c8b4: a0 1e 00 10 lhz r0,16(r30)
ffc0c8b8: 70 09 ff ff andi. r9,r0,65535
ffc0c8bc: 41 82 00 3c beq- ffc0c8f8 <rtems_iterate_over_all_threads+0x90><== NEVER TAKEN
ffc0c8c0: 3b e0 00 01 li r31,1
the_thread = (Thread_Control *)information->local_table[ i ];
ffc0c8c4: 81 7e 00 1c lwz r11,28(r30)
ffc0c8c8: 57 e9 10 3a rlwinm r9,r31,2,0,29
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc0c8cc: 3b ff 00 01 addi r31,r31,1
the_thread = (Thread_Control *)information->local_table[ i ];
ffc0c8d0: 7c 6b 48 2e lwzx r3,r11,r9
if ( !the_thread )
ffc0c8d4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c8d8: 41 9e 00 14 beq- cr7,ffc0c8ec <rtems_iterate_over_all_threads+0x84>
continue;
(*routine)(the_thread);
ffc0c8dc: 80 01 00 08 lwz r0,8(r1)
ffc0c8e0: 7c 09 03 a6 mtctr r0
ffc0c8e4: 4e 80 04 21 bctrl
ffc0c8e8: a0 1e 00 10 lhz r0,16(r30)
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc0c8ec: 54 09 04 3e clrlwi r9,r0,16
ffc0c8f0: 7f 89 f8 40 cmplw cr7,r9,r31
ffc0c8f4: 40 9c ff d0 bge+ cr7,ffc0c8c4 <rtems_iterate_over_all_threads+0x5c>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
ffc0c8f8: 7f 9d e0 00 cmpw cr7,r29,r28
ffc0c8fc: 40 9e ff a0 bne+ cr7,ffc0c89c <rtems_iterate_over_all_threads+0x34>
(*routine)(the_thread);
}
}
}
ffc0c900: 80 01 00 24 lwz r0,36(r1)
ffc0c904: 83 81 00 10 lwz r28,16(r1)
ffc0c908: 7c 08 03 a6 mtlr r0
ffc0c90c: 83 a1 00 14 lwz r29,20(r1)
ffc0c910: 83 c1 00 18 lwz r30,24(r1)
ffc0c914: 83 e1 00 1c lwz r31,28(r1)
ffc0c918: 38 21 00 20 addi r1,r1,32
ffc0c91c: 4e 80 00 20 blr
ffc0eb2c <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
ffc0eb2c: 94 21 ff f0 stwu r1,-16(r1)
ffc0eb30: 7c 08 02 a6 mflr r0
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 );
ffc0eb34: 38 80 00 00 li r4,0
ffc0eb38: 93 c1 00 08 stw r30,8(r1)
ffc0eb3c: 3f c0 00 00 lis r30,0
ffc0eb40: 38 a0 00 00 li r5,0
ffc0eb44: 93 e1 00 0c stw r31,12(r1)
ffc0eb48: 7c 7f 1b 78 mr r31,r3
ffc0eb4c: 80 7e 27 90 lwz r3,10128(r30)
ffc0eb50: 90 01 00 14 stw r0,20(r1)
ffc0eb54: 4b ff a1 dd bl ffc08d30 <rtems_semaphore_obtain>
rtems_libio_lock();
if (iop->sem)
ffc0eb58: 80 7f 00 30 lwz r3,48(r31)
ffc0eb5c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0eb60: 41 be 00 08 beq+ cr7,ffc0eb68 <rtems_libio_free+0x3c> <== NEVER TAKEN
rtems_semaphore_delete(iop->sem);
ffc0eb64: 4b ff a0 f1 bl ffc08c54 <rtems_semaphore_delete>
iop->flags &= ~LIBIO_FLAGS_OPEN;
ffc0eb68: 81 7f 00 18 lwz r11,24(r31)
iop->data1 = rtems_libio_iop_freelist;
ffc0eb6c: 3d 20 00 00 lis r9,0
ffc0eb70: 80 09 27 8c lwz r0,10124(r9)
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
ffc0eb74: 55 6b 06 2c rlwinm r11,r11,0,24,22
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
ffc0eb78: 80 7e 27 90 lwz r3,10128(r30)
iop->data1 = rtems_libio_iop_freelist;
ffc0eb7c: 90 1f 00 38 stw r0,56(r31)
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
ffc0eb80: 91 7f 00 18 stw r11,24(r31)
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
ffc0eb84: 93 e9 27 8c stw r31,10124(r9)
ffc0eb88: 4b ff a3 31 bl ffc08eb8 <rtems_semaphore_release>
rtems_libio_unlock();
}
ffc0eb8c: 80 01 00 14 lwz r0,20(r1)
ffc0eb90: 83 c1 00 08 lwz r30,8(r1)
ffc0eb94: 7c 08 03 a6 mtlr r0
ffc0eb98: 83 e1 00 0c lwz r31,12(r1)
ffc0eb9c: 38 21 00 10 addi r1,r1,16
ffc0eba0: 4e 80 00 20 blr
ffc04c60 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
ffc04c60: 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)
ffc04c64: 3d 20 00 00 lis r9,0
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
ffc04c68: 7c 08 02 a6 mflr r0
ffc04c6c: 93 e1 00 0c stw r31,12(r1)
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
ffc04c70: 83 e9 26 cc lwz r31,9932(r9)
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
ffc04c74: 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)
ffc04c78: 2f 9f 00 00 cmpwi cr7,r31,0
ffc04c7c: 41 9e 00 68 beq- cr7,ffc04ce4 <rtems_libio_init+0x84> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
ffc04c80: 7f e3 fb 78 mr r3,r31
ffc04c84: 38 80 00 40 li r4,64
ffc04c88: 4b ff fb c5 bl ffc0484c <calloc>
ffc04c8c: 3d 20 00 00 lis r9,0
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
ffc04c90: 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,
ffc04c94: 90 69 27 88 stw r3,10120(r9)
ffc04c98: 7c 6b 1b 78 mr r11,r3
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
ffc04c9c: 41 9e 00 a0 beq- cr7,ffc04d3c <rtems_libio_init+0xdc>
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++)
ffc04ca0: 2b 9f 00 01 cmplwi cr7,r31,1
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;
ffc04ca4: 3d 20 00 00 lis r9,0
ffc04ca8: 90 69 27 8c stw r3,10124(r9)
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
ffc04cac: 40 9d 00 30 ble- cr7,ffc04cdc <rtems_libio_init+0x7c> <== NEVER TAKEN
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
ffc04cb0: 3b ff ff ff addi r31,r31,-1
ffc04cb4: 7f e9 03 a6 mtctr r31
ffc04cb8: 39 23 00 40 addi r9,r3,64
ffc04cbc: 39 60 00 01 li r11,1
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++)
iop->data1 = iop + 1;
ffc04cc0: 91 29 ff f8 stw r9,-8(r9)
ffc04cc4: 39 6b 00 01 addi r11,r11,1
ffc04cc8: 39 29 00 40 addi r9,r9,64
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++)
ffc04ccc: 42 00 ff f4 bdnz+ ffc04cc0 <rtems_libio_init+0x60>
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
ffc04cd0: 39 6b ff ff addi r11,r11,-1
ffc04cd4: 55 6b 30 32 rlwinm r11,r11,6,0,25
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++)
ffc04cd8: 7d 63 5a 14 add r11,r3,r11
iop->data1 = iop + 1;
iop->data1 = NULL;
ffc04cdc: 38 00 00 00 li r0,0
ffc04ce0: 90 0b 00 38 stw r0,56(r11)
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
ffc04ce4: 3c 60 4c 42 lis r3,19522
ffc04ce8: 3c e0 00 00 lis r7,0
ffc04cec: 60 63 49 4f ori r3,r3,18767
ffc04cf0: 38 80 00 01 li r4,1
ffc04cf4: 38 a0 00 54 li r5,84
ffc04cf8: 38 c0 00 00 li r6,0
ffc04cfc: 38 e7 27 90 addi r7,r7,10128
ffc04d00: 48 00 3d 31 bl ffc08a30 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
ffc04d04: 2f 83 00 00 cmpwi cr7,r3,0
ffc04d08: 40 9e 00 30 bne- cr7,ffc04d38 <rtems_libio_init+0xd8> <== NEVER TAKEN
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
ffc04d0c: 3d 20 00 00 lis r9,0
ffc04d10: 80 09 26 c8 lwz r0,9928(r9)
ffc04d14: 2f 80 00 00 cmpwi cr7,r0,0
ffc04d18: 41 9e 00 0c beq- cr7,ffc04d24 <rtems_libio_init+0xc4> <== NEVER TAKEN
(* rtems_fs_init_helper)();
ffc04d1c: 7c 09 03 a6 mtctr r0
ffc04d20: 4e 80 04 21 bctrl
}
ffc04d24: 80 01 00 14 lwz r0,20(r1)
ffc04d28: 83 e1 00 0c lwz r31,12(r1)
ffc04d2c: 38 21 00 10 addi r1,r1,16
ffc04d30: 7c 08 03 a6 mtlr r0
ffc04d34: 4e 80 00 20 blr
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
rtems_fatal_error_occurred( rc );
ffc04d38: 48 00 49 81 bl ffc096b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
ffc04d3c: 38 60 00 1a li r3,26
ffc04d40: 48 00 49 79 bl ffc096b8 <rtems_fatal_error_occurred>
ffc0ec70 <rtems_libio_is_file_open>:
*/
int rtems_libio_is_file_open(
void *node_access
)
{
ffc0ec70: 94 21 ff e8 stwu r1,-24(r1)
ffc0ec74: 7c 08 02 a6 mflr r0
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 );
ffc0ec78: 38 80 00 00 li r4,0
ffc0ec7c: 93 c1 00 10 stw r30,16(r1)
ffc0ec80: 3f c0 00 00 lis r30,0
ffc0ec84: 38 a0 00 00 li r5,0
ffc0ec88: 93 e1 00 14 stw r31,20(r1)
ffc0ec8c: 7c 7f 1b 78 mr r31,r3
ffc0ec90: 80 7e 27 90 lwz r3,10128(r30)
ffc0ec94: 90 01 00 1c stw r0,28(r1)
ffc0ec98: 93 a1 00 0c stw r29,12(r1)
ffc0ec9c: 4b ff a0 95 bl ffc08d30 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
ffc0eca0: 3d 20 00 00 lis r9,0
ffc0eca4: 80 09 26 cc lwz r0,9932(r9)
ffc0eca8: 3d 20 00 00 lis r9,0
ffc0ecac: 81 29 27 88 lwz r9,10120(r9)
int rtems_libio_is_file_open(
void *node_access
)
{
rtems_libio_t *iop;
int result=0;
ffc0ecb0: 3b a0 00 00 li r29,0
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
ffc0ecb4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ecb8: 41 9e 00 30 beq- cr7,ffc0ece8 <rtems_libio_is_file_open+0x78><== NEVER TAKEN
ffc0ecbc: 7c 09 03 a6 mtctr r0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
ffc0ecc0: 80 09 00 18 lwz r0,24(r9)
ffc0ecc4: 70 0b 01 00 andi. r11,r0,256
ffc0ecc8: 41 82 00 10 beq- ffc0ecd8 <rtems_libio_is_file_open+0x68>
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.node_access == node_access ) {
ffc0eccc: 80 09 00 1c lwz r0,28(r9)
ffc0ecd0: 7f 80 f8 00 cmpw cr7,r0,r31
ffc0ecd4: 41 9e 00 3c beq- cr7,ffc0ed10 <rtems_libio_is_file_open+0xa0>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
ffc0ecd8: 42 40 00 0c bdz- ffc0ece4 <rtems_libio_is_file_open+0x74>
ffc0ecdc: 39 29 00 40 addi r9,r9,64
ffc0ece0: 4b ff ff e0 b ffc0ecc0 <rtems_libio_is_file_open+0x50>
int rtems_libio_is_file_open(
void *node_access
)
{
rtems_libio_t *iop;
int result=0;
ffc0ece4: 3b a0 00 00 li r29,0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
ffc0ece8: 80 7e 27 90 lwz r3,10128(r30)
ffc0ecec: 4b ff a1 cd bl ffc08eb8 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
ffc0ecf0: 80 01 00 1c lwz r0,28(r1)
ffc0ecf4: 7f a3 eb 78 mr r3,r29
ffc0ecf8: 83 c1 00 10 lwz r30,16(r1)
ffc0ecfc: 7c 08 03 a6 mtlr r0
ffc0ed00: 83 a1 00 0c lwz r29,12(r1)
ffc0ed04: 83 e1 00 14 lwz r31,20(r1)
ffc0ed08: 38 21 00 18 addi r1,r1,24
ffc0ed0c: 4e 80 00 20 blr
ffc0ed10: 80 7e 27 90 lwz r3,10128(r30)
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.node_access == node_access ) {
result = 1;
ffc0ed14: 3b a0 00 01 li r29,1
ffc0ed18: 4b ff a1 a1 bl ffc08eb8 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
ffc0ed1c: 80 01 00 1c lwz r0,28(r1)
ffc0ed20: 7f a3 eb 78 mr r3,r29
ffc0ed24: 83 c1 00 10 lwz r30,16(r1)
ffc0ed28: 7c 08 03 a6 mtlr r0
ffc0ed2c: 83 a1 00 0c lwz r29,12(r1)
ffc0ed30: 83 e1 00 14 lwz r31,20(r1)
ffc0ed34: 38 21 00 18 addi r1,r1,24
ffc0ed38: 4e 80 00 20 blr
ffc0eba4 <rtems_libio_is_open_files_in_fs>:
*/
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
ffc0eba4: 94 21 ff e8 stwu r1,-24(r1)
ffc0eba8: 7c 08 02 a6 mflr r0
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 );
ffc0ebac: 38 80 00 00 li r4,0
ffc0ebb0: 93 c1 00 10 stw r30,16(r1)
ffc0ebb4: 3f c0 00 00 lis r30,0
ffc0ebb8: 38 a0 00 00 li r5,0
ffc0ebbc: 93 e1 00 14 stw r31,20(r1)
ffc0ebc0: 7c 7f 1b 78 mr r31,r3
ffc0ebc4: 80 7e 27 90 lwz r3,10128(r30)
ffc0ebc8: 90 01 00 1c stw r0,28(r1)
ffc0ebcc: 93 a1 00 0c stw r29,12(r1)
ffc0ebd0: 4b ff a1 61 bl ffc08d30 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
ffc0ebd4: 3d 20 00 00 lis r9,0
ffc0ebd8: 80 09 26 cc lwz r0,9932(r9)
ffc0ebdc: 3d 20 00 00 lis r9,0
ffc0ebe0: 81 29 27 88 lwz r9,10120(r9)
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
rtems_libio_t *iop;
int result = 0;
ffc0ebe4: 3b a0 00 00 li r29,0
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
ffc0ebe8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ebec: 41 9e 00 30 beq- cr7,ffc0ec1c <rtems_libio_is_open_files_in_fs+0x78><== NEVER TAKEN
ffc0ebf0: 7c 09 03 a6 mtctr r0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
ffc0ebf4: 80 09 00 18 lwz r0,24(r9)
ffc0ebf8: 70 0b 01 00 andi. r11,r0,256
ffc0ebfc: 41 82 00 10 beq- ffc0ec0c <rtems_libio_is_open_files_in_fs+0x68>
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.mt_entry == fs_mt_entry ) {
ffc0ec00: 80 09 00 2c lwz r0,44(r9)
ffc0ec04: 7f 80 f8 00 cmpw cr7,r0,r31
ffc0ec08: 41 9e 00 3c beq- cr7,ffc0ec44 <rtems_libio_is_open_files_in_fs+0xa0>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
ffc0ec0c: 42 40 00 0c bdz- ffc0ec18 <rtems_libio_is_open_files_in_fs+0x74>
ffc0ec10: 39 29 00 40 addi r9,r9,64
ffc0ec14: 4b ff ff e0 b ffc0ebf4 <rtems_libio_is_open_files_in_fs+0x50>
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
rtems_libio_t *iop;
int result = 0;
ffc0ec18: 3b a0 00 00 li r29,0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
ffc0ec1c: 80 7e 27 90 lwz r3,10128(r30)
ffc0ec20: 4b ff a2 99 bl ffc08eb8 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
ffc0ec24: 80 01 00 1c lwz r0,28(r1)
ffc0ec28: 7f a3 eb 78 mr r3,r29
ffc0ec2c: 83 c1 00 10 lwz r30,16(r1)
ffc0ec30: 7c 08 03 a6 mtlr r0
ffc0ec34: 83 a1 00 0c lwz r29,12(r1)
ffc0ec38: 83 e1 00 14 lwz r31,20(r1)
ffc0ec3c: 38 21 00 18 addi r1,r1,24
ffc0ec40: 4e 80 00 20 blr
ffc0ec44: 80 7e 27 90 lwz r3,10128(r30)
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.mt_entry == fs_mt_entry ) {
result = 1;
ffc0ec48: 3b a0 00 01 li r29,1
ffc0ec4c: 4b ff a2 6d bl ffc08eb8 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
ffc0ec50: 80 01 00 1c lwz r0,28(r1)
ffc0ec54: 7f a3 eb 78 mr r3,r29
ffc0ec58: 83 c1 00 10 lwz r30,16(r1)
ffc0ec5c: 7c 08 03 a6 mtlr r0
ffc0ec60: 83 a1 00 0c lwz r29,12(r1)
ffc0ec64: 83 e1 00 14 lwz r31,20(r1)
ffc0ec68: 38 21 00 18 addi r1,r1,24
ffc0ec6c: 4e 80 00 20 blr
ffc0636c <rtems_libio_set_private_env>:
rtems_status_code rtems_libio_set_private_env(void)
{
ffc0636c: 94 21 ff a8 stwu r1,-88(r1)
ffc06370: 7c 08 02 a6 mflr r0
ffc06374: 93 e1 00 54 stw r31,84(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);
ffc06378: 3f e0 ff c2 lis r31,-62
ffc0637c: 3b ff 94 18 addi r31,r31,-27624
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void)
{
ffc06380: 90 01 00 5c stw r0,92(r1)
ffc06384: 93 a1 00 4c stw r29,76(r1)
ffc06388: 93 c1 00 50 stw r30,80(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);
ffc0638c: 3b c1 00 08 addi r30,r1,8
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void)
{
ffc06390: 93 21 00 3c stw r25,60(r1)
ffc06394: 93 41 00 40 stw r26,64(r1)
ffc06398: 93 61 00 44 stw r27,68(r1)
ffc0639c: 93 81 00 48 stw r28,72(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id task_id = rtems_task_self();
ffc063a0: 48 00 39 05 bl ffc09ca4 <rtems_task_self>
ffc063a4: 7c 7d 1b 78 mr r29,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);
ffc063a8: 38 80 00 01 li r4,1
ffc063ac: 7f e3 fb 78 mr r3,r31
ffc063b0: 38 a0 00 00 li r5,0
ffc063b4: 7f c6 f3 78 mr r6,r30
ffc063b8: 38 e0 00 00 li r7,0
ffc063bc: 4b ff e8 1d bl ffc04bd8 <rtems_filesystem_evaluate_path>
if (rv != 0)
ffc063c0: 2f 83 00 00 cmpwi cr7,r3,0
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
ffc063c4: 38 60 00 1a li r3,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)
ffc063c8: 41 9e 00 30 beq- cr7,ffc063f8 <rtems_libio_set_private_env+0x8c><== ALWAYS TAKEN
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
}
ffc063cc: 80 01 00 5c lwz r0,92(r1) <== NOT EXECUTED
ffc063d0: 83 21 00 3c lwz r25,60(r1) <== NOT EXECUTED
ffc063d4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc063d8: 83 41 00 40 lwz r26,64(r1) <== NOT EXECUTED
ffc063dc: 83 61 00 44 lwz r27,68(r1) <== NOT EXECUTED
ffc063e0: 83 81 00 48 lwz r28,72(r1) <== NOT EXECUTED
ffc063e4: 83 a1 00 4c lwz r29,76(r1) <== NOT EXECUTED
ffc063e8: 83 c1 00 50 lwz r30,80(r1) <== NOT EXECUTED
ffc063ec: 83 e1 00 54 lwz r31,84(r1) <== NOT EXECUTED
ffc063f0: 38 21 00 58 addi r1,r1,88 <== NOT EXECUTED
ffc063f4: 4e 80 00 20 blr <== NOT EXECUTED
rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0);
if (rv != 0)
goto error_0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, ¤t_loc, 0);
ffc063f8: 3b 81 00 1c addi r28,r1,28
ffc063fc: 7f e3 fb 78 mr r3,r31
ffc06400: 38 80 00 01 li r4,1
ffc06404: 38 a0 00 00 li r5,0
ffc06408: 7f 86 e3 78 mr r6,r28
ffc0640c: 38 e0 00 00 li r7,0
ffc06410: 4b ff e7 c9 bl ffc04bd8 <rtems_filesystem_evaluate_path>
if (rv != 0)
ffc06414: 2f 83 00 00 cmpwi cr7,r3,0
ffc06418: 40 9e 01 04 bne- cr7,ffc0651c <rtems_libio_set_private_env+0x1b0><== 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
ffc0641c: 3f 20 00 00 lis r25,0
ffc06420: 83 f9 26 f4 lwz r31,9972(r25)
/*
* Bharath: I'm not sure if the check can be reduced to
* if( rtems_current_user_env->task_id != task_id ) {
*/
if (
ffc06424: 3f 60 00 00 lis r27,0
ffc06428: 3b 7b 2a d8 addi r27,r27,10968
ffc0642c: 7f 9f d8 00 cmpw cr7,r31,r27
ffc06430: 41 9e 00 10 beq- cr7,ffc06440 <rtems_libio_set_private_env+0xd4>
rtems_current_user_env == &rtems_global_user_env
|| rtems_current_user_env->task_id != task_id
ffc06434: 80 1f 00 00 lwz r0,0(r31)
ffc06438: 7f 80 e8 00 cmpw cr7,r0,r29
ffc0643c: 41 9e 00 3c beq- cr7,ffc06478 <rtems_libio_set_private_env+0x10c>
) {
new_env = malloc(sizeof(rtems_user_env_t));
ffc06440: 38 60 00 48 li r3,72
ffc06444: 4b ff f0 fd bl ffc05540 <malloc>
if (new_env == NULL)
ffc06448: 2f 83 00 00 cmpwi cr7,r3,0
if (
rtems_current_user_env == &rtems_global_user_env
|| rtems_current_user_env->task_id != task_id
) {
new_env = malloc(sizeof(rtems_user_env_t));
ffc0644c: 7c 7f 1b 78 mr r31,r3
if (new_env == NULL)
ffc06450: 41 9e 00 c4 beq- cr7,ffc06514 <rtems_libio_set_private_env+0x1a8>
#ifdef HAVE_USERENV_REFCNT
new_env->refcnt = 1;
#endif
sc = rtems_task_variable_add(
ffc06454: 3c a0 ff c0 lis r5,-64
ffc06458: 38 60 00 00 li r3,0
ffc0645c: 38 99 26 f4 addi r4,r25,9972
ffc06460: 38 a5 63 1c addi r5,r5,25372
ffc06464: 48 00 39 85 bl ffc09de8 <rtems_task_variable_add>
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL)
ffc06468: 2f 83 00 00 cmpwi cr7,r3,0
ffc0646c: 40 9e 00 a0 bne- cr7,ffc0650c <rtems_libio_set_private_env+0x1a0>
goto error_3;
rtems_current_user_env = new_env;
ffc06470: 3d 20 00 00 lis r9,0
ffc06474: 93 e9 26 f4 stw r31,9972(r9)
}
/* Inherit the global values */
*rtems_current_user_env = rtems_global_user_env;
ffc06478: 7f e3 fb 78 mr r3,r31
ffc0647c: 7f 64 db 78 mr r4,r27
ffc06480: 38 a0 00 48 li r5,72
ffc06484: 48 00 cf 49 bl ffc133cc <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;
ffc06488: 80 01 00 08 lwz r0,8(r1)
}
/* Inherit the global values */
*rtems_current_user_env = rtems_global_user_env;
rtems_current_user_env->task_id = task_id;
ffc0648c: 93 bf 00 00 stw r29,0(r31)
* be freed when deleting the environment.
*/
rtems_filesystem_root = root_loc;
rtems_filesystem_current = current_loc;
return RTEMS_SUCCESSFUL;
ffc06490: 38 60 00 00 li r3,0
* 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;
ffc06494: 90 1f 00 18 stw r0,24(r31)
ffc06498: 80 01 00 0c lwz r0,12(r1)
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
}
ffc0649c: 83 21 00 3c lwz r25,60(r1)
* 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;
ffc064a0: 90 1f 00 1c stw r0,28(r31)
ffc064a4: 80 01 00 10 lwz r0,16(r1)
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
}
ffc064a8: 83 41 00 40 lwz r26,64(r1)
* 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;
ffc064ac: 90 1f 00 20 stw r0,32(r31)
ffc064b0: 80 01 00 14 lwz r0,20(r1)
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
}
ffc064b4: 83 61 00 44 lwz r27,68(r1)
* 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;
ffc064b8: 90 1f 00 24 stw r0,36(r31)
ffc064bc: 80 01 00 18 lwz r0,24(r1)
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
}
ffc064c0: 83 81 00 48 lwz r28,72(r1)
* 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;
ffc064c4: 90 1f 00 28 stw r0,40(r31)
rtems_filesystem_current = current_loc;
ffc064c8: 80 01 00 1c lwz r0,28(r1)
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
}
ffc064cc: 83 a1 00 4c lwz r29,76(r1)
* 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;
ffc064d0: 90 1f 00 04 stw r0,4(r31)
ffc064d4: 80 01 00 20 lwz r0,32(r1)
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
}
ffc064d8: 83 c1 00 50 lwz r30,80(r1)
* 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;
ffc064dc: 90 1f 00 08 stw r0,8(r31)
ffc064e0: 80 01 00 24 lwz r0,36(r1)
ffc064e4: 90 1f 00 0c stw r0,12(r31)
ffc064e8: 80 01 00 28 lwz r0,40(r1)
ffc064ec: 90 1f 00 10 stw r0,16(r31)
ffc064f0: 80 01 00 2c lwz r0,44(r1)
ffc064f4: 90 1f 00 14 stw r0,20(r31)
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
}
ffc064f8: 80 01 00 5c lwz r0,92(r1)
ffc064fc: 83 e1 00 54 lwz r31,84(r1)
ffc06500: 38 21 00 58 addi r1,r1,88
ffc06504: 7c 08 03 a6 mtlr r0
ffc06508: 4e 80 00 20 blr
rtems_filesystem_current = current_loc;
return RTEMS_SUCCESSFUL;
error_3:
free(new_env);
ffc0650c: 7f e3 fb 78 mr r3,r31
ffc06510: 4b ff e8 51 bl ffc04d60 <free>
error_2:
rtems_filesystem_freenode(¤t_loc);
ffc06514: 7f 83 e3 78 mr r3,r28
ffc06518: 4b ff e8 1d bl ffc04d34 <rtems_filesystem_freenode>
error_1:
rtems_filesystem_freenode(&root_loc);
ffc0651c: 7f c3 f3 78 mr r3,r30
ffc06520: 4b ff e8 15 bl ffc04d34 <rtems_filesystem_freenode>
error_0:
return RTEMS_NO_MEMORY;
}
ffc06524: 80 01 00 5c lwz r0,92(r1)
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
ffc06528: 38 60 00 1a li r3,26
}
ffc0652c: 83 21 00 3c lwz r25,60(r1)
ffc06530: 7c 08 03 a6 mtlr r0
ffc06534: 83 41 00 40 lwz r26,64(r1)
ffc06538: 83 61 00 44 lwz r27,68(r1)
ffc0653c: 83 81 00 48 lwz r28,72(r1)
ffc06540: 83 a1 00 4c lwz r29,76(r1)
ffc06544: 83 c1 00 50 lwz r30,80(r1)
ffc06548: 83 e1 00 54 lwz r31,84(r1)
ffc0654c: 38 21 00 58 addi r1,r1,88
ffc06550: 4e 80 00 20 blr
ffc06554 <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)
{
ffc06554: 94 21 ff d8 stwu r1,-40(r1)
ffc06558: 7c 08 02 a6 mflr r0
ffc0655c: 93 81 00 18 stw r28,24(r1)
ffc06560: 7c 7c 1b 78 mr r28,r3
ffc06564: 93 a1 00 1c stw r29,28(r1)
* 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;
ffc06568: 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)
{
ffc0656c: 93 e1 00 24 stw r31,36(r1)
ffc06570: 90 01 00 2c stw r0,44(r1)
ffc06574: 93 c1 00 20 stw r30,32(r1)
rtems_id current_task_id;
/*
* get current task id
*/
current_task_id = rtems_task_self();
ffc06578: 48 00 37 2d bl ffc09ca4 <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 )
ffc0657c: 7f 9c 18 00 cmpw cr7,r28,r3
rtems_id current_task_id;
/*
* get current task id
*/
current_task_id = rtems_task_self();
ffc06580: 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 )
ffc06584: 41 9e 00 38 beq- cr7,ffc065bc <rtems_libio_share_private_env+0x68><== NEVER TAKEN
return RTEMS_SUCCESSFUL;
/*
* Try to get the requested user environment
*/
sc = rtems_task_variable_get(
ffc06588: 3f c0 00 00 lis r30,0
ffc0658c: 7f 83 e3 78 mr r3,r28
ffc06590: 38 9e 26 f4 addi r4,r30,9972
ffc06594: 38 a1 00 08 addi r5,r1,8
ffc06598: 48 00 39 65 bl ffc09efc <rtems_task_variable_get>
(void*)&shared_user_env );
/*
* If it was not successful, return the error code
*/
if (sc != RTEMS_SUCCESSFUL)
ffc0659c: 7c 7d 1b 79 mr. r29,r3
ffc065a0: 40 82 00 1c bne- ffc065bc <rtems_libio_share_private_env+0x68>
* 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) {
ffc065a4: 80 7e 26 f4 lwz r3,9972(r30)
ffc065a8: 80 03 00 00 lwz r0,0(r3)
ffc065ac: 7f 80 f8 00 cmpw cr7,r0,r31
ffc065b0: 41 9e 00 30 beq- cr7,ffc065e0 <rtems_libio_share_private_env+0x8c>
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
}
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
ffc065b4: 80 01 00 08 lwz r0,8(r1)
ffc065b8: 90 1e 26 f4 stw r0,9972(r30)
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
}
ffc065bc: 80 01 00 2c lwz r0,44(r1)
ffc065c0: 7f a3 eb 78 mr r3,r29
ffc065c4: 83 81 00 18 lwz r28,24(r1)
ffc065c8: 7c 08 03 a6 mtlr r0
ffc065cc: 83 a1 00 1c lwz r29,28(r1)
ffc065d0: 83 c1 00 20 lwz r30,32(r1)
ffc065d4: 83 e1 00 24 lwz r31,36(r1)
ffc065d8: 38 21 00 28 addi r1,r1,40
ffc065dc: 4e 80 00 20 blr
* shared_user_env
*/
if (rtems_current_user_env->task_id==current_task_id) {
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
ffc065e0: 4b ff fd 3d bl ffc0631c <free_user_env>
ffc065e4: 4b ff ff d0 b ffc065b4 <rtems_libio_share_private_env+0x60>
ffc0ea08 <rtems_libio_to_fcntl_flags>:
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
ffc0ea08: 54 60 07 7c rlwinm r0,r3,0,29,30
ffc0ea0c: 2f 80 00 06 cmpwi cr7,r0,6
fcntl_flags |= O_RDWR;
ffc0ea10: 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 ) {
ffc0ea14: 41 9e 00 10 beq- cr7,ffc0ea24 <rtems_libio_to_fcntl_flags+0x1c><== NEVER TAKEN
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
ffc0ea18: 70 60 00 02 andi. r0,r3,2
fcntl_flags |= O_RDONLY;
ffc0ea1c: 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) {
ffc0ea20: 41 82 00 30 beq- ffc0ea50 <rtems_libio_to_fcntl_flags+0x48><== NEVER TAKEN
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
fcntl_flags |= O_WRONLY;
}
if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
ffc0ea24: 70 69 00 01 andi. r9,r3,1
ffc0ea28: 41 82 00 08 beq- ffc0ea30 <rtems_libio_to_fcntl_flags+0x28>
fcntl_flags |= O_NONBLOCK;
ffc0ea2c: 60 00 40 00 ori r0,r0,16384
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
ffc0ea30: 70 69 02 00 andi. r9,r3,512
ffc0ea34: 41 82 00 08 beq- ffc0ea3c <rtems_libio_to_fcntl_flags+0x34>
fcntl_flags |= O_APPEND;
ffc0ea38: 60 00 00 08 ori r0,r0,8
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
ffc0ea3c: 70 69 04 00 andi. r9,r3,1024
ffc0ea40: 41 82 00 08 beq- ffc0ea48 <rtems_libio_to_fcntl_flags+0x40>
fcntl_flags |= O_CREAT;
ffc0ea44: 60 00 02 00 ori r0,r0,512
}
return fcntl_flags;
}
ffc0ea48: 7c 03 03 78 mr r3,r0
ffc0ea4c: 4e 80 00 20 blr
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
ffc0ea50: 54 60 f7 fe rlwinm r0,r3,30,31,31 <== NOT EXECUTED
ffc0ea54: 4b ff ff d0 b ffc0ea24 <rtems_libio_to_fcntl_flags+0x1c><== NOT EXECUTED
ffc089cc <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
ffc089cc: 94 21 ff e8 stwu r1,-24(r1)
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
ffc089d0: 3d 20 00 00 lis r9,0
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
ffc089d4: 7c 08 02 a6 mflr r0
ffc089d8: 7c 64 1b 78 mr r4,r3
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
ffc089dc: 80 69 27 3c lwz r3,10044(r9)
ffc089e0: 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
)
{
ffc089e4: 90 01 00 1c stw r0,28(r1)
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
ffc089e8: 48 00 78 29 bl ffc10210 <_Protected_heap_Get_block_size>
ffc089ec: 2f 83 00 00 cmpwi cr7,r3,0
ffc089f0: 41 9e 00 2c beq- cr7,ffc08a1c <rtems_malloc_statistics_at_free+0x50><== NEVER TAKEN
MSBUMP(lifetime_freed, size);
ffc089f4: 3d 00 00 00 lis r8,0
ffc089f8: 81 41 00 08 lwz r10,8(r1)
ffc089fc: 39 08 33 d0 addi r8,r8,13264
ffc08a00: 81 68 00 28 lwz r11,40(r8)
ffc08a04: 39 20 00 00 li r9,0
ffc08a08: 81 88 00 2c lwz r12,44(r8)
ffc08a0c: 7d 4a 60 14 addc r10,r10,r12
ffc08a10: 7d 29 59 14 adde r9,r9,r11
ffc08a14: 91 28 00 28 stw r9,40(r8)
ffc08a18: 91 48 00 2c stw r10,44(r8)
}
}
ffc08a1c: 80 01 00 1c lwz r0,28(r1)
ffc08a20: 38 21 00 18 addi r1,r1,24
ffc08a24: 7c 08 03 a6 mtlr r0
ffc08a28: 4e 80 00 20 blr
ffc08a2c <rtems_malloc_statistics_at_malloc>:
{
uintptr_t actual_size = 0;
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
ffc08a2c: 7c 64 1b 79 mr. r4,r3
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
ffc08a30: 94 21 ff e8 stwu r1,-24(r1)
ffc08a34: 7c 08 02 a6 mflr r0
ffc08a38: 90 01 00 1c stw r0,28(r1)
uintptr_t actual_size = 0;
ffc08a3c: 38 00 00 00 li r0,0
ffc08a40: 90 01 00 08 stw r0,8(r1)
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
ffc08a44: 41 82 00 54 beq- ffc08a98 <rtems_malloc_statistics_at_malloc+0x6c><== NEVER TAKEN
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
ffc08a48: 3d 20 00 00 lis r9,0
ffc08a4c: 80 69 27 3c lwz r3,10044(r9)
ffc08a50: 38 a1 00 08 addi r5,r1,8
ffc08a54: 48 00 77 bd bl ffc10210 <_Protected_heap_Get_block_size>
MSBUMP(lifetime_allocated, actual_size);
ffc08a58: 3d 00 00 00 lis r8,0
ffc08a5c: 39 08 33 d0 addi r8,r8,13264
ffc08a60: 81 41 00 08 lwz r10,8(r1)
ffc08a64: 81 68 00 20 lwz r11,32(r8)
ffc08a68: 39 20 00 00 li r9,0
ffc08a6c: 81 88 00 24 lwz r12,36(r8)
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
ffc08a70: 80 08 00 2c lwz r0,44(r8)
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
ffc08a74: 7d 4a 60 14 addc r10,r10,r12
ffc08a78: 7d 29 59 14 adde r9,r9,r11
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
if (current_depth > s->max_depth)
ffc08a7c: 81 68 00 18 lwz r11,24(r8)
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
ffc08a80: 91 28 00 20 stw r9,32(r8)
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
ffc08a84: 7c 00 50 50 subf r0,r0,r10
if (current_depth > s->max_depth)
ffc08a88: 7f 80 58 40 cmplw cr7,r0,r11
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
ffc08a8c: 91 48 00 24 stw r10,36(r8)
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
if (current_depth > s->max_depth)
ffc08a90: 40 9d 00 08 ble- cr7,ffc08a98 <rtems_malloc_statistics_at_malloc+0x6c>
s->max_depth = current_depth;
ffc08a94: 90 08 00 18 stw r0,24(r8)
}
ffc08a98: 80 01 00 1c lwz r0,28(r1)
ffc08a9c: 38 21 00 18 addi r1,r1,24
ffc08aa0: 7c 08 03 a6 mtlr r0
ffc08aa4: 4e 80 00 20 blr
ffc13e00 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
ffc13e00: 94 21 ff e8 stwu r1,-24(r1)
ffc13e04: 7c 08 02 a6 mflr r0
ffc13e08: 93 e1 00 14 stw r31,20(r1)
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
ffc13e0c: 7c 7f 1b 79 mr. r31,r3
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
ffc13e10: 93 81 00 08 stw r28,8(r1)
ffc13e14: 7c bc 2b 78 mr r28,r5
ffc13e18: 93 a1 00 0c stw r29,12(r1)
/*
* Parameter error checks
*/
if ( !pointer )
return EINVAL;
ffc13e1c: 3b a0 00 16 li r29,22
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
ffc13e20: 93 c1 00 10 stw r30,16(r1)
ffc13e24: 7c 9e 23 78 mr r30,r4
ffc13e28: 90 01 00 1c stw r0,28(r1)
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
ffc13e2c: 41 82 00 6c beq- ffc13e98 <rtems_memalign+0x98>
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
ffc13e30: 3d 20 00 00 lis r9,0
ffc13e34: 80 09 27 e4 lwz r0,10212(r9)
ffc13e38: 2f 80 00 03 cmpwi cr7,r0,3
* Parameter error checks
*/
if ( !pointer )
return EINVAL;
*pointer = NULL;
ffc13e3c: 38 00 00 00 li r0,0
ffc13e40: 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()) &&
ffc13e44: 41 9e 00 78 beq- cr7,ffc13ebc <rtems_memalign+0xbc> <== ALWAYS TAKEN
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
ffc13e48: 4b ff 21 6d bl ffc05fb4 <malloc_deferred_frees_process>
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
ffc13e4c: 3d 20 00 00 lis r9,0
ffc13e50: 80 69 26 dc lwz r3,9948(r9)
ffc13e54: 7f c5 f3 78 mr r5,r30
ffc13e58: 7f 84 e3 78 mr r4,r28
ffc13e5c: 38 c0 00 00 li r6,0
ffc13e60: 4b ff 88 61 bl ffc0c6c0 <_Protected_heap_Allocate_aligned_with_boundary>
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
return ENOMEM;
ffc13e64: 3b a0 00 0c li r29,12
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
ffc13e68: 7c 7e 1b 79 mr. r30,r3
ffc13e6c: 41 82 00 2c beq- ffc13e98 <rtems_memalign+0x98>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
ffc13e70: 3d 20 00 00 lis r9,0
ffc13e74: 81 29 27 48 lwz r9,10056(r9)
ffc13e78: 2f 89 00 00 cmpwi cr7,r9,0
ffc13e7c: 41 9e 00 14 beq- cr7,ffc13e90 <rtems_memalign+0x90>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
ffc13e80: 80 09 00 04 lwz r0,4(r9)
ffc13e84: 7f e3 fb 78 mr r3,r31
ffc13e88: 7c 09 03 a6 mtctr r0
ffc13e8c: 4e 80 04 21 bctrl
*pointer = return_this;
ffc13e90: 93 df 00 00 stw r30,0(r31)
return 0;
ffc13e94: 3b a0 00 00 li r29,0
}
ffc13e98: 80 01 00 1c lwz r0,28(r1)
ffc13e9c: 7f a3 eb 78 mr r3,r29
ffc13ea0: 83 81 00 08 lwz r28,8(r1)
ffc13ea4: 7c 08 03 a6 mtlr r0
ffc13ea8: 83 a1 00 0c lwz r29,12(r1)
ffc13eac: 83 c1 00 10 lwz r30,16(r1)
ffc13eb0: 83 e1 00 14 lwz r31,20(r1)
ffc13eb4: 38 21 00 18 addi r1,r1,24
ffc13eb8: 4e 80 00 20 blr
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
ffc13ebc: 4b ff 20 b1 bl ffc05f6c <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()) &&
ffc13ec0: 2f 83 00 00 cmpwi cr7,r3,0
ffc13ec4: 40 9e ff 84 bne+ cr7,ffc13e48 <rtems_memalign+0x48> <== ALWAYS TAKEN
ffc13ec8: 4b ff ff d0 b ffc13e98 <rtems_memalign+0x98> <== NOT EXECUTED
ffc1204c <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
ffc1204c: 94 21 ff 80 stwu r1,-128(r1)
ffc12050: 7d 80 00 26 mfcr r12
ffc12054: 7c 08 02 a6 mflr r0
ffc12058: 93 61 00 6c stw r27,108(r1)
ffc1205c: 7c 9b 23 78 mr r27,r4
ffc12060: 93 c1 00 78 stw r30,120(r1)
ffc12064: 90 01 00 84 stw r0,132(r1)
ffc12068: 93 01 00 60 stw r24,96(r1)
ffc1206c: 93 21 00 64 stw r25,100(r1)
ffc12070: 93 41 00 68 stw r26,104(r1)
ffc12074: 93 81 00 70 stw r28,112(r1)
ffc12078: 93 a1 00 74 stw r29,116(r1)
ffc1207c: 93 e1 00 7c stw r31,124(r1)
ffc12080: 91 81 00 5c stw r12,92(r1)
int success = 0;
char *dup_path = strdup(path);
ffc12084: 48 00 30 9d bl ffc15120 <strdup>
if (dup_path != NULL) {
ffc12088: 7c 7e 1b 79 mr. r30,r3
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
ffc1208c: 38 60 ff ff li r3,-1
rtems_mkdir(const char *path, mode_t mode)
{
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
ffc12090: 41 82 01 2c beq- ffc121bc <rtems_mkdir+0x170> <== NEVER TAKEN
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
ffc12094: 88 1e 00 00 lbz r0,0(r30)
ffc12098: 7f df f3 78 mr r31,r30
ffc1209c: 2f 80 00 2f cmpwi cr7,r0,47
ffc120a0: 41 9e 01 64 beq- cr7,ffc12204 <rtems_mkdir+0x1b8>
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
ffc120a4: 2f 80 00 00 cmpwi cr7,r0,0
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
ffc120a8: 3b a0 00 00 li r29,0
ffc120ac: 39 20 00 01 li r9,1
retval = 0;
break;
}
}
if (!last)
*p = '/';
ffc120b0: 3b 80 00 2f li r28,47
}
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) {
ffc120b4: 3b 21 00 08 addi r25,r1,8
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
ffc120b8: 3b 40 00 00 li r26,0
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
ffc120bc: 41 9e 00 18 beq- cr7,ffc120d4 <rtems_mkdir+0x88> <== NEVER TAKEN
last = 1;
else if (p[0] != '/')
ffc120c0: 2f 80 00 2f cmpwi cr7,r0,47
ffc120c4: 41 9e 00 a8 beq- cr7,ffc1216c <rtems_mkdir+0x120>
retval = 0;
break;
}
}
if (!last)
*p = '/';
ffc120c8: 8c 1f 00 01 lbzu r0,1(r31)
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
ffc120cc: 2f 80 00 00 cmpwi cr7,r0,0
ffc120d0: 40 be ff f0 bne- cr7,ffc120c0 <rtems_mkdir+0x74>
else if (p[0] != '/')
continue;
*p = '\0';
if (!last && p[1] == '\0')
last = 1;
if (first) {
ffc120d4: 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';
ffc120d8: 98 1f 00 00 stb r0,0(r31)
ffc120dc: 3b 00 00 01 li r24,1
if (!last && p[1] == '\0')
last = 1;
if (first) {
ffc120e0: 41 be 00 a4 beq+ cr7,ffc12184 <rtems_mkdir+0x138>
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
ffc120e4: 2e 18 00 00 cmpwi cr4,r24,0
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
ffc120e8: 38 60 00 00 li r3,0
ffc120ec: 48 00 02 51 bl ffc1233c <umask>
ffc120f0: 7c 7d 1b 78 mr r29,r3
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
ffc120f4: 54 63 06 ae rlwinm r3,r3,0,26,23
ffc120f8: 48 00 02 45 bl ffc1233c <umask>
first = 0;
}
if (last)
ffc120fc: 41 b2 00 90 beq+ cr4,ffc1218c <rtems_mkdir+0x140>
(void)umask(oumask);
ffc12100: 7f a3 eb 78 mr r3,r29
ffc12104: 48 00 02 39 bl ffc1233c <umask>
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
ffc12108: 7f 64 db 78 mr r4,r27
ffc1210c: 7f c3 f3 78 mr r3,r30
ffc12110: 4b ff 49 ed bl ffc06afc <mkdir>
ffc12114: 2f 83 00 00 cmpwi cr7,r3,0
ffc12118: 40 bc 00 88 bge+ cr7,ffc121a0 <rtems_mkdir+0x154>
if (errno == EEXIST || errno == EISDIR) {
ffc1211c: 48 00 1d 75 bl ffc13e90 <__errno>
ffc12120: 80 03 00 00 lwz r0,0(r3)
ffc12124: 2f 80 00 11 cmpwi cr7,r0,17
ffc12128: 41 9e 00 14 beq- cr7,ffc1213c <rtems_mkdir+0xf0>
ffc1212c: 48 00 1d 65 bl ffc13e90 <__errno>
ffc12130: 80 03 00 00 lwz r0,0(r3)
ffc12134: 2f 80 00 15 cmpwi cr7,r0,21
ffc12138: 40 9e 01 1c bne- cr7,ffc12254 <rtems_mkdir+0x208> <== ALWAYS TAKEN
if (stat(path, &sb) < 0) {
ffc1213c: 7f c3 f3 78 mr r3,r30
ffc12140: 7f 24 cb 78 mr r4,r25
ffc12144: 48 00 01 19 bl ffc1225c <stat>
ffc12148: 2f 83 00 00 cmpwi cr7,r3,0
ffc1214c: 41 9c 01 08 blt- cr7,ffc12254 <rtems_mkdir+0x208> <== NEVER TAKEN
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
ffc12150: 80 01 00 14 lwz r0,20(r1)
ffc12154: 54 00 04 26 rlwinm r0,r0,0,16,19
ffc12158: 2f 80 40 00 cmpwi cr7,r0,16384
ffc1215c: 40 9e 00 b4 bne- cr7,ffc12210 <rtems_mkdir+0x1c4>
else
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
ffc12160: 41 92 00 94 beq- cr4,ffc121f4 <rtems_mkdir+0x1a8>
retval = 2;
ffc12164: 3b e0 00 02 li r31,2
ffc12168: 48 00 00 40 b ffc121a8 <rtems_mkdir+0x15c>
else if (p[0] != '/')
continue;
*p = '\0';
if (!last && p[1] == '\0')
last = 1;
if (first) {
ffc1216c: 2f 89 00 00 cmpwi cr7,r9,0
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
if (!last && p[1] == '\0')
ffc12170: 8b 1f 00 01 lbz r24,1(r31)
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
ffc12174: 9b 5f 00 00 stb r26,0(r31)
if (!last && p[1] == '\0')
ffc12178: 7f 18 00 34 cntlzw r24,r24
ffc1217c: 57 18 d9 7e rlwinm r24,r24,27,5,31
last = 1;
if (first) {
ffc12180: 40 be ff 64 bne- cr7,ffc120e4 <rtems_mkdir+0x98>
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
ffc12184: 2e 18 00 00 cmpwi cr4,r24,0
ffc12188: 40 b2 ff 78 bne- cr4,ffc12100 <rtems_mkdir+0xb4>
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
ffc1218c: 38 80 01 ff li r4,511
ffc12190: 7f c3 f3 78 mr r3,r30
ffc12194: 4b ff 49 69 bl ffc06afc <mkdir>
ffc12198: 2f 83 00 00 cmpwi cr7,r3,0
ffc1219c: 41 bc ff 80 blt- cr7,ffc1211c <rtems_mkdir+0xd0>
} else {
retval = 0;
break;
}
}
if (!last)
ffc121a0: 41 92 00 54 beq- cr4,ffc121f4 <rtems_mkdir+0x1a8>
ffc121a4: 3b e0 00 01 li r31,1
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
ffc121a8: 7f c3 f3 78 mr r3,r30
ffc121ac: 4b ff 40 59 bl ffc06204 <free>
}
return success != 0 ? 0 : -1;
ffc121b0: 2f 9f 00 00 cmpwi cr7,r31,0
ffc121b4: 38 60 00 00 li r3,0
ffc121b8: 41 9e 00 94 beq- cr7,ffc1224c <rtems_mkdir+0x200> <== NEVER TAKEN
}
ffc121bc: 80 01 00 84 lwz r0,132(r1)
ffc121c0: 81 81 00 5c lwz r12,92(r1)
ffc121c4: 7c 08 03 a6 mtlr r0
ffc121c8: 83 01 00 60 lwz r24,96(r1)
ffc121cc: 83 21 00 64 lwz r25,100(r1)
ffc121d0: 7d 80 81 20 mtcrf 8,r12
ffc121d4: 83 41 00 68 lwz r26,104(r1)
ffc121d8: 83 61 00 6c lwz r27,108(r1)
ffc121dc: 83 81 00 70 lwz r28,112(r1)
ffc121e0: 83 a1 00 74 lwz r29,116(r1)
ffc121e4: 83 c1 00 78 lwz r30,120(r1)
ffc121e8: 83 e1 00 7c lwz r31,124(r1)
ffc121ec: 38 21 00 80 addi r1,r1,128
ffc121f0: 4e 80 00 20 blr
retval = 0;
break;
}
}
if (!last)
*p = '/';
ffc121f4: 9b 9f 00 00 stb r28,0(r31)
ffc121f8: 39 20 00 00 li r9,0
ffc121fc: 8c 1f 00 01 lbzu r0,1(r31)
ffc12200: 4b ff fe cc b ffc120cc <rtems_mkdir+0x80>
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
ffc12204: 88 1e 00 01 lbz r0,1(r30)
ffc12208: 3b fe 00 01 addi r31,r30,1
ffc1220c: 4b ff fe 98 b ffc120a4 <rtems_mkdir+0x58>
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
ffc12210: 41 92 00 20 beq- cr4,ffc12230 <rtems_mkdir+0x1e4>
errno = EEXIST;
ffc12214: 48 00 1c 7d bl ffc13e90 <__errno>
ffc12218: 38 00 00 11 li r0,17
ffc1221c: 90 03 00 00 stw r0,0(r3)
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
ffc12220: 7f c3 f3 78 mr r3,r30
ffc12224: 4b ff 3f e1 bl ffc06204 <free>
}
return success != 0 ? 0 : -1;
ffc12228: 38 60 ff ff li r3,-1
ffc1222c: 4b ff ff 90 b ffc121bc <rtems_mkdir+0x170>
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
ffc12230: 48 00 1c 61 bl ffc13e90 <__errno>
ffc12234: 38 00 00 14 li r0,20
ffc12238: 90 03 00 00 stw r0,0(r3)
}
if (!last)
*p = '/';
}
if (!first && !last)
(void)umask(oumask);
ffc1223c: 7f a3 eb 78 mr r3,r29
ffc12240: 48 00 00 fd bl ffc1233c <umask>
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
ffc12244: 7f c3 f3 78 mr r3,r30
ffc12248: 4b ff 3f bd bl ffc06204 <free>
}
return success != 0 ? 0 : -1;
ffc1224c: 38 60 ff ff li r3,-1
ffc12250: 4b ff ff 6c b ffc121bc <rtems_mkdir+0x170>
}
}
if (!last)
*p = '/';
}
if (!first && !last)
ffc12254: 41 92 ff e8 beq+ cr4,ffc1223c <rtems_mkdir+0x1f0> <== NEVER TAKEN
ffc12258: 4b ff ff ec b ffc12244 <rtems_mkdir+0x1f8>
ffc0af74 <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
ffc0af74: 94 21 ff f0 stwu r1,-16(r1)
ffc0af78: 7c 08 02 a6 mflr r0
ffc0af7c: 93 e1 00 0c stw r31,12(r1)
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
ffc0af80: 7c bf 2b 79 mr. r31,r5
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
ffc0af84: 90 01 00 14 stw r0,20(r1)
/*
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
ffc0af88: 38 00 00 09 li r0,9
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
ffc0af8c: 41 82 00 7c beq- ffc0b008 <rtems_object_get_class_information+0x94>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
ffc0af90: 54 84 04 3e clrlwi r4,r4,16
ffc0af94: 48 00 24 d1 bl ffc0d464 <_Objects_Get_information>
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
ffc0af98: 38 00 00 0a li r0,10
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
ffc0af9c: 2c 03 00 00 cmpwi r3,0
ffc0afa0: 41 82 00 68 beq- ffc0b008 <rtems_object_get_class_information+0x94>
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
ffc0afa4: a1 03 00 10 lhz r8,16(r3)
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
ffc0afa8: 80 03 00 08 lwz r0,8(r3)
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
ffc0afac: 2f 88 00 00 cmpwi cr7,r8,0
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
ffc0afb0: 81 63 00 0c lwz r11,12(r3)
info->auto_extend = obj_info->auto_extend;
ffc0afb4: 89 23 00 12 lbz r9,18(r3)
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
ffc0afb8: 90 1f 00 00 stw r0,0(r31)
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
ffc0afbc: 38 00 00 00 li r0,0
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
ffc0afc0: 91 7f 00 04 stw r11,4(r31)
info->auto_extend = obj_info->auto_extend;
ffc0afc4: 99 3f 00 0c stb r9,12(r31)
info->maximum = obj_info->maximum;
ffc0afc8: 91 1f 00 08 stw r8,8(r31)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
ffc0afcc: 41 9e 00 34 beq- cr7,ffc0b000 <rtems_object_get_class_information+0x8c><== NEVER TAKEN
ffc0afd0: 80 e3 00 1c lwz r7,28(r3)
ffc0afd4: 39 60 00 01 li r11,1
ffc0afd8: 39 20 00 01 li r9,1
ffc0afdc: 39 29 00 01 addi r9,r9,1
ffc0afe0: 7f 88 48 40 cmplw cr7,r8,r9
if ( !obj_info->local_table[i] )
ffc0afe4: 55 6b 10 3a rlwinm r11,r11,2,0,29
ffc0afe8: 7d 47 58 2e lwzx r10,r7,r11
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
ffc0afec: 7d 2b 4b 78 mr r11,r9
if ( !obj_info->local_table[i] )
unallocated++;
ffc0aff0: 20 ca 00 00 subfic r6,r10,0
ffc0aff4: 7c c0 01 94 addze r6,r0
ffc0aff8: 7c c0 33 78 mr r0,r6
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
ffc0affc: 40 9c ff e0 bge+ cr7,ffc0afdc <rtems_object_get_class_information+0x68>
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
ffc0b000: 90 1f 00 10 stw r0,16(r31)
return RTEMS_SUCCESSFUL;
ffc0b004: 38 00 00 00 li r0,0
}
ffc0b008: 7c 03 03 78 mr r3,r0
ffc0b00c: 80 01 00 14 lwz r0,20(r1)
ffc0b010: 83 e1 00 0c lwz r31,12(r1)
ffc0b014: 38 21 00 10 addi r1,r1,16
ffc0b018: 7c 08 03 a6 mtlr r0
ffc0b01c: 4e 80 00 20 blr
ffc0ae3c <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
ffc0ae3c: 94 21 ff 88 stwu r1,-120(r1)
ffc0ae40: 7c 08 02 a6 mflr r0
ffc0ae44: 90 81 00 1c stw r4,28(r1)
ffc0ae48: 90 01 00 7c stw r0,124(r1)
ffc0ae4c: 90 a1 00 20 stw r5,32(r1)
ffc0ae50: 90 c1 00 24 stw r6,36(r1)
ffc0ae54: 90 e1 00 28 stw r7,40(r1)
ffc0ae58: 91 01 00 2c stw r8,44(r1)
ffc0ae5c: 91 21 00 30 stw r9,48(r1)
ffc0ae60: 91 41 00 34 stw r10,52(r1)
ffc0ae64: 40 86 00 24 bne- cr1,ffc0ae88 <rtems_panic+0x4c> <== ALWAYS TAKEN
ffc0ae68: d8 21 00 38 stfd f1,56(r1) <== NOT EXECUTED
ffc0ae6c: d8 41 00 40 stfd f2,64(r1) <== NOT EXECUTED
ffc0ae70: d8 61 00 48 stfd f3,72(r1) <== NOT EXECUTED
ffc0ae74: d8 81 00 50 stfd f4,80(r1) <== NOT EXECUTED
ffc0ae78: d8 a1 00 58 stfd f5,88(r1) <== NOT EXECUTED
ffc0ae7c: d8 c1 00 60 stfd f6,96(r1) <== NOT EXECUTED
ffc0ae80: d8 e1 00 68 stfd f7,104(r1) <== NOT EXECUTED
ffc0ae84: d9 01 00 70 stfd f8,112(r1) <== NOT EXECUTED
va_list arglist;
va_start(arglist, printf_format);
ffc0ae88: 38 00 00 01 li r0,1
ffc0ae8c: 98 01 00 08 stb r0,8(r1)
ffc0ae90: 38 00 00 00 li r0,0
void rtems_panic(
const char *printf_format,
...
)
{
ffc0ae94: 7c 64 1b 78 mr r4,r3
va_list arglist;
va_start(arglist, printf_format);
ffc0ae98: 98 01 00 09 stb r0,9(r1)
ffc0ae9c: 38 01 00 80 addi r0,r1,128
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
ffc0aea0: 38 a1 00 08 addi r5,r1,8
...
)
{
va_list arglist;
va_start(arglist, printf_format);
ffc0aea4: 90 01 00 0c stw r0,12(r1)
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
ffc0aea8: 3c 60 20 00 lis r3,8192
...
)
{
va_list arglist;
va_start(arglist, printf_format);
ffc0aeac: 38 01 00 18 addi r0,r1,24
ffc0aeb0: 90 01 00 10 stw r0,16(r1)
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
ffc0aeb4: 4b ff fc fd bl ffc0abb0 <rtems_verror>
va_end(arglist);
rtems_error(0, "fatal error, exiting");
ffc0aeb8: 3c 80 ff c3 lis r4,-61
ffc0aebc: 38 84 a4 1c addi r4,r4,-23524
ffc0aec0: 38 60 00 00 li r3,0
ffc0aec4: 4c c6 31 82 crclr 4*cr1+eq
ffc0aec8: 4b ff fe 9d bl ffc0ad64 <rtems_error>
_exit(errno);
ffc0aecc: 48 00 e3 f5 bl ffc192c0 <__errno>
ffc0aed0: 80 63 00 00 lwz r3,0(r3)
ffc0aed4: 48 00 0d b5 bl ffc0bc88 <_exit>
ffc18584 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
ffc18584: 94 21 ff d0 stwu r1,-48(r1)
ffc18588: 7c 08 02 a6 mflr r0
ffc1858c: 93 e1 00 2c stw r31,44(r1)
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
ffc18590: 7c 7f 1b 79 mr. r31,r3
return RTEMS_INVALID_NAME;
ffc18594: 38 60 00 03 li r3,3
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
ffc18598: 93 c1 00 28 stw r30,40(r1)
ffc1859c: 7c be 2b 78 mr r30,r5
ffc185a0: 90 01 00 34 stw r0,52(r1)
ffc185a4: 93 61 00 1c stw r27,28(r1)
ffc185a8: 93 81 00 20 stw r28,32(r1)
ffc185ac: 93 a1 00 24 stw r29,36(r1)
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
ffc185b0: 41 82 00 48 beq- ffc185f8 <rtems_partition_create+0x74>
return RTEMS_INVALID_NAME;
if ( !starting_address )
ffc185b4: 2f 84 00 00 cmpwi cr7,r4,0
return RTEMS_INVALID_ADDRESS;
ffc185b8: 38 60 00 09 li r3,9
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
ffc185bc: 41 9e 00 3c beq- cr7,ffc185f8 <rtems_partition_create+0x74>
return RTEMS_INVALID_ADDRESS;
if ( !id )
ffc185c0: 2f 88 00 00 cmpwi cr7,r8,0
ffc185c4: 41 9e 00 34 beq- cr7,ffc185f8 <rtems_partition_create+0x74><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
ffc185c8: 2f 85 00 00 cmpwi cr7,r5,0
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
ffc185cc: 38 60 00 08 li r3,8
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
ffc185d0: 41 9e 00 28 beq- cr7,ffc185f8 <rtems_partition_create+0x74>
ffc185d4: 2f 86 00 00 cmpwi cr7,r6,0
ffc185d8: 41 9e 00 20 beq- cr7,ffc185f8 <rtems_partition_create+0x74>
ffc185dc: 7f 85 30 40 cmplw cr7,r5,r6
ffc185e0: 41 9c 00 18 blt- cr7,ffc185f8 <rtems_partition_create+0x74>
ffc185e4: 70 c0 00 07 andi. r0,r6,7
ffc185e8: 40 82 00 10 bne- ffc185f8 <rtems_partition_create+0x74>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
ffc185ec: 70 9b 00 07 andi. r27,r4,7
return RTEMS_INVALID_ADDRESS;
ffc185f0: 38 60 00 09 li r3,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 ) )
ffc185f4: 41 82 00 28 beq- ffc1861c <rtems_partition_create+0x98>
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
ffc185f8: 80 01 00 34 lwz r0,52(r1)
ffc185fc: 83 61 00 1c lwz r27,28(r1)
ffc18600: 7c 08 03 a6 mtlr r0
ffc18604: 83 81 00 20 lwz r28,32(r1)
ffc18608: 83 a1 00 24 lwz r29,36(r1)
ffc1860c: 83 c1 00 28 lwz r30,40(r1)
ffc18610: 83 e1 00 2c lwz r31,44(r1)
ffc18614: 38 21 00 30 addi r1,r1,48
ffc18618: 4e 80 00 20 blr
ffc1861c: 3d 20 00 00 lis r9,0
ffc18620: 81 69 28 9c lwz r11,10396(r9)
ffc18624: 38 0b 00 01 addi r0,r11,1
ffc18628: 90 09 28 9c stw 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 );
ffc1862c: 3f 80 00 00 lis r28,0
ffc18630: 90 81 00 08 stw r4,8(r1)
ffc18634: 3b 9c 6e c0 addi r28,r28,28352
ffc18638: 7f 83 e3 78 mr r3,r28
ffc1863c: 90 c1 00 0c stw r6,12(r1)
ffc18640: 90 e1 00 10 stw r7,16(r1)
ffc18644: 91 01 00 14 stw r8,20(r1)
ffc18648: 48 00 5e ed bl ffc1e534 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
ffc1864c: 7c 7d 1b 79 mr. r29,r3
ffc18650: 80 81 00 08 lwz r4,8(r1)
ffc18654: 80 c1 00 0c lwz r6,12(r1)
ffc18658: 80 e1 00 10 lwz r7,16(r1)
ffc1865c: 81 01 00 14 lwz r8,20(r1)
ffc18660: 41 82 00 50 beq- ffc186b0 <rtems_partition_create+0x12c>
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,
ffc18664: 7c be 33 96 divwu r5,r30,r6
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
ffc18668: 90 9d 00 10 stw r4,16(r29)
the_partition->length = length;
the_partition->buffer_size = buffer_size;
ffc1866c: 90 dd 00 18 stw r6,24(r29)
the_partition->attribute_set = attribute_set;
ffc18670: 90 fd 00 1c stw r7,28(r29)
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
ffc18674: 93 dd 00 14 stw r30,20(r29)
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
ffc18678: 93 7d 00 20 stw r27,32(r29)
_Chain_Initialize( &the_partition->Memory, starting_address,
ffc1867c: 91 01 00 14 stw r8,20(r1)
ffc18680: 38 7d 00 24 addi r3,r29,36
ffc18684: 48 00 42 05 bl ffc1c888 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
ffc18688: 80 1d 00 08 lwz r0,8(r29)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc1868c: 81 7c 00 1c lwz r11,28(r28)
ffc18690: 54 09 13 ba rlwinm r9,r0,2,14,29
ffc18694: 7f ab 49 2e stwx r29,r11,r9
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc18698: 93 fd 00 0c stw r31,12(r29)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
ffc1869c: 81 01 00 14 lwz r8,20(r1)
ffc186a0: 90 08 00 00 stw r0,0(r8)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
ffc186a4: 48 00 74 c1 bl ffc1fb64 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc186a8: 38 60 00 00 li r3,0
ffc186ac: 4b ff ff 4c b ffc185f8 <rtems_partition_create+0x74>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
ffc186b0: 48 00 74 b5 bl ffc1fb64 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
ffc186b4: 38 60 00 05 li r3,5
ffc186b8: 4b ff ff 40 b ffc185f8 <rtems_partition_create+0x74>
ffc18848 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
ffc18848: 94 21 ff e0 stwu r1,-32(r1)
ffc1884c: 7c 08 02 a6 mflr r0
ffc18850: 90 01 00 24 stw r0,36(r1)
ffc18854: 7c 60 1b 78 mr r0,r3
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
ffc18858: 3c 60 00 00 lis r3,0
ffc1885c: 93 e1 00 1c stw r31,28(r1)
ffc18860: 38 63 6e c0 addi r3,r3,28352
ffc18864: 7c 9f 23 78 mr r31,r4
ffc18868: 38 a1 00 08 addi r5,r1,8
ffc1886c: 93 c1 00 18 stw r30,24(r1)
ffc18870: 7c 04 03 78 mr r4,r0
ffc18874: 48 00 63 1d bl ffc1eb90 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
ffc18878: 80 01 00 08 lwz r0,8(r1)
ffc1887c: 7c 7e 1b 78 mr r30,r3
ffc18880: 2f 80 00 00 cmpwi cr7,r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc18884: 38 60 00 04 li r3,4
{
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
ffc18888: 40 9e 00 58 bne- cr7,ffc188e0 <rtems_partition_return_buffer+0x98>
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
ffc1888c: 80 1e 00 10 lwz r0,16(r30)
ending = _Addresses_Add_offset( starting, the_partition->length );
ffc18890: 81 3e 00 14 lwz r9,20(r30)
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
ffc18894: 7f 9f 00 40 cmplw cr7,r31,r0
ffc18898: 41 9c 00 60 blt- cr7,ffc188f8 <rtems_partition_return_buffer+0xb0>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
ffc1889c: 7d 20 4a 14 add r9,r0,r9
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
ffc188a0: 7f 9f 48 40 cmplw cr7,r31,r9
ffc188a4: 41 9d 00 54 bgt- cr7,ffc188f8 <rtems_partition_return_buffer+0xb0><== NEVER TAKEN
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
ffc188a8: 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);
ffc188ac: 7c 00 f8 50 subf r0,r0,r31
ffc188b0: 7d 60 4b 96 divwu r11,r0,r9
ffc188b4: 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 ) &&
ffc188b8: 7f 80 48 00 cmpw cr7,r0,r9
ffc188bc: 40 9e 00 3c bne- cr7,ffc188f8 <rtems_partition_return_buffer+0xb0>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
ffc188c0: 38 7e 00 24 addi r3,r30,36
ffc188c4: 7f e4 fb 78 mr r4,r31
ffc188c8: 48 00 3f 25 bl ffc1c7ec <_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;
ffc188cc: 81 3e 00 20 lwz r9,32(r30)
ffc188d0: 38 09 ff ff addi r0,r9,-1
ffc188d4: 90 1e 00 20 stw r0,32(r30)
_Thread_Enable_dispatch();
ffc188d8: 48 00 72 8d bl ffc1fb64 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc188dc: 38 60 00 00 li r3,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc188e0: 80 01 00 24 lwz r0,36(r1)
ffc188e4: 83 c1 00 18 lwz r30,24(r1)
ffc188e8: 7c 08 03 a6 mtlr r0
ffc188ec: 83 e1 00 1c lwz r31,28(r1)
ffc188f0: 38 21 00 20 addi r1,r1,32
ffc188f4: 4e 80 00 20 blr
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
ffc188f8: 48 00 72 6d bl ffc1fb64 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc188fc: 80 01 00 24 lwz r0,36(r1)
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
ffc18900: 38 60 00 09 li r3,9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc18904: 83 c1 00 18 lwz r30,24(r1)
ffc18908: 7c 08 03 a6 mtlr r0
ffc1890c: 83 e1 00 1c lwz r31,28(r1)
ffc18910: 38 21 00 20 addi r1,r1,32
ffc18914: 4e 80 00 20 blr
ffc03ea4 <rtems_print_buffer>:
void rtems_print_buffer(
const unsigned char *buffer,
int length
)
{
ffc03ea4: 7d 80 00 26 mfcr r12
int i, mod, max;
if ( !length ) return;
ffc03ea8: 2c 04 00 00 cmpwi r4,0
void rtems_print_buffer(
const unsigned char *buffer,
int length
)
{
ffc03eac: 94 21 ff 40 stwu r1,-192(r1)
ffc03eb0: 7c 08 02 a6 mflr r0
ffc03eb4: 92 c1 00 98 stw r22,152(r1)
ffc03eb8: 7c 76 1b 78 mr r22,r3
ffc03ebc: 90 01 00 c4 stw r0,196(r1)
ffc03ec0: 92 61 00 8c stw r19,140(r1)
ffc03ec4: 92 81 00 90 stw r20,144(r1)
ffc03ec8: 92 a1 00 94 stw r21,148(r1)
ffc03ecc: 92 e1 00 9c stw r23,156(r1)
ffc03ed0: 93 01 00 a0 stw r24,160(r1)
ffc03ed4: 93 21 00 a4 stw r25,164(r1)
ffc03ed8: 93 41 00 a8 stw r26,168(r1)
ffc03edc: 93 61 00 ac stw r27,172(r1)
ffc03ee0: 93 81 00 b0 stw r28,176(r1)
ffc03ee4: 93 a1 00 b4 stw r29,180(r1)
ffc03ee8: 93 c1 00 b8 stw r30,184(r1)
ffc03eec: 93 e1 00 bc stw r31,188(r1)
ffc03ef0: 91 81 00 88 stw r12,136(r1)
int i, mod, max;
if ( !length ) return;
ffc03ef4: 41 82 01 0c beq- ffc04000 <rtems_print_buffer+0x15c>
mod = length % 16;
ffc03ef8: 7c 98 26 70 srawi r24,r4,4
ffc03efc: 7f 18 01 94 addze r24,r24
ffc03f00: 57 18 20 36 rlwinm r24,r24,4,0,27
ffc03f04: 7f 18 20 50 subf r24,r24,r4
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
ffc03f08: 7e b8 20 51 subf. r21,r24,r4
ffc03f0c: 40 81 00 ec ble- ffc03ff8 <rtems_print_buffer+0x154>
ffc03f10: 3f 40 ff c2 lis r26,-62
ffc03f14: 3f 60 00 00 lis r27,0
ffc03f18: 3f 80 ff c2 lis r28,-62
ffc03f1c: 3e e0 ff c2 lis r23,-62
ffc03f20: 3b 20 00 00 li r25,0
ffc03f24: 3b 5a fa f8 addi r26,r26,-1288
ffc03f28: 3b e1 00 08 addi r31,r1,8
ffc03f2c: 3b 7b 27 44 addi r27,r27,10052
ffc03f30: 3b 9c fb 00 addi r28,r28,-1280
ffc03f34: 3a f7 fb 08 addi r23,r23,-1272
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
ffc03f38: 3a 60 00 00 li r19,0
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
ffc03f3c: 3a 80 7c 00 li r20,31744
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
ffc03f40: 9a 61 00 08 stb r19,8(r1)
static inline void Dump_Line(
const unsigned char *buffer,
int length
);
void rtems_print_buffer(
ffc03f44: 7f b6 ca 14 add r29,r22,r25
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
ffc03f48: 3b c0 00 00 li r30,0
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
ffc03f4c: 7c dd f0 ae lbzx r6,r29,r30
ffc03f50: 7f e3 fb 78 mr r3,r31
ffc03f54: 7f 44 d3 78 mr r4,r26
ffc03f58: 7f e5 fb 78 mr r5,r31
ffc03f5c: 4c c6 31 82 crclr 4*cr1+eq
ffc03f60: 48 00 f3 41 bl ffc132a0 <sprintf>
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
ffc03f64: 2f 9e 00 0f cmpwi cr7,r30,15
ffc03f68: 3b de 00 01 addi r30,r30,1
ffc03f6c: 40 9e ff e0 bne+ cr7,ffc03f4c <rtems_print_buffer+0xa8>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
ffc03f70: 7f e3 fb 78 mr r3,r31
ffc03f74: 48 00 f7 4d bl ffc136c0 <strlen>
for( i=0 ; i<length ; i++ )
ffc03f78: 3b c0 00 00 li r30,0
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
ffc03f7c: 7e 9f 1b 2e sthx r20,r31,r3
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
ffc03f80: 7c 1d f0 ae lbzx r0,r29,r30
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
ffc03f84: 7f e3 fb 78 mr r3,r31
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
ffc03f88: 81 3b 00 00 lwz r9,0(r27)
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
ffc03f8c: 7f 84 e3 78 mr r4,r28
ffc03f90: 7f e5 fb 78 mr r5,r31
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
ffc03f94: 7d 29 02 14 add r9,r9,r0
ffc03f98: 89 29 00 01 lbz r9,1(r9)
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
ffc03f9c: 38 c0 00 2e li r6,46
ffc03fa0: 71 2b 00 97 andi. r11,r9,151
ffc03fa4: 41 82 00 08 beq- ffc03fac <rtems_print_buffer+0x108>
ffc03fa8: 7c 06 03 78 mr r6,r0
ffc03fac: 4c c6 31 82 crclr 4*cr1+eq
ffc03fb0: 48 00 f2 f1 bl ffc132a0 <sprintf>
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
ffc03fb4: 2f 9e 00 0f cmpwi cr7,r30,15
ffc03fb8: 3b de 00 01 addi r30,r30,1
ffc03fbc: 40 9e ff c4 bne+ cr7,ffc03f80 <rtems_print_buffer+0xdc>
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
ffc03fc0: 7f e3 fb 78 mr r3,r31
ffc03fc4: 48 00 f6 fd bl ffc136c0 <strlen>
ffc03fc8: a1 57 00 00 lhz r10,0(r23)
ffc03fcc: 89 77 00 02 lbz r11,2(r23)
ffc03fd0: 7c 60 1b 78 mr r0,r3
ffc03fd4: 7d 3f 1a 14 add r9,r31,r3
ffc03fd8: 7d 5f 03 2e sthx r10,r31,r0
printk( line_buffer );
ffc03fdc: 7f e3 fb 78 mr r3,r31
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
ffc03fe0: 99 69 00 02 stb r11,2(r9)
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
ffc03fe4: 3b 39 00 10 addi r25,r25,16
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
printk( line_buffer );
ffc03fe8: 4c c6 31 82 crclr 4*cr1+eq
ffc03fec: 48 00 1f a5 bl ffc05f90 <printk>
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
ffc03ff0: 7f 95 c8 00 cmpw cr7,r21,r25
ffc03ff4: 41 9d ff 4c bgt+ cr7,ffc03f40 <rtems_print_buffer+0x9c>
Dump_Line( &buffer[ i ], 16 );
if ( mod )
ffc03ff8: 2e 18 00 00 cmpwi cr4,r24,0
ffc03ffc: 40 92 00 50 bne- cr4,ffc0404c <rtems_print_buffer+0x1a8>
Dump_Line( &buffer[ max ], mod );
}
ffc04000: 80 01 00 c4 lwz r0,196(r1)
ffc04004: 81 81 00 88 lwz r12,136(r1)
ffc04008: 7c 08 03 a6 mtlr r0
ffc0400c: 82 61 00 8c lwz r19,140(r1)
ffc04010: 82 81 00 90 lwz r20,144(r1)
ffc04014: 7d 81 81 20 mtcrf 24,r12
ffc04018: 82 a1 00 94 lwz r21,148(r1)
ffc0401c: 82 c1 00 98 lwz r22,152(r1)
ffc04020: 82 e1 00 9c lwz r23,156(r1)
ffc04024: 83 01 00 a0 lwz r24,160(r1)
ffc04028: 83 21 00 a4 lwz r25,164(r1)
ffc0402c: 83 41 00 a8 lwz r26,168(r1)
ffc04030: 83 61 00 ac lwz r27,172(r1)
ffc04034: 83 81 00 b0 lwz r28,176(r1)
ffc04038: 83 a1 00 b4 lwz r29,180(r1)
ffc0403c: 83 c1 00 b8 lwz r30,184(r1)
ffc04040: 83 e1 00 bc lwz r31,188(r1)
ffc04044: 38 21 00 c0 addi r1,r1,192
ffc04048: 4e 80 00 20 blr
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
ffc0404c: 38 00 00 00 li r0,0
for ( i=0 ; i<max ; i+=16 )
Dump_Line( &buffer[ i ], 16 );
if ( mod )
Dump_Line( &buffer[ max ], mod );
ffc04050: 7e d6 aa 14 add r22,r22,r21
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
ffc04054: 98 01 00 08 stb r0,8(r1)
for( i=0 ; i<length ; i++ )
ffc04058: 40 91 01 28 ble- cr4,ffc04180 <rtems_print_buffer+0x2dc>
ffc0405c: 3f 40 ff c2 lis r26,-62
ffc04060: 3b c0 00 00 li r30,0
ffc04064: 3b 5a fa f8 addi r26,r26,-1288
ffc04068: 3b e1 00 08 addi r31,r1,8
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
ffc0406c: 7c d6 f0 ae lbzx r6,r22,r30
ffc04070: 7f e3 fb 78 mr r3,r31
ffc04074: 7f 44 d3 78 mr r4,r26
ffc04078: 7f e5 fb 78 mr r5,r31
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
ffc0407c: 3b de 00 01 addi r30,r30,1
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
ffc04080: 4c c6 31 82 crclr 4*cr1+eq
ffc04084: 48 00 f2 1d bl ffc132a0 <sprintf>
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
ffc04088: 7f 98 f0 00 cmpw cr7,r24,r30
ffc0408c: 41 9d ff e0 bgt+ cr7,ffc0406c <rtems_print_buffer+0x1c8>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
ffc04090: 2d 98 00 0f cmpwi cr3,r24,15
ffc04094: 7f 1e c3 78 mr r30,r24
ffc04098: 41 8d 00 f4 bgt- cr3,ffc0418c <rtems_print_buffer+0x2e8><== NEVER TAKEN
strcat( line_buffer, " " );
ffc0409c: 3f a0 20 20 lis r29,8224
ffc040a0: 63 bd 20 00 ori r29,r29,8192
ffc040a4: 7f e3 fb 78 mr r3,r31
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
ffc040a8: 3b de 00 01 addi r30,r30,1
strcat( line_buffer, " " );
ffc040ac: 48 00 f6 15 bl ffc136c0 <strlen>
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
ffc040b0: 2f 9e 00 0f cmpwi cr7,r30,15
strcat( line_buffer, " " );
ffc040b4: 7f bf 19 2e stwx r29,r31,r3
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
ffc040b8: 40 9d ff ec ble+ cr7,ffc040a4 <rtems_print_buffer+0x200>
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
ffc040bc: 7f e3 fb 78 mr r3,r31
ffc040c0: 48 00 f6 01 bl ffc136c0 <strlen>
ffc040c4: 38 00 7c 00 li r0,31744
ffc040c8: 7c 1f 1b 2e sthx r0,r31,r3
for( i=0 ; i<length ; i++ )
ffc040cc: 40 91 00 d4 ble- cr4,ffc041a0 <rtems_print_buffer+0x2fc>
ffc040d0: 2d 98 00 0f cmpwi cr3,r24,15
ffc040d4: 3f 60 00 00 lis r27,0
ffc040d8: 3f 80 ff c2 lis r28,-62
ffc040dc: 3b c0 00 00 li r30,0
ffc040e0: 3b 7b 27 44 addi r27,r27,10052
ffc040e4: 3b 9c fb 00 addi r28,r28,-1280
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
ffc040e8: 7c 16 f0 ae lbzx r0,r22,r30
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
ffc040ec: 7f e3 fb 78 mr r3,r31
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
ffc040f0: 81 3b 00 00 lwz r9,0(r27)
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
ffc040f4: 7f 84 e3 78 mr r4,r28
ffc040f8: 7f e5 fb 78 mr r5,r31
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
ffc040fc: 7d 29 02 14 add r9,r9,r0
ffc04100: 89 29 00 01 lbz r9,1(r9)
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
ffc04104: 3b de 00 01 addi r30,r30,1
sprintf( line_buffer, "%s%c", line_buffer,
ffc04108: 38 c0 00 2e li r6,46
ffc0410c: 71 2b 00 97 andi. r11,r9,151
ffc04110: 41 82 00 08 beq- ffc04118 <rtems_print_buffer+0x274>
ffc04114: 7c 06 03 78 mr r6,r0
ffc04118: 4c c6 31 82 crclr 4*cr1+eq
ffc0411c: 48 00 f1 85 bl ffc132a0 <sprintf>
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
ffc04120: 7f 98 f0 00 cmpw cr7,r24,r30
ffc04124: 41 9d ff c4 bgt+ cr7,ffc040e8 <rtems_print_buffer+0x244>
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
ffc04128: 41 8d 00 20 bgt- cr3,ffc04148 <rtems_print_buffer+0x2a4><== NEVER TAKEN
strcat( line_buffer, " " );
ffc0412c: 3b c0 20 00 li r30,8192
ffc04130: 7f e3 fb 78 mr r3,r31
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
ffc04134: 3b 18 00 01 addi r24,r24,1
strcat( line_buffer, " " );
ffc04138: 48 00 f5 89 bl ffc136c0 <strlen>
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
ffc0413c: 2f 98 00 0f cmpwi cr7,r24,15
strcat( line_buffer, " " );
ffc04140: 7f df 1b 2e sthx r30,r31,r3
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
ffc04144: 40 9d ff ec ble+ cr7,ffc04130 <rtems_print_buffer+0x28c>
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
ffc04148: 7f e3 fb 78 mr r3,r31
ffc0414c: 48 00 f5 75 bl ffc136c0 <strlen>
ffc04150: 3d 20 ff c2 lis r9,-62
ffc04154: 39 69 fb 08 addi r11,r9,-1272
ffc04158: a1 49 fb 08 lhz r10,-1272(r9)
ffc0415c: 89 6b 00 02 lbz r11,2(r11)
ffc04160: 7c 60 1b 78 mr r0,r3
ffc04164: 7d 3f 1a 14 add r9,r31,r3
ffc04168: 7d 5f 03 2e sthx r10,r31,r0
printk( line_buffer );
ffc0416c: 7f e3 fb 78 mr r3,r31
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
ffc04170: 99 69 00 02 stb r11,2(r9)
printk( line_buffer );
ffc04174: 4c c6 31 82 crclr 4*cr1+eq
ffc04178: 48 00 1e 19 bl ffc05f90 <printk>
ffc0417c: 4b ff fe 84 b ffc04000 <rtems_print_buffer+0x15c>
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
ffc04180: 3b c0 00 00 li r30,0
ffc04184: 3b e1 00 08 addi r31,r1,8
ffc04188: 4b ff ff 14 b ffc0409c <rtems_print_buffer+0x1f8>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
ffc0418c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc04190: 48 00 f5 31 bl ffc136c0 <strlen> <== NOT EXECUTED
ffc04194: 38 00 7c 00 li r0,31744 <== NOT EXECUTED
ffc04198: 7c 1f 1b 2e sthx r0,r31,r3 <== NOT EXECUTED
ffc0419c: 4b ff ff 38 b ffc040d4 <rtems_print_buffer+0x230> <== NOT EXECUTED
for( i=0 ; i<length ; i++ )
ffc041a0: 3b 00 00 00 li r24,0
ffc041a4: 4b ff ff 88 b ffc0412c <rtems_print_buffer+0x288>
ffc0a258 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
ffc0a258: 94 21 ff d0 stwu r1,-48(r1)
ffc0a25c: 7c 08 02 a6 mflr r0
ffc0a260: 93 e1 00 2c stw r31,44(r1)
ffc0a264: 7c 7f 1b 78 mr r31,r3
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
ffc0a268: 3c 60 00 00 lis r3,0
ffc0a26c: 93 c1 00 28 stw r30,40(r1)
ffc0a270: 38 63 2c 00 addi r3,r3,11264
ffc0a274: 7c 9e 23 78 mr r30,r4
ffc0a278: 38 a1 00 08 addi r5,r1,8
ffc0a27c: 90 01 00 34 stw r0,52(r1)
ffc0a280: 7f e4 fb 78 mr r4,r31
ffc0a284: 93 a1 00 24 stw r29,36(r1)
ffc0a288: 93 61 00 1c stw r27,28(r1)
ffc0a28c: 93 81 00 20 stw r28,32(r1)
ffc0a290: 48 00 2d b5 bl ffc0d044 <_Objects_Get>
ffc0a294: 7c 7d 1b 78 mr r29,r3
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
ffc0a298: 80 01 00 08 lwz r0,8(r1)
ffc0a29c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a2a0: 41 9e 00 30 beq- cr7,ffc0a2d0 <rtems_rate_monotonic_period+0x78>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0a2a4: 3b e0 00 04 li r31,4
}
ffc0a2a8: 80 01 00 34 lwz r0,52(r1)
ffc0a2ac: 7f e3 fb 78 mr r3,r31
ffc0a2b0: 83 61 00 1c lwz r27,28(r1)
ffc0a2b4: 7c 08 03 a6 mtlr r0
ffc0a2b8: 83 81 00 20 lwz r28,32(r1)
ffc0a2bc: 83 a1 00 24 lwz r29,36(r1)
ffc0a2c0: 83 c1 00 28 lwz r30,40(r1)
ffc0a2c4: 83 e1 00 2c lwz r31,44(r1)
ffc0a2c8: 38 21 00 30 addi r1,r1,48
ffc0a2cc: 4e 80 00 20 blr
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc0a2d0: 3f 80 00 00 lis r28,0
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
ffc0a2d4: 81 23 00 40 lwz r9,64(r3)
ffc0a2d8: 3b 9c 2e 98 addi r28,r28,11928
ffc0a2dc: 80 1c 00 0c lwz r0,12(r28)
ffc0a2e0: 7f 89 00 00 cmpw cr7,r9,r0
ffc0a2e4: 41 9e 00 34 beq- cr7,ffc0a318 <rtems_rate_monotonic_period+0xc0>
_Thread_Enable_dispatch();
ffc0a2e8: 48 00 3d 31 bl ffc0e018 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0a2ec: 80 01 00 34 lwz r0,52(r1)
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
ffc0a2f0: 3b e0 00 17 li r31,23
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0a2f4: 83 61 00 1c lwz r27,28(r1)
ffc0a2f8: 7c 08 03 a6 mtlr r0
ffc0a2fc: 7f e3 fb 78 mr r3,r31
ffc0a300: 83 81 00 20 lwz r28,32(r1)
ffc0a304: 83 a1 00 24 lwz r29,36(r1)
ffc0a308: 83 c1 00 28 lwz r30,40(r1)
ffc0a30c: 83 e1 00 2c lwz r31,44(r1)
ffc0a310: 38 21 00 30 addi r1,r1,48
ffc0a314: 4e 80 00 20 blr
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
ffc0a318: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0a31c: 40 9e 00 1c bne- cr7,ffc0a338 <rtems_rate_monotonic_period+0xe0>
switch ( the_period->state ) {
ffc0a320: 80 03 00 38 lwz r0,56(r3)
ffc0a324: 3b e0 00 00 li r31,0
ffc0a328: 2b 80 00 04 cmplwi cr7,r0,4
ffc0a32c: 40 9d 00 70 ble- cr7,ffc0a39c <rtems_rate_monotonic_period+0x144><== ALWAYS TAKEN
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
ffc0a330: 48 00 3c e9 bl ffc0e018 <_Thread_Enable_dispatch> <== NOT EXECUTED
return( return_value );
ffc0a334: 4b ff ff 74 b ffc0a2a8 <rtems_rate_monotonic_period+0x50><== NOT EXECUTED
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a338: 7f 60 00 a6 mfmsr r27
ffc0a33c: 7c 10 42 a6 mfsprg r0,0
ffc0a340: 7f 60 00 78 andc r0,r27,r0
ffc0a344: 7c 00 01 24 mtmsr r0
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
ffc0a348: 80 03 00 38 lwz r0,56(r3)
ffc0a34c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a350: 41 9e 00 64 beq- cr7,ffc0a3b4 <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 ) {
ffc0a354: 2f 80 00 02 cmpwi cr7,r0,2
ffc0a358: 41 9e 00 ac beq- cr7,ffc0a404 <rtems_rate_monotonic_period+0x1ac>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
ffc0a35c: 2f 80 00 04 cmpwi cr7,r0,4
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0a360: 3b e0 00 04 li r31,4
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
ffc0a364: 40 9e ff 44 bne+ cr7,ffc0a2a8 <rtems_rate_monotonic_period+0x50><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
ffc0a368: 4b ff fd a9 bl ffc0a110 <_Rate_monotonic_Update_statistics>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a36c: 7f 60 01 24 mtmsr r27
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc0a370: 38 00 00 02 li r0,2
the_period->next_length = length;
ffc0a374: 93 dd 00 3c stw r30,60(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a378: 3c 60 00 00 lis r3,0
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc0a37c: 90 1d 00 38 stw r0,56(r29)
ffc0a380: 38 63 2d c8 addi r3,r3,11720
ffc0a384: 38 9d 00 10 addi r4,r29,16
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc0a388: 93 dd 00 1c stw r30,28(r29)
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
ffc0a38c: 3b e0 00 06 li r31,6
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a390: 48 00 50 fd bl ffc0f48c <_Watchdog_Insert>
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
ffc0a394: 48 00 3c 85 bl ffc0e018 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
ffc0a398: 4b ff ff 10 b ffc0a2a8 <rtems_rate_monotonic_period+0x50>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
ffc0a39c: 3d 20 ff c2 lis r9,-62
ffc0a3a0: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0a3a4: 39 29 12 68 addi r9,r9,4712
ffc0a3a8: 7f e9 00 2e lwzx r31,r9,r0
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
ffc0a3ac: 48 00 3c 6d bl ffc0e018 <_Thread_Enable_dispatch>
ffc0a3b0: 4b ff fe f8 b ffc0a2a8 <rtems_rate_monotonic_period+0x50>
ffc0a3b4: 7f 60 01 24 mtmsr r27
_ISR_Enable( level );
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
ffc0a3b8: 4b ff fc a1 bl ffc0a058 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc0a3bc: 39 20 00 02 li r9,2
ffc0a3c0: 91 3d 00 38 stw r9,56(r29)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc0a3c4: 3d 20 ff c1 lis r9,-63
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0a3c8: 38 00 00 00 li r0,0
the_watchdog->routine = routine;
ffc0a3cc: 39 29 a8 6c addi r9,r9,-22420
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0a3d0: 90 1d 00 18 stw r0,24(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a3d4: 3c 60 00 00 lis r3,0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc0a3d8: 91 3d 00 2c stw r9,44(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a3dc: 38 63 2d c8 addi r3,r3,11720
ffc0a3e0: 38 9d 00 10 addi r4,r29,16
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
ffc0a3e4: 93 fd 00 30 stw r31,48(r29)
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
ffc0a3e8: 3b e0 00 00 li r31,0
the_watchdog->user_data = user_data;
ffc0a3ec: 90 1d 00 34 stw r0,52(r29)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
ffc0a3f0: 93 dd 00 3c stw r30,60(r29)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc0a3f4: 93 dd 00 1c stw r30,28(r29)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a3f8: 48 00 50 95 bl ffc0f48c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
ffc0a3fc: 48 00 3c 1d bl ffc0e018 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0a400: 4b ff fe a8 b ffc0a2a8 <rtems_rate_monotonic_period+0x50>
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
ffc0a404: 4b ff fd 0d bl ffc0a110 <_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;
ffc0a408: 38 00 00 01 li r0,1
ffc0a40c: 90 1d 00 38 stw r0,56(r29)
the_period->next_length = length;
ffc0a410: 93 dd 00 3c stw r30,60(r29)
ffc0a414: 7f 60 01 24 mtmsr r27
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
ffc0a418: 81 3c 00 0c lwz r9,12(r28)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc0a41c: 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;
ffc0a420: 80 1d 00 08 lwz r0,8(r29)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc0a424: 7d 23 4b 78 mr r3,r9
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
the_period->next_length = length;
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
ffc0a428: 90 09 00 20 stw r0,32(r9)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc0a42c: 48 00 46 a1 bl ffc0eacc <_Thread_Set_state>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a430: 7d 20 00 a6 mfmsr r9
ffc0a434: 7c 10 42 a6 mfsprg r0,0
ffc0a438: 7d 20 00 78 andc r0,r9,r0
ffc0a43c: 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;
ffc0a440: 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;
ffc0a444: 80 1d 00 38 lwz r0,56(r29)
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc0a448: 91 7d 00 38 stw r11,56(r29)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a44c: 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 )
ffc0a450: 2f 80 00 03 cmpwi cr7,r0,3
ffc0a454: 41 9e 00 10 beq- cr7,ffc0a464 <rtems_rate_monotonic_period+0x20c><== NEVER TAKEN
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
ffc0a458: 48 00 3b c1 bl ffc0e018 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0a45c: 3b e0 00 00 li r31,0
ffc0a460: 4b ff fe 48 b ffc0a2a8 <rtems_rate_monotonic_period+0x50>
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc0a464: 80 7c 00 0c lwz r3,12(r28) <== NOT EXECUTED
ffc0a468: 38 80 40 00 li r4,16384 <== NOT EXECUTED
ffc0a46c: 48 00 37 09 bl ffc0db74 <_Thread_Clear_state> <== NOT EXECUTED
ffc0a470: 4b ff ff e8 b ffc0a458 <rtems_rate_monotonic_period+0x200><== NOT EXECUTED
ffc0a474 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc0a474: 94 21 ff 58 stwu r1,-168(r1)
ffc0a478: 7c 08 02 a6 mflr r0
ffc0a47c: 90 01 00 ac stw r0,172(r1)
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
ffc0a480: 7c 80 23 79 mr. r0,r4
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc0a484: 93 a1 00 9c stw r29,156(r1)
ffc0a488: 7c 7d 1b 78 mr r29,r3
ffc0a48c: 92 41 00 70 stw r18,112(r1)
ffc0a490: 92 61 00 74 stw r19,116(r1)
ffc0a494: 92 81 00 78 stw r20,120(r1)
ffc0a498: 92 a1 00 7c stw r21,124(r1)
ffc0a49c: 92 c1 00 80 stw r22,128(r1)
ffc0a4a0: 92 e1 00 84 stw r23,132(r1)
ffc0a4a4: 93 01 00 88 stw r24,136(r1)
ffc0a4a8: 93 21 00 8c stw r25,140(r1)
ffc0a4ac: 93 41 00 90 stw r26,144(r1)
ffc0a4b0: 93 61 00 94 stw r27,148(r1)
ffc0a4b4: 93 81 00 98 stw r28,152(r1)
ffc0a4b8: 93 c1 00 a0 stw r30,160(r1)
ffc0a4bc: 93 e1 00 a4 stw r31,164(r1)
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
ffc0a4c0: 90 01 00 68 stw r0,104(r1)
ffc0a4c4: 41 82 01 88 beq- ffc0a64c <rtems_rate_monotonic_report_statistics_with_plugin+0x1d8><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
ffc0a4c8: 3c 80 ff c2 lis r4,-62
ffc0a4cc: 7c 09 03 a6 mtctr r0
ffc0a4d0: 38 84 12 7c addi r4,r4,4732
/*
* 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 ;
ffc0a4d4: 3f c0 00 00 lis r30,0
ffc0a4d8: 3b de 2c 00 addi r30,r30,11264
char name[5];
if ( !print )
return;
(*print)( context, "Period information by period\n" );
ffc0a4dc: 4c c6 31 82 crclr 4*cr1+eq
ffc0a4e0: 4e 80 04 21 bctrl
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
ffc0a4e4: 80 01 00 68 lwz r0,104(r1)
ffc0a4e8: 3c 80 ff c2 lis r4,-62
ffc0a4ec: 7c 09 03 a6 mtctr r0
ffc0a4f0: 38 84 12 9c addi r4,r4,4764
ffc0a4f4: 7f a3 eb 78 mr r3,r29
ffc0a4f8: 4c c6 31 82 crclr 4*cr1+eq
ffc0a4fc: 4e 80 04 21 bctrl
(*print)( context, "--- Wall times are in seconds ---\n" );
ffc0a500: 80 01 00 68 lwz r0,104(r1)
ffc0a504: 3c 80 ff c2 lis r4,-62
ffc0a508: 7c 09 03 a6 mtctr r0
ffc0a50c: 38 84 12 c0 addi r4,r4,4800
ffc0a510: 7f a3 eb 78 mr r3,r29
ffc0a514: 4c c6 31 82 crclr 4*cr1+eq
ffc0a518: 4e 80 04 21 bctrl
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
ffc0a51c: 80 01 00 68 lwz r0,104(r1)
ffc0a520: 3c 80 ff c2 lis r4,-62
ffc0a524: 7c 09 03 a6 mtctr r0
ffc0a528: 38 84 12 e4 addi r4,r4,4836
ffc0a52c: 7f a3 eb 78 mr r3,r29
ffc0a530: 4c c6 31 82 crclr 4*cr1+eq
ffc0a534: 4e 80 04 21 bctrl
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
ffc0a538: 80 01 00 68 lwz r0,104(r1)
ffc0a53c: 3c 80 ff c2 lis r4,-62
ffc0a540: 7c 09 03 a6 mtctr r0
ffc0a544: 7f a3 eb 78 mr r3,r29
ffc0a548: 38 84 13 30 addi r4,r4,4912
ffc0a54c: 4c c6 31 82 crclr 4*cr1+eq
ffc0a550: 4e 80 04 21 bctrl
/*
* 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 ;
ffc0a554: 83 fe 00 08 lwz r31,8(r30)
ffc0a558: 80 1e 00 0c lwz r0,12(r30)
ffc0a55c: 7f 9f 00 40 cmplw cr7,r31,r0
ffc0a560: 41 9d 00 ec bgt- cr7,ffc0a64c <rtems_rate_monotonic_report_statistics_with_plugin+0x1d8><== NEVER TAKEN
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc0a564: 3e c0 ff c2 lis r22,-62
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,
ffc0a568: 3e 60 ff c2 lis r19,-62
ffc0a56c: 3f 60 10 62 lis r27,4194
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,
ffc0a570: 3e 40 ff c2 lis r18,-62
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc0a574: 3f 00 ff c2 lis r24,-62
ffc0a578: 3b 81 00 30 addi r28,r1,48
#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 );
ffc0a57c: 3a a1 00 18 addi r21,r1,24
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
ffc0a580: 3b 41 00 08 addi r26,r1,8
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc0a584: 3a d6 13 7c addi r22,r22,4988
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
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;
ffc0a588: 3a e1 00 48 addi r23,r1,72
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
ffc0a58c: 3b 21 00 10 addi r25,r1,16
(*print)( context,
ffc0a590: 3a 73 13 94 addi r19,r19,5012
ffc0a594: 63 7b 4d d3 ori r27,r27,19923
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
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;
ffc0a598: 3a 81 00 60 addi r20,r1,96
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
(*print)( context,
ffc0a59c: 3a 52 13 b4 addi r18,r18,5044
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc0a5a0: 3b 18 ff 60 addi r24,r24,-160
ffc0a5a4: 48 00 00 14 b ffc0a5b8 <rtems_rate_monotonic_report_statistics_with_plugin+0x144>
/*
* 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 ;
ffc0a5a8: 80 1e 00 0c lwz r0,12(r30)
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
ffc0a5ac: 3b ff 00 01 addi r31,r31,1
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
ffc0a5b0: 7f 80 f8 40 cmplw cr7,r0,r31
ffc0a5b4: 41 9c 00 98 blt- cr7,ffc0a64c <rtems_rate_monotonic_report_statistics_with_plugin+0x1d8>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
ffc0a5b8: 7f e3 fb 78 mr r3,r31
ffc0a5bc: 7f 84 e3 78 mr r4,r28
ffc0a5c0: 48 00 72 f5 bl ffc118b4 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
ffc0a5c4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a5c8: 40 9e ff e0 bne+ cr7,ffc0a5a8 <rtems_rate_monotonic_report_statistics_with_plugin+0x134>
#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 );
ffc0a5cc: 7e a4 ab 78 mr r4,r21
ffc0a5d0: 7f e3 fb 78 mr r3,r31
ffc0a5d4: 48 00 73 f1 bl ffc119c4 <rtems_rate_monotonic_get_status>
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
ffc0a5d8: 80 61 00 18 lwz r3,24(r1)
ffc0a5dc: 7f 45 d3 78 mr r5,r26
ffc0a5e0: 38 80 00 05 li r4,5
ffc0a5e4: 48 00 03 51 bl ffc0a934 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc0a5e8: 80 01 00 68 lwz r0,104(r1)
ffc0a5ec: 7e c4 b3 78 mr r4,r22
ffc0a5f0: 80 e1 00 30 lwz r7,48(r1)
ffc0a5f4: 7f e5 fb 78 mr r5,r31
ffc0a5f8: 7c 09 03 a6 mtctr r0
ffc0a5fc: 7f a3 eb 78 mr r3,r29
ffc0a600: 81 01 00 34 lwz r8,52(r1)
ffc0a604: 7f 46 d3 78 mr r6,r26
ffc0a608: 4c c6 31 82 crclr 4*cr1+eq
ffc0a60c: 4e 80 04 21 bctrl
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc0a610: 80 01 00 30 lwz r0,48(r1)
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 );
ffc0a614: 7e e3 bb 78 mr r3,r23
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc0a618: 2f 80 00 00 cmpwi cr7,r0,0
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 );
ffc0a61c: 7f 25 cb 78 mr r5,r25
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc0a620: 7f 04 c3 78 mr r4,r24
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc0a624: 40 9e 00 70 bne- cr7,ffc0a694 <rtems_rate_monotonic_report_statistics_with_plugin+0x220>
(*print)( context, "\n" );
ffc0a628: 80 01 00 68 lwz r0,104(r1)
ffc0a62c: 7f a3 eb 78 mr r3,r29
* 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++ ) {
ffc0a630: 3b ff 00 01 addi r31,r31,1
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc0a634: 7c 09 03 a6 mtctr r0
ffc0a638: 4c c6 31 82 crclr 4*cr1+eq
ffc0a63c: 4e 80 04 21 bctrl
/*
* 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 ;
ffc0a640: 80 1e 00 0c lwz r0,12(r30)
ffc0a644: 7f 80 f8 40 cmplw cr7,r0,r31
ffc0a648: 40 9c ff 70 bge+ cr7,ffc0a5b8 <rtems_rate_monotonic_report_statistics_with_plugin+0x144><== ALWAYS TAKEN
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
ffc0a64c: 80 01 00 ac lwz r0,172(r1)
ffc0a650: 82 41 00 70 lwz r18,112(r1)
ffc0a654: 7c 08 03 a6 mtlr r0
ffc0a658: 82 61 00 74 lwz r19,116(r1)
ffc0a65c: 82 81 00 78 lwz r20,120(r1)
ffc0a660: 82 a1 00 7c lwz r21,124(r1)
ffc0a664: 82 c1 00 80 lwz r22,128(r1)
ffc0a668: 82 e1 00 84 lwz r23,132(r1)
ffc0a66c: 83 01 00 88 lwz r24,136(r1)
ffc0a670: 83 21 00 8c lwz r25,140(r1)
ffc0a674: 83 41 00 90 lwz r26,144(r1)
ffc0a678: 83 61 00 94 lwz r27,148(r1)
ffc0a67c: 83 81 00 98 lwz r28,152(r1)
ffc0a680: 83 a1 00 9c lwz r29,156(r1)
ffc0a684: 83 c1 00 a0 lwz r30,160(r1)
ffc0a688: 83 e1 00 a4 lwz r31,164(r1)
ffc0a68c: 38 21 00 a8 addi r1,r1,168
ffc0a690: 4e 80 00 20 blr
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 );
ffc0a694: 7c 04 03 78 mr r4,r0
ffc0a698: 48 00 47 b5 bl ffc0ee4c <_Timespec_Divide_by_integer>
(*print)( context,
ffc0a69c: 80 01 00 14 lwz r0,20(r1)
ffc0a6a0: 80 81 00 3c lwz r4,60(r1)
ffc0a6a4: 7f a3 eb 78 mr r3,r29
ffc0a6a8: 81 61 00 44 lwz r11,68(r1)
ffc0a6ac: 7d 40 d8 96 mulhw r10,r0,r27
ffc0a6b0: 80 e1 00 40 lwz r7,64(r1)
ffc0a6b4: 7c c4 d8 96 mulhw r6,r4,r27
ffc0a6b8: 81 21 00 10 lwz r9,16(r1)
ffc0a6bc: 80 a1 00 38 lwz r5,56(r1)
ffc0a6c0: 7d 0b d8 96 mulhw r8,r11,r27
ffc0a6c4: 7c 00 fe 70 srawi r0,r0,31
ffc0a6c8: 7d 4a 36 70 srawi r10,r10,6
ffc0a6cc: 7d 40 50 50 subf r10,r0,r10
ffc0a6d0: 80 01 00 68 lwz r0,104(r1)
ffc0a6d4: 7d 6b fe 70 srawi r11,r11,31
ffc0a6d8: 7c 84 fe 70 srawi r4,r4,31
ffc0a6dc: 7c 09 03 a6 mtctr r0
ffc0a6e0: 7c c6 36 70 srawi r6,r6,6
ffc0a6e4: 7d 08 36 70 srawi r8,r8,6
ffc0a6e8: 7c c4 30 50 subf r6,r4,r6
ffc0a6ec: 7d 0b 40 50 subf r8,r11,r8
ffc0a6f0: 7e 64 9b 78 mr r4,r19
ffc0a6f4: 4c c6 31 82 crclr 4*cr1+eq
ffc0a6f8: 4e 80 04 21 bctrl
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);
ffc0a6fc: 80 81 00 30 lwz r4,48(r1)
ffc0a700: 7e 83 a3 78 mr r3,r20
ffc0a704: 7f 25 cb 78 mr r5,r25
ffc0a708: 48 00 47 45 bl ffc0ee4c <_Timespec_Divide_by_integer>
(*print)( context,
ffc0a70c: 80 01 00 14 lwz r0,20(r1)
ffc0a710: 80 c1 00 54 lwz r6,84(r1)
ffc0a714: 7f a3 eb 78 mr r3,r29
ffc0a718: 81 61 00 5c lwz r11,92(r1)
ffc0a71c: 7d 40 d8 96 mulhw r10,r0,r27
ffc0a720: 80 a1 00 50 lwz r5,80(r1)
ffc0a724: 7d 86 d8 96 mulhw r12,r6,r27
ffc0a728: 80 e1 00 58 lwz r7,88(r1)
ffc0a72c: 81 21 00 10 lwz r9,16(r1)
ffc0a730: 7d 0b d8 96 mulhw r8,r11,r27
ffc0a734: 7c 00 fe 70 srawi r0,r0,31
ffc0a738: 7d 4a 36 70 srawi r10,r10,6
ffc0a73c: 7d 40 50 50 subf r10,r0,r10
ffc0a740: 80 01 00 68 lwz r0,104(r1)
ffc0a744: 7d 8c 36 70 srawi r12,r12,6
ffc0a748: 7d 6b fe 70 srawi r11,r11,31
ffc0a74c: 7c 09 03 a6 mtctr r0
ffc0a750: 7c c6 fe 70 srawi r6,r6,31
ffc0a754: 7d 08 36 70 srawi r8,r8,6
ffc0a758: 7e 44 93 78 mr r4,r18
ffc0a75c: 7c c6 60 50 subf r6,r6,r12
ffc0a760: 7d 0b 40 50 subf r8,r11,r8
ffc0a764: 4c c6 31 82 crclr 4*cr1+eq
ffc0a768: 4e 80 04 21 bctrl
ffc0a76c: 4b ff fe 3c b ffc0a5a8 <rtems_rate_monotonic_report_statistics_with_plugin+0x134>
ffc0a780 <rtems_rate_monotonic_reset_all_statistics>:
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc0a780: 3d 20 00 00 lis r9,0
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
ffc0a784: 94 21 ff f0 stwu r1,-16(r1)
ffc0a788: 7c 08 02 a6 mflr r0
ffc0a78c: 81 69 28 08 lwz r11,10248(r9)
ffc0a790: 90 01 00 14 stw r0,20(r1)
ffc0a794: 38 0b 00 01 addi r0,r11,1
ffc0a798: 93 c1 00 08 stw r30,8(r1)
ffc0a79c: 93 e1 00 0c stw r31,12(r1)
ffc0a7a0: 90 09 28 08 stw r0,10248(r9)
/*
* 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 ;
ffc0a7a4: 3f c0 00 00 lis r30,0
ffc0a7a8: 3b de 2c 00 addi r30,r30,11264
ffc0a7ac: 83 fe 00 08 lwz r31,8(r30)
ffc0a7b0: 80 1e 00 0c lwz r0,12(r30)
ffc0a7b4: 7f 9f 00 40 cmplw cr7,r31,r0
ffc0a7b8: 41 9d 00 1c bgt- cr7,ffc0a7d4 <rtems_rate_monotonic_reset_all_statistics+0x54><== NEVER TAKEN
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
ffc0a7bc: 7f e3 fb 78 mr r3,r31
ffc0a7c0: 48 00 00 31 bl ffc0a7f0 <rtems_rate_monotonic_reset_statistics>
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
ffc0a7c4: 80 1e 00 0c lwz r0,12(r30)
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
ffc0a7c8: 3b ff 00 01 addi r31,r31,1
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
ffc0a7cc: 7f 80 f8 40 cmplw cr7,r0,r31
ffc0a7d0: 40 9c ff ec bge+ cr7,ffc0a7bc <rtems_rate_monotonic_reset_all_statistics+0x3c>
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
ffc0a7d4: 48 00 38 45 bl ffc0e018 <_Thread_Enable_dispatch>
}
ffc0a7d8: 80 01 00 14 lwz r0,20(r1)
ffc0a7dc: 83 c1 00 08 lwz r30,8(r1)
ffc0a7e0: 7c 08 03 a6 mtlr r0
ffc0a7e4: 83 e1 00 0c lwz r31,12(r1)
ffc0a7e8: 38 21 00 10 addi r1,r1,16
ffc0a7ec: 4e 80 00 20 blr
ffc1a2a4 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
ffc1a2a4: 94 21 ff e0 stwu r1,-32(r1)
ffc1a2a8: 7c 08 02 a6 mflr r0
ffc1a2ac: 93 e1 00 1c stw r31,28(r1)
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
ffc1a2b0: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
ffc1a2b4: 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;
ffc1a2b8: 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 )
ffc1a2bc: 40 82 00 1c bne- ffc1a2d8 <rtems_signal_send+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc1a2c0: 7c 03 03 78 mr r3,r0
ffc1a2c4: 80 01 00 24 lwz r0,36(r1)
ffc1a2c8: 83 e1 00 1c lwz r31,28(r1)
ffc1a2cc: 38 21 00 20 addi r1,r1,32
ffc1a2d0: 7c 08 03 a6 mtlr r0
ffc1a2d4: 4e 80 00 20 blr
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
ffc1a2d8: 38 81 00 08 addi r4,r1,8
ffc1a2dc: 48 00 58 a9 bl ffc1fb84 <_Thread_Get>
switch ( location ) {
ffc1a2e0: 80 01 00 08 lwz r0,8(r1)
ffc1a2e4: 2f 80 00 00 cmpwi cr7,r0,0
ffc1a2e8: 41 9e 00 20 beq- cr7,ffc1a308 <rtems_signal_send+0x64>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc1a2ec: 38 00 00 04 li r0,4
}
ffc1a2f0: 83 e1 00 1c lwz r31,28(r1)
ffc1a2f4: 7c 03 03 78 mr r3,r0
ffc1a2f8: 80 01 00 24 lwz r0,36(r1)
ffc1a2fc: 38 21 00 20 addi r1,r1,32
ffc1a300: 7c 08 03 a6 mtlr r0
ffc1a304: 4e 80 00 20 blr
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
ffc1a308: 81 23 01 2c lwz r9,300(r3)
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
ffc1a30c: 80 09 00 0c lwz r0,12(r9)
ffc1a310: 2f 80 00 00 cmpwi cr7,r0,0
ffc1a314: 41 9e 00 9c beq- cr7,ffc1a3b0 <rtems_signal_send+0x10c>
if ( asr->is_enabled ) {
ffc1a318: 88 09 00 08 lbz r0,8(r9)
ffc1a31c: 2f 80 00 00 cmpwi cr7,r0,0
ffc1a320: 41 9e 00 50 beq- cr7,ffc1a370 <rtems_signal_send+0xcc>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc1a324: 7c 00 00 a6 mfmsr r0
ffc1a328: 7d 70 42 a6 mfsprg r11,0
ffc1a32c: 7c 0b 58 78 andc r11,r0,r11
ffc1a330: 7d 60 01 24 mtmsr r11
)
{
ISR_Level _level;
_ISR_Disable( _level );
*signal_set |= signals;
ffc1a334: 81 69 00 14 lwz r11,20(r9)
ffc1a338: 7d 7f fb 78 or r31,r11,r31
ffc1a33c: 93 e9 00 14 stw r31,20(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc1a340: 7c 00 01 24 mtmsr r0
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
ffc1a344: 3d 20 00 00 lis r9,0
ffc1a348: 39 29 71 d8 addi r9,r9,29144
ffc1a34c: 80 09 00 08 lwz r0,8(r9)
ffc1a350: 2f 80 00 00 cmpwi cr7,r0,0
ffc1a354: 41 9e 00 3c beq- cr7,ffc1a390 <rtems_signal_send+0xec>
ffc1a358: 80 09 00 0c lwz r0,12(r9)
ffc1a35c: 7f 83 00 00 cmpw cr7,r3,r0
ffc1a360: 40 be 00 30 bne+ cr7,ffc1a390 <rtems_signal_send+0xec> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
ffc1a364: 38 00 00 01 li r0,1
ffc1a368: 98 09 00 18 stb r0,24(r9)
ffc1a36c: 48 00 00 24 b ffc1a390 <rtems_signal_send+0xec>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc1a370: 7c 00 00 a6 mfmsr r0
ffc1a374: 7d 70 42 a6 mfsprg r11,0
ffc1a378: 7c 0b 58 78 andc r11,r0,r11
ffc1a37c: 7d 60 01 24 mtmsr r11
ffc1a380: 81 69 00 18 lwz r11,24(r9)
ffc1a384: 7d 7f fb 78 or r31,r11,r31
ffc1a388: 93 e9 00 18 stw r31,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc1a38c: 7c 00 01 24 mtmsr r0
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
ffc1a390: 48 00 57 d5 bl ffc1fb64 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc1a394: 38 00 00 00 li r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc1a398: 7c 03 03 78 mr r3,r0
ffc1a39c: 80 01 00 24 lwz r0,36(r1)
ffc1a3a0: 83 e1 00 1c lwz r31,28(r1)
ffc1a3a4: 38 21 00 20 addi r1,r1,32
ffc1a3a8: 7c 08 03 a6 mtlr r0
ffc1a3ac: 4e 80 00 20 blr
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
ffc1a3b0: 48 00 57 b5 bl ffc1fb64 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
ffc1a3b4: 38 00 00 0b li r0,11
ffc1a3b8: 4b ff ff 08 b ffc1a2c0 <rtems_signal_send+0x1c>
ffc03d08 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
ffc03d08: 7c 08 02 a6 mflr r0
ffc03d0c: 94 21 ff f8 stwu r1,-8(r1)
ffc03d10: 90 01 00 0c stw r0,12(r1)
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
ffc03d14: 80 03 00 08 lwz r0,8(r3)
ffc03d18: 2f 80 00 00 cmpwi cr7,r0,0
ffc03d1c: 41 9e 00 1c beq- cr7,ffc03d38 <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;
ffc03d20: 80 63 00 b8 lwz r3,184(r3)
ffc03d24: 3c 80 00 00 lis r4,0
ffc03d28: 38 84 2a c4 addi r4,r4,10948
ffc03d2c: 38 63 00 08 addi r3,r3,8
ffc03d30: 38 a0 00 80 li r5,128
ffc03d34: 48 00 f1 39 bl ffc12e6c <memcpy>
}
ffc03d38: 80 01 00 0c lwz r0,12(r1)
ffc03d3c: 38 21 00 08 addi r1,r1,8
ffc03d40: 7c 08 03 a6 mtlr r0
ffc03d44: 4e 80 00 20 blr
ffc03cc0 <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
ffc03cc0: 94 21 ff f0 stwu r1,-16(r1)
ffc03cc4: 7c 08 02 a6 mflr r0
ffc03cc8: 93 e1 00 0c stw r31,12(r1)
ffc03ccc: 7c 9f 23 78 mr r31,r4
ffc03cd0: 90 01 00 14 stw r0,20(r1)
Stack_check_Initialize();
ffc03cd4: 4b ff ff 9d bl ffc03c70 <Stack_check_Initialize>
if (the_thread)
ffc03cd8: 2f 9f 00 00 cmpwi cr7,r31,0
ffc03cdc: 41 9e 00 14 beq- cr7,ffc03cf0 <rtems_stack_checker_create_extension+0x30><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
ffc03ce0: 80 7f 00 b8 lwz r3,184(r31)
ffc03ce4: 38 80 00 a5 li r4,165
ffc03ce8: 80 bf 00 b4 lwz r5,180(r31)
ffc03cec: 48 00 f2 61 bl ffc12f4c <memset>
return true;
}
ffc03cf0: 80 01 00 14 lwz r0,20(r1)
ffc03cf4: 38 60 00 01 li r3,1
ffc03cf8: 83 e1 00 0c lwz r31,12(r1)
ffc03cfc: 38 21 00 10 addi r1,r1,16
ffc03d00: 7c 08 03 a6 mtlr r0
ffc03d04: 4e 80 00 20 blr
ffc03ec0 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
ffc03ec0: 94 21 ff e8 stwu r1,-24(r1)
ffc03ec4: 7c 08 02 a6 mflr r0
ffc03ec8: 93 a1 00 0c stw r29,12(r1)
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
ffc03ecc: 3f a0 00 00 lis r29,0
ffc03ed0: 3b bd 2e 38 addi r29,r29,11832
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
ffc03ed4: 90 01 00 1c stw r0,28(r1)
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
ffc03ed8: 81 3d 00 0c lwz r9,12(r29)
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
ffc03edc: 93 e1 00 14 stw r31,20(r1)
ffc03ee0: 7c 3f 0b 78 mr r31,r1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
ffc03ee4: 80 69 00 b8 lwz r3,184(r9)
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
ffc03ee8: 93 c1 00 10 stw r30,16(r1)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
ffc03eec: 3b c0 00 00 li r30,0
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
ffc03ef0: 7f 9f 18 40 cmplw cr7,r31,r3
ffc03ef4: 41 9c 00 18 blt- cr7,ffc03f0c <rtems_stack_checker_is_blown+0x4c><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
ffc03ef8: 83 c9 00 b4 lwz r30,180(r9)
ffc03efc: 7f c3 f2 14 add r30,r3,r30
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
ffc03f00: 7f df f0 10 subfc r30,r31,r30
ffc03f04: 3b c0 00 00 li r30,0
ffc03f08: 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 ) {
ffc03f0c: 3d 20 00 00 lis r9,0
ffc03f10: 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;
ffc03f14: 38 80 00 01 li r4,1
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
ffc03f18: 2f 80 00 00 cmpwi cr7,r0,0
ffc03f1c: 41 9e 00 20 beq- cr7,ffc03f3c <rtems_stack_checker_is_blown+0x7c><== NEVER TAKEN
pattern_ok = (!memcmp(
ffc03f20: 3c 80 00 00 lis r4,0
ffc03f24: 38 84 2a c4 addi r4,r4,10948
ffc03f28: 38 63 00 08 addi r3,r3,8
ffc03f2c: 38 a0 00 80 li r5,128
ffc03f30: 48 00 ee a5 bl ffc12dd4 <memcmp>
ffc03f34: 7c 64 00 34 cntlzw r4,r3
ffc03f38: 54 84 d9 7e rlwinm r4,r4,27,5,31
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
ffc03f3c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc03f40: 41 9e 00 30 beq- cr7,ffc03f70 <rtems_stack_checker_is_blown+0xb0><== NEVER TAKEN
ffc03f44: 2f 84 00 00 cmpwi cr7,r4,0
ffc03f48: 41 9e 00 28 beq- cr7,ffc03f70 <rtems_stack_checker_is_blown+0xb0><== NEVER TAKEN
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
ffc03f4c: 39 7f 00 18 addi r11,r31,24
ffc03f50: 80 0b 00 04 lwz r0,4(r11)
ffc03f54: 38 60 00 00 li r3,0
ffc03f58: 83 ab ff f4 lwz r29,-12(r11)
ffc03f5c: 7c 08 03 a6 mtlr r0
ffc03f60: 83 cb ff f8 lwz r30,-8(r11)
ffc03f64: 83 eb ff fc lwz r31,-4(r11)
ffc03f68: 7d 61 5b 78 mr r1,r11
ffc03f6c: 4e 80 00 20 blr
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
ffc03f70: 80 7d 00 0c lwz r3,12(r29) <== NOT EXECUTED
ffc03f74: 4b ff fd d5 bl ffc03d48 <Stack_check_report_blown_task><== NOT EXECUTED
ffc03f78 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc03f78: 94 21 ff e8 stwu r1,-24(r1)
ffc03f7c: 7c 08 02 a6 mflr r0
ffc03f80: 93 e1 00 14 stw r31,20(r1)
if ( !print )
ffc03f84: 7c 9f 23 79 mr. r31,r4
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc03f88: 93 a1 00 0c stw r29,12(r1)
ffc03f8c: 7c 7d 1b 78 mr r29,r3
ffc03f90: 90 01 00 1c stw r0,28(r1)
ffc03f94: 93 81 00 08 stw r28,8(r1)
ffc03f98: 93 c1 00 10 stw r30,16(r1)
if ( !print )
ffc03f9c: 41 82 00 58 beq- ffc03ff4 <rtems_stack_checker_report_usage_with_plugin+0x7c><== NEVER TAKEN
return;
print_context = context;
ffc03fa0: 3f c0 00 00 lis r30,0
print_handler = print;
(*print)( context, "Stack usage by thread\n");
ffc03fa4: 7f e9 03 a6 mtctr r31
)
{
if ( !print )
return;
print_context = context;
ffc03fa8: 3b 9e 28 50 addi r28,r30,10320
print_handler = print;
ffc03fac: 93 fe 28 50 stw r31,10320(r30)
(*print)( context, "Stack usage by thread\n");
ffc03fb0: 3c 80 ff c2 lis r4,-62
ffc03fb4: 38 84 8e 08 addi r4,r4,-29176
)
{
if ( !print )
return;
print_context = context;
ffc03fb8: 90 7c 00 04 stw r3,4(r28)
print_handler = print;
(*print)( context, "Stack usage by thread\n");
ffc03fbc: 4c c6 31 82 crclr 4*cr1+eq
ffc03fc0: 4e 80 04 21 bctrl
(*print)( context,
ffc03fc4: 3c 80 ff c2 lis r4,-62
ffc03fc8: 38 84 8e 20 addi r4,r4,-29152
ffc03fcc: 7f e9 03 a6 mtctr r31
ffc03fd0: 7f a3 eb 78 mr r3,r29
ffc03fd4: 4c c6 31 82 crclr 4*cr1+eq
ffc03fd8: 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 );
ffc03fdc: 3c 60 ff c0 lis r3,-64
ffc03fe0: 38 63 3a a0 addi r3,r3,15008
ffc03fe4: 48 00 68 45 bl ffc0a828 <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;
ffc03fe8: 38 00 00 00 li r0,0
ffc03fec: 90 1c 00 04 stw r0,4(r28)
print_handler = NULL;
ffc03ff0: 90 1e 28 50 stw r0,10320(r30)
}
ffc03ff4: 80 01 00 1c lwz r0,28(r1)
ffc03ff8: 83 81 00 08 lwz r28,8(r1)
ffc03ffc: 7c 08 03 a6 mtlr r0
ffc04000: 83 a1 00 0c lwz r29,12(r1)
ffc04004: 83 c1 00 10 lwz r30,16(r1)
ffc04008: 83 e1 00 14 lwz r31,20(r1)
ffc0400c: 38 21 00 18 addi r1,r1,24
ffc04010: 4e 80 00 20 blr
ffc03e28 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
ffc03e28: 94 21 ff f0 stwu r1,-16(r1)
ffc03e2c: 7c 08 02 a6 mflr r0
ffc03e30: 90 01 00 14 stw r0,20(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);
ffc03e34: 81 23 00 b8 lwz r9,184(r3)
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
ffc03e38: 93 e1 00 0c stw r31,12(r1)
ffc03e3c: 7c 3f 0b 78 mr r31,r1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
ffc03e40: 7f 9f 48 40 cmplw cr7,r31,r9
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
ffc03e44: 93 c1 00 08 stw r30,8(r1)
ffc03e48: 7c 7e 1b 78 mr r30,r3
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);
ffc03e4c: 38 69 00 08 addi r3,r9,8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
ffc03e50: 41 9c 00 14 blt- cr7,ffc03e64 <rtems_stack_checker_switch_extension+0x3c><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
ffc03e54: 80 1e 00 b4 lwz r0,180(r30)
ffc03e58: 7d 29 02 14 add r9,r9,r0
ffc03e5c: 7f 9f 48 40 cmplw cr7,r31,r9
ffc03e60: 40 9d 00 24 ble- cr7,ffc03e84 <rtems_stack_checker_switch_extension+0x5c><== ALWAYS TAKEN
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
ffc03e64: 3c 80 00 00 lis r4,0 <== NOT EXECUTED
ffc03e68: 38 84 2a c4 addi r4,r4,10948 <== NOT EXECUTED
ffc03e6c: 38 a0 00 80 li r5,128 <== NOT EXECUTED
ffc03e70: 48 00 ef 65 bl ffc12dd4 <memcmp> <== NOT EXECUTED
ffc03e74: 7c 64 00 34 cntlzw r4,r3 <== NOT EXECUTED
ffc03e78: 54 84 d9 7e rlwinm r4,r4,27,5,31 <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
ffc03e7c: 7f c3 f3 78 mr r3,r30
ffc03e80: 4b ff fe c9 bl ffc03d48 <Stack_check_report_blown_task>
/*
* 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,
ffc03e84: 3c 80 00 00 lis r4,0
ffc03e88: 38 84 2a c4 addi r4,r4,10948
ffc03e8c: 38 a0 00 80 li r5,128
ffc03e90: 48 00 ef 45 bl ffc12dd4 <memcmp>
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
ffc03e94: 2f 83 00 00 cmpwi cr7,r3,0
ffc03e98: 40 9e 00 20 bne- cr7,ffc03eb8 <rtems_stack_checker_switch_extension+0x90>
Stack_check_report_blown_task( running, pattern_ok );
}
}
ffc03e9c: 39 7f 00 10 addi r11,r31,16
ffc03ea0: 80 0b 00 04 lwz r0,4(r11)
ffc03ea4: 83 cb ff f8 lwz r30,-8(r11)
ffc03ea8: 7c 08 03 a6 mtlr r0
ffc03eac: 83 eb ff fc lwz r31,-4(r11)
ffc03eb0: 7d 61 5b 78 mr r1,r11
ffc03eb4: 4e 80 00 20 blr
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
ffc03eb8: 38 80 00 00 li r4,0
ffc03ebc: 4b ff ff c0 b ffc03e7c <rtems_stack_checker_switch_extension+0x54>
ffc10004 <rtems_string_to_double>:
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
ffc10004: 94 21 ff d0 stwu r1,-48(r1)
ffc10008: 7c 08 02 a6 mflr r0
ffc1000c: 93 c1 00 20 stw r30,32(r1)
double result;
char *end;
if ( !n )
ffc10010: 7c 9e 23 79 mr. r30,r4
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
ffc10014: 93 a1 00 1c stw r29,28(r1)
ffc10018: 7c bd 2b 78 mr r29,r5
ffc1001c: 93 e1 00 24 stw r31,36(r1)
ffc10020: 7c 7f 1b 78 mr r31,r3
double result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc10024: 38 60 00 09 li r3,9
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
ffc10028: 90 01 00 34 stw r0,52(r1)
ffc1002c: db e1 00 28 stfd f31,40(r1)
ffc10030: 93 81 00 18 stw r28,24(r1)
double result;
char *end;
if ( !n )
ffc10034: 41 82 00 60 beq- ffc10094 <rtems_string_to_double+0x90>
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc10038: 3f 80 ff c2 lis r28,-62
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc1003c: 48 00 2e 71 bl ffc12eac <__errno>
*n = 0;
ffc10040: c8 1c 09 e8 lfd f0,2536(r28)
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc10044: 38 00 00 00 li r0,0
ffc10048: 90 03 00 00 stw r0,0(r3)
*n = 0;
result = strtod( s, &end );
ffc1004c: 38 81 00 08 addi r4,r1,8
ffc10050: 7f e3 fb 78 mr r3,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc10054: d8 1e 00 00 stfd f0,0(r30)
result = strtod( s, &end );
ffc10058: 48 00 5b a5 bl ffc15bfc <strtod>
if ( endptr )
ffc1005c: 2f 9d 00 00 cmpwi cr7,r29,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtod( s, &end );
ffc10060: ff e0 08 90 fmr f31,f1
if ( endptr )
ffc10064: 41 9e 00 88 beq- cr7,ffc100ec <rtems_string_to_double+0xe8>
*endptr = end;
ffc10068: 80 01 00 08 lwz r0,8(r1)
ffc1006c: 90 1d 00 00 stw r0,0(r29)
if ( end == s )
ffc10070: 7f 9f 00 00 cmpw cr7,r31,r0
return RTEMS_NOT_DEFINED;
ffc10074: 38 60 00 0b li r3,11
result = strtod( s, &end );
if ( endptr )
*endptr = end;
if ( end == s )
ffc10078: 41 9e 00 1c beq- cr7,ffc10094 <rtems_string_to_double+0x90>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc1007c: 48 00 2e 31 bl ffc12eac <__errno>
ffc10080: 80 03 00 00 lwz r0,0(r3)
ffc10084: 2f 80 00 22 cmpwi cr7,r0,34
ffc10088: 41 9e 00 30 beq- cr7,ffc100b8 <rtems_string_to_double+0xb4>
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
ffc1008c: db fe 00 00 stfd f31,0(r30)
return RTEMS_SUCCESSFUL;
ffc10090: 38 60 00 00 li r3,0
}
ffc10094: 80 01 00 34 lwz r0,52(r1)
ffc10098: 83 81 00 18 lwz r28,24(r1)
ffc1009c: 7c 08 03 a6 mtlr r0
ffc100a0: 83 a1 00 1c lwz r29,28(r1)
ffc100a4: 83 c1 00 20 lwz r30,32(r1)
ffc100a8: 83 e1 00 24 lwz r31,36(r1)
ffc100ac: cb e1 00 28 lfd f31,40(r1)
ffc100b0: 38 21 00 30 addi r1,r1,48
ffc100b4: 4e 80 00 20 blr
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc100b8: c8 1c 09 e8 lfd f0,2536(r28)
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
ffc100bc: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc100c0: ff 9f 00 00 fcmpu cr7,f31,f0
ffc100c4: 41 be ff d0 beq- cr7,ffc10094 <rtems_string_to_double+0x90><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
ffc100c8: 3d 20 ff c2 lis r9,-62
ffc100cc: c8 09 2f c0 lfd f0,12224(r9)
ffc100d0: ff 9f 00 00 fcmpu cr7,f31,f0
ffc100d4: 41 bd ff c0 bgt- cr7,ffc10094 <rtems_string_to_double+0x90><== ALWAYS TAKEN
ffc100d8: 3d 20 ff c2 lis r9,-62 <== NOT EXECUTED
ffc100dc: c8 09 2f c8 lfd f0,12232(r9) <== NOT EXECUTED
ffc100e0: ff 9f 00 00 fcmpu cr7,f31,f0 <== NOT EXECUTED
ffc100e4: 40 9c ff a8 bge+ cr7,ffc1008c <rtems_string_to_double+0x88><== NOT EXECUTED
ffc100e8: 4b ff ff ac b ffc10094 <rtems_string_to_double+0x90> <== NOT EXECUTED
errno = 0;
*n = 0;
result = strtod( s, &end );
if ( endptr )
ffc100ec: 80 01 00 08 lwz r0,8(r1)
ffc100f0: 4b ff ff 80 b ffc10070 <rtems_string_to_double+0x6c>
ffc100f4 <rtems_string_to_float>:
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
ffc100f4: 94 21 ff d0 stwu r1,-48(r1)
ffc100f8: 7c 08 02 a6 mflr r0
ffc100fc: 93 c1 00 20 stw r30,32(r1)
float result;
char *end;
if ( !n )
ffc10100: 7c 9e 23 79 mr. r30,r4
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
ffc10104: 93 a1 00 1c stw r29,28(r1)
ffc10108: 7c bd 2b 78 mr r29,r5
ffc1010c: 93 e1 00 24 stw r31,36(r1)
ffc10110: 7c 7f 1b 78 mr r31,r3
float result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc10114: 38 60 00 09 li r3,9
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
ffc10118: 90 01 00 34 stw r0,52(r1)
ffc1011c: db e1 00 28 stfd f31,40(r1)
float result;
char *end;
if ( !n )
ffc10120: 41 82 00 5c beq- ffc1017c <rtems_string_to_float+0x88>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc10124: 48 00 2d 89 bl ffc12eac <__errno>
ffc10128: 38 00 00 00 li r0,0
ffc1012c: 90 03 00 00 stw r0,0(r3)
*n = 0;
ffc10130: 38 00 00 00 li r0,0
result = strtof( s, &end );
ffc10134: 7f e3 fb 78 mr r3,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc10138: 90 1e 00 00 stw r0,0(r30)
result = strtof( s, &end );
ffc1013c: 38 81 00 08 addi r4,r1,8
ffc10140: 48 00 5a d5 bl ffc15c14 <strtof>
if ( endptr )
ffc10144: 2f 9d 00 00 cmpwi cr7,r29,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtof( s, &end );
ffc10148: ff e0 08 90 fmr f31,f1
if ( endptr )
ffc1014c: 41 9e 00 88 beq- cr7,ffc101d4 <rtems_string_to_float+0xe0>
*endptr = end;
ffc10150: 80 01 00 08 lwz r0,8(r1)
ffc10154: 90 1d 00 00 stw r0,0(r29)
if ( end == s )
ffc10158: 7f 9f 00 00 cmpw cr7,r31,r0
return RTEMS_NOT_DEFINED;
ffc1015c: 38 60 00 0b li r3,11
result = strtof( s, &end );
if ( endptr )
*endptr = end;
if ( end == s )
ffc10160: 41 9e 00 1c beq- cr7,ffc1017c <rtems_string_to_float+0x88>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc10164: 48 00 2d 49 bl ffc12eac <__errno>
ffc10168: 80 03 00 00 lwz r0,0(r3)
ffc1016c: 2f 80 00 22 cmpwi cr7,r0,34
ffc10170: 41 9e 00 2c beq- cr7,ffc1019c <rtems_string_to_float+0xa8>
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
*n = result;
ffc10174: d3 fe 00 00 stfs f31,0(r30)
return RTEMS_SUCCESSFUL;
ffc10178: 38 60 00 00 li r3,0
}
ffc1017c: 80 01 00 34 lwz r0,52(r1)
ffc10180: 83 a1 00 1c lwz r29,28(r1)
ffc10184: 7c 08 03 a6 mtlr r0
ffc10188: 83 c1 00 20 lwz r30,32(r1)
ffc1018c: 83 e1 00 24 lwz r31,36(r1)
ffc10190: cb e1 00 28 lfd f31,40(r1)
ffc10194: 38 21 00 30 addi r1,r1,48
ffc10198: 4e 80 00 20 blr
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc1019c: 3d 20 ff c2 lis r9,-62
ffc101a0: c0 09 09 dc lfs f0,2524(r9)
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
ffc101a4: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc101a8: ff 9f 00 00 fcmpu cr7,f31,f0
ffc101ac: 41 be ff d0 beq- cr7,ffc1017c <rtems_string_to_float+0x88><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
ffc101b0: 3d 20 ff c2 lis r9,-62
ffc101b4: c0 09 2f d0 lfs f0,12240(r9)
ffc101b8: ff 9f 00 00 fcmpu cr7,f31,f0
ffc101bc: 41 bd ff c0 bgt- cr7,ffc1017c <rtems_string_to_float+0x88><== ALWAYS TAKEN
ffc101c0: 3d 20 ff c2 lis r9,-62 <== NOT EXECUTED
ffc101c4: c0 09 2f d4 lfs f0,12244(r9) <== NOT EXECUTED
ffc101c8: ff 9f 00 00 fcmpu cr7,f31,f0 <== NOT EXECUTED
ffc101cc: 40 9c ff a8 bge+ cr7,ffc10174 <rtems_string_to_float+0x80><== NOT EXECUTED
ffc101d0: 4b ff ff ac b ffc1017c <rtems_string_to_float+0x88> <== NOT EXECUTED
errno = 0;
*n = 0;
result = strtof( s, &end );
if ( endptr )
ffc101d4: 80 01 00 08 lwz r0,8(r1)
ffc101d8: 4b ff ff 80 b ffc10158 <rtems_string_to_float+0x64>
ffc101dc <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
ffc101dc: 94 21 ff d8 stwu r1,-40(r1)
ffc101e0: 7c 08 02 a6 mflr r0
ffc101e4: 93 a1 00 1c stw r29,28(r1)
long result;
char *end;
if ( !n )
ffc101e8: 7c 9d 23 79 mr. r29,r4
const char *s,
int *n,
char **endptr,
int base
)
{
ffc101ec: 93 81 00 18 stw r28,24(r1)
ffc101f0: 7c dc 33 78 mr r28,r6
ffc101f4: 93 c1 00 20 stw r30,32(r1)
ffc101f8: 7c be 2b 78 mr r30,r5
ffc101fc: 93 e1 00 24 stw r31,36(r1)
ffc10200: 7c 7f 1b 78 mr r31,r3
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc10204: 38 60 00 09 li r3,9
const char *s,
int *n,
char **endptr,
int base
)
{
ffc10208: 90 01 00 2c stw r0,44(r1)
long result;
char *end;
if ( !n )
ffc1020c: 41 82 00 5c beq- ffc10268 <rtems_string_to_int+0x8c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc10210: 48 00 2c 9d bl ffc12eac <__errno>
ffc10214: 38 00 00 00 li r0,0
ffc10218: 90 03 00 00 stw r0,0(r3)
*n = 0;
result = strtol( s, &end, base );
ffc1021c: 7f 85 e3 78 mr r5,r28
ffc10220: 7f e3 fb 78 mr r3,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc10224: 90 1d 00 00 stw r0,0(r29)
result = strtol( s, &end, base );
ffc10228: 38 81 00 08 addi r4,r1,8
ffc1022c: 48 00 5c 61 bl ffc15e8c <strtol>
if ( endptr )
ffc10230: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
ffc10234: 7c 7c 1b 78 mr r28,r3
if ( endptr )
ffc10238: 41 9e 00 80 beq- cr7,ffc102b8 <rtems_string_to_int+0xdc>
*endptr = end;
ffc1023c: 80 01 00 08 lwz r0,8(r1)
ffc10240: 90 1e 00 00 stw r0,0(r30)
if ( end == s )
ffc10244: 7f 9f 00 00 cmpw cr7,r31,r0
return RTEMS_NOT_DEFINED;
ffc10248: 38 60 00 0b li r3,11
result = strtol( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc1024c: 41 9e 00 1c beq- cr7,ffc10268 <rtems_string_to_int+0x8c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc10250: 48 00 2c 5d bl ffc12eac <__errno>
ffc10254: 80 03 00 00 lwz r0,0(r3)
ffc10258: 2f 80 00 22 cmpwi cr7,r0,34
ffc1025c: 41 9e 00 2c beq- cr7,ffc10288 <rtems_string_to_int+0xac>
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
ffc10260: 93 9d 00 00 stw r28,0(r29)
return RTEMS_SUCCESSFUL;
ffc10264: 38 60 00 00 li r3,0
}
ffc10268: 80 01 00 2c lwz r0,44(r1)
ffc1026c: 83 81 00 18 lwz r28,24(r1)
ffc10270: 7c 08 03 a6 mtlr r0
ffc10274: 83 a1 00 1c lwz r29,28(r1)
ffc10278: 83 c1 00 20 lwz r30,32(r1)
ffc1027c: 83 e1 00 24 lwz r31,36(r1)
ffc10280: 38 21 00 28 addi r1,r1,40
ffc10284: 4e 80 00 20 blr
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc10288: 2f 9c 00 00 cmpwi cr7,r28,0
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
ffc1028c: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc10290: 41 be ff d8 beq- cr7,ffc10268 <rtems_string_to_int+0x8c><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
ffc10294: 6f 80 80 00 xoris r0,r28,32768
ffc10298: 2f 80 ff ff cmpwi cr7,r0,-1
ffc1029c: 41 9e ff cc beq+ cr7,ffc10268 <rtems_string_to_int+0x8c><== ALWAYS TAKEN
ffc102a0: 3c 00 80 00 lis r0,-32768 <== NOT EXECUTED
ffc102a4: 7f 9c 00 00 cmpw cr7,r28,r0 <== NOT EXECUTED
ffc102a8: 41 be ff c0 beq- cr7,ffc10268 <rtems_string_to_int+0x8c><== NOT EXECUTED
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
ffc102ac: 93 9d 00 00 stw r28,0(r29) <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
ffc102b0: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc102b4: 4b ff ff b4 b ffc10268 <rtems_string_to_int+0x8c> <== NOT EXECUTED
errno = 0;
*n = 0;
result = strtol( s, &end, base );
if ( endptr )
ffc102b8: 80 01 00 08 lwz r0,8(r1)
ffc102bc: 4b ff ff 88 b ffc10244 <rtems_string_to_int+0x68>
ffc103d0 <rtems_string_to_long>:
const char *s,
long *n,
char **endptr,
int base
)
{
ffc103d0: 94 21 ff d8 stwu r1,-40(r1)
ffc103d4: 7c 08 02 a6 mflr r0
ffc103d8: 93 a1 00 1c stw r29,28(r1)
long result;
char *end;
if ( !n )
ffc103dc: 7c 9d 23 79 mr. r29,r4
const char *s,
long *n,
char **endptr,
int base
)
{
ffc103e0: 93 81 00 18 stw r28,24(r1)
ffc103e4: 7c dc 33 78 mr r28,r6
ffc103e8: 93 c1 00 20 stw r30,32(r1)
ffc103ec: 7c be 2b 78 mr r30,r5
ffc103f0: 93 e1 00 24 stw r31,36(r1)
ffc103f4: 7c 7f 1b 78 mr r31,r3
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc103f8: 38 60 00 09 li r3,9
const char *s,
long *n,
char **endptr,
int base
)
{
ffc103fc: 90 01 00 2c stw r0,44(r1)
long result;
char *end;
if ( !n )
ffc10400: 41 82 00 5c beq- ffc1045c <rtems_string_to_long+0x8c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc10404: 48 00 2a a9 bl ffc12eac <__errno>
ffc10408: 38 00 00 00 li r0,0
ffc1040c: 90 03 00 00 stw r0,0(r3)
*n = 0;
result = strtol( s, &end, base );
ffc10410: 7f 85 e3 78 mr r5,r28
ffc10414: 7f e3 fb 78 mr r3,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc10418: 90 1d 00 00 stw r0,0(r29)
result = strtol( s, &end, base );
ffc1041c: 38 81 00 08 addi r4,r1,8
ffc10420: 48 00 5a 6d bl ffc15e8c <strtol>
if ( endptr )
ffc10424: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
ffc10428: 7c 7c 1b 78 mr r28,r3
if ( endptr )
ffc1042c: 41 9e 00 80 beq- cr7,ffc104ac <rtems_string_to_long+0xdc>
*endptr = end;
ffc10430: 80 01 00 08 lwz r0,8(r1)
ffc10434: 90 1e 00 00 stw r0,0(r30)
if ( end == s )
ffc10438: 7f 9f 00 00 cmpw cr7,r31,r0
return RTEMS_NOT_DEFINED;
ffc1043c: 38 60 00 0b li r3,11
result = strtol( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc10440: 41 9e 00 1c beq- cr7,ffc1045c <rtems_string_to_long+0x8c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc10444: 48 00 2a 69 bl ffc12eac <__errno>
ffc10448: 80 03 00 00 lwz r0,0(r3)
ffc1044c: 2f 80 00 22 cmpwi cr7,r0,34
ffc10450: 41 9e 00 2c beq- cr7,ffc1047c <rtems_string_to_long+0xac>
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
ffc10454: 93 9d 00 00 stw r28,0(r29)
return RTEMS_SUCCESSFUL;
ffc10458: 38 60 00 00 li r3,0
}
ffc1045c: 80 01 00 2c lwz r0,44(r1)
ffc10460: 83 81 00 18 lwz r28,24(r1)
ffc10464: 7c 08 03 a6 mtlr r0
ffc10468: 83 a1 00 1c lwz r29,28(r1)
ffc1046c: 83 c1 00 20 lwz r30,32(r1)
ffc10470: 83 e1 00 24 lwz r31,36(r1)
ffc10474: 38 21 00 28 addi r1,r1,40
ffc10478: 4e 80 00 20 blr
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc1047c: 2f 9c 00 00 cmpwi cr7,r28,0
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
ffc10480: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc10484: 41 be ff d8 beq- cr7,ffc1045c <rtems_string_to_long+0x8c><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
ffc10488: 6f 80 80 00 xoris r0,r28,32768
ffc1048c: 2f 80 ff ff cmpwi cr7,r0,-1
ffc10490: 41 9e ff cc beq+ cr7,ffc1045c <rtems_string_to_long+0x8c>
ffc10494: 3c 00 80 00 lis r0,-32768
ffc10498: 7f 9c 00 00 cmpw cr7,r28,r0
ffc1049c: 41 be ff c0 beq- cr7,ffc1045c <rtems_string_to_long+0x8c><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
ffc104a0: 93 9d 00 00 stw r28,0(r29) <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
ffc104a4: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc104a8: 4b ff ff b4 b ffc1045c <rtems_string_to_long+0x8c> <== NOT EXECUTED
errno = 0;
*n = 0;
result = strtol( s, &end, base );
if ( endptr )
ffc104ac: 80 01 00 08 lwz r0,8(r1)
ffc104b0: 4b ff ff 88 b ffc10438 <rtems_string_to_long+0x68>
ffc102c0 <rtems_string_to_long_long>:
const char *s,
long long *n,
char **endptr,
int base
)
{
ffc102c0: 94 21 ff d0 stwu r1,-48(r1)
ffc102c4: 7c 08 02 a6 mflr r0
ffc102c8: 93 e1 00 2c stw r31,44(r1)
long long result;
char *end;
if ( !n )
ffc102cc: 7c 9f 23 79 mr. r31,r4
const char *s,
long long *n,
char **endptr,
int base
)
{
ffc102d0: 93 81 00 20 stw r28,32(r1)
ffc102d4: 7c dc 33 78 mr r28,r6
ffc102d8: 93 a1 00 24 stw r29,36(r1)
ffc102dc: 7c bd 2b 78 mr r29,r5
ffc102e0: 93 c1 00 28 stw r30,40(r1)
ffc102e4: 7c 7e 1b 78 mr r30,r3
long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc102e8: 38 60 00 09 li r3,9
const char *s,
long long *n,
char **endptr,
int base
)
{
ffc102ec: 90 01 00 34 stw r0,52(r1)
ffc102f0: 93 61 00 1c stw r27,28(r1)
long long result;
char *end;
if ( !n )
ffc102f4: 41 82 00 70 beq- ffc10364 <rtems_string_to_long_long+0xa4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc102f8: 48 00 2b b5 bl ffc12eac <__errno>
ffc102fc: 38 00 00 00 li r0,0
*n = 0;
ffc10300: 39 20 00 00 li r9,0
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc10304: 90 03 00 00 stw r0,0(r3)
*n = 0;
ffc10308: 39 40 00 00 li r10,0
ffc1030c: 91 3f 00 00 stw r9,0(r31)
result = strtoll( s, &end, base );
ffc10310: 7f 85 e3 78 mr r5,r28
ffc10314: 7f c3 f3 78 mr r3,r30
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc10318: 91 5f 00 04 stw r10,4(r31)
result = strtoll( s, &end, base );
ffc1031c: 38 81 00 08 addi r4,r1,8
ffc10320: 48 00 5b 8d bl ffc15eac <strtoll>
if ( endptr )
ffc10324: 2f 9d 00 00 cmpwi cr7,r29,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoll( s, &end, base );
ffc10328: 7c 7c 1b 78 mr r28,r3
ffc1032c: 7c 9b 23 78 mr r27,r4
if ( endptr )
ffc10330: 41 9e 00 8c beq- cr7,ffc103bc <rtems_string_to_long_long+0xfc>
*endptr = end;
ffc10334: 80 01 00 08 lwz r0,8(r1)
ffc10338: 90 1d 00 00 stw r0,0(r29)
if ( end == s )
ffc1033c: 7f 9e 00 00 cmpw cr7,r30,r0
return RTEMS_NOT_DEFINED;
ffc10340: 38 60 00 0b li r3,11
result = strtoll( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc10344: 41 9e 00 20 beq- cr7,ffc10364 <rtems_string_to_long_long+0xa4>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc10348: 48 00 2b 65 bl ffc12eac <__errno>
ffc1034c: 80 03 00 00 lwz r0,0(r3)
ffc10350: 2f 80 00 22 cmpwi cr7,r0,34
ffc10354: 41 9e 00 34 beq- cr7,ffc10388 <rtems_string_to_long_long+0xc8>
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
ffc10358: 93 9f 00 00 stw r28,0(r31)
return RTEMS_SUCCESSFUL;
ffc1035c: 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;
ffc10360: 93 7f 00 04 stw r27,4(r31)
return RTEMS_SUCCESSFUL;
}
ffc10364: 80 01 00 34 lwz r0,52(r1)
ffc10368: 83 61 00 1c lwz r27,28(r1)
ffc1036c: 7c 08 03 a6 mtlr r0
ffc10370: 83 81 00 20 lwz r28,32(r1)
ffc10374: 83 a1 00 24 lwz r29,36(r1)
ffc10378: 83 c1 00 28 lwz r30,40(r1)
ffc1037c: 83 e1 00 2c lwz r31,44(r1)
ffc10380: 38 21 00 30 addi r1,r1,48
ffc10384: 4e 80 00 20 blr
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc10388: 7f 80 db 79 or. r0,r28,r27
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
ffc1038c: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc10390: 41 a2 ff d4 beq- ffc10364 <rtems_string_to_long_long+0xa4><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
ffc10394: 6f 80 80 00 xoris r0,r28,32768
ffc10398: 2f 80 ff ff cmpwi cr7,r0,-1
ffc1039c: 41 9e 00 28 beq- cr7,ffc103c4 <rtems_string_to_long_long+0x104>
ffc103a0: 3c 00 80 00 lis r0,-32768
ffc103a4: 7f 9c 00 00 cmpw cr7,r28,r0
ffc103a8: 40 9e ff b0 bne+ cr7,ffc10358 <rtems_string_to_long_long+0x98><== NEVER TAKEN
ffc103ac: 2f 9b 00 00 cmpwi cr7,r27,0
return RTEMS_INVALID_NUMBER;
ffc103b0: 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 )))
ffc103b4: 40 9e ff a4 bne+ cr7,ffc10358 <rtems_string_to_long_long+0x98><== NEVER TAKEN
ffc103b8: 4b ff ff ac b ffc10364 <rtems_string_to_long_long+0xa4>
errno = 0;
*n = 0;
result = strtoll( s, &end, base );
if ( endptr )
ffc103bc: 80 01 00 08 lwz r0,8(r1)
ffc103c0: 4b ff ff 7c b ffc1033c <rtems_string_to_long_long+0x7c>
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
ffc103c4: 2f 9b ff ff cmpwi cr7,r27,-1
ffc103c8: 40 9e ff d8 bne+ cr7,ffc103a0 <rtems_string_to_long_long+0xe0><== NEVER TAKEN
ffc103cc: 4b ff ff 98 b ffc10364 <rtems_string_to_long_long+0xa4>
ffc104d8 <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
ffc104d8: 94 21 ff d8 stwu r1,-40(r1)
ffc104dc: 7c 08 02 a6 mflr r0
ffc104e0: 93 a1 00 1c stw r29,28(r1)
unsigned long result;
char *end;
if ( !n )
ffc104e4: 7c 9d 23 79 mr. r29,r4
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
ffc104e8: 93 81 00 18 stw r28,24(r1)
ffc104ec: 7c dc 33 78 mr r28,r6
ffc104f0: 93 c1 00 20 stw r30,32(r1)
ffc104f4: 7c be 2b 78 mr r30,r5
ffc104f8: 93 e1 00 24 stw r31,36(r1)
ffc104fc: 7c 7f 1b 78 mr r31,r3
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc10500: 38 60 00 09 li r3,9
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
ffc10504: 90 01 00 2c stw r0,44(r1)
unsigned long result;
char *end;
if ( !n )
ffc10508: 41 82 00 64 beq- ffc1056c <rtems_string_to_unsigned_char+0x94>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc1050c: 48 00 29 a1 bl ffc12eac <__errno>
ffc10510: 38 00 00 00 li r0,0
ffc10514: 90 03 00 00 stw r0,0(r3)
*n = 0;
result = strtoul( s, &end, base );
ffc10518: 7f 85 e3 78 mr r5,r28
ffc1051c: 7f e3 fb 78 mr r3,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc10520: 98 1d 00 00 stb r0,0(r29)
result = strtoul( s, &end, base );
ffc10524: 38 81 00 08 addi r4,r1,8
ffc10528: 48 00 5e e5 bl ffc1640c <strtoul>
if ( endptr )
ffc1052c: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
ffc10530: 7c 7c 1b 78 mr r28,r3
if ( endptr )
ffc10534: 41 9e 00 a4 beq- cr7,ffc105d8 <rtems_string_to_unsigned_char+0x100>
*endptr = end;
ffc10538: 80 01 00 08 lwz r0,8(r1)
ffc1053c: 90 1e 00 00 stw r0,0(r30)
if ( end == s )
ffc10540: 7f 9f 00 00 cmpw cr7,r31,r0
return RTEMS_NOT_DEFINED;
ffc10544: 38 60 00 0b li r3,11
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc10548: 41 9e 00 24 beq- cr7,ffc1056c <rtems_string_to_unsigned_char+0x94>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc1054c: 48 00 29 61 bl ffc12eac <__errno>
ffc10550: 80 03 00 00 lwz r0,0(r3)
ffc10554: 2f 80 00 22 cmpwi cr7,r0,34
ffc10558: 41 9e 00 34 beq- cr7,ffc1058c <rtems_string_to_unsigned_char+0xb4><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
ffc1055c: 2b 9c 00 ff cmplwi cr7,r28,255
ffc10560: 41 9d 00 48 bgt- cr7,ffc105a8 <rtems_string_to_unsigned_char+0xd0><== NEVER TAKEN
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
ffc10564: 9b 9d 00 00 stb r28,0(r29)
return RTEMS_SUCCESSFUL;
ffc10568: 38 60 00 00 li r3,0
}
ffc1056c: 80 01 00 2c lwz r0,44(r1)
ffc10570: 83 81 00 18 lwz r28,24(r1)
ffc10574: 7c 08 03 a6 mtlr r0
ffc10578: 83 a1 00 1c lwz r29,28(r1)
ffc1057c: 83 c1 00 20 lwz r30,32(r1)
ffc10580: 83 e1 00 24 lwz r31,36(r1)
ffc10584: 38 21 00 28 addi r1,r1,40
ffc10588: 4e 80 00 20 blr
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
ffc1058c: 39 3c ff ff addi r9,r28,-1 <== NOT EXECUTED
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc10590: 38 00 ff fd li r0,-3 <== NOT EXECUTED
ffc10594: 7f 89 00 40 cmplw cr7,r9,r0 <== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
ffc10598: 38 60 00 0a li r3,10 <== NOT EXECUTED
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc1059c: 41 bd ff d0 bgt- cr7,ffc1056c <rtems_string_to_unsigned_char+0x94><== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
ffc105a0: 2b 9c 00 ff cmplwi cr7,r28,255 <== NOT EXECUTED
ffc105a4: 40 bd ff c0 ble- cr7,ffc10564 <rtems_string_to_unsigned_char+0x8c><== NOT EXECUTED
errno = ERANGE;
ffc105a8: 48 00 29 05 bl ffc12eac <__errno> <== NOT EXECUTED
ffc105ac: 38 00 00 22 li r0,34 <== NOT EXECUTED
ffc105b0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
ffc105b4: 38 60 00 0a li r3,10 <== NOT EXECUTED
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
ffc105b8: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED
ffc105bc: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED
ffc105c0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc105c4: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED
ffc105c8: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED
ffc105cc: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED
ffc105d0: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED
ffc105d4: 4e 80 00 20 blr <== NOT EXECUTED
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
ffc105d8: 80 01 00 08 lwz r0,8(r1)
ffc105dc: 4b ff ff 64 b ffc10540 <rtems_string_to_unsigned_char+0x68>
ffc105e0 <rtems_string_to_unsigned_int>:
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
ffc105e0: 94 21 ff d8 stwu r1,-40(r1)
ffc105e4: 7c 08 02 a6 mflr r0
ffc105e8: 93 a1 00 1c stw r29,28(r1)
unsigned long result;
char *end;
if ( !n )
ffc105ec: 7c 9d 23 79 mr. r29,r4
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
ffc105f0: 93 81 00 18 stw r28,24(r1)
ffc105f4: 7c dc 33 78 mr r28,r6
ffc105f8: 93 c1 00 20 stw r30,32(r1)
ffc105fc: 7c be 2b 78 mr r30,r5
ffc10600: 93 e1 00 24 stw r31,36(r1)
ffc10604: 7c 7f 1b 78 mr r31,r3
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc10608: 38 60 00 09 li r3,9
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
ffc1060c: 90 01 00 2c stw r0,44(r1)
unsigned long result;
char *end;
if ( !n )
ffc10610: 41 82 00 5c beq- ffc1066c <rtems_string_to_unsigned_int+0x8c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc10614: 48 00 28 99 bl ffc12eac <__errno>
ffc10618: 38 00 00 00 li r0,0
ffc1061c: 90 03 00 00 stw r0,0(r3)
*n = 0;
result = strtoul( s, &end, base );
ffc10620: 7f 85 e3 78 mr r5,r28
ffc10624: 7f e3 fb 78 mr r3,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc10628: 90 1d 00 00 stw r0,0(r29)
result = strtoul( s, &end, base );
ffc1062c: 38 81 00 08 addi r4,r1,8
ffc10630: 48 00 5d dd bl ffc1640c <strtoul>
if ( endptr )
ffc10634: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
ffc10638: 7c 7c 1b 78 mr r28,r3
if ( endptr )
ffc1063c: 41 9e 00 84 beq- cr7,ffc106c0 <rtems_string_to_unsigned_int+0xe0>
*endptr = end;
ffc10640: 80 01 00 08 lwz r0,8(r1)
ffc10644: 90 1e 00 00 stw r0,0(r30)
if ( end == s )
ffc10648: 7f 9f 00 00 cmpw cr7,r31,r0
return RTEMS_NOT_DEFINED;
ffc1064c: 38 60 00 0b li r3,11
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc10650: 41 9e 00 1c beq- cr7,ffc1066c <rtems_string_to_unsigned_int+0x8c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc10654: 48 00 28 59 bl ffc12eac <__errno>
ffc10658: 80 03 00 00 lwz r0,0(r3)
ffc1065c: 2f 80 00 22 cmpwi cr7,r0,34
ffc10660: 41 9e 00 2c beq- cr7,ffc1068c <rtems_string_to_unsigned_int+0xac>
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
ffc10664: 93 9d 00 00 stw r28,0(r29)
return RTEMS_SUCCESSFUL;
ffc10668: 38 60 00 00 li r3,0
}
ffc1066c: 80 01 00 2c lwz r0,44(r1)
ffc10670: 83 81 00 18 lwz r28,24(r1)
ffc10674: 7c 08 03 a6 mtlr r0
ffc10678: 83 a1 00 1c lwz r29,28(r1)
ffc1067c: 83 c1 00 20 lwz r30,32(r1)
ffc10680: 83 e1 00 24 lwz r31,36(r1)
ffc10684: 38 21 00 28 addi r1,r1,40
ffc10688: 4e 80 00 20 blr
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
ffc1068c: 39 3c ff ff addi r9,r28,-1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc10690: 38 00 ff fd li r0,-3
ffc10694: 7f 89 00 40 cmplw cr7,r9,r0
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
ffc10698: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc1069c: 40 9d ff c8 ble+ cr7,ffc10664 <rtems_string_to_unsigned_int+0x84><== NEVER TAKEN
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
ffc106a0: 80 01 00 2c lwz r0,44(r1)
ffc106a4: 83 81 00 18 lwz r28,24(r1)
ffc106a8: 7c 08 03 a6 mtlr r0
ffc106ac: 83 a1 00 1c lwz r29,28(r1)
ffc106b0: 83 c1 00 20 lwz r30,32(r1)
ffc106b4: 83 e1 00 24 lwz r31,36(r1)
ffc106b8: 38 21 00 28 addi r1,r1,40
ffc106bc: 4e 80 00 20 blr
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
ffc106c0: 80 01 00 08 lwz r0,8(r1)
ffc106c4: 4b ff ff 84 b ffc10648 <rtems_string_to_unsigned_int+0x68>
ffc107bc <rtems_string_to_unsigned_long>:
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
ffc107bc: 94 21 ff d8 stwu r1,-40(r1)
ffc107c0: 7c 08 02 a6 mflr r0
ffc107c4: 93 a1 00 1c stw r29,28(r1)
unsigned long result;
char *end;
if ( !n )
ffc107c8: 7c 9d 23 79 mr. r29,r4
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
ffc107cc: 93 81 00 18 stw r28,24(r1)
ffc107d0: 7c dc 33 78 mr r28,r6
ffc107d4: 93 c1 00 20 stw r30,32(r1)
ffc107d8: 7c be 2b 78 mr r30,r5
ffc107dc: 93 e1 00 24 stw r31,36(r1)
ffc107e0: 7c 7f 1b 78 mr r31,r3
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc107e4: 38 60 00 09 li r3,9
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
ffc107e8: 90 01 00 2c stw r0,44(r1)
unsigned long result;
char *end;
if ( !n )
ffc107ec: 41 82 00 5c beq- ffc10848 <rtems_string_to_unsigned_long+0x8c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc107f0: 48 00 26 bd bl ffc12eac <__errno>
ffc107f4: 38 00 00 00 li r0,0
ffc107f8: 90 03 00 00 stw r0,0(r3)
*n = 0;
result = strtoul( s, &end, base );
ffc107fc: 7f 85 e3 78 mr r5,r28
ffc10800: 7f e3 fb 78 mr r3,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc10804: 90 1d 00 00 stw r0,0(r29)
result = strtoul( s, &end, base );
ffc10808: 38 81 00 08 addi r4,r1,8
ffc1080c: 48 00 5c 01 bl ffc1640c <strtoul>
if ( endptr )
ffc10810: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
ffc10814: 7c 7c 1b 78 mr r28,r3
if ( endptr )
ffc10818: 41 9e 00 84 beq- cr7,ffc1089c <rtems_string_to_unsigned_long+0xe0>
*endptr = end;
ffc1081c: 80 01 00 08 lwz r0,8(r1)
ffc10820: 90 1e 00 00 stw r0,0(r30)
if ( end == s )
ffc10824: 7f 9f 00 00 cmpw cr7,r31,r0
return RTEMS_NOT_DEFINED;
ffc10828: 38 60 00 0b li r3,11
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc1082c: 41 9e 00 1c beq- cr7,ffc10848 <rtems_string_to_unsigned_long+0x8c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc10830: 48 00 26 7d bl ffc12eac <__errno>
ffc10834: 80 03 00 00 lwz r0,0(r3)
ffc10838: 2f 80 00 22 cmpwi cr7,r0,34
ffc1083c: 41 9e 00 2c beq- cr7,ffc10868 <rtems_string_to_unsigned_long+0xac>
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
ffc10840: 93 9d 00 00 stw r28,0(r29)
return RTEMS_SUCCESSFUL;
ffc10844: 38 60 00 00 li r3,0
}
ffc10848: 80 01 00 2c lwz r0,44(r1)
ffc1084c: 83 81 00 18 lwz r28,24(r1)
ffc10850: 7c 08 03 a6 mtlr r0
ffc10854: 83 a1 00 1c lwz r29,28(r1)
ffc10858: 83 c1 00 20 lwz r30,32(r1)
ffc1085c: 83 e1 00 24 lwz r31,36(r1)
ffc10860: 38 21 00 28 addi r1,r1,40
ffc10864: 4e 80 00 20 blr
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
ffc10868: 39 3c ff ff addi r9,r28,-1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc1086c: 38 00 ff fd li r0,-3
ffc10870: 7f 89 00 40 cmplw cr7,r9,r0
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
ffc10874: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc10878: 40 9d ff c8 ble+ cr7,ffc10840 <rtems_string_to_unsigned_long+0x84><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
ffc1087c: 80 01 00 2c lwz r0,44(r1)
ffc10880: 83 81 00 18 lwz r28,24(r1)
ffc10884: 7c 08 03 a6 mtlr r0
ffc10888: 83 a1 00 1c lwz r29,28(r1)
ffc1088c: 83 c1 00 20 lwz r30,32(r1)
ffc10890: 83 e1 00 24 lwz r31,36(r1)
ffc10894: 38 21 00 28 addi r1,r1,40
ffc10898: 4e 80 00 20 blr
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
ffc1089c: 80 01 00 08 lwz r0,8(r1)
ffc108a0: 4b ff ff 84 b ffc10824 <rtems_string_to_unsigned_long+0x68>
ffc106c8 <rtems_string_to_unsigned_long_long>:
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
ffc106c8: 94 21 ff d0 stwu r1,-48(r1)
ffc106cc: 7c 08 02 a6 mflr r0
ffc106d0: 93 a1 00 24 stw r29,36(r1)
unsigned long long result;
char *end;
if ( !n )
ffc106d4: 7c 9d 23 79 mr. r29,r4
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
ffc106d8: 93 81 00 20 stw r28,32(r1)
ffc106dc: 7c dc 33 78 mr r28,r6
ffc106e0: 93 c1 00 28 stw r30,40(r1)
ffc106e4: 7c be 2b 78 mr r30,r5
ffc106e8: 93 e1 00 2c stw r31,44(r1)
ffc106ec: 7c 7f 1b 78 mr r31,r3
unsigned long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
ffc106f0: 38 60 00 09 li r3,9
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
ffc106f4: 90 01 00 34 stw r0,52(r1)
ffc106f8: 93 61 00 1c stw r27,28(r1)
unsigned long long result;
char *end;
if ( !n )
ffc106fc: 41 82 00 70 beq- ffc1076c <rtems_string_to_unsigned_long_long+0xa4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc10700: 48 00 27 ad bl ffc12eac <__errno>
ffc10704: 38 00 00 00 li r0,0
*n = 0;
ffc10708: 39 20 00 00 li r9,0
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
ffc1070c: 90 03 00 00 stw r0,0(r3)
*n = 0;
ffc10710: 39 40 00 00 li r10,0
ffc10714: 91 3d 00 00 stw r9,0(r29)
result = strtoull( s, &end, base );
ffc10718: 7f 85 e3 78 mr r5,r28
ffc1071c: 7f e3 fb 78 mr r3,r31
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
ffc10720: 91 5d 00 04 stw r10,4(r29)
result = strtoull( s, &end, base );
ffc10724: 38 81 00 08 addi r4,r1,8
ffc10728: 48 00 5d 05 bl ffc1642c <strtoull>
if ( endptr )
ffc1072c: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoull( s, &end, base );
ffc10730: 7c 9c 23 78 mr r28,r4
ffc10734: 7c 7b 1b 78 mr r27,r3
if ( endptr )
ffc10738: 41 9e 00 7c beq- cr7,ffc107b4 <rtems_string_to_unsigned_long_long+0xec>
*endptr = end;
ffc1073c: 80 01 00 08 lwz r0,8(r1)
ffc10740: 90 1e 00 00 stw r0,0(r30)
if ( end == s )
ffc10744: 7f 9f 00 00 cmpw cr7,r31,r0
return RTEMS_NOT_DEFINED;
ffc10748: 38 60 00 0b li r3,11
result = strtoull( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
ffc1074c: 41 9e 00 20 beq- cr7,ffc1076c <rtems_string_to_unsigned_long_long+0xa4>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc10750: 48 00 27 5d bl ffc12eac <__errno>
ffc10754: 80 03 00 00 lwz r0,0(r3)
ffc10758: 2f 80 00 22 cmpwi cr7,r0,34
ffc1075c: 41 9e 00 34 beq- cr7,ffc10790 <rtems_string_to_unsigned_long_long+0xc8>
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
ffc10760: 93 7d 00 00 stw r27,0(r29)
return RTEMS_SUCCESSFUL;
ffc10764: 38 60 00 00 li r3,0
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
ffc10768: 93 9d 00 04 stw r28,4(r29)
return RTEMS_SUCCESSFUL;
}
ffc1076c: 80 01 00 34 lwz r0,52(r1)
ffc10770: 83 61 00 1c lwz r27,28(r1)
ffc10774: 7c 08 03 a6 mtlr r0
ffc10778: 83 81 00 20 lwz r28,32(r1)
ffc1077c: 83 a1 00 24 lwz r29,36(r1)
ffc10780: 83 c1 00 28 lwz r30,40(r1)
ffc10784: 83 e1 00 2c lwz r31,44(r1)
ffc10788: 38 21 00 30 addi r1,r1,48
ffc1078c: 4e 80 00 20 blr
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
ffc10790: 31 5c ff ff addic r10,r28,-1
ffc10794: 7d 3b 01 d4 addme r9,r27
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc10798: 2f 89 ff ff cmpwi cr7,r9,-1
ffc1079c: 40 9e ff c4 bne+ cr7,ffc10760 <rtems_string_to_unsigned_long_long+0x98><== NEVER TAKEN
ffc107a0: 38 00 ff fd li r0,-3
ffc107a4: 7f 8a 00 40 cmplw cr7,r10,r0
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
ffc107a8: 38 60 00 0a li r3,10
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ffc107ac: 40 9d ff b4 ble+ cr7,ffc10760 <rtems_string_to_unsigned_long_long+0x98><== NEVER TAKEN
ffc107b0: 4b ff ff bc b ffc1076c <rtems_string_to_unsigned_long_long+0xa4>
errno = 0;
*n = 0;
result = strtoull( s, &end, base );
if ( endptr )
ffc107b4: 80 01 00 08 lwz r0,8(r1)
ffc107b8: 4b ff ff 8c b ffc10744 <rtems_string_to_unsigned_long_long+0x7c>
ffc043ec <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
ffc043ec: 94 21 fe 28 stwu r1,-472(r1)
ffc043f0: 7c 08 02 a6 mflr r0
ffc043f4: 92 e1 01 b4 stw r23,436(r1)
ffc043f8: 90 01 01 dc stw r0,476(r1)
ffc043fc: 93 01 01 b8 stw r24,440(r1)
ffc04400: 7c 78 1b 78 mr r24,r3
ffc04404: 93 81 01 c8 stw r28,456(r1)
ffc04408: 7c bc 2b 78 mr r28,r5
ffc0440c: 93 a1 01 cc stw r29,460(r1)
ffc04410: 7c 9d 23 78 mr r29,r4
ffc04414: 92 01 01 98 stw r16,408(r1)
ffc04418: 92 21 01 9c stw r17,412(r1)
ffc0441c: 92 41 01 a0 stw r18,416(r1)
ffc04420: 92 61 01 a4 stw r19,420(r1)
ffc04424: 92 81 01 a8 stw r20,424(r1)
ffc04428: 92 a1 01 ac stw r21,428(r1)
ffc0442c: 92 c1 01 b0 stw r22,432(r1)
ffc04430: 93 21 01 bc stw r25,444(r1)
ffc04434: 93 41 01 c0 stw r26,448(r1)
ffc04438: 93 61 01 c4 stw r27,452(r1)
ffc0443c: 93 c1 01 d0 stw r30,464(r1)
ffc04440: 93 e1 01 d4 stw r31,468(r1)
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
ffc04444: 48 01 33 2d bl ffc17770 <strlen>
ffc04448: 7c 64 1b 78 mr r4,r3
ffc0444c: 38 a0 00 00 li r5,0
ffc04450: 7f 03 c3 78 mr r3,r24
ffc04454: 38 c1 00 0c addi r6,r1,12
ffc04458: 38 e0 00 00 li r7,0
ffc0445c: 48 00 0e b1 bl ffc0530c <rtems_filesystem_evaluate_path>
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
ffc04460: 7c 77 1b 79 mr. r23,r3
ffc04464: 40 82 01 dc bne- ffc04640 <rtems_tarfs_load+0x254>
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
ffc04468: 80 01 00 18 lwz r0,24(r1)
ffc0446c: 3d 20 ff c2 lis r9,-62
ffc04470: 39 29 40 38 addi r9,r9,16440
ffc04474: 7f 80 48 00 cmpw cr7,r0,r9
ffc04478: 3a 60 00 00 li r19,0
ffc0447c: 40 9e 01 b0 bne- cr7,ffc0462c <rtems_tarfs_load+0x240>
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
ffc04480: 3b f3 02 00 addi r31,r19,512
ffc04484: 7f 9f e0 40 cmplw cr7,r31,r28
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
ffc04488: 3f 40 ff c2 lis r26,-62
ffc0448c: 3b 5a 40 80 addi r26,r26,16512
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
ffc04490: 3b c1 00 34 addi r30,r1,52
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
ffc04494: 3a a1 00 20 addi r21,r1,32
ffc04498: 3a c1 00 08 addi r22,r1,8
* - 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) {
strcpy(full_filename, mountpoint);
ffc0449c: 3b 21 00 98 addi r25,r1,152
if (full_filename[strlen(full_filename)-1] != '/')
strcat(full_filename, "/");
ffc044a0: 3a 80 2f 00 li r20,12032
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
ffc044a4: 41 9d 00 98 bgt- cr7,ffc0453c <rtems_tarfs_load+0x150> <== NEVER TAKEN
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
ffc044a8: 7e 7d 9a 14 add r19,r29,r19
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
ffc044ac: 38 73 01 01 addi r3,r19,257
ffc044b0: 7f 44 d3 78 mr r4,r26
ffc044b4: 38 a0 00 05 li r5,5
ffc044b8: 48 01 33 5d bl ffc17814 <strncmp>
ffc044bc: 7c 7b 1b 79 mr. r27,r3
ffc044c0: 40 82 00 7c bne- ffc0453c <rtems_tarfs_load+0x150>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
ffc044c4: 38 a0 00 63 li r5,99
ffc044c8: 7e 64 9b 78 mr r4,r19
ffc044cc: 7f c3 f3 78 mr r3,r30
ffc044d0: 48 01 34 9d bl ffc1796c <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
ffc044d4: 9b 61 00 97 stb r27,151(r1)
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
ffc044d8: 38 80 00 08 li r4,8
ffc044dc: 38 73 00 64 addi r3,r19,100
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
ffc044e0: 8a 33 00 9c lbz r17,156(r19)
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
ffc044e4: 48 00 9e 1d bl ffc0e300 <_rtems_octal2ulong>
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
ffc044e8: 38 80 00 0c li r4,12
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);
ffc044ec: 7c 72 1b 78 mr r18,r3
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
ffc044f0: 38 73 00 7c addi r3,r19,124
ffc044f4: 48 00 9e 0d bl ffc0e300 <_rtems_octal2ulong>
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
ffc044f8: 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);
ffc044fc: 7c 7b 1b 78 mr r27,r3
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
ffc04500: 38 73 00 94 addi r3,r19,148
ffc04504: 48 00 9d fd bl ffc0e300 <_rtems_octal2ulong>
ffc04508: 7c 70 1b 78 mr r16,r3
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
ffc0450c: 7e 63 9b 78 mr r3,r19
ffc04510: 48 00 a3 55 bl ffc0e864 <_rtems_tar_header_checksum>
ffc04514: 7f 83 80 00 cmpw cr7,r3,r16
ffc04518: 40 9e 00 24 bne- cr7,ffc0453c <rtems_tarfs_load+0x150> <== 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) {
ffc0451c: 2f 91 00 35 cmpwi cr7,r17,53
ffc04520: 41 9e 00 c4 beq- cr7,ffc045e4 <rtems_tarfs_load+0x1f8>
* 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) {
ffc04524: 2f 91 00 30 cmpwi cr7,r17,48
ffc04528: 41 9e 00 68 beq- cr7,ffc04590 <rtems_tarfs_load+0x1a4>
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
ffc0452c: 7f f3 fb 78 mr r19,r31
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
ffc04530: 3b f3 02 00 addi r31,r19,512
ffc04534: 7f 9f e0 40 cmplw cr7,r31,r28
ffc04538: 40 9d ff 70 ble+ cr7,ffc044a8 <rtems_tarfs_load+0xbc> <== ALWAYS TAKEN
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
ffc0453c: 80 01 01 dc lwz r0,476(r1)
ffc04540: 7e e3 bb 78 mr r3,r23
ffc04544: 82 01 01 98 lwz r16,408(r1)
ffc04548: 7c 08 03 a6 mtlr r0
ffc0454c: 82 21 01 9c lwz r17,412(r1)
ffc04550: 82 41 01 a0 lwz r18,416(r1)
ffc04554: 82 61 01 a4 lwz r19,420(r1)
ffc04558: 82 81 01 a8 lwz r20,424(r1)
ffc0455c: 82 a1 01 ac lwz r21,428(r1)
ffc04560: 82 c1 01 b0 lwz r22,432(r1)
ffc04564: 82 e1 01 b4 lwz r23,436(r1)
ffc04568: 83 01 01 b8 lwz r24,440(r1)
ffc0456c: 83 21 01 bc lwz r25,444(r1)
ffc04570: 83 41 01 c0 lwz r26,448(r1)
ffc04574: 83 61 01 c4 lwz r27,452(r1)
ffc04578: 83 81 01 c8 lwz r28,456(r1)
ffc0457c: 83 a1 01 cc lwz r29,460(r1)
ffc04580: 83 c1 01 d0 lwz r30,464(r1)
ffc04584: 83 e1 01 d4 lwz r31,468(r1)
ffc04588: 38 21 01 d8 addi r1,r1,472
ffc0458c: 4e 80 00 20 blr
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
ffc04590: 80 01 00 0c lwz r0,12(r1)
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
ffc04594: 7f c3 f3 78 mr r3,r30
ffc04598: 7e a4 ab 78 mr r4,r21
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
ffc0459c: 90 01 00 20 stw r0,32(r1)
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
ffc045a0: 7e c5 b3 78 mr r5,r22
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
ffc045a4: 80 01 00 10 lwz r0,16(r1)
ffc045a8: 90 01 00 24 stw r0,36(r1)
ffc045ac: 80 01 00 14 lwz r0,20(r1)
ffc045b0: 90 01 00 28 stw r0,40(r1)
ffc045b4: 80 01 00 18 lwz r0,24(r1)
ffc045b8: 90 01 00 2c stw r0,44(r1)
ffc045bc: 80 01 00 1c lwz r0,28(r1)
ffc045c0: 90 01 00 30 stw r0,48(r1)
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
ffc045c4: 48 00 ad a9 bl ffc0f36c <IMFS_evaluate_for_make>
ffc045c8: 7c 73 1b 79 mr. r19,r3
ffc045cc: 41 82 00 7c beq- ffc04648 <rtems_tarfs_load+0x25c> <== ALWAYS TAKEN
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
}
nblocks = (((file_size) + 511) & ~511) / 512;
ffc045d0: 3b 7b 01 ff addi r27,r27,511 <== NOT EXECUTED
offset += 512 * nblocks;
ffc045d4: 57 7b 00 2c rlwinm r27,r27,0,0,22 <== NOT EXECUTED
ffc045d8: 7f fb fa 14 add r31,r27,r31 <== NOT EXECUTED
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
ffc045dc: 7f f3 fb 78 mr r19,r31
ffc045e0: 4b ff ff 50 b ffc04530 <rtems_tarfs_load+0x144>
* - 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) {
strcpy(full_filename, mountpoint);
ffc045e4: 7f 04 c3 78 mr r4,r24
ffc045e8: 7f 23 cb 78 mr r3,r25
ffc045ec: 48 01 2c b1 bl ffc1729c <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
ffc045f0: 7f 23 cb 78 mr r3,r25
ffc045f4: 48 01 31 7d bl ffc17770 <strlen>
ffc045f8: 7d 36 1a 14 add r9,r22,r3
ffc045fc: 88 09 00 8f lbz r0,143(r9)
ffc04600: 2f 80 00 2f cmpwi cr7,r0,47
ffc04604: 41 9e 00 08 beq- cr7,ffc0460c <rtems_tarfs_load+0x220> <== ALWAYS TAKEN
strcat(full_filename, "/");
ffc04608: 7e 99 1b 2e sthx r20,r25,r3 <== NOT EXECUTED
strcat(full_filename, filename);
ffc0460c: 7f c4 f3 78 mr r4,r30
ffc04610: 7f 23 cb 78 mr r3,r25
ffc04614: 48 01 2b 4d bl ffc17160 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
ffc04618: 7f 23 cb 78 mr r3,r25
ffc0461c: 38 80 01 ff li r4,511
ffc04620: 48 00 18 cd bl ffc05eec <mkdir>
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
ffc04624: 7f f3 fb 78 mr r19,r31
ffc04628: 4b ff ff 08 b ffc04530 <rtems_tarfs_load+0x144>
ffc0462c: 3d 20 ff c2 lis r9,-62
ffc04630: 39 29 47 b4 addi r9,r9,18356
ffc04634: 7f 80 48 00 cmpw cr7,r0,r9
ffc04638: 7e f3 bb 78 mr r19,r23
ffc0463c: 41 be fe 44 beq- cr7,ffc04480 <rtems_tarfs_load+0x94> <== NEVER TAKEN
return -1;
ffc04640: 3a e0 ff ff li r23,-1
ffc04644: 4b ff fe f8 b ffc0453c <rtems_tarfs_load+0x150>
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
ffc04648: 56 46 05 fe clrlwi r6,r18,23
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
ffc0464c: 80 a1 00 08 lwz r5,8(r1)
ffc04650: 7e a3 ab 78 mr r3,r21
ffc04654: 38 80 00 06 li r4,6
ffc04658: 60 c6 80 00 ori r6,r6,32768
ffc0465c: 38 e0 00 00 li r7,0
ffc04660: 48 00 a4 b9 bl ffc0eb18 <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];
ffc04664: 7c 1d fa 14 add r0,r29,r31
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
ffc04668: 93 63 00 54 stw r27,84(r3)
node->info.linearfile.direct = &tar_image[offset];
}
nblocks = (((file_size) + 511) & ~511) / 512;
ffc0466c: 3b 7b 01 ff addi r27,r27,511
offset += 512 * nblocks;
ffc04670: 57 7b 00 2c rlwinm r27,r27,0,0,22
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
ffc04674: 92 63 00 50 stw r19,80(r3)
node->info.linearfile.direct = &tar_image[offset];
}
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
ffc04678: 7f fb fa 14 add r31,r27,r31
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];
ffc0467c: 90 03 00 58 stw r0,88(r3)
ffc04680: 4b ff ff 5c b ffc045dc <rtems_tarfs_load+0x1f0>
ffc11aa4 <rtems_task_mode>:
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
ffc11aa4: 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
)
{
ffc11aa8: 7c 08 02 a6 mflr r0
ffc11aac: 94 21 ff f8 stwu r1,-8(r1)
ffc11ab0: 90 01 00 0c stw r0,12(r1)
ffc11ab4: 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;
ffc11ab8: 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 )
ffc11abc: 41 82 01 34 beq- ffc11bf0 <rtems_task_mode+0x14c>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
ffc11ac0: 3c c0 00 00 lis r6,0
ffc11ac4: 38 c6 2d 98 addi r6,r6,11672
ffc11ac8: 81 26 00 0c lwz r9,12(r6)
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 )
ffc11acc: 81 69 00 7c lwz r11,124(r9)
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
ffc11ad0: 89 09 00 74 lbz r8,116(r9)
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc11ad4: 2f 8b 00 00 cmpwi cr7,r11,0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
ffc11ad8: 81 69 01 2c lwz r11,300(r9)
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
ffc11adc: 7d 08 00 34 cntlzw r8,r8
ffc11ae0: 55 08 d9 7e rlwinm r8,r8,27,5,31
ffc11ae4: 55 07 40 2e rlwinm r7,r8,8,0,23
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc11ae8: 40 9e 01 18 bne- cr7,ffc11c00 <rtems_task_mode+0x15c>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
ffc11aec: 89 0b 00 08 lbz r8,8(r11)
#ifndef ASM
static inline uint32_t _CPU_ISR_Get_level( void )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc11af0: 39 40 00 00 li r10,0
ffc11af4: 7d 08 00 34 cntlzw r8,r8
ffc11af8: 55 08 d9 7e rlwinm r8,r8,27,5,31
ffc11afc: 55 08 50 2a rlwinm r8,r8,10,0,21
ffc11b00: 7d 07 3b 78 or r7,r8,r7
ffc11b04: 7d 40 00 a6 mfmsr r10
if (msr & MSR_EE) return 0;
ffc11b08: 55 48 8f fe rlwinm r8,r10,17,31,31
ffc11b0c: 2f 88 00 00 cmpwi cr7,r8,0
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc11b10: 70 8a 01 00 andi. r10,r4,256
ffc11b14: 7d 40 00 26 mfcr r10
ffc11b18: 55 4a ff fe rlwinm r10,r10,31,31,31
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
ffc11b1c: 7c e7 53 78 or r7,r7,r10
*previous_mode_set = old_mode;
ffc11b20: 90 e5 00 00 stw r7,0(r5)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc11b24: 41 82 00 14 beq- ffc11b38 <rtems_task_mode+0x94>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
ffc11b28: 70 08 01 00 andi. r8,r0,256
ffc11b2c: 7d 40 00 26 mfcr r10
ffc11b30: 55 4a 1f fe rlwinm r10,r10,3,31,31
ffc11b34: 99 49 00 74 stb r10,116(r9)
if ( mask & RTEMS_TIMESLICE_MASK ) {
ffc11b38: 70 8a 02 00 andi. r10,r4,512
ffc11b3c: 41 82 00 20 beq- ffc11b5c <rtems_task_mode+0xb8>
if ( _Modes_Is_timeslice(mode_set) ) {
ffc11b40: 70 0a 02 00 andi. r10,r0,512
ffc11b44: 41 82 01 54 beq- ffc11c98 <rtems_task_mode+0x1f4>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc11b48: 3d 40 00 00 lis r10,0
ffc11b4c: 81 4a 27 a0 lwz r10,10144(r10)
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
ffc11b50: 39 00 00 01 li r8,1
ffc11b54: 91 09 00 7c stw r8,124(r9)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc11b58: 91 49 00 78 stw r10,120(r9)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
ffc11b5c: 70 88 00 01 andi. r8,r4,1
ffc11b60: 41 82 00 20 beq- ffc11b80 <rtems_task_mode+0xdc>
}
static inline void _CPU_ISR_Set_level( uint32_t level )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc11b64: 39 20 00 00 li r9,0
ffc11b68: 7d 20 00 a6 mfmsr r9
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
ffc11b6c: 70 0a 00 01 andi. r10,r0,1
ffc11b70: 40 82 01 18 bne- ffc11c88 <rtems_task_mode+0x1e4>
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
__asm__ volatile (
ffc11b74: 7d 50 42 a6 mfsprg r10,0
msr |= ppc_interrupt_get_disable_mask();
ffc11b78: 7d 49 4b 78 or r9,r10,r9
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
}
_CPU_MSR_SET(msr);
ffc11b7c: 7d 20 01 24 mtmsr r9
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
ffc11b80: 70 88 04 00 andi. r8,r4,1024
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
ffc11b84: 39 40 00 00 li r10,0
if ( mask & RTEMS_ASR_MASK ) {
ffc11b88: 41 82 00 54 beq- ffc11bdc <rtems_task_mode+0x138>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
ffc11b8c: 70 09 04 00 andi. r9,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 ) {
ffc11b90: 89 2b 00 08 lbz r9,8(r11)
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
ffc11b94: 7c 00 00 26 mfcr r0
ffc11b98: 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 ) {
ffc11b9c: 7f 89 00 00 cmpw cr7,r9,r0
ffc11ba0: 41 9e 00 3c beq- cr7,ffc11bdc <rtems_task_mode+0x138>
asr->is_enabled = is_asr_enabled;
ffc11ba4: 98 0b 00 08 stb r0,8(r11)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc11ba8: 7c 00 00 a6 mfmsr r0
ffc11bac: 7d 30 42 a6 mfsprg r9,0
ffc11bb0: 7c 09 48 78 andc r9,r0,r9
ffc11bb4: 7d 20 01 24 mtmsr r9
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
ffc11bb8: 81 4b 00 18 lwz r10,24(r11)
information->signals_pending = information->signals_posted;
ffc11bbc: 81 2b 00 14 lwz r9,20(r11)
information->signals_posted = _signals;
ffc11bc0: 91 4b 00 14 stw r10,20(r11)
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
ffc11bc4: 91 2b 00 18 stw r9,24(r11)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc11bc8: 7c 00 01 24 mtmsr r0
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
ffc11bcc: 80 0b 00 14 lwz r0,20(r11)
needs_asr_dispatching = true;
ffc11bd0: 39 40 00 01 li r10,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 ) ) {
ffc11bd4: 2f 80 00 00 cmpwi cr7,r0,0
ffc11bd8: 41 9e 00 d0 beq- cr7,ffc11ca8 <rtems_task_mode+0x204>
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
ffc11bdc: 3d 20 00 00 lis r9,0
ffc11be0: 80 09 27 e8 lwz r0,10216(r9)
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
ffc11be4: 38 60 00 00 li r3,0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
ffc11be8: 2f 80 00 03 cmpwi cr7,r0,3
ffc11bec: 41 9e 00 58 beq- cr7,ffc11c44 <rtems_task_mode+0x1a0>
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
ffc11bf0: 80 01 00 0c lwz r0,12(r1)
ffc11bf4: 38 21 00 08 addi r1,r1,8
ffc11bf8: 7c 08 03 a6 mtlr r0
ffc11bfc: 4e 80 00 20 blr
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
ffc11c00: 89 0b 00 08 lbz r8,8(r11)
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
ffc11c04: 60 e7 02 00 ori r7,r7,512
#ifndef ASM
static inline uint32_t _CPU_ISR_Get_level( void )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc11c08: 39 40 00 00 li r10,0
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
ffc11c0c: 7d 08 00 34 cntlzw r8,r8
ffc11c10: 55 08 d9 7e rlwinm r8,r8,27,5,31
ffc11c14: 55 08 50 2a rlwinm r8,r8,10,0,21
ffc11c18: 7d 07 3b 78 or r7,r8,r7
ffc11c1c: 7d 40 00 a6 mfmsr r10
if (msr & MSR_EE) return 0;
ffc11c20: 55 48 8f fe rlwinm r8,r10,17,31,31
ffc11c24: 2f 88 00 00 cmpwi cr7,r8,0
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc11c28: 70 8a 01 00 andi. r10,r4,256
ffc11c2c: 7d 40 00 26 mfcr r10
ffc11c30: 55 4a ff fe rlwinm r10,r10,31,31,31
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
ffc11c34: 7c e7 53 78 or r7,r7,r10
*previous_mode_set = old_mode;
ffc11c38: 90 e5 00 00 stw r7,0(r5)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc11c3c: 41 a2 fe fc beq- ffc11b38 <rtems_task_mode+0x94>
ffc11c40: 4b ff fe e8 b ffc11b28 <rtems_task_mode+0x84>
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( are_signals_pending ||
ffc11c44: 2f 8a 00 00 cmpwi cr7,r10,0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
ffc11c48: 81 26 00 0c lwz r9,12(r6)
if ( are_signals_pending ||
ffc11c4c: 40 9e 00 1c bne- cr7,ffc11c68 <rtems_task_mode+0x1c4>
ffc11c50: 80 06 00 10 lwz r0,16(r6)
ffc11c54: 7f 89 00 00 cmpw cr7,r9,r0
ffc11c58: 41 be ff 98 beq- cr7,ffc11bf0 <rtems_task_mode+0x14c>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
ffc11c5c: 88 09 00 74 lbz r0,116(r9)
ffc11c60: 2f 80 00 00 cmpwi cr7,r0,0
ffc11c64: 41 be ff 8c beq- cr7,ffc11bf0 <rtems_task_mode+0x14c> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
ffc11c68: 38 00 00 01 li r0,1
ffc11c6c: 98 06 00 18 stb r0,24(r6)
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
ffc11c70: 4b ff 9e 8d bl ffc0bafc <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
}
ffc11c74: 80 01 00 0c lwz r0,12(r1)
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
ffc11c78: 38 60 00 00 li r3,0
}
ffc11c7c: 7c 08 03 a6 mtlr r0
ffc11c80: 38 21 00 08 addi r1,r1,8
ffc11c84: 4e 80 00 20 blr
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
__asm__ volatile (
ffc11c88: 7d 50 42 a6 mfsprg r10,0
_CPU_MSR_GET(msr);
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
msr |= ppc_interrupt_get_disable_mask();
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
ffc11c8c: 7d 29 50 78 andc r9,r9,r10
}
_CPU_MSR_SET(msr);
ffc11c90: 7d 20 01 24 mtmsr r9
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
ffc11c94: 4b ff fe ec b ffc11b80 <rtems_task_mode+0xdc>
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
ffc11c98: 70 88 00 01 andi. r8,r4,1
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
ffc11c9c: 91 49 00 7c stw r10,124(r9)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
ffc11ca0: 41 a2 fe e0 beq- ffc11b80 <rtems_task_mode+0xdc>
ffc11ca4: 4b ff fe c0 b ffc11b64 <rtems_task_mode+0xc0>
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
ffc11ca8: 39 40 00 00 li r10,0
ffc11cac: 4b ff ff 30 b ffc11bdc <rtems_task_mode+0x138>
ffc0e9e4 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
ffc0e9e4: 7d 80 00 26 mfcr r12
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0e9e8: 2e 04 00 00 cmpwi cr4,r4,0
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
ffc0e9ec: 94 21 ff d8 stwu r1,-40(r1)
ffc0e9f0: 7c 08 02 a6 mflr r0
ffc0e9f4: 93 c1 00 20 stw r30,32(r1)
ffc0e9f8: 7c be 2b 78 mr r30,r5
ffc0e9fc: 93 e1 00 24 stw r31,36(r1)
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0ea00: 7c 9f 23 78 mr r31,r4
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
ffc0ea04: 90 01 00 2c stw r0,44(r1)
ffc0ea08: 91 81 00 1c stw r12,28(r1)
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0ea0c: 41 92 00 18 beq- cr4,ffc0ea24 <rtems_task_set_priority+0x40>
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 ) );
ffc0ea10: 3d 20 00 00 lis r9,0
ffc0ea14: 89 29 27 04 lbz r9,9988(r9)
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
ffc0ea18: 38 00 00 13 li r0,19
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
ffc0ea1c: 7f 84 48 40 cmplw cr7,r4,r9
ffc0ea20: 41 9d 00 60 bgt- cr7,ffc0ea80 <rtems_task_set_priority+0x9c>
if ( !old_priority )
ffc0ea24: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
ffc0ea28: 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 )
ffc0ea2c: 41 9e 00 54 beq- cr7,ffc0ea80 <rtems_task_set_priority+0x9c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
ffc0ea30: 38 81 00 08 addi r4,r1,8
ffc0ea34: 48 00 2c f5 bl ffc11728 <_Thread_Get>
switch ( location ) {
ffc0ea38: 80 01 00 08 lwz r0,8(r1)
ffc0ea3c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ea40: 40 9e 00 64 bne- cr7,ffc0eaa4 <rtems_task_set_priority+0xc0>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
ffc0ea44: 80 03 00 14 lwz r0,20(r3)
ffc0ea48: 90 1e 00 00 stw r0,0(r30)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
ffc0ea4c: 41 92 00 2c beq- cr4,ffc0ea78 <rtems_task_set_priority+0x94>
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
ffc0ea50: 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;
ffc0ea54: 93 e3 00 18 stw r31,24(r3)
if ( the_thread->resource_count == 0 ||
ffc0ea58: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ea5c: 41 9e 00 10 beq- cr7,ffc0ea6c <rtems_task_set_priority+0x88>
ffc0ea60: 80 03 00 14 lwz r0,20(r3)
ffc0ea64: 7f 9f 00 40 cmplw cr7,r31,r0
ffc0ea68: 40 9c 00 10 bge- cr7,ffc0ea78 <rtems_task_set_priority+0x94><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
ffc0ea6c: 7f e4 fb 78 mr r4,r31
ffc0ea70: 38 a0 00 00 li r5,0
ffc0ea74: 48 00 26 4d bl ffc110c0 <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
ffc0ea78: 48 00 2c 91 bl ffc11708 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0ea7c: 38 00 00 00 li r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0ea80: 7c 03 03 78 mr r3,r0
ffc0ea84: 80 01 00 2c lwz r0,44(r1)
ffc0ea88: 81 81 00 1c lwz r12,28(r1)
ffc0ea8c: 7c 08 03 a6 mtlr r0
ffc0ea90: 83 c1 00 20 lwz r30,32(r1)
ffc0ea94: 83 e1 00 24 lwz r31,36(r1)
ffc0ea98: 7d 80 81 20 mtcrf 8,r12
ffc0ea9c: 38 21 00 28 addi r1,r1,40
ffc0eaa0: 4e 80 00 20 blr
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0eaa4: 38 00 00 04 li r0,4
}
ffc0eaa8: 81 81 00 1c lwz r12,28(r1)
ffc0eaac: 7c 03 03 78 mr r3,r0
ffc0eab0: 80 01 00 2c lwz r0,44(r1)
ffc0eab4: 83 c1 00 20 lwz r30,32(r1)
ffc0eab8: 7d 80 81 20 mtcrf 8,r12
ffc0eabc: 7c 08 03 a6 mtlr r0
ffc0eac0: 83 e1 00 24 lwz r31,36(r1)
ffc0eac4: 38 21 00 28 addi r1,r1,40
ffc0eac8: 4e 80 00 20 blr
ffc0a6d4 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
ffc0a6d4: 94 21 ff e0 stwu r1,-32(r1)
ffc0a6d8: 7c 08 02 a6 mflr r0
ffc0a6dc: 93 e1 00 1c stw r31,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
ffc0a6e0: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
ffc0a6e4: 90 01 00 24 stw r0,36(r1)
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
ffc0a6e8: 38 00 00 09 li r0,9
{
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
ffc0a6ec: 41 82 00 58 beq- ffc0a744 <rtems_task_variable_delete+0x70>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
ffc0a6f0: 38 81 00 08 addi r4,r1,8
ffc0a6f4: 48 00 2a 89 bl ffc0d17c <_Thread_Get>
switch (location) {
ffc0a6f8: 80 01 00 08 lwz r0,8(r1)
ffc0a6fc: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a700: 40 9e 00 5c bne- cr7,ffc0a75c <rtems_task_variable_delete+0x88>
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
ffc0a704: 81 23 01 38 lwz r9,312(r3)
while (tvp) {
ffc0a708: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a70c: 41 9e 00 30 beq- cr7,ffc0a73c <rtems_task_variable_delete+0x68>
if (tvp->ptr == ptr) {
ffc0a710: 80 09 00 04 lwz r0,4(r9)
ffc0a714: 7f 80 f8 00 cmpw cr7,r0,r31
ffc0a718: 40 be 00 18 bne+ cr7,ffc0a730 <rtems_task_variable_delete+0x5c>
ffc0a71c: 48 00 00 88 b ffc0a7a4 <rtems_task_variable_delete+0xd0>
ffc0a720: 80 04 00 04 lwz r0,4(r4)
ffc0a724: 7f 80 f8 00 cmpw cr7,r0,r31
ffc0a728: 41 9e 00 50 beq- cr7,ffc0a778 <rtems_task_variable_delete+0xa4>
ffc0a72c: 7c 89 23 78 mr r9,r4
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
ffc0a730: 80 89 00 00 lwz r4,0(r9)
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
ffc0a734: 2f 84 00 00 cmpwi cr7,r4,0
ffc0a738: 40 9e ff e8 bne+ cr7,ffc0a720 <rtems_task_variable_delete+0x4c><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
ffc0a73c: 48 00 2a 21 bl ffc0d15c <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
ffc0a740: 38 00 00 09 li r0,9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0a744: 7c 03 03 78 mr r3,r0
ffc0a748: 80 01 00 24 lwz r0,36(r1)
ffc0a74c: 83 e1 00 1c lwz r31,28(r1)
ffc0a750: 38 21 00 20 addi r1,r1,32
ffc0a754: 7c 08 03 a6 mtlr r0
ffc0a758: 4e 80 00 20 blr
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0a75c: 38 00 00 04 li r0,4
}
ffc0a760: 83 e1 00 1c lwz r31,28(r1)
ffc0a764: 7c 03 03 78 mr r3,r0
ffc0a768: 80 01 00 24 lwz r0,36(r1)
ffc0a76c: 38 21 00 20 addi r1,r1,32
ffc0a770: 7c 08 03 a6 mtlr r0
ffc0a774: 4e 80 00 20 blr
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
ffc0a778: 80 04 00 00 lwz r0,0(r4)
ffc0a77c: 90 09 00 00 stw r0,0(r9)
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
ffc0a780: 48 00 01 0d bl ffc0a88c <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
ffc0a784: 48 00 29 d9 bl ffc0d15c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0a788: 38 00 00 00 li r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0a78c: 7c 03 03 78 mr r3,r0
ffc0a790: 80 01 00 24 lwz r0,36(r1)
ffc0a794: 83 e1 00 1c lwz r31,28(r1)
ffc0a798: 38 21 00 20 addi r1,r1,32
ffc0a79c: 7c 08 03 a6 mtlr r0
ffc0a7a0: 4e 80 00 20 blr
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
ffc0a7a4: 80 09 00 00 lwz r0,0(r9)
ffc0a7a8: 7d 24 4b 78 mr r4,r9
ffc0a7ac: 90 03 01 38 stw r0,312(r3)
ffc0a7b0: 4b ff ff d0 b ffc0a780 <rtems_task_variable_delete+0xac>
ffc0a7b4 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
ffc0a7b4: 94 21 ff e0 stwu r1,-32(r1)
ffc0a7b8: 7c 08 02 a6 mflr r0
ffc0a7bc: 93 e1 00 1c stw r31,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
ffc0a7c0: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
ffc0a7c4: 90 01 00 24 stw r0,36(r1)
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
ffc0a7c8: 38 00 00 09 li r0,9
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
ffc0a7cc: 93 c1 00 18 stw r30,24(r1)
ffc0a7d0: 7c be 2b 78 mr r30,r5
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
ffc0a7d4: 41 82 00 58 beq- ffc0a82c <rtems_task_variable_get+0x78>
return RTEMS_INVALID_ADDRESS;
if ( !result )
ffc0a7d8: 2f 85 00 00 cmpwi cr7,r5,0
ffc0a7dc: 41 9e 00 50 beq- cr7,ffc0a82c <rtems_task_variable_get+0x78>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
ffc0a7e0: 38 81 00 08 addi r4,r1,8
ffc0a7e4: 48 00 29 99 bl ffc0d17c <_Thread_Get>
switch (location) {
ffc0a7e8: 80 01 00 08 lwz r0,8(r1)
ffc0a7ec: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a7f0: 40 9e 00 58 bne- cr7,ffc0a848 <rtems_task_variable_get+0x94>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
ffc0a7f4: 81 23 01 38 lwz r9,312(r3)
while (tvp) {
ffc0a7f8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a7fc: 40 be 00 14 bne+ cr7,ffc0a810 <rtems_task_variable_get+0x5c>
ffc0a800: 48 00 00 68 b ffc0a868 <rtems_task_variable_get+0xb4>
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
ffc0a804: 81 29 00 00 lwz r9,0(r9)
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
ffc0a808: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a80c: 41 9e 00 5c beq- cr7,ffc0a868 <rtems_task_variable_get+0xb4><== NEVER TAKEN
if (tvp->ptr == ptr) {
ffc0a810: 80 09 00 04 lwz r0,4(r9)
ffc0a814: 7f 80 f8 00 cmpw cr7,r0,r31
ffc0a818: 40 9e ff ec bne+ cr7,ffc0a804 <rtems_task_variable_get+0x50>
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
ffc0a81c: 80 09 00 0c lwz r0,12(r9)
ffc0a820: 90 1e 00 00 stw r0,0(r30)
_Thread_Enable_dispatch();
ffc0a824: 48 00 29 39 bl ffc0d15c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0a828: 38 00 00 00 li r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0a82c: 7c 03 03 78 mr r3,r0
ffc0a830: 80 01 00 24 lwz r0,36(r1)
ffc0a834: 83 c1 00 18 lwz r30,24(r1)
ffc0a838: 7c 08 03 a6 mtlr r0
ffc0a83c: 83 e1 00 1c lwz r31,28(r1)
ffc0a840: 38 21 00 20 addi r1,r1,32
ffc0a844: 4e 80 00 20 blr
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0a848: 38 00 00 04 li r0,4
}
ffc0a84c: 83 c1 00 18 lwz r30,24(r1)
ffc0a850: 7c 03 03 78 mr r3,r0
ffc0a854: 80 01 00 24 lwz r0,36(r1)
ffc0a858: 83 e1 00 1c lwz r31,28(r1)
ffc0a85c: 38 21 00 20 addi r1,r1,32
ffc0a860: 7c 08 03 a6 mtlr r0
ffc0a864: 4e 80 00 20 blr
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
ffc0a868: 48 00 28 f5 bl ffc0d15c <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
ffc0a86c: 38 00 00 09 li r0,9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0a870: 7c 03 03 78 mr r3,r0
ffc0a874: 80 01 00 24 lwz r0,36(r1)
ffc0a878: 83 c1 00 18 lwz r30,24(r1)
ffc0a87c: 7c 08 03 a6 mtlr r0
ffc0a880: 83 e1 00 1c lwz r31,28(r1)
ffc0a884: 38 21 00 20 addi r1,r1,32
ffc0a888: 4e 80 00 20 blr
ffc083d4 <rtems_termios_baud_to_index>:
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc083d4: 2f 83 00 09 cmpwi cr7,r3,9
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
ffc083d8: 38 00 00 09 li r0,9
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc083dc: 41 9e 00 44 beq- cr7,ffc08420 <rtems_termios_baud_to_index+0x4c>
ffc083e0: 40 9d 00 48 ble- cr7,ffc08428 <rtems_termios_baud_to_index+0x54>
ffc083e4: 2f 83 00 0e cmpwi cr7,r3,14
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
ffc083e8: 38 00 00 0e li r0,14
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc083ec: 41 9e 00 34 beq- cr7,ffc08420 <rtems_termios_baud_to_index+0x4c>
ffc083f0: 40 9d 00 78 ble- cr7,ffc08468 <rtems_termios_baud_to_index+0x94>
ffc083f4: 2f 83 10 02 cmpwi cr7,r3,4098
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
ffc083f8: 38 00 00 11 li r0,17
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc083fc: 41 9e 00 24 beq- cr7,ffc08420 <rtems_termios_baud_to_index+0x4c>
ffc08400: 40 9d 00 d4 ble- cr7,ffc084d4 <rtems_termios_baud_to_index+0x100>
ffc08404: 2f 83 10 03 cmpwi cr7,r3,4099
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
ffc08408: 38 00 00 12 li r0,18
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc0840c: 41 9e 00 14 beq- cr7,ffc08420 <rtems_termios_baud_to_index+0x4c>
ffc08410: 2f 83 10 04 cmpwi cr7,r3,4100
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
case B460800: baud_index = 19; break;
ffc08414: 38 00 00 13 li r0,19
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc08418: 41 9e 00 08 beq- cr7,ffc08420 <rtems_termios_baud_to_index+0x4c><== ALWAYS TAKEN
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
ffc0841c: 38 00 ff ff li r0,-1
}
return baud_index;
}
ffc08420: 7c 03 03 78 mr r3,r0
ffc08424: 4e 80 00 20 blr
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc08428: 2f 83 00 04 cmpwi cr7,r3,4
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
ffc0842c: 38 00 00 04 li r0,4
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc08430: 41 be ff f0 beq- cr7,ffc08420 <rtems_termios_baud_to_index+0x4c>
ffc08434: 41 9d 00 64 bgt- cr7,ffc08498 <rtems_termios_baud_to_index+0xc4>
ffc08438: 2f 83 00 01 cmpwi cr7,r3,1
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
ffc0843c: 38 00 00 01 li r0,1
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc08440: 41 be ff e0 beq- cr7,ffc08420 <rtems_termios_baud_to_index+0x4c>
ffc08444: 40 9d 00 ac ble- cr7,ffc084f0 <rtems_termios_baud_to_index+0x11c>
ffc08448: 2f 83 00 02 cmpwi cr7,r3,2
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
ffc0844c: 38 00 00 02 li r0,2
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc08450: 41 be ff d0 beq- cr7,ffc08420 <rtems_termios_baud_to_index+0x4c>
ffc08454: 2f 83 00 03 cmpwi cr7,r3,3
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
ffc08458: 38 00 00 03 li r0,3
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc0845c: 41 be ff c4 beq- cr7,ffc08420 <rtems_termios_baud_to_index+0x4c><== ALWAYS TAKEN
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
ffc08460: 38 00 ff ff li r0,-1 <== NOT EXECUTED
ffc08464: 4b ff ff bc b ffc08420 <rtems_termios_baud_to_index+0x4c><== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc08468: 2f 83 00 0b cmpwi cr7,r3,11
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
ffc0846c: 38 00 00 0b li r0,11
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc08470: 41 be ff b0 beq- cr7,ffc08420 <rtems_termios_baud_to_index+0x4c>
ffc08474: 41 9c 00 58 blt- cr7,ffc084cc <rtems_termios_baud_to_index+0xf8>
ffc08478: 2f 83 00 0c cmpwi cr7,r3,12
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
ffc0847c: 38 00 00 0c li r0,12
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc08480: 41 be ff a0 beq- cr7,ffc08420 <rtems_termios_baud_to_index+0x4c>
ffc08484: 2f 83 00 0d cmpwi cr7,r3,13
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
ffc08488: 38 00 00 0d li r0,13
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc0848c: 41 be ff 94 beq- cr7,ffc08420 <rtems_termios_baud_to_index+0x4c><== ALWAYS TAKEN
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
ffc08490: 38 00 ff ff li r0,-1 <== NOT EXECUTED
ffc08494: 4b ff ff 8c b ffc08420 <rtems_termios_baud_to_index+0x4c><== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc08498: 2f 83 00 06 cmpwi cr7,r3,6
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
ffc0849c: 38 00 00 06 li r0,6
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc084a0: 41 be ff 80 beq- cr7,ffc08420 <rtems_termios_baud_to_index+0x4c>
ffc084a4: 41 9c 00 20 blt- cr7,ffc084c4 <rtems_termios_baud_to_index+0xf0>
ffc084a8: 2f 83 00 07 cmpwi cr7,r3,7
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
ffc084ac: 38 00 00 07 li r0,7
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc084b0: 41 be ff 70 beq- cr7,ffc08420 <rtems_termios_baud_to_index+0x4c>
ffc084b4: 2f 83 00 08 cmpwi cr7,r3,8
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
ffc084b8: 38 00 00 08 li r0,8
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc084bc: 40 9e ff 60 bne+ cr7,ffc0841c <rtems_termios_baud_to_index+0x48><== NEVER TAKEN
ffc084c0: 4b ff ff 60 b ffc08420 <rtems_termios_baud_to_index+0x4c>
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
ffc084c4: 38 00 00 05 li r0,5
ffc084c8: 4b ff ff 58 b ffc08420 <rtems_termios_baud_to_index+0x4c>
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
ffc084cc: 38 00 00 0a li r0,10
ffc084d0: 4b ff ff 50 b ffc08420 <rtems_termios_baud_to_index+0x4c>
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc084d4: 2f 83 00 0f cmpwi cr7,r3,15
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
ffc084d8: 38 00 00 0f li r0,15
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc084dc: 41 be ff 44 beq- cr7,ffc08420 <rtems_termios_baud_to_index+0x4c>
ffc084e0: 2f 83 10 01 cmpwi cr7,r3,4097
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
ffc084e4: 38 00 00 10 li r0,16
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc084e8: 40 9e ff 34 bne+ cr7,ffc0841c <rtems_termios_baud_to_index+0x48><== NEVER TAKEN
ffc084ec: 4b ff ff 34 b ffc08420 <rtems_termios_baud_to_index+0x4c>
ffc084f0: 2f 83 00 00 cmpwi cr7,r3,0
case B0: baud_index = 0; break;
ffc084f4: 38 00 00 00 li r0,0
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
ffc084f8: 41 be ff 28 beq- cr7,ffc08420 <rtems_termios_baud_to_index+0x4c>
ffc084fc: 4b ff ff 20 b ffc0841c <rtems_termios_baud_to_index+0x48>
ffc06384 <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
ffc06384: 94 21 ff e8 stwu r1,-24(r1)
ffc06388: 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(
ffc0638c: 38 80 00 00 li r4,0
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
ffc06390: 90 01 00 1c stw r0,28(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(
ffc06394: 38 a0 00 00 li r5,0
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
ffc06398: 93 c1 00 10 stw r30,16(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(
ffc0639c: 3f c0 00 00 lis r30,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;
ffc063a0: 81 23 00 00 lwz r9,0(r3)
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
ffc063a4: 93 a1 00 0c stw r29,12(r1)
ffc063a8: 7c 7d 1b 78 mr r29,r3
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain(
ffc063ac: 80 7e 27 94 lwz r3,10132(r30)
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
ffc063b0: 93 e1 00 14 stw r31,20(r1)
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc063b4: 83 e9 00 38 lwz r31,56(r9)
rtems_status_code sc;
sc = rtems_semaphore_obtain(
ffc063b8: 48 00 29 79 bl ffc08d30 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc063bc: 2f 83 00 00 cmpwi cr7,r3,0
ffc063c0: 40 9e 01 ac bne- cr7,ffc0656c <rtems_termios_close+0x1e8><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
ffc063c4: 81 3f 00 08 lwz r9,8(r31)
ffc063c8: 38 09 ff ff addi r0,r9,-1
ffc063cc: 2f 80 00 00 cmpwi cr7,r0,0
ffc063d0: 90 1f 00 08 stw r0,8(r31)
ffc063d4: 40 9e 00 d0 bne- cr7,ffc064a4 <rtems_termios_close+0x120>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
ffc063d8: 80 1f 00 cc lwz r0,204(r31)
ffc063dc: 3d 20 00 00 lis r9,0
ffc063e0: 39 29 28 58 addi r9,r9,10328
ffc063e4: 54 00 28 34 rlwinm r0,r0,5,0,26
ffc063e8: 7d 29 02 14 add r9,r9,r0
ffc063ec: 80 09 00 04 lwz r0,4(r9)
ffc063f0: 2f 80 00 00 cmpwi cr7,r0,0
ffc063f4: 41 9e 01 1c beq- cr7,ffc06510 <rtems_termios_close+0x18c>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
ffc063f8: 7c 09 03 a6 mtctr r0
ffc063fc: 7f e3 fb 78 mr r3,r31
ffc06400: 4e 80 04 21 bctrl
}
drainOutput (tty);
rtems_semaphore_release (tty->osem);
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
ffc06404: 80 1f 00 b4 lwz r0,180(r31)
ffc06408: 2f 80 00 02 cmpwi cr7,r0,2
ffc0640c: 41 9e 01 38 beq- cr7,ffc06544 <rtems_termios_close+0x1c0><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
ffc06410: 80 1f 00 9c lwz r0,156(r31)
ffc06414: 2f 80 00 00 cmpwi cr7,r0,0
ffc06418: 41 9e 00 18 beq- cr7,ffc06430 <rtems_termios_close+0xac><== ALWAYS TAKEN
(*tty->device.lastClose)(tty->major, tty->minor, arg);
ffc0641c: 80 7f 00 0c lwz r3,12(r31) <== NOT EXECUTED
ffc06420: 7f a5 eb 78 mr r5,r29 <== NOT EXECUTED
ffc06424: 80 9f 00 10 lwz r4,16(r31) <== NOT EXECUTED
ffc06428: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc0642c: 4e 80 04 21 bctrl <== NOT EXECUTED
if (tty->forw == NULL) {
ffc06430: 81 3f 00 00 lwz r9,0(r31)
ffc06434: 2f 89 00 00 cmpwi cr7,r9,0
ffc06438: 41 9e 00 b8 beq- cr7,ffc064f0 <rtems_termios_close+0x16c>
rtems_termios_ttyTail = tty->back;
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
} else {
tty->forw->back = tty->back;
ffc0643c: 80 1f 00 04 lwz r0,4(r31)
ffc06440: 90 09 00 04 stw r0,4(r9)
ffc06444: 81 7f 00 04 lwz r11,4(r31)
}
if (tty->back == NULL) {
ffc06448: 2f 0b 00 00 cmpwi cr6,r11,0
ffc0644c: 41 9a 00 8c beq- cr6,ffc064d8 <rtems_termios_close+0x154><== ALWAYS TAKEN
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
} else {
tty->back->forw = tty->forw;
ffc06450: 91 2b 00 00 stw r9,0(r11)
}
rtems_semaphore_delete (tty->isem);
ffc06454: 80 7f 00 14 lwz r3,20(r31)
ffc06458: 48 00 27 fd bl ffc08c54 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
ffc0645c: 80 7f 00 18 lwz r3,24(r31)
ffc06460: 48 00 27 f5 bl ffc08c54 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
ffc06464: 80 7f 00 8c lwz r3,140(r31)
ffc06468: 48 00 27 ed bl ffc08c54 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
ffc0646c: 80 1f 00 a0 lwz r0,160(r31)
ffc06470: 2f 80 00 00 cmpwi cr7,r0,0
ffc06474: 41 9e 00 58 beq- cr7,ffc064cc <rtems_termios_close+0x148>
ffc06478: 80 1f 00 b4 lwz r0,180(r31)
ffc0647c: 2f 80 00 02 cmpwi cr7,r0,2
ffc06480: 41 9e 00 4c beq- cr7,ffc064cc <rtems_termios_close+0x148>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
ffc06484: 80 7f 00 58 lwz r3,88(r31)
ffc06488: 4b ff e6 71 bl ffc04af8 <free>
free (tty->rawOutBuf.theBuf);
ffc0648c: 80 7f 00 7c lwz r3,124(r31)
ffc06490: 4b ff e6 69 bl ffc04af8 <free>
free (tty->cbuf);
ffc06494: 80 7f 00 1c lwz r3,28(r31)
ffc06498: 4b ff e6 61 bl ffc04af8 <free>
free (tty);
ffc0649c: 7f e3 fb 78 mr r3,r31
ffc064a0: 4b ff e6 59 bl ffc04af8 <free>
}
rtems_semaphore_release (rtems_termios_ttyMutex);
ffc064a4: 80 7e 27 94 lwz r3,10132(r30)
ffc064a8: 48 00 2a 11 bl ffc08eb8 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
ffc064ac: 80 01 00 1c lwz r0,28(r1)
ffc064b0: 38 60 00 00 li r3,0
ffc064b4: 83 a1 00 0c lwz r29,12(r1)
ffc064b8: 7c 08 03 a6 mtlr r0
ffc064bc: 83 c1 00 10 lwz r30,16(r1)
ffc064c0: 83 e1 00 14 lwz r31,20(r1)
ffc064c4: 38 21 00 18 addi r1,r1,24
ffc064c8: 4e 80 00 20 blr
rtems_semaphore_delete (tty->isem);
rtems_semaphore_delete (tty->osem);
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
ffc064cc: 80 7f 00 68 lwz r3,104(r31)
ffc064d0: 48 00 27 85 bl ffc08c54 <rtems_semaphore_delete>
ffc064d4: 4b ff ff b0 b ffc06484 <rtems_termios_close+0x100>
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
ffc064d8: 3d 60 00 00 lis r11,0
ffc064dc: 91 2b 27 9c stw r9,10140(r11)
if ( rtems_termios_ttyHead != NULL ) {
ffc064e0: 41 be ff 74 beq- cr7,ffc06454 <rtems_termios_close+0xd0>
rtems_termios_ttyHead->back = NULL;
ffc064e4: 38 00 00 00 li r0,0
ffc064e8: 90 09 00 04 stw r0,4(r9)
ffc064ec: 4b ff ff 68 b ffc06454 <rtems_termios_close+0xd0>
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;
ffc064f0: 81 7f 00 04 lwz r11,4(r31)
ffc064f4: 3d 40 00 00 lis r10,0
if ( rtems_termios_ttyTail != NULL ) {
ffc064f8: 2f 0b 00 00 cmpwi cr6,r11,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;
ffc064fc: 91 6a 27 98 stw r11,10136(r10)
if ( rtems_termios_ttyTail != NULL ) {
ffc06500: 41 ba ff d8 beq- cr6,ffc064d8 <rtems_termios_close+0x154>
rtems_termios_ttyTail->forw = NULL;
ffc06504: 91 2b 00 00 stw r9,0(r11)
ffc06508: 81 3f 00 00 lwz r9,0(r31)
ffc0650c: 4b ff ff 44 b ffc06450 <rtems_termios_close+0xcc>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc06510: 80 7f 00 18 lwz r3,24(r31)
ffc06514: 38 80 00 00 li r4,0
ffc06518: 38 a0 00 00 li r5,0
ffc0651c: 48 00 28 15 bl ffc08d30 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
ffc06520: 2f 83 00 00 cmpwi cr7,r3,0
ffc06524: 40 9e 00 48 bne- cr7,ffc0656c <rtems_termios_close+0x1e8><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
ffc06528: 7f e3 fb 78 mr r3,r31
ffc0652c: 4b ff f9 05 bl ffc05e30 <drainOutput>
rtems_semaphore_release (tty->osem);
ffc06530: 80 7f 00 18 lwz r3,24(r31)
ffc06534: 48 00 29 85 bl ffc08eb8 <rtems_semaphore_release>
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
ffc06538: 80 1f 00 b4 lwz r0,180(r31)
ffc0653c: 2f 80 00 02 cmpwi cr7,r0,2
ffc06540: 40 9e fe d0 bne+ cr7,ffc06410 <rtems_termios_close+0x8c>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
ffc06544: 80 7f 00 c4 lwz r3,196(r31)
ffc06548: 38 80 00 01 li r4,1
ffc0654c: 48 00 22 4d bl ffc08798 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
ffc06550: 2f 83 00 00 cmpwi cr7,r3,0
ffc06554: 40 9e 00 18 bne- cr7,ffc0656c <rtems_termios_close+0x1e8><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
ffc06558: 80 7f 00 c8 lwz r3,200(r31)
ffc0655c: 38 80 00 01 li r4,1
ffc06560: 48 00 22 39 bl ffc08798 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
ffc06564: 2f 83 00 00 cmpwi cr7,r3,0
ffc06568: 41 9e fe a8 beq+ cr7,ffc06410 <rtems_termios_close+0x8c><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
ffc0656c: 48 00 31 4d bl ffc096b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
ffc07fe0 <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)
{
ffc07fe0: 94 21 ff f8 stwu r1,-8(r1)
ffc07fe4: 7c 08 02 a6 mflr r0
ffc07fe8: 90 01 00 0c stw r0,12(r1)
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
ffc07fec: 81 63 00 b4 lwz r11,180(r3)
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
ffc07ff0: 80 03 00 90 lwz r0,144(r3)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
ffc07ff4: 2f 8b 00 02 cmpwi cr7,r11,2
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
ffc07ff8: 7c 00 22 14 add r0,r0,r4
ffc07ffc: 90 03 00 90 stw r0,144(r3)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
ffc08000: 41 9e 00 4c beq- cr7,ffc0804c <rtems_termios_dequeue_characters+0x6c>
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
ffc08004: 80 03 00 cc lwz r0,204(r3)
ffc08008: 2f 80 00 05 cmpwi cr7,r0,5
ffc0800c: 41 9e 00 14 beq- cr7,ffc08020 <rtems_termios_dequeue_characters+0x40>
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
ffc08010: 80 01 00 0c lwz r0,12(r1)
ffc08014: 38 21 00 08 addi r1,r1,8
ffc08018: 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);
ffc0801c: 4b ff fc b0 b ffc07ccc <rtems_termios_refill_transmitter>
if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
ffc08020: 3d 20 00 00 lis r9,0
ffc08024: 80 09 29 0c lwz r0,10508(r9)
ffc08028: 2f 80 00 00 cmpwi cr7,r0,0
ffc0802c: 41 9e 00 0c beq- cr7,ffc08038 <rtems_termios_dequeue_characters+0x58><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
ffc08030: 7c 09 03 a6 mtctr r0
ffc08034: 4e 80 04 21 bctrl
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
ffc08038: 80 01 00 0c lwz r0,12(r1)
ffc0803c: 38 60 00 00 li r3,0
ffc08040: 38 21 00 08 addi r1,r1,8
ffc08044: 7c 08 03 a6 mtlr r0
ffc08048: 4e 80 00 20 blr
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
ffc0804c: 80 63 00 c8 lwz r3,200(r3)
ffc08050: 38 80 00 02 li r4,2
ffc08054: 48 00 07 45 bl ffc08798 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
ffc08058: 2f 83 00 00 cmpwi cr7,r3,0
ffc0805c: 41 9e ff dc beq+ cr7,ffc08038 <rtems_termios_dequeue_characters+0x58><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
ffc08060: 48 00 16 59 bl ffc096b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
ffc07870 <rtems_termios_enqueue_raw_characters>:
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
ffc07870: 94 21 ff d0 stwu r1,-48(r1)
ffc07874: 7c 08 02 a6 mflr r0
ffc07878: 90 01 00 34 stw r0,52(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) {
ffc0787c: 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, char *buf, int len)
{
ffc07880: 93 c1 00 28 stw r30,40(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) {
ffc07884: 3f c0 00 00 lis r30,0
ffc07888: 3b de 28 58 addi r30,r30,10328
ffc0788c: 55 29 28 34 rlwinm r9,r9,5,0,26
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
ffc07890: 93 61 00 1c stw r27,28(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) {
ffc07894: 7d 3e 4a 14 add r9,r30,r9
ffc07898: 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, char *buf, int len)
{
ffc0789c: 7c bb 2b 78 mr r27,r5
ffc078a0: 93 a1 00 24 stw r29,36(r1)
ffc078a4: 7c 9d 23 78 mr r29,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) {
ffc078a8: 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, char *buf, int len)
{
ffc078ac: 93 e1 00 2c stw r31,44(r1)
ffc078b0: 7c 7f 1b 78 mr r31,r3
ffc078b4: 92 c1 00 08 stw r22,8(r1)
ffc078b8: 92 e1 00 0c stw r23,12(r1)
ffc078bc: 93 01 00 10 stw r24,16(r1)
ffc078c0: 93 21 00 14 stw r25,20(r1)
ffc078c4: 93 41 00 18 stw r26,24(r1)
ffc078c8: 93 81 00 20 stw r28,32(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) {
ffc078cc: 41 9e 00 b0 beq- cr7,ffc0797c <rtems_termios_enqueue_raw_characters+0x10c>
while (len--) {
ffc078d0: 2f 85 00 00 cmpwi cr7,r5,0
ffc078d4: 41 9e 00 38 beq- cr7,ffc0790c <rtems_termios_enqueue_raw_characters+0x9c><== NEVER TAKEN
ffc078d8: 3b 80 00 00 li r28,0
ffc078dc: 48 00 00 14 b ffc078f0 <rtems_termios_enqueue_raw_characters+0x80>
ffc078e0: 81 3f 00 cc lwz r9,204(r31)
ffc078e4: 55 29 28 34 rlwinm r9,r9,5,0,26
ffc078e8: 7d 3e 4a 14 add r9,r30,r9
ffc078ec: 80 09 00 10 lwz r0,16(r9)
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
ffc078f0: 7c 7d e0 ae lbzx r3,r29,r28
ffc078f4: 7f e4 fb 78 mr r4,r31
ffc078f8: 7c 09 03 a6 mtctr r0
ffc078fc: 3b 9c 00 01 addi r28,r28,1
ffc07900: 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--) {
ffc07904: 7f 9c d8 00 cmpw cr7,r28,r27
ffc07908: 40 9e ff d8 bne+ cr7,ffc078e0 <rtems_termios_enqueue_raw_characters+0x70>
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
ffc0790c: 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;
ffc07910: 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 )) {
ffc07914: 2f 80 00 00 cmpwi cr7,r0,0
ffc07918: 40 9e 00 28 bne- cr7,ffc07940 <rtems_termios_enqueue_raw_characters+0xd0><== NEVER TAKEN
ffc0791c: 80 1f 00 dc lwz r0,220(r31)
ffc07920: 2f 80 00 00 cmpwi cr7,r0,0
ffc07924: 41 9e 00 1c beq- cr7,ffc07940 <rtems_termios_enqueue_raw_characters+0xd0><== NEVER TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
ffc07928: 7c 09 03 a6 mtctr r0
ffc0792c: 38 7f 00 30 addi r3,r31,48
ffc07930: 80 9f 00 e0 lwz r4,224(r31)
ffc07934: 4e 80 04 21 bctrl
tty->tty_rcvwakeup = 1;
ffc07938: 38 00 00 01 li r0,1
ffc0793c: 90 1f 00 e4 stw r0,228(r31)
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
ffc07940: 80 01 00 34 lwz r0,52(r1)
ffc07944: 7f 43 d3 78 mr r3,r26
ffc07948: 82 c1 00 08 lwz r22,8(r1)
ffc0794c: 7c 08 03 a6 mtlr r0
ffc07950: 82 e1 00 0c lwz r23,12(r1)
ffc07954: 83 01 00 10 lwz r24,16(r1)
ffc07958: 83 21 00 14 lwz r25,20(r1)
ffc0795c: 83 41 00 18 lwz r26,24(r1)
ffc07960: 83 61 00 1c lwz r27,28(r1)
ffc07964: 83 81 00 20 lwz r28,32(r1)
ffc07968: 83 a1 00 24 lwz r29,36(r1)
ffc0796c: 83 c1 00 28 lwz r30,40(r1)
ffc07970: 83 e1 00 2c lwz r31,44(r1)
ffc07974: 38 21 00 30 addi r1,r1,48
ffc07978: 4e 80 00 20 blr
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) {
ffc0797c: 7c be 2b 78 mr r30,r5
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
ffc07980: 2f 9e 00 00 cmpwi cr7,r30,0
* 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, char *buf, int len)
ffc07984: 3b 64 ff ff addi r27,r4,-1
ffc07988: 3b 20 00 00 li r25,0
ffc0798c: 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);
ffc07990: 3a e3 00 30 addi r23,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,
ffc07994: 3a c3 00 4a addi r22,r3,74
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
ffc07998: 41 9e 01 18 beq- cr7,ffc07ab0 <rtems_termios_enqueue_raw_characters+0x240><== NEVER TAKEN
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
ffc0799c: 80 1f 00 b8 lwz r0,184(r31)
}
return 0;
}
while (len--) {
c = *buf++;
ffc079a0: 8f 9b 00 01 lbzu r28,1(r27)
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
ffc079a4: 70 09 02 00 andi. r9,r0,512
ffc079a8: 41 82 00 1c beq- ffc079c4 <rtems_termios_enqueue_raw_characters+0x154>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
ffc079ac: 88 1f 00 4a lbz r0,74(r31)
ffc079b0: 7f 80 e0 00 cmpw cr7,r0,r28
ffc079b4: 41 9e 01 4c beq- cr7,ffc07b00 <rtems_termios_enqueue_raw_characters+0x290>
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
ffc079b8: 88 1f 00 49 lbz r0,73(r31)
ffc079bc: 7f 80 e0 00 cmpw cr7,r0,r28
ffc079c0: 41 9e 01 d4 beq- cr7,ffc07b94 <rtems_termios_enqueue_raw_characters+0x324><== NEVER TAKEN
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
ffc079c4: 2f 99 00 00 cmpwi cr7,r25,0
ffc079c8: 40 9e 01 54 bne- cr7,ffc07b1c <rtems_termios_enqueue_raw_characters+0x2ac><== NEVER TAKEN
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
ffc079cc: 83 bf 00 60 lwz r29,96(r31)
ffc079d0: 81 3f 00 64 lwz r9,100(r31)
ffc079d4: 38 1d 00 01 addi r0,r29,1
ffc079d8: 7f a0 4b 96 divwu r29,r0,r9
ffc079dc: 7f bd 49 d6 mullw r29,r29,r9
ffc079e0: 7f bd 00 50 subf r29,r29,r0
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc079e4: 7f 00 00 a6 mfmsr r24
ffc079e8: 7c 10 42 a6 mfsprg r0,0
ffc079ec: 7f 00 00 78 andc r0,r24,r0
ffc079f0: 7c 00 01 24 mtmsr r0
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
ffc079f4: 80 1f 00 5c lwz r0,92(r31)
ffc079f8: 81 7f 00 64 lwz r11,100(r31)
% tty->rawInBuf.Size) > tty->highwater) &&
ffc079fc: 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)
ffc07a00: 7c 00 58 50 subf r0,r0,r11
ffc07a04: 81 7f 00 c0 lwz r11,192(r31)
ffc07a08: 7c 00 ea 14 add r0,r0,r29
% tty->rawInBuf.Size) > tty->highwater) &&
ffc07a0c: 7d 40 4b 96 divwu r10,r0,r9
ffc07a10: 7d 2a 49 d6 mullw r9,r10,r9
ffc07a14: 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)
ffc07a18: 7f 80 58 40 cmplw cr7,r0,r11
ffc07a1c: 40 9d 00 3c ble- cr7,ffc07a58 <rtems_termios_enqueue_raw_characters+0x1e8><== ALWAYS TAKEN
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
ffc07a20: 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) &&
ffc07a24: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED
ffc07a28: 40 82 00 30 bne- ffc07a58 <rtems_termios_enqueue_raw_characters+0x1e8><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
ffc07a2c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc07a30: 60 00 00 01 ori r0,r0,1 <== NOT EXECUTED
ffc07a34: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
ffc07a38: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc07a3c: 70 00 04 02 andi. r0,r0,1026 <== NOT EXECUTED
ffc07a40: 2f 80 04 00 cmpwi cr7,r0,1024 <== NOT EXECUTED
ffc07a44: 41 9e 01 78 beq- cr7,ffc07bbc <rtems_termios_enqueue_raw_characters+0x34c><== NOT EXECUTED
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
ffc07a48: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc07a4c: 70 00 01 04 andi. r0,r0,260 <== NOT EXECUTED
ffc07a50: 2f 80 01 00 cmpwi cr7,r0,256 <== NOT EXECUTED
ffc07a54: 41 9e 01 a8 beq- cr7,ffc07bfc <rtems_termios_enqueue_raw_characters+0x38c><== NOT EXECUTED
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc07a58: 7f 00 01 24 mtmsr r24
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
ffc07a5c: 80 1f 00 5c lwz r0,92(r31)
ffc07a60: 7f 80 e8 00 cmpw cr7,r0,r29
ffc07a64: 41 9e 01 24 beq- cr7,ffc07b88 <rtems_termios_enqueue_raw_characters+0x318><== NEVER TAKEN
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
ffc07a68: 81 3f 00 58 lwz r9,88(r31)
ffc07a6c: 7f 89 e9 ae stbx r28,r9,r29
tty->rawInBuf.Tail = newTail;
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
ffc07a70: 80 1f 00 e4 lwz r0,228(r31)
if (newTail == tty->rawInBuf.Head) {
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
ffc07a74: 93 bf 00 60 stw r29,96(r31)
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
ffc07a78: 2f 80 00 00 cmpwi cr7,r0,0
ffc07a7c: 40 9e 00 28 bne- cr7,ffc07aa4 <rtems_termios_enqueue_raw_characters+0x234><== NEVER TAKEN
ffc07a80: 80 1f 00 dc lwz r0,220(r31)
ffc07a84: 2f 80 00 00 cmpwi cr7,r0,0
ffc07a88: 41 9e 00 1c beq- cr7,ffc07aa4 <rtems_termios_enqueue_raw_characters+0x234><== ALWAYS TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
ffc07a8c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc07a90: 7e e3 bb 78 mr r3,r23 <== NOT EXECUTED
ffc07a94: 80 9f 00 e0 lwz r4,224(r31) <== NOT EXECUTED
ffc07a98: 4e 80 04 21 bctrl <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
ffc07a9c: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc07aa0: 90 1f 00 e4 stw r0,228(r31) <== NOT EXECUTED
ffc07aa4: 3b de ff ff addi r30,r30,-1
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
ffc07aa8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc07aac: 40 9e fe f0 bne+ cr7,ffc0799c <rtems_termios_enqueue_raw_characters+0x12c><== NEVER TAKEN
}
}
}
}
tty->rawInBufDropped += dropped;
ffc07ab0: 80 1f 00 78 lwz r0,120(r31)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
ffc07ab4: 80 7f 00 68 lwz r3,104(r31)
}
}
}
}
tty->rawInBufDropped += dropped;
ffc07ab8: 7c 00 d2 14 add r0,r0,r26
ffc07abc: 90 1f 00 78 stw r0,120(r31)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
ffc07ac0: 48 00 13 f9 bl ffc08eb8 <rtems_semaphore_release>
return dropped;
}
ffc07ac4: 80 01 00 34 lwz r0,52(r1)
ffc07ac8: 7f 43 d3 78 mr r3,r26
ffc07acc: 82 c1 00 08 lwz r22,8(r1)
ffc07ad0: 7c 08 03 a6 mtlr r0
ffc07ad4: 82 e1 00 0c lwz r23,12(r1)
ffc07ad8: 83 01 00 10 lwz r24,16(r1)
ffc07adc: 83 21 00 14 lwz r25,20(r1)
ffc07ae0: 83 41 00 18 lwz r26,24(r1)
ffc07ae4: 83 61 00 1c lwz r27,28(r1)
ffc07ae8: 83 81 00 20 lwz r28,32(r1)
ffc07aec: 83 a1 00 24 lwz r29,36(r1)
ffc07af0: 83 c1 00 28 lwz r30,40(r1)
ffc07af4: 83 e1 00 2c lwz r31,44(r1)
ffc07af8: 38 21 00 30 addi r1,r1,48
ffc07afc: 4e 80 00 20 blr
/* 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]) {
ffc07b00: 89 3f 00 49 lbz r9,73(r31)
ffc07b04: 7f 89 00 00 cmpw cr7,r9,r0
ffc07b08: 41 9e 00 a0 beq- cr7,ffc07ba8 <rtems_termios_enqueue_raw_characters+0x338><== NEVER TAKEN
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
ffc07b0c: 80 1f 00 b8 lwz r0,184(r31)
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--) {
ffc07b10: 3b 20 00 01 li r25,1
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
ffc07b14: 60 00 00 10 ori r0,r0,16
ffc07b18: 90 1f 00 b8 stw r0,184(r31)
flow_rcv = true;
}
}
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
ffc07b1c: 80 1f 00 b8 lwz r0,184(r31)
ffc07b20: 54 00 06 b6 rlwinm r0,r0,0,26,27
ffc07b24: 2f 80 00 20 cmpwi cr7,r0,32
ffc07b28: 40 9e ff 7c bne+ cr7,ffc07aa4 <rtems_termios_enqueue_raw_characters+0x234><== ALWAYS TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc07b2c: 7f a0 00 a6 mfmsr r29 <== NOT EXECUTED
ffc07b30: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED
ffc07b34: 7f a0 00 78 andc r0,r29,r0 <== NOT EXECUTED
ffc07b38: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
ffc07b3c: 81 3f 00 94 lwz r9,148(r31) <== NOT EXECUTED
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
ffc07b40: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
ffc07b44: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
ffc07b48: 54 00 06 f2 rlwinm r0,r0,0,27,25 <== NOT EXECUTED
ffc07b4c: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
ffc07b50: 40 9e 00 10 bne- cr7,ffc07b60 <rtems_termios_enqueue_raw_characters+0x2f0><== NOT EXECUTED
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc07b54: 7f a0 01 24 mtmsr r29 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
ffc07b58: 3b de ff ff addi r30,r30,-1 <== NOT EXECUTED
ffc07b5c: 4b ff ff 4c b ffc07aa8 <rtems_termios_enqueue_raw_characters+0x238><== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
ffc07b60: 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)(
ffc07b64: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc07b68: 80 9f 00 7c lwz r4,124(r31) <== NOT EXECUTED
ffc07b6c: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED
ffc07b70: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc07b74: 7c 84 4a 14 add r4,r4,r9 <== NOT EXECUTED
ffc07b78: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc07b7c: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc07b80: 7f a0 01 24 mtmsr r29 <== NOT EXECUTED
ffc07b84: 4b ff ff d4 b ffc07b58 <rtems_termios_enqueue_raw_characters+0x2e8><== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
dropped++;
ffc07b88: 3b 5a 00 01 addi r26,r26,1 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
ffc07b8c: 3b de ff ff addi r30,r30,-1 <== NOT EXECUTED
ffc07b90: 4b ff ff 18 b ffc07aa8 <rtems_termios_enqueue_raw_characters+0x238><== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
ffc07b94: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
ffc07b98: 3b 20 00 01 li r25,1 <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
ffc07b9c: 54 00 07 34 rlwinm r0,r0,0,28,26 <== NOT EXECUTED
ffc07ba0: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED
ffc07ba4: 4b ff ff 78 b ffc07b1c <rtems_termios_enqueue_raw_characters+0x2ac><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
ffc07ba8: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
ffc07bac: 3b 20 00 01 li r25,1 <== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
ffc07bb0: 68 00 00 10 xori r0,r0,16 <== NOT EXECUTED
ffc07bb4: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED
ffc07bb8: 4b ff ff 64 b ffc07b1c <rtems_termios_enqueue_raw_characters+0x2ac><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
ffc07bbc: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc07bc0: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED
ffc07bc4: 40 82 00 10 bne- ffc07bd4 <rtems_termios_enqueue_raw_characters+0x364><== NOT EXECUTED
ffc07bc8: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED
ffc07bcc: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc07bd0: 40 be fe 88 bne- cr7,ffc07a58 <rtems_termios_enqueue_raw_characters+0x1e8><== 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;
ffc07bd4: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
ffc07bd8: 7e c4 b3 78 mr r4,r22 <== NOT EXECUTED
ffc07bdc: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED
ffc07be0: 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;
ffc07be4: 61 29 00 02 ori r9,r9,2 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
ffc07be8: 80 7f 00 10 lwz r3,16(r31) <== 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;
ffc07bec: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
ffc07bf0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc07bf4: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc07bf8: 4b ff fe 60 b ffc07a58 <rtems_termios_enqueue_raw_characters+0x1e8><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
ffc07bfc: 80 1f 00 ac lwz r0,172(r31) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
ffc07c00: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
ffc07c04: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
ffc07c08: 61 29 00 04 ori r9,r9,4 <== NOT EXECUTED
ffc07c0c: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
ffc07c10: 41 be fe 48 beq- cr7,ffc07a58 <rtems_termios_enqueue_raw_characters+0x1e8><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
ffc07c14: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc07c18: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc07c1c: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc07c20: 4b ff fe 38 b ffc07a58 <rtems_termios_enqueue_raw_characters+0x1e8><== NOT EXECUTED
ffc0658c <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
ffc0658c: 94 21 ff e0 stwu r1,-32(r1)
ffc06590: 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);
ffc06594: 38 80 00 00 li r4,0
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
ffc06598: 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;
ffc0659c: 38 00 00 00 li r0,0
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc065a0: 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;
ffc065a4: 81 23 00 00 lwz r9,0(r3)
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
ffc065a8: 93 c1 00 18 stw r30,24(r1)
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc065ac: 83 c9 00 38 lwz r30,56(r9)
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
ffc065b0: 93 81 00 10 stw r28,16(r1)
ffc065b4: 93 a1 00 14 stw r29,20(r1)
ffc065b8: 93 e1 00 1c stw r31,28(r1)
ffc065bc: 7c 7f 1b 78 mr r31,r3
ffc065c0: 93 41 00 08 stw r26,8(r1)
ffc065c4: 93 61 00 0c stw r27,12(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;
ffc065c8: 90 03 00 0c stw r0,12(r3)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc065cc: 80 7e 00 18 lwz r3,24(r30)
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
ffc065d0: 83 9f 00 08 lwz r28,8(r31)
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc065d4: 48 00 27 5d bl ffc08d30 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
ffc065d8: 7c 7d 1b 79 mr. r29,r3
ffc065dc: 40 82 00 4c bne- ffc06628 <rtems_termios_ioctl+0x9c> <== NEVER TAKEN
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
ffc065e0: 80 1f 00 04 lwz r0,4(r31)
ffc065e4: 2f 80 00 04 cmpwi cr7,r0,4
ffc065e8: 41 9e 00 28 beq- cr7,ffc06610 <rtems_termios_ioctl+0x84>
ffc065ec: 2b 80 00 04 cmplwi cr7,r0,4
ffc065f0: 41 9d 00 68 bgt- cr7,ffc06658 <rtems_termios_ioctl+0xcc>
ffc065f4: 2f 80 00 02 cmpwi cr7,r0,2
ffc065f8: 41 9e 00 bc beq- cr7,ffc066b4 <rtems_termios_ioctl+0x128>
ffc065fc: 2b 80 00 02 cmplwi cr7,r0,2
ffc06600: 40 9d 02 4c ble- cr7,ffc0684c <rtems_termios_ioctl+0x2c0>
if (tty->device.setAttributes)
(*tty->device.setAttributes)(tty->minor, &tty->termios);
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
ffc06604: 7f c3 f3 78 mr r3,r30
ffc06608: 4b ff f8 29 bl ffc05e30 <drainOutput>
break;
ffc0660c: 48 00 00 14 b ffc06620 <rtems_termios_ioctl+0x94>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
ffc06610: 81 3c 00 00 lwz r9,0(r28)
ffc06614: 81 5c 00 04 lwz r10,4(r28)
ffc06618: 91 3e 00 dc stw r9,220(r30)
ffc0661c: 91 5e 00 e0 stw r10,224(r30)
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
ffc06620: 80 7e 00 18 lwz r3,24(r30)
ffc06624: 48 00 28 95 bl ffc08eb8 <rtems_semaphore_release>
args->ioctl_return = sc;
return sc;
}
ffc06628: 80 01 00 24 lwz r0,36(r1)
ffc0662c: 7f a3 eb 78 mr r3,r29
}
break;
}
rtems_semaphore_release (tty->osem);
args->ioctl_return = sc;
ffc06630: 93 bf 00 0c stw r29,12(r31)
return sc;
}
ffc06634: 7c 08 03 a6 mtlr r0
ffc06638: 83 41 00 08 lwz r26,8(r1)
ffc0663c: 83 61 00 0c lwz r27,12(r1)
ffc06640: 83 81 00 10 lwz r28,16(r1)
ffc06644: 83 a1 00 14 lwz r29,20(r1)
ffc06648: 83 c1 00 18 lwz r30,24(r1)
ffc0664c: 83 e1 00 1c lwz r31,28(r1)
ffc06650: 38 21 00 20 addi r1,r1,32
ffc06654: 4e 80 00 20 blr
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
ffc06658: 3d 20 40 04 lis r9,16388
ffc0665c: 61 29 66 7f ori r9,r9,26239
ffc06660: 7f 80 48 00 cmpw cr7,r0,r9
ffc06664: 41 9e 01 bc beq- cr7,ffc06820 <rtems_termios_ioctl+0x294><== NEVER TAKEN
ffc06668: 7f 80 48 40 cmplw cr7,r0,r9
ffc0666c: 41 9d 01 fc bgt- cr7,ffc06868 <rtems_termios_ioctl+0x2dc>
ffc06670: 2f 80 00 05 cmpwi cr7,r0,5
ffc06674: 41 9e 02 84 beq- cr7,ffc068f8 <rtems_termios_ioctl+0x36c>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
ffc06678: 80 1e 00 cc lwz r0,204(r30)
ffc0667c: 3d 20 00 00 lis r9,0
ffc06680: 39 29 28 58 addi r9,r9,10328
ffc06684: 54 00 28 34 rlwinm r0,r0,5,0,26
ffc06688: 7d 29 02 14 add r9,r9,r0
ffc0668c: 80 09 00 18 lwz r0,24(r9)
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
ffc06690: 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) {
ffc06694: 2f 80 00 00 cmpwi cr7,r0,0
ffc06698: 41 be ff 88 beq- cr7,ffc06620 <rtems_termios_ioctl+0x94><== NEVER TAKEN
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
ffc0669c: 7f c3 f3 78 mr r3,r30
ffc066a0: 7c 09 03 a6 mtctr r0
ffc066a4: 7f e4 fb 78 mr r4,r31
ffc066a8: 4e 80 04 21 bctrl
ffc066ac: 7c 7d 1b 78 mr r29,r3
ffc066b0: 4b ff ff 70 b ffc06620 <rtems_termios_ioctl+0x94>
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
ffc066b4: 3b 9e 00 30 addi r28,r30,48
ffc066b8: 80 9f 00 08 lwz r4,8(r31)
ffc066bc: 7f 83 e3 78 mr r3,r28
ffc066c0: 38 a0 00 24 li r5,36
ffc066c4: 48 00 c6 11 bl ffc12cd4 <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) &&
ffc066c8: 80 1e 00 b8 lwz r0,184(r30)
ffc066cc: 70 09 02 00 andi. r9,r0,512
ffc066d0: 41 82 00 58 beq- ffc06728 <rtems_termios_ioctl+0x19c>
!(tty->termios.c_iflag & IXON)) {
ffc066d4: 80 1e 00 30 lwz r0,48(r30)
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
ffc066d8: 70 09 04 00 andi. r9,r0,1024
ffc066dc: 40 82 00 4c bne- ffc06728 <rtems_termios_ioctl+0x19c>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
ffc066e0: 81 3e 00 b8 lwz r9,184(r30)
ffc066e4: 38 00 fd ef li r0,-529
ffc066e8: 7d 20 00 38 and r0,r9,r0
ffc066ec: 90 1e 00 b8 stw r0,184(r30)
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
ffc066f0: 80 1e 00 b8 lwz r0,184(r30)
ffc066f4: 70 09 00 20 andi. r9,r0,32
ffc066f8: 41 82 00 30 beq- ffc06728 <rtems_termios_ioctl+0x19c> <== ALWAYS TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc066fc: 7f 60 00 a6 mfmsr r27 <== NOT EXECUTED
ffc06700: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED
ffc06704: 7f 60 00 78 andc r0,r27,r0 <== NOT EXECUTED
ffc06708: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
ffc0670c: 81 3e 00 94 lwz r9,148(r30) <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
ffc06710: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
ffc06714: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
ffc06718: 54 00 06 f2 rlwinm r0,r0,0,27,25 <== NOT EXECUTED
ffc0671c: 90 1e 00 b8 stw r0,184(r30) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
ffc06720: 40 9e 02 04 bne- cr7,ffc06924 <rtems_termios_ioctl+0x398><== NOT EXECUTED
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc06724: 7f 60 01 24 mtmsr r27 <== 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)) {
ffc06728: 80 1e 00 b8 lwz r0,184(r30)
ffc0672c: 70 09 04 00 andi. r9,r0,1024
ffc06730: 41 82 00 28 beq- ffc06758 <rtems_termios_ioctl+0x1cc>
ffc06734: 80 1e 00 30 lwz r0,48(r30)
ffc06738: 70 09 10 00 andi. r9,r0,4096
ffc0673c: 40 82 00 1c bne- ffc06758 <rtems_termios_ioctl+0x1cc> <== NEVER TAKEN
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
ffc06740: 80 1e 00 b8 lwz r0,184(r30)
ffc06744: 54 00 05 a8 rlwinm r0,r0,0,22,20
ffc06748: 90 1e 00 b8 stw r0,184(r30)
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
ffc0674c: 80 1e 00 b8 lwz r0,184(r30)
ffc06750: 54 00 07 fa rlwinm r0,r0,0,31,29
ffc06754: 90 1e 00 b8 stw r0,184(r30)
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
ffc06758: 80 1e 00 b8 lwz r0,184(r30)
ffc0675c: 70 09 01 00 andi. r9,r0,256
ffc06760: 41 82 01 ac beq- ffc0690c <rtems_termios_ioctl+0x380> <== ALWAYS TAKEN
ffc06764: 80 1e 00 38 lwz r0,56(r30) <== NOT EXECUTED
ffc06768: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc0676c: 41 9c 02 28 blt- cr7,ffc06994 <rtems_termios_ioctl+0x408><== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
ffc06770: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED
ffc06774: 54 00 06 2c rlwinm r0,r0,0,24,22 <== NOT EXECUTED
ffc06778: 90 1e 00 b8 stw r0,184(r30) <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
ffc0677c: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED
ffc06780: 70 09 00 04 andi. r9,r0,4 <== NOT EXECUTED
ffc06784: 41 82 00 24 beq- ffc067a8 <rtems_termios_ioctl+0x21c> <== NOT EXECUTED
ffc06788: 80 1e 00 b0 lwz r0,176(r30) <== NOT EXECUTED
ffc0678c: 2f 00 00 00 cmpwi cr6,r0,0 <== NOT EXECUTED
ffc06790: 41 9a 00 18 beq- cr6,ffc067a8 <rtems_termios_ioctl+0x21c><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
ffc06794: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc06798: 80 7e 00 10 lwz r3,16(r30) <== NOT EXECUTED
ffc0679c: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc067a0: 80 1e 00 38 lwz r0,56(r30) <== NOT EXECUTED
ffc067a4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
ffc067a8: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED
ffc067ac: 54 00 07 b8 rlwinm r0,r0,0,30,28 <== NOT EXECUTED
ffc067b0: 90 1e 00 b8 stw r0,184(r30) <== 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) {
ffc067b4: 41 9c 01 e0 blt- cr7,ffc06994 <rtems_termios_ioctl+0x408><== NEVER TAKEN
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
ffc067b8: 80 1e 00 30 lwz r0,48(r30)
ffc067bc: 70 09 10 00 andi. r9,r0,4096
ffc067c0: 41 82 00 10 beq- ffc067d0 <rtems_termios_ioctl+0x244>
tty->flow_ctrl |= FL_MDXOF;
ffc067c4: 81 3e 00 b8 lwz r9,184(r30)
ffc067c8: 61 29 04 00 ori r9,r9,1024
ffc067cc: 91 3e 00 b8 stw r9,184(r30)
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
ffc067d0: 70 09 04 00 andi. r9,r0,1024
ffc067d4: 41 82 00 10 beq- ffc067e4 <rtems_termios_ioctl+0x258>
tty->flow_ctrl |= FL_MDXON;
ffc067d8: 80 1e 00 b8 lwz r0,184(r30)
ffc067dc: 60 00 02 00 ori r0,r0,512
ffc067e0: 90 1e 00 b8 stw r0,184(r30)
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) {
ffc067e4: 83 7e 00 3c lwz r27,60(r30)
ffc067e8: 73 7b 00 02 andi. r27,r27,2
ffc067ec: 41 82 01 60 beq- ffc0694c <rtems_termios_ioctl+0x3c0>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
ffc067f0: 38 00 00 00 li r0,0
ffc067f4: 90 1e 00 6c stw r0,108(r30)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
ffc067f8: 90 1e 00 70 stw r0,112(r30)
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
ffc067fc: 90 1e 00 74 stw r0,116(r30)
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
ffc06800: 80 1e 00 a8 lwz r0,168(r30)
ffc06804: 2f 80 00 00 cmpwi cr7,r0,0
ffc06808: 41 be fe 18 beq- cr7,ffc06620 <rtems_termios_ioctl+0x94><== NEVER TAKEN
(*tty->device.setAttributes)(tty->minor, &tty->termios);
ffc0680c: 80 7e 00 10 lwz r3,16(r30)
ffc06810: 7f 84 e3 78 mr r4,r28
ffc06814: 7c 09 03 a6 mtctr r0
ffc06818: 4e 80 04 21 bctrl
ffc0681c: 4b ff fe 04 b ffc06620 <rtems_termios_ioctl+0x94>
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
ffc06820: 81 3e 00 60 lwz r9,96(r30) <== NOT EXECUTED
ffc06824: 80 1e 00 5c lwz r0,92(r30) <== NOT EXECUTED
if ( rawnc < 0 )
ffc06828: 7c 00 48 51 subf. r0,r0,r9 <== NOT EXECUTED
ffc0682c: 41 80 00 ec blt- ffc06918 <rtems_termios_ioctl+0x38c> <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
ffc06830: 81 5e 00 20 lwz r10,32(r30) <== NOT EXECUTED
ffc06834: 81 3e 00 24 lwz r9,36(r30) <== NOT EXECUTED
ffc06838: 81 7f 00 08 lwz r11,8(r31) <== NOT EXECUTED
ffc0683c: 7d 29 50 50 subf r9,r9,r10 <== NOT EXECUTED
ffc06840: 7c 09 02 14 add r0,r9,r0 <== NOT EXECUTED
ffc06844: 90 0b 00 00 stw r0,0(r11) <== NOT EXECUTED
}
break;
ffc06848: 4b ff fd d8 b ffc06620 <rtems_termios_ioctl+0x94> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
ffc0684c: 2f 80 00 01 cmpwi cr7,r0,1
ffc06850: 40 9e fe 28 bne+ cr7,ffc06678 <rtems_termios_ioctl+0xec><== NEVER TAKEN
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
ffc06854: 80 7f 00 08 lwz r3,8(r31)
ffc06858: 38 9e 00 30 addi r4,r30,48
ffc0685c: 38 a0 00 24 li r5,36
ffc06860: 48 00 c4 75 bl ffc12cd4 <memcpy>
break;
ffc06864: 4b ff fd bc b ffc06620 <rtems_termios_ioctl+0x94>
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
ffc06868: 6c 09 40 04 xoris r9,r0,16388
ffc0686c: 2f 89 74 1a cmpwi cr7,r9,29722
ffc06870: 41 9e 00 78 beq- cr7,ffc068e8 <rtems_termios_ioctl+0x35c>
ffc06874: 6c 09 80 04 xoris r9,r0,32772
ffc06878: 2f 89 74 1b cmpwi cr7,r9,29723
ffc0687c: 40 9e fd fc bne+ cr7,ffc06678 <rtems_termios_ioctl+0xec><== NEVER TAKEN
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
ffc06880: 81 3e 00 cc lwz r9,204(r30)
ffc06884: 3f 80 00 00 lis r28,0
ffc06888: 3b 9c 28 58 addi r28,r28,10328
ffc0688c: 55 29 28 34 rlwinm r9,r9,5,0,26
ffc06890: 7d 3c 4a 14 add r9,r28,r9
ffc06894: 80 09 00 04 lwz r0,4(r9)
ffc06898: 2f 80 00 00 cmpwi cr7,r0,0
ffc0689c: 41 9e 00 14 beq- cr7,ffc068b0 <rtems_termios_ioctl+0x324>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
ffc068a0: 7f c3 f3 78 mr r3,r30
ffc068a4: 7c 09 03 a6 mtctr r0
ffc068a8: 4e 80 04 21 bctrl
ffc068ac: 7c 7d 1b 78 mr r29,r3
}
tty->t_line=*(int*)(args->buffer);
ffc068b0: 81 3f 00 08 lwz r9,8(r31)
tty->t_sc = NULL; /* ensure that no more valid data */
ffc068b4: 38 00 00 00 li r0,0
* 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);
ffc068b8: 81 29 00 00 lwz r9,0(r9)
tty->t_sc = NULL; /* ensure that no more valid data */
ffc068bc: 90 1e 00 d0 stw r0,208(r30)
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
ffc068c0: 55 20 28 34 rlwinm r0,r9,5,0,26
ffc068c4: 7c 1c 00 2e lwzx r0,r28,r0
* 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);
ffc068c8: 91 3e 00 cc stw r9,204(r30)
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
ffc068cc: 2f 80 00 00 cmpwi cr7,r0,0
ffc068d0: 41 be fd 50 beq- cr7,ffc06620 <rtems_termios_ioctl+0x94>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
ffc068d4: 7f c3 f3 78 mr r3,r30
ffc068d8: 7c 09 03 a6 mtctr r0
ffc068dc: 4e 80 04 21 bctrl
ffc068e0: 7c 7d 1b 78 mr r29,r3
ffc068e4: 4b ff fd 3c b ffc06620 <rtems_termios_ioctl+0x94>
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
ffc068e8: 81 3f 00 08 lwz r9,8(r31)
ffc068ec: 80 1e 00 cc lwz r0,204(r30)
ffc068f0: 90 09 00 00 stw r0,0(r9)
break;
ffc068f4: 4b ff fd 2c b ffc06620 <rtems_termios_ioctl+0x94>
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
ffc068f8: 81 3c 00 00 lwz r9,0(r28)
ffc068fc: 81 5c 00 04 lwz r10,4(r28)
ffc06900: 91 3e 00 d4 stw r9,212(r30)
ffc06904: 91 5e 00 d8 stw r10,216(r30)
break;
ffc06908: 4b ff fd 18 b ffc06620 <rtems_termios_ioctl+0x94>
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
ffc0690c: 80 1e 00 38 lwz r0,56(r30)
ffc06910: 2f 80 00 00 cmpwi cr7,r0,0
ffc06914: 4b ff fe a0 b ffc067b4 <rtems_termios_ioctl+0x228>
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
ffc06918: 81 3e 00 64 lwz r9,100(r30) <== NOT EXECUTED
ffc0691c: 7c 00 4a 14 add r0,r0,r9 <== NOT EXECUTED
ffc06920: 4b ff ff 10 b ffc06830 <rtems_termios_ioctl+0x2a4> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
ffc06924: 81 3e 00 84 lwz r9,132(r30) <== 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)(
ffc06928: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc0692c: 80 9e 00 7c lwz r4,124(r30) <== NOT EXECUTED
ffc06930: 80 1e 00 a4 lwz r0,164(r30) <== NOT EXECUTED
ffc06934: 80 7e 00 10 lwz r3,16(r30) <== NOT EXECUTED
ffc06938: 7c 84 4a 14 add r4,r4,r9 <== NOT EXECUTED
ffc0693c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc06940: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc06944: 7f 60 01 24 mtmsr r27 <== NOT EXECUTED
ffc06948: 4b ff fd e0 b ffc06728 <rtems_termios_ioctl+0x19c> <== NOT EXECUTED
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] *
ffc0694c: 8b 5e 00 46 lbz r26,70(r30)
rtems_clock_get_ticks_per_second() / 10;
ffc06950: 48 00 1b 99 bl ffc084e8 <rtems_clock_get_ticks_per_second>
if (tty->termios.c_cc[VTIME]) {
ffc06954: 89 3e 00 46 lbz r9,70(r30)
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
ffc06958: 3c 00 cc cc lis r0,-13108
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] *
ffc0695c: 7c 63 d1 d6 mullw r3,r3,r26
rtems_clock_get_ticks_per_second() / 10;
ffc06960: 60 00 cc cd ori r0,r0,52429
if (tty->termios.c_cc[VTIME]) {
ffc06964: 2f 89 00 00 cmpwi cr7,r9,0
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
ffc06968: 7c 03 00 16 mulhwu r0,r3,r0
ffc0696c: 54 00 e8 fe rlwinm r0,r0,29,3,31
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] *
ffc06970: 90 1e 00 54 stw r0,84(r30)
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
ffc06974: 41 9e 00 30 beq- cr7,ffc069a4 <rtems_termios_ioctl+0x418>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
ffc06978: 89 3e 00 47 lbz r9,71(r30)
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;
ffc0697c: 93 7e 00 6c stw r27,108(r30)
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
ffc06980: 2f 89 00 00 cmpwi cr7,r9,0
} 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;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
ffc06984: 90 1e 00 70 stw r0,112(r30)
if (tty->termios.c_cc[VMIN])
ffc06988: 41 9e 00 38 beq- cr7,ffc069c0 <rtems_termios_ioctl+0x434>
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
ffc0698c: 93 7e 00 74 stw r27,116(r30)
ffc06990: 4b ff fe 70 b ffc06800 <rtems_termios_ioctl+0x274>
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
tty->flow_ctrl |= FL_MDRTS;
ffc06994: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED
ffc06998: 60 00 01 00 ori r0,r0,256 <== NOT EXECUTED
ffc0699c: 90 1e 00 b8 stw r0,184(r30) <== NOT EXECUTED
ffc069a0: 4b ff fe 18 b ffc067b8 <rtems_termios_ioctl+0x22c> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
ffc069a4: 88 1e 00 47 lbz r0,71(r30)
ffc069a8: 2f 80 00 00 cmpwi cr7,r0,0
ffc069ac: 41 9e 00 1c beq- cr7,ffc069c8 <rtems_termios_ioctl+0x43c><== ALWAYS TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
ffc069b0: 91 3e 00 6c stw r9,108(r30) <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
ffc069b4: 91 3e 00 70 stw r9,112(r30) <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
ffc069b8: 91 3e 00 74 stw r9,116(r30) <== NOT EXECUTED
ffc069bc: 4b ff fe 44 b ffc06800 <rtems_termios_ioctl+0x274> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
ffc069c0: 90 1e 00 74 stw r0,116(r30)
ffc069c4: 4b ff fe 3c b ffc06800 <rtems_termios_ioctl+0x274>
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
ffc069c8: 38 00 00 01 li r0,1
ffc069cc: 90 1e 00 6c stw r0,108(r30)
ffc069d0: 4b ff fe 30 b ffc06800 <rtems_termios_ioctl+0x274>
ffc05ed8 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
ffc05ed8: 94 21 ff c0 stwu r1,-64(r1)
ffc05edc: 7d 80 00 26 mfcr r12
ffc05ee0: 7c 08 02 a6 mflr r0
ffc05ee4: 93 81 00 30 stw r28,48(r1)
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
ffc05ee8: 3f 80 00 00 lis r28,0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
ffc05eec: 93 c1 00 38 stw r30,56(r1)
ffc05ef0: 7c 7e 1b 78 mr r30,r3
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
ffc05ef4: 80 7c 27 94 lwz r3,10132(r28)
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
ffc05ef8: 93 41 00 28 stw r26,40(r1)
ffc05efc: 7c ba 2b 78 mr r26,r5
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
ffc05f00: 38 a0 00 00 li r5,0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
ffc05f04: 93 a1 00 34 stw r29,52(r1)
ffc05f08: 7c 9d 23 78 mr r29,r4
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
ffc05f0c: 38 80 00 00 li r4,0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
ffc05f10: 92 e1 00 1c stw r23,28(r1)
ffc05f14: 7c d7 33 78 mr r23,r6
ffc05f18: 93 61 00 2c stw r27,44(r1)
ffc05f1c: 90 01 00 44 stw r0,68(r1)
ffc05f20: 92 61 00 0c stw r19,12(r1)
ffc05f24: 92 81 00 10 stw r20,16(r1)
ffc05f28: 92 a1 00 14 stw r21,20(r1)
ffc05f2c: 92 c1 00 18 stw r22,24(r1)
ffc05f30: 93 01 00 20 stw r24,32(r1)
ffc05f34: 93 21 00 24 stw r25,36(r1)
ffc05f38: 93 e1 00 3c stw r31,60(r1)
ffc05f3c: 91 81 00 08 stw r12,8(r1)
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
ffc05f40: 48 00 2d f1 bl ffc08d30 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc05f44: 7c 7b 1b 79 mr. r27,r3
ffc05f48: 40 82 00 90 bne- ffc05fd8 <rtems_termios_open+0x100> <== NEVER TAKEN
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
ffc05f4c: 3e a0 00 00 lis r21,0
ffc05f50: 82 d5 27 9c lwz r22,10140(r21)
ffc05f54: 2e 16 00 00 cmpwi cr4,r22,0
ffc05f58: 41 92 01 0c beq- cr4,ffc06064 <rtems_termios_open+0x18c>
ffc05f5c: 7e df b3 78 mr r31,r22
ffc05f60: 48 00 00 10 b ffc05f70 <rtems_termios_open+0x98>
ffc05f64: 83 ff 00 00 lwz r31,0(r31)
ffc05f68: 2f 9f 00 00 cmpwi cr7,r31,0
ffc05f6c: 41 9e 00 f8 beq- cr7,ffc06064 <rtems_termios_open+0x18c><== ALWAYS TAKEN
if ((tty->major == major) && (tty->minor == minor))
ffc05f70: 80 1f 00 0c lwz r0,12(r31)
ffc05f74: 7f 80 f0 00 cmpw cr7,r0,r30
ffc05f78: 40 9e ff ec bne+ cr7,ffc05f64 <rtems_termios_open+0x8c>
ffc05f7c: 80 1f 00 10 lwz r0,16(r31)
ffc05f80: 7f 80 e8 00 cmpw cr7,r0,r29
ffc05f84: 40 9e ff e0 bne+ cr7,ffc05f64 <rtems_termios_open+0x8c> <== NEVER TAKEN
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
if (!tty->refcount++) {
ffc05f88: 81 3f 00 08 lwz r9,8(r31)
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
ffc05f8c: 81 7a 00 00 lwz r11,0(r26)
if (!tty->refcount++) {
ffc05f90: 2f 89 00 00 cmpwi cr7,r9,0
ffc05f94: 39 29 00 01 addi r9,r9,1
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
ffc05f98: 93 eb 00 38 stw r31,56(r11)
if (!tty->refcount++) {
ffc05f9c: 91 3f 00 08 stw r9,8(r31)
ffc05fa0: 40 9e 00 30 bne- cr7,ffc05fd0 <rtems_termios_open+0xf8>
if (tty->device.firstOpen)
ffc05fa4: 80 1f 00 98 lwz r0,152(r31)
ffc05fa8: 2f 80 00 00 cmpwi cr7,r0,0
ffc05fac: 41 9e 00 18 beq- cr7,ffc05fc4 <rtems_termios_open+0xec> <== ALWAYS TAKEN
(*tty->device.firstOpen)(major, minor, arg);
ffc05fb0: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc05fb4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc05fb8: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED
ffc05fbc: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED
ffc05fc0: 4e 80 04 21 bctrl <== NOT EXECUTED
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
ffc05fc4: 80 1f 00 b4 lwz r0,180(r31)
ffc05fc8: 2f 80 00 02 cmpwi cr7,r0,2
ffc05fcc: 41 9e 00 5c beq- cr7,ffc06028 <rtems_termios_open+0x150>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
ffc05fd0: 80 7c 27 94 lwz r3,10132(r28)
ffc05fd4: 48 00 2e e5 bl ffc08eb8 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
ffc05fd8: 80 01 00 44 lwz r0,68(r1)
ffc05fdc: 7f 63 db 78 mr r3,r27
ffc05fe0: 81 81 00 08 lwz r12,8(r1)
ffc05fe4: 7c 08 03 a6 mtlr r0
ffc05fe8: 82 61 00 0c lwz r19,12(r1)
ffc05fec: 82 81 00 10 lwz r20,16(r1)
ffc05ff0: 7d 80 81 20 mtcrf 8,r12
ffc05ff4: 82 a1 00 14 lwz r21,20(r1)
ffc05ff8: 82 c1 00 18 lwz r22,24(r1)
ffc05ffc: 82 e1 00 1c lwz r23,28(r1)
ffc06000: 83 01 00 20 lwz r24,32(r1)
ffc06004: 83 21 00 24 lwz r25,36(r1)
ffc06008: 83 41 00 28 lwz r26,40(r1)
ffc0600c: 83 61 00 2c lwz r27,44(r1)
ffc06010: 83 81 00 30 lwz r28,48(r1)
ffc06014: 83 a1 00 34 lwz r29,52(r1)
ffc06018: 83 c1 00 38 lwz r30,56(r1)
ffc0601c: 83 e1 00 3c lwz r31,60(r1)
ffc06020: 38 21 00 40 addi r1,r1,64
ffc06024: 4e 80 00 20 blr
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(
ffc06028: 80 7f 00 c4 lwz r3,196(r31)
ffc0602c: 3c 80 ff c0 lis r4,-64
ffc06030: 38 84 7c 24 addi r4,r4,31780
ffc06034: 7f e5 fb 78 mr r5,r31
ffc06038: 48 00 33 1d bl ffc09354 <rtems_task_start>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
ffc0603c: 2f 83 00 00 cmpwi cr7,r3,0
ffc06040: 40 9e 02 dc bne- cr7,ffc0631c <rtems_termios_open+0x444><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
ffc06044: 80 7f 00 c8 lwz r3,200(r31)
ffc06048: 3c 80 ff c0 lis r4,-64
ffc0604c: 38 84 7f 54 addi r4,r4,32596
ffc06050: 7f e5 fb 78 mr r5,r31
ffc06054: 48 00 33 01 bl ffc09354 <rtems_task_start>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
ffc06058: 2f 83 00 00 cmpwi cr7,r3,0
ffc0605c: 41 9e ff 74 beq+ cr7,ffc05fd0 <rtems_termios_open+0xf8> <== ALWAYS TAKEN
ffc06060: 48 00 02 bc b ffc0631c <rtems_termios_open+0x444> <== NOT EXECUTED
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
ffc06064: 38 60 00 01 li r3,1
ffc06068: 38 80 00 e8 li r4,232
ffc0606c: 4b ff e7 e1 bl ffc0484c <calloc>
if (tty == NULL) {
ffc06070: 2f 83 00 00 cmpwi cr7,r3,0
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
ffc06074: 7c 79 1b 78 mr r25,r3
ffc06078: 7c 7f 1b 78 mr r31,r3
if (tty == NULL) {
ffc0607c: 41 9e 02 68 beq- cr7,ffc062e4 <rtems_termios_open+0x40c>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
ffc06080: 3f 00 00 00 lis r24,0
ffc06084: 80 18 21 a4 lwz r0,8612(r24)
ffc06088: 3b 18 21 a4 addi r24,r24,8612
ffc0608c: 90 03 00 64 stw r0,100(r3)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
ffc06090: 80 63 00 64 lwz r3,100(r3)
ffc06094: 4b ff ee 81 bl ffc04f14 <malloc>
if (tty->rawInBuf.theBuf == NULL) {
ffc06098: 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);
ffc0609c: 90 79 00 58 stw r3,88(r25)
ffc060a0: 7c 74 1b 78 mr r20,r3
if (tty->rawInBuf.theBuf == NULL) {
ffc060a4: 41 9e 02 38 beq- cr7,ffc062dc <rtems_termios_open+0x404>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
ffc060a8: 80 18 00 04 lwz r0,4(r24)
ffc060ac: 90 19 00 88 stw r0,136(r25)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
ffc060b0: 80 79 00 88 lwz r3,136(r25)
ffc060b4: 4b ff ee 61 bl ffc04f14 <malloc>
if (tty->rawOutBuf.theBuf == NULL) {
ffc060b8: 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);
ffc060bc: 90 79 00 7c stw r3,124(r25)
ffc060c0: 7c 73 1b 78 mr r19,r3
if (tty->rawOutBuf.theBuf == NULL) {
ffc060c4: 41 9e 02 10 beq- cr7,ffc062d4 <rtems_termios_open+0x3fc>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
ffc060c8: 80 78 00 08 lwz r3,8(r24)
ffc060cc: 4b ff ee 49 bl ffc04f14 <malloc>
if (tty->cbuf == NULL) {
ffc060d0: 2f 83 00 00 cmpwi cr7,r3,0
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
ffc060d4: 90 79 00 1c stw r3,28(r25)
if (tty->cbuf == NULL) {
ffc060d8: 41 9e 01 f4 beq- cr7,ffc062cc <rtems_termios_open+0x3f4><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
ffc060dc: 38 00 00 00 li r0,0
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
ffc060e0: 92 d9 00 00 stw r22,0(r25)
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
ffc060e4: 90 19 00 d4 stw r0,212(r25)
tty->tty_snd.sw_arg = NULL;
ffc060e8: 90 19 00 d8 stw r0,216(r25)
tty->tty_rcv.sw_pfn = NULL;
ffc060ec: 90 19 00 dc stw r0,220(r25)
tty->tty_rcv.sw_arg = NULL;
ffc060f0: 90 19 00 e0 stw r0,224(r25)
tty->tty_rcvwakeup = 0;
ffc060f4: 90 19 00 e4 stw r0,228(r25)
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
ffc060f8: 90 19 00 04 stw r0,4(r25)
if (rtems_termios_ttyHead != NULL)
ffc060fc: 41 92 00 08 beq- cr4,ffc06104 <rtems_termios_open+0x22c>
rtems_termios_ttyHead->back = tty;
ffc06100: 93 36 00 04 stw r25,4(r22)
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
ffc06104: 3d 20 00 00 lis r9,0
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
ffc06108: 93 35 27 9c stw r25,10140(r21)
if (rtems_termios_ttyTail == NULL)
ffc0610c: 80 09 27 98 lwz r0,10136(r9)
ffc06110: 2f 80 00 00 cmpwi cr7,r0,0
ffc06114: 41 9e 02 68 beq- cr7,ffc0637c <rtems_termios_open+0x4a4>
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
ffc06118: 88 78 00 0c lbz r3,12(r24)
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
ffc0611c: 38 80 00 01 li r4,1
ffc06120: 38 a0 00 54 li r5,84
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
ffc06124: 93 b9 00 10 stw r29,16(r25)
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
ffc06128: 64 63 54 52 oris r3,r3,21586
ffc0612c: 60 63 69 00 ori r3,r3,26880
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
tty->major = major;
ffc06130: 93 d9 00 0c stw r30,12(r25)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
ffc06134: 38 c0 00 00 li r6,0
ffc06138: 38 f9 00 14 addi r7,r25,20
ffc0613c: 48 00 28 f5 bl ffc08a30 <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)
ffc06140: 2f 83 00 00 cmpwi cr7,r3,0
ffc06144: 40 9e 01 d8 bne- cr7,ffc0631c <rtems_termios_open+0x444>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'o', c),
ffc06148: 88 78 00 0c lbz r3,12(r24)
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 (
ffc0614c: 38 80 00 01 li r4,1
ffc06150: 38 a0 00 54 li r5,84
ffc06154: 64 63 54 52 oris r3,r3,21586
ffc06158: 60 63 6f 00 ori r3,r3,28416
ffc0615c: 38 c0 00 00 li r6,0
ffc06160: 38 f9 00 18 addi r7,r25,24
ffc06164: 48 00 28 cd bl ffc08a30 <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)
ffc06168: 2f 83 00 00 cmpwi cr7,r3,0
ffc0616c: 40 9e 01 b0 bne- cr7,ffc0631c <rtems_termios_open+0x444>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'x', c),
ffc06170: 88 78 00 0c lbz r3,12(r24)
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 (
ffc06174: 38 80 00 00 li r4,0
ffc06178: 38 a0 00 20 li r5,32
ffc0617c: 64 63 54 52 oris r3,r3,21586
ffc06180: 60 63 78 00 ori r3,r3,30720
ffc06184: 38 c0 00 00 li r6,0
ffc06188: 38 f9 00 8c addi r7,r25,140
ffc0618c: 48 00 28 a5 bl ffc08a30 <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)
ffc06190: 7c 60 1b 79 mr. r0,r3
ffc06194: 40 82 01 88 bne- ffc0631c <rtems_termios_open+0x444>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
ffc06198: 81 37 00 1c lwz r9,28(r23)
ffc0619c: 80 97 00 00 lwz r4,0(r23)
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
ffc061a0: 2f 89 00 02 cmpwi cr7,r9,2
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
ffc061a4: 80 b7 00 04 lwz r5,4(r23)
ffc061a8: 80 d7 00 08 lwz r6,8(r23)
ffc061ac: 80 f7 00 0c lwz r7,12(r23)
ffc061b0: 81 17 00 10 lwz r8,16(r23)
ffc061b4: 81 57 00 14 lwz r10,20(r23)
ffc061b8: 81 77 00 18 lwz r11,24(r23)
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;
ffc061bc: 90 19 00 94 stw r0,148(r25)
/*
* Set callbacks
*/
tty->device = *callbacks;
ffc061c0: 90 99 00 98 stw r4,152(r25)
ffc061c4: 90 b9 00 9c stw r5,156(r25)
ffc061c8: 90 d9 00 a0 stw r6,160(r25)
ffc061cc: 90 f9 00 a4 stw r7,164(r25)
ffc061d0: 91 19 00 a8 stw r8,168(r25)
ffc061d4: 91 59 00 ac stw r10,172(r25)
ffc061d8: 91 79 00 b0 stw r11,176(r25)
ffc061dc: 91 39 00 b4 stw r9,180(r25)
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
ffc061e0: 41 9e 01 40 beq- cr7,ffc06320 <rtems_termios_open+0x448>
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
ffc061e4: 80 19 00 a0 lwz r0,160(r25)
ffc061e8: 2f 80 00 00 cmpwi cr7,r0,0
ffc061ec: 41 9e 01 08 beq- cr7,ffc062f4 <rtems_termios_open+0x41c>
ffc061f0: 80 19 00 b4 lwz r0,180(r25)
ffc061f4: 2f 80 00 02 cmpwi cr7,r0,2
ffc061f8: 41 9e 00 fc beq- cr7,ffc062f4 <rtems_termios_open+0x41c>
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
ffc061fc: 39 00 25 02 li r8,9474
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
ffc06200: 89 38 00 0c lbz r9,12(r24)
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
ffc06204: 91 19 00 30 stw r8,48(r25)
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
ffc06208: 39 00 18 05 li r8,6149
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
ffc0620c: 38 00 00 00 li r0,0
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
ffc06210: 91 19 00 34 stw r8,52(r25)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
ffc06214: 39 00 08 bd li r8,2237
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
ffc06218: 2f 89 00 7a cmpwi cr7,r9,122
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
ffc0621c: 90 19 00 b8 stw r0,184(r25)
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
ffc06220: 39 29 00 01 addi r9,r9,1
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
ffc06224: 91 19 00 38 stw r8,56(r25)
tty->termios.c_lflag =
ffc06228: 39 00 00 00 li r8,0
ffc0622c: 61 08 82 3b ori r8,r8,33339
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
ffc06230: 98 19 00 4c stb r0,76(r25)
tty->termios.c_cc[VEOL2] = '\000';
ffc06234: 98 19 00 51 stb r0,81(r25)
tty->termios.c_cc[VSTART] = '\021';
ffc06238: 38 00 00 11 li r0,17
ffc0623c: 98 19 00 49 stb r0,73(r25)
tty->termios.c_cc[VSTOP] = '\023';
ffc06240: 38 00 00 13 li r0,19
/* 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;
ffc06244: 81 59 00 64 lwz r10,100(r25)
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag =
ffc06248: 91 19 00 3c stw r8,60(r25)
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
ffc0624c: 39 00 00 03 li r8,3
/* 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;
ffc06250: 55 4a f8 7e rlwinm r10,r10,31,1,31
tty->highwater = tty->rawInBuf.Size * 3/4;
ffc06254: 81 79 00 64 lwz r11,100(r25)
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
ffc06258: 98 19 00 4a stb r0,74(r25)
tty->termios.c_cc[VSUSP] = '\032';
ffc0625c: 38 00 00 1a li r0,26
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;
ffc06260: 1d 6b 00 03 mulli r11,r11,3
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag =
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
ffc06264: 99 19 00 41 stb r8,65(r25)
tty->termios.c_cc[VQUIT] = '\034';
ffc06268: 39 00 00 1c li r8,28
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
ffc0626c: 98 19 00 4b stb r0,75(r25)
tty->termios.c_cc[VREPRINT] = '\022';
ffc06270: 38 00 00 12 li r0,18
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;
ffc06274: 55 6b f0 be rlwinm r11,r11,30,2,31
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag =
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
ffc06278: 99 19 00 42 stb r8,66(r25)
tty->termios.c_cc[VERASE] = '\177';
ffc0627c: 39 00 00 7f li r8,127
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
ffc06280: 98 19 00 4d stb r0,77(r25)
tty->termios.c_cc[VDISCARD] = '\017';
ffc06284: 38 00 00 0f li r0,15
tty->termios.c_lflag =
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
ffc06288: 99 19 00 43 stb r8,67(r25)
tty->termios.c_cc[VKILL] = '\025';
ffc0628c: 39 00 00 15 li r8,21
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
ffc06290: 98 19 00 4e stb r0,78(r25)
tty->termios.c_cc[VWERASE] = '\027';
ffc06294: 38 00 00 17 li r0,23
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
ffc06298: 99 19 00 44 stb r8,68(r25)
tty->termios.c_cc[VEOF] = '\004';
ffc0629c: 39 00 00 04 li r8,4
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
ffc062a0: 98 19 00 4f stb r0,79(r25)
tty->termios.c_cc[VLNEXT] = '\026';
ffc062a4: 38 00 00 16 li r0,22
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
ffc062a8: 99 19 00 45 stb r8,69(r25)
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
ffc062ac: 98 19 00 50 stb r0,80(r25)
/* 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;
ffc062b0: 91 59 00 bc stw r10,188(r25)
tty->highwater = tty->rawInBuf.Size * 3/4;
ffc062b4: 91 79 00 c0 stw r11,192(r25)
/*
* Bump name characer
*/
if (c++ == 'z')
ffc062b8: 99 38 00 0c stb r9,12(r24)
ffc062bc: 40 9e fc cc bne+ cr7,ffc05f88 <rtems_termios_open+0xb0>
c = 'a';
ffc062c0: 38 00 00 61 li r0,97
ffc062c4: 98 18 00 0c stb r0,12(r24)
ffc062c8: 4b ff fc c0 b ffc05f88 <rtems_termios_open+0xb0>
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
ffc062cc: 7e 63 9b 78 mr r3,r19 <== NOT EXECUTED
ffc062d0: 4b ff e8 29 bl ffc04af8 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
ffc062d4: 7e 83 a3 78 mr r3,r20
ffc062d8: 4b ff e8 21 bl ffc04af8 <free>
free(tty);
ffc062dc: 7f 23 cb 78 mr r3,r25
ffc062e0: 4b ff e8 19 bl ffc04af8 <free>
rtems_semaphore_release (rtems_termios_ttyMutex);
ffc062e4: 80 7c 27 94 lwz r3,10132(r28)
return RTEMS_NO_MEMORY;
ffc062e8: 3b 60 00 1a li r27,26
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
free((void *)(tty->rawInBuf.theBuf));
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
ffc062ec: 48 00 2b cd bl ffc08eb8 <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
ffc062f0: 4b ff fc e8 b ffc05fd8 <rtems_termios_open+0x100>
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'r', c),
ffc062f4: 88 78 00 0c lbz r3,12(r24)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
ffc062f8: 38 80 00 00 li r4,0
ffc062fc: 38 a0 00 24 li r5,36
ffc06300: 64 63 54 52 oris r3,r3,21586
ffc06304: 60 63 72 00 ori r3,r3,29184
ffc06308: 38 c0 00 00 li r6,0
ffc0630c: 38 f9 00 68 addi r7,r25,104
ffc06310: 48 00 27 21 bl ffc08a30 <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)
ffc06314: 2f 83 00 00 cmpwi cr7,r3,0
ffc06318: 41 9e fe e4 beq+ cr7,ffc061fc <rtems_termios_open+0x324><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
ffc0631c: 48 00 33 9d bl ffc096b8 <rtems_fatal_error_occurred>
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
rtems_build_name ('T', 'x', 'T', c),
ffc06320: 88 78 00 0c lbz r3,12(r24)
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
ffc06324: 38 80 00 0a li r4,10
ffc06328: 38 a0 04 00 li r5,1024
ffc0632c: 64 63 54 78 oris r3,r3,21624
ffc06330: 60 63 54 00 ori r3,r3,21504
ffc06334: 38 c0 05 00 li r6,1280
ffc06338: 38 e0 00 00 li r7,0
ffc0633c: 39 19 00 c8 addi r8,r25,200
ffc06340: 48 00 2c 65 bl ffc08fa4 <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)
ffc06344: 2f 83 00 00 cmpwi cr7,r3,0
ffc06348: 40 be ff d4 bne- cr7,ffc0631c <rtems_termios_open+0x444><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
rtems_build_name ('R', 'x', 'T', c),
ffc0634c: 88 78 00 0c lbz r3,12(r24)
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
ffc06350: 38 80 00 09 li r4,9
ffc06354: 38 a0 04 00 li r5,1024
ffc06358: 64 63 52 78 oris r3,r3,21112
ffc0635c: 60 63 54 00 ori r3,r3,21504
ffc06360: 38 c0 05 00 li r6,1280
ffc06364: 38 e0 00 00 li r7,0
ffc06368: 39 19 00 c4 addi r8,r25,196
ffc0636c: 48 00 2c 39 bl ffc08fa4 <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)
ffc06370: 2f 83 00 00 cmpwi cr7,r3,0
ffc06374: 41 9e fe 70 beq+ cr7,ffc061e4 <rtems_termios_open+0x30c><== ALWAYS TAKEN
ffc06378: 4b ff ff a4 b ffc0631c <rtems_termios_open+0x444> <== NOT EXECUTED
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
ffc0637c: 93 29 27 98 stw r25,10136(r9)
ffc06380: 4b ff fd 98 b ffc06118 <rtems_termios_open+0x240>
ffc069d4 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
ffc069d4: 94 21 ff d8 stwu r1,-40(r1)
ffc069d8: 7c 08 02 a6 mflr r0
ffc069dc: 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) {
ffc069e0: 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)
{
ffc069e4: 93 61 00 14 stw r27,20(r1)
ffc069e8: 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) {
ffc069ec: 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)
{
ffc069f0: 93 e1 00 24 stw r31,36(r1)
ffc069f4: 7c bf 2b 78 mr r31,r5
ffc069f8: 93 41 00 10 stw r26,16(r1)
ffc069fc: 93 81 00 18 stw r28,24(r1)
ffc06a00: 93 a1 00 1c stw r29,28(r1)
ffc06a04: 93 c1 00 20 stw r30,32(r1)
ffc06a08: 90 81 00 08 stw r4,8(r1)
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
ffc06a0c: 41 9e 01 2c beq- cr7,ffc06b38 <rtems_termios_puts+0x164>
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
ffc06a10: 80 01 00 08 lwz r0,8(r1)
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
ffc06a14: 83 85 00 80 lwz r28,128(r5)
while (len) {
ffc06a18: 2f 80 00 00 cmpwi cr7,r0,0
ffc06a1c: 41 9e 00 d0 beq- cr7,ffc06aec <rtems_termios_puts+0x118><== NEVER TAKEN
/*
* Send characters to device-specific code
*/
void
rtems_termios_puts (
ffc06a20: 3b 63 ff ff addi r27,r3,-1
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
ffc06a24: 3b a0 00 02 li r29,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;
ffc06a28: 3b 40 00 01 li r26,1
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
ffc06a2c: 80 1f 00 88 lwz r0,136(r31)
ffc06a30: 3b 9c 00 01 addi r28,r28,1
ffc06a34: 7d 3c 03 96 divwu r9,r28,r0
ffc06a38: 7c 09 01 d6 mullw r0,r9,r0
ffc06a3c: 7f 80 e0 50 subf r28,r0,r28
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc06a40: 7c 00 00 a6 mfmsr r0
ffc06a44: 7d 30 42 a6 mfsprg r9,0
ffc06a48: 7c 09 48 78 andc r9,r0,r9
ffc06a4c: 7d 20 01 24 mtmsr r9
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
ffc06a50: 83 df 00 84 lwz r30,132(r31)
ffc06a54: 7f 9e e0 00 cmpw cr7,r30,r28
ffc06a58: 40 9e 00 40 bne- cr7,ffc06a98 <rtems_termios_puts+0xc4>
tty->rawOutBufState = rob_wait;
ffc06a5c: 93 bf 00 94 stw r29,148(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc06a60: 7c 00 01 24 mtmsr r0
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
ffc06a64: 80 7f 00 8c lwz r3,140(r31)
ffc06a68: 38 80 00 00 li r4,0
ffc06a6c: 38 a0 00 00 li r5,0
ffc06a70: 48 00 22 c1 bl ffc08d30 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
ffc06a74: 2f 83 00 00 cmpwi cr7,r3,0
ffc06a78: 40 9e 00 dc bne- cr7,ffc06b54 <rtems_termios_puts+0x180><== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc06a7c: 7c 00 00 a6 mfmsr r0
ffc06a80: 7d 30 42 a6 mfsprg r9,0
ffc06a84: 7c 09 48 78 andc r9,r0,r9
ffc06a88: 7d 20 01 24 mtmsr r9
* 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) {
ffc06a8c: 81 3f 00 84 lwz r9,132(r31)
ffc06a90: 7f 89 f0 00 cmpw cr7,r9,r30
ffc06a94: 41 9e ff c8 beq+ cr7,ffc06a5c <rtems_termios_puts+0x88> <== NEVER TAKEN
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++;
ffc06a98: 8d 7b 00 01 lbzu r11,1(r27)
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
ffc06a9c: 7c 1e 03 78 mr r30,r0
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++;
ffc06aa0: 81 3f 00 7c lwz r9,124(r31)
ffc06aa4: 80 1f 00 80 lwz r0,128(r31)
ffc06aa8: 7d 69 01 ae stbx r11,r9,r0
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
ffc06aac: 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;
ffc06ab0: 93 9f 00 80 stw r28,128(r31)
if (tty->rawOutBufState == rob_idle) {
ffc06ab4: 2f 80 00 00 cmpwi cr7,r0,0
ffc06ab8: 40 9e 00 20 bne- cr7,ffc06ad8 <rtems_termios_puts+0x104>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
ffc06abc: 80 1f 00 b8 lwz r0,184(r31)
ffc06ac0: 70 09 00 10 andi. r9,r0,16
ffc06ac4: 41 82 00 50 beq- ffc06b14 <rtems_termios_puts+0x140> <== ALWAYS TAKEN
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
ffc06ac8: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc06acc: 60 00 00 20 ori r0,r0,32 <== NOT EXECUTED
ffc06ad0: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
ffc06ad4: 93 5f 00 94 stw r26,148(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc06ad8: 7f c0 01 24 mtmsr r30
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
ffc06adc: 80 01 00 08 lwz r0,8(r1)
ffc06ae0: 35 20 ff ff addic. r9,r0,-1
ffc06ae4: 91 21 00 08 stw r9,8(r1)
ffc06ae8: 40 82 ff 44 bne+ ffc06a2c <rtems_termios_puts+0x58>
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
ffc06aec: 80 01 00 2c lwz r0,44(r1)
ffc06af0: 83 41 00 10 lwz r26,16(r1)
ffc06af4: 7c 08 03 a6 mtlr r0
ffc06af8: 83 61 00 14 lwz r27,20(r1)
ffc06afc: 83 81 00 18 lwz r28,24(r1)
ffc06b00: 83 a1 00 1c lwz r29,28(r1)
ffc06b04: 83 c1 00 20 lwz r30,32(r1)
ffc06b08: 83 e1 00 24 lwz r31,36(r1)
ffc06b0c: 38 21 00 28 addi r1,r1,40
ffc06b10: 4e 80 00 20 blr
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,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
ffc06b14: 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,
ffc06b18: 38 a0 00 01 li r5,1
ffc06b1c: 80 9f 00 7c lwz r4,124(r31)
ffc06b20: 80 1f 00 a4 lwz r0,164(r31)
ffc06b24: 80 7f 00 10 lwz r3,16(r31)
ffc06b28: 7c 84 4a 14 add r4,r4,r9
ffc06b2c: 7c 09 03 a6 mtctr r0
ffc06b30: 4e 80 04 21 bctrl
ffc06b34: 4b ff ff a0 b ffc06ad4 <rtems_termios_puts+0x100>
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
ffc06b38: 80 05 00 a4 lwz r0,164(r5)
ffc06b3c: 7f 64 db 78 mr r4,r27
ffc06b40: 80 65 00 10 lwz r3,16(r5)
ffc06b44: 7c 09 03 a6 mtctr r0
ffc06b48: 80 a1 00 08 lwz r5,8(r1)
ffc06b4c: 4e 80 04 21 bctrl
return;
ffc06b50: 4b ff ff 9c b ffc06aec <rtems_termios_puts+0x118>
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
ffc06b54: 48 00 2b 65 bl ffc096b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
ffc073e0 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
ffc073e0: 94 21 ff d0 stwu r1,-48(r1)
ffc073e4: 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);
ffc073e8: 38 80 00 00 li r4,0
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
ffc073ec: 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);
ffc073f0: 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;
ffc073f4: 81 23 00 00 lwz r9,0(r3)
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
ffc073f8: 93 e1 00 2c stw r31,44(r1)
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc073fc: 83 e9 00 38 lwz r31,56(r9)
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
ffc07400: 93 41 00 18 stw r26,24(r1)
ffc07404: 7c 7a 1b 78 mr r26,r3
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);
ffc07408: 80 7f 00 14 lwz r3,20(r31)
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
ffc0740c: 93 01 00 10 stw r24,16(r1)
ffc07410: 93 21 00 14 stw r25,20(r1)
ffc07414: 93 61 00 1c stw r27,28(r1)
ffc07418: 92 c1 00 08 stw r22,8(r1)
ffc0741c: 92 e1 00 0c stw r23,12(r1)
ffc07420: 93 81 00 20 stw r28,32(r1)
ffc07424: 93 a1 00 24 stw r29,36(r1)
ffc07428: 93 c1 00 28 stw r30,40(r1)
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
ffc0742c: 83 7a 00 14 lwz r27,20(r26)
char *buffer = args->buffer;
ffc07430: 83 1a 00 10 lwz r24,16(r26)
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc07434: 48 00 18 fd bl ffc08d30 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
ffc07438: 7c 79 1b 79 mr. r25,r3
ffc0743c: 40 82 00 48 bne- ffc07484 <rtems_termios_read+0xa4> <== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
ffc07440: 80 1f 00 cc lwz r0,204(r31)
ffc07444: 3d 20 00 00 lis r9,0
ffc07448: 39 29 28 58 addi r9,r9,10328
ffc0744c: 54 00 28 34 rlwinm r0,r0,5,0,26
ffc07450: 7d 29 02 14 add r9,r9,r0
ffc07454: 80 09 00 08 lwz r0,8(r9)
ffc07458: 2f 80 00 00 cmpwi cr7,r0,0
ffc0745c: 41 9e 00 64 beq- cr7,ffc074c0 <rtems_termios_read+0xe0>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
ffc07460: 7c 09 03 a6 mtctr r0
ffc07464: 7f e3 fb 78 mr r3,r31
ffc07468: 7f 44 d3 78 mr r4,r26
ffc0746c: 4e 80 04 21 bctrl
tty->tty_rcvwakeup = 0;
ffc07470: 38 00 00 00 li r0,0
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
ffc07474: 7c 79 1b 78 mr r25,r3
tty->tty_rcvwakeup = 0;
ffc07478: 90 1f 00 e4 stw r0,228(r31)
rtems_semaphore_release (tty->isem);
ffc0747c: 80 7f 00 14 lwz r3,20(r31)
ffc07480: 48 00 1a 39 bl ffc08eb8 <rtems_semaphore_release>
}
args->bytes_moved = args->count - count;
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
ffc07484: 80 01 00 34 lwz r0,52(r1)
ffc07488: 7f 23 cb 78 mr r3,r25
ffc0748c: 82 c1 00 08 lwz r22,8(r1)
ffc07490: 7c 08 03 a6 mtlr r0
ffc07494: 82 e1 00 0c lwz r23,12(r1)
ffc07498: 83 01 00 10 lwz r24,16(r1)
ffc0749c: 83 21 00 14 lwz r25,20(r1)
ffc074a0: 83 41 00 18 lwz r26,24(r1)
ffc074a4: 83 61 00 1c lwz r27,28(r1)
ffc074a8: 83 81 00 20 lwz r28,32(r1)
ffc074ac: 83 a1 00 24 lwz r29,36(r1)
ffc074b0: 83 c1 00 28 lwz r30,40(r1)
ffc074b4: 83 e1 00 2c lwz r31,44(r1)
ffc074b8: 38 21 00 30 addi r1,r1,48
ffc074bc: 4e 80 00 20 blr
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
ffc074c0: 81 3f 00 24 lwz r9,36(r31)
ffc074c4: 80 1f 00 20 lwz r0,32(r31)
ffc074c8: 7f 89 00 00 cmpw cr7,r9,r0
ffc074cc: 41 9e 00 a8 beq- cr7,ffc07574 <rtems_termios_read+0x194><== ALWAYS TAKEN
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
ffc074d0: 2f 9b 00 00 cmpwi cr7,r27,0
ffc074d4: 41 9e 00 48 beq- cr7,ffc0751c <rtems_termios_read+0x13c><== NEVER TAKEN
ffc074d8: 81 3f 00 24 lwz r9,36(r31)
ffc074dc: 80 1f 00 20 lwz r0,32(r31)
ffc074e0: 7f 89 00 00 cmpw cr7,r9,r0
ffc074e4: 40 9c 00 38 bge- cr7,ffc0751c <rtems_termios_read+0x13c><== NEVER TAKEN
}
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
ffc074e8: 3b 18 ff ff addi r24,r24,-1
ffc074ec: 7f 69 03 a6 mtctr r27
ffc074f0: 48 00 00 10 b ffc07500 <rtems_termios_read+0x120>
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
ffc074f4: 80 1f 00 20 lwz r0,32(r31)
ffc074f8: 7f 80 48 00 cmpw cr7,r0,r9
ffc074fc: 40 9d 00 20 ble- cr7,ffc0751c <rtems_termios_read+0x13c>
*buffer++ = tty->cbuf[tty->cindex++];
ffc07500: 81 7f 00 1c lwz r11,28(r31)
count--;
ffc07504: 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++];
ffc07508: 7c 0b 48 ae lbzx r0,r11,r9
ffc0750c: 39 29 00 01 addi r9,r9,1
ffc07510: 9c 18 00 01 stbu r0,1(r24)
ffc07514: 91 3f 00 24 stw r9,36(r31)
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
ffc07518: 42 00 ff dc bdnz+ ffc074f4 <rtems_termios_read+0x114>
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
ffc0751c: 80 1a 00 14 lwz r0,20(r26)
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
ffc07520: 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;
ffc07524: 7f 7b 00 50 subf r27,r27,r0
tty->tty_rcvwakeup = 0;
ffc07528: 38 00 00 00 li r0,0
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
ffc0752c: 93 7a 00 1c stw r27,28(r26)
tty->tty_rcvwakeup = 0;
ffc07530: 90 1f 00 e4 stw r0,228(r31)
rtems_semaphore_release (tty->isem);
ffc07534: 48 00 19 85 bl ffc08eb8 <rtems_semaphore_release>
return sc;
}
ffc07538: 80 01 00 34 lwz r0,52(r1)
ffc0753c: 7f 23 cb 78 mr r3,r25
ffc07540: 82 c1 00 08 lwz r22,8(r1)
ffc07544: 7c 08 03 a6 mtlr r0
ffc07548: 82 e1 00 0c lwz r23,12(r1)
ffc0754c: 83 01 00 10 lwz r24,16(r1)
ffc07550: 83 21 00 14 lwz r25,20(r1)
ffc07554: 83 41 00 18 lwz r26,24(r1)
ffc07558: 83 61 00 1c lwz r27,28(r1)
ffc0755c: 83 81 00 20 lwz r28,32(r1)
ffc07560: 83 a1 00 24 lwz r29,36(r1)
ffc07564: 83 c1 00 28 lwz r30,40(r1)
ffc07568: 83 e1 00 2c lwz r31,44(r1)
ffc0756c: 38 21 00 30 addi r1,r1,48
ffc07570: 4e 80 00 20 blr
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
ffc07574: 80 1f 00 a0 lwz r0,160(r31)
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
ffc07578: 81 3f 00 28 lwz r9,40(r31)
if (tty->device.pollRead != NULL &&
ffc0757c: 2f 80 00 00 cmpwi cr7,r0,0
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
ffc07580: 93 3f 00 20 stw r25,32(r31)
ffc07584: 93 3f 00 24 stw r25,36(r31)
tty->read_start_column = tty->column;
ffc07588: 91 3f 00 2c stw r9,44(r31)
if (tty->device.pollRead != NULL &&
ffc0758c: 41 9e 00 10 beq- cr7,ffc0759c <rtems_termios_read+0x1bc>
ffc07590: 81 3f 00 b4 lwz r9,180(r31)
ffc07594: 2f 89 00 00 cmpwi cr7,r9,0
ffc07598: 41 9e 01 bc beq- cr7,ffc07754 <rtems_termios_read+0x374>
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
ffc0759c: 83 bf 00 74 lwz r29,116(r31)
rtems_status_code sc;
int wait = (int)1;
ffc075a0: 3b c0 00 01 li r30,1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
ffc075a4: 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)(
ffc075a8: 3a df 00 49 addi r22,r31,73
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
ffc075ac: 81 3f 00 5c lwz r9,92(r31)
ffc075b0: 80 1f 00 60 lwz r0,96(r31)
ffc075b4: 7f 89 00 00 cmpw cr7,r9,r0
ffc075b8: 41 9e 01 44 beq- cr7,ffc076fc <rtems_termios_read+0x31c>
(tty->ccount < (CBUFSIZE-1))) {
ffc075bc: 3b 97 21 a4 addi r28,r23,8612
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
ffc075c0: 80 1f 00 20 lwz r0,32(r31)
(tty->ccount < (CBUFSIZE-1))) {
ffc075c4: 81 3c 00 08 lwz r9,8(r28)
ffc075c8: 39 29 ff ff addi r9,r9,-1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
ffc075cc: 7f 89 00 00 cmpw cr7,r9,r0
ffc075d0: 41 bd 00 48 bgt+ cr7,ffc07618 <rtems_termios_read+0x238><== ALWAYS TAKEN
ffc075d4: 48 00 01 28 b ffc076fc <rtems_termios_read+0x31c> <== NOT EXECUTED
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
ffc075d8: 7f a3 eb 78 mr r3,r29
ffc075dc: 7f e4 fb 78 mr r4,r31
ffc075e0: 4b ff fc 41 bl ffc07220 <siproc>
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
ffc075e4: 81 3f 00 5c lwz r9,92(r31)
ffc075e8: 80 1f 00 60 lwz r0,96(r31)
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
ffc075ec: 30 63 ff ff addic r3,r3,-1
ffc075f0: 7c 63 19 10 subfe r3,r3,r3
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
ffc075f4: 83 bf 00 70 lwz r29,112(r31)
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
ffc075f8: 7f 89 00 00 cmpw cr7,r9,r0
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
ffc075fc: 7f de 18 38 and r30,r30,r3
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
ffc07600: 41 9e 00 fc beq- cr7,ffc076fc <rtems_termios_read+0x31c>
(tty->ccount < (CBUFSIZE-1))) {
ffc07604: 81 7c 00 08 lwz r11,8(r28)
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
ffc07608: 81 3f 00 20 lwz r9,32(r31)
(tty->ccount < (CBUFSIZE-1))) {
ffc0760c: 38 0b ff ff addi r0,r11,-1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
ffc07610: 7f 89 00 00 cmpw cr7,r9,r0
ffc07614: 40 9c 00 e8 bge- cr7,ffc076fc <rtems_termios_read+0x31c><== NEVER TAKEN
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
ffc07618: 81 3f 00 5c lwz r9,92(r31)
ffc0761c: 81 7f 00 64 lwz r11,100(r31)
ffc07620: 39 29 00 01 addi r9,r9,1
c = tty->rawInBuf.theBuf[newHead];
ffc07624: 81 1f 00 58 lwz r8,88(r31)
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;
ffc07628: 7c 09 5b 96 divwu r0,r9,r11
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
ffc0762c: 81 5f 00 bc lwz r10,188(r31)
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;
ffc07630: 7c 00 59 d6 mullw r0,r0,r11
ffc07634: 7c 00 48 50 subf r0,r0,r9
c = tty->rawInBuf.theBuf[newHead];
ffc07638: 7f a8 00 ae lbzx r29,r8,r0
tty->rawInBuf.Head = newHead;
ffc0763c: 90 1f 00 5c stw r0,92(r31)
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
ffc07640: 81 7f 00 60 lwz r11,96(r31)
ffc07644: 81 1f 00 64 lwz r8,100(r31)
% tty->rawInBuf.Size)
ffc07648: 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)
ffc0764c: 7d 68 5a 14 add r11,r8,r11
ffc07650: 7c 00 58 50 subf r0,r0,r11
% tty->rawInBuf.Size)
ffc07654: 7d 60 4b 96 divwu r11,r0,r9
ffc07658: 7d 2b 49 d6 mullw r9,r11,r9
ffc0765c: 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)
ffc07660: 7f 80 50 40 cmplw cr7,r0,r10
ffc07664: 40 9c 00 50 bge- cr7,ffc076b4 <rtems_termios_read+0x2d4><== NEVER TAKEN
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
ffc07668: 80 1f 00 b8 lwz r0,184(r31)
ffc0766c: 54 00 00 3c rlwinm r0,r0,0,0,30
ffc07670: 90 1f 00 b8 stw r0,184(r31)
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
ffc07674: 80 1f 00 b8 lwz r0,184(r31)
ffc07678: 70 00 02 02 andi. r0,r0,514
ffc0767c: 2f 80 02 02 cmpwi cr7,r0,514
ffc07680: 41 9e 00 a0 beq- cr7,ffc07720 <rtems_termios_read+0x340><== NEVER TAKEN
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
ffc07684: 80 1f 00 b8 lwz r0,184(r31)
ffc07688: 70 09 01 00 andi. r9,r0,256
ffc0768c: 41 82 00 28 beq- ffc076b4 <rtems_termios_read+0x2d4> <== ALWAYS TAKEN
tty->flow_ctrl &= ~FL_IRTSOFF;
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
ffc07690: 80 1f 00 b0 lwz r0,176(r31) <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
ffc07694: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
ffc07698: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
ffc0769c: 55 29 07 b8 rlwinm r9,r9,0,30,28 <== NOT EXECUTED
ffc076a0: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
ffc076a4: 41 9e 00 10 beq- cr7,ffc076b4 <rtems_termios_read+0x2d4><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
ffc076a8: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc076ac: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc076b0: 4e 80 04 21 bctrl <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
ffc076b4: 80 1f 00 3c lwz r0,60(r31)
ffc076b8: 70 09 00 02 andi. r9,r0,2
ffc076bc: 40 a2 ff 1c bne- ffc075d8 <rtems_termios_read+0x1f8> <== ALWAYS TAKEN
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
ffc076c0: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc076c4: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc076c8: 4b ff fb 59 bl ffc07220 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
ffc076cc: 88 1f 00 47 lbz r0,71(r31) <== NOT EXECUTED
ffc076d0: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
ffc076d4: 83 bf 00 70 lwz r29,112(r31) <== NOT EXECUTED
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
ffc076d8: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
ffc076dc: 81 3f 00 5c lwz r9,92(r31) <== NOT EXECUTED
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
ffc076e0: 7c 00 00 26 mfcr r0 <== NOT EXECUTED
ffc076e4: 54 00 ef fe rlwinm r0,r0,29,31,31 <== NOT EXECUTED
ffc076e8: 7c 00 00 d0 neg r0,r0 <== NOT EXECUTED
ffc076ec: 7f de 00 38 and r30,r30,r0 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
ffc076f0: 80 1f 00 60 lwz r0,96(r31) <== NOT EXECUTED
ffc076f4: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED
ffc076f8: 40 9e ff 0c bne+ cr7,ffc07604 <rtems_termios_read+0x224><== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
ffc076fc: 2f 9e 00 00 cmpwi cr7,r30,0
ffc07700: 41 9e fd d0 beq+ cr7,ffc074d0 <rtems_termios_read+0xf0>
sc = rtems_semaphore_obtain(
ffc07704: 80 7f 00 68 lwz r3,104(r31)
ffc07708: 7f a5 eb 78 mr r5,r29
ffc0770c: 80 9f 00 6c lwz r4,108(r31)
ffc07710: 48 00 16 21 bl ffc08d30 <rtems_semaphore_obtain>
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
ffc07714: 2f 83 00 00 cmpwi cr7,r3,0
ffc07718: 41 9e fe 94 beq+ cr7,ffc075ac <rtems_termios_read+0x1cc><== ALWAYS TAKEN
ffc0771c: 4b ff fd b4 b ffc074d0 <rtems_termios_read+0xf0> <== NOT EXECUTED
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
ffc07720: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED
ffc07724: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc07728: 41 9e 00 10 beq- cr7,ffc07738 <rtems_termios_read+0x358><== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
ffc0772c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED
ffc07730: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED
ffc07734: 41 a2 ff 50 beq- ffc07684 <rtems_termios_read+0x2a4> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
ffc07738: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED
ffc0773c: 7e c4 b3 78 mr r4,r22 <== NOT EXECUTED
ffc07740: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc07744: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc07748: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc0774c: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc07750: 4b ff ff 64 b ffc076b4 <rtems_termios_read+0x2d4> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
ffc07754: 81 3f 00 3c lwz r9,60(r31)
ffc07758: 71 2b 00 02 andi. r11,r9,2
ffc0775c: 41 82 00 34 beq- ffc07790 <rtems_termios_read+0x3b0>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
ffc07760: 80 7f 00 10 lwz r3,16(r31)
ffc07764: 7c 09 03 a6 mtctr r0
ffc07768: 4e 80 04 21 bctrl
if (n < 0) {
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
ffc0776c: 7f e4 fb 78 mr r4,r31
int n;
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
ffc07770: 2c 03 00 00 cmpwi r3,0
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
ffc07774: 54 63 06 3e clrlwi r3,r3,24
int n;
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
ffc07778: 41 80 00 c0 blt- ffc07838 <rtems_termios_read+0x458>
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
ffc0777c: 4b ff fa a5 bl ffc07220 <siproc>
ffc07780: 2f 83 00 00 cmpwi cr7,r3,0
ffc07784: 40 be fd 4c bne- cr7,ffc074d0 <rtems_termios_read+0xf0>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
ffc07788: 80 1f 00 a0 lwz r0,160(r31)
ffc0778c: 4b ff ff d4 b ffc07760 <rtems_termios_read+0x380>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
ffc07790: 48 00 0d 71 bl ffc08500 <rtems_clock_get_ticks_since_boot>
ffc07794: 7c 7e 1b 78 mr r30,r3
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
ffc07798: 80 1f 00 a0 lwz r0,160(r31)
ffc0779c: 80 7f 00 10 lwz r3,16(r31)
ffc077a0: 7c 09 03 a6 mtctr r0
ffc077a4: 4e 80 04 21 bctrl
if (n < 0) {
ffc077a8: 2c 03 00 00 cmpwi r3,0
ffc077ac: 41 80 00 38 blt- ffc077e4 <rtems_termios_read+0x404>
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
ffc077b0: 54 63 06 3e clrlwi r3,r3,24
ffc077b4: 7f e4 fb 78 mr r4,r31
ffc077b8: 4b ff fa 69 bl ffc07220 <siproc>
if (tty->ccount >= tty->termios.c_cc[VMIN])
ffc077bc: 88 1f 00 47 lbz r0,71(r31)
ffc077c0: 81 3f 00 20 lwz r9,32(r31)
ffc077c4: 7f 89 00 00 cmpw cr7,r9,r0
ffc077c8: 40 bc fd 08 bge- cr7,ffc074d0 <rtems_termios_read+0xf0> <== NEVER TAKEN
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
ffc077cc: 2f 80 00 00 cmpwi cr7,r0,0
ffc077d0: 41 be ff c8 beq- cr7,ffc07798 <rtems_termios_read+0x3b8><== NEVER TAKEN
ffc077d4: 88 1f 00 46 lbz r0,70(r31)
ffc077d8: 2f 80 00 00 cmpwi cr7,r0,0
ffc077dc: 41 9e ff bc beq+ cr7,ffc07798 <rtems_termios_read+0x3b8><== NEVER TAKEN
ffc077e0: 4b ff ff b0 b ffc07790 <rtems_termios_read+0x3b0>
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
ffc077e4: 88 1f 00 47 lbz r0,71(r31)
ffc077e8: 2f 80 00 00 cmpwi cr7,r0,0
ffc077ec: 41 9e 00 28 beq- cr7,ffc07814 <rtems_termios_read+0x434><== NEVER TAKEN
if (tty->termios.c_cc[VTIME] && tty->ccount) {
ffc077f0: 88 1f 00 46 lbz r0,70(r31)
ffc077f4: 2f 80 00 00 cmpwi cr7,r0,0
ffc077f8: 41 9e 00 10 beq- cr7,ffc07808 <rtems_termios_read+0x428><== NEVER TAKEN
ffc077fc: 80 1f 00 20 lwz r0,32(r31)
ffc07800: 2f 80 00 00 cmpwi cr7,r0,0
ffc07804: 40 9e 00 1c bne- cr7,ffc07820 <rtems_termios_read+0x440>
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
ffc07808: 38 60 00 01 li r3,1
ffc0780c: 48 00 1c 7d bl ffc09488 <rtems_task_wake_after>
ffc07810: 4b ff ff 88 b ffc07798 <rtems_termios_read+0x3b8>
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
ffc07814: 88 1f 00 46 lbz r0,70(r31) <== NOT EXECUTED
ffc07818: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc0781c: 41 be fc b4 beq- cr7,ffc074d0 <rtems_termios_read+0xf0> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
ffc07820: 48 00 0c e1 bl ffc08500 <rtems_clock_get_ticks_since_boot>
if ((now - then) > tty->vtimeTicks) {
ffc07824: 80 1f 00 54 lwz r0,84(r31)
ffc07828: 7c 7e 18 50 subf r3,r30,r3
ffc0782c: 7f 83 00 40 cmplw cr7,r3,r0
ffc07830: 40 9d ff d8 ble+ cr7,ffc07808 <rtems_termios_read+0x428>
ffc07834: 4b ff fc 9c b ffc074d0 <rtems_termios_read+0xf0>
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
ffc07838: 38 60 00 01 li r3,1
ffc0783c: 48 00 1c 4d bl ffc09488 <rtems_task_wake_after>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
ffc07840: 80 1f 00 a0 lwz r0,160(r31)
ffc07844: 4b ff ff 1c b ffc07760 <rtems_termios_read+0x380>
ffc07ccc <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)
{
ffc07ccc: 94 21 ff e8 stwu r1,-24(r1)
ffc07cd0: 7c 08 02 a6 mflr r0
ffc07cd4: 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))
ffc07cd8: 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)
{
ffc07cdc: 93 e1 00 14 stw r31,20(r1)
ffc07ce0: 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))
ffc07ce4: 70 00 04 03 andi. r0,r0,1027
* 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)
{
ffc07ce8: 93 a1 00 0c stw r29,12(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))
ffc07cec: 2f 80 04 01 cmpwi cr7,r0,1025
* 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)
{
ffc07cf0: 93 c1 00 10 stw r30,16(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))
ffc07cf4: 41 9e 01 5c beq- cr7,ffc07e50 <rtems_termios_refill_transmitter+0x184><== NEVER TAKEN
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
ffc07cf8: 80 03 00 b8 lwz r0,184(r3)
ffc07cfc: 54 00 07 be clrlwi r0,r0,30
ffc07d00: 2f 80 00 02 cmpwi cr7,r0,2
ffc07d04: 41 9e 01 b4 beq- cr7,ffc07eb8 <rtems_termios_refill_transmitter+0x1ec><== NEVER TAKEN
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
ffc07d08: 81 23 00 80 lwz r9,128(r3)
ffc07d0c: 80 03 00 84 lwz r0,132(r3)
ffc07d10: 7f 89 00 00 cmpw cr7,r9,r0
ffc07d14: 41 9e 00 d8 beq- cr7,ffc07dec <rtems_termios_refill_transmitter+0x120>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc07d18: 7c 00 00 a6 mfmsr r0
ffc07d1c: 7d 30 42 a6 mfsprg r9,0
ffc07d20: 7c 09 48 78 andc r9,r0,r9
ffc07d24: 7d 20 01 24 mtmsr r9
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
tty->t_dqlen = 0;
ffc07d28: 39 20 00 00 li r9,0
}
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
ffc07d2c: 83 c3 00 90 lwz r30,144(r3)
tty->t_dqlen = 0;
ffc07d30: 91 23 00 90 stw r9,144(r3)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc07d34: 7c 00 01 24 mtmsr r0
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
ffc07d38: 80 03 00 84 lwz r0,132(r3)
ffc07d3c: 81 23 00 88 lwz r9,136(r3)
ffc07d40: 7c 1e 02 14 add r0,r30,r0
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
ffc07d44: 81 63 00 94 lwz r11,148(r3)
rtems_interrupt_disable(level);
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
ffc07d48: 7f c0 4b 96 divwu r30,r0,r9
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
ffc07d4c: 2f 8b 00 02 cmpwi cr7,r11,2
rtems_interrupt_disable(level);
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
ffc07d50: 7f de 49 d6 mullw r30,r30,r9
ffc07d54: 7f de 00 50 subf r30,r30,r0
tty->rawOutBuf.Tail = newTail;
ffc07d58: 93 c3 00 84 stw r30,132(r3)
if (tty->rawOutBufState == rob_wait) {
ffc07d5c: 41 9e 00 e8 beq- cr7,ffc07e44 <rtems_termios_refill_transmitter+0x178>
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
ffc07d60: 80 1f 00 80 lwz r0,128(r31)
ffc07d64: 7f 80 f0 00 cmpw cr7,r0,r30
ffc07d68: 41 9e 00 a0 beq- cr7,ffc07e08 <rtems_termios_refill_transmitter+0x13c>
if ( tty->tty_snd.sw_pfn != NULL) {
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
ffc07d6c: 80 1f 00 b8 lwz r0,184(r31)
ffc07d70: 70 00 02 10 andi. r0,r0,528
ffc07d74: 2f 80 02 10 cmpwi cr7,r0,528
ffc07d78: 41 9e 01 a8 beq- cr7,ffc07f20 <rtems_termios_refill_transmitter+0x254><== NEVER TAKEN
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
ffc07d7c: 80 1f 00 80 lwz r0,128(r31)
ffc07d80: 7f 9e 00 40 cmplw cr7,r30,r0
ffc07d84: 41 9d 00 b4 bgt- cr7,ffc07e38 <rtems_termios_refill_transmitter+0x16c>
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
ffc07d88: 83 bf 00 80 lwz r29,128(r31)
ffc07d8c: 7f be e8 50 subf r29,r30,r29
/* 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)) {
ffc07d90: 80 1f 00 b8 lwz r0,184(r31)
ffc07d94: 7f a5 eb 78 mr r5,r29
ffc07d98: 70 09 06 00 andi. r9,r0,1536
ffc07d9c: 41 82 00 0c beq- ffc07da8 <rtems_termios_refill_transmitter+0xdc>
ffc07da0: 38 a0 00 01 li r5,1
nToSend = 1;
ffc07da4: 3b a0 00 01 li r29,1
}
tty->rawOutBufState = rob_busy; /*apm*/
ffc07da8: 38 00 00 01 li r0,1
(*tty->device.write)(
ffc07dac: 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*/
ffc07db0: 90 1f 00 94 stw r0,148(r31)
(*tty->device.write)(
ffc07db4: 7c 84 f2 14 add r4,r4,r30
ffc07db8: 80 1f 00 a4 lwz r0,164(r31)
ffc07dbc: 80 7f 00 10 lwz r3,16(r31)
ffc07dc0: 7c 09 03 a6 mtctr r0
ffc07dc4: 4e 80 04 21 bctrl
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
ffc07dc8: 93 df 00 84 stw r30,132(r31)
}
return nToSend;
}
ffc07dcc: 80 01 00 1c lwz r0,28(r1)
ffc07dd0: 7f a3 eb 78 mr r3,r29
ffc07dd4: 83 c1 00 10 lwz r30,16(r1)
ffc07dd8: 7c 08 03 a6 mtlr r0
ffc07ddc: 83 a1 00 0c lwz r29,12(r1)
ffc07de0: 83 e1 00 14 lwz r31,20(r1)
ffc07de4: 38 21 00 18 addi r1,r1,24
ffc07de8: 4e 80 00 20 blr
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
ffc07dec: 80 03 00 94 lwz r0,148(r3)
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
ffc07df0: 3b a0 00 00 li r29,0
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
ffc07df4: 2f 80 00 02 cmpwi cr7,r0,2
ffc07df8: 40 9e ff d4 bne+ cr7,ffc07dcc <rtems_termios_refill_transmitter+0x100><== ALWAYS TAKEN
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
ffc07dfc: 80 63 00 8c lwz r3,140(r3) <== NOT EXECUTED
ffc07e00: 48 00 10 b9 bl ffc08eb8 <rtems_semaphore_release> <== NOT EXECUTED
ffc07e04: 4b ff ff c8 b ffc07dcc <rtems_termios_refill_transmitter+0x100><== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
ffc07e08: 80 1f 00 d4 lwz r0,212(r31)
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
ffc07e0c: 39 20 00 00 li r9,0
ffc07e10: 91 3f 00 94 stw r9,148(r31)
nToSend = 0;
ffc07e14: 3b a0 00 00 li r29,0
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
ffc07e18: 2f 80 00 00 cmpwi cr7,r0,0
ffc07e1c: 41 be ff ac beq- cr7,ffc07dc8 <rtems_termios_refill_transmitter+0xfc><== ALWAYS TAKEN
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
ffc07e20: 38 7f 00 30 addi r3,r31,48 <== NOT EXECUTED
ffc07e24: 80 9f 00 d8 lwz r4,216(r31) <== NOT EXECUTED
ffc07e28: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc07e2c: 4e 80 04 21 bctrl <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
ffc07e30: 93 df 00 84 stw r30,132(r31) <== NOT EXECUTED
ffc07e34: 4b ff ff 98 b ffc07dcc <rtems_termios_refill_transmitter+0x100><== NOT EXECUTED
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
ffc07e38: 83 bf 00 88 lwz r29,136(r31)
ffc07e3c: 7f be e8 50 subf r29,r30,r29
ffc07e40: 4b ff ff 50 b ffc07d90 <rtems_termios_refill_transmitter+0xc4>
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
ffc07e44: 80 63 00 8c lwz r3,140(r3)
ffc07e48: 48 00 10 71 bl ffc08eb8 <rtems_semaphore_release>
ffc07e4c: 4b ff ff 14 b ffc07d60 <rtems_termios_refill_transmitter+0x94>
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
ffc07e50: 80 03 00 a4 lwz r0,164(r3) <== NOT EXECUTED
ffc07e54: 38 9f 00 4a addi r4,r31,74 <== NOT EXECUTED
ffc07e58: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc07e5c: 80 63 00 10 lwz r3,16(r3) <== NOT EXECUTED
ffc07e60: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc07e64: 4e 80 04 21 bctrl <== NOT EXECUTED
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc07e68: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED
ffc07e6c: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED
ffc07e70: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED
ffc07e74: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->t_dqlen--;
ffc07e78: 81 7f 00 90 lwz r11,144(r31) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
ffc07e7c: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
ffc07e80: 39 6b ff ff addi r11,r11,-1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
ffc07e84: 61 29 00 02 ori r9,r9,2 <== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
ffc07e88: 91 7f 00 90 stw r11,144(r31) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
ffc07e8c: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc07e90: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
ffc07e94: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->t_dqlen--;
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
ffc07e98: 3b a0 00 01 li r29,1 <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
ffc07e9c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc07ea0: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED
ffc07ea4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc07ea8: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED
ffc07eac: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED
ffc07eb0: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED
ffc07eb4: 4e 80 00 20 blr <== NOT EXECUTED
* FIXME: this .write call will generate another
* dequeue callback. This will advance the "Tail" in the data
* buffer, although the corresponding data is not yet out!
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
ffc07eb8: 80 03 00 a4 lwz r0,164(r3) <== NOT EXECUTED
ffc07ebc: 38 9f 00 49 addi r4,r31,73 <== NOT EXECUTED
ffc07ec0: 38 a0 00 01 li r5,1 <== NOT EXECUTED
ffc07ec4: 80 63 00 10 lwz r3,16(r3) <== NOT EXECUTED
ffc07ec8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc07ecc: 4e 80 04 21 bctrl <== NOT EXECUTED
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc07ed0: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED
ffc07ed4: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED
ffc07ed8: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED
ffc07edc: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->t_dqlen--;
ffc07ee0: 81 7f 00 90 lwz r11,144(r31) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
ffc07ee4: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
ffc07ee8: 39 6b ff ff addi r11,r11,-1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
ffc07eec: 55 29 07 fa rlwinm r9,r9,0,31,29 <== NOT EXECUTED
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
ffc07ef0: 91 7f 00 90 stw r11,144(r31) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
ffc07ef4: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc07ef8: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
ffc07efc: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->t_dqlen--;
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
ffc07f00: 3b a0 00 01 li r29,1 <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
ffc07f04: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc07f08: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED
ffc07f0c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc07f10: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED
ffc07f14: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED
ffc07f18: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED
ffc07f1c: 4e 80 00 20 blr <== NOT EXECUTED
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc07f20: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED
ffc07f24: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED
ffc07f28: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED
ffc07f2c: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
tty->flow_ctrl |= FL_OSTOP;
ffc07f30: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED
ffc07f34: 61 29 00 20 ori r9,r9,32 <== NOT EXECUTED
ffc07f38: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
ffc07f3c: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc07f40: 91 3f 00 94 stw r9,148(r31) <== NOT EXECUTED
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc07f44: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 0;
ffc07f48: 3b a0 00 00 li r29,0 <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
ffc07f4c: 93 df 00 84 stw r30,132(r31) <== NOT EXECUTED
ffc07f50: 4b ff fe 7c b ffc07dcc <rtems_termios_refill_transmitter+0x100><== NOT EXECUTED
ffc07c24 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
ffc07c24: 94 21 ff d8 stwu r1,-40(r1)
ffc07c28: 7c 08 02 a6 mflr r0
ffc07c2c: 93 a1 00 1c stw r29,28(r1)
ffc07c30: 3b a1 00 08 addi r29,r1,8
ffc07c34: 93 c1 00 20 stw r30,32(r1)
ffc07c38: 3b c1 00 0c addi r30,r1,12
ffc07c3c: 93 e1 00 24 stw r31,36(r1)
ffc07c40: 7c 7f 1b 78 mr r31,r3
ffc07c44: 90 01 00 2c stw r0,44(r1)
ffc07c48: 48 00 00 20 b ffc07c68 <rtems_termios_rxdaemon+0x44>
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
ffc07c4c: 80 1f 00 a0 lwz r0,160(r31)
ffc07c50: 80 7f 00 10 lwz r3,16(r31)
ffc07c54: 7c 09 03 a6 mtctr r0
ffc07c58: 4e 80 04 21 bctrl
if (c != EOF) {
ffc07c5c: 2f 83 ff ff cmpwi cr7,r3,-1
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
ffc07c60: 7c 60 1b 78 mr r0,r3
if (c != EOF) {
ffc07c64: 40 9e 00 50 bne- cr7,ffc07cb4 <rtems_termios_rxdaemon+0x90>
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
ffc07c68: 7f c6 f3 78 mr r6,r30
ffc07c6c: 38 80 00 02 li r4,2
ffc07c70: 38 a0 00 00 li r5,0
ffc07c74: 38 60 00 03 li r3,3
ffc07c78: 48 00 09 1d bl ffc08594 <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) {
ffc07c7c: 80 01 00 0c lwz r0,12(r1)
ffc07c80: 70 09 00 01 andi. r9,r0,1
ffc07c84: 41 82 ff c8 beq+ ffc07c4c <rtems_termios_rxdaemon+0x28> <== ALWAYS TAKEN
tty->rxTaskId = 0;
ffc07c88: 38 00 00 00 li r0,0 <== NOT EXECUTED
ffc07c8c: 90 1f 00 c4 stw r0,196(r31) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
ffc07c90: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc07c94: 48 00 14 dd bl ffc09170 <rtems_task_delete> <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
ffc07c98: 80 1f 00 a0 lwz r0,160(r31) <== NOT EXECUTED
ffc07c9c: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED
ffc07ca0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc07ca4: 4e 80 04 21 bctrl <== NOT EXECUTED
if (c != EOF) {
ffc07ca8: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
ffc07cac: 7c 60 1b 78 mr r0,r3 <== NOT EXECUTED
if (c != EOF) {
ffc07cb0: 41 9e ff b8 beq+ cr7,ffc07c68 <rtems_termios_rxdaemon+0x44><== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
ffc07cb4: 7f e3 fb 78 mr r3,r31
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
ffc07cb8: 98 01 00 08 stb r0,8(r1)
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
ffc07cbc: 7f a4 eb 78 mr r4,r29
ffc07cc0: 38 a0 00 01 li r5,1
ffc07cc4: 4b ff fb ad bl ffc07870 <rtems_termios_enqueue_raw_characters>
ffc07cc8: 4b ff ff a0 b ffc07c68 <rtems_termios_rxdaemon+0x44>
ffc07f54 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
ffc07f54: 94 21 ff d8 stwu r1,-40(r1)
ffc07f58: 7c 08 02 a6 mflr r0
ffc07f5c: 93 c1 00 20 stw r30,32(r1)
ffc07f60: 3f c0 00 00 lis r30,0
ffc07f64: 3b de 28 58 addi r30,r30,10328
ffc07f68: 93 a1 00 1c stw r29,28(r1)
ffc07f6c: 3b a1 00 08 addi r29,r1,8
ffc07f70: 93 e1 00 24 stw r31,36(r1)
ffc07f74: 7c 7f 1b 78 mr r31,r3
ffc07f78: 90 01 00 2c stw r0,44(r1)
ffc07f7c: 48 00 00 30 b ffc07fac <rtems_termios_txdaemon+0x58>
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
ffc07f80: 81 3f 00 cc lwz r9,204(r31)
rtems_termios_linesw[tty->t_line].l_start(tty);
ffc07f84: 7f e3 fb 78 mr r3,r31
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
ffc07f88: 55 29 28 34 rlwinm r9,r9,5,0,26
ffc07f8c: 7d 3e 4a 14 add r9,r30,r9
ffc07f90: 80 09 00 14 lwz r0,20(r9)
ffc07f94: 2f 80 00 00 cmpwi cr7,r0,0
ffc07f98: 41 9e 00 0c beq- cr7,ffc07fa4 <rtems_termios_txdaemon+0x50><== ALWAYS TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
ffc07f9c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc07fa0: 4e 80 04 21 bctrl <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
ffc07fa4: 7f e3 fb 78 mr r3,r31
ffc07fa8: 4b ff fd 25 bl ffc07ccc <rtems_termios_refill_transmitter>
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
ffc07fac: 38 80 00 02 li r4,2
ffc07fb0: 38 a0 00 00 li r5,0
ffc07fb4: 7f a6 eb 78 mr r6,r29
ffc07fb8: 38 60 00 03 li r3,3
ffc07fbc: 48 00 05 d9 bl ffc08594 <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) {
ffc07fc0: 80 01 00 08 lwz r0,8(r1)
ffc07fc4: 70 09 00 01 andi. r9,r0,1
ffc07fc8: 41 82 ff b8 beq+ ffc07f80 <rtems_termios_txdaemon+0x2c> <== ALWAYS TAKEN
tty->txTaskId = 0;
ffc07fcc: 38 00 00 00 li r0,0 <== NOT EXECUTED
ffc07fd0: 90 1f 00 c8 stw r0,200(r31) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
ffc07fd4: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc07fd8: 48 00 11 99 bl ffc09170 <rtems_task_delete> <== NOT EXECUTED
ffc07fdc: 4b ff ff a4 b ffc07f80 <rtems_termios_txdaemon+0x2c> <== NOT EXECUTED
ffc072a4 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
ffc072a4: 94 21 ff e0 stwu r1,-32(r1)
ffc072a8: 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);
ffc072ac: 38 80 00 00 li r4,0
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
ffc072b0: 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);
ffc072b4: 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;
ffc072b8: 81 23 00 00 lwz r9,0(r3)
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
ffc072bc: 93 e1 00 1c stw r31,28(r1)
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
ffc072c0: 83 e9 00 38 lwz r31,56(r9)
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
ffc072c4: 93 c1 00 18 stw r30,24(r1)
ffc072c8: 7c 7e 1b 78 mr r30,r3
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);
ffc072cc: 80 7f 00 18 lwz r3,24(r31)
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
ffc072d0: 93 a1 00 14 stw r29,20(r1)
ffc072d4: 93 41 00 08 stw r26,8(r1)
ffc072d8: 93 61 00 0c stw r27,12(r1)
ffc072dc: 93 81 00 10 stw r28,16(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);
ffc072e0: 48 00 1a 51 bl ffc08d30 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
ffc072e4: 7c 7d 1b 79 mr. r29,r3
ffc072e8: 40 82 00 40 bne- ffc07328 <rtems_termios_write+0x84> <== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
ffc072ec: 80 1f 00 cc lwz r0,204(r31)
ffc072f0: 3d 20 00 00 lis r9,0
ffc072f4: 39 29 28 58 addi r9,r9,10328
ffc072f8: 54 00 28 34 rlwinm r0,r0,5,0,26
ffc072fc: 7d 29 02 14 add r9,r9,r0
ffc07300: 80 09 00 0c lwz r0,12(r9)
ffc07304: 2f 80 00 00 cmpwi cr7,r0,0
ffc07308: 41 9e 00 4c beq- cr7,ffc07354 <rtems_termios_write+0xb0>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
ffc0730c: 7f e3 fb 78 mr r3,r31
ffc07310: 7c 09 03 a6 mtctr r0
ffc07314: 7f c4 f3 78 mr r4,r30
ffc07318: 4e 80 04 21 bctrl
ffc0731c: 7c 7d 1b 78 mr r29,r3
rtems_semaphore_release (tty->osem);
ffc07320: 80 7f 00 18 lwz r3,24(r31)
ffc07324: 48 00 1b 95 bl ffc08eb8 <rtems_semaphore_release>
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
return sc;
}
ffc07328: 80 01 00 24 lwz r0,36(r1)
ffc0732c: 7f a3 eb 78 mr r3,r29
ffc07330: 83 41 00 08 lwz r26,8(r1)
ffc07334: 7c 08 03 a6 mtlr r0
ffc07338: 83 61 00 0c lwz r27,12(r1)
ffc0733c: 83 81 00 10 lwz r28,16(r1)
ffc07340: 83 a1 00 14 lwz r29,20(r1)
ffc07344: 83 c1 00 18 lwz r30,24(r1)
ffc07348: 83 e1 00 1c lwz r31,28(r1)
ffc0734c: 38 21 00 20 addi r1,r1,32
ffc07350: 4e 80 00 20 blr
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) {
ffc07354: 80 1f 00 34 lwz r0,52(r31)
ffc07358: 70 09 00 01 andi. r9,r0,1
ffc0735c: 41 82 00 70 beq- ffc073cc <rtems_termios_write+0x128> <== NEVER TAKEN
uint32_t count = args->count;
ffc07360: 83 7e 00 14 lwz r27,20(r30)
char *buffer = args->buffer;
while (count--)
ffc07364: 38 00 00 00 li r0,0
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
ffc07368: 83 5e 00 10 lwz r26,16(r30)
while (count--)
ffc0736c: 2f 9b 00 00 cmpwi cr7,r27,0
ffc07370: 41 9e 00 24 beq- cr7,ffc07394 <rtems_termios_write+0xf0><== NEVER TAKEN
ffc07374: 3b 80 00 00 li r28,0
oproc (*buffer++, tty);
ffc07378: 7c 7a e0 ae lbzx r3,r26,r28
ffc0737c: 7f e4 fb 78 mr r4,r31
ffc07380: 3b 9c 00 01 addi r28,r28,1
ffc07384: 4b ff f7 d5 bl ffc06b58 <oproc>
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
ffc07388: 7f 9c d8 00 cmpw cr7,r28,r27
ffc0738c: 40 9e ff ec bne+ cr7,ffc07378 <rtems_termios_write+0xd4>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
ffc07390: 80 1e 00 14 lwz r0,20(r30)
ffc07394: 90 1e 00 1c stw r0,28(r30)
}
rtems_semaphore_release (tty->osem);
ffc07398: 80 7f 00 18 lwz r3,24(r31)
ffc0739c: 48 00 1b 1d bl ffc08eb8 <rtems_semaphore_release>
return sc;
}
ffc073a0: 80 01 00 24 lwz r0,36(r1)
ffc073a4: 7f a3 eb 78 mr r3,r29
ffc073a8: 83 41 00 08 lwz r26,8(r1)
ffc073ac: 7c 08 03 a6 mtlr r0
ffc073b0: 83 61 00 0c lwz r27,12(r1)
ffc073b4: 83 81 00 10 lwz r28,16(r1)
ffc073b8: 83 a1 00 14 lwz r29,20(r1)
ffc073bc: 83 c1 00 18 lwz r30,24(r1)
ffc073c0: 83 e1 00 1c lwz r31,28(r1)
ffc073c4: 38 21 00 20 addi r1,r1,32
ffc073c8: 4e 80 00 20 blr
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
ffc073cc: 80 7e 00 10 lwz r3,16(r30) <== NOT EXECUTED
ffc073d0: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED
ffc073d4: 80 9e 00 14 lwz r4,20(r30) <== NOT EXECUTED
ffc073d8: 4b ff f5 fd bl ffc069d4 <rtems_termios_puts> <== NOT EXECUTED
ffc073dc: 4b ff ff b4 b ffc07390 <rtems_termios_write+0xec> <== NOT EXECUTED
ffc1b0b0 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
ffc1b0b0: 94 21 ff e8 stwu r1,-24(r1)
ffc1b0b4: 7c 08 02 a6 mflr r0
ffc1b0b8: 7c 64 1b 78 mr r4,r3
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
ffc1b0bc: 3c 60 00 00 lis r3,0
ffc1b0c0: 90 01 00 1c stw r0,28(r1)
ffc1b0c4: 38 63 72 80 addi r3,r3,29312
ffc1b0c8: 38 a1 00 08 addi r5,r1,8
ffc1b0cc: 48 00 3a c5 bl ffc1eb90 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc1b0d0: 80 01 00 08 lwz r0,8(r1)
ffc1b0d4: 2f 80 00 00 cmpwi cr7,r0,0
ffc1b0d8: 41 9e 00 18 beq- cr7,ffc1b0f0 <rtems_timer_cancel+0x40>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc1b0dc: 80 01 00 1c lwz r0,28(r1)
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc1b0e0: 38 60 00 04 li r3,4
}
ffc1b0e4: 38 21 00 18 addi r1,r1,24
ffc1b0e8: 7c 08 03 a6 mtlr r0
ffc1b0ec: 4e 80 00 20 blr
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
ffc1b0f0: 80 03 00 38 lwz r0,56(r3)
ffc1b0f4: 2f 80 00 04 cmpwi cr7,r0,4
ffc1b0f8: 41 9e 00 0c beq- cr7,ffc1b104 <rtems_timer_cancel+0x54> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
ffc1b0fc: 38 63 00 10 addi r3,r3,16
ffc1b100: 48 00 63 19 bl ffc21418 <_Watchdog_Remove>
_Thread_Enable_dispatch();
ffc1b104: 48 00 4a 61 bl ffc1fb64 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc1b108: 80 01 00 1c lwz r0,28(r1)
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
(void) _Watchdog_Remove( &the_timer->Ticker );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
ffc1b10c: 38 60 00 00 li r3,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc1b110: 7c 08 03 a6 mtlr r0
ffc1b114: 38 21 00 18 addi r1,r1,24
ffc1b118: 4e 80 00 20 blr
ffc1b77c <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc1b77c: 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;
ffc1b780: 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
)
{
ffc1b784: 7c 08 02 a6 mflr r0
ffc1b788: 93 e1 00 34 stw r31,52(r1)
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
ffc1b78c: 83 e9 28 f4 lwz r31,10484(r9)
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc1b790: 93 21 00 1c stw r25,28(r1)
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
ffc1b794: 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 )
ffc1b798: 2f 9f 00 00 cmpwi cr7,r31,0
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc1b79c: 93 61 00 24 stw r27,36(r1)
ffc1b7a0: 7c db 33 78 mr r27,r6
ffc1b7a4: 93 81 00 28 stw r28,40(r1)
ffc1b7a8: 7c 9c 23 78 mr r28,r4
ffc1b7ac: 93 a1 00 2c stw r29,44(r1)
ffc1b7b0: 7c 7d 1b 78 mr r29,r3
ffc1b7b4: 93 c1 00 30 stw r30,48(r1)
ffc1b7b8: 7c be 2b 78 mr r30,r5
ffc1b7bc: 90 01 00 3c stw r0,60(r1)
ffc1b7c0: 93 01 00 18 stw r24,24(r1)
ffc1b7c4: 93 41 00 20 stw r26,32(r1)
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
ffc1b7c8: 41 9e 00 38 beq- cr7,ffc1b800 <rtems_timer_server_fire_when+0x84>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
ffc1b7cc: 3d 20 00 00 lis r9,0
ffc1b7d0: 88 09 28 a0 lbz r0,10400(r9)
return RTEMS_NOT_DEFINED;
ffc1b7d4: 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 )
ffc1b7d8: 2f 80 00 00 cmpwi cr7,r0,0
ffc1b7dc: 41 9e 00 24 beq- cr7,ffc1b800 <rtems_timer_server_fire_when+0x84><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
ffc1b7e0: 2f 85 00 00 cmpwi cr7,r5,0
return RTEMS_INVALID_ADDRESS;
ffc1b7e4: 3b 20 00 09 li r25,9
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
ffc1b7e8: 41 9e 00 18 beq- cr7,ffc1b800 <rtems_timer_server_fire_when+0x84>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
ffc1b7ec: 7c 83 23 78 mr r3,r4
ffc1b7f0: 4b ff bf 59 bl ffc17748 <_TOD_Validate>
return RTEMS_INVALID_CLOCK;
ffc1b7f4: 3b 20 00 14 li r25,20
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
ffc1b7f8: 2f 83 00 00 cmpwi cr7,r3,0
ffc1b7fc: 40 9e 00 38 bne- cr7,ffc1b834 <rtems_timer_server_fire_when+0xb8>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc1b800: 80 01 00 3c lwz r0,60(r1)
ffc1b804: 7f 23 cb 78 mr r3,r25
ffc1b808: 83 01 00 18 lwz r24,24(r1)
ffc1b80c: 7c 08 03 a6 mtlr r0
ffc1b810: 83 21 00 1c lwz r25,28(r1)
ffc1b814: 83 41 00 20 lwz r26,32(r1)
ffc1b818: 83 61 00 24 lwz r27,36(r1)
ffc1b81c: 83 81 00 28 lwz r28,40(r1)
ffc1b820: 83 a1 00 2c lwz r29,44(r1)
ffc1b824: 83 c1 00 30 lwz r30,48(r1)
ffc1b828: 83 e1 00 34 lwz r31,52(r1)
ffc1b82c: 38 21 00 38 addi r1,r1,56
ffc1b830: 4e 80 00 20 blr
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc1b834: 7f 83 e3 78 mr r3,r28
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc1b838: 3f 40 00 00 lis r26,0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc1b83c: 4b ff be 69 bl ffc176a4 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc1b840: 80 1a 28 b4 lwz r0,10420(r26)
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc1b844: 7c 7c 1b 78 mr r28,r3
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc1b848: 7f 83 00 40 cmplw cr7,r3,r0
ffc1b84c: 40 bd ff b4 ble- cr7,ffc1b800 <rtems_timer_server_fire_when+0x84>
ffc1b850: 3c 60 00 00 lis r3,0
ffc1b854: 38 63 72 80 addi r3,r3,29312
ffc1b858: 7f a4 eb 78 mr r4,r29
ffc1b85c: 38 a1 00 08 addi r5,r1,8
ffc1b860: 48 00 33 31 bl ffc1eb90 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc1b864: 83 01 00 08 lwz r24,8(r1)
ffc1b868: 7c 79 1b 78 mr r25,r3
ffc1b86c: 2f 98 00 00 cmpwi cr7,r24,0
ffc1b870: 40 9e 00 50 bne- cr7,ffc1b8c0 <rtems_timer_server_fire_when+0x144>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
ffc1b874: 38 63 00 10 addi r3,r3,16
ffc1b878: 48 00 5b a1 bl ffc21418 <_Watchdog_Remove>
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();
ffc1b87c: 80 1a 28 b4 lwz r0,10420(r26)
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
ffc1b880: 39 20 00 03 li r9,3
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
ffc1b884: 7f 80 e0 50 subf r28,r0,r28
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc1b888: 80 1f 00 04 lwz r0,4(r31)
ffc1b88c: 7f 24 cb 78 mr r4,r25
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
ffc1b890: 91 39 00 38 stw r9,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 );
ffc1b894: 7f e3 fb 78 mr r3,r31
ffc1b898: 7c 09 03 a6 mtctr r0
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc1b89c: 93 19 00 18 stw r24,24(r25)
the_watchdog->routine = routine;
ffc1b8a0: 93 d9 00 2c stw r30,44(r25)
the_watchdog->id = id;
ffc1b8a4: 93 b9 00 30 stw r29,48(r25)
the_watchdog->user_data = user_data;
ffc1b8a8: 93 79 00 34 stw r27,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();
ffc1b8ac: 93 99 00 1c stw r28,28(r25)
(*timer_server->schedule_operation)( timer_server, the_timer );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
ffc1b8b0: 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 );
ffc1b8b4: 4e 80 04 21 bctrl
_Thread_Enable_dispatch();
ffc1b8b8: 48 00 42 ad bl ffc1fb64 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc1b8bc: 4b ff ff 44 b ffc1b800 <rtems_timer_server_fire_when+0x84>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc1b8c0: 3b 20 00 04 li r25,4
ffc1b8c4: 4b ff ff 3c b ffc1b800 <rtems_timer_server_fire_when+0x84>
ffc0abb0 <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
ffc0abb0: 94 21 ff e0 stwu r1,-32(r1)
ffc0abb4: 7c 08 02 a6 mflr r0
ffc0abb8: 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) {
ffc0abbc: 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
)
{
ffc0abc0: 93 41 00 08 stw r26,8(r1)
ffc0abc4: 7c 9a 23 78 mr r26,r4
ffc0abc8: 93 61 00 0c stw r27,12(r1)
ffc0abcc: 7c bb 2b 78 mr r27,r5
ffc0abd0: 93 c1 00 18 stw r30,24(r1)
ffc0abd4: 7c 7e 1b 78 mr r30,r3
ffc0abd8: 93 81 00 10 stw r28,16(r1)
ffc0abdc: 93 a1 00 14 stw r29,20(r1)
ffc0abe0: 93 e1 00 1c stw r31,28(r1)
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
ffc0abe4: 41 82 00 3c beq- ffc0ac20 <rtems_verror+0x70>
if (rtems_panic_in_progress++)
ffc0abe8: 3d 20 00 00 lis r9,0
ffc0abec: 81 69 27 e8 lwz r11,10216(r9)
ffc0abf0: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0abf4: 38 0b 00 01 addi r0,r11,1
ffc0abf8: 90 09 27 e8 stw r0,10216(r9)
ffc0abfc: 41 9e 00 18 beq- cr7,ffc0ac14 <rtems_verror+0x64> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc0ac00: 3d 60 00 00 lis r11,0 <== NOT EXECUTED
ffc0ac04: 81 4b 28 08 lwz r10,10248(r11) <== NOT EXECUTED
ffc0ac08: 38 0a 00 01 addi r0,r10,1 <== NOT EXECUTED
ffc0ac0c: 90 0b 28 08 stw r0,10248(r11) <== NOT EXECUTED
RTEMS_COMPILER_MEMORY_BARRIER();
ffc0ac10: 80 09 27 e8 lwz r0,10216(r9) <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
ffc0ac14: 2f 80 00 02 cmpwi cr7,r0,2
return 0;
ffc0ac18: 3b a0 00 00 li r29,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)
ffc0ac1c: 41 9d 00 ac bgt- cr7,ffc0acc8 <rtems_verror+0x118> <== NEVER TAKEN
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
ffc0ac20: 3f e0 00 00 lis r31,0
ffc0ac24: 81 3f 27 88 lwz r9,10120(r31)
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
int local_errno = 0;
ffc0ac28: 3b 80 00 00 li r28,0
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
ffc0ac2c: 80 69 00 08 lwz r3,8(r9)
ffc0ac30: 48 00 eb 25 bl ffc19754 <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
ffc0ac34: 77 c0 40 00 andis. r0,r30,16384
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
ffc0ac38: 57 de 01 00 rlwinm r30,r30,0,4,0
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
ffc0ac3c: 40 82 00 ec bne- ffc0ad28 <rtems_verror+0x178>
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
ffc0ac40: 81 3f 27 88 lwz r9,10120(r31)
ffc0ac44: 7f 44 d3 78 mr r4,r26
ffc0ac48: 7f 65 db 78 mr r5,r27
ffc0ac4c: 80 69 00 0c lwz r3,12(r9)
ffc0ac50: 48 01 5c 9d bl ffc208ec <vfprintf>
if (status)
ffc0ac54: 2f 9e 00 00 cmpwi cr7,r30,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);
ffc0ac58: 7c 7d 1b 78 mr r29,r3
if (status)
ffc0ac5c: 40 9e 00 98 bne- cr7,ffc0acf4 <rtems_verror+0x144>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
ffc0ac60: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0ac64: 41 9e 00 3c beq- cr7,ffc0aca0 <rtems_verror+0xf0>
if ((local_errno > 0) && *strerror(local_errno))
ffc0ac68: 40 9d 00 18 ble- cr7,ffc0ac80 <rtems_verror+0xd0>
ffc0ac6c: 7f 83 e3 78 mr r3,r28
ffc0ac70: 48 00 ff 15 bl ffc1ab84 <strerror>
ffc0ac74: 88 03 00 00 lbz r0,0(r3)
ffc0ac78: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ac7c: 40 9e 00 b8 bne- cr7,ffc0ad34 <rtems_verror+0x184> <== ALWAYS TAKEN
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
ffc0ac80: 81 3f 27 88 lwz r9,10120(r31)
ffc0ac84: 3c 80 ff c3 lis r4,-61
ffc0ac88: 38 84 a4 08 addi r4,r4,-23544
ffc0ac8c: 80 69 00 0c lwz r3,12(r9)
ffc0ac90: 7f 85 e3 78 mr r5,r28
ffc0ac94: 4c c6 31 82 crclr 4*cr1+eq
ffc0ac98: 48 00 ef f1 bl ffc19c88 <fprintf>
ffc0ac9c: 7f bd 1a 14 add r29,r29,r3
}
chars_written += fprintf(stderr, "\n");
ffc0aca0: 81 3f 27 88 lwz r9,10120(r31)
ffc0aca4: 3c 80 ff c3 lis r4,-61
ffc0aca8: 38 84 9d 7c addi r4,r4,-25220
ffc0acac: 80 69 00 0c lwz r3,12(r9)
ffc0acb0: 4c c6 31 82 crclr 4*cr1+eq
ffc0acb4: 48 00 ef d5 bl ffc19c88 <fprintf>
(void) fflush(stderr);
ffc0acb8: 81 3f 27 88 lwz r9,10120(r31)
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
ffc0acbc: 7f a3 ea 14 add r29,r3,r29
(void) fflush(stderr);
ffc0acc0: 80 69 00 0c lwz r3,12(r9)
ffc0acc4: 48 00 ea 91 bl ffc19754 <fflush>
return chars_written;
}
ffc0acc8: 80 01 00 24 lwz r0,36(r1)
ffc0accc: 7f a3 eb 78 mr r3,r29
ffc0acd0: 83 41 00 08 lwz r26,8(r1)
ffc0acd4: 7c 08 03 a6 mtlr r0
ffc0acd8: 83 61 00 0c lwz r27,12(r1)
ffc0acdc: 83 81 00 10 lwz r28,16(r1)
ffc0ace0: 83 a1 00 14 lwz r29,20(r1)
ffc0ace4: 83 c1 00 18 lwz r30,24(r1)
ffc0ace8: 83 e1 00 1c lwz r31,28(r1)
ffc0acec: 38 21 00 20 addi r1,r1,32
ffc0acf0: 4e 80 00 20 blr
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
ffc0acf4: 3d 20 00 00 lis r9,0
ffc0acf8: 81 29 27 88 lwz r9,10120(r9)
ffc0acfc: 7f c3 f3 78 mr r3,r30
ffc0ad00: 83 c9 00 0c lwz r30,12(r9)
ffc0ad04: 4b ff fe 81 bl ffc0ab84 <rtems_status_text>
ffc0ad08: 3c 80 ff c3 lis r4,-61
ffc0ad0c: 7c 65 1b 78 mr r5,r3
ffc0ad10: 38 84 a3 e8 addi r4,r4,-23576
ffc0ad14: 7f c3 f3 78 mr r3,r30
ffc0ad18: 4c c6 31 82 crclr 4*cr1+eq
ffc0ad1c: 48 00 ef 6d bl ffc19c88 <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
ffc0ad20: 7f bd 1a 14 add r29,r29,r3
ffc0ad24: 4b ff ff 3c b ffc0ac60 <rtems_verror+0xb0>
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
local_errno = errno;
ffc0ad28: 48 00 e5 99 bl ffc192c0 <__errno>
ffc0ad2c: 83 83 00 00 lwz r28,0(r3)
ffc0ad30: 4b ff ff 10 b ffc0ac40 <rtems_verror+0x90>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
ffc0ad34: 81 3f 27 88 lwz r9,10120(r31)
ffc0ad38: 7f 83 e3 78 mr r3,r28
ffc0ad3c: 83 c9 00 0c lwz r30,12(r9)
ffc0ad40: 48 00 fe 45 bl ffc1ab84 <strerror>
ffc0ad44: 3c 80 ff c3 lis r4,-61
ffc0ad48: 7c 65 1b 78 mr r5,r3
ffc0ad4c: 38 84 a3 f8 addi r4,r4,-23560
ffc0ad50: 7f c3 f3 78 mr r3,r30
ffc0ad54: 4c c6 31 82 crclr 4*cr1+eq
ffc0ad58: 48 00 ef 31 bl ffc19c88 <fprintf>
ffc0ad5c: 7f bd 1a 14 add r29,r29,r3
ffc0ad60: 4b ff ff 40 b ffc0aca0 <rtems_verror+0xf0>
ffc053d8 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
ffc053d8: 94 21 ff d8 stwu r1,-40(r1)
ffc053dc: 7c 08 02 a6 mflr r0
ffc053e0: 93 41 00 10 stw r26,16(r1)
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
ffc053e4: 3f 40 cc cc lis r26,-13108
ffc053e8: 63 5a cc cd ori r26,r26,52429
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
ffc053ec: 93 81 00 18 stw r28,24(r1)
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
ffc053f0: 3f 80 7f ff lis r28,32767
ffc053f4: 63 9c ff ff ori r28,r28,65535
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
ffc053f8: 90 01 00 2c stw r0,44(r1)
ffc053fc: 93 01 00 08 stw r24,8(r1)
ffc05400: 7c 98 23 78 mr r24,r4
ffc05404: 93 21 00 0c stw r25,12(r1)
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
ffc05408: 3f 20 00 00 lis r25,0
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
ffc0540c: 93 61 00 14 stw r27,20(r1)
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
ffc05410: 3f 60 00 00 lis r27,0
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
ffc05414: 93 a1 00 1c stw r29,28(r1)
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
ffc05418: 3b a0 00 00 li r29,0
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
ffc0541c: 93 c1 00 20 stw r30,32(r1)
int c;
unsigned int i = 0;
ffc05420: 3b c0 00 00 li r30,0
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
ffc05424: 93 e1 00 24 stw r31,36(r1)
ffc05428: 7c 7f 1b 78 mr r31,r3
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
ffc0542c: 81 3f 00 04 lwz r9,4(r31)
ffc05430: 38 09 ff ff addi r0,r9,-1
ffc05434: 2f 80 00 00 cmpwi cr7,r0,0
ffc05438: 90 1f 00 04 stw r0,4(r31)
ffc0543c: 41 9c 00 7c blt- cr7,ffc054b8 <scanInt+0xe0> <== NEVER TAKEN
ffc05440: 81 3f 00 00 lwz r9,0(r31)
ffc05444: 88 69 00 00 lbz r3,0(r9)
ffc05448: 38 09 00 01 addi r0,r9,1
ffc0544c: 90 1f 00 00 stw r0,0(r31)
if (c == ':')
ffc05450: 2f 83 00 3a cmpwi cr7,r3,58
ffc05454: 41 9e 00 78 beq- cr7,ffc054cc <scanInt+0xf4>
break;
if (sign == 0) {
ffc05458: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0545c: 40 9e 00 10 bne- cr7,ffc0546c <scanInt+0x94>
if (c == '-') {
ffc05460: 2f 83 00 2d cmpwi cr7,r3,45
sign = -1;
limit++;
continue;
}
sign = 1;
ffc05464: 3b a0 00 01 li r29,1
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
ffc05468: 41 9e 00 f0 beq- cr7,ffc05558 <scanInt+0x180>
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
ffc0546c: 81 3b 27 24 lwz r9,10020(r27)
ffc05470: 7d 29 1a 14 add r9,r9,r3
ffc05474: 88 09 00 01 lbz r0,1(r9)
ffc05478: 70 09 00 04 andi. r9,r0,4
ffc0547c: 41 82 00 a8 beq- ffc05524 <scanInt+0x14c>
return 0;
d = c - '0';
if ((i > (limit / 10))
ffc05480: 7c 1c d0 16 mulhwu r0,r28,r26
ffc05484: 54 00 e8 fe rlwinm r0,r0,29,3,31
ffc05488: 7f 9e 00 40 cmplw cr7,r30,r0
ffc0548c: 41 9d 00 98 bgt- cr7,ffc05524 <scanInt+0x14c>
|| ((i == (limit / 10)) && (d > (limit % 10))))
ffc05490: 7f 9e 00 00 cmpw cr7,r30,r0
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
ffc05494: 38 63 ff d0 addi r3,r3,-48
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
ffc05498: 41 9e 00 7c beq- cr7,ffc05514 <scanInt+0x13c>
ffc0549c: 1f de 00 0a mulli r30,r30,10
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
ffc054a0: 81 3f 00 04 lwz r9,4(r31)
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
ffc054a4: 7f c3 f2 14 add r30,r3,r30
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
ffc054a8: 38 09 ff ff addi r0,r9,-1
ffc054ac: 2f 80 00 00 cmpwi cr7,r0,0
ffc054b0: 90 1f 00 04 stw r0,4(r31)
ffc054b4: 40 9c ff 8c bge+ cr7,ffc05440 <scanInt+0x68> <== ALWAYS TAKEN
ffc054b8: 80 79 27 28 lwz r3,10024(r25) <== NOT EXECUTED
ffc054bc: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED
ffc054c0: 48 00 fd 05 bl ffc151c4 <__srget_r> <== NOT EXECUTED
if (c == ':')
ffc054c4: 2f 83 00 3a cmpwi cr7,r3,58 <== NOT EXECUTED
ffc054c8: 40 9e ff 90 bne+ cr7,ffc05458 <scanInt+0x80> <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
ffc054cc: 2f 9d 00 00 cmpwi cr7,r29,0
return 0;
ffc054d0: 38 60 00 00 li r3,0
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
ffc054d4: 41 9e 00 54 beq- cr7,ffc05528 <scanInt+0x150> <== NEVER TAKEN
return 0;
*val = i * sign;
return 1;
}
ffc054d8: 80 01 00 2c lwz r0,44(r1)
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
ffc054dc: 7f dd f1 d6 mullw r30,r29,r30
return 1;
}
ffc054e0: 83 21 00 0c lwz r25,12(r1)
ffc054e4: 7c 08 03 a6 mtlr r0
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
ffc054e8: 38 60 00 01 li r3,1
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
ffc054ec: 93 d8 00 00 stw r30,0(r24)
return 1;
}
ffc054f0: 83 01 00 08 lwz r24,8(r1)
ffc054f4: 83 41 00 10 lwz r26,16(r1)
ffc054f8: 83 61 00 14 lwz r27,20(r1)
ffc054fc: 83 81 00 18 lwz r28,24(r1)
ffc05500: 83 a1 00 1c lwz r29,28(r1)
ffc05504: 83 c1 00 20 lwz r30,32(r1)
ffc05508: 83 e1 00 24 lwz r31,36(r1)
ffc0550c: 38 21 00 28 addi r1,r1,40
ffc05510: 4e 80 00 20 blr
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
ffc05514: 1f de 00 0a mulli r30,r30,10
ffc05518: 7c 1e e0 50 subf r0,r30,r28
ffc0551c: 7f 83 00 40 cmplw cr7,r3,r0
ffc05520: 40 9d ff 80 ble+ cr7,ffc054a0 <scanInt+0xc8> <== NEVER TAKEN
return 0;
ffc05524: 38 60 00 00 li r3,0
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
ffc05528: 80 01 00 2c lwz r0,44(r1)
ffc0552c: 83 01 00 08 lwz r24,8(r1)
ffc05530: 7c 08 03 a6 mtlr r0
ffc05534: 83 21 00 0c lwz r25,12(r1)
ffc05538: 83 41 00 10 lwz r26,16(r1)
ffc0553c: 83 61 00 14 lwz r27,20(r1)
ffc05540: 83 81 00 18 lwz r28,24(r1)
ffc05544: 83 a1 00 1c lwz r29,28(r1)
ffc05548: 83 c1 00 20 lwz r30,32(r1)
ffc0554c: 83 e1 00 24 lwz r31,36(r1)
ffc05550: 38 21 00 28 addi r1,r1,40
ffc05554: 4e 80 00 20 blr
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
limit++;
ffc05558: 3b 9c 00 01 addi r28,r28,1
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
ffc0555c: 3b a0 ff ff li r29,-1
limit++;
continue;
ffc05560: 4b ff fe cc b ffc0542c <scanInt+0x54>
ffc05564 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
ffc05564: 94 21 ff e0 stwu r1,-32(r1)
ffc05568: 7c 08 02 a6 mflr r0
ffc0556c: 90 01 00 24 stw r0,36(r1)
int c;
*name = *bufp;
ffc05570: 80 05 00 00 lwz r0,0(r5)
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
ffc05574: 93 61 00 0c stw r27,12(r1)
ffc05578: 7c fb 3b 78 mr r27,r7
ffc0557c: 93 81 00 10 stw r28,16(r1)
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
ffc05580: 3f 80 00 00 lis r28,0
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
ffc05584: 93 a1 00 14 stw r29,20(r1)
ffc05588: 7c dd 33 78 mr r29,r6
ffc0558c: 93 c1 00 18 stw r30,24(r1)
ffc05590: 7c be 2b 78 mr r30,r5
ffc05594: 93 e1 00 1c stw r31,28(r1)
ffc05598: 7c 7f 1b 78 mr r31,r3
int c;
*name = *bufp;
ffc0559c: 90 04 00 00 stw r0,0(r4)
ffc055a0: 48 00 00 58 b ffc055f8 <scanString+0x94>
for (;;) {
c = getc(fp);
ffc055a4: 81 3f 00 00 lwz r9,0(r31)
ffc055a8: 88 69 00 00 lbz r3,0(r9)
ffc055ac: 38 09 00 01 addi r0,r9,1
ffc055b0: 90 1f 00 00 stw r0,0(r31)
if (c == ':') {
ffc055b4: 2f 83 00 3a cmpwi cr7,r3,58
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
ffc055b8: 2f 03 00 0a cmpwi cr6,r3,10
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
ffc055bc: 2c 83 ff ff cmpwi cr1,r3,-1
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
if (c == ':') {
ffc055c0: 41 9e 00 68 beq- cr7,ffc05628 <scanString+0xc4>
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
ffc055c4: 41 9a 00 e4 beq- cr6,ffc056a8 <scanString+0x144>
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
ffc055c8: 41 86 00 b8 beq- cr1,ffc05680 <scanString+0x11c>
return 0;
if (*nleft < 2)
ffc055cc: 80 1d 00 00 lwz r0,0(r29)
ffc055d0: 2b 80 00 01 cmplwi cr7,r0,1
ffc055d4: 40 9d 00 ac ble- cr7,ffc05680 <scanString+0x11c>
return 0;
**bufp = c;
ffc055d8: 81 3e 00 00 lwz r9,0(r30)
ffc055dc: 98 69 00 00 stb r3,0(r9)
++(*bufp);
ffc055e0: 81 3e 00 00 lwz r9,0(r30)
--(*nleft);
ffc055e4: 81 7d 00 00 lwz r11,0(r29)
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
ffc055e8: 39 29 00 01 addi r9,r9,1
--(*nleft);
ffc055ec: 38 0b ff ff addi r0,r11,-1
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
ffc055f0: 91 3e 00 00 stw r9,0(r30)
--(*nleft);
ffc055f4: 90 1d 00 00 stw r0,0(r29)
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
ffc055f8: 81 3f 00 04 lwz r9,4(r31)
ffc055fc: 38 09 ff ff addi r0,r9,-1
ffc05600: 2f 80 00 00 cmpwi cr7,r0,0
ffc05604: 90 1f 00 04 stw r0,4(r31)
ffc05608: 40 9c ff 9c bge+ cr7,ffc055a4 <scanString+0x40>
ffc0560c: 80 7c 27 28 lwz r3,10024(r28)
ffc05610: 7f e4 fb 78 mr r4,r31
ffc05614: 48 00 fb b1 bl ffc151c4 <__srget_r>
if (c == ':') {
ffc05618: 2f 83 00 3a cmpwi cr7,r3,58
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
ffc0561c: 2f 03 00 0a cmpwi cr6,r3,10
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
ffc05620: 2c 83 ff ff cmpwi cr1,r3,-1
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
if (c == ':') {
ffc05624: 40 9e ff a0 bne+ cr7,ffc055c4 <scanString+0x60> <== ALWAYS TAKEN
if (nlFlag)
ffc05628: 2f 9b 00 00 cmpwi cr7,r27,0
return 0;
ffc0562c: 38 60 00 00 li r3,0
*name = *bufp;
for (;;) {
c = getc(fp);
if (c == ':') {
if (nlFlag)
ffc05630: 40 9e 00 54 bne- cr7,ffc05684 <scanString+0x120>
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
ffc05634: 81 3e 00 00 lwz r9,0(r30)
ffc05638: 38 00 00 00 li r0,0
++(*bufp);
--(*nleft);
return 1;
ffc0563c: 38 60 00 01 li r3,1
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
ffc05640: 98 09 00 00 stb r0,0(r9)
++(*bufp);
ffc05644: 81 3e 00 00 lwz r9,0(r30)
--(*nleft);
ffc05648: 81 7d 00 00 lwz r11,0(r29)
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
ffc0564c: 39 29 00 01 addi r9,r9,1
--(*nleft);
ffc05650: 38 0b ff ff addi r0,r11,-1
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
ffc05654: 91 3e 00 00 stw r9,0(r30)
--(*nleft);
ffc05658: 90 1d 00 00 stw r0,0(r29)
return 1;
}
ffc0565c: 80 01 00 24 lwz r0,36(r1)
ffc05660: 83 61 00 0c lwz r27,12(r1)
ffc05664: 7c 08 03 a6 mtlr r0
ffc05668: 83 81 00 10 lwz r28,16(r1)
ffc0566c: 83 a1 00 14 lwz r29,20(r1)
ffc05670: 83 c1 00 18 lwz r30,24(r1)
ffc05674: 83 e1 00 1c lwz r31,28(r1)
ffc05678: 38 21 00 20 addi r1,r1,32
ffc0567c: 4e 80 00 20 blr
break;
}
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
ffc05680: 38 60 00 00 li r3,0
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
}
ffc05684: 80 01 00 24 lwz r0,36(r1)
ffc05688: 83 61 00 0c lwz r27,12(r1)
ffc0568c: 7c 08 03 a6 mtlr r0
ffc05690: 83 81 00 10 lwz r28,16(r1)
ffc05694: 83 a1 00 14 lwz r29,20(r1)
ffc05698: 83 c1 00 18 lwz r30,24(r1)
ffc0569c: 83 e1 00 1c lwz r31,28(r1)
ffc056a0: 38 21 00 20 addi r1,r1,32
ffc056a4: 4e 80 00 20 blr
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
ffc056a8: 2f 9b 00 00 cmpwi cr7,r27,0
return 0;
ffc056ac: 38 60 00 00 li r3,0
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
ffc056b0: 41 be ff d4 beq- cr7,ffc05684 <scanString+0x120>
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
ffc056b4: 81 3e 00 00 lwz r9,0(r30)
ffc056b8: 38 00 00 00 li r0,0
++(*bufp);
--(*nleft);
return 1;
ffc056bc: 38 60 00 01 li r3,1
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
ffc056c0: 98 09 00 00 stb r0,0(r9)
++(*bufp);
ffc056c4: 81 3e 00 00 lwz r9,0(r30)
--(*nleft);
ffc056c8: 81 7d 00 00 lwz r11,0(r29)
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
ffc056cc: 39 29 00 01 addi r9,r9,1
--(*nleft);
ffc056d0: 38 0b ff ff addi r0,r11,-1
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
ffc056d4: 91 3e 00 00 stw r9,0(r30)
--(*nleft);
ffc056d8: 90 1d 00 00 stw r0,0(r29)
ffc056dc: 4b ff ff 80 b ffc0565c <scanString+0xf8>
ffc056e0 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
ffc056e0: 94 21 ff c8 stwu r1,-56(r1)
ffc056e4: 7c 08 02 a6 mflr r0
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
ffc056e8: 38 e0 00 00 li r7,0
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
ffc056ec: 93 c1 00 30 stw r30,48(r1)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
ffc056f0: 3b c1 00 18 addi r30,r1,24
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
ffc056f4: 93 e1 00 34 stw r31,52(r1)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
ffc056f8: 3b e1 00 1c addi r31,r1,28
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
ffc056fc: 90 a1 00 18 stw r5,24(r1)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
ffc05700: 7f c5 f3 78 mr r5,r30
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
ffc05704: 90 c1 00 1c stw r6,28(r1)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
ffc05708: 7f e6 fb 78 mr r6,r31
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
ffc0570c: 93 61 00 24 stw r27,36(r1)
ffc05710: 7c 9b 23 78 mr r27,r4
ffc05714: 93 81 00 28 stw r28,40(r1)
ffc05718: 7c 7c 1b 78 mr r28,r3
ffc0571c: 93 a1 00 2c stw r29,44(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;
ffc05720: 3b a0 00 00 li r29,0
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
ffc05724: 90 01 00 3c stw r0,60(r1)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
ffc05728: 4b ff fe 3d bl ffc05564 <scanString>
ffc0572c: 2f 83 00 00 cmpwi cr7,r3,0
ffc05730: 40 9e 00 2c bne- cr7,ffc0575c <scangr+0x7c>
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
}
ffc05734: 80 01 00 3c lwz r0,60(r1)
ffc05738: 7f a3 eb 78 mr r3,r29
ffc0573c: 83 61 00 24 lwz r27,36(r1)
ffc05740: 7c 08 03 a6 mtlr r0
ffc05744: 83 81 00 28 lwz r28,40(r1)
ffc05748: 83 a1 00 2c lwz r29,44(r1)
ffc0574c: 83 c1 00 30 lwz r30,48(r1)
ffc05750: 83 e1 00 34 lwz r31,52(r1)
ffc05754: 38 21 00 38 addi r1,r1,56
ffc05758: 4e 80 00 20 blr
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
ffc0575c: 7f 83 e3 78 mr r3,r28
ffc05760: 38 9b 00 04 addi r4,r27,4
ffc05764: 7f c5 f3 78 mr r5,r30
ffc05768: 7f e6 fb 78 mr r6,r31
ffc0576c: 38 e0 00 00 li r7,0
ffc05770: 4b ff fd f5 bl ffc05564 <scanString>
ffc05774: 2f 83 00 00 cmpwi cr7,r3,0
ffc05778: 41 9e ff bc beq+ cr7,ffc05734 <scangr+0x54> <== NEVER TAKEN
|| !scanInt(fp, &grgid)
ffc0577c: 7f 83 e3 78 mr r3,r28
ffc05780: 38 81 00 08 addi r4,r1,8
ffc05784: 4b ff fc 55 bl ffc053d8 <scanInt>
ffc05788: 2f 83 00 00 cmpwi cr7,r3,0
ffc0578c: 41 9e ff a8 beq+ cr7,ffc05734 <scangr+0x54> <== NEVER TAKEN
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
ffc05790: 7f 83 e3 78 mr r3,r28
ffc05794: 38 81 00 0c addi r4,r1,12
ffc05798: 7f c5 f3 78 mr r5,r30
ffc0579c: 7f e6 fb 78 mr r6,r31
ffc057a0: 38 e0 00 01 li r7,1
ffc057a4: 4b ff fd c1 bl ffc05564 <scanString>
ffc057a8: 2f 83 00 00 cmpwi cr7,r3,0
ffc057ac: 41 be ff 88 beq- cr7,ffc05734 <scangr+0x54> <== NEVER TAKEN
return 0;
grp->gr_gid = grgid;
ffc057b0: 80 01 00 08 lwz r0,8(r1)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc057b4: 39 20 00 17 li r9,23
ffc057b8: 81 41 00 0c lwz r10,12(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;
ffc057bc: b0 1b 00 08 sth r0,8(r27)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc057c0: 88 0a 00 00 lbz r0,0(r10)
ffc057c4: 2f 80 00 00 cmpwi cr7,r0,0
ffc057c8: 41 9e 00 30 beq- cr7,ffc057f8 <scangr+0x118> <== NEVER TAKEN
ffc057cc: 7d 4b 53 78 mr r11,r10
ffc057d0: 39 20 00 01 li r9,1
if(*cp == ',')
memcount++;
ffc057d4: 68 08 00 2c xori r8,r0,44
ffc057d8: 21 08 00 00 subfic r8,r8,0
ffc057dc: 7d 09 01 94 addze r8,r9
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc057e0: 8c 0b 00 01 lbzu r0,1(r11)
ffc057e4: 2f 80 00 00 cmpwi cr7,r0,0
if(*cp == ',')
memcount++;
ffc057e8: 7d 09 43 78 mr r9,r8
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc057ec: 40 9e ff e8 bne+ cr7,ffc057d4 <scangr+0xf4>
ffc057f0: 55 09 10 3a rlwinm r9,r8,2,0,29
ffc057f4: 39 29 00 13 addi r9,r9,19
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
ffc057f8: 80 01 00 1c lwz r0,28(r1)
return 0;
ffc057fc: 3b a0 00 00 li r29,0
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
ffc05800: 7f 80 48 40 cmplw cr7,r0,r9
ffc05804: 41 bc ff 30 blt- cr7,ffc05734 <scangr+0x54> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
ffc05808: 81 01 00 18 lwz r8,24(r1)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc0580c: 39 60 00 04 li r11,4
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
ffc05810: 39 08 00 0f addi r8,r8,15
ffc05814: 55 08 00 36 rlwinm r8,r8,0,0,27
ffc05818: 91 1b 00 0c stw r8,12(r27)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
ffc0581c: 91 48 00 00 stw r10,0(r8)
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc05820: 81 21 00 0c lwz r9,12(r1)
ffc05824: 88 09 00 00 lbz r0,0(r9)
ffc05828: 2f 80 00 00 cmpwi cr7,r0,0
ffc0582c: 41 9e 00 4c beq- cr7,ffc05878 <scangr+0x198> <== NEVER TAKEN
}
/*
* Extract a single group record from the database
*/
static int scangr(
ffc05830: 39 29 00 01 addi r9,r9,1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc05834: 39 60 00 01 li r11,1
if(*cp == ',') {
*cp = '\0';
ffc05838: 39 00 00 00 li r8,0
ffc0583c: 48 00 00 14 b ffc05850 <scangr+0x170>
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc05840: 88 09 00 00 lbz r0,0(r9)
ffc05844: 39 29 00 01 addi r9,r9,1
ffc05848: 2f 80 00 00 cmpwi cr7,r0,0
ffc0584c: 41 9e 00 24 beq- cr7,ffc05870 <scangr+0x190>
if(*cp == ',') {
ffc05850: 2f 80 00 2c cmpwi cr7,r0,44
ffc05854: 40 9e ff ec bne+ cr7,ffc05840 <scangr+0x160>
*cp = '\0';
ffc05858: 99 09 ff ff stb r8,-1(r9)
grp->gr_mem[memcount++] = cp + 1;
ffc0585c: 55 60 10 3a rlwinm r0,r11,2,0,29
ffc05860: 39 6b 00 01 addi r11,r11,1
ffc05864: 81 5b 00 0c lwz r10,12(r27)
ffc05868: 7d 2a 01 2e stwx r9,r10,r0
ffc0586c: 4b ff ff d4 b ffc05840 <scangr+0x160>
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
ffc05870: 81 1b 00 0c lwz r8,12(r27)
ffc05874: 55 6b 10 3a rlwinm r11,r11,2,0,29
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
ffc05878: 38 00 00 00 li r0,0
ffc0587c: 7c 08 59 2e stwx r0,r8,r11
return 1;
ffc05880: 3b a0 00 01 li r29,1
ffc05884: 4b ff fe b0 b ffc05734 <scangr+0x54>
ffc05888 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
ffc05888: 94 21 ff c8 stwu r1,-56(r1)
ffc0588c: 7c 08 02 a6 mflr r0
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
ffc05890: 38 e0 00 00 li r7,0
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
ffc05894: 93 c1 00 30 stw r30,48(r1)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
ffc05898: 3b c1 00 18 addi r30,r1,24
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
ffc0589c: 93 e1 00 34 stw r31,52(r1)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
ffc058a0: 3b e1 00 1c addi r31,r1,28
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
ffc058a4: 90 a1 00 18 stw r5,24(r1)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
ffc058a8: 7f c5 f3 78 mr r5,r30
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
ffc058ac: 90 c1 00 1c stw r6,28(r1)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
ffc058b0: 7f e6 fb 78 mr r6,r31
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
ffc058b4: 93 61 00 24 stw r27,36(r1)
ffc058b8: 7c 9b 23 78 mr r27,r4
ffc058bc: 93 81 00 28 stw r28,40(r1)
ffc058c0: 7c 7c 1b 78 mr r28,r3
ffc058c4: 93 a1 00 2c stw r29,44(r1)
|| !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;
ffc058c8: 3b a0 00 00 li r29,0
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
ffc058cc: 90 01 00 3c stw r0,60(r1)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
ffc058d0: 4b ff fc 95 bl ffc05564 <scanString>
ffc058d4: 2f 83 00 00 cmpwi cr7,r3,0
ffc058d8: 40 9e 00 2c bne- cr7,ffc05904 <scanpw+0x7c>
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
}
ffc058dc: 80 01 00 3c lwz r0,60(r1)
ffc058e0: 7f a3 eb 78 mr r3,r29
ffc058e4: 83 61 00 24 lwz r27,36(r1)
ffc058e8: 7c 08 03 a6 mtlr r0
ffc058ec: 83 81 00 28 lwz r28,40(r1)
ffc058f0: 83 a1 00 2c lwz r29,44(r1)
ffc058f4: 83 c1 00 30 lwz r30,48(r1)
ffc058f8: 83 e1 00 34 lwz r31,52(r1)
ffc058fc: 38 21 00 38 addi r1,r1,56
ffc05900: 4e 80 00 20 blr
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
ffc05904: 7f 83 e3 78 mr r3,r28
ffc05908: 38 9b 00 04 addi r4,r27,4
ffc0590c: 7f c5 f3 78 mr r5,r30
ffc05910: 7f e6 fb 78 mr r6,r31
ffc05914: 38 e0 00 00 li r7,0
ffc05918: 4b ff fc 4d bl ffc05564 <scanString>
ffc0591c: 2f 83 00 00 cmpwi cr7,r3,0
ffc05920: 41 9e ff bc beq+ cr7,ffc058dc <scanpw+0x54> <== NEVER TAKEN
|| !scanInt(fp, &pwuid)
ffc05924: 7f 83 e3 78 mr r3,r28
ffc05928: 38 81 00 08 addi r4,r1,8
ffc0592c: 4b ff fa ad bl ffc053d8 <scanInt>
ffc05930: 2f 83 00 00 cmpwi cr7,r3,0
ffc05934: 41 9e ff a8 beq+ cr7,ffc058dc <scanpw+0x54>
|| !scanInt(fp, &pwgid)
ffc05938: 7f 83 e3 78 mr r3,r28
ffc0593c: 38 81 00 0c addi r4,r1,12
ffc05940: 4b ff fa 99 bl ffc053d8 <scanInt>
ffc05944: 2f 83 00 00 cmpwi cr7,r3,0
ffc05948: 41 9e ff 94 beq+ cr7,ffc058dc <scanpw+0x54>
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
ffc0594c: 7f 83 e3 78 mr r3,r28
ffc05950: 38 9b 00 0c addi r4,r27,12
ffc05954: 7f c5 f3 78 mr r5,r30
ffc05958: 7f e6 fb 78 mr r6,r31
ffc0595c: 38 e0 00 00 li r7,0
ffc05960: 4b ff fc 05 bl ffc05564 <scanString>
ffc05964: 2f 83 00 00 cmpwi cr7,r3,0
ffc05968: 41 9e ff 74 beq+ cr7,ffc058dc <scanpw+0x54> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
ffc0596c: 7f 83 e3 78 mr r3,r28
ffc05970: 38 9b 00 10 addi r4,r27,16
ffc05974: 7f c5 f3 78 mr r5,r30
ffc05978: 7f e6 fb 78 mr r6,r31
ffc0597c: 38 e0 00 00 li r7,0
ffc05980: 4b ff fb e5 bl ffc05564 <scanString>
ffc05984: 2f 83 00 00 cmpwi cr7,r3,0
ffc05988: 41 9e ff 54 beq+ cr7,ffc058dc <scanpw+0x54> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
ffc0598c: 7f 83 e3 78 mr r3,r28
ffc05990: 38 9b 00 14 addi r4,r27,20
ffc05994: 7f c5 f3 78 mr r5,r30
ffc05998: 7f e6 fb 78 mr r6,r31
ffc0599c: 38 e0 00 00 li r7,0
ffc059a0: 4b ff fb c5 bl ffc05564 <scanString>
ffc059a4: 2f 83 00 00 cmpwi cr7,r3,0
ffc059a8: 41 9e ff 34 beq+ cr7,ffc058dc <scanpw+0x54> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
ffc059ac: 7f 83 e3 78 mr r3,r28
ffc059b0: 38 9b 00 18 addi r4,r27,24
ffc059b4: 7f c5 f3 78 mr r5,r30
ffc059b8: 7f e6 fb 78 mr r6,r31
ffc059bc: 38 e0 00 01 li r7,1
ffc059c0: 4b ff fb a5 bl ffc05564 <scanString>
ffc059c4: 2f 83 00 00 cmpwi cr7,r3,0
ffc059c8: 41 be ff 14 beq- cr7,ffc058dc <scanpw+0x54>
return 0;
pwd->pw_uid = pwuid;
ffc059cc: 80 01 00 08 lwz r0,8(r1)
pwd->pw_gid = pwgid;
return 1;
ffc059d0: 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;
ffc059d4: b0 1b 00 08 sth r0,8(r27)
pwd->pw_gid = pwgid;
ffc059d8: 80 01 00 0c lwz r0,12(r1)
ffc059dc: b0 1b 00 0a sth r0,10(r27)
return 1;
ffc059e0: 4b ff fe fc b ffc058dc <scanpw+0x54>
ffc07220 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc07220: 94 21 ff f0 stwu r1,-16(r1)
ffc07224: 7c 08 02 a6 mflr r0
ffc07228: 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)) {
ffc0722c: 80 04 00 3c lwz r0,60(r4)
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc07230: 93 c1 00 08 stw r30,8(r1)
ffc07234: 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)) {
ffc07238: 70 09 0e 78 andi. r9,r0,3704
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
ffc0723c: 93 e1 00 0c stw r31,12(r1)
ffc07240: 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)) {
ffc07244: 40 82 00 1c bne- ffc07260 <siproc+0x40> <== ALWAYS TAKEN
}
else {
i = iproc (c, tty);
}
return i;
}
ffc07248: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED
ffc0724c: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED
ffc07250: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc07254: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED
ffc07258: 38 21 00 10 addi r1,r1,16 <== 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);
ffc0725c: 4b ff fd d8 b ffc07034 <iproc> <== NOT EXECUTED
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
ffc07260: 80 64 00 18 lwz r3,24(r4)
ffc07264: 38 a0 00 00 li r5,0
ffc07268: 38 80 00 00 li r4,0
ffc0726c: 48 00 1a c5 bl ffc08d30 <rtems_semaphore_obtain>
i = iproc (c, tty);
ffc07270: 7f e4 fb 78 mr r4,r31
ffc07274: 7f c3 f3 78 mr r3,r30
ffc07278: 4b ff fd bd bl ffc07034 <iproc>
ffc0727c: 7c 7e 1b 78 mr r30,r3
rtems_semaphore_release (tty->osem);
ffc07280: 80 7f 00 18 lwz r3,24(r31)
ffc07284: 48 00 1c 35 bl ffc08eb8 <rtems_semaphore_release>
}
else {
i = iproc (c, tty);
}
return i;
}
ffc07288: 80 01 00 14 lwz r0,20(r1)
ffc0728c: 7f c3 f3 78 mr r3,r30
ffc07290: 83 e1 00 0c lwz r31,12(r1)
ffc07294: 7c 08 03 a6 mtlr r0
ffc07298: 83 c1 00 08 lwz r30,8(r1)
ffc0729c: 38 21 00 10 addi r1,r1,16
ffc072a0: 4e 80 00 20 blr
ffc08ed4 <statvfs>:
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
ffc08ed4: 94 21 ff c8 stwu r1,-56(r1)
ffc08ed8: 7c 08 02 a6 mflr r0
ffc08edc: 93 a1 00 2c stw r29,44(r1)
ffc08ee0: 7c 7d 1b 78 mr r29,r3
ffc08ee4: 90 01 00 3c stw r0,60(r1)
ffc08ee8: 93 c1 00 30 stw r30,48(r1)
ffc08eec: 7c 9e 23 78 mr r30,r4
ffc08ef0: 93 e1 00 34 stw r31,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 ) )
ffc08ef4: 48 00 ed 19 bl ffc17c0c <strlen>
ffc08ef8: 3b e1 00 08 addi r31,r1,8
ffc08efc: 7c 64 1b 78 mr r4,r3
ffc08f00: 38 a0 00 00 li r5,0
ffc08f04: 7f a3 eb 78 mr r3,r29
ffc08f08: 7f e6 fb 78 mr r6,r31
ffc08f0c: 38 e0 00 01 li r7,1
ffc08f10: 4b ff e5 41 bl ffc07450 <rtems_filesystem_evaluate_path>
return -1;
ffc08f14: 3b a0 ff ff li r29,-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 ) )
ffc08f18: 2f 83 00 00 cmpwi cr7,r3,0
ffc08f1c: 40 be 00 3c bne+ cr7,ffc08f58 <statvfs+0x84> <== NEVER TAKEN
return -1;
mt_entry = loc.mt_entry;
ffc08f20: 83 a1 00 18 lwz r29,24(r1)
fs_mount_root = &mt_entry->mt_fs_root;
memset (sb, 0, sizeof (struct statvfs));
ffc08f24: 38 80 00 00 li r4,0
ffc08f28: 38 a0 00 38 li r5,56
ffc08f2c: 7f c3 f3 78 mr r3,r30
ffc08f30: 48 00 da f5 bl ffc16a24 <memset>
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
ffc08f34: 81 3d 00 28 lwz r9,40(r29)
ffc08f38: 38 7d 00 1c addi r3,r29,28
ffc08f3c: 80 09 00 44 lwz r0,68(r9)
ffc08f40: 7f c4 f3 78 mr r4,r30
ffc08f44: 7c 09 03 a6 mtctr r0
ffc08f48: 4e 80 04 21 bctrl
ffc08f4c: 7c 7d 1b 78 mr r29,r3
rtems_filesystem_freenode( &loc );
ffc08f50: 7f e3 fb 78 mr r3,r31
ffc08f54: 4b ff e6 59 bl ffc075ac <rtems_filesystem_freenode>
return result;
}
ffc08f58: 80 01 00 3c lwz r0,60(r1)
ffc08f5c: 7f a3 eb 78 mr r3,r29
ffc08f60: 83 c1 00 30 lwz r30,48(r1)
ffc08f64: 7c 08 03 a6 mtlr r0
ffc08f68: 83 a1 00 2c lwz r29,44(r1)
ffc08f6c: 83 e1 00 34 lwz r31,52(r1)
ffc08f70: 38 21 00 38 addi r1,r1,56
ffc08f74: 4e 80 00 20 blr
ffc076b8 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
ffc076b8: 94 21 ff f0 stwu r1,-16(r1)
ffc076bc: 7c 08 02 a6 mflr r0
ffc076c0: 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;
ffc076c4: 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)
{
ffc076c8: 93 c1 00 08 stw 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 ) {
ffc076cc: 2f 80 00 00 cmpwi cr7,r0,0
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
ffc076d0: 93 e1 00 0c stw r31,12(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 ) {
ffc076d4: 41 9e 00 30 beq- cr7,ffc07704 <sync_per_thread+0x4c> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
ffc076d8: 3f e0 00 00 lis r31,0
ffc076dc: 3b ff 2d 98 addi r31,r31,11672
ffc076e0: 81 3f 00 0c lwz r9,12(r31)
_Thread_Executing->libc_reent = this_reent;
_fwalk (t->libc_reent, sync_wrapper);
ffc076e4: 3c 80 ff c0 lis r4,-64
ffc076e8: 38 84 77 1c addi r4,r4,30492
* 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;
ffc076ec: 83 c9 01 28 lwz r30,296(r9)
_Thread_Executing->libc_reent = this_reent;
ffc076f0: 90 09 01 28 stw r0,296(r9)
_fwalk (t->libc_reent, sync_wrapper);
ffc076f4: 80 63 01 28 lwz r3,296(r3)
ffc076f8: 48 00 d3 7d bl ffc14a74 <_fwalk>
_Thread_Executing->libc_reent = current_reent;
ffc076fc: 81 3f 00 0c lwz r9,12(r31)
ffc07700: 93 c9 01 28 stw r30,296(r9)
}
}
ffc07704: 80 01 00 14 lwz r0,20(r1)
ffc07708: 83 c1 00 08 lwz r30,8(r1)
ffc0770c: 7c 08 03 a6 mtlr r0
ffc07710: 83 e1 00 0c lwz r31,12(r1)
ffc07714: 38 21 00 10 addi r1,r1,16
ffc07718: 4e 80 00 20 blr
ffc10990 <tcsetattr>:
int fd,
int opt,
struct termios *tp
)
{
switch (opt) {
ffc10990: 2c 04 00 00 cmpwi r4,0
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
ffc10994: 94 21 ff f0 stwu r1,-16(r1)
ffc10998: 7c 08 02 a6 mflr r0
ffc1099c: 93 c1 00 08 stw r30,8(r1)
ffc109a0: 7c 7e 1b 78 mr r30,r3
ffc109a4: 93 e1 00 0c stw r31,12(r1)
ffc109a8: 7c bf 2b 78 mr r31,r5
ffc109ac: 90 01 00 14 stw r0,20(r1)
switch (opt) {
ffc109b0: 41 82 00 50 beq- ffc10a00 <tcsetattr+0x70>
ffc109b4: 2f 84 00 01 cmpwi cr7,r4,1
ffc109b8: 41 9e 00 2c beq- cr7,ffc109e4 <tcsetattr+0x54>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
ffc109bc: 48 00 3b 61 bl ffc1451c <__errno>
ffc109c0: 38 00 00 86 li r0,134
ffc109c4: 90 03 00 00 stw r0,0(r3)
ffc109c8: 38 60 ff ff li r3,-1
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
ffc109cc: 80 01 00 14 lwz r0,20(r1)
ffc109d0: 83 c1 00 08 lwz r30,8(r1)
ffc109d4: 7c 08 03 a6 mtlr r0
ffc109d8: 83 e1 00 0c lwz r31,12(r1)
ffc109dc: 38 21 00 10 addi r1,r1,16
ffc109e0: 4e 80 00 20 blr
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
ffc109e4: 38 80 00 03 li r4,3
ffc109e8: 38 a0 00 00 li r5,0
ffc109ec: 4c c6 31 82 crclr 4*cr1+eq
ffc109f0: 4b ff fa 0d bl ffc103fc <ioctl>
ffc109f4: 2f 83 00 00 cmpwi cr7,r3,0
return -1;
ffc109f8: 38 60 ff ff li r3,-1
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
ffc109fc: 41 9c 00 18 blt- cr7,ffc10a14 <tcsetattr+0x84> <== NEVER TAKEN
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
ffc10a00: 7f c3 f3 78 mr r3,r30
ffc10a04: 38 80 00 02 li r4,2
ffc10a08: 7f e5 fb 78 mr r5,r31
ffc10a0c: 4c c6 31 82 crclr 4*cr1+eq
ffc10a10: 4b ff f9 ed bl ffc103fc <ioctl>
}
}
ffc10a14: 80 01 00 14 lwz r0,20(r1)
ffc10a18: 83 c1 00 08 lwz r30,8(r1)
ffc10a1c: 7c 08 03 a6 mtlr r0
ffc10a20: 83 e1 00 0c lwz r31,12(r1)
ffc10a24: 38 21 00 10 addi r1,r1,16
ffc10a28: 4e 80 00 20 blr
ffc093ec <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
ffc093ec: 94 21 ff b0 stwu r1,-80(r1)
ffc093f0: 7c 08 02 a6 mflr r0
ffc093f4: 93 e1 00 4c stw r31,76(r1)
ffc093f8: 7c 7f 1b 78 mr r31,r3
ffc093fc: 90 01 00 54 stw r0,84(r1)
ffc09400: 93 61 00 3c stw r27,60(r1)
ffc09404: 93 81 00 40 stw r28,64(r1)
ffc09408: 93 a1 00 44 stw r29,68(r1)
ffc0940c: 93 c1 00 48 stw r30,72(r1)
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
ffc09410: 4b ff c8 05 bl ffc05c14 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
ffc09414: 2c 03 00 00 cmpwi r3,0
ffc09418: 40 82 01 3c bne- ffc09554 <unlink+0x168>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
ffc0941c: 3b c1 00 0c addi r30,r1,12
ffc09420: 7f e3 fb 78 mr r3,r31
ffc09424: 38 81 00 08 addi r4,r1,8
ffc09428: 7f c5 f3 78 mr r5,r30
ffc0942c: 4b ff dc 4d bl ffc07078 <rtems_filesystem_get_start_loc>
ffc09430: 3b a0 00 00 li r29,0
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
ffc09434: 3b 80 00 00 li r28,0
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
ffc09438: 80 01 00 0c lwz r0,12(r1)
name = path + parentpathlen;
ffc0943c: 7f bf ea 14 add r29,r31,r29
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
ffc09440: 7f a3 eb 78 mr r3,r29
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
ffc09444: 90 01 00 20 stw r0,32(r1)
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
ffc09448: 3b e1 00 20 addi r31,r1,32
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
ffc0944c: 80 01 00 10 lwz r0,16(r1)
ffc09450: 90 01 00 24 stw r0,36(r1)
ffc09454: 80 01 00 14 lwz r0,20(r1)
ffc09458: 90 01 00 28 stw r0,40(r1)
ffc0945c: 80 01 00 18 lwz r0,24(r1)
ffc09460: 90 01 00 2c stw r0,44(r1)
ffc09464: 80 01 00 1c lwz r0,28(r1)
ffc09468: 90 01 00 30 stw r0,48(r1)
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
ffc0946c: 48 00 ed f9 bl ffc18264 <strlen>
ffc09470: 7c 64 1b 78 mr r4,r3
ffc09474: 7f a3 eb 78 mr r3,r29
ffc09478: 4b ff c7 fd bl ffc05c74 <rtems_filesystem_prefix_separators>
ffc0947c: 7f bd 1a 14 add r29,r29,r3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
ffc09480: 7f a3 eb 78 mr r3,r29
ffc09484: 48 00 ed e1 bl ffc18264 <strlen>
ffc09488: 38 a0 00 00 li r5,0
ffc0948c: 7c 64 1b 78 mr r4,r3
ffc09490: 7f e6 fb 78 mr r6,r31
ffc09494: 7f a3 eb 78 mr r3,r29
ffc09498: 38 e0 00 00 li r7,0
ffc0949c: 4b ff c6 51 bl ffc05aec <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
ffc094a0: 2f 83 00 00 cmpwi cr7,r3,0
ffc094a4: 40 9e 00 74 bne- cr7,ffc09518 <unlink+0x12c>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
ffc094a8: 81 21 00 2c lwz r9,44(r1)
ffc094ac: 7f e3 fb 78 mr r3,r31
ffc094b0: 80 09 00 10 lwz r0,16(r9)
ffc094b4: 7c 09 03 a6 mtctr r0
ffc094b8: 4e 80 04 21 bctrl
ffc094bc: 2f 83 00 01 cmpwi cr7,r3,1
ffc094c0: 41 9e 00 c8 beq- cr7,ffc09588 <unlink+0x19c>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
ffc094c4: 81 21 00 2c lwz r9,44(r1)
ffc094c8: 7f e4 fb 78 mr r4,r31
ffc094cc: 7f c3 f3 78 mr r3,r30
ffc094d0: 80 09 00 0c lwz r0,12(r9)
ffc094d4: 7c 09 03 a6 mtctr r0
ffc094d8: 4e 80 04 21 bctrl
ffc094dc: 7c 7b 1b 78 mr r27,r3
rtems_filesystem_freenode( &loc );
ffc094e0: 7f e3 fb 78 mr r3,r31
ffc094e4: 4b ff c8 11 bl ffc05cf4 <rtems_filesystem_freenode>
if ( free_parentloc )
ffc094e8: 2f 9c 00 00 cmpwi cr7,r28,0
ffc094ec: 40 9e 00 38 bne- cr7,ffc09524 <unlink+0x138>
rtems_filesystem_freenode( &parentloc );
return result;
}
ffc094f0: 80 01 00 54 lwz r0,84(r1)
ffc094f4: 7f 63 db 78 mr r3,r27
ffc094f8: 83 81 00 40 lwz r28,64(r1)
ffc094fc: 7c 08 03 a6 mtlr r0
ffc09500: 83 61 00 3c lwz r27,60(r1)
ffc09504: 83 a1 00 44 lwz r29,68(r1)
ffc09508: 83 c1 00 48 lwz r30,72(r1)
ffc0950c: 83 e1 00 4c lwz r31,76(r1)
ffc09510: 38 21 00 50 addi r1,r1,80
ffc09514: 4e 80 00 20 blr
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
ffc09518: 2f 9c 00 00 cmpwi cr7,r28,0
rtems_filesystem_freenode( &parentloc );
return -1;
ffc0951c: 3b 60 ff ff li r27,-1
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
ffc09520: 41 9e ff d0 beq+ cr7,ffc094f0 <unlink+0x104> <== NEVER TAKEN
result = (*loc.ops->unlink_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
ffc09524: 7f c3 f3 78 mr r3,r30
ffc09528: 4b ff c7 cd bl ffc05cf4 <rtems_filesystem_freenode>
return result;
}
ffc0952c: 80 01 00 54 lwz r0,84(r1)
ffc09530: 7f 63 db 78 mr r3,r27
ffc09534: 83 81 00 40 lwz r28,64(r1)
ffc09538: 7c 08 03 a6 mtlr r0
ffc0953c: 83 61 00 3c lwz r27,60(r1)
ffc09540: 83 a1 00 44 lwz r29,68(r1)
ffc09544: 83 c1 00 48 lwz r30,72(r1)
ffc09548: 83 e1 00 4c lwz r31,76(r1)
ffc0954c: 38 21 00 50 addi r1,r1,80
ffc09550: 4e 80 00 20 blr
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
ffc09554: 7c 7d 1b 78 mr r29,r3
ffc09558: 3b c1 00 0c addi r30,r1,12
ffc0955c: 7f e3 fb 78 mr r3,r31
ffc09560: 7f a4 eb 78 mr r4,r29
ffc09564: 38 a0 00 02 li r5,2
ffc09568: 7f c6 f3 78 mr r6,r30
ffc0956c: 38 e0 00 00 li r7,0
ffc09570: 4b ff c6 29 bl ffc05b98 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
return -1;
ffc09574: 3b 60 ff ff li r27,-1
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
ffc09578: 2f 83 00 00 cmpwi cr7,r3,0
ffc0957c: 40 be ff 74 bne- cr7,ffc094f0 <unlink+0x104> <== NEVER TAKEN
return -1;
free_parentloc = true;
ffc09580: 3b 80 00 01 li r28,1
ffc09584: 4b ff fe b4 b ffc09438 <unlink+0x4c>
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
ffc09588: 7f e3 fb 78 mr r3,r31
ffc0958c: 4b ff c7 69 bl ffc05cf4 <rtems_filesystem_freenode>
if ( free_parentloc )
ffc09590: 2f 9c 00 00 cmpwi cr7,r28,0
ffc09594: 41 be 00 0c beq+ cr7,ffc095a0 <unlink+0x1b4>
rtems_filesystem_freenode( &parentloc );
ffc09598: 7f c3 f3 78 mr r3,r30
ffc0959c: 4b ff c7 59 bl ffc05cf4 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EISDIR );
ffc095a0: 48 00 db 25 bl ffc170c4 <__errno>
ffc095a4: 38 00 00 15 li r0,21
ffc095a8: 90 03 00 00 stw r0,0(r3)
ffc095ac: 3b 60 ff ff li r27,-1
ffc095b0: 4b ff ff 40 b ffc094f0 <unlink+0x104>
ffc0958c <unmount>:
*/
int unmount(
const char *path
)
{
ffc0958c: 94 21 ff d0 stwu r1,-48(r1)
ffc09590: 7c 08 02 a6 mflr r0
ffc09594: 93 c1 00 28 stw r30,40(r1)
ffc09598: 7c 7e 1b 78 mr r30,r3
ffc0959c: 90 01 00 34 stw r0,52(r1)
ffc095a0: 93 e1 00 2c stw r31,44(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 ) )
ffc095a4: 48 00 b2 49 bl ffc147ec <strlen>
ffc095a8: 3b e1 00 08 addi r31,r1,8
ffc095ac: 7c 64 1b 78 mr r4,r3
ffc095b0: 38 a0 00 00 li r5,0
ffc095b4: 7f c3 f3 78 mr r3,r30
ffc095b8: 7f e6 fb 78 mr r6,r31
ffc095bc: 38 e0 00 01 li r7,1
ffc095c0: 4b ff c2 5d bl ffc0581c <rtems_filesystem_evaluate_path>
ffc095c4: 2f 83 00 00 cmpwi cr7,r3,0
ffc095c8: 40 9e 00 98 bne- cr7,ffc09660 <unmount+0xd4>
return -1;
mt_entry = loc.mt_entry;
ffc095cc: 83 c1 00 18 lwz r30,24(r1)
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
ffc095d0: 80 01 00 08 lwz r0,8(r1)
ffc095d4: 81 3e 00 1c lwz r9,28(r30)
ffc095d8: 7f 89 00 00 cmpw cr7,r9,r0
ffc095dc: 40 9e 00 a4 bne- cr7,ffc09680 <unmount+0xf4>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
ffc095e0: 7f e3 fb 78 mr r3,r31
ffc095e4: 4b ff c3 95 bl ffc05978 <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 )
ffc095e8: 3d 20 00 00 lis r9,0
ffc095ec: 81 29 27 94 lwz r9,10132(r9)
ffc095f0: 80 09 00 14 lwz r0,20(r9)
ffc095f4: 7f 80 f0 00 cmpw cr7,r0,r30
ffc095f8: 41 9e 00 bc beq- cr7,ffc096b4 <unmount+0x128>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
ffc095fc: 80 9e 00 2c lwz r4,44(r30)
ffc09600: 3c 60 ff c1 lis r3,-63
ffc09604: 38 63 95 78 addi r3,r3,-27272
ffc09608: 4b ff cf 29 bl ffc06530 <rtems_filesystem_mount_iterate>
ffc0960c: 2f 83 00 00 cmpwi cr7,r3,0
ffc09610: 40 9e 00 a4 bne- cr7,ffc096b4 <unmount+0x128>
* 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 )
ffc09614: 7f c3 f3 78 mr r3,r30
ffc09618: 4b ff c7 d5 bl ffc05dec <rtems_libio_is_open_files_in_fs>
ffc0961c: 2f 83 00 01 cmpwi cr7,r3,1
ffc09620: 41 9e 00 94 beq- cr7,ffc096b4 <unmount+0x128>
* 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 )
ffc09624: 81 3e 00 14 lwz r9,20(r30)
ffc09628: 7f c3 f3 78 mr r3,r30
return -1;
ffc0962c: 3b e0 ff ff li r31,-1
* 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 )
ffc09630: 80 09 00 28 lwz r0,40(r9)
ffc09634: 7c 09 03 a6 mtctr r0
ffc09638: 4e 80 04 21 bctrl
ffc0963c: 2f 83 00 00 cmpwi cr7,r3,0
ffc09640: 41 9e 00 a0 beq- cr7,ffc096e0 <unmount+0x154> <== ALWAYS TAKEN
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
ffc09644: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED
ffc09648: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0964c: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED
ffc09650: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc09654: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED
ffc09658: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED
ffc0965c: 4e 80 00 20 blr <== NOT EXECUTED
ffc09660: 80 01 00 34 lwz r0,52(r1)
* 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 ) )
return -1;
ffc09664: 3b e0 ff ff li r31,-1
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
ffc09668: 7f e3 fb 78 mr r3,r31
ffc0966c: 83 c1 00 28 lwz r30,40(r1)
ffc09670: 7c 08 03 a6 mtlr r0
ffc09674: 83 e1 00 2c lwz r31,44(r1)
ffc09678: 38 21 00 30 addi r1,r1,48
ffc0967c: 4e 80 00 20 blr
/*
* 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 );
ffc09680: 7f e3 fb 78 mr r3,r31
ffc09684: 4b ff c2 f5 bl ffc05978 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EACCES );
ffc09688: 3b e0 ff ff li r31,-1
ffc0968c: 48 00 9a b5 bl ffc13140 <__errno>
ffc09690: 38 00 00 0d li r0,13
ffc09694: 90 03 00 00 stw r0,0(r3)
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
ffc09698: 7f e3 fb 78 mr r3,r31
ffc0969c: 80 01 00 34 lwz r0,52(r1)
ffc096a0: 83 c1 00 28 lwz r30,40(r1)
ffc096a4: 7c 08 03 a6 mtlr r0
ffc096a8: 83 e1 00 2c lwz r31,44(r1)
ffc096ac: 38 21 00 30 addi r1,r1,48
ffc096b0: 4e 80 00 20 blr
* descriptors that are currently active and reference nodes in the
* file system that we are trying to unmount
*/
if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
rtems_set_errno_and_return_minus_one( EBUSY );
ffc096b4: 48 00 9a 8d bl ffc13140 <__errno>
ffc096b8: 38 00 00 10 li r0,16
ffc096bc: 90 03 00 00 stw r0,0(r3)
ffc096c0: 3b e0 ff ff li r31,-1
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
ffc096c4: 7f e3 fb 78 mr r3,r31
ffc096c8: 80 01 00 34 lwz r0,52(r1)
ffc096cc: 83 c1 00 28 lwz r30,40(r1)
ffc096d0: 7c 08 03 a6 mtlr r0
ffc096d4: 83 e1 00 2c lwz r31,44(r1)
ffc096d8: 38 21 00 30 addi r1,r1,48
ffc096dc: 4e 80 00 20 blr
* 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){
ffc096e0: 81 3e 00 28 lwz r9,40(r30)
ffc096e4: 7f c3 f3 78 mr r3,r30
ffc096e8: 80 09 00 2c lwz r0,44(r9)
ffc096ec: 7c 09 03 a6 mtctr r0
ffc096f0: 4e 80 04 21 bctrl
ffc096f4: 2f 83 00 00 cmpwi cr7,r3,0
ffc096f8: 40 9e 00 58 bne- cr7,ffc09750 <unmount+0x1c4> <== NEVER TAKEN
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 );
ffc096fc: 3f e0 00 00 lis r31,0
ffc09700: 80 7f 28 1c lwz r3,10268(r31)
ffc09704: 38 80 00 00 li r4,0
ffc09708: 38 a0 00 00 li r5,0
ffc0970c: 48 00 0c ad bl ffc0a3b8 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
ffc09710: 7f c3 f3 78 mr r3,r30
ffc09714: 48 00 1a ad bl ffc0b1c0 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
ffc09718: 80 7f 28 1c lwz r3,10268(r31)
*/
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
ffc0971c: 3b e0 00 00 li r31,0
ffc09720: 48 00 0e 21 bl ffc0a540 <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 );
ffc09724: 38 7e 00 08 addi r3,r30,8
ffc09728: 4b ff c2 51 bl ffc05978 <rtems_filesystem_freenode>
free( mt_entry );
ffc0972c: 7f c3 f3 78 mr r3,r30
ffc09730: 4b ff c2 75 bl ffc059a4 <free>
return 0;
}
ffc09734: 80 01 00 34 lwz r0,52(r1)
ffc09738: 7f e3 fb 78 mr r3,r31
ffc0973c: 83 c1 00 28 lwz r30,40(r1)
ffc09740: 7c 08 03 a6 mtlr r0
ffc09744: 83 e1 00 2c lwz r31,44(r1)
ffc09748: 38 21 00 30 addi r1,r1,48
ffc0974c: 4e 80 00 20 blr
* 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 )
ffc09750: 81 3e 00 14 lwz r9,20(r30) <== NOT EXECUTED
ffc09754: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc09758: 80 09 00 20 lwz r0,32(r9) <== NOT EXECUTED
ffc0975c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc09760: 4e 80 04 21 bctrl <== NOT EXECUTED
ffc09764: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc09768: 41 9e fe dc beq+ cr7,ffc09644 <unmount+0xb8> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
ffc0976c: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc09770: 48 00 15 d1 bl ffc0ad40 <rtems_fatal_error_occurred> <== NOT EXECUTED
ffc08064 <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
ffc08064: 94 21 ff a8 stwu r1,-88(r1)
ffc08068: 7d 80 00 26 mfcr r12
ffc0806c: 7c 08 02 a6 mflr r0
ffc08070: 93 21 00 3c stw r25,60(r1)
ffc08074: 7c 99 23 78 mr r25,r4
ffc08078: 93 e1 00 54 stw r31,84(r1)
ffc0807c: 7c 7f 1b 78 mr r31,r3
ffc08080: 90 01 00 5c stw r0,92(r1)
ffc08084: 92 a1 00 2c stw r21,44(r1)
ffc08088: 92 c1 00 30 stw r22,48(r1)
ffc0808c: 92 e1 00 34 stw r23,52(r1)
ffc08090: 93 01 00 38 stw r24,56(r1)
ffc08094: 93 41 00 40 stw r26,64(r1)
ffc08098: 93 61 00 44 stw r27,68(r1)
ffc0809c: 93 81 00 48 stw r28,72(r1)
ffc080a0: 93 a1 00 4c stw r29,76(r1)
ffc080a4: 93 c1 00 50 stw r30,80(r1)
ffc080a8: 91 81 00 28 stw r12,40(r1)
for (; *fmt != '\0'; fmt++) {
ffc080ac: 88 63 00 00 lbz r3,0(r3)
ffc080b0: 2f 83 00 00 cmpwi cr7,r3,0
ffc080b4: 41 9e 02 00 beq- cr7,ffc082b4 <vprintk+0x250> <== NEVER TAKEN
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
BSP_output_char(*fmt);
ffc080b8: 3f 00 00 00 lis r24,0
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
ffc080bc: 3a c1 00 08 addi r22,r1,8
ffc080c0: 3e e0 ff c2 lis r23,-62
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
str = "";
ffc080c4: 3e a0 ff c2 lis r21,-62
ffc080c8: 48 00 00 1c b ffc080e4 <vprintk+0x80>
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
BSP_output_char(*fmt);
ffc080cc: 80 18 27 14 lwz r0,10004(r24)
ffc080d0: 7c 09 03 a6 mtctr r0
ffc080d4: 4e 80 04 21 bctrl
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
ffc080d8: 8c 7f 00 01 lbzu r3,1(r31)
ffc080dc: 2f 83 00 00 cmpwi cr7,r3,0
ffc080e0: 41 9e 01 d4 beq- cr7,ffc082b4 <vprintk+0x250>
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
ffc080e4: 2f 83 00 25 cmpwi cr7,r3,37
ffc080e8: 40 be ff e4 bne- cr7,ffc080cc <vprintk+0x68>
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
ffc080ec: 8d 3f 00 01 lbzu r9,1(r31)
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
ffc080f0: 3b 40 00 20 li r26,32
if (*fmt != '%') {
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
ffc080f4: 2f 89 00 30 cmpwi cr7,r9,48
ffc080f8: 41 9e 02 3c beq- cr7,ffc08334 <vprintk+0x2d0>
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
ffc080fc: 2f 89 00 2d cmpwi cr7,r9,45
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
ffc08100: 39 60 00 00 li r11,0
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
ffc08104: 41 9e 02 44 beq- cr7,ffc08348 <vprintk+0x2e4>
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
ffc08108: 38 09 ff d0 addi r0,r9,-48
ffc0810c: 54 00 06 3e clrlwi r0,r0,24
ffc08110: 2b 80 00 09 cmplwi cr7,r0,9
ffc08114: 3b c0 00 00 li r30,0
ffc08118: 41 9d 00 24 bgt- cr7,ffc0813c <vprintk+0xd8>
width *= 10;
ffc0811c: 1f de 00 0a mulli r30,r30,10
width += ((unsigned) *fmt - '0');
ffc08120: 7f de 4a 14 add r30,r30,r9
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
ffc08124: 8d 3f 00 01 lbzu r9,1(r31)
width *= 10;
width += ((unsigned) *fmt - '0');
ffc08128: 3b de ff d0 addi r30,r30,-48
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
ffc0812c: 38 09 ff d0 addi r0,r9,-48
ffc08130: 54 00 06 3e clrlwi r0,r0,24
ffc08134: 2b 80 00 09 cmplwi cr7,r0,9
ffc08138: 40 9d ff e4 ble+ cr7,ffc0811c <vprintk+0xb8>
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
ffc0813c: 2f 89 00 6c cmpwi cr7,r9,108
ffc08140: 41 9e 01 ec beq- cr7,ffc0832c <vprintk+0x2c8>
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
ffc08144: 2f 89 00 63 cmpwi cr7,r9,99
ffc08148: 41 9e 01 b0 beq- cr7,ffc082f8 <vprintk+0x294>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
BSP_output_char(chr);
continue;
}
if ( c == 's' ) {
ffc0814c: 2f 89 00 73 cmpwi cr7,r9,115
ffc08150: 41 9e 02 20 beq- cr7,ffc08370 <vprintk+0x30c>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
ffc08154: 2f 89 00 6f cmpwi cr7,r9,111
ffc08158: 41 9e 02 0c beq- cr7,ffc08364 <vprintk+0x300>
ffc0815c: 2f 89 00 4f cmpwi cr7,r9,79
ffc08160: 41 9e 02 04 beq- cr7,ffc08364 <vprintk+0x300>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
ffc08164: 2f 89 00 69 cmpwi cr7,r9,105
ffc08168: 41 9e 00 58 beq- cr7,ffc081c0 <vprintk+0x15c>
ffc0816c: 2f 89 00 49 cmpwi cr7,r9,73
ffc08170: 41 9e 00 50 beq- cr7,ffc081c0 <vprintk+0x15c>
ffc08174: 2f 89 00 64 cmpwi cr7,r9,100
ffc08178: 41 9e 00 48 beq- cr7,ffc081c0 <vprintk+0x15c>
c == 'd' || c == 'D' ) {
ffc0817c: 2f 89 00 44 cmpwi cr7,r9,68
ffc08180: 41 9e 00 40 beq- cr7,ffc081c0 <vprintk+0x15c>
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
ffc08184: 2f 89 00 75 cmpwi cr7,r9,117
ffc08188: 41 9e 03 14 beq- cr7,ffc0849c <vprintk+0x438>
ffc0818c: 2f 89 00 55 cmpwi cr7,r9,85
ffc08190: 41 9e 03 0c beq- cr7,ffc0849c <vprintk+0x438>
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
ffc08194: 2f 89 00 78 cmpwi cr7,r9,120
ffc08198: 41 9e 03 34 beq- cr7,ffc084cc <vprintk+0x468>
ffc0819c: 2f 89 00 58 cmpwi cr7,r9,88
ffc081a0: 41 9e 03 2c beq- cr7,ffc084cc <vprintk+0x468>
base = 16; sign = false;
} else if ( c == 'p' ) {
ffc081a4: 2f 89 00 70 cmpwi cr7,r9,112
ffc081a8: 41 9e 03 24 beq- cr7,ffc084cc <vprintk+0x468>
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
ffc081ac: 80 18 27 14 lwz r0,10004(r24)
ffc081b0: 7d 23 4b 78 mr r3,r9
ffc081b4: 7c 09 03 a6 mtctr r0
ffc081b8: 4e 80 04 21 bctrl
continue;
ffc081bc: 4b ff ff 1c b ffc080d8 <vprintk+0x74>
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
ffc081c0: 39 20 00 01 li r9,1
ffc081c4: 3b a0 00 0a li r29,10
BSP_output_char(c);
continue;
}
printNum(
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
ffc081c8: 89 79 00 00 lbz r11,0(r25)
ffc081cc: 2b 8b 00 08 cmplwi cr7,r11,8
ffc081d0: 40 9c 01 84 bge- cr7,ffc08354 <vprintk+0x2f0>
ffc081d4: 55 60 10 3a rlwinm r0,r11,2,0,29
ffc081d8: 81 59 00 08 lwz r10,8(r25)
ffc081dc: 39 6b 00 01 addi r11,r11,1
ffc081e0: 99 79 00 00 stb r11,0(r25)
ffc081e4: 7d 4a 02 14 add r10,r10,r0
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
ffc081e8: 2f 89 00 00 cmpwi cr7,r9,0
} else {
BSP_output_char(c);
continue;
}
printNum(
ffc081ec: 83 8a 00 00 lwz r28,0(r10)
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
ffc081f0: 41 9e 00 0c beq- cr7,ffc081fc <vprintk+0x198>
ffc081f4: 2f 9c 00 00 cmpwi cr7,r28,0
ffc081f8: 41 9c 02 b0 blt- cr7,ffc084a8 <vprintk+0x444>
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
ffc081fc: 7c 1c eb 96 divwu r0,r28,r29
ffc08200: 2f 80 00 00 cmpwi cr7,r0,0
ffc08204: 57 a7 06 3e clrlwi r7,r29,24
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
ffc08208: 39 20 00 00 li r9,0
while ((n = unsigned_num / base) > 0) {
ffc0820c: 40 be 00 10 bne+ cr7,ffc0821c <vprintk+0x1b8>
ffc08210: 48 00 02 c8 b ffc084d8 <vprintk+0x474>
ffc08214: 7c 1c 03 78 mr r28,r0
ffc08218: 7d 60 5b 78 mr r0,r11
ffc0821c: 7d 60 eb 96 divwu r11,r0,r29
ffc08220: 2f 8b 00 00 cmpwi cr7,r11,0
toPrint[count++] = (char) (unsigned_num - (n * base));
ffc08224: 7d 07 01 d6 mullw r8,r7,r0
ffc08228: 7d 41 4a 14 add r10,r1,r9
ffc0822c: 7f 88 e0 50 subf r28,r8,r28
ffc08230: 9b 8a 00 08 stb r28,8(r10)
ffc08234: 39 29 00 01 addi r9,r9,1
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
ffc08238: 40 9e ff dc bne+ cr7,ffc08214 <vprintk+0x1b0>
ffc0823c: 3b 69 00 01 addi r27,r9,1
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
ffc08240: 7f 9b f0 40 cmplw cr7,r27,r30
count = 0;
while ((n = unsigned_num / base) > 0) {
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
ffc08244: 7d 21 4a 14 add r9,r1,r9
ffc08248: 98 09 00 08 stb r0,8(r9)
for (n=maxwidth ; n > count; n-- )
ffc0824c: 40 9c 00 24 bge- cr7,ffc08270 <vprintk+0x20c>
ffc08250: 3b 98 27 14 addi r28,r24,10004
BSP_output_char(lead);
ffc08254: 80 1c 00 00 lwz r0,0(r28)
ffc08258: 7f 43 d3 78 mr r3,r26
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
ffc0825c: 3b de ff ff addi r30,r30,-1
BSP_output_char(lead);
ffc08260: 7c 09 03 a6 mtctr r0
ffc08264: 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-- )
ffc08268: 7f 9b f0 40 cmplw cr7,r27,r30
ffc0826c: 41 9c ff e8 blt+ cr7,ffc08254 <vprintk+0x1f0>
BSP_output_char(lead);
for (n = 0; n < count; n++) {
ffc08270: 2f 9b 00 00 cmpwi cr7,r27,0
ffc08274: 41 be fe 64 beq- cr7,ffc080d8 <vprintk+0x74> <== NEVER TAKEN
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
ffc08278: 7f b6 da 14 add r29,r22,r27
ffc0827c: 3b c0 00 00 li r30,0
ffc08280: 3b 98 27 14 addi r28,r24,10004
ffc08284: 3b 57 8d bc addi r26,r23,-29252
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)])]);
ffc08288: 8d 3d ff ff lbzu r9,-1(r29)
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
ffc0828c: 3b de 00 01 addi r30,r30,1
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
ffc08290: 80 1c 00 00 lwz r0,0(r28)
ffc08294: 7c 7a 48 ae lbzx r3,r26,r9
ffc08298: 7c 09 03 a6 mtctr r0
ffc0829c: 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++) {
ffc082a0: 7f 9b f0 40 cmplw cr7,r27,r30
ffc082a4: 41 9d ff e4 bgt+ cr7,ffc08288 <vprintk+0x224>
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
ffc082a8: 8c 7f 00 01 lbzu r3,1(r31)
ffc082ac: 2f 83 00 00 cmpwi cr7,r3,0
ffc082b0: 40 9e fe 34 bne+ cr7,ffc080e4 <vprintk+0x80> <== ALWAYS TAKEN
sign,
width,
lead
);
}
}
ffc082b4: 80 01 00 5c lwz r0,92(r1)
ffc082b8: 81 81 00 28 lwz r12,40(r1)
ffc082bc: 7c 08 03 a6 mtlr r0
ffc082c0: 82 a1 00 2c lwz r21,44(r1)
ffc082c4: 82 c1 00 30 lwz r22,48(r1)
ffc082c8: 7d 80 81 20 mtcrf 8,r12
ffc082cc: 82 e1 00 34 lwz r23,52(r1)
ffc082d0: 83 01 00 38 lwz r24,56(r1)
ffc082d4: 83 21 00 3c lwz r25,60(r1)
ffc082d8: 83 41 00 40 lwz r26,64(r1)
ffc082dc: 83 61 00 44 lwz r27,68(r1)
ffc082e0: 83 81 00 48 lwz r28,72(r1)
ffc082e4: 83 a1 00 4c lwz r29,76(r1)
ffc082e8: 83 c1 00 50 lwz r30,80(r1)
ffc082ec: 83 e1 00 54 lwz r31,84(r1)
ffc082f0: 38 21 00 58 addi r1,r1,88
ffc082f4: 4e 80 00 20 blr
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
ffc082f8: 89 39 00 00 lbz r9,0(r25)
ffc082fc: 2b 89 00 08 cmplwi cr7,r9,8
ffc08300: 40 9c 01 6c bge- cr7,ffc0846c <vprintk+0x408> <== NEVER TAKEN
ffc08304: 55 20 10 3a rlwinm r0,r9,2,0,29
ffc08308: 81 79 00 08 lwz r11,8(r25)
ffc0830c: 39 29 00 01 addi r9,r9,1
ffc08310: 99 39 00 00 stb r9,0(r25)
ffc08314: 7d 6b 02 14 add r11,r11,r0
BSP_output_char(chr);
ffc08318: 80 18 27 14 lwz r0,10004(r24)
ffc0831c: 88 6b 00 03 lbz r3,3(r11)
ffc08320: 7c 09 03 a6 mtctr r0
ffc08324: 4e 80 04 21 bctrl
continue;
ffc08328: 4b ff fd b0 b ffc080d8 <vprintk+0x74>
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = true;
c = *++fmt;
ffc0832c: 8d 3f 00 01 lbzu r9,1(r31)
ffc08330: 4b ff fe 14 b ffc08144 <vprintk+0xe0>
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
ffc08334: 8d 3f 00 01 lbzu r9,1(r31)
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
ffc08338: 3b 40 00 30 li r26,48
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
ffc0833c: 39 60 00 00 li r11,0
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
ffc08340: 2f 89 00 2d cmpwi cr7,r9,45
ffc08344: 40 9e fd c4 bne+ cr7,ffc08108 <vprintk+0xa4> <== ALWAYS TAKEN
minus = true;
fmt++;
ffc08348: 8d 3f 00 01 lbzu r9,1(r31)
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
ffc0834c: 39 60 00 01 li r11,1
ffc08350: 4b ff fd b8 b ffc08108 <vprintk+0xa4>
BSP_output_char(c);
continue;
}
printNum(
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
ffc08354: 81 59 00 04 lwz r10,4(r25)
ffc08358: 38 0a 00 04 addi r0,r10,4
ffc0835c: 90 19 00 04 stw r0,4(r25)
ffc08360: 4b ff fe 88 b ffc081e8 <vprintk+0x184>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
ffc08364: 39 20 00 00 li r9,0
ffc08368: 3b a0 00 08 li r29,8
ffc0836c: 4b ff fe 5c b ffc081c8 <vprintk+0x164>
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
ffc08370: 89 39 00 00 lbz r9,0(r25)
ffc08374: 2b 89 00 08 cmplwi cr7,r9,8
ffc08378: 40 9c 01 04 bge- cr7,ffc0847c <vprintk+0x418> <== NEVER TAKEN
ffc0837c: 55 20 10 3a rlwinm r0,r9,2,0,29
ffc08380: 81 59 00 08 lwz r10,8(r25)
ffc08384: 39 29 00 01 addi r9,r9,1
ffc08388: 99 39 00 00 stb r9,0(r25)
ffc0838c: 7d 4a 02 14 add r10,r10,r0
ffc08390: 83 6a 00 00 lwz r27,0(r10)
if ( str == NULL ) {
ffc08394: 2f 9b 00 00 cmpwi cr7,r27,0
ffc08398: 41 9e 00 fc beq- cr7,ffc08494 <vprintk+0x430>
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
ffc0839c: 88 1b 00 00 lbz r0,0(r27)
ffc083a0: 3b a0 00 00 li r29,0
ffc083a4: 2f 80 00 00 cmpwi cr7,r0,0
ffc083a8: 41 9e 00 14 beq- cr7,ffc083bc <vprintk+0x358>
ffc083ac: 3b bd 00 01 addi r29,r29,1
ffc083b0: 7c 1b e8 ae lbzx r0,r27,r29
ffc083b4: 2f 80 00 00 cmpwi cr7,r0,0
ffc083b8: 40 9e ff f4 bne+ cr7,ffc083ac <vprintk+0x348>
;
/* leading spaces */
if ( !minus )
ffc083bc: 2e 0b 00 00 cmpwi cr4,r11,0
ffc083c0: 40 92 00 30 bne- cr4,ffc083f0 <vprintk+0x38c>
for ( i=len ; i<width ; i++ )
ffc083c4: 7f 9d f0 40 cmplw cr7,r29,r30
ffc083c8: 40 9c 00 28 bge- cr7,ffc083f0 <vprintk+0x38c>
ffc083cc: 7f ba eb 78 mr r26,r29
ffc083d0: 3b 98 27 14 addi r28,r24,10004
BSP_output_char(' ');
ffc083d4: 80 1c 00 00 lwz r0,0(r28)
ffc083d8: 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++ )
ffc083dc: 3b 5a 00 01 addi r26,r26,1
BSP_output_char(' ');
ffc083e0: 7c 09 03 a6 mtctr r0
ffc083e4: 4e 80 04 21 bctrl
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
ffc083e8: 7f 9a f0 40 cmplw cr7,r26,r30
ffc083ec: 41 9c ff e8 blt+ cr7,ffc083d4 <vprintk+0x370>
BSP_output_char(' ');
/* no width option */
if (width == 0) {
ffc083f0: 2f 9e 00 00 cmpwi cr7,r30,0
ffc083f4: 40 9e 00 10 bne- cr7,ffc08404 <vprintk+0x3a0>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
ffc083f8: 2f 9d 00 00 cmpwi cr7,r29,0
ffc083fc: 41 9e 00 40 beq- cr7,ffc0843c <vprintk+0x3d8>
ffc08400: 7f be eb 78 mr r30,r29
ffc08404: 88 7b 00 00 lbz r3,0(r27)
ffc08408: 2f 83 00 00 cmpwi cr7,r3,0
ffc0840c: 41 9e 00 30 beq- cr7,ffc0843c <vprintk+0x3d8> <== NEVER TAKEN
BSP_output_char(*str);
ffc08410: 80 18 27 14 lwz r0,10004(r24)
ffc08414: 3b 98 27 14 addi r28,r24,10004
ffc08418: 7c 09 03 a6 mtctr r0
ffc0841c: 4e 80 04 21 bctrl
ffc08420: 48 00 00 10 b ffc08430 <vprintk+0x3cc>
ffc08424: 80 1c 00 00 lwz r0,0(r28)
ffc08428: 7c 09 03 a6 mtctr r0
ffc0842c: 4e 80 04 21 bctrl
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
ffc08430: 8c 7b 00 01 lbzu r3,1(r27)
ffc08434: 2f 83 00 00 cmpwi cr7,r3,0
ffc08438: 40 9e ff ec bne+ cr7,ffc08424 <vprintk+0x3c0>
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
ffc0843c: 41 b2 fc 9c beq- cr4,ffc080d8 <vprintk+0x74>
for ( i=len ; i<width ; i++ )
ffc08440: 7f 9d f0 40 cmplw cr7,r29,r30
ffc08444: 40 bc fc 94 bge- cr7,ffc080d8 <vprintk+0x74>
ffc08448: 3b 98 27 14 addi r28,r24,10004
BSP_output_char(' ');
ffc0844c: 80 1c 00 00 lwz r0,0(r28)
ffc08450: 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++ )
ffc08454: 3b bd 00 01 addi r29,r29,1
BSP_output_char(' ');
ffc08458: 7c 09 03 a6 mtctr r0
ffc0845c: 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++ )
ffc08460: 7f 9d f0 40 cmplw cr7,r29,r30
ffc08464: 41 9c ff e8 blt+ cr7,ffc0844c <vprintk+0x3e8>
ffc08468: 4b ff fc 70 b ffc080d8 <vprintk+0x74>
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
ffc0846c: 81 79 00 04 lwz r11,4(r25) <== NOT EXECUTED
ffc08470: 38 0b 00 04 addi r0,r11,4 <== NOT EXECUTED
ffc08474: 90 19 00 04 stw r0,4(r25) <== NOT EXECUTED
ffc08478: 4b ff fe a0 b ffc08318 <vprintk+0x2b4> <== NOT EXECUTED
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
ffc0847c: 81 59 00 04 lwz r10,4(r25) <== NOT EXECUTED
ffc08480: 38 0a 00 04 addi r0,r10,4 <== NOT EXECUTED
ffc08484: 90 19 00 04 stw r0,4(r25) <== NOT EXECUTED
ffc08488: 83 6a 00 00 lwz r27,0(r10) <== NOT EXECUTED
if ( str == NULL ) {
ffc0848c: 2f 9b 00 00 cmpwi cr7,r27,0 <== NOT EXECUTED
ffc08490: 40 9e ff 0c bne+ cr7,ffc0839c <vprintk+0x338> <== NOT EXECUTED
str = "";
ffc08494: 3b 75 82 e8 addi r27,r21,-32024
ffc08498: 4b ff ff 04 b ffc0839c <vprintk+0x338>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
ffc0849c: 39 20 00 00 li r9,0
ffc084a0: 3b a0 00 0a li r29,10
ffc084a4: 4b ff fd 24 b ffc081c8 <vprintk+0x164>
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
ffc084a8: 80 18 27 14 lwz r0,10004(r24)
ffc084ac: 38 60 00 2d li r3,45
unsigned_num = (unsigned long) -num;
ffc084b0: 7f 9c 00 d0 neg r28,r28
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
ffc084b4: 7c 09 03 a6 mtctr r0
ffc084b8: 4e 80 04 21 bctrl
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
ffc084bc: 2f 9e 00 00 cmpwi cr7,r30,0
ffc084c0: 41 be fd 3c beq- cr7,ffc081fc <vprintk+0x198>
ffc084c4: 3b de ff ff addi r30,r30,-1
ffc084c8: 4b ff fd 34 b ffc081fc <vprintk+0x198>
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
ffc084cc: 39 20 00 00 li r9,0
ffc084d0: 3b a0 00 10 li r29,16
ffc084d4: 4b ff fc f4 b ffc081c8 <vprintk+0x164>
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
ffc084d8: 7f 80 e3 78 mr r0,r28
ffc084dc: 3b 60 00 01 li r27,1
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
ffc084e0: 39 20 00 00 li r9,0
ffc084e4: 4b ff fd 5c b ffc08240 <vprintk+0x1dc>
ffc179dc <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
ffc179dc: 94 21 ff f0 stwu r1,-16(r1)
ffc179e0: 7c 08 02 a6 mflr r0
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc179e4: 3d 20 00 00 lis r9,0
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
ffc179e8: 90 01 00 14 stw r0,20(r1)
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc179ec: 80 09 26 cc lwz r0,9932(r9)
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
ffc179f0: 93 e1 00 0c stw r31,12(r1)
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
ffc179f4: 7f 83 00 40 cmplw cr7,r3,r0
ffc179f8: 40 9c 00 8c bge- cr7,ffc17a84 <write+0xa8>
iop = rtems_libio_iop( fd );
ffc179fc: 3d 60 00 00 lis r11,0
ffc17a00: 83 eb 27 88 lwz r31,10120(r11)
ffc17a04: 54 63 30 32 rlwinm r3,r3,6,0,25
ffc17a08: 7f ff 1a 14 add r31,r31,r3
rtems_libio_check_is_open( iop );
ffc17a0c: 81 7f 00 18 lwz r11,24(r31)
ffc17a10: 71 6a 01 00 andi. r10,r11,256
ffc17a14: 41 82 00 70 beq- ffc17a84 <write+0xa8>
rtems_libio_check_buffer( buffer );
ffc17a18: 2f 84 00 00 cmpwi cr7,r4,0
ffc17a1c: 41 9e 00 7c beq- cr7,ffc17a98 <write+0xbc> <== NEVER TAKEN
rtems_libio_check_count( count );
ffc17a20: 2f 85 00 00 cmpwi cr7,r5,0
ffc17a24: 38 60 00 00 li r3,0
ffc17a28: 41 9e 00 48 beq- cr7,ffc17a70 <write+0x94>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
ffc17a2c: 71 60 00 04 andi. r0,r11,4
ffc17a30: 41 82 00 68 beq- ffc17a98 <write+0xbc>
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
ffc17a34: 81 3f 00 24 lwz r9,36(r31)
ffc17a38: 7f e3 fb 78 mr r3,r31
ffc17a3c: 80 09 00 0c lwz r0,12(r9)
ffc17a40: 7c 09 03 a6 mtctr r0
ffc17a44: 4e 80 04 21 bctrl
if ( rc > 0 )
ffc17a48: 2c 03 00 00 cmpwi r3,0
ffc17a4c: 40 81 00 24 ble- ffc17a70 <write+0x94>
iop->offset += rc;
ffc17a50: 81 7f 00 10 lwz r11,16(r31)
ffc17a54: 7c 6a 1b 78 mr r10,r3
ffc17a58: 81 9f 00 14 lwz r12,20(r31)
ffc17a5c: 7c 69 fe 70 srawi r9,r3,31
ffc17a60: 7d 4a 60 14 addc r10,r10,r12
ffc17a64: 7d 29 59 14 adde r9,r9,r11
ffc17a68: 91 3f 00 10 stw r9,16(r31)
ffc17a6c: 91 5f 00 14 stw r10,20(r31)
return rc;
}
ffc17a70: 80 01 00 14 lwz r0,20(r1)
ffc17a74: 83 e1 00 0c lwz r31,12(r1)
ffc17a78: 38 21 00 10 addi r1,r1,16
ffc17a7c: 7c 08 03 a6 mtlr r0
ffc17a80: 4e 80 00 20 blr
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
ffc17a84: 4b ff a5 f1 bl ffc12074 <__errno>
ffc17a88: 38 00 00 09 li r0,9
ffc17a8c: 90 03 00 00 stw r0,0(r3)
ffc17a90: 38 60 ff ff li r3,-1
ffc17a94: 4b ff ff dc b ffc17a70 <write+0x94>
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
ffc17a98: 4b ff a5 dd bl ffc12074 <__errno>
ffc17a9c: 38 00 00 16 li r0,22
ffc17aa0: 90 03 00 00 stw r0,0(r3)
ffc17aa4: 38 60 ff ff li r3,-1
ffc17aa8: 4b ff ff c8 b ffc17a70 <write+0x94>
ffc09c94 <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc09c94: 94 21 ff d8 stwu r1,-40(r1)
ffc09c98: 7c 08 02 a6 mflr r0
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc09c9c: 3d 20 00 00 lis r9,0
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc09ca0: 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 );
ffc09ca4: 80 09 26 cc lwz r0,9932(r9)
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc09ca8: 93 61 00 14 stw r27,20(r1)
ffc09cac: 7c bb 2b 78 mr r27,r5
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc09cb0: 7f 83 00 40 cmplw cr7,r3,r0
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
ffc09cb4: 93 21 00 0c stw r25,12(r1)
ffc09cb8: 93 41 00 10 stw r26,16(r1)
ffc09cbc: 93 81 00 18 stw r28,24(r1)
ffc09cc0: 93 a1 00 1c stw r29,28(r1)
ffc09cc4: 93 c1 00 20 stw r30,32(r1)
ffc09cc8: 93 e1 00 24 stw r31,36(r1)
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
ffc09ccc: 40 9c 01 5c bge- cr7,ffc09e28 <writev+0x194>
iop = rtems_libio_iop( fd );
ffc09cd0: 3d 20 00 00 lis r9,0
ffc09cd4: 83 29 27 88 lwz r25,10120(r9)
ffc09cd8: 54 63 30 32 rlwinm r3,r3,6,0,25
ffc09cdc: 7f 39 1a 14 add r25,r25,r3
rtems_libio_check_is_open( iop );
ffc09ce0: 80 19 00 18 lwz r0,24(r25)
ffc09ce4: 70 09 01 00 andi. r9,r0,256
ffc09ce8: 41 82 01 40 beq- ffc09e28 <writev+0x194>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
ffc09cec: 70 09 00 04 andi. r9,r0,4
ffc09cf0: 41 82 00 f8 beq- ffc09de8 <writev+0x154> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
ffc09cf4: 2f 84 00 00 cmpwi cr7,r4,0
ffc09cf8: 41 9e 00 f0 beq- cr7,ffc09de8 <writev+0x154>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
ffc09cfc: 2f 85 00 00 cmpwi cr7,r5,0
ffc09d00: 40 9d 00 e8 ble- cr7,ffc09de8 <writev+0x154>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
ffc09d04: 2f 85 04 00 cmpwi cr7,r5,1024
ffc09d08: 41 9d 00 e0 bgt- cr7,ffc09de8 <writev+0x154> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
ffc09d0c: 7c 9d 23 78 mr r29,r4
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
ffc09d10: 7c a9 03 a6 mtctr r5
ffc09d14: 7c 89 23 78 mr r9,r4
ffc09d18: 39 00 00 01 li r8,1
ffc09d1c: 39 60 00 00 li r11,0
ffc09d20: 48 00 00 08 b ffc09d28 <writev+0x94>
* 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++ ) {
ffc09d24: 7c 0b 03 78 mr r11,r0
/*
* 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 )
ffc09d28: 80 09 00 00 lwz r0,0(r9)
ffc09d2c: 2f 80 00 00 cmpwi cr7,r0,0
ffc09d30: 41 9e 00 b8 beq- cr7,ffc09de8 <writev+0x154>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
ffc09d34: 81 49 00 04 lwz r10,4(r9)
* 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++ ) {
ffc09d38: 39 29 00 08 addi r9,r9,8
if ( iov[v].iov_len )
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
ffc09d3c: 7c 0b 52 14 add r0,r11,r10
if ( total < old || total > SSIZE_MAX )
ffc09d40: 7f 80 58 00 cmpw cr7,r0,r11
*/
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
ffc09d44: 31 4a ff ff addic r10,r10,-1
ffc09d48: 7d 4a 51 10 subfe r10,r10,r10
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
ffc09d4c: 2f 00 7f ff cmpwi cr6,r0,32767
*/
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
ffc09d50: 7d 08 50 38 and r8,r8,r10
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
ffc09d54: 41 9c 00 94 blt- cr7,ffc09de8 <writev+0x154>
ffc09d58: 41 99 00 90 bgt- cr6,ffc09de8 <writev+0x154> <== NEVER TAKEN
* 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++ ) {
ffc09d5c: 42 00 ff c8 bdnz+ ffc09d24 <writev+0x90>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
ffc09d60: 2f 88 00 00 cmpwi cr7,r8,0
return 0;
ffc09d64: 3b 40 00 00 li r26,0
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
ffc09d68: 40 9e 00 90 bne- cr7,ffc09df8 <writev+0x164>
ffc09d6c: 3b 80 00 00 li r28,0
ffc09d70: 48 00 00 10 b ffc09d80 <writev+0xec>
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ffc09d74: 7f 9b e0 00 cmpw cr7,r27,r28
ffc09d78: 3b bd 00 08 addi r29,r29,8
ffc09d7c: 40 9d 00 7c ble- cr7,ffc09df8 <writev+0x164>
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
ffc09d80: 80 bd 00 04 lwz r5,4(r29)
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ffc09d84: 3b 9c 00 01 addi r28,r28,1
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
ffc09d88: 2f 85 00 00 cmpwi cr7,r5,0
ffc09d8c: 41 9e ff e8 beq+ cr7,ffc09d74 <writev+0xe0> <== NEVER TAKEN
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
ffc09d90: 81 39 00 24 lwz r9,36(r25)
ffc09d94: 7f 23 cb 78 mr r3,r25
ffc09d98: 80 9d 00 00 lwz r4,0(r29)
ffc09d9c: 80 09 00 0c lwz r0,12(r9)
ffc09da0: 7c 09 03 a6 mtctr r0
ffc09da4: 4e 80 04 21 bctrl
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
ffc09da8: 2c 03 00 00 cmpwi r3,0
ffc09dac: 41 80 00 90 blt- ffc09e3c <writev+0x1a8> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
ffc09db0: 41 82 00 28 beq- ffc09dd8 <writev+0x144> <== NEVER TAKEN
iop->offset += bytes;
ffc09db4: 81 39 00 10 lwz r9,16(r25)
ffc09db8: 7c 7f 1b 78 mr r31,r3
ffc09dbc: 81 59 00 14 lwz r10,20(r25)
ffc09dc0: 7c 7e fe 70 srawi r30,r3,31
total += bytes;
ffc09dc4: 7f 5a 1a 14 add r26,r26,r3
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
ffc09dc8: 7d 4a f8 14 addc r10,r10,r31
ffc09dcc: 7d 29 f1 14 adde r9,r9,r30
ffc09dd0: 91 39 00 10 stw r9,16(r25)
ffc09dd4: 91 59 00 14 stw r10,20(r25)
total += bytes;
}
if (bytes != iov[ v ].iov_len)
ffc09dd8: 80 1d 00 04 lwz r0,4(r29)
ffc09ddc: 7f 83 00 00 cmpw cr7,r3,r0
ffc09de0: 41 9e ff 94 beq+ cr7,ffc09d74 <writev+0xe0> <== ALWAYS TAKEN
ffc09de4: 48 00 00 14 b ffc09df8 <writev+0x164> <== NOT EXECUTED
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
ffc09de8: 48 00 96 a9 bl ffc13490 <__errno>
ffc09dec: 38 00 00 16 li r0,22
ffc09df0: 90 03 00 00 stw r0,0(r3)
ffc09df4: 3b 40 ff ff li r26,-1
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
ffc09df8: 80 01 00 2c lwz r0,44(r1)
ffc09dfc: 7f 43 d3 78 mr r3,r26
ffc09e00: 83 21 00 0c lwz r25,12(r1)
ffc09e04: 7c 08 03 a6 mtlr r0
ffc09e08: 83 41 00 10 lwz r26,16(r1)
ffc09e0c: 83 61 00 14 lwz r27,20(r1)
ffc09e10: 83 81 00 18 lwz r28,24(r1)
ffc09e14: 83 a1 00 1c lwz r29,28(r1)
ffc09e18: 83 c1 00 20 lwz r30,32(r1)
ffc09e1c: 83 e1 00 24 lwz r31,36(r1)
ffc09e20: 38 21 00 28 addi r1,r1,40
ffc09e24: 4e 80 00 20 blr
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
ffc09e28: 48 00 96 69 bl ffc13490 <__errno>
ffc09e2c: 38 00 00 09 li r0,9
ffc09e30: 90 03 00 00 stw r0,0(r3)
ffc09e34: 3b 40 ff ff li r26,-1
ffc09e38: 4b ff ff c0 b ffc09df8 <writev+0x164>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
ffc09e3c: 3b 40 ff ff li r26,-1 <== NOT EXECUTED
ffc09e40: 4b ff ff b8 b ffc09df8 <writev+0x164> <== NOT EXECUTED